From: | Deryk Robosson |
Date: | 1 Sep 2000 at 02:13:47 |
Subject: | Re: AMIOPEN: NO MORE "SLEEP 1"!!!! |
eww..that's more ugly than the sleep(1); :)
----- Original Message -----
From: artix <artix@pacbell.net>
To: <open@amiga.com>
Sent: Thursday, August 31, 2000 5:27 PM
Subject: AMIOPEN: NO MORE "SLEEP 1"!!!!
>
> OK.. it's still a bit of a hack, but not as ugly as the
> 'system("sleep 1")' thing I was using. Here's the code I'm using now in
> Ewinease to check AVE init and wait if not ready:
>
> ---------------------------------------------------------------
>
> #include <unistd.h>
> int *ip;
> kn_dev_lookup(buf, &aveinst, &argv0);
> app = ave_open(aveinst,argv0, 0, 0);
>
> /* WAIT FOR AVE WINDOW TO INIT IF NOT ALREADY STARTED */
>
> ip=(unsigned int *)__EWE_INITPTRS.aveinst;
> if(*(ip+64)==0) while (*(ip+52)<9) usleep(10000);
>
> /* CONTINUE ON */
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html