Must distinguish between "ambiguous" and "unknown" commands.
[unix-history] / usr / src / usr.bin / vgrind / vfontedpr.c
index 85f8b63..9a4f75e 100644 (file)
@@ -1,4 +1,12 @@
-static char sccsid[] = "@(#)vfontedpr.c        4.1     (Berkeley)      %G%";
+/*
+ * 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[] = "@(#)vfontedpr.c        5.2 (Berkeley) %G%";
+#endif not lint
 
 #include <ctype.h>
 #include <stdio.h>
 
 #include <ctype.h>
 #include <stdio.h>
@@ -28,6 +36,7 @@ static char sccsid[] = "@(#)vfontedpr.c       4.1     (Berkeley)      %G%";
 char   *expmatch();            /* match a string to an expression */
 char   *STRNCMP();             /* a different kindof strncmp */
 char   *convexp();             /* convert expression to internal form */
 char   *expmatch();            /* match a string to an expression */
 char   *STRNCMP();             /* a different kindof strncmp */
 char   *convexp();             /* convert expression to internal form */
+char   *tgetstr();
 
 boolean        isproc();
 
 
 boolean        isproc();
 
@@ -255,11 +264,6 @@ main(argc, argv)
        ps("'-F\n");
        if (!filter) {
            printf(".ds =F %s\n", fname);
        ps("'-F\n");
        if (!filter) {
            printf(".ds =F %s\n", fname);
-           fstat(fileno(stdin), &stbuf);
-           cp = ctime(&stbuf.st_mtime);
-           cp[16] = '\0';
-           cp[24] = '\0';
-           printf(".ds =M %s %s\n", cp+4, cp+20);
            ps("'wh 0 vH\n");
            ps("'wh -1i vF\n");
        }
            ps("'wh 0 vH\n");
            ps("'wh -1i vF\n");
        }
@@ -268,6 +272,13 @@ main(argc, argv)
            printf(".()\n");
            printf(".bp\n");
        }
            printf(".()\n");
            printf(".bp\n");
        }
+       if (!filter) {
+           fstat(fileno(stdin), &stbuf);
+           cp = ctime(&stbuf.st_mtime);
+           cp[16] = '\0';
+           cp[24] = '\0';
+           printf(".ds =M %s %s\n", cp+4, cp+20);
+       }
 
        /*
         *      MAIN LOOP!!!
 
        /*
         *      MAIN LOOP!!!
@@ -448,7 +459,7 @@ skip:
                ps("\\c\n'-C\n");
                continue;
            } else {
                ps("\\c\n'-C\n");
                continue;
            } else {
-               putKcp (s, s + strlen(s) -1);
+               putKcp (s, s + strlen(s) -1, TRUE);
                s = s + strlen(s);
                continue;
            }
                s = s + strlen(s);
                continue;
            }