Add copyright
[unix-history] / usr / src / usr.bin / ex / ex_cmds2.c
index 67210cc..8a1d201 100644 (file)
@@ -1,12 +1,21 @@
-/* Copyright (c) 1979 Regents of the University of California */
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)ex_cmds2.c 7.3 (Berkeley) %G%";
+#endif not lint
+
 #include "ex.h"
 #include "ex_argv.h"
 #include "ex_temp.h"
 #include "ex_tty.h"
 #include "ex_vis.h"
 
 #include "ex.h"
 #include "ex_argv.h"
 #include "ex_temp.h"
 #include "ex_tty.h"
 #include "ex_vis.h"
 
-bool   pflag, nflag;
-int    poffset;
+extern bool    pflag, nflag;           /* mjm: extern; also in ex_cmds.c */
+extern int     poffset;                /* mjm: extern; also in ex_cmds.c */
 
 /*
  * Subroutines for major command loop.
 
 /*
  * Subroutines for major command loop.
@@ -73,6 +82,10 @@ error(str, i)
 
        error0();
        merror(str, i);
 
        error0();
        merror(str, i);
+       if (writing) {
+               serror(" [Warning - %s is incomplete]", file);
+               writing = 0;
+       }
        error1(str);
 }
 
        error1(str);
 }
 
@@ -103,10 +116,6 @@ erewind()
 error0()
 {
 
 error0()
 {
 
-       if (laste) {
-               laste = 0;
-               sync();
-       }
        if (vcatch) {
                if (splitw == 0)
                        fixech();
        if (vcatch) {
                if (splitw == 0)
                        fixech();