home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / bm332c.zip / BM.H < prev    next >
C/C++ Source or Header  |  1993-02-24  |  3KB  |  113 lines

  1. /* bm.h -- definitons for bm.c that aren't included elsewhere */
  2.  
  3. /* types of config file lines that we know how to handle */
  4. #define NONE    0
  5. #define MAXLET    1
  6. #define SMTP    2
  7. #define HOST    3
  8. #define USER    4
  9. #define EDIT    6
  10. #define NAME    7
  11. #define REPLY    8
  12. #define MBOX    9
  13. #define RECORD    10
  14. #define SCREEN    11
  15. #define FOLDER    12
  16. #define MQUEUE    13
  17. #define ALIAS    14
  18. #define ORG    15        /* Organization header field, by SV1XV    */
  19.  
  20. #define    RUNCOM    "/bm.rc"        /* config file */
  21.  
  22. #define WORK    "*.wrk"        /* work file type */
  23. #define    MAXROWS        25    /* number of lines on display */
  24. #define    MAXCOL        80    /* number of lines on display */
  25.  
  26. /* message status */
  27. #define    DELETE    1
  28. #define    READ    2
  29.  
  30. #define NLET    300            /* default size of letter array */
  31. #define MAXARGS    16
  32.  
  33. #define SLINELEN    64
  34. #define LINELEN        256
  35.  
  36. /* a mailbox list entry */
  37. struct let {
  38.     long    start;
  39.     long    size;
  40.     int    status;
  41. };
  42.  
  43. /* address structure */
  44. struct addr {
  45.     struct addr *next;
  46.     char *user;
  47.     char *host;
  48.     int sent;
  49.     char *name;    /* added to allow recipient name, to get msg
  50.              * to jt@fuw.edu.pl (Jerzy Tarasiuk)  -jt */
  51. };
  52.  
  53. /* token used for a string and its token */
  54. struct token {
  55.     char *str;
  56.     char type;
  57. };
  58.  
  59. /* global definitions */
  60. extern char
  61.      *hostname,        /* name of this host from rc file */
  62.     *username,        /* name of this user from rc file */
  63.     *fullname,        /* name of this user from rc file */
  64.     *replyto,        /* return address fro reply-to */
  65.     *organization,        /* Organization field from rc file */
  66.     *aliases,        /* file with aliases        */
  67.     *maildir,        /* default mail directory */
  68.     *editor,        /* user's favorite editor program */
  69.     *savebox,        /* user's mbox for the s command */
  70.     *record,        /* place to store a copy of snet mail for you */
  71.     *folder,        /* directory used for save and write commands */
  72.     *mfilename;        /* for the -f option */
  73.  
  74. extern unsigned maxlet;        /* max messages */
  75. extern int current;        /* the current message number */
  76. extern int nmsgs;        /* number of messages in this mail box */
  77. extern int newmsgs;        /* number of new messages in mail box */
  78. extern int change;        /* mail file changed */
  79. extern FILE *mfile;        /* mail data file pointer */
  80. extern int tty;            /* is standard in a tty ? */
  81. extern int qflag;        /* just queue no headers */
  82. extern int mlock(), rmlock();
  83. extern struct addr *make_tolist();
  84. extern long get_msgid();
  85. extern char mailqdir[];
  86. extern char mailspool[];
  87. extern char *mqueue;
  88. extern char alias[];
  89. extern char notename[];
  90. extern char notefile[];
  91. extern char nomail[];
  92. extern char badmsg[];
  93. extern struct let *mbox;
  94. extern char *fgets(),*gets(),*savestr();
  95. extern char *malloc(),*calloc();
  96. extern void exit(),perror();
  97. extern int parse(),htype();
  98. extern int getrch(), setrawmode(), setcookedmode(), isnewmail();
  99. extern void cls(void);
  100.  
  101. /* Define null object pointer in case stdio.h isn't included */
  102.  
  103. #ifndef    NULL
  104. /* General purpose NULL pointer */
  105. #define    NULL (void *)0
  106. #endif
  107. #define    NULLCHAR (char *)0    /* Null character pointer */
  108. #define    NULLFP     (int (*)())0    /* Null pointer to function returning int */
  109. #define    NULLVFP     (void (*)())0    /* Null pointer to function returning void */
  110. #define    NULLFILE (FILE *)0    /* Null file pointer */
  111. #define    NULLADDR (struct addr *)0    /* Null address */
  112.  
  113.