Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 1f219e5ca3 |
@@ -3,14 +3,6 @@ CHANGES-1.3.txt
|
||||
|
||||
CHANGES IN CUPS V1.3.11
|
||||
|
||||
- The scheduler did not prevent nested classes (STR #3211)
|
||||
- The scheduler did not reprint processing jobs that were moved to
|
||||
another destination (STR #3222)
|
||||
- The scheduler did not reset the current job file when stopping a
|
||||
printer (STR #3226)
|
||||
- The scheduler did not handle POSTs to custom CGIs properly (STR #3221)
|
||||
- The pdftops filter did not print landscape PDF pages properly
|
||||
(STR #2881)
|
||||
- The scheduler did not handle partial header lines properly from CGI
|
||||
programs (STR #3194)
|
||||
- The web interface could hang on OpenBSD (STR #3176, STR #3196)
|
||||
|
||||
+1
-140
@@ -1,145 +1,6 @@
|
||||
CHANGES.txt - 2009-11-09
|
||||
CHANGES.txt - 2009-05-16
|
||||
------------------------
|
||||
|
||||
CHANGES IN CUPS V1.4.2
|
||||
|
||||
- SECURITY: The CUPS web interface was vulnerable to several XSS and
|
||||
HTTP header/body attacks via attribute injection (STR #3367,
|
||||
STR #3401)
|
||||
- Fixed localization errors (STR #3359, STR #3372, STR #3380, STR #3387)
|
||||
- The documentation for classes.conf and printers.conf did not provide
|
||||
the correct instructions for manual changes (STR #3351)
|
||||
- The scheduler did not always rebuild printer cache files when the
|
||||
driver was changed (STR #3356)
|
||||
- The documentation makefile failed to install localizations when using
|
||||
newer versions of Bash (STR #3360)
|
||||
- The configure script did not use the --with-xinetd value for the
|
||||
default LPD configuration path (STR #3347)
|
||||
- The configure script incorrectly required glib for DBUS support
|
||||
(STR #3346)
|
||||
- The cupstestppd program incorrectly reported filters with bad
|
||||
permisssions as missing (STR #3363)
|
||||
- The cups.desktop file used the wrong locale names (STR #3358)
|
||||
- cupsSideChannelRead() did not return an error for short reads.
|
||||
- The installed PAM configuration file did not use the correct options
|
||||
with the pam_unix2 module (STR #3313)
|
||||
- The scheduler did not preserve default options that contained special
|
||||
characters (STR #3340)
|
||||
- The scheduler did not remove old pre-filters when updating a printer
|
||||
driver (STR #3342)
|
||||
- The HP/GL-2 filter did not check for early end-of-file (STR #3319)
|
||||
- The USB backend did not compile on some platforms (STR #3332)
|
||||
- cupsSideChannelSNMPWalk() could go into an infinite loop with broken
|
||||
SNMP implementations.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.4.1
|
||||
|
||||
- Documention fixes (STR #3296)
|
||||
- SNMP supply levels and states were wrong for some printers.
|
||||
- The IPP backend did not update the auth-info-required value.
|
||||
- The libusb-based USB backend would hang at the end of the job
|
||||
(STR #3315, STR #3318)
|
||||
- DNS-SD registrations for raw queues had an empty "ty" key (STR #3299)
|
||||
- The JPEG and BMP MIME type rules were broken (STR #3284)
|
||||
- cupsGetNamedDest returned the default printer when the named
|
||||
destination did not exist (STR #3285)
|
||||
- The JobKillDelay was not triggered for canceled jobs (STR #3292)
|
||||
- The PPD compiler could get in an infinite loop (STR #3293)
|
||||
- The configure check for dns-sd.h was broken (STR #3297)
|
||||
- The "Query Printer for Default Options" page did not go away if the
|
||||
query job was held (STR #3302)
|
||||
- Boolean options did not show up as selected in the web interface
|
||||
(STR #3303)
|
||||
- The scheduler did not cache or report driver information files
|
||||
correctly, leading to a variety of issues (STR #3283, STR #3297,
|
||||
STR #3305)
|
||||
- cupsDoIORequest() did not abort on permanent errors (STR #3311)
|
||||
- Modifying a class in the web interface did not work (STR #3312)
|
||||
- BrowseLocalProtocols could be cleared when changing the sharing
|
||||
setting (STR #3287)
|
||||
- The scheduler could return an empty supported document format
|
||||
(STR #3308)
|
||||
- The PPD compiler generated invalid PPD files when the locale used
|
||||
something other than "." for the decimal point (STR #3300)
|
||||
- The IPP backend did not handle some non-comforming IPP printer
|
||||
implementations (STR #3262)
|
||||
- The scheduler leaked three file descriptors to each job filter
|
||||
(STR #3263)
|
||||
- The scheduler now uses a default CUPS-Get-Devices timeout of 15
|
||||
seconds (STR #3307)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.4.0
|
||||
|
||||
- Localization updates (STR #3223, STR #3246, STR #3248, STR #3250)
|
||||
- Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260)
|
||||
- The --with-pdftops configure option did not accept a full path to the
|
||||
filter (STR #3278)
|
||||
- The banner filter did not position the back side image correctly
|
||||
(STR #3277)
|
||||
- The dnssd backend could crash (STR #3272)
|
||||
- The 1284 device ID sometimes contained trailing garbage (STR #3266)
|
||||
- The USB backend returned different URIs for some printers than in
|
||||
CUPS 1.3 (STR #3259)
|
||||
- The scheduler did not do local job-hold-until processing for remote
|
||||
queues (STR #3258)
|
||||
- The scheduler did not try all possible SSL certificates on Mac OS X.
|
||||
- The scheduler did not always remove a file descriptor when using the
|
||||
kqueue interface (STR #3256)
|
||||
- The scheduler did not protect against bad job control files in all
|
||||
cases (STR #3253)
|
||||
- The scheduler did not encode "+" in model names (STR #3254)
|
||||
- The web interface didn't show the default options (STR #3244)
|
||||
- The IPP and LPD backends needed print data before they would do an
|
||||
SNMP query.
|
||||
- Fixed a GNU TLS compatibility issue (STR #3231)
|
||||
- Fixed a HTML error in the add and modify printer web interface
|
||||
templates (STR #3229)
|
||||
- The scheduler did not minimize the number of printer state events that
|
||||
were generated by filter STATE: messages, which could lead to poor
|
||||
performance.
|
||||
- The USB backend on Mac OS X did not cleanly cancel a job.
|
||||
- The network backends now set the connecting-to-device printer-state-
|
||||
reasons value when looking up the address and copying the print data
|
||||
for consistency.
|
||||
- The scheduler now supports the com.apple.print.recoverable-warning
|
||||
reason on all platforms.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.4rc1
|
||||
|
||||
- The PPD compiler documentation was missing information on localization
|
||||
(STR #3212)
|
||||
- The IPP backend now reconnects after every request when talking to
|
||||
printers that claim IPP support but only use HTTP/1.0.
|
||||
- The PPD compiler crashed when both "Resolution" and "Group foo Option
|
||||
Resolution" were specified in the .drv file.
|
||||
- The PPD compiler's #if/#elif/#else/#endif did not work for undefined
|
||||
variables (STR #3210)
|
||||
- Static libraries could not be installed by a non-root user on systems
|
||||
needing a ranlib program (STR #3209)
|
||||
- The scheduler incorrectly always tried to copy Kerberos credentials
|
||||
for print jobs.
|
||||
- Updated the Spanish localization (STR #3204)
|
||||
- The scheduler crashed when getting the default paper size from
|
||||
libpaper (STR #3205, STR #3206)
|
||||
- The PPD compiler now defines six variables: CUPS_VERSION,
|
||||
CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, CUPS_VERSION_PATCH,
|
||||
PLATFORM_NAME, and PLATFORM_ARCH (STR #3203)
|
||||
- Fixed a whitespace skipping bug in cupsRasterInterpretPPD.
|
||||
- The scheduler did not return HTTP 403 (Forbidden) for authenticated
|
||||
users that were not authorized to do IPP operations (STR #3193)
|
||||
- The scheduler did not report more than 8 Product strings from a PPD
|
||||
file. Some PPD files have as many as 24.
|
||||
- ppdOpen*() could crash if a keyword had no value string (something
|
||||
that cupstestppd looks for...)
|
||||
- cupsLangDefault() did not return the correct language on Mac OS X.
|
||||
- The Mac OS X USB backend did not handle aborted or stalled pipe
|
||||
conditions properly, which prevented drivers from ejecting partial
|
||||
pages when a job was canceled or held.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.4b3
|
||||
|
||||
- Documentation fixes (STR #3044, STR #3057, STR #3153, STR #3158,
|
||||
|
||||
+1
-3
@@ -1,4 +1,4 @@
|
||||
CREDITS.txt - 2009-07-07
|
||||
CREDITS.txt - 2008-12-08
|
||||
------------------------
|
||||
|
||||
Few projects are completed by one person, and CUPS is no exception. We'd
|
||||
@@ -17,7 +17,6 @@ like to thank the following individuals for their contributions:
|
||||
Wang Jian - CUPS RPM corrections.
|
||||
Roderick Johnstone - Beta tester of the millenium.
|
||||
Till Kamppeter - Bug fixes, beta testing, evangelism.
|
||||
I–aki Larra–aga - Basque localization.
|
||||
Kenshi Muto - Japanese localization, patches, and
|
||||
testing.
|
||||
Tomohiro Kato - Japanese localization.
|
||||
@@ -29,7 +28,6 @@ like to thank the following individuals for their contributions:
|
||||
Jason McMullan - Original CUPS RPM distributions.
|
||||
Wes Morgan - *BSD fixes.
|
||||
Daniel Nylander - Swedish localization.
|
||||
Niklas 'Nille' �kerstršm - Swedish localization.
|
||||
Giulio Orsero - Bug fixes and testing.
|
||||
Michal Osowiecki - Polish localization.
|
||||
Citra Paska - Indonesian localization.
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
INSTALL - CUPS v1.4.0 - 2009-06-26
|
||||
INSTALL - CUPS v1.4b3 - 2009-05-19
|
||||
----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source code. For more
|
||||
@@ -43,7 +43,7 @@ COMPILING THE SUBVERSION REPOSITORY CODE
|
||||
configure script. You'll need to run the GNU autoconf software (2.60 or
|
||||
higher) to create it:
|
||||
|
||||
autoconf
|
||||
autoconf -f
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
AR = @AR@
|
||||
AWK = @AWK@
|
||||
CC = @LIBTOOL@ @CC@
|
||||
CHMOD = @CHMOD@
|
||||
CXX = @LIBTOOL@ @CXX@
|
||||
DSO = @DSO@
|
||||
DSOXX = @DSOXX@
|
||||
|
||||
+1
-2
@@ -392,7 +392,6 @@ docset: apihelp
|
||||
echo Indexing docset...
|
||||
/Developer/usr/bin/docsetutil index org.cups.docset
|
||||
echo Generating docset archive and feed...
|
||||
$(RM) org.cups.docset.atom
|
||||
/Developer/usr/bin/docsetutil package --output org.cups.docset.xar \
|
||||
--atom org.cups.docset.atom \
|
||||
--download-url http://www.cups.org/org.cups.docset.xar \
|
||||
@@ -425,7 +424,7 @@ dist: all
|
||||
*BSD*) $(MAKE) $(MFLAGS) bsd;; \
|
||||
Darwin*) $(MAKE) $(MFLAGS) osx;; \
|
||||
IRIX*) $(MAKE) $(MFLAGS) tardist;; \
|
||||
Linux*) test ! -x /usr/bin/rpm || $(MAKE) $(MFLAGS) rpm;; \
|
||||
Linux*) $(MAKE) $(MFLAGS) rpm;; \
|
||||
SunOS*) $(MAKE) $(MFLAGS) pkg;; \
|
||||
esac
|
||||
|
||||
|
||||
+14
-1
@@ -1,6 +1,19 @@
|
||||
README - CUPS v1.4.0 - 2009-06-26
|
||||
README - CUPS v1.4b3 - 2009-05-19
|
||||
---------------------------------
|
||||
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
********** **********
|
||||
********** THIS IS BETA-RELEASE SOFTWARE. DO NOT USE ON **********
|
||||
********** PRODUCTION SYSTEMS! REPORT PROBLEMS TO THE **********
|
||||
********** CUPS FORUMS OR BUG REPORTING PAGES: **********
|
||||
********** **********
|
||||
********** http://www.cups.org/newsgroups.php (FORUMS) **********
|
||||
********** http://www.cups.org/str.php (BUGS) **********
|
||||
********** **********
|
||||
**********************************************************************
|
||||
**********************************************************************
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt"
|
||||
instead...
|
||||
|
||||
|
||||
@@ -276,16 +276,16 @@ extern int backendGetDeviceID(int fd, char *device_id,
|
||||
extern int backendGetMakeModel(const char *device_id,
|
||||
char *make_model,
|
||||
int make_model_size);
|
||||
extern int backendNetworkSideCB(int print_fd, int device_fd,
|
||||
extern void backendNetworkSideCB(int print_fd, int device_fd,
|
||||
int snmp_fd, http_addr_t *addr,
|
||||
int use_bc);
|
||||
extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd,
|
||||
http_addr_t *addr, int use_bc,
|
||||
int (*side_cb)(int print_fd,
|
||||
int device_fd,
|
||||
int snmp_fd,
|
||||
http_addr_t *addr,
|
||||
int use_bc));
|
||||
void (*side_cb)(int print_fd,
|
||||
int device_fd,
|
||||
int snmp_fd,
|
||||
http_addr_t *addr,
|
||||
int use_bc));
|
||||
extern int backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
|
||||
int *page_count,
|
||||
int *printer_state);
|
||||
|
||||
+2
-2
@@ -153,8 +153,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
memset(&action, 0, sizeof(action));
|
||||
|
||||
sigemptyset(&action.sa_mask);
|
||||
action.sa_handler = sigterm_handler;
|
||||
sigaction(SIGTERM, &action, NULL);
|
||||
action.sa_handler = SIG_IGN;
|
||||
sigaction(SIGTERM, &action, sigterm_handler);
|
||||
#else
|
||||
signal(SIGTERM, sigterm_handler);
|
||||
#endif /* HAVE_SIGSET */
|
||||
|
||||
+3
-18
@@ -196,19 +196,12 @@ backendGetDeviceID(
|
||||
* and then limit the length to the size of our buffer...
|
||||
*/
|
||||
|
||||
if (length > device_id_size)
|
||||
if (length > (device_id_size - 2))
|
||||
length = (((unsigned)device_id[1] & 255) << 8) +
|
||||
((unsigned)device_id[0] & 255);
|
||||
|
||||
if (length > device_id_size)
|
||||
length = device_id_size;
|
||||
|
||||
/*
|
||||
* The length field counts the number of bytes in the string
|
||||
* including the length field itself (2 bytes).
|
||||
*/
|
||||
|
||||
length -= 2;
|
||||
if (length > (device_id_size - 2))
|
||||
length = device_id_size - 2;
|
||||
|
||||
/*
|
||||
* Copy the device ID text to the beginning of the buffer and
|
||||
@@ -313,14 +306,6 @@ backendGetDeviceID(
|
||||
mfg = temp;
|
||||
}
|
||||
|
||||
if (!strncasecmp(mdl, mfg, strlen(mfg)))
|
||||
{
|
||||
mdl += strlen(mfg);
|
||||
|
||||
while (isspace(*mdl & 255))
|
||||
mdl ++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate the device URI from the manufacturer, make_model, and
|
||||
* serial number strings.
|
||||
|
||||
+57
-76
@@ -45,8 +45,6 @@
|
||||
|
||||
static char *password = NULL; /* Password for device URI */
|
||||
static int password_tries = 0; /* Password tries */
|
||||
static const char *auth_info_required = "none";
|
||||
/* New auth-info-required value */
|
||||
#ifdef __APPLE__
|
||||
static char pstmpname[1024] = ""; /* Temporary PostScript file name */
|
||||
#endif /* __APPLE__ */
|
||||
@@ -93,7 +91,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
int num_options; /* Number of printer options */
|
||||
cups_option_t *options; /* Printer options */
|
||||
const char *device_uri; /* Device URI */
|
||||
char scheme[255], /* Scheme in URI */
|
||||
char method[255], /* Method in URI */
|
||||
hostname[1024], /* Hostname */
|
||||
username[255], /* Username info */
|
||||
resource[1024], /* Resource info (printer name) */
|
||||
@@ -238,14 +236,21 @@ main(int argc, /* I - Number of command-line args */
|
||||
if ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
|
||||
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
|
||||
username, sizeof(username), hostname, sizeof(hostname), &port,
|
||||
resource, sizeof(resource));
|
||||
if (httpSeparateURI(HTTP_URI_CODING_ALL, device_uri,
|
||||
method, sizeof(method), username, sizeof(username),
|
||||
hostname, sizeof(hostname), &port,
|
||||
resource, sizeof(resource)) < HTTP_URI_OK)
|
||||
{
|
||||
_cupsLangPuts(stderr,
|
||||
_("ERROR: Missing device URI on command-line and no "
|
||||
"DEVICE_URI environment variable!\n"));
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
if (!port)
|
||||
port = IPP_PORT; /* Default to port 631 */
|
||||
|
||||
if (!strcmp(scheme, "https"))
|
||||
if (!strcmp(method, "https"))
|
||||
cupsSetEncryption(HTTP_ENCRYPT_ALWAYS);
|
||||
else
|
||||
cupsSetEncryption(HTTP_ENCRYPT_IF_REQUESTED);
|
||||
@@ -411,12 +416,11 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
int fd; /* File descriptor */
|
||||
http_addrlist_t *addrlist; /* Address list */
|
||||
char buffer[8192]; /* Buffer for copying */
|
||||
int bytes; /* Number of bytes read */
|
||||
off_t tbytes; /* Total bytes copied */
|
||||
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, "1")) == NULL)
|
||||
{
|
||||
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
|
||||
@@ -434,8 +438,23 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
_cupsLangPuts(stderr, _("INFO: Copying print data...\n"));
|
||||
|
||||
tbytes = backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0,
|
||||
backendNetworkSideCB);
|
||||
tbytes = 0;
|
||||
|
||||
while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0)
|
||||
{
|
||||
if (write(fd, buffer, bytes) < bytes)
|
||||
{
|
||||
_cupsLangPrintError(_("ERROR: Unable to write to temporary file"));
|
||||
close(fd);
|
||||
unlink(tmpfilename);
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
}
|
||||
else
|
||||
tbytes += bytes;
|
||||
|
||||
if (snmp_fd >= 0)
|
||||
backendCheckSideChannel(snmp_fd, &(addrlist->addr));
|
||||
}
|
||||
|
||||
if (snmp_fd >= 0)
|
||||
_cupsSNMPClose(snmp_fd);
|
||||
@@ -525,7 +544,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
do
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d\n",
|
||||
hostname, port);
|
||||
_cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
|
||||
|
||||
if ((http = httpConnectEncrypt(hostname, port, cupsEncryption())) == NULL)
|
||||
@@ -641,8 +661,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
* might contain username:password information...
|
||||
*/
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), scheme, NULL, hostname,
|
||||
port, resource);
|
||||
snprintf(uri, sizeof(uri), "%s://%s:%d%s", method, hostname, port, resource);
|
||||
|
||||
/*
|
||||
* First validate the destination and see if the device supports multiple
|
||||
@@ -683,9 +702,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
fputs("DEBUG: Getting supported attributes...\n", stderr);
|
||||
|
||||
if (http->version < HTTP_1_1)
|
||||
httpReconnect(http);
|
||||
|
||||
if ((supported = cupsDoRequest(http, request, resource)) == NULL)
|
||||
ipp_status = cupsLastError();
|
||||
else
|
||||
@@ -1005,9 +1021,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Do the request...
|
||||
*/
|
||||
|
||||
if (http->version < HTTP_1_1)
|
||||
httpReconnect(http);
|
||||
|
||||
if (num_files > 1)
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
else
|
||||
@@ -1051,21 +1064,16 @@ main(int argc, /* I - Number of command-line args */
|
||||
_cupsLangPrintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"),
|
||||
cupsLastErrorString());
|
||||
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n",
|
||||
httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE));
|
||||
|
||||
/*
|
||||
* Normal authentication goes through the password callback, which sets
|
||||
* auth_info_required to "username,password". Kerberos goes directly
|
||||
* through GSSAPI, so look for Negotiate in the WWW-Authenticate header
|
||||
* here and set auth_info_required as needed...
|
||||
*/
|
||||
|
||||
if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE),
|
||||
"Negotiate", 9))
|
||||
auth_info_required = "negotiate";
|
||||
fputs("ATTR: auth-info-required=negotiate\n", stderr);
|
||||
else
|
||||
fputs("ATTR: auth-info-required=username,password\n", stderr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1122,9 +1130,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, content_type);
|
||||
|
||||
if (http->version < HTTP_1_1)
|
||||
httpReconnect(http);
|
||||
|
||||
ippDelete(cupsDoFileRequest(http, request, resource, files[i]));
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT)
|
||||
@@ -1193,7 +1198,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Do the request...
|
||||
*/
|
||||
|
||||
if (!copies_sup || http->version < HTTP_1_1)
|
||||
if (!copies_sup)
|
||||
httpReconnect(http);
|
||||
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
@@ -1246,19 +1251,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* If the printer does not return a job-state attribute, it does not
|
||||
* conform to the IPP specification - break out immediately and fail
|
||||
* the job...
|
||||
*/
|
||||
|
||||
fputs("DEBUG: No job-state available from printer - stopping queue.\n",
|
||||
stderr);
|
||||
ipp_status = IPP_INTERNAL_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ippDelete(response);
|
||||
@@ -1303,15 +1295,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
page_count > start_count)
|
||||
fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
|
||||
|
||||
#ifdef HAVE_GSSAPI
|
||||
/*
|
||||
* See if we used Kerberos at all...
|
||||
*/
|
||||
|
||||
if (http->gssctx)
|
||||
auth_info_required = "negotiate";
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
/*
|
||||
* Free memory...
|
||||
*/
|
||||
@@ -1344,12 +1327,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Return the queue status...
|
||||
*/
|
||||
|
||||
fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required);
|
||||
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
|
||||
if (ipp_status == IPP_NOT_AUTHORIZED)
|
||||
return (CUPS_BACKEND_AUTH_REQUIRED);
|
||||
else if (ipp_status == IPP_INTERNAL_ERROR)
|
||||
return (CUPS_BACKEND_STOP);
|
||||
else if (ipp_status > IPP_OK_CONFLICT)
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
else
|
||||
@@ -1390,9 +1369,6 @@ cancel_job(http_t *http, /* I - HTTP connection */
|
||||
* Do the request...
|
||||
*/
|
||||
|
||||
if (http->version < HTTP_1_1)
|
||||
httpReconnect(http);
|
||||
|
||||
ippDelete(cupsDoRequest(http, request, resource));
|
||||
|
||||
if (cupsLastError() > IPP_OK_CONFLICT)
|
||||
@@ -1452,9 +1428,6 @@ check_printer_state(
|
||||
* Do the request...
|
||||
*/
|
||||
|
||||
if (http->version < HTTP_1_1)
|
||||
httpReconnect(http);
|
||||
|
||||
if ((response = cupsDoRequest(http, request, resource)) != NULL)
|
||||
{
|
||||
report_printer_state(response, job_id);
|
||||
@@ -1550,12 +1523,6 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
|
||||
{
|
||||
(void)prompt;
|
||||
|
||||
/*
|
||||
* Remember that we need to authenticate...
|
||||
*/
|
||||
|
||||
auth_info_required = "username,password";
|
||||
|
||||
if (password && *password && password_tries < 3)
|
||||
{
|
||||
password_tries ++;
|
||||
@@ -1565,10 +1532,23 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Give up after 3 tries or if we don't have a password to begin with...
|
||||
* If there is no password set in the device URI, return the
|
||||
* "authentication required" exit code...
|
||||
*/
|
||||
|
||||
return (NULL);
|
||||
if (tmpfilename[0])
|
||||
unlink(tmpfilename);
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (pstmpname[0])
|
||||
unlink(pstmpname);
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
fputs("ATTR: auth-info-required=username,password\n", stderr);
|
||||
|
||||
exit(CUPS_BACKEND_AUTH_REQUIRED);
|
||||
|
||||
return (NULL); /* Eliminate compiler warning */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1822,7 +1802,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
|
||||
* file...
|
||||
*/
|
||||
|
||||
dup2(fd, 1);
|
||||
close(1);
|
||||
dup(fd);
|
||||
close(fd);
|
||||
|
||||
if (!getuid())
|
||||
|
||||
+22
-10
@@ -113,7 +113,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
const char *device_uri; /* Device URI */
|
||||
char scheme[255], /* Scheme in URI */
|
||||
char method[255], /* Method in URI */
|
||||
hostname[1024], /* Hostname */
|
||||
username[255], /* Username info */
|
||||
resource[1024], /* Resource info (printer name) */
|
||||
@@ -193,8 +193,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
if ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
|
||||
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
|
||||
username, sizeof(username), hostname, sizeof(hostname), &port,
|
||||
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri,
|
||||
method, sizeof(method), username, sizeof(username),
|
||||
hostname, sizeof(hostname), &port,
|
||||
resource, sizeof(resource));
|
||||
|
||||
if (!port)
|
||||
@@ -425,11 +426,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
http_addrlist_t *addrlist; /* Address list */
|
||||
int snmp_fd; /* SNMP socket */
|
||||
char buffer[8192]; /* Buffer for copying */
|
||||
int bytes; /* Number of bytes read */
|
||||
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, "1")) == NULL)
|
||||
{
|
||||
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
|
||||
@@ -447,7 +447,19 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
_cupsLangPuts(stderr, _("INFO: Copying print data...\n"));
|
||||
|
||||
backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, backendNetworkSideCB);
|
||||
while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0)
|
||||
{
|
||||
if (write(fd, buffer, bytes) < bytes)
|
||||
{
|
||||
_cupsLangPrintError(_("ERROR: Unable to write to temporary file"));
|
||||
close(fd);
|
||||
unlink(tmpfilename);
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
}
|
||||
|
||||
if (snmp_fd >= 0)
|
||||
backendCheckSideChannel(snmp_fd, &(addrlist->addr));
|
||||
}
|
||||
|
||||
if (snmp_fd >= 0)
|
||||
_cupsSNMPClose(snmp_fd);
|
||||
@@ -683,7 +695,6 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
|
||||
sprintf(portname, "%d", port);
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
|
||||
@@ -710,8 +721,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
|
||||
* First try to reserve a port for this connection...
|
||||
*/
|
||||
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d for printer %s\n", hostname,
|
||||
port, printer);
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d for printer %s\n",
|
||||
hostname, port, printer);
|
||||
_cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
|
||||
|
||||
for (lport = reserve == RESERVE_RFC1179 ? 732 : 1024, addr = addrlist,
|
||||
|
||||
+6
-3
@@ -61,7 +61,7 @@ backendCheckSideChannel(
|
||||
* 'backendNetworkSideCB()' - Handle common network side-channel commands.
|
||||
*/
|
||||
|
||||
int /* O - -1 on error, 0 on success */
|
||||
void
|
||||
backendNetworkSideCB(
|
||||
int print_fd, /* I - Print file or -1 */
|
||||
int device_fd, /* I - Device file or -1 */
|
||||
@@ -79,7 +79,10 @@ backendNetworkSideCB(
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
return (-1);
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -281,7 +284,7 @@ backendNetworkSideCB(
|
||||
break;
|
||||
}
|
||||
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+10
-7
@@ -1278,7 +1278,7 @@ int papCancelRequest(int sockfd, u_short tid)
|
||||
* 'sidechannel_request()' - Handle side-channel requests.
|
||||
*/
|
||||
|
||||
static int
|
||||
static void
|
||||
sidechannel_request()
|
||||
{
|
||||
cups_sc_command_t command; /* Request command */
|
||||
@@ -1289,29 +1289,32 @@ sidechannel_request()
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
return (-1);
|
||||
{
|
||||
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
case CUPS_SC_CMD_GET_BIDI: /* Is the connection bidirectional? */
|
||||
data[0] = 1;
|
||||
return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0));
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_STATE: /* Return device state */
|
||||
data[0] = CUPS_SC_STATE_ONLINE;
|
||||
return (cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0));
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_DRAIN_OUTPUT: /* Drain all pending output */
|
||||
case CUPS_SC_CMD_SOFT_RESET: /* Do a soft reset */
|
||||
case CUPS_SC_CMD_GET_DEVICE_ID: /* Return IEEE-1284 device ID */
|
||||
default:
|
||||
return (cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
|
||||
NULL, 0, 1.0));
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
|
||||
NULL, 0, 1.0);
|
||||
break;
|
||||
}
|
||||
return (0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
*/
|
||||
|
||||
static void list_devices(void);
|
||||
static int side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
static void side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
http_addr_t *addr, int use_bc);
|
||||
|
||||
|
||||
@@ -615,7 +615,7 @@ list_devices(void)
|
||||
* 'side_cb()' - Handle side-channel requests...
|
||||
*/
|
||||
|
||||
static int /* O - 0 on success, -1 on error */
|
||||
static void
|
||||
side_cb(int print_fd, /* I - Print file */
|
||||
int device_fd, /* I - Device file */
|
||||
int snmp_fd, /* I - SNMP socket (unused) */
|
||||
@@ -634,7 +634,10 @@ side_cb(int print_fd, /* I - Print file */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
return (-1);
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -677,7 +680,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
}
|
||||
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-11
@@ -147,7 +147,7 @@ backendRunLoop(
|
||||
int snmp_fd, /* I - SNMP socket or -1 if none */
|
||||
http_addr_t *addr, /* I - Address of device */
|
||||
int use_bc, /* I - Use back-channel? */
|
||||
int (*side_cb)(int, int, int, http_addr_t *, int))
|
||||
void (*side_cb)(int, int, int, http_addr_t *, int))
|
||||
/* I - Side-channel callback */
|
||||
{
|
||||
int nfds; /* Maximum file descriptor value + 1 */
|
||||
@@ -196,14 +196,6 @@ backendRunLoop(
|
||||
signal(SIGTERM, SIG_IGN);
|
||||
#endif /* HAVE_SIGSET */
|
||||
}
|
||||
else if (print_fd < 0)
|
||||
{
|
||||
/*
|
||||
* Copy print data from stdin, but don't mess with the signal handlers...
|
||||
*/
|
||||
|
||||
print_fd = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Figure out the maximum file descriptor value to use with select()...
|
||||
@@ -274,8 +266,7 @@ backendRunLoop(
|
||||
* loop since it may have read from print_fd...
|
||||
*/
|
||||
|
||||
if ((*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc))
|
||||
side_cb = NULL;
|
||||
(*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
+11
-9
@@ -84,7 +84,7 @@
|
||||
*/
|
||||
|
||||
static void list_devices(void);
|
||||
static int side_cb(int print_fd, int device_fd, int use_bc);
|
||||
static void side_cb(int print_fd, int device_fd, int use_bc);
|
||||
|
||||
|
||||
/*
|
||||
@@ -109,8 +109,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
sep; /* Option separator */
|
||||
int port; /* Port number (not used) */
|
||||
int copies; /* Number of copies to print */
|
||||
int side_eof = 0, /* Saw EOF on side-channel? */
|
||||
print_fd, /* Print file */
|
||||
int print_fd, /* Print file */
|
||||
device_fd; /* Serial device */
|
||||
int nfds; /* Maximum file descriptor value + 1 */
|
||||
fd_set input, /* Input set for reading */
|
||||
@@ -559,7 +558,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
if (!print_bytes)
|
||||
FD_SET(print_fd, &input);
|
||||
FD_SET(device_fd, &input);
|
||||
if (!print_bytes && !side_eof)
|
||||
if (!print_bytes)
|
||||
FD_SET(CUPS_SC_FD, &input);
|
||||
|
||||
FD_ZERO(&output);
|
||||
@@ -580,8 +579,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
* loop since it may have read from print_fd...
|
||||
*/
|
||||
|
||||
if (side_cb(print_fd, device_fd, 1))
|
||||
side_eof = 1;
|
||||
side_cb(print_fd, device_fd, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1280,7 +1278,7 @@ list_devices(void)
|
||||
* 'side_cb()' - Handle side-channel requests...
|
||||
*/
|
||||
|
||||
static int /* O - 0 on success, -1 on error */
|
||||
static void
|
||||
side_cb(int print_fd, /* I - Print file */
|
||||
int device_fd, /* I - Device file */
|
||||
int use_bc) /* I - Using back-channel? */
|
||||
@@ -1294,7 +1292,11 @@ side_cb(int print_fd, /* I - Print file */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
return (-1);
|
||||
{
|
||||
_cupsLangPuts(stderr,
|
||||
_("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -1321,7 +1323,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
}
|
||||
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -229,11 +229,8 @@ backendSNMPSupplies(
|
||||
packet.object_type != CUPS_ASN1_OCTET_STRING)
|
||||
return (-1);
|
||||
|
||||
if (packet.object_value.string.num_bytes == 2)
|
||||
new_state = (packet.object_value.string.bytes[0] << 8) |
|
||||
packet.object_value.string.bytes[1];
|
||||
else
|
||||
new_state = 0;
|
||||
new_state = (packet.object_value.string.bytes[0] << 8) |
|
||||
packet.object_value.string.bytes[1];
|
||||
|
||||
if (current_state < 0)
|
||||
change_state = 0xffff;
|
||||
|
||||
+12
-8
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* AppSocket backend for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2009 by Apple Inc.
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -62,7 +62,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
const char *device_uri; /* Device URI */
|
||||
char scheme[255], /* Scheme in URI */
|
||||
char method[255], /* Method in URI */
|
||||
hostname[1024], /* Hostname */
|
||||
username[255], /* Username info (not used) */
|
||||
resource[1024], /* Resource info (not used) */
|
||||
@@ -168,8 +168,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
if ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
|
||||
return (CUPS_BACKEND_FAILED);
|
||||
|
||||
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
|
||||
username, sizeof(username), hostname, sizeof(hostname), &port,
|
||||
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri,
|
||||
method, sizeof(method), username, sizeof(username),
|
||||
hostname, sizeof(hostname), &port,
|
||||
resource, sizeof(resource));
|
||||
|
||||
if (port == 0)
|
||||
@@ -260,7 +261,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
sprintf(portname, "%d", port);
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
|
||||
|
||||
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
|
||||
@@ -270,9 +270,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
return (CUPS_BACKEND_STOP);
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
|
||||
fprintf(stderr, "DEBUG: Connecting to %s:%d\n",
|
||||
hostname, port);
|
||||
_cupsLangPuts(stderr, _("INFO: Connecting to printer...\n"));
|
||||
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
|
||||
for (delay = 5;;)
|
||||
{
|
||||
if ((addr = httpAddrConnect(addrlist, &device_fd)) == NULL)
|
||||
@@ -342,8 +345,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
if (recoverable)
|
||||
{
|
||||
/*
|
||||
* If we've shown a recoverable error make sure the printer proxies have a
|
||||
* chance to see the recovered message. Not pretty but necessary for now...
|
||||
* If we've shown a recoverable error make sure the printer proxies
|
||||
* have a chance to see the recovered message. Not pretty but
|
||||
* necessary for now...
|
||||
*/
|
||||
|
||||
fputs("INFO: recovered: \n", stderr);
|
||||
|
||||
+48
-205
@@ -16,10 +16,9 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* main() - Run the named backend.
|
||||
* sigterm_handler() - Flag when we get SIGTERM.
|
||||
* usage() - Show usage information.
|
||||
* walk_cb() - Show results of cupsSideChannelSNMPWalk...
|
||||
* main() - Run the named backend.
|
||||
* usage() - Show usage information.
|
||||
* walk_cb() - Show results of cupsSideChannelSNMPWalk...
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -35,21 +34,12 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
/*
|
||||
* Local globals...
|
||||
*/
|
||||
|
||||
static int job_canceled = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void sigterm_handler(int sig);
|
||||
static void usage(void);
|
||||
static void walk_cb(const char *oid, const char *data, int datalen,
|
||||
void *context);
|
||||
@@ -68,7 +58,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
char *argv[]) /* I - Command-line arguments */
|
||||
{
|
||||
int first_arg, /* First argument for backend */
|
||||
do_cancel = 0, /* Simulate a cancel-job via SIGTERM */
|
||||
do_ps = 0, /* Do PostScript query+test? */
|
||||
do_pcl = 0, /* Do PCL query+test? */
|
||||
do_side_tests = 0, /* Test side-channel ops? */
|
||||
@@ -80,12 +69,9 @@ main(int argc, /* I - Number of command-line args */
|
||||
char scheme[255], /* Scheme in URI == backend */
|
||||
backend[1024]; /* Backend path */
|
||||
const char *serverbin; /* CUPS_SERVERBIN environment variable */
|
||||
int fd, /* Temporary file descriptor */
|
||||
back_fds[2], /* Back-channel pipe */
|
||||
int back_fds[2], /* Back-channel pipe */
|
||||
side_fds[2], /* Side-channel socket */
|
||||
data_fds[2], /* Data pipe */
|
||||
back_pid = -1, /* Backend process ID */
|
||||
data_pid = -1, /* Trickle process ID */
|
||||
pid, /* Process ID */
|
||||
status; /* Exit status */
|
||||
|
||||
@@ -99,8 +85,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
first_arg ++)
|
||||
if (!strcmp(argv[first_arg], "-d"))
|
||||
show_log = 1;
|
||||
else if (!strcmp(argv[first_arg], "-cancel"))
|
||||
do_cancel = 1;
|
||||
else if (!strcmp(argv[first_arg], "-pcl"))
|
||||
do_pcl = 1;
|
||||
else if (!strcmp(argv[first_arg], "-ps"))
|
||||
@@ -176,44 +160,33 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Execute the trickle process as needed...
|
||||
*/
|
||||
|
||||
if (do_trickle || do_pcl || do_ps || do_cancel)
|
||||
if (do_trickle || do_pcl || do_ps)
|
||||
{
|
||||
pipe(data_fds);
|
||||
|
||||
signal(SIGTERM, sigterm_handler);
|
||||
|
||||
if ((data_pid = fork()) == 0)
|
||||
if ((pid = fork()) == 0)
|
||||
{
|
||||
/*
|
||||
* Trickle/query child comes here. Rearrange file descriptors so that
|
||||
* FD 1, 3, and 4 point to the backend...
|
||||
*/
|
||||
|
||||
if ((fd = open("/dev/null", O_RDONLY)) != 0)
|
||||
{
|
||||
dup2(fd, 0);
|
||||
close(fd);
|
||||
}
|
||||
close(0);
|
||||
open("/dev/null", O_RDONLY);
|
||||
|
||||
if (data_fds[1] != 1)
|
||||
{
|
||||
dup2(data_fds[1], 1);
|
||||
close(data_fds[1]);
|
||||
}
|
||||
close(1);
|
||||
dup(data_fds[1]);
|
||||
close(data_fds[0]);
|
||||
close(data_fds[1]);
|
||||
|
||||
if (back_fds[0] != 3)
|
||||
{
|
||||
dup2(back_fds[0], 3);
|
||||
close(back_fds[0]);
|
||||
}
|
||||
close(3);
|
||||
dup(back_fds[0]);
|
||||
close(back_fds[0]);
|
||||
close(back_fds[1]);
|
||||
|
||||
if (side_fds[0] != 4)
|
||||
{
|
||||
dup2(side_fds[0], 4);
|
||||
close(side_fds[0]);
|
||||
}
|
||||
close(4);
|
||||
dup(side_fds[0]);
|
||||
close(side_fds[0]);
|
||||
close(side_fds[1]);
|
||||
|
||||
if (do_trickle)
|
||||
@@ -230,97 +203,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
else if (do_cancel)
|
||||
{
|
||||
/*
|
||||
* Write PS or PCL lines until we see SIGTERM...
|
||||
*/
|
||||
|
||||
int line = 0, page = 0; /* Current line and page */
|
||||
ssize_t bytes; /* Number of bytes of response data */
|
||||
char buffer[1024]; /* Output buffer */
|
||||
|
||||
|
||||
if (do_pcl)
|
||||
write(1, "\033E", 2);
|
||||
else
|
||||
write(1, "%!\n/Courier findfont 12 scalefont setfont 0 setgray\n", 52);
|
||||
|
||||
while (!job_canceled)
|
||||
{
|
||||
if (line == 0)
|
||||
{
|
||||
page ++;
|
||||
|
||||
if (do_pcl)
|
||||
snprintf(buffer, sizeof(buffer), "PCL Page %d\r\n\r\n", page);
|
||||
else
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"18 732 moveto (PS Page %d) show\n", page);
|
||||
|
||||
write(1, buffer, strlen(buffer));
|
||||
}
|
||||
|
||||
line ++;
|
||||
|
||||
if (do_pcl)
|
||||
snprintf(buffer, sizeof(buffer), "Line %d\r\n", line);
|
||||
else
|
||||
snprintf(buffer, sizeof(buffer), "18 %d moveto (Line %d) show\n",
|
||||
720 - line * 12, line);
|
||||
|
||||
write(1, buffer, strlen(buffer));
|
||||
|
||||
if (line >= 55)
|
||||
{
|
||||
/*
|
||||
* Eject after 55 lines...
|
||||
*/
|
||||
|
||||
line = 0;
|
||||
if (do_pcl)
|
||||
write(1, "\014", 1);
|
||||
else
|
||||
write(1, "showpage\n", 9);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for back-channel data...
|
||||
*/
|
||||
|
||||
if ((bytes = cupsBackChannelRead(buffer, sizeof(buffer), 0)) > 0)
|
||||
write(2, buffer, bytes);
|
||||
|
||||
/*
|
||||
* Throttle output to ~100hz...
|
||||
*/
|
||||
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
/*
|
||||
* Eject current page with info...
|
||||
*/
|
||||
|
||||
if (do_pcl)
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"Canceled on line %d of page %d\r\n\014\033E", line, page);
|
||||
else
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
"\n18 %d moveto (Canceled on line %d of page %d)\nshowpage\n",
|
||||
720 - line * 12, line, page);
|
||||
|
||||
write(1, buffer, strlen(buffer));
|
||||
|
||||
/*
|
||||
* See if we get any back-channel data...
|
||||
*/
|
||||
|
||||
while ((bytes = cupsBackChannelRead(buffer, sizeof(buffer), 5.0)) > 0)
|
||||
write(2, buffer, bytes);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
@@ -400,7 +282,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
|
||||
exit(0);
|
||||
}
|
||||
else if (data_pid < 0)
|
||||
else if (pid < 0)
|
||||
{
|
||||
perror("testbackend: Unable to fork");
|
||||
return (1);
|
||||
@@ -413,43 +295,34 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Execute the backend...
|
||||
*/
|
||||
|
||||
if ((back_pid = fork()) == 0)
|
||||
if ((pid = fork()) == 0)
|
||||
{
|
||||
/*
|
||||
* Child comes here...
|
||||
*/
|
||||
|
||||
if (do_trickle || do_ps || do_pcl || do_cancel)
|
||||
if (do_trickle || do_ps)
|
||||
{
|
||||
if (data_fds[0] != 0)
|
||||
{
|
||||
dup2(data_fds[0], 0);
|
||||
close(data_fds[0]);
|
||||
}
|
||||
close(0);
|
||||
dup(data_fds[0]);
|
||||
close(data_fds[0]);
|
||||
close(data_fds[1]);
|
||||
}
|
||||
|
||||
if (!show_log)
|
||||
{
|
||||
if ((fd = open("/dev/null", O_WRONLY)) != 2)
|
||||
{
|
||||
dup2(fd, 2);
|
||||
close(fd);
|
||||
}
|
||||
close(2);
|
||||
open("/dev/null", O_WRONLY);
|
||||
}
|
||||
|
||||
if (back_fds[1] != 3)
|
||||
{
|
||||
dup2(back_fds[1], 3);
|
||||
close(back_fds[0]);
|
||||
}
|
||||
close(3);
|
||||
dup(back_fds[1]);
|
||||
close(back_fds[0]);
|
||||
close(back_fds[1]);
|
||||
|
||||
if (side_fds[1] != 4)
|
||||
{
|
||||
dup2(side_fds[1], 4);
|
||||
close(side_fds[0]);
|
||||
}
|
||||
close(4);
|
||||
dup(side_fds[1]);
|
||||
close(side_fds[0]);
|
||||
close(side_fds[1]);
|
||||
|
||||
execv(backend, argv + first_arg);
|
||||
@@ -457,7 +330,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
strerror(errno));
|
||||
return (errno);
|
||||
}
|
||||
else if (back_pid < 0)
|
||||
else if (pid < 0)
|
||||
{
|
||||
perror("testbackend: Unable to fork");
|
||||
return (1);
|
||||
@@ -467,24 +340,20 @@ main(int argc, /* I - Number of command-line args */
|
||||
* Parent comes here, setup back and side channel file descriptors...
|
||||
*/
|
||||
|
||||
if (do_trickle || do_ps || do_pcl || do_cancel)
|
||||
if (do_trickle || do_ps)
|
||||
{
|
||||
close(data_fds[0]);
|
||||
close(data_fds[1]);
|
||||
}
|
||||
|
||||
if (back_fds[0] != 3)
|
||||
{
|
||||
dup2(back_fds[0], 3);
|
||||
close(back_fds[0]);
|
||||
}
|
||||
close(3);
|
||||
dup(back_fds[0]);
|
||||
close(back_fds[0]);
|
||||
close(back_fds[1]);
|
||||
|
||||
if (side_fds[0] != 4)
|
||||
{
|
||||
dup2(side_fds[0], 4);
|
||||
close(side_fds[0]);
|
||||
}
|
||||
close(4);
|
||||
dup(side_fds[0]);
|
||||
close(side_fds[0]);
|
||||
close(side_fds[1]);
|
||||
|
||||
/*
|
||||
@@ -566,26 +435,14 @@ main(int argc, /* I - Number of command-line args */
|
||||
printf("CUPS_SC_CMD_SOFT_RESET returned %s\n", statuses[scstatus]);
|
||||
}
|
||||
|
||||
if (do_cancel)
|
||||
while (wait(&status) != pid);
|
||||
|
||||
if (status)
|
||||
{
|
||||
sleep(1);
|
||||
kill(data_pid, SIGTERM);
|
||||
kill(back_pid, SIGTERM);
|
||||
}
|
||||
|
||||
while ((pid = wait(&status)) > 0)
|
||||
{
|
||||
if (status)
|
||||
{
|
||||
if (WIFEXITED(status))
|
||||
printf("%s exited with status %d!\n",
|
||||
pid == back_pid ? backend : "test",
|
||||
WEXITSTATUS(status));
|
||||
else
|
||||
printf("%s crashed with signal %d!\n",
|
||||
pid == back_pid ? backend : "test",
|
||||
WTERMSIG(status));
|
||||
}
|
||||
if (WIFEXITED(status))
|
||||
printf("%s exited with status %d!\n", backend, WEXITSTATUS(status));
|
||||
else
|
||||
printf("%s crashed with signal %d!\n", backend, WTERMSIG(status));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -596,19 +453,6 @@ main(int argc, /* I - Number of command-line args */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'sigterm_handler()' - Flag when we get SIGTERM.
|
||||
*/
|
||||
|
||||
static void
|
||||
sigterm_handler(int sig) /* I - Signal */
|
||||
{
|
||||
(void)sig;
|
||||
|
||||
job_canceled = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'usage()' - Show usage information.
|
||||
*/
|
||||
@@ -616,11 +460,10 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
puts("Usage: testbackend [-cancel] [-d] [-ps | -pcl] [-s [-oid OID] "
|
||||
"[-walk OID]] [-t] device-uri job-id user title copies options [file]");
|
||||
puts("Usage: testbackend [-d] [-ps] [-s [-oid OID] [-walk OID]] [-t] "
|
||||
"device-uri job-id user title copies options [file]");
|
||||
puts("");
|
||||
puts("Options:");
|
||||
puts(" -cancel Simulate a canceled print job after 2 seconds.");
|
||||
puts(" -d Show log messages from backend.");
|
||||
puts(" -oid OID Lookup the specified SNMP OID.");
|
||||
puts(" (.1.3.6.1.2.1.43.10.2.1.4.1.1 is a good one for printers)");
|
||||
|
||||
+42
-121
@@ -104,14 +104,6 @@
|
||||
extern char **environ;
|
||||
|
||||
|
||||
/*
|
||||
* DEBUG_WRITES, if defined, causes the backend to write data to the printer in
|
||||
* 512 byte increments, up to 8192 bytes, to make debugging with a USB bus
|
||||
* analyzer easier.
|
||||
*/
|
||||
|
||||
#define DEBUG_WRITES 0
|
||||
|
||||
/*
|
||||
* WAIT_EOF_DELAY is number of seconds we'll wait for responses from
|
||||
* the printer after we've finished sending all the data
|
||||
@@ -240,9 +232,6 @@ typedef struct globals_s
|
||||
|
||||
int print_fd; /* File descriptor to print */
|
||||
ssize_t print_bytes; /* Print bytes read */
|
||||
#if DEBUG_WRITES
|
||||
ssize_t debug_bytes; /* Current bytes to read */
|
||||
#endif /* DEBUG_WRITES */
|
||||
|
||||
Boolean wait_eof;
|
||||
int drain_output; /* Drain all pending output */
|
||||
@@ -292,8 +281,9 @@ static void status_timer_cb(CFRunLoopTimerRef timer, void *info);
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
static pid_t child_pid; /* Child PID */
|
||||
static void run_legacy_backend(int argc, char *argv[], int fd); /* Starts child backend process running as a ppc executable */
|
||||
static void sigterm_handler(int sig); /* SIGTERM handler */
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
static int job_canceled = 0; /* Was the job canceled? */
|
||||
static void sigterm_handler(int sig); /* SIGTERM handler */
|
||||
|
||||
#ifdef PARSE_PS_ERRORS
|
||||
static const char *next_line (const char *buffer);
|
||||
@@ -328,7 +318,8 @@ print_device(const char *uri, /* I - Device URI */
|
||||
{
|
||||
char serial[1024]; /* Serial number buffer */
|
||||
OSStatus status; /* Function results */
|
||||
IOReturn iostatus; /* Current IO status */
|
||||
IOReturn iostatus, /* Current IO status */
|
||||
prev_iostatus = 0; /* Previous IO status */
|
||||
pthread_t read_thread_id, /* Read thread */
|
||||
sidechannel_thread_id;/* Side-channel thread */
|
||||
int have_sidechannel = 0; /* Was the side-channel thread started? */
|
||||
@@ -460,9 +451,9 @@ print_device(const char *uri, /* I - Device URI */
|
||||
fputs("STATE: -connecting-to-device\n", stderr);
|
||||
|
||||
/*
|
||||
* Now that we are "connected" to the port, ignore SIGTERM so that we
|
||||
* Now that we are "connected" to the port, catch SIGTERM so that we
|
||||
* can finish out any page data the driver sends (e.g. to eject the
|
||||
* current page... Only ignore SIGTERM if we are printing data from
|
||||
* current page... Only catch SIGTERM if we are printing data from
|
||||
* stdin (otherwise you can't cancel raw jobs...)
|
||||
*/
|
||||
|
||||
@@ -474,7 +465,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
memset(&action, 0, sizeof(action));
|
||||
|
||||
sigemptyset(&action.sa_mask);
|
||||
action.sa_handler = SIG_IGN;
|
||||
action.sa_handler = sigterm_handler;
|
||||
sigaction(SIGTERM, &action, NULL);
|
||||
}
|
||||
|
||||
@@ -621,16 +612,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
if (FD_ISSET(print_fd, &input_set))
|
||||
{
|
||||
#if DEBUG_WRITES
|
||||
g.debug_bytes += 512;
|
||||
if (g.debug_bytes > sizeof(print_buffer))
|
||||
g.debug_bytes = 512;
|
||||
|
||||
g.print_bytes = read(print_fd, print_buffer, g.debug_bytes);
|
||||
|
||||
#else
|
||||
g.print_bytes = read(print_fd, print_buffer, sizeof(print_buffer));
|
||||
#endif /* DEBUG_WRITES */
|
||||
|
||||
if (g.print_bytes < 0)
|
||||
{
|
||||
@@ -664,7 +646,8 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
if (g.print_bytes)
|
||||
{
|
||||
bytes = g.print_bytes;
|
||||
bytes = g.print_bytes;
|
||||
|
||||
iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
|
||||
|
||||
/*
|
||||
@@ -673,42 +656,27 @@ print_device(const char *uri, /* I - Device URI */
|
||||
*/
|
||||
|
||||
if (iostatus == kIOUSBTransactionTimeout)
|
||||
{
|
||||
fputs("DEBUG: Got USB transaction timeout during write!\n", stderr);
|
||||
iostatus = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we've stalled, retry the write...
|
||||
* Ignore stall errors, since we clear any stalls in the class driver...
|
||||
*/
|
||||
|
||||
else if (iostatus == kIOUSBPipeStalled)
|
||||
{
|
||||
fputs("DEBUG: Got USB pipe stalled during write!\n", stderr);
|
||||
|
||||
bytes = g.print_bytes;
|
||||
iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
|
||||
}
|
||||
if (iostatus == kIOUSBPipeStalled)
|
||||
iostatus = 0;
|
||||
|
||||
/*
|
||||
* Retry a write after an aborted write since we probably just got
|
||||
* SIGTERM (<rdar://problem/6860126>)...
|
||||
* Ignore the first "aborted" status we get, since we might have
|
||||
* received a signal (<rdar://problem/6860126>)...
|
||||
*/
|
||||
|
||||
else if (iostatus == kIOReturnAborted)
|
||||
if (iostatus == kIOReturnAborted && prev_iostatus != kIOReturnAborted)
|
||||
{
|
||||
fputs("DEBUG: Got USB return aborted during write!\n", stderr);
|
||||
|
||||
IOReturn err = (*g.classdriver)->Abort(g.classdriver);
|
||||
fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n", err);
|
||||
|
||||
#if DEBUG_WRITES
|
||||
sleep(5);
|
||||
#endif /* DEBUG_WRITES */
|
||||
|
||||
bytes = g.print_bytes;
|
||||
iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
|
||||
}
|
||||
prev_iostatus = iostatus;
|
||||
iostatus = 0;
|
||||
}
|
||||
else
|
||||
prev_iostatus = iostatus;
|
||||
|
||||
if (iostatus || bytes < 0)
|
||||
{
|
||||
@@ -716,25 +684,21 @@ print_device(const char *uri, /* I - Device URI */
|
||||
* Write error - bail if we don't see an error we can retry...
|
||||
*/
|
||||
|
||||
IOReturn err = (*g.classdriver)->Abort(g.classdriver);
|
||||
_cupsLangPuts(stderr, _("ERROR: Unable to send print data!\n"));
|
||||
fprintf(stderr, "DEBUG: USB class driver WritePipe returned %x\n",
|
||||
iostatus);
|
||||
|
||||
IOReturn err = (*g.classdriver)->Abort(g.classdriver);
|
||||
fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n",
|
||||
err);
|
||||
|
||||
status = CUPS_BACKEND_FAILED;
|
||||
status = job_canceled ? CUPS_BACKEND_FAILED : CUPS_BACKEND_STOP;
|
||||
break;
|
||||
}
|
||||
else if (bytes > 0)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Wrote %d bytes of print data...\n", (int)bytes);
|
||||
|
||||
g.print_bytes -= bytes;
|
||||
print_ptr += bytes;
|
||||
total_bytes += bytes;
|
||||
}
|
||||
fprintf(stderr, "DEBUG: Wrote %d bytes of print data...\n", (int)bytes);
|
||||
|
||||
g.print_bytes -= bytes;
|
||||
print_ptr += bytes;
|
||||
total_bytes += bytes;
|
||||
}
|
||||
|
||||
if (print_fd != 0 && status == noErr)
|
||||
@@ -880,8 +844,6 @@ static void *read_thread(void *reference)
|
||||
readstatus = (*g.classdriver)->ReadPipe(g.classdriver, readbuffer, &rbytes);
|
||||
if (readstatus == kIOReturnSuccess && rbytes > 0)
|
||||
{
|
||||
fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n",
|
||||
(int)rbytes);
|
||||
cupsBackChannelWrite((char*)readbuffer, rbytes, 1.0);
|
||||
|
||||
/* cntrl-d is echoed by the printer.
|
||||
@@ -896,12 +858,6 @@ static void *read_thread(void *reference)
|
||||
parse_pserror(readbuffer, rbytes);
|
||||
#endif
|
||||
}
|
||||
else if (readstatus == kIOUSBTransactionTimeout)
|
||||
fputs("DEBUG: Got USB transaction timeout during read!\n", stderr);
|
||||
else if (readstatus == kIOUSBPipeStalled)
|
||||
fputs("DEBUG: Got USB pipe stalled during read!\n", stderr);
|
||||
else if (readstatus == kIOReturnAborted)
|
||||
fputs("DEBUG: Got USB return aborted during read!\n", stderr);
|
||||
|
||||
/*
|
||||
* Make sure this loop executes no more than once every 250 miliseconds...
|
||||
@@ -943,88 +899,46 @@ sidechannel_thread(void *reference)
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
break;
|
||||
continue;
|
||||
|
||||
switch (command)
|
||||
{
|
||||
case CUPS_SC_CMD_SOFT_RESET: /* Do a soft reset */
|
||||
fputs("DEBUG: CUPS_SC_CMD_SOFT_RESET received from driver...\n",
|
||||
stderr);
|
||||
|
||||
if ((*g.classdriver)->SoftReset != NULL)
|
||||
{
|
||||
soft_reset();
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, NULL, 0, 1.0);
|
||||
fputs("DEBUG: Returning status CUPS_STATUS_OK with no bytes...\n",
|
||||
stderr);
|
||||
}
|
||||
else
|
||||
{
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
|
||||
NULL, 0, 1.0);
|
||||
fputs("DEBUG: Returning status CUPS_STATUS_NOT_IMPLEMENTED with "
|
||||
"no bytes...\n", stderr);
|
||||
}
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_DRAIN_OUTPUT: /* Drain all pending output */
|
||||
fputs("DEBUG: CUPS_SC_CMD_DRAIN_OUTPUT received from driver...\n",
|
||||
stderr);
|
||||
|
||||
g.drain_output = 1;
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_BIDI: /* Is the connection bidirectional? */
|
||||
fputs("DEBUG: CUPS_SC_CMD_GET_BIDI received from driver...\n",
|
||||
stderr);
|
||||
|
||||
data[0] = g.bidi_flag;
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
|
||||
|
||||
fprintf(stderr,
|
||||
"DEBUG: Returned CUPS_SC_STATUS_OK with 1 byte (%02X)...\n",
|
||||
data[0]);
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_DEVICE_ID: /* Return IEEE-1284 device ID */
|
||||
fputs("DEBUG: CUPS_SC_CMD_GET_DEVICE_ID received from driver...\n",
|
||||
stderr);
|
||||
|
||||
datalen = sizeof(data);
|
||||
get_device_id(&status, data, &datalen);
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, datalen, 1.0);
|
||||
|
||||
if (datalen < sizeof(data))
|
||||
data[datalen] = '\0';
|
||||
else
|
||||
data[sizeof(data) - 1] = '\0';
|
||||
|
||||
fprintf(stderr,
|
||||
"DEBUG: Returning CUPS_SC_STATUS_OK with %d bytes (%s)...\n",
|
||||
datalen, data);
|
||||
break;
|
||||
|
||||
case CUPS_SC_CMD_GET_STATE: /* Return device state */
|
||||
fputs("DEBUG: CUPS_SC_CMD_GET_STATE received from driver...\n",
|
||||
stderr);
|
||||
|
||||
data[0] = CUPS_SC_STATE_ONLINE;
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, data, 1, 1.0);
|
||||
|
||||
fprintf(stderr,
|
||||
"DEBUG: Returned CUPS_SC_STATUS_OK with 1 byte (%02X)...\n",
|
||||
data[0]);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "DEBUG: Unknown side-channel command (%d) received "
|
||||
"from driver...\n", command);
|
||||
|
||||
cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
|
||||
NULL, 0, 1.0);
|
||||
|
||||
fputs("DEBUG: Returned CUPS_SC_STATUS_NOT_IMPLEMENTED with no bytes...\n",
|
||||
stderr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1164,7 +1078,7 @@ static Boolean list_device_cb(void *refcon,
|
||||
snprintf(optionsstr, sizeof(optionsstr), "?location=%x", (unsigned)deviceLocation);
|
||||
|
||||
httpAssembleURI(HTTP_URI_CODING_ALL, uristr, sizeof(uristr), "usb", NULL, makestr, 0, modelstr);
|
||||
strlcat(uristr, optionsstr, sizeof(uristr));
|
||||
strncat(uristr, optionsstr, sizeof(uristr));
|
||||
|
||||
cupsBackendReport("direct", uristr, make_modelstr, make_modelstr, idstr,
|
||||
NULL);
|
||||
@@ -2019,6 +1933,8 @@ static void run_legacy_backend(int argc,
|
||||
|
||||
exit(exitstatus);
|
||||
}
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
|
||||
|
||||
/*
|
||||
* 'sigterm_handler()' - SIGTERM handler.
|
||||
@@ -2027,8 +1943,7 @@ static void run_legacy_backend(int argc,
|
||||
static void
|
||||
sigterm_handler(int sig) /* I - Signal */
|
||||
{
|
||||
/* If we started a child process pass the signal on to it...
|
||||
*/
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
if (child_pid)
|
||||
{
|
||||
/*
|
||||
@@ -2050,10 +1965,15 @@ sigterm_handler(int sig) /* I - Signal */
|
||||
exit(CUPS_BACKEND_STOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* __i386__ || __x86_64__ */
|
||||
|
||||
/*
|
||||
* Otherwise just flag that the job has been canceled...
|
||||
*/
|
||||
|
||||
job_canceled = 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef PARSE_PS_ERRORS
|
||||
/*
|
||||
@@ -2203,11 +2123,12 @@ static void get_device_id(cups_sc_status_t *status,
|
||||
char *data,
|
||||
int *datalen)
|
||||
{
|
||||
UInt32 deviceLocation = 0;
|
||||
UInt8 interfaceNum = 0;
|
||||
CFStringRef deviceIDString = NULL;
|
||||
|
||||
/* GetDeviceID */
|
||||
copy_deviceid(g.classdriver, &deviceIDString);
|
||||
|
||||
copy_devicestring(g.printer_obj, &deviceIDString, &deviceLocation, &interfaceNum);
|
||||
if (deviceIDString)
|
||||
{
|
||||
CFStringGetCString(deviceIDString, data, *datalen, kCFStringEncodingUTF8);
|
||||
|
||||
+10
-23
@@ -158,16 +158,7 @@ print_device(const char *uri, /* I - Device URI */
|
||||
|
||||
while (poll(pfds, 2, -1) > 0)
|
||||
{
|
||||
/*
|
||||
* CUPS STR #3318: USB process hangs on end-of-file, making further
|
||||
* printing impossible
|
||||
*
|
||||
* From a strict interpretation of POSIX poll(), POLLHUP should never be
|
||||
* set without POLLIN, since POLLIN is the event you request. That said,
|
||||
* it appears that some versions of Linux break this.
|
||||
*/
|
||||
|
||||
if (pfds[0].revents & (POLLIN | POLLHUP))
|
||||
if (pfds[0].revents & POLLIN)
|
||||
{
|
||||
if ((bytes = read(print_fd, buffer, sizeof(buffer))) > 0)
|
||||
{
|
||||
@@ -187,13 +178,8 @@ print_device(const char *uri, /* I - Device URI */
|
||||
break;
|
||||
}
|
||||
|
||||
if (pfds[1].revents & (POLLIN | POLLHUP))
|
||||
{
|
||||
if ((bytes = side_cb(printer, print_fd)) < 0)
|
||||
pfds[1].events = 0; /* Filter has gone away... */
|
||||
else
|
||||
tbytes += bytes;
|
||||
}
|
||||
if (pfds[1].revents & POLLIN)
|
||||
tbytes += side_cb(printer, print_fd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,14 +418,12 @@ get_device_id(usb_printer_t *printer, /* I - Printer */
|
||||
* and then limit the length to the size of our buffer...
|
||||
*/
|
||||
|
||||
if (length > bufsize)
|
||||
if (length > (bufsize - 2))
|
||||
length = (((unsigned)buffer[1] & 255) << 8) +
|
||||
((unsigned)buffer[0] & 255);
|
||||
|
||||
if (length > bufsize)
|
||||
length = bufsize;
|
||||
|
||||
length -= 2;
|
||||
if (length > (bufsize - 2))
|
||||
length = bufsize - 2;
|
||||
|
||||
/*
|
||||
* Copy the device ID text to the beginning of the buffer and
|
||||
@@ -759,7 +743,10 @@ side_cb(usb_printer_t *printer, /* I - Printer */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
return (-1);
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return (0);
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
static int open_device(const char *uri, int *use_bc);
|
||||
static int side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
static void side_cb(int print_fd, int device_fd, int snmp_fd,
|
||||
http_addr_t *addr, int use_bc);
|
||||
|
||||
|
||||
@@ -560,7 +560,7 @@ open_device(const char *uri, /* I - Device URI */
|
||||
* 'side_cb()' - Handle side-channel requests...
|
||||
*/
|
||||
|
||||
static int /* O - 0 on success, -1 on error */
|
||||
static void
|
||||
side_cb(int print_fd, /* I - Print file */
|
||||
int device_fd, /* I - Device file */
|
||||
int snmp_fd, /* I - SNMP socket (unused) */
|
||||
@@ -579,7 +579,10 @@ side_cb(int print_fd, /* I - Print file */
|
||||
datalen = sizeof(data);
|
||||
|
||||
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
|
||||
return (-1);
|
||||
{
|
||||
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (command)
|
||||
{
|
||||
@@ -622,7 +625,7 @@ side_cb(int print_fd, /* I - Print file */
|
||||
break;
|
||||
}
|
||||
|
||||
return (cupsSideChannelWrite(command, status, data, datalen, 1.0));
|
||||
cupsSideChannelWrite(command, status, data, datalen, 1.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -158,9 +158,8 @@ install-libs: $(INSTALLSTATIC)
|
||||
|
||||
installstatic:
|
||||
$(INSTALL_DIR) -m 755 $(LIBDIR)
|
||||
$(INSTALL_LIB) -m 755 libcupscgi.a $(LIBDIR)
|
||||
$(INSTALL_LIB) libcupscgi.a $(LIBDIR)
|
||||
$(RANLIB) $(LIBDIR)/libcupscgi.a
|
||||
$(CHMOD) 555 $(LIBDIR)/libcupscgi.a
|
||||
|
||||
|
||||
#
|
||||
|
||||
+4
-97
@@ -122,7 +122,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "admin");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* See if we have form data...
|
||||
@@ -192,7 +191,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
}
|
||||
else if (op && !strcmp(op, "redirect"))
|
||||
{
|
||||
const char *url; /* Redirection URL... */
|
||||
const char *url; /* Redirection URL... */
|
||||
char prefix[1024]; /* URL prefix */
|
||||
|
||||
|
||||
@@ -206,50 +205,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
fprintf(stderr, "DEBUG: redirecting with prefix %s!\n", prefix);
|
||||
|
||||
if ((url = cgiGetVariable("URL")) != NULL)
|
||||
{
|
||||
char encoded[1024], /* Encoded URL string */
|
||||
*ptr; /* Pointer into encoded string */
|
||||
|
||||
|
||||
ptr = encoded;
|
||||
if (*url != '/')
|
||||
*ptr++ = '/';
|
||||
|
||||
for (; *url && ptr < (encoded + sizeof(encoded) - 4); url ++)
|
||||
{
|
||||
if (strchr("%@&+ <>#=", *url) || *url < ' ' || *url & 128)
|
||||
{
|
||||
/*
|
||||
* Percent-encode this character; safe because we have at least 4
|
||||
* bytes left in the array...
|
||||
*/
|
||||
|
||||
sprintf(ptr, "%%%02X", *url & 255);
|
||||
ptr += 3;
|
||||
}
|
||||
else
|
||||
*ptr++ = *url;
|
||||
}
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
if (*url)
|
||||
{
|
||||
/*
|
||||
* URL was too long, just redirect to the admin page...
|
||||
*/
|
||||
|
||||
printf("Location: %s/admin\n\n", prefix);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* URL is OK, redirect there...
|
||||
*/
|
||||
|
||||
printf("Location: %s%s\n\n", prefix, encoded);
|
||||
}
|
||||
}
|
||||
printf("Location: %s%s\n\n", prefix, url);
|
||||
else
|
||||
printf("Location: %s/admin\n\n", prefix);
|
||||
}
|
||||
@@ -389,31 +345,6 @@ do_add_rss_subscription(http_t *http) /* I - HTTP connection */
|
||||
* and classes and (re)show the add page...
|
||||
*/
|
||||
|
||||
if (cgiGetVariable("EVENT_JOB_CREATED"))
|
||||
cgiSetVariable("EVENT_JOB_CREATED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_JOB_COMPLETED"))
|
||||
cgiSetVariable("EVENT_JOB_COMPLETED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_JOB_STOPPED"))
|
||||
cgiSetVariable("EVENT_JOB_STOPPED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_JOB_CONFIG_CHANGED"))
|
||||
cgiSetVariable("EVENT_JOB_CONFIG_CHANGED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_STOPPED"))
|
||||
cgiSetVariable("EVENT_PRINTER_STOPPED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_ADDED"))
|
||||
cgiSetVariable("EVENT_PRINTER_ADDED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_MODIFIED"))
|
||||
cgiSetVariable("EVENT_PRINTER_MODIFIED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_PRINTER_DELETED"))
|
||||
cgiSetVariable("EVENT_PRINTER_DELETED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_STARTED"))
|
||||
cgiSetVariable("EVENT_SERVER_STARTED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_STOPPED"))
|
||||
cgiSetVariable("EVENT_SERVER_STOPPED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_RESTARTED"))
|
||||
cgiSetVariable("EVENT_SERVER_RESTARTED", "CHECKED");
|
||||
if (cgiGetVariable("EVENT_SERVER_AUDIT"))
|
||||
cgiSetVariable("EVENT_SERVER_AUDIT", "CHECKED");
|
||||
|
||||
request = ippNewRequest(CUPS_GET_PRINTERS);
|
||||
response = cupsDoRequest(http, request, "/");
|
||||
|
||||
@@ -536,7 +467,6 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
ipp_attribute_t *attr; /* member-uris attribute */
|
||||
char uri[HTTP_MAX_URI]; /* Device or printer URI */
|
||||
const char *name, /* Pointer to class name */
|
||||
*op, /* Operation name */
|
||||
*ptr; /* Pointer to CGI variable */
|
||||
const char *title; /* Title of page */
|
||||
static const char * const pattrs[] = /* Requested printer attributes */
|
||||
@@ -548,7 +478,6 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
|
||||
|
||||
title = cgiText(modify ? _("Modify Class") : _("Add Class"));
|
||||
op = cgiGetVariable("OP");
|
||||
name = cgiGetVariable("PRINTER_NAME");
|
||||
|
||||
if (cgiGetVariable("PRINTER_LOCATION") == NULL)
|
||||
@@ -563,22 +492,10 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
|
||||
request = ippNewRequest(CUPS_GET_PRINTERS);
|
||||
|
||||
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, "printer-type",
|
||||
CUPS_PRINTER_LOCAL);
|
||||
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_ENUM, "printer-type-mask",
|
||||
CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE |
|
||||
CUPS_PRINTER_IMPLICIT);
|
||||
|
||||
/*
|
||||
* Do the request and get back a response...
|
||||
*/
|
||||
|
||||
cgiClearVariables();
|
||||
if (op)
|
||||
cgiSetVariable("OP", op);
|
||||
if (name)
|
||||
cgiSetVariable("PRINTER_NAME", name);
|
||||
|
||||
if ((response = cupsDoRequest(http, request, "/")) != NULL)
|
||||
{
|
||||
/*
|
||||
@@ -711,15 +628,6 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
return;
|
||||
}
|
||||
|
||||
if (!name)
|
||||
{
|
||||
cgiStartHTML(title);
|
||||
cgiSetVariable("ERROR", cgiText(_("Missing form variable!")));
|
||||
cgiCopyTemplateLang("error.tmpl");
|
||||
cgiEndHTML();
|
||||
return;
|
||||
}
|
||||
|
||||
for (ptr = name; *ptr; ptr ++)
|
||||
if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' || *ptr == '#')
|
||||
break;
|
||||
@@ -754,7 +662,8 @@ do_am_class(http_t *http, /* I - HTTP connection */
|
||||
request = ippNewRequest(CUPS_ADD_CLASS);
|
||||
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
|
||||
"localhost", 0, "/classes/%s", name);
|
||||
"localhost", 0, "/classes/%s",
|
||||
cgiGetVariable("PRINTER_NAME"));
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
|
||||
NULL, uri);
|
||||
|
||||
@@ -2698,9 +2607,7 @@ do_menu(http_t *http) /* I - HTTP connection */
|
||||
if ((val = cupsGetOption("DefaultAuthType", num_settings,
|
||||
settings)) != NULL && !strcasecmp(val, "Negotiate"))
|
||||
cgiSetVariable("KERBEROS", "CHECKED");
|
||||
else
|
||||
#endif /* HAVE_GSSAPI */
|
||||
cgiSetVariable("KERBEROS", "");
|
||||
|
||||
#ifdef HAVE_DNSSD
|
||||
cgiSetVariable("HAVE_DNSSD", "1");
|
||||
|
||||
@@ -54,7 +54,6 @@ typedef struct cgi_file_s /**** Uploaded file data ****/
|
||||
extern void cgiAbort(const char *title, const char *stylesheet,
|
||||
const char *format, ...);
|
||||
extern int cgiCheckVariables(const char *names);
|
||||
extern void cgiClearVariables(void);
|
||||
extern void *cgiCompileSearch(const char *query);
|
||||
extern void cgiCopyTemplateFile(FILE *out, const char *tmpl);
|
||||
extern void cgiCopyTemplateLang(const char *tmpl);
|
||||
|
||||
@@ -72,7 +72,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "classes");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* See if we are displaying a printer or all classes...
|
||||
|
||||
+2
-9
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Online help CGI for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2009 by Apple Inc.
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -63,7 +63,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "help");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* Load the help index...
|
||||
@@ -103,7 +102,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
for (i = 0; i < argc; i ++)
|
||||
fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
|
||||
fprintf(stderr, "argv[%d]=\"%s\"\n", i, argv[i]);
|
||||
|
||||
if ((helpfile = getenv("PATH_INFO")) != NULL)
|
||||
{
|
||||
@@ -183,12 +182,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
topic = cgiGetVariable("TOPIC");
|
||||
si = helpSearchIndex(hi, query, topic, helpfile);
|
||||
|
||||
cgiClearVariables();
|
||||
if (query)
|
||||
cgiSetVariable("QUERY", query);
|
||||
if (topic)
|
||||
cgiSetVariable("TOPIC", topic);
|
||||
|
||||
fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n",
|
||||
query ? query : "(null)", topic ? topic : "(null)");
|
||||
|
||||
|
||||
+12
-29
@@ -650,8 +650,7 @@ cgiPrintCommand(http_t *http, /* I - Connection to server */
|
||||
cgiSetIPPVars(response, NULL, NULL, NULL, 0);
|
||||
|
||||
attr = ippFindAttribute(response, "job-state", IPP_TAG_ENUM);
|
||||
if (!attr || attr->values[0].integer >= IPP_JOB_STOPPED ||
|
||||
attr->values[0].integer == IPP_JOB_HELD)
|
||||
if (!attr || attr->values[0].integer >= IPP_JOB_STOPPED)
|
||||
{
|
||||
ippDelete(response);
|
||||
break;
|
||||
@@ -1398,9 +1397,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
int ascending, /* Order of jobs (0 = descending) */
|
||||
first, /* First job to show */
|
||||
count; /* Number of jobs */
|
||||
const char *var, /* Form variable */
|
||||
*query, /* Query string */
|
||||
*section; /* Section in web interface */
|
||||
const char *var; /* Form variable */
|
||||
void *search; /* Search data */
|
||||
char url[1024], /* Printer URI */
|
||||
val[1024]; /* Form variable */
|
||||
@@ -1444,14 +1441,11 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
* Get a list of matching job objects.
|
||||
*/
|
||||
|
||||
if ((query = cgiGetVariable("QUERY")) != NULL &&
|
||||
if ((var = cgiGetVariable("QUERY")) != NULL &&
|
||||
!cgiGetVariable("CLEAR"))
|
||||
search = cgiCompileSearch(query);
|
||||
search = cgiCompileSearch(var);
|
||||
else
|
||||
{
|
||||
query = NULL;
|
||||
search = NULL;
|
||||
}
|
||||
|
||||
jobs = cgiGetIPPObjects(response, search);
|
||||
count = cupsArrayCount(jobs);
|
||||
@@ -1476,27 +1470,16 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
if (first < 0)
|
||||
first = 0;
|
||||
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL)
|
||||
ascending = !strcasecmp(var, "asc");
|
||||
else
|
||||
ascending = !which_jobs || !strcasecmp(which_jobs, "not-completed");
|
||||
|
||||
section = cgiGetVariable("SECTION");
|
||||
|
||||
cgiClearVariables();
|
||||
|
||||
if (query)
|
||||
cgiSetVariable("QUERY", query);
|
||||
|
||||
cgiSetVariable("ORDER", ascending ? "asc" : "dec");
|
||||
|
||||
cgiSetVariable("SECTION", section);
|
||||
|
||||
sprintf(val, "%d", count);
|
||||
cgiSetVariable("TOTAL", val);
|
||||
|
||||
if (which_jobs)
|
||||
cgiSetVariable("WHICH_JOBS", which_jobs);
|
||||
if ((var = cgiGetVariable("ORDER")) != NULL)
|
||||
ascending = !strcasecmp(var, "asc");
|
||||
else
|
||||
{
|
||||
ascending = !which_jobs || !strcasecmp(which_jobs, "not-completed");
|
||||
cgiSetVariable("ORDER", ascending ? "asc" : "dec");
|
||||
}
|
||||
|
||||
if (ascending)
|
||||
{
|
||||
@@ -1518,7 +1501,7 @@ cgiShowJobs(http_t *http, /* I - Connection to server */
|
||||
*/
|
||||
|
||||
if (dest)
|
||||
snprintf(val, sizeof(val), "/%s/%s", section, dest);
|
||||
snprintf(val, sizeof(val), "/%s/%s", cgiGetVariable("SECTION"), dest);
|
||||
else
|
||||
strlcpy(val, "/jobs/", sizeof(val));
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "jobs");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* Connect to the HTTP server...
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
_cgiCheckVariables
|
||||
_cgiClearVariables
|
||||
_cgiCompileSearch
|
||||
_cgiCopyTemplateFile
|
||||
_cgiCopyTemplateLang
|
||||
|
||||
+4
-12
@@ -357,7 +357,7 @@ write_index(const char *path, /* I - File to write */
|
||||
|
||||
static void
|
||||
write_info(const char *path, /* I - File to write */
|
||||
const char *revision) /* I - Subversion revision number */
|
||||
const char *revision) /* I - Version number */
|
||||
{
|
||||
cups_file_t *fp; /* File */
|
||||
|
||||
@@ -379,22 +379,14 @@ write_info(const char *path, /* I - File to write */
|
||||
"\t<key>CFBundleName</key>\n"
|
||||
"\t<string>CUPS Documentation</string>\n"
|
||||
"\t<key>CFBundleVersion</key>\n"
|
||||
"\t<string>%d.%d.%s</string>\n"
|
||||
"\t<key>CFBundleShortVersionString</key>\n"
|
||||
"\t<string>%d.%d.%d</string>\n"
|
||||
"\t<string>1.4.%s</string>\n"
|
||||
"\t<key>DocSetFeedName</key>\n"
|
||||
"\t<string>cups.org</string>\n"
|
||||
"\t<key>DocSetFeedURL</key>\n"
|
||||
"\t<string>http://www.cups.org/org.cups.docset.atom"
|
||||
"\t<string>http://www.cups.org/org.cups.docset.xar"
|
||||
"</string>\n"
|
||||
"\t<key>DocSetPublisherIdentifier</key>\n"
|
||||
"\t<string>org.cups</string>\n"
|
||||
"\t<key>DocSetPublisherName</key>\n"
|
||||
"\t<string>CUPS</string>\n"
|
||||
"</dict>\n"
|
||||
"</plist>\n",
|
||||
CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, revision,
|
||||
CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR, CUPS_VERSION_PATCH);
|
||||
"</plist>\n", revision);
|
||||
|
||||
cupsFileClose(fp);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
cgiSetVariable("SECTION", "printers");
|
||||
cgiSetVariable("REFRESH_PAGE", "");
|
||||
|
||||
/*
|
||||
* See if we are displaying a printer or all printers...
|
||||
|
||||
@@ -675,8 +675,6 @@ cgi_puts(const char *s, /* I - String to output */
|
||||
fputs(">", out);
|
||||
else if (*s == '\"')
|
||||
fputs(""", out);
|
||||
else if (*s == '\'')
|
||||
fputs("'", out);
|
||||
else if (*s == '&')
|
||||
fputs("&", out);
|
||||
else
|
||||
@@ -697,7 +695,7 @@ cgi_puturi(const char *s, /* I - String to output */
|
||||
{
|
||||
while (*s)
|
||||
{
|
||||
if (strchr("%@&+ <>#=", *s) || *s < ' ' || *s & 128)
|
||||
if (strchr("%&+ <>#=", *s) || *s & 128)
|
||||
fprintf(out, "%%%02X", *s & 255);
|
||||
else
|
||||
putc(*s, out);
|
||||
|
||||
+9
-35
@@ -15,7 +15,6 @@
|
||||
* Contents:
|
||||
*
|
||||
* cgiCheckVariables() - Check for the presence of "required" variables.
|
||||
* cgiClearVariables() - Clear all form variables.
|
||||
* cgiGetArray() - Get an element from a form array...
|
||||
* cgiGetFile() - Get the file (if any) that was submitted in the form.
|
||||
* cgiGetSize() - Get the size of a form array value.
|
||||
@@ -135,31 +134,6 @@ cgiCheckVariables(const char *names) /* I - Variables to look for */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cgiClearVariables()' - Clear all form variables.
|
||||
*/
|
||||
|
||||
void
|
||||
cgiClearVariables(void)
|
||||
{
|
||||
int i, j; /* Looping vars */
|
||||
_cgi_var_t *v; /* Current variable */
|
||||
|
||||
|
||||
for (v = form_vars, i = form_count; i > 0; v ++, i --)
|
||||
{
|
||||
_cupsStrFree(v->name);
|
||||
for (j = 0; j < v->nvalues; j ++)
|
||||
if (v->values[j])
|
||||
_cupsStrFree(v->values[j]);
|
||||
}
|
||||
|
||||
form_count = 0;
|
||||
|
||||
cgi_unlink_file();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'cgiGetArray()' - Get an element from a form array...
|
||||
*/
|
||||
@@ -177,7 +151,7 @@ cgiGetArray(const char *name, /* I - Name of array variable */
|
||||
if (element < 0 || element >= var->nvalues)
|
||||
return (NULL);
|
||||
|
||||
return (_cupsStrRetain(var->values[element]));
|
||||
return (var->values[element]);
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +206,7 @@ cgiGetVariable(const char *name) /* I - Name of variable */
|
||||
var->values[var->nvalues - 1]));
|
||||
#endif /* DEBUG */
|
||||
|
||||
return ((var == NULL) ? NULL : _cupsStrRetain(var->values[var->nvalues - 1]));
|
||||
return ((var == NULL) ? NULL : var->values[var->nvalues - 1]);
|
||||
}
|
||||
|
||||
|
||||
@@ -363,9 +337,9 @@ cgiSetArray(const char *name, /* I - Name of variable */
|
||||
var->nvalues = element + 1;
|
||||
}
|
||||
else if (var->values[element])
|
||||
_cupsStrFree((char *)var->values[element]);
|
||||
free((char *)var->values[element]);
|
||||
|
||||
var->values[element] = _cupsStrAlloc(value);
|
||||
var->values[element] = strdup(value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,7 +384,7 @@ cgiSetSize(const char *name, /* I - Name of variable */
|
||||
{
|
||||
for (i = size; i < var->nvalues; i ++)
|
||||
if (var->values[i])
|
||||
_cupsStrFree((void *)(var->values[i]));
|
||||
free((void *)(var->values[i]));
|
||||
}
|
||||
|
||||
var->nvalues = size;
|
||||
@@ -443,9 +417,9 @@ cgiSetVariable(const char *name, /* I - Name of variable */
|
||||
{
|
||||
for (i = 0; i < var->nvalues; i ++)
|
||||
if (var->values[i])
|
||||
_cupsStrFree((char *)var->values[i]);
|
||||
free((char *)var->values[i]);
|
||||
|
||||
var->values[0] = _cupsStrAlloc(value);
|
||||
var->values[0] = strdup(value);
|
||||
var->nvalues = 1;
|
||||
}
|
||||
}
|
||||
@@ -491,10 +465,10 @@ cgi_add_variable(const char *name, /* I - Variable name */
|
||||
if ((var->values = calloc(element + 1, sizeof(char *))) == NULL)
|
||||
return;
|
||||
|
||||
var->name = _cupsStrAlloc(name);
|
||||
var->name = strdup(name);
|
||||
var->nvalues = element + 1;
|
||||
var->avalues = element + 1;
|
||||
var->values[element] = _cupsStrAlloc(value);
|
||||
var->values[element] = strdup(value);
|
||||
|
||||
form_count ++;
|
||||
}
|
||||
|
||||
+8
-15
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Web search program for www.cups.org.
|
||||
*
|
||||
* Copyright 2007-2009 by Apple Inc.
|
||||
* Copyright 2007-2008 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -33,8 +33,7 @@
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
static void list_nodes(help_index_t *hi, const char *title,
|
||||
cups_array_t *nodes);
|
||||
static void list_nodes(const char *title, cups_array_t *nodes);
|
||||
|
||||
|
||||
/*
|
||||
@@ -70,7 +69,7 @@ main(int argc, /* I - Number of command-line args */
|
||||
search = helpSearchIndex(hi, argv[2], NULL, NULL);
|
||||
|
||||
if (search)
|
||||
list_nodes(hi, argv[1], search->sorted);
|
||||
list_nodes(argv[1], search->sorted);
|
||||
|
||||
/*
|
||||
* Return with no errors...
|
||||
@@ -85,12 +84,10 @@ main(int argc, /* I - Number of command-line args */
|
||||
*/
|
||||
|
||||
static void
|
||||
list_nodes(help_index_t *hi, /* I - Help index */
|
||||
const char *title, /* I - Title string */
|
||||
list_nodes(const char *title, /* I - Title string */
|
||||
cups_array_t *nodes) /* I - Nodes */
|
||||
{
|
||||
help_node_t *node, /* Current node */
|
||||
*file; /* File node */
|
||||
help_node_t *node; /* Current node */
|
||||
|
||||
|
||||
printf("%d\n", cupsArrayCount(nodes));
|
||||
@@ -99,14 +96,10 @@ list_nodes(help_index_t *hi, /* I - Help index */
|
||||
node = (help_node_t *)cupsArrayNext(nodes))
|
||||
{
|
||||
if (node->anchor)
|
||||
{
|
||||
file = helpFindNode(hi, node->filename, NULL);
|
||||
printf("%d|%s#%s|%s|%s\n", node->score, node->filename, node->anchor,
|
||||
node->text, file ? file->text : node->filename);
|
||||
}
|
||||
else
|
||||
printf("%d|%s|%s|%s\n", node->score, node->filename, node->text,
|
||||
printf("%d|%s#%s|%s\n", node->score, node->filename, node->anchor,
|
||||
node->text);
|
||||
else
|
||||
printf("%d|%s|%s\n", node->score, node->filename, node->text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ install-data:
|
||||
done
|
||||
-if test x$(PAMDIR) != x; then \
|
||||
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
|
||||
if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
|
||||
if test -r $(BUILDROOT)$(PAMDIR)/cups/$(PAMFILE) ; then \
|
||||
$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#
|
||||
# "$Id$"
|
||||
#
|
||||
# Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a
|
||||
# complete description of this file.
|
||||
# Sample configuration file for the Common UNIX Printing System (CUPS)
|
||||
# scheduler. See "man cupsd.conf" for a complete description of this
|
||||
# file.
|
||||
#
|
||||
|
||||
# Log general information in error_log - change "@CUPS_LOG_LEVEL@" to "debug"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# MIME converts file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
# Copyright 2007-2009 by Apple Inc.
|
||||
# Copyright 2007-2008 by Apple Inc.
|
||||
# Copyright 1997-2007 by Easy Software Products.
|
||||
#
|
||||
# These coded instructions, statements, and computer programs are the
|
||||
@@ -38,7 +38,7 @@
|
||||
# PostScript filters
|
||||
#
|
||||
|
||||
application/pdf application/vnd.cups-postscript 66 pdftops
|
||||
application/pdf application/postscript 33 pdftops
|
||||
application/postscript application/vnd.cups-postscript 66 pstops
|
||||
application/vnd.hp-HPGL application/postscript 66 hpgltops
|
||||
application/x-cshell application/postscript 33 texttops
|
||||
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: mime.types 8783 2009-08-28 17:51:05Z mike $"
|
||||
# "$Id: mime.types 8652 2009-05-16 23:48:35Z mike $"
|
||||
#
|
||||
# MIME types file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -95,7 +95,7 @@ application/vnd.hp-HPGL hpgl \
|
||||
|
||||
image/gif gif string(0,GIF87a) string(0,GIF89a)
|
||||
image/png png string(0,<89>PNG)
|
||||
image/jpeg jpeg jpg jpe string(0,<FFD8FF>) +\
|
||||
image/jpeg jpeg jpg jpe string(0,<FFD8FF>) &&\
|
||||
(char(3,0xe0) char(3,0xe1) char(3,0xe2) char(3,0xe3)\
|
||||
char(3,0xe4) char(3,0xe5) char(3,0xe6) char(3,0xe7)\
|
||||
char(3,0xe8) char(3,0xe9) char(3,0xea) char(3,0xeb)\
|
||||
@@ -114,7 +114,7 @@ image/x-sun-raster ras string(0,<59a66a95>)
|
||||
|
||||
#image/fpx fpx
|
||||
image/x-alias pix short(8,8) short(8,24)
|
||||
image/x-bitmap bmp string(0,BM) + !printable(2,14)
|
||||
image/x-bitmap bmp string(0,BM) && !printable(2,14)
|
||||
image/x-icon ico
|
||||
|
||||
########################################################################
|
||||
@@ -177,5 +177,5 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
|
||||
application/octet-stream
|
||||
|
||||
#
|
||||
# End of "$Id: mime.types 8783 2009-08-28 17:51:05Z mike $".
|
||||
# End of "$Id: mime.types 8652 2009-05-16 23:48:35Z mike $".
|
||||
#
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#%PAM-1.0
|
||||
auth required pam_unix.so shadow nodelay nullok
|
||||
account required pam_unix.so
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
auth required @PAMMODAUTH@
|
||||
auth required @PAMMOD@ nullok shadow
|
||||
account required @PAMMOD@
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 8841 2009-10-07 16:24:25Z mike $"
|
||||
dnl "$Id: cups-common.m4 8613 2009-05-11 22:39:39Z mike $"
|
||||
dnl
|
||||
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION="1.4.2"
|
||||
CUPS_VERSION="1.4b3"
|
||||
CUPS_REVISION=""
|
||||
#if test -z "$CUPS_REVISION" -a -d .svn; then
|
||||
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
|
||||
@@ -49,7 +49,6 @@ AC_PROG_CPP
|
||||
AC_PROG_CXX
|
||||
AC_PROG_RANLIB
|
||||
AC_PATH_PROG(AR,ar)
|
||||
AC_PATH_PROG(CHMOD,chmod)
|
||||
AC_PATH_PROG(HTMLDOC,htmldoc)
|
||||
AC_PATH_PROG(LD,ld)
|
||||
AC_PATH_PROG(LN,ln)
|
||||
@@ -144,6 +143,9 @@ fi
|
||||
dnl Check for random number functions...
|
||||
AC_CHECK_FUNCS(random mrand48 lrand48)
|
||||
|
||||
dnl Checks for mkstemp and mkstemps functions.
|
||||
AC_CHECK_FUNCS(mkstemp mkstemps)
|
||||
|
||||
dnl Check for geteuid function.
|
||||
AC_CHECK_FUNCS(geteuid)
|
||||
|
||||
@@ -266,6 +268,11 @@ if test "x$enable_dbus" != xno; then
|
||||
dbus_message_iter_init_append,
|
||||
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND),,
|
||||
`$PKGCONFIG --libs dbus-1`)
|
||||
if $PKGCONFIG --exists glib-2.0 && $PKGCONFIG --exists dbus-glib-1; then
|
||||
DBUS_NOTIFIER="dbus"
|
||||
DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs glib-2.0` `$PKGCONFIG --libs dbus-glib-1` `$PKGCONFIG --libs dbus-1`"
|
||||
CFLAGS="$CFLAGS `$PKGCONFIG --cflags glib-2.0`"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
@@ -284,6 +291,7 @@ LEGACY_BACKENDS="parallel scsi"
|
||||
|
||||
case $uname in
|
||||
Darwin*)
|
||||
# FONTS=""
|
||||
LEGACY_BACKENDS=""
|
||||
BACKLIBS="$BACKLIBS -framework IOKit"
|
||||
CUPSDLIBS="$CUPSDLIBS -sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration -weak_framework ApplicationServices"
|
||||
@@ -349,5 +357,5 @@ AC_SUBST(FONTS)
|
||||
AC_SUBST(LEGACY_BACKENDS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 8841 2009-10-07 16:24:25Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 8613 2009-05-11 22:39:39Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-defaults.m4 8841 2009-10-07 16:24:25Z mike $"
|
||||
dnl "$Id: cups-defaults.m4 8344 2009-02-10 17:05:35Z mike $"
|
||||
dnl
|
||||
dnl Default cupsd configuration settings for the Common UNIX Printing System
|
||||
dnl (CUPS).
|
||||
@@ -325,8 +325,8 @@ if test x$default_lpdconfigfile != xno; then
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
|
||||
;;
|
||||
*)
|
||||
if test "x$XINETD" != x; then
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd://$XINETD/cups-lpd"
|
||||
if test -d /etc/xinetd.d; then
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd:///etc/xinetd.d/cups-lpd"
|
||||
else
|
||||
CUPS_DEFAULT_LPD_CONFIG_FILE=""
|
||||
fi
|
||||
@@ -435,5 +435,5 @@ AC_SUBST(BANNERTOPS)
|
||||
AC_SUBST(TEXTTOPS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-defaults.m4 8841 2009-10-07 16:24:25Z mike $".
|
||||
dnl End of "$Id: cups-defaults.m4 8344 2009-02-10 17:05:35Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-dnssd.m4 8789 2009-08-28 22:54:34Z mike $"
|
||||
dnl "$Id: cups-dnssd.m4 8344 2009-02-10 17:05:35Z mike $"
|
||||
dnl
|
||||
dnl DNS Service Discovery (aka Bonjour) stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -43,7 +43,7 @@ if test x$enable_dnssd != xno; then
|
||||
AC_MSG_CHECKING(for current version of dns_sd library)
|
||||
SAVELIBS="$LIBS"
|
||||
LIBS="$LIBS -ldns_sd"
|
||||
AC_TRY_COMPILE([#include <dns_sd.h>],
|
||||
AC_TRY_COMPILE([#include <dns_sd.h],
|
||||
[int constant = kDNSServiceFlagsShareConnection;
|
||||
unsigned char txtRecord[100];
|
||||
uint8_t valueLen;
|
||||
@@ -64,5 +64,5 @@ AC_SUBST(DNSSDLIBS)
|
||||
AC_SUBST(DNSSD_BACKEND)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-dnssd.m4 8789 2009-08-28 22:54:34Z mike $".
|
||||
dnl End of "$Id: cups-dnssd.m4 8344 2009-02-10 17:05:35Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-pam.m4 8825 2009-09-22 21:53:31Z mike $"
|
||||
dnl "$Id: cups-pam.m4 8344 2009-02-10 17:05:35Z mike $"
|
||||
dnl
|
||||
dnl PAM stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -22,10 +22,9 @@ if test $uname = AIX; then
|
||||
fi
|
||||
|
||||
PAMDIR=""
|
||||
PAMFILE="pam.std"
|
||||
PAMFILE=""
|
||||
PAMLIBS=""
|
||||
PAMMOD="pam_unknown.so"
|
||||
PAMMODAUTH="pam_unknown.so"
|
||||
|
||||
if test x$enable_pam != xno; then
|
||||
SAVELIBS="$LIBS"
|
||||
@@ -61,7 +60,7 @@ if test x$enable_pam != xno; then
|
||||
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin/Mac OS X
|
||||
# Darwin, MacOS X
|
||||
if test "x$with_pam_module" != x; then
|
||||
PAMFILE="pam.$with_pam_module"
|
||||
elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
|
||||
@@ -71,22 +70,26 @@ if test x$enable_pam != xno; then
|
||||
fi
|
||||
;;
|
||||
|
||||
IRIX)
|
||||
# SGI IRIX
|
||||
PAMFILE="pam.irix"
|
||||
;;
|
||||
|
||||
*)
|
||||
# All others; this test might need to be updated
|
||||
# as Linux distributors move things around...
|
||||
if test "x$with_pam_module" != x; then
|
||||
PAMMOD="pam_${with_pam_module}.so"
|
||||
elif test -f /lib/security/pam_unix2.so; then
|
||||
PAMMOD="pam_unix2.so"
|
||||
elif test -f /lib/security/pam_unix.so; then
|
||||
PAMMOD="pam_unix.so"
|
||||
else
|
||||
for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do
|
||||
if test -f /lib/security/$mod; then
|
||||
PAMMOD="$mod"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test "x$PAMMOD" = xpam_unix.so; then
|
||||
PAMMODAUTH="$PAMMOD shadow nodelay"
|
||||
else
|
||||
PAMMODAUTH="$PAMMOD nodelay"
|
||||
fi
|
||||
PAMFILE="pam.std"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@@ -95,8 +98,7 @@ AC_SUBST(PAMDIR)
|
||||
AC_SUBST(PAMFILE)
|
||||
AC_SUBST(PAMLIBS)
|
||||
AC_SUBST(PAMMOD)
|
||||
AC_SUBST(PAMMODAUTH)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-pam.m4 8825 2009-09-22 21:53:31Z mike $".
|
||||
dnl End of "$Id: cups-pam.m4 8344 2009-02-10 17:05:35Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-pdf.m4 8760 2009-08-07 22:30:30Z mike $"
|
||||
dnl "$Id: cups-pdf.m4 8430 2009-03-12 21:50:44Z mike $"
|
||||
dnl
|
||||
dnl PDF filter configuration stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -13,7 +13,7 @@ dnl which should have been included with this file. If this file is
|
||||
dnl file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
dnl
|
||||
|
||||
AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])
|
||||
AC_ARG_WITH(pdftops, [ --with-pdftops set pdftops filter (gs,pdftops,none), default=pdftops ])
|
||||
|
||||
PDFTOPS=""
|
||||
CUPS_PDFTOPS=""
|
||||
@@ -47,12 +47,6 @@ case "x$with_pdftops" in
|
||||
fi
|
||||
;;
|
||||
|
||||
x/*/gs) # Use /path/to/gs without any check:
|
||||
CUPS_GHOSTSCRIPT="$with_pdftops"
|
||||
AC_DEFINE(HAVE_GHOSTSCRIPT)
|
||||
PDFTOPS="pdftops"
|
||||
;;
|
||||
|
||||
xpdftops)
|
||||
AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
|
||||
if test "x$CUPS_PDFTOPS" != x; then
|
||||
@@ -63,20 +57,6 @@ case "x$with_pdftops" in
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
x/*/pdftops) # Use /path/to/pdftops without any check:
|
||||
CUPS_PDFTOPS="$with_pdftops"
|
||||
AC_DEFINE(HAVE_PDFTOPS)
|
||||
PDFTOPS="pdftops"
|
||||
;;
|
||||
|
||||
xnone) # Make no pdftops filter if with_pdftops=none:
|
||||
;;
|
||||
|
||||
*) # Invalid with_pdftops value:
|
||||
AC_MSG_ERROR(Invalid with_pdftops value!)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
|
||||
@@ -84,5 +64,5 @@ AC_DEFINE_UNQUOTED(CUPS_GHOSTSCRIPT, "$CUPS_GHOSTSCRIPT")
|
||||
AC_SUBST(PDFTOPS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-pdf.m4 8760 2009-08-07 22:30:30Z mike $".
|
||||
dnl End of "$Id: cups-pdf.m4 8430 2009-03-12 21:50:44Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -335,6 +335,14 @@
|
||||
#undef HAVE_DNSSD
|
||||
|
||||
|
||||
/*
|
||||
* Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
|
||||
*/
|
||||
|
||||
#undef HAVE_COREFOUNDATION
|
||||
#undef HAVE_SYSTEMCONFIGURATION
|
||||
|
||||
|
||||
/*
|
||||
* Do we have <sys/ioctl.h>?
|
||||
*/
|
||||
@@ -342,6 +350,14 @@
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
|
||||
/*
|
||||
* Do we have mkstemp() and/or mkstemps()?
|
||||
*/
|
||||
|
||||
#undef HAVE_MKSTEMP
|
||||
#undef HAVE_MKSTEMPS
|
||||
|
||||
|
||||
/*
|
||||
* Does the "tm" structure contain the "tm_gmtoff" member?
|
||||
*/
|
||||
|
||||
+1
-2
@@ -237,9 +237,8 @@ install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
|
||||
|
||||
installstatic:
|
||||
$(INSTALL_DIR) -m 755 $(LIBDIR)
|
||||
$(INSTALL_LIB) -m 755 libcups.a $(LIBDIR)
|
||||
$(INSTALL_LIB) libcups.a $(LIBDIR)
|
||||
$(RANLIB) $(LIBDIR)/libcups.a
|
||||
$(CHMOD) 555 $(LIBDIR)/libcups.a
|
||||
|
||||
install32bit:
|
||||
echo Installing libraries in $(LIB32DIR)...
|
||||
|
||||
+9
-14
@@ -1553,7 +1553,7 @@ _cupsAdminSetServerSettings(
|
||||
const char *remotep = cupsGetOption("BrowseRemoteProtocols",
|
||||
num_settings, settings);
|
||||
|
||||
if (!localp || !localp[0])
|
||||
if (!localp)
|
||||
localp = cupsGetOption("BrowseLocalProtocols", cupsd_num_settings,
|
||||
cupsd_settings);
|
||||
|
||||
@@ -2173,23 +2173,18 @@ do_samba_command(const char *command, /* I - Command to run */
|
||||
* Child goes here, redirect stdin/out/err and execute the command...
|
||||
*/
|
||||
|
||||
int fd = open("/dev/null", O_RDONLY);
|
||||
close(0);
|
||||
open("/dev/null", O_RDONLY);
|
||||
|
||||
if (fd > 0)
|
||||
{
|
||||
dup2(fd, 0);
|
||||
close(fd);
|
||||
}
|
||||
close(1);
|
||||
|
||||
if (logfile)
|
||||
dup2(fileno(logfile), 1);
|
||||
else if ((fd = open("/dev/null", O_WRONLY)) > 1)
|
||||
{
|
||||
dup2(fd, 1);
|
||||
close(fd);
|
||||
}
|
||||
dup(fileno(logfile));
|
||||
else
|
||||
open("/dev/null", O_WRONLY);
|
||||
|
||||
dup2(1, 2);
|
||||
close(2);
|
||||
dup(1);
|
||||
|
||||
execlp(command, command, address, "-N", "-A", authfile, "-c", subcmd,
|
||||
(char *)0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
"$Id: api-filter.header 8673 2009-05-22 17:34:15Z mike $"
|
||||
"$Id: api-filter.header 8627 2009-05-13 21:39:17Z mike $"
|
||||
|
||||
Filter and backend programming header for the Common UNIX Printing System
|
||||
(CUPS).
|
||||
@@ -34,8 +34,6 @@
|
||||
Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
|
||||
Programming: <a href='api-ppd.html' target='_top'>PPD API</a><br>
|
||||
Programming: <a href='api-raster.html' target='_top'>Raster API</a><br>
|
||||
Programming: <a href='postscript-driver.html' target='_top'>Developing PostScript Printer Drivers</a><br>
|
||||
Programming: <a href='raster-driver.html' target='_top'>Developing Raster Printer Drivers</a><br>
|
||||
Specifications: <a href='spec-design' target='_top'>CUPS Design Description</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
+4
-12
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
"$Id: api-filter.shtml 8718 2009-06-18 17:41:03Z mike $"
|
||||
"$Id: api-filter.shtml 8628 2009-05-13 22:25:34Z mike $"
|
||||
|
||||
Filter and backend programming introduction for the Common UNIX Printing
|
||||
System (CUPS).
|
||||
@@ -127,7 +127,7 @@ when running print filters and backends:</p>
|
||||
|
||||
<dl class="code">
|
||||
|
||||
<dt>APPLE_LANGUAGE</dt>
|
||||
<dt>APPLE_LANGUAGES</dt>
|
||||
<dd>The Apple language identifier associated with the job
|
||||
(Mac OS X only).</dd>
|
||||
|
||||
@@ -264,16 +264,7 @@ prefix strings:</p>
|
||||
current queue. Typically this is used to indicate persistent media,
|
||||
ink, toner, and configuration conditions or errors on a printer.
|
||||
<a href='#TABLE2'>Table 2</a> lists the standard state keywords -
|
||||
use vendor-prefixed ("com.acme.foo") keywords for custom states.
|
||||
|
||||
<blockquote><b>Note:</b>
|
||||
|
||||
<p>"STATE:" messages often provide visible alerts to the user. For example, on
|
||||
Mac OS X setting a printer-state-reason value with an "-error" or "-warning"
|
||||
suffix will cause the printer's dock item to bounce if the corresponding reason
|
||||
is localized with a cupsIPPReason keyword in the printer's PPD file.</p>
|
||||
|
||||
</blockquote></dd>
|
||||
use vendor-prefixed ("com.acme.foo") keywords for custom states.</dd>
|
||||
|
||||
<dt>WARNING: message</dt>
|
||||
<dd>Sets the printer-state-message attribute and adds the specified
|
||||
@@ -285,6 +276,7 @@ prefix strings:</p>
|
||||
<p>Messages without one of these prefixes are treated as if they began with
|
||||
the "DEBUG:" prefix string.</p>
|
||||
|
||||
|
||||
<div class='table'><table width='80%' summary='Table 1: Standard marker-types Values'>
|
||||
<caption>Table 1: <a name='TABLE1'>Standard marker-types Values</a></caption>
|
||||
<thead>
|
||||
|
||||
+5
-5
@@ -59,10 +59,10 @@ extern "C" {
|
||||
* Constants...
|
||||
*/
|
||||
|
||||
# define CUPS_VERSION 1.0402
|
||||
# define CUPS_VERSION 1.0400
|
||||
# define CUPS_VERSION_MAJOR 1
|
||||
# define CUPS_VERSION_MINOR 4
|
||||
# define CUPS_VERSION_PATCH 2
|
||||
# define CUPS_VERSION_PATCH -1
|
||||
|
||||
# define CUPS_BC_FD 3 /* Back-channel file descriptor for select/poll */
|
||||
# define CUPS_DATE_ANY (time_t)-1
|
||||
@@ -253,7 +253,7 @@ extern int cupsPrintFiles2(http_t *http, const char *name,
|
||||
extern int cupsSetDests2(http_t *http, int num_dests,
|
||||
cups_dest_t *dests) _CUPS_API_1_1_21;
|
||||
|
||||
/**** New in CUPS 1.2/Mac OS X 10.5 ****/
|
||||
/**** New in CUPS 1.2 ****/
|
||||
extern ssize_t cupsBackChannelRead(char *buffer, size_t bytes,
|
||||
double timeout) _CUPS_API_1_2;
|
||||
extern ssize_t cupsBackChannelWrite(const char *buffer, size_t bytes,
|
||||
@@ -268,7 +268,7 @@ extern int cupsRemoveOption(const char *name, int num_options,
|
||||
cups_option_t **options) _CUPS_API_1_2;
|
||||
extern cups_file_t *cupsTempFile2(char *filename, int len) _CUPS_API_1_2;
|
||||
|
||||
/**** New in CUPS 1.3/Mac OS X 10.5 ****/
|
||||
/**** New in CUPS 1.3 ****/
|
||||
extern ipp_t *cupsDoIORequest(http_t *http, ipp_t *request,
|
||||
const char *resource, int infile,
|
||||
int outfile) _CUPS_API_1_3;
|
||||
@@ -281,7 +281,7 @@ extern void cupsSetDefaultDest(const char *name,
|
||||
int num_dests,
|
||||
cups_dest_t *dests) _CUPS_API_1_3;
|
||||
|
||||
/**** New in CUPS 1.4/Mac OS X 10.6 ****/
|
||||
/**** New in CUPS 1.4 ****/
|
||||
extern ipp_status_t cupsCancelJob2(http_t *http, const char *name,
|
||||
int job_id, int purge) _CUPS_API_1_4;
|
||||
extern int cupsCreateJob(http_t *http, const char *name,
|
||||
|
||||
+2
-2
@@ -557,7 +557,7 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
|
||||
* configuration file does not exist. Find out the real default.
|
||||
*/
|
||||
|
||||
if (!cups_get_sdests(http, CUPS_GET_DEFAULT, NULL, 0, &dest))
|
||||
if (!cups_get_sdests(http, CUPS_GET_DEFAULT, name, 0, &dest))
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -1800,7 +1800,7 @@ cups_get_sdests(http_t *http, /* I - Connection to server or CUPS_HTTP_DEFA
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
|
||||
"requesting-user-name", NULL, cupsUser());
|
||||
|
||||
if (name && op != CUPS_GET_DEFAULT)
|
||||
if (name)
|
||||
{
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
|
||||
"localhost", ippPort(), "/printers/%s", name);
|
||||
|
||||
+19
-48
@@ -50,7 +50,6 @@
|
||||
#include "debug.h"
|
||||
#include "globals.h"
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_DNSSD
|
||||
# include <dns_sd.h>
|
||||
# include <poll.h>
|
||||
@@ -1407,6 +1406,7 @@ _httpResolveURI(
|
||||
fputs("STATE: +connecting-to-device\n", stderr);
|
||||
fprintf(stderr, "DEBUG: Resolving \"%s\", regtype=\"%s\", "
|
||||
"domain=\"local.\"...\n", hostname, regtype);
|
||||
_cupsLangPuts(stderr, _("INFO: Looking for printer...\n"));
|
||||
}
|
||||
|
||||
uri = NULL;
|
||||
@@ -1418,65 +1418,36 @@ _httpResolveURI(
|
||||
hostname, regtype, "local.", resolve_callback,
|
||||
&uribuf) == kDNSServiceErr_NoError)
|
||||
{
|
||||
int fds; /* Number of ready descriptors */
|
||||
time_t timeout, /* Poll timeout */
|
||||
start_time = time(NULL);/* Start time */
|
||||
|
||||
for (;;)
|
||||
if (strcasecmp(domain, "local."))
|
||||
{
|
||||
if (logit)
|
||||
_cupsLangPuts(stderr, _("INFO: Looking for printer...\n"));
|
||||
|
||||
/*
|
||||
* For the first minute, wakeup every 2 seconds to emit a
|
||||
* "looking for printer" message...
|
||||
* Wait 2 seconds for a response to the local resolve; if nothing comes
|
||||
* in, do an additional domain resolution...
|
||||
*/
|
||||
|
||||
timeout = (time(NULL) < (start_time + 60)) ? 2000 : -1;
|
||||
|
||||
polldata.fd = DNSServiceRefSockFD(ref);
|
||||
polldata.events = POLLIN;
|
||||
|
||||
fds = poll(&polldata, 1, timeout);
|
||||
|
||||
if (fds < 0)
|
||||
{
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
DEBUG_printf(("5_httpResolveURI: poll error: %s", strerror(errno)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (fds == 0)
|
||||
if (poll(&polldata, 1, 2000) != 1)
|
||||
{
|
||||
/*
|
||||
* Wait 2 seconds for a response to the local resolve; if nothing
|
||||
* comes in, do an additional domain resolution...
|
||||
* OK, send the domain name resolve...
|
||||
*/
|
||||
|
||||
if (domainsent == 0 && strcasecmp(domain, "local."))
|
||||
{
|
||||
if (logit)
|
||||
fprintf(stderr,
|
||||
"DEBUG: Resolving \"%s\", regtype=\"%s\", "
|
||||
"domain=\"%s\"...\n", hostname, regtype, domain);
|
||||
|
||||
domainref = ref;
|
||||
if (DNSServiceResolve(&domainref, kDNSServiceFlagsShareConnection, 0,
|
||||
hostname, regtype, domain, resolve_callback,
|
||||
&uribuf) == kDNSServiceErr_NoError)
|
||||
domainsent = 1;
|
||||
}
|
||||
if (logit)
|
||||
fprintf(stderr, "DEBUG: Resolving \"%s\", regtype=\"%s\", "
|
||||
"domain=\"%s\"...\n", hostname, regtype, domain);
|
||||
|
||||
domainref = ref;
|
||||
if (DNSServiceResolve(&domainref, kDNSServiceFlagsShareConnection, 0,
|
||||
hostname, regtype, domain, resolve_callback,
|
||||
&uribuf) == kDNSServiceErr_NoError)
|
||||
domainsent = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DNSServiceProcessResult(ref) == kDNSServiceErr_NoError)
|
||||
{
|
||||
uri = resolved_uri;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (DNSServiceProcessResult(ref) == kDNSServiceErr_NoError)
|
||||
uri = resolved_uri;
|
||||
|
||||
if (domainsent)
|
||||
DNSServiceRefDeallocate(domainref);
|
||||
|
||||
+2
-12
@@ -3004,11 +3004,6 @@ http_setup_ssl(http_t *http) /* I - Connection to server */
|
||||
http->error = errno;
|
||||
http->status = HTTP_ERROR;
|
||||
|
||||
gnutls_deinit(conn->session);
|
||||
gnutls_certificate_free_credentials(*credentials);
|
||||
free(credentials);
|
||||
free(conn);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -3143,13 +3138,6 @@ http_upgrade(http_t *http) /* I - Connection to server */
|
||||
|
||||
DEBUG_printf(("7http_upgrade(%p)", http));
|
||||
|
||||
/*
|
||||
* Flush the connection to make sure any previous "Upgrade" message
|
||||
* has been read.
|
||||
*/
|
||||
|
||||
httpFlush(http);
|
||||
|
||||
/*
|
||||
* Copy the HTTP data to a local variable so we can do the OPTIONS
|
||||
* request without interfering with the existing request data...
|
||||
@@ -3177,6 +3165,8 @@ http_upgrade(http_t *http) /* I - Connection to server */
|
||||
while (httpUpdate(http) == HTTP_CONTINUE);
|
||||
}
|
||||
|
||||
httpFlush(http);
|
||||
|
||||
/*
|
||||
* Restore the HTTP request data...
|
||||
*/
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
* Hyper-Text Transport Protocol definitions for the Common UNIX Printing
|
||||
* System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2009 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
@@ -387,7 +387,7 @@ extern void httpSeparate2(const char *uri,
|
||||
char *host, int hostlen, int *port,
|
||||
char *resource, int resourcelen) _CUPS_DEPRECATED;
|
||||
|
||||
/**** New in CUPS 1.2/Mac OS X 10.5 ****/
|
||||
/**** New in CUPS 1.2 ****/
|
||||
extern int httpAddrAny(const http_addr_t *addr) _CUPS_API_1_2;
|
||||
extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *sock) _CUPS_API_1_2;
|
||||
extern int httpAddrEqual(const http_addr_t *addr1,
|
||||
@@ -435,7 +435,7 @@ extern void httpSetLength(http_t *http, size_t length) _CUPS_API_1_2;
|
||||
extern ssize_t httpWrite2(http_t *http, const char *buffer,
|
||||
size_t length) _CUPS_API_1_2;
|
||||
|
||||
/**** New in CUPS 1.3/Mac OS X 10.5 ****/
|
||||
/**** New in CUPS 1.3 ****/
|
||||
extern char *httpGetAuthString(http_t *http) _CUPS_API_1_3;
|
||||
extern void httpSetAuthString(http_t *http, const char *scheme,
|
||||
const char *data) _CUPS_API_1_3;
|
||||
|
||||
+2
-4
@@ -445,7 +445,7 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
|
||||
if (!language)
|
||||
{
|
||||
if (!getenv("SOFTWARE") || (language = getenv("LANG")) == NULL)
|
||||
if ((language = getenv("LANG")) == NULL)
|
||||
language = appleLangDefault();
|
||||
|
||||
DEBUG_printf(("4cupsLangGet: language=\"%s\"", language));
|
||||
@@ -1121,15 +1121,13 @@ appleLangDefault(void)
|
||||
/* Pointer to library globals */
|
||||
|
||||
|
||||
DEBUG_puts("2appleLangDefault()");
|
||||
|
||||
/*
|
||||
* Only do the lookup and translation the first time.
|
||||
*/
|
||||
|
||||
if (!cg->language[0])
|
||||
{
|
||||
if (getenv("SOFTWARE") != NULL && (lang = getenv("LANG")) != NULL)
|
||||
if ((lang = getenv("LANG")))
|
||||
{
|
||||
strlcpy(cg->language, lang, sizeof(cg->language));
|
||||
return (cg->language);
|
||||
|
||||
+3
-4
@@ -18,10 +18,9 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* ppdPageSize() - Get the page size record for the given size.
|
||||
* ppdPageSizeLimits() - Return the custom page size limits.
|
||||
* ppdPageWidth() - Get the page width for the given size.
|
||||
* ppdPageLength() - Get the page length for the given size.
|
||||
* ppdPageSize() - Get the page size record for the given size.
|
||||
* ppdPageWidth() - Get the page width for the given size.
|
||||
* ppdPageLength() - Get the page length for the given size.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
+1
-8
@@ -942,8 +942,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
|
||||
* Get the parameter data...
|
||||
*/
|
||||
|
||||
if (!string ||
|
||||
sscanf(string, "%d%32s%64s%64s", &corder, ctype, cminimum,
|
||||
if (sscanf(string, "%d%32s%64s%64s", &corder, ctype, cminimum,
|
||||
cmaximum) != 4)
|
||||
{
|
||||
cg->ppd_status = PPD_BAD_CUSTOM_PARAM;
|
||||
@@ -1616,12 +1615,6 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
|
||||
else if (!strcmp(keyword, "UIConstraints") ||
|
||||
!strcmp(keyword, "NonUIConstraints"))
|
||||
{
|
||||
if (!string)
|
||||
{
|
||||
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (ppd->num_consts == 0)
|
||||
constraint = calloc(2, sizeof(ppd_const_t));
|
||||
else
|
||||
|
||||
+4
-4
@@ -213,7 +213,7 @@ typedef struct ppd_profile_s /**** sRGB Color Profiles ****/
|
||||
float matrix[3][3]; /* Transform matrix */
|
||||
} ppd_profile_t;
|
||||
|
||||
/**** New in CUPS 1.2/Mac OS X 10.5 ****/
|
||||
/**** New in CUPS 1.2 ****/
|
||||
typedef enum ppd_cptype_e /**** Custom Parameter Type @since CUPS 1.2/Mac OS X 10.5@ ****/
|
||||
{
|
||||
PPD_CUSTOM_CURVE, /* Curve value for f(x) = x^value */
|
||||
@@ -321,15 +321,15 @@ typedef struct ppd_file_s /**** PPD File ****/
|
||||
int cur_attr; /* Current attribute @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
|
||||
ppd_attr_t **attrs; /* Attributes @since CUPS 1.1.19/Mac OS X 10.3@ @private@ */
|
||||
|
||||
/**** New in CUPS 1.2/Mac OS X 10.5 ****/
|
||||
/**** New in CUPS 1.2 ****/
|
||||
cups_array_t *sorted_attrs; /* Attribute lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
|
||||
cups_array_t *options; /* Option lookup array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
|
||||
cups_array_t *coptions; /* Custom options array @since CUPS 1.2/Mac OS X 10.5@ @private@ */
|
||||
|
||||
/**** New in CUPS 1.3/Mac OS X 10.5 ****/
|
||||
/**** New in CUPS 1.3 ****/
|
||||
cups_array_t *marked; /* Marked choices @since CUPS 1.3/Mac OS X 10.5@ @private@ */
|
||||
|
||||
/**** New in CUPS 1.4/Mac OS X 10.6 ****/
|
||||
/**** New in CUPS 1.4 ****/
|
||||
cups_array_t *cups_uiconstraints; /* cupsUIConstraints @since CUPS 1.4/Mac OS X 10.6@ @private@ */
|
||||
} ppd_file_t;
|
||||
|
||||
|
||||
+2
-4
@@ -266,11 +266,9 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
|
||||
|
||||
DEBUG_printf(("2cupsDoIORequest: status=%d", status));
|
||||
|
||||
if (status >= HTTP_BAD_REQUEST &&
|
||||
status != HTTP_UNAUTHORIZED &&
|
||||
status != HTTP_UPGRADE_REQUIRED)
|
||||
if (status == HTTP_FORBIDDEN || status == HTTP_ERROR ||
|
||||
status >= HTTP_SERVER_ERROR)
|
||||
{
|
||||
httpFlush(http);
|
||||
_cupsSetHTTPError(status);
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-21
@@ -191,23 +191,9 @@ cupsSideChannelRead(
|
||||
if (errno != EINTR && errno != EAGAIN)
|
||||
{
|
||||
DEBUG_printf(("1cupsSideChannelRead: Read error: %s", strerror(errno)));
|
||||
*command = CUPS_SC_CMD_NONE;
|
||||
*status = CUPS_SC_STATUS_IO_ERROR;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Watch for EOF or too few bytes...
|
||||
*/
|
||||
|
||||
if (bytes < 4)
|
||||
{
|
||||
DEBUG_printf(("1cupsSideChannelRead: Short read of %d bytes", bytes));
|
||||
*command = CUPS_SC_CMD_NONE;
|
||||
*status = CUPS_SC_STATUS_BAD_MESSAGE;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Validate the command code in the message...
|
||||
*/
|
||||
@@ -216,8 +202,6 @@ cupsSideChannelRead(
|
||||
buffer[0] > CUPS_SC_CMD_SNMP_GET_NEXT)
|
||||
{
|
||||
DEBUG_printf(("1cupsSideChannelRead: Bad command %d!", buffer[0]));
|
||||
*command = CUPS_SC_CMD_NONE;
|
||||
*status = CUPS_SC_STATUS_BAD_MESSAGE;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@@ -395,7 +379,6 @@ cupsSideChannelSNMPWalk(
|
||||
real_oidlen, /* Length of returned OID string */
|
||||
oidlen; /* Length of first OID */
|
||||
const char *current_oid; /* Current OID */
|
||||
char last_oid[2048]; /* Last OID */
|
||||
|
||||
|
||||
DEBUG_printf(("cupsSideChannelSNMPWalk(oid=\"%s\", timeout=%.3f, cb=%p, "
|
||||
@@ -414,7 +397,6 @@ cupsSideChannelSNMPWalk(
|
||||
|
||||
current_oid = oid;
|
||||
oidlen = (int)strlen(oid);
|
||||
last_oid[0] = '\0';
|
||||
|
||||
do
|
||||
{
|
||||
@@ -440,8 +422,7 @@ cupsSideChannelSNMPWalk(
|
||||
* Parse the response of the form "oid\0value"...
|
||||
*/
|
||||
|
||||
if (strncmp(real_data, oid, oidlen) || real_data[oidlen] != '.' ||
|
||||
!strcmp(real_data, last_oid))
|
||||
if (strncmp(real_data, oid, oidlen) || real_data[oidlen] != '.')
|
||||
{
|
||||
/*
|
||||
* Done with this set of OIDs...
|
||||
@@ -467,7 +448,6 @@ cupsSideChannelSNMPWalk(
|
||||
*/
|
||||
|
||||
current_oid = real_data;
|
||||
strlcpy(last_oid, current_oid, sizeof(last_oid));
|
||||
}
|
||||
}
|
||||
while (status == CUPS_SC_STATUS_OK);
|
||||
|
||||
@@ -55,7 +55,6 @@ typedef enum cups_sc_bidi_e cups_sc_bidi_t;
|
||||
|
||||
enum cups_sc_command_e /**** Request command codes ****/
|
||||
{
|
||||
CUPS_SC_CMD_NONE = 0, /* No command @private@ */
|
||||
CUPS_SC_CMD_SOFT_RESET = 1, /* Do a soft reset */
|
||||
CUPS_SC_CMD_DRAIN_OUTPUT = 2, /* Drain all pending output */
|
||||
CUPS_SC_CMD_GET_BIDI = 3, /* Return bidirectional capabilities */
|
||||
|
||||
+4
-10
@@ -608,8 +608,6 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
int count = 0; /* Number of OIDs found */
|
||||
int request_id = 0; /* Current request ID */
|
||||
cups_snmp_t packet; /* Current response packet */
|
||||
int lastoid[CUPS_SNMP_MAX_OID];
|
||||
/* Last OID we got */
|
||||
|
||||
|
||||
/*
|
||||
@@ -633,15 +631,14 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
*/
|
||||
|
||||
_cupsSNMPCopyOID(packet.object_name, prefix, CUPS_SNMP_MAX_OID);
|
||||
lastoid[0] = -1;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
request_id ++;
|
||||
|
||||
if (!_cupsSNMPWrite(fd, address, version, community,
|
||||
CUPS_ASN1_GET_NEXT_REQUEST, request_id,
|
||||
packet.object_name))
|
||||
CUPS_ASN1_GET_NEXT_REQUEST, request_id,
|
||||
packet.object_name))
|
||||
{
|
||||
DEBUG_puts("5_cupsSNMPWalk: Returning -1");
|
||||
|
||||
@@ -655,8 +652,7 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!_cupsSNMPIsOIDPrefixed(&packet, prefix) ||
|
||||
_cupsSNMPIsOID(&packet, lastoid))
|
||||
if (!_cupsSNMPIsOIDPrefixed(&packet, prefix))
|
||||
{
|
||||
DEBUG_printf(("5_cupsSNMPWalk: Returning %d", count));
|
||||
|
||||
@@ -670,8 +666,6 @@ _cupsSNMPWalk(int fd, /* I - SNMP socket */
|
||||
return (count > 0 ? count : -1);
|
||||
}
|
||||
|
||||
_cupsSNMPCopyOID(lastoid, packet.object_name, CUPS_SNMP_MAX_OID);
|
||||
|
||||
count ++;
|
||||
|
||||
(*cb)(&packet, data);
|
||||
@@ -1286,7 +1280,7 @@ asn1_get_integer(
|
||||
int value; /* Integer value */
|
||||
|
||||
|
||||
for (value = (**buffer & 0x80) ? -1 : 0;
|
||||
for (value = 0;
|
||||
length > 0 && *buffer < bufend;
|
||||
length --, (*buffer) ++)
|
||||
value = (value << 8) | **buffer;
|
||||
|
||||
+1
-5
@@ -64,10 +64,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
int status; /* Exit status */
|
||||
char filename[1024]; /* Filename buffer */
|
||||
cups_file_t *fp; /* File pointer */
|
||||
#ifndef WIN32
|
||||
int fds[2]; /* Open file descriptors */
|
||||
cups_file_t *fdfile; /* File opened with cupsFileOpenFd() */
|
||||
#endif /* !WIN32 */
|
||||
int count; /* Number of lines in file */
|
||||
|
||||
|
||||
@@ -95,7 +93,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
status += random_tests();
|
||||
|
||||
#ifndef WIN32
|
||||
/*
|
||||
* Test fdopen and close without reading...
|
||||
*/
|
||||
@@ -129,7 +126,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
puts("PASS");
|
||||
}
|
||||
#endif /* !WIN32 */
|
||||
|
||||
/*
|
||||
* Count lines in euc-jp.txt, rewind, then count again.
|
||||
@@ -760,7 +756,7 @@ read_write_tests(int compression) /* I - Use compression? */
|
||||
|
||||
fputs("cupsFileGetChar(partial line): ", stdout);
|
||||
|
||||
for (i = 0; i < (int)strlen(partial_line); i ++)
|
||||
for (i = 0; i < strlen(partial_line); i ++)
|
||||
if ((byte = cupsFileGetChar(fp)) < 0)
|
||||
break;
|
||||
else if (byte != partial_line[i])
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
for (i = 0, j = 0; i < (int)(sizeof(base64_tests) / sizeof(base64_tests[0])); i ++)
|
||||
{
|
||||
httpEncode64_2(encode, sizeof(encode), base64_tests[i][0],
|
||||
(int)strlen(base64_tests[i][0]));
|
||||
strlen(base64_tests[i][0]));
|
||||
decodelen = (int)sizeof(decode);
|
||||
httpDecode64_2(decode, &decodelen, base64_tests[i][1]);
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Localization test program for the Common UNIX Printing System (CUPS).
|
||||
*
|
||||
* Copyright 2007-2009 by Apple Inc.
|
||||
* Copyright 2007 by Apple Inc.
|
||||
* Copyright 1997-2006 by Easy Software Products.
|
||||
*
|
||||
* These coded instructions, statements, and computer programs are the
|
||||
|
||||
@@ -166,7 +166,6 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
}
|
||||
|
||||
putenv("LOCALEDIR=locale");
|
||||
putenv("SOFTWARE=CUPS");
|
||||
|
||||
/*
|
||||
* Do tests with test.ppd...
|
||||
|
||||
+3
-6
@@ -809,8 +809,7 @@ cupsGetJobs2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_D
|
||||
* in the class.
|
||||
*
|
||||
* The returned filename is stored in a static buffer and is overwritten with
|
||||
* each call to @code cupsGetPPD@ or @link cupsGetPPD2@. The caller "owns" the
|
||||
* file that is created and must @code unlink@ the returned filename.
|
||||
* each call to @code cupsGetPPD@ or @link cupsGetPPD2@.
|
||||
*/
|
||||
|
||||
const char * /* O - Filename for PPD file */
|
||||
@@ -841,8 +840,7 @@ cupsGetPPD(const char *name) /* I - Destination name */
|
||||
* in the class.
|
||||
*
|
||||
* The returned filename is stored in a static buffer and is overwritten with
|
||||
* each call to @link cupsGetPPD@ or @code cupsGetPPD2@. The caller "owns" the
|
||||
* file that is created and must @code unlink@ the returned filename.
|
||||
* each call to @link cupsGetPPD@ or @code cupsGetPPD2@.
|
||||
*
|
||||
* @since CUPS 1.1.21/Mac OS X 10.4@
|
||||
*/
|
||||
@@ -875,8 +873,7 @@ cupsGetPPD2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_DE
|
||||
*
|
||||
* The "buffer" parameter contains the local PPD filename. If it contains
|
||||
* the empty string, a new temporary file is created, otherwise the existing
|
||||
* file will be overwritten as needed. The caller "owns" the file that is
|
||||
* created and must @code unlink@ the returned filename.
|
||||
* file will be overwritten as needed.
|
||||
*
|
||||
* On success, @code HTTP_OK@ is returned for a new PPD file and
|
||||
* @code HTTP_NOT_MODIFIED@ if the existing PPD file is up-to-date. Any other
|
||||
|
||||
+26
-30
@@ -7,33 +7,29 @@ Terminal=false
|
||||
Type=Application
|
||||
Name=Manage Printing
|
||||
Comment=CUPS Web Interface
|
||||
Name[de]=Druckerverwaltung
|
||||
Comment[de]=CUPS Webinterface
|
||||
Name[en_US]=Manage Printing
|
||||
Comment[en_US]=CUPS Web Interface
|
||||
Name[es]=Administrar impresión
|
||||
Comment[es]=Interfaz Web de CUPS
|
||||
Name[et]=Trükkimise haldur
|
||||
Comment[et]=CUPS-i veebiliides
|
||||
Name[eu]=Kudeatu inprimaketak
|
||||
Comment[eu]=CUPSen web interfazea
|
||||
Name[fr]=Gestionnaire d'impression
|
||||
Comment[fr]=Interface Web de CUPS
|
||||
Name[he]=נהל הדפסות
|
||||
Comment[he]=ממשק דפדפן של CUPS
|
||||
Name[id]=Manajemen Pencetakan
|
||||
Comment[id]=Antarmuka Web CUPS
|
||||
Name[it]=Gestione stampa
|
||||
Comment[it]=Interfaccia web di CUPS
|
||||
Name[ja]=印刷の管理
|
||||
Comment[ja]=CUPS Web インタフェース
|
||||
Name[pl]=Zarządzanie drukowaniem
|
||||
Comment[pl]=Interfejs WWW CUPS
|
||||
Name[ru]=Настройка печати
|
||||
Comment[ru]=Настройка CUPS
|
||||
Name[sv]=Hantera skrivare
|
||||
Comment[sv]=CUPS webb-gränssnitt
|
||||
Name[zh]=打印机管理
|
||||
Comment[zh]=CUPS网页界面
|
||||
Name[zh_TW]=印表管理
|
||||
Comment[zh_TW]=CUPS 網頁介面
|
||||
Name[de.UTF-8]=Druckerverwaltung
|
||||
Comment[de.UTF-8]=CUPS Webinterface
|
||||
Name[en_US.UTF-8]=Manage Printing
|
||||
Comment[en_US.UTF-8]=CUPS Web Interface
|
||||
Name[es.UTF-8]=Administrar impresión
|
||||
Comment[es.UTF-8]=Interfaz Web de CUPS
|
||||
Name[et.UTF-8]=Trükkimise haldur
|
||||
Comment[et.UTF-8]=CUPS-i veebiliides
|
||||
Name[fr.UTF-8]=Gestionnaire d'impression
|
||||
Comment[fr.UTF-8]=Interface Web de CUPS
|
||||
Name[he.UTF-8]=נהל הדפסות
|
||||
Comment[he.UTF-8]=ממשק דפדפן של CUPS
|
||||
Name[id.UTF-8]=Manajemen Pencetakan
|
||||
Comment[id.UTF-8]=Antarmuka Web CUPS
|
||||
Name[it.UTF-8]=Gestione stampa
|
||||
Comment[it.UTF-8]=Interfaccia web di CUPS
|
||||
Name[ja.UTF-8]=印刷の管理
|
||||
Comment[ja.UTF-8]=CUPS Web インタフェース
|
||||
Name[pl.UTF-8]=Zarządzanie drukowaniem
|
||||
Comment[pl.UTF-8]=Interfejs WWW CUPS
|
||||
Name[ru.UTF-8]=Настройка печати
|
||||
Comment[ru.UTF-8]=Настройка CUPS
|
||||
Name[zh.UTF-8]=打印机管理
|
||||
Comment[zh.UTF-8]=CUPS网页界面
|
||||
Name[zh_TW.UTF-8]=印表管理
|
||||
Comment[zh_TW.UTF-8]=CUPS 網頁介面
|
||||
|
||||
+3
-3
@@ -34,7 +34,7 @@ WEBIMAGES = \
|
||||
images/unsel.gif \
|
||||
images/wait.gif
|
||||
HELPIMAGES = \
|
||||
images/cups-block-diagram.png \
|
||||
images/cups-block-diagram.gif \
|
||||
images/cups-command-chain.png \
|
||||
images/cups-postscript-chain.png \
|
||||
images/cups-raster-chain.png \
|
||||
@@ -190,8 +190,8 @@ install-languages:
|
||||
for lang in $(LANGUAGES); do \
|
||||
if test -d $$lang; then \
|
||||
$(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang; \
|
||||
$(INSTALL_DATA) $$lang/index.html $(DOCDIR)/$$lang; \
|
||||
$(INSTALL_DATA) $$lang/cups.css $(DOCDIR)/$$lang >/dev/null 2>&1 || true; \
|
||||
$(INSTALL_MAN) $$lang/index.html $(DOCDIR)/$$lang; \
|
||||
test -f $$lang/cups.css && $(INSTALL_MAN) $$lang/cups.css $(DOCDIR)/$$lang; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Verwaltung </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Klassen </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> On-Line Hilfe </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Aufträge </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Auftrüge </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Drucker </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Search Help"
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
|
||||
<TITLE>Hasiera - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
|
||||
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
|
||||
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<TABLE CLASS="page" SUMMARY="{title}">
|
||||
<TR><TD CLASS="body">
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
|
||||
<TR HEIGHT="36">
|
||||
<TD><A HREF="http://www.cups.org/" TARGET="_blank"><IMG
|
||||
SRC="/images/left.gif" WIDTH="64" HEIGHT="36" BORDER="0" ALT=""></A></TD>
|
||||
<TD CLASS="sel"><A HREF="/"> Hasiera </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/admin"> Administrazioa </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/classes/"> Klaseak </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/help/"> Lineako laguntza </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/jobs/"> Lanak </A></TD>
|
||||
<TD CLASS="unsel"><A HREF="/printers/"> Inprimagailuak </A></TD>
|
||||
<TD CLASS="unsel" WIDTH="100%"><FORM ACTION="/help/" METHOD="GET"><INPUT
|
||||
TYPE="SEARCH" NAME="QUERY" SIZE="20" PLACEHOLDER="Bilatu laguntzan"
|
||||
AUTOSAVE="org.cups.help" RESULTS="20"></FORM></TD>
|
||||
<TD><IMG SRC="/images/right.gif" WIDTH="4" HEIGHT="36" ALT=""></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD STYLE="padding-right: 20px;">
|
||||
|
||||
<H1>CUPS @CUPS_VERSION@</H1>
|
||||
|
||||
<P><A HREF="http://www.apple.com/">Apple Inc.</A>-ek Mac OS<SUP>®</SUP> X eta
|
||||
beste UNIX<SUP>®</SUP> bezalako sistema eragileentzako iturburu irekiko
|
||||
inprimatzeko sisteman oinarrituta dago.</P>
|
||||
|
||||
</TD>
|
||||
<TD><A HREF="http://www.cups.org/"><IMG SRC="images/cups-icon.png" WIDTH="128"
|
||||
HEIGHT="128" ALT="CUPS"></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<TABLE CLASS="indent" SUMMARY="">
|
||||
<TR><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS erabiltzaileentzako</H2>
|
||||
|
||||
<P><A HREF="help/overview.html">CUPSen gainbegiraketa</A></P>
|
||||
|
||||
<P><A HREF="help/options.html">Komando-lerroaren bidez inprimatzea eta aukerak</A></P>
|
||||
|
||||
<P><A HREF="help/whatsnew.html">CUPS 1.4 bertsioak dakartzan berrikuntza.</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.general">Erabiltzaileen foroa</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="border-right: dotted thin #cccccc; padding-left: 20px; padding-right: 20px;">
|
||||
|
||||
<H2>CUPS administratzaileentzako</H2>
|
||||
|
||||
<P><A HREF="admin">Inprimagailuak eta klaseak gehitzea</A></P>
|
||||
|
||||
<P><A HREF="help/policies.html">Kudeaketako eragiketen politikak</A></P>
|
||||
|
||||
<P><A HREF="help/accounting.html">Inprimagailuaren oinarrizko kontabilitatea</A></P>
|
||||
|
||||
<P><A HREF="help/security.html">Zerbitzariaren segurtasuna</A></P>
|
||||
|
||||
<P><A HREF="help/kerberos.html">Kerberos autentifikazioa erabiltzea</A></P>
|
||||
|
||||
<P><A HREF="help/network.html">Sareko inprimagailuak erabiltzea</A></P>
|
||||
|
||||
<P><A HREF="help/ref-cupsd-conf.html">cupsd.conf erreferentzia</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/ppd.php">Bilatu inprimagailuaren kontrolatzaileak</A></P>
|
||||
|
||||
</TD><TD VALIGN="top" STYLE="padding-left: 20px;">
|
||||
|
||||
<H2>CUPS garatzaileentzako</H2>
|
||||
|
||||
<P><A HREF="help/api-overview.html">Sarrera CUPSen programaziora</A></P>
|
||||
|
||||
<P><A HREF="help/api-cups.html">CUPSen APIa</A></P>
|
||||
|
||||
<P><A HREF="help/api-filter.html">Iragazkien eta atzeko planoan programatzeea</A></P>
|
||||
|
||||
<P><A HREF="help/api-httpipp.html">HTTP eta IPP APIak</A></P>
|
||||
|
||||
<P><A HREF="help/api-ppd.html">PPD APIa</A></P>
|
||||
|
||||
<P><A HREF="help/api-raster.html">Bilbearen APIa</A></P>
|
||||
|
||||
<P><A HREF="help/ref-ppdcfile.html">PPD kontrolatzaileen konpilatzailearen informazioaren fitxategiaren erreferentzia</A></P>
|
||||
|
||||
<P><A HREF="http://www.cups.org/newsgroups.php?gcups.development">Garatzaileen forua</A></P>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</TD></TR>
|
||||
<TR><TD> </TD></TR>
|
||||
<TR><TD CLASS="trailer">CUPS eta CUPSen logotipoa <A HREF="http://www.apple.com">Apple Inc.</A>en marka erregistratuaj dira.
|
||||
CUPSen copyright-a 2007-2009 Apple Inc. Eskubide guztiak gordeta.</TD></TR>
|
||||
</TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-cups.html 8726 2009-06-22 20:46:13Z mike $"
|
||||
"$Id: api-cups.html 8653 2009-05-16 23:53:28Z mike $"
|
||||
|
||||
CUPS API header for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -475,7 +475,7 @@ specified server.">cupsPrintFiles2</a></li>
|
||||
<li><a href="#cups_ptype_e" title="Printer type/capability bit constants">cups_ptype_e</a></li>
|
||||
</ul></li>
|
||||
<!--
|
||||
"$Id: api-cups.html 8726 2009-06-22 20:46:13Z mike $"
|
||||
"$Id: api-cups.html 8653 2009-05-16 23:53:28Z mike $"
|
||||
|
||||
CUPS API introduction for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -1491,8 +1491,7 @@ const char *cupsGetPPD (<br>
|
||||
in the class.<br>
|
||||
<br>
|
||||
The returned filename is stored in a static buffer and is overwritten with
|
||||
each call to <code>cupsGetPPD</code> or <a href="#cupsGetPPD2"><code>cupsGetPPD2</code></a>. The caller "owns" the
|
||||
file that is created and must <code>unlink</code> the returned filename.</p>
|
||||
each call to <code>cupsGetPPD</code> or <a href="#cupsGetPPD2"><code>cupsGetPPD2</code></a>.</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.1.21/Mac OS X 10.4 </span><a name="cupsGetPPD2">cupsGetPPD2</a></h3>
|
||||
<p class="description">Get the PPD file for a printer from the specified server.</p>
|
||||
<p class="code">
|
||||
@@ -1514,8 +1513,7 @@ const char *cupsGetPPD2 (<br>
|
||||
in the class.<br>
|
||||
<br>
|
||||
The returned filename is stored in a static buffer and is overwritten with
|
||||
each call to <a href="#cupsGetPPD"><code>cupsGetPPD</code></a> or <code>cupsGetPPD2</code>. The caller "owns" the
|
||||
file that is created and must <code>unlink</code> the returned filename.
|
||||
each call to <a href="#cupsGetPPD"><code>cupsGetPPD</code></a> or <code>cupsGetPPD2</code>.
|
||||
|
||||
</p>
|
||||
<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsGetPPD3">cupsGetPPD3</a></h3>
|
||||
@@ -1551,8 +1549,7 @@ the server.<br>
|
||||
<br>
|
||||
The "buffer" parameter contains the local PPD filename. If it contains
|
||||
the empty string, a new temporary file is created, otherwise the existing
|
||||
file will be overwritten as needed. The caller "owns" the file that is
|
||||
created and must <code>unlink</code> the returned filename.<br>
|
||||
file will be overwritten as needed.<br>
|
||||
<br>
|
||||
On success, <code>HTTP_OK</code> is returned for a new PPD file and
|
||||
<code>HTTP_NOT_MODIFIED</code> if the existing PPD file is up-to-date. Any other
|
||||
|
||||
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-filter.html 8718 2009-06-18 17:41:03Z mike $"
|
||||
"$Id: api-filter.html 8653 2009-05-16 23:53:28Z mike $"
|
||||
|
||||
Filter and backend programming header for the Common UNIX Printing System
|
||||
(CUPS).
|
||||
@@ -373,8 +373,6 @@ div.contents ul.subcontents li {
|
||||
Programming: <a href='api-cups.html' target='_top'>CUPS API</a><br>
|
||||
Programming: <a href='api-ppd.html' target='_top'>PPD API</a><br>
|
||||
Programming: <a href='api-raster.html' target='_top'>Raster API</a><br>
|
||||
Programming: <a href='postscript-driver.html' target='_top'>Developing PostScript Printer Drivers</a><br>
|
||||
Programming: <a href='raster-driver.html' target='_top'>Developing Raster Printer Drivers</a><br>
|
||||
Specifications: <a href='spec-design' target='_top'>CUPS Design Description</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -421,7 +419,7 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#cups_sc_status_e" title="Response status codes">cups_sc_status_e</a></li>
|
||||
</ul></li>
|
||||
<!--
|
||||
"$Id: api-filter.html 8718 2009-06-18 17:41:03Z mike $"
|
||||
"$Id: api-filter.html 8653 2009-05-16 23:53:28Z mike $"
|
||||
|
||||
Filter and backend programming introduction for the Common UNIX Printing
|
||||
System (CUPS).
|
||||
@@ -549,7 +547,7 @@ when running print filters and backends:</p>
|
||||
|
||||
<dl class="code">
|
||||
|
||||
<dt>APPLE_LANGUAGE</dt>
|
||||
<dt>APPLE_LANGUAGES</dt>
|
||||
<dd>The Apple language identifier associated with the job
|
||||
(Mac OS X only).</dd>
|
||||
|
||||
@@ -686,16 +684,7 @@ prefix strings:</p>
|
||||
current queue. Typically this is used to indicate persistent media,
|
||||
ink, toner, and configuration conditions or errors on a printer.
|
||||
<a href='#TABLE2'>Table 2</a> lists the standard state keywords -
|
||||
use vendor-prefixed ("com.acme.foo") keywords for custom states.
|
||||
|
||||
<blockquote><b>Note:</b>
|
||||
|
||||
<p>"STATE:" messages often provide visible alerts to the user. For example, on
|
||||
Mac OS X setting a printer-state-reason value with an "-error" or "-warning"
|
||||
suffix will cause the printer's dock item to bounce if the corresponding reason
|
||||
is localized with a cupsIPPReason keyword in the printer's PPD file.</p>
|
||||
|
||||
</blockquote></dd>
|
||||
use vendor-prefixed ("com.acme.foo") keywords for custom states.</dd>
|
||||
|
||||
<dt>WARNING: message</dt>
|
||||
<dd>Sets the printer-state-message attribute and adds the specified
|
||||
@@ -707,6 +696,7 @@ prefix strings:</p>
|
||||
<p>Messages without one of these prefixes are treated as if they began with
|
||||
the "DEBUG:" prefix string.</p>
|
||||
|
||||
|
||||
<div class='table'><table width='80%' summary='Table 1: Standard marker-types Values'>
|
||||
<caption>Table 1: <a name='TABLE1'>Standard marker-types Values</a></caption>
|
||||
<thead>
|
||||
|
||||
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
|
||||
<body>
|
||||
<div class='body'>
|
||||
<!--
|
||||
"$Id: api-ppdc.html 8704 2009-06-10 15:51:21Z mike $"
|
||||
"$Id: api-ppdc.html 8653 2009-05-16 23:53:28Z mike $"
|
||||
|
||||
PPD Compiler API header for CUPS.
|
||||
|
||||
@@ -411,7 +411,7 @@ div.contents ul.subcontents li {
|
||||
<li><a href="#ppdcOptType" title="// Option type">ppdcOptType</a></li>
|
||||
</ul></li>
|
||||
<!--
|
||||
"$Id: api-ppdc.html 8704 2009-06-10 15:51:21Z mike $"
|
||||
"$Id: api-ppdc.html 8653 2009-05-16 23:53:28Z mike $"
|
||||
|
||||
PPD Compiler API introduction for CUPS.
|
||||
|
||||
@@ -865,22 +865,6 @@ void add_size (<br>
|
||||
</dl>
|
||||
<h5 class="returnvalue">Return Value</h5>
|
||||
<p class="description">Matching option or NULL</p>
|
||||
<h4 class="method"><a name="find_option_group">find_option_group</a></h4>
|
||||
<p class="description"></p>
|
||||
<p class="code">
|
||||
<a href="#ppdcOption">ppdcOption</a> *find_option_group (<br>
|
||||
const char *n,<br>
|
||||
<a href="#ppdcGroup">ppdcGroup</a> **mg<br>
|
||||
);</p>
|
||||
<h5 class="parameters">Parameters</h5>
|
||||
<dl>
|
||||
<dt>n</dt>
|
||||
<dd class="description">Option name</dd>
|
||||
<dt>mg</dt>
|
||||
<dd class="description">Matching group or NULL</dd>
|
||||
</dl>
|
||||
<h5 class="returnvalue">Return Value</h5>
|
||||
<p class="description">Matching option or NULL</p>
|
||||
<h4 class="method"><a name="ppdcDriver">ppdcDriver</a></h4>
|
||||
<p class="description"></p>
|
||||
<p class="code">
|
||||
|
||||
@@ -372,7 +372,7 @@ div.contents ul.subcontents li {
|
||||
|
||||
<div class='figure'><table summary='PostScript Filter Chain'>
|
||||
<caption>Figure 1: <a name='FIGURE_1'>PostScript Filter Chain</a></caption>
|
||||
<tr><td><img src='../images/cups-postscript-chain.png' width='700' height='150' alt='PostScript Filter Chain'></td></tr>
|
||||
<tr><td><img src='/images/cups-postscript-chain.png' width='700' height='150' alt='PostScript Filter Chain'></td></tr>
|
||||
</table></div>
|
||||
|
||||
<p>The optional PostScript filter can be provided to add printer-specific commands to the PostScript output that cannot be represented in the PPD file or to reorganize the output for special printer features. Typically this is used to support advanced job management or finishing functions on the printer. CUPS includes a generic PostScript filter that handles all PPD-defined commands.</p>
|
||||
@@ -385,7 +385,7 @@ div.contents ul.subcontents li {
|
||||
|
||||
<div class='figure'><table summary='Command Filter Chain'>
|
||||
<caption>Figure 2: <a name='FIGURE_2'>Command Filter Chain</a></caption>
|
||||
<tr><td><img src='../images/cups-command-chain.png' width='575' height='150' alt='Command Filter Chain'></td></tr>
|
||||
<tr><td><img src='/images/cups-command-chain.png' width='575' height='150' alt='Command Filter Chain'></td></tr>
|
||||
</table></div>
|
||||
|
||||
<p>PostScript printer drivers typically do not require their own command filter since CUPS includes a generic PostScript command filter that supports all of the standard functions using PPD-defined commands.</p>
|
||||
|
||||
@@ -369,10 +369,6 @@ that describe the features and capabilities of one or more printers.</P>
|
||||
<li><a href="#CONDITIONAL">Conditional Statements</a></li>
|
||||
<li><a href="#CONSTRAINTS">Defining Constraints</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#LOCALIZATION">Localization</a><ul class="subcontents">
|
||||
<li><a href="#PPDPO">The ppdpo Utility</a></li>
|
||||
<li><a href="#PPDC_CATALOG">Using Message Catalogs with the PPD Compiler</a></li>
|
||||
</ul></li>
|
||||
<h2 class='title'><a name='BASICS'>The Basics</a></h2>
|
||||
|
||||
<P>The PPD compiler, <a href='man-ppdc.html'><code>ppdc(1)</code></a>, is a
|
||||
@@ -1183,79 +1179,6 @@ lines:</p>
|
||||
<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsUIConstraints DuplexOff "*Duplex *OptionDuplexer False"
|
||||
<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsUIResolver DuplexOff "*Duplex None"
|
||||
</pre>
|
||||
|
||||
<h2 class='title'><a name='LOCALIZATION'>Localization</a></h2>
|
||||
|
||||
<p>The PPD compiler provides localization of PPD files in different languages
|
||||
through <i>message catalog</i> files in the GNU gettext or Apple .strings
|
||||
formats. Each user text string and several key PPD attribute values such as
|
||||
<tt>LanguageVersion</tt> and <tt>LanguageEncoding</tt> are looked up in the
|
||||
corresponding message catalog and the translated text is substituted in the
|
||||
generated PPD files. One message catalog file can be used by multiple driver
|
||||
information files, and each file contains a single language translation.</p>
|
||||
|
||||
<h3><a name='PPDPO'>The ppdpo Utility</a></h3>
|
||||
|
||||
<p>While CUPS includes localizations of all standard media sizes and options in
|
||||
several languages, your driver information files may provide their own media
|
||||
sizes and options that need to be localized. CUPS provides a utility program to
|
||||
aid in the localization of drivers called <a
|
||||
href='man-ppdpo.html'><tt>ppdpo(1)</tt></a>. The <tt>ppdpo</tt> program creates
|
||||
or updates a message catalog file based upon one or more driver information
|
||||
files. New messages are added with the word "TRANSLATE" added to the front of
|
||||
the translation string to make locating new strings for translation easier. The
|
||||
program accepts the message catalog filename and one or more driver information
|
||||
files.</p>
|
||||
|
||||
<p>For example, run the following command to create a new German message catalog
|
||||
called <var>de.po</var> for all of the driver information files in the current
|
||||
directory:</p>
|
||||
|
||||
<pre class='command'>
|
||||
ppdpo -o de.po *.drv
|
||||
</pre>
|
||||
|
||||
<p>If the file <var>de.po</var> already exists, <tt>ppdpo</tt> will update the
|
||||
contents of the file with any new messages that need to be translated. To create
|
||||
an Apple .strings file instead, specify the output filename with a .strings
|
||||
extension, for example:</p>
|
||||
|
||||
<pre class='command'>
|
||||
ppdpo -o de.strings *.drv
|
||||
</pre>
|
||||
|
||||
<h3><a name='PPDC_CATALOG'>Using Message Catalogs with the PPD Compiler</a></h3>
|
||||
|
||||
<p>Once you have created a message catalog, use the <a
|
||||
href='ref-ppdcfile.html#_po'><tt>#po</tt></a> directive to declare it in each
|
||||
driver information file. For example, to declare the German message catalog for
|
||||
a driver use:</p>
|
||||
|
||||
<pre class='example'>
|
||||
<a href='ref-ppdcfile.html#_po'>#po</a> de "de.po" // German
|
||||
</pre>
|
||||
|
||||
<p>In fact, you can use the <tt>#po</tt> directive as many times as needed:</p>
|
||||
|
||||
<pre class='example'>
|
||||
<a href='ref-ppdcfile.html#_po'>#po</a> de "de.po" // German
|
||||
<a href='ref-ppdcfile.html#_po'>#po</a> es "es.po" // Spanish
|
||||
<a href='ref-ppdcfile.html#_po'>#po</a> fr "fr.po" // French
|
||||
<a href='ref-ppdcfile.html#_po'>#po</a> it "it.po" // Italian
|
||||
<a href='ref-ppdcfile.html#_po'>#po</a> ja "ja.po" // Japanese
|
||||
</pre>
|
||||
|
||||
<p>The filename ("de.po", etc.) can be relative to the location of the driver
|
||||
information file or an absolute path. Once defined, the PPD compiler will
|
||||
automatically generate a globalized PPD for every language declared in your
|
||||
driver information file. To generate a single-language PPD file, simply use the
|
||||
<tt>-l</tt> option to list the corresponding locale, for example:</p>
|
||||
|
||||
<pre class='command'>
|
||||
ppdc -l de -d ppd/de mydrivers.drv
|
||||
</pre>
|
||||
|
||||
<p>to generate German PPD files.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -370,7 +370,7 @@ div.contents ul.subcontents li {
|
||||
|
||||
<div class='figure'><table summary='Raster Filter Chain'>
|
||||
<caption>Figure 1: <a name='FIGURE_1'>Raster Filter Chain</a></caption>
|
||||
<tr><td><img src='../images/cups-raster-chain.png' width='700' height='150' alt='Raster Filter Chain'></td></tr>
|
||||
<tr><td><img src='/images/cups-raster-chain.png' width='700' height='150' alt='Raster Filter Chain'></td></tr>
|
||||
</table></div>
|
||||
|
||||
<p>The raster filter converts CUPS raster data into a format the printer understands, for example HP-PCL. CUPS includes several sample raster filters supporting standard page description languages (PDLs). <a href='#TABLE_1'>Table 1</a> shows the raster filters that are bundled with CUPS and the languages they support.</p>
|
||||
@@ -397,7 +397,7 @@ div.contents ul.subcontents li {
|
||||
|
||||
<div class='figure'><table summary='Command Filter Chain'>
|
||||
<caption>Figure 2: <a name='FIGURE_2'>Command Filter Chain</a></caption>
|
||||
<tr><td><img src='../images/cups-command-chain.png' width='575' height='150' alt='Command Filter Chain'></td></tr>
|
||||
<tr><td><img src='/images/cups-command-chain.png' width='575' height='150' alt='Command Filter Chain'></td></tr>
|
||||
</table></div>
|
||||
|
||||
<p>Raster printer drivers must provide their own command filter.</p>
|
||||
|
||||
@@ -21,8 +21,8 @@ can be modified using your favorite text editor, you should
|
||||
normally use the <A HREF="man-lpadmin.html">lpadmin(8)</A>
|
||||
command, web interface, or any of the available GUIs to manage
|
||||
your classes instead. If you do choose to edit this file
|
||||
manually, you will need to stop the scheduler first, make your
|
||||
changes, and then start the scheduler to make them active.</P>
|
||||
manually, you will need to restart the scheduler to make them
|
||||
active.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Accepting">Accepting</A></H2>
|
||||
|
||||
@@ -135,14 +135,8 @@ to the access log file. The following levels are defined:</P>
|
||||
address, or network that is allowed access to the server.
|
||||
<CODE>Allow</CODE> directives are cummulative, so multiple
|
||||
<CODE>Allow</CODE> directives can be used to allow access for
|
||||
multiple hosts or networks.</P>
|
||||
|
||||
<P>Host and domain name matching require that you enable the <A
|
||||
HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A>
|
||||
directive.</P>
|
||||
|
||||
<P>The <CODE>/mm</CODE> notation specifies a CIDR netmask, as shown in
|
||||
<A HREF="#TABLE1">Table 1</A>.</P>
|
||||
multiple hosts or networks. The <CODE>/mm</CODE> notation
|
||||
specifies a CIDR netmask, as shown in Table 1.</P>
|
||||
|
||||
<DIV CLASS="table"><TABLE SUMMARY="CIDR Netmasks">
|
||||
<CAPTION>Table 1: <A NAME="TABLE1">CIDR Netmasks</A></CAPTION>
|
||||
@@ -394,10 +388,10 @@ browse packets from all hosts.</P>
|
||||
HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A>
|
||||
directive.</P>
|
||||
|
||||
<P>IP address matching supports exact matches, partial addresses that match
|
||||
networks using netmasks of 255.0.0.0, 255.255.0.0, and 255.255.255.0, or network
|
||||
addresses using the specified netmask or bit count. The <CODE>/mm</CODE>
|
||||
notation specifies a CIDR netmask, a shown in <A HREF="TABLE1">Table 1</A>.</P>
|
||||
<P>IP address matching supports exact matches, partial addresses
|
||||
that match networks using netmasks of 255.0.0.0, 255.255.0.0, and
|
||||
255.255.255.0, or network addresses using the specified netmask
|
||||
or bit count.</P>
|
||||
|
||||
<P>The <CODE>@LOCAL</CODE> name will allow browse data from all
|
||||
local interfaces. The <CODE>@IF(name)</CODE> name will allow
|
||||
@@ -432,10 +426,10 @@ browse packets from any hosts.</P>
|
||||
HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A>
|
||||
directive.</P>
|
||||
|
||||
<P>IP address matching supports exact matches, partial addresses that match
|
||||
networks using netmasks of 255.0.0.0, 255.255.0.0, and 255.255.255.0, or network
|
||||
addresses using the specified netmask or bit count. The <CODE>/mm</CODE>
|
||||
notation specifies a CIDR netmask, a shown in <A HREF="TABLE1">Table 1</A>.</P>
|
||||
<P>IP address matching supports exact matches, partial addresses
|
||||
that match networks using netmasks of 255.0.0.0, 255.255.0.0, and
|
||||
255.255.255.0, or network addresses using the specified netmask
|
||||
or bit count.</P>
|
||||
|
||||
<P>The <CODE>@LOCAL</CODE> name will block browse data from all
|
||||
local interfaces. The <CODE>@IF(name)</CODE> name will block
|
||||
@@ -467,7 +461,7 @@ value. Otherwise printers and classes will disappear from client
|
||||
systems between updates.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="BrowseLDAPBindDN">BrowseLDAPBindDN</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="BrowseLDAPBindDN">BrowseLDAPBindDN</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -482,7 +476,7 @@ domain name to use when listening for printer registrations. The
|
||||
default is undefined.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/Mac OS X 10.6</SPAN><A NAME="BrowseLDAPCACertFile">BrowseLDAPCACertFile</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4</SPAN><A NAME="BrowseLDAPCACertFile">BrowseLDAPCACertFile</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -496,7 +490,7 @@ BrowseLDAPCACertFile /etc/cups/ssl/certs
|
||||
authority file to use for LDAP + SSL. The default is undefined.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="BrowseLDAPDN">BrowseLDAPDN</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="BrowseLDAPDN">BrowseLDAPDN</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -511,7 +505,7 @@ domain name to use when registering local shared printers. The
|
||||
default is undefined.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="BrowseLDAPPassword">BrowseLDAPPassword</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="BrowseLDAPPassword">BrowseLDAPPassword</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -526,7 +520,7 @@ access password to use when connecting to the LDAP server. The
|
||||
default is undefined.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="BrowseLDAPServer">BrowseLDAPServer</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="BrowseLDAPServer">BrowseLDAPServer</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -557,7 +551,7 @@ additional IPP backend options to advertise with local shared
|
||||
printers. The default is to not include any options.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="BrowseLocalProtocols">BrowseLocalProtocols</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="BrowseLocalProtocols">BrowseLocalProtocols</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -740,7 +734,7 @@ the options replace any options specified by the remote server.
|
||||
The default is to not include any options.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="BrowseRemoteProtocols">BrowseRemoteProtocols</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="BrowseRemoteProtocols">BrowseRemoteProtocols</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -926,7 +920,7 @@ DataDir /usr/share/cups
|
||||
for data files.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="DefaultAuthType">DefaultAuthType</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="DefaultAuthType">DefaultAuthType</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -963,7 +957,7 @@ character set for the language specified by the client or the
|
||||
<CODE>DefaultLanguage</CODE> directive.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="DefaultEncryption">DefaultEncryption</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="DefaultEncryption">DefaultEncryption</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1001,7 +995,7 @@ language localization file exists for it. The default language
|
||||
is "en" for English.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/Mac OS X 10.6</SPAN><A NAME="DefaultPaperSize">DefaultPaperSize</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4</SPAN><A NAME="DefaultPaperSize">DefaultPaperSize</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1021,7 +1015,7 @@ of <CODE>None</CODE> tells the scheduler to not set the default paper
|
||||
size.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="DefaultPolicy">DefaultPolicy</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="DefaultPolicy">DefaultPolicy</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1037,7 +1031,7 @@ policy to use for IPP operation. The default is
|
||||
<CODE>default</CODE>.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="DefaultShared">DefaultShared</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="DefaultShared">DefaultShared</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1083,14 +1077,9 @@ printers are shared (published) by default. The default is
|
||||
address, or network that is denied access to the server.
|
||||
<CODE>Deny</CODE> directives are cummulative, so multiple
|
||||
<CODE>Deny</CODE> directives can be used to allow access for
|
||||
multiple hosts or networks.</P>
|
||||
|
||||
<P>Host and domain name matching require that you enable the <A
|
||||
HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A>
|
||||
directive.</P>
|
||||
|
||||
<P>The <CODE>/mm</CODE> notation specifies a CIDR netmask, a shown in
|
||||
<A HREF="TABLE1">Table 1</A>.</P>
|
||||
multiple hosts or networks. The <CODE>/mm</CODE> notation
|
||||
specifies a CIDR netmask, a shown in <A HREF="TABLE1">Table
|
||||
1</A>.</P>
|
||||
|
||||
<P>The <CODE>@LOCAL</CODE> name will deny access from all local
|
||||
interfaces. The <CODE>@IF(name)</CODE> name will deny access from
|
||||
@@ -1104,7 +1093,7 @@ HREF="#Location"><CODE>Location</CODE></A> or <A
|
||||
HREF="#Limit"><CODE>Limit</CODE></A> section.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/Mac OS X 10.6</SPAN><A NAME="DirtyCleanInterval">DirtyCleanInterval</A></H2>
|
||||
<H2 CLASS="title"><A NAME="DirtyCleanInterval">DirtyCleanInterval</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1117,9 +1106,7 @@ DirtyCleanInterval 0
|
||||
|
||||
<P>The <CODE>DirtyCleanInterval</CODE> directive specifies the number of
|
||||
seconds to wait before updating configuration and state files for printers,
|
||||
classes, subscriptions, and jobs. The default is 30 seconds. A value of 0
|
||||
causes the update to occur as soon as possible, typically within a few
|
||||
milliseconds.</P>
|
||||
classes, subscriptions, and jobs. The default is 30 seconds.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="DocumentRoot">DocumentRoot</A></H2>
|
||||
@@ -1195,7 +1182,7 @@ default error log file is <VAR>@CUPS_LOGDIR@/error_log</VAR>.</P>
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3/Mac OS X 10.5</SPAN><A NAME="ErrorPolicy">ErrorPolicy</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3</SPAN><A NAME="ErrorPolicy">ErrorPolicy</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1234,7 +1221,7 @@ printer.</P>
|
||||
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/Mac OS X 10.6</SPAN><A NAME="FatalErrors">FatalErrors</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4</SPAN><A NAME="FatalErrors">FatalErrors</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1496,7 +1483,7 @@ the file is assumed to be relative to the <A
|
||||
HREF="#ServerRoot"><CODE>ServerRoot</CODE></A> directory.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="JobRetryInterval">JobRetryInterval</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="JobRetryInterval">JobRetryInterval</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1514,7 +1501,7 @@ print queues whose error policy is <CODE>retry-job</CODE>. The
|
||||
default is 30 seconds.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/Mac OS X 10.6</SPAN><A NAME="JobKillDelay">JobKillDelay</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4</SPAN><A NAME="JobKillDelay">JobKillDelay</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1530,7 +1517,7 @@ wait before killing the filters and backend associated with a canceled or held
|
||||
job. The default is 30 seconds.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="JobRetryLimit">JobRetryLimit</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="JobRetryLimit">JobRetryLimit</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -1614,7 +1601,7 @@ The request type names are case-sensitive for compatibility with
|
||||
Apache.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="LimitIPP">Limit (Policy)</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="LimitIPP">Limit (Policy)</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -2265,7 +2252,7 @@ HREF="#LimitRequestBody"><CODE>LimitRequestBody</CODE></A>
|
||||
directive instead.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/Mac OS X 10.6</SPAN><A NAME="MultipleOperationTimeout">MultipleOperationTimeout</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4</SPAN><A NAME="MultipleOperationTimeout">MultipleOperationTimeout</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -2384,7 +2371,7 @@ recognized:</P>
|
||||
<P>The default is "%p %j %u %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="PassEnv">PassEnv</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="PassEnv">PassEnv</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -2403,7 +2390,7 @@ scheduler only passes the <CODE>DYLD_LIBRARY_PATH</CODE>,
|
||||
environment variables to child processes.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="Policy">Policy</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="Policy">Policy</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -2933,7 +2920,7 @@ the text that is returned. The default is
|
||||
</TABLE></DIV>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="SetEnv">SetEnv</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="SetEnv">SetEnv</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
@@ -3065,7 +3052,7 @@ to wait before an active HTTP or IPP request times out. The
|
||||
default timeout is 300 seconds.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="UseNetworkDefault">UseNetworkDefault</A></H2>
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2</SPAN><A NAME="UseNetworkDefault">UseNetworkDefault</A></H2>
|
||||
|
||||
<H3>Examples</H3>
|
||||
|
||||
|
||||
+79
-114
@@ -98,34 +98,6 @@ which can be later referenced using <code>$name</code>. The name is
|
||||
case-insensitive and can be any sequence of letters, numbers,
|
||||
and the underscore. The value can be any valid expression.</p>
|
||||
|
||||
<h3>Predefined Names</h3>
|
||||
|
||||
<p>The following <code>#define</code> names are set by the PPD compiler:</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><code>CUPS_VERSION</code> - The full CUPS version string, e.g.
|
||||
"1.4.0"</li>
|
||||
|
||||
<li><code>CUPS_VERSION_MAJOR</code> - The major version number, e.g.
|
||||
"1"</li>
|
||||
|
||||
<li><code>CUPS_VERSION_MINOR</code> - The minor version number, e.g.
|
||||
"4"</li>
|
||||
|
||||
<li><code>CUPS_VERSION_PATCH</code> - The patch version number, e.g.
|
||||
"0"</li>
|
||||
|
||||
<li><code>PLATFORM_NAME</code> - The operating system name used by the
|
||||
current system as reported by "uname" ("Windows" on Microsoft
|
||||
Windows)</li>
|
||||
|
||||
<li><code>PLATFORM_ARCH</code> - The processor architecture used by the
|
||||
current system as reported by "uname -m" ("X86" or "X64" on Microsoft
|
||||
Windows)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
<p><a href='#_include'><code>#include</code></a></p>
|
||||
@@ -380,10 +352,10 @@ least 100 files.</p>
|
||||
inclusion in a driver. The name with optional user text defines
|
||||
the name for the media size and is used with the <a
|
||||
href='#MediaSize'><code>MediaSize</code></a> directive to associate
|
||||
the media size with the driver. The name may contain up to 40 ASCII
|
||||
characters within the range of decimal 33 to decimal 126 inclusive,
|
||||
except for the characters comma (44), slash (47) and colon (58).
|
||||
The user text, if supplied, may not exceed 80 bytes in length.</p>
|
||||
the media size with the driver. The name may only contain
|
||||
letters, numbers, and the underscore and may not exceed 40
|
||||
characters in length. The user text, if supplied, may not exceed
|
||||
80 characters in length.</p>
|
||||
|
||||
<p>The width and length define the dimensions of the media. Each
|
||||
number is optionally followed by one of the following unit
|
||||
@@ -459,15 +431,17 @@ Attribute fooProfile "Photo/Photographic Profile" "photopro.icc"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Attribute</code> directive creates a PPD attribute. The
|
||||
name may contain up to 40 ASCII characters within the range of decimal
|
||||
33 to decimal 126 inclusive, except for the characters comma (44),
|
||||
slash (47) and colon (58).</p>
|
||||
name is any combination of letters, numbers, and the underscore
|
||||
and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>The selector can be the empty string (<code>""</code>) or text of up
|
||||
to 80 bytes.</p>
|
||||
<p>The selector can be the empty string (<code>""</code>), a keyword
|
||||
consisting of up to 40 letters, numbers, and the underscore, or
|
||||
a string composed of a keyword and user text of up to 80
|
||||
characters.</p>
|
||||
|
||||
<p>The value is any string or number; the string may contain multiple
|
||||
lines, however no one line may exceed 255 bytes.</p>
|
||||
<p>The value is any string or number; the string may contain
|
||||
multiple lines, however no one line may exceed 255
|
||||
characters.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -493,15 +467,14 @@ Choice "False/No" "<</cupsCompression 0>>setpagedevice"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Choice</code> directive adds a single choice to the
|
||||
current option. The name may contain up to 40 ASCII characters within
|
||||
the range of decimal 33 to decimal 126 inclusive, except for the
|
||||
characters comma (44), slash (47) and colon (58).</p>
|
||||
current option. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The code is any string and may contain multiple lines,
|
||||
however no one line may exceed 255 bytes.</p>
|
||||
however no one line may exceed 255 characters.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -567,12 +540,11 @@ ColorModel CMYK cmyk chunky 0
|
||||
|
||||
<p>The <code>ColorModel</code> directive is a convenience directive
|
||||
which creates a ColorModel option and choice for the current
|
||||
printer driver. The name may contain up to 40 ASCII characters within
|
||||
the range of decimal 33 to decimal 126 inclusive, except for the
|
||||
characters comma (44), slash (47) and colon (58).</p>
|
||||
printer driver. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The colorspace argument is one of the standard colorspace
|
||||
keywords defined later in this appendix in the section titled,
|
||||
@@ -698,7 +670,7 @@ MA 02111 USA"
|
||||
<p>The <code>Copyright</code> directive adds text comments to the
|
||||
top of a PPD file, typically for use in copyright notices. The
|
||||
text argument can contain multiple lines of text, but no line
|
||||
may exceed 255 bytes.</p>
|
||||
may exceed 255 characters.</p>
|
||||
|
||||
|
||||
<h2 class="title"><a name='CustomMedia'>CustomMedia</a></h2>
|
||||
@@ -730,12 +702,11 @@ CustomMedia "A4/A4 - 210x297mm" 210mm 297mm 12 12 12 12
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>CustomMedia</code> directive adds a custom media size to
|
||||
the driver. The name may contain up to 40 ASCII characters within the
|
||||
range of decimal 33 to decimal 126 inclusive, except for the characters
|
||||
comma (44), slash (47) and colon (58).</p>
|
||||
the driver. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The width and length arguments specify the dimensions of the
|
||||
media as defined for the <a href="#_media"><code>#media</code></a>
|
||||
@@ -748,7 +719,7 @@ printable margins of the media.</p>
|
||||
PostScript commands to run for the <code>PageSize</code> and
|
||||
<code>PageRegion</code> options, respectively. The commands can
|
||||
contain multiple lines, however no line may be more than 255
|
||||
bytes in length.</p>
|
||||
characters in length.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -824,12 +795,11 @@ therefore the darkness of the print.</p>
|
||||
the Dymo driver from 0 (lowest) to 3 (highest), with 2
|
||||
representing the normal setting.</p>
|
||||
|
||||
<p>The name may contain up to 40 ASCII characters within the range of
|
||||
decimal 33 to decimal 126 inclusive, except for the characters comma
|
||||
(44), slash (47) and colon (58).</p>
|
||||
<p>The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1046,15 +1016,14 @@ Finishing "Glossy/Photo Overcoat"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Finishing</code> directive adds a choice to the
|
||||
<code>cupsFinishing</code> option. The name may contain up to 40 ASCII
|
||||
characters within the range of decimal 33 to decimal 126 inclusive,
|
||||
except for the characters comma (44), slash (47) and colon (58).</p>
|
||||
<code>cupsFinishing</code> option. The name is any combination of
|
||||
letters, numbers, and the underscore and can be up to 40
|
||||
characters in length. The name is stored in the
|
||||
<code>OutputType</code> attribute in the PostScript page device
|
||||
dictionary.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The name is stored in the <code>OutputType</code> attribute in the
|
||||
PostScript page device dictionary.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1094,7 +1063,8 @@ Font Unicode-Foo Expert "(2.0)" Adobe-Identity ROM
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Font</code> directive defines a "device font" for the
|
||||
current printer driver. The name is the PostScript font name.</p>
|
||||
current printer driver. The name is the PostScript font
|
||||
name.</p>
|
||||
|
||||
<p>The encoding is the default encoding of the font, usually
|
||||
<code>Standard</code>, <code>Expert</code>, or <code>Special</code>, as
|
||||
@@ -1141,16 +1111,14 @@ Group "Special/Vendor Options"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>Group</code> directive specifies the group for new
|
||||
<code>Option</code> directives. The name may contain up to 40 ASCII
|
||||
characters within the range of decimal 33 to decimal 126 inclusive,
|
||||
except for the characters comma (44), slash (47) and colon (58).</p>
|
||||
<code>Option</code> directives. The name is any combination of
|
||||
letters, numbers, and the underscore and can be up to 40
|
||||
characters in length. The names <code>General</code> and
|
||||
<code>InstallableOptions</code> are predefined for the standard
|
||||
Adobe UI keywords and for installable options, respectively.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 40 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The names <code>General</code> and <code>InstallableOptions</code>
|
||||
are predefined for the standard Adobe UI keywords and for installable
|
||||
options, respectively.</p>
|
||||
<p>If provided, the text can be any string up to 40 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<center><table width='80%' border='1' bgcolor='#cccccc' cellpadding='5' cellspacing='0'>
|
||||
<tr>
|
||||
@@ -1158,8 +1126,8 @@ options, respectively.</p>
|
||||
|
||||
<p>Because of certain API binary compatibility issues,
|
||||
CUPS limits the length of PPD group translation strings
|
||||
(text) to 40 bytes, while the PPD specification
|
||||
allows for up to 80 bytes.</p>
|
||||
(text) to 40 characters, while the PPD specification
|
||||
allows for up to 80 characters.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1233,12 +1201,11 @@ from 0 to 2<sup>32</sup>-1 specifying the value that is placed
|
||||
in the <code>MediaPosition</code> attribute in the PostScript page
|
||||
device dictionary.</p>
|
||||
|
||||
<p>The name may contain up to 40 ASCII characters within the range of
|
||||
decimal 33 to decimal 126 inclusive, except for the characters comma
|
||||
(44), slash (47) and colon (58).</p>
|
||||
<p>The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1276,12 +1243,11 @@ Installable "Option1/Duplexer Installed"
|
||||
|
||||
<p>The <code>Installable</code> directive adds a new boolean option
|
||||
to the <code>InstallableOptions</code> group with a default value of
|
||||
<code>False</code>. The name may contain up to 40 ASCII characters
|
||||
within the range of decimal 33 to decimal 126 inclusive, except for
|
||||
the characters comma (44), slash (47) and colon (58).</p>
|
||||
<code>False</code>. The name is any combination of letters, numbers,
|
||||
and the underscore and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
|
||||
<h2 class="title"><a name='LocAttribute'>LocAttribute</a></h2>
|
||||
@@ -1301,15 +1267,17 @@ LocAttribute fooProfile "Photo/Photographic Profile" "photopro.icc"
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The <code>LocAttribute</code> directive creates a localized PPD
|
||||
attribute. The name may contain up to 40 ASCII characters within the
|
||||
range of decimal 33 to decimal 126 inclusive, except for the characters
|
||||
comma (44), slash (47) and colon (58).</p>
|
||||
attribute. The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length.</p>
|
||||
|
||||
<p>The selector can be the empty string (<code>""</code>) or text of up
|
||||
to 80 bytes.</p>
|
||||
<p>The selector can be the empty string (<code>""</code>), a keyword
|
||||
consisting of up to 40 letters, numbers, and the underscore, or
|
||||
a string composed of a keyword and user text of up to 80
|
||||
characters.</p>
|
||||
|
||||
<p>The value is any string or number; the string may contain multiple
|
||||
lines, however no one line may exceed 255 bytes.</p>
|
||||
<p>The value is any string or number; the string may contain
|
||||
multiple lines, however no one line may exceed 255
|
||||
characters.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1462,15 +1430,13 @@ from 0 to 2<sup>32</sup>-1 specifying the value that is placed
|
||||
in the <code>cupsMediaType</code> attribute in the PostScript page
|
||||
device dictionary.</p>
|
||||
|
||||
<p>The name may contain up to 40 ASCII characters within the range of
|
||||
decimal 33 to decimal 126 inclusive, except for the characters comma
|
||||
(44), slash (47) and colon (58).</p>
|
||||
<p>The name is any combination of letters, numbers, and the
|
||||
underscore and can be up to 40 characters in length. The name is
|
||||
placed in the <code>MediaType</code> attribute in the PostScript
|
||||
page device dictionary.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The name is placed in the <code>MediaType</code> attribute in the
|
||||
PostScript page device dictionary.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
@@ -1538,7 +1504,7 @@ name is any string of letters, numbers, spaces, and the
|
||||
characters ".", "/", "-", and "+" and should not begin with the
|
||||
manufacturer name since the PPD compiler will add this
|
||||
automatically for you. The maximum length of the name string is
|
||||
31 bytes to conform to the Adobe limits on the length of
|
||||
31 characters to conform to the Adobe limits on the length of
|
||||
<code>ShortNickName</code>.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
@@ -1604,12 +1570,11 @@ Option "fooFinish/Finishing Option" PickOne DocumentSetup 10
|
||||
|
||||
<p>The <code>Option</code> directive creates a new option in the
|
||||
current group, by default the <code>General</code> group. The name
|
||||
may contain up to 40 ASCII characters within the range of decimal 33
|
||||
to decimal 126 inclusive, except for the characters comma (44), slash
|
||||
(47) and colon (58).</p>
|
||||
is any combination of letters, numbers, and the underscore and
|
||||
can be up to 40 characters in length.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<p>The type argument is one of the following keywords:</p>
|
||||
|
||||
@@ -1756,8 +1721,8 @@ for asymmetric resolutions. The <code>HHH</code> and <code>VVV</code> in
|
||||
the examples represent the horizontal and vertical resolutions
|
||||
which must be positive integer values.</p>
|
||||
|
||||
<p>If provided, the text can be any string up to 80 bytes in length.
|
||||
If no text is provided, the name is used.</p>
|
||||
<p>If provided, the text can be any string up to 80 characters
|
||||
in length. If no text is provided, the name is used.</p>
|
||||
|
||||
<h3>See Also</h3>
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ and can be modified using your favorite text editor, you should
|
||||
normally use the <A HREF="man-lpadmin.html">lpadmin(8)</A>
|
||||
command, web interface, or any of the available GUIs to manage
|
||||
your printers instead. If you do choose to edit this file
|
||||
manually, you will need to stop the scheduler first, make your
|
||||
changes, and then start the scheduler to make them active.</P>
|
||||
manually, you will need to restart the scheduler to make them
|
||||
active.</P>
|
||||
|
||||
|
||||
<H2 CLASS="title"><A NAME="Accepting">Accepting</A></H2>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<DIV CLASS="figure"><TABLE SUMMARY="CUPS Block Diagram">
|
||||
<CAPTION>Figure 1: <A NAME="FIGURE1">CUPS Block Diagram</A></CAPTION>
|
||||
<TR><TD ALIGN="CENTER"><IMG SRC="../images/cups-block-diagram.png"
|
||||
<TR><TD ALIGN="CENTER"><IMG SRC="../images/cups-block-diagram.gif"
|
||||
WIDTH="768" HEIGHT="768" ALT="CUPS Block Diagram"></TD></TR>
|
||||
</TABLE></DIV>
|
||||
|
||||
|
||||
+56
-68
@@ -8,7 +8,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
"$Id: spec-ipp.html 8816 2009-09-14 21:41:50Z mike $"
|
||||
"$Id: spec-ipp.html 8653 2009-05-16 23:53:28Z mike $"
|
||||
|
||||
CUPS IPP specification for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -365,7 +365,7 @@ Print-Job request:
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies one or more authentication values as specified by the "auth-info-required" attribute.
|
||||
|
||||
@@ -472,7 +472,7 @@ Create-Job request:
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies one or more authentication values as specified by the "auth-info-required" attribute.
|
||||
|
||||
@@ -558,7 +558,7 @@ job as well.
|
||||
<h4>Cancel-Job Request</h4>
|
||||
|
||||
<p>The following groups of attributes are supplied as part of the
|
||||
Cancel-Job request:
|
||||
Set-Job-Attributes request:
|
||||
|
||||
<p>Group 1: Operation Attributes
|
||||
|
||||
@@ -577,7 +577,7 @@ Cancel-Job request:
|
||||
<dd>The client MUST supply a URI for the specified printer and
|
||||
a job ID number, or the job URI.
|
||||
|
||||
<dt><span class="info">CUPS 1.4/Mac OS X 10.6</span>"purge-job" (boolean):
|
||||
<dt><span class="info">CUPS 1.4</span>"purge-job" (boolean):
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute. When true,
|
||||
all job files (history and document) are purged. The default
|
||||
@@ -632,18 +632,7 @@ Purge-Jobs request:
|
||||
<dd>The client MUST supply a URI for the specified printer or
|
||||
"ipp://.../printers" for all printers and classes.
|
||||
|
||||
<dt><span class="info">CUPS 1.2/Mac OS X 10.5</span>"requesting-user-name" (name(MAX)):
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to specify whose jobs
|
||||
jobs are purged or canceled.
|
||||
|
||||
<dt><span class="info">CUPS 1.2/Mac OS X 10.5</span>"my-jobs" (boolean):
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to specify that only
|
||||
the jobs owned by the requesting user are purged or canceled. The
|
||||
default is false.
|
||||
|
||||
<dt><span class="info">CUPS 1.2/Mac OS X 10.5</span>"purge-jobs" (boolean):
|
||||
<dt><span class="info">CUPS 1.2</span>"purge-jobs" (boolean):
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to specify
|
||||
whether the jobs are purged (true) or just canceled (false).
|
||||
@@ -754,7 +743,7 @@ Response:
|
||||
|
||||
</dl>
|
||||
|
||||
<h3 class='title'><span class='info'>CUPS 1.2/Mac OS X 10.5</span><a
|
||||
<h3 class='title'><span class='info'>CUPS 1.2</span><a
|
||||
name='CREATE_PRINTER_SUBSCRIPTION'>Create-Printer-Subscription</a></h3>
|
||||
|
||||
<p>The Create-Printer-Subscription operation (0x0016) creates a
|
||||
@@ -926,7 +915,7 @@ CUPS-Get-Printers request:
|
||||
attributes as described in section 3.1.4.1 of the IPP Model and
|
||||
Semantics document.
|
||||
|
||||
<dt>"first-printer-name" (name(127)):<span class='info'>CUPS 1.2/Mac OS X 10.5</span>
|
||||
<dt>"first-printer-name" (name(127)):<span class='info'>CUPS 1.2</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to
|
||||
select the first printer that is returned.
|
||||
@@ -960,7 +949,7 @@ CUPS-Get-Printers request:
|
||||
responds as if this attribute had been supplied with a value of
|
||||
'all'.
|
||||
|
||||
<dt>"requested-user-name" (name(127)) : <span class='info'>CUPS 1.2/Mac OS X 10.5</span>
|
||||
<dt>"requested-user-name" (name(127)) : <span class='info'>CUPS 1.2</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a user name that is used to filter
|
||||
the returned printers.
|
||||
@@ -1027,7 +1016,7 @@ CUPS-Add-Modify-Printer request:
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>"auth-info-required" (1setOf type2 keyword):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"auth-info-required" (1setOf type2 keyword):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies one or more authentication keywords that are required to communicate with the printer/remote queue.
|
||||
|
||||
@@ -1190,7 +1179,7 @@ CUPS-Get-Classes request:
|
||||
attributes as described in section 3.1.4.1 of the IPP Model and
|
||||
Semantics document.
|
||||
|
||||
<dt>"first-printer-name" (name(127)):<span class='info'>CUPS 1.2/Mac OS X 10.5</span>
|
||||
<dt>"first-printer-name" (name(127)):<span class='info'>CUPS 1.2</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to
|
||||
select the first printer that is returned.
|
||||
@@ -1220,7 +1209,7 @@ CUPS-Get-Classes request:
|
||||
interested. If the client omits this attribute, the server responds as
|
||||
if this attribute had been supplied with a value of 'all'.
|
||||
|
||||
<dt>"requested-user-name" (name(127)) : <span class='info'>CUPS 1.2/Mac OS X 10.5</span>
|
||||
<dt>"requested-user-name" (name(127)) : <span class='info'>CUPS 1.2</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a user name that is used to filter
|
||||
the returned printers.
|
||||
@@ -1287,7 +1276,7 @@ CUPS-Add-Modify-Class request:
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>"auth-info-required" (1setOf type2 keyword):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"auth-info-required" (1setOf type2 keyword):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies one or more authentication keywords that are required to communicate with the printer/remote queue.
|
||||
|
||||
@@ -1586,14 +1575,14 @@ CUPS-Get-Devices request:
|
||||
<dd>The client OPTIONALLY supplies a device class keyword to select
|
||||
which devices are returned.
|
||||
|
||||
<dt>"exclude-schemes" (1setOf name) :<span class='info'>CUPS 1.4/Mac OS X 10.6</span>
|
||||
<dt>"exclude-schemes" (1setOf name) :<span class='info'>CUPS 1.4</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a set of scheme names that the
|
||||
requestor does not want to discover. If the client omits this attribute,
|
||||
the server responds with devices of all schemes specified by
|
||||
the "include-schemes" attribute.
|
||||
|
||||
<dt>"include-schemes" (1setOf name) :<span class='info'>CUPS 1.4/Mac OS X 10.6</span>
|
||||
<dt>"include-schemes" (1setOf name) :<span class='info'>CUPS 1.4</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a set of scheme names that the
|
||||
requestor wants to discover. If the client omits this attribute,
|
||||
@@ -1612,10 +1601,10 @@ CUPS-Get-Devices request:
|
||||
the client omits this attribute, the server responds as if this
|
||||
attribute had been supplied with a value of 'all'.
|
||||
|
||||
<dt>"timeout" (integer (1:MAX)) :<span class='info'>CUPS 1.4/Mac OS X 10.6</span>
|
||||
<dt>"timeout" (integer (1:MAX)) :<span class='info'>CUPS 1.4</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies this attribute to limit the duration
|
||||
of the lookup. The default timeout is 15 seconds.
|
||||
<dd>The client OPTIONALLY supplies this attribute limiting the number of
|
||||
devices that are returned.
|
||||
|
||||
</dl>
|
||||
|
||||
@@ -1669,14 +1658,14 @@ CUPS-Get-PPDs request:
|
||||
attributes as described in section 3.1.4.1 of the IPP Model and
|
||||
Semantics document.
|
||||
|
||||
<dt>"exclude-schemes" (1setOf name) :<span class='info'>CUPS 1.4/Mac OS X 10.6</span>
|
||||
<dt>"exclude-schemes" (1setOf name) :<span class='info'>CUPS 1.4</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a set of scheme names that the
|
||||
requestor does not want to list. If the client omits this attribute,
|
||||
the server responds with PPDs of all schemes specified by the
|
||||
"include-schemes" attribute.
|
||||
|
||||
<dt>"include-schemes" (1setOf name) :<span class='info'>CUPS 1.4/Mac OS X 10.6</span>
|
||||
<dt>"include-schemes" (1setOf name) :<span class='info'>CUPS 1.4</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a set of scheme names that the
|
||||
requestor wants to list. If the client omits this attribute, the server
|
||||
@@ -1691,27 +1680,27 @@ CUPS-Get-PPDs request:
|
||||
|
||||
<dd>The client OPTIONALLY supplies a printer manufacturer to select which PPDs are returned.
|
||||
|
||||
<dt>"ppd-make-and-model" (text(127)):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"ppd-make-and-model" (text(127)):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a make and model to select which PPDs are returned.
|
||||
|
||||
<dt>"ppd-model-number" (integer):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"ppd-model-number" (integer):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a model number to select which PPDs are returned.
|
||||
|
||||
<dt>"ppd-natural-language" (naturalLanguage):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"ppd-natural-language" (naturalLanguage):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a language to select which PPDs are returned.
|
||||
|
||||
<dt>"ppd-product" (text(127)):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"ppd-product" (text(127)):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a PostScript product string to select which PPDs are returned.
|
||||
|
||||
<dt>"ppd-psversion" (text(127)):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"ppd-psversion" (text(127)):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a PostScript version string to select which PPDs are returned.
|
||||
|
||||
<dt>"ppd-type" (type1 keyword):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"ppd-type" (type1 keyword):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a driver type to select which PPDs are returned.
|
||||
|
||||
@@ -1813,7 +1802,7 @@ CUPS-Move-Job Response:
|
||||
|
||||
</dl>
|
||||
|
||||
<h3 class='title'><span class='info'>CUPS 1.2/Mac OS X 10.5</span><a name='CUPS_AUTHENTICATE_JOB'>CUPS-Authenticate-Job Operation</a></h3>
|
||||
<h3 class='title'><span class='info'>CUPS 1.2</span><a name='CUPS_AUTHENTICATE_JOB'>CUPS-Authenticate-Job Operation</a></h3>
|
||||
|
||||
<p>The CUPS-Authenticate-Job operation (0x400E) authenticates a print job for
|
||||
printing, releasing the job if it is held. Typically this is used when printing
|
||||
@@ -1848,11 +1837,11 @@ CUPS-Authenticate-Job request:
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies one or more authentication values as specified by the "auth-info-required" attribute.
|
||||
|
||||
<dt>"job-hold-until" (keyword | name(MAX)):<span class='info'>CUPS 1.3/Mac OS X 10.5</span>
|
||||
<dt>"job-hold-until" (keyword | name(MAX)):<span class='info'>CUPS 1.3</span>
|
||||
|
||||
<dd>The client OPTIONALLY supplies a new job-hold-until value for the
|
||||
job. If specified and not the "no-hold" value, the job is held instead
|
||||
@@ -1891,7 +1880,7 @@ CUPS-Authenticate-Job Response:
|
||||
|
||||
</dl>
|
||||
|
||||
<h3 class='title'><span class='info'>CUPS 1.3/Mac OS X 10.5</span><a name='CUPS_GET_PPD'>CUPS-Get-PPD Operation</a></h3>
|
||||
<h3 class='title'><span class='info'>CUPS 1.3</span><a name='CUPS_GET_PPD'>CUPS-Get-PPD Operation</a></h3>
|
||||
|
||||
<p>The CUPS-Get-PPD operation (0x400F) gets a PPD file from the
|
||||
server. The PPD file can be specified using a <tt>ppd-name</tt>
|
||||
@@ -1961,7 +1950,7 @@ CUPS-Get-PPD Response:
|
||||
<p>If the status code is <tt>successful-ok</tt>, the PPD file follows
|
||||
the end of the IPP response.</p>
|
||||
|
||||
<h3 class='title'><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='CUPS_GET_DOCUMENT'>CUPS-Get-Document Operation</a></h3>
|
||||
<h3 class='title'><span class='info'>CUPS 1.4</span><a name='CUPS_GET_DOCUMENT'>CUPS-Get-Document Operation</a></h3>
|
||||
|
||||
<p>The CUPS-Get-Document operation (0x4027) gets a document file from a
|
||||
job on the server. The document file is specified using the
|
||||
@@ -2078,7 +2067,7 @@ one of the following:
|
||||
|
||||
</ul>
|
||||
|
||||
<h4><a name="device-id">device-id (text(127))</a><span class="info">CUPS 1.2/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="device-id">device-id (text(127))</a><span class="info">CUPS 1.2</span></h4>
|
||||
|
||||
<p>The device-id attribute specifies the IEEE-1284 device ID
|
||||
string for the device.</p>
|
||||
@@ -2088,7 +2077,7 @@ string for the device.</p>
|
||||
<p>The device-info attribute specifies a human-readable string describing
|
||||
the device, e.g. "Parallel Port #1".
|
||||
|
||||
<h4><a name="device-location">device-location (text(127))</a><span class="info">CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="device-location">device-location (text(127))</a><span class="info">CUPS 1.4</span></h4>
|
||||
|
||||
<p>The device-location attribute specifies the physical location of the
|
||||
printer.
|
||||
@@ -2148,7 +2137,7 @@ of the device-class attribute:
|
||||
|
||||
<h3 class='title'><a name='JOB_TEMPLATE_ATTRIBUTES'>Job Template Attributes</a></h3>
|
||||
|
||||
<h4><a name="auth-info">auth-info (1setOf text(MAX))</a><span class="info">CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="auth-info">auth-info (1setOf text(MAX))</a><span class="info">CUPS 1.3</span></h4>
|
||||
|
||||
<p>The auth-info attribute specifies the authentication information to use when printing to a remote device. The order and content of each text value is specifed by the <a href="#auth-info-required">auth-info-required</a> printer attribute.
|
||||
|
||||
@@ -2190,7 +2179,7 @@ supported. The default value is 10.
|
||||
<p>The document-count attribute specifies the number of documents that
|
||||
are present in the job.
|
||||
|
||||
<h4><a name="fit-to-page">fit-to-page (boolean)</a><span class="info">CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="fit-to-page">fit-to-page (boolean)</a><span class="info">CUPS 1.4</span></h4>
|
||||
|
||||
<p>The fit-to-page attribute specifies whether to scale documents to fit on the
|
||||
selected media (fit-to-page=true) or use the physical size specified in the
|
||||
@@ -2245,17 +2234,17 @@ Universal Coordinated Time (UTC) and <i>not</i> in the local time zone. If the
|
||||
specified time is less than the current time, the job is held until the
|
||||
next day.
|
||||
|
||||
<h4><a name="job-media-progress">job-media-progress (integer(0:100))</a><span class='info'>CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="job-media-progress">job-media-progress (integer(0:100))</a><span class='info'>CUPS 1.4</span></h4>
|
||||
|
||||
<p>The job-media-progress attribute specifies the percentage of completion of
|
||||
the current page. It is only valid when the job-state attribute has the
|
||||
"processing" value (5).</p>
|
||||
|
||||
<h4><a name="job-printer-state-message">job-printer-state-message (text(MAX))</a><span class='info'>CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="job-printer-state-message">job-printer-state-message (text(MAX))</a><span class='info'>CUPS 1.3</span></h4>
|
||||
|
||||
<p>The job-printer-state-message attribute provides the last known value of the printer-state-message attribute for the printer that processed (or is processing) the job.</p>
|
||||
|
||||
<h4><a name="job-printer-state-reasons">job-printer-state-reasons (1setOf type2 keyword)</a><span class='info'>CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="job-printer-state-reasons">job-printer-state-reasons (1setOf type2 keyword)</a><span class='info'>CUPS 1.3</span></h4>
|
||||
|
||||
<p>The job-printer-state-reasons attribute provides the last known value of the printer-state-reasons attribute for the printer that processed (or is processing) the job.</p>
|
||||
|
||||
@@ -2477,7 +2466,7 @@ name of the PPD file (the NickName attribute in the PPD file). If the
|
||||
make and model is not specified in the PPD file then the ModelName or
|
||||
ShortNickName attributes are used instead.
|
||||
|
||||
<h4><a name="ppd-model-number">ppd-model-number (integer)</a><span class="info">CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="ppd-model-number">ppd-model-number (integer)</a><span class="info">CUPS 1.3</span></h4>
|
||||
|
||||
<p>The ppd-model-number attribute provides the <tt>cupsModelNumber</tt> value from the PPD file.
|
||||
|
||||
@@ -2495,11 +2484,11 @@ language is unknown or undefined then "en" (English) is assumed.
|
||||
|
||||
<p>The ppd-product attribute specifies the Product attribute values in the PPD file.
|
||||
|
||||
<h4><a name="ppd-psversion">ppd-psversion (1setOf text(127))</a><span class="info">CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="ppd-psversion">ppd-psversion (1setOf text(127))</a><span class="info">CUPS 1.3</span></h4>
|
||||
|
||||
<p>The ppd-product attribute specifies the PSVersion attribute values in the PPD file.
|
||||
|
||||
<h4><a name="ppd-type">ppd-type (type1 keyword)</a><span class="info">CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="ppd-type">ppd-type (type1 keyword)</a><span class="info">CUPS 1.3</span></h4>
|
||||
|
||||
<p>The ppd-type attribute specifies the type of driver described by the PPD file:</p>
|
||||
|
||||
@@ -2520,7 +2509,7 @@ language is unknown or undefined then "en" (English) is assumed.
|
||||
|
||||
<h3 class='title'><a name='PRINTER_ATTRIBUTES'>Printer Attributes</a></h3>
|
||||
|
||||
<h4><a name="auth-info-required">auth-info-required (1setOf type2 keyword)</a><span class="info">CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="auth-info-required">auth-info-required (1setOf type2 keyword)</a><span class="info">CUPS 1.3</span></h4>
|
||||
|
||||
<p>The auth-info-required attribute specifies the authentication information that is required for printing a job. The following keywords are recognized:</p>
|
||||
|
||||
@@ -2560,51 +2549,50 @@ the system.
|
||||
<p>The job-sheets-supported attribute specifies the available banner files.
|
||||
There will always be at least one banner file available called "none".
|
||||
|
||||
<h4><a name="marker-change-time">marker-change-time (integer)</a><span class='info'>CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="marker-change-time">marker-change-time (integer)</a><span class='info'>CUPS 1.3</span></h4>
|
||||
|
||||
<p>The marker-change-time attribute specifies the printer-up-time value when
|
||||
the last change to the marker-colors, marker-levels, marker-message,
|
||||
marker-names, or marker-types attributes was made.</p>
|
||||
|
||||
<h4><a name="marker-colors">marker-colors (1setof name(MAX))</a><span class='info'>CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="marker-colors">marker-colors (1setof name(MAX))</a><span class='info'>CUPS 1.3</span></h4>
|
||||
|
||||
<p>The marker-colors attribute specifies the color(s) for each supply in the
|
||||
printer. It is only available when the driver provides supply levels. The
|
||||
color is either "none" or one or more hex-encoded sRGB colors of the form
|
||||
"#RRGGBB".</p>
|
||||
|
||||
<h4><a name="marker-high-levels">marker-high-levels (1setof integer(0:100))</a><span class='info'>CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="marker-high-levels">marker-high-levels (1setof integer(0:100))</a><span class='info'>CUPS 1.4</span></h4>
|
||||
|
||||
<p>The marker-high-levels attribute specifies the supply levels that indicate
|
||||
a near-full condition. A value of 100 should be used for supplies that are
|
||||
consumed/emptied, e.g. ink cartridges.</p>
|
||||
|
||||
<h4><a name="marker-levels">marker-levels (1setof integer(-3:100))</a><span class='info'>CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="marker-levels">marker-levels (1setof integer(-1:100))</a><span class='info'>CUPS 1.3</span></h4>
|
||||
|
||||
<p>The marker-levels attribute specifies the current supply levels for the
|
||||
printer. It is only available when the driver provides supply levels. A
|
||||
value of -1 indicates the level is unavailable, -2 indicates unknown, and -3
|
||||
indicates the level is unknown but has not yet reached capacity. Values from 0
|
||||
to 100 indicate the corresponding percentage.</p>
|
||||
value of -1 indicates the level is unknown, while values from 0 to 100
|
||||
indicate the corresponding percentage.</p>
|
||||
|
||||
<h4><a name="marker-low-levels">marker-low-levels (1setof integer(0:100))</a><span class='info'>CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="marker-low-levels">marker-low-levels (1setof integer(0:100))</a><span class='info'>CUPS 1.4</span></h4>
|
||||
|
||||
<p>The marker-low-levels attribute specifies the supply levels that indicate
|
||||
a near-empty condition. A value of 0 should be used for supplies that are
|
||||
filled, e.g. waste ink tanks.</p>
|
||||
|
||||
<h4><a name="marker-message">marker-message (text(MAX))</a><span class='info'>CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="marker-message">marker-message (text(MAX))</a><span class='info'>CUPS 1.4</span></h4>
|
||||
|
||||
<p>The marker-message attribute provides a human-readable status message
|
||||
for the current supply levels, e.g. "12 pages of ink remaining." It is only
|
||||
available when the driver provides supply levels.</p>
|
||||
|
||||
<h4><a name="marker-names">marker-names (1setof name(MAX))</a><span class='info'>CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="marker-names">marker-names (1setof name(MAX))</a><span class='info'>CUPS 1.3</span></h4>
|
||||
|
||||
<p>The marker-names attribute specifies the name(s) for each supply in the
|
||||
printer. It is only available when the driver provides supply levels.</p>
|
||||
|
||||
<h4><a name="marker-types">marker-types (1setof type3 keyword)</a><span class='info'>CUPS 1.3/Mac OS X 10.5</span></h4>
|
||||
<h4><a name="marker-types">marker-types (1setof type3 keyword)</a><span class='info'>CUPS 1.3</span></h4>
|
||||
|
||||
<p>The marker-types attribute specifies the type(s) of each supply in the
|
||||
printer. It is only available when the driver provides supply levels. The
|
||||
@@ -2683,13 +2671,13 @@ to this printer. The default port monitor is "none".
|
||||
|
||||
<p>The port-monitor-supported attribute specifies the available port monitors.
|
||||
|
||||
<h4><a name="printer-commands">printer-commands (1setOf Type3 keyword)</a><span class='info'>CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="printer-commands">printer-commands (1setOf Type3 keyword)</a><span class='info'>CUPS 1.4</span></h4>
|
||||
|
||||
<p>The printer-commands attribute specifies the commands that are supported
|
||||
by the CUPS command file filter. The keyword "none" indicates that no commands
|
||||
are supported.</p>
|
||||
|
||||
<h4><a name="printer-dns-sd-name">printer-dns-sd-name (name(MAX) | noValue)</a><span class='info'>CUPS 1.4/Mac OS X 10.6</span></h4>
|
||||
<h4><a name="printer-dns-sd-name">printer-dns-sd-name (name(MAX) | noValue)</a><span class='info'>CUPS 1.4</span></h4>
|
||||
|
||||
<p>The printer-dns-sd-name attribute specifies the registered DNS-SD service
|
||||
name for the printer. If the printer is not being shared using this protocol,
|
||||
@@ -2709,10 +2697,10 @@ and the following CUPS-specific keywords:</p>
|
||||
permissions. CUPS will not execute programs with world write permissions
|
||||
or setuid programs. When run as root (the default), CUPS also does not
|
||||
execute programs that are not owned by root.
|
||||
<span class='info'>CUPS 1.4/Mac OS X 10.6</span></li>
|
||||
<span class='info'>CUPS 1.4</span></li>
|
||||
|
||||
<li><tt>cups-missing-filter-warning</tt> - a filter or backend is not
|
||||
installed. <span class='info'>CUPS 1.4/Mac OS X 10.6</span></li>
|
||||
installed. <span class='info'>CUPS 1.4</span></li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
+27
-27
@@ -8,7 +8,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
"$Id: spec-ppd.html 8673 2009-05-22 17:34:15Z mike $"
|
||||
"$Id: spec-ppd.html 8628 2009-05-13 22:25:34Z mike $"
|
||||
|
||||
CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
|
||||
|
||||
@@ -212,7 +212,7 @@ function is applied <i>after</i> the CMY transformation:</p>
|
||||
</pre>
|
||||
|
||||
|
||||
<h3><span class='info'>Mac OS X 10.3/CUPS 1.2/Mac OS X 10.5</span><a name='cupsICCProfile'>cupsICCProfile</a></h3>
|
||||
<h3><span class='info'>Mac OS X 10.3/CUPS 1.2</span><a name='cupsICCProfile'>cupsICCProfile</a></h3>
|
||||
|
||||
<p class='summary'>*cupsICCProfile
|
||||
ColorModel.MediaType.Resolution/Description: "filename"</p>
|
||||
@@ -395,7 +395,7 @@ The same <tt>cupsUIResolver</tt> can be used by multiple
|
||||
|
||||
</blockquote>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
|
||||
|
||||
<p class='summary'>*cupsUIConstraints resolver: "*Keyword1 *Keyword2 ..."<br>
|
||||
*cupsUIConstraints resolver: "*Keyword1 OptionKeyword1 *Keyword2 ..."<br>
|
||||
@@ -428,7 +428,7 @@ choice followed by testing each option choice to resolve the conflict.</p>
|
||||
*cupsUIConstraints photo: "*OutputMode Photo *MediaType Transparency *Resolution 1200dpi"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
|
||||
|
||||
<p class='summary'>*cupsUIResolution resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
|
||||
|
||||
@@ -1058,7 +1058,7 @@ PRE B {
|
||||
<p>The CUPS media attributes allow drivers to specify alternate custom page
|
||||
size limits based on up to two options.</p>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
|
||||
|
||||
<p class='summary'>*cupsMediaQualifier2: MainKeyword</p>
|
||||
|
||||
@@ -1077,7 +1077,7 @@ custom page size limits.</p>
|
||||
*cupsMinSize ..Photo: "300 300"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
|
||||
|
||||
<p class='summary'>*cupsMediaQualifier3: MainKeyword</p>
|
||||
|
||||
@@ -1096,7 +1096,7 @@ custom page size limits.</p>
|
||||
*cupsMinSize ..Photo: "300 300"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsMinSize'>cupsMinSize</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsMinSize'>cupsMinSize</a></h3>
|
||||
|
||||
<p class='summary'>*cupsMinSize .Qualifier2.Qualifier3: "width length"<br>
|
||||
*cupsMinSize .Qualifier2.: "width length"<br>
|
||||
@@ -1119,7 +1119,7 @@ are used to identify options to use for matching.</p>
|
||||
*cupsMinSize ..Photo: "300 300"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
|
||||
|
||||
<p class='summary'>*cupsMaxSize .Qualifier2.Qualifier3: "width length"<br>
|
||||
*cupsMaxSize .Qualifier2.: "width length"<br>
|
||||
@@ -1145,7 +1145,7 @@ are used to identify options to use for matching.</p>
|
||||
|
||||
<h2 class='title'><a name='ATTRIBUTES'>General Attributes</a></h2>
|
||||
|
||||
<h3><span class='info'>CUPS 1.3/Mac OS X 10.5</span><a name='cupsBackSide'>cupsBackSide</a></h3>
|
||||
<h3><span class='info'>CUPS 1.3</span><a name='cupsBackSide'>cupsBackSide</a></h3>
|
||||
|
||||
<p class='summary'>*cupsBackSide: keyword</p>
|
||||
|
||||
@@ -1241,7 +1241,7 @@ will be ignored.</p>
|
||||
<p>Also see the related <a href='#APDuplexRequiresFlippedMargin'><tt>APDuplexRequiresFlippedMargin</tt></a>
|
||||
attribute.</p>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsCommands'>cupsCommands</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsCommands'>cupsCommands</a></h3>
|
||||
|
||||
<p class='summary'>*cupsCommands: "name name2 ... nameN"</p>
|
||||
|
||||
@@ -1257,7 +1257,7 @@ by whitespace.</p>
|
||||
</pre>
|
||||
|
||||
|
||||
<h3><span class='info'>CUPS 1.3/Mac OS X 10.5</span><a name='cupsEvenDuplex'>cupsEvenDuplex</a></h3>
|
||||
<h3><span class='info'>CUPS 1.3</span><a name='cupsEvenDuplex'>cupsEvenDuplex</a></h3>
|
||||
|
||||
<p class='summary'>*cupsEvenDuplex: boolean</p>
|
||||
|
||||
@@ -1341,7 +1341,7 @@ Ghostscript can use:</p>
|
||||
*cupsFlipDuplex: true
|
||||
</pre></blockquote>
|
||||
|
||||
<h3><span class='info'>CUPS 1.3/Mac OS X 10.5</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
|
||||
<h3><span class='info'>CUPS 1.3</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
|
||||
|
||||
<p class='summary'>*cupsIPPFinishings number/text: "*Option Choice ..."</p>
|
||||
|
||||
@@ -1357,7 +1357,7 @@ values to PPD options and choices.</p>
|
||||
*cupsIPPFinishings 21/staple-bottom-left: "*StapleLocation SingleLandscape"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.3/Mac OS X 10.5</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
|
||||
<h3><span class='info'>CUPS 1.3</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
|
||||
|
||||
<p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p>
|
||||
|
||||
@@ -1401,7 +1401,7 @@ http://www.vendor.com/help"
|
||||
*End
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.2/Mac OS X 10.5</span><a name='cupsLanguages'>cupsLanguages</a></h3>
|
||||
<h3><span class='info'>CUPS 1.2</span><a name='cupsLanguages'>cupsLanguages</a></h3>
|
||||
|
||||
<p class='summary'>*cupsLanguages: "locale list"</p>
|
||||
|
||||
@@ -1431,7 +1431,7 @@ hardware. The default value is <code>false</code>.</p>
|
||||
*cupsManualCopies: true
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
|
||||
|
||||
<p class='summary'>*cupsMarkerName/Name Text: ""</p>
|
||||
|
||||
@@ -1445,7 +1445,7 @@ generated by the driver to human readable text.</p>
|
||||
*cupsMarkerName cyanToner/Cyan Toner: ""
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsMarkerNotice'>cupsMarkerNotice</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsMarkerNotice'>cupsMarkerNotice</a></h3>
|
||||
|
||||
<p class='summary'>*cupsMarkerNotice: "disclaimer text"</p>
|
||||
|
||||
@@ -1474,7 +1474,7 @@ the output for a specific model of printer.</p>
|
||||
*cupsModelNumber: 1234
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.3/Mac OS X 10.5</span><a name='cupsPJLCharset'>cupsPJLCharset</a></h3>
|
||||
<h3><span class='info'>CUPS 1.3</span><a name='cupsPJLCharset'>cupsPJLCharset</a></h3>
|
||||
|
||||
<p class='summary'>*cupsPJLCharset: "ISO character set name"</p>
|
||||
|
||||
@@ -1489,7 +1489,7 @@ assumed.</p>
|
||||
*cupsPJLCharset: "UTF-8"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
|
||||
|
||||
<p class='summary'>*cupsPJLDisplay: "what"</p>
|
||||
|
||||
@@ -1508,7 +1508,7 @@ to use "@PJL RDYMSG DISPLAY". The default is "job".</p>
|
||||
*cupsPJLDisplay: "none"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.2/Mac OS X 10.5</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
|
||||
<h3><span class='info'>CUPS 1.2</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
|
||||
|
||||
<p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p>
|
||||
|
||||
@@ -1540,7 +1540,7 @@ to disable the port monitor for the given URI scheme.</p>
|
||||
*cupsPortMonitor usb/USB Status Monitor: "epson-usb"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.3/Mac OS X 10.5</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
|
||||
<h3><span class='info'>CUPS 1.3</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
|
||||
|
||||
<p class='summary'>*cupsPreFilter: "source/type cost program"</p>
|
||||
|
||||
@@ -1558,7 +1558,7 @@ before the filter that accepts the given MIME type.</p>
|
||||
*cupsPreFilter: "image/png 0 mypngprefilter"
|
||||
</pre>
|
||||
|
||||
<h3><span class='info'>CUPS 1.4/Mac OS X 10.6</span><a name='cupsSNMPSupplies'>cupsSNMPSupplies</a></h3>
|
||||
<h3><span class='info'>CUPS 1.4</span><a name='cupsSNMPSupplies'>cupsSNMPSupplies</a></h3>
|
||||
|
||||
<p class='summary'>*cupsSNMPSupplies: boolean</p>
|
||||
|
||||
@@ -1863,7 +1863,7 @@ the device.</p>
|
||||
|
||||
<h2 class='title'><a name='HISTORY'>Change History</a></h2>
|
||||
|
||||
<h3>Changes in CUPS 1.4</h3>
|
||||
<h3>Changes in CUPS 1.4</a></h3>
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -1898,7 +1898,7 @@ the device.</p>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Changes in CUPS 1.3.1</h3>
|
||||
<h3>Changes in CUPS 1.3.1</a></h3>
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -1913,7 +1913,7 @@ the device.</p>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3>Changes in CUPS 1.3</h3>
|
||||
<h3>Changes in CUPS 1.3</a></h3>
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -1932,7 +1932,7 @@ the device.</p>
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Changes in CUPS 1.2.8</h3>
|
||||
<h3>Changes in CUPS 1.2.8</a></h3>
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -1941,7 +1941,7 @@ the device.</p>
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Changes in CUPS 1.2</h3>
|
||||
<h3>Changes in CUPS 1.2</a></h3>
|
||||
|
||||
<ul>
|
||||
|
||||
@@ -1966,7 +1966,7 @@ the device.</p>
|
||||
|
||||
</ul>
|
||||
|
||||
<h3>Changes in CUPS 1.1</h3>
|
||||
<h3>Changes in CUPS 1.1</a></h3>
|
||||
|
||||
<ul>
|
||||
|
||||
|
||||
Arquivo binário não exibido.
|
Depois Largura: | Altura: | Tamanho: 41 KiB |
Arquivo binário não exibido.
|
Antes Largura: | Altura: | Tamanho: 75 KiB |
+397
-418
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
|
Antes Largura: | Altura: | Tamanho: 46 KiB Depois Largura: | Altura: | Tamanho: 37 KiB |
Arquivo binário não exibido.
|
Antes Largura: | Altura: | Tamanho: 146 KiB |
+1
-2
@@ -164,9 +164,8 @@ install-libs: $(INSTALLSTATIC)
|
||||
|
||||
installstatic:
|
||||
$(INSTALL_DIR) -m 755 $(LIBDIR)
|
||||
$(INSTALL_LIB) -m 755 libcupsdriver.a $(LIBDIR)
|
||||
$(INSTALL_LIB) libcupsdriver.a $(LIBDIR)
|
||||
$(RANLIB) $(LIBDIR)/libcupsdriver.a
|
||||
$(CHMOD) 555 $(LIBDIR)/libcupsdriver.a
|
||||
|
||||
|
||||
#
|
||||
|
||||
+2
-3
@@ -164,9 +164,8 @@ install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
|
||||
|
||||
installstatic:
|
||||
$(INSTALL_DIR) -m 755 $(LIBDIR)
|
||||
$(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR)
|
||||
$(RANLIB) $(LIBDIR)/libcupsimage.a
|
||||
$(CHMOD) 555 $(LIBDIR)/libcupsimage.a
|
||||
$(INSTALL_LIB) libcupsimage.a $(LIBDIR);
|
||||
$(RANLIB) $(LIBDIR)/libcupsimage.a;
|
||||
|
||||
install32bit:
|
||||
$(INSTALL_DIR) -m 755 $(LIB32DIR)
|
||||
|
||||
@@ -593,7 +593,7 @@ write_banner(banner_file_t *banner, /* I - Banner file */
|
||||
printf("%.1f %.1f translate\n", PageLeft, PageBottom);
|
||||
else
|
||||
printf("%.1f %.1f translate\n", PageWidth - PageRight,
|
||||
PageLength - PageTop);
|
||||
PageLength - PageRight);
|
||||
puts("0 setgray");
|
||||
|
||||
y = info_top;
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ _cupsRasterClearError(void)
|
||||
*
|
||||
* If there are no recent errors, NULL is returned.
|
||||
*
|
||||
* @since CUPS 1.3/Mac OS X 10.5@
|
||||
* @since CUPS 1.3@
|
||||
*/
|
||||
|
||||
const char * /* O - Last error */
|
||||
|
||||
@@ -144,7 +144,7 @@ ParseCommand(FILE *fp, /* I - File to read from */
|
||||
if (!strcasecmp(name, "LB"))
|
||||
{
|
||||
bufptr = buf;
|
||||
while ((ch = getc(fp)) != StringTerminator && ch != EOF)
|
||||
while ((ch = getc(fp)) != StringTerminator)
|
||||
if (bufptr < (buf + sizeof(buf) - 1))
|
||||
*bufptr++ = ch;
|
||||
*bufptr = '\0';
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
# include <cups/string.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# ifdef WIN32
|
||||
# include <io.h>
|
||||
# else
|
||||
# include <unistd.h>
|
||||
# endif /* WIN32 */
|
||||
# include <unistd.h>
|
||||
# include <errno.h>
|
||||
# include <math.h>
|
||||
|
||||
|
||||
@@ -241,7 +241,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Child process for pstoraster... Assign new pipe input to pstoraster...
|
||||
*/
|
||||
|
||||
dup2(mypipes[0], 0);
|
||||
close(0);
|
||||
dup(mypipes[0]);
|
||||
close(mypipes[0]);
|
||||
close(mypipes[1]);
|
||||
|
||||
@@ -264,7 +265,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
* Update stdout so it points at the new pstoraster...
|
||||
*/
|
||||
|
||||
dup2(mypipes[1], 1);
|
||||
close(1);
|
||||
dup(mypipes[1]);
|
||||
close(mypipes[0]);
|
||||
close(mypipes[1]);
|
||||
|
||||
|
||||
@@ -204,15 +204,6 @@ cupsRasterInterpretPPD(
|
||||
|
||||
strcpy(h->cupsPageSizeName, "Letter");
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
* cupsInteger0 is also used for the total page count on Mac OS X; set an
|
||||
* uncommon default value so we can tell if the driver is using cupsInteger0.
|
||||
*/
|
||||
|
||||
h->cupsInteger[0] = 0x80000000;
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
* Apply patches and options to the page header...
|
||||
*/
|
||||
@@ -994,9 +985,6 @@ scan_ps(_cups_ps_stack_t *st, /* I - Stack */
|
||||
*/
|
||||
|
||||
for (cur ++; *cur && *cur != '\n' && *cur != '\r'; cur ++);
|
||||
|
||||
if (!*cur)
|
||||
cur --;
|
||||
}
|
||||
else if (!isspace(*cur & 255))
|
||||
break;
|
||||
|
||||
+71
-268
@@ -65,23 +65,13 @@ main(int argc, /* I - Number of command-line args */
|
||||
fit; /* Fit output to default page size? */
|
||||
ppd_file_t *ppd; /* PPD file */
|
||||
ppd_size_t *size; /* Current page size */
|
||||
int pdf_pid, /* Process ID for pdftops */
|
||||
pdf_argc, /* Number of args for pdftops */
|
||||
pstops_pid, /* Process ID of pstops filter */
|
||||
pstops_pipe[2], /* Pipe to pstops filter */
|
||||
wait_children, /* Number of child processes left */
|
||||
wait_pid, /* Process ID from wait() */
|
||||
wait_status, /* Status from child */
|
||||
exit_status = 0; /* Exit status */
|
||||
char *pdf_argv[100], /* Arguments for pdftops/gs */
|
||||
pdf_width[255], /* Paper width */
|
||||
pdf_height[255], /* Paper height */
|
||||
pstops_path[1024], /* Path to pstops program */
|
||||
*pstops_argv[7], /* Arguments for pstops filter */
|
||||
*pstops_options, /* Options for pstops filter */
|
||||
*pstops_start, /* Start of pstops filter option */
|
||||
*pstops_end; /* End of pstops filter option */
|
||||
const char *cups_serverbin; /* CUPS_SERVERBIN environment variable */
|
||||
int pdfpid, /* Process ID for pdftops */
|
||||
pdfwaitpid, /* Process ID from wait() */
|
||||
pdfstatus, /* Status from pdftops */
|
||||
pdfargc; /* Number of args for pdftops */
|
||||
char *pdfargv[100], /* Arguments for pdftops/gs */
|
||||
pdfwidth[255], /* Paper width */
|
||||
pdfheight[255]; /* Paper height */
|
||||
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
|
||||
struct sigaction action; /* Actions for POSIX signals */
|
||||
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
|
||||
@@ -167,112 +157,22 @@ main(int argc, /* I - Number of command-line args */
|
||||
ppdMarkDefaults(ppd);
|
||||
cupsMarkOptions(ppd, num_options, options);
|
||||
|
||||
/*
|
||||
* Build the pstops command-line...
|
||||
*/
|
||||
|
||||
if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
|
||||
cups_serverbin = CUPS_SERVERBIN;
|
||||
|
||||
snprintf(pstops_path, sizeof(pstops_path), "%s/filter/pstops",
|
||||
cups_serverbin);
|
||||
|
||||
pstops_options = strdup(argv[5]);
|
||||
|
||||
if ((pstops_start = strstr(pstops_options, "fitplot")) != NULL &&
|
||||
(!pstops_start[7] || isspace(pstops_start[7] & 255)))
|
||||
{
|
||||
/*
|
||||
* Strip [no]fitplot option...
|
||||
*/
|
||||
|
||||
pstops_end = pstops_start + 7;
|
||||
|
||||
if ((pstops_start - pstops_options) >= 2 &&
|
||||
!strncmp(pstops_start - 2, "no", 2))
|
||||
pstops_start -= 2;
|
||||
|
||||
while (*pstops_end && isspace(*pstops_end & 255))
|
||||
pstops_end ++;
|
||||
|
||||
_cups_strcpy(pstops_start, pstops_end);
|
||||
}
|
||||
|
||||
if ((pstops_start = strstr(pstops_options, "fit-to-page")) != NULL &&
|
||||
(!pstops_start[11] || isspace(pstops_start[11] & 255)))
|
||||
{
|
||||
/*
|
||||
* Strip [no]fit-to-page option...
|
||||
*/
|
||||
|
||||
pstops_end = pstops_start + 11;
|
||||
|
||||
if ((pstops_start - pstops_options) >= 2 &&
|
||||
!strncmp(pstops_start - 2, "no", 2))
|
||||
pstops_start -= 2;
|
||||
|
||||
while (*pstops_end && isspace(*pstops_end & 255))
|
||||
pstops_end ++;
|
||||
|
||||
_cups_strcpy(pstops_start, pstops_end);
|
||||
}
|
||||
|
||||
if ((pstops_start = strstr(pstops_options, "landscape")) != NULL &&
|
||||
(!pstops_start[9] || isspace(pstops_start[9] & 255)))
|
||||
{
|
||||
/*
|
||||
* Strip [no]landscape option...
|
||||
*/
|
||||
|
||||
pstops_end = pstops_start + 9;
|
||||
|
||||
if ((pstops_start - pstops_options) >= 2 &&
|
||||
!strncmp(pstops_start - 2, "no", 2))
|
||||
pstops_start -= 2;
|
||||
|
||||
while (*pstops_end && isspace(*pstops_end & 255))
|
||||
pstops_end ++;
|
||||
|
||||
_cups_strcpy(pstops_start, pstops_end);
|
||||
}
|
||||
|
||||
if ((pstops_start = strstr(pstops_options, "orientation-requested=")) != NULL)
|
||||
{
|
||||
/*
|
||||
* Strip [no]fitplot option...
|
||||
*/
|
||||
|
||||
pstops_end = pstops_start + 22;
|
||||
while (*pstops_end && !isspace(*pstops_end & 255))
|
||||
pstops_end ++;
|
||||
|
||||
_cups_strcpy(pstops_start, pstops_end);
|
||||
}
|
||||
|
||||
pstops_argv[0] = argv[0]; /* Printer */
|
||||
pstops_argv[1] = argv[1]; /* Job */
|
||||
pstops_argv[2] = argv[2]; /* User */
|
||||
pstops_argv[3] = argv[3]; /* Title */
|
||||
pstops_argv[4] = argv[4]; /* Copies */
|
||||
pstops_argv[5] = pstops_options; /* Options */
|
||||
pstops_argv[6] = NULL;
|
||||
|
||||
/*
|
||||
* Build the command-line for the pdftops or gs filter...
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PDFTOPS
|
||||
pdf_argv[0] = (char *)"pdftops";
|
||||
pdf_argc = 1;
|
||||
pdfargv[0] = (char *)"pdftops";
|
||||
pdfargc = 1;
|
||||
#else
|
||||
pdf_argv[0] = (char *)"gs";
|
||||
pdf_argv[1] = (char *)"-q";
|
||||
pdf_argv[2] = (char *)"-dNOPAUSE";
|
||||
pdf_argv[3] = (char *)"-dBATCH";
|
||||
pdf_argv[4] = (char *)"-dSAFER";
|
||||
pdf_argv[5] = (char *)"-sDEVICE=pswrite";
|
||||
pdf_argv[6] = (char *)"-sOUTPUTFILE=%stdout";
|
||||
pdf_argc = 7;
|
||||
pdfargv[0] = (char *)"gs";
|
||||
pdfargv[1] = (char *)"-q";
|
||||
pdfargv[2] = (char *)"-dNOPAUSE";
|
||||
pdfargv[3] = (char *)"-dBATCH";
|
||||
pdfargv[4] = (char *)"-dSAFER";
|
||||
pdfargv[5] = (char *)"-sDEVICE=pswrite";
|
||||
pdfargv[6] = (char *)"-sOUTPUTFILE=%stdout";
|
||||
pdfargc = 7;
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
|
||||
if (ppd)
|
||||
@@ -284,27 +184,27 @@ main(int argc, /* I - Number of command-line args */
|
||||
if (ppd->language_level == 1)
|
||||
{
|
||||
#ifdef HAVE_PDFTOPS
|
||||
pdf_argv[pdf_argc++] = (char *)"-level1";
|
||||
pdf_argv[pdf_argc++] = (char *)"-noembtt";
|
||||
pdfargv[pdfargc++] = (char *)"-level1";
|
||||
pdfargv[pdfargc++] = (char *)"-noembtt";
|
||||
#else
|
||||
pdf_argv[pdf_argc++] = (char *)"-dLanguageLevel=1";
|
||||
pdfargv[pdfargc++] = (char *)"-dLanguageLevel=1";
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
}
|
||||
else if (ppd->language_level == 2)
|
||||
{
|
||||
#ifdef HAVE_PDFTOPS
|
||||
pdf_argv[pdf_argc++] = (char *)"-level2";
|
||||
pdfargv[pdfargc++] = (char *)"-level2";
|
||||
if (!ppd->ttrasterizer)
|
||||
pdf_argv[pdf_argc++] = (char *)"-noembtt";
|
||||
pdfargv[pdfargc++] = (char *)"-noembtt";
|
||||
#else
|
||||
pdf_argv[pdf_argc++] = (char *)"-dLanguageLevel=2";
|
||||
pdfargv[pdfargc++] = (char *)"-dLanguageLevel=2";
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
}
|
||||
else
|
||||
#ifdef HAVE_PDFTOPS
|
||||
pdf_argv[pdf_argc++] = (char *)"-level3";
|
||||
pdfargv[pdfargc++] = (char *)"-level3";
|
||||
#else
|
||||
pdf_argv[pdf_argc++] = (char *)"-dLanguageLevel=3";
|
||||
pdfargv[pdfargc++] = (char *)"-dLanguageLevel=3";
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
|
||||
if ((val = cupsGetOption("fitplot", num_options, options)) == NULL)
|
||||
@@ -354,88 +254,72 @@ main(int argc, /* I - Number of command-line args */
|
||||
#ifdef HAVE_PDFTOPS
|
||||
if (orientation & 1)
|
||||
{
|
||||
snprintf(pdf_width, sizeof(pdf_width), "%.0f", size->length);
|
||||
snprintf(pdf_height, sizeof(pdf_height), "%.0f", size->width);
|
||||
snprintf(pdfwidth, sizeof(pdfwidth), "%.0f", size->length);
|
||||
snprintf(pdfheight, sizeof(pdfheight), "%.0f", size->width);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(pdf_width, sizeof(pdf_width), "%.0f", size->width);
|
||||
snprintf(pdf_height, sizeof(pdf_height), "%.0f", size->length);
|
||||
snprintf(pdfwidth, sizeof(pdfwidth), "%.0f", size->width);
|
||||
snprintf(pdfheight, sizeof(pdfheight), "%.0f", size->length);
|
||||
}
|
||||
|
||||
pdf_argv[pdf_argc++] = (char *)"-paperw";
|
||||
pdf_argv[pdf_argc++] = pdf_width;
|
||||
pdf_argv[pdf_argc++] = (char *)"-paperh";
|
||||
pdf_argv[pdf_argc++] = pdf_height;
|
||||
pdf_argv[pdf_argc++] = (char *)"-expand";
|
||||
pdfargv[pdfargc++] = (char *)"-paperw";
|
||||
pdfargv[pdfargc++] = pdfwidth;
|
||||
pdfargv[pdfargc++] = (char *)"-paperh";
|
||||
pdfargv[pdfargc++] = pdfheight;
|
||||
pdfargv[pdfargc++] = (char *)"-expand";
|
||||
|
||||
#else
|
||||
if (orientation & 1)
|
||||
{
|
||||
snprintf(pdf_width, sizeof(pdf_width), "-dDEVICEWIDTHPOINTS=%.0f",
|
||||
snprintf(pdfwidth, sizeof(pdfwidth), "-dDEVICEWIDTHPOINTS=%.0f",
|
||||
size->length);
|
||||
snprintf(pdf_height, sizeof(pdf_height), "-dDEVICEHEIGHTPOINTS=%.0f",
|
||||
snprintf(pdfheight, sizeof(pdfheight), "-dDEVICEHEIGHTPOINTS=%.0f",
|
||||
size->width);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(pdf_width, sizeof(pdf_width), "-dDEVICEWIDTHPOINTS=%.0f",
|
||||
snprintf(pdfwidth, sizeof(pdfwidth), "-dDEVICEWIDTHPOINTS=%.0f",
|
||||
size->width);
|
||||
snprintf(pdf_height, sizeof(pdf_height), "-dDEVICEHEIGHTPOINTS=%.0f",
|
||||
snprintf(pdfheight, sizeof(pdfheight), "-dDEVICEHEIGHTPOINTS=%.0f",
|
||||
size->length);
|
||||
}
|
||||
|
||||
pdf_argv[pdf_argc++] = pdf_width;
|
||||
pdf_argv[pdf_argc++] = pdf_height;
|
||||
pdfargv[pdfargc++] = pdfwidth;
|
||||
pdfargv[pdfargc++] = pdfheight;
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_PDFTOPS
|
||||
pdf_argv[pdf_argc++] = filename;
|
||||
pdf_argv[pdf_argc++] = (char *)"-";
|
||||
pdfargv[pdfargc++] = filename;
|
||||
pdfargv[pdfargc++] = (char *)"-";
|
||||
#else
|
||||
pdf_argv[pdf_argc++] = (char *)"-c";
|
||||
pdf_argv[pdf_argc++] = (char *)"save pop";
|
||||
pdf_argv[pdf_argc++] = (char *)"-f";
|
||||
pdf_argv[pdf_argc++] = filename;
|
||||
pdfargv[pdfargc++] = (char *)"-c";
|
||||
pdfargv[pdfargc++] = (char *)"save pop";
|
||||
pdfargv[pdfargc++] = (char *)"-f";
|
||||
pdfargv[pdfargc++] = filename;
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
|
||||
pdf_argv[pdf_argc] = NULL;
|
||||
pdfargv[pdfargc] = NULL;
|
||||
|
||||
/*
|
||||
* Execute "pdftops/gs | pstops"...
|
||||
*/
|
||||
|
||||
if (pipe(pstops_pipe))
|
||||
{
|
||||
_cupsLangPrintError(_("ERROR: Unable to create pipe"));
|
||||
|
||||
exit_status = 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((pdf_pid = fork()) == 0)
|
||||
if ((pdfpid = fork()) == 0)
|
||||
{
|
||||
/*
|
||||
* Child comes here...
|
||||
*/
|
||||
|
||||
dup2(pstops_pipe[1], 1);
|
||||
close(pstops_pipe[0]);
|
||||
close(pstops_pipe[1]);
|
||||
|
||||
#ifdef HAVE_PDFTOPS
|
||||
execv(CUPS_PDFTOPS, pdf_argv);
|
||||
execv(CUPS_PDFTOPS, pdfargv);
|
||||
_cupsLangPrintError(_("ERROR: Unable to execute pdftops program"));
|
||||
#else
|
||||
execv(CUPS_GHOSTSCRIPT, pdf_argv);
|
||||
execv(CUPS_GHOSTSCRIPT, pdfargv);
|
||||
_cupsLangPrintError(_("ERROR: Unable to execute gs program"));
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
|
||||
exit(1);
|
||||
}
|
||||
else if (pdf_pid < 0)
|
||||
else if (pdfpid < 0)
|
||||
{
|
||||
/*
|
||||
* Unable to fork!
|
||||
@@ -447,137 +331,56 @@ main(int argc, /* I - Number of command-line args */
|
||||
_cupsLangPrintError(_("ERROR: Unable to execute gs program"));
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
|
||||
exit_status = 1;
|
||||
goto error;
|
||||
pdfstatus = 1;
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: Started filter %s (PID %d)\n", pdf_argv[0], pdf_pid);
|
||||
|
||||
if ((pstops_pid = fork()) == 0)
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Child comes here...
|
||||
* Parent comes here...
|
||||
*/
|
||||
|
||||
dup2(pstops_pipe[0], 0);
|
||||
close(pstops_pipe[0]);
|
||||
close(pstops_pipe[1]);
|
||||
|
||||
execv(pstops_path, pstops_argv);
|
||||
_cupsLangPrintError(_("ERROR: Unable to execute pstops program"));
|
||||
|
||||
exit(1);
|
||||
}
|
||||
else if (pstops_pid < 0)
|
||||
{
|
||||
/*
|
||||
* Unable to fork!
|
||||
*/
|
||||
|
||||
_cupsLangPrintError(_("ERROR: Unable to execute pstops program"));
|
||||
|
||||
exit_status = 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
fprintf(stderr, "DEBUG: Started filter pstops (PID %d)\n", pstops_pid);
|
||||
|
||||
close(pstops_pipe[0]);
|
||||
close(pstops_pipe[1]);
|
||||
|
||||
/*
|
||||
* Wait for the child processes to exit...
|
||||
*/
|
||||
|
||||
wait_children = 2;
|
||||
|
||||
while (wait_children > 0)
|
||||
{
|
||||
/*
|
||||
* Wait until we get a valid process ID or the job is canceled...
|
||||
*/
|
||||
|
||||
while ((wait_pid = wait(&wait_status)) < 0 && errno == EINTR)
|
||||
while ((pdfwaitpid = wait(&pdfstatus)) != pdfpid && errno == EINTR)
|
||||
{
|
||||
/*
|
||||
* Wait until we get a valid process ID or the job is canceled...
|
||||
*/
|
||||
|
||||
if (job_canceled)
|
||||
{
|
||||
kill(pdf_pid, SIGTERM);
|
||||
kill(pstops_pid, SIGTERM);
|
||||
|
||||
kill(pdfpid, SIGTERM);
|
||||
job_canceled = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (wait_pid < 0)
|
||||
break;
|
||||
|
||||
wait_children --;
|
||||
|
||||
/*
|
||||
* Report child status...
|
||||
*/
|
||||
|
||||
if (wait_status)
|
||||
if (pdfstatus)
|
||||
{
|
||||
if (WIFEXITED(wait_status))
|
||||
if (WIFEXITED(pdfstatus))
|
||||
{
|
||||
exit_status = WEXITSTATUS(wait_status);
|
||||
pdfstatus = WEXITSTATUS(pdfstatus);
|
||||
|
||||
fprintf(stderr, "DEBUG: PID %d (%s) stopped with status %d!\n",
|
||||
wait_pid,
|
||||
#ifdef HAVE_PDFTOPS
|
||||
wait_pid == pdf_pid ? "pdftops" : "pstops",
|
||||
#else
|
||||
wait_pid == pdf_pid ? "gs" : "pstops",
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
exit_status);
|
||||
}
|
||||
else if (WTERMSIG(wait_status) == SIGTERM)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"DEBUG: PID %d (%s) was terminated normally with signal %d!\n",
|
||||
wait_pid,
|
||||
#ifdef HAVE_PDFTOPS
|
||||
wait_pid == pdf_pid ? "pdftops" : "pstops",
|
||||
#else
|
||||
wait_pid == pdf_pid ? "gs" : "pstops",
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
exit_status);
|
||||
_cupsLangPrintf(stderr,
|
||||
_("ERROR: pdftops filter exited with status %d!\n"),
|
||||
pdfstatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
exit_status = WTERMSIG(wait_status);
|
||||
pdfstatus = WTERMSIG(pdfstatus);
|
||||
|
||||
fprintf(stderr, "DEBUG: PID %d (%s) crashed on signal %d!\n", wait_pid,
|
||||
#ifdef HAVE_PDFTOPS
|
||||
wait_pid == pdf_pid ? "pdftops" : "pstops",
|
||||
#else
|
||||
wait_pid == pdf_pid ? "gs" : "pstops",
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
exit_status);
|
||||
_cupsLangPrintf(stderr,
|
||||
_("ERROR: pdftops filter crashed on signal %d!\n"),
|
||||
pdfstatus);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "DEBUG: PID %d (%s) exited with no errors.\n", wait_pid,
|
||||
#ifdef HAVE_PDFTOPS
|
||||
wait_pid == pdf_pid ? "pdftops" : "pstops");
|
||||
#else
|
||||
wait_pid == pdf_pid ? "gs" : "pstops");
|
||||
#endif /* HAVE_PDFTOPS */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Cleanup and exit...
|
||||
*/
|
||||
|
||||
error:
|
||||
|
||||
if (tempfile[0])
|
||||
unlink(tempfile);
|
||||
|
||||
return (exit_status);
|
||||
return (pdfstatus);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário