home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / elm.lzh / ELM / PATCH_1 < prev    next >
Text File  |  1991-01-11  |  46KB  |  1,437 lines

  1. diff -c -r elm.dist/config.h elm.new/config.h
  2. *** elm.dist/config.h    Sat Sep 15 14:45:00 1990
  3. --- elm.new/config.h    Tue Sep 11 20:27:00 1990
  4. ***************
  5. *** 159,172 ****
  6.   /* CONFIGURE_DATE
  7.    *    This symbol contains the last date that configure was run for elm -v output.
  8.    */
  9. ! #define        CONFIGURE_DATE    "Fri Jun 29 19:23:57 1990"
  10.   
  11.   /* ENABLE_CALENDAR:
  12.    *    This symbol, if defined, indicates that the calendar feature
  13.    *    should be supported.
  14.    */
  15. ! /* #define    ENABLE_CALENDAR    /**/
  16. ! #define dflt_calendar_file    "calendar"
  17.   
  18.   /* NEED_CUSERID:
  19.    *    This symbol, if defined, means to include our own cuserid().
  20. --- 159,172 ----
  21.   /* CONFIGURE_DATE
  22.    *    This symbol contains the last date that configure was run for elm -v output.
  23.    */
  24. ! #define        CONFIGURE_DATE    "Tue Sep 11 20:20:32 1990"
  25.   
  26.   /* ENABLE_CALENDAR:
  27.    *    This symbol, if defined, indicates that the calendar feature
  28.    *    should be supported.
  29.    */
  30. ! #define    ENABLE_CALENDAR        /**/
  31. ! #define dflt_calendar_file    ".calendar"
  32.   
  33.   /* NEED_CUSERID:
  34.    *    This symbol, if defined, means to include our own cuserid().
  35. ***************
  36. *** 415,427 ****
  37.    *    the /etc/passwd file in Berkeley format (name first thing, everything
  38.    *    up to first comma, with & replaced by capitalized login id, yuck).
  39.    */
  40.   /* USGNAMES:
  41.    *    This symbol, if defined, indicates that full names are stored in
  42.    *    the /etc/passwd file in USG format (everything after - and before ( is
  43.    *    the name).
  44.    */
  45.   #define    PASSNAMES     /*  (undef to take name from ~/.fullname) */
  46. ! #define    BERKNAMES    /* (that is, ":name,stuff:") */
  47.   /* #define    USGNAMES    /* (that is, ":stuff-name(stuff):") */
  48.   
  49.   /* XENIX:
  50. --- 415,437 ----
  51.    *    the /etc/passwd file in Berkeley format (name first thing, everything
  52.    *    up to first comma, with & replaced by capitalized login id, yuck).
  53.    */
  54. + /* OSKTOPNAMES:
  55. +  *    This symbol, if defined, indicates that full names are stored in
  56. +  *    the /etc/passwd file in OSK TOP format (name first thing, everything
  57. +  *    up to first colon, with & replaced by capitalized login id, yuck).
  58. +  */
  59.   /* USGNAMES:
  60.    *    This symbol, if defined, indicates that full names are stored in
  61.    *    the /etc/passwd file in USG format (everything after - and before ( is
  62.    *    the name).
  63. +  *
  64. +  *    OSKTOPNAMES:    OS-9/68k and TOP-Munich environment: use (and
  65. +  *            handle correctly) the user name from gecos-field
  66. +  *            in the password-file        (Ralf Schuettau)
  67.    */
  68.   #define    PASSNAMES     /*  (undef to take name from ~/.fullname) */
  69. ! /* #define    BERKNAMES    /* (that is, ":name,stuff:") */
  70. ! #define    OSKTOPNAMES    /* (that is, "name:stuff:") */
  71.   /* #define    USGNAMES    /* (that is, ":stuff-name(stuff):") */
  72.   
  73.   /* XENIX:
  74. diff -c -r elm.dist/hdrs/defs.h elm.new/hdrs/defs.h
  75. *** elm.dist/hdrs/defs.h    Sat Sep 15 14:44:00 1990
  76. --- elm.new/hdrs/defs.h    Tue Sep 11 20:33:00 1990
  77. ***************
  78. *** 37,43 ****
  79.   
  80.   
  81.   # define VERSION     "2.3"        /* Version number... */
  82. ! # define OVERSION    "(OS-9 1.01)"    /* my version number .. */
  83.   # define VERS_DATE    "May 1, 1990"    /* for elm -v option */
  84.   # define WHAT_STRING    \
  85.       "@(#) Version 2.3, USENET supported version, released May 1990"
  86. --- 37,43 ----
  87.   
  88.   
  89.   # define VERSION     "2.3"        /* Version number... */
  90. ! # define OVERSION    "(OS-9 1.10)"    /* my version number .. */
  91.   # define VERS_DATE    "May 1, 1990"    /* for elm -v option */
  92.   # define WHAT_STRING    \
  93.       "@(#) Version 2.3, USENET supported version, released May 1990"
  94. diff -c -r elm.dist/hdrs/patchlevel.h elm.new/hdrs/patchlevel.h
  95. *** elm.dist/hdrs/patchlevel.h    Sat Sep 15 14:41:00 1990
  96. --- elm.new/hdrs/patchlevel.h    Tue Sep 11 20:07:00 1990
  97. ***************
  98. *** 1,1 ****
  99. ! #define PATCHLEVEL 4
  100. --- 1,1 ----
  101. ! #define PATCHLEVEL 6
  102. diff -c -r elm.dist/src/addr_util.c elm.new/src/addr_util.c
  103. *** elm.dist/src/addr_util.c    Sat Sep 15 14:47:00 1990
  104. --- elm.new/src/addr_util.c    Tue Sep 11 20:50:00 1990
  105. ***************
  106. *** 161,168 ****
  107. --- 161,183 ----
  108.       return(firstcp);
  109.   
  110.   #else
  111. + #ifdef OSKTOPNAMES
  112. +     char *lastcp;
  113. +     /* The last character of the full name is the one preceding the first
  114. +      * ':'. If there is no ':', then the full name ends at the end of the
  115. +      * gcos field.
  116. +      */
  117. +      
  118. +     if(lastcp = index(gcos_field, ':'))
  119. +     *lastcp = '\0';
  120. +     return (gcos_field);
  121. + #else
  122.       /* use full gcos field */
  123.       return(gcos_field);
  124. + #endif
  125.   #endif
  126.   #endif
  127.   }
  128. diff -c -r elm.dist/src/aliaslib.c elm.new/src/aliaslib.c
  129. *** elm.dist/src/aliaslib.c    Sat Sep 15 14:43:00 1990
  130. --- elm.new/src/aliaslib.c    Tue Sep 11 20:50:00 1990
  131. ***************
  132. *** 1,8 ****
  133.   
  134. ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1.1.2 90/06/05 21:31:34 syd Exp $";
  135.   
  136.   /*******************************************************************************
  137. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  138.    *
  139.    *             Copyright (c) 1986, 1987 Dave Taylor
  140.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  141. --- 1,8 ----
  142.   
  143. ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1.1.4 90/08/02 21:57:53 syd Exp $";
  144.   
  145.   /*******************************************************************************
  146. !  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
  147.    *
  148.    *             Copyright (c) 1986, 1987 Dave Taylor
  149.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  150. ***************
  151. *** 14,19 ****
  152. --- 14,28 ----
  153.    *
  154.    *******************************************************************************
  155.    * $Log:    aliaslib.c,v $
  156. +  * Revision 4.1.1.4  90/08/02  21:57:53  syd
  157. +  * The newly introduced function 'stricmp' has a name conflict with a libc
  158. +  * function under SunOS 4.1.  Changed name to istrcmp.
  159. +  * From: scs@lokkur.dexter.mi.us (Steve Simmons)
  160. +  * 
  161. +  * Revision 4.1.1.3  90/07/12  23:18:17  syd
  162. +  * Make domain name checking case independent
  163. +  * From: Syd, reported by Steven Baur
  164. +  * 
  165.    * Revision 4.1.1.2  90/06/05  21:31:34  syd
  166.    * Fix now spurious error message for alias recursive expansion
  167.    * when alias lookup is on a string over 20 chars long.  If that
  168. ***************
  169. *** 282,288 ****
  170.   
  171.       loc = hash_it(word, size);
  172.   
  173. !     while (stricmp(word, table[loc].name) != 0) {
  174.         if (table[loc].name[0] == '\0')
  175.           return(-1);
  176.         loc = (loc + 1) % size;
  177. --- 291,297 ----
  178.   
  179.       loc = hash_it(word, size);
  180.   
  181. !     while (istrcmp(word, table[loc].name) != 0) {
  182.         if (table[loc].name[0] == '\0')
  183.           return(-1);
  184.         loc = (loc + 1) % size;
  185. ***************
  186. *** 292,298 ****
  187.   }
  188.   
  189.   int
  190. ! stricmp(s1,s2)
  191.   register char *s1, *s2;
  192.   {
  193.       /* case insensitive comparison */
  194. --- 301,307 ----
  195.   }
  196.   
  197.   int
  198. ! istrcmp(s1,s2)
  199.   register char *s1, *s2;
  200.   {
  201.       /* case insensitive comparison */
  202. ***************
  203. *** 306,311 ****
  204. --- 315,338 ----
  205.         ++s2;
  206.       }
  207.       /*NOTREACHED*/
  208. + }
  209. + int
  210. + strincmp(s1,s2,n)
  211. + register char *s1, *s2;
  212. + register int n;
  213. + {
  214. +     /* case insensitive comparison */
  215. +     register int d;
  216. +     while (--n >= 0) {
  217. +       d = ( isupper(*s1) ? tolower(*s1) : *s1 )
  218. +           - ( isupper(*s2) ? tolower(*s2) : *s2 ) ;
  219. +       if ( d != 0 || *s1 == '\0' || *s2 == '\0' )
  220. +         return d;
  221. +       ++s1;
  222. +       ++s2;
  223. +     }
  224. +     return(0);
  225.   }
  226.   
  227.   int
  228. diff -c -r elm.dist/src/curses.c elm.new/src/curses.c
  229. *** elm.dist/src/curses.c    Sat Sep 15 14:46:00 1990
  230. --- elm.new/src/curses.c    Tue Sep 11 20:50:00 1990
  231. ***************
  232. *** 1,8 ****
  233.   
  234. ! static char rcsid[] = "@(#)$Id: curses.c,v 4.1.1.2 90/06/26 20:09:09 syd Exp $";
  235.   
  236.   /*******************************************************************************
  237. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  238.    *
  239.    *             Copyright (c) 1986, 1987 Dave Taylor
  240.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  241. --- 1,8 ----
  242.   
  243. ! static char rcsid[] = "@(#)$Id: curses.c,v 4.1.1.3 90/07/12 20:18:02 syd Exp $";
  244.   
  245.   /*******************************************************************************
  246. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  247.    *
  248.    *             Copyright (c) 1986, 1987 Dave Taylor
  249.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  250. ***************
  251. *** 14,19 ****
  252. --- 14,23 ----
  253.    *
  254.    *******************************************************************************
  255.    * $Log:    curses.c,v $
  256. +  * Revision 4.1.1.3  90/07/12  20:18:02  syd
  257. +  * Be sure that output characters are not negative integers.
  258. +  * From: tct!chip@uunet.UU.NET (Chip Salzenberg)
  259. +  * 
  260.    * Revision 4.1.1.2  90/06/26  20:09:09  syd
  261.    * Add 8 bit support via ascii_ctype
  262.    * From: Robert Claeson <prc@erbe.se>
  263. ***************
  264. *** 653,658 ****
  265. --- 657,663 ----
  266.       static int wrappedlastchar = 0;
  267.       register int justwrapped, nt;
  268.   
  269. +     ch &= 0xFF;
  270.       justwrapped = 0;
  271.   
  272.       /* if return, just go to left column. */
  273. diff -c -r elm.dist/src/domains.c elm.new/src/domains.c
  274. *** elm.dist/src/domains.c    Sat Sep 15 14:43:00 1990
  275. --- elm.new/src/domains.c    Tue Sep 11 20:51:00 1990
  276. ***************
  277. *** 1,8 ****
  278.   
  279. ! static char rcsid[] = "@(#)$Id: domains.c,v 4.1 90/04/28 22:42:44 syd Exp $";
  280.   
  281.   /*******************************************************************************
  282. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  283.    *
  284.    *             Copyright (c) 1986, 1987 Dave Taylor
  285.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  286. --- 1,8 ----
  287.   
  288. ! static char rcsid[] = "@(#)$Id: domains.c,v 4.1.1.1 90/07/12 23:19:14 syd Exp $";
  289.   
  290.   /*******************************************************************************
  291. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  292.    *
  293.    *             Copyright (c) 1986, 1987 Dave Taylor
  294.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  295. ***************
  296. *** 14,19 ****
  297. --- 14,23 ----
  298.    *
  299.    *******************************************************************************
  300.    * $Log:    domains.c,v $
  301. +  * Revision 4.1.1.1  90/07/12  23:19:14  syd
  302. +  * Make domain name checking case independent
  303. +  * From: Syd, reported by Steven Baur
  304. +  * 
  305.    * Revision 4.1  90/04/28  22:42:44  syd
  306.    * checkin of Elm 2.3 as of Release PL0
  307.    * 
  308. ***************
  309. *** 184,190 ****
  310.       while (fgets(buffer, SLEN, domainfd) != NULL) {
  311.         if (buffer[0] == '#')                  /* skip comments */
  312.           continue;
  313. !       if (strncmp(buffer, mydomain, strlen(mydomain)) == 0) { /* match? */
  314.            matched++;    /* Gotcha!  Remember this momentous event! */
  315.            break;
  316.         }
  317. --- 188,194 ----
  318.       while (fgets(buffer, SLEN, domainfd) != NULL) {
  319.         if (buffer[0] == '#')                  /* skip comments */
  320.           continue;
  321. !       if (strincmp(buffer, mydomain, strlen(mydomain)) == 0) { /* match? */
  322.            matched++;    /* Gotcha!  Remember this momentous event! */
  323.            break;
  324.         }
  325. diff -c -r elm.dist/src/edit.c elm.new/src/edit.c
  326. *** elm.dist/src/edit.c    Sat Sep 15 14:42:00 1990
  327. --- elm.new/src/edit.c    Tue Sep 11 20:51:00 1990
  328. ***************
  329. *** 1,8 ****
  330.   
  331. ! static char rcsid[] = "@(#)$Id: edit.c,v 4.1 90/04/28 22:42:46 syd Exp $";
  332.   
  333.   /*******************************************************************************
  334. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  335.    *
  336.    *             Copyright (c) 1986, 1987 Dave Taylor
  337.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  338. --- 1,8 ----
  339.   
  340. ! static char rcsid[] = "@(#)$Id: edit.c,v 4.1.1.1 90/07/12 22:43:05 syd Exp $";
  341.   
  342.   /*******************************************************************************
  343. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  344.    *
  345.    *             Copyright (c) 1986, 1987 Dave Taylor
  346.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  347. ***************
  348. *** 14,19 ****
  349. --- 14,25 ----
  350.    *
  351.    *******************************************************************************
  352.    * $Log:    edit.c,v $
  353. +  * Revision 4.1.1.1  90/07/12  22:43:05  syd
  354. +  * Make it aware of the fact that we loose the cursor position on
  355. +  * some system calls, so set it far enough off an absolute move will
  356. +  * be done on the next cursor address, and then place it where we want it.
  357. +  * From: Syd, reported by Douglas Lamb
  358. +  * 
  359.    * Revision 4.1  90/04/28  22:42:46  syd
  360.    * checkin of Elm 2.3 as of Release PL0
  361.    * 
  362. ***************
  363. *** 78,83 ****
  364. --- 84,90 ----
  365.       }
  366.   
  367.       Raw(ON);
  368. +     SetXYLocation(0, 40);    /* a location not near the next request, so an absolute is used */
  369.   
  370.       if (folder_type == SPOOL) {    /* uh oh... now the toughie...  */
  371.   
  372. diff -c -r elm.dist/src/editmsg.c elm.new/src/editmsg.c
  373. *** elm.dist/src/editmsg.c    Sat Sep 15 14:46:00 1990
  374. --- elm.new/src/editmsg.c    Tue Sep 11 20:51:00 1990
  375. ***************
  376. *** 1,8 ****
  377.   
  378. ! static char rcsid[] = "@(#)$Id: editmsg.c,v 4.1.1.2 90/06/21 21:14:09 syd Exp $";
  379.   
  380.   /*******************************************************************************
  381. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  382.    *
  383.    *             Copyright (c) 1986, 1987 Dave Taylor
  384.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  385. --- 1,8 ----
  386.   
  387. ! static char rcsid[] = "@(#)$Id: editmsg.c,v 4.1.1.3 90/07/12 22:43:08 syd Exp $";
  388.   
  389.   /*******************************************************************************
  390. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  391.    *
  392.    *             Copyright (c) 1986, 1987 Dave Taylor
  393.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  394. ***************
  395. *** 14,19 ****
  396. --- 14,25 ----
  397.    *
  398.    *******************************************************************************
  399.    * $Log:    editmsg.c,v $
  400. +  * Revision 4.1.1.3  90/07/12  22:43:08  syd
  401. +  * Make it aware of the fact that we loose the cursor position on
  402. +  * some system calls, so set it far enough off an absolute move will
  403. +  * be done on the next cursor address, and then place it where we want it.
  404. +  * From: Syd, reported by Douglas Lamb
  405. +  * 
  406.    * Revision 4.1.1.2  90/06/21  21:14:09  syd
  407.    * Force Carriage return on return from editor, as column is lost
  408.    * From: Steve Cambell
  409. ***************
  410. *** 99,105 ****
  411.       if (old_raw == ON)
  412.          Raw(ON);
  413.   
  414. !     CarriageReturn();        /* don't know where we are, force col 0 */
  415.   
  416.       if (cursor_control)
  417.         transmit_functions(ON);        /* function keys are local */
  418. --- 105,112 ----
  419.       if (old_raw == ON)
  420.          Raw(ON);
  421.   
  422. !     SetXYLocation(0, 40);    /* a location not near the next request, so an absolute is used */
  423. !     MoveCursor(LINES, 0);    /* dont know where we are, force last row, col 0 */
  424.   
  425.       if (cursor_control)
  426.         transmit_functions(ON);        /* function keys are local */
  427. ***************
  428. *** 283,288 ****
  429. --- 290,297 ----
  430.                    sprintf(buffer, "~r %s%s.%d", temp_dir, temp_edit, getpid());
  431.                              read_in_file(edit_fd, (char *) buffer + 3, 0);
  432.                    (void) unlink((char *) buffer+3);
  433. +                  SetXYLocation(0, 40);    /* a location not near the next request, so an absolute is used */
  434. +                  MoveCursor(LINES, 0);    /* and go to a known location, last row col 0 */
  435.                  }
  436.                          goto more_input; 
  437.   
  438. ***************
  439. *** 295,300 ****
  440. --- 304,311 ----
  441.                            (void) system_call((char *) buffer+2, USER_SHELL, TRUE, TRUE);
  442.                  if (old_raw == ON)
  443.                     Raw(ON);
  444. +                SetXYLocation(0, 40);    /* a location not near the next request, so an absolute is used */
  445. +                MoveCursor(LINES, 0);    /* and go to a known location, last row col 0 */
  446.                      Write_to_screen(simple_continue, 0);
  447.                  goto more_input;
  448.   
  449. diff -c -r elm.dist/src/init.c elm.new/src/init.c
  450. *** elm.dist/src/init.c    Sat Sep 15 14:44:00 1990
  451. --- elm.new/src/init.c    Tue Sep 11 20:51:00 1990
  452. ***************
  453. *** 1,8 ****
  454.   
  455. ! static char rcsid[] = "@(#)$Id: init.c,v 4.1 90/04/28 22:43:15 syd Exp $";
  456.   
  457.   /*******************************************************************************
  458. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  459.    *
  460.    *             Copyright (c) 1986, 1987 Dave Taylor
  461.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  462. --- 1,8 ----
  463.   
  464. ! static char rcsid[] = "@(#)$Id: init.c,v 4.1.1.2 90/08/02 21:57:56 syd Exp $";
  465.   
  466.   /*******************************************************************************
  467. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  468.    *
  469.    *             Copyright (c) 1986, 1987 Dave Taylor
  470.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  471. ***************
  472. *** 14,19 ****
  473. --- 14,28 ----
  474.    *
  475.    *******************************************************************************
  476.    * $Log:    init.c,v $
  477. +  * Revision 4.1.1.2  90/08/02  21:57:56  syd
  478. +  * The newly introduced function 'stricmp' has a name conflict with a libc
  479. +  * function under SunOS 4.1.  Changed name to istrcmp.
  480. +  * From: scs@lokkur.dexter.mi.us (Steve Simmons)
  481. +  * 
  482. +  * Revision 4.1.1.1  90/07/12  23:19:17  syd
  483. +  * Make domain name checking case independent
  484. +  * From: Syd, reported by Steven Baur
  485. +  * 
  486.    * Revision 4.1  90/04/28  22:43:15  syd
  487.    * checkin of Elm 2.3 as of Release PL0
  488.    * 
  489. ***************
  490. *** 268,274 ****
  491.       hostlen = strlen(hostname);
  492.       domlen = strlen(hostdomain);
  493.       if (hostlen >= domlen) {
  494. !       if (strcmp(&hostname[hostlen - domlen], hostdomain) == 0)
  495.           strcpy(hostfullname, hostname);
  496.         else {
  497.           strcpy(hostfullname, hostname);
  498. --- 277,283 ----
  499.       hostlen = strlen(hostname);
  500.       domlen = strlen(hostdomain);
  501.       if (hostlen >= domlen) {
  502. !       if (istrcmp(&hostname[hostlen - domlen], hostdomain) == 0)
  503.           strcpy(hostfullname, hostname);
  504.         else {
  505.           strcpy(hostfullname, hostname);
  506. ***************
  507. *** 275,281 ****
  508.           strcat(hostfullname, hostdomain);
  509.         }
  510.       } else {
  511. !       if (strcmp(hostname, hostdomain + 1) == 0)
  512.           strcpy(hostfullname, hostname);
  513.         else {
  514.           strcpy(hostfullname, hostname);
  515. --- 284,290 ----
  516.           strcat(hostfullname, hostdomain);
  517.         }
  518.       } else {
  519. !       if (istrcmp(hostname, hostdomain + 1) == 0)
  520.           strcpy(hostfullname, hostname);
  521.         else {
  522.           strcpy(hostfullname, hostname);
  523. diff -c -r elm.dist/src/leavembox.c elm.new/src/leavembox.c
  524. *** elm.dist/src/leavembox.c    Sat Sep 15 14:46:00 1990
  525. --- elm.new/src/leavembox.c    Tue Sep 11 22:48:00 1990
  526. ***************
  527. *** 1,8 ****
  528.   
  529. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.3 90/06/21 22:51:52 syd Exp $";
  530.   
  531.   /*******************************************************************************
  532. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  533.    *
  534.    *             Copyright (c) 1986, 1987 Dave Taylor
  535.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  536. --- 1,8 ----
  537.   
  538. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.4 90/08/15 21:00:07 syd Exp $";
  539.   
  540.   /*******************************************************************************
  541. !  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
  542.    *
  543.    *             Copyright (c) 1986, 1987 Dave Taylor
  544.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  545. ***************
  546. *** 14,19 ****
  547. --- 14,23 ----
  548.    *
  549.    *******************************************************************************
  550.    * $Log:    leavembox.c,v $
  551. +  * Revision 4.1.1.4  90/08/15  21:00:07  syd
  552. +  * Change elm to not delete empty folders on a resync
  553. +  * From: Syd
  554. +  * 
  555.    * Revision 4.1.1.3  90/06/21  22:51:52  syd
  556.    * Add time.h to includes as some OSs include needed substructure only
  557.    * from time.h
  558. ***************
  559. *** 454,465 ****
  560.         }
  561.         dprint(2, (debugfile, "\n\n"));
  562.   
  563. !     } else if (folder_type == NON_SPOOL && !keep_empty_files) {
  564.   
  565.         /* i.e. if no messages were to be kept and this is not a spool
  566.          * folder and we aren't keeping empty non-spool folders,
  567.          * simply remove the old original folder and that's it!
  568.          */
  569.         (void)unlink(cur_folder);
  570.         return(1);
  571.       }
  572. --- 458,470 ----
  573.         }
  574.         dprint(2, (debugfile, "\n\n"));
  575.   
  576. !     } else if (folder_type == NON_SPOOL && !keep_empty_files && !resyncing) {
  577.   
  578.         /* i.e. if no messages were to be kept and this is not a spool
  579.          * folder and we aren't keeping empty non-spool folders,
  580.          * simply remove the old original folder and that's it!
  581.          */
  582. +       fclose(mailfile);           /* -hm (hint from hp...) */
  583.         (void)unlink(cur_folder);
  584.         return(1);
  585.       }
  586. ***************
  587. *** 535,541 ****
  588.         /* link or copy complete - remove temp keep file */
  589.         unlink(temp_keep_file);
  590.   
  591. !     } else if(folder_type == SPOOL || keep_empty_files) {
  592.   
  593.         /* if this is an empty spool file, or if this is an empty non spool 
  594.          * file and we keep empty non spool files (we always keep empty
  595. --- 540,546 ----
  596.         /* link or copy complete - remove temp keep file */
  597.         unlink(temp_keep_file);
  598.   
  599. !     } else if(folder_type == SPOOL || keep_empty_files || resyncing) {
  600.   
  601.         /* if this is an empty spool file, or if this is an empty non spool 
  602.          * file and we keep empty non spool files (we always keep empty
  603. diff -c -r elm.dist/src/mailmsg2.c elm.new/src/mailmsg2.c
  604. *** elm.dist/src/mailmsg2.c    Sat Sep 15 14:47:00 1990
  605. --- elm.new/src/mailmsg2.c    Tue Sep 11 20:51:00 1990
  606. ***************
  607. *** 1,8 ****
  608.   
  609. ! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 4.1.1.4 90/06/26 16:18:24 syd Exp $";
  610.   
  611.   /*******************************************************************************
  612. !  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
  613.    *
  614.    *             Copyright (c) 1986, 1987 Dave Taylor
  615.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  616. --- 1,8 ----
  617.   
  618. ! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 4.1.1.7 90/08/15 22:02:36 syd Exp $";
  619.   
  620.   /*******************************************************************************
  621. !  *  The Elm Mail System  -  $Revision: 4.1.1.7 $   $State: Exp $
  622.    *
  623.    *             Copyright (c) 1986, 1987 Dave Taylor
  624.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  625. ***************
  626. *** 14,19 ****
  627. --- 14,36 ----
  628.    *
  629.    *******************************************************************************
  630.    * $Log:    mailmsg2.c,v $
  631. +  * Revision 4.1.1.7  90/08/15  22:02:36  syd
  632. +  * deal with several of the problems that have come up trying to use the MMDF
  633. +  * submit program directly rather than going through the sendmail stub
  634. +  * included with MMDF.  This should take care of the problem of not being
  635. +  * able to send mail to usernames beginning with "i" and with the
  636. +  * 'No valid author specified' problem.
  637. +  * From: jac%brahms.tinton.ccur.com@RELAY.CS.NET
  638. +  * 
  639. +  * Revision 4.1.1.6  90/07/12  23:19:20  syd
  640. +  * Make domain name checking case independent
  641. +  * From: Syd, reported by Steven Baur
  642. +  * 
  643. +  * Revision 4.1.1.5  90/07/12  22:52:42  syd
  644. +  * When Elm is compiled with the NO_XHEADER symbol defined, it failed
  645. +  * to put a blank line between the message header and message body.
  646. +  * From: mca@medicus.medicus.com (Mark Adams)
  647. +  * 
  648.    * Revision 4.1.1.4  90/06/26  16:18:24  syd
  649.    * Make it encode lines that are [...] if not one of the reserved lines.
  650.    * It was messing up decoding
  651. ***************
  652. *** 365,372 ****
  653.         else
  654.           mailerflags[0] ='\0';
  655.   
  656. !       quote_args(very_long_buffer, strip_parens(strip_commas(expanded_to)));
  657. !       strcpy(expanded_to, very_long_buffer);
  658.   
  659.   /*      sprintf(very_long_buffer,"( (%s %s %s ; %s %s) & ) < %s", 
  660.           mailer, mailerflags, expanded_to,
  661. --- 382,393 ----
  662.         else
  663.           mailerflags[0] ='\0';
  664.   
  665. !       if (strcmp(submitmail, mailer) == 0)
  666. !         strcpy(expanded_to, " ");
  667. !       else {
  668. !         quote_args(very_long_buffer, strip_parens(strip_commas(expanded_to)));
  669. !         strcpy(expanded_to, very_long_buffer);
  670. !       }
  671.   
  672.   /*      sprintf(very_long_buffer,"( (%s %s %s ; %s %s) & ) < %s", 
  673.           mailer, mailerflags, expanded_to,
  674. ***************
  675. *** 672,677 ****
  676. --- 693,701 ----
  677.       char  buffer[SLEN];
  678.       int   is_hidden_user;        /* someone we should know about?  */
  679.   #endif
  680. + #ifdef MMDF
  681. +     int   is_submit_mailer;        /* using submit means change From: */
  682. + #endif /* MMDF */
  683.   
  684.       char  *get_arpa_date();
  685.   
  686. ***************
  687. *** 737,757 ****
  688.       fprintf(filedesc,"Date: %s\n", get_arpa_date());
  689.   
  690.   #ifndef DONT_ADD_FROM
  691.   # ifdef SITE_HIDING
  692.       if (is_hidden_user)
  693.         fprintf(filedesc,"From: %s <%s!%s!%s>\n", full_username,
  694.             hostname, HIDDEN_SITE_NAME, username);
  695.       else
  696.   # else
  697.   #  ifdef  INTERNET
  698.   #   ifdef  USE_DOMAIN
  699. !     fprintf(filedesc,"From: %s <%s@%s>\n", full_username, 
  700.           username, hostfullname);
  701.   #   else
  702.       fprintf(filedesc,"From: %s <%s@%s>\n", full_username,
  703.           username, hostname);
  704.   #   endif
  705.   #  else
  706.       fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  707.           hostname, username);
  708.   #  endif
  709. --- 761,806 ----
  710.       fprintf(filedesc,"Date: %s\n", get_arpa_date());
  711.   
  712.   #ifndef DONT_ADD_FROM
  713. + #ifdef MMDF
  714. +     is_submit_mailer = (strcmp(submitmail,mailer) == 0);
  715. + #endif /* MMDF */
  716.   # ifdef SITE_HIDING
  717. + #    ifdef MMDF
  718. +     if (is_submit_mailer)
  719. +       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  720. +     else
  721. + #    endif /* MMDF */
  722.       if (is_hidden_user)
  723.         fprintf(filedesc,"From: %s <%s!%s!%s>\n", full_username,
  724.             hostname, HIDDEN_SITE_NAME, username);
  725.       else
  726. +       fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  727. +           hostname, username);
  728.   # else
  729.   #  ifdef  INTERNET
  730.   #   ifdef  USE_DOMAIN
  731. ! #    ifdef MMDF
  732. !     if (is_submit_mailer)
  733. !       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  734. !     else
  735. ! #    endif /* MMDF */
  736. !       fprintf(filedesc,"From: %s <%s@%s>\n", full_username, 
  737.           username, hostfullname);
  738.   #   else
  739. + #    ifdef MMDF
  740. +     if (is_submit_mailer)
  741. +       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  742. +     else
  743. + #    endif /* MMDF */
  744.       fprintf(filedesc,"From: %s <%s@%s>\n", full_username,
  745.           username, hostname);
  746.   #   endif
  747.   #  else
  748. + #    ifdef MMDF
  749. +     if (is_submit_mailer)
  750. +       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  751. +     else
  752. + #    endif /* MMDF */
  753.       fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  754.           hostname, username);
  755.   #  endif
  756. ***************
  757. *** 788,796 ****
  758.         fprintf(filedesc, "Content-Type: mailform\n");
  759.   
  760.   #ifndef NO_XHEADER
  761. !     fprintf(filedesc, "X-Mailer: ELM [version %s]\n\n", version_buff);
  762.   #endif /* !NO_XHEADER */
  763.   
  764.       return((FILE *) filedesc);
  765.   }
  766.   
  767. --- 837,847 ----
  768.         fprintf(filedesc, "Content-Type: mailform\n");
  769.   
  770.   #ifndef NO_XHEADER
  771. !     fprintf(filedesc, "X-Mailer: ELM [version %s]\n", version_buff);
  772.   #endif /* !NO_XHEADER */
  773.   
  774. +     putc('\n', filedesc);
  775.       return((FILE *) filedesc);
  776.   }
  777.   
  778. ***************
  779. *** 928,934 ****
  780.                 sig = local_signature;
  781.                 for (ptr = index(expanded_to,'@'); ptr;  /* check To: list */
  782.                 ptr = index(ptr+1,'@')) {
  783. !         if (strncmp(ptr,sitename,len) != 0
  784.               || (*(ptr+len) != ',' && *(ptr+len) != 0
  785.               && *(ptr+len) != ' ')) {
  786.                 sig = remote_signature;
  787. --- 979,985 ----
  788.                 sig = local_signature;
  789.                 for (ptr = index(expanded_to,'@'); ptr;  /* check To: list */
  790.                 ptr = index(ptr+1,'@')) {
  791. !         if (strincmp(ptr,sitename,len) != 0
  792.               || (*(ptr+len) != ',' && *(ptr+len) != 0
  793.               && *(ptr+len) != ' ')) {
  794.                 sig = remote_signature;
  795. ***************
  796. *** 938,944 ****
  797.                 if (sig == local_signature)           /* still local? */ 
  798.                   for (ptr = index(expanded_cc,'@'); ptr;   /* check Cc: */
  799.               ptr = index(ptr+1,'@')) {
  800. !           if (strncmp(ptr,sitename,len) != 0
  801.                 || (*(ptr+len) != ',' && *(ptr+len) != 0 
  802.                 && *(ptr+len) != ' ')) {
  803.                   sig = remote_signature;
  804. --- 989,995 ----
  805.                 if (sig == local_signature)           /* still local? */ 
  806.                   for (ptr = index(expanded_cc,'@'); ptr;   /* check Cc: */
  807.               ptr = index(ptr+1,'@')) {
  808. !           if (strincmp(ptr,sitename,len) != 0
  809.                 || (*(ptr+len) != ',' && *(ptr+len) != 0 
  810.                 && *(ptr+len) != ' ')) {
  811.                   sig = remote_signature;
  812. diff -c -r elm.dist/src/opt_utils.c elm.new/src/opt_utils.c
  813. *** elm.dist/src/opt_utils.c    Sat Sep 15 14:43:00 1990
  814. --- elm.new/src/opt_utils.c    Tue Sep 11 20:51:00 1990
  815. ***************
  816. *** 107,112 ****
  817. --- 107,115 ----
  818.       if (size < 2)
  819.         return -1;
  820.   
  821. + #ifdef OSK
  822. +     if ( ! info_str( "hostdomain" , buf , sizeof(buf) ) )
  823. + #endif
  824.       if ((fp = fopen(hostdomfile, "r")) != 0) {
  825.         fgets(buf, sizeof(buf) - 1, fp);
  826.         fclose(fp);
  827. diff -c -r elm.dist/src/quit.c elm.new/src/quit.c
  828. *** elm.dist/src/quit.c    Sat Sep 15 14:42:00 1990
  829. --- elm.new/src/quit.c    Tue Sep 11 20:59:00 1990
  830. ***************
  831. *** 115,135 ****
  832.             if(!*helpmsg) {    /* format helpmsg if not yet done */
  833.   
  834.           strcpy(helpmsg,
  835. !           "\l\r\l\rEnter: <nothing> to not change to a new folder,");
  836.           strcat(helpmsg,
  837. !           "\l\r       '!' to change to your incoming mailbox (");
  838.           strcat(helpmsg, defaultfile);
  839.           strcat(helpmsg,
  840. !           ")\l\r       '>' to change to your \"received\" folder (");
  841.           strcat(helpmsg, nameof(recvd_mail));
  842.           strcat(helpmsg,
  843. !           ")\l\r       '<' to change to your \"sent\" folder (");
  844.           strcat(helpmsg, nameof(sent_mail));
  845. !         strcat(helpmsg, ")\l\r       or a filename");
  846.           strcat(helpmsg,
  847. !           " (leading '=' denotes your folder directory ");
  848.           strcat(helpmsg, folders);
  849. !         strcat(helpmsg, ").\l\r");
  850.             }
  851.             list_folders(4, helpmsg);
  852.             PutLine0(LINES-2,0,"Change to which folder: ");    /* reprompt */
  853. --- 115,135 ----
  854.             if(!*helpmsg) {    /* format helpmsg if not yet done */
  855.   
  856.           strcpy(helpmsg,
  857. !           "\n\nEnter: <nothing> to not change to a new folder,");
  858.           strcat(helpmsg,
  859. !           "\n       '!' to change to your incoming mailbox (");
  860.           strcat(helpmsg, defaultfile);
  861.           strcat(helpmsg,
  862. !           ")\n       '>' to change to your \"received\" folder (");
  863.           strcat(helpmsg, nameof(recvd_mail));
  864.           strcat(helpmsg,
  865. !           ")\n       '<' to change to your \"sent\" folder (");
  866.           strcat(helpmsg, nameof(sent_mail));
  867. !         strcat(helpmsg, ")\n       or a filename");
  868.           strcat(helpmsg,
  869. !           "\n       (leading '=' denotes your folder directory ");
  870.           strcat(helpmsg, folders);
  871. !         strcat(helpmsg, ").\n");
  872.             }
  873.             list_folders(4, helpmsg);
  874.             PutLine0(LINES-2,0,"Change to which folder: ");    /* reprompt */
  875. diff -c -r elm.dist/src/showmsg.c elm.new/src/showmsg.c
  876. *** elm.dist/src/showmsg.c    Sat Sep 15 14:45:00 1990
  877. --- elm.new/src/showmsg.c    Tue Sep 11 20:51:00 1990
  878. ***************
  879. *** 1,8 ****
  880.   
  881. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 4.1 90/04/28 22:44:06 syd Exp $";
  882.   
  883.   /*******************************************************************************
  884. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  885.    *
  886.    *             Copyright (c) 1986, 1987 Dave Taylor
  887.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  888. --- 1,8 ----
  889.   
  890. ! static char rcsid[] = "@(#)$Id: showmsg.c,v 4.1.1.1 90/07/12 23:04:26 syd Exp $";
  891.   
  892.   /*******************************************************************************
  893. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  894.    *
  895.    *             Copyright (c) 1986, 1987 Dave Taylor
  896.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  897. ***************
  898. *** 14,19 ****
  899. --- 14,24 ----
  900.    *
  901.    *******************************************************************************
  902.    * $Log:    showmsg.c,v $
  903. +  * Revision 4.1.1.1  90/07/12  23:04:26  syd
  904. +  * Fix MMDF case, where MSG_SEPERATOR has newline, buffer check
  905. +  * didnt, thus it didnt detect the MSG_SEPERATOR.
  906. +  * From: jbwaters@bsu-cs.bsu.edu (J. Brian Waters)
  907. +  * 
  908.    * Revision 4.1  90/04/28  22:44:06  syd
  909.    * checkin of Elm 2.3 as of Release PL0
  910.    * 
  911. ***************
  912. *** 466,481 ****
  913.           a command other than continuing with the display (only possible
  914.           with the builtin pager), otherwise 0. **/
  915.   
  916.   #ifdef MMDF
  917.       if (strcmp(buffer, MSG_SEPERATOR) == 0)
  918. !       strcpy(buffer," ");
  919.   #endif /* MMDF */
  920.       if (builtin) {
  921. -       strcat(buffer, "\n");
  922.         return(display_line(buffer));
  923.       }
  924.       errno = 0;
  925. !     fprintf(pipe_wr_fp, "%s\n", buffer);
  926.       if (errno != 0)
  927.         dprint(1, (debugfile, "\terror %s hit!\n", error_name(errno)));
  928.       return(0);
  929. --- 471,486 ----
  930.           a command other than continuing with the display (only possible
  931.           with the builtin pager), otherwise 0. **/
  932.   
  933. +     strcat(buffer, "\n");
  934.   #ifdef MMDF
  935.       if (strcmp(buffer, MSG_SEPERATOR) == 0)
  936. !       return(0);    /* no reason to show the ending terminator */
  937.   #endif /* MMDF */
  938.       if (builtin) {
  939.         return(display_line(buffer));
  940.       }
  941.       errno = 0;
  942. !     fprintf(pipe_wr_fp, "%s", buffer);
  943.       if (errno != 0)
  944.         dprint(1, (debugfile, "\terror %s hit!\n", error_name(errno)));
  945.       return(0);
  946. diff -c -r elm.dist/src/strings.c elm.new/src/strings.c
  947. *** elm.dist/src/strings.c    Sat Sep 15 14:45:00 1990
  948. --- elm.new/src/strings.c    Tue Sep 11 20:51:00 1990
  949. ***************
  950. *** 1,8 ****
  951.   
  952. ! static char rcsid[] = "@(#)$Id: strings.c,v 4.1.1.2 90/06/21 22:45:06 syd Exp $";
  953.   
  954.   /*******************************************************************************
  955. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  956.    *
  957.    *             Copyright (c) 1986, 1987 Dave Taylor
  958.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  959. --- 1,8 ----
  960.   
  961. ! static char rcsid[] = "@(#)$Id: strings.c,v 4.1.1.3 90/08/15 21:48:07 syd Exp $";
  962.   
  963.   /*******************************************************************************
  964. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  965.    *
  966.    *             Copyright (c) 1986, 1987 Dave Taylor
  967.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  968. ***************
  969. *** 14,19 ****
  970. --- 14,24 ----
  971.    *
  972.    *******************************************************************************
  973.    * $Log:    strings.c,v $
  974. +  * Revision 4.1.1.3  90/08/15  21:48:07  syd
  975. +  * the user's (unmodified) limit criteria was being compared w/
  976. +  * the lower-case version of the header contents.
  977. +  * From: dwolfe@earth.sps.mot.com (Dave Wolfe)
  978. +  * 
  979.    * Revision 4.1.1.2  90/06/21  22:45:06  syd
  980.    * Make display not show To user if user is also sender
  981.    * From: Marius Olafsson
  982. ***************
  983. *** 364,372 ****
  984.   
  985.       for (; *buffer && ! whitespace(*buffer); buffer++, first++)
  986.         if (islower(*buffer))
  987. -         *first = tolower(*buffer);
  988. -       else
  989.           *first = *buffer;
  990.   
  991.       *first = '\0';
  992.       
  993. --- 369,377 ----
  994.   
  995.       for (; *buffer && ! whitespace(*buffer); buffer++, first++)
  996.         if (islower(*buffer))
  997.           *first = *buffer;
  998. +       else
  999. +         *first = tolower(*buffer);
  1000.   
  1001.       *first = '\0';
  1002.       
  1003. ***************
  1004. *** 374,382 ****
  1005.   
  1006.       for (; *buffer; buffer++, rest++)
  1007.         if (islower(*buffer))
  1008. -         *rest = tolower(*buffer);
  1009. -       else
  1010.           *rest = *buffer;
  1011.   
  1012.       *rest = '\0';
  1013.   
  1014. --- 379,387 ----
  1015.   
  1016.       for (; *buffer; buffer++, rest++)
  1017.         if (islower(*buffer))
  1018.           *rest = *buffer;
  1019. +       else
  1020. +         *rest = tolower(*buffer);
  1021.   
  1022.       *rest = '\0';
  1023.   
  1024. diff -c -r elm.dist/src/syscall.c elm.new/src/syscall.c
  1025. *** elm.dist/src/syscall.c    Sat Sep 15 14:43:00 1990
  1026. --- elm.new/src/syscall.c    Tue Sep 11 21:04:00 1990
  1027. ***************
  1028. *** 1,8 ****
  1029.   
  1030. ! static char rcsid[] = "@(#)$Id: syscall.c,v 4.1.1.3 90/06/21 22:48:17 syd Exp $";
  1031.   
  1032.   /*******************************************************************************
  1033. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  1034.    *
  1035.    *             Copyright (c) 1986, 1987 Dave Taylor
  1036.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  1037. --- 1,8 ----
  1038.   
  1039. ! static char rcsid[] = "@(#)$Id: syscall.c,v 4.1.1.4 90/07/12 22:41:55 syd Exp $";
  1040.   
  1041.   /*******************************************************************************
  1042. !  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
  1043.    *
  1044.    *             Copyright (c) 1986, 1987 Dave Taylor
  1045.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  1046. ***************
  1047. *** 14,19 ****
  1048. --- 14,25 ----
  1049.    *
  1050.    *******************************************************************************
  1051.    * $Log:    syscall.c,v $
  1052. +  * Revision 4.1.1.4  90/07/12  22:41:55  syd
  1053. +  * Make it aware of the fact that we loose the cursor position on
  1054. +  * some system calls, so set it far enough off an absolute move will
  1055. +  * be done on the next cursor address, and then place it where we want it.
  1056. +  * From: Syd, reported by Douglas Lamb
  1057. +  * 
  1058.    * Revision 4.1.1.3  90/06/21  22:48:17  syd
  1059.    * patch to fix up the Log headers.
  1060.    * From: pdc%lunch.wpd@sgi.com (Paul Close)
  1061. ***************
  1062. *** 88,93 ****
  1063. --- 94,100 ----
  1064.       ret = system_call(command, USER_SHELL, TRUE, TRUE);
  1065.       umask(077);        /* now put it back to private for mail files */
  1066.   
  1067. +     SetXYLocation(0, 40);    /* a location not near the next request, so an absolute is used */
  1068.       PutLine0(LINES, 0, "\n\nPress any key to return to ELM: ");
  1069.       Raw(ON);
  1070.   /*    (void) getchar();    */
  1071. ***************
  1072. *** 142,147 ****
  1073. --- 149,155 ----
  1074.       
  1075.       ret = system_call(buffer, USER_SHELL, TRUE, TRUE);
  1076.   
  1077. +     SetXYLocation(0, 40);    /* a location not near the next request, so an absolute is used */
  1078.       PutLine0(LINES, 0, "\n\nPress any key to return to ELM.");
  1079.       if (old_raw == ON)
  1080.          Raw(ON);
  1081. ***************
  1082. *** 247,257 ****
  1083.       MoveCursor(LINES, 0);
  1084.       if(helpmsg)
  1085.         printf(helpmsg);
  1086. !     sprintf(buffer, "chd %s;dir -e", folders);
  1087. !     printf("\l\rContents of your folder directory:\l\r\l\r");
  1088.       system_call(buffer, SH, FALSE, FALSE); 
  1089.       while(numlines--)
  1090. !         printf("\l\r");
  1091.       Raw(ON);
  1092.   }
  1093.   
  1094. --- 255,265 ----
  1095.       MoveCursor(LINES, 0);
  1096.       if(helpmsg)
  1097.         printf(helpmsg);
  1098. !     sprintf(buffer, "chd %s;dir ", folders);
  1099. !     printf("\nContents of your folder directory:\n\n");
  1100.       system_call(buffer, SH, FALSE, FALSE); 
  1101.       while(numlines--)
  1102. !         printf("\n");
  1103.       Raw(ON);
  1104.   }
  1105.   
  1106. diff -c -r elm.dist/utils/arepdaem.c elm.new/utils/arepdaem.c
  1107. *** elm.dist/utils/arepdaem.c    Sat Sep 15 14:45:00 1990
  1108. --- elm.new/utils/arepdaem.c    Tue Sep 11 20:07:00 1990
  1109. ***************
  1110. *** 1,8 ****
  1111.   
  1112. ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1 90/04/28 22:44:33 syd Exp $";
  1113.   
  1114.   /*******************************************************************************
  1115. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  1116.    *
  1117.    *             Copyright (c) 1986, 1987 Dave Taylor
  1118.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  1119. --- 1,8 ----
  1120.   
  1121. ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1.1.2 90/08/15 22:50:14 syd Exp $";
  1122.   
  1123.   /*******************************************************************************
  1124. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  1125.    *
  1126.    *             Copyright (c) 1986, 1987 Dave Taylor
  1127.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  1128. ***************
  1129. *** 14,19 ****
  1130. --- 14,28 ----
  1131.    *
  1132.    *******************************************************************************
  1133.    * $Log:    arepdaem.c,v $
  1134. +  * Revision 4.1.1.2  90/08/15  22:50:14  syd
  1135. +  * Fix last size to time call
  1136. +  * From: Syd
  1137. +  * 
  1138. +  * Revision 4.1.1.1  90/08/15  22:33:54  syd
  1139. +  * Fix to use time instead of bytes for changes to file and to process
  1140. +  * each entry on delete properly
  1141. +  * From: Denis Lambot <d241s016!lde@swn.siemens.be>
  1142. +  * 
  1143.    * Revision 4.1  90/04/28  22:44:33  syd
  1144.    * checkin of Elm 2.3 as of Release PL0
  1145.    * 
  1146. ***************
  1147. *** 93,104 ****
  1148.         } reply_table[MAX_PEOPLE];
  1149.   
  1150.   FILE  *logfd;                /* logfile (log action)   */
  1151. ! long  autoreply_size = 0L;        /* size of autoreply file */
  1152.   int   active = 0;            /* # of people 'enrolled' */
  1153.   
  1154.   FILE  *open_logfile();            /* forward declaration    */
  1155.   
  1156.   long  bytes();                /*       ditto           */
  1157.   
  1158.   #ifdef VOIDSIG
  1159.   void    term_signal();
  1160. --- 102,114 ----
  1161.         } reply_table[MAX_PEOPLE];
  1162.   
  1163.   FILE  *logfd;                /* logfile (log action)   */
  1164. ! time_t autoreply_time = 0L;        /* modif date of autoreply file */
  1165.   int   active = 0;            /* # of people 'enrolled' */
  1166.   
  1167.   FILE  *open_logfile();            /* forward declaration    */
  1168.   
  1169.   long  bytes();                /*       ditto           */
  1170. + time_t ModTime();            /*       ditto          */
  1171.   
  1172.   #ifdef VOIDSIG
  1173.   void    term_signal();
  1174. ***************
  1175. *** 110,115 ****
  1176. --- 120,126 ----
  1177.   {
  1178.       long size;
  1179.       int  person, data_changed;
  1180. +     time_t time;
  1181.   
  1182.       if (fork()) exit(0);
  1183.   
  1184. ***************
  1185. *** 133,141 ****
  1186.   
  1187.         /* 1. check to see if autoreply table has changed.. */
  1188.   
  1189. !       if ((size = bytes(autoreply_file)) != autoreply_size) {
  1190.           read_autoreply_file(); 
  1191. !         autoreply_size = size;
  1192.         }
  1193.   
  1194.         /* 2. now for each active person... */
  1195. --- 144,152 ----
  1196.   
  1197.         /* 1. check to see if autoreply table has changed.. */
  1198.   
  1199. !       if ((time = ModTime(autoreply_file)) != autoreply_time) {
  1200.           read_autoreply_file(); 
  1201. !         autoreply_time = time;
  1202.         }
  1203.   
  1204.         /* 2. now for each active person... */
  1205. ***************
  1206. *** 169,175 ****
  1207.   int
  1208.   read_autoreply_file()
  1209.   {
  1210. !     /** We're here because the autoreply file has changed size!!  It
  1211.           could either be because someone has been added or because
  1212.           someone has been removed...since the list will always be in
  1213.           order (nice, eh?) we should have a pretty easy time of it...
  1214. --- 180,186 ----
  1215.   int
  1216.   read_autoreply_file()
  1217.   {
  1218. !     /** We're here because the autoreply file has changed!!  It
  1219.           could either be because someone has been added or because
  1220.           someone has been removed...since the list will always be in
  1221.           order (nice, eh?) we should have a pretty easy time of it...
  1222. ***************
  1223. *** 217,226 ****
  1224.   
  1225.       /** now check to see if anyone has been removed... **/
  1226.   
  1227. !     for (person = 0; person < active; person++)
  1228. !       if (reply_table[person].in_list == 0) {
  1229. !          log("removing %s from the active list", 
  1230. !           reply_table[person].username);
  1231.           strcpy(reply_table[person].username, 
  1232.              reply_table[active-1].username);
  1233.           strcpy(reply_table[person].mailfile, 
  1234. --- 228,241 ----
  1235.   
  1236.       /** now check to see if anyone has been removed... **/
  1237.   
  1238. !     person = 0;
  1239. !     while (person < active)
  1240. !       if (reply_table[person].in_list) {
  1241. !         person++;
  1242. !       }
  1243. !       else {
  1244. !         log("removing %s from the active list",
  1245. !            reply_table[person].username);
  1246.           strcpy(reply_table[person].username, 
  1247.              reply_table[active-1].username);
  1248.           strcpy(reply_table[person].mailfile, 
  1249. ***************
  1250. *** 253,259 ****
  1251.       fclose(file);
  1252.   
  1253.   /*    printf("updated autoreply file\n"); */
  1254. !     autoreply_size = bytes(autoreply_file);
  1255.   }
  1256.   
  1257.   int
  1258. --- 268,274 ----
  1259.       fclose(file);
  1260.   
  1261.   /*    printf("updated autoreply file\n"); */
  1262. !     autoreply_time = ModTime(autoreply_file);
  1263.   }
  1264.   
  1265.   int
  1266. ***************
  1267. *** 462,467 ****
  1268. --- 477,504 ----
  1269.           ok = 0;
  1270.       
  1271.       return(ok ? buffer.st_size : 0);
  1272. + }
  1273. + time_t
  1274. + ModTime(name)
  1275. + char *name;
  1276. + {
  1277. +     /** return the modification time in the specified file.
  1278. +         This is to check to see if autoreply has changed....  **/
  1279. +     int ok = 1;
  1280. +     extern int errno;    /* system error number! */
  1281. +     struct stat buffer;
  1282. +     if (stat(name, &buffer) != 0)
  1283. +       if (errno != 2) {
  1284. +        unlock();
  1285. +        exit(fprintf(stderr,"Error %d attempting fstat on %s", errno, name));
  1286. +       }
  1287. +       else
  1288. +         ok = 0;
  1289. +     return(ok ? buffer.st_mtime : (time_t) 0);
  1290.   }
  1291.   
  1292.   mail(to, subject, filename, person)
  1293. diff -c -r elm.dist/utils/makefile elm.new/utils/makefile
  1294. *** elm.dist/utils/makefile    Sat Sep 15 14:41:00 1990
  1295. --- elm.new/utils/makefile    Sat Jun 30 15:01:00 1990
  1296. ***************
  1297. *** 43,51 ****
  1298.   READMSG_OBJ    =    readmsg.r expand.r ../../src/rels/opt_utils.r ../../src/rels/string2.r
  1299.   
  1300.   
  1301. - all:        newalias readmsg
  1302. -         touch all
  1303.   newalias:    newalias.r
  1304.           chd $(RDIR); $(CC) $(LFLAGS) -f=newalias $(NEWALIAS_OBJ) $(LIB)
  1305.   
  1306. --- 43,48 ----
  1307. diff -c -r elm.dist/utils/newalias.c elm.new/utils/newalias.c
  1308. *** elm.dist/utils/newalias.c    Sat Sep 15 14:46:00 1990
  1309. --- elm.new/utils/newalias.c    Tue Sep 11 20:08:00 1990
  1310. ***************
  1311. *** 1,8 ****
  1312.   
  1313. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.1 90/06/05 21:11:20 syd Exp $";
  1314.   
  1315.   /*******************************************************************************
  1316. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  1317.    *
  1318.    *             Copyright (c) 1986, 1987 Dave Taylor
  1319.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  1320. --- 1,8 ----
  1321.   
  1322. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.2 90/08/02 21:57:58 syd Exp $";
  1323.   
  1324.   /*******************************************************************************
  1325. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  1326.    *
  1327.    *             Copyright (c) 1986, 1987 Dave Taylor
  1328.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  1329. ***************
  1330. *** 14,19 ****
  1331. --- 14,24 ----
  1332.    *
  1333.    *******************************************************************************
  1334.    * $Log:    newalias.c,v $
  1335. +  * Revision 4.1.1.2  90/08/02  21:57:58  syd
  1336. +  * The newly introduced function 'stricmp' has a name conflict with a libc
  1337. +  * function under SunOS 4.1.  Changed name to istrcmp.
  1338. +  * From: scs@lokkur.dexter.mi.us (Steve Simmons)
  1339. +  * 
  1340.    * Revision 4.1.1.1  90/06/05  21:11:20  syd
  1341.    * alias command in ELM2.3 fails because of the wrong sized aliases.hash
  1342.    * newalias did not truncate existing file (aliases.hash)
  1343. ***************
  1344. *** 408,414 ****
  1345.   
  1346.       loc = hash_it(word, size);
  1347.   
  1348. !     while (table[loc].name[0] != '\0' && stricmp(table[loc].name,word) != 0)
  1349.         loc = (loc + 1) % size; 
  1350.   
  1351.       if (table[loc].name[0] == '\0') {
  1352. --- 413,419 ----
  1353.   
  1354.       loc = hash_it(word, size);
  1355.   
  1356. !     while (table[loc].name[0] != '\0' && istrcmp(table[loc].name,word) != 0)
  1357.         loc = (loc + 1) % size; 
  1358.   
  1359.       if (table[loc].name[0] == '\0') {
  1360. ***************
  1361. *** 421,427 ****
  1362.   }
  1363.   
  1364.   int
  1365. ! stricmp(s1,s2)
  1366.   register char *s1, *s2;
  1367.   {
  1368.       /* case insensitive comparison */
  1369. --- 426,432 ----
  1370.   }
  1371.   
  1372.   int
  1373. ! istrcmp(s1,s2)
  1374.   register char *s1, *s2;
  1375.   {
  1376.       /* case insensitive comparison */
  1377. ***************
  1378. *** 534,544 ****
  1379.       if (hash_table_loaded || is_system) {
  1380.         loc = hash_it(name, MAX_SALIASES);
  1381.   
  1382. !       while (stricmp(name, shash_table[loc].name) != 0 && 
  1383.                    shash_table[loc].name[0] != '\0')
  1384.           loc = (loc + 1) % MAX_SALIASES; 
  1385.     
  1386. !       if (stricmp(name, shash_table[loc].name) == 0)
  1387.           return(1);    /* found it! */
  1388.       }
  1389.   
  1390. --- 539,549 ----
  1391.       if (hash_table_loaded || is_system) {
  1392.         loc = hash_it(name, MAX_SALIASES);
  1393.   
  1394. !       while (istrcmp(name, shash_table[loc].name) != 0 && 
  1395.                    shash_table[loc].name[0] != '\0')
  1396.           loc = (loc + 1) % MAX_SALIASES; 
  1397.     
  1398. !       if (istrcmp(name, shash_table[loc].name) == 0)
  1399.           return(1);    /* found it! */
  1400.       }
  1401.   
  1402. ***************
  1403. *** 545,555 ****
  1404.       if (! is_system) {    /* okay! Let's check the user alias file! */
  1405.         loc = hash_it(name, MAX_UALIASES);
  1406.   
  1407. !       while (stricmp(name, uhash_table[loc].name) != 0 && 
  1408.                    uhash_table[loc].name[0] != '\0')
  1409.           loc = (loc + 1) % MAX_UALIASES; 
  1410.   
  1411. !       if (stricmp(name, uhash_table[loc].name) == 0)
  1412.           return(1);    /* found it! */
  1413.       }
  1414.   
  1415. --- 550,560 ----
  1416.       if (! is_system) {    /* okay! Let's check the user alias file! */
  1417.         loc = hash_it(name, MAX_UALIASES);
  1418.   
  1419. !       while (istrcmp(name, uhash_table[loc].name) != 0 && 
  1420.                    uhash_table[loc].name[0] != '\0')
  1421.           loc = (loc + 1) % MAX_UALIASES; 
  1422.   
  1423. !       if (istrcmp(name, uhash_table[loc].name) == 0)
  1424.           return(1);    /* found it! */
  1425.       }
  1426.   
  1427.