Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet c183ed42e7 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.2.2@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
267 arquivos alterados com 1147 adições e 8029 exclusões
+1 -180
Ver Arquivo
@@ -1,185 +1,6 @@
CHANGES.txt - 2006-10-20
CHANGES.txt - 2006-07-18
------------------------
CHANGES IN CUPS V1.2.5
- Documentation updates (STR #2038)
- The SNMP backend no longer uses IPP for Epson printers
(STR #2028)
- Updated the configure script for Tru64 UNIX 5.1 (STR
#2033)
- Tru64 5.1B's getaddrinfo() and getnameinfo() functions
leak file descriptors (STR #2034)
- cupsAddDest() didn't add the parent destination's
options and attributes.
- ppdConflicts() did not handle custom option
constraints.
- Raw printing of gzip'd files did not work (STR #2009)
- The scheduler no longer preserves default option
choices when the new PPD no longer provides the old
default choice (STR #1929)
- The Linux SCSI backend is now only built if the SCSI
development headers are installed.
- USB printing to Minolta printers did not work (STR
#2019)
- Windows clients could not monitor the queue status (STR
#2006)
- The scheduler didn't log the operation name in the
access_log file for Create-Job and Print-Job requests.
- The PostScript filter now separates collated copies
with any required JCL commands so that JCL-based
finishing options act on the individual copies and not
all of the copies as a single document.
- The PostScript filter now disables duplex printing when
printing a 1-page document.
- cups-lpd didn't pass the correct
job-originating-host-name value (STR #2023)
- Fixed some speling errors in the German message catalog
(STR #2012)
- cupstestppd did not catch PPD files with bad
UIConstraints values (STR #2016)
- The USB backend did not work with the current udev-
created printers if the first printer was disconnected
(STR #2017)
- Mirrored and rotated printing did not work with some
documents (STR #2004)
- 2-sided printing with banners did not work properly on
some printers (STR #2018)
- Updated the raw type rule to handle PJL within the
first 4k of a print job (STR #1969)
- Added an Estonian translation (STR #1957)
- Clarified the documentation for the cupsd.conf @LOCAL
and @IF(name) allow/deny functionality (STR #1992)
- The PostScript filters did not escape the Title and For
comments in the print job header (STR #1988)
- The scheduler would use 100% CPU if browsing was
disabled and the cupsd.conf file contained BrowsePoll
lines (STR #1994)
- The cupsDirRead() function did not work properly on
non-POSIX-compliant systems (STR #2001)
- The cupsFile functions didn't handle read/write errors
properly (STR #1996)
- The DBUS support now works with older versions of the
DBUS library.
CHANGES IN CUPS V1.2.4
- The --with-printcap configure option did not work (STR
#1984)
- The character set reported by cupsLangGet() did not
always reflect the default character set of a given
locale (STR #1983)
- Older Lexmark and Tektronix printers did not work with
IPP (STR #1980)
- Failsafe printing did not work (PR #6328)
- Some web interface redirects did not work (STR #1978)
- The web interface change settings button could
introduce a "Port 0" line in cupsd.conf if there was no
loopback connection available (STR #1979)
- The web interface change settings and edit
configuration file buttons would truncate the
cupsd.conf file (STR #1976)
- The German web interface used the wrong printer icon
images (STR #1973)
- The "All Documents" link in the on-line help was
missing a trailing slash (STR #1971)
- The Polish web interface translation used the wrong
URLs for the job history (STR #1963)
- The "reprint job" button did not work (STR #1956)
- The scheduler did not always report printer or job
events properly (STR #1955)
- The scheduler always stopped the queue on error,
regardless of the exit code, if the error policy was
set to "stop-printer" (STR #1959)
- ppdEmitJCL() included UTF-8 characters in the JCL job
name, which caused problems on some printers (STR
#1959)
- Fixed a buffering problem that cause high CPU usage
(STR #1968)
- The command-line applications did not convert
command-line strings to UTF-8 as needed (STR #1958)
- cupsDirRead() incorrectly aborted when reading a
symbolic link that pointed to a file/directory that did
not exist (STR #1953)
- The cupsInterpretRasterPPD() function did not handle
custom page sizes properly.
CHANGES IN CUPS V1.2.3
- The scheduler did not send job-state or
job-config-changed events when a job was held,
released, or changed (STR #1947)
- The scheduler now aborts if the configuration file and
directory checks fail (STR #1941)
- Fixed a problem with ippPort() not using the port
number that was set via the client.conf file or
CUPS_SERVER environment variable (STR #1945)
- HTTP headers were not buffered (STR #1899)
- Some IPP printers (HP) did not like UTF-8 job names
(STR #1837)
- The CUPS desktop icon is now localized for Polish (STR
#1920)
- Printer options were not always honored when printing
from Windows clients (STR #1839)
- The openssl command would lock up the scheduler when
generating an encryption certificate on some platforms
due to a lack of entropy for the random number
generator (STR #1876)
- The web admin page did not recognize that "Listen 631"
enabled remote access (STR #1908)
- The web admin page did not check whether changes were
made to the Basic Server Settings check boxes (STR
#1908)
- The IPP backend could generate N*N copies in certain
edge cases.
- The scheduler did not restore remote printers properly
when BrowseShortNames was enabled (STR #1893)
- Polling did not handle changes to the network
environment on Mac OS X (STR #1896)
- The "make test" subscription tests used invalid
notify-recipient-uri values (STR #1910)
- Printers could be left in an undefined state on system
sleep (STR #1905)
- The Berkeley and System V commands did not always use
the expected character set (STR #1915)
- Remote printing fixes (STR #1881)
- The cupstestppd utility did not validate translation
strings for custom options properly.
- Multi-language PPD files were not properly localized in
the web interface (STR #1913)
- The admin page's simple settings options did not check
for local domain socket or IPv6 addresses and did not
use "localhost" as the listen address.
- An empty BrowseProtocols, BrowseLocalProtocols, or
BrowseRemoteProtocols line would crash the scheduler
instead of disabling the corresponding browsing options.
- The scheduler now logs IPP operation status as debug
messages instead of info or error.
- cupsFileRewind() didn't clear the end-of-file state.
- cupstestppd didn't report the actual misspelling of the
1284DeviceID attribute (STR #1849)
- BrowseRelay didn't work on Debian (STR #1887)
- configure --without-languages didn't work (STR #1879)
- Manually added remote printers did not work (STR #1881)
- The <cups/backend.h> header was not installed.
- Updated the build files for Autoconf 2.60 (STR #1853)
- The scheduler incorrectly terminated the polling
processes after receiving a partial log line.
- The cups-lpd mini-daemon reported "No printer-state
attribute found" errors when reporting the queue status
(PR #6250, STR #1821)
- SNMP backend improvements (STR #1737, STR #1742, STR
#1790, STR #1835, STR #1880)
- The scheduler erroneously reported an error with the
CGI pipe (STR #1860)
- Fixed HP-UX compile problems (STR #1858, STR #1859)
- cupstestppd crashed with some PPD files (STR #1864)
- The <cups/dir.h> and <cups/file.h> header files did not
work with C++.
CHANGES IN CUPS V1.2.2
- Documentation updates (STR #1765, STR #1780)
+1 -2
Ver Arquivo
@@ -1,4 +1,4 @@
CREDITS.txt - 2006-10-02
CREDITS.txt - 2006-04-17
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
@@ -20,7 +20,6 @@ like to thank the following individuals for their contributions:
testing.
Kiko - Bug fixes.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Marek Laane - Estonian translation.
Mark Lawrence - Microsoft interoperability testing.
Jeff Licquia - Bug fixes, beta testing, evangelism.
Jason McMullan - Original CUPS RPM distributions.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v1.2.5 - 2006-10-20
INSTALL - CUPS v1.2.0 - 2006-05-08
----------------------------------
This file describes how to compile and install CUPS from source
-4
Ver Arquivo
@@ -174,16 +174,12 @@ UNINSTALL64 = @UNINSTALL64@
# We have to define these first because autoconf uses ${prefix}
# and ${exec_prefix} for most of the other directories...
#
# The "datarootdir" variable may not get defined if you are using
# a version of autoconf prior to 2.60.
#
# This is immediately followed by definition in ALL CAPS for the
# needed directories...
#
bindir = @bindir@
datadir = @datadir@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
includedir = @includedir@
infodir = @infodir@
+5 -26
Ver Arquivo
@@ -121,9 +121,8 @@ install: installhdrs
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
$(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
echo Installing LaunchDaemons configuration files...; \
echo Installing LaunchDaemons configuration file...; \
$(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
$(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
else \
echo Installing RC script...; \
$(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
@@ -221,42 +220,22 @@ uninstall:
# Run the test suite...
#
test: all
check test: all
echo Running CUPS test suite...
cd test; ./run-stp-tests.sh
check: all
echo Running CUPS test suite with defaults...
cd test; ./run-stp-tests.sh 1 0 n
#
# Make software distributions using EPM (http://www.easysw.com/epm/)...
#
EPMFLAGS = -v --output-dir dist $(EPMARCH)
EPMFLAGS = -v
aix bsd deb depot inst pkg rpm setld slackware swinstall tardist:
aix bsd deb depot inst osx pkg rpm setld slackware swinstall tardist:
epm $(EPMFLAGS) -f $@ cups packaging/cups.list
epm:
epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list
osx:
epm $(EPMFLAGS) -f osx -s packaging/installer.tif cups packaging/cups.list
.PHONEY: dist
dist: all
$(RM) -r dist
$(MAKE) $(MFLAGS) epm
case `uname` in \
*BSD*) $(MAKE) $(MFLAGS) bsd;; \
Darwin*) $(MAKE) $(MFLAGS) osx;; \
IRIX*) $(MAKE) $(MFLAGS) tardist;; \
Linux*) $(MAKE) $(MFLAGS) rpm;; \
SunOS*) $(MAKE) $(MFLAGS) pkg;; \
esac
epm $(EPMFLAGS) cups packaging/cups.list
#
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v1.2.5 - 2006-10-20
README - CUPS v1.2.0 - 2006-05-08
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
+4 -4
Ver Arquivo
@@ -45,9 +45,9 @@
* C++ magic...
*/
# ifdef __cplusplus
# ifdef _cplusplus
extern "C" {
# endif /* __cplusplus */
# endif /* _cplusplus */
/*
@@ -62,9 +62,9 @@ extern int backendGetMakeModel(const char *device_id, char *make_model,
extern ssize_t backendRunLoop(int print_fd, int device_fd, int use_bc);
# ifdef __cplusplus
# ifdef _cplusplus
}
# endif /* __cplusplus */
# endif /* _cplusplus */
#endif /* !_CUPS_BACKEND_PRIVATE_H_ */
-4
Ver Arquivo
@@ -233,8 +233,6 @@ backendGetDeviceID(
if (!strcasecmp(manufacturer, "Hewlett-Packard"))
strcpy(manufacturer, "HP");
else if (!strcasecmp(manufacturer, "Lexmark International"))
strcpy(manufacturer, "Lexmark");
}
else
{
@@ -401,8 +399,6 @@ backendGetMakeModel(
{
if (!strncasecmp(mfg, "Hewlett-Packard", 15))
strlcpy(make_model, "HP", make_model_size);
else if (!strncasecmp(mfg, "Lexmark International", 21))
strlcpy(make_model, "Lexmark", make_model_size);
else
strlcpy(make_model, mfg, make_model_size);
+19 -50
Ver Arquivo
@@ -132,13 +132,13 @@ main(int argc, /* I - Number of command-line args */
ipp_attribute_t *format_sup; /* document-format-supported */
ipp_attribute_t *printer_state; /* printer-state attribute */
ipp_attribute_t *printer_accepting; /* printer-is-accepting-jobs */
int copies, /* Number of copies for job */
copies_remaining; /* Number of copies remaining */
int copies; /* Number of copies remaining */
const char *content_type; /* CONTENT_TYPE environment variable */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
int version; /* IPP version */
int reasons; /* Number of printer-state-reasons */
static const char * const pattrs[] =
{ /* Printer attributes we want */
"copies-supported",
@@ -214,9 +214,6 @@ main(int argc, /* I - Number of command-line args */
if ((content_type = getenv("CONTENT_TYPE")) == NULL)
content_type = "application/octet-stream";
if (!strncmp(content_type, "printer/", 8))
content_type = "application/vnd.cups-raw";
/*
* Extract the hostname and printer name from the URI...
*/
@@ -739,25 +736,19 @@ main(int argc, /* I - Number of command-line args */
* See if the printer supports multiple copies...
*/
copies = atoi(argv[4]);
if (copies_sup || argc < 7)
{
copies_remaining = 1;
if (argc < 7)
copies = 1;
}
copies = 1;
else
copies_remaining = copies;
copies = atoi(argv[4]);
/*
* Then issue the print-job request...
*/
reasons = 0;
job_id = 0;
while (copies_remaining > 0)
while (copies > 0)
{
/*
* Build the IPP request...
@@ -784,13 +775,7 @@ main(int argc, /* I - Number of command-line args */
fprintf(stderr, "DEBUG: requesting-user-name = \"%s\"\n", argv[2]);
/*
* Only add a "job-name" attribute if the remote server supports
* copy generation - some IPP implementations like HP's don't seem
* to like UTF-8 job names (STR #1837)...
*/
if (argv[3][0] && copies_sup)
if (argv[3][0])
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
argv[3]);
@@ -837,9 +822,8 @@ main(int argc, /* I - Number of command-line args */
* number of copies to 1...
*/
content_type = "application/postscript";
copies = 1;
copies_remaining = 1;
content_type = "application/postscript";
copies = 1;
}
}
#endif /* __APPLE__ */
@@ -855,21 +839,20 @@ main(int argc, /* I - Number of command-line args */
num_options, &options);
}
if (copies_sup && version > 0)
if (copies_sup)
{
/*
* Only send options if the destination printer supports the copies
* attribute and IPP/1.1. This is a hack for the HP and Lexmark
* implementations of IPP, which do not accept extension attributes
* and incorrectly report a client-error-bad-request error instead of
* the successful-ok-unsupported-attributes status. In short, at least
* some HP and Lexmark implementations of IPP are non-compliant.
* attribute. This is a hack for the HP JetDirect implementation of
* IPP, which does not accept extension attributes and incorrectly
* reports a client-error-bad-request error instead of the
* successful-ok-unsupported-attributes status. In short, at least
* some HP implementations of IPP are non-compliant.
*/
cupsEncodeOptions(request, num_options, options);
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies",
copies);
atoi(argv[4]));
}
cupsFreeOptions(num_options, options);
@@ -877,7 +860,7 @@ main(int argc, /* I - Number of command-line args */
/*
* If copies aren't supported, then we are likely dealing with an HP
* JetDirect. The HP IPP implementation seems to close the connection
* after every request - that is, it does *not* implement HTTP Keep-
* after every request (that is, it does *not* implement HTTP Keep-
* Alive, which is REQUIRED by HTTP/1.1...
*/
@@ -908,18 +891,6 @@ main(int argc, /* I - Number of command-line args */
fputs("INFO: Printer is busy; retrying print job...\n", stderr);
sleep(10);
}
else if ((ipp_status == IPP_BAD_REQUEST ||
ipp_status == IPP_VERSION_NOT_SUPPORTED) && version == 1)
{
/*
* Switch to IPP/1.0...
*/
fputs("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n",
stderr);
version = 0;
httpReconnect(http);
}
else
fprintf(stderr, "ERROR: Print file was not accepted (%s)!\n",
cupsLastErrorString());
@@ -981,13 +952,13 @@ main(int argc, /* I - Number of command-line args */
if (ipp_status <= IPP_OK_CONFLICT && argc > 6)
{
fprintf(stderr, "PAGE: 1 %d\n", copies_sup ? atoi(argv[4]) : 1);
copies_remaining --;
copies --;
}
else if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
ipp_status == IPP_PRINTER_BUSY)
break;
else
copies_remaining --;
copies --;
/*
* Wait for the job to complete...
@@ -1329,8 +1300,6 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
#endif /* __APPLE__ */
exit(CUPS_BACKEND_AUTH_REQUIRED);
return (NULL); /* Eliminate compiler warning */
}
}
-1
Ver Arquivo
@@ -261,7 +261,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
/* We want to pass utf-8 characters, not re-map them (3071945) */
sanitize_title = 0;
/* Get the default timeout from a system preference... */
{
CFPropertyListRef pvalue; /* Preference value */
SInt32 toval; /* Timeout value */
+1 -5
Ver Arquivo
@@ -33,11 +33,7 @@
*/
#include "backend-private.h"
#ifdef __hpux
# include <sys/time.h>
#else
# include <sys/select.h>
#endif /* __hpux */
#include <sys/select.h>
/*
+2 -2
Ver Arquivo
@@ -80,7 +80,7 @@ void list_devices(void);
int print_device(const char *resource, int fd, int copies);
#if defined(__linux__) && defined(HAVE_SCSI_SG_H)
#ifdef __linux__
# include "scsi-linux.c"
#elif defined(__sgi)
# include "scsi-irix.c"
@@ -90,7 +90,7 @@ int print_device(const char *resource, int fd, int copies);
*/
void list_devices(void) {}
int print_device(const char *resource, int fd, int copies) { return (CUPS_BACKEND_FAILED); }
#endif /* __linux && HAVE_SCSI_SG_H */
#endif /* __linux */
/*
+32 -272
Ver Arquivo
@@ -52,7 +52,6 @@
* packed integer value.
* compare_cache() - Compare two cache entries.
* debug_printf() - Display some debugging information.
* do_request() - Do a non-blocking IPP request.
* fix_make_model() - Fix common problems in the make-and-model
* string.
* free_array() - Free an array of strings.
@@ -60,7 +59,7 @@
* get_interface_addresses() - Get the broadcast address(es) associated
* with an interface.
* hex_debug() - Output hex debugging data...
* list_device() - List a device we found...
* list_devices() - List all of the devices we found...
* open_snmp_socket() - Open the SNMP broadcast socket.
* password_cb() - Handle authentication requests.
* probe_device() - Probe a device to discover whether it is a
@@ -194,13 +193,6 @@ typedef struct snmp_packet_s /**** SNMP packet ****/
} snmp_packet_t;
/*
* Private CUPS API to set the last error...
*/
extern void _cupsSetError(ipp_status_t status, const char *message);
/*
* Local functions...
*/
@@ -246,8 +238,6 @@ static int asn1_size_oid(const int *oid);
static int asn1_size_packed(int integer);
static int compare_cache(snmp_cache_t *a, snmp_cache_t *b);
static void debug_printf(const char *format, ...);
static ipp_t *do_request(http_t *http, ipp_t *request,
const char *resource);
static void fix_make_model(char *make_model,
const char *old_make_model,
int make_model_size);
@@ -255,7 +245,7 @@ static void free_array(cups_array_t *a);
static void free_cache(void);
static http_addrlist_t *get_interface_addresses(const char *ifname);
static void hex_debug(unsigned char *buffer, size_t len);
static void list_device(snmp_cache_t *cache);
static void list_devices(void);
static int open_snmp_socket(void);
static const char *password_cb(const char *prompt);
static void probe_device(snmp_cache_t *device);
@@ -288,7 +278,6 @@ static int DeviceDescOID[] = { 1, 3, 6, 1, 2, 1, 25, 3,
static unsigned DeviceTypeRequest;
static unsigned DeviceDescRequest;
static int HostNameLookups = 0;
static int MaxRunTime = 10;
static struct timeval StartTime;
@@ -301,9 +290,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
{
int fd; /* SNMP socket */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
/*
@@ -322,23 +308,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
cupsSetPasswordCB(password_cb);
/*
* Catch SIGALRM signals...
*/
#ifdef HAVE_SIGSET
sigset(SIGALRM, alarm_handler);
#elif defined(HAVE_SIGACTION)
memset(&action, 0, sizeof(action));
sigemptyset(&action.sa_mask);
sigaddset(&action.sa_mask, SIGALRM);
action.sa_handler = alarm_handler;
sigaction(SIGALRM, &action, NULL);
#else
signal(SIGALRM, alarm_handler);
#endif /* HAVE_SIGSET */
/*
* Open the SNMP socket...
*/
@@ -360,6 +329,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
scan_devices(fd);
/*
* Display the results...
*/
list_devices();
/*
* Close, free, and return with no errors...
*/
@@ -409,7 +384,7 @@ add_cache(http_addr_t *addr, /* I - Device IP address */
debug_printf("DEBUG: add_cache(addr=%p, addrname=\"%s\", uri=\"%s\", "
"id=\"%s\", make_and_model=\"%s\")\n",
addr, addrname, uri ? uri : "(null)", id ? id : "(null)",
addr, addrname, uri ? uri : "(null)", id ? id : "(null)",
make_and_model ? make_and_model : "(null)");
temp = calloc(1, sizeof(snmp_cache_t));
@@ -427,9 +402,6 @@ add_cache(http_addr_t *addr, /* I - Device IP address */
temp->make_and_model = strdup(make_and_model);
cupsArrayAdd(Devices, temp);
if (uri)
list_device(temp);
}
@@ -446,10 +418,6 @@ alarm_handler(int sig) /* I - Signal number */
(void)sig;
#if !defined(HAVE_SIGSET) && !defined(HAVE_SIGACTION)
signal(SIGALRM, alarm_handler);
#endif /* !HAVE_SIGSET && !HAVE_SIGACTION */
if (DebugLevel)
write(2, "DEBUG: ALARM!\n", 14);
}
@@ -1259,173 +1227,6 @@ debug_printf(const char *format, /* I - Printf-style format string */
}
/*
* 'do_request()' - Do a non-blocking IPP request.
*/
static ipp_t * /* O - Response data or NULL */
do_request(http_t *http, /* I - HTTP connection to server */
ipp_t *request, /* I - IPP request */
const char *resource) /* I - HTTP resource for POST */
{
ipp_t *response; /* IPP response data */
http_status_t status; /* Status of HTTP request */
ipp_state_t state; /* State of IPP processing */
/*
* Setup the HTTP variables needed...
*/
httpClearFields(http);
httpSetLength(http, ippLength(request));
httpSetField(http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
/*
* Do the POST request...
*/
debug_printf("DEBUG: %.3f POST %s...\n", run_time(), resource);
if (httpPost(http, resource))
{
if (httpReconnect(http))
{
_cupsSetError(IPP_DEVICE_ERROR, "Unable to reconnect");
return (NULL);
}
else if (httpPost(http, resource))
{
_cupsSetError(IPP_GONE, "Unable to POST");
return (NULL);
}
}
/*
* Send the IPP data...
*/
request->state = IPP_IDLE;
status = HTTP_CONTINUE;
while ((state = ippWrite(http, request)) != IPP_DATA)
if (state == IPP_ERROR)
{
status = HTTP_ERROR;
break;
}
else if (httpCheck(http))
{
if ((status = httpUpdate(http)) != HTTP_CONTINUE)
break;
}
/*
* Get the server's return status...
*/
debug_printf("DEBUG: %.3f Getting response...\n", run_time());
while (status == HTTP_CONTINUE)
if (httpWait(http, 1000))
status = httpUpdate(http);
else
{
status = HTTP_ERROR;
http->error = ETIMEDOUT;
}
if (status != HTTP_OK)
{
/*
* Flush any error message...
*/
httpFlush(http);
response = NULL;
}
else
{
/*
* Read the response...
*/
response = ippNew();
while ((state = ippRead(http, response)) != IPP_DATA)
if (state == IPP_ERROR)
{
/*
* Delete the response...
*/
ippDelete(response);
response = NULL;
_cupsSetError(IPP_SERVICE_UNAVAILABLE, strerror(errno));
break;
}
}
/*
* Delete the original request and return the response...
*/
ippDelete(request);
if (response)
{
ipp_attribute_t *attr; /* status-message attribute */
attr = ippFindAttribute(response, "status-message", IPP_TAG_TEXT);
_cupsSetError(response->request.status.status_code,
attr ? attr->values[0].string.text :
ippErrorString(response->request.status.status_code));
}
else if (status != HTTP_OK)
{
switch (status)
{
case HTTP_NOT_FOUND :
_cupsSetError(IPP_NOT_FOUND, httpStatus(status));
break;
case HTTP_UNAUTHORIZED :
_cupsSetError(IPP_NOT_AUTHORIZED, httpStatus(status));
break;
case HTTP_FORBIDDEN :
_cupsSetError(IPP_FORBIDDEN, httpStatus(status));
break;
case HTTP_BAD_REQUEST :
_cupsSetError(IPP_BAD_REQUEST, httpStatus(status));
break;
case HTTP_REQUEST_TOO_LARGE :
_cupsSetError(IPP_REQUEST_VALUE, httpStatus(status));
break;
case HTTP_NOT_IMPLEMENTED :
_cupsSetError(IPP_OPERATION_NOT_SUPPORTED, httpStatus(status));
break;
case HTTP_NOT_SUPPORTED :
_cupsSetError(IPP_VERSION_NOT_SUPPORTED, httpStatus(status));
break;
default :
_cupsSetError(IPP_SERVICE_UNAVAILABLE, httpStatus(status));
break;
}
}
return (response);
}
/*
* 'fix_make_model()' - Fix common problems in the make-and-model string.
*/
@@ -1487,16 +1288,6 @@ fix_make_model(
_cups_strcpy(mmptr, mmptr + 7);
}
if ((mmptr = strstr(make_model, " Network")) != NULL)
{
/*
* Drop unnecessary informational text, e.g. "Xerox DocuPrint N2025
* Network LaserJet - 2.12" becomes "Xerox DocuPrint N2025"...
*/
*mmptr = '\0';
}
if ((mmptr = strchr(make_model, ',')) != NULL)
{
/*
@@ -1631,18 +1422,24 @@ hex_debug(unsigned char *buffer, /* I - Buffer */
/*
* 'list_device()' - List a device we found...
* 'list_devices()' - List all of the devices we found...
*/
static void
list_device(snmp_cache_t *cache) /* I - Cached device */
list_devices(void)
{
if (cache->uri)
printf("network %s \"%s\" \"%s %s\" \"%s\"\n",
cache->uri,
cache->make_and_model ? cache->make_and_model : "Unknown",
cache->make_and_model ? cache->make_and_model : "Unknown",
cache->addrname, cache->id ? cache->id : "");
snmp_cache_t *cache; /* Cached device */
for (cache = (snmp_cache_t *)cupsArrayFirst(Devices);
cache;
cache = (snmp_cache_t *)cupsArrayNext(Devices))
if (cache->uri)
printf("network %s \"%s\" \"%s %s\" \"%s\"\n",
cache->uri,
cache->make_and_model ? cache->make_and_model : "Unknown",
cache->make_and_model ? cache->make_and_model : "Unknown",
cache->addrname, cache->id ? cache->id : "");
}
@@ -1727,32 +1524,7 @@ probe_device(snmp_cache_t *device) /* I - Device */
debug_printf("DEBUG: %.3f Probing %s...\n", run_time(), device->addrname);
if (device->make_and_model &&
(!strncasecmp(device->make_and_model, "Epson", 5) ||
!strncasecmp(device->make_and_model, "Kyocera", 7) ||
!strncasecmp(device->make_and_model, "Lexmark", 7) ||
!strncasecmp(device->make_and_model, "Tektronix", 9) ||
!strncasecmp(device->make_and_model, "Xerox", 5)))
{
/*
* Epson, Kyocera, Lexmark, Tektronix, and Xerox printers often lock up on
* IPP probes, so exclude them from the IPP connection test...
*/
http = NULL;
}
else
{
/*
* Otherwise, try connecting for up to 1 second...
*/
alarm(1);
http = httpConnect(device->addrname, 631);
alarm(0);
}
if (http);
if ((http = httpConnect(device->addrname, 631)) != NULL)
{
/*
* IPP is supported...
@@ -1779,6 +1551,8 @@ probe_device(snmp_cache_t *device) /* I - Device */
};
debug_printf("DEBUG: %s supports IPP!\n", device->addrname);
/*
* Use non-blocking IO...
*/
@@ -1794,13 +1568,6 @@ probe_device(snmp_cache_t *device) /* I - Device */
i < (int)(sizeof(resources) / sizeof(resources[0]));
i ++)
{
/*
* Stop early if we are out of time...
*/
if (MaxRunTime > 0 && run_time() >= MaxRunTime)
break;
/*
* Don't look past /ipp if we have found a working URI...
*/
@@ -1811,14 +1578,16 @@ probe_device(snmp_cache_t *device) /* I - Device */
httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
device->addrname, 631, resources[i]);
debug_printf("DEBUG: Trying %s (num_uris=%d)\n", uri, num_uris);
request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, uri);
response = do_request(http, request, resources[i]);
response = cupsDoRequest(http, request, resources[i]);
debug_printf("DEBUG: %.3f %s %s (%s)\n", run_time(), uri,
debug_printf("DEBUG: %s %s (%s)\n", uri,
ippErrorString(cupsLastError()), cupsLastErrorString());
if (response && response->request.status.status_code == IPP_OK)
@@ -1957,7 +1726,6 @@ read_snmp_conf(const char *address) /* I - Single address to probe */
int linenum; /* Line number */
const char *cups_serverroot; /* CUPS_SERVERROOT env var */
const char *debug; /* CUPS_DEBUG_LEVEL env var */
const char *runtime; /* CUPS_MAX_RUN_TIME env var */
/*
@@ -1973,9 +1741,6 @@ read_snmp_conf(const char *address) /* I - Single address to probe */
if ((debug = getenv("CUPS_DEBUG_LEVEL")) != NULL)
DebugLevel = atoi(debug);
if ((runtime = getenv("CUPS_MAX_RUN_TIME")) != NULL)
MaxRunTime = atoi(runtime);
/*
* Find the snmp.conf file...
*/
@@ -2012,8 +1777,6 @@ read_snmp_conf(const char *address) /* I - Single address to probe */
!strcasecmp(value, "yes") ||
!strcasecmp(value, "true") ||
!strcasecmp(value, "double");
else if (!strcasecmp(line, "MaxRunTime"))
MaxRunTime = atoi(value);
else
fprintf(stderr, "ERROR: Unknown directive %s on line %d of %s!\n",
line, linenum, filename);
@@ -2312,9 +2075,7 @@ scan_devices(int fd) /* I - SNMP socket */
for (device = (snmp_cache_t *)cupsArrayFirst(Devices);
device;
device = (snmp_cache_t *)cupsArrayNext(Devices))
if (MaxRunTime > 0 && run_time() >= MaxRunTime)
break;
else if (!device->uri)
if (!device->uri)
probe_device(device);
debug_printf("DEBUG: %.3f Scan complete!\n", run_time());
@@ -2408,6 +2169,7 @@ try_connect(http_addr_t *addr, /* I - Socket address */
addr->ipv4.sin_port = htons(port);
signal(SIGALRM, alarm_handler);
alarm(1);
status = connect(fd, (void *)addr, httpAddrLength(addr));
@@ -2449,8 +2211,6 @@ update_cache(snmp_cache_t *device, /* I - Device */
device->make_and_model = strdup(make_model);
}
list_device(device);
}
+4
Ver Arquivo
@@ -340,7 +340,11 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
FD_ZERO(&input);
FD_SET(device_fd, &input);
#ifdef __hpux
if (select(device_fd + 1, (int *)&input, NULL, NULL, &timeout) > 0)
#else
if (select(device_fd + 1, &input, NULL, NULL, &timeout) > 0)
#endif /* __hpux */
{
/*
* Grab the data coming back and spit it out to stderr...
+48 -63
Ver Arquivo
@@ -79,13 +79,12 @@ print_device(const char *uri, /* I - Device URI */
do
{
/*
* Disable backchannel data when printing to Canon or Minolta USB
* printers - apparently these printers will return the IEEE-1284
* device ID over and over and over when they get a read request...
* Disable backchannel data when printing to Canon USB printers - apparently
* Canon printers will return the IEEE-1284 device ID over and over and over
* when they get a read request...
*/
use_bc = strcasecmp(hostname, "Canon") != 0 ||
strstr(hostname, "Minolta") != NULL;
use_bc = strcasecmp(hostname, "Canon") != 0;
if ((device_fd = open_device(uri, &use_bc)) == -1)
{
@@ -186,52 +185,44 @@ void
list_devices(void)
{
#ifdef __linux
int i; /* Looping var */
int fd; /* File descriptor */
char device[255], /* Device filename */
device_id[1024], /* Device ID string */
device_uri[1024], /* Device URI string */
make_model[1024]; /* Make and model */
int i; /* Looping var */
int fd; /* File descriptor */
char format[255], /* Format for device filename */
device[255], /* Device filename */
device_id[1024], /* Device ID string */
device_uri[1024], /* Device URI string */
make_model[1024]; /* Make and model */
/*
* Try to open each USB device...
* First figure out which USB printer filename to use...
*/
if (!access("/dev/usblp0", 0))
strcpy(format, "/dev/usblp%d");
else if (!access("/dev/usb/usblp0", 0))
strcpy(format, "/dev/usb/usblp%d");
else
strcpy(format, "/dev/usb/lp%d");
/*
* Then open each USB device...
*/
for (i = 0; i < 16; i ++)
{
/*
* Linux has a long history of changing the standard filenames used
* for USB printer devices. We get the honor of trying them all...
*/
sprintf(device, format, i);
sprintf(device, "/dev/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0)
if ((fd = open(device, O_RDWR | O_EXCL)) >= 0)
{
if (errno != ENOENT)
continue;
if (!backendGetDeviceID(fd, device_id, sizeof(device_id),
make_model, sizeof(make_model),
"usb", device_uri, sizeof(device_uri)))
printf("direct %s \"%s\" \"%s USB #%d\" \"%s\"\n", device_uri,
make_model, make_model, i + 1, device_id);
sprintf(device, "/dev/usb/lp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0)
{
if (errno != ENOENT)
continue;
sprintf(device, "/dev/usb/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0)
continue;
}
close(fd);
}
if (!backendGetDeviceID(fd, device_id, sizeof(device_id),
make_model, sizeof(make_model),
"usb", device_uri, sizeof(device_uri)))
printf("direct %s \"%s\" \"%s USB #%d\" \"%s\"\n", device_uri,
make_model, make_model, i + 1, device_id);
close(fd);
}
#elif defined(__sgi)
#elif defined(__sun) && defined(ECPPIOC_GETDEVID)
@@ -318,41 +309,35 @@ open_device(const char *uri, /* I - Device URI */
int i; /* Looping var */
int busy; /* Are any ports busy? */
char device[255], /* Device filename */
char format[255], /* Format for device filename */
device[255], /* Device filename */
device_id[1024], /* Device ID string */
make_model[1024], /* Make and model */
device_uri[1024]; /* Device URI string */
/*
* Find the correct USB device...
* First figure out which USB printer filename to use...
*/
if (!access("/dev/usblp0", 0))
strcpy(format, "/dev/usblp%d");
else if (!access("/dev/usb/usblp0", 0))
strcpy(format, "/dev/usb/usblp%d");
else
strcpy(format, "/dev/usb/lp%d");
/*
* Then find the correct USB device...
*/
do
{
for (busy = 0, i = 0; i < 16; i ++)
{
/*
* Linux has a long history of changing the standard filenames used
* for USB printer devices. We get the honor of trying them all...
*/
sprintf(device, format, i);
sprintf(device, "/dev/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT)
{
sprintf(device, "/dev/usb/lp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT)
{
sprintf(device, "/dev/usb/usblp%d", i);
if ((fd = open(device, O_RDWR | O_EXCL)) < 0 && errno == ENOENT)
continue;
}
}
if (fd >= 0)
if ((fd = open(device, O_RDWR | O_EXCL)) >= 0)
{
backendGetDeviceID(fd, device_id, sizeof(device_id),
make_model, sizeof(make_model),
+4 -6
Ver Arquivo
@@ -2,15 +2,13 @@
lpc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
lpc.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
lpc.o: ../cups/i18n.h ../cups/transcode.h ../cups/debug.h ../cups/string.h
lpc.o: ../config.h
lpc.o: ../cups/i18n.h ../cups/debug.h ../cups/string.h ../config.h
lpq.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
lpq.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
lpq.o: ../cups/debug.h
lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/debug.h
lpr.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
lpr.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
lprm.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
lprm.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
lprm.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
lprm.o: ../cups/i18n.h ../cups/string.h ../config.h
-2
Ver Arquivo
@@ -65,8 +65,6 @@ main(int argc, /* I - Number of command-line arguments */
*params; /* Pointer to parameters */
_cupsSetLocale(argv);
/*
* Connect to the scheduler...
*/
+2 -3
Ver Arquivo
@@ -76,10 +76,9 @@ main(int argc, /* I - Number of command-line arguments */
longstatus; /* Show file details */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
cups_lang_t *language; /* Language */
_cupsSetLocale(argv);
/*
* Check for command-line options...
*/
@@ -91,8 +90,8 @@ main(int argc, /* I - Number of command-line arguments */
interval = 0;
longstatus = 0;
all = 0;
language = cupsLangDefault();
num_dests = 0;
dests = NULL;
for (i = 1; i < argc; i ++)
if (argv[i][0] == '+')
+2 -2
Ver Arquivo
@@ -87,14 +87,13 @@ main(int argc, /* I - Number of command-line arguments */
ssize_t bytes; /* Bytes copied */
off_t filesize; /* Size of temp file */
int temp; /* Temporary file descriptor */
cups_lang_t *language; /* Language information */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Signal action */
struct sigaction oldaction; /* Old signal action */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
_cupsSetLocale(argv);
deletefile = 0;
printer = NULL;
num_dests = 0;
@@ -103,6 +102,7 @@ main(int argc, /* I - Number of command-line arguments */
options = NULL;
num_files = 0;
title = NULL;
language = cupsLangDefault();
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
+3 -3
Ver Arquivo
@@ -55,14 +55,13 @@ main(int argc, /* I - Number of command-line arguments */
ipp_t *request; /* IPP request */
ipp_t *response; /* IPP response */
ipp_op_t op; /* Operation */
cups_lang_t *language; /* Language */
int num_dests; /* Number of destinations */
cups_dest_t *dests, /* Destinations */
*defdest; /* Default destination */
http_encryption_t encryption; /* Encryption? */
_cupsSetLocale(argv);
/*
* Setup to cancel individual print jobs...
*/
@@ -73,6 +72,7 @@ main(int argc, /* I - Number of command-line arguments */
response = NULL;
http = NULL;
encryption = cupsEncryption();
language = cupsLangDefault();
/*
* Open a connection to the server...
@@ -273,7 +273,7 @@ main(int argc, /* I - Number of command-line arguments */
}
/*
* If nothing has been canceled yet, cancel the current job on the specified
* If nothing has been cancelled yet, cancel the current job on the specified
* (or default) printer...
*/
+11 -13
Ver Arquivo
@@ -3,49 +3,47 @@
help-index.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
help-index.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
help-index.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
help-index.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
help-index.o: ../cups/dir.h
help-index.o: ../cups/i18n.h ../cups/string.h ../config.h ../cups/dir.h
html.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
html.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
html.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
html.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
html.o: ../cups/i18n.h ../cups/string.h ../config.h
ipp-var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
ipp-var.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
ipp-var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
ipp-var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
ipp-var.o: ../cups/i18n.h ../cups/string.h ../config.h
search.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
search.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
search.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
search.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
search.o: ../cups/i18n.h ../cups/string.h ../config.h
template.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
template.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
template.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
template.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
template.o: ../cups/i18n.h ../cups/string.h ../config.h
var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
var.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
var.o: ../cups/i18n.h ../cups/string.h ../config.h
admin.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
admin.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
admin.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
admin.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
admin.o: ../cups/adminutil.h ../cups/cups.h ../cups/file.h
admin.o: ../cups/i18n.h ../cups/string.h ../config.h ../cups/file.h
classes.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
classes.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
classes.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
classes.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
classes.o: ../cups/i18n.h ../cups/string.h ../config.h
help.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
help.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
help.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
help.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
help.o: ../cups/i18n.h ../cups/string.h ../config.h
jobs.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
jobs.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
jobs.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
jobs.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
jobs.o: ../cups/i18n.h ../cups/string.h ../config.h
printers.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
printers.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
printers.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
printers.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
printers.o: ../cups/i18n.h ../cups/string.h ../config.h
testcgi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
testcgi.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
testcgi.o: ../cups/array.h help-index.h
+18 -76
Ver Arquivo
@@ -1597,97 +1597,39 @@ do_config_server(http_t *http) /* I - HTTP connection */
int num_settings; /* Number of server settings */
cups_option_t *settings; /* Server settings */
const char *debug_logging, /* DEBUG_LOGGING value */
*remote_admin, /* REMOTE_ADMIN value */
*remote_printers,
/* REMOTE_PRINTERS value */
*share_printers,/* SHARE_PRINTERS value */
*user_cancel_any;
/* USER_CANCEL_ANY value */
/*
* Get the checkbox values from the form...
*/
num_settings = 0;
num_settings = cupsAddOption(CUPS_SERVER_DEBUG_LOGGING,
cgiGetVariable("DEBUG_LOGGING") ? "1" : "0",
num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ADMIN,
cgiGetVariable("REMOTE_ADMIN") ? "1" : "0",
num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_REMOTE_PRINTERS,
cgiGetVariable("REMOTE_PRINTERS") ? "1" : "0",
num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_SHARE_PRINTERS,
cgiGetVariable("SHARE_PRINTERS") ? "1" : "0",
num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_USER_CANCEL_ANY,
cgiGetVariable("USER_CANCEL_ANY") ? "1" : "0",
num_settings, &settings);
debug_logging = cgiGetVariable("DEBUG_LOGGING") ? "1" : "0";
remote_admin = cgiGetVariable("REMOTE_ADMIN") ? "1" : "0";
remote_printers = cgiGetVariable("REMOTE_PRINTERS") ? "1" : "0";
share_printers = cgiGetVariable("SHARE_PRINTERS") ? "1" : "0";
user_cancel_any = cgiGetVariable("USER_CANCEL_ANY") ? "1" : "0";
/*
* Get the current server settings...
*/
if (!_cupsAdminGetServerSettings(http, &num_settings, &settings))
if (!_cupsAdminSetServerSettings(http, num_settings, settings))
{
cgiStartHTML(cgiText(_("Change Settings")));
cgiSetVariable("MESSAGE",
cgiText(_("Unable to change server settings:")));
cgiSetVariable("ERROR", cupsLastErrorString());
cgiCopyTemplateLang("error.tmpl");
cgiEndHTML();
return;
}
/*
* See if the settings have changed...
*/
if (strcmp(debug_logging, cupsGetOption(CUPS_SERVER_DEBUG_LOGGING,
num_settings, settings)) ||
strcmp(remote_admin, cupsGetOption(CUPS_SERVER_REMOTE_ADMIN,
num_settings, settings)) ||
strcmp(remote_printers, cupsGetOption(CUPS_SERVER_REMOTE_PRINTERS,
num_settings, settings)) ||
strcmp(share_printers, cupsGetOption(CUPS_SERVER_SHARE_PRINTERS,
num_settings, settings)) ||
strcmp(user_cancel_any, cupsGetOption(CUPS_SERVER_USER_CANCEL_ANY,
num_settings, settings)))
{
/*
* Settings *have* changed, so save the changes...
*/
cupsFreeOptions(num_settings, settings);
num_settings = 0;
num_settings = cupsAddOption(CUPS_SERVER_DEBUG_LOGGING,
debug_logging, num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ADMIN,
remote_admin, num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_REMOTE_PRINTERS,
remote_printers, num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_SHARE_PRINTERS,
share_printers, num_settings, &settings);
num_settings = cupsAddOption(CUPS_SERVER_USER_CANCEL_ANY,
user_cancel_any, num_settings, &settings);
if (!_cupsAdminSetServerSettings(http, num_settings, settings))
{
cgiStartHTML(cgiText(_("Change Settings")));
cgiSetVariable("MESSAGE",
cgiText(_("Unable to change server settings:")));
cgiSetVariable("ERROR", cupsLastErrorString());
cgiCopyTemplateLang("error.tmpl");
}
else
{
cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect");
cgiStartHTML(cgiText(_("Change Settings")));
cgiCopyTemplateLang("restart.tmpl");
}
}
else
{
/*
* No changes...
*/
cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect");
cgiStartHTML(cgiText(_("Change Settings")));
cgiCopyTemplateLang("norestart.tmpl");
cgiCopyTemplateLang("restart.tmpl");
}
cupsFreeOptions(num_settings, settings);
-1
Ver Arquivo
@@ -110,7 +110,6 @@ cgiGetAttributes(ipp_t *request, /* I - IPP request */
*/
num_attrs = 0;
attrs[0] = NULL; /* Eliminate compiler warning */
while ((ch = getc(in)) != EOF)
if (ch == '\\')
+1 -3
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Search routines for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2006 by Easy Software Products.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -225,8 +225,6 @@ cgiCompileSearch(const char *query) /* I - Query string */
*sptr++ = *qptr++;
}
*sptr = '\0';
/*
* For "word1 AND word2", add reciprocal "word2 AND word1"...
*/
+4 -4
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: mime.types 6003 2006-10-02 16:26:04Z mike $"
# "$Id: mime.types 5402 2006-04-14 19:21:03Z mike $"
#
# MIME types file for the Common UNIX Printing System (CUPS).
#
@@ -154,8 +154,8 @@ application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
string(0,<1B>@) \
(contains(0,128,<1B>%-12345X) + \
(contains(0,4096,"LANGUAGE=PCL") \
contains(0,4096,"LANGUAGE = PCL")))
(contains(0,1024,"LANGUAGE=PCL") \
contains(0,1024,"LANGUAGE = PCL")))
########################################################################
#
@@ -167,5 +167,5 @@ application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
application/octet-stream
#
# End of "$Id: mime.types 6003 2006-10-02 16:26:04Z mike $".
# End of "$Id: mime.types 5402 2006-04-14 19:21:03Z mike $".
#
+7 -9
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 6032 2006-10-12 19:19:47Z mike $"
dnl "$Id: cups-common.m4 5466 2006-04-26 19:52:27Z mike $"
dnl
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -29,7 +29,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Versio number information...
CUPS_VERSION="1.2.5"
CUPS_VERSION="1.2svn"
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'`"
@@ -132,7 +132,6 @@ AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_H))
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
AC_CHECK_HEADER(scsi/sg.h,AC_DEFINE(HAVE_SCSI_SG_H))
dnl Checks for string functions.
AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy)
@@ -232,13 +231,12 @@ case $uname in
AC_MSG_CHECKING(for DBUS)
if $PKGCONFIG --exists dbus-1; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_DBUS)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
DBUSDIR="/etc/dbus-1/system.d"
AC_CHECK_LIB(dbus-1,
dbus_message_iter_init_append,
AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
AC_DEFINE(HAVE_DBUS)
CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
DBUSDIR="/etc/dbus-1/system.d")
else
AC_MSG_RESULT(no)
fi
@@ -267,5 +265,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl
dnl End of "$Id: cups-common.m4 6032 2006-10-12 19:19:47Z mike $".
dnl End of "$Id: cups-common.m4 5466 2006-04-26 19:52:27Z mike $".
dnl
+10 -31
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 6049 2006-10-20 15:07:21Z mike $"
dnl "$Id: cups-compiler.m4 5705 2006-06-30 01:07:29Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -93,7 +93,6 @@ PIEFLAGS=""
AC_SUBST(PIEFLAGS)
if test -n "$GCC"; then
# Add GCC-specific compiler options...
if test -z "$OPTIM"; then
if test "x$with_optim" = x; then
# Default to optimize-for-size and debug
@@ -274,7 +273,6 @@ if test -n "$GCC"; then
;;
esac
else
# Add vendor-specific compiler options...
case $uname in
AIX*)
if test -z "$OPTIM"; then
@@ -360,16 +358,6 @@ else
fi
fi
;;
OSF*)
# Tru64 UNIX aka Digital UNIX aka OSF/1
if test -z "$OPTIM"; then
if test "x$with_optim" = x; then
OPTIM="-O"
else
OPTIM="$with_optim"
fi
fi
;;
SunOS*)
# Solaris
if test -z "$OPTIM"; then
@@ -461,25 +449,16 @@ else
esac
fi
# Add general compiler options per platform...
case $uname in
HP-UX*)
# HP-UX 10.20 (at least) needs this definition to get the
# h_errno global...
OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
if test $uname = HP-UX; then
# HP-UX 10.20 (at least) needs this definition to get the
# h_errno global...
OPTIM="$OPTIM -D_XOPEN_SOURCE_EXTENDED"
# HP-UX 11.00 (at least) needs this definition to get the
# u_short type used by the IP headers...
OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
;;
OSF*)
# Tru64 UNIX aka Digital UNIX aka OSF/1 need to be told
# to be POSIX-compliant...
OPTIM="$OPTIM -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_OSF_SOURCE"
;;
esac
# HP-UX 11.00 (at least) needs this definition to get the
# u_short type used by the IP headers...
OPTIM="$OPTIM -D_INCLUDE_HPUX_SOURCE"
fi
dnl
dnl End of "$Id: cups-compiler.m4 6049 2006-10-20 15:07:21Z mike $".
dnl End of "$Id: cups-compiler.m4 5705 2006-06-30 01:07:29Z mike $".
dnl
+5 -9
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-defaults.m4 6003 2006-10-02 16:26:04Z mike $"
dnl "$Id: cups-defaults.m4 5745 2006-07-18 13:45:56Z mike $"
dnl
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
@@ -25,10 +25,8 @@ dnl
dnl Default langugages...
AC_ARG_WITH(languages, [ --with-languages set installed languages, default="de es ja pl sv" ],
if test "x$withval" != xno; then
LANGUAGES="$withval"
fi,
LANGUAGES="de es et ja pl sv")
LANGUAGES="$withval",
LANGUAGES="de es ja pl sv")
AC_SUBST(LANGUAGES)
dnl Default ConfigFilePerm
@@ -225,7 +223,7 @@ AC_ARG_WITH(printcap, [ --with-printcap set default printcap file],
default_printcap="$withval",
default_printcap="default")
if test x$default_printcap != xno; then
if test x$enable_printcap != xno -a x$default_printcap != xno; then
if test "x$default_printcap" = "xdefault"; then
case $uname in
Darwin*)
@@ -242,8 +240,6 @@ if test x$default_printcap != xno; then
CUPS_DEFAULT_PRINTCAP="/etc/printcap"
;;
esac
else
CUPS_DEFAULT_PRINTCAP="$default_printcap"
fi
else
CUPS_DEFAULT_PRINTCAP=""
@@ -252,5 +248,5 @@ fi
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
dnl
dnl End of "$Id: cups-defaults.m4 6003 2006-10-02 16:26:04Z mike $".
dnl End of "$Id: cups-defaults.m4 5745 2006-07-18 13:45:56Z mike $".
dnl
+9 -23
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-directories.m4 5905 2006-08-29 20:48:59Z mike $"
dnl "$Id: cups-directories.m4 5696 2006-06-26 18:34:20Z mike $"
dnl
dnl Directory stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -57,15 +57,6 @@ if test "$sharedstatedir" = "\${prefix}/com" -a "$prefix" = "/"; then
sharedstatedir="/usr/com"
fi
dnl Fix "datarootdir" variable if it hasn't been specified...
if test "$datarootdir" = "\${prefix}/share"; then
if test "$prefix" = "/"; then
datarootdir="/usr/share"
else
datarootdir="$prefix/share"
fi
fi
dnl Fix "datadir" variable if it hasn't been specified...
if test "$datadir" = "\${prefix}/share"; then
if test "$prefix" = "/"; then
@@ -73,8 +64,6 @@ if test "$datadir" = "\${prefix}/share"; then
else
datadir="$prefix/share"
fi
elif test "$datadir" = "\${datarootdir}"; then
datadir="$datarootdir"
fi
dnl Fix "includedir" variable if it hasn't been specified...
@@ -193,15 +182,12 @@ AC_SUBST(INITDDIR)
dnl Xinetd support...
XINETD=""
if test ! -x /sbin/launchd; then
for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
if test -d $dir; then
XINETD="$dir"
break
fi
done
fi
for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
if test -d $dir; then
XINETD="$dir"
break
fi
done
AC_SUBST(XINETD)
@@ -211,7 +197,7 @@ AC_ARG_WITH(cachedir, [ --with-cachedir set path for cache files],cache
if test x$cachedir = x; then
if test "x$uname" = xDarwin; then
CUPS_CACHEDIR="$localstatedir/spool/cups/cache"
CUPS_CACHEDIR="$localstatedir/tmp/cups"
else
CUPS_CACHEDIR="$localstatedir/cache/cups"
fi
@@ -316,5 +302,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
AC_SUBST(CUPS_STATEDIR)
dnl
dnl End of "$Id: cups-directories.m4 5905 2006-08-29 20:48:59Z mike $".
dnl End of "$Id: cups-directories.m4 5696 2006-06-26 18:34:20Z mike $".
dnl
+3 -9
Ver Arquivo
@@ -1,9 +1,9 @@
dnl
dnl "$Id: cups-manpages.m4 5799 2006-08-03 00:54:38Z mike $"
dnl "$Id: cups-manpages.m4 5466 2006-04-26 19:52:27Z mike $"
dnl
dnl Manpage stuff for the Common UNIX Printing System (CUPS).
dnl
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
dnl property of Easy Software Products and are protected by Federal
@@ -23,12 +23,6 @@ dnl WWW: http://www.cups.org
dnl
dnl Fix "mandir" variable...
if test "$mandir" = "\${datarootdir}/man" -a "$prefix" = "/"; then
# New GNU "standards" break previous ones, so make sure we use
# the right default location for the operating system...
mandir="\${prefix}/man"
fi
if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
case "$uname" in
Darwin* | Linux | GNU | *BSD* | AIX*)
@@ -109,5 +103,5 @@ AC_SUBST(MAN8EXT)
AC_SUBST(MAN8DIR)
dnl
dnl End of "$Id: cups-manpages.m4 5799 2006-08-03 00:54:38Z mike $".
dnl End of "$Id: cups-manpages.m4 5466 2006-04-26 19:52:27Z mike $".
dnl
+4 -9
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $"
dnl "$Id: cups-network.m4 5634 2006-06-06 17:48:27Z mike $"
dnl
dnl Networking stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -24,17 +24,12 @@ dnl
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyaddr, nsl)
AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
# Tru64 5.1b leaks file descriptors with these functions; disable until
# we can come up with a test for this...
if test "$uname" != "OSF1"; then
AC_SEARCH_LIBS(getaddrinfo, nsl, AC_DEFINE(HAVE_GETADDRINFO))
AC_SEARCH_LIBS(getnameinfo, nsl, AC_DEFINE(HAVE_GETNAMEINFO))
fi
AC_CHECK_MEMBER(struct sockaddr.sa_len,,, [#include <sys/socket.h>])
AC_CHECK_HEADER(sys/sockio.h, AC_DEFINE(HAVE_SYS_SOCKIO_H))
@@ -90,5 +85,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
dnl
dnl End of "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $".
dnl End of "$Id: cups-network.m4 5634 2006-06-06 17:48:27Z mike $".
dnl
+2 -8
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-threads.m4 6012 2006-10-03 22:35:12Z mike $"
dnl "$Id: cups-threads.m4 5466 2006-04-26 19:52:27Z mike $"
dnl
dnl Threading stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -44,12 +44,6 @@ if test "x$enable_threads" != xno; then
if test $have_pthread = yes; then
PTHREAD_FLAGS="-D_THREAD_SAFE -D_REENTRANT"
# Solaris requires _POSIX_PTHREAD_SEMANTICS to
# be POSIX-compliant... :(
if test $uname = SunOS; then
PTHREAD_FLAGS="$PTHREAD_FLAGS _POSIX_PTHREAD_SEMANTICS"
fi
break
fi
done
@@ -59,5 +53,5 @@ fi
AC_SUBST(PTHREAD_FLAGS)
dnl
dnl End of "$Id: cups-threads.m4 6012 2006-10-03 22:35:12Z mike $".
dnl End of "$Id: cups-threads.m4 5466 2006-04-26 19:52:27Z mike $".
dnl
-8
Ver Arquivo
@@ -147,13 +147,6 @@
#undef HAVE_CRYPT_H
/*
* Do we have <scsi/sg.h>?
*/
#undef HAVE_SCSI_SG_H
/*
* Use <string.h>, <strings.h>, and/or <bstring.h>?
*/
@@ -441,7 +434,6 @@
*/
#undef HAVE_DBUS
#undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
/*
+3 -11
Ver Arquivo
@@ -54,17 +54,9 @@ if test "x$LANGUAGES" != x; then
INSTALL_LANGUAGES="install-languages"
UNINSTALL_LANGUAGES="uninstall-languages"
for lang in $LANGUAGES; do
if test -f doc/$lang/index.html.in; then
LANGFILES="$LANGFILES doc/$lang/index.html"
fi
if test -f templates/$lang/edit-config.tmpl.in; then
LANGFILES="$LANGFILES templates/$lang/edit-config.tmpl"
fi
if test -f templates/$lang/header.tmpl.in; then
LANGFILES="$LANGFILES templates/$lang/header.tmpl"
fi
LANGFILES="$LANGFILES doc/$lang/index.html"
LANGFILES="$LANGFILES templates/$lang/edit-config.tmpl"
LANGFILES="$LANGFILES templates/$lang/header.tmpl"
done
fi
-1
Ver Arquivo
@@ -32,7 +32,6 @@ bindir=@bindir@
includedir=@includedir@
libdir=@libdir@
imagelibdir=@libdir@
datarootdir=@datadir@
datadir=@datadir@
sysconfdir=@sysconfdir@
cups_datadir=@CUPS_DATADIR@
+3 -3
Ver Arquivo
@@ -82,7 +82,7 @@ transcode.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h
transcode.o: i18n.h transcode.h debug.h
usersys.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.o: transcode.h debug.h
usersys.o: transcode.h
util.o: globals.h string.h ../config.h http-private.h http.h md5.h
util.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
util.o: transcode.h debug.h
@@ -180,7 +180,7 @@ transcode.32.o: transcode.c ipp-private.h ipp.h cups.h ppd.h array.h file.h lan
transcode.32.o: transcode.c i18n.h transcode.h debug.h
usersys.32.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.32.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.32.o: usersys.c transcode.h debug.h
usersys.32.o: usersys.c transcode.h
util.32.o: util.c globals.h string.h ../config.h http-private.h http.h md5.h
util.32.o: util.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
util.32.o: util.c transcode.h debug.h
@@ -278,7 +278,7 @@ transcode.64.o: transcode.c ipp-private.h ipp.h cups.h ppd.h array.h file.h lan
transcode.64.o: transcode.c i18n.h transcode.h debug.h
usersys.64.o: usersys.c http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
usersys.64.o: usersys.c globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
usersys.64.o: usersys.c transcode.h debug.h
usersys.64.o: usersys.c transcode.h
util.64.o: util.c globals.h string.h ../config.h http-private.h http.h md5.h
util.64.o: util.c ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
util.64.o: util.c transcode.h debug.h
-1
Ver Arquivo
@@ -93,7 +93,6 @@ OBJS = \
HEADERS = \
adminutil.h \
array.h \
backend.h \
cups.h \
dir.h \
file.h \
+13 -49
Ver Arquivo
@@ -103,7 +103,7 @@ cupsAdminCreateWindowsPPD(
linenum; /* Current line number */
time_t curtime; /* Current time */
struct tm *curdate; /* Current date */
static const char * const pattrs[] = /* Printer attributes we want */
static const char *pattrs[] = /* Printer attributes we want */
{
"job-hold-until-supported",
"job-hold-until-default",
@@ -772,31 +772,19 @@ _cupsAdminGetServerSettings(
if (!value)
continue;
if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen"))
if (!strcasecmp(line, "Port"))
{
remote_access = 1;
}
else if (!strcasecmp(line, "Listen"))
{
char *port; /* Pointer to port number, if any */
if ((port = strrchr(value, ':')) != NULL)
*port = '\0';
else if (isdigit(*value & 255))
{
/*
* Listen on a port number implies remote access...
*/
remote_access = 1;
continue;
}
if (strcasecmp(value, "localhost") && strcmp(value, "127.0.0.1")
#ifdef AF_LOCAL
&& *value != '/'
#endif /* AF_LOCAL */
#ifdef AF_INET6
&& strcmp(value, "::1")
#endif /* AF_INET6 */
)
if (strcasecmp(value, "localhost") && strcmp(value, "127.0.0.1"))
remote_access = 1;
}
else if (!strcasecmp(line, "Browsing"))
@@ -872,14 +860,7 @@ _cupsAdminGetServerSettings(
in_location = 0;
}
else if (!strcasecmp(line, "Allow") && in_admin_location &&
strcasecmp(value, "localhost") && strcasecmp(value, "127.0.0.1")
#ifdef AF_LOCAL
&& *value != '/'
#endif /* AF_LOCAL */
#ifdef AF_INET6
&& strcmp(value, "::1")
#endif /* AF_INET6 */
)
strcasecmp(value, "localhost") && strcasecmp(value, "127.0.0.1"))
{
remote_admin = 1;
}
@@ -953,8 +934,6 @@ _cupsAdminSetServerSettings(
{
int i; /* Looping var */
http_status_t status; /* GET/PUT status */
const char *server_port_env; /* SERVER_PORT env var */
int server_port; /* IPP port for server */
cups_file_t *cupsd; /* cupsd.conf file */
char cupsdconf[1024]; /* cupsd.conf filename */
int remote; /* Remote cupsd.conf file? */
@@ -1088,17 +1067,6 @@ _cupsAdminSetServerSettings(
wrote_root_location = 0;
indent = 0;
if ((server_port_env = getenv("SERVER_PORT")) != NULL)
{
if ((server_port = atoi(server_port_env)) <= 0)
server_port = ippPort();
}
else
server_port = ippPort();
if (server_port <= 0)
server_port = IPP_PORT;
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
{
if (!strcasecmp(line, "Port") || !strcasecmp(line, "Listen"))
@@ -1110,24 +1078,20 @@ _cupsAdminSetServerSettings(
if (share_printers || remote_admin)
{
cupsFilePuts(temp, "# Allow remote access\n");
cupsFilePrintf(temp, "Port %d\n", server_port);
cupsFilePrintf(temp, "Port %d\n", ippPort());
}
else
{
cupsFilePuts(temp, "# Only listen for connections from the local "
"machine.\n");
cupsFilePrintf(temp, "Listen localhost:%d\n", server_port);
cupsFilePrintf(temp, "Listen 127.0.0.1:%d\n", ippPort());
}
#ifdef CUPS_DEFAULT_DOMAINSOCKET
if ((!value || strcmp(CUPS_DEFAULT_DOMAINSOCKET, value)) &&
!access(CUPS_DEFAULT_DOMAINSOCKET, 0))
if (!access(CUPS_DEFAULT_DOMAINSOCKET, 0))
cupsFilePuts(temp, "Listen " CUPS_DEFAULT_DOMAINSOCKET "\n");
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
}
else if (value && value[0] == '/' &&
strcmp(CUPS_DEFAULT_DOMAINSOCKET, value))
cupsFilePrintf(temp, "Listen %s\n", value);
}
else if (!strcasecmp(line, "Browsing") ||
!strcasecmp(line, "BrowseAddress") ||
@@ -1476,7 +1440,7 @@ _cupsAdminSetServerSettings(
{
cupsFilePuts(temp,
"# Only listen for connections from the local machine.\n");
cupsFilePrintf(temp, "Listen localhost:%d\n", ippPort());
cupsFilePrintf(temp, "Listen 127.0.0.1:%d\n", ippPort());
}
#ifdef CUPS_DEFAULT_DOMAINSOCKET
@@ -1804,7 +1768,7 @@ get_cupsd_conf(
* Read cupsd.conf via a HTTP GET request...
*/
if ((fd = cupsTempFd(name, namesize)) < 0)
if ((fd = cupsTempFd(name, sizeof(name))) < 0)
{
*name = '\0';
+6 -40
Ver Arquivo
@@ -44,19 +44,14 @@
* @since CUPS 1.1.19@
*/
ppd_attr_t * /* O - Attribute or NULL if not found */
ppdFindAttr(ppd_file_t *ppd, /* I - PPD file data */
const char *name, /* I - Attribute name */
const char *spec) /* I - Specifier string or NULL */
ppd_attr_t * /* O - Attribute or NULL if not found */
ppdFindAttr(ppd_file_t *ppd, /* I - PPD file data */
const char *name, /* I - Attribute name */
const char *spec) /* I - Specifier string or NULL */
{
ppd_attr_t key, /* Search key */
*attr; /* Current attribute */
int diff; /* Current difference */
ppd_attr_t key; /* Search key */
DEBUG_printf(("ppdFindAttr(ppd=%p, name=\"%s\", spec=\"%s\")\n", ppd,
name ? name : "(null)", spec ? spec : "(null)"));
/*
* Range check input...
*/
@@ -77,36 +72,7 @@ ppdFindAttr(ppd_file_t *ppd, /* I - PPD file data */
* Return the first matching attribute, if any...
*/
if ((attr = (ppd_attr_t *)cupsArrayFind(ppd->sorted_attrs, &key)) != NULL)
return (attr);
else if (spec)
return (NULL);
/*
* No match found, loop through the sorted attributes to see if we can
* find a "wildcard" match for the attribute...
*/
for (attr = (ppd_attr_t *)cupsArrayFirst(ppd->sorted_attrs);
attr;
attr = (ppd_attr_t *)cupsArrayNext(ppd->sorted_attrs))
{
if ((diff = strcasecmp(attr->name, name)) == 0)
break;
if (diff > 0)
{
/*
* All remaining attributes are > than the one we are trying to find...
*/
cupsArrayIndex(ppd->sorted_attrs, cupsArrayCount(ppd->sorted_attrs));
return (NULL);
}
}
return (attr);
return ((ppd_attr_t *)cupsArrayFind(ppd->sorted_attrs, &key));
}
-2
Ver Arquivo
@@ -81,8 +81,6 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
http, method, resource));
DEBUG_printf(("cupsDoAuthentication: digest_tries=%d, userpass=\"%s\"\n",
http->digest_tries, http->userpass));
DEBUG_printf(("cupsDoAuthentication: WWW-Authenticate=\"%s\"\n",
httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)));
/*
* Clear the current authentication string...
+2 -2
Ver Arquivo
@@ -61,10 +61,10 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0205
# define CUPS_VERSION 1.0200
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 2
# define CUPS_VERSION_PATCH 5
# define CUPS_VERSION_PATCH 0
# define CUPS_DATE_ANY -1
+13 -55
Ver Arquivo
@@ -64,31 +64,21 @@ static int cups_get_sdests(http_t *http, ipp_op_t op, int num_dests,
/*
* 'cupsAddDest()' - Add a destination to the list of destinations.
*
* This function cannot be used to add a new class or printer queue,
* it only adds a new container of saved options for the named
* destination or instance.
*
* If the named destination already exists, the destination list is
* returned unchanged. Adding a new instance of a destination creates
* a copy of that destination's options.
*
* Use the cupsSaveDests() function to save the updated list of
* destinations to the user's lpoptions file.
* Use the cupsSaveDests() function to save the updated list of destinations
* to the user's lpoptions file.
*/
int /* O - New number of destinations */
cupsAddDest(const char *name, /* I - Destination name */
const char *instance, /* I - Instance name or NULL for none/primary */
cupsAddDest(const char *name, /* I - Name of destination */
const char *instance, /* I - Instance of destination or NULL for none/primary */
int num_dests, /* I - Number of destinations */
cups_dest_t **dests) /* IO - Destinations */
{
int i; /* Looping var */
cups_dest_t *dest; /* Destination pointer */
cups_dest_t *parent; /* Parent destination */
cups_option_t *option; /* Current option */
if (!name || !dests)
if (name == NULL || dests == NULL)
return (0);
if ((dest = cupsGetDest(name, instance, num_dests, *dests)) != NULL)
@@ -108,53 +98,27 @@ cupsAddDest(const char *name, /* I - Destination name */
*dests = dest;
/*
* Find where to insert the destination...
*/
for (i = num_dests; i > 0; i --, dest ++)
if (strcasecmp(name, dest->name) < 0)
break;
else if (!instance && dest->instance)
break;
else if (!strcasecmp(name, dest->name) &&
instance && dest->instance &&
instance != NULL && dest->instance != NULL &&
strcasecmp(instance, dest->instance) < 0)
break;
if (i > 0)
memmove(dest + 1, dest, i * sizeof(cups_dest_t));
/*
* Initialize the destination...
*/
dest->name = strdup(name);
dest->is_default = 0;
dest->num_options = 0;
dest->options = (cups_option_t *)0;
if (!instance)
if (instance == NULL)
dest->instance = NULL;
else
{
/*
* Copy options from the primary instance...
*/
dest->instance = strdup(instance);
if ((parent = cupsGetDest(name, NULL, num_dests + 1, *dests)) != NULL)
{
for (i = parent->num_options, option = parent->options;
i > 0;
i --, option ++)
dest->num_options = cupsAddOption(option->name, option->value,
dest->num_options,
&(dest->options));
}
}
return (num_dests + 1);
}
@@ -196,18 +160,18 @@ cupsFreeDests(int num_dests, /* I - Number of destinations */
*/
cups_dest_t * /* O - Destination pointer or NULL */
cupsGetDest(const char *name, /* I - Destination name or NULL for the default destination */
const char *instance, /* I - Instance name or NULL */
cupsGetDest(const char *name, /* I - Name of destination */
const char *instance, /* I - Instance of destination */
int num_dests, /* I - Number of destinations */
cups_dest_t *dests) /* I - Destinations */
{
int comp; /* Result of comparison */
if (num_dests <= 0 || !dests)
if (num_dests == 0 || dests == NULL)
return (NULL);
if (!name)
if (name == NULL)
{
/*
* NULL name for default printer.
@@ -234,9 +198,9 @@ cupsGetDest(const char *name, /* I - Destination name or NULL for the default
return (NULL);
else if (comp == 0)
{
if ((!instance && !dests->instance) ||
if ((instance == NULL && dests->instance == NULL) ||
(instance != NULL && dests->instance != NULL &&
!strcasecmp(instance, dests->instance)))
strcasecmp(instance, dests->instance) == 0))
return (dests);
}
@@ -256,9 +220,6 @@ cupsGetDest(const char *name, /* I - Destination name or NULL for the default
* printer-info, printer-is-accepting-jobs, printer-is-shared,
* printer-make-and-model, printer-state, printer-state-change-time,
* printer-state-reasons, and printer-type attributes as options.
*
* Use the cupsFreeDests() function to free the destination list and
* the cupsGetDest() function to find a particular destination.
*/
int /* O - Number of destinations */
@@ -291,9 +252,6 @@ cupsGetDests(cups_dest_t **dests) /* O - Destinations */
* printer-make-and-model, printer-state, printer-state-change-time,
* printer-state-reasons, and printer-type attributes as options.
*
* Use the cupsFreeDests() function to free the destination list and
* the cupsGetDest() function to find a particular destination.
*
* @since CUPS 1.1.21@
*/
+24 -53
Ver Arquivo
@@ -347,12 +347,10 @@ cupsDirOpen(const char *directory) /* I - Directory name */
cups_dentry_t * /* O - Directory entry */
cupsDirRead(cups_dir_t *dp) /* I - Directory */
{
struct dirent *entry; /* Pointer to entry */
char filename[1024]; /* Full filename */
# ifdef HAVE_PTHREAD_H
char buffer[sizeof(struct dirent) + 1024];
/* Directory entry buffer */
# endif /* HAVE_PTHREAD_H */
struct dirent *entry; /* Pointer to entry */
char filename[1024]; /* Full filename */
DEBUG_printf(("cupsDirRead(dp=%p)\n", dp));
@@ -368,13 +366,8 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory */
* Try reading an entry that is not "." or ".."...
*/
for (;;)
do
{
# ifdef HAVE_PTHREAD_H
/*
* Read the next entry using the reentrant version of readdir...
*/
if (readdir_r(dp->dir, (struct dirent *)buffer, &entry))
{
DEBUG_printf((" readdir_r() failed - %s\n", strerror(errno)));
@@ -388,50 +381,28 @@ cupsDirRead(cups_dir_t *dp) /* I - Directory */
}
DEBUG_printf((" readdir_r() returned \"%s\"...\n", entry->d_name));
# else
/*
* Read the next entry using the original version of readdir...
*/
if ((entry = readdir(dp->dir)) == NULL)
{
DEBUG_puts(" readdir() returned a NULL pointer!");
return (NULL);
}
DEBUG_printf((" readdir() returned \"%s\"...\n", entry->d_name));
# endif /* HAVE_PTHREAD_H */
/*
* Skip "." and ".."...
*/
if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."))
continue;
/*
* Copy the name over and get the file information...
*/
strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename));
snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name);
if (stat(filename, &(dp->entry.fileinfo)))
{
DEBUG_printf((" stat() failed for \"%s\" - %s...\n", filename,
strerror(errno)));
continue;
}
/*
* Return the entry...
*/
return (&(dp->entry));
}
while (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, ".."));
/*
* Copy the name over and get the file information...
*/
strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename));
snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name);
if (stat(filename, &(dp->entry.fileinfo)))
{
DEBUG_printf((" stat() failed for \"%s\" - %s...\n", filename,
strerror(errno)));
return (NULL);
}
/*
* Return the entry...
*/
return (&(dp->entry));
}
+5 -5
Ver Arquivo
@@ -5,7 +5,7 @@
*
* This set of APIs abstracts enumeration of directory entries.
*
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
* Copyright 1997-2005 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -39,9 +39,9 @@
* C++ magic...
*/
# ifdef __cplusplus
# ifdef _cplusplus
extern "C" {
# endif /* __cplusplus */
# endif /* _cplusplus */
/*
@@ -67,9 +67,9 @@ extern cups_dentry_t *cupsDirRead(cups_dir_t *dp);
extern void cupsDirRewind(cups_dir_t *dp);
# ifdef __cplusplus
# ifdef _cplusplus
}
# endif /* __cplusplus */
# endif /* _cplusplus */
#endif /* !_CUPS_DIR_H_ */
/*
+2 -4
Ver Arquivo
@@ -391,8 +391,8 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
title = ptr + 1;
/*
* Replace double quotes with single quotes and 8-bit characters with
* question marks so that the title does not cause a PJL syntax error.
* Replace double quotes with single quotes so that the title
* does not cause a PJL syntax error.
*/
strlcpy(temp, title, sizeof(temp));
@@ -400,8 +400,6 @@ ppdEmitJCL(ppd_file_t *ppd, /* I - PPD file record */
for (ptr = temp; *ptr; ptr ++)
if (*ptr == '\"')
*ptr = '\'';
else if (*ptr & 128)
*ptr = '?';
/*
* Send PJL JOB and PJL RDYMSG commands before we enter PostScript mode...
+8 -9
Ver Arquivo
@@ -377,7 +377,7 @@ cupsFileFind(const char *filename, /* I - File to find */
int /* O - 0 on success, -1 on error */
cupsFileFlush(cups_file_t *fp) /* I - CUPS file */
{
ssize_t bytes; /* Bytes to write */
size_t bytes; /* Bytes to write */
DEBUG_printf(("cupsFileFlush(fp=%p)\n", fp));
@@ -991,7 +991,7 @@ cupsFilePrintf(cups_file_t *fp, /* I - CUPS file */
...) /* I - Additional args as necessary */
{
va_list ap; /* Argument list */
ssize_t bytes; /* Formatted size */
size_t bytes; /* Formatted size */
char buf[8192]; /* Formatted text */
@@ -1090,7 +1090,7 @@ int /* O - Number of bytes written or -1 */
cupsFilePuts(cups_file_t *fp, /* I - CUPS file */
const char *s) /* I - String to write */
{
ssize_t bytes; /* Bytes to write */
size_t bytes; /* Bytes to write */
/*
@@ -1149,8 +1149,8 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
char *buf, /* O - Buffer */
size_t bytes) /* I - Number of bytes to read */
{
size_t total; /* Total bytes read */
ssize_t count; /* Bytes read */
size_t total, /* Total bytes read */
count; /* Bytes read */
DEBUG_printf(("cupsFileRead(fp=%p, buf=%p, bytes=%ld)\n", fp, buf,
@@ -1260,7 +1260,6 @@ cupsFileRewind(cups_file_t *fp) /* I - CUPS file */
fp->pos = 0;
fp->ptr = NULL;
fp->end = NULL;
fp->eof = 0;
return (0);
}
@@ -1274,7 +1273,7 @@ off_t /* O - New file position or -1 */
cupsFileSeek(cups_file_t *fp, /* I - CUPS file */
off_t pos) /* I - Position in file */
{
ssize_t bytes; /* Number bytes in buffer */
size_t bytes; /* Number bytes in buffer */
DEBUG_printf(("cupsFileSeek(fp=%p, pos=" CUPS_LLFMT ")\n", fp, pos));
@@ -2030,8 +2029,8 @@ cups_write(cups_file_t *fp, /* I - CUPS file */
const char *buf, /* I - Buffer */
size_t bytes) /* I - Number bytes */
{
size_t total; /* Total bytes written */
ssize_t count; /* Count this time */
size_t total, /* Total bytes written */
count; /* Count this time */
DEBUG_printf(("cups_write(fp=%p, buf=%p, bytes=%ld)\n", fp, buf,
+5 -5
Ver Arquivo
@@ -8,7 +8,7 @@
* our own file functions allows us to provide transparent support of
* gzip'd print files, PPD files, etc.
*
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
* Copyright 1997-2005 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -47,9 +47,9 @@ typedef off_t ssize_t; /* @private@ */
* C++ magic...
*/
# ifdef __cplusplus
# ifdef _cplusplus
extern "C" {
# endif /* __cplusplus */
# endif /* _cplusplus */
/*
@@ -103,9 +103,9 @@ extern int cupsFileUnlock(cups_file_t *fp);
extern ssize_t cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes);
# ifdef __cplusplus
# ifdef _cplusplus
}
# endif /* __cplusplus */
# endif /* _cplusplus */
#endif /* !_CUPS_FILE_H_ */
/*
+8 -26
Ver Arquivo
@@ -222,10 +222,7 @@ httpClearFields(http_t *http) /* I - HTTP connection */
if (http)
{
memset(http->fields, 0, sizeof(http->fields));
if (http->hostname[0] == '/')
httpSetField(http, HTTP_FIELD_HOST, "localhost");
else
httpSetField(http, HTTP_FIELD_HOST, http->hostname);
httpSetField(http, HTTP_FIELD_HOST, http->hostname);
http->expect = (http_status_t)0;
}
@@ -1103,20 +1100,15 @@ httpPrintf(http_t *http, /* I - HTTP connection */
DEBUG_printf(("httpPrintf: %s", buf));
if (http->data_encoding == HTTP_ENCODE_FIELDS)
return (httpWrite2(http, buf, bytes));
else
if (http->wused)
{
if (http->wused)
{
DEBUG_puts(" flushing existing data...");
DEBUG_puts(" flushing existing data...");
if (httpFlushWrite(http) < 0)
return (-1);
}
return (http_write(http, buf, bytes));
if (httpFlushWrite(http) < 0)
return (-1);
}
return (http_write(http, buf, bytes));
}
@@ -2162,20 +2154,11 @@ http_send(http_t *http, /* I - HTTP connection */
if (httpReconnect(http))
return (-1);
/*
* Flush any written data that is pending...
*/
if (http->wused)
httpFlushWrite(http);
/*
* Send the request header...
*/
http->state = request;
http->data_encoding = HTTP_ENCODE_FIELDS;
http->state = request;
if (request == HTTP_POST || request == HTTP_PUT)
http->state ++;
@@ -2228,7 +2211,6 @@ http_send(http_t *http, /* I - HTTP connection */
return (-1);
}
httpFlushWrite(http);
httpGetLength2(http);
httpClearFields(http);
+3 -7
Ver Arquivo
@@ -39,8 +39,8 @@
# include <winsock2.h>
# include <ws2tcpip.h>
# else
# ifdef __sgi
# define INET6 /* IRIX IPv6 support... */
# ifdef __sgi /* IRIX needs this for IPv6 support!?! */
# define INET6
# endif /* __sgi */
# include <unistd.h>
# include <sys/time.h>
@@ -53,9 +53,6 @@
# if !defined(__APPLE__) || !defined(TCP_NODELAY)
# include <netinet/tcp.h>
# endif /* !__APPLE__ || !TCP_NODELAY */
# if defined(AF_UNIX) && !defined(AF_LOCAL)
# define AF_LOCAL AF_UNIX /* Older UNIX's have old names... */
# endif /* AF_UNIX && !AF_LOCAL */
# ifdef AF_LOCAL
# include <sys/un.h>
# endif /* AF_LOCAL */
@@ -142,8 +139,7 @@ typedef enum http_auth_e /**** HTTP authentication types ****/
typedef enum http_encoding_e /**** HTTP transfer encoding values ****/
{
HTTP_ENCODE_LENGTH, /* Data is sent with Content-Length */
HTTP_ENCODE_CHUNKED, /* Data is chunked */
HTTP_ENCODE_FIELDS /* Sending HTTP fields */
HTTP_ENCODE_CHUNKED /* Data is chunked */
} http_encoding_t;
typedef enum http_encryption_e /**** HTTP encryption values ****/
-1
Ver Arquivo
@@ -105,7 +105,6 @@ extern const char *_cupsLangString(cups_lang_t *lang, const char *message);
extern void _cupsMessageFree(cups_array_t *a);
extern cups_array_t *_cupsMessageLoad(const char *filename);
extern const char *_cupsMessageLookup(cups_array_t *a, const char *m);
extern void _cupsSetLocale(char *argv[]);
# ifdef __cplusplus
}
-31
Ver Arquivo
@@ -304,48 +304,19 @@ ippPort(void)
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
DEBUG_puts("ippPort()");
if (!cg->ipp_port)
{
/*
* See if the server definition includes the port number...
*/
DEBUG_puts("ippPort: Not initialized...");
cupsServer();
#ifdef DEBUG
if (cg->ipp_port)
puts("ippPort: Set via cupsServer()...");
#endif /* DEBUG */
}
if (!cg->ipp_port)
{
if ((ipp_port = getenv("IPP_PORT")) != NULL)
{
DEBUG_puts("ippPort: Set via IPP_PORT...");
portnum = atoi(ipp_port);
}
else if ((port = getservbyname("ipp", NULL)) == NULL)
{
DEBUG_puts("ippPort: Set via CUPS_DEFAULT_IPP_PORT...");
portnum = CUPS_DEFAULT_IPP_PORT;
}
else
{
DEBUG_puts("ippPort: Set via ipp service entry...");
portnum = ntohs(port->s_port);
}
if (portnum > 0)
cg->ipp_port = portnum;
}
DEBUG_printf(("ippPort: Returning %d...\n", cg->ipp_port));
return (cg->ipp_port);
}
@@ -357,8 +328,6 @@ ippPort(void)
void
ippSetPort(int p) /* I - Port number to use */
{
DEBUG_printf(("ippSetPort(p=%d)\n", p));
_cupsGlobals()->ipp_port = p;
}
+2 -4
Ver Arquivo
@@ -172,11 +172,10 @@ typedef enum ipp_jstate_e /**** Job States.... */
IPP_JOB_HELD, /* Job is held for printing */
IPP_JOB_PROCESSING, /* Job is currently printing */
IPP_JOB_STOPPED, /* Job has been stopped */
IPP_JOB_CANCELED, /* Job has been canceled */
IPP_JOB_CANCELLED, /* Job has been cancelled */
IPP_JOB_ABORTED, /* Job has aborted due to error */
IPP_JOB_COMPLETED /* Job has completed successfully */
} ipp_jstate_t;
#define IPP_JOB_CANCELLED IPP_JOB_CANCELED
typedef enum ipp_pstate_e /**** Printer States.... */
{
@@ -305,11 +304,10 @@ typedef enum ipp_status_e /**** IPP status codes... ****/
IPP_TEMPORARY_ERROR, /* server-error-temporary-error */
IPP_NOT_ACCEPTING, /* server-error-not-accepting-jobs */
IPP_PRINTER_BUSY, /* server-error-busy */
IPP_ERROR_JOB_CANCELED, /* server-error-job-canceled */
IPP_ERROR_JOB_CANCELLED, /* server-error-job-canceled */
IPP_MULTIPLE_JOBS_NOT_SUPPORTED, /* server-error-multiple-document-jobs-not-supported */
IPP_PRINTER_IS_DEACTIVATED /* server-error-printer-is-deactivated */
} ipp_status_t;
#define IPP_ERROR_JOB_CANCELLED IPP_ERROR_JOB_CANCELED
typedef unsigned char ipp_uchar_t; /**** Unsigned 8-bit integer/character ****/
-85
Ver Arquivo
@@ -28,7 +28,6 @@
*
* _cupsLangPrintf() - Print a formatted message string to a file.
* _cupsLangPuts() - Print a static message string to a file.
* _cupsSetLocale() - Set the current locale and transcode the command-line.
*/
/*
@@ -139,90 +138,6 @@ _cupsLangPuts(FILE *fp, /* I - File to write to */
}
/*
* '_cupsSetLocale()' - Set the current locale and transcode the command-line.
*/
void
_cupsSetLocale(char *argv[]) /* IO - Command-line arguments */
{
int i; /* Looping var */
char buffer[8192]; /* Command-line argument buffer */
_cups_globals_t *cg; /* Global data */
#ifdef LC_TIME
const char *lc_time; /* Current LC_TIME value */
char new_lc_time[255], /* New LC_TIME value */
*charset; /* Pointer to character set */
#endif /* LC_TIME */
/*
* Set the locale so that times, etc. are displayed properly.
*
* Unfortunately, while we need the localized time value, we *don't*
* want to use the localized charset for the time value, so we need
* to set LC_TIME to the locale name with .UTF-8 on the end (if
* the locale includes a character set specifier...)
*/
setlocale(LC_ALL, "");
#ifdef LC_TIME
if ((lc_time = setlocale(LC_TIME, NULL)) == NULL)
lc_time = setlocale(LC_ALL, NULL);
if (lc_time)
{
strlcpy(new_lc_time, lc_time, sizeof(new_lc_time));
if ((charset = strchr(new_lc_time, '.')) == NULL)
charset = new_lc_time + strlen(new_lc_time);
strlcpy(charset, ".UTF-8", sizeof(new_lc_time) - (charset - new_lc_time));
}
else
strcpy(new_lc_time, "C");
setlocale(LC_TIME, new_lc_time);
#endif /* LC_TIME */
/*
* Initialize the default language info...
*/
cg = _cupsGlobals();
if (!cg->lang_default)
cg->lang_default = cupsLangDefault();
/*
* Transcode the command-line arguments from the locale charset to
* UTF-8...
*/
if (cg->lang_default->encoding != CUPS_US_ASCII &&
cg->lang_default->encoding != CUPS_UTF8)
{
for (i = 1; argv[i]; i ++)
{
/*
* Try converting from the locale charset to UTF-8...
*/
if (cupsCharsetToUTF8((cups_utf8_t *)buffer, argv[i], sizeof(buffer),
cg->lang_default->encoding) < 0)
continue;
/*
* Save the new string if it differs from the original...
*/
if (strcmp(buffer, argv[i]))
argv[i] = strdup(buffer);
}
}
}
/*
* End of "$Id$".
*/
+8 -9
Ver Arquivo
@@ -406,6 +406,14 @@ cupsLangGet(const char *language) /* I - Language or locale */
*ptr = '\0';
}
else
{
/*
* Default to UTF-8...
*/
strcpy(charset, "UTF8");
}
/*
* Get the locale for messages from the LC_MESSAGES locale setting...
@@ -465,13 +473,6 @@ cupsLangGet(const char *language) /* I - Language or locale */
}
#endif /* CODESET */
/*
* If we don't have a character set by now, default to UTF-8...
*/
if (!charset[0])
strcpy(charset, "UTF8");
/*
* Parse the language string passed in to a locale string. "C" is the
* standard POSIX locale and is copied unchanged. Otherwise the
@@ -1287,8 +1288,6 @@ cups_unquote(char *d, /* O - Unquoted string */
*d = *d * 8 + *s - '0';
s ++;
}
d ++;
}
else
{
-1
Ver Arquivo
@@ -16,7 +16,6 @@ _cupsMessageFree
_cupsMessageLoad
_cupsMessageLookup
_cupsSetError
_cupsSetLocale
_cupsStrAlloc
_cupsStrFlush
_cupsStrFormatd
+2 -19
Ver Arquivo
@@ -80,8 +80,6 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
* Range check input...
*/
DEBUG_printf(("ppdLocalize(ppd=%p)\n", ppd));
if (!ppd)
return (-1);
@@ -95,9 +93,6 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
strlcpy(ll_CC, lang->language, sizeof(ll_CC));
strlcpy(ll, lang->language, sizeof(ll));
DEBUG_printf((" lang->language=\"%s\", ll=\"%s\", ll_CC=\"%s\"...\n",
lang->language, ll, ll_CC));
/*
* Now lookup all of the groups, options, choices, etc.
*/
@@ -170,29 +165,17 @@ ppd_text(ppd_file_t *ppd, /* I - PPD file */
ppd_attr_t *attr; /* Current attribute */
DEBUG_printf(("ppd_text(ppd=%p, keyword=\"%s\", spec=\"%s\", "
"ll_CC=\"%s\", ll=\"%s\")\n",
ppd, keyword, spec, ll_CC, ll));
/*
* Look for Keyword.ll_CC, then Keyword.ll...
*/
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll_CC, keyword);
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", keyword, ll_CC);
if ((attr = ppdFindAttr(ppd, lkeyword, spec)) == NULL)
{
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll, keyword);
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", keyword, ll);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
#ifdef DEBUG
if (attr)
printf(" *%s %s/%s: \"%s\"\n", attr->name, attr->spec, attr->text,
attr->value ? attr->value : "");
else
puts(" NOT FOUND");
#endif /* DEBUG */
/*
* Return text if we find it...
*/
+26 -17
Ver Arquivo
@@ -62,14 +62,15 @@ static void ppd_defaults(ppd_file_t *ppd, ppd_group_t *g);
int /* O - Number of conflicts found */
ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
{
int i, j, /* Looping variables */
int i, j, k, /* Looping variables */
conflicts; /* Number of conflicts */
ppd_const_t *c; /* Current constraint */
ppd_group_t *g, *sg; /* Groups */
ppd_option_t *o1, *o2; /* Options */
ppd_choice_t *c1, *c2; /* Choices */
if (!ppd)
if (ppd == NULL)
return (0);
/*
@@ -78,8 +79,15 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
conflicts = 0;
for (o1 = ppdFirstOption(ppd); o1; o1 = ppdNextOption(ppd))
o1->conflicted = 0;
for (i = ppd->num_groups, g = ppd->groups; i > 0; i --, g ++)
{
for (j = g->num_options, o1 = g->options; j > 0; j --, o1 ++)
o1->conflicted = 0;
for (j = g->num_subgroups, sg = g->subgroups; j > 0; j --, sg ++)
for (k = sg->num_options, o1 = sg->options; k > 0; k --, o1 ++)
o1->conflicted = 0;
}
/*
* Loop through all of the UI constraints and flag any options
@@ -94,9 +102,9 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
o1 = ppdFindOption(ppd, c->option1);
if (!o1)
if (o1 == NULL)
continue;
else if (c->choice1[0])
else if (c->choice1[0] != '\0')
{
/*
* This constraint maps to a specific choice.
@@ -114,10 +122,10 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
if (c1->marked)
break;
if (!j ||
!strcasecmp(c1->choice, "None") ||
!strcasecmp(c1->choice, "Off") ||
!strcasecmp(c1->choice, "False"))
if (j == 0 ||
strcasecmp(c1->choice, "None") == 0 ||
strcasecmp(c1->choice, "Off") == 0 ||
strcasecmp(c1->choice, "False") == 0)
c1 = NULL;
}
@@ -127,9 +135,9 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
o2 = ppdFindOption(ppd, c->option2);
if (!o2)
if (o2 == NULL)
continue;
else if (c->choice2[0])
else if (c->choice2[0] != '\0')
{
/*
* This constraint maps to a specific choice.
@@ -147,10 +155,10 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
if (c2->marked)
break;
if (!j ||
!strcasecmp(c2->choice, "None") ||
!strcasecmp(c2->choice, "Off") ||
!strcasecmp(c2->choice, "False"))
if (j == 0 ||
strcasecmp(c2->choice, "None") == 0 ||
strcasecmp(c2->choice, "Off") == 0 ||
strcasecmp(c2->choice, "False") == 0)
c2 = NULL;
}
@@ -158,7 +166,8 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
* If both options are marked then there is a conflict...
*/
if (c1 && c1->marked && c2 && c2->marked)
if (c1 != NULL && c1->marked &&
c2 != NULL && c2->marked)
{
DEBUG_printf(("%s->%s conflicts with %s->%s (%s %s %s %s)\n",
o1->keyword, c1->choice, o2->keyword, c2->choice,
+1 -1
Ver Arquivo
@@ -104,7 +104,7 @@ cupsNotifySubject(cups_lang_t *lang, /* I - Language data */
case IPP_JOB_STOPPED :
state = _cupsLangString(lang, _("stopped"));
break;
case IPP_JOB_CANCELED :
case IPP_JOB_CANCELLED :
state = _cupsLangString(lang, _("canceled"));
break;
case IPP_JOB_ABORTED :
+5 -113
Ver Arquivo
@@ -1549,18 +1549,6 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
goto error;
case 2 : /* Two options... */
/*
* Check for broken constraints like "* Option"...
*/
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
(!strcmp(constraint->option1, "*") ||
!strcmp(constraint->choice1, "*")))
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
/*
* The following strcpy's are safe, as optionN and
* choiceN are all the same size (size defined by PPD spec...)
@@ -1568,38 +1556,17 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (constraint->option1[0] == '*')
_cups_strcpy(constraint->option1, constraint->option1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->choice1[0] == '*')
_cups_strcpy(constraint->option2, constraint->choice1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
else
_cups_strcpy(constraint->option2, constraint->choice1);
constraint->choice1[0] = '\0';
constraint->choice2[0] = '\0';
break;
case 3 : /* Two options, one choice... */
/*
* Check for broken constraints like "* Option"...
*/
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
(!strcmp(constraint->option1, "*") ||
!strcmp(constraint->choice1, "*") ||
!strcmp(constraint->option2, "*")))
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
/*
* The following _cups_strcpy's are safe, as optionN and
* choiceN are all the same size (size defined by PPD spec...)
@@ -1607,21 +1574,9 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
if (constraint->option1[0] == '*')
_cups_strcpy(constraint->option1, constraint->option1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->choice1[0] == '*')
{
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
constraint->option2[0] == '*')
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
_cups_strcpy(constraint->choice2, constraint->option2);
_cups_strcpy(constraint->option2, constraint->choice1 + 1);
constraint->choice1[0] = '\0';
@@ -1630,85 +1585,20 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
{
if (constraint->option2[0] == '*')
_cups_strcpy(constraint->option2, constraint->option2 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
constraint->choice2[0] = '\0';
}
break;
case 4 : /* Two options, two choices... */
/*
* Check for broken constraints like "* Option"...
*/
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
(!strcmp(constraint->option1, "*") ||
!strcmp(constraint->choice1, "*") ||
!strcmp(constraint->option2, "*") ||
!strcmp(constraint->choice2, "*")))
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->option1[0] == '*')
_cups_strcpy(constraint->option1, constraint->option1 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
constraint->choice1[0] == '*')
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (constraint->option2[0] == '*')
_cups_strcpy(constraint->option2, constraint->option2 + 1);
else if (cg->ppd_conform == PPD_CONFORM_STRICT)
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
if (cg->ppd_conform == PPD_CONFORM_STRICT &&
constraint->choice2[0] == '*')
{
cg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
}
break;
}
/*
* Handle CustomFoo option constraints...
*/
if (!strncasecmp(constraint->option1, "Custom", 6) &&
!strcasecmp(constraint->choice1, "True"))
{
_cups_strcpy(constraint->option1, constraint->option1 + 6);
strcpy(constraint->choice1, "Custom");
}
if (!strncasecmp(constraint->option2, "Custom", 6) &&
!strcasecmp(constraint->choice2, "True"))
{
_cups_strcpy(constraint->option2, constraint->option2 + 6);
strcpy(constraint->choice2, "Custom");
}
/*
* Don't add this one as an attribute...
*/
ppd_free(string);
string = NULL;
}
@@ -2147,8 +2037,10 @@ ppd_compare_attrs(ppd_attr_t *a, /* I - First attribute */
if ((ret = strcasecmp(a->name, b->name)) != 0)
return (ret);
else
else if (a->spec[0] && b->spec[0])
return (strcasecmp(a->spec, b->spec));
else
return (0);
}
+12 -14
Ver Arquivo
@@ -3,7 +3,7 @@
*
* Temp file utilities for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-2006 by Easy Software Products.
* Copyright 1997-2005 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
@@ -25,9 +25,9 @@
*
* Contents:
*
* cupsTempFd() - Creates a temporary file.
* cupsTempFile() - Generates a temporary filename.
* cupsTempFile2() - Creates a temporary CUPS file.
* cupsTempFd() - Create a temporary file.
* cupsTempFile() - Generate a temporary filename.
* cupsTempFile2() - Create a temporary CUPS file.
*/
/*
@@ -48,13 +48,12 @@
/*
* 'cupsTempFd()' - Creates a temporary file.
* 'cupsTempFd()' - Create a temporary file.
*
* The temporary filename is returned in the filename buffer.
* The temporary file is opened for reading and writing.
* The temporary filename is stored in the filename buffer.
*/
int /* O - New file descriptor or -1 on error */
int /* O - New file descriptor */
cupsTempFd(char *filename, /* I - Pointer to buffer */
int len) /* I - Size of buffer */
{
@@ -159,16 +158,16 @@ cupsTempFd(char *filename, /* I - Pointer to buffer */
/*
* 'cupsTempFile()' - Generates a temporary filename.
* 'cupsTempFile()' - Generate a temporary filename.
*
* The temporary filename is returned in the filename buffer.
* The temporary filename is stored in the filename buffer.
* This function is deprecated - use cupsTempFd() or cupsTempFile2()
* instead.
*
* @deprecated@
*/
char * /* O - Filename or NULL on error */
char * /* O - Filename */
cupsTempFile(char *filename, /* I - Pointer to buffer */
int len) /* I - Size of buffer */
{
@@ -208,10 +207,9 @@ cupsTempFile(char *filename, /* I - Pointer to buffer */
/*
* 'cupsTempFile2()' - Creates a temporary CUPS file.
* 'cupsTempFile2()' - Create a temporary CUPS file.
*
* The temporary filename is returned in the filename buffer.
* The temporary file is opened for writing.
* The temporary filename is stored in the filename buffer.
*
* @since CUPS 1.2@
*/
-2
Ver Arquivo
@@ -84,8 +84,6 @@ static uri_test_t uri_tests[] = /* URI test data */
"http", "username:password", "server", "/", 8080, 8080 },
{ HTTP_URI_OK, "http://username:passwor%64@server:8080/directory/filename",
"http", "username:password", "server", "/directory/filename", 8080, 8080 },
{ HTTP_URI_OK, "http://[2000::10:100]:631/ipp",
"http", "", "2000::10:100", "/ipp", 631, 631 },
{ HTTP_URI_OK, "https://username:passwor%64@server/directory/filename",
"https", "username:password", "server", "/directory/filename", 443, 0 },
{ HTTP_URI_OK, "ipp://username:passwor%64@[::1]/ipp",
+3 -2
Ver Arquivo
@@ -82,6 +82,7 @@ main(int argc, /* I - Argument Count */
/* "A != <CJK U+4E42>." - use Windows 950 (Big5) or EUC-TW */
cups_utf8_t utf8dest[1024]; /* UTF-8 destination string */
cups_utf32_t utf32dest[1024]; /* UTF-32 destination string */
_cups_vmap_t *vmap; /* VBCS charmap pointer */
/*
@@ -189,7 +190,7 @@ main(int argc, /* I - Argument Count */
fputs("_cupsCharmapGet(CUPS_EUC_JP): ", stdout);
if (!_cupsCharmapGet(CUPS_EUC_JP))
if ((vmap = (_cups_vmap_t *)_cupsCharmapGet(CUPS_EUC_JP)) == NULL)
{
errors ++;
puts("FAIL");
@@ -203,7 +204,7 @@ main(int argc, /* I - Argument Count */
fputs("_cupsCharmapGet(CUPS_EUC_TW): ", stdout);
if (!_cupsCharmapGet(CUPS_EUC_TW))
if ((vmap = (_cups_vmap_t *)_cupsCharmapGet(CUPS_EUC_TW)) == NULL)
{
errors ++;
puts("FAIL");
+1 -17
Ver Arquivo
@@ -192,18 +192,10 @@ main(int argc, /* I - Number of command-line arguments */
else
{
int i, j, k; /* Looping vars */
ppd_attr_t *attr; /* Current attribute */
ppd_group_t *group; /* Option group */
ppd_option_t *option; /* Option */
char lang[255]; /* LANG environment variable */
if (argc > 2)
{
snprintf(lang, sizeof(lang), "LANG=%s", argv[2]);
putenv(lang);
}
ppdLocalize(ppd);
for (i = ppd->num_groups, group = ppd->groups;
@@ -211,7 +203,7 @@ main(int argc, /* I - Number of command-line arguments */
i --, group ++)
{
printf("%s (%s):\n", group->name, group->text);
for (j = group->num_options, option = group->options;
j > 0;
j --, option ++)
@@ -223,14 +215,6 @@ main(int argc, /* I - Number of command-line arguments */
option->choices[k].text);
}
}
puts("Attributes:");
for (attr = (ppd_attr_t *)cupsArrayFirst(ppd->sorted_attrs);
attr;
attr = (ppd_attr_t *)cupsArrayNext(ppd->sorted_attrs))
printf(" *%s %s/%s: \"%s\"\n", attr->name, attr->spec,
attr->text, attr->value ? attr->value : "");
}
}
+4 -3
Ver Arquivo
@@ -408,6 +408,7 @@ cupsUTF8ToUTF32(
const cups_utf8_t *src, /* I - Source string */
const int maxout) /* I - Max output */
{
size_t srclen; /* Source string length */
int i; /* Looping variable */
cups_utf8_t ch; /* Character value */
cups_utf8_t next; /* Next character value */
@@ -429,6 +430,7 @@ cupsUTF8ToUTF32(
*/
*dest++ = 0xfeff;
srclen = strlen((char *)src);
for (i = maxout - 1; *src && i > 0; i --)
{
@@ -445,7 +447,6 @@ cupsUTF8ToUTF32(
*/
*dest++ = ch;
continue;
}
else if ((ch & 0xe0) == 0xc0)
{
@@ -541,7 +542,7 @@ cupsUTF8ToUTF32(
* Check for UTF-16 surrogate (illegal UTF-8)...
*/
if (ch32 >= 0xd800 && ch32 <= 0xdfff)
if (*dest >= 0xd800 && *dest <= 0xdfff)
return (-1);
}
@@ -1141,7 +1142,7 @@ free_vbcs_charmap(_cups_vmap_t *vmap) /* I - Character set */
*/
static void * /* O - Charset map pointer */
void * /* O - Charset map pointer */
get_charmap(
const cups_encoding_t encoding) /* I - Encoding */
{
-16
Ver Arquivo
@@ -49,7 +49,6 @@
#ifdef WIN32
# include <windows.h>
#endif /* WIN32 */
#include "debug.h"
/*
@@ -225,21 +224,15 @@ cupsServer(void)
linenum = 0;
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum) != NULL)
{
DEBUG_printf(("cupsServer: %d: %s %s\n", linenum, line,
value ? value : "(null)"));
if (!strcasecmp(line, "ServerName") && value)
{
/*
* Got it!
*/
DEBUG_puts("cupsServer: Got a ServerName line!");
server = value;
break;
}
}
cupsFileClose(fp);
}
@@ -249,8 +242,6 @@ cupsServer(void)
* Copy the server name over and set the port number, if any...
*/
DEBUG_printf(("cupsServer: Using server \"%s\"...\n", server));
strlcpy(cg->server, server, sizeof(cg->server));
if (cg->server[0] != '/' && (port = strrchr(cg->server, ':')) != NULL &&
@@ -258,7 +249,6 @@ cupsServer(void)
{
*port++ = '\0';
DEBUG_printf(("cupsServer: Using port %d...\n", atoi(port)));
ippSetPort(atoi(port));
}
@@ -481,17 +471,11 @@ cups_open_client_conf(void)
snprintf(filename, sizeof(filename), "%s/.cups/client.conf", home);
if ((fp = cupsFileOpen(filename, "r")) != NULL)
{
DEBUG_printf(("cups_open_client_conf: Using \"%s\"...\n", filename));
return (fp);
}
snprintf(filename, sizeof(filename), "%s/.cupsrc", home);
if ((fp = cupsFileOpen(filename, "r")) != NULL)
{
DEBUG_printf(("cups_open_client_conf: Using \"%s\"...\n", filename));
return (fp);
}
}
snprintf(filename, sizeof(filename), "%s/client.conf", cg->cups_serverroot);
+4 -8
Ver Arquivo
@@ -1,10 +1,14 @@
[Desktop Entry]
Categories=Application;System;X-Red-Hat-Base;
Comment=CUPS Web Interface
Comment[en_US]=CUPS Web Interface
Encoding=UTF-8
Exec=htmlview http://localhost:631/
GenericName=
GenericName[en_US]=
Icon=cups
MimeType=
Name=Manage Printing
Path=
StartupNotify=false
Terminal=false
@@ -13,13 +17,5 @@ Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Name=Manage Printing
Comment=CUPS Web Interface
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[pl]=Zarządzanie drukowaniem
Comment[pl]=Interfejs WWW CUPS
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 595 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 443 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 472 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 563 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 636 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 513 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 612 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 644 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 419 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 355 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 506 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 522 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 721 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 874 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 313 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 451 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 523 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 450 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 571 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 541 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 537 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 552 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 475 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 606 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 768 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 630 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 560 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 649 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 534 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 551 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 709 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 329 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 753 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 742 B

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais