[Openprinting-papi-svn] SF.net SVN: openprinting: [173] trunk/papi
Brought to you by:
njacobs,
shawn_pratt
From: <nj...@us...> - 2006-05-25 04:52:12
|
Revision: 173 Author: njacobs Date: 2006-05-24 21:52:06 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/openprinting/?rev=173&view=rev Log Message: ----------- more closely align with Solaris lpstat -p output Modified Paths: -------------- trunk/papi/ChangeLog trunk/papi/source/bsd-sysv-commands/lpstat.c Modified: trunk/papi/ChangeLog =================================================================== --- trunk/papi/ChangeLog 2006-05-24 20:54:00 UTC (rev 172) +++ trunk/papi/ChangeLog 2006-05-25 04:52:06 UTC (rev 173) @@ -4,6 +4,9 @@ fixed papiServiceGetAttributeList() to query the "default" service if it's not bound to one already. + * source/bsd-sysv-commands/lpstat.c: + more closely align with Solaris lpstat -p output + 2006-05-19 Norm Jacobs <Norm.Jacobs@Sun.COM> * source/libpapi-dynamic/nss.c: Modified: trunk/papi/source/bsd-sysv-commands/lpstat.c =================================================================== --- trunk/papi/source/bsd-sysv-commands/lpstat.c 2006-05-24 20:54:00 UTC (rev 172) +++ trunk/papi/source/bsd-sysv-commands/lpstat.c 2006-05-25 04:52:06 UTC (rev 173) @@ -405,6 +405,14 @@ "lpsched-interface-script", &str); printf(gettext("\tInterface: %s\n"), str); + str = ""; + (void) papiAttributeListGetString(attrs, NULL, + "ppd-file-uri", &str); + (void) papiAttributeListGetString(attrs, NULL, + "lpsched-ppd-source-path", &str); + if (str != NULL) + printf(gettext("\tPPD: %s\n"), str); + str = NULL; (void) papiAttributeListGetString(attrs, NULL, "lpsched-fault-alert-command", &str); @@ -417,27 +425,31 @@ printf(gettext("\tAfter fault: %s\n"), ((str[0] == '\0') ? gettext("continue") : str)); - str = ""; + str = "(all)"; iter = NULL; - printf(gettext("\tUsers allowed:\n")); - for (status = papiAttributeListGetString(attrs, &iter, + (void) papiAttributeListGetString(attrs, &iter, "requesting-user-name-allowed", &str); - status == PAPI_OK; - status = papiAttributeListGetString(attrs, &iter, NULL, - &str)) + printf(gettext("\tUsers allowed:\n\t\t%s\n"), + ((str[0] == '\0') ? gettext("(none)") : str)); + if ((str != NULL) && (str[0] != '\0')) + while (papiAttributeListGetString(attrs, &iter, NULL, + &str) == PAPI_OK) printf("\t\t%s\n", str); - str = ""; + str = NULL; iter = NULL; - printf(gettext("\tUsers denied:\n")); - for (status = papiAttributeListGetString(attrs, &iter, + (void) papiAttributeListGetString(attrs, &iter, "requesting-user-name-denied", &str); - status == PAPI_OK; - status = papiAttributeListGetString(attrs, &iter, NULL, - &str)) - printf("\t\t%s\n", str); + if (str != NULL) { + printf(gettext("\tUsers denied:\n\t\t%s\n"), + ((str[0] == '\0') ? gettext("(none)") : str)); + if ((str != NULL) && (str[0] != '\0')) + while (papiAttributeListGetString(attrs, &iter, + NULL, &str) == PAPI_OK) + printf("\t\t%s\n", str); + } - str = ""; + str = "(none)"; iter = NULL; (void) papiAttributeListGetString(attrs, &iter, "form-supported", &str); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |