home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / snuz.arj / CMDS.H next >
C/C++ Source or Header  |  1989-07-11  |  878b  |  39 lines

  1. /*  Copyright 1984 by the Massachusetts Institute of Technology  */
  2. /*  See permission and disclaimer notice in file "notice.h"  */
  3. #include    <notice.h>
  4.  
  5. /* EMACS_MODES: c !fill */
  6.  
  7. /* cmds.h 
  8.  *
  9.  * smtp command strings and associated codes.  Note that the command code
  10.  * MUST be equal to the index of the command in the table.
  11.  */
  12.  
  13. #define    NONE        0        /* no such command */
  14. #define    HELO        1
  15. #define    MAIL        2
  16. #define    RCPT        3
  17. #define    DATA        4
  18. #define    QUIT        5
  19. #define    RSET        6
  20. #define    NOOP        7
  21.  
  22. struct    cmdtab    {
  23.     char    *c_name;        /* command name */
  24.     int    c_len;            /* command length */
  25. } cmdtab[] = {
  26.     { "", 0, },
  27.     { "HELO", 4, },
  28.     { "MAIL FROM:", 10 },
  29.     { "RCPT TO:", 8, },
  30.     { "DATA", 4, },
  31.     { "QUIT", 4, },
  32.     { "RSET", 4, },
  33.     { "NOOP", 4, },
  34.     { 0, 0, }            /* end of table marker */
  35. };
  36.  
  37. #define islower(c)    ('a' <= (c) && (c) <= 'z')
  38. #define toupper(c)    (islower(c) ? ((c) - ('a' - 'A')) : (c))
  39.