Lines Matching refs:NULL

49 	if ((name = strrchr(program, '/')) == NULL)  in usage()
77 char *result = NULL; in printer_name()
79 if (attributes != NULL) in printer_name()
80 papiAttributeListGetString(attributes, NULL, in printer_name()
90 papi_service_t svc = NULL; in lpstat_default_printer()
91 papi_printer_t p = NULL; in lpstat_default_printer()
92 char *name = NULL; in lpstat_default_printer()
94 status = papiServiceCreate(&svc, NULL, NULL, NULL, cli_auth_callback, in lpstat_default_printer()
95 encryption, NULL); in lpstat_default_printer()
97 char *req[] = { "printer-name", NULL }; in lpstat_default_printer()
99 status = papiPrinterQuery(svc, DEFAULT_DEST, req, NULL, &p); in lpstat_default_printer()
100 if (p != NULL) in lpstat_default_printer()
103 if (name != NULL) in lpstat_default_printer()
117 papi_service_t svc = NULL; in lpstat_service_status()
118 char *name = NULL; in lpstat_service_status()
120 if (((name = getenv("PAPI_SERVICE_URI")) == NULL) && in lpstat_service_status()
121 ((name = getenv("IPP_SERVER")) == NULL) && in lpstat_service_status()
122 ((name = getenv("CUPS_SERVER")) == NULL)) in lpstat_service_status()
125 status = papiServiceCreate(&svc, name, NULL, NULL, cli_auth_callback, in lpstat_service_status()
126 encryption, NULL); in lpstat_service_status()
140 papi_printer_t p = NULL; in get_device_uri()
141 char *keys[] = { "device-uri", NULL }; in get_device_uri()
142 char *result = NULL; in get_device_uri()
144 status = papiPrinterQuery(svc, name, keys, NULL, &p); in get_device_uri()
145 if ((status == PAPI_OK) && (p != NULL)) { in get_device_uri()
148 (void) papiAttributeListGetString(attrs, NULL, in get_device_uri()
150 if (result != NULL) in get_device_uri()
164 (void) papiAttributeListGetString(list, NULL, in print_description()
172 char *uri = NULL; in print_description()
173 uri_t *u = NULL; in print_description()
175 (void) papiAttributeListGetString(list, NULL, in print_description()
178 if ((uri != NULL) && (uri_from_string(uri, &u) == 0)) { in print_description()
181 if ((u->host == NULL) || in print_description()
197 NULL };
205 char *uri = NULL; in report_device()
206 char *device = NULL; in report_device()
207 uri_t *u = NULL; in report_device()
209 if (name == NULL) { in report_device()
210 status = papiAttributeListGetString(attrs, NULL, in report_device()
213 status = papiAttributeListGetString(attrs, NULL, in report_device()
217 if (name == NULL) in report_device()
220 (void) papiAttributeListGetString(attrs, NULL, in report_device()
223 if ((uri != NULL) && (uri_from_string(uri, &u) == 0)) { in report_device()
226 if ((u->host == NULL) || in report_device()
231 if (device != NULL) { in report_device()
234 } else if (uri != NULL) { in report_device()
249 "lpsched-reject-date", "lpsched-reject-reason", NULL };
260 if (name == NULL) { in report_accepting()
261 status = papiAttributeListGetString(attrs, NULL, in report_accepting()
264 status = papiAttributeListGetString(attrs, NULL, in report_accepting()
267 if (name == NULL) in report_accepting()
270 (void) papiAttributeListGetBoolean(attrs, NULL, in report_accepting()
273 (void) papiAttributeListGetDatetime(attrs, NULL, in report_accepting()
275 (void) papiAttributeListGetDatetime(attrs, NULL, in report_accepting()
277 (void) papiAttributeListGetDatetime(attrs, NULL, in report_accepting()
286 (void) papiAttributeListGetString(attrs, NULL, in report_accepting()
297 "member-names", NULL };
305 char *member = NULL; in report_class()
306 void *iter = NULL; in report_class()
313 if (name == NULL) { in report_class()
314 status = papiAttributeListGetString(attrs, NULL, in report_class()
317 status = papiAttributeListGetString(attrs, NULL, in report_class()
320 if (name == NULL) in report_class()
324 while (papiAttributeListGetString(attrs, &iter, NULL, &member) in report_class()
334 char *uri = NULL; in get_remote_hostname()
338 *host = NULL; in get_remote_hostname()
339 (void) papiAttributeListGetString(attrs, NULL, in get_remote_hostname()
341 (void) papiAttributeListGetString(attrs, NULL, in get_remote_hostname()
343 if (*host == NULL) { in get_remote_hostname()
344 if (uri != NULL) { in get_remote_hostname()
346 if (u->host == NULL) { in get_remote_hostname()
371 "lpsched-disable-reason", NULL };
381 char *member = NULL; in report_printer()
382 papi_job_t *j = NULL; in report_printer()
384 status = papiAttributeListGetString(attrs, NULL, in report_printer()
389 if (name == NULL) { in report_printer()
390 status = papiAttributeListGetString(attrs, NULL, in report_printer()
393 status = papiAttributeListGetString(attrs, NULL, in report_printer()
396 if (name == NULL) in report_printer()
401 status = papiAttributeListGetInteger(attrs, NULL, in report_printer()
410 status = papiPrinterListJobs(svc, name, NULL, in report_printer()
414 if (j != NULL) { in report_printer()
419 for (i = 0; j[i] != NULL; ++i) { in report_printer()
424 NULL, "job-state", &jstate); in report_printer()
426 NULL, "job-id", &jobid); in report_printer()
432 NULL, "job-id-requested", &jobid); in report_printer()
484 (void) papiAttributeListGetDatetime(attrs, NULL, in report_printer()
486 (void) papiAttributeListGetDatetime(attrs, NULL, in report_printer()
488 (void) papiAttributeListGetDatetime(attrs, NULL, in report_printer()
499 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
501 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
509 char *host = NULL; in report_printer()
519 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
524 iter = NULL; in report_printer()
528 while (papiAttributeListGetString(attrs, &iter, NULL, &str) in report_printer()
537 iter = NULL; in report_printer()
541 while (papiAttributeListGetString(attrs, &iter, NULL, &str) in report_printer()
547 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
553 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
557 str = NULL; in report_printer()
558 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
560 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
562 if (str != NULL) in report_printer()
565 str = NULL; in report_printer()
566 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
568 if (str != NULL) in report_printer()
572 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
578 iter = NULL; in report_printer()
583 if ((str != NULL) && (str[0] != '\0')) in report_printer()
584 while (papiAttributeListGetString(attrs, &iter, NULL, in report_printer()
588 str = NULL; in report_printer()
589 iter = NULL; in report_printer()
592 if (str != NULL) { in report_printer()
595 if ((str != NULL) && (str[0] != '\0')) in report_printer()
597 NULL, &str) == PAPI_OK) in report_printer()
602 iter = NULL; in report_printer()
607 if ((str != NULL) && (str[0] != '\0')) in report_printer()
608 while (papiAttributeListGetString(attrs, &iter, NULL, in report_printer()
613 iter = NULL; in report_printer()
618 if ((str != NULL) && (str[0] != '\0')) in report_printer()
619 while (papiAttributeListGetString(attrs, &iter, NULL, in report_printer()
624 (void) papiAttributeListGetString(attrs, NULL, in report_printer()
637 iter = NULL; in report_printer()
642 if ((str != NULL) && (str[0] != '\0')) in report_printer()
643 while (papiAttributeListGetString(attrs, &iter, NULL, in report_printer()
652 iter = NULL; in report_printer()
655 if (str != NULL) { in report_printer()
657 while (papiAttributeListGetString(attrs, &iter, NULL, in report_printer()
682 papi_service_t svc = NULL; in printer_query()
685 if (list == NULL) { in printer_query()
696 for (i = 0; name == NULL || list[i] != NULL; i++) { in printer_query()
699 status = papiServiceCreate(&svc, name, NULL, NULL, in printer_query()
700 cli_auth_callback, encryption, NULL); in printer_query()
716 if (name == NULL) { /* all */ in printer_query()
719 if (interest != NULL) { in printer_query()
722 for (i = 0; interest[i] != NULL; i++) in printer_query()
728 papi_printer_t printer = NULL; in printer_query()
729 char **keys = NULL; in printer_query()
746 NULL, &printer); in printer_query()
756 if (printer != NULL) in printer_query()
765 if (name == NULL) in printer_query()
779 for (i = 0; list[i] != NULL; i++) { in match_user()
787 static char **users = NULL;
797 char *host = NULL; in report_job()
805 static char *uri = NULL; in report_job()
806 static char *puri = NULL; /* printer-uri */ in report_job()
807 static char *pname = NULL; /* printer-name */ in report_job()
809 (void) papiAttributeListGetString(attrs, NULL, in report_job()
812 if ((users != NULL) && (match_user(user, users) < 0)) in report_job()
815 (void) papiAttributeListGetString(attrs, NULL, in report_job()
828 if (pname == NULL) { in report_job()
835 (void) papiAttributeListGetString(attrs, NULL, in report_job()
838 if (printer != NULL) { in report_job()
848 if (uri != NULL) { in report_job()
863 if (printer != NULL) { in report_job()
870 uri = NULL; in report_job()
872 NULL, "job-printer-uri", &uri); in report_job()
874 if (uri != NULL) in report_job()
877 puri = NULL; in report_job()
895 uri_t *u = NULL; in report_job()
897 if ((uri != NULL) && (uri_from_string(uri, &u) == 0)) { in report_job()
900 if ((u->host == NULL) || in report_job()
916 } else if (uri != NULL) { in report_job()
940 uri_t *u = NULL; in report_job()
941 if ((uri != NULL) && (uri_from_string(uri, &u) == 0)) { in report_job()
942 if ((u != NULL) && (u->host != NULL)) in report_job()
952 (void) papiAttributeListGetInteger(attrs, NULL, "job-k-octets", &size); in report_job()
954 (void) papiAttributeListGetInteger(attrs, NULL, "job-octets", &size); in report_job()
957 (void) papiAttributeListGetInteger(attrs, NULL, in report_job()
961 (void) papiAttributeListGetString(attrs, NULL, in report_job()
963 (void) papiAttributeListGetString(attrs, NULL, in report_job()
965 (void) papiAttributeListGetInteger(attrs, NULL, in report_job()
967 (void) papiAttributeListGetInteger(attrs, NULL, in report_job()
976 (void) papiAttributeListGetInteger(attrs, NULL, in report_job()
985 (void) papiAttributeListGetInteger(attrs, NULL, in report_job()
1008 char *form = NULL; in report_job()
1010 (void) papiAttributeListGetString(attrs, NULL, in report_job()
1014 (void) papiAttributeListGetString(attrs, NULL, "form", &form); in report_job()
1015 if (form != NULL) in report_job()
1033 papi_service_t svc = NULL; in job_query()
1041 status = papiServiceCreate(&svc, printer, NULL, NULL, in job_query()
1042 cli_auth_callback, encryption, NULL); in job_query()
1044 if ((status == PAPI_OK) && (printer != NULL)) in job_query()
1058 status = papiServiceCreate(&svc, printer, NULL, NULL, in job_query()
1059 cli_auth_callback, encryption, NULL); in job_query()
1070 if (printer == NULL) { /* all */ in job_query()
1073 if (interest != NULL) { in job_query()
1076 for (i = 0; interest[i] != NULL; i++) in job_query()
1081 papi_job_t *jobs = NULL; in job_query()
1083 status = papiPrinterListJobs(svc, printer, NULL, in job_query()
1093 if (jobs != NULL) { in job_query()
1096 for (i = 0; jobs[i] != NULL; i++) in job_query()
1104 papi_job_t job = NULL; in job_query()
1117 NULL, &job); in job_query()
1133 if (job != NULL) in job_query()
1159 char *form = NULL; in report_form()
1160 void *iter = NULL; in report_form()
1166 NULL, &form)) { in report_form()
1167 if ((name == NULL) || (strcmp(name, form) == 0)) { in report_form()
1170 char *detail = NULL; in report_form()
1171 status = papiAttributeListGetString(attrs, NULL, in report_form()
1186 char *pw = NULL; in report_print_wheels()
1187 void *iter = NULL; in report_print_wheels()
1192 status = papiAttributeListGetString(attrs, &iter, NULL, &pw)) { in report_print_wheels()
1193 if ((name == NULL) || (strcmp(name, pw) == 0)) { in report_print_wheels()
1196 char *info = NULL; in report_print_wheels()
1197 status = papiAttributeListGetString(attrs, NULL, in report_print_wheels()
1214 papi_service_t svc = NULL; in service_query()
1215 papi_attribute_t **attrs = NULL; in service_query()
1217 status = papiServiceCreate(&svc, name, NULL, NULL, cli_auth_callback, in service_query()
1218 encryption, NULL); in service_query()
1225 if (attrs != NULL) { in service_query()
1287 optarg = NULL; in main()
1289 optarg = NULL; in main()
1294 if ((optarg == NULL) || (optarg[0] == '-')) in main()
1330 optarg = NULL; in main()
1332 optarg = NULL; in main()
1355 if (optarg != NULL) in main()
1357 exit_code += job_query(NULL, report_job, in main()
1359 if (users != NULL) { in main()
1361 users = NULL; in main()
1384 exit_code += printer_query(NULL, report_class, in main()
1386 exit_code += printer_query(NULL, report_device, in main()
1396 exit_code += printer_query(NULL, report_class, in main()
1398 exit_code += printer_query(NULL, report_device, in main()
1400 exit_code += printer_query(NULL, report_accepting, in main()
1402 exit_code += printer_query(NULL, report_printer, in main()
1408 exit_code += job_query(NULL, report_job, in main()
1425 if (pw != NULL) in main()
1427 exit_code += job_query(NULL, report_job, encryption, in main()
1429 if (users != NULL) { in main()
1431 users = NULL; in main()