Lines 217-223
static int
Link Here
|
217 |
getprintcap_int(char *bp, struct printer *pp) |
217 |
getprintcap_int(char *bp, struct printer *pp) |
218 |
{ |
218 |
{ |
219 |
enum lpd_filters filt; |
219 |
enum lpd_filters filt; |
220 |
char *rp_name; |
220 |
char *p_path, *rp_name; |
221 |
int error; |
221 |
int error; |
222 |
|
222 |
|
223 |
if ((pp->printer = capdb_canonical_name(bp)) == 0) |
223 |
if ((pp->printer = capdb_canonical_name(bp)) == 0) |
Lines 231-236
getprintcap_int(char *bp, struct printer *pp)
Link Here
|
231 |
CHK(capdb_getaltnum(bp, "du", "daemon.user", DEFUID, |
231 |
CHK(capdb_getaltnum(bp, "du", "daemon.user", DEFUID, |
232 |
&pp->daemon_user)); |
232 |
&pp->daemon_user)); |
233 |
CHK(capdb_getaltstr(bp, "ff", "job.formfeed", DEFFF, &pp->form_feed)); |
233 |
CHK(capdb_getaltstr(bp, "ff", "job.formfeed", DEFFF, &pp->form_feed)); |
|
|
234 |
CHK(capdb_getaltstr(bp, "fp", "filt.path", 0, &pp->filter_path)); |
234 |
CHK(capdb_getaltstr(bp, "lf", "spool.log", _PATH_CONSOLE, |
235 |
CHK(capdb_getaltstr(bp, "lf", "spool.log", _PATH_CONSOLE, |
235 |
&pp->log_file)); |
236 |
&pp->log_file)); |
236 |
CHK(capdb_getaltstr(bp, "lo", "spool.lock", DEFLOCK, &pp->lock_file)); |
237 |
CHK(capdb_getaltstr(bp, "lo", "spool.lock", DEFLOCK, &pp->lock_file)); |
Lines 270-275
getprintcap_int(char *bp, struct printer *pp)
Link Here
|
270 |
pp->tof = !capdb_getaltlog(bp, "fo", "job.topofform"); |
271 |
pp->tof = !capdb_getaltlog(bp, "fo", "job.topofform"); |
271 |
|
272 |
|
272 |
/* |
273 |
/* |
|
|
274 |
* Substitute spaces and commas in the PATH environment variable |
275 |
* by colons. |
276 |
*/ |
277 |
if (pp->filter_path) { |
278 |
for (p_path = pp->filter_path; *p_path; p_path++) { |
279 |
if (*p_path == ' ' || *p_path == ',') |
280 |
*p_path = ':'; |
281 |
} |
282 |
} |
283 |
|
284 |
/* |
273 |
* Decide if the remote printer name matches the local printer name. |
285 |
* Decide if the remote printer name matches the local printer name. |
274 |
* If no name is given then we assume they mean them to match. |
286 |
* If no name is given then we assume they mean them to match. |
275 |
* If a name is given see if the rp_name is one of the names for |
287 |
* If a name is given see if the rp_name is one of the names for |
Lines 344-349
free_printer(struct printer *pp)
Link Here
|
344 |
for (filt = 0; filt < LPF_COUNT; filt++) |
356 |
for (filt = 0; filt < LPF_COUNT; filt++) |
345 |
cfree(pp->filters[filt]); |
357 |
cfree(pp->filters[filt]); |
346 |
cfree(pp->form_feed); |
358 |
cfree(pp->form_feed); |
|
|
359 |
cfree(pp->filter_path); |
347 |
cfree(pp->log_file); |
360 |
cfree(pp->log_file); |
348 |
cfree(pp->lock_file); |
361 |
cfree(pp->lock_file); |
349 |
cfree(pp->lp); |
362 |
cfree(pp->lp); |