home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume6 / elm / part04 / hdrs / elm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  4.8 KB  |  126 lines

  1. /**        elm.h            **/
  2.  
  3. /**  header file for ELM mail system.  **/
  4.  
  5. /**  (C) Copyright 1986, Dave Taylor   **/
  6.  
  7. #include <stdio.h>
  8. #include <fcntl.h>
  9.  
  10. #include "../hdrs/curses.h"
  11. #include "../hdrs/defs.h"
  12.  
  13. /******** static character string containing the copyright notice  *******/
  14.  
  15. static char copyright[] = { "(C) Copyright 1986, Dave Taylor" };
  16.  
  17. /******** and another string for the version number and so on     ********/
  18.  
  19. static char ident[] = { WHAT_STRING };
  20.  
  21. /******** global variables accessable by all pieces of the program *******/
  22.  
  23. int current = 0;        /* current message number  */
  24. int header_page = 0;         /* current header page     */
  25. int last_header_page = -1;         /* last header page        */
  26. int message_count = 0;        /* max message number      */
  27. int headers_per_page;        /* number of headers/page  */
  28. char infile[SLEN];        /* name of current mailbox */
  29. char hostname[SLEN];        /* name of machine we're on*/
  30. char username[SLEN];        /* return address name!    */
  31. char full_username[SLEN];    /* Full username - gecos   */
  32. char home[SLEN];        /* home directory of user  */
  33. char folders[SLEN];        /* folder home directory   */
  34. char mailbox[SLEN];        /* mailbox name if defined */
  35. char editor[SLEN];        /* editor for outgoing mail*/
  36. char printout[SLEN];        /* how to print messages   */
  37. char savefile[SLEN];        /* name of file to save to */
  38. char calendar_file[SLEN];    /* name of file for clndr  */
  39. char prefixchars[SLEN];        /* prefix char(s) for msgs */
  40. char shell[SLEN];        /* current system shell    */
  41. char pager[SLEN];        /* what pager to use       */
  42. char batch_subject[SLEN];    /* subject buffer for batchmail */
  43.  
  44. char backspace,            /* the current backspace char */
  45.      kill_line;            /* the current kill-line char */
  46.  
  47. char up[SHORT], down[SHORT];    /* cursor control seq's    */
  48. int  cursor_control = FALSE;    /* cursor control avail?   */
  49.  
  50. char start_highlight[SHORT],
  51.      end_highlight[SHORT];    /* stand out mode...       */
  52.  
  53. int  has_highlighting = FALSE;    /* highlighting available? */
  54.  
  55. char *weedlist[MAX_IN_WEEDLIST];
  56. int  weedcount;
  57.  
  58. int file_changed = 0;        /* flag: true if infile changed     */
  59. int mini_menu = 1;        /* flag: menu specified?        */
  60. int mbox_specified = 0;        /* flag: specified alternate mbox?  */
  61. int check_first = 1;        /* flag: verify mail to be sent!    */
  62. int auto_copy = 0;        /* flag: automatically copy source? */
  63. int filter = 0;            /* flag: weed out header lines?        */
  64. int resolve_mode = 1;        /* flag: delete saved mail?        */
  65. int auto_cc = 0;        /* flag: mail copy to user?        */
  66. int noheader = 0;        /* flag: copy + header to file?     */
  67. int title_messages = 0;        /* flag: title message display?     */
  68. int edit_outbound = 0;        /* flag: edit outbound headers?        */
  69. int read_aliases = 1;        /* flag: read in alias files?        */
  70. int hp_terminal = 0;        /* flag: are we on HP term?        */
  71. int hp_softkeys = 0;        /* flag: are there softkeys?        */
  72. int save_by_name = 0;        /* flag: save mail by login name?   */
  73. int notesfile = 0;        /* flag: is input file from notes?  */
  74. int mail_only = 0;        /* flag: send mail then leave?      */
  75. int check_only = 0;        /* flag: check aliases then leave?  */
  76. int move_when_paged = 0;    /* flag: move when '+' or '-' used? */
  77. int point_to_new = 1;        /* flag: start pointing at new msg? */
  78. int bounceback = 0;        /* flag: bounce copy off remote?    */
  79. int signature = 0;        /* flag: include $home/.signature?  */
  80. int always_leave = 0;        /* flag: always leave msgs pending? */
  81. int always_del = 0;        /* flag: always delete marked msgs? */
  82. int arrow_cursor = 0;        /* flag: use "->" cursor regardless?*/
  83. int debug = 0;             /* flag: default is no debug!       */
  84.  
  85. #ifdef UTS
  86.  int isatube = 0;        /* flag: are we on an IBM 3270?     */
  87. #endif
  88.  
  89. int sortby = REVERSE SENT_DATE;    /* how to sort incoming mail...     */
  90.  
  91. long timeout = 0L;        /* timeout (secs) on main prompt    */
  92.  
  93. int mailbox_defined = 0;    /** mailbox specified?    **/
  94.  
  95. int LINES=23;            /** lines per screen      **/
  96. int COLUMNS=80;            /** columns per page      **/
  97.  
  98. int size_of_pathfd;        /** size of pathfile, 0 if none **/
  99.  
  100. FILE *mailfile;            /* current mailbox file     */
  101. FILE *debugfile;        /* file for debug output    */
  102. FILE *pathfd;            /* path alias file          */
  103. FILE *domainfd;            /* domain file            */
  104.  
  105. long mailfile_size;        /* size of current mailfile */
  106.  
  107. struct header_rec header_table[MAX_HEADERS];
  108.  
  109. struct alias_rec user_hash_table[MAX_UALIASES];
  110. struct alias_rec system_hash_table[MAX_SALIASES];
  111.  
  112. struct date_rec last_read_mail; /* last time we read mailbox  */
  113.  
  114. struct lsys_rec *talk_to_sys;   /* what machines do we talk to? */
  115.  
  116. struct addr_rec *alternative_addresses;    /* how else do we get mail? */
  117.  
  118. int system_files = 0;        /* do we have system aliases? */
  119. int user_files = 0;        /* do we have user aliases?   */
  120.  
  121. int system_data;        /* fileno of system data file */
  122. int user_data;            /* fileno of user data file   */
  123.  
  124. int userid;            /* uid for current user          */
  125. int groupid;            /* groupid for current user   */
  126.