Lines Matching refs:bp
100 char *bp; in getprintcap() local
102 if ((status = cgetent(&bp, printcapdb, printer)) < 0) in getprintcap()
104 status = getprintcap_int(bp, pp); in getprintcap()
105 free(bp); in getprintcap()
146 char *bp; in firstprinter() local
149 status = cgetfirst(&bp, printcapdb); in firstprinter()
157 status = getprintcap_int(bp, pp); in firstprinter()
158 free(bp); in firstprinter()
168 char *bp; in nextprinter() local
171 status = cgetnext(&bp, printcapdb); in nextprinter()
179 status = getprintcap_int(bp, pp); in nextprinter()
180 free(bp); in nextprinter()
211 getprintcap_int(char *bp, struct printer *pp) in getprintcap_int() argument
217 if ((pp->printer = capdb_canonical_name(bp)) == NULL) in getprintcap_int()
221 CHK(capdb_getaltstr(bp, "af", "acct.file", 0, &pp->acct_file)); in getprintcap_int()
222 CHK(capdb_getaltnum(bp, "br", "tty.rate", 0, &pp->baud_rate)); in getprintcap_int()
223 CHK(capdb_getaltnum(bp, "ct", "remote.timeout", DEFTIMEOUT, in getprintcap_int()
225 CHK(capdb_getaltnum(bp, "du", "daemon.user", DEFUID, in getprintcap_int()
227 CHK(capdb_getaltstr(bp, "ff", "job.formfeed", DEFFF, &pp->form_feed)); in getprintcap_int()
228 CHK(capdb_getaltstr(bp, "lf", "spool.log", _PATH_CONSOLE, in getprintcap_int()
230 CHK(capdb_getaltstr(bp, "lo", "spool.lock", DEFLOCK, &pp->lock_file)); in getprintcap_int()
231 CHK(capdb_getaltstr(bp, "lp", "tty.device", _PATH_DEFDEVLP, &pp->lp)); in getprintcap_int()
232 CHK(capdb_getaltnum(bp, "mc", "max.copies", DEFMAXCOPIES, in getprintcap_int()
234 CHK(capdb_getaltstr(bp, "ms", "tty.mode", 0, &pp->mode_set)); in getprintcap_int()
235 CHK(capdb_getaltnum(bp, "mx", "max.blocks", DEFMX, &pp->max_blocks)); in getprintcap_int()
236 CHK(capdb_getaltnum(bp, "pc", "acct.price", 0, &pp->price100)); in getprintcap_int()
237 CHK(capdb_getaltnum(bp, "pl", "page.length", DEFLENGTH, in getprintcap_int()
239 CHK(capdb_getaltnum(bp, "pw", "page.width", DEFWIDTH, in getprintcap_int()
241 CHK(capdb_getaltnum(bp, "px", "page.pwidth", 0, &pp->page_pwidth)); in getprintcap_int()
242 CHK(capdb_getaltnum(bp, "py", "page.plength", 0, &pp->page_plength)); in getprintcap_int()
243 CHK(capdb_getaltstr(bp, "rg", "daemon.restrictgrp", 0, in getprintcap_int()
245 CHK(capdb_getaltstr(bp, "rm", "remote.host", 0, &pp->remote_host)); in getprintcap_int()
246 CHK(capdb_getaltstr(bp, "rp", "remote.queue", DEFLP, in getprintcap_int()
248 CHK(capdb_getaltstr(bp, "sd", "spool.dir", _PATH_DEFSPOOL, in getprintcap_int()
250 CHK(capdb_getaltstr(bp, "sr", "stat.recv", 0, &pp->stat_recv)); in getprintcap_int()
251 CHK(capdb_getaltstr(bp, "ss", "stat.send", 0, &pp->stat_send)); in getprintcap_int()
252 CHK(capdb_getaltstr(bp, "st", "spool.status", DEFSTAT, in getprintcap_int()
254 CHK(capdb_getaltstr(bp, "tr", "job.trailer", 0, &pp->trailer)); in getprintcap_int()
256 pp->resend_copies = capdb_getaltlog(bp, "rc", "remote.resend_copies"); in getprintcap_int()
257 pp->restricted = capdb_getaltlog(bp, "rs", "daemon.restricted"); in getprintcap_int()
258 pp->short_banner = capdb_getaltlog(bp, "sb", "banner.short"); in getprintcap_int()
259 pp->no_copies = capdb_getaltlog(bp, "sc", "job.no_copies"); in getprintcap_int()
260 pp->no_formfeed = capdb_getaltlog(bp, "sf", "job.no_formfeed"); in getprintcap_int()
261 pp->no_header = capdb_getaltlog(bp, "sh", "banner.disable"); in getprintcap_int()
262 pp->header_last = capdb_getaltlog(bp, "hl", "banner.last"); in getprintcap_int()
263 pp->rw = capdb_getaltlog(bp, "rw", "tty.rw"); in getprintcap_int()
264 pp->tof = !capdb_getaltlog(bp, "fo", "job.topofform"); in getprintcap_int()
273 CHK((error = capdb_getaltstr(bp, "rp", "remote.queue", 0, &rp_name))); in getprintcap_int()
275 if (cgetmatch(bp,rp_name) != 0) in getprintcap_int()
284 CHK(capdb_getaltstr(bp, filters[filt], longfilters[filt], 0, in getprintcap_int()
370 capdb_getaltstr(char *bp, const char *shrt, const char *lng, in capdb_getaltstr() argument
375 status = cgetstr(bp, lng, result); in capdb_getaltstr()
378 status = cgetstr(bp, shrt, result); in capdb_getaltstr()
394 capdb_getaltnum(char *bp, const char *shrt, const char *lng, long dflt, in capdb_getaltnum() argument
399 status = cgetnum(bp, lng, result); in capdb_getaltnum()
402 status = cgetnum(bp, shrt, result); in capdb_getaltnum()
414 capdb_getaltlog(char *bp, const char *shrt, const char *lng) in capdb_getaltlog() argument
416 if (cgetcap(bp, lng, ':')) in capdb_getaltlog()
418 if (cgetcap(bp, shrt, ':')) in capdb_getaltlog()
430 capdb_canonical_name(const char *bp) in capdb_canonical_name() argument
435 nameend = strpbrk(bp, "|:"); in capdb_canonical_name()
437 nameend = bp + 1; in capdb_canonical_name()
438 if ((retval = malloc(nameend - bp + 1)) != NULL) { in capdb_canonical_name()
440 strncat(retval, bp, nameend - bp); in capdb_canonical_name()