home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / auucp+-1.02 / fuucp_plus_src.lzh / sendmail / smail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-21  |  1.9 KB  |  67 lines

  1. /* @(#)smail.h    3.7 8/18/88 01:55:19 */
  2.  
  3. /*
  4.  *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  5.  * 
  6.  * See the file COPYING, distributed with smail, for restriction
  7.  * and warranty information.
  8.  *
  9.  * namei master id: @(#)smail.h    3.7 8/18/88 01:55:19
  10.  */
  11.  
  12. /*
  13.  * smail.h:
  14.  *    miscellaneous macros used in the smail source files.
  15.  *
  16.  */
  17.  
  18. /* #defines for general use */
  19. #ifdef    NULL                /* make sure NULL is 0 */
  20. # undef NULL
  21. #endif
  22. #define NULL    0
  23. #define TRUE    1           /* All true wisdom is found on T-shirts */
  24. #define FALSE    0            /* This fortune is false */
  25. #define SUCCEED    0            /* function succeeded */
  26. #define FAIL    (-1)            /* function failed */
  27. #define SIZE_FILNAM    300        /* Size used for J-random filenames */
  28. #define EQ(a,b)    (strcmp((a),(b)) == 0)    /* TRUE if strings a and b equal */
  29. #define EQIC(a,b) (strcmpic((a),(b)) == 0) /* EQ but case is insignificant */
  30. /*
  31.  * compare a string with a header field to see if names match
  32.  * return TRUE if match, FALSE if no match
  33.  */
  34. #define HDREQ(s,h)    (!strncmpic((s), (h), strlen((s))) &&    \
  35.              ((h)[strlen((s))] == ':' ||        \
  36.               (h)[strlen((s))] == ' ' ||        \
  37.               (h)[strlen((s))] == '\t'))
  38. /*
  39.  * size for various names used in the configuration tables read from
  40.  * the startup file, or compiled in with default.c.
  41.  */
  42. #define    CONFIG_NAMSIZ    16        /* 15 chars plus a nul byte */
  43.  
  44. /*
  45.  * return the integer offset from the start of a given structure type
  46.  * to a given tag.
  47.  */
  48. #define OFFSET(type, tag) \
  49.     (int)((char *)(&((struct type *)0)->tag) - (char *)(struct type *)0)
  50.  
  51. /* return the number of elements in an array. */
  52. #define TABLESIZE(table) \
  53.     (sizeof(table)/sizeof((table)[0]))
  54.  
  55. /* return a pointer to the end of a table. */
  56. #define ENDTABLE(table) \
  57.     ((table) + TABLESIZE(table))
  58.  
  59. /*
  60.  * types for general use
  61.  */
  62. struct queue {                /* general purpose list entry */
  63.     struct queue *succ;            /* single forward link */
  64.     char *text;                /* data associated with entry */
  65. };
  66.  
  67.