home *** CD-ROM | disk | FTP | other *** search
/ Fujiology Archive / fujiology_archive_v1_0.iso / !MAGS / ATOS / ATOS_ALL.ZIP / news / cookie-3.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-21  |  864 b   |  41 lines

  1. #ifdef __TURBOC__
  2. #include <tos.h>
  3. #else
  4. #ifdef __GNUC__
  5. #include <osbind.h>
  6. #else
  7. #include <tosbind.h>
  8. #endif
  9. #endif
  10. #include <stdio.h>
  11.  
  12. typedef struct cookie_entry {
  13.    union {
  14.       unsigned long name_long;
  15.       char name_array[4];
  16.    } name;
  17.    unsigned long value;
  18. } CookieEntry;
  19.  
  20. int main(void)
  21. {  CookieEntry **CookieJarPtr, *CookieJar;
  22.    long OldStack;
  23.  
  24.    OldStack=Super(0L);
  25.    CookieJarPtr = (CookieEntry**)0x5a0L;
  26.    CookieJar=*CookieJarPtr;
  27.    Super((void *)OldStack);
  28.    if (CookieJar == (CookieEntry *)0)
  29.       printf("Dieses System hat keinen Cookie Jar\n");
  30.    else
  31.    {
  32.       while (CookieJar->name.name_long != 0)
  33.       {
  34.          printf("Name des Cookies: %d\n", CookieJar->name.name_long);
  35.          printf("Wert des Cookies: %d\n", CookieJar->value);
  36.          CookieJar++;
  37.       }
  38.    }
  39.    return 0;
  40. }
  41.