home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume15 / mush6.3kit / part02 / Diffs.6.3.a
Encoding:
Text File  |  1988-07-06  |  56.0 KB  |  1,801 lines

  1. *** OLD/Makefile    Fri Jun 10 12:38:05 1988
  2. --- Makefile    Thu Jun 30 13:05:31 1988
  3. ***************
  4. *** 7,13 ****
  5.   OBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
  6.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  7.         folders.o dates.o loop.o help.o viewopts.o curses.o curs_io.o bind.o
  8. ! HELP_FILES= README-6.0 README cmd_help mush.1
  9.   MAKES= makefile.bsd makefile.x286 makefile.x386 makefile.sys.v
  10.   
  11.   CFLAGS= -O -DCURSES -DBSD
  12. --- 7,13 ----
  13.   OBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
  14.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  15.         folders.o dates.o loop.o help.o viewopts.o curses.o curs_io.o bind.o
  16. ! HELP_FILES= README-6.0 README cmd_help mush.1 Mailrc
  17.   MAKES= makefile.bsd makefile.x286 makefile.x386 makefile.sys.v
  18.   
  19.   CFLAGS= -O -DCURSES -DBSD
  20. *** OLD/README    Fri Jun 10 12:38:05 1988
  21. --- README    Tue Jun 28 21:37:48 1988
  22. ***************
  23. *** 9,22 ****
  24.   
  25.   When sending mail, mail to the addresses in the order given.
  26.   
  27. ! Contained is the source for "Mail User's Shell" (MUSH), an interface
  28. ! for the sending, viewing and managing of electronic mail on UNIX(tm) systems.
  29.   Redistribution of this code is permitted as long as all copyright notices
  30.   remain intact and all other identifying notices remain in the code and
  31.   in the binary.  This includes message headers on outgoing mail and
  32. ! the startup message.  Failing to adhere to this reflects on your poor
  33. ! sense of fair play and bad attitude -- you will probably fail in your
  34. ! social and business affairs with little honor and respect from your peers.
  35.   
  36.   With that out of the way...
  37.   
  38. --- 9,28 ----
  39.   
  40.   When sending mail, mail to the addresses in the order given.
  41.   
  42. ! Mush is a Mail User Agent (MUA).  That is, it is used by the user to read mail,
  43. ! arrange it, delete it, or act as an interface to send mail to other users.
  44. ! A Mail Transport Agent (MTA) is the program that mush talks to.  The MTA
  45. ! actually delivers the mail to the destination (usually in the asynchronously
  46. ! with mush).
  47. ! Contained is the source for "Mail User's Shell" (MUSH), an MUA that is
  48. ! designed to manage electronic mail on most UNIX(tm) systems.
  49.   Redistribution of this code is permitted as long as all copyright notices
  50.   remain intact and all other identifying notices remain in the code and
  51.   in the binary.  This includes message headers on outgoing mail and
  52. ! the startup message.  Future releases will extract the release version
  53. ! from the message headers of mush-originated messages to aid in implementing
  54. ! features and providing backwards complatibility with previous versions.
  55.   
  56.   With that out of the way...
  57.   
  58. ***************
  59. *** 24,30 ****
  60.   "config.h" (probably "config.h-dist") COPY it to config.h, edit it to reflect
  61.   the system dependencines described there.  Decide which makefile applies
  62.   to you.  makefile.sun applies only to suns and creates a binary called
  63. ! "mush."  If the binary ends in "tool", then the graphics (tool) mode will
  64.   be used by default on invocation. Otherwise, you must specify -t for toolmode
  65.   on sun workstations.  The SUNTOOL define must be set in the makefile.sun
  66.   in order to compile the suntools version.  You don't need to be running
  67. --- 30,36 ----
  68.   "config.h" (probably "config.h-dist") COPY it to config.h, edit it to reflect
  69.   the system dependencines described there.  Decide which makefile applies
  70.   to you.  makefile.sun applies only to suns and creates a binary called
  71. ! "mush."  If the binary ends in "tool", then the graphics (suntools) mode will
  72.   be used by default on invocation. Otherwise, you must specify -t for toolmode
  73.   on sun workstations.  The SUNTOOL define must be set in the makefile.sun
  74.   in order to compile the suntools version.  You don't need to be running
  75. ***************
  76. *** 36,42 ****
  77.   files not be compiled so the binary will be made smaller.
  78.   
  79.   The files makefile.x286 and makefile.x386 were created especially for
  80. ! xenix machines.  Depending on the configuration of your particular xenix box,
  81.   some tweeking of the makefile flags may be necessary.  If your xenix
  82.   release is 2.2 or higher then you must define USG. Libraries to use should
  83.   be -ltinfo *not* -lcurses -ltermlib.  This is because the curses package
  84. --- 42,48 ----
  85.   files not be compiled so the binary will be made smaller.
  86.   
  87.   The files makefile.x286 and makefile.x386 were created especially for
  88. ! XENIX machines.  Depending on the configuration of your particular xenix box,
  89.   some tweeking of the makefile flags may be necessary.  If your xenix
  90.   release is 2.2 or higher then you must define USG. Libraries to use should
  91.   be -ltinfo *not* -lcurses -ltermlib.  This is because the curses package
  92. ***************
  93. *** 48,58 ****
  94.   BSD and probably running a system-v flavor of unix -- this defines USG
  95.   so that termio will be used.  Some older unix systems have SYSV defined
  96.   in /usr/include/curses.h (which is used if you are compiling with CURSES)
  97. ! In most cases, these only generate annoying warning messages and does not
  98. ! effect the compilation of the code.
  99.   
  100. ! Mush was designed to use sendmail as the Mail Transport Agent. However,
  101. ! other MTA's will work.  The MTA you use should be defined in config.h
  102.   under the MAIL_DELIVERY macro define. By default, /usr/lib/sendmail -i
  103.   is used -- the option, -i, tells sendmail not to accept "." on a line
  104.   by itself as an end-of-file marker.
  105. --- 54,81 ----
  106.   BSD and probably running a system-v flavor of unix -- this defines USG
  107.   so that termio will be used.  Some older unix systems have SYSV defined
  108.   in /usr/include/curses.h (which is used if you are compiling with CURSES)
  109. ! In most cases, these may generate annoying warning messages but do not
  110. ! affect the compilation of the code.
  111.   
  112. ! When you decide on an appropriate makefile, _copy_ it to a new file called
  113. ! Makefile.
  114. ! When it comes to "compile-time definitions", you may use one of two methods:
  115. !     -DDEFINITION  /* in your makefile */
  116. !     #define DEFINITION /* in the config.h file */
  117. ! If the definition is of the form MACRO="string", then use:
  118. !     -DMACRO=string
  119. !     #define MACRO string
  120. ! For example, if you are on a system V machine, you may need to define
  121. ! SIGRET to be of type void because the signal() function doesn't return
  122. ! anything useful (or, a "void" type).  To define this, your makefile may
  123. ! have (as part of the CFLAGS setting):
  124. !     -DSIGRET=void
  125. ! or your config.h file should have somewhere in it (doesn't matter where):
  126. ! #define SIGRET void
  127. ! Mush was originally designed to use sendmail as the Mail Transport Agent.
  128. ! However, other MTA's will work.  The MTA you use should be defined in config.h
  129.   under the MAIL_DELIVERY macro define. By default, /usr/lib/sendmail -i
  130.   is used -- the option, -i, tells sendmail not to accept "." on a line
  131.   by itself as an end-of-file marker.
  132. ***************
  133. *** 84,92 ****
  134.   Some MTA's, especially older ones like /bin/mail or execmail (xenix), do
  135.   not conform to RFC822 and provide the required headers: From: and Date:.
  136.   To remedy either #define OLD_MAILER in config.h or add the -D option
  137. ! OLD_MAILER in the appropriate makefile: -DOLD_MAILER as part of the CFLAGS
  138. ! variable.
  139.   
  140.   If your mailer does NOT have a verbose option, then you should not have
  141.   VERBOSE_ARG defined.  Otherwise, define it to be whatever the
  142.   verbose argument is for your mailer.
  143. --- 107,125 ----
  144.   Some MTA's, especially older ones like /bin/mail or execmail (xenix), do
  145.   not conform to RFC822 and provide the required headers: From: and Date:.
  146.   To remedy either #define OLD_MAILER in config.h or add the -D option
  147. ! OLD_MAILER in the appropriate makefile: -DOLD_MAILER
  148.   
  149. + If your machine talks to other computers via uucp _and_ you have the
  150. + macro OLD_MAILER defined,  then you may want to define UUCP.  This will
  151. + change the From: line to have your return address look like "host!user"
  152. + rather than "user@host" (which is the default).
  153. + If your mailer does *NOT* like commas between addresses (smail, xenix and
  154. + xenix machines), then you should define NO_COMMAS.
  155. + If your signal() returns void, SIGRET should be defined to be "void".
  156. + This mostly applies to SVR3.  By default, SIGRET is defined to be "int".
  157.   If your mailer does NOT have a verbose option, then you should not have
  158.   VERBOSE_ARG defined.  Otherwise, define it to be whatever the
  159.   verbose argument is for your mailer.
  160. ***************
  161. *** 151,165 ****
  162.   
  163.   Maintenance:
  164.   
  165. ! If you want to use dbx or any other debugger, the undocumented flag, -e
  166. ! should be used as command line argument when you run the binary under
  167. ! the debugger.  What this flag does is prevents your echo from being
  168. ! turned off and leaving cbreak on, thus, keeping your tty in a sane state.
  169. ! Beware of curses mode tho, since it must be turned off for that -- e.g.
  170. ! the -e flag is overridden if you enter curses mode.  The -e flag can be
  171. ! used in general usage anyway, but there's no difference known to the user
  172. ! except for the fact that you can not type control characters.
  173.   If you have memory allocation checking and validation (sun 3.0+ ?) then
  174.   define M_DEBUG in the makefile (main.c) and add the library
  175.   /usr/lib/debug/malloc.o to the library list. Do this only if you are
  176. --- 184,198 ----
  177.   
  178.   Maintenance:
  179.   
  180. ! If you want to use dbx or any other debugger, or to use your default tty
  181. ! driver, -e may be used as command line argument when you run the program.
  182. ! What this flag does is prevents your echo from being turned off and leaving
  183. ! cbreak off, thus, keeping your tty in a sane state.
  184. ! Beware of curses mode tho, since it will be automatically turned off for
  185. ! that mode.  The -e flag is discouraged for future use (when automatic
  186. ! filename completion is introduced in the next version and other keyboard
  187. ! accelerators are introduced).
  188. !     
  189.   If you have memory allocation checking and validation (sun 3.0+ ?) then
  190.   define M_DEBUG in the makefile (main.c) and add the library
  191.   /usr/lib/debug/malloc.o to the library list. Do this only if you are
  192. ***************
  193. *** 169,174 ****
  194. --- 202,211 ----
  195.   the sunwindows program will get a SIGXCPU (cpu time limit exceeded)
  196.   because of the large amount of opening and closing large pixrects and
  197.   devices.  For this reason, SIGXPCPU is is caught in main.c.
  198. + The "warning" variable may be set (at runtime in your .mushrc or as
  199. + a command: "set warning") to aid in finding runtime errors that aren't
  200. + fatal.
  201.   
  202.   If you ever get "Message N has bad date: <date string>" then note
  203.   the FORMAT of that date and edit dates.c.  There are a number of
  204. *** OLD/bind.c    Fri Jun 10 12:38:06 1988
  205. --- bind.c    Tue Jun 28 21:37:49 1988
  206. ***************
  207. *** 185,191 ****
  208.   {
  209.       char buf[MAX_BIND_LEN], buf2[256];
  210.       register int x;
  211. !     int (*oldint)(), (*oldquit)();
  212.       int unbind = (argv && **argv == 'u');
  213.       int ret = -1; /* return value */
  214.   
  215. --- 185,191 ----
  216.   {
  217.       char buf[MAX_BIND_LEN], buf2[256];
  218.       register int x;
  219. !     SIGRET (*oldint)(), (*oldquit)();
  220.       int unbind = (argv && **argv == 'u');
  221.       int ret = -1; /* return value */
  222.   
  223. *** OLD/bindings.h    Fri Jun 10 12:38:06 1988
  224. --- bindings.h    Tue Jun 28 21:37:49 1988
  225. ***************
  226. *** 6,11 ****
  227. --- 6,14 ----
  228.   #define A_PREFIX_B    2
  229.   #define B_PREFIX_A    3
  230.   
  231. + #ifdef NULL_MAP
  232. + #undef NULL_MAP
  233. + #endif /* NULL_MAP */
  234.   #define NULL_MAP    (struct cmd_map *)0
  235.   #define C_NULL        0
  236.   #define C_GOTO_MSG    1
  237. *** OLD/cmd_help    Thu May 12 21:14:24 1988
  238. --- cmd_help    Tue Jun 28 21:37:51 1988
  239. ***************
  240. *** 162,168 ****
  241.   
  242.   %sort_help%
  243.   usage: sort [-] [d | a | s | S | R]
  244. !   d         sort according to date received
  245.     a         author (alphabetical)
  246.     s         subject ignoring Re: as part of the subject
  247.     R         subject (alphabetical)
  248. --- 162,168 ----
  249.   
  250.   %sort_help%
  251.   usage: sort [-] [d | a | s | S | R]
  252. !   d         sort according to date
  253.     a         author (alphabetical)
  254.     s         subject ignoring Re: as part of the subject
  255.     R         subject (alphabetical)
  256. ***************
  257. *** 170,176 ****
  258.   The optional `-' flag will reverse the order of sorting
  259.   By default (no arguments), sort sorts messages by status:
  260.   New, unread messages are first, followed by preserved messages
  261. ! and finally the deleted messages are placed at the end
  262.   %%
  263.   
  264.   %pick%
  265. --- 170,180 ----
  266.   The optional `-' flag will reverse the order of sorting
  267.   By default (no arguments), sort sorts messages by status:
  268.   New, unread messages are first, followed by preserved messages
  269. ! and finally the deleted messages are placed at the end.
  270. ! If "date_received" is set, sorting by date is sorted by
  271. ! the date you received the message.  Otherwise, messages
  272. ! are sorted by date sent by the original author.
  273.   %%
  274.   
  275.   %pick%
  276. ***************
  277. *** 280,303 ****
  278.   
  279.   %headers%
  280.   usage: headers [+ | - | N] [-H:c]
  281. ! print out a screenful of headers.
  282. ! +  print the next screenful.
  283. ! -  print the previous screenful.
  284. ! N  (where N is a number) print a screenful starting at N.
  285. ! set show_deleted to list deleted messages.
  286. ! cmd h headers        look like UCB-Mail
  287. ! cmd H Headers        show deleted messages (or set show_deleted)
  288. ! cmd z headers +      `z' is next screenful
  289.   
  290. ! Arguments to the headers command include -H:c where `c' is one of
  291. !     n    just print messages headers of NEW messages
  292.       d    deleted messages
  293.       u    unread messages
  294.       o    old messages
  295. !     r    messages that have been replied to
  296.       a    all messages (mostly for the command line argument -H:c)
  297. ! piping to headers will print the headers of the "output" messages.
  298.   %%
  299.   
  300.   %hdr_format%
  301. --- 284,308 ----
  302.   
  303.   %headers%
  304.   usage: headers [+ | - | N] [-H:c]
  305. !      print out a screenful of headers.
  306.   
  307. ! Arguments include:
  308. !     +  print the next screenful (or use the 'z' command).
  309. !     -  print the previous screenful (or use 'z-' ).
  310. !     N  print a screenful starting at message number N.
  311. ! "set show_deleted" to list deleted messages.
  312. ! headers -H:c where `c' is one of
  313. !     n    new messages
  314.       d    deleted messages
  315.       u    unread messages
  316.       o    old messages
  317. !     r    replied-to messages
  318. !     s    saved messages
  319. !     p    preserved messages
  320.       a    all messages (mostly for the command line argument -H:c)
  321. ! The command, ":r" is equivalent to "headers -H:r"
  322.   %%
  323.   
  324.   %hdr_format%
  325. *** OLD/commands.c    Thu May 12 21:14:26 1988
  326. --- commands.c    Tue Jul  5 12:08:11 1988
  327. ***************
  328. *** 107,113 ****
  329.       }
  330.       if (x)
  331.       if (!strcmp(p, "top"))
  332. !         turnon(flg, TOP);
  333.       else if (*p == '+') {
  334.           turnon(flg, NO_PAGE);
  335.           turnon(flg, NO_HEADER);
  336. --- 107,113 ----
  337.       }
  338.       if (x)
  339.       if (!strcmp(p, "top"))
  340. !         turnon(flg, M_TOP);
  341.       else if (*p == '+') {
  342.           turnon(flg, NO_PAGE);
  343.           turnon(flg, NO_HEADER);
  344. ***************
  345. *** 124,130 ****
  346.                       isoff(msg[current_msg].m_flags, UNREAD))
  347.           current_msg++;
  348.       if (p && (*p == '-' || !strcmp(p, "previous"))) {
  349. !         while (--current_msg >= 0 && ison(msg[current_msg].m_flags, DELETE))
  350.           ;
  351.           if (current_msg < 0) {
  352.           print("No previous message.\n");
  353. --- 124,132 ----
  354.                       isoff(msg[current_msg].m_flags, UNREAD))
  355.           current_msg++;
  356.       if (p && (*p == '-' || !strcmp(p, "previous"))) {
  357. !         while (--current_msg >= 0 &&
  358. !         (ison(msg[current_msg].m_flags, DELETE) ||
  359. !          ison(msg[current_msg].m_flags, SAVED)))
  360.           ;
  361.           if (current_msg < 0) {
  362.           print("No previous message.\n");
  363. ***************
  364. *** 141,147 ****
  365.           /* "type" or "print" prints the current only -- "next" goes on.. */
  366.           if (!p || !*p || *p == 'n')
  367.           while (current_msg < msg_cnt &&
  368. !             ison(msg[current_msg].m_flags, DELETE))
  369.               current_msg++;
  370.           if (current_msg >= msg_cnt) {
  371.           print("No more messages.\n");
  372. --- 143,150 ----
  373.           /* "type" or "print" prints the current only -- "next" goes on.. */
  374.           if (!p || !*p || *p == 'n')
  375.           while (current_msg < msg_cnt &&
  376. !             (ison(msg[current_msg].m_flags, DELETE) ||
  377. !              ison(msg[current_msg].m_flags, SAVED)))
  378.               current_msg++;
  379.           if (current_msg >= msg_cnt) {
  380.           print("No more messages.\n");
  381. ***************
  382. *** 207,213 ****
  383.       register FILE    *pp;
  384.       register long     flags = 0;
  385.       char        print_cmd[128], *printer, c, *cmd;
  386. !     int            total = 0, (*oldint)(), (*oldquit)();
  387.   
  388.       turnon(flags, NO_IGNORE);
  389.       if (!(printer = do_set(set_options, "printer")) || !*printer)
  390. --- 210,217 ----
  391.       register FILE    *pp;
  392.       register long     flags = 0;
  393.       char        print_cmd[128], *printer, c, *cmd;
  394. !     int            total = 0;
  395. !     SIGRET        (*oldint)(), (*oldquit)();
  396.   
  397.       turnon(flags, NO_IGNORE);
  398.       if (!(printer = do_set(set_options, "printer")) || !*printer)
  399. ***************
  400. *** 319,345 ****
  401.       turnon(flg, NO_HEADER);
  402.       else
  403.       turnon(flg, UPDATE_STATUS);
  404. -     if (do_set(set_options, "keepsave"))
  405. -     firstchar = 'c';
  406.       for (n = msg_number = 0; msg_number < msg_cnt; msg_number++)
  407.       if (msg_bit(list, msg_number)) {
  408.               print("%sing msg %d... ",
  409.           (firstchar == 's')? "Sav" : "Writ", msg_number+1);
  410.           print_more("(%d lines)\n", copy_msg(msg_number, mail_fp, flg));
  411. -         /* only mark "deleted" if mailfile is /usr/spool/mail and
  412. -          * we're not "copying.  If keepsave is set, then firstchar
  413. -          * will have already been changed to 'c'
  414. -          */
  415. -         if (!strcmp(mailfile, spoolfile) && firstchar != 'c' &&
  416. -         isoff(glob_flags, READ_ONLY))
  417. -         turnon(msg[msg_number].m_flags, DELETE);
  418.           n++;
  419.       }
  420.       fclose(mail_fp);
  421.       print_more("%s %d msg%s to %s\n",
  422.           (*mode == 'a')? "Appended" : "Saved", n, (n != 1)? "s": "", file);
  423. -     if (!strcmp(mailfile, spoolfile))
  424. -     turnon(glob_flags, DO_UPDATE);
  425.   #ifdef SUNTOOL
  426.       if (istool) {
  427.       unlock_cursors();
  428. --- 323,342 ----
  429.       turnon(flg, NO_HEADER);
  430.       else
  431.       turnon(flg, UPDATE_STATUS);
  432.       for (n = msg_number = 0; msg_number < msg_cnt; msg_number++)
  433.       if (msg_bit(list, msg_number)) {
  434.               print("%sing msg %d... ",
  435.           (firstchar == 's')? "Sav" : "Writ", msg_number+1);
  436.           print_more("(%d lines)\n", copy_msg(msg_number, mail_fp, flg));
  437.           n++;
  438. +         if (isoff(msg[msg_number].m_flags, SAVED) && firstchar != 'c') {
  439. +         turnon(glob_flags, DO_UPDATE);
  440. +         turnon(msg[msg_number].m_flags, SAVED);
  441. +         }
  442.       }
  443.       fclose(mail_fp);
  444.       print_more("%s %d msg%s to %s\n",
  445.           (*mode == 'a')? "Appended" : "Saved", n, (n != 1)? "s": "", file);
  446.   #ifdef SUNTOOL
  447.       if (istool) {
  448.       unlock_cursors();
  449. ***************
  450. *** 414,420 ****
  451.       do  {
  452.       if (cdpath) {
  453.           char c;
  454. !         if (p2 = any(cdpath, " \t"))
  455.           c = *p2, *p2 = 0;
  456.           (void) sprintf(buf, "%s/%s", cdpath, p);
  457.           if (cdpath = p2) /* assign and compare to NULL */
  458. --- 411,417 ----
  459.       do  {
  460.       if (cdpath) {
  461.           char c;
  462. !         if (p2 = any(cdpath, " \t:"))
  463.           c = *p2, *p2 = 0;
  464.           (void) sprintf(buf, "%s/%s", cdpath, p);
  465.           if (cdpath = p2) /* assign and compare to NULL */
  466. ***************
  467. *** 514,520 ****
  468.       /* goto next available message if current was just deleted.
  469.        * If there are no more messages, turnoff prnt_next.
  470.        */
  471. !     if (!iscurses && !undel && ison(msg[current_msg].m_flags, DELETE))
  472.       next_msg();
  473.   
  474.       if (prnt_next && !undel && !iscurses)
  475. --- 511,519 ----
  476.       /* goto next available message if current was just deleted.
  477.        * If there are no more messages, turnoff prnt_next.
  478.        */
  479. !     if (!iscurses && !undel &&
  480. !     ison(msg[current_msg].m_flags, DELETE) ||
  481. !     ison(msg[current_msg].m_flags, SAVED))
  482.       next_msg();
  483.   
  484.       if (prnt_next && !undel && !iscurses)
  485. ***************
  486. *** 602,612 ****
  487.       error(buf);
  488.       return -1;
  489.       }
  490. !     turnon(glob_flags, IGN_SIGS);
  491. !     while (fgets(buf, 127, pp))
  492. !     wprint(buf);
  493.       (void) pclose(pp);
  494. !     turnoff(glob_flags, IGN_SIGS);
  495.       return 0;
  496.   }
  497.   
  498. --- 601,611 ----
  499.       error(buf);
  500.       return -1;
  501.       }
  502. !     (void) do_pager(NULL, TRUE);
  503. !     while (fgets(buf, 127, pp) && do_pager(buf, FALSE) != EOF)
  504. !     ;
  505.       (void) pclose(pp);
  506. !     (void) do_pager(NULL, FALSE);
  507.       return 0;
  508.   }
  509.   
  510. *** OLD/curs_io.c    Fri Jun 10 12:38:09 1988
  511. --- curs_io.c    Tue Jun 28 21:37:56 1988
  512. ***************
  513. *** 54,59 ****
  514. --- 54,61 ----
  515.       register int c, literal_next = FALSE;
  516.       int count = offset;
  517.   
  518. +     fflush(stdout); /* make sure everything is flushed before getting input */
  519.       while ((c = getchar()) != '\n' && c != '\r' && c != EOF &&
  520.       isoff(glob_flags, WAS_INTR)) {
  521.       /* echo isn't set, so whatever the character, enter it */
  522. *** OLD/curses.c    Thu May 12 21:14:28 1988
  523. --- curses.c    Tue Jun 28 21:37:59 1988
  524. ***************
  525. *** 341,347 ****
  526.               (c == C_DELETE_MSG || c == C_DELETE_LIST)? "":"un", list);
  527.               putchar('\n');
  528.           }
  529. !         if (ison(msg[current_msg].m_flags, DELETE))
  530.               (void) next_msg();
  531.           if (isoff(msg[current_msg].m_flags, DELETE) &&
  532.               do_set(set_options, "autoprint"))
  533. --- 341,348 ----
  534.               (c == C_DELETE_MSG || c == C_DELETE_LIST)? "":"un", list);
  535.               putchar('\n');
  536.           }
  537. !         if (ison(msg[current_msg].m_flags, DELETE) ||
  538. !             ison(msg[current_msg].m_flags, SAVED))
  539.               (void) next_msg();
  540.           if (isoff(msg[current_msg].m_flags, DELETE) &&
  541.               do_set(set_options, "autoprint"))
  542. ***************
  543. *** 471,477 ****
  544.       /* change to a new folder */
  545.       when C_FOLDER :
  546.           for (;;) {
  547. !         int (*oldint)(), (*oldquit)();
  548.           on_intr();
  549.           print("New folder (?=list): ");
  550.           c = Getstr(file, COLS-22, 0);
  551. --- 472,478 ----
  552.       /* change to a new folder */
  553.       when C_FOLDER :
  554.           for (;;) {
  555. !         SIGRET (*oldint)(), (*oldquit)();
  556.           on_intr();
  557.           print("New folder (?=list): ");
  558.           c = Getstr(file, COLS-22, 0);
  559. ***************
  560. *** 718,724 ****
  561.       int n;
  562.   
  563.       for (n = 0; n < COLS; n++)
  564. !     if ((buf = mvinch(line, n) & A_CHARTEXT) == '\0')
  565.           break;
  566.       buf[n] = '\0';
  567.   #endif /* A_CHARTEXT */
  568. --- 719,725 ----
  569.       int n;
  570.   
  571.       for (n = 0; n < COLS; n++)
  572. !     if ((buf[n] = (mvinch(line, n) & A_CHARTEXT)) == '\0')
  573.           break;
  574.       buf[n] = '\0';
  575.   #endif /* A_CHARTEXT */
  576. *** OLD/dates.c    Wed Mar  9 12:26:28 1988
  577. --- dates.c    Tue Jun 28 21:37:59 1988
  578. ***************
  579. *** 80,92 ****
  580.        */
  581.   
  582.       /* else, get the "date" line, if that fails, get the date in "From" line */
  583. !     if ((p = header_field(n, "date")) && (p2 = parse_date(p)))
  584.       return p2;
  585.   
  586. !     (void) fseek(tmpf, msg[n].m_offset, L_SET);
  587. !     (void) fgets(line, BUFSIZ, tmpf);
  588. !     if (!(p = index(line, ' ')) || !(p2 = index(p+1, ' ')))
  589.       return NULL;
  590.       p = p2;
  591.   
  592.       if (!(p2 = parse_date(p)))
  593. --- 80,97 ----
  594.        */
  595.   
  596.       /* else, get the "date" line, if that fails, get the date in "From" line */
  597. !     if (
  598. ! #ifndef MSG_SEPARATOR
  599. !     isoff(glob_flags, DATE_RECV) &&
  600. ! #endif /* MSG_SEPARATOR */
  601. !     (p = header_field(n, "date")) && (p2 = parse_date(p)))
  602.       return p2;
  603.   
  604. ! #ifndef MSG_SEPARATOR
  605. !     if (fseek(tmpf, msg[n].m_offset, L_SET) == -1 || !fgets(line, BUFSIZ, tmpf)
  606. !     || !(p = index(line, ' ')) || !(p2 = index(p+1, ' ')))
  607.       return NULL;
  608. + #endif /* MSG_SEPARATOR */
  609.       p = p2;
  610.   
  611.       if (!(p2 = parse_date(p)))
  612. *** OLD/doproc.c    Sat Apr  2 16:13:34 1988
  613. --- doproc.c    Tue Jun 28 21:38:00 1988
  614. ***************
  615. *** 192,198 ****
  616.           print("Type in Main Panel Window a filename to save message");
  617.           return;
  618.           }
  619. !     else if (value <= 1) {
  620.           register char *p = panel_get_value(file_item);
  621.           register char *p2 = panel_get_value(msg_num_item);
  622.           if ((!p || !*p) && (!(p = do_set(set_options, "mbox")) || !*p))
  623. --- 192,198 ----
  624.           print("Type in Main Panel Window a filename to save message");
  625.           return;
  626.           }
  627. !     else if (value == 0) {
  628.           register char *p = panel_get_value(file_item);
  629.           register char *p2 = panel_get_value(msg_num_item);
  630.           if ((!p || !*p) && (!(p = do_set(set_options, "mbox")) || !*p))
  631. *** OLD/execute.c    Fri Jun 10 12:38:11 1988
  632. --- execute.c    Tue Jun 28 21:38:01 1988
  633. ***************
  634. *** 22,30 ****
  635.       union wait status;
  636.   #endif /* SYSV */
  637.   #ifdef SIGCONT
  638. !     int    (*oldstop)(), (*oldcont)();
  639.   #endif /* SIGCONT */
  640. !     int pid, (*oldint)(), (*oldquit)();
  641.   
  642.   #ifdef SUNTOOL
  643.       if (istool) {
  644. --- 22,31 ----
  645.       union wait status;
  646.   #endif /* SYSV */
  647.   #ifdef SIGCONT
  648. !     SIGRET (*oldstop)(), (*oldcont)();
  649.   #endif /* SIGCONT */
  650. !     int pid;
  651. !     SIGRET (*oldint)(), (*oldquit)();
  652.   
  653.   #ifdef SUNTOOL
  654.       if (istool) {
  655. ***************
  656. *** 81,86 ****
  657. --- 82,88 ----
  658.       turnoff(glob_flags, IGN_SIGS);
  659.   }
  660.   
  661. + SIGRET
  662.   sigchldcatcher()
  663.   {
  664.   #ifdef SUNTOOL
  665. *** OLD/hdrs.c    Thu Apr 28 22:48:02 1988
  666. --- hdrs.c    Tue Jul  5 12:46:40 1988
  667. ***************
  668. *** 51,57 ****
  669.   register char **argv, list[];
  670.   {
  671.       register int   pageful = 0, fnd;
  672. !     int        (*oldint)(), (*oldquit)(), show_deleted;
  673.       static int     cnt;
  674.       register char  *p;
  675.       char        first_char = (argc) ? **argv: 'h';
  676. --- 51,58 ----
  677.   register char **argv, list[];
  678.   {
  679.       register int   pageful = 0, fnd;
  680. !     SIGRET        (*oldint)(), (*oldquit)();
  681. !     int           show_deleted;
  682.       static int     cnt;
  683.       register char  *p;
  684.       char        first_char = (argc) ? **argv: 'h';
  685. ***************
  686. *** 191,197 ****
  687.           when 'o': special = OLD;
  688.           when 'd': special = DELETE;
  689.           when 'r': special = REPLIED;
  690. !         otherwise: print("choose from n,u,o,d,r, or a"); return -1;
  691.       }
  692.       if (debug)
  693.       (void) check_flags(special);
  694. --- 192,200 ----
  695.           when 'o': special = OLD;
  696.           when 'd': special = DELETE;
  697.           when 'r': special = REPLIED;
  698. !         when 's': special = SAVED;
  699. !         when 'p': special = PRESERVE;
  700. !         otherwise: print("choose from n,u,o,d,r,s,p or a"); return -1;
  701.       }
  702.       if (debug)
  703.       (void) check_flags(special);
  704. ***************
  705. *** 249,267 ****
  706.   char *
  707.   compose_hdr(cnt)
  708.   {
  709. !     static char buf[256];
  710. !     register char *p, *b;
  711. !     char from[256], subject[256], date[17], lines[16], chars[16], line[256];
  712.       char to[256], addr[256], name[256], status[2];
  713. !     char Day[3], Mon[4], Tm[8], Yr[5], Wkday[4], *date_p;
  714.   
  715.       /* status of the message */
  716.       if (ison(msg[cnt].m_flags, DELETE))
  717.       status[0] = '*';
  718. -     else if (ison(msg[cnt].m_flags, OLD) && ison(msg[cnt].m_flags, UNREAD))
  719. -     status[0] = 'U';
  720.       else if (ison(msg[cnt].m_flags, PRESERVE))
  721.       status[0] = 'P';
  722.       else if (isoff(msg[cnt].m_flags, UNREAD))
  723.       status[0] = ' ';
  724.       else
  725. --- 252,273 ----
  726.   char *
  727.   compose_hdr(cnt)
  728.   {
  729. !     static char        buf[256];
  730. !     register char    *p, *p2, *b;
  731. !     int            len, do_pad = FALSE, val, pad, got_dot, isauthor = 0;
  732. !     char from[256], subject[256], date[17], lines[16], chars[16];
  733.       char to[256], addr[256], name[256], status[2];
  734. !     char Day[3], Mon[4], Tm[8], Yr[5], Wkday[4], *date_p, *p3;
  735.   
  736.       /* status of the message */
  737.       if (ison(msg[cnt].m_flags, DELETE))
  738.       status[0] = '*';
  739.       else if (ison(msg[cnt].m_flags, PRESERVE))
  740.       status[0] = 'P';
  741. +     else if (ison(msg[cnt].m_flags, SAVED))
  742. +     status[0] = 'S';
  743. +     else if (ison(msg[cnt].m_flags, OLD) && ison(msg[cnt].m_flags, UNREAD))
  744. +     status[0] = 'U';
  745.       else if (isoff(msg[cnt].m_flags, UNREAD))
  746.       status[0] = ' ';
  747.       else
  748. ***************
  749. *** 273,279 ****
  750.       status[1] = ' ';
  751.   
  752.       to[0] = from[0] = subject[0] = date[0] = lines[0] = chars[0] = addr[0] =
  753. !     name[0] = line[0] = Day[0] = Mon[0] = Tm[0] = Yr[0] = Wkday[0] = 0;
  754.   
  755.       /* who's the message to */
  756.       if ((p = header_field(cnt, "to")) ||
  757. --- 279,285 ----
  758.       status[1] = ' ';
  759.   
  760.       to[0] = from[0] = subject[0] = date[0] = lines[0] = chars[0] = addr[0] =
  761. !     name[0] = Day[0] = Mon[0] = Tm[0] = Yr[0] = Wkday[0] = 0;
  762.   
  763.       /* who's the message to */
  764.       if ((p = header_field(cnt, "to")) ||
  765. ***************
  766. *** 281,306 ****
  767.       (p = header_field(cnt, "apparently-to")))
  768.       Strncpy(to, p);
  769.   
  770. !     /* who the messages is from--
  771. !      * %f        From field
  772. !      * %a        From address
  773. !      * %n        From name
  774.        */
  775.       if (!(p = header_field(cnt, "from"))) {
  776. !     /* if all else fails, then get the first token in "From" line */
  777. !     register char *p2;
  778. !     p = ""; /* just in case */
  779. !     if (fseek(tmpf, msg[cnt].m_offset, L_SET) == -1 ||
  780. !         !(p2 = fgets(line, sizeof(line), tmpf))) {
  781. !         error("fseek in %s (msg %d, folder=%s)", tempfile, cnt+1, mailfile);
  782. !         turnon(glob_flags, READ_ONLY);
  783. !     } else if (!(p = index(p2, ' ')))
  784. !         print("Fudged \"From\" line: %s", p2);
  785. !     else if (p2 = any(++p, " \t"))
  786. !         *p2 = 0;
  787.       }
  788. !     skipspaces(0);
  789. !     (void) no_newln(p);
  790.       /* if the "from" line produced the user's login name, then the message is
  791.        * from the user -- attempt to give more useful information by telling
  792.        * to whom the message was sent.  This is not possible if the "to" header
  793. --- 287,321 ----
  794.       (p = header_field(cnt, "apparently-to")))
  795.       Strncpy(to, p);
  796.   
  797. !     /*
  798. !      * Read the "From " line first. If it's from us, login's will match.
  799. !      * Also, we have the date received at our disposal.
  800.        */
  801. + #ifndef MSG_SEPARATOR
  802. +     p = ""; /* just in case */
  803. +     if (fseek(tmpf, msg[cnt].m_offset, L_SET) == -1 ||
  804. +     !(p2 = fgets(from, sizeof(from), tmpf))) {
  805. +     error("fseek in %s (msg %d, folder=%s)", tempfile, cnt+1, mailfile);
  806. +     turnon(glob_flags, READ_ONLY);
  807. +     } else if (!(p = index(p2, ' ')))
  808. +     print("Fudged \"From\" line: %s", p2);
  809. +     else {
  810. +     skipspaces(1);
  811. +     if (p2 = any(p, " \t")) {
  812. +         /* p now points to null terminated login name */
  813. +         for (*p2++ = 0; isspace(*p2); p2++)
  814. +         ; /* p2 points to date received */
  815. +         Strncpy(buf, p2); /* buf is only used till "date" is filled */
  816. +         p2 = buf;
  817. +     }
  818. +     }
  819. + #else
  820.       if (!(p = header_field(cnt, "from"))) {
  821. !     wprint("Error in msg %d's format. No \"From:\" line.\n", cnt+1);
  822. !     return "               "; /* Real bad news here.... */
  823.       }
  824. ! #endif /* MSG_SEPARATOR */
  825.       /* if the "from" line produced the user's login name, then the message is
  826.        * from the user -- attempt to give more useful information by telling
  827.        * to whom the message was sent.  This is not possible if the "to" header
  828. ***************
  829. *** 307,325 ****
  830.        * failed to get info (which is probably impossible).
  831.        */
  832.       if (!strcmp(p, login) && *to) {
  833. !     (void) strcpy(from, "TO: ");
  834. !     (void) strncpy(from+4, to, sizeof(from)-4), from[sizeof(from)-4] = 0;
  835. !     (void) get_name_n_addr(from+4, name+4, addr+4);
  836. !     if (name[4])
  837. !         (void) strncpy(name,"TO: ",4); /* strncpy doesn't null terminate */
  838.       if (addr[4])
  839. !         (void) strncpy(addr,"TO: ",4); /* don't overwrite name there */
  840.       } else {
  841. !     Strncpy(from, p);
  842.       (void) get_name_n_addr(from, name, addr);
  843.       }
  844.   
  845. !     if (date_p = msg_date(cnt))
  846.       /* don't take weekday unless specified explicitly.  See 'D' below */
  847.       date_to_string(date_p, Yr, Mon, Day, NULL, Tm, date);
  848.   
  849. --- 322,355 ----
  850.        * failed to get info (which is probably impossible).
  851.        */
  852.       if (!strcmp(p, login) && *to) {
  853. !     isauthor = TRUE;
  854. !     (void) get_name_n_addr(to, name+4, addr+4);
  855.       if (addr[4])
  856. !         (void) strncpy(addr, "TO: ", 4);
  857. !     if (name[4]) {  /* check to see if a name got added */
  858. !         (void) strncpy(name, "TO: ", 4);
  859. !         Strncpy(from, name);
  860. !     } else
  861. !         Strncpy(from, addr);
  862.       } else {
  863. ! #ifndef MSG_SEPARATOR
  864. !     if (p = header_field(cnt, "from"))
  865. ! #endif /* MSG_SEPARATOR */
  866. !         Strncpy(from, p);
  867.       (void) get_name_n_addr(from, name, addr);
  868.       }
  869.   
  870. ! #ifndef MSG_SEPARATOR
  871. !     /* hackers note: p2 already points to a ctime(3) string with weekday
  872. !      * name and month and all that -- I'm inefficiently converting to
  873. !      * a different format just to be converted back again later. Change this.
  874. !      */
  875. !     if (ison(glob_flags, DATE_RECV))
  876. !     date_p = parse_date(p2);
  877. !     else
  878. ! #endif /* MSG_SEPARATOR */
  879. !     date_p = msg_date(cnt);
  880. !     if (date_p)
  881.       /* don't take weekday unless specified explicitly.  See 'D' below */
  882.       date_to_string(date_p, Yr, Mon, Day, NULL, Tm, date);
  883.   
  884. ***************
  885. *** 357,364 ****
  886.       else if (*p == '%') {
  887.           char fmt[64];
  888.           register char *p2 = fmt;
  889. -         int len, got_dot = FALSE;
  890.   
  891.           *p2++ = '%';
  892.           if (p[1] != '-')
  893.           *p2++ = '-';
  894. --- 387,395 ----
  895.       else if (*p == '%') {
  896.           char fmt[64];
  897.           register char *p2 = fmt;
  898.   
  899. +         /* first check for string padding: %5n, %.4a, %10.5f, %-.3l etc. */
  900. +         do_pad = pad = val = got_dot = 0;
  901.           *p2++ = '%';
  902.           if (p[1] != '-')
  903.           *p2++ = '-';
  904. ***************
  905. *** 366,389 ****
  906.           *++p;
  907.           while (isdigit(*++p) || !got_dot && *p == '.') {
  908.           if (*p == '.')
  909. !             got_dot = TRUE;
  910.           *p2++ = *p;
  911.           }
  912.           if (!got_dot && isdigit(p[-1])) {
  913. -         int val;
  914.           *p2 = 0; /* assure null termination */
  915.           val = atoi(fmt+1);
  916. !         p2 += strlen(sprintf(p2, ".%d", (val >= 0 ? val : -val)));
  917.           }
  918.           *p2++ = 's', *p2 = 0;
  919.           switch (*p) {
  920. !         case 'f': p2 = from;
  921.           when 'a':
  922.               if (!*(p2 = addr))
  923.               p2 = from;
  924.           when 'n':
  925.               if (!*(p2 = name))
  926. !             p2 = from;
  927.           when '%': p2 = "%";
  928.           when 't': p2 = to;
  929.           when 's': p2 = subject;
  930. --- 397,425 ----
  931.           *++p;
  932.           while (isdigit(*++p) || !got_dot && *p == '.') {
  933.           if (*p == '.')
  934. !             got_dot = TRUE, val = pad, pad = 0;
  935. !         else
  936. !             pad = pad * 10 + *p - '0';
  937.           *p2++ = *p;
  938.           }
  939.           if (!got_dot && isdigit(p[-1])) {
  940.           *p2 = 0; /* assure null termination */
  941.           val = atoi(fmt+1);
  942. !         if (val < 0)
  943. !             val = -val;
  944. !         p2 += strlen(sprintf(p2, ".%d", val));
  945.           }
  946. +         pad = min(pad, val);
  947.           *p2++ = 's', *p2 = 0;
  948.           switch (*p) {
  949. !         case 'f': p2 = from, do_pad = TRUE;
  950.           when 'a':
  951.               if (!*(p2 = addr))
  952.               p2 = from;
  953. +             do_pad = TRUE;
  954.           when 'n':
  955.               if (!*(p2 = name))
  956. !             p2 = from, do_pad = TRUE;
  957.           when '%': p2 = "%";
  958.           when 't': p2 = to;
  959.           when 's': p2 = subject;
  960. ***************
  961. *** 406,411 ****
  962. --- 442,465 ----
  963.           }
  964.           otherwise: continue; /* unknown formatting char */
  965.           }
  966. +         if (do_pad && pad && strlen(p2) > pad) {
  967. +         char *old_p2 = p2;
  968. +         /* if addr is too long, move pointer forward till the
  969. +          * "important" part is readable only for ! paths/addresses.
  970. +          */
  971. +         while (p3 = index(p2, '!')) {
  972. +             p2 = p3+1;
  973. +             if (strlen(p2) + isauthor*4 < pad) {
  974. +             if (isauthor && (p2 -= 4) < old_p2)
  975. +                 p2 = old_p2;
  976. +             break;
  977. +             }
  978. +         }
  979. +         if (isauthor && p2 > old_p2+4 && !p3 && strlen(p2) + 4 > pad)
  980. +             p2 -= 4;
  981. +         if (old_p2 != p2 && isauthor)
  982. +             (void) strncpy(p2, "TO: ", 4); /* doesn't null terminate */
  983. +         }
  984.           len = strlen(sprintf(b, fmt, p2));
  985.           cnt += len, b += len;
  986.           /* Get around a bug in 5.5 IBM RT which pads with NULL's not ' ' */
  987. ***************
  988. *** 816,836 ****
  989.       else if (*addr && Alts && *Alts && chk_two_lists(login,addr, "!@%=")) {
  990.           /* To be in this block, there must be a remote address */
  991.           i = 0; /* initialize 'i' in case while loop is skipped */
  992. - #ifndef SYSV
  993.           /* see if the hostnames match our hostname. */
  994.           while (i < MAX_HOST_NAMES && ourname[i])
  995.           if (chk_two_lists(addr, ourname[i++], "!@%="))
  996.               break;
  997. - #endif /* SYSV */
  998.           /* If one of the hostnames in the address is one of user's
  999.            * hostnames, remove this address. If the alternates
  1000.            * hostnames listed contains a hostname in the address, remove
  1001.            * from the list.
  1002.            */
  1003. !         if (
  1004. ! #ifndef SYSV
  1005. !         i < MAX_HOST_NAMES && ourname[i] ||
  1006. ! #endif /* SYSV */
  1007.           *Alts == '*' || !chk_two_lists(addr, Alts, "!@%= \t,"))
  1008.               rm_me = TRUE;
  1009.       }
  1010. --- 870,885 ----
  1011.       else if (*addr && Alts && *Alts && chk_two_lists(login,addr, "!@%=")) {
  1012.           /* To be in this block, there must be a remote address */
  1013.           i = 0; /* initialize 'i' in case while loop is skipped */
  1014.           /* see if the hostnames match our hostname. */
  1015.           while (i < MAX_HOST_NAMES && ourname[i])
  1016.           if (chk_two_lists(addr, ourname[i++], "!@%="))
  1017.               break;
  1018.           /* If one of the hostnames in the address is one of user's
  1019.            * hostnames, remove this address. If the alternates
  1020.            * hostnames listed contains a hostname in the address, remove
  1021.            * from the list.
  1022.            */
  1023. !         if (i < MAX_HOST_NAMES && ourname[i] ||
  1024.           *Alts == '*' || !chk_two_lists(addr, Alts, "!@%= \t,"))
  1025.               rm_me = TRUE;
  1026.       }
  1027. *** OLD/init.c    Thu Apr  7 22:46:51 1988
  1028. --- init.c    Tue Jun 28 21:38:07 1988
  1029. ***************
  1030. *** 101,113 ****
  1031.   #include <netdb.h>
  1032.   #endif /* BSD */
  1033.   
  1034.   void
  1035.   init()
  1036.   {
  1037. !     char         *home;
  1038.       extern char        *getlogin();
  1039.   #ifdef SYSV
  1040.       extern struct passwd *getpwuid();  /* sys-v forgot this in pwd.h! */
  1041.   #else
  1042.       char ourhost[128];
  1043.   #endif /* SYSV */
  1044. --- 101,119 ----
  1045.   #include <netdb.h>
  1046.   #endif /* BSD */
  1047.   
  1048. + #ifdef SYSV
  1049. + #include <sys/utsname.h>
  1050. + #endif /* SYSV */
  1051.   void
  1052.   init()
  1053.   {
  1054. !     char         *home, *realname;
  1055.       extern char        *getlogin();
  1056. +     char        buf[MAXPATHLEN];
  1057.   #ifdef SYSV
  1058.       extern struct passwd *getpwuid();  /* sys-v forgot this in pwd.h! */
  1059. +     struct utsname ourhost;
  1060.   #else
  1061.       char ourhost[128];
  1062.   #endif /* SYSV */
  1063. ***************
  1064. *** 118,124 ****
  1065.       struct hostent     *hp;
  1066.   #endif /* BSD */
  1067.   
  1068. !     home = getenv ("HOME");
  1069.   
  1070.       if (!(entry = getpwuid(getuid())))
  1071.       if (p = getlogin())
  1072. --- 124,131 ----
  1073.       struct hostent     *hp;
  1074.   #endif /* BSD */
  1075.   
  1076. !     home = getenv("HOME");
  1077. !     realname = getenv("NAME");
  1078.   
  1079.       if (!(entry = getpwuid(getuid())))
  1080.       if (p = getlogin())
  1081. ***************
  1082. *** 131,136 ****
  1083. --- 138,147 ----
  1084.       strdup(login, entry->pw_name);
  1085.       if (!home || !*home)
  1086.           home = entry->pw_dir;
  1087. +     if (!realname && (realname = entry->pw_gecos)) {
  1088. +         if (p = index(realname, ','))
  1089. +         *p = 0;
  1090. +     }
  1091.       endpwent();
  1092.       }
  1093.       if (!home || !*home || Access(home, W_OK)) {
  1094. ***************
  1095. *** 139,154 ****
  1096.       else
  1097.           print("No home!? ");
  1098.       print_more("Using \"%s\" as home.\n", ALTERNATE_HOME);
  1099. !     } else {
  1100. !     char buf[MAXPATHLEN];
  1101. !     cmd_line(sprintf(buf, "set home=\"%s\"", home), msg_list);
  1102. !     }
  1103.       crt = 25;
  1104.       screen = 18;
  1105.       escape = DEF_ESCAPE;
  1106.       prompt = DEF_PROMPT;
  1107.   
  1108. ! #ifndef SYSV
  1109.       (void) gethostname(ourhost, sizeof ourhost);
  1110.       if (!(hp = gethostbyname(ourhost)))
  1111.       error("gethostbyname: %s", ourhost);
  1112. --- 150,165 ----
  1113.       else
  1114.           print("No home!? ");
  1115.       print_more("Using \"%s\" as home.\n", ALTERNATE_HOME);
  1116. !     } else
  1117. !     (void) cmd_line(sprintf(buf,"set home=\"%s\"", home), msg_list);
  1118. !     if (realname)
  1119. !     (void) cmd_line(sprintf(buf,"set realname=\"%s\"", realname), msg_list);
  1120.       crt = 25;
  1121.       screen = 18;
  1122.       escape = DEF_ESCAPE;
  1123.       prompt = DEF_PROMPT;
  1124.   
  1125. ! #ifdef BSD
  1126.       (void) gethostname(ourhost, sizeof ourhost);
  1127.       if (!(hp = gethostbyname(ourhost)))
  1128.       error("gethostbyname: %s", ourhost);
  1129. ***************
  1130. *** 156,166 ****
  1131. --- 167,185 ----
  1132.             p = hp->h_aliases[cnt++])
  1133.       ourname[cnt] = savestr(p);
  1134.       endhostent();
  1135. + #endif /* BSD */
  1136. + #ifdef SYSV
  1137. +     if (uname (&ourhost) >= 0)
  1138. +     ourname[0] = savestr(ourhost.nodename);
  1139.   #endif /* SYSV */
  1140.   
  1141.   #ifdef CURSES
  1142.       init_bindings();
  1143.   #endif /* CURSES */
  1144. +     if (ourname[0])
  1145. +     (void) cmd_line(sprintf(buf,
  1146. +             "set hostname=\"%s\"", ourname[0]), msg_list);
  1147.   }
  1148.   
  1149.   /*
  1150. ***************
  1151. *** 274,299 ****
  1152.           goto bad;
  1153.           }
  1154.           /* "lhs" is the left hand side of the equation
  1155. !          * In this instance, we're doing case 2 above.
  1156.            */
  1157.           if (*lhs == '!') {
  1158. -         int tmp = argc;
  1159.           equals = FALSE;
  1160. !         if (!*++lhs)
  1161. !             if (!(lhs = newargv[2])) {
  1162. !             print("%s: %d: syntax error: \"if ! <what?>\"\n",
  1163. !                 file, line_no);
  1164. !             goto bad;
  1165. !             } else
  1166. !             tmp--;
  1167. !         if (tmp > 2) {
  1168. !             print("%s: %d: syntax error: \"if !<expr> <more junk>\"\n",
  1169.               file, line_no);
  1170.               goto bad;
  1171.           }
  1172. !         } else if (argc > 2) {
  1173.           if (argc != 4) {
  1174. !             print("%s: %d: argument count error: line has %d args.\n",
  1175.               file, line_no, argc);
  1176.               goto bad;
  1177.           }
  1178. --- 293,327 ----
  1179.           goto bad;
  1180.           }
  1181.           /* "lhs" is the left hand side of the equation
  1182. !          * In this instance, we're doing case 2 above (check for negation).
  1183.            */
  1184.           if (*lhs == '!') {
  1185.           equals = FALSE;
  1186. !         if (!*++lhs && !(lhs = newargv[2])) {
  1187. !             print("%s: line %d: syntax error: \"if ! <what?>\"\n",
  1188.               file, line_no);
  1189.               goto bad;
  1190.           }
  1191. !         }
  1192. !         if (*lhs == '-' && (lhs[1] == 'e' || lhs[1] == 'z') && !lhs[2]) {
  1193. !         char *path;
  1194. !         int n = 1; /* ignore ENOENT, I'll handle it here */
  1195. !         struct stat statb;
  1196. !         /* check for existence or zero-length folders/files */
  1197. !         if (argc > 4) {
  1198. !             print("%s: line %d: if %s \"filename\"\n",
  1199. !             file, line_no, lhs);
  1200. !             goto bad;
  1201. !         }
  1202. !         path = getpath(newargv[argc-1], &n);
  1203. !         parsing = !equals ^ (n == -1 || n == 1 && lhs[1] == 'e' ||
  1204. !             !stat(path, &statb) && (lhs[1] == 'e' || !statb.st_size));
  1205. !         goto bad; /* it's not bad, but we're done anyway */
  1206. !         }
  1207. !         if (equals && argc > 2) {
  1208.           if (argc != 4) {
  1209. !             print("%s: %d: argument count error: %d args.\n",
  1210.               file, line_no, argc);
  1211.               goto bad;
  1212.           }
  1213. ***************
  1214. *** 301,307 ****
  1215.           if (!strcmp(newargv[2], "!="))
  1216.               equals = FALSE;
  1217.           else if (strcmp(newargv[2], "==")) {
  1218. !             print("%s: %d: use `==' or `!=' only.\n", file, line_no);
  1219.               goto bad;
  1220.           }
  1221.           rhs = newargv[3];
  1222. --- 329,335 ----
  1223.           if (!strcmp(newargv[2], "!="))
  1224.               equals = FALSE;
  1225.           else if (strcmp(newargv[2], "==")) {
  1226. !             print("%s: %d: use `==' or `!=' only.\n", file,line_no);
  1227.               goto bad;
  1228.           }
  1229.           rhs = newargv[3];
  1230. *** OLD/loop.c    Thu May 12 21:14:31 1988
  1231. --- loop.c    Tue Jun 28 21:38:08 1988
  1232. ***************
  1233. *** 58,64 ****
  1234.                  SIG_DFL
  1235.   #endif /* SYSV */
  1236.                  );
  1237. -     (void) signal(SIGPIPE, SIG_IGN); /* if pager is terminated before end */
  1238.   
  1239.       turnoff(glob_flags, IGN_SIGS);
  1240.       if (hist_size == 0) /* if user didn't set history in .rc file */
  1241. --- 58,63 ----
  1242. ***************
  1243. *** 877,882 ****
  1244. --- 876,886 ----
  1245.       register int    list_num = TRUE, num_of_hists = hist_size;
  1246.       register int    reverse = FALSE;
  1247.       struct history    *hist = hist_tail;
  1248. +     if (!hist) {
  1249. +     print("No history yet.\n");
  1250. +     return;
  1251. +     }
  1252.   
  1253.       while (*++argv && *argv[0] == '-') {
  1254.       n = 1;
  1255. *** OLD/mail.c    Mon Jun 13 15:38:27 1988
  1256. --- mail.c    Tue Jul  5 22:48:43 1988
  1257. ***************
  1258. *** 32,38 ****
  1259.   static char Subject[BUFSIZ],To[BUFSIZ],Cc[BUFSIZ],Bcc[BUFSIZ],in_reply_to[256];
  1260.   static int killme;
  1261.   static u_long flags;
  1262. ! static int (*oldterm)(), (*oldint)(), (*oldquit)();
  1263.   static void send_it();
  1264.   static jmp_buf cntrl_c_buf;
  1265.   FILE *ed_fp;
  1266. --- 32,38 ----
  1267.   static char Subject[BUFSIZ],To[BUFSIZ],Cc[BUFSIZ],Bcc[BUFSIZ],in_reply_to[256];
  1268.   static int killme;
  1269.   static u_long flags;
  1270. ! static SIGRET (*oldterm)(), (*oldint)(), (*oldquit)();
  1271.   static void send_it();
  1272.   static jmp_buf cntrl_c_buf;
  1273.   FILE *ed_fp;
  1274. ***************
  1275. *** 155,161 ****
  1276.       turnoff(flgs, NEW_SUBJECT);
  1277.       if (subj = subject_to(current_msg, buf))
  1278.           subj = strcpy(Subject, buf + 4*(lower(firstchar) != 'r'));
  1279. !     } else if (isoff(flgs, NEW_SUBJECT) && do_set(set_options, "ask"))
  1280.       turnon(flgs, NEW_SUBJECT);
  1281.       if (argv && *argv) {
  1282.       char buf[BUFSIZ];
  1283. --- 155,162 ----
  1284.       turnoff(flgs, NEW_SUBJECT);
  1285.       if (subj = subject_to(current_msg, buf))
  1286.           subj = strcpy(Subject, buf + 4*(lower(firstchar) != 'r'));
  1287. !     } else if (isoff(flgs, NEW_SUBJECT) &&
  1288. !     (do_set(set_options, "ask") || do_set(set_options, "asksub")))
  1289.       turnon(flgs, NEW_SUBJECT);
  1290.       if (argv && *argv) {
  1291.       char buf[BUFSIZ];
  1292. ***************
  1293. *** 163,169 ****
  1294.       fix_up_addr(buf);
  1295.       to = &To[strlen(To)];
  1296.       if (*To)
  1297. !         to += Strcpy(to-1, ", ") - 1;
  1298.       (void) strcpy(to, buf);
  1299.       to = To;
  1300.       }
  1301. --- 164,170 ----
  1302.       fix_up_addr(buf);
  1303.       to = &To[strlen(To)];
  1304.       if (*To)
  1305. !         *to++ = ',', *to++ = ' ';
  1306.       (void) strcpy(to, buf);
  1307.       to = To;
  1308.       }
  1309. ***************
  1310. *** 410,416 ****
  1311.        */
  1312.       (void) setjmp(cntrl_c_buf);
  1313.       while (Getstr(line, sizeof(line), 0) > -1) {
  1314. !         (void) check_new_mail(); /* if new mail comes in, get it */
  1315.           if ((i = add_to_letter(line)) <= 0)
  1316.           break;
  1317.       }
  1318. --- 411,418 ----
  1319.        */
  1320.       (void) setjmp(cntrl_c_buf);
  1321.       while (Getstr(line, sizeof(line), 0) > -1) {
  1322. !         if (!istool) /* toolmode checks on a timer -- don't do it here */
  1323. !         (void) check_new_mail(); /* if new mail comes in, get it */
  1324.           if ((i = add_to_letter(line)) <= 0)
  1325.           break;
  1326.       }
  1327. ***************
  1328. *** 564,570 ****
  1329.           if (!(p2 = do_set(set_options, p)))
  1330.           wprint("(%s isn't set)\n", p);
  1331.           else
  1332. !         fprintf(ed_fp, "%s\n", p2);
  1333.       }
  1334.       when ':': {
  1335.           char new[MAXMSGS_BITS];
  1336. --- 566,572 ----
  1337.           if (!(p2 = do_set(set_options, p)))
  1338.           wprint("(%s isn't set)\n", p);
  1339.           else
  1340. !         putstring(p2, ed_fp);
  1341.       }
  1342.       when ':': {
  1343.           char new[MAXMSGS_BITS];
  1344. ***************
  1345. *** 851,860 ****
  1346.           return 1;
  1347.           } else if (line[1] == '?') {
  1348.           register int x;
  1349. !         for (x = 0; tilde_commands[x]; x++)
  1350. !             wprint("%s%s\n", escape, tilde_commands[x]);
  1351. !         wprint("%s%s\t\tbegin a line with a single %s\n",
  1352.               escape, escape, escape);
  1353.   #ifdef SUNTOOL
  1354.           if (istool)
  1355.               (void) help(0, "compose", tool_help);
  1356. --- 853,877 ----
  1357.           return 1;
  1358.           } else if (line[1] == '?') {
  1359.           register int x;
  1360. !         if (!istool)
  1361. !             (void) do_pager(NULL, TRUE); /* start pager */
  1362. !         for (x = 0; tilde_commands[x]; x++) {
  1363. !             (void) sprintf(buf, "%s%s\n", escape, tilde_commands[x]);
  1364. !             if (!istool) {
  1365. !             if (do_pager(buf, FALSE))
  1366. !                 break;
  1367. !             } else
  1368. !             wprint(buf);
  1369. !         }
  1370. !         (void) sprintf(buf, "%s%s\t\tbegin a line with a single %s\n",
  1371.               escape, escape, escape);
  1372. +         if (istool)
  1373. +             wprint(buf);
  1374. +         else {
  1375. +             if (tilde_commands[x] == NULL)
  1376. +             (void) do_pager(buf, FALSE);
  1377. +             (void) do_pager(NULL, FALSE); /* end pager */
  1378. +         }
  1379.   #ifdef SUNTOOL
  1380.           if (istool)
  1381.               (void) help(0, "compose", tool_help);
  1382. ***************
  1383. *** 970,975 ****
  1384. --- 987,993 ----
  1385.       int next_file = 1; /* reserve files[0] for the mail delivery program */
  1386.       char buf[3*BUFSIZ];
  1387.       char expand = !do_set(set_options, "no_expand");
  1388. +     int fork_err = 0;
  1389.   
  1390.       if (!istool) {
  1391.       (void) signal(SIGINT, oldint);
  1392. ***************
  1393. *** 1047,1053 ****
  1394.       /* Sign the letter before adding the Bcc list since they aren't
  1395.        * considered when adding a signature.
  1396.        */
  1397. !     if ((ison(flags, SIGN) || ison(flags, FORTUNE)) &&
  1398.       isoff(glob_flags, REDIRECT) && isoff(flags, FORWARD))
  1399.       sign_letter(addr_list);
  1400.   
  1401. --- 1065,1071 ----
  1402.       /* Sign the letter before adding the Bcc list since they aren't
  1403.        * considered when adding a signature.
  1404.        */
  1405. !     if ((ison(flags, SIGN) || ison(flags, DO_FORTUNE)) &&
  1406.       isoff(glob_flags, REDIRECT) && isoff(flags, FORWARD))
  1407.       sign_letter(addr_list);
  1408.   
  1409. ***************
  1410. *** 1070,1079 ****
  1411.       }
  1412.       }
  1413.   
  1414. ! #ifdef OLD_MAILER
  1415.       for (p = buf; p = index(p, ','); p++)
  1416.       *p = ' ';
  1417. ! #endif /* OLD_MAILER */
  1418.   
  1419.       Debug("mail command: %s\n", buf);
  1420.   
  1421. --- 1088,1097 ----
  1422.       }
  1423.       }
  1424.   
  1425. ! #ifdef NO_COMMAS
  1426.       for (p = buf; p = index(p, ','); p++)
  1427.       *p = ' ';
  1428. ! #endif /* NO_COMMAS */
  1429.   
  1430.       Debug("mail command: %s\n", buf);
  1431.   
  1432. ***************
  1433. *** 1105,1117 ****
  1434.           break;
  1435.           case -1:
  1436.           error("fork failed trying to send mail");
  1437.           default:
  1438.           if (isoff(glob_flags, REDIRECT))
  1439.               fclose(ed_fp);
  1440.   #ifdef SUNTOOL
  1441.                   if (istool) {
  1442. !             wprint("Letter sent.");
  1443. !             print("Letter sent.");
  1444.               type_cursor(PIX_CLR);
  1445.           }
  1446.   #endif /* SUNTOOL */
  1447. --- 1123,1138 ----
  1448.           break;
  1449.           case -1:
  1450.           error("fork failed trying to send mail");
  1451. +         fork_err++;
  1452.           default:
  1453.           if (isoff(glob_flags, REDIRECT))
  1454.               fclose(ed_fp);
  1455.   #ifdef SUNTOOL
  1456.                   if (istool) {
  1457. !             if (!fork_err) {
  1458. !             wprint("Letter sent.");
  1459. !             print("Letter sent.");
  1460. !             }
  1461.               type_cursor(PIX_CLR);
  1462.           }
  1463.   #endif /* SUNTOOL */
  1464. ***************
  1465. *** 1142,1165 ****
  1466.   
  1467.       /* Make folders conform to RFC-822 by adding From: and Date: headers.
  1468.        * Some older mailers (binmail, execmail, delivermail), don't add
  1469. !      * these headers to the MTA, so add them for OLD_MAILER systems.
  1470.        */
  1471. !     for (size = 0; size < next_file; size++) {
  1472.       time_t t;
  1473.   #ifndef OLD_MAILER
  1474. !     if (size == 0)
  1475. !         continue;
  1476.   #endif /* OLD_MAILER */
  1477. !     (void) time(&t);
  1478. !     if (size > 0) {
  1479.   #ifndef MSG_SEPARATOR
  1480. !         fprintf(files[size], "From %s %s", login, ctime(&t));
  1481.   #else /* MSG_SEPARATOR */
  1482. !         fprintf(files[size], "%s\n", MSG_SEPARATOR);
  1483.   #endif /* MSG_SEPARATOR */
  1484.       }
  1485. -     fprintf(files[size], "From: %s\n", login);
  1486. -     fprintf(files[size], "Date: %s", ctime(&t));
  1487.       }
  1488.   
  1489.       /* first print users own message headers */
  1490. --- 1163,1206 ----
  1491.   
  1492.       /* Make folders conform to RFC-822 by adding From: and Date: headers.
  1493.        * Some older mailers (binmail, execmail, delivermail), don't add
  1494. !      * these headers, so add them for #define OLD_MAILER
  1495.        */
  1496. !     {
  1497.       time_t t;
  1498. +     char From_buf[256], *pF = From_buf;
  1499. +     char *host = do_set(set_options, "hostname");
  1500. +     pF += Strcpy(From_buf, "From: ");
  1501. +     if (!host)
  1502. +         host = ourname[0];
  1503. + #ifdef UUCP
  1504. +     if (host && *host)
  1505. +         pF += strlen(sprintf(pF, "%s!", host));
  1506. + #endif /* UUCP */
  1507. +     pF += Strcpy(pF, login);
  1508. + #ifndef UUCP
  1509. +     if (host && *host)
  1510. +         pF += strlen(sprintf(pF, "@%s", host));
  1511. + #endif /* UUCP */
  1512. +     if (p = do_set(set_options, "realname"))
  1513. +         pF += strlen(sprintf(pF, " (%s)", p));
  1514. +     *pF++ = '\n', *pF++ = 0;
  1515. +     (void) time(&t);
  1516. +     for (size = 0; size < next_file; size++) {
  1517.   #ifndef OLD_MAILER
  1518. !         if (size == 0)
  1519. !         continue;
  1520.   #endif /* OLD_MAILER */
  1521. !         if (size > 0) {
  1522.   #ifndef MSG_SEPARATOR
  1523. !         fprintf(files[size], "From %s %s", login, ctime(&t));
  1524.   #else /* MSG_SEPARATOR */
  1525. !         fprintf(files[size], "%s\n", MSG_SEPARATOR);
  1526.   #endif /* MSG_SEPARATOR */
  1527. +         }
  1528. +         fputs(From_buf, files[size]);
  1529. +         fprintf(files[size], "Date: %s", ctime(&t));
  1530.       }
  1531.       }
  1532.   
  1533.       /* first print users own message headers */
  1534. ***************
  1535. *** 1203,1210 ****
  1536. --- 1244,1253 ----
  1537.        */
  1538.       while (fgets(buf, BUFSIZ, ed_fp))
  1539.       for (size = 0; size < next_file; size++) {
  1540. + #ifdef MSG_SEPARATOR
  1541.           if (!strncmp(buf, "From ", 5))
  1542.           fputc('>', files[size]);
  1543. + #endif /* MSG_SEPARATOR */
  1544.           fputs(buf, files[size]);
  1545.       }
  1546.   
  1547. ***************
  1548. *** 1230,1235 ****
  1549. --- 1273,1279 ----
  1550.   }
  1551.   
  1552.   /* ARGSUSED */
  1553. + SIGRET
  1554.   rm_edfile(sig)
  1555.   {
  1556.       if (sig > 0 && !killme) {
  1557. ***************
  1558. *** 1419,1429 ****
  1559.       if (*buf == '$')
  1560.           if (!(p = do_set(set_options, buf)))
  1561.           wprint("(%s isn't set -- letter not signed)\n", buf);
  1562. !         else
  1563. !         fprintf(ed_fp, "%s\n", p), wprint("\n"), fflush(ed_fp);
  1564. !     else if (*buf == '\\')
  1565. !         fprintf(ed_fp, "%s\n", buf+1), wprint("\n"), fflush(ed_fp);
  1566. !     else
  1567.           file_to_fp(buf, ed_fp, "r");
  1568.       }
  1569.   
  1570. --- 1463,1476 ----
  1571.       if (*buf == '$')
  1572.           if (!(p = do_set(set_options, buf)))
  1573.           wprint("(%s isn't set -- letter not signed)\n", buf);
  1574. !         else {
  1575. !         putstring(p+1, ed_fp);
  1576. !         wprint("\n");
  1577. !         }
  1578. !     else if (*buf == '\\') {
  1579. !         putstring(buf, ed_fp);
  1580. !         wprint("\n");
  1581. !     } else
  1582.           file_to_fp(buf, ed_fp, "r");
  1583.       }
  1584.   
  1585. *** OLD/main.c    Thu May 12 21:14:34 1988
  1586. --- main.c    Tue Jun 28 21:38:11 1988
  1587. ***************
  1588. *** 20,25 ****
  1589. --- 20,29 ----
  1590.   }
  1591.   #endif /* sun && DEBUG */
  1592.   
  1593. + #ifdef DOT_LOCK
  1594. + int sgid;
  1595. + #endif /* DOT_LOCK */
  1596.   /*ARGSUSED*/   /* we ignore envp */
  1597.   main(argc, argv)
  1598.   char **argv;
  1599. ***************
  1600. *** 38,43 ****
  1601. --- 42,48 ----
  1602.   
  1603.       (void) signal(SIGBUS,  bus_n_seg);
  1604.       (void) signal(SIGSEGV, bus_n_seg);
  1605. +     (void) signal(SIGPIPE, SIG_IGN); /* if pager is terminated before end */
  1606.   
  1607.       f_flags[0] = 0;
  1608.       mailfile = "";
  1609. ***************
  1610. *** 58,67 ****
  1611.       n = 0; /* don't ignore no such file or directory */
  1612.       p = getpath(COMMAND_HELP, &n);
  1613.   
  1614. !     if (n) {
  1615. !     fprintf(stderr, "Warning: can't read %s: %s\n", COMMAND_HELP, p);
  1616.       cmd_help = "cmd_help";
  1617. !     } else
  1618.       strdup(cmd_help, p);
  1619.   
  1620.       init(); /* must be done before checking mail since "login" is set here */
  1621. --- 63,71 ----
  1622.       n = 0; /* don't ignore no such file or directory */
  1623.       p = getpath(COMMAND_HELP, &n);
  1624.   
  1625. !     if (n)
  1626.       cmd_help = "cmd_help";
  1627. !     else
  1628.       strdup(cmd_help, p);
  1629.   
  1630.       init(); /* must be done before checking mail since "login" is set here */
  1631. ***************
  1632. *** 130,135 ****
  1633. --- 134,144 ----
  1634.       }
  1635.       }
  1636.   
  1637. + #ifdef DOT_LOCK
  1638. +     sgid = getegid();
  1639. +     setgid(getgid());
  1640. + #endif DOT_LOCK
  1641.       for (++argv; *argv && **argv == '-'; argv++)
  1642.       switch (argv[0][1]) {
  1643.           case 'e':
  1644. ***************
  1645. *** 391,402 ****
  1646.   #ifdef SUNTOOL
  1647.       if (istool) {
  1648.       n = 0;
  1649. !     p = getpath(TOOL_HELP, &n);
  1650. !     if (n) {
  1651. !         fprintf(stderr, "Warning: can't read %s: %s\n", TOOL_HELP, p);
  1652. !         tool_help = "tool_help";
  1653. !     } else
  1654. !         strdup(tool_help, p);
  1655.       if (time_out < 30)
  1656.           time_out = 60;
  1657.       turnoff(glob_flags, IGN_SIGS);
  1658. --- 400,413 ----
  1659.   #ifdef SUNTOOL
  1660.       if (istool) {
  1661.       n = 0;
  1662. !     if (!tool_help) {
  1663. !         p = getpath(TOOL_HELP, &n);
  1664. !         if (n) {
  1665. !         fprintf(stderr, "Warning: can't read %s: %s\n", TOOL_HELP, p);
  1666. !         tool_help = "tool_help";
  1667. !         } else
  1668. !         strdup(tool_help, p);
  1669. !     }
  1670.       if (time_out < 30)
  1671.           time_out = 60;
  1672.       turnoff(glob_flags, IGN_SIGS);
  1673. *** OLD/makefile.bsd    Thu May 12 21:14:35 1988
  1674. --- makefile.bsd    Tue Jun 28 21:38:12 1988
  1675. ***************
  1676. *** 8,14 ****
  1677.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  1678.         folders.o dates.o loop.o help.o viewopts.o curses.o curs_io.o bind.o
  1679.   
  1680. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 mush.1 cmd_help
  1681.   
  1682.   MAKES= makefile.bsd makefile.x286 makefile.x386 makefile.sys.v
  1683.   
  1684. --- 8,14 ----
  1685.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  1686.         folders.o dates.o loop.o help.o viewopts.o curses.o curs_io.o bind.o
  1687.   
  1688. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 README-6.3 mush.1 cmd_help
  1689.   
  1690.   MAKES= makefile.bsd makefile.x286 makefile.x386 makefile.sys.v
  1691.   
  1692. *** OLD/makefile.sun    Thu May 12 21:14:36 1988
  1693. --- makefile.sun    Thu Jun 30 13:05:54 1988
  1694. ***************
  1695. *** 17,23 ****
  1696.   IMAGES= mail.icon.1 mail.icon.2 check.pr cycle.pr envelope.pr glasses.pr \
  1697.       write.pr up.arrow.pr dn.arrow.pr coffee.cup.pr
  1698.   
  1699. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 mush.1 cmd_help tool_help
  1700.   
  1701.   MAKES= makefile.sun makefile.bsd makefile.sys.v makefile.x286 makefile.x386
  1702.   
  1703. --- 17,24 ----
  1704.   IMAGES= mail.icon.1 mail.icon.2 check.pr cycle.pr envelope.pr glasses.pr \
  1705.       write.pr up.arrow.pr dn.arrow.pr coffee.cup.pr
  1706.   
  1707. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 README-6.3 \
  1708. !     mush.1 cmd_help tool_help
  1709.   
  1710.   MAKES= makefile.sun makefile.bsd makefile.sys.v makefile.x286 makefile.x386
  1711.   
  1712. ***************
  1713. *** 31,37 ****
  1714.       @cc $(LDFLAGS) $(OBJS) $(LIBES) -o mush
  1715.   
  1716.   tar:
  1717. !     @tar fcv MUSH $(HELP_FILES) $(MAKES) $(IMAGES) $(HDRS) $(SRCS)
  1718.   
  1719.   lint:
  1720.       make -f makefile.bsd lint
  1721. --- 32,38 ----
  1722.       @cc $(LDFLAGS) $(OBJS) $(LIBES) -o mush
  1723.   
  1724.   tar:
  1725. !     @tar fcv MUSH $(HELP_FILES) $(MAKES) $(IMAGES) $(HDRS) $(SRCS) Mailrc
  1726.   
  1727.   lint:
  1728.       make -f makefile.bsd lint
  1729. *** OLD/makefile.x286    Thu May 12 21:14:37 1988
  1730. --- makefile.x286    Tue Jun 28 21:38:13 1988
  1731. ***************
  1732. *** 10,17 ****
  1733.   OBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
  1734.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  1735.         folders.o dates.o loop.o help.o viewopts.o bind.o curses.o curs_io.o
  1736. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 mush.1 cmd_help
  1737. ! MAKES= makefile.sys.v makefile.xenix makefile.bsd
  1738.   
  1739.   CFLAGS= -O -DSYSV -Mle -DCURSES -DREGCMP -DUSG
  1740.   LDFLAGS= -X -Mle -lx -F 4000
  1741. --- 10,17 ----
  1742.   OBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
  1743.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  1744.         folders.o dates.o loop.o help.o viewopts.o bind.o curses.o curs_io.o
  1745. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 README-6.3 mush.1 cmd_help
  1746. ! MAKES= makefile.sys.v makefile.x286 makefile.x386 makefile.bsd
  1747.   
  1748.   CFLAGS= -O -DSYSV -Mle -DCURSES -DREGCMP -DUSG
  1749.   LDFLAGS= -X -Mle -lx -F 4000
  1750. *** OLD/makefile.x386    Thu May 12 21:14:37 1988
  1751. --- makefile.x386    Tue Jun 28 21:38:14 1988
  1752. ***************
  1753. *** 10,17 ****
  1754.   OBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
  1755.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  1756.         folders.o dates.o loop.o help.o viewopts.o bind.o curses.o curs_io.o
  1757. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 mush.1 cmd_help
  1758. ! MAKES= makefile.sys.v makefile.xenix makefile.bsd
  1759.   
  1760.   CFLAGS= -O -DSYSV -M3e -DCURSES -DREGCMP -DUSG 
  1761.   LDFLAGS= -X -M3 -lx
  1762. --- 10,17 ----
  1763.   OBJS= main.o init.o misc.o mail.o hdrs.o execute.o commands.o print.o file.o \
  1764.         signals.o aliases.o setopts.o msgs.o pick.o sort.o expr.o strings.o \
  1765.         folders.o dates.o loop.o help.o viewopts.o bind.o curses.o curs_io.o
  1766. ! HELP_FILES= README README-6.0 README-6.1 README-6.2 README-6.3 mush.1 cmd_help
  1767. ! MAKES= makefile.sys.v makefile.286 makefile.x386 makefile.bsd
  1768.   
  1769.   CFLAGS= -O -DSYSV -M3e -DCURSES -DREGCMP -DUSG 
  1770.   LDFLAGS= -X -M3 -lx
  1771. *** OLD/misc.c    Thu May 12 21:14:38 1988
  1772. --- misc.c    Tue Jun 28 21:38:15 1988
  1773. ***************
  1774. *** 23,31 ****
  1775.   }
  1776.   
  1777.   /*
  1778. !  * loop thru all msgs starting with current_msg and find next undeleted
  1779. !  * message.  If the variable "wrap" is set, wrap to the beginning of the
  1780.