home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / mail / elm / 3730 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  86.6 KB

  1. Xref: sparky comp.mail.elm:3730 comp.sources.bugs:300
  2. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!dsinc!dsinc!not-for-mail
  3. From: syd@dsinc.DSI.COM (Syd Weinstein)
  4. Newsgroups: comp.mail.elm,comp.sources.bugs
  5. Subject: elm 2.4 Patch #17
  6. Summary: This is an official patch for elm 2.4 system.  Please apply it.
  7. Message-ID: <1gjdhrINNoil@dsinc.dsi.com>
  8. Date: 15 Dec 92 01:48:43 GMT
  9. Sender: syd@dsi.com
  10. Followup-To: poster
  11. Organization: Datacomp Systems, Inc., Huntingdon Valley, PA 19006
  12. Lines: 2768
  13. NNTP-Posting-Host: dsinc.dsi.com
  14.  
  15. this is part 4 of a 4 part patch
  16.  
  17. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your elm source
  18.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  19.     If you don't have the patch program, apply the following by hand,
  20.     or get patch (version 2.0, latest patchlevel).
  21.  
  22.     After patching:
  23.         sh Configure -d
  24.         make
  25.         make install
  26.  
  27.     If patch indicates that patchlevel is the wrong version, you may need
  28.     to apply one or more previous patches, or the patch may already
  29.     have been applied.  See the patchlevel.h file to find out what has or
  30.     has not been applied.  In any event, don't continue with the patch.
  31.  
  32.     If you are missing previous patches they can be obtained from our:
  33.     archive server.
  34.  
  35.     Syd Weinstein
  36.     elm@DSI.COM
  37.  
  38.     The patches are available from the dsinc archive server
  39.     Send the following message to archive-server@DSI.COM for
  40.     a list of available patches:
  41.  
  42.     Subject: patch list
  43.     send index elm
  44.  
  45. Index: hdrs/patchlevel.h
  46. Prereq: "16"
  47. *** ../elm2.4/hdrs/patchlevel.h    Wed Nov 25 14:10:35 1992
  48. --- hdrs/patchlevel.h    Wed Nov 25 19:50:23 1992
  49. ***************
  50. *** 1 ****
  51. ! #define PATCHLEVEL "16"
  52. --- 1 ----
  53. ! #define PATCHLEVEL "17"
  54.  
  55. Index: src/mime.c
  56. Prereq: 5.6
  57. *** ../elm2.4/src/mime.c    Wed Nov 25 14:10:40 1992
  58. --- src/mime.c    Thu Dec 10 20:45:36 1992
  59. ***************
  60. *** 1,5 ****
  61.   /*******************************************************************************
  62. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  63.    *
  64.    *            Copyright (c) 1988-1992 USENET Community Trust
  65.    *            Copyright (c) 1986,1987 Dave Taylor
  66. --- 1,5 ----
  67.   /*******************************************************************************
  68. !  *  The Elm Mail System  -  $Revision: 5.8 $   $State: Exp $
  69.    *
  70.    *            Copyright (c) 1988-1992 USENET Community Trust
  71.    *            Copyright (c) 1986,1987 Dave Taylor
  72. ***************
  73. *** 11,16 ****
  74. --- 11,26 ----
  75.    *
  76.    ******************************************************************************
  77.    * $Log: mime.c,v $
  78. +  * Revision 5.8  1992/12/11  01:45:04  syd
  79. +  * remove sys/types.h include, it is now included by defs.h
  80. +  * and this routine includes defs.h or indirectly includes defs.h
  81. +  * From: Syd
  82. +  *
  83. +  * Revision 5.7  1992/11/26  00:46:13  syd
  84. +  * changes to first change screen back (Raw off) and then issue final
  85. +  * error message.
  86. +  * From: Syd
  87. +  *
  88.    * Revision 5.6  1992/11/22  01:22:48  syd
  89.    * According to the MIME BNF, quoted strings are allowed in the value portion
  90.    * of a parameter.
  91. ***************
  92. *** 53,59 ****
  93.   
  94.   #include <errno.h>
  95.   #include <ctype.h>
  96. - #include <sys/types.h>
  97.   #include <sys/stat.h>
  98.   
  99.   int check_for_multipart(filedesc)
  100. --- 63,68 ----
  101. ***************
  102. *** 192,199 ****
  103.       fprintf(dest, "\n");
  104.       while (line_len = fread(buffer, 1, sizeof(buffer), incfile)) {
  105.         if (fwrite(buffer, 1, line_len, dest) != line_len) {
  106.           Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmWriteFailedCopyAcross,
  107. !             "\n\rWrite failed in copy_message_across\n\r"), 0);
  108.           emergency_exit();
  109.         }
  110.       } 
  111. --- 201,210 ----
  112.       fprintf(dest, "\n");
  113.       while (line_len = fread(buffer, 1, sizeof(buffer), incfile)) {
  114.         if (fwrite(buffer, 1, line_len, dest) != line_len) {
  115. +     MoveCursor(LINES, 0);
  116. +     Raw(OFF);
  117.           Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmWriteFailedCopyAcross,
  118. !             "\nWrite failed in copy_message_across\n"), 0);
  119.           emergency_exit();
  120.         }
  121.       } 
  122. ***************
  123. *** 202,210 ****
  124.       unlink(tmp_fn);
  125.       }
  126.     } else {
  127.       Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCantOpenIncludedFile,
  128. !             "\n\rCan't open included File,ignored\n\r"), 0);
  129. !     sleep(2);
  130.       emergency_exit();
  131.     }
  132.     return(0);
  133. --- 213,222 ----
  134.       unlink(tmp_fn);
  135.       }
  136.     } else {
  137. +     MoveCursor(LINES, 0);
  138. +     Raw(OFF);
  139.       Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCantOpenIncludedFile,
  140. !             "\nCan't open included File\n"), 0);
  141.       emergency_exit();
  142.     }
  143.     return(0);
  144.  
  145. Index: src/newmbox.c
  146. Prereq: 5.8
  147. *** ../elm2.4/src/newmbox.c    Wed Nov 25 14:10:40 1992
  148. --- src/newmbox.c    Thu Dec 10 20:45:37 1992
  149. ***************
  150. *** 1,8 ****
  151.   
  152. ! static char rcsid[] = "@(#)$Id: newmbox.c,v 5.8 1992/11/22 00:08:45 syd Exp $";
  153.   
  154.   /*******************************************************************************
  155. !  *  The Elm Mail System  -  $Revision: 5.8 $   $State: Exp $
  156.    *
  157.    *            Copyright (c) 1988-1992 USENET Community Trust
  158.    *            Copyright (c) 1986,1987 Dave Taylor
  159. --- 1,8 ----
  160.   
  161. ! static char rcsid[] = "@(#)$Id: newmbox.c,v 5.11 1992/12/11 01:45:04 syd Exp $";
  162.   
  163.   /*******************************************************************************
  164. !  *  The Elm Mail System  -  $Revision: 5.11 $   $State: Exp $
  165.    *
  166.    *            Copyright (c) 1988-1992 USENET Community Trust
  167.    *            Copyright (c) 1986,1987 Dave Taylor
  168. ***************
  169. *** 14,19 ****
  170. --- 14,33 ----
  171.    *
  172.    *******************************************************************************
  173.    * $Log: newmbox.c,v $
  174. +  * Revision 5.11  1992/12/11  01:45:04  syd
  175. +  * remove sys/types.h include, it is now included by defs.h
  176. +  * and this routine includes defs.h or indirectly includes defs.h
  177. +  * From: Syd
  178. +  *
  179. +  * Revision 5.10  1992/12/07  04:31:38  syd
  180. +  * Fix typo
  181. +  * From: Syd
  182. +  *
  183. +  * Revision 5.9  1992/11/26  00:46:13  syd
  184. +  * changes to first change screen back (Raw off) and then issue final
  185. +  * error message.
  186. +  * From: Syd
  187. +  *
  188.    * Revision 5.8  1992/11/22  00:08:45  syd
  189.    * I was playing with the metamail stuff and Sun's Openwindows Mailtool
  190.    * and discovered that I was able to 'display' messages generated with
  191. ***************
  192. *** 65,71 ****
  193.   #undef tolower        /* we have our own "tolower" routine instead! */
  194.   #endif
  195.   
  196. - #include <sys/types.h>        
  197.   #include <sys/stat.h>
  198.   #include <errno.h>
  199.   
  200. --- 79,84 ----
  201. ***************
  202. *** 168,177 ****
  203.       if ((mailfile = fopen(cur_folder,"r")) == NULL)  {
  204.         if (errno != ENOENT ) { /* error on anything but file not exist */
  205.           err = errno;
  206. !         Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmFailOnOpenNewmbox,
  207. !             "\n\rfail on open in newmbox, open %s failed!!\n\r"),
  208. !             1, cur_folder);
  209. !         Write_to_screen("** %s. **\n\r", 1, error_description(err));
  210.           dprint(1, (debugfile, "fail on open in newbox, file %s!!\n",
  211.               cur_folder));
  212.           rm_temps_exit();
  213. --- 181,192 ----
  214.       if ((mailfile = fopen(cur_folder,"r")) == NULL)  {
  215.         if (errno != ENOENT ) { /* error on anything but file not exist */
  216.           err = errno;
  217. !         MoveCursor(LINES,0);
  218. !         Raw(OFF);
  219. !         printf(catgets(elm_msg_cat, ElmSet, ElmFailOnOpenNewmbox,
  220. !             "\nfail on open in newmbox, open %s failed!!\n"),
  221. !             cur_folder);
  222. !         printf("** %s. **\n", error_description(err));
  223.           dprint(1, (debugfile, "fail on open in newbox, file %s!!\n",
  224.               cur_folder));
  225.           rm_temps_exit();
  226. ***************
  227. *** 303,313 ****
  228.           if ((temp = fopen(cur_tempfolder,"w")) == NULL) {
  229.            err = errno;
  230.            unlock();    /* remove lock file! */
  231.            Raw(OFF);
  232. !          Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntOpenForTemp,
  233. !              "\n\rCouldn't open file %s for use as temp file.\n\r"),
  234. !              1, cur_tempfolder);
  235. !          Write_to_screen("** %s. **\n\r", 1, error_description(err));
  236.            dprint(1, (debugfile,
  237.                   "Error: Couldn't open file %s as temp mbox.  errno %s (%s)\n",
  238.                cur_tempfolder, error_description(err), "read_headers"));
  239. --- 318,329 ----
  240.           if ((temp = fopen(cur_tempfolder,"w")) == NULL) {
  241.            err = errno;
  242.            unlock();    /* remove lock file! */
  243. +          MoveCursor(LINES, 0);
  244.            Raw(OFF);
  245. !          printf(catgets(elm_msg_cat, ElmSet, ElmCouldntOpenForTemp,
  246. !              "\nCouldn't open file %s for use as temp file.\n"),
  247. !              cur_tempfolder);
  248. !          printf("** %s. **\n", error_description(err));
  249.            dprint(1, (debugfile,
  250.                   "Error: Couldn't open file %s as temp mbox.  errno %s (%s)\n",
  251.                cur_tempfolder, error_description(err), "read_headers"));
  252. ***************
  253. *** 321,331 ****
  254.          if ((temp = fopen(cur_tempfolder,"a")) == NULL) {
  255.            err = errno;
  256.            unlock();    /* remove lock file! */
  257.            Raw(OFF);
  258. !          Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntReopenForTemp,
  259. !              "\n\rCouldn't reopen file %s for use as temp file.\n\r"),
  260. !              1, cur_tempfolder);
  261. !          Write_to_screen("** %s. **\n\r", 1, error_description(err));
  262.            dprint(1, (debugfile, 
  263.                   "Error: Couldn't reopen file %s as temp mbox.  errno %s (%s)\n",
  264.                cur_tempfolder, error_description(err), "read_headers"));
  265. --- 337,348 ----
  266.          if ((temp = fopen(cur_tempfolder,"a")) == NULL) {
  267.            err = errno;
  268.            unlock();    /* remove lock file! */
  269. +          MoveCursor(LINES,0);
  270.            Raw(OFF);
  271. !          printf(catgets(elm_msg_cat, ElmSet, ElmCouldntReopenForTemp,
  272. !              "\nCouldn't reopen file %s for use as temp file.\n"),
  273. !              cur_tempfolder);
  274. !          printf("** %s. **\n", error_description(err));
  275.            dprint(1, (debugfile, 
  276.                   "Error: Couldn't reopen file %s as temp mbox.  errno %s (%s)\n",
  277.                cur_tempfolder, error_description(err), "read_headers"));
  278. ***************
  279. *** 357,366 ****
  280.       if (add_new_only) {
  281.          if (fseek(mailfile, mailfile_size, 0) == -1) {
  282.            err = errno;
  283. !          Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekEndFolder,
  284. !         "\n\rCouldn't seek to %ld (end of folder) in %s!\n\r"),
  285. !         2, mailfile_size, cur_folder);    
  286. !          Write_to_screen("** %s. **\n\r", 1, error_description(err));
  287.            dprint(1, (debugfile,
  288.        "Error: Couldn't seek to end of folder %s: (offset %ld) Errno %s (%s)\n",
  289.               cur_folder, mailfile_size, error_description(err), "read_headers"));
  290. --- 374,385 ----
  291.       if (add_new_only) {
  292.          if (fseek(mailfile, mailfile_size, 0) == -1) {
  293.            err = errno;
  294. !          MoveCursor(LINES, 0);
  295. !          Raw(OFF);
  296. !          MCprintf(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekEndFolder,
  297. !         "\nCouldn't seek to %ld (end of folder) in %s!\n"),
  298. !         mailfile_size, cur_folder);    
  299. !          printf("** %s. **\n", 1, error_description(err));
  300.            dprint(1, (debugfile,
  301.        "Error: Couldn't seek to end of folder %s: (offset %ld) Errno %s (%s)\n",
  302.               cur_folder, mailfile_size, error_description(err), "read_headers"));
  303. ***************
  304. *** 385,394 ****
  305.         if (copyit)
  306.           if (fwrite(buffer, 1, line_bytes, temp) != line_bytes) {
  307.           err = errno;
  308. !         Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmWriteToTempFailed,
  309. !                 "\n\rWrite to tempfile %s failed!!\n\r"),
  310. !                 1, cur_tempfolder);
  311. !         Write_to_screen("** %s. **\n\r", 1, error_description(err));
  312.           dprint(1, (debugfile, "Can't write to tempfile %s!!\n",
  313.                  cur_tempfolder));
  314.           rm_temps_exit();
  315. --- 404,415 ----
  316.         if (copyit)
  317.           if (fwrite(buffer, 1, line_bytes, temp) != line_bytes) {
  318.           err = errno;
  319. !         MoveCursor(LINES, 0);
  320. !         Raw(OFF);
  321. !         printf(catgets(elm_msg_cat, ElmSet, ElmWriteToTempFailed,
  322. !                 "\nWrite to tempfile %s failed!!\n"),
  323. !                 cur_tempfolder);
  324. !         printf("** %s. **\n", error_description(err));
  325.           dprint(1, (debugfile, "Can't write to tempfile %s!!\n",
  326.                  cur_tempfolder));
  327.           rm_temps_exit();
  328. ***************
  329. *** 426,439 ****
  330.   #else
  331.           if (! first_word(buffer, "From ") && !forwarding_mail) {
  332.   #endif /* MMDF */
  333. !           PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmFolderCorrupt,
  334. !           "\n\rFolder is corrupt!!  I can't read it!!\n\r\n\r"));
  335.             fflush(stderr);
  336.             dprint(1, (debugfile, 
  337.                  "\n\n**** First mail header is corrupt!! ****\n\n"));
  338.             dprint(1, (debugfile, "Line is;\n\t%s\n\n", buffer));
  339. !               mail_only++;    /* to avoid leave() cursor motion */
  340. !               leave();
  341.           }
  342.         }
  343.   
  344. --- 447,461 ----
  345.   #else
  346.           if (! first_word(buffer, "From ") && !forwarding_mail) {
  347.   #endif /* MMDF */
  348. !           MoveCursor(LINES,0);
  349. !           Raw(OFF);
  350. !           printf(catgets(elm_msg_cat, ElmSet, ElmFolderCorrupt,
  351. !           "\nFolder is corrupt!!  I can't read it!!\n\n"));
  352.             fflush(stderr);
  353.             dprint(1, (debugfile, 
  354.                  "\n\n**** First mail header is corrupt!! ****\n\n"));
  355.             dprint(1, (debugfile, "Line is;\n\t%s\n\n", buffer));
  356. !               leave(0);
  357.           }
  358.         }
  359.   
  360. ***************
  361. *** 461,470 ****
  362.               new_max * sizeof(struct header_rec *));
  363.           }
  364.           if (new_headers == NULL) {
  365. !           error1(catgets(elm_msg_cat, ElmSet, ElmCouldntAllocMemory,
  366. !     "\n\r\n\rCouldn't allocate enough memory! Message #%d.\n\r\n\r"),
  367.                 count);
  368. !           leave();
  369.           }
  370.           headers = new_headers;
  371.           while (max_headers < new_max)
  372. --- 483,494 ----
  373.               new_max * sizeof(struct header_rec *));
  374.           }
  375.           if (new_headers == NULL) {
  376. !               MoveCursor(LINES,0);
  377. !               Raw(OFF);
  378. !           printf(catgets(elm_msg_cat, ElmSet, ElmCouldntAllocMemory,
  379. !     "\n\nCouldn't allocate enough memory! Message #%d.\n\n"),
  380.                 count);
  381. !           leave(0);
  382.           }
  383.           headers = new_headers;
  384.           while (max_headers < new_max)
  385. ***************
  386. *** 478,487 ****
  387.   
  388.           if ((h = (struct header_rec *)
  389.                 malloc(sizeof(struct header_rec))) == NULL) {
  390. !           error1(catgets(elm_msg_cat, ElmSet, ElmCouldntAllocMemory,
  391. !     "\n\r\n\rCouldn't allocate enough memory! Message #%d.\n\r\n\r"),
  392.                 count);
  393. !           leave();
  394.           }
  395.           headers[count] = h;
  396.             }
  397. --- 502,513 ----
  398.   
  399.           if ((h = (struct header_rec *)
  400.                 malloc(sizeof(struct header_rec))) == NULL) {
  401. !               MoveCursor(LINES,0);
  402. !               Raw(OFF);
  403. !           printf(catgets(elm_msg_cat, ElmSet, ElmCouldntAllocMemory,
  404. !     "\n\nCouldn't allocate enough memory! Message #%d.\n\n"),
  405.                 count);
  406. !           leave(0);
  407.           }
  408.           headers[count] = h;
  409.             }
  410. ***************
  411. *** 595,608 ****
  412.             /* if this is the first "From" in file but the "From" line is
  413.              * not of the proper format, we've got a corrupt folder.
  414.              */
  415. !           PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmFolderCorrupt,
  416. !           "\n\rFolder is corrupt!!  I can't read it!!\n\r\n\r"));
  417.             fflush(stderr);
  418.             dprint(1, (debugfile, 
  419.                  "\n\n**** First mail header is corrupt!! ****\n\n"));
  420.             dprint(1, (debugfile, "Line is;\n\t%s\n\n", buffer));
  421. !           mail_only++;    /* to avoid leave() cursor motion */
  422. !           leave();
  423.           } else if (in_header == FALSE && content_length_found == TRUE && line_bytes > 1) {
  424.           /* invalid content length, skip back to beginning of
  425.            * this messages text and ignore the content length
  426. --- 621,635 ----
  427.             /* if this is the first "From" in file but the "From" line is
  428.              * not of the proper format, we've got a corrupt folder.
  429.              */
  430. !           MoveCursor(LINES,0);
  431. !           Raw(OFF);
  432. !           printf(catgets(elm_msg_cat, ElmSet, ElmFolderCorrupt,
  433. !           "\nFolder is corrupt!!  I can't read it!!\n\n"));
  434.             fflush(stderr);
  435.             dprint(1, (debugfile, 
  436.                  "\n\n**** First mail header is corrupt!! ****\n\n"));
  437.             dprint(1, (debugfile, "Line is;\n\t%s\n\n", buffer));
  438. !           leave(0);
  439.           } else if (in_header == FALSE && content_length_found == TRUE && line_bytes > 1) {
  440.           /* invalid content length, skip back to beginning of
  441.            * this messages text and ignore the content length
  442. ***************
  443. *** 612,621 ****
  444.            */
  445.             if (fseek(mailfile, content_start, 0) == -1) {
  446.           err = errno;
  447. !         Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoFolder,
  448. !            "\n\rCouldn't seek %ld bytes into folder.\n\r"),
  449. !            1, mailfile_size);    
  450. !         Write_to_screen("** %s. **\n\r", 1, error_description(err));
  451.           dprint(1, (debugfile,
  452.         "Error: Couldn't seek folder %s: (offset %ld) Errno %s (%s)\n",
  453.              cur_folder, mailfile_size, error_description(err), "reset - read_headers"));
  454. --- 639,650 ----
  455.            */
  456.             if (fseek(mailfile, content_start, 0) == -1) {
  457.           err = errno;
  458. !         MoveCursor(LINES, 0);
  459. !         Raw(OFF);
  460. !         printf(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoFolder,
  461. !            "\nCouldn't seek %ld bytes into folder.\n"),
  462. !            mailfile_size);    
  463. !         printf("** %s. **\n", 1, error_description(err));
  464.           dprint(1, (debugfile,
  465.         "Error: Couldn't seek folder %s: (offset %ld) Errno %s (%s)\n",
  466.              cur_folder, mailfile_size, error_description(err), "reset - read_headers"));
  467. ***************
  468. *** 624,633 ****
  469.             if (copyit)
  470.           if (fseek(temp, content_start, 0) == -1) {
  471.             err = errno;
  472. !           Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoTempFile,
  473. !              "\n\rCouldn't seek %ld bytes into temp file.\n\r"),
  474. !              1, mailfile_size);
  475. !           Write_to_screen("** %s. **\n\r", 1, error_description(err));
  476.             dprint(1, (debugfile,
  477.       "Error: Couldn't seek temp file %s: (offset %ld) Errno %s (%s)\n",
  478.                cur_tempfolder, mailfile_size, error_description(err), "reset - read_headers"));
  479. --- 653,664 ----
  480.             if (copyit)
  481.           if (fseek(temp, content_start, 0) == -1) {
  482.             err = errno;
  483. !           MoveCursor(LINES, 0);
  484. !           Raw(OFF);
  485. !           printf(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoTempFile,
  486. !              "\nCouldn't seek %ld bytes into temp file.\n"),
  487. !              mailfile_size);
  488. !           printf("** %s. **\n", error_description(err));
  489.             dprint(1, (debugfile,
  490.       "Error: Couldn't seek temp file %s: (offset %ld) Errno %s (%s)\n",
  491.                cur_tempfolder, mailfile_size, error_description(err), "reset - read_headers"));
  492. ***************
  493. *** 811,820 ****
  494.         unlock();    /* remove lock file! */
  495.         if ((ferror(mailfile)) || (fclose(mailfile) == EOF)) {
  496.             err = errno;
  497. !           Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCloseOnFolderFailed,
  498. !                   "\n\rClose on folder %s failed!!\n\r"),
  499. !                   1, cur_folder);
  500. !           Write_to_screen("** %s. **\n\r", 1, error_description(err));
  501.             dprint(1, (debugfile, "Can't close on folder %s!!\n",
  502.                cur_folder));
  503.             rm_temps_exit();
  504. --- 842,853 ----
  505.         unlock();    /* remove lock file! */
  506.         if ((ferror(mailfile)) || (fclose(mailfile) == EOF)) {
  507.             err = errno;
  508. !           MoveCursor(LINES, 0);
  509. !           Raw(OFF);
  510. !           printf(catgets(elm_msg_cat, ElmSet, ElmCloseOnFolderFailed,
  511. !                   "\nClose on folder %s failed!!\n"),
  512. !                   cur_folder);
  513. !           printf("** %s. **\n", error_description(err));
  514.             dprint(1, (debugfile, "Can't close on folder %s!!\n",
  515.                cur_folder));
  516.             rm_temps_exit();
  517. ***************
  518. *** 821,830 ****
  519.         }
  520.         if ((ferror(temp)) || (fclose(temp) == EOF)) {
  521.             err = errno;
  522. !           Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmColeOnTempFailed,
  523. !                   "\n\rClose on tempfile %s failed!!\n\r"), 
  524. !                   1, cur_tempfolder);
  525. !           Write_to_screen("** %s. **\n\r", 1, error_description(err));
  526.             dprint(1, (debugfile, "Can't close on tempfile %s!!\n",
  527.                cur_tempfolder));
  528.             rm_temps_exit();
  529. --- 854,865 ----
  530.         }
  531.         if ((ferror(temp)) || (fclose(temp) == EOF)) {
  532.             err = errno;
  533. !           MoveCursor(LINES, 0);
  534. !           Raw(OFF);
  535. !           printf(catgets(elm_msg_cat, ElmSet, ElmCloseOnTempFailed,
  536. !                   "\nClose on tempfile %s failed!!\n"), 
  537. !                   cur_tempfolder);
  538. !           printf("** %s. **\n", error_description(err));
  539.             dprint(1, (debugfile, "Can't close on tempfile %s!!\n",
  540.                cur_tempfolder));
  541.             rm_temps_exit();
  542. ***************
  543. *** 831,839 ****
  544.         }
  545.         /* sanity check on append - is resulting temp file longer??? */
  546.         if ( bytes(cur_tempfolder) != mailfile_size) {
  547. !          Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmLengthNESpool,
  548. !            "\n\rnewmbox - length of mbox. != spool mailbox length!!\n\r"),
  549. !         0);
  550.           dprint(0, (debugfile, "newmbox - mbox. != spool mail length"));
  551.           rm_temps_exit();
  552.         }
  553. --- 866,875 ----
  554.         }
  555.         /* sanity check on append - is resulting temp file longer??? */
  556.         if ( bytes(cur_tempfolder) != mailfile_size) {
  557. !          MoveCursor(LINES, 0);
  558. !          Raw(OFF);
  559. !          printf(catgets(elm_msg_cat, ElmSet, ElmLengthNESpool,
  560. !            "\nnewmbox - length of mbox. != spool mailbox length!!\n"));
  561.           dprint(0, (debugfile, "newmbox - mbox. != spool mail length"));
  562.           rm_temps_exit();
  563.         }
  564. ***************
  565. *** 841,854 ****
  566.           err = errno;
  567.           MoveCursor(LINES,0);
  568.           Raw(OFF);
  569. !         Write_to_screen(catgets(elm_msg_cat, ElmSet, ElmCouldntReopenForTemp,
  570. !            "\n\rCouldn't reopen file %s for use as temp file.\n\r"),
  571. !                1, cur_tempfolder);
  572. !         Write_to_screen("** %s. **\n\r", 1, error_description(err));
  573.           dprint(1, (debugfile,
  574.             "Error: Reopening %s as temp file failed!  errno %s (%s)\n",
  575. !                cur_tempfolder, error_description(errno), "read_headers"));
  576. !         leave();
  577.         }
  578.       }
  579.       else 
  580. --- 877,890 ----
  581.           err = errno;
  582.           MoveCursor(LINES,0);
  583.           Raw(OFF);
  584. !         printf(catgets(elm_msg_cat, ElmSet, ElmCouldntReopenForTemp,
  585. !            "\nCouldn't reopen file %s for use as temp file.\n"),
  586. !                cur_tempfolder);
  587. !         printf("** %s. **\n", error_description(err));
  588.           dprint(1, (debugfile,
  589.             "Error: Reopening %s as temp file failed!  errno %s (%s)\n",
  590. !                cur_tempfolder, error_description(err), "read_headers"));
  591. !         leave(0);
  592.         }
  593.       }
  594.       else 
  595.  
  596. Index: src/pattern.c
  597. Prereq: 5.1
  598. *** ../elm2.4/src/pattern.c    Sat Oct  3 18:59:07 1992
  599. --- src/pattern.c    Wed Nov 25 19:47:11 1992
  600. ***************
  601. *** 1,8 ****
  602.   
  603. ! static char rcsid[] = "@(#)$Id: pattern.c,v 5.1 1992/10/03 22:58:40 syd Exp $";
  604.   
  605.   /*******************************************************************************
  606. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  607.    *
  608.    *            Copyright (c) 1988-1992 USENET Community Trust
  609.    *            Copyright (c) 1986,1987 Dave Taylor
  610. --- 1,8 ----
  611.   
  612. ! static char rcsid[] = "@(#)$Id: pattern.c,v 5.2 1992/11/26 00:46:50 syd Exp $";
  613.   
  614.   /*******************************************************************************
  615. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  616.    *
  617.    *            Copyright (c) 1988-1992 USENET Community Trust
  618.    *            Copyright (c) 1986,1987 Dave Taylor
  619. ***************
  620. *** 14,19 ****
  621. --- 14,24 ----
  622.    *
  623.    *******************************************************************************
  624.    * $Log: pattern.c,v $
  625. +  * Revision 5.2  1992/11/26  00:46:50  syd
  626. +  * Fix how errno is used so err is inited and used instead
  627. +  * as errno gets overwritten by print system call
  628. +  * From: Syd
  629. +  *
  630.    * Revision 5.1  1992/10/03  22:58:40  syd
  631.    * Initial checkin as of 2.4 Release at PL0
  632.    *
  633. ***************
  634. *** 354,360 ****
  635.       **/
  636.   
  637.       char buffer[LONG_STRING];
  638. !     int  message_number, lines, line, line_len;
  639.   
  640.       message_number = current-1;
  641.   
  642. --- 359,365 ----
  643.       **/
  644.   
  645.       char buffer[LONG_STRING];
  646. !     int  message_number, lines, line, line_len, err;
  647.   
  648.       message_number = current-1;
  649.   
  650. ***************
  651. *** 365,377 ****
  652.   
  653.         if (fseek(mailfile, headers[message_number]->offset, 0L) == -1) {
  654.   
  655.           dprint(1, (debugfile,
  656.           "Error: seek %ld bytes into file failed. errno %d (%s)\n",
  657. !         headers[message_number]->offset, errno, 
  658.           "match_in_message"));
  659.           error2(catgets(elm_msg_cat, ElmSet, ElmMatchSeekFailed,
  660.              "ELM [match] failed looking %ld bytes into file (%s)."),
  661. !            headers[message_number]->offset, error_description(errno));
  662.           return(1);    /* fake it out to avoid replacing error message */
  663.         }
  664.   
  665. --- 370,383 ----
  666.   
  667.         if (fseek(mailfile, headers[message_number]->offset, 0L) == -1) {
  668.   
  669. +         err = errno;
  670.           dprint(1, (debugfile,
  671.           "Error: seek %ld bytes into file failed. errno %d (%s)\n",
  672. !         headers[message_number]->offset, err, 
  673.           "match_in_message"));
  674.           error2(catgets(elm_msg_cat, ElmSet, ElmMatchSeekFailed,
  675.              "ELM [match] failed looking %ld bytes into file (%s)."),
  676. !            headers[message_number]->offset, error_description(err));
  677.           return(1);    /* fake it out to avoid replacing error message */
  678.         }
  679.   
  680.  
  681. Index: src/pmalloc.c
  682. Prereq: 5.1
  683. *** ../elm2.4/src/pmalloc.c    Sat Oct  3 18:59:08 1992
  684. --- src/pmalloc.c    Sun Dec  6 23:28:14 1992
  685. ***************
  686. *** 1,8 ****
  687.   
  688. ! static char rcsid[] = "@(#)$Id: pmalloc.c,v 5.1 1992/10/03 22:58:40 syd Exp $";
  689.   
  690.   /*******************************************************************************
  691. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  692.    *
  693.    *            Copyright (c) 1988-1992 USENET Community Trust
  694.    *            Copyright (c) 1986,1987 Dave Taylor
  695. --- 1,8 ----
  696.   
  697. ! static char rcsid[] = "@(#)$Id: pmalloc.c,v 5.3 1992/12/07 04:28:03 syd Exp $";
  698.   
  699.   /*******************************************************************************
  700. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  701.    *
  702.    *            Copyright (c) 1988-1992 USENET Community Trust
  703.    *            Copyright (c) 1986,1987 Dave Taylor
  704. ***************
  705. *** 14,19 ****
  706. --- 14,28 ----
  707.    *
  708.    *******************************************************************************
  709.    * $Log: pmalloc.c,v $
  710. +  * Revision 5.3  1992/12/07  04:28:03  syd
  711. +  * change include from defs to headers as now needs LINES
  712. +  * From: Syd
  713. +  *
  714. +  * Revision 5.2  1992/11/26  00:46:13  syd
  715. +  * changes to first change screen back (Raw off) and then issue final
  716. +  * error message.
  717. +  * From: Syd
  718. +  *
  719.    * Revision 5.1  1992/10/03  22:58:40  syd
  720.    * Initial checkin as of 2.4 Release at PL0
  721.    *
  722. ***************
  723. *** 29,35 ****
  724.   **/
  725.   
  726.   #include <stdio.h>
  727. ! #include "defs.h"
  728.   #include "s_elm.h"
  729.   
  730.   extern nl_catd elm_msg_cat;    /* message catalog        */
  731. --- 38,44 ----
  732.   **/
  733.   
  734.   #include <stdio.h>
  735. ! #include "headers.h"
  736.   #include "s_elm.h"
  737.   
  738.   extern nl_catd elm_msg_cat;    /* message catalog        */
  739. ***************
  740. *** 54,63 ****
  741.   
  742.       if (size > free_mem) {
  743.         if ((our_block = (char *) malloc(PMALLOC_BUFFER_SIZE)) == NULL) {
  744.           fprintf(stderr, catgets(elm_msg_cat, ElmSet, ElmCouldntMallocBytes,
  745. !             "\n\r\n\rCouldn't malloc %d bytes!!\n\r\n\r"),
  746.               PMALLOC_BUFFER_SIZE);
  747. !         leave();    
  748.             }
  749.         our_block += 4;  /* just for safety, don't give back true address */
  750.         free_mem = PMALLOC_BUFFER_SIZE-4;
  751. --- 63,74 ----
  752.   
  753.       if (size > free_mem) {
  754.         if ((our_block = (char *) malloc(PMALLOC_BUFFER_SIZE)) == NULL) {
  755. +         MoveCursor(LINES,0);
  756. +         Raw(OFF);
  757.           fprintf(stderr, catgets(elm_msg_cat, ElmSet, ElmCouldntMallocBytes,
  758. !             "\n\nCouldn't malloc %d bytes!!\n\n"),
  759.               PMALLOC_BUFFER_SIZE);
  760. !         leave(0);    
  761.             }
  762.         our_block += 4;  /* just for safety, don't give back true address */
  763.         free_mem = PMALLOC_BUFFER_SIZE-4;
  764.  
  765. Index: src/quit.c
  766. Prereq: 5.3
  767. *** ../elm2.4/src/quit.c    Tue Oct 27 11:17:30 1992
  768. --- src/quit.c    Wed Nov 25 19:46:43 1992
  769. ***************
  770. *** 1,8 ****
  771.   
  772. ! static char rcsid[] = "@(#)$Id: quit.c,v 5.3 1992/10/24 13:35:39 syd Exp $";
  773.   
  774.   /*******************************************************************************
  775. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  776.    *
  777.    *            Copyright (c) 1988-1992 USENET Community Trust
  778.    *            Copyright (c) 1986,1987 Dave Taylor
  779. --- 1,8 ----
  780.   
  781. ! static char rcsid[] = "@(#)$Id: quit.c,v 5.4 1992/11/26 00:46:13 syd Exp $";
  782.   
  783.   /*******************************************************************************
  784. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  785.    *
  786.    *            Copyright (c) 1988-1992 USENET Community Trust
  787.    *            Copyright (c) 1986,1987 Dave Taylor
  788. ***************
  789. *** 14,19 ****
  790. --- 14,24 ----
  791.    *
  792.    *******************************************************************************
  793.    * $Log: quit.c,v $
  794. +  * Revision 5.4  1992/11/26  00:46:13  syd
  795. +  * changes to first change screen back (Raw off) and then issue final
  796. +  * error message.
  797. +  * From: Syd
  798. +  *
  799.    * Revision 5.3  1992/10/24  13:35:39  syd
  800.    * changes found by using codecenter on Elm 2.4.3
  801.    * From: Graham Hudspith <gwh@inmos.co.uk>
  802. ***************
  803. *** 58,64 ****
  804.          * changed for its own purposes */
  805.         return;
  806.   
  807. !     leave();
  808.   }
  809.   
  810.   int
  811. --- 63,69 ----
  812.          * changed for its own purposes */
  813.         return;
  814.   
  815. !     leave(0);
  816.   }
  817.   
  818.   int
  819. ***************
  820. *** 67,72 ****
  821. --- 72,78 ----
  822.       /** Resync on the current folder. Leave current and read it back in.
  823.           Return indicates whether a redraw of the screen is needed.
  824.        **/
  825. +     int  err;
  826.   
  827.         if(leave_mbox(TRUE, FALSE, TRUE) ==-1)
  828.           /* new mail - leave not done - can't change to another file yet
  829. ***************
  830. *** 78,89 ****
  831.   
  832.         if ((errno = can_access(cur_folder, READ_ACCESS)) != 0) {
  833.           if (strcmp(cur_folder, defaultfile) != 0 || errno != ENOENT) {
  834.             dprint(1, (debugfile,
  835.                "Error: given file %s as folder - unreadable (%s)!\n", 
  836. !              cur_folder, error_description(errno)));
  837.             fprintf(stderr, catgets(elm_msg_cat, ElmSet, ElmCantOpenFolderRead,
  838.               "Can't open folder '%s' for reading!\n"), cur_folder);
  839. !           leave();
  840.           }
  841.         }
  842.   
  843. --- 84,98 ----
  844.   
  845.         if ((errno = can_access(cur_folder, READ_ACCESS)) != 0) {
  846.           if (strcmp(cur_folder, defaultfile) != 0 || errno != ENOENT) {
  847. +           err = errno;
  848. +           MoveCursor(LINES, 0);
  849. +           Raw(OFF);
  850.             dprint(1, (debugfile,
  851.                "Error: given file %s as folder - unreadable (%s)!\n", 
  852. !              cur_folder, error_description(err)));
  853.             fprintf(stderr, catgets(elm_msg_cat, ElmSet, ElmCantOpenFolderRead,
  854.               "Can't open folder '%s' for reading!\n"), cur_folder);
  855. !           leave(0);
  856.           }
  857.         }
  858.   
  859.  
  860. Index: src/read_rc.c
  861. Prereq: 5.9
  862. *** ../elm2.4/src/read_rc.c    Wed Nov 25 14:10:33 1992
  863. --- src/read_rc.c    Wed Nov 25 19:46:44 1992
  864. ***************
  865. *** 1,8 ****
  866.   
  867. ! static char rcsid[] = "@(#)$Id: read_rc.c,v 5.9 1992/11/24 01:44:18 syd Exp $";
  868.   
  869.   /*******************************************************************************
  870. !  *  The Elm Mail System  -  $Revision: 5.9 $   $State: Exp $
  871.    *
  872.    *            Copyright (c) 1988-1992 USENET Community Trust
  873.    *            Copyright (c) 1986,1987 Dave Taylor
  874. --- 1,8 ----
  875.   
  876. ! static char rcsid[] = "@(#)$Id: read_rc.c,v 5.10 1992/11/26 00:46:13 syd Exp $";
  877.   
  878.   /*******************************************************************************
  879. !  *  The Elm Mail System  -  $Revision: 5.10 $   $State: Exp $
  880.    *
  881.    *            Copyright (c) 1988-1992 USENET Community Trust
  882.    *            Copyright (c) 1986,1987 Dave Taylor
  883. ***************
  884. *** 14,19 ****
  885. --- 14,24 ----
  886.    *
  887.    *******************************************************************************
  888.    * $Log: read_rc.c,v $
  889. +  * Revision 5.10  1992/11/26  00:46:13  syd
  890. +  * changes to first change screen back (Raw off) and then issue final
  891. +  * error message.
  892. +  * From: Syd
  893. +  *
  894.    * Revision 5.9  1992/11/24  01:44:18  syd
  895.    * Add raw/no tite stuff around directory create questions
  896.    * From: Syd via bug report from ade@clark.edu
  897. ***************
  898. *** 134,139 ****
  899. --- 139,145 ----
  900.   #include "headers.h"
  901.   #include "save_opts.h"
  902.   #include "s_elm.h"
  903. + #include <errno.h>
  904.   
  905.   #ifdef BSD
  906.   #undef tolower
  907. ***************
  908. *** 168,174 ****
  909.       FILE *file;
  910.       char buffer[SLEN], filename[SLEN], *cp, 
  911.                temp[SLEN]; /* for when an option is run through expandenv */
  912. !     int  i, ch, len;
  913.   
  914.       /* Establish some defaults in case elmrc is incomplete or not there.
  915.        * Defaults for other elmrc options were established in their
  916. --- 174,180 ----
  917.       FILE *file;
  918.       char buffer[SLEN], filename[SLEN], *cp, 
  919.                temp[SLEN]; /* for when an option is run through expandenv */
  920. !     int  i, ch, len, err;
  921.   
  922.       /* Establish some defaults in case elmrc is incomplete or not there.
  923.        * Defaults for other elmrc options were established in their
  924. ***************
  925. *** 303,311 ****
  926.           /* try to open elmrc file again */
  927.           sprintf(filename, "%s/%s", home, elmrcfile);
  928.           if((file = fopen(filename, "r")) == NULL) {
  929.             dprint(2, (debugfile,
  930.           "Warning: could not open new \".elm/elmrc\" file.\n"));
  931. !           dprint(2, (debugfile, "** %s **\n", error_description(errno)));
  932.             printf(catgets(elm_msg_cat, ElmSet, ElmCouldNotOpenNewElmrc,
  933.           "Warning: could not open new \".elm/elmrc\" file! Using default parameters.\n\r"));
  934.             sleep(4);
  935. --- 309,318 ----
  936.           /* try to open elmrc file again */
  937.           sprintf(filename, "%s/%s", home, elmrcfile);
  938.           if((file = fopen(filename, "r")) == NULL) {
  939. +           err = errno;
  940.             dprint(2, (debugfile,
  941.           "Warning: could not open new \".elm/elmrc\" file.\n"));
  942. !           dprint(2, (debugfile, "** %s **\n", error_description(err)));
  943.             printf(catgets(elm_msg_cat, ElmSet, ElmCouldNotOpenNewElmrc,
  944.           "Warning: could not open new \".elm/elmrc\" file! Using default parameters.\n\r"));
  945.             sleep(4);
  946. ***************
  947. *** 777,783 ****
  948.         if ((weedlist[weedcount] = 
  949.             pmalloc(strlen(default_list[weedcount]) + 1)) == NULL) {
  950.           printf(catgets(elm_msg_cat, ElmSet, ElmNoMemDefaultWeed,
  951. !         "\n\rNot enough memory for default weedlist. Leaving.\n\r"));
  952.           leave(1);
  953.         }
  954.         strcpy(weedlist[weedcount], default_list[weedcount]);
  955. --- 784,790 ----
  956.         if ((weedlist[weedcount] = 
  957.             pmalloc(strlen(default_list[weedcount]) + 1)) == NULL) {
  958.           printf(catgets(elm_msg_cat, ElmSet, ElmNoMemDefaultWeed,
  959. !         "\nNot enough memory for default weedlist. Leaving.\n"));
  960.           leave(1);
  961.         }
  962.         strcpy(weedlist[weedcount], default_list[weedcount]);
  963.  
  964. Index: src/remail.c
  965. Prereq: 5.4
  966. *** ../elm2.4/src/remail.c    Wed Nov 25 14:10:41 1992
  967. --- src/remail.c    Wed Nov 25 20:47:14 1992
  968. ***************
  969. *** 1,8 ****
  970.   
  971. ! static char rcsid[] = "@(#)$Id: remail.c,v 5.4 1992/11/22 01:14:20 syd Exp $";
  972.   
  973.   /*******************************************************************************
  974. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  975.    *
  976.    *            Copyright (c) 1988-1992 USENET Community Trust
  977.    *            Copyright (c) 1986,1987 Dave Taylor
  978. --- 1,8 ----
  979.   
  980. ! static char rcsid[] = "@(#)$Id: remail.c,v 5.6 1992/11/26 01:46:26 syd Exp $";
  981.   
  982.   /*******************************************************************************
  983. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  984.    *
  985.    *            Copyright (c) 1988-1992 USENET Community Trust
  986.    *            Copyright (c) 1986,1987 Dave Taylor
  987. ***************
  988. *** 14,19 ****
  989. --- 14,28 ----
  990.    *
  991.    *******************************************************************************
  992.    * $Log: remail.c,v $
  993. +  * Revision 5.6  1992/11/26  01:46:26  syd
  994. +  * add Decode option to copy_message, convert copy_message to
  995. +  * use bit or for options.
  996. +  * From: Syd and bjoerns@stud.cs.uit.no (Bjoern Stabell)
  997. +  *
  998. +  * Revision 5.5  1992/11/26  00:49:04  syd
  999. +  * fix use of errno
  1000. +  * From: Syd
  1001. +  *
  1002.    * Revision 5.4  1992/11/22  01:14:20  syd
  1003.    * Allow SCO MMDF to use the mmdf library for mailer via execmail.
  1004.    * From: Larry Philps <larryp@sco.com>
  1005. ***************
  1006. *** 58,63 ****
  1007. --- 67,73 ----
  1008.       char entered[VERY_LONG_STRING], expanded[VERY_LONG_STRING];
  1009.       char *filename, buffer[VERY_LONG_STRING], ch;
  1010.       char mailerflags[NLEN];
  1011. +     int  err;
  1012.       extern char *tempnam();
  1013.   
  1014.       entered[0] = '\0';
  1015. ***************
  1016. *** 77,88 ****
  1017.       }
  1018.   
  1019.       if ((mailfd = fopen(filename, "w")) == NULL) {
  1020.         dprint(1, (debugfile, "couldn't open temp file %s! (remail)\n", 
  1021.             filename));
  1022. !       dprint(1, (debugfile, "** %s **\n", error_description(errno)));
  1023.         sprintf(buffer, catgets(elm_msg_cat, ElmSet, ElmCouldntOpenForWriting,
  1024.               "Sorry - couldn't open file %s for writing (%s)."),
  1025. !           error_description(errno));
  1026.         set_error(buffer);
  1027.         return(1);
  1028.       }
  1029. --- 87,99 ----
  1030.       }
  1031.   
  1032.       if ((mailfd = fopen(filename, "w")) == NULL) {
  1033. +       err = errno;
  1034.         dprint(1, (debugfile, "couldn't open temp file %s! (remail)\n", 
  1035.             filename));
  1036. !       dprint(1, (debugfile, "** %s **\n", error_description(err)));
  1037.         sprintf(buffer, catgets(elm_msg_cat, ElmSet, ElmCouldntOpenForWriting,
  1038.               "Sorry - couldn't open file %s for writing (%s)."),
  1039. !           error_description(err));
  1040.         set_error(buffer);
  1041.         return(1);
  1042.       }
  1043. ***************
  1044. *** 97,103 ****
  1045.         do_mmdf_addresses(mailfd, strip_parens(strip_commas(expanded)));
  1046.   #endif /* MMDF */
  1047.   
  1048. !     copy_message("", mailfd, FALSE, TRUE, FALSE, TRUE, TRUE);  
  1049.   
  1050.       fclose(mailfd);
  1051.   
  1052. --- 108,114 ----
  1053.         do_mmdf_addresses(mailfd, strip_parens(strip_commas(expanded)));
  1054.   #endif /* MMDF */
  1055.   
  1056. !     copy_message("", mailfd, CM_REMOTE | CM_MMDF_HEAD | CM_REMAIL);
  1057.   
  1058.       fclose(mailfd);
  1059.   
  1060.  
  1061. Index: src/reply.c
  1062. Prereq: 5.4
  1063. *** ../elm2.4/src/reply.c    Tue Nov 10 15:20:29 1992
  1064. --- src/reply.c    Thu Dec 10 20:45:38 1992
  1065. ***************
  1066. *** 1,8 ****
  1067.   
  1068. ! static char rcsid[] = "@(#)$Id: reply.c,v 5.4 1992/11/07 20:05:52 syd Exp $";
  1069.   
  1070.   /*******************************************************************************
  1071. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  1072.    *
  1073.    *            Copyright (c) 1988-1992 USENET Community Trust
  1074.    *            Copyright (c) 1986,1987 Dave Taylor
  1075. --- 1,8 ----
  1076.   
  1077. ! static char rcsid[] = "@(#)$Id: reply.c,v 5.6 1992/12/11 01:45:04 syd Exp $";
  1078.   
  1079.   /*******************************************************************************
  1080. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  1081.    *
  1082.    *            Copyright (c) 1988-1992 USENET Community Trust
  1083.    *            Copyright (c) 1986,1987 Dave Taylor
  1084. ***************
  1085. *** 14,19 ****
  1086. --- 14,29 ----
  1087.    *
  1088.    *******************************************************************************
  1089.    * $Log: reply.c,v $
  1090. +  * Revision 5.6  1992/12/11  01:45:04  syd
  1091. +  * remove sys/types.h include, it is now included by defs.h
  1092. +  * and this routine includes defs.h or indirectly includes defs.h
  1093. +  * From: Syd
  1094. +  *
  1095. +  * Revision 5.5  1992/11/26  00:46:50  syd
  1096. +  * Fix how errno is used so err is inited and used instead
  1097. +  * as errno gets overwritten by print system call
  1098. +  * From: Syd
  1099. +  *
  1100.    * Revision 5.4  1992/11/07  20:05:52  syd
  1101.    * change to use header_cmp to allow for linear white space around the colon
  1102.    * From: Syd
  1103. ***************
  1104. *** 46,52 ****
  1105.   #endif
  1106.   
  1107.   #ifndef BSD
  1108. - #  include <sys/types.h>
  1109.   # ifndef VMS
  1110.   #  include <sys/utsname.h>
  1111.   # endif
  1112. --- 56,61 ----
  1113. ***************
  1114. *** 167,183 ****
  1115.   
  1116.       char ret_address[SLEN], buf[SLEN], new_address[SLEN],
  1117.        address[SLEN], comment[SLEN];
  1118. !     int  lines, iindex, line_pending = 0, line_len;
  1119.   
  1120.       /** First off, get to the first line of the message desired **/
  1121.   
  1122.       if (fseek(mailfile, headers[current-1]->offset, 0) == -1) {
  1123.       dprint(1,(debugfile,"Error: seek %ld resulted in errno %s (%s)\n", 
  1124. !          headers[current-1]->offset, error_description(errno), 
  1125.            "get_and_expand_everyone"));
  1126.       error2(catgets(elm_msg_cat, ElmSet, ElmSeekFailedFile,
  1127.           "ELM [seek] couldn't read %d bytes into file (%s)."),
  1128. !         headers[current-1]->offset, error_description(errno));
  1129.       return;
  1130.       }
  1131.    
  1132. --- 176,193 ----
  1133.   
  1134.       char ret_address[SLEN], buf[SLEN], new_address[SLEN],
  1135.        address[SLEN], comment[SLEN];
  1136. !     int  lines, iindex, line_pending = 0, line_len, err;
  1137.   
  1138.       /** First off, get to the first line of the message desired **/
  1139.   
  1140.       if (fseek(mailfile, headers[current-1]->offset, 0) == -1) {
  1141. +     err = errno;
  1142.       dprint(1,(debugfile,"Error: seek %ld resulted in errno %s (%s)\n", 
  1143. !          headers[current-1]->offset, error_description(err), 
  1144.            "get_and_expand_everyone"));
  1145.       error2(catgets(elm_msg_cat, ElmSet, ElmSeekFailedFile,
  1146.           "ELM [seek] couldn't read %d bytes into file (%s)."),
  1147. !         headers[current-1]->offset, error_description(err));
  1148.       return;
  1149.       }
  1150.    
  1151.  
  1152. Index: src/returnadd.c
  1153. Prereq: 5.3
  1154. *** ../elm2.4/src/returnadd.c    Tue Nov 10 15:20:29 1992
  1155. --- src/returnadd.c    Thu Dec 10 20:45:39 1992
  1156. ***************
  1157. *** 1,8 ****
  1158.   
  1159. ! static char rcsid[] = "@(#)$Id: returnadd.c,v 5.3 1992/11/07 20:05:52 syd Exp $";
  1160.   
  1161.   /*******************************************************************************
  1162. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1163.    *
  1164.    *            Copyright (c) 1988-1992 USENET Community Trust
  1165.    *            Copyright (c) 1986,1987 Dave Taylor
  1166. --- 1,8 ----
  1167.   
  1168. ! static char rcsid[] = "@(#)$Id: returnadd.c,v 5.5 1992/12/11 01:45:04 syd Exp $";
  1169.   
  1170.   /*******************************************************************************
  1171. !  *  The Elm Mail System  -  $Revision: 5.5 $   $State: Exp $
  1172.    *
  1173.    *            Copyright (c) 1988-1992 USENET Community Trust
  1174.    *            Copyright (c) 1986,1987 Dave Taylor
  1175. ***************
  1176. *** 14,19 ****
  1177. --- 14,29 ----
  1178.    *
  1179.    *******************************************************************************
  1180.    * $Log: returnadd.c,v $
  1181. +  * Revision 5.5  1992/12/11  01:45:04  syd
  1182. +  * remove sys/types.h include, it is now included by defs.h
  1183. +  * and this routine includes defs.h or indirectly includes defs.h
  1184. +  * From: Syd
  1185. +  *
  1186. +  * Revision 5.4  1992/11/26  00:46:50  syd
  1187. +  * Fix how errno is used so err is inited and used instead
  1188. +  * as errno gets overwritten by print system call
  1189. +  * From: Syd
  1190. +  *
  1191.    * Revision 5.3  1992/11/07  20:05:52  syd
  1192.    * change to use header_cmp to allow for linear white space around the colon
  1193.    * From: Syd
  1194. ***************
  1195. *** 38,45 ****
  1196.   #include "s_elm.h"
  1197.   
  1198.   #include <errno.h>
  1199. - #include <sys/types.h>
  1200.   #include <sys/stat.h>
  1201.   
  1202.   char *shift_lower();
  1203. --- 48,53 ----
  1204. ***************
  1205. *** 64,69 ****
  1206. --- 72,78 ----
  1207.   
  1208.       char mybuf[LONG_STRING];
  1209.       register char ok = 1, in_to = 0;
  1210. +     int  err;
  1211.   
  1212.       buffer[0] = '\0';
  1213.   
  1214. ***************
  1215. *** 78,90 ****
  1216.         return;
  1217.       }
  1218.           if (fseek(mailfile, headers[msgnum]->offset, 0) == -1) {
  1219.           dprint(1, (debugfile, 
  1220.               "Error: seek %ld bytes into file hit errno %s (%s)", 
  1221. !             headers[msgnum]->offset, error_description(errno), 
  1222.               "get_existing_address"));
  1223.           error2(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoFlle,
  1224.              "Couldn't seek %ld bytes into file (%s)."),
  1225. !                headers[msgnum]->offset, error_description(errno));
  1226.           return;
  1227.           }
  1228.    
  1229. --- 87,100 ----
  1230.         return;
  1231.       }
  1232.           if (fseek(mailfile, headers[msgnum]->offset, 0) == -1) {
  1233. +         err = errno;
  1234.           dprint(1, (debugfile, 
  1235.               "Error: seek %ld bytes into file hit errno %s (%s)", 
  1236. !             headers[msgnum]->offset, error_description(err), 
  1237.               "get_existing_address"));
  1238.           error2(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoFlle,
  1239.              "Couldn't seek %ld bytes into file (%s)."),
  1240. !                headers[msgnum]->offset, error_description(err));
  1241.           return;
  1242.           }
  1243.    
  1244. ***************
  1245. *** 122,128 ****
  1246.       char buf[SLEN], name1[SLEN], name2[SLEN], lastname[SLEN];
  1247.       char hold_return[SLEN], alt_name2[SLEN], buf2[SLEN];
  1248.       int lines, len_buf, len_buf2, colon_offset, decnet_found;
  1249. !     int using_to = FALSE;
  1250.   
  1251.       /* now initialize all the char buffers [thanks Keith!] */
  1252.   
  1253. --- 132,138 ----
  1254.       char buf[SLEN], name1[SLEN], name2[SLEN], lastname[SLEN];
  1255.       char hold_return[SLEN], alt_name2[SLEN], buf2[SLEN];
  1256.       int lines, len_buf, len_buf2, colon_offset, decnet_found;
  1257. !     int using_to = FALSE, err;
  1258.   
  1259.       /* now initialize all the char buffers [thanks Keith!] */
  1260.   
  1261. ***************
  1262. *** 141,153 ****
  1263.       }
  1264.   
  1265.       if (fseek(mailfile, headers[msgnum]->offset, 0) == -1) {
  1266.         dprint(1, (debugfile,
  1267.           "Error: seek %ld bytes into file hit errno %s (%s)", 
  1268. !         headers[msgnum]->offset, error_description(errno), 
  1269.               "get_return"));
  1270.         error2(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoFlle,
  1271.           "Couldn't seek %ld bytes into file (%s)."),
  1272. !            headers[msgnum]->offset, error_description(errno));
  1273.         return(using_to);
  1274.       }
  1275.    
  1276. --- 151,164 ----
  1277.       }
  1278.   
  1279.       if (fseek(mailfile, headers[msgnum]->offset, 0) == -1) {
  1280. +       err = errno;
  1281.         dprint(1, (debugfile,
  1282.           "Error: seek %ld bytes into file hit errno %s (%s)", 
  1283. !         headers[msgnum]->offset, error_description(err), 
  1284.               "get_return"));
  1285.         error2(catgets(elm_msg_cat, ElmSet, ElmCouldntSeekBytesIntoFlle,
  1286.           "Couldn't seek %ld bytes into file (%s)."),
  1287. !            headers[msgnum]->offset, error_description(err));
  1288.         return(using_to);
  1289.       }
  1290.    
  1291.  
  1292. Index: src/savecopy.c
  1293. Prereq: 5.3
  1294. *** ../elm2.4/src/savecopy.c    Mon Nov  2 15:51:49 1992
  1295. --- src/savecopy.c    Wed Nov 25 19:47:12 1992
  1296. ***************
  1297. *** 1,8 ****
  1298.   
  1299. ! static char rcsid[] = "@(#)$Id: savecopy.c,v 5.3 1992/10/30 21:01:49 syd Exp $";
  1300.   
  1301.   /*******************************************************************************
  1302. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1303.    *
  1304.    *             Copyright (c) 1988-1992 USENET Community Trust
  1305.    *             Copyright (c) 1986,1987 Dave Taylor
  1306. --- 1,8 ----
  1307.   
  1308. ! static char rcsid[] = "@(#)$Id: savecopy.c,v 5.4 1992/11/26 00:46:50 syd Exp $";
  1309.   
  1310.   /*******************************************************************************
  1311. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  1312.    *
  1313.    *             Copyright (c) 1988-1992 USENET Community Trust
  1314.    *             Copyright (c) 1986,1987 Dave Taylor
  1315. ***************
  1316. *** 14,19 ****
  1317. --- 14,24 ----
  1318.    *
  1319.    *******************************************************************************
  1320.    * $Log: savecopy.c,v $
  1321. +  * Revision 5.4  1992/11/26  00:46:50  syd
  1322. +  * Fix how errno is used so err is inited and used instead
  1323. +  * as errno gets overwritten by print system call
  1324. +  * From: Syd
  1325. +  *
  1326.    * Revision 5.3  1992/10/30  21:01:49  syd
  1327.    * More changes to folder creation confirmation
  1328.    * From: Larry Philps <larryp@sco.COM>
  1329. ***************
  1330. *** 79,84 ****
  1331. --- 84,90 ----
  1332.             ch;
  1333.       register int
  1334.            is_ordinary_file;
  1335. +     int  err;
  1336.     
  1337.   
  1338.       /* presume copy_file is okay as is for now */
  1339. ***************
  1340. *** 213,223 ****
  1341.           }
  1342.       }
  1343.   
  1344. !     if ((errno = can_open(savename, "a"))) {
  1345.         dprint(2, (debugfile,
  1346.         "Error: attempt to autosave to a file that can't be appended to!\n"));
  1347.         dprint(2, (debugfile, "\tfilename = \"%s\"\n", savename));
  1348. !       dprint(2, (debugfile, "** %s **\n", error_description(errno)));
  1349.   
  1350.         /* Lets try sent_mail before giving up */
  1351.         if(strcmp(sent_mail, savename) == 0) {
  1352. --- 219,229 ----
  1353.           }
  1354.       }
  1355.   
  1356. !     if ((err = can_open(savename, "a"))) {
  1357.         dprint(2, (debugfile,
  1358.         "Error: attempt to autosave to a file that can't be appended to!\n"));
  1359.         dprint(2, (debugfile, "\tfilename = \"%s\"\n", savename));
  1360. !       dprint(2, (debugfile, "** %s **\n", error_description(err)));
  1361.   
  1362.         /* Lets try sent_mail before giving up */
  1363.         if(strcmp(sent_mail, savename) == 0) {
  1364. ***************
  1365. *** 228,238 ****
  1366.           return(FALSE);
  1367.         }
  1368.   
  1369. !       if ((errno = can_open(sent_mail, "a"))) {
  1370.           dprint(2, (debugfile,
  1371.         "Error: attempt to autosave to a file that can't be appended to!\n"));
  1372.           dprint(2, (debugfile, "\tfilename = \"%s\"\n", sent_mail));
  1373. !         dprint(2, (debugfile, "** %s **\n", error_description(errno)));
  1374.           error2(catgets(elm_msg_cat, ElmSet, ElmCannotSaveToNorSent,
  1375.               "Cannot save to %s nor to \"sent\" folder %s!"),
  1376.               savename, sent_mail);
  1377. --- 234,244 ----
  1378.           return(FALSE);
  1379.         }
  1380.   
  1381. !       if ((err = can_open(sent_mail, "a"))) {
  1382.           dprint(2, (debugfile,
  1383.         "Error: attempt to autosave to a file that can't be appended to!\n"));
  1384.           dprint(2, (debugfile, "\tfilename = \"%s\"\n", sent_mail));
  1385. !         dprint(2, (debugfile, "** %s **\n", error_description(err)));
  1386.           error2(catgets(elm_msg_cat, ElmSet, ElmCannotSaveToNorSent,
  1387.               "Cannot save to %s nor to \"sent\" folder %s!"),
  1388.               savename, sent_mail);
  1389. ***************
  1390. *** 255,264 ****
  1391.   
  1392.       /* Now add file with message as handed to mailer */
  1393.       if ((message = fopen(filename, "r")) == NULL) {
  1394.         fclose(save);
  1395.         dprint(1, (debugfile,
  1396.            "Error: Couldn't read folder %s (save_copy)\n", filename));
  1397. !       dprint(1, (debugfile, "** %s **\n", error_description(errno)));
  1398.         error1(catgets(elm_msg_cat, ElmSet, ElmCouldntReadFolder,
  1399.           "Couldn't read folder %s!"), filename);
  1400.         sleep(3);
  1401. --- 261,271 ----
  1402.   
  1403.       /* Now add file with message as handed to mailer */
  1404.       if ((message = fopen(filename, "r")) == NULL) {
  1405. +       err = errno;
  1406.         fclose(save);
  1407.         dprint(1, (debugfile,
  1408.            "Error: Couldn't read folder %s (save_copy)\n", filename));
  1409. !       dprint(1, (debugfile, "** %s **\n", error_description(err)));
  1410.         error1(catgets(elm_msg_cat, ElmSet, ElmCouldntReadFolder,
  1411.           "Couldn't read folder %s!"), filename);
  1412.         sleep(3);
  1413.  
  1414. Index: src/showmsg.c
  1415. Prereq: 5.6
  1416. *** ../elm2.4/src/showmsg.c    Tue Nov 17 14:11:05 1992
  1417. --- src/showmsg.c    Sun Dec  6 23:29:17 1992
  1418. ***************
  1419. *** 1,8 ****
  1420.   
  1421. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 5.6 1992/11/15 01:29:37 syd Exp $";
  1422.   
  1423.   /*******************************************************************************
  1424. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  1425.    *
  1426.    *             Copyright (c) 1988-1992 USENET Community Trust
  1427.    *             Copyright (c) 1986,1987 Dave Taylor
  1428. --- 1,8 ----
  1429.   
  1430. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 5.9 1992/12/07 04:29:12 syd Exp $";
  1431.   
  1432.   /*******************************************************************************
  1433. !  *  The Elm Mail System  -  $Revision: 5.9 $   $State: Exp $
  1434.    *
  1435.    *             Copyright (c) 1988-1992 USENET Community Trust
  1436.    *             Copyright (c) 1986,1987 Dave Taylor
  1437. ***************
  1438. *** 14,19 ****
  1439. --- 14,33 ----
  1440.    *
  1441.    *******************************************************************************
  1442.    * $Log: showmsg.c,v $
  1443. +  * Revision 5.9  1992/12/07  04:29:12  syd
  1444. +  * add missing err declare
  1445. +  * From: Syd
  1446. +  *
  1447. +  * Revision 5.8  1992/11/26  01:46:26  syd
  1448. +  * add Decode option to copy_message, convert copy_message to
  1449. +  * use bit or for options.
  1450. +  * From: Syd and bjoerns@stud.cs.uit.no (Bjoern Stabell)
  1451. +  *
  1452. +  * Revision 5.7  1992/11/26  00:46:50  syd
  1453. +  * Fix how errno is used so err is inited and used instead
  1454. +  * as errno gets overwritten by print system call
  1455. +  * From: Syd
  1456. +  *
  1457.    * Revision 5.6  1992/11/15  01:29:37  syd
  1458.    * Clear the screen before displaying MIME:
  1459.    * From: marius@rhi.hi.is (Marius Olafsson)
  1460. ***************
  1461. *** 103,109 ****
  1462.           padding = 0,            /*   counter  */
  1463.           builtin = FALSE,            /* our pager? */
  1464.           val = 0,                /* return val */
  1465. !         buf_len;                /* line length */
  1466.       struct header_rec *current_header = headers[number-1];
  1467.   #ifdef    SIGTSTP
  1468.       SIGHAND_TYPE    (*oldstop)(), (*oldcont)();
  1469. --- 117,124 ----
  1470.           padding = 0,            /*   counter  */
  1471.           builtin = FALSE,            /* our pager? */
  1472.           val = 0,                /* return val */
  1473. !         buf_len,                /* line length */
  1474. !         err;                /* place holder for errno */
  1475.       struct header_rec *current_header = headers[number-1];
  1476.   #ifdef    SIGTSTP
  1477.       SIGHAND_TYPE    (*oldstop)(), (*oldcont)();
  1478. ***************
  1479. *** 142,148 ****
  1480.            (current_header->status & MIME_NOTPLAIN)) &&
  1481.           !getenv("NOMETAMAIL") ) {
  1482.           char fname[STRING], Cmd[SLEN], line[VERY_LONG_STRING];
  1483. !         int code;
  1484.           long lines = current_header->lines;
  1485.           FILE *fpout;
  1486.   
  1487. --- 157,163 ----
  1488.            (current_header->status & MIME_NOTPLAIN)) &&
  1489.           !getenv("NOMETAMAIL") ) {
  1490.           char fname[STRING], Cmd[SLEN], line[VERY_LONG_STRING];
  1491. !         int code, err;
  1492.           long lines = current_header->lines;
  1493.           FILE *fpout;
  1494.   
  1495. ***************
  1496. *** 149,155 ****
  1497.           if (fseek(mailfile, current_header->offset, 0) != -1) {
  1498.           sprintf(fname, "%semm.%d.%d", temp_dir, getpid(), getuid());
  1499.           if ((fpout = fopen(fname, "w")) != NULL) {
  1500. !             copy_message("", fpout, FALSE, FALSE, FALSE, FALSE, FALSE);
  1501.               (void) fclose (fpout);
  1502.               sprintf(Cmd, "metamail -p -z -m Elm %s", fname);
  1503.                     ClearScreen();
  1504. --- 164,170 ----
  1505.           if (fseek(mailfile, current_header->offset, 0) != -1) {
  1506.           sprintf(fname, "%semm.%d.%d", temp_dir, getpid(), getuid());
  1507.           if ((fpout = fopen(fname, "w")) != NULL) {
  1508. !             copy_message("", fpout, CM_DECODE);
  1509.               (void) fclose (fpout);
  1510.               sprintf(Cmd, "metamail -p -z -m Elm %s", fname);
  1511.                     ClearScreen();
  1512. ***************
  1513. *** 167,178 ****
  1514.   #endif
  1515.   
  1516.       if (fseek(mailfile, current_header->offset, 0) == -1) {
  1517.         dprint(1, (debugfile,
  1518.             "Error: seek %d bytes into file, errno %s (show_message)\n",
  1519. !           current_header->offset, error_description(errno)));
  1520.         error2(catgets(elm_msg_cat, ElmSet, ElmSeekFailedFile,
  1521.             "ELM [seek] couldn't read %d bytes into file (%s)."),
  1522. !           current_header->offset, error_description(errno));    
  1523.         return(val);
  1524.       }
  1525.       if(current_header->encrypted)
  1526. --- 182,194 ----
  1527.   #endif
  1528.   
  1529.       if (fseek(mailfile, current_header->offset, 0) == -1) {
  1530. +       err = errno;
  1531.         dprint(1, (debugfile,
  1532.             "Error: seek %d bytes into file, errno %s (show_message)\n",
  1533. !           current_header->offset, error_description(err)));
  1534.         error2(catgets(elm_msg_cat, ElmSet, ElmSeekFailedFile,
  1535.             "ELM [seek] couldn't read %d bytes into file (%s)."),
  1536. !           current_header->offset, error_description(err));    
  1537.         return(val);
  1538.       }
  1539.       if(current_header->encrypted)
  1540. ***************
  1541. *** 192,202 ****
  1542.         /* create pipe for external pager and fork */
  1543.   
  1544.         if(pipe(pipe_fd) == -1) {
  1545.           dprint(1, (debugfile, "Error: pipe failed, errno %s (show_msg)\n",
  1546. !           error_description(errno)));
  1547.           error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerPipe,
  1548.             "Could not prepare for external pager(pipe()-%s)."),
  1549. !           error_description(errno));    
  1550.           Raw(ON);
  1551.           return(val);
  1552.         }
  1553. --- 208,219 ----
  1554.         /* create pipe for external pager and fork */
  1555.   
  1556.         if(pipe(pipe_fd) == -1) {
  1557. +         err = errno;
  1558.           dprint(1, (debugfile, "Error: pipe failed, errno %s (show_msg)\n",
  1559. !           error_description(err)));
  1560.           error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerPipe,
  1561.             "Could not prepare for external pager(pipe()-%s)."),
  1562. !           error_description(err));    
  1563.           Raw(ON);
  1564.           return(val);
  1565.         }
  1566. ***************
  1567. *** 203,213 ****
  1568.   
  1569.         if((fork_ret = fork()) == -1) {
  1570.   
  1571.           dprint(1, (debugfile, "Error: fork failed, errno %s (show_msg)\n",
  1572. !           error_description(errno)));
  1573.           error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerFork,
  1574.             "Could not prepare for external pager(fork()-%s)."),
  1575. !           error_description(errno));    
  1576.           Raw(ON);
  1577.           return(val);
  1578.   
  1579. --- 220,231 ----
  1580.   
  1581.         if((fork_ret = fork()) == -1) {
  1582.   
  1583. +         err = errno;
  1584.           dprint(1, (debugfile, "Error: fork failed, errno %s (show_msg)\n",
  1585. !           error_description(err)));
  1586.           error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerFork,
  1587.             "Could not prepare for external pager(fork()-%s)."),
  1588. !           error_description(err));    
  1589.           Raw(ON);
  1590.           return(val);
  1591.   
  1592. ***************
  1593. *** 220,243 ****
  1594.           close(pipe_fd[1]);
  1595.           close(fileno(stdin));
  1596.           if((new_pipe_fd = dup(pipe_fd[0])) == -1) {
  1597.             dprint(1, (debugfile, "Error: dup failed, errno %s (show_msg)\n",
  1598. !         error_description(errno)));
  1599.             error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerDup,
  1600.               "Could not prepare for external pager(dup()-%s)."),
  1601. !         error_description(errno));    
  1602. !           _exit(errno);
  1603.           }
  1604.           close(pipe_fd[0]);    /* original pipe fd no longer needed */
  1605.   
  1606.           /* use stdio on new pipe fd */
  1607.           if(fdopen(new_pipe_fd, "r") == NULL) {
  1608.             dprint(1,
  1609.           (debugfile, "Error: child fdopen failed, errno %s (show_msg)\n",
  1610. !         error_description(errno)));
  1611.             error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerChildFdopen,
  1612.           "Could not prepare for external pager(child fdopen()-%s)."),
  1613. !         error_description(errno));    
  1614. !           _exit(errno);
  1615.           }
  1616.   
  1617.           /* now execute pager and exit */
  1618. --- 238,263 ----
  1619.           close(pipe_fd[1]);
  1620.           close(fileno(stdin));
  1621.           if((new_pipe_fd = dup(pipe_fd[0])) == -1) {
  1622. +           err = errno;
  1623.             dprint(1, (debugfile, "Error: dup failed, errno %s (show_msg)\n",
  1624. !         error_description(err)));
  1625.             error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerDup,
  1626.               "Could not prepare for external pager(dup()-%s)."),
  1627. !         error_description(err));    
  1628. !           _exit(err);
  1629.           }
  1630.           close(pipe_fd[0]);    /* original pipe fd no longer needed */
  1631.   
  1632.           /* use stdio on new pipe fd */
  1633.           if(fdopen(new_pipe_fd, "r") == NULL) {
  1634. +           err = errno;
  1635.             dprint(1,
  1636.           (debugfile, "Error: child fdopen failed, errno %s (show_msg)\n",
  1637. !         error_description(err)));
  1638.             error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerChildFdopen,
  1639.           "Could not prepare for external pager(child fdopen()-%s)."),
  1640. !         error_description(err));    
  1641. !           _exit(err);
  1642.           }
  1643.   
  1644.           /* now execute pager and exit */
  1645. ***************
  1646. *** 256,267 ****
  1647.         close(pipe_fd[0]);
  1648.   
  1649.         if((pipe_wr_fp = fdopen(pipe_fd[1], "w")) == NULL) {
  1650.           dprint(1,
  1651.             (debugfile, "Error: parent fdopen failed, errno %s (show_msg)\n",
  1652. !           error_description(errno)));
  1653.           error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerParentFdopen,
  1654.             "Could not prepare for external pager(parent fdopen()-%s)."),
  1655. !           error_description(errno));    
  1656.   
  1657.           /* Failure - must close pipe and wait for child */
  1658.           close(pipe_fd[1]);
  1659. --- 276,288 ----
  1660.         close(pipe_fd[0]);
  1661.   
  1662.         if((pipe_wr_fp = fdopen(pipe_fd[1], "w")) == NULL) {
  1663. +         err = errno;
  1664.           dprint(1,
  1665.             (debugfile, "Error: parent fdopen failed, errno %s (show_msg)\n",
  1666. !           error_description(err)));
  1667.           error1(catgets(elm_msg_cat, ElmSet, ElmPreparePagerParentFdopen,
  1668.             "Could not prepare for external pager(parent fdopen()-%s)."),
  1669. !           error_description(err));    
  1670.   
  1671.           /* Failure - must close pipe and wait for child */
  1672.           close(pipe_fd[1]);
  1673.  
  1674. Index: src/showmsg_c.c
  1675. Prereq: 5.2
  1676. *** ../elm2.4/src/showmsg_c.c    Tue Nov 10 15:20:30 1992
  1677. --- src/showmsg_c.c    Wed Nov 25 19:46:45 1992
  1678. ***************
  1679. *** 1,8 ****
  1680.   
  1681. ! static char rcsid[] = "@(#)$Id: showmsg_c.c,v 5.2 1992/11/07 19:37:21 syd Exp $";
  1682.   
  1683.   /*******************************************************************************
  1684. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  1685.    *
  1686.    *            Copyright (c) 1988-1992 USENET Community Trust
  1687.    *            Copyright (c) 1986,1987 Dave Taylor
  1688. --- 1,8 ----
  1689.   
  1690. ! static char rcsid[] = "@(#)$Id: showmsg_c.c,v 5.3 1992/11/26 00:46:13 syd Exp $";
  1691.   
  1692.   /*******************************************************************************
  1693. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1694.    *
  1695.    *            Copyright (c) 1988-1992 USENET Community Trust
  1696.    *            Copyright (c) 1986,1987 Dave Taylor
  1697. ***************
  1698. *** 14,19 ****
  1699. --- 14,24 ----
  1700.    *
  1701.    *******************************************************************************
  1702.    * $Log: showmsg_c.c,v $
  1703. +  * Revision 5.3  1992/11/26  00:46:13  syd
  1704. +  * changes to first change screen back (Raw off) and then issue final
  1705. +  * error message.
  1706. +  * From: Syd
  1707. +  *
  1708.    * Revision 5.2  1992/11/07  19:37:21  syd
  1709.    * Enhanced printing support.  Added "-I" to readmsg to
  1710.    * suppress spurious diagnostic messages.
  1711. ***************
  1712. *** 243,249 ****
  1713.   
  1714.           case 'X' : put_cmd_name(catgets(elm_msg_cat, ElmSet, ElmQuickExit,
  1715.                   "Quick Exit"), TRUE);
  1716. !                leave();
  1717.                  break;
  1718.   
  1719.           case 'x' : put_cmd_name(catgets(elm_msg_cat, ElmSet, ElmExit, "Exit"), TRUE);
  1720. --- 248,254 ----
  1721.   
  1722.           case 'X' : put_cmd_name(catgets(elm_msg_cat, ElmSet, ElmQuickExit,
  1723.                   "Quick Exit"), TRUE);
  1724. !                leave(0);
  1725.                  break;
  1726.   
  1727.           case 'x' : put_cmd_name(catgets(elm_msg_cat, ElmSet, ElmExit, "Exit"), TRUE);
  1728.  
  1729. Index: src/signals.c
  1730. Prereq: 5.3
  1731. *** ../elm2.4/src/signals.c    Tue Oct 27 11:17:32 1992
  1732. --- src/signals.c    Thu Dec 10 21:40:04 1992
  1733. ***************
  1734. *** 1,8 ****
  1735.   
  1736. ! static char rcsid[] = "@(#)$Id: signals.c,v 5.3 1992/10/27 01:43:40 syd Exp $";
  1737.   
  1738.   /*******************************************************************************
  1739. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1740.    *
  1741.    *            Copyright (c) 1988-1992 USENET Community Trust
  1742.    *            Copyright (c) 1986,1987 Dave Taylor
  1743. --- 1,8 ----
  1744.   
  1745. ! static char rcsid[] = "@(#)$Id: signals.c,v 5.6 1992/12/11 02:39:53 syd Exp $";
  1746.   
  1747.   /*******************************************************************************
  1748. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  1749.    *
  1750.    *            Copyright (c) 1988-1992 USENET Community Trust
  1751.    *            Copyright (c) 1986,1987 Dave Taylor
  1752. ***************
  1753. *** 14,19 ****
  1754. --- 14,32 ----
  1755.    *
  1756.    *******************************************************************************
  1757.    * $Log: signals.c,v $
  1758. +  * Revision 5.6  1992/12/11  02:39:53  syd
  1759. +  * A try at making USR? not loose mailbox
  1760. +  *
  1761. +  * Revision 5.5  1992/12/07  02:41:21  syd
  1762. +  * This implements the use of SIGUSR1 and SIGUSR2 as discussed on the
  1763. +  * mailing list recently, and adds them to the documentation.
  1764. +  * From: scs@lokkur.dexter.mi.us (Steve Simmons)
  1765. +  *
  1766. +  * Revision 5.4  1992/11/26  00:46:13  syd
  1767. +  * changes to first change screen back (Raw off) and then issue final
  1768. +  * error message.
  1769. +  * From: Syd
  1770. +  *
  1771.    * Revision 5.3  1992/10/27  01:43:40  syd
  1772.    * Move posix_signal to lib directory
  1773.    * From: tom@osf.org
  1774. ***************
  1775. *** 43,49 ****
  1776.   quit_signal(sig)
  1777.   {
  1778.       dprint(1, (debugfile, "\n\n** Received SIGQUIT **\n\n\n\n"));
  1779. !     leave();
  1780.   }
  1781.   
  1782.   SIGHAND_TYPE
  1783. --- 56,62 ----
  1784.   quit_signal(sig)
  1785.   {
  1786.       dprint(1, (debugfile, "\n\n** Received SIGQUIT **\n\n\n\n"));
  1787. !     leave(0);
  1788.   }
  1789.   
  1790.   SIGHAND_TYPE
  1791. ***************
  1792. *** 50,56 ****
  1793.   hup_signal(sig)
  1794.   {
  1795.       dprint(1, (debugfile, "\n\n** Received SIGHUP **\n\n\n\n"));
  1796. !     leave();
  1797.   }
  1798.   
  1799.   SIGHAND_TYPE
  1800. --- 63,69 ----
  1801.   hup_signal(sig)
  1802.   {
  1803.       dprint(1, (debugfile, "\n\n** Received SIGHUP **\n\n\n\n"));
  1804. !     leave(0);
  1805.   }
  1806.   
  1807.   SIGHAND_TYPE
  1808. ***************
  1809. *** 57,70 ****
  1810.   term_signal(sig) 
  1811.   {
  1812.       dprint(1, (debugfile, "\n\n** Received SIGTERM **\n\n\n\n"));
  1813. !     leave();
  1814.   }
  1815.   
  1816.   SIGHAND_TYPE
  1817.   ill_signal(sig)
  1818.   {
  1819.       dprint(1, (debugfile, "\n\n** Received SIGILL **\n\n\n\n"));
  1820. !     PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmIllegalInstructionSignal,
  1821.           "\n\nIllegal Instruction signal!\n\n"));
  1822.       emergency_exit();
  1823.   }
  1824. --- 70,85 ----
  1825.   term_signal(sig) 
  1826.   {
  1827.       dprint(1, (debugfile, "\n\n** Received SIGTERM **\n\n\n\n"));
  1828. !     leave(0);
  1829.   }
  1830.   
  1831.   SIGHAND_TYPE
  1832.   ill_signal(sig)
  1833.   {
  1834. +     MoveCursor(LINES,0);
  1835. +     Raw(OFF);
  1836.       dprint(1, (debugfile, "\n\n** Received SIGILL **\n\n\n\n"));
  1837. !     printf(catgets(elm_msg_cat, ElmSet, ElmIllegalInstructionSignal,
  1838.           "\n\nIllegal Instruction signal!\n\n"));
  1839.       emergency_exit();
  1840.   }
  1841. ***************
  1842. *** 72,79 ****
  1843.   SIGHAND_TYPE
  1844.   fpe_signal(sig)  
  1845.   {
  1846.       dprint(1, (debugfile, "\n\n** Received SIGFPE **\n\n\n\n"));
  1847. !     PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmFloatingPointSignal,
  1848.           "\n\nFloating Point Exception signal!\n\n"));
  1849.       emergency_exit();
  1850.   }
  1851. --- 87,96 ----
  1852.   SIGHAND_TYPE
  1853.   fpe_signal(sig)  
  1854.   {
  1855. +     MoveCursor(LINES,0);
  1856. +     Raw(OFF);
  1857.       dprint(1, (debugfile, "\n\n** Received SIGFPE **\n\n\n\n"));
  1858. !     printf(catgets(elm_msg_cat, ElmSet, ElmFloatingPointSignal,
  1859.           "\n\nFloating Point Exception signal!\n\n"));
  1860.       emergency_exit();
  1861.   }
  1862. ***************
  1863. *** 81,88 ****
  1864.   SIGHAND_TYPE
  1865.   bus_signal(sig)
  1866.   {
  1867.       dprint(1, (debugfile, "\n\n** Received SIGBUS **\n\n\n\n"));
  1868. !     PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmBusErrorSignal,
  1869.           "\n\nBus Error signal!\n\n"));
  1870.       emergency_exit();
  1871.   }
  1872. --- 98,107 ----
  1873.   SIGHAND_TYPE
  1874.   bus_signal(sig)
  1875.   {
  1876. +     MoveCursor(LINES,0);
  1877. +     Raw(OFF);
  1878.       dprint(1, (debugfile, "\n\n** Received SIGBUS **\n\n\n\n"));
  1879. !     printf(catgets(elm_msg_cat, ElmSet, ElmBusErrorSignal,
  1880.           "\n\nBus Error signal!\n\n"));
  1881.       emergency_exit();
  1882.   }
  1883. ***************
  1884. *** 90,97 ****
  1885.   SIGHAND_TYPE
  1886.   segv_signal(sig)
  1887.   {
  1888.       dprint(1, (debugfile,"\n\n** Received SIGSEGV **\n\n\n\n"));
  1889. !     PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmSegmentViolationSignal,
  1890.           "\n\nSegment Violation signal!\n\n"));
  1891.       emergency_exit();
  1892.   }
  1893. --- 109,118 ----
  1894.   SIGHAND_TYPE
  1895.   segv_signal(sig)
  1896.   {
  1897. +     MoveCursor(LINES,0);
  1898. +     Raw(OFF);
  1899.       dprint(1, (debugfile,"\n\n** Received SIGSEGV **\n\n\n\n"));
  1900. !     printf(catgets(elm_msg_cat, ElmSet, ElmSegmentViolationSignal,
  1901.           "\n\nSegment Violation signal!\n\n"));
  1902.       emergency_exit();
  1903.   }
  1904. ***************
  1905. *** 176,178 ****
  1906. --- 197,221 ----
  1907.       resize_screen = 1;
  1908.   }
  1909.   #endif
  1910. + SIGHAND_TYPE
  1911. + usr1_signal(sig)
  1912. + {
  1913. +     dprint(1, (debugfile, "\n\n** Received SIGUSR1 **\n\n\n\n"));
  1914. +     question_me = FALSE;
  1915. +     while ( leave_mbox(TRUE, FALSE, TRUE) == -1)
  1916. +         newmbox(cur_folder, TRUE);
  1917. +     leave(0);
  1918. + }
  1919. + SIGHAND_TYPE
  1920. + usr2_signal(sig)
  1921. + {
  1922. +     dprint(1, (debugfile, "\n\n** Received SIGUSR2 **\n\n\n\n"));
  1923. +     question_me = FALSE;
  1924. +     while ( leave_mbox(TRUE, FALSE, TRUE) == -1)
  1925. +         newmbox(cur_folder, TRUE);
  1926. +     quit(FALSE);
  1927. + }
  1928.  
  1929. Index: src/syscall.c
  1930. Prereq: 5.3
  1931. *** ../elm2.4/src/syscall.c    Tue Nov 10 15:20:30 1992
  1932. --- src/syscall.c    Thu Dec 10 21:05:26 1992
  1933. ***************
  1934. *** 1,8 ****
  1935.   
  1936. ! static char rcsid[] = "@(#)$Id: syscall.c,v 5.3 1992/11/07 20:45:39 syd Exp $";
  1937.   
  1938.   /*******************************************************************************
  1939. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  1940.    *
  1941.    *            Copyright (c) 1988-1992 USENET Community Trust
  1942.    *            Copyright (c) 1986,1987 Dave Taylor
  1943. --- 1,8 ----
  1944.   
  1945. ! static char rcsid[] = "@(#)$Id: syscall.c,v 5.5 1992/12/11 02:05:26 syd Exp $";
  1946.   
  1947.   /*******************************************************************************
  1948. !  *  The Elm Mail System  -  $Revision: 5.5 $   $State: Exp $
  1949.    *
  1950.    *            Copyright (c) 1988-1992 USENET Community Trust
  1951.    *            Copyright (c) 1986,1987 Dave Taylor
  1952. ***************
  1953. *** 14,19 ****
  1954. --- 14,29 ----
  1955.    *
  1956.    *******************************************************************************
  1957.    * $Log: syscall.c,v $
  1958. +  * Revision 5.5  1992/12/11  02:05:26  syd
  1959. +  * List_folder knew only about '=' but nothing about the rest
  1960. +  * of [+=%] as one would have expected.
  1961. +  * From: Jukka Antero Ukkonen <ukkonen@venus.csc.fi>
  1962. +  *
  1963. +  * Revision 5.4  1992/12/11  01:58:50  syd
  1964. +  * Allow for use from restricted shell by putting SHELL=/bin/sh in the
  1965. +  * environment of spawned mail transport program.
  1966. +  * From: chip@tct.com (Chip Salzenberg)
  1967. +  *
  1968.    * Revision 5.3  1992/11/07  20:45:39  syd
  1969.    * add no tite flag on options that should not use ti/te
  1970.    * Hack by Syd
  1971. ***************
  1972. *** 122,127 ****
  1973. --- 132,142 ----
  1974.                   "shell" instead of "/bin/sh" for the
  1975.                   shell escape.
  1976.   
  1977. +         SY_ENV_SHELL    When set, put "SHELL=[name-of-shell]" in
  1978. +                 the child's environment.  This hack makes
  1979. +                 mail transport programs work right even
  1980. +                 for users with restricted shells.
  1981.           SY_ENAB_SIGHUP    When set, we will set SIGHUP, SIGTSTP, and
  1982.                   SIGCONT to their default behaviour during
  1983.                   the shell escape rather than ignoring them.
  1984. ***************
  1985. *** 234,239 ****
  1986. --- 249,264 ----
  1987.         (void) signal(SIGCONT, (options&SY_ENAB_SIGHUP) ? SIG_DFL : SIG_IGN);
  1988.   #endif
  1989.   
  1990. +       /* Optionally override the SHELL environment variable. */
  1991. +       if (options&SY_ENV_SHELL) {
  1992. +         static char sheq[] = "SHELL=";
  1993. +         char *p = malloc(sizeof(sheq) + strlen(sh));
  1994. +         if (p) {
  1995. +           sprintf(p, "%s%s", sheq, sh);
  1996. +           putenv(p);
  1997. +         }
  1998. +       }
  1999.         /* Go for it. */
  2000.         if (string) execl(sh, argv_zero(sh), "-c", string, (char *) 0);
  2001.         else execl(sh, argv_zero(sh), (char *) 0);
  2002. ***************
  2003. *** 497,503 ****
  2004.       }
  2005.       else
  2006.       {
  2007. !       if ( *wildcard == '=' )
  2008.         {
  2009.           sprintf(buffer, "cd %s;ls -C %s", folders, wildcard+1);
  2010.           printf(catgets(elm_msg_cat, ElmSet, ElmFoldersWhichMatch,
  2011. --- 522,529 ----
  2012.       }
  2013.       else
  2014.       {
  2015. !       if (( *wildcard == '=' ) ||
  2016. !           ( *wildcard == '+' ) || ( *wildcard == '%' ))
  2017.         {
  2018.           sprintf(buffer, "cd %s;ls -C %s", folders, wildcard+1);
  2019.           printf(catgets(elm_msg_cat, ElmSet, ElmFoldersWhichMatch,
  2020.  
  2021. Index: src/utils.c
  2022. Prereq: 5.1
  2023. *** ../elm2.4/src/utils.c    Sat Oct  3 18:59:22 1992
  2024. --- src/utils.c    Thu Dec 10 20:45:39 1992
  2025. ***************
  2026. *** 1,8 ****
  2027.   
  2028. ! static char rcsid[] = "@(#)$Id: utils.c,v 5.1 1992/10/03 22:58:40 syd Exp $";
  2029.   
  2030.   /*******************************************************************************
  2031. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  2032.    *
  2033.    *            Copyright (c) 1988-1992 USENET Community Trust
  2034.    *            Copyright (c) 1986,1987 Dave Taylor
  2035. --- 1,8 ----
  2036.   
  2037. ! static char rcsid[] = "@(#)$Id: utils.c,v 5.4 1992/12/11 01:45:04 syd Exp $";
  2038.   
  2039.   /*******************************************************************************
  2040. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  2041.    *
  2042.    *            Copyright (c) 1988-1992 USENET Community Trust
  2043.    *            Copyright (c) 1986,1987 Dave Taylor
  2044. ***************
  2045. *** 14,19 ****
  2046. --- 14,33 ----
  2047.    *
  2048.    *******************************************************************************
  2049.    * $Log: utils.c,v $
  2050. +  * Revision 5.4  1992/12/11  01:45:04  syd
  2051. +  * remove sys/types.h include, it is now included by defs.h
  2052. +  * and this routine includes defs.h or indirectly includes defs.h
  2053. +  * From: Syd
  2054. +  *
  2055. +  * Revision 5.3  1992/12/07  04:30:37  syd
  2056. +  * fix missing brace on do_cursor calls
  2057. +  * From: Syd
  2058. +  *
  2059. +  * Revision 5.2  1992/11/26  00:46:13  syd
  2060. +  * changes to first change screen back (Raw off) and then issue final
  2061. +  * error message.
  2062. +  * From: Syd
  2063. +  *
  2064.    * Revision 5.1  1992/10/03  22:58:40  syd
  2065.    * Initial checkin as of 2.4 Release at PL0
  2066.    *
  2067. ***************
  2068. *** 26,32 ****
  2069.   
  2070.   #include "headers.h"
  2071.   #include "s_elm.h"
  2072. - #include <sys/types.h>
  2073.   #include <sys/stat.h>
  2074.   #include <ctype.h>
  2075.   #include <errno.h>
  2076. --- 40,45 ----
  2077. ***************
  2078. *** 133,138 ****
  2079. --- 146,153 ----
  2080.   {
  2081.       /** used in dramatic cases when we must leave without altering
  2082.           ANYTHING about the system... **/
  2083. +     int do_cursor = RawState();
  2084.       char *mk_lockname();
  2085.   
  2086.       dprint(1, (debugfile,
  2087. ***************
  2088. *** 146,159 ****
  2089.       dprint(1, (debugfile,
  2090.            "     The composition file : %s%s%d\n", temp_dir, temp_file, getpid()));
  2091.   
  2092. -     Raw(OFF);
  2093.       if (cursor_control)  transmit_functions(OFF);
  2094.       if (hp_terminal)     softkeys_off();
  2095.   
  2096. !     if (cursor_control)
  2097.         MoveCursor(LINES, 0);
  2098.   
  2099. !     PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmEmergencyExitTaken,
  2100.           "\nEmergency exit taken! All temp files intact!\n\n"));
  2101.   
  2102.       exit(1);
  2103. --- 161,175 ----
  2104.       dprint(1, (debugfile,
  2105.            "     The composition file : %s%s%d\n", temp_dir, temp_file, getpid()));
  2106.   
  2107.       if (cursor_control)  transmit_functions(OFF);
  2108.       if (hp_terminal)     softkeys_off();
  2109.   
  2110. !     if (do_cursor) {
  2111. !       Raw(OFF);
  2112.         MoveCursor(LINES, 0);
  2113. +       }
  2114.   
  2115. !     printf(catgets(elm_msg_cat, ElmSet, ElmEmergencyExitTaken,
  2116.           "\nEmergency exit taken! All temp files intact!\n\n"));
  2117.   
  2118.       exit(1);
  2119. ***************
  2120. *** 161,170 ****
  2121.   rm_temps_exit()
  2122.   {
  2123.         char buffer[SLEN];
  2124.         PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmWriteFailedExitingIntact,
  2125.            "\nWrite to temp file failed, exiting leaving mailbox intact!\n\n"));
  2126.         dprint(2, (debugfile, "\nrm_temps_exit, deleteing temp files\n"));
  2127. !       Raw(OFF);
  2128.         if (cursor_control)  transmit_functions(OFF);
  2129.         if (hp_terminal)     softkeys_off();
  2130.         sprintf(buffer,"%s%d",temp_file, getpid());  /* editor buffer */
  2131. --- 177,188 ----
  2132.   rm_temps_exit()
  2133.   {
  2134.         char buffer[SLEN];
  2135. +       int do_cursor = RawState();
  2136.         PutLine0(LINES, 0, catgets(elm_msg_cat, ElmSet, ElmWriteFailedExitingIntact,
  2137.            "\nWrite to temp file failed, exiting leaving mailbox intact!\n\n"));
  2138.         dprint(2, (debugfile, "\nrm_temps_exit, deleteing temp files\n"));
  2139.         if (cursor_control)  transmit_functions(OFF);
  2140.         if (hp_terminal)     softkeys_off();
  2141.         sprintf(buffer,"%s%d",temp_file, getpid());  /* editor buffer */
  2142. ***************
  2143. *** 173,181 ****
  2144.           (void) unlink(cur_tempfolder);
  2145.         }
  2146.         unlock();                               /* remove lock file if any */
  2147. !       if(!batch_only) {
  2148.           MoveCursor(LINES,0);
  2149.           NewLine();
  2150.         }
  2151.         exit(1);
  2152.   }
  2153. --- 191,200 ----
  2154.           (void) unlink(cur_tempfolder);
  2155.         }
  2156.         unlock();                               /* remove lock file if any */
  2157. !       if(do_cursor) {
  2158.           MoveCursor(LINES,0);
  2159.           NewLine();
  2160. +         Raw(OFF);
  2161.         }
  2162.         exit(1);
  2163.   }
  2164. ***************
  2165. *** 187,196 ****
  2166.   int val;    /* not used, placeholder for signal catching! */
  2167.   {
  2168.       char buffer[SLEN];
  2169.   
  2170.       dprint(2, (debugfile, "\nLeaving mailer normally (leave)\n"));
  2171.   
  2172. -     Raw(OFF);
  2173.       if (cursor_control)  transmit_functions(OFF);
  2174.       if (hp_terminal)     softkeys_off();
  2175.   
  2176. --- 206,215 ----
  2177.   int val;    /* not used, placeholder for signal catching! */
  2178.   {
  2179.       char buffer[SLEN];
  2180. +     int do_cursor = RawState();
  2181.   
  2182.       dprint(2, (debugfile, "\nLeaving mailer normally (leave)\n"));
  2183.   
  2184.       if (cursor_control)  transmit_functions(OFF);
  2185.       if (hp_terminal)     softkeys_off();
  2186.   
  2187. ***************
  2188. *** 203,211 ****
  2189.   
  2190.       unlock();                /* remove lock file if any */
  2191.   
  2192. !     if(!batch_only) {
  2193.         MoveCursor(LINES,0);
  2194.         NewLine();
  2195.       }
  2196.   
  2197.       exit(0);
  2198. --- 222,231 ----
  2199.   
  2200.       unlock();                /* remove lock file if any */
  2201.   
  2202. !     if (do_cursor) {
  2203.         MoveCursor(LINES,0);
  2204.         NewLine();
  2205. +       Raw(OFF);
  2206.       }
  2207.   
  2208.       exit(0);
  2209. ***************
  2210. *** 218,227 ****
  2211.           temp mail file and one already exists!!
  2212.       **/
  2213.       char buffer[SLEN];
  2214.   
  2215.       dprint(2, (debugfile, "\nLeaving mailer quietly (silently_exit)\n"));
  2216.   
  2217. -     Raw(OFF);
  2218.       if (cursor_control)  transmit_functions(OFF);
  2219.       if (hp_terminal)     softkeys_off();
  2220.   
  2221. --- 238,247 ----
  2222.           temp mail file and one already exists!!
  2223.       **/
  2224.       char buffer[SLEN];
  2225. +     int do_cursor = RawState();
  2226.   
  2227.       dprint(2, (debugfile, "\nLeaving mailer quietly (silently_exit)\n"));
  2228.   
  2229.       if (cursor_control)  transmit_functions(OFF);
  2230.       if (hp_terminal)     softkeys_off();
  2231.   
  2232. ***************
  2233. *** 228,235 ****
  2234.       sprintf(buffer,"%s%s%d", temp_dir, temp_file, getpid());  /* editor buffer */
  2235.       (void) unlink(buffer);
  2236.   
  2237. !     MoveCursor(LINES,0);
  2238. !     NewLine();
  2239.   
  2240.       exit(0);
  2241.   }
  2242. --- 248,258 ----
  2243.       sprintf(buffer,"%s%s%d", temp_dir, temp_file, getpid());  /* editor buffer */
  2244.       (void) unlink(buffer);
  2245.   
  2246. !     if (do_cursor) {
  2247. !       MoveCursor(LINES,0);
  2248. !       NewLine();
  2249. !       Raw(OFF);
  2250. !     }
  2251.   
  2252.       exit(0);
  2253.   }
  2254. ***************
  2255. *** 243,253 ****
  2256.       /** same as leave routine, but don't disturb lock file **/
  2257.   
  2258.       char buffer[SLEN];
  2259.   
  2260.           dprint(3, (debugfile,
  2261.           "\nLeaving mailer due to presence of lock file (leave_locked)\n"));
  2262.   
  2263. -     Raw(OFF);
  2264.       if (cursor_control)  transmit_functions(OFF);
  2265.       if (hp_terminal)     softkeys_off();
  2266.   
  2267. --- 266,276 ----
  2268.       /** same as leave routine, but don't disturb lock file **/
  2269.   
  2270.       char buffer[SLEN];
  2271. +         int do_cursor = RawState();
  2272.   
  2273.           dprint(3, (debugfile,
  2274.           "\nLeaving mailer due to presence of lock file (leave_locked)\n"));
  2275.   
  2276.       if (cursor_control)  transmit_functions(OFF);
  2277.       if (hp_terminal)     softkeys_off();
  2278.   
  2279. ***************
  2280. *** 256,263 ****
  2281.   
  2282.       (void) unlink(cur_tempfolder);            /* temp mailbox */
  2283.   
  2284. !     MoveCursor(LINES,0);
  2285. !     NewLine();
  2286.       exit(0);
  2287.   }
  2288.   #endif
  2289. --- 279,290 ----
  2290.   
  2291.       (void) unlink(cur_tempfolder);            /* temp mailbox */
  2292.   
  2293. !     if (do_cursor) {
  2294. !       MoveCursor(LINES,0);
  2295. !       NewLine();
  2296. !       Raw(OFF);
  2297. !     }
  2298.       exit(0);
  2299.   }
  2300.   #endif
  2301.  
  2302. Index: src/wildcards.c
  2303. Prereq: 5.3
  2304. *** ../elm2.4/src/wildcards.c    Mon Nov  2 15:51:50 1992
  2305. --- src/wildcards.c    Thu Dec 10 20:45:40 1992
  2306. ***************
  2307. *** 1,8 ****
  2308.   
  2309. ! static char rcsid[] = "@(#)$Id: wildcards.c,v 5.3 1992/10/31 18:59:24 syd Exp $";
  2310.   
  2311.   /*******************************************************************************
  2312. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  2313.    *
  2314.    *            Copyright (c) 1988-1992 USENET Community Trust
  2315.    *            Copyright (c) 1986,1987 Dave Taylor
  2316. --- 1,8 ----
  2317.   
  2318. ! static char rcsid[] = "@(#)$Id: wildcards.c,v 5.5 1992/12/11 01:45:04 syd Exp $";
  2319.   
  2320.   /*******************************************************************************
  2321. !  *  The Elm Mail System  -  $Revision: 5.5 $   $State: Exp $
  2322.    *
  2323.    *            Copyright (c) 1988-1992 USENET Community Trust
  2324.    *            Copyright (c) 1986,1987 Dave Taylor
  2325. ***************
  2326. *** 14,19 ****
  2327. --- 14,28 ----
  2328.    *
  2329.    *******************************************************************************
  2330.    * $Log: wildcards.c,v $
  2331. +  * Revision 5.5  1992/12/11  01:45:04  syd
  2332. +  * remove sys/types.h include, it is now included by defs.h
  2333. +  * and this routine includes defs.h or indirectly includes defs.h
  2334. +  * From: Syd
  2335. +  *
  2336. +  * Revision 5.4  1992/12/07  05:00:39  syd
  2337. +  * Add include of sys/types.h for time_t
  2338. +  * From: Syd
  2339. +  *
  2340.    * Revision 5.3  1992/10/31  18:59:24  syd
  2341.    * Prevent index underflow when wildchar is in first three chars of string
  2342.    * From: Syd via note from gwh@dogmatix.inmos.co.uk
  2343. ***************
  2344. *** 33,40 ****
  2345.    * Wildcard handling module for elm.
  2346.    */
  2347.   
  2348. ! # include    <stdio.h>
  2349. ! # include    "defs.h"
  2350.   
  2351.   /*
  2352.    * Common wildcards.  Note that we count space as a wildcard, for
  2353. --- 42,49 ----
  2354.    * Wildcard handling module for elm.
  2355.    */
  2356.   
  2357. ! #include <stdio.h>
  2358. ! #include "defs.h"
  2359.   
  2360.   /*
  2361.    * Common wildcards.  Note that we count space as a wildcard, for
  2362.  
  2363. Index: utils/arepdaem.c
  2364. Prereq: 5.5
  2365. *** ../elm2.4/utils/arepdaem.c    Tue Nov 10 15:20:30 1992
  2366. --- utils/arepdaem.c    Thu Dec 10 20:45:40 1992
  2367. ***************
  2368. *** 1,8 ****
  2369.   
  2370. ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 5.5 1992/11/07 20:05:52 syd Exp $";
  2371.   
  2372.   /*******************************************************************************
  2373. !  *  The Elm Mail System  -  $Revision: 5.5 $   $State: Exp $
  2374.    *
  2375.    *             Copyright (c) 1988-1992 USENET Community Trust
  2376.    *             Copyright (c) 1986,1987 Dave Taylor
  2377. --- 1,8 ----
  2378.   
  2379. ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 5.9 1992/12/11 01:45:04 syd Exp $";
  2380.   
  2381.   /*******************************************************************************
  2382. !  *  The Elm Mail System  -  $Revision: 5.9 $   $State: Exp $
  2383.    *
  2384.    *             Copyright (c) 1988-1992 USENET Community Trust
  2385.    *             Copyright (c) 1986,1987 Dave Taylor
  2386. ***************
  2387. *** 14,19 ****
  2388. --- 14,37 ----
  2389.    *
  2390.    *******************************************************************************
  2391.    * $Log: arepdaem.c,v $
  2392. +  * Revision 5.9  1992/12/11  01:45:04  syd
  2393. +  * remove sys/types.h include, it is now included by defs.h
  2394. +  * and this routine includes defs.h or indirectly includes defs.h
  2395. +  * From: Syd
  2396. +  *
  2397. +  * Revision 5.8  1992/12/07  04:21:58  syd
  2398. +  * add missing err declares
  2399. +  * From: Syd
  2400. +  *
  2401. +  * Revision 5.7  1992/12/07  03:00:27  syd
  2402. +  * Fix long -> time_t
  2403. +  * From: Syd
  2404. +  *
  2405. +  * Revision 5.6  1992/11/26  00:46:50  syd
  2406. +  * Fix how errno is used so err is inited and used instead
  2407. +  * as errno gets overwritten by print system call
  2408. +  * From: Syd
  2409. +  *
  2410.    * Revision 5.5  1992/11/07  20:05:52  syd
  2411.    * change to use header_cmp to allow for linear white space around the colon
  2412.    * From: Syd
  2413. ***************
  2414. *** 75,83 ****
  2415.   # include <time.h>
  2416.   #endif
  2417.   
  2418. - #include <sys/types.h>
  2419.   #include <sys/stat.h>
  2420.   #include <ctype.h>
  2421.   
  2422.   #define arep_lock_file    "LCK..arep"
  2423.   
  2424. --- 93,101 ----
  2425.   # include <time.h>
  2426.   #endif
  2427.   
  2428.   #include <sys/stat.h>
  2429.   #include <ctype.h>
  2430. + #include <errno.h>
  2431.   
  2432.   #define arep_lock_file    "LCK..arep"
  2433.   
  2434. ***************
  2435. *** 121,126 ****
  2436. --- 139,146 ----
  2437.   
  2438.   SIGHAND_TYPE    term_signal();
  2439.   
  2440. + extern int errno;    /* system error number! */
  2441.   main()
  2442.   {
  2443.       long size;
  2444. ***************
  2445. *** 442,457 ****
  2446.       /** return the number of bytes in the specified file.  This
  2447.           is to check to see if new mail has arrived....  **/
  2448.   
  2449. !     int ok = 1;
  2450. !     extern int errno;    /* system error number! */
  2451.       struct stat buffer;
  2452.   
  2453.       if (stat(name, &buffer) != 0)
  2454.         if (errno != 2) {
  2455.          unlock();
  2456.          exit(MCfprintf(stderr, catgets(elm_msg_cat, ArepdaemSet,
  2457.            ArepdaemErrFstat, "Error %d attempting fstat on %s"),
  2458. !            errno, name));
  2459.         }
  2460.         else
  2461.           ok = 0;
  2462. --- 462,477 ----
  2463.       /** return the number of bytes in the specified file.  This
  2464.           is to check to see if new mail has arrived....  **/
  2465.   
  2466. !     int ok = 1, err;
  2467.       struct stat buffer;
  2468.   
  2469.       if (stat(name, &buffer) != 0)
  2470.         if (errno != 2) {
  2471. +        err = errno;
  2472.          unlock();
  2473.          exit(MCfprintf(stderr, catgets(elm_msg_cat, ArepdaemSet,
  2474.            ArepdaemErrFstat, "Error %d attempting fstat on %s"),
  2475. !            err, name));
  2476.         }
  2477.         else
  2478.           ok = 0;
  2479. ***************
  2480. *** 466,481 ****
  2481.       /** return the modification time in the specified file.
  2482.           This is to check to see if autoreply has changed....  **/
  2483.   
  2484. !     int ok = 1;
  2485. !     extern int errno;    /* system error number! */
  2486.       struct stat buffer;
  2487.   
  2488.       if (stat(name, &buffer) != 0)
  2489.         if (errno != 2) {
  2490.          unlock();
  2491.          exit(MCfprintf(stderr, catgets(elm_msg_cat, ArepdaemSet,
  2492.            ArepdaemErrFstat, "Error %d attempting fstat on %s"),
  2493. !            errno, name));
  2494.         }
  2495.         else
  2496.           ok = 0;
  2497. --- 486,501 ----
  2498.       /** return the modification time in the specified file.
  2499.           This is to check to see if autoreply has changed....  **/
  2500.   
  2501. !     int ok = 1, err;
  2502.       struct stat buffer;
  2503.   
  2504.       if (stat(name, &buffer) != 0)
  2505.         if (errno != 2) {
  2506. +        err = errno;
  2507.          unlock();
  2508.          exit(MCfprintf(stderr, catgets(elm_msg_cat, ArepdaemSet,
  2509.            ArepdaemErrFstat, "Error %d attempting fstat on %s"),
  2510. !            err, name));
  2511.         }
  2512.         else
  2513.           ok = 0;
  2514. ***************
  2515. *** 508,514 ****
  2516.       **/
  2517.   
  2518.       struct tm *thetime;
  2519. !     long      clock;
  2520.   #ifndef    _POSIX_SOURCE
  2521.       struct tm *localtime(); 
  2522.       time_t     time();
  2523. --- 528,534 ----
  2524.       **/
  2525.   
  2526.       struct tm *thetime;
  2527. !     time_t      clock;
  2528.   #ifndef    _POSIX_SOURCE
  2529.       struct tm *localtime(); 
  2530.       time_t     time();
  2531. ***************
  2532. *** 559,566 ****
  2533.   {
  2534.       char lock_name[SLEN];        /* name of lock file  */
  2535.       char pid_buffer[SHORT];
  2536. !     int pid, create_fd;
  2537. !     extern int errno;    /* system error number! */
  2538.   
  2539.       sprintf(lock_name, "%s/%s", LOCK_DIR, arep_lock_file);
  2540.   #ifdef PIDCHECK
  2541. --- 579,585 ----
  2542.   {
  2543.       char lock_name[SLEN];        /* name of lock file  */
  2544.       char pid_buffer[SHORT];
  2545. !     int pid, create_fd, err;
  2546.   
  2547.       sprintf(lock_name, "%s/%s", LOCK_DIR, arep_lock_file);
  2548.   #ifdef PIDCHECK
  2549. ***************
  2550. *** 575,584 ****
  2551.             if (kill(pid, 0)) {
  2552.               close(create_fd);
  2553.               if (unlink(lock_name) != 0) {
  2554.               MCprintf(catgets(elm_msg_cat, ArepdaemSet,
  2555.               ArepdaemErrUnlink,
  2556.               "Error %s\n\ttrying to unlink file %s (%s)\n"), 
  2557. !             error_description(errno), lock_name, "lock");
  2558.               return(0);
  2559.               }
  2560.             } else /* kill pid check succeeded */
  2561. --- 594,604 ----
  2562.             if (kill(pid, 0)) {
  2563.               close(create_fd);
  2564.               if (unlink(lock_name) != 0) {
  2565. +             err = errno;
  2566.               MCprintf(catgets(elm_msg_cat, ArepdaemSet,
  2567.               ArepdaemErrUnlink,
  2568.               "Error %s\n\ttrying to unlink file %s (%s)\n"), 
  2569. !             error_description(err), lock_name, "lock");
  2570.               return(0);
  2571.               }
  2572.             } else /* kill pid check succeeded */
  2573.  
  2574. Index: utils/autoreply.c
  2575. Prereq: 5.1
  2576. *** ../elm2.4/utils/autoreply.c    Sat Oct  3 20:46:58 1992
  2577. --- utils/autoreply.c    Thu Dec 10 20:45:41 1992
  2578. ***************
  2579. *** 1,8 ****
  2580.   
  2581. ! static char rcsid[] = "@(#)$Id: autoreply.c,v 5.1 1992/10/04 00:46:45 syd Exp $";
  2582.   
  2583.   /*******************************************************************************
  2584. !  *  The Elm Mail System  -  $Revision: 5.1 $   $State: Exp $
  2585.    *
  2586.    *             Copyright (c) 1988-1992 USENET Community Trust
  2587.    *             Copyright (c) 1986,1987 Dave Taylor
  2588. --- 1,8 ----
  2589.   
  2590. ! static char rcsid[] = "@(#)$Id: autoreply.c,v 5.2 1992/12/11 01:45:04 syd Exp $";
  2591.   
  2592.   /*******************************************************************************
  2593. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  2594.    *
  2595.    *             Copyright (c) 1988-1992 USENET Community Trust
  2596.    *             Copyright (c) 1986,1987 Dave Taylor
  2597. ***************
  2598. *** 14,19 ****
  2599. --- 14,24 ----
  2600.    *
  2601.    *******************************************************************************
  2602.    * $Log: autoreply.c,v $
  2603. +  * Revision 5.2  1992/12/11  01:45:04  syd
  2604. +  * remove sys/types.h include, it is now included by defs.h
  2605. +  * and this routine includes defs.h or indirectly includes defs.h
  2606. +  * From: Syd
  2607. +  *
  2608.    * Revision 5.1  1992/10/04  00:46:45  syd
  2609.    * Initial checkin as of 2.4 Release at PL0
  2610.    *
  2611. ***************
  2612. *** 33,39 ****
  2613.   
  2614.   #include "elmutil.h"
  2615.   #include "s_autoreply.h"
  2616. - #include <sys/types.h>
  2617.   #include <sys/stat.h>
  2618.   
  2619.   #ifdef PWDINSYS
  2620. --- 38,43 ----
  2621.  
  2622. Index: utils/from.c
  2623. Prereq: 5.3
  2624. *** ../elm2.4/utils/from.c    Tue Nov 10 15:20:30 1992
  2625. --- utils/from.c    Thu Dec 10 20:45:42 1992
  2626. ***************
  2627. *** 1,8 ****
  2628.   
  2629. ! static char rcsid[] = "@(#)$Id: from.c,v 5.3 1992/11/07 21:03:33 syd Exp $";
  2630.   
  2631.   /*******************************************************************************
  2632. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  2633.    *
  2634.    *             Copyright (c) 1988-1992 USENET Community Trust
  2635.    *             Copyright (c) 1986,1987 Dave Taylor
  2636. --- 1,8 ----
  2637.   
  2638. ! static char rcsid[] = "@(#)$Id: from.c,v 5.4 1992/12/11 01:45:04 syd Exp $";
  2639.   
  2640.   /*******************************************************************************
  2641. !  *  The Elm Mail System  -  $Revision: 5.4 $   $State: Exp $
  2642.    *
  2643.    *             Copyright (c) 1988-1992 USENET Community Trust
  2644.    *             Copyright (c) 1986,1987 Dave Taylor
  2645. ***************
  2646. *** 14,19 ****
  2647. --- 14,24 ----
  2648.    *
  2649.    *******************************************************************************
  2650.    * $Log: from.c,v $
  2651. +  * Revision 5.4  1992/12/11  01:45:04  syd
  2652. +  * remove sys/types.h include, it is now included by defs.h
  2653. +  * and this routine includes defs.h or indirectly includes defs.h
  2654. +  * From: Syd
  2655. +  *
  2656.    * Revision 5.3  1992/11/07  21:03:33  syd
  2657.    * fix typo
  2658.    *
  2659. ***************
  2660. *** 40,46 ****
  2661.   #else
  2662.   #  include <pwd.h>
  2663.   #endif
  2664. - #include <sys/types.h>
  2665.   #include <sys/stat.h>
  2666.   
  2667.   #define LINEFEED    (char) 10
  2668. --- 45,50 ----
  2669.  
  2670. Index: utils/newmail.c
  2671. Prereq: 5.6
  2672. *** ../elm2.4/utils/newmail.c    Tue Nov 17 15:21:03 1992
  2673. --- utils/newmail.c    Thu Dec 10 20:45:43 1992
  2674. ***************
  2675. *** 1,8 ****
  2676.   
  2677. ! static char rcsid[] = "@(#)$Id: newmail.c,v 5.6 1992/11/17 19:23:28 syd Exp $";
  2678.   
  2679.   /*******************************************************************************
  2680. !  *  The Elm Mail System  -  $Revision: 5.6 $   $State: Exp $
  2681.    *
  2682.    *             Copyright (c) 1988-1992 USENET Community Trust
  2683.    *             Copyright (c) 1986,1987 Dave Taylor
  2684. --- 1,8 ----
  2685.   
  2686. ! static char rcsid[] = "@(#)$Id: newmail.c,v 5.7 1992/12/11 01:45:04 syd Exp $";
  2687.   
  2688.   /*******************************************************************************
  2689. !  *  The Elm Mail System  -  $Revision: 5.7 $   $State: Exp $
  2690.    *
  2691.    *             Copyright (c) 1988-1992 USENET Community Trust
  2692.    *             Copyright (c) 1986,1987 Dave Taylor
  2693. ***************
  2694. *** 14,19 ****
  2695. --- 14,24 ----
  2696.    *
  2697.    *******************************************************************************
  2698.    * $Log: newmail.c,v $
  2699. +  * Revision 5.7  1992/12/11  01:45:04  syd
  2700. +  * remove sys/types.h include, it is now included by defs.h
  2701. +  * and this routine includes defs.h or indirectly includes defs.h
  2702. +  * From: Syd
  2703. +  *
  2704.    * Revision 5.6  1992/11/17  19:23:28  syd
  2705.    * add blank after priority to
  2706.    *
  2707. ***************
  2708. *** 93,99 ****
  2709.   #else
  2710.   #  include <pwd.h>
  2711.   #endif
  2712. - #include <sys/types.h>
  2713.   #include <sys/stat.h>
  2714.   
  2715.   #define LINEFEED        (char) 10
  2716. --- 98,103 ----
  2717.  
  2718. Index: utils/readmsg.c
  2719. Prereq: 5.2
  2720. *** ../elm2.4/utils/readmsg.c    Tue Nov 10 15:20:31 1992
  2721. --- utils/readmsg.c    Thu Dec 10 20:45:45 1992
  2722. ***************
  2723. *** 1,8 ****
  2724.   
  2725. ! static char rcsid[] = "@(#)$Id: readmsg.c,v 5.2 1992/11/07 19:37:21 syd Exp $";
  2726.   
  2727.   /*******************************************************************************
  2728. !  *  The Elm Mail System  -  $Revision: 5.2 $   $State: Exp $
  2729.    *
  2730.    *            Copyright (c) 1988-1992 USENET Community Trust
  2731.    *            Copyright (c) 1986,1987 Dave Taylor
  2732. --- 1,8 ----
  2733.   
  2734. ! static char rcsid[] = "@(#)$Id: readmsg.c,v 5.3 1992/12/11 01:45:04 syd Exp $";
  2735.   
  2736.   /*******************************************************************************
  2737. !  *  The Elm Mail System  -  $Revision: 5.3 $   $State: Exp $
  2738.    *
  2739.    *            Copyright (c) 1988-1992 USENET Community Trust
  2740.    *            Copyright (c) 1986,1987 Dave Taylor
  2741. ***************
  2742. *** 14,19 ****
  2743. --- 14,24 ----
  2744.    *
  2745.    *******************************************************************************
  2746.    * $Log: readmsg.c,v $
  2747. +  * Revision 5.3  1992/12/11  01:45:04  syd
  2748. +  * remove sys/types.h include, it is now included by defs.h
  2749. +  * and this routine includes defs.h or indirectly includes defs.h
  2750. +  * From: Syd
  2751. +  *
  2752.    * Revision 5.2  1992/11/07  19:37:21  syd
  2753.    * Enhanced printing support.  Added "-I" to readmsg to
  2754.    * suppress spurious diagnostic messages.
  2755. ***************
  2756. *** 80,86 ****
  2757.   
  2758.   #include "elmutil.h"
  2759.   #include "s_readmsg.h"
  2760. - #include <sys/types.h>
  2761.   #include <ctype.h>
  2762.   
  2763.   /** three defines for what level of headers to display **/
  2764. --- 85,90 ----
  2765.  
  2766. -- 
  2767. ========================================================================
  2768. Sydney S. Weinstein, CDP, CCP          Elm Coordinator - Current 2.4PL17
  2769. Datacomp Systems, Inc.                 Projected 3.0 Release: ??? ?,1994
  2770. syd@DSI.COM or dsinc!syd      Voice: (215) 947-9900, FAX: (215) 938-0235
  2771.