These should be correct diff's this time. My vim was too perl oriented,
not now.

These three are intimately tied together, so I think they should be
completely removed. If one of these types of printing is done by
someone, it can be dealt with by some future filter.
tex or dvi are names used for the same items.
OK?

Chris


Index: printjob.c
===================================================================
RCS file: /cvs/src/usr.sbin/lpr/lpd/printjob.c,v
retrieving revision 1.57
diff -u -p -r1.57 printjob.c
--- printjob.c  29 Jan 2016 21:23:11 -0000      1.57
+++ printjob.c  23 Feb 2016 03:14:23 -0000
@@ -317,16 +317,6 @@ again:
        goto again;
 }
 
-#define        FONTLEN 50
-char   fonts[4][FONTLEN];      /* fonts for troff */
-
-char ifonts[4][40] = {
-       _PATH_VFONTR,
-       _PATH_VFONTI,
-       _PATH_VFONTB,
-       _PATH_VFONTS,
-};
-
 /*
  * The remaining part is the reading of the control file (cf)
  * and performing the various actions.
@@ -348,14 +338,6 @@ printit(char *file)
                        (void)close(fd);
                return(OK);
        }
-       /*
-        * Reset troff fonts.
-        */
-       for (i = 0; i < 4; i++)
-               strlcpy(fonts[i], ifonts[i], FONTLEN);
-       (void)snprintf(&width[2], sizeof(width) - 2, "%ld", PW);
-       indent[2] = '0';
-       indent[3] = '\0';
 
        /*
         *      read the control file for work to do
@@ -376,16 +358,9 @@ printit(char *file)
         *              f -- "file name" name of text file to print
         *              l -- "file name" text file with control chars
         *              p -- "file name" text file to print with pr(1)
-        *              t -- "file name" troff(1) file to print
-        *              n -- "file name" ditroff(1) file to print
-        *              d -- "file name" dvi file to print
         *              g -- "file name" plot(1G) file to print
         *              v -- "file name" plain raster file to print
         *              c -- "file name" cifplot file to print
-        *              1 -- "R font file" for troff
-        *              2 -- "I font file" for troff
-        *              3 -- "B font file" for troff
-        *              4 -- "S font file" for troff
         *              N -- "name" of file (used by lpq)
         *              U -- "unlink" name of file to remove
         *                    (after we print it. (Pass 2 only)).
@@ -453,14 +428,6 @@ printit(char *file)
                                banner(line+1, jobname);
                        continue;
 
-               case '1':       /* troff fonts */
-               case '2':
-               case '3':
-               case '4':
-                       if (line[1] != '\0')
-                               strlcpy(fonts[line[0]-'1'], line+1, FONTLEN);
-                       continue;
-
                case 'W':       /* page width */
                        strlcpy(width+2, line+1, sizeof(width) - 2);
                        continue;
@@ -524,7 +491,7 @@ pass2:
 
 /*
  * Print a file.
- * Set up the chain [ PR [ | {IF, OF} ] ] or {IF, RF, TF, NF, DF, CF, VF}.
+ * Set up the chain [ PR [ | {IF, OF} ] ] or {IF, RF, CF, VF}.
  * Return -1 if a non-recoverable error occurred,
  * 2 if the filter detected some errors (but printed the job anyway),
  * 1 if we should try to reprint this job and
@@ -646,28 +613,6 @@ print(int format, char *file)
                av[2] = length;
                n = 3;
                break;
-       case 't':       /* print troff output */
-       case 'n':       /* print ditroff output */
-       case 'd':       /* print tex output */
-               (void)unlink(".railmag");
-               if ((fo = open(".railmag", O_CREAT|O_WRONLY|O_EXCL, FILMOD)) < 
0) {
-                       syslog(LOG_ERR, "%s: cannot create .railmag", printer);
-                       (void)unlink(".railmag");
-               } else {
-                       for (n = 0; n < 4; n++) {
-                               if (fonts[n][0] != '/')
-                                       (void)write(fo, _PATH_VFONT,
-                                           sizeof(_PATH_VFONT) - 1);
-                               (void)write(fo, fonts[n], strlen(fonts[n]));
-                               (void)write(fo, "\n", 1);
-                       }
-                       (void)close(fo);
-               }
-               prog = (format == 't') ? TF : (format == 'n') ? NF : DF;
-               av[1] = pxwidth;
-               av[2] = pxlength;
-               n = 3;
-               break;
        case 'c':       /* print cifplot output */
                prog = CF;
                av[1] = pxwidth;
@@ -1327,9 +1272,6 @@ init(void)
        cgetstr(bp, "of", &OF);
        cgetstr(bp, "if", &IF);
        cgetstr(bp, "rf", &RF);
-       cgetstr(bp, "tf", &TF);
-       cgetstr(bp, "nf", &NF);
-       cgetstr(bp, "df", &DF);
        cgetstr(bp, "gf", &GF);
        cgetstr(bp, "vf", &VF);
        cgetstr(bp, "cf", &CF);



Index: lpr.c
===================================================================
RCS file: /cvs/src/usr.sbin/lpr/lpr/lpr.c,v
retrieving revision 1.48
diff -u -p -r1.48 lpr.c
--- lpr.c       9 Feb 2015 23:00:14 -0000       1.48
+++ lpr.c       23 Feb 2016 03:16:46 -0000
@@ -68,7 +68,6 @@
 static char    *cfname;        /* daemon control files, linked from tf's */
 static char    *class = host;  /* class title on header page */
 static char    *dfname;        /* data files */
-static char    *fonts[4];      /* troff font names */
 static char     format = 'f';  /* format char for printing files */
 static int      hdr = 1;       /* print header or not (default is yes) */
 static int      iflag;         /* indentation wanted */
@@ -152,13 +151,6 @@ main(int argc, char **argv)
                        }
                        break;
 
-               case '4':               /* troff fonts */
-               case '3':
-               case '2':
-               case '1':
-                       fonts[ch - '1'] = optarg;
-                       break;
-
                case 'C':               /* classification spec */
                        hdr++;
                        class = optarg;
@@ -183,12 +175,9 @@ main(int argc, char **argv)
                        break;
 
                case 'c':               /* print cifplot output */
-               case 'd':               /* print tex output (dvi files) */
                case 'g':               /* print graph(1G) output */
                case 'l':               /* literal output */
-               case 'n':               /* print ditroff output */
                case 'p':               /* print using ``pr'' */
-               case 't':               /* print troff output (cat files) */
                case 'v':               /* print vplot output */
                        format = ch;
                        break;
@@ -305,10 +294,6 @@ main(int argc, char **argv)
                card('I', itoa(indent));
        if (mailflg)
                card('M', person);
-       if (format == 't' || format == 'n' || format == 'd')
-               for (i = 0; i < 4; i++)
-                       if (fonts[i] != NULL)
-                               card('1'+i, fonts[i]);
        if (width != NULL)
                card('W', width);
 




Index: lp.h
===================================================================
RCS file: /cvs/src/usr.sbin/lpr/common_source/lp.h,v
retrieving revision 1.20
diff -u -p -r1.20 lp.h
--- lp.h        12 Jan 2016 23:35:13 -0000      1.20
+++ lp.h        23 Feb 2016 03:21:20 -0000
@@ -40,7 +40,6 @@
 extern char    *AF;            /* accounting file */
 extern long     BR;            /* baud rate if lp is a tty */
 extern char    *CF;            /* name of cifplot filter (per job) */
-extern char    *DF;            /* name of tex filter (per job) */
 extern long     DU;            /* daemon user-id */
 extern char    *FF;            /* form feed string */
 extern char    *GF;            /* name of graph(1G) filter (per job) */
@@ -52,7 +51,6 @@ extern char   *LP;            /* line printer device
 extern long     MC;            /* maximum number of copies allowed */
 extern char    *MS;            /* stty flags to set if lp is a tty */
 extern long     MX;            /* maximum number of blocks to copy */
-extern char    *NF;            /* name of ditroff(1) filter (per job) */
 extern char    *OF;            /* name of output filter (created once) */
 extern long     PL;            /* page length */
 extern long     PW;            /* page width */
@@ -70,7 +68,6 @@ extern char   *SD;            /* spool directory */
 extern long     SF;            /* suppress FF on each print job */
 extern long     SH;            /* suppress header page */
 extern char    *ST;            /* status file name */
-extern char    *TF;            /* name of troff(1) filter (per job) */
 extern char    *TR;            /* trailer string to be output when Q empties */
 extern char    *VF;            /* name of raster filter (per job) */
 


Index: common.c
===================================================================
RCS file: /cvs/src/usr.sbin/lpr/common_source/common.c,v
retrieving revision 1.40
diff -u -p -r1.40 common.c
--- common.c    12 Jan 2016 23:35:13 -0000      1.40
+++ common.c    23 Feb 2016 03:18:32 -0000
@@ -64,7 +64,6 @@
 char   *AF;            /* accounting file */
 long    BR;            /* baud rate if lp is a tty */
 char   *CF;            /* name of cifplot filter (per job) */
-char   *DF;            /* name of tex filter (per job) */
 long    DU;            /* daemon user-id */
 char   *FF;            /* form feed string */
 char   *GF;            /* name of graph(1G) filter (per job) */
@@ -76,7 +75,6 @@ char  *LP;            /* line printer device name *
 long    MC;            /* maximum number of copies allowed */
 char   *MS;            /* stty flags to set if lp is a tty */
 long    MX;            /* maximum number of blocks to copy */
-char   *NF;            /* name of ditroff filter (per job) */
 char   *OF;            /* name of output filter (created once) */
 long    PL;            /* page length */
 long    PW;            /* page width */
@@ -94,7 +92,6 @@ char  *SD;            /* spool directory */
 long    SF;            /* suppress FF on each print job */
 long    SH;            /* suppress header page */
 char   *ST;            /* status file name */
-char   *TF;            /* name of troff filter (per job) */
 char   *TR;            /* trailer string to be output when Q empties */
 char   *VF;            /* name of vplot filter (per job) */
 

Reply via email to