FreeBSD Bugzilla – Attachment 29344 Details for
Bug 49023
[patch] to lpd(8) (printjob.c) to pass source filename to input filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
printjob.c.diffs
printjob.c.diffs (text/plain), 2.32 KB, created by
jimd
on 2003-03-10 23:46:46 UTC
(
hide
)
Description:
printjob.c.diffs
Filename:
MIME Type:
Creator:
jimd
Created:
2003-03-10 23:46:46 UTC
Size:
2.32 KB
patch
obsolete
>*** printjob.c.orig Wed Feb 19 17:42:35 2003 >--- printjob.c Mon Mar 10 17:10:09 2003 >*************** >*** 114,119 **** >--- 114,121 ---- > /* indentation size in static characters */ > static char indent[10] = "-i0"; > static char jobname[100]; /* job or file name */ >+ static char ofilename[100]; /* name of (source) file to print - JD*/ >+ static long origfpos = 0L; /* original cfp file position - JD */ > static char length[10] = "-l"; /* page length in lines */ > static char logname[32]; /* user's login name */ > static char pxlength[10] = "-y"; /* page length in pixels */ >*************** >*** 439,445 **** > */ > > /* pass 1 */ >- > while (getline(cfp)) > switch (line[0]) { > case 'H': >--- 441,446 ---- >*************** >*** 479,485 **** > } else > strcpy(jobname, " "); > continue; >- > case 'C': > if (line[1] != '\0') > strlcpy(class, line + 1, sizeof(class)); >--- 480,485 ---- >*************** >*** 554,560 **** > title[0] = '\0'; > continue; > >! case 'N': > case 'U': > case 'M': > case 'R': >--- 554,560 ---- > title[0] = '\0'; > continue; > >! case 'N': > case 'U': > case 'M': > case 'R': >*************** >*** 645,650 **** >--- 645,673 ---- > (void) close(fi); > return (OK); > } >+ >+ /* >+ * reset pointer to config file, parse cf for filename, >+ * reset pointer again to where it was before we got here >+ * >+ * JD 06 March 2003 >+ * >+ */ >+ origfpos = ftell(cfp); /* get previous file position */ >+ fseek(cfp, 0L, 0); /* set file position to beginning of file */ >+ strcpy(ofilename, ""); /* initialize variable */ >+ while (getline(cfp)) >+ switch (line[0]){ >+ case 'N': >+ if (line[1] != '\0') { >+ strlcpy(ofilename, line + 1, sizeof(ofilename)); >+ } >+ continue; >+ default: continue; >+ } >+ fseek(cfp, origfpos, 0); /* reset file pointer */ >+ /*-------------------- JD */ >+ > switch (format) { > case 'p': /* print file using 'pr' */ > if (pp->filters[LPF_INPUT] == NULL) { /* use output filter */ >*************** >*** 780,785 **** >--- 803,813 ---- > av[n++] = "-h"; > av[n++] = origin_host; > av[n++] = pp->acct_file; >+ /* added 20 Feb, 10 Mar 2003 - JD */ >+ if (strcmp(ofilename, "") != 0) { >+ av[n++] = "-fn"; >+ av[n++] = ofilename; >+ } /* JD */ > av[n] = 0; > fo = pfd; > if (of_pid > 0) { /* stop output filter */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49023
:
29343
| 29344 |
29345