close all special case added to l_close()
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 23 Aug 1983 05:42:10 +0000 (21:42 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 23 Aug 1983 05:42:10 +0000 (21:42 -0800)
SCCS-vsn: usr.bin/window/cmd3.c 3.3
SCCS-vsn: usr.bin/window/lcmd.c 3.4
SCCS-vsn: usr.bin/window/lcmd1.c 3.4

usr/src/usr.bin/window/cmd3.c
usr/src/usr.bin/window/lcmd.c
usr/src/usr.bin/window/lcmd1.c

index b15abb6..a98571e 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)cmd3.c      3.2 83/08/15";
+static char *sccsid = "@(#)cmd3.c      3.3 83/08/22";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -17,7 +17,7 @@ register struct ww *w;
                for (i = 0; i < NWINDOW; i++) {
                        if ((w = window[i]) == 0)
                                continue;
                for (i = 0; i < NWINDOW; i++) {
                        if ((w = window[i]) == 0)
                                continue;
-                       closewin(w);            /* GROT */
+                       closewin(w);
                        didit++;
                }
        }
                        didit++;
                }
        }
index c176502..55534eb 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)lcmd.c      3.3 83/08/12";
+static char *sccsid = "@(#)lcmd.c      3.4 83/08/22";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -23,7 +23,7 @@ struct lcmd {
 };
 static struct lcmd lcmd[] = {
        "%",            1, 1, 0,  0, l_select,
 };
 static struct lcmd lcmd[] = {
        "%",            1, 1, 0,  0, l_select,
-       "close",        1, 0, 1, -1, l_close,
+       "close",        1, 0, 0, -1, l_close,
        "escape",       1, 0, 1,  1, l_escape,
        "label",        1, 0, 2,  2, l_label,
        "source",       1, 0, 1,  1, l_source,
        "escape",       1, 0, 1,  1, l_escape,
        "label",        1, 0, 2,  2, l_label,
        "source",       1, 0, 1,  1, l_source,
index 7c1802c..969bbee 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)lcmd1.c     3.3 83/08/12";
+static char *sccsid = "@(#)lcmd1.c     3.4 83/08/22";
 #endif
 
 #include "defs.h"
 #endif
 
 #include "defs.h"
@@ -106,6 +106,10 @@ l_close()
        register struct ww *w;
        char didit = 0;
 
        register struct ww *w;
        char didit = 0;
 
+       if (argc < 2) {
+               c_close((struct ww *)0);
+               return;
+       }
        for (i = 1; i < argc; i++) {
                if ((w = idtowin(argv[i])) == 0)
                        continue;
        for (i = 1; i < argc; i++) {
                if ((w = idtowin(argv[i])) == 0)
                        continue;