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

  1. #ifndef COOKIE_H
  2.  
  3. #define COOKIE_H
  4.  
  5. #include <stdio.h>
  6.  
  7. #define NULL_COOKIE 0l
  8.  
  9. typedef struct cookie_entry {
  10.    union {
  11.       unsigned long name_long;
  12.       char name_array[4];
  13.    } name;
  14.    unsigned long value;
  15. } CookieEntry;
  16.  
  17. #define CookieGetValue(x) (x)->value
  18. #define CookieGetNameL(x) (x)->name.name_long
  19. #define CookieGetNameS(x) (x)->name.name_array
  20.  
  21. void CookieSetL(CookieEntry *Cookie,long Name,long Value);
  22. void CookieSetS(CookieEntry *Cookie,char *Name,long Value);
  23. void CookiePrint(CookieEntry *Cookie);
  24. void CookieInput(CookieEntry *Cookie);
  25. int CookieIsNullCookie(CookieEntry *Cookie);
  26. int CookieIsCookie(CookieEntry *Cookie,long Name);
  27. int CookieRead(CookieEntry *Cookie,FILE *stream);
  28. int CookieWrite(CookieEntry *Cookie,FILE *stream);
  29.  
  30. #endif
  31.