Lines Matching refs:printer

210 	char  *printer;		/* printer name or NULL */
212 char *pname; /* Local printer name */
254 char *name; /* primary name of printer */
255 char **aliases; /* aliases for printer */
283 ns_printer_t *printer;
308 if ((printer = (ns_printer_t *)
313 printer->attributes = NULL;
314 status = ns_printer_put(printer);
316 (void) free(printer);
320 if ((printer = (ns_printer_t *)
323 ns_get_value_string("use", printer);
326 printer->attributes = NULL;
327 status = ns_printer_put(printer);
329 (void) free(printer);
334 (void) free(printer);
339 printer = (ns_printer_t *)malloc(sizeof (*printer));
340 memset(printer, 0, sizeof (*printer));
341 printer->name = (char *)printername;
342 printer->source = "nis";
346 addr->printer = (char *)printername;
352 ns_set_value("bsdaddr", addr, printer);
356 comment, printer);
358 status = ns_printer_put(printer);
361 (void) free(printer);
366 printer->name = "_default";
367 printer->attributes = NULL;
368 ns_set_value_from_string("use", printername, printer);
369 status = ns_printer_put(printer);
372 (void) free(printer);
377 (void) free(printer);
385 if ((printer = (ns_printer_t *)
390 ns_set_value_from_string("description", comment, printer);
393 NULL, printer);
395 status = ns_printer_put(printer);
397 (void) free(printer);
401 if ((printer = (ns_printer_t *)
403 char *dflt = (char *)ns_get_value_string("use", printer);
407 * We were the default printer but not
410 printer->attributes = NULL;
411 status = ns_printer_put(printer);
413 (void) free(printer);
420 printername, printer);
421 status = ns_printer_put(printer);
423 (void) free(printer);
429 printer = (ns_printer_t *)malloc(sizeof (*printer));
430 memset(printer, 0, sizeof (*printer));
431 printer->name = "_default";
432 printer->source = "nis";
433 ns_set_value_from_string("use", printername, printer);
434 status = ns_printer_put(printer);
436 (void) free(printer);
457 ns_printer_t *printer;
483 * Delete printer object from LDAP directory DIT
486 if ((printer = (ns_printer_t *)
491 printer->attributes = NULL;
492 printer->nsdata = malloc(sizeof (NS_LDAPDATA));
493 if (printer->nsdata == NULL) {
496 ((NS_LDAPDATA *)(printer->nsdata))->attrList = NULL;
497 printer->cred = cred;
498 printer->source = strdup("ldap");
499 status = ns_printer_put(printer);
500 free(printer->nsdata);
501 (void) ns_printer_destroy(printer);
507 if ((printer = (ns_printer_t *)
510 ns_get_value_string("use", printer);
513 printer->attributes = NULL;
514 printer->nsdata = malloc(sizeof (NS_LDAPDATA));
515 if (printer->nsdata == NULL) {
516 (void) ns_printer_destroy(printer);
519 ((NS_LDAPDATA *)(printer->nsdata))->attrList = NULL;
520 printer->cred = cred;
521 printer->source = strdup("ldap");
522 status = ns_printer_put(printer);
523 free(printer->nsdata);
525 (void) ns_printer_destroy(printer);
530 (void) ns_printer_destroy(printer);
536 * Add new printer object into LDAP directory DIT
539 printer = (ns_printer_t *)malloc(sizeof (*printer));
540 if (printer == NULL) {
543 (void) memset(printer, 0, sizeof (*printer));
544 printer->name = strdup((char *)printername);
545 printer->source = strdup("ldap");
547 printer->cred = cred;
563 (void) ns_printer_destroy(printer);
581 (void) ns_printer_destroy(printer);
589 printer->attributes = NULL;
590 printer->nsdata = malloc(sizeof (NS_LDAPDATA) + 2);
591 if (printer->nsdata == NULL) {
592 (void) ns_printer_destroy(printer);
595 ((NS_LDAPDATA *)(printer->nsdata))->attrList = attrList;
597 status = ns_printer_put(printer);
600 free(printer->nsdata);
601 (void) ns_printer_destroy(printer);
606 (void) free(printer->name);
608 printer->name = strdup("_default");
609 printer->attributes = NULL;
615 (void) ns_printer_destroy(printer);
622 ((NS_LDAPDATA *)(printer->nsdata))->attrList = attrList;
624 status = ns_printer_put(printer);
626 free(printer->nsdata);
628 (void) ns_printer_destroy(printer);
632 (void) ns_printer_destroy(printer);
637 * Modify printer object in the LDAP directory DIT
640 if ((printer = (ns_printer_t *)
644 printer->cred = cred;
645 printer->source = strdup("ldap");
651 (void) ns_printer_destroy(printer);
659 (void) ns_printer_destroy(printer);
666 printer->attributes = NULL;
667 printer->nsdata = malloc(sizeof (NS_LDAPDATA));
668 if (printer->nsdata == NULL) {
669 (void) ns_printer_destroy(printer);
672 ((NS_LDAPDATA *)(printer->nsdata))->attrList = attrList;
674 status = ns_printer_put(printer);
676 free(printer->nsdata);
678 (void) ns_printer_destroy(printer);
683 * Handle the default printer.
685 if ((printer = (ns_printer_t *)
687 char *dflt = (char *)ns_get_value_string("use", printer);
689 printer->source = strdup("ldap");
690 printer->cred = cred;
694 * We were the default printer but not
697 printer->attributes = NULL;
698 printer->nsdata = malloc(sizeof (NS_LDAPDATA));
699 if (printer->nsdata == NULL) {
700 (void) ns_printer_destroy(printer);
703 ((NS_LDAPDATA *)(printer->nsdata))->attrList = NULL;
704 status = ns_printer_put(printer);
705 free(printer->nsdata);
707 (void) ns_printer_destroy(printer);
715 printer->attributes = NULL;
716 printer->nsdata = malloc(sizeof (NS_LDAPDATA));
717 if (printer->nsdata == NULL) {
718 (void) ns_printer_destroy(printer);
725 (void) ns_printer_destroy(printer);
732 ((NS_LDAPDATA *)(printer->nsdata))->attrList = attrList;
734 status = ns_printer_put(printer);
736 free(printer->nsdata);
739 (void) ns_printer_destroy(printer);
747 printer = (ns_printer_t *)malloc(sizeof (*printer));
748 (void) memset(printer, 0, sizeof (*printer));
749 printer->name = strdup("_default");
750 printer->source = strdup("ldap");
751 printer->cred = cred;
753 printer->nsdata = malloc(sizeof (NS_LDAPDATA));
754 if (printer->nsdata == NULL) {
755 (void) ns_printer_destroy(printer);
762 (void) ns_printer_destroy(printer);
768 ((NS_LDAPDATA *)(printer->nsdata))->attrList = attrList;
770 status = ns_printer_put(printer);
772 free(printer->nsdata);
775 (void) ns_printer_destroy(printer);
780 (void) ns_printer_destroy(printer);