SCCS-vsn: local/ditroff/ditroff.old.okeeffe/driver/dterm.c 1.14
-/* @(#)dterm.c 1.13 (Berkeley) %G%"
+/* @(#)dterm.c 1.14 (Berkeley) %G%"
*
* Converts ditroff output to text on a terminal. It is NOT meant to
* produce readable output, but is to show one how one's paper is (in
*
* Converts ditroff output to text on a terminal. It is NOT meant to
* produce readable output, but is to show one how one's paper is (in
* for extra-wide printouts on the printer.
*
* -fxxx get special character definition file "xxx". Default is
* for extra-wide printouts on the printer.
*
* -fxxx get special character definition file "xxx". Default is
- * /usr/lib/font/devter/specfile.
+ * FONTDIR/devter/specfile.
#define PGWIDTH 266 /* WAY too big - for good measure */
#define PGHEIGHT 220
#define LINELEN 78
#define PGWIDTH 266 /* WAY too big - for good measure */
#define PGHEIGHT 220
#define LINELEN 78
-#define SPECFILE "/usr/local/lib/font/devter/specfile"
+#define SPECFILE "devter/specfile"
+#ifndef FONTDIR
+#define FONTDIR "/usr/lib/font"
+#endif
#define hgoto(n) hpos = n
#define vgoto(n) vpos = n
#define hgoto(n) hpos = n
#define vgoto(n) vpos = n
#define sqr(x) (long int)(x)*(x)
#define sqr(x) (long int)(x)*(x)
-char SccsId [] = "@(#)dterm.c 1.13 (Berkeley) %G%";
+char SccsId [] = "@(#)dterm.c 1.14 (Berkeley) %G%";
char **spectab; /* here go the special characters */
char **spectab; /* here go the special characters */
-char *specfile = SPECFILE; /* place to look up special characters */
+char specfile[100] = FONTDIR;/* place to look up special characters */
char *malloc();
char *operand();
char *malloc();
char *operand();
+ strcat(specfile, "/");
+ strcat(specfile, SPECFILE);
while (--argc > 0 && **++argv == '-') {
switch ((*argv)[1]) {
case 'f': /* special character filepath */
while (--argc > 0 && **++argv == '-') {
switch ((*argv)[1]) {
case 'f': /* special character filepath */
- specfile = operand(&argc, &argv);
+ strncpy(specfile, operand(&argc, &argv), 100);
break;
case 'l': /* output line length */
linelen = atoi(operand(&argc, &argv)) - 1;
break;
case 'l': /* output line length */
linelen = atoi(operand(&argc, &argv)) - 1;