Lines 882-887
Link Here
|
882 |
int dfcopies, err, i; |
882 |
int dfcopies, err, i; |
883 |
char *cp, last[BUFSIZ]; |
883 |
char *cp, last[BUFSIZ]; |
884 |
|
884 |
|
|
|
885 |
/* |
886 |
* FreeBSD's cf files may put the 'N'(or 'J') after the 'f' line |
887 |
* open control file for Parsing the jobname first |
888 |
*/ |
889 |
if ((cfp = fopen(file, "r")) == NULL) |
890 |
return (OK); |
891 |
|
892 |
while (getline(cfp)) { |
893 |
if (line[0] == 'J' || line[0] == 'N') { |
894 |
if (line[1] != '\0') { |
895 |
strlcpy(jobname, line + 1, sizeof(jobname)); |
896 |
} else |
897 |
strcpy(jobname, "(standard in)"); |
898 |
break; |
899 |
} |
900 |
} |
901 |
fclose(cfp); |
902 |
|
885 |
/* |
903 |
/* |
886 |
* open control file |
904 |
* open control file |
887 |
*/ |
905 |
*/ |
Lines 988-995
Link Here
|
988 |
{ |
1006 |
{ |
989 |
int i, amt; |
1007 |
int i, amt; |
990 |
struct stat stb; |
1008 |
struct stat stb; |
991 |
char *av[15], *filtcmd; |
1009 |
char *av[17], *filtcmd; |
992 |
char buf[BUFSIZ], opt_c[4], opt_h[4], opt_n[4]; |
1010 |
char buf[BUFSIZ], opt_c[4], opt_h[4], opt_j[4], opt_n[4]; |
993 |
int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; |
1011 |
int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; |
994 |
|
1012 |
|
995 |
statrc = lstat(file, &stb); |
1013 |
statrc = lstat(file, &stb); |
Lines 1048-1053
Link Here
|
1048 |
narg = 0; |
1066 |
narg = 0; |
1049 |
strcpy(opt_c, "-c"); |
1067 |
strcpy(opt_c, "-c"); |
1050 |
strcpy(opt_h, "-h"); |
1068 |
strcpy(opt_h, "-h"); |
|
|
1069 |
strcpy(opt_j, "-j"); |
1051 |
strcpy(opt_n, "-n"); |
1070 |
strcpy(opt_n, "-n"); |
1052 |
if (format == 'l') |
1071 |
if (format == 'l') |
1053 |
av[++narg] = opt_c; |
1072 |
av[++narg] = opt_c; |
Lines 1058-1063
Link Here
|
1058 |
av[++narg] = logname; |
1077 |
av[++narg] = logname; |
1059 |
av[++narg] = opt_h; |
1078 |
av[++narg] = opt_h; |
1060 |
av[++narg] = origin_host; |
1079 |
av[++narg] = origin_host; |
|
|
1080 |
av[++narg] = opt_j; |
1081 |
av[++narg] = jobname; |
1061 |
av[++narg] = pp->acct_file; |
1082 |
av[++narg] = pp->acct_file; |
1062 |
av[++narg] = NULL; |
1083 |
av[++narg] = NULL; |
1063 |
} else if (pp->filters[LPF_OUTPUT]) { |
1084 |
} else if (pp->filters[LPF_OUTPUT]) { |