home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Computer Club Elmshorn Atari PD
/
CCE_PD.iso
/
mac
/
1000
/
CCE_1024.ZIP
/
CCE_1024
/
UP220195.LZH
/
EXTRA
/
FSER096B.LZH
/
GETCOOKI.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-27
|
501b
|
31 lines
#include <portab.h>
#include <tos.h>
WORD get_cookie( LONG cookie, LONG *value)
{
WORD cookiecnt=0;
LONG oldstack=0;
LONG *cookiejar;
if ( !Super ((void *)1L) ) oldstack = Super (0L);
cookiejar = *( (LONG **) 0x5a0L );
if ( oldstack ) Super( (void *) oldstack );
if ( cookiejar==0L )
{
return FALSE;
}
while ( *cookiejar!=NULL && *cookiejar!=cookie )
{
cookiejar += 2;
cookiecnt++;
}
*value = *(cookiejar+1);
return (*cookiejar==cookie);
}