home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / com / utils / elm / sources / elm.h < prev    next >
C/C++ Source or Header  |  1992-10-04  |  8KB  |  186 lines

  1.  
  2. /* $Id: elm.h,v 4.1.1.1 90/10/24 15:31:24 syd Exp $ */
  3.  
  4. /*******************************************************************************
  5.  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  6.  *
  7.  *             Copyright (c) 1986, 1987 Dave Taylor
  8.  *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  9.  *******************************************************************************
  10.  * Bug reports, patches, comments, suggestions should be sent to:
  11.  *
  12.  *    Syd Weinstein, Elm Coordinator
  13.  *    elm@DSI.COM            dsinc!elm
  14.  *
  15.  *******************************************************************************
  16.  * $Log:    elm.h,v $
  17.  * Revision 4.1.1.1  90/10/24  15:31:24  syd
  18.  * Remove variables no longer used
  19.  * From: W. David Higgins
  20.  *
  21.  * Revision 4.1  90/04/28  22:42:08  syd
  22.  * checkin of Elm 2.3 as of Release PL0
  23.  *
  24.  *
  25.  ******************************************************************************/
  26.  
  27. /**  Main header file for ELM mail system.  **/
  28.  
  29.  
  30. #include <stdio.h>
  31. #include <fcntl.h>
  32. #include <errno.h>
  33.  
  34. #include "../hdrs/curses.h"
  35. #include "../hdrs/defs.h"
  36.  
  37. #if defined(BSD) || defined(OS2)
  38. #include <setjmp.h>
  39. #endif
  40.  
  41. /******** static character string containing the version number  *******/
  42.  
  43. static char ident[] = { WHAT_STRING };
  44.  
  45. /******** and another string for the copyright notice            ********/
  46.  
  47. static char copyright[] = {
  48.         "@(#)          (C) Copyright 1986, 1987, Dave Taylor\n@(#)          (C) Copyright 1988, 1989, 1990, The Usenet Community Trust\n" };
  49.  
  50. /******** global variables accessable by all pieces of the program *******/
  51.  
  52. int check_size = 0;        /* don't start mailer if no mail */
  53. int current = 0;        /* current message number  */
  54. int header_page = 0;         /* current header page     */
  55. int last_header_page = -1;         /* last header page        */
  56. int message_count = 0;        /* max message number      */
  57. int headers_per_page;        /* number of headers/page  */
  58. int original_umask = 0;        /* original umask, for restore before subshell */
  59. int sendmail_verbose = 0;       /* Extended mail debugging */
  60. int no_save = 0;        /* Do not save outgoing mail */
  61. int mmdf_strict = 0;        /* Strict MMDF mailbox scanning */
  62. char cur_folder[SLEN];          /* name of current folder */
  63. char cur_tempfolder[SLEN];      /* name of temp folder open for a mailbox */
  64. char defaultfile[SLEN];         /* name of default folder */
  65. char temp_dir[SLEN] = {0};      /* name of temp directory */
  66. char hostname[SLEN];            /* name of machine we're on*/
  67. char hostdomain[SLEN];          /* name of domain we're in */
  68. char hostfullname[SLEN];        /* name of FQDN we're in */
  69. char username[SLEN];            /* return address name!    */
  70. char full_username[SLEN];       /* Full username - gecos   */
  71. char home[SLEN];                /* home directory of user  */
  72. char folders[SLEN];             /* folder home directory   */
  73. char raw_folders[SLEN];         /* unexpanded folder home directory   */
  74. char recvd_mail[SLEN];          /* folder for storing received mail     */
  75. char raw_recvdmail[SLEN];       /* unexpanded recvd_mail name */
  76. char editor[SLEN];              /* editor for outgoing mail*/
  77. char raw_editor[SLEN];          /* unexpanded editor for outgoing mail*/
  78. char alternative_editor[SLEN];  /* alternative editor...   */
  79. char printout[SLEN];            /* how to print messages   */
  80. char raw_printout[SLEN];        /* unexpanded how to print messages   */
  81. char sent_mail[SLEN];           /* name of file to save copies to */
  82. char raw_sentmail[SLEN];        /* unexpanded name of file to save to */
  83. char calendar_file[SLEN];       /* name of file for clndr  */
  84. char raw_calendar_file[SLEN];   /* unexpanded name of file for clndr  */
  85. char attribution[SLEN];         /* attribution string for replies     */
  86. char prefixchars[SLEN] = "> ";    /* prefix char(s) for msgs */
  87. char shell[SLEN];               /* current system shell    */
  88. char raw_shell[SLEN];           /* unexpanded current system shell    */
  89. char pager[SLEN];               /* what pager to use       */
  90. char raw_pager[SLEN];           /* unexpanded what pager to use       */
  91. char batch_subject[SLEN];       /* subject buffer for batchmail */
  92. char local_signature[SLEN];     /* local msg signature file     */
  93. char raw_local_signature[SLEN]; /* unexpanded local msg signature file     */
  94. char remote_signature[SLEN];    /* remote msg signature file    */
  95. char raw_remote_signature[SLEN];/* unexpanded remote msg signature file    */
  96. char version_buff[SLEN];        /* version buffer */
  97.  
  98. char backspace,            /* the current backspace char */
  99.      escape_char = TILDE_ESCAPE,/* '~' or something else..    */
  100.      kill_line;            /* the current kill-line char */
  101.  
  102. char up[SHORT], down[SHORT],    /* cursor control seq's    */
  103.      left[SHORT], right[SHORT];
  104. int  cursor_control = FALSE;    /* cursor control avail?   */
  105.  
  106. int  has_highlighting = FALSE;    /* highlighting available? */
  107.  
  108. char *weedlist[MAX_IN_WEEDLIST];
  109. int  weedcount;
  110.  
  111. int allow_forms = NO;        /* flag: are AT&T Mail forms okay?  */
  112. int mini_menu = 1;        /* flag: menu specified?        */
  113. int prompt_after_pager = 1;    /* flag: prompt after pager exits   */
  114. int folder_type = 0;        /* flag: type of folder            */
  115. int auto_copy = 0;        /* flag: automatically copy source? */
  116. int filter = 1;            /* flag: weed out header lines?        */
  117. int resolve_mode = 1;        /* flag: delete saved mail?        */
  118. int auto_cc = 0;        /* flag: mail copy to user?        */
  119. int noheader = 1;        /* flag: copy + header to file?     */
  120. int title_messages = 1;        /* flag: title message display?     */
  121. int forwarding = 0;        /* flag: are we forwarding the msg? */
  122. int hp_terminal = 0;        /* flag: are we on HP term?        */
  123. int hp_softkeys = 0;        /* flag: are there softkeys?        */
  124. int save_by_name = 1;        /* flag: save mail by login name?   */
  125. int force_name = 0;        /* flag: save by name forced?        */
  126. int mail_only = 0;        /* flag: send mail then leave?      */
  127. int check_only = 0;        /* flag: check aliases then leave?  */
  128. int batch_only = 0;        /* flag: send without prompting?    */
  129. int move_when_paged = 0;    /* flag: move when '+' or '-' used? */
  130. int point_to_new = 1;        /* flag: start pointing at new msg? */
  131. int bounceback = 0;        /* flag: bounce copy off remote?    */
  132. int always_keep = 1;        /* flag: always keep unread msgs?   */
  133. int always_store = 0;        /* flag: always store read msgs?    */
  134. int always_del = 0;        /* flag: always delete marked msgs? */
  135. int arrow_cursor = 0;        /* flag: use "->" cursor regardless?*/
  136. int debug = 0;             /* flag: default is no debug!       */
  137. int warnings = 1;        /* flag: output connection warnings?*/
  138. int user_level = 0;        /* flag: how good is the user?      */
  139. int selected = 0;        /* flag: used for select stuff      */
  140. int names_only = 1;        /* flag: display user names only?   */
  141. int question_me = 1;        /* flag: ask questions as we leave? */
  142. int keep_empty_files = 0;    /* flag: leave empty folder files? */
  143. int clear_pages = 0;        /* flag: act like "page" (more -c)? */
  144. int prompt_for_cc = 1;        /* flag: ask user for "cc:" value?  */
  145. int sig_dashes = 1;        /* flag: include dashes above sigs? */
  146.  
  147. int sortby = REVERSE SENT_DATE;    /* how to sort incoming mail...     */
  148.  
  149. long timeout = 600L;        /* timeout (secs) on main prompt    */
  150.  
  151. /** set up some default values for a 'typical' terminal *snicker* **/
  152.  
  153. int LINES=23;            /** lines per screen      **/
  154. int COLUMNS=80;            /** columns per page      **/
  155.  
  156. long size_of_pathfd;        /** size of pathfile, 0 if none **/
  157.  
  158. FILE *mailfile;            /* current folder        */
  159. FILE *debugfile;        /* file for debug output    */
  160. FILE *pathfd;            /* path alias file          */
  161. FILE *domainfd;            /* domain file            */
  162.  
  163. long mailfile_size;        /* size of current mailfile */
  164.  
  165. int   max_headers;        /* number of headers allocated */
  166.  
  167. struct header_rec **headers;    /* array of header structure pointers */
  168.  
  169. struct alias_rec user_hash_table[MAX_UALIASES];
  170. struct alias_rec system_hash_table[MAX_SALIASES];
  171.  
  172. struct lsys_rec *talk_to_sys = NULL; /* what machines do we talk to? */
  173.  
  174. struct addr_rec *alternative_addresses;    /* how else do we get mail? */
  175.  
  176. int system_data = -1;        /* fileno of system data file */
  177. int user_data = -1;        /* fileno of user data file   */
  178.  
  179. int userid;            /* uid for current user          */
  180. int groupid;            /* groupid for current user   */
  181.  
  182. #if defined(BSD) || defined(OS2)
  183. jmp_buf GetPromptBuf;        /* setjmp buffer */
  184. int InGetPrompt;        /* set if in GetPrompt() in read() */
  185. #endif
  186.