-static char *sccsid = "@(#)subr.c 1.3 (Berkeley) %G%";
+/*
+ * 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[] = "@(#)subr.c 5.3 (Berkeley) %G%";
+#endif /* not lint */
+
#include <stdio.h>
#include <ctype.h>
#include "error.h"
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,
/*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
};
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 = " ";
+ }
}
/*