merge monet
authorBill Joy <root@ucbvax.Berkeley.EDU>
Sat, 18 Jun 1983 12:29:52 +0000 (04:29 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Sat, 18 Jun 1983 12:29:52 +0000 (04:29 -0800)
SCCS-vsn: sbin/shutdown/shutdown.c 4.19
SCCS-vsn: usr.bin/mail/fio.c 2.15

usr/src/sbin/shutdown/shutdown.c
usr/src/usr.bin/mail/fio.c

index b1cc7a1..82dd9a7 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)shutdown.c  4.18 (Berkeley) 83/06/02";
+static char *sccsid = "@(#)shutdown.c  4.19 (Berkeley) 83/06/17";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -305,8 +305,8 @@ warn(term, sdt, now, type)
 
        if (shutter)
                fprintf(term,
 
        if (shutter)
                fprintf(term,
-           "\007\007\t*** %sSystem shutdown message from %s!%s ***\r\n\n",
-                   type, hostname, shutter);
+           "\007\007\t*** %sSystem shutdown message from %s@%s ***\r\n\n",
+                   type, shutter, hostname);
        else
                fprintf(term,
                    "\007\007\t*** %sSystem shutdown message (%s) ***\r\n\n",
        else
                fprintf(term,
                    "\007\007\t*** %sSystem shutdown message (%s) ***\r\n\n",
index b466317..9839076 100644 (file)
@@ -10,7 +10,7 @@
  * File I/O.
  */
 
  * File I/O.
  */
 
-static char *SccsId = "@(#)fio.c       2.14 %G%";
+static char *SccsId = "@(#)fio.c       2.15 %G%";
 
 /*
  * Set up the input pointers while copying the mail file into
 
 /*
  * Set up the input pointers while copying the mail file into
@@ -352,11 +352,12 @@ edstop()
        }
        printf("\"%s\" ", editfile);
        flush();
        }
        printf("\"%s\" ", editfile);
        flush();
-       if ((obuf = fopen(editfile, "w")) == NULL) {
+       if ((obuf = fopen(editfile, "r+")) == NULL) {
                perror(editfile);
                relsesigs();
                reset(0);
        }
                perror(editfile);
                relsesigs();
                reset(0);
        }
+       trunc(obuf);
        c = 0;
        for (mp = &message[0]; mp < &message[msgCount]; mp++) {
                if ((mp->m_flag & MDELETED) != 0)
        c = 0;
        for (mp = &message[0]; mp < &message[msgCount]; mp++) {
                if ((mp->m_flag & MDELETED) != 0)