BSD 4_3_Tahoe release
[unix-history] / usr / src / ucb / error / errorsubr.c
index c14be06..ece81be 100644 (file)
@@ -1,4 +1,24 @@
-static char *sccsid = "@(#)errorsubr.c 1.3 (Berkeley) 2/9/83";
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)errorsubr.c        5.3 (Berkeley) 6/29/88";
+#endif /* not lint */
+
 #include <stdio.h>
 #include <ctype.h>
 #include "error.h"
 #include <stdio.h>
 #include <ctype.h>
 #include "error.h"
@@ -214,6 +234,10 @@ static     char    pioutcomment[] = PIOUTCOMMENT;
 static char    lispincomment[] = LISPINCOMMENT;
 static char    riincomment[] = RIINCOMMENT;
 static char    rioutcomment[] = RIOUTCOMMENT;
 static char    lispincomment[] = LISPINCOMMENT;
 static char    riincomment[] = RIINCOMMENT;
 static char    rioutcomment[] = RIOUTCOMMENT;
+static char    troffincomment[] = TROFFINCOMMENT;
+static char    troffoutcomment[] = TROFFOUTCOMMENT;
+static char    mod2incomment[] = MOD2INCOMMENT;
+static char    mod2outcomment[] = MOD2OUTCOMMENT;
 
 struct lang_desc lang_table[] = {
        /*INUNKNOWN     0*/     "unknown", cincomment,  coutcomment,
 
 struct lang_desc lang_table[] = {
        /*INUNKNOWN     0*/     "unknown", cincomment,  coutcomment,
@@ -234,6 +258,8 @@ struct      lang_desc lang_table[] = {
        /*INAPL         15*/    "apl",  ".lm",         newline,
        /*INMAKE        16*/    "make", ASINCOMMENT,   newline,
        /*INRI          17*/    "ri",   riincomment,   rioutcomment,
        /*INAPL         15*/    "apl",  ".lm",         newline,
        /*INMAKE        16*/    "make", ASINCOMMENT,   newline,
        /*INRI          17*/    "ri",   riincomment,   rioutcomment,
+       /*INTROFF       18*/    "troff",troffincomment,troffoutcomment,
+       /*INMOD2        19*/    "mod2", mod2incomment, mod2outcomment,
                                0,      0,           0
 };
 
                                0,      0,           0
 };
 
@@ -265,11 +291,13 @@ wordvprint(fyle, wordc, wordv)
        char    *wordv[];
 {
        int     i;
        char    *wordv[];
 {
        int     i;
-       for(i = 0; i < wordc; i++){
-               fprintf(fyle, "%s",wordv[i]);
-               if (i != wordc - 1)
-                       fprintf(fyle, " ");
-       }
+       char *sep = "";
+
+       for(i = 0; i < wordc; i++)
+               if (wordv[i]) {
+                       fprintf(fyle, "%s%s",sep,wordv[i]);
+                       sep = " ";
+               }
 }
 
 /*
 }
 
 /*