Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
83 user(s) are online (50 user(s) are browsing Forums)

Members: 0
Guests: 83

more...

Headlines

Forum Index


Board index » All Posts (thomas)




Re: Reliability of stack program (or why stack for program too big)
Not too shy to talk
Not too shy to talk


@Slayer

This shell-statup does not look as if you often use the shell.

Here is one which makes some work a bit easier:

set echo off
set _mchar 
"||"
set _pchar "|"
prompt "*e[0;32m%s*e[0m*n%n> "
stack 100000
alias x     endcli
alias 
exit  endcli
alias cls   
echo "*ec" noline
alias ren   rename
alias del   delete
alias md    makedir
alias cd
..  cd /
alias ex    execute
alias st    status full
alias res   resident
alias lc    run 
>nillimpidclock restart
alias ed    run 
>niled []
alias sn    search s:serien []
alias mv    run >nilmultiview >con:80/80/300/100/MultiView/AUTO/CLOSE/WAIT []
alias cc    execute s:cc []
alias say   rx "numeric digits 14; pi = 3.14159265358979323846; e = 2.7182818284590452354; say []"
alias find  list all lformat=%p%n p=[]
alias ascii rx "do i=0 to 255 by 32; l = ''; if i >= 32 & i < 128 | i >= 160 then do j=0 to 31; l = l || d2c(i+j); end; say l; end"
alias ppaint run >nilppaint:ppaint
alias touch  setdate
alias ccmake dmake
alias address   rx 
"options results; address []"
alias hdtoolbox run >nilhdtoolbox
alias snoopdos  run 
>nilsnoopdos
alias playcdda  copy to audio
:b/16/c/2/f/44100 []
alias cleanram  delete ram:~(env|clipboards|t|disk.infoall force quiet
;alias picshow   share:sources/picshow/picshow
;alias thumb     share:sources/picshow/thumb

Go to top


Re: Problems with IGraphics->Flood()
Not too shy to talk
Not too shy to talk


@RNS-AMiGA-Club

I successfully tried Flood() on OS 3.9 directly into the window and the bitmap is 32 bit, so it does work correctly. I will try it with an off-screen bitmap later.

Go to top


Re: Problems with IGraphics->Flood()
Not too shy to talk
Not too shy to talk


@RNS-AMiGA-Club

What does the destination bitmap/rastport contain?

Did you read the desctiption of Flood? It works differently than usual fill functions in paint programs for example.


Edit: your TmpRas ist not initialized correctly. The size should be RASSIZE(256,256), not 256*256. We are talking about a single bitplane, not a chunky bitmap.

Go to top


Re: Plain and simple rectangle in a ReAction window???
Not too shy to talk
Not too shy to talk


@Deniil

Your function gets the object pointer as second argument. Simply use ((struct Gadget *)o)->LeftEdge, TopEdge, Width and Height or use GetAttr(GA_Left,o,&buffer) etc.

Go to top


Re: Sorting a list
Not too shy to talk
Not too shy to talk


@Antique

You can retrieve the contents of each column with the GetListBrowserNodeAttrs function. Use this in your comparison routine.

Go to top


Re: Device at boot time
Not too shy to talk
Not too shy to talk


@Amigo1

A disk icon stays on the desktop if a file or directory is still opened on the volume. For example if the disk contains a .backdrop file which names several left out icons, you first have to put back all these icons before Workbench allows the disk icon to disappear.

Go to top


Re: Timer.device problem
Not too shy to talk
Not too shy to talk


I am sure that CreateIORequest and CreateMsgPort call AllocSysObject internally, so it's not such a big difference to call this or that function.

AllocSysObject was introduced to standardize the allocation of system structures and to reduce the number of CreateXXX functions.

It's ok to use AllocSysObject if you write software for OS4 only. But if your code should remain portable to other Amiga platforms, it's better to use functions which exist on all systems.

Go to top


Re: Timer.device problem
Not too shy to talk
Not too shy to talk


@alfkil

Your code is missing a call to WaitIO to clean up the request sent by SendIO.

Also it makes absolutely no sense to use WaitPort on an I/O port. If you want to wait for an IORequest only, you can use WaitIO instead of WaitPort. If you want to wait for multiple signals, you have to use Wait anyway.

Finally, if you use WaitIO immediately after SendIO, you can as well replace both by one call to DoIO.

Use this as an example for an asynchronous timer:

#define __USE_OLD_TIMEVAL__ 1 // for compatibility with OS 3.x and below

#include <proto/exec.h>
#include <proto/dos.h>
#include <devices/timer.h>

int main (void)

{
struct MsgPort *port;
struct timerequest *timer;
BOOL running;
ULONG timersig;
ULONG received;
ULONG counter;

port CreateMsgPort();
if (
port)
    {
    
timer = (struct timerequest *) CreateIORequest (port,sizeof(struct timerequest));
    if (
timer)
        {
        if (!
OpenDevice ("timer.device",UNIT_VBLANK,(struct IORequest *)timer,0))
            {
            
timersig 1L << port->mp_SigBit;

            
timer->tr_node.io_Command TR_ADDREQUEST;
            
timer->tr_time.tv_secs    1;
            
timer->tr_time.tv_micro   0;
            
SendIO ((struct IORequest *)timer);

            
counter 5;

            
running TRUE;
            do    {
                
Printf ("Please press Ctrl-C (%lu seconds to go)\n",counter);

                
received Wait (timersig SIGBREAKF_CTRL_C);

                if (
received SIGBREAKF_CTRL_C)
                    {
                    
Printf ("Ctrl-C received; timer stopping.\n");
                    
running FALSE;
                    }

                if (
received timersig)
                    {
                    
WaitIO ((struct IORequest *)timer);

                    
counter --;
                    if (
counter == 0)
                        {
                        
Printf ("Timeout; no Ctrl-C received.\n");
                        
running FALSE;
                        }
                    else
                        {
                        
timer->tr_node.io_Command TR_ADDREQUEST;
                        
timer->tr_time.tv_secs    1;
                        
timer->tr_time.tv_micro   0;
                        
SendIO ((struct IORequest *)timer);
                        }
                    }
                }
            while (
running);

            if (
counter 0)
                {
                if (!
CheckIO ((struct IORequest *)timer))
                    
AbortIO ((struct IORequest *)timer);
                
WaitIO ((struct IORequest *)timer);
                }

            
CloseDevice ((struct IORequest *)timer);
            }
        
DeleteIORequest ((struct IORequest *)timer);
        }
    
DeleteMsgPort (port);
    }

return (
0);
}


Using UNIT_MICROHZ for long-term intervals is a waste of timer hardware and inaccurate also. There is a discussion about the different units in the beginning of the timer.device autodocs.

Go to top


Re: Why was SObjs added to OS4?
Not too shy to talk
Not too shy to talk


@ChrisH

Quote:
Something I've long wondered about is why SObjs were added to AmigaOS4


Simple answer: lazyness. Programmers are lazy like hell. SObjects exist in Linux. Adding them to AmigaOS allows to reuse them without difficult adaption.

Go to top


Re: Format a drive with DOS\03
Not too shy to talk
Not too shy to talk


@Amigo1

You can use this to check and change what is stored in the partition table: http://thomas-rapp.homepage.t-online. ... wnloads/changebootpri.lha

Go to top


Re: OS4welt.de
Not too shy to talk
Not too shy to talk



Go to top


Re: AOS4 and FAT32 harddrives: compatibility and generality...
Not too shy to talk
Not too shy to talk


@Mrodfr

HDToolbox will create an Amiga partition table and the PC will not be able to access it. You need to use Windows Disk Management or similar to create PC partitions, then the Amiga will be able to access it.

And no, you cannot use SFS on this harddrive if you want to access it from the PC. Windows is not able to create an SFS partition. You cannot have a PC partition table and an Amiga partition table at the same time. (You could, but it is a very advanced task to create this mixture.)

Go to top


Re: Need some help to close active window by input.device
Not too shy to talk
Not too shy to talk


@tonyw

He does not close the window. He sends the order to close the window to the application. The application can then still refuse to actually close its window. For the application the same happens as if the user clicked the close button.

Go to top


Re: blizzard ppc scsii problem
Not too shy to talk
Not too shy to talk


@alfkil

Software and documentation is available at http://phase5.a1k.org/

Make sure that your SCSI bus is correctly terminated as described in the manual.

Run UnitControl and click on Rescan. You should either get a very detailed error report or the device appears.

If the device appears in UnitControl only after a rescan, then your settings in the Esc menu are not correct.

If you get an error report, then something regarding the hardware is not correct, probably termination. But read the error report and try to understand it.

A firmware update, even if you flash the same version as you already have, is a good way to reset all options in the Esc menu to default.

Do not "try more combinations". Read the documentation, find out the one correct combination and use that. Using wrong settings will not only not work but may even damage your devices.

Go to top


Re: Email Database
Not too shy to talk
Not too shy to talk


I don't think that spam email is a good form of marketing. Collecting email addresses to send spam to sounds rather dubious. Even if it's not intended, publishing a large number of email addresses on one web page is a welcome opportunity for spam senders.

Go to top


Re: special CreateDeleteString function
Not too shy to talk
Not too shy to talk


@freddix

Additionally I would also add some safety checks to avoid memory leaks and duplicate freeing:

int DeleteCreateString (char **ZePointerunsigned int NewSize)

{
   if (*
ZePointer != NULL)
   {
      
free (*ZePointer);
      *
ZePointer NULL;
   }

   if (
NewSize 0)
   {
      *
ZePointer malloc(NewSize);
      if (*
ZePointer == NULL)
         return (
0);
   }

   return (
1);
}


The function allows to reallocate a string, even if the user forgot to delete it first. And it returns FALSE if the allocation failed.

Go to top


Re: Boing Ball Help!
Not too shy to talk
Not too shy to talk


@TheDaddy

I told you which program to use. It's a paint program which can be used to change dots as desired.

Go to top


Re: Boing Ball Help!
Not too shy to talk
Not too shy to talk


@TheDaddy

Simply load it into PPaint and reduce the number of colors.

Result:
Resized Image

Go to top


Re: FTPMount
Not too shy to talk
Not too shy to talk


@JosDuchIt

uni-paderborn.de does not host Aminet any more.

Go to top


Re: I cannot type the character '
Not too shy to talk
Not too shy to talk


@Marko

Try Alt-?.

You can always temporarily switch to the american keyboard layout by holding down the Alt (or AltGr) key.

Go to top



TopTop
« 1 ... 5 6 7 (8) 9 10 11 ... 14 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project