home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spezial / SPEZIAL2_97.zip / SPEZIAL2_97.iso / ANWEND / ONLINE / ELM23-2 / ELM23-2.ZIP / hdrs / elm.h < prev    next >
C/C++ Source or Header  |  1993-09-29  |  9KB  |  187 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 hostfromname[SLEN];        /* name of FQDN we pretend to be in */
  70. char username[SLEN];            /* return address name!    */
  71. char full_username[SLEN];       /* Full username - gecos   */
  72. char home[SLEN];                /* home directory of user  */
  73. char folders[SLEN];             /* folder home directory   */
  74. char raw_folders[SLEN];         /* unexpanded folder home directory   */
  75. char recvd_mail[SLEN];          /* folder for storing received mail     */
  76. char raw_recvdmail[SLEN];       /* unexpanded recvd_mail name */
  77. char editor[SLEN];              /* editor for outgoing mail*/
  78. char raw_editor[SLEN];          /* unexpanded editor for outgoing mail*/
  79. char alternative_editor[SLEN];  /* alternative editor...   */
  80. char printout[SLEN];            /* how to print messages   */
  81. char raw_printout[SLEN];        /* unexpanded how to print messages   */
  82. char sent_mail[SLEN];           /* name of file to save copies to */
  83. char raw_sentmail[SLEN];        /* unexpanded name of file to save to */
  84. char calendar_file[SLEN];       /* name of file for clndr  */
  85. char raw_calendar_file[SLEN];   /* unexpanded name of file for clndr  */
  86. char attribution[SLEN];         /* attribution string for replies     */
  87. char prefixchars[SLEN] = "> ";    /* prefix char(s) for msgs */
  88. char shell[SLEN];               /* current system shell    */
  89. char raw_shell[SLEN];           /* unexpanded current system shell    */
  90. char pager[SLEN];               /* what pager to use       */
  91. char raw_pager[SLEN];           /* unexpanded what pager to use       */
  92. char batch_subject[SLEN];       /* subject buffer for batchmail */
  93. char local_signature[SLEN];     /* local msg signature file     */
  94. char raw_local_signature[SLEN]; /* unexpanded local msg signature file     */
  95. char remote_signature[SLEN];    /* remote msg signature file    */
  96. char raw_remote_signature[SLEN];/* unexpanded remote msg signature file    */
  97. char version_buff[SLEN];        /* version buffer */
  98.  
  99. char backspace,            /* the current backspace char */
  100.      escape_char = TILDE_ESCAPE,/* '~' or something else..    */
  101.      kill_line;            /* the current kill-line char */
  102.  
  103. char up[SHORT], down[SHORT],    /* cursor control seq's    */
  104.      left[SHORT], right[SHORT];
  105. int  cursor_control = FALSE;    /* cursor control avail?   */
  106.  
  107. int  has_highlighting = FALSE;    /* highlighting available? */
  108.  
  109. char *weedlist[MAX_IN_WEEDLIST];
  110. int  weedcount;
  111.  
  112. int allow_forms = NO;        /* flag: are AT&T Mail forms okay?  */
  113. int mini_menu = 1;        /* flag: menu specified?        */
  114. int prompt_after_pager = 1;    /* flag: prompt after pager exits   */
  115. int folder_type = 0;        /* flag: type of folder            */
  116. int auto_copy = 0;        /* flag: automatically copy source? */
  117. int filter = 1;            /* flag: weed out header lines?        */
  118. int resolve_mode = 1;        /* flag: delete saved mail?        */
  119. int auto_cc = 0;        /* flag: mail copy to user?        */
  120. int noheader = 1;        /* flag: copy + header to file?     */
  121. int title_messages = 1;        /* flag: title message display?     */
  122. int forwarding = 0;        /* flag: are we forwarding the msg? */
  123. int hp_terminal = 0;        /* flag: are we on HP term?        */
  124. int hp_softkeys = 0;        /* flag: are there softkeys?        */
  125. int save_by_name = 1;        /* flag: save mail by login name?   */
  126. int force_name = 0;        /* flag: save by name forced?        */
  127. int mail_only = 0;        /* flag: send mail then leave?      */
  128. int check_only = 0;        /* flag: check aliases then leave?  */
  129. int batch_only = 0;        /* flag: send without prompting?    */
  130. int move_when_paged = 0;    /* flag: move when '+' or '-' used? */
  131. int point_to_new = 1;        /* flag: start pointing at new msg? */
  132. int bounceback = 0;        /* flag: bounce copy off remote?    */
  133. int always_keep = 1;        /* flag: always keep unread msgs?   */
  134. int always_store = 0;        /* flag: always store read msgs?    */
  135. int always_del = 0;        /* flag: always delete marked msgs? */
  136. int arrow_cursor = 0;        /* flag: use "->" cursor regardless?*/
  137. int debug = 0;             /* flag: default is no debug!       */
  138. int warnings = 1;        /* flag: output connection warnings?*/
  139. int user_level = 0;        /* flag: how good is the user?      */
  140. int selected = 0;        /* flag: used for select stuff      */
  141. int names_only = 1;        /* flag: display user names only?   */
  142. int question_me = 1;        /* flag: ask questions as we leave? */
  143. int keep_empty_files = 0;    /* flag: leave empty folder files? */
  144. int clear_pages = 0;        /* flag: act like "page" (more -c)? */
  145. int prompt_for_cc = 1;        /* flag: ask user for "cc:" value?  */
  146. int sig_dashes = 1;        /* flag: include dashes above sigs? */
  147.  
  148. int sortby = REVERSE SENT_DATE;    /* how to sort incoming mail...     */
  149.  
  150. long timeout = 600L;        /* timeout (secs) on main prompt    */
  151.  
  152. /** set up some default values for a 'typical' terminal *snicker* **/
  153.  
  154. int LINES=23;            /** lines per screen      **/
  155. int COLUMNS=80;            /** columns per page      **/
  156.  
  157. long size_of_pathfd;        /** size of pathfile, 0 if none **/
  158.  
  159. FILE *mailfile;            /* current folder        */
  160. FILE *debugfile;        /* file for debug output    */
  161. FILE *pathfd;            /* path alias file          */
  162. FILE *domainfd;            /* domain file            */
  163.  
  164. long mailfile_size;        /* size of current mailfile */
  165.  
  166. int   max_headers;        /* number of headers allocated */
  167.  
  168. struct header_rec **headers;    /* array of header structure pointers */
  169.  
  170. struct alias_rec user_hash_table[MAX_UALIASES];
  171. struct alias_rec system_hash_table[MAX_SALIASES];
  172.  
  173. struct lsys_rec *talk_to_sys = NULL; /* what machines do we talk to? */
  174.  
  175. struct addr_rec *alternative_addresses;    /* how else do we get mail? */
  176.  
  177. int system_data = -1;        /* fileno of system data file */
  178. int user_data = -1;        /* fileno of user data file   */
  179.  
  180. int userid;            /* uid for current user          */
  181. int groupid;            /* groupid for current user   */
  182.  
  183. #if defined(BSD) || defined(OS2)
  184. jmp_buf GetPromptBuf;        /* setjmp buffer */
  185. int InGetPrompt;        /* set if in GetPrompt() in read() */
  186. #endif
  187.