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