Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet fdf9fe37b2 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.3.0@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
146 arquivos alterados com 6741 adições e 4304 exclusões
+1 -68
Ver Arquivo
@@ -1,73 +1,6 @@
CHANGES.txt - 2007-09-18
CHANGES.txt - 2007-08-13
------------------------
CHANGES IN CUPS V1.3.2
- The 1.3.1 release was incorrectly created from the
1.4.x source tree (STR #2519)
- Added support for 32/64-bit libraries on HP-UX
(STR #2520)
- The scheduler incorrectly used portrait as the default
orientation (STR #2513)
- The scheduler no longer writes the printcap file for
every remote printer update (STR #2512)
- Remote raw printing with multiple copies did not work
(STR #2518)
- Updated the configure script to require at least autoconf
2.60 (STR #2515)
- Some gzip'd PPD files were not read in their entirety
(STR #2510)
CHANGES IN CUPS V1.3.1
- Documentation updates.
- The USB backend on Mac OS X could hang if the driver and
printer did not match.
- Delegated Kerberos credentials were not working.
- "make distclean" incorrectly removed the edit-config.tmpl
files (STR #2508)
- Fix compile problem on HP-UX (STR #2501)
- The cupstestppd utility now tests for resolutions greater
than 99999 DPI to detect a missing "x" between the X and Y
resolutions.
- Fixed many problems in the various translations and added
a new "checkpo" utility to validate them.
- The cupstestppd utility now tests the custom page size code
for CUPS raster drivers.
- cupsLangDefault() did not attempt to return a language that
was supported by the calling application.
- If a remote printer stopped while a job was being sent, the
local queue would also get stopped and the job re-queued,
resulting in duplicate prints in some cases.
- A few Apple-specific job options needed to be omitted when
printing a banner page.
- The new peer credential support did not compile on FreeBSD
(STR #2495)
- Direct links to help files did not set the current section
so the table-of-contents was not shown.
- The configure script did not support --localedir=foo (STR #2488)
- The backends were not displaying their localized messages.
- CUPS-Authenticate-Job did not require Kerberos authentication
on queues protected by Kerberos.
- The Zebra ZPL driver did not work with Brady label printers
(STR #2487)
- Norwegian wasn't localized on Mac OS X.
- getnameinfo() returns an error on some systems when DNS is
not available, leading to numerous problems (STR #2486)
- The cupsfilter command did not work properly on Mac OS X.
- The scheduler makefile contained a typo (STR #2483)
- The TBCP and BCP port monitors did not handle the trailing
CTRL-D in some PostScript output properly.
- Fixed the localization instructions and German template for
the "Find New Printers" button (STR #2478)
- The web interface did not work with the Chinese localization
(STR #2477)
- The web interface home page did not work for languages that
were only partially localized (STR #2472)
- Updated the Spanish web interface localization (STR #2473)
- ppdLocalize() did not work for country-specific localizations.
CHANGES IN CUPS V1.3.0
+2 -3
Ver Arquivo
@@ -1,4 +1,4 @@
CREDITS.txt - 2007-09-10
CREDITS.txt - 2007-02-05
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
@@ -19,7 +19,6 @@ like to thank the following individuals for their contributions:
Till Kamppeter - Bug fixes, beta testing, evangelism.
Kenshi Muto - Japanese localization, patches, and
testing.
Tomohiro Kato - Japanese localization.
Kiko - Bug fixes.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Marek Laane - Estonian translation.
@@ -37,7 +36,7 @@ like to thank the following individuals for their contributions:
Opher Shachar - Hebrew localization.
Stuart Stevens - HP JetDirect IPP information.
Andrea Suatoni - IRIX desktop integration and testing.
Teppo Turlianen - Finnish localization.
Tomohiro Kato - Japanese localization.
Tim Waugh - Lots of patches, testing, and Linux
integration.
Yugami - LDAP browsing support.
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
INSTALL - CUPS v1.3.2 - 2007-09-18
INSTALL - CUPS v1.3.0 - 2007-08-13
----------------------------------
This file describes how to compile and install CUPS from source
+2 -1
Ver Arquivo
@@ -63,8 +63,9 @@ distclean: clean
$(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
$(RM) man/cupsd.conf.man man/lpoptions.man
$(RM) packaging/cups.list
$(RM) templates/header.tmpl
$(RM) templates/edit-config.tmpl templates/header.tmpl
-$(RM) doc/*/index.html
-$(RM) templates/*/edit-config.tmpl
-$(RM) templates/*/header.tmpl
-$(RM) -r autom4te*.cache
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
README - CUPS v1.3.2 - 2007-09-18
README - CUPS v1.3.0 - 2007-08-13
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
+131 -160
Ver Arquivo
@@ -67,12 +67,12 @@ static void cancel_job(http_t *http, const char *uri, int id,
const char *resource, const char *user, int version);
static void check_printer_state(http_t *http, const char *uri,
const char *resource, const char *user,
int version, int job_id);
int version);
#ifdef HAVE_LIBZ
static void compress_files(int num_files, char **files);
#endif /* HAVE_LIBZ */
static const char *password_cb(const char *);
static int report_printer_state(ipp_t *ipp, int job_id);
static int report_printer_state(ipp_t *ipp);
#ifdef __APPLE__
static int run_pictwps_filter(char **argv, const char *filename);
@@ -102,9 +102,9 @@ main(int argc, /* I - Number of command-line args */
resource[1024], /* Resource info (printer name) */
addrname[256], /* Address name */
*optptr, /* Pointer to URI options */
*name, /* Name of option */
*value, /* Value of option */
sep; /* Separator character */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int num_files; /* Number of files to print */
char **files, /* Files to print */
*filename; /* Pointer to single filename */
@@ -132,8 +132,7 @@ main(int argc, /* I - Number of command-line args */
ipp_attribute_t *printer_accepting; /* printer-is-accepting-jobs */
int copies, /* Number of copies for job */
copies_remaining; /* Number of copies remaining */
const char *content_type, /* CONTENT_TYPE environment variable */
*final_content_type; /* FINAL_CONTENT_TYPE environment var */
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 */
@@ -200,9 +199,8 @@ main(int argc, /* I - Number of command-line args */
}
else if (argc < 6)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_STOP);
}
@@ -210,16 +208,12 @@ main(int argc, /* I - Number of command-line args */
* Get the (final) content type...
*/
if ((content_type = getenv("CONTENT_TYPE")) == NULL)
content_type = "application/octet-stream";
if ((content_type = getenv("FINAL_CONTENT_TYPE")) == NULL)
if ((content_type = getenv("CONTENT_TYPE")) == NULL)
content_type = "application/octet-stream";
if ((final_content_type = getenv("FINAL_CONTENT_TYPE")) == NULL)
{
final_content_type = content_type;
if (!strncmp(final_content_type, "printer/", 8))
final_content_type = "application/vnd.cups-raw";
}
if (!strncmp(content_type, "printer/", 8))
content_type = "application/vnd.cups-raw";
/*
* Extract the hostname and printer name from the URI...
@@ -230,9 +224,8 @@ main(int argc, /* I - Number of command-line args */
hostname, sizeof(hostname), &port,
resource, sizeof(resource)) < HTTP_URI_OK)
{
_cupsLangPuts(stderr,
_("ERROR: Missing device URI on command-line and no "
"DEVICE_URI environment variable!\n"));
fputs(_("ERROR: Missing device URI on command-line and no "
"DEVICE_URI environment variable!\n"), stderr);
return (CUPS_BACKEND_STOP);
}
@@ -270,30 +263,29 @@ main(int argc, /* I - Number of command-line args */
* Get the name...
*/
name = optptr;
for (ptr = name; *optptr && *optptr != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *optptr++;
*ptr = '\0';
while (*optptr && *optptr != '=' && *optptr != '+' && *optptr != '&')
optptr ++;
if ((sep = *optptr) != '\0')
*optptr++ = '\0';
if (sep == '=')
if (*optptr == '=')
{
/*
* Get the value...
*/
value = optptr;
optptr ++;
while (*optptr && *optptr != '+' && *optptr != '&')
for (ptr = value; *optptr && *optptr != '+' && *optptr != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *optptr++;
*ptr = '\0';
if (*optptr == '+' || *optptr == '&')
optptr ++;
if (*optptr)
*optptr++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -335,7 +327,7 @@ main(int argc, /* I - Number of command-line args */
cupsSetEncryption(HTTP_ENCRYPT_IF_REQUESTED);
else
{
_cupsLangPrintf(stderr,
fprintf(stderr,
_("ERROR: Unknown encryption option value \"%s\"!\n"),
value);
}
@@ -348,7 +340,7 @@ main(int argc, /* I - Number of command-line args */
version = 1;
else
{
_cupsLangPrintf(stderr,
fprintf(stderr,
_("ERROR: Unknown version option value \"%s\"!\n"),
value);
}
@@ -377,9 +369,8 @@ main(int argc, /* I - Number of command-line args */
* Unknown option...
*/
_cupsLangPrintf(stderr,
_("ERROR: Unknown option \"%s\" with value \"%s\"!\n"),
name, value);
fprintf(stderr, _("ERROR: Unknown option \"%s\" with value \"%s\"!\n"),
name, value);
}
}
}
@@ -431,9 +422,10 @@ main(int argc, /* I - Number of command-line args */
* Point to the single file from stdin...
*/
filename = tmpfilename;
num_files = 1;
files = &filename;
filename = tmpfilename;
files = &filename;
num_files = 1;
send_options = 0;
}
else
@@ -442,9 +434,10 @@ main(int argc, /* I - Number of command-line args */
* Point to the files on the command-line...
*/
num_files = argc - 6;
files = argv + 6;
send_options = 1;
num_files = argc - 6;
files = argv + 6;
send_options = strncasecmp(content_type, "application/vnd.cups-", 21) != 0;
#ifdef HAVE_LIBZ
if (compression)
@@ -477,9 +470,7 @@ main(int argc, /* I - Number of command-line args */
* Try loading authentication information from the environment.
*/
const char *ptr = getenv("AUTH_USERNAME");
if (ptr)
if ((ptr = getenv("AUTH_USERNAME")) != NULL)
cupsSetUser(ptr);
password = getenv("AUTH_PASSWORD");
@@ -497,8 +488,8 @@ main(int argc, /* I - Number of command-line args */
do
{
_cupsLangPrintf(stderr, _("INFO: Connecting to %s on port %d...\n"),
hostname, port);
fprintf(stderr, _("INFO: Connecting to %s on port %d...\n"),
hostname, port);
if ((http = httpConnectEncrypt(hostname, port, cupsEncryption())) == NULL)
{
@@ -514,9 +505,8 @@ main(int argc, /* I - Number of command-line args */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
if (argc == 6 || strcmp(filename, argv[6]))
unlink(filename);
@@ -535,16 +525,16 @@ main(int argc, /* I - Number of command-line args */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"),
hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
sleep(delay);
@@ -553,8 +543,8 @@ main(int argc, /* I - Number of command-line args */
}
else if (h_errno)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
fprintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
return (CUPS_BACKEND_STOP);
}
else
@@ -562,9 +552,8 @@ main(int argc, /* I - Number of command-line args */
recoverable = 1;
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
_cupsLangPuts(stderr,
_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"));
fputs(_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"), stderr);
sleep(30);
}
@@ -583,7 +572,7 @@ main(int argc, /* I - Number of command-line args */
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
fprintf(stderr, _("INFO: Connected to %s...\n"), hostname);
#ifdef AF_INET6
if (http->hostaddr->addr.sa_family == AF_INET6)
@@ -649,18 +638,18 @@ main(int argc, /* I - Number of command-line args */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"),
hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
report_printer_state(supported, 0);
report_printer_state(supported);
sleep(delay);
@@ -674,15 +663,14 @@ main(int argc, /* I - Number of command-line args */
* Switch to IPP/1.0...
*/
_cupsLangPuts(stderr,
_("INFO: Printer does not support IPP/1.1, trying "
"IPP/1.0...\n"));
fputs(_("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n"),
stderr);
version = 0;
httpReconnect(http);
}
else if (ipp_status == IPP_NOT_FOUND)
{
_cupsLangPuts(stderr, _("ERROR: Destination printer does not exist!\n"));
fputs(_("ERROR: Destination printer does not exist!\n"), stderr);
if (supported)
ippDelete(supported);
@@ -691,9 +679,8 @@ main(int argc, /* I - Number of command-line args */
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to get printer status (%s)!\n"),
cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to get printer status (%s)!\n"),
cupsLastErrorString());
sleep(10);
}
@@ -726,7 +713,7 @@ main(int argc, /* I - Number of command-line args */
format_sup->values[i].string.text);
}
report_printer_state(supported, 0);
report_printer_state(supported);
}
while (ipp_status > IPP_OK_CONFLICT);
@@ -755,9 +742,8 @@ main(int argc, /* I - Number of command-line args */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
ippDelete(supported);
httpClose(http);
@@ -862,7 +848,8 @@ main(int argc, /* I - Number of command-line args */
num_options = cupsParseOptions(argv[5], 0, &options);
#ifdef __APPLE__
if (!strcasecmp(content_type, "application/pictwps") && num_files == 1)
if (content_type != NULL &&
!strcasecmp(content_type, "application/pictwps") && num_files == 1)
{
if (format_sup != NULL)
{
@@ -888,23 +875,23 @@ main(int argc, /* I - Number of command-line args */
* number of copies to 1...
*/
final_content_type = "application/postscript";
copies = 1;
copies_remaining = 1;
send_options = 0;
content_type = "application/postscript";
copies = 1;
copies_remaining = 1;
send_options = 0;
}
}
#endif /* __APPLE__ */
if (format_sup != NULL)
if (content_type != NULL && format_sup != NULL)
{
for (i = 0; i < format_sup->num_values; i ++)
if (!strcasecmp(final_content_type, format_sup->values[i].string.text))
if (!strcasecmp(content_type, format_sup->values[i].string.text))
break;
if (i < format_sup->num_values)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
"document-format", NULL, final_content_type);
"document-format", NULL, content_type);
}
if (copies_sup && version > 0 && send_options)
@@ -957,8 +944,7 @@ main(int argc, /* I - Number of command-line args */
if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
ipp_status == IPP_PRINTER_BUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 10 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 10 seconds...\n"), stderr);
sleep(10);
}
else if ((ipp_status == IPP_BAD_REQUEST ||
@@ -968,28 +954,25 @@ main(int argc, /* I - Number of command-line args */
* Switch to IPP/1.0...
*/
_cupsLangPuts(stderr,
_("INFO: Printer does not support IPP/1.1, trying "
"IPP/1.0...\n"));
fputs(_("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n"),
stderr);
version = 0;
httpReconnect(http);
}
else
_cupsLangPrintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"),
cupsLastErrorString());
fprintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"),
cupsLastErrorString());
}
else if ((job_id_attr = ippFindAttribute(response, "job-id",
IPP_TAG_INTEGER)) == NULL)
{
_cupsLangPuts(stderr,
_("NOTICE: Print file accepted - job ID unknown.\n"));
fputs(_("NOTICE: Print file accepted - job ID unknown.\n"), stderr);
job_id = 0;
}
else
{
job_id = job_id_attr->values[0].integer;
_cupsLangPrintf(stderr, _("NOTICE: Print file accepted - job ID %d.\n"),
job_id);
fprintf(stderr, _("NOTICE: Print file accepted - job ID %d.\n"), job_id);
}
ippDelete(response);
@@ -1027,9 +1010,8 @@ main(int argc, /* I - Number of command-line args */
{
ipp_status = cupsLastError();
_cupsLangPrintf(stderr,
_("ERROR: Unable to add file %d to job: %s\n"),
job_id, cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to add file %d to job: %s\n"),
job_id, cupsLastErrorString());
break;
}
}
@@ -1053,7 +1035,7 @@ main(int argc, /* I - Number of command-line args */
if (!job_id || !waitjob)
continue;
_cupsLangPuts(stderr, _("INFO: Waiting for job to complete...\n"));
fputs(_("INFO: Waiting for job to complete...\n"), stderr);
for (; !job_cancelled;)
{
@@ -1107,9 +1089,8 @@ main(int argc, /* I - Number of command-line args */
{
ippDelete(response);
_cupsLangPrintf(stderr,
_("ERROR: Unable to get job %d attributes (%s)!\n"),
job_id, cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to get job %d attributes (%s)!\n"),
job_id, cupsLastErrorString());
break;
}
}
@@ -1143,7 +1124,7 @@ main(int argc, /* I - Number of command-line args */
* Check the printer state and report it if necessary...
*/
check_printer_state(http, uri, resource, argv[2], version, job_id);
check_printer_state(http, uri, resource, argv[2], version);
/*
* Wait 10 seconds before polling again...
@@ -1164,7 +1145,7 @@ main(int argc, /* I - Number of command-line args */
* Check the printer state and report it if necessary...
*/
check_printer_state(http, uri, resource, argv[2], version, job_id);
check_printer_state(http, uri, resource, argv[2], version);
/*
* Free memory...
@@ -1230,7 +1211,7 @@ cancel_job(http_t *http, /* I - HTTP connection */
ipp_t *request; /* Cancel-Job request */
_cupsLangPuts(stderr, _("INFO: Canceling print job...\n"));
fputs(_("INFO: Canceling print job...\n"), stderr);
request = ippNewRequest(IPP_CANCEL_JOB);
request->request.op.version[1] = version;
@@ -1250,8 +1231,8 @@ cancel_job(http_t *http, /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, resource));
if (cupsLastError() > IPP_OK_CONFLICT)
_cupsLangPrintf(stderr, _("ERROR: Unable to cancel job %d: %s\n"), id,
cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to cancel job %d: %s\n"), id,
cupsLastErrorString());
}
@@ -1265,8 +1246,7 @@ check_printer_state(
const char *uri, /* I - Printer URI */
const char *resource, /* I - Resource path */
const char *user, /* I - Username, if any */
int version, /* I - IPP version */
int job_id) /* I - Current job ID */
int version) /* I - IPP version */
{
ipp_t *request, /* IPP request */
*response; /* IPP response */
@@ -1301,7 +1281,7 @@ check_printer_state(
if ((response = cupsDoRequest(http, request, resource)) != NULL)
{
report_printer_state(response, job_id);
report_printer_state(response);
ippDelete(response);
}
}
@@ -1332,25 +1312,25 @@ compress_files(int num_files, /* I - Number of files */
{
if ((fd = cupsTempFd(filename, sizeof(filename))) < 0)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to create temporary compressed print "
"file: %s\n"), strerror(errno));
fprintf(stderr,
_("ERROR: Unable to create temporary compressed print file: "
"%s\n"),
strerror(errno));
exit(CUPS_BACKEND_FAILED);
}
if ((out = cupsFileOpenFd(fd, "w9")) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open temporary compressed print "
"file: %s\n"), strerror(errno));
fprintf(stderr,
_("ERROR: Unable to open temporary compressed print file: %s\n"),
strerror(errno));
exit(CUPS_BACKEND_FAILED);
}
if ((in = cupsFileOpen(files[i], "r")) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open print file \"%s\": %s\n"),
files[i], strerror(errno));
fprintf(stderr, _("ERROR: Unable to open print file \"%s\": %s\n"),
files[i], strerror(errno));
cupsFileClose(out);
exit(CUPS_BACKEND_FAILED);
}
@@ -1359,9 +1339,8 @@ compress_files(int num_files, /* I - Number of files */
while ((bytes = cupsFileRead(in, buffer, sizeof(buffer))) > 0)
if (cupsFileWrite(out, buffer, bytes) < bytes)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to write %d bytes to \"%s\": %s\n"),
(int)bytes, filename, strerror(errno));
fprintf(stderr, _("ERROR: Unable to write %d bytes to \"%s\": %s\n"),
(int)bytes, filename, strerror(errno));
cupsFileClose(in);
cupsFileClose(out);
exit(CUPS_BACKEND_FAILED);
@@ -1429,8 +1408,7 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
*/
static int /* O - Number of reasons shown */
report_printer_state(ipp_t *ipp, /* I - IPP response */
int job_id) /* I - Current job ID */
report_printer_state(ipp_t *ipp) /* I - IPP response */
{
int i; /* Looping var */
int count; /* Count of reasons shown... */
@@ -1441,7 +1419,6 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
char unknown[1024]; /* Unknown message string */
const char *prefix; /* Prefix for STATE: line */
char state[1024]; /* State string */
cups_lang_t *language; /* Current localization */
if ((psm = ippFindAttribute(ipp, "printer-state-message",
@@ -1454,20 +1431,15 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
state[0] = '\0';
prefix = "STATE: ";
language = cupsLangDefault();
for (i = 0, count = 0; i < reasons->num_values; i ++)
{
reason = reasons->values[i].string.text;
if (job_id == 0 || strcmp(reason, "paused"))
{
strlcat(state, prefix, sizeof(state));
strlcat(state, reason, sizeof(state));
prefix = ",";
}
strlcat(state, prefix, sizeof(state));
strlcat(state, reason, sizeof(state));
prefix = ",";
message = "";
if (!strncmp(reason, "media-needed", 12))
@@ -1532,11 +1504,11 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
{
count ++;
if (strstr(reasons->values[i].string.text, "error"))
fprintf(stderr, "ERROR: %s\n", _cupsLangString(language, message));
fprintf(stderr, "ERROR: %s\n", message);
else if (strstr(reasons->values[i].string.text, "warning"))
fprintf(stderr, "WARNING: %s\n", _cupsLangString(language, message));
fprintf(stderr, "WARNING: %s\n", message);
else
fprintf(stderr, "INFO: %s\n", _cupsLangString(language, message));
fprintf(stderr, "INFO: %s\n", message);
}
}
@@ -1578,16 +1550,15 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
printer = getenv("PRINTER");
if (!printer)
{
_cupsLangPuts(stderr,
_("ERROR: PRINTER environment variable not defined!\n"));
fputs(_("ERROR: PRINTER environment variable not defined!\n"), stderr);
return (-1);
}
if ((ppdfile = cupsGetPPD(printer)) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to get PPD file for printer \"%s\" - "
"%s.\n"), printer, cupsLastErrorString());
fprintf(stderr,
_("ERROR: Unable to get PPD file for printer \"%s\" - %s.\n"),
printer, cupsLastErrorString());
}
else
{
@@ -1601,8 +1572,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
if ((fd = cupsTempFd(pstmpname, sizeof(pstmpname))) < 0)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to create temporary file - %s.\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to create temporary file - %s.\n"),
strerror(errno));
if (ppdfile)
unlink(ppdfile);
return (-1);
@@ -1658,8 +1629,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
execlp("pictwpstops", printer, argv[1], argv[2], argv[3], argv[4], argv[5],
filename, NULL);
_cupsLangPrintf(stderr, _("ERROR: Unable to exec pictwpstops: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to exec pictwpstops: %s\n"),
strerror(errno));
return (errno);
}
@@ -1671,8 +1642,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
* Error!
*/
_cupsLangPrintf(stderr, _("ERROR: Unable to fork pictwpstops: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to fork pictwpstops: %s\n"),
strerror(errno));
unlink(filename);
if (ppdfile)
unlink(ppdfile);
@@ -1685,8 +1656,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
if (wait(&status) < 0)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to wait for pictwpstops: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to wait for pictwpstops: %s\n"),
strerror(errno));
close(fd);
unlink(filename);
if (ppdfile)
@@ -1702,11 +1673,11 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
if (status)
{
if (status >= 256)
_cupsLangPrintf(stderr, _("ERROR: pictwpstops exited with status %d!\n"),
status / 256);
fprintf(stderr, _("ERROR: pictwpstops exited with status %d!\n"),
status / 256);
else
_cupsLangPrintf(stderr, _("ERROR: pictwpstops exited on signal %d!\n"),
status);
fprintf(stderr, _("ERROR: pictwpstops exited on signal %d!\n"),
status);
unlink(filename);
return (status);
+71 -81
Ver Arquivo
@@ -125,9 +125,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
username[255], /* Username info */
resource[1024], /* Resource info (printer name) */
*options, /* Pointer to options */
*name, /* Name of option */
*value, /* Value of option */
sep, /* Separator character */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr, /* Pointer into name or value */
*filename, /* File to print */
title[256]; /* Title string */
int port; /* Port number */
@@ -186,9 +186,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -277,30 +276,29 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Get the name...
*/
name = options;
for (ptr = name; *options && *options != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *options++;
*ptr = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
* Get the value...
*/
value = options;
options ++;
while (*options && *options != '+' && *options != '&')
for (ptr = value; *options && *options != '+' && *options != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+' || *options == '&')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -324,8 +322,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (strchr("cdfglnoprtv", value[0]))
format = value[0];
else
_cupsLangPrintf(stderr, _("ERROR: Unknown format character \"%c\"\n"),
value[0]);
fprintf(stderr, _("ERROR: Unknown format character \"%c\"\n"),
value[0]);
}
else if (!strcasecmp(name, "mode") && value[0])
{
@@ -338,8 +336,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
else if (!strcasecmp(value, "stream"))
mode = MODE_STREAM;
else
_cupsLangPrintf(stderr, _("ERROR: Unknown print mode \"%s\"\n"),
value);
fprintf(stderr, _("ERROR: Unknown print mode \"%s\"\n"), value);
}
else if (!strcasecmp(name, "order") && value[0])
{
@@ -352,8 +349,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
else if (!strcasecmp(value, "data,control"))
order = ORDER_DATA_CONTROL;
else
_cupsLangPrintf(stderr, _("ERROR: Unknown file order \"%s\"\n"),
value);
fprintf(stderr, _("ERROR: Unknown file order \"%s\"\n"), value);
}
else if (!strcasecmp(name, "reserve"))
{
@@ -461,8 +457,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (fd == -1)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to open print file %s: %s\n"),
filename, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open print file %s: %s\n"),
filename, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -480,8 +476,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* the remote end...
*/
char *ptr;
for (ptr = title; *ptr; ptr ++)
if (!isalnum(*ptr & 255) && !isspace(*ptr & 255))
*ptr = '_';
@@ -591,9 +585,9 @@ lpd_command(int fd, /* I - Socket connection to LPD host */
if (recv(fd, &status, 1, 0) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with command "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with command status "
"byte after %d seconds!\n"), timeout);
status = errno;
}
@@ -674,8 +668,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
fprintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"), hostname);
return (CUPS_BACKEND_STOP);
}
@@ -697,9 +690,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
*/
fputs("STATE: +connecting-to-device\n", stderr);
_cupsLangPrintf(stderr,
_("INFO: Attempting to connect to host %s for printer %s\n"),
hostname, printer);
fprintf(stderr,
_("INFO: Attempting to connect to host %s for printer %s\n"),
hostname, printer);
for (lport = reserve == RESERVE_RFC1179 ? 732 : 1024, addr = addrlist,
delay = 5;;
@@ -798,9 +791,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
httpAddrFreeList(addrlist);
@@ -818,15 +810,16 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"), hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
sleep(delay);
@@ -846,9 +839,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
recoverable = 1;
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
_cupsLangPuts(stderr,
_("ERROR: recoverable: Unable to connect to printer; "
"will retry in 30 seconds...\n"));
fputs(_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -866,7 +858,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
fprintf(stderr, _("INFO: Connected to %s...\n"), hostname);
#ifdef AF_INET6
if (addr->addr.addr.sa_family == AF_INET6)
@@ -972,8 +964,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
return (CUPS_BACKEND_FAILED);
}
_cupsLangPrintf(stderr, _("INFO: Sending control file (%u bytes)\n"),
(unsigned)strlen(control));
fprintf(stderr, _("INFO: Sending control file (%u bytes)\n"),
(unsigned)strlen(control));
if (lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
{
@@ -986,9 +978,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if (read(fd, &status, 1) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
status = errno;
}
@@ -996,11 +988,11 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
}
if (status != 0)
_cupsLangPrintf(stderr,
_("ERROR: Remote host did not accept control file "
"(%d)\n"), status);
fprintf(stderr,
_("ERROR: Remote host did not accept control file (%d)\n"),
status);
else
_cupsLangPuts(stderr, _("INFO: Control file sent successfully\n"));
fputs(_("INFO: Control file sent successfully\n"), stderr);
}
else
status = 0;
@@ -1021,13 +1013,13 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
return (CUPS_BACKEND_FAILED);
}
_cupsLangPrintf(stderr,
fprintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sending data file (%lld bytes)\n"),
_("INFO: Sending data file (%lld bytes)\n"),
#else
_("INFO: Sending data file (%ld bytes)\n"),
_("INFO: Sending data file (%ld bytes)\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST filestats.st_size);
CUPS_LLCAST filestats.st_size);
tbytes = 0;
for (copy = 0; copy < manual_copies; copy ++)
@@ -1036,9 +1028,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
while ((nbytes = read(print_fd, buffer, sizeof(buffer))) > 0)
{
_cupsLangPrintf(stderr,
_("INFO: Spooling LPR job, %.0f%% complete...\n"),
100.0 * tbytes / filestats.st_size);
fprintf(stderr, _("INFO: Spooling LPR job, %.0f%% complete...\n"),
100.0 * tbytes / filestats.st_size);
if (lpd_write(fd, buffer, nbytes) < nbytes)
{
@@ -1072,9 +1063,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if (recv(fd, &status, 1, 0) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with data "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with data "
"status byte after %d seconds!\n"), timeout);
status = 0;
}
@@ -1085,11 +1076,10 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
status = 0;
if (status != 0)
_cupsLangPrintf(stderr,
_("ERROR: Remote host did not accept data file (%d)\n"),
status);
fprintf(stderr, _("ERROR: Remote host did not accept data file (%d)\n"),
status);
else
_cupsLangPuts(stderr, _("INFO: Data file sent successfully\n"));
fputs(_("INFO: Data file sent successfully\n"), stderr);
}
if (status == 0 && order == ORDER_DATA_CONTROL)
@@ -1103,8 +1093,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
return (CUPS_BACKEND_FAILED);
}
_cupsLangPrintf(stderr, _("INFO: Sending control file (%lu bytes)\n"),
(unsigned long)strlen(control));
fprintf(stderr, _("INFO: Sending control file (%lu bytes)\n"),
(unsigned long)strlen(control));
if (lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
{
@@ -1117,9 +1107,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if (read(fd, &status, 1) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
status = errno;
}
@@ -1127,11 +1117,11 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
}
if (status != 0)
_cupsLangPrintf(stderr,
_("ERROR: Remote host did not accept control file "
"(%d)\n"), status);
fprintf(stderr,
_("ERROR: Remote host did not accept control file (%d)\n"),
status);
else
_cupsLangPuts(stderr, _("INFO: Control file sent successfully\n"));
fputs(_("INFO: Control file sent successfully\n"), stderr);
}
/*
+52 -63
Ver Arquivo
@@ -242,9 +242,7 @@ int main (int argc, const char * argv[])
/* Try to open the print file... */
if ((fp = fopen(argv[6], "rb")) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open print file \"%s\": %s\n"),
argv[6], strerror(errno));
fprintf(stderr, "ERROR: unable to open print file \"%s\": %s\n", argv[6], strerror(errno));
return (1);
}
@@ -1365,9 +1363,9 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
*resourcePtr,
*typePtr,
*options, /* Pointer to options */
*optionName, /* Name of option */
*value, /* Value of option */
sep; /* Separator character */
optionName[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int port; /* Port number (not used) */
int statusInterval; /* */
@@ -1395,54 +1393,53 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
while (*options != '\0')
{
/*
/*
* Get the name...
*/
for (ptr = optionName; *options && *options != '=' && *options != '+'; )
*ptr++ = *options++;
optionName = options;
*ptr = '\0';
value[0] = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
/*
* Get the value...
*/
*/
options ++;
for (ptr = value; *options && *options != '+';)
*ptr++ = *options++;
value = options;
while (*options && *options != '+' && *options != '&')
options ++;
if (*options)
*options++ = '\0';
*ptr = '\0';
if (*options == '+')
options ++;
}
else if (*options == '+')
{
options ++;
}
else
value = (char *)"";
/*
/*
* Process the option...
*/
if (!strcasecmp(optionName, "waiteof"))
if (strcasecmp(optionName, "waiteof") == 0)
{
/*
* Wait for the end of the print file?
/*
* Set the banner...
*/
if (!strcasecmp(value, "on") ||
!strcasecmp(value, "yes") ||
!strcasecmp(value, "true"))
if (strcasecmp(value, "on") == 0 ||
strcasecmp(value, "yes") == 0 ||
strcasecmp(value, "true") == 0)
{
gWaitEOF = true;
}
else if (!strcasecmp(value, "off") ||
!strcasecmp(value, "no") ||
!strcasecmp(value, "false"))
else if (strcasecmp(value, "off") == 0 ||
strcasecmp(value, "no") == 0 ||
strcasecmp(value, "false") == 0)
{
gWaitEOF = false;
}
@@ -1451,17 +1448,13 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
fprintf(stderr, "WARNING: Boolean expected for waiteof option \"%s\"\n", value);
}
}
else if (!strcasecmp(optionName, "status"))
else if (strcasecmp(optionName, "status") == 0)
{
/*
* Set status reporting interval...
*/
statusInterval = atoi(value);
if (value[0] < '0' || value[0] > '9' || statusInterval < 0)
if (value[0] < '0' || value[0] > '9' ||
statusInterval < 0)
{
fprintf(stderr, "WARNING: number expected for status option \"%s\"\n",
value);
fprintf(stderr, "WARNING: number expected for status option \"%s\"\n", value);
}
else
{
@@ -1476,24 +1469,20 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
if (*resourcePtr == '/')
resourcePtr++;
/* If the resource has a slash we assume the slash seperates the AppleTalk object
* name from the AppleTalk type. If the slash is not present we assume the AppleTalk
* type is LaserWriter.
*/
/* If the resource has a slash we assume the slash seperates the AppleTalk object
* name from the AppleTalk type. If the slash is not present we assume the AppleTalk
* type is LaserWriter.
*/
typePtr = strchr(resourcePtr, '/');
if (typePtr != NULL) {
*typePtr++ = '\0';
} else {
typePtr = "LaserWriter";
}
typePtr = strchr(resourcePtr, '/');
if (typePtr != NULL)
{
*typePtr++ = '\0';
}
else
{
typePtr = "LaserWriter";
}
removePercentEscapes(hostname, zone, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(resourcePtr, name, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(typePtr, type, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(hostname, zone, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(resourcePtr, name, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(typePtr, type, NBP_NVE_STR_SIZE + 1);
return 0;
}
+14 -19
Ver Arquivo
@@ -122,9 +122,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -214,9 +213,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -229,22 +227,19 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (errno == EBUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT)
{
_cupsLangPuts(stderr,
_("INFO: Printer not connected; will retry in 30 "
"seconds...\n"));
fputs(_("INFO: Printer not connected; will retry in 30 seconds...\n"),
stderr);
sleep(30);
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -284,13 +279,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintf(stderr,
fprintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sent print file, %lld bytes...\n"),
_("INFO: Sent print file, %lld bytes...\n"),
#else
_("INFO: Sent print file, %ld bytes...\n"),
_("INFO: Sent print file, %ld bytes...\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST tbytes);
CUPS_LLCAST tbytes);
}
/*
@@ -618,7 +613,7 @@ side_cb(int print_fd, /* I - Print file */
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
+6 -6
Ver Arquivo
@@ -118,8 +118,8 @@ backendDrainOutput(int print_fd, /* I - Print file descriptor */
if (errno != ENOSPC && errno != ENXIO && errno != EAGAIN &&
errno != EINTR && errno != ENOTTY)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to write print data: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to write print data: %s\n"),
strerror(errno));
return (-1);
}
}
@@ -230,7 +230,7 @@ backendRunLoop(
if (errno == ENXIO && offline != 1)
{
fputs("STATE: +offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
fputs(_("INFO: Printer is currently off-line.\n"), stderr);
offline = 1;
}
else if (errno == EINTR && total_bytes == 0)
@@ -321,7 +321,7 @@ backendRunLoop(
if (paperout != 1)
{
fputs("STATE: +media-empty-error\n", stderr);
_cupsLangPuts(stderr, _("ERROR: Out of paper!\n"));
fputs(_("ERROR: Out of paper!\n"), stderr);
paperout = 1;
}
}
@@ -330,7 +330,7 @@ backendRunLoop(
if (offline != 1)
{
fputs("STATE: +offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
fputs(_("INFO: Printer is currently off-line.\n"), stderr);
offline = 1;
}
}
@@ -352,7 +352,7 @@ backendRunLoop(
if (offline)
{
fputs("STATE: -offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is now on-line.\n"));
fputs(_("INFO: Printer is now on-line.\n"), stderr);
offline = 0;
}
+11 -15
Ver Arquivo
@@ -96,8 +96,7 @@ print_device(const char *resource, /* I - SCSI device */
if (strncmp(resource, "/dev/scsi/", 10) != 0)
{
_cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"),
resource);
fprintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"), resource);
return (CUPS_BACKEND_STOP);
}
@@ -120,9 +119,8 @@ print_device(const char *resource, /* I - SCSI device */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -135,15 +133,13 @@ print_device(const char *resource, /* I - SCSI device */
if (errno != EAGAIN && errno != EBUSY)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
else
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -205,9 +201,9 @@ print_device(const char *resource, /* I - SCSI device */
if (ioctl(scsi_fd, DS_ENTER, &scsi_req) < 0 ||
scsi_req.ds_status != 0)
{
_cupsLangPrintf(stderr,
_("WARNING: SCSI command timed out (%d); "
"retrying...\n"), scsi_req.ds_status);
fprintf(stderr,
_("WARNING: SCSI command timed out (%d); retrying...\n"),
scsi_req.ds_status);
sleep(try + 1);
}
else
@@ -215,8 +211,8 @@ print_device(const char *resource, /* I - SCSI device */
if (try >= 10)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.ds_status);
fprintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.ds_status);
close(scsi_fd);
return (CUPS_BACKEND_FAILED);
}
+9 -12
Ver Arquivo
@@ -110,8 +110,7 @@ print_device(const char *resource, /* I - SCSI device */
if (strncmp(resource, "/dev/sg", 7) != 0)
{
_cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"),
resource);
fprintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"), resource);
return (CUPS_BACKEND_STOP);
}
@@ -149,15 +148,13 @@ print_device(const char *resource, /* I - SCSI device */
if (errno != EAGAIN && errno != EBUSY)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
else
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -223,9 +220,9 @@ print_device(const char *resource, /* I - SCSI device */
if (ioctl(scsi_fd, SG_IO, &scsi_req) < 0 ||
scsi_req.status != 0)
{
_cupsLangPrintf(stderr,
_("WARNING: SCSI command timed out (%d); "
"retrying...\n"), scsi_req.status);
fprintf(stderr,
_("WARNING: SCSI command timed out (%d); retrying...\n"),
scsi_req.status);
sleep(try + 1);
}
else
@@ -233,8 +230,8 @@ print_device(const char *resource, /* I - SCSI device */
if (try >= 10)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.status);
fprintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.status);
close(scsi_fd);
return (CUPS_BACKEND_FAILED);
}
+2 -3
Ver Arquivo
@@ -153,9 +153,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
+26 -32
Ver Arquivo
@@ -104,9 +104,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
username[255], /* Username info (not used) */
resource[1024], /* Resource info (device and options) */
*options, /* Pointer to options */
*name, /* Name of option */
*value, /* Value of option */
sep; /* Option separator */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int port; /* Port number (not used) */
int copies; /* Number of copies to print */
int print_fd, /* Print file */
@@ -161,9 +161,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -235,9 +234,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -250,15 +248,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (errno == EBUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -289,30 +285,29 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Get the name...
*/
name = options;
for (ptr = name; *options && *options != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *options++;
*ptr = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
* Get the value...
*/
value = options;
options ++;
while (*options && *options != '+' && *options != '&')
for (ptr = value; *options && *options != '+' && *options != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+' || *options == '&')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -375,8 +370,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
break;
# endif /* B230400 */
default :
_cupsLangPrintf(stderr, _("WARNING: Unsupported baud rate %s!\n"),
value);
fprintf(stderr, _("WARNING: Unsupported baud rate %s!\n"),
value);
break;
}
#endif /* B19200 == 19200 */
@@ -1252,8 +1247,7 @@ side_cb(int print_fd, /* I - Print file */
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr,
_("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
+41 -48
Ver Arquivo
@@ -68,9 +68,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
username[255], /* Username info (not used) */
resource[1024], /* Resource info (not used) */
*options, /* Pointer to options */
*name, /* Name of option */
*value, /* Value of option */
sep; /* Option separator */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int print_fd; /* Print file */
int copies; /* Number of copies to print */
time_t start_time; /* Time of first connect */
@@ -83,7 +83,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
int device_fd; /* AppSocket */
int error; /* Error code (if any) */
http_addrlist_t *addrlist, /* Address list */
*addr; /* Connected address */
*addr; /* Connected address */
char addrname[256]; /* Address name */
ssize_t tbytes; /* Total number of bytes written */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
@@ -122,9 +122,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -191,30 +190,29 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Get the name...
*/
name = options;
for (ptr = name; *options && *options != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *options++;
*ptr = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
* Get the value...
*/
value = options;
options ++;
while (*options && *options != '+' && *options != '&')
for (ptr = value; *options && *options != '+' && *options != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+' || *options == '&')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -252,14 +250,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
fprintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"), hostname);
return (CUPS_BACKEND_STOP);
}
_cupsLangPrintf(stderr,
_("INFO: Attempting to connect to host %s on port %d\n"),
hostname, port);
fprintf(stderr, _("INFO: Attempting to connect to host %s on port %d\n"),
hostname, port);
fputs("STATE: +connecting-to-device\n", stderr);
@@ -279,9 +275,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -297,16 +292,16 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"),
hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
sleep(delay);
@@ -317,11 +312,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
{
recoverable = 1;
_cupsLangPrintf(stderr, "DEBUG: Connection error: %s\n",
strerror(errno));
_cupsLangPuts(stderr,
_("ERROR: recoverable: Unable to connect to printer; "
"will retry in 30 seconds...\n"));
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
fputs(_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -342,7 +335,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
fprintf(stderr, _("INFO: Connected to %s...\n"), hostname);
#ifdef AF_INET6
if (addr->addr.addr.sa_family == AF_INET6)
@@ -375,13 +368,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
tbytes = backendRunLoop(print_fd, device_fd, 1, side_cb);
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintf(stderr,
fprintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sent print file, %lld bytes...\n"),
_("INFO: Sent print file, %lld bytes...\n"),
#else
_("INFO: Sent print file, %ld bytes...\n"),
_("INFO: Sent print file, %ld bytes...\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST tbytes);
CUPS_LLCAST tbytes);
}
/*
@@ -396,8 +389,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Shutdown the socket and wait for the other end to finish...
*/
_cupsLangPuts(stderr,
_("INFO: Print file sent, waiting for printer to finish...\n"));
fputs(_("INFO: Print file sent, waiting for printer to finish...\n"),
stderr);
shutdown(device_fd, 1);
@@ -420,7 +413,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
close(print_fd);
if (tbytes >= 0)
_cupsLangPuts(stderr, _("INFO: Ready to print.\n"));
fputs(_("INFO: Ready to print.\n"), stderr);
return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
}
@@ -446,7 +439,7 @@ side_cb(int print_fd, /* I - Print file */
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
+76 -115
Ver Arquivo
@@ -1,7 +1,7 @@
/*
* "$Id$"
*
* Copyright 2005-2007 Apple Inc. All rights reserved.
* Copyright © 2005-2007 Apple Inc. All rights reserved.
*
* IMPORTANT: This Apple software is supplied to you by Apple Computer,
* Inc. ("Apple") in consideration of your agreement to the following
@@ -267,7 +267,7 @@ static void copy_devicestring(io_service_t usbInterface, CFStringRef *deviceID,
static void device_added(void *userdata, io_iterator_t iterator);
static void get_device_id(cups_sc_status_t *status, char *data, int *datalen);
static void iterate_printers(iterator_callback_t callBack, void *userdata);
static void parse_options(char *options, char *serial, int serial_size, UInt32 *location, Boolean *wait_eof);
static void parse_options(const char *options, char *serial, int serial_size, UInt32 *location, Boolean *wait_eof);
static void release_deviceinfo(CFStringRef *make, CFStringRef *model, CFStringRef *serial);
static void setup_cfLanguage(void);
static void soft_reset();
@@ -304,7 +304,7 @@ int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
char *options, /* I - Device options/serial number */
const char *options, /* I - Device options/serial number */
int print_fd, /* I - File descriptor to print */
int copies, /* I - Copies to print */
int argc, /* I - Number of command-line arguments (6 or 7) */
@@ -313,8 +313,7 @@ print_device(const char *uri, /* I - Device URI */
char serial[1024]; /* Serial number buffer */
OSStatus status; /* Function results */
pthread_t read_thread_id, /* Read thread */
sidechannel_thread_id;/* Side-channel thread */
int sidechannel_started = 0;/* Was the side-channel thread started? */
sidechannel_thread_id;/* Side channel thread */
char print_buffer[8192], /* Print data buffer */
*print_ptr; /* Pointer into print data buffer */
UInt32 location; /* Unique location in bus topology */
@@ -328,7 +327,6 @@ print_device(const char *uri, /* I - Device URI */
stimeout; /* Timeout for select() */
struct timespec cond_timeout; /* pthread condition timeout */
setup_cfLanguage();
parse_options(options, serial, sizeof(serial), &location, &g.wait_eof);
@@ -389,7 +387,7 @@ print_device(const char *uri, /* I - Device URI */
strlcpy(print_buffer, "USB class driver", sizeof(print_buffer));
fputs("STATE: +apple-missing-usbclassdriver-error\n", stderr);
_cupsLangPrintf(stderr, _("FATAL: Could not load %s\n"), print_buffer);
fprintf(stderr, _("FATAL: Could not load %s\n"), print_buffer);
if (driverBundlePath)
CFRelease(driverBundlePath);
@@ -406,8 +404,7 @@ print_device(const char *uri, /* I - Device URI */
countdown -= PRINTER_POLLING_INTERVAL;
if (countdown <= 0)
{
_cupsLangPrintf(stderr, _("INFO: Printer busy (status:0x%08x)\n"),
(int)status);
fprintf(stderr, _("INFO: Printer busy (status:0x%08x)\n"), (int)status);
countdown = SUBSEQUENT_LOG_INTERVAL; /* subsequent log entries, every 15 seconds */
}
}
@@ -459,11 +456,9 @@ print_device(const char *uri, /* I - Device URI */
if (pthread_create(&sidechannel_thread_id, NULL, sidechannel_thread, NULL))
{
_cupsLangPuts(stderr, _("WARNING: Couldn't create side channel\n"));
fputs(_("WARNING: Couldn't create side channel\n"), stderr);
return CUPS_BACKEND_STOP;
}
sidechannel_started = 1;
}
/*
@@ -478,7 +473,7 @@ print_device(const char *uri, /* I - Device URI */
if (pthread_create(&read_thread_id, NULL, read_thread, NULL))
{
_cupsLangPuts(stderr, _("WARNING: Couldn't create read channel\n"));
fputs(_("WARNING: Couldn't create read channel\n"), stderr);
return CUPS_BACKEND_STOP;
}
@@ -493,7 +488,7 @@ print_device(const char *uri, /* I - Device URI */
while (status == noErr && copies-- > 0)
{
_cupsLangPuts(stderr, _("INFO: Sending data\n"));
fputs(_("INFO: Sending data\n"), stderr);
if (print_fd != STDIN_FILENO)
{
@@ -561,7 +556,7 @@ print_device(const char *uri, /* I - Device URI */
}
else if (errno != EAGAIN)
{
_cupsLangPrintf(stderr, _("ERROR: select() returned %d\n"), (int)errno);
fprintf(stderr, _("ERROR: select() returned %d\n"), (int)errno);
return CUPS_BACKEND_STOP;
}
}
@@ -637,8 +632,7 @@ print_device(const char *uri, /* I - Device URI */
*/
OSStatus err = (*g.classdriver)->Abort(g.classdriver);
_cupsLangPrintf(stderr, _("ERROR: %ld: (canceled:%ld)\n"),
(long)status, (long)err);
fprintf(stderr, _("ERROR: %ld: (canceled:%ld)\n"), (long)status, (long)err);
status = CUPS_BACKEND_STOP;
break;
}
@@ -662,42 +656,27 @@ print_device(const char *uri, /* I - Device URI */
* Wait for the side channel thread to exit...
*/
if (sidechannel_started)
close(CUPS_SC_FD);
pthread_mutex_lock(&g.readwrite_lock_mutex);
g.readwrite_lock = 0;
pthread_cond_signal(&g.readwrite_lock_cond);
pthread_mutex_unlock(&g.readwrite_lock_mutex);
g.sidechannel_thread_stop = 1;
pthread_mutex_lock(&g.sidechannel_thread_mutex);
if (!g.sidechannel_thread_done)
{
close(CUPS_SC_FD);
pthread_mutex_lock(&g.readwrite_lock_mutex);
g.readwrite_lock = 0;
pthread_cond_signal(&g.readwrite_lock_cond);
pthread_mutex_unlock(&g.readwrite_lock_mutex);
g.sidechannel_thread_stop = 1;
pthread_mutex_lock(&g.sidechannel_thread_mutex);
if (!g.sidechannel_thread_done)
{
/*
* Wait for the side-channel thread to exit...
*/
cond_timeout.tv_sec = time(NULL) + WAIT_SIDE_DELAY;
cond_timeout.tv_nsec = 0;
if (pthread_cond_timedwait(&g.sidechannel_thread_cond,
&g.sidechannel_thread_mutex,
&cond_timeout) != 0)
{
/*
* Force the side-channel thread to exit...
*/
pthread_kill(sidechannel_thread_id, SIGTERM);
}
}
pthread_mutex_unlock(&g.sidechannel_thread_mutex);
pthread_join(sidechannel_thread_id, NULL);
pthread_cond_destroy(&g.sidechannel_thread_cond);
pthread_mutex_destroy(&g.sidechannel_thread_mutex);
cond_timeout.tv_sec = time(NULL) + WAIT_SIDE_DELAY;
cond_timeout.tv_nsec = 0;
pthread_cond_timedwait(&g.sidechannel_thread_cond,
&g.sidechannel_thread_mutex, &cond_timeout);
}
pthread_mutex_unlock(&g.sidechannel_thread_mutex);
pthread_join(sidechannel_thread_id, NULL);
pthread_cond_destroy(&g.sidechannel_thread_cond);
pthread_mutex_destroy(&g.sidechannel_thread_mutex);
pthread_cond_destroy(&g.readwrite_lock_cond);
pthread_mutex_destroy(&g.readwrite_lock_mutex);
@@ -710,7 +689,9 @@ print_device(const char *uri, /* I - Device URI */
/*
* Give the read thread WAIT_EOF_DELAY seconds to complete all the data. If
* we are not signaled in that time then force the thread to exit.
* we are not signaled in that time then force the thread to exit by setting
* the waiteof to be false. Plese note that this relies on us using the timeout
* class driver.
*/
pthread_mutex_lock(&g.read_thread_mutex);
@@ -722,13 +703,7 @@ print_device(const char *uri, /* I - Device URI */
if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex,
&cond_timeout) != 0)
{
/*
* Force the read thread to exit...
*/
pthread_kill(read_thread_id, SIGTERM);
}
g.wait_eof = false;
}
pthread_mutex_unlock(&g.read_thread_mutex);
@@ -852,16 +827,8 @@ sidechannel_thread(void *reference)
switch (command)
{
case CUPS_SC_CMD_SOFT_RESET: /* Do a soft reset */
if ((*g.classdriver)->SoftReset != NULL)
{
soft_reset();
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, NULL, 0, 1.0);
}
else
{
cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
NULL, 0, 1.0);
}
soft_reset();
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, NULL, 0, 1.0);
break;
case CUPS_SC_CMD_DRAIN_OUTPUT: /* Drain all pending output */
@@ -1124,7 +1091,7 @@ static Boolean find_device_cb(void *refcon,
if (!keepLooking && g.status_timer != NULL)
{
fputs("STATE: -offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is now on-line.\n"));
fputs(_("INFO: Printer is now on-line.\n"), stderr);
CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), g.status_timer, kCFRunLoopDefaultMode);
CFRelease(g.status_timer);
g.status_timer = NULL;
@@ -1142,7 +1109,7 @@ static void status_timer_cb(CFRunLoopTimerRef timer,
void *info)
{
fputs("STATE: +offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
fputs(_("INFO: Printer is currently off-line.\n"), stderr);
}
@@ -1574,19 +1541,18 @@ CFStringRef cfstr_create_trim(const char *cstr)
#pragma mark -
/*
* 'parse_options()' - Parse URI options.
* 'parse_options()' - Parse uri options.
*/
static void parse_options(char *options,
static void parse_options(const char *options,
char *serial,
int serial_size,
UInt32 *location,
Boolean *wait_eof)
{
char sep, /* Separator character */
*name, /* Name of option */
*value; /* Value of option */
char optionName[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
if (serial)
*serial = '\0';
@@ -1596,61 +1562,56 @@ static void parse_options(char *options,
if (!options)
return;
while (*options)
while (*options != '\0')
{
/*
* Get the name...
*/
/* Get the name... */
for (ptr = optionName; *options && *options != '=' && *options != '+';)
*ptr++ = *options++;
name = options;
*ptr = '\0';
value[0] = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
if (*options == '=')
{
/* Get the value... */
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
for (ptr = value; *options && *options != '+';)
*ptr++ = *options++;
if (sep == '=')
{
/*
* Get the value...
*/
*ptr = '\0';
value = options;
while (*options && *options != '+' && *options != '&')
if (*options == '+')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
else if (*options == '+')
options ++;
/*
* Process the option...
*/
if (!strcasecmp(name, "waiteof"))
/*
* Process the option...
*/
if (strcasecmp(optionName, "waiteof") == 0)
{
if (!strcasecmp(value, "on") ||
!strcasecmp(value, "yes") ||
!strcasecmp(value, "true"))
if (strcasecmp(value, "on") == 0 ||
strcasecmp(value, "yes") == 0 ||
strcasecmp(value, "true") == 0)
*wait_eof = true;
else if (!strcasecmp(value, "off") ||
!strcasecmp(value, "no") ||
!strcasecmp(value, "false"))
else if (strcasecmp(value, "off") == 0 ||
strcasecmp(value, "no") == 0 ||
strcasecmp(value, "false") == 0)
*wait_eof = false;
else
_cupsLangPrintf(stderr,
_("WARNING: Boolean expected for waiteof option "
"\"%s\"\n"), value);
fprintf(stderr, _("WARNING: Boolean expected for waiteof option \"%s\"\n"), value);
}
else if (!strcasecmp(name, "serial"))
else if (strcasecmp(optionName, "serial") == 0)
{
strlcpy(serial, value, serial_size);
else if (!strcasecmp(name, "location") && location)
}
else if (strcasecmp(optionName, "location") == 0 && location)
*location = strtol(value, NULL, 16);
}
return;
}
@@ -1924,7 +1885,7 @@ static void parse_pserror(char *sockBuffer,
/*
* 'soft_reset()' - Send a soft reset to the device.
* 'soft_reset'
*/
static void soft_reset()
+17 -21
Ver Arquivo
@@ -48,7 +48,7 @@ int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
char *options, /* I - Device options/serial number */
const char *options, /* I - Device options/serial number */
int print_fd, /* I - File descriptor to print */
int copies, /* I - Copies to print */
int argc, /* I - Number of command-line arguments (6 or 7) */
@@ -105,9 +105,8 @@ print_device(const char *uri, /* I - Device URI */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -120,23 +119,20 @@ print_device(const char *uri, /* I - Device URI */
if (errno == EBUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 10 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 10 seconds...\n"), stderr);
sleep(10);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT ||
errno == ENODEV)
{
_cupsLangPuts(stderr,
_("INFO: Printer not connected; will retry in 30 "
"seconds...\n"));
fputs(_("INFO: Printer not connected; will retry in 30 seconds...\n"),
stderr);
sleep(30);
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -176,13 +172,13 @@ print_device(const char *uri, /* I - Device URI */
tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintf(stderr,
fprintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sent print file, %lld bytes...\n"),
_("INFO: Sent print file, %lld bytes...\n"),
#else
_("INFO: Sent print file, %ld bytes...\n"),
_("INFO: Sent print file, %ld bytes...\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST tbytes);
CUPS_LLCAST tbytes);
}
/*
@@ -415,8 +411,8 @@ open_device(const char *uri, /* I - Device URI */
if (busy)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 5 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 5 seconds...\n"),
stderr);
sleep(5);
}
}
@@ -508,8 +504,8 @@ open_device(const char *uri, /* I - Device URI */
if (busy)
{
_cupsLangPuts(stderr,
_("INFO: Printer is busy; will retry in 5 seconds...\n"));
fputs(_("INFO: Printer is busy; will retry in 5 seconds...\n"),
stderr);
sleep(5);
}
}
@@ -566,7 +562,7 @@ side_cb(int print_fd, /* I - Print file */
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
+8 -10
Ver Arquivo
@@ -54,7 +54,7 @@
void list_devices(void);
int print_device(const char *uri, const char *hostname,
const char *resource, char *options,
const char *resource, const char *options,
int print_fd, int copies, int argc, char *argv[]);
@@ -99,7 +99,7 @@ int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
char *options, /* I - Device options/serial number */
const char *options, /* I - Device options/serial number */
int print_fd, /* I - File descriptor to print */
int copies, /* I - Copies to print */
int argc, /* I - Number of command-line arguments (6 or 7) */
@@ -184,9 +184,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -201,9 +200,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
hostname, sizeof(hostname), &port,
resource, sizeof(resource)) < HTTP_URI_OK)
{
_cupsLangPuts(stderr,
_("ERROR: No device URI found in argv[0] or in DEVICE_URI "
"environment variable!\n"));
fputs(_("ERROR: No device URI found in argv[0] or in DEVICE_URI "
"environment variable!\n"), stderr);
return (1);
}
@@ -239,8 +237,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if ((print_fd = open(argv[6], O_RDONLY)) < 0)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to open print file %s - %s\n"),
argv[6], strerror(errno));
fprintf(stderr, _("ERROR: Unable to open print file %s - %s\n"),
argv[6], strerror(errno));
return (CUPS_BACKEND_FAILED);
}
-1
Ver Arquivo
@@ -151,7 +151,6 @@ main(int argc, /* I - Number of command-line arguments */
cgiSetVariable("HELPFILE", helpfile);
cgiSetVariable("HELPTITLE", n->text);
cgiSetVariable("TOPIC", n->section);
/*
* Send a standard page header...
+19 -19
Ver Arquivo
@@ -85,9 +85,9 @@ cgiCopyTemplateFile(FILE *out, /* I - Output file */
void
cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
{
int i; /* Looping var */
char filename[1024], /* Filename */
locale[16], /* Locale name */
*locptr; /* Pointer into locale name */
locale[16]; /* Locale name */
const char *directory, /* Directory for templates */
*lang; /* Language */
FILE *in; /* Input file */
@@ -100,19 +100,22 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
* Convert the language to a locale name...
*/
locale[0] = '\0';
if ((lang = getenv("LANG")) != NULL)
{
locale[0] = '/';
strlcpy(locale + 1, lang, sizeof(locale) - 1);
for (i = 0; lang[i] && i < 15; i ++)
if (isalnum(lang[i] & 255) || lang[i] == '_')
locale[i] = tolower(lang[i]);
else if (lang[i] == '-')
locale[i] = '_';
else
break;
if ((locptr = strchr(locale, '.')) != NULL)
*locptr = '\0'; /* Strip charset */
locale[i] = '\0';
}
else
locale[0] = '\0';
fprintf(stderr, "DEBUG: lang=\"%s\", locale=\"%s\"...\n",
lang ? lang : "(null)", locale);
fprintf(stderr, "DEBUG2: locale=\"%s\"...\n", locale);
/*
* See if we have a template file for this language...
@@ -120,17 +123,14 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
directory = cgiGetTemplateDir();
snprintf(filename, sizeof(filename), "%s%s/%s", directory, locale, tmpl);
if ((in = fopen(filename, "r")) == NULL)
snprintf(filename, sizeof(filename), "%s/%s/%s", directory, locale, tmpl);
if (access(filename, 0))
{
locale[3] = '\0';
locale[2] = '\0';
snprintf(filename, sizeof(filename), "%s%s/%s", directory, locale, tmpl);
if ((in = fopen(filename, "r")) == NULL)
{
snprintf(filename, sizeof(filename), "%s/%s/%s", directory, locale, tmpl);
if (access(filename, 0))
snprintf(filename, sizeof(filename), "%s/%s", directory, tmpl);
in = fopen(filename, "r");
}
}
fprintf(stderr, "DEBUG2: Template file is \"%s\"...\n", filename);
@@ -139,7 +139,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
* Open the template file...
*/
if (!in)
if ((in = fopen(filename, "r")) == NULL)
{
fprintf(stderr, "ERROR: Unable to open template file \"%s\" - %s\n",
filename, strerror(errno));
+5 -6
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 6965 2007-09-17 21:34:07Z mike $"
dnl "$Id: cups-common.m4 6790 2007-08-13 20:09:45Z mike $"
dnl
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -13,14 +13,14 @@ dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl We need at least autoconf 2.60...
AC_PREREQ(2.60)
dnl We need at least autoconf 2.50...
AC_PREREQ(2.50)
dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Versio number information...
CUPS_VERSION="1.3.2"
CUPS_VERSION="1.3.0"
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'`"
@@ -123,7 +123,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(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
AC_CHECK_HEADER(scsi/sg.h,AC_DEFINE(HAVE_SCSI_SG_H))
@@ -287,5 +286,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl
dnl End of "$Id: cups-common.m4 6965 2007-09-17 21:34:07Z mike $".
dnl End of "$Id: cups-common.m4 6790 2007-08-13 20:09:45Z mike $".
dnl
+2 -36
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 6976 2007-09-18 20:39:31Z mike $"
dnl "$Id: cups-compiler.m4 6698 2007-07-20 14:15:44Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -301,40 +301,6 @@ else
if test $PICFLAG = 1; then
OPTIM="+z $OPTIM"
fi
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="+DD32"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="+DD64"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="+DD64"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="+DD32"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
IRIX)
if test -z "$OPTIM"; then
@@ -498,5 +464,5 @@ case $uname in
esac
dnl
dnl End of "$Id: cups-compiler.m4 6976 2007-09-18 20:39:31Z mike $".
dnl End of "$Id: cups-compiler.m4 6698 2007-07-20 14:15:44Z mike $".
dnl
+27 -38
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-directories.m4 6976 2007-09-18 20:39:31Z mike $"
dnl "$Id: cups-directories.m4 6649 2007-07-11 21:46:42Z mike $"
dnl
dnl Directory stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -99,23 +99,17 @@ if test "$sysconfdir" = "\${prefix}/etc"; then
fi
fi
dnl Fix "libdir" variable...
dnl Fix "libdir" variable for IRIX 6.x...
if test "$libdir" = "\${exec_prefix}/lib"; then
case "$uname" in
IRIX*)
libdir="$exec_prefix/lib32"
;;
Linux*)
if test -d /usr/lib64; then
libdir="$exec_prefix/lib64"
fi
;;
HP-UX*)
if test -d /usr/lib/hpux32; then
libdir="$exec_prefix/lib/hpux32"
fi
;;
esac
if test "$uname" = "IRIX"; then
libdir="$exec_prefix/lib32"
else
if test "$uname" = Linux -a -d /usr/lib64; then
libdir="$exec_prefix/lib64"
else
libdir="$exec_prefix/lib"
fi
fi
fi
dnl Setup init.d locations...
@@ -152,8 +146,8 @@ if test x$rcdir = x; then
HP-UX*)
INITDIR="/sbin"
RCLEVELS="2"
RCSTART="380"
RCSTOP="620"
RCSTART="620"
RCSTOP="380"
;;
IRIX*)
@@ -297,26 +291,21 @@ fi
AC_SUBST(CUPS_FONTPATH)
AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
# Locale data (initial assignment allows us not to require autoconf 2.60)
localedir="${localedir:=}"
if test "$localedir" = "\${datarootdir}/locale" -o "$localedir" = ""; then
case "$uname" in
Linux | GNU | *BSD* | Darwin*)
CUPS_LOCALEDIR="$datadir/locale"
;;
# Locale data
case "$uname" in
Linux | GNU | *BSD* | Darwin*)
CUPS_LOCALEDIR="$datadir/locale"
;;
OSF1* | AIX*)
CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
;;
OSF1* | AIX*)
CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
;;
*)
# This is the standard System V location...
CUPS_LOCALEDIR="$exec_prefix/lib/locale"
;;
esac
else
CUPS_LOCALEDIR="$localedir"
fi
*)
# This is the standard System V location...
CUPS_LOCALEDIR="$exec_prefix/lib/locale"
;;
esac
AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
AC_SUBST(CUPS_LOCALEDIR)
@@ -367,5 +356,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
AC_SUBST(CUPS_STATEDIR)
dnl
dnl End of "$Id: cups-directories.m4 6976 2007-09-18 20:39:31Z mike $".
dnl End of "$Id: cups-directories.m4 6649 2007-07-11 21:46:42Z mike $".
dnl
-7
Ver Arquivo
@@ -523,13 +523,6 @@
#undef HAVE_DLFCN_H
/*
* Do we have <sys/param.h>?
*/
#undef HAVE_SYS_PARAM_H
/*
* Do we have <sys/ucred.h>?
*/
+2 -2
Ver Arquivo
@@ -59,10 +59,10 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0302
# define CUPS_VERSION 1.0300
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 3
# define CUPS_VERSION_PATCH 2
# define CUPS_VERSION_PATCH 0
# define CUPS_DATE_ANY -1
+3 -13
Ver Arquivo
@@ -1207,7 +1207,7 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
if (fp->ptr >= fp->end)
if (cups_fill(fp) <= 0)
{
DEBUG_printf((" cups_fill() returned -1, total=%d\n", (int)total));
DEBUG_printf((" cups_fill() returned -1, total=%d\n", total));
if (total > 0)
return ((ssize_t)total);
@@ -1235,7 +1235,7 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
* Return the total number of bytes read...
*/
DEBUG_printf((" total=%d\n", (int)total));
DEBUG_printf((" total=%d\n", total));
return ((ssize_t)total);
}
@@ -1703,7 +1703,6 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
{
ssize_t bytes; /* Number of bytes read */
#ifdef HAVE_LIBZ
int status; /* Decompression status */
const unsigned char *ptr, /* Pointer into buffer */
*end; /* End of buffer */
#endif /* HAVE_LIBZ */
@@ -1922,13 +1921,7 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
fp->stream.next_out = (Bytef *)fp->buf;
fp->stream.avail_out = sizeof(fp->buf);
status = inflate(&(fp->stream), Z_NO_FLUSH);
if (fp->stream.next_out > (Bytef *)fp->buf)
fp->crc = crc32(fp->crc, (Bytef *)fp->buf,
fp->stream.next_out - (Bytef *)fp->buf);
if (status == Z_STREAM_END)
if (inflate(&(fp->stream), Z_NO_FLUSH) == Z_STREAM_END)
{
/*
* Read the CRC and length...
@@ -1957,9 +1950,6 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
* Bad CRC, mark end-of-file...
*/
DEBUG_printf(("cups_fill: tcrc=%08x, fp->crc=%08x\n",
(unsigned int)tcrc, (unsigned int)fp->crc));
fp->eof = 1;
return (-1);
+11 -10
Ver Arquivo
@@ -197,17 +197,18 @@ httpAddrLookup(
#endif /* AF_LOCAL */
#ifdef HAVE_GETNAMEINFO
{
/*
* STR #2486: httpAddrLookup() fails when getnameinfo() returns EAI_AGAIN
*
* FWIW, I think this is really a bug in the implementation of
* getnameinfo(), but falling back on httpAddrString() is easy to
* do...
*/
if (getnameinfo(&addr->addr, httpAddrLength(addr), name, namelen,
NULL, 0, 0))
return (httpAddrString(addr, name, namelen));
NULL, 0, 0))
{
/*
* If we get an error back, then the address type is not supported
* and we should zero out the buffer...
*/
name[0] = '\0';
return (NULL);
}
}
#else
{
-3
Ver Arquivo
@@ -62,9 +62,6 @@
# ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
# define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
# endif /* !HAVE_GSS_C_NT_HOSTBASED_SERVICE */
# ifdef HAVE_KRB5_H
# include <krb5.h>
# endif /* HAVE_KRB5_H */
# endif /* HAVE_GSSAPI */
# ifdef HAVE_AUTHORIZATION_H
+45 -62
Ver Arquivo
@@ -985,12 +985,11 @@ typedef struct
static const _apple_name_locale_t apple_name_locale[] =
{
{ "en" , "en_US" },
{ "nb" , "no" },
{ "no" , "nb" },
{ "zh-Hans" , "zh_CN" },
{ "zh-Hant" , "zh_TW" }
};
/*
* 'appleLangDefault()' - Get the default locale string.
*/
@@ -999,8 +998,6 @@ static const char * /* O - Locale string */
appleLangDefault(void)
{
int i; /* Looping var */
CFBundleRef bundle; /* Main bundle (if any) */
CFArrayRef bundleList; /* List of localizations in bundle */
CFPropertyListRef localizationList;
/* List of localization data */
CFStringRef languageName; /* Current name */
@@ -1017,77 +1014,63 @@ appleLangDefault(void)
if (!cg->language[0])
{
if ((lang = getenv("LANG")))
{
strlcpy(cg->language, lang, sizeof(cg->language));
return (cg->language);
}
else if ((bundle = CFBundleGetMainBundle()) != NULL &&
(bundleList = CFBundleCopyBundleLocalizations(bundle)) != NULL)
{
localizationList =
CFBundleCopyPreferredLocalizationsFromArray(bundleList);
CFRelease(bundleList);
}
else
localizationList =
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
kCFPreferencesCurrentApplication);
if (localizationList)
{
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
CFArrayGetCount(localizationList) > 0)
localizationList =
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
kCFPreferencesCurrentApplication);
if (localizationList != NULL)
{
languageName = CFArrayGetValueAtIndex(localizationList, 0);
if (languageName &&
CFGetTypeID(languageName) == CFStringGetTypeID())
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
CFArrayGetCount(localizationList) > 0)
{
localeName = CFLocaleCreateCanonicalLocaleIdentifierFromString(
kCFAllocatorDefault, languageName);
languageName = CFArrayGetValueAtIndex(localizationList, 0);
if (localeName)
{
CFStringGetCString(localeName, cg->language, sizeof(cg->language),
kCFStringEncodingASCII);
CFRelease(localeName);
if (languageName != NULL &&
CFGetTypeID(languageName) == CFStringGetTypeID())
{
localeName = CFLocaleCreateCanonicalLocaleIdentifierFromString(
kCFAllocatorDefault, languageName);
DEBUG_printf(("appleLangDefault: cg->language=\"%s\"\n",
cg->language));
/*
* Map new language identifiers to locales...
*/
for (i = 0;
i < sizeof(apple_name_locale) / sizeof(apple_name_locale[0]);
i++)
if (localeName != NULL)
{
if (!strcmp(cg->language, apple_name_locale[i].name))
CFStringGetCString(localeName, cg->language, sizeof(cg->language),
kCFStringEncodingASCII);
CFRelease(localeName);
/*
* Map new language identifiers to locales...
*/
for (i = 0;
i < sizeof(apple_name_locale) / sizeof(apple_name_locale[0]);
i++)
{
DEBUG_printf(("appleLangDefault: mapping \"%s\" to \"%s\"...\n",
cg->language, apple_name_locale[i].locale));
strlcpy(cg->language, apple_name_locale[i].locale,
sizeof(cg->language));
break;
if (!strcmp(cg->language, apple_name_locale[i].name))
{
strlcpy(cg->language, apple_name_locale[i].locale,
sizeof(cg->language));
break;
}
}
/*
* Convert language subtag into region subtag...
*/
if (cg->language[2] == '-')
cg->language[2] = '_';
if (strchr(cg->language, '.') == NULL)
strlcat(cg->language, ".UTF-8", sizeof(cg->language));
}
/*
* Convert language subtag into region subtag...
*/
if (cg->language[2] == '-')
cg->language[2] = '_';
if (!strchr(cg->language, '.'))
strlcat(cg->language, ".UTF-8", sizeof(cg->language));
}
}
}
}
CFRelease(localizationList);
CFRelease(localizationList);
}
}
/*
+25 -43
Ver Arquivo
@@ -44,8 +44,7 @@
* Local functions...
*/
static void ppd_ll_CC(char *ll_CC, int ll_CC_size,
char *ll, int ll_size);
static void ppd_ll_CC(char *ll_CC, char *ll);
static ppd_attr_t *ppd_localized_attr(ppd_file_t *ppd,
const char *keyword,
const char *spec, const char *ll_CC,
@@ -91,7 +90,7 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
* Get the default language...
*/
ppd_ll_CC(ll_CC, sizeof(ll_CC), ll, sizeof(ll));
ppd_ll_CC(ll_CC, ll);
/*
* Now lookup all of the groups, options, choices, etc.
@@ -241,7 +240,7 @@ ppdLocalizeIPPReason(
* Get the default language...
*/
ppd_ll_CC(ll_CC, sizeof(ll_CC), ll, sizeof(ll));
ppd_ll_CC(ll_CC, ll);
/*
* Find the localized attribute...
@@ -392,9 +391,8 @@ ppdLocalizeIPPReason(
static void
ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
int ll_CC_size, /* I - Size of country-specific name */
char *ll, /* O - Generic locale name */
int ll_size) /* I - Size of generic name */
char *ll) /* O - Generic locale name */
{
cups_lang_t *lang; /* Current language */
@@ -405,8 +403,8 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
if ((lang = cupsLangDefault()) == NULL)
{
strlcpy(ll_CC, "en_US", ll_CC_size);
strlcpy(ll, "en", ll_size);
strcpy(ll_CC, "en_US");
strcpy(ll, "en");
return;
}
@@ -414,10 +412,8 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
* Copy the locale name...
*/
strlcpy(ll_CC, lang->language, ll_CC_size);
strlcpy(ll, lang->language, ll_size);
DEBUG_printf(("ll_CC=\"%s\", ll=\"%s\"\n", ll_CC, ll));
strlcpy(ll_CC, lang->language, sizeof(ll_CC));
strlcpy(ll, lang->language, sizeof(ll));
if (strlen(ll_CC) == 2)
{
@@ -427,16 +423,16 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
*/
if (!strcmp(ll_CC, "cs"))
strlcpy(ll_CC, "cs_CZ", ll_CC_size);
strcpy(ll_CC, "cs_CZ");
else if (!strcmp(ll_CC, "en"))
strlcpy(ll_CC, "en_US", ll_CC_size);
strcpy(ll_CC, "en_US");
else if (!strcmp(ll_CC, "ja"))
strlcpy(ll_CC, "ja_JP", ll_CC_size);
strcpy(ll_CC, "ja_JP");
else if (!strcmp(ll_CC, "sv"))
strlcpy(ll_CC, "sv_SE", ll_CC_size);
else if (!strcmp(ll_CC, "zh")) /* Simplified Chinese */
strlcpy(ll_CC, "zh_CN", ll_CC_size);
else if (ll_CC_size >= 6)
strcpy(ll_CC, "sv_SE");
else if (!strcmp(ll_CC, "zh"))
strcpy(ll_CC, "zh_CN"); /* Simplified Chinese */
else
{
ll_CC[2] = '_';
ll_CC[3] = toupper(ll_CC[0] & 255);
@@ -479,31 +475,17 @@ ppd_localized_attr(ppd_file_t *ppd, /* I - PPD file */
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll, keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
if (!attr)
if (!attr && !strcmp(ll, "ja"))
{
if (!strcmp(ll, "ja"))
{
/*
* Due to a bug in the CUPS DDK 1.1.0 ppdmerge program, Japanese
* PPD files were incorrectly assigned "jp" as the locale name
* instead of "ja". Support both the old (incorrect) and new
* locale names for Japanese...
*/
/*
* Due to a bug in the CUPS DDK 1.1.0 ppdmerge program, Japanese
* PPD files were incorrectly assigned "jp" as the locale name
* instead of "ja". Support both the old (incorrect) and new
* locale names for Japanese...
*/
snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
else if (!strcmp(ll, "no"))
{
/*
* Norway has two languages, "Bokmal" (the primary one)
* and "Nynorsk" (new Norwegian); we map "no" to "nb" here as
* recommended by the locale folks...
*/
snprintf(lkeyword, sizeof(lkeyword), "nb.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
}
-12
Ver Arquivo
@@ -149,18 +149,6 @@ http://foo/fr/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/fr/foo/bar.html"
*End
*zh_TW.cupsIPPReason foo/Number 1 Foo Reason: "text:Number%201
text:Foo%20Reason
http://foo/zh_TW/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/zh_TW/foo/bar.html"
*End
*zh.cupsIPPReason foo/Number 2 Foo Reason: "text:Number%202
text:Foo%20Reason
http://foo/zh/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/zh/foo/bar.html"
*End
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
+5 -42
Ver Arquivo
@@ -16,8 +16,7 @@
*
* Contents:
*
* main() - Main entry.
* read_write_tests() - Perform read/write tests.
* main() - Main entry.
*/
/*
@@ -150,8 +149,6 @@ read_write_tests(int compression) /* I - Use compression? */
unsigned char readbuf[8192], /* Read buffer */
writebuf[8192]; /* Write buffer */
int byte; /* Byte from file */
static const char *partial_line = "partial line";
/* Partial line */
/*
@@ -256,25 +253,11 @@ read_write_tests(int compression) /* I - Use compression? */
fputs("cupsFileWrite(): ", stdout);
for (i = 0; i < 10000; i ++)
for (i = 0; i < 100; i ++)
if (cupsFileWrite(fp, (char *)writebuf, sizeof(writebuf)) < 0)
break;
if (i >= 10000)
puts("PASS");
else
{
printf("FAIL (%s)\n", strerror(errno));
status ++;
}
/*
* cupsFilePuts() with partial line...
*/
fputs("cupsFilePuts(\"partial line\"): ", stdout);
if (cupsFilePuts(fp, partial_line) > 0)
if (i >= 100)
puts("PASS");
else
{
@@ -422,13 +405,13 @@ read_write_tests(int compression) /* I - Use compression? */
fputs("cupsFileRead(): ", stdout);
for (i = 0; i < 10000; i ++)
for (i = 0; i < 100; i ++)
if ((byte = cupsFileRead(fp, (char *)readbuf, sizeof(readbuf))) < 0)
break;
else if (memcmp(readbuf, writebuf, sizeof(readbuf)))
break;
if (i >= 10000)
if (i >= 100)
puts("PASS");
else if (byte > 0)
{
@@ -447,26 +430,6 @@ read_write_tests(int compression) /* I - Use compression? */
status ++;
}
/*
* cupsFileGetChar() with partial line...
*/
fputs("cupsFileGetChar(partial line): ", stdout);
for (i = 0; i < strlen(partial_line); i ++)
if ((byte = cupsFileGetChar(fp)) < 0)
break;
else if (byte != partial_line[i])
break;
if (!partial_line[i])
puts("PASS");
else
{
printf("FAIL (got '%c', expected '%c')\n", byte, partial_line[i]);
status ++;
}
/*
* cupsFileClose()
*/
-12
Ver Arquivo
@@ -224,18 +224,6 @@ main(int argc, /* I - Number of command-line arguments */
printf("FAIL (\"%s\" instead of \"La Long Foo Reason\")\n", buffer);
}
putenv("LANG=zh_TW");
fputs("ppdLocalizeIPPReason(zh_TW text): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
!strcmp(buffer, "Number 1 Foo Reason"))
puts("PASS");
else
{
status ++;
printf("FAIL (\"%s\" instead of \"Number 1 Foo Reason\")\n", buffer);
}
ppdClose(ppd);
}
else
-2
Ver Arquivo
@@ -92,8 +92,6 @@ WEBIMAGES = \
images/printer-idle.gif \
images/printer-processing.gif \
images/printer-stopped.gif \
images/raster.png \
images/raster.svg \
images/smiley.jpg \
images/tab-left.gif \
images/tab-right.gif \
+3 -2
Ver Arquivo
@@ -110,13 +110,14 @@ SPAN.info {
white-space: nowrap;
}
H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
H2 SPAN.info, H3 SPAN.info {
float: right;
font-size: 100%;
}
H2.title, H3.title {
border-bottom: solid 2pt #000000;
page-break-before: always;
}
DT {
@@ -133,7 +134,7 @@ DL.category DT {
}
P.summary {
margin-left: 36pt;
margin-left: 54pt;
font-family: monospace;
}
+3 -4
Ver Arquivo
@@ -173,7 +173,7 @@ SPAN.info {
white-space: nowrap;
}
H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
H2 SPAN.info, H3 SPAN.info {
float: right;
font-size: 100%;
}
@@ -196,10 +196,9 @@ DIV.sidebar {
background: #ddddaa;
border: solid 2px #cccc99;
float: right;
min-width: 25%;
margin-left: 10pt;
max-width: 33%;
padding: 5pt;
width: 25%;
/* These are not implemented by all browsers, but that's OK */
border-radius: 10pt;
-moz-border-radius: 10pt;
@@ -255,7 +254,7 @@ DL.category DT {
}
P.summary {
margin-left: 36pt;
margin-left: 54pt;
font-family: monospace;
}
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 716 B

Depois

Largura:  |  Altura:  |  Tamanho: 623 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 561 B

Depois

Largura:  |  Altura:  |  Tamanho: 527 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 724 B

Depois

Largura:  |  Altura:  |  Tamanho: 617 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 948 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 892 B

Depois

Largura:  |  Altura:  |  Tamanho: 706 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 897 B

Depois

Largura:  |  Altura:  |  Tamanho: 769 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 646 B

Depois

Largura:  |  Altura:  |  Tamanho: 560 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 881 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 871 B

Depois

Largura:  |  Altura:  |  Tamanho: 777 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.0 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 882 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 396 B

Depois

Largura:  |  Altura:  |  Tamanho: 359 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 498 B

Depois

Largura:  |  Altura:  |  Tamanho: 461 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 543 B

Depois

Largura:  |  Altura:  |  Tamanho: 483 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 627 B

Depois

Largura:  |  Altura:  |  Tamanho: 562 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 910 B

Depois

Largura:  |  Altura:  |  Tamanho: 788 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 928 B

Depois

Largura:  |  Altura:  |  Tamanho: 838 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 977 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 424 B

Depois

Largura:  |  Altura:  |  Tamanho: 393 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 603 B

Depois

Largura:  |  Altura:  |  Tamanho: 567 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 807 B

Depois

Largura:  |  Altura:  |  Tamanho: 636 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 744 B

Depois

Largura:  |  Altura:  |  Tamanho: 658 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 914 B

Depois

Largura:  |  Altura:  |  Tamanho: 718 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 788 B

Depois

Largura:  |  Altura:  |  Tamanho: 672 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 618 B

Depois

Largura:  |  Altura:  |  Tamanho: 579 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 797 B

Depois

Largura:  |  Altura:  |  Tamanho: 659 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 669 B

Depois

Largura:  |  Altura:  |  Tamanho: 551 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 918 B

Depois

Largura:  |  Altura:  |  Tamanho: 744 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 930 B

Depois

Largura:  |  Altura:  |  Tamanho: 856 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 858 B

Depois

Largura:  |  Altura:  |  Tamanho: 783 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 722 B

Depois

Largura:  |  Altura:  |  Tamanho: 625 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 781 B

Depois

Largura:  |  Altura:  |  Tamanho: 642 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 640 B

Depois

Largura:  |  Altura:  |  Tamanho: 550 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 738 B

Depois

Largura:  |  Altura:  |  Tamanho: 615 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 737 B

Depois

Largura:  |  Altura:  |  Tamanho: 601 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 416 B

Depois

Largura:  |  Altura:  |  Tamanho: 389 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 888 B

Depois

Largura:  |  Altura:  |  Tamanho: 822 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 977 B

Depois

Largura:  |  Altura:  |  Tamanho: 794 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 925 B

Depois

Largura:  |  Altura:  |  Tamanho: 809 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 910 B

Depois

Largura:  |  Altura:  |  Tamanho: 726 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 904 B

Depois

Largura:  |  Altura:  |  Tamanho: 747 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.0 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 853 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 732 B

Depois

Largura:  |  Altura:  |  Tamanho: 622 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 663 B

Depois

Largura:  |  Altura:  |  Tamanho: 562 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 851 B

Depois

Largura:  |  Altura:  |  Tamanho: 721 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 884 B

Depois

Largura:  |  Altura:  |  Tamanho: 736 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 551 B

Depois

Largura:  |  Altura:  |  Tamanho: 491 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 635 B

Depois

Largura:  |  Altura:  |  Tamanho: 586 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 562 B

Depois

Largura:  |  Altura:  |  Tamanho: 526 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 674 B

Depois

Largura:  |  Altura:  |  Tamanho: 619 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 817 B

Depois

Largura:  |  Altura:  |  Tamanho: 698 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 940 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 900 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.2 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 949 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 843 B

Depois

Largura:  |  Altura:  |  Tamanho: 706 B

-55
Ver Arquivo
@@ -1,55 +0,0 @@
button-accept-jobs.gif green Aceptar trabajos
button-add-class.gif standard Añadir clase
button-add-printer.gif standard Añadir impresora
button-add-rss-subscription.gif standard Añadir subscripción RSS
button-add-this-printer.gif standard Añadir esta impresora
button-cancel-all-jobs.gif black Cancelar todos los trabajos
button-cancel-job.gif black Cancelar trabajo
button-cancel-subscription.gif standard Cancelar subscripción
button-change-settings.gif standard Cambiar especificaciones
button-clean-print-heads.gif standard Limpiar cabezales de impresión
button-clear.gif standard Borrar
button-continue.gif standard Siguiente
button-delete-class.gif black Borrar clase
button-delete-printer.gif black Borrar impresora
button-edit-configuration-file.gif standard Editar archivo configuración
button-export-samba.gif standard Exportar impresoras a Samba
button-find-new-printers.gif standard Encontrar nuevas impresoras
button-help.gif standard Ayuda
button-hold-job.gif red Retener trabajo
button-manage-classes.gif standard Administrar clases
button-manage-jobs.gif standard Administrar trabajos
button-manage-printers.gif standard Administrar impresoras
button-manage-server.gif standard Administrar servidor
button-modify-class.gif standard Modificar clase
button-modify-printer.gif standard Modificar impresora
button-move-job.gif standard Mover trabajo
button-move-jobs.gif standard Mover todos los trabajos
button-print-self-test-page.gif standard Imprimir página de auto prueba
button-print-test-page.gif standard Imprimir página de prueba
button-publish-printer.gif standard Publicar impresora
button-reject-jobs.gif red Rechazar trabajos
button-release-job.gif green Liberar trabajo
button-restart-job.gif standard Reimprimir trabajo
button-save-changes.gif standard Guardar cambios
button-search.gif standard Buscar
button-set-allowed-users.gif standard Cambiar usuarios permitidos
button-set-as-default.gif standard Poner como predeterminada
button-set-printer-options.gif standard Cambiar opciones impresora
button-show-active.gif standard Mostrar trabajos activos
button-show-all.gif standard Mostrar todos los trabajos
button-show-completed.gif standard Mostrar trabajos completados
button-show-next.gif standard Mostrar siguiente
button-show-previous.gif standard Mostrar anterior
button-sort-ascending.gif standard @UP Orden ascendente @UP
button-sort-descending.gif standard @DOWN Orden descendente @DOWN
button-start-class.gif green Iniciar clase
button-start-printer.gif green Iniciar impresora
button-stop-class.gif red Detener clase
button-stop-printer.gif red Detener impresora
button-unpublish-printer.gif standard No publicar impresora
button-use-default-config.gif standard Usar archivo de configuración predeterminado
button-view-access-log.gif standard Ver archivo de registro de accesos
button-view-error-log.gif standard Ver archivo de registro de errores
button-view-page-log.gif standard Ver archivo de registro de páginas
button-view-printable-version.gif standard Ver versión imprimible
+2 -2
Ver Arquivo
@@ -62,7 +62,7 @@ BORDER="0" ALT=""></A>
<P>Estas p&aacute;ginas web permiten monitorizar sus impresoras y trabajos
as&iacute; como realizar tareas de administraci&oacute;n del sistema.
Haga clic en cualquiera de las pesta&ntilde;as de la parte superior o en los
Haga click en cualquiera de las pesta&ntilde;as de la parte superior o en los
botones de la parte inferior para realizar la tarea correspondiente.</P>
<P>
@@ -88,7 +88,7 @@ STYLE="padding-right: 10px;" ALT="Ordenador feliz e impresora">
CUPS proporciona una capa de impresi&oacute;n portable
para sistemas operativos basados en
UNIX<SUP>&reg;</SUP>. Est&aacute; desarrollado y mantenido
por <A HREF="http://www.apple.com">Apple Inc.</A> para favorecer una soluci&oacute;n de impresi&oacute;n
por <A HREF="http://www.apple.com">Apple Inc.</a> para favorecer una soluci&oacute;n de impresi&oacute;n
estandar. CUPS es el sistema de impresi&oacute;n estandar usado en
MacOS<SUP>&reg;</SUP> X y la mayor&iacute;a de distribuciones
Linux<SUP>&reg;</SUP>.</P>
+583 -991
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+1 -20
Ver Arquivo
@@ -186,10 +186,6 @@ translated buttons.</P>
<TD>button-export-samba.gif</TD>
<TD>Export Printers to Samba</TD>
</TR>
<TR>
<TD>button-find-new-printers.gif</TD>
<TD>Find New Printers</TD>
</TR>
<TR>
<TD>button-help.gif</TD>
<TD>Help</TD>
@@ -383,14 +379,7 @@ message catalog and then make any necessary changes.</P>
favorite text editor or translation program to translate the text
to the desired language.</P>
<P>Then validate your translation using the <VAR>locale/checkpo</VAR> utility:</P>
<PRE CLASS="command">
cd locale
./checkpo cups_ll_CC.po
</PRE>
<P>After fixing any errors in your translation, add your locale to the <CODE>LANGUAGES</CODE>
<P>Finally, add your locale to the <CODE>LANGUAGES</CODE>
variable in the <VAR>Makedefs</VAR> file and run the "make
install" command in the <VAR>locale</VAR> subdirectory to test
the translation.</P>
@@ -566,10 +555,6 @@ translated all of the templates, add the locale to the
<TD>This template shows the "showing N or M jobs" header in the
jobs list.</TD>
</TR>
<TR>
<TD>list-available-printers.tmpl</TD>
<TD>This template shows a list of new printers that have been found.</TD>
</TR>
<TR>
<TD>maintenance.tmpl</TD>
<TD>This template shows "maintenance commands sent".</TD>
@@ -931,10 +916,6 @@ supported <CODE>OP</CODE> values.</P>
<TD>export-samba</TD>
<TD>Exports printers to Samba.</TD>
</TR>
<TR>
<TD>find-new-printers</TD>
<TD>Find new printers that have not yet been added.</TD>
</TR>
<TR>
<TD>modify-class</TD>
<TD>Modifies a printer class.</TD>
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 37 KiB

-386
Ver Arquivo
@@ -1,386 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="438.75"
height="315"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.45.1"
version="1.0"
sodipodi:docbase="/home/mike/c/cups-trunk/doc/images"
sodipodi:docname="raster.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/home/mike/c/cups-trunk/doc/images/raster.png"
inkscape:export-xdpi="128"
inkscape:export-ydpi="128">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.90444444"
inkscape:cx="225"
inkscape:cy="177.5167"
inkscape:document-units="px"
inkscape:current-layer="layer1"
width="351pt"
height="252pt"
units="pt"
showgrid="true"
gridspacingx="9pt"
gridspacingy="9pt"
gridanglex="24pt"
gridanglez="24pt"
grid_units="pt"
inkscape:object-bbox="true"
inkscape:object-points="true"
inkscape:object-nodes="true"
inkscape:grid-points="true"
inkscape:guide-points="true"
inkscape:window-width="872"
inkscape:window-height="622"
inkscape:window-x="0"
inkscape:window-y="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g3338"
transform="translate(0.5,-1.3515625)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3336"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot2357"
xml:space="preserve"><flowRegion
id="flowRegion2359"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect2361" /></flowRegion><flowPara
id="flowPara2363">Back</flowPara><flowPara
id="flowPara2365">Side</flowPara></flowRoot> </g>
<g
id="g3346"
transform="translate(113,-1.3515625)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3348"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot3350"
xml:space="preserve"><flowRegion
id="flowRegion3352"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect3354" /></flowRegion><flowPara
id="flowPara3356">Back</flowPara><flowPara
id="flowPara3358">Side</flowPara></flowRoot> </g>
<g
id="g3360"
transform="translate(226,-1.8515625)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3362"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot3364"
xml:space="preserve"><flowRegion
id="flowRegion3366"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect3368" /></flowRegion><flowPara
id="flowPara3370">Back</flowPara><flowPara
id="flowPara3372">Side</flowPara></flowRoot> </g>
<g
id="g3374"
transform="matrix(-1,0,0,-1,428,111.14844)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3376"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot3378"
xml:space="preserve"><flowRegion
id="flowRegion3380"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect3382" /></flowRegion><flowPara
id="flowPara3384">Back</flowPara><flowPara
id="flowPara3386">Side</flowPara></flowRoot> </g>
<g
id="g3388"
transform="matrix(-1,0,0,-1,90.5,279.89844)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3390"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot3392"
xml:space="preserve"><flowRegion
id="flowRegion3394"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect3396" /></flowRegion><flowPara
id="flowPara3398">Back</flowPara><flowPara
id="flowPara3400">Side</flowPara></flowRoot> </g>
<g
id="g3402"
transform="translate(113,167.39844)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3404"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot3406"
xml:space="preserve"><flowRegion
id="flowRegion3408"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect3410" /></flowRegion><flowPara
id="flowPara3412">Back</flowPara><flowPara
id="flowPara3414">Side</flowPara></flowRoot> </g>
<g
id="g3416"
transform="matrix(1,0,0,-1,226,279.39844)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3418"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot3420"
xml:space="preserve"><flowRegion
id="flowRegion3422"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect3424" /></flowRegion><flowPara
id="flowPara3426">Back</flowPara><flowPara
id="flowPara3428">Side</flowPara></flowRoot> </g>
<g
id="g3430"
transform="matrix(-1,0,0,1,428,167.39844)">
<rect
y="11.25"
x="11.25"
height="90"
width="67.5"
id="rect3432"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<flowRoot
transform="translate(11.34082,17.328046)"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
id="flowRoot3434"
xml:space="preserve"><flowRegion
id="flowRegion3436"><rect
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;font-family:Monospace"
y="12.162162"
x="9.95086"
height="128.25552"
width="86.240784"
id="rect3438" /></flowRegion><flowPara
id="flowPara3440">Back</flowPara><flowPara
id="flowPara3442">Side</flowPara></flowRoot> </g>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="47.503906"
y="119.83008"
id="text3444"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3446"
x="47.503906"
y="119.83008">Normal</tspan><tspan
sodipodi:role="line"
x="47.503906"
y="134.83008"
id="tspan3448">false</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="160.00391"
y="119.83008"
id="text3450"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3452"
x="160.00391"
y="119.83008">Normal</tspan><tspan
sodipodi:role="line"
x="160.00391"
y="134.83008"
id="tspan3454">true</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="273.00391"
y="119.83008"
id="text3456"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3458"
x="273.00391"
y="119.83008">ManualTumble</tspan><tspan
sodipodi:role="line"
x="273.00391"
y="134.83008"
id="tspan3460">false</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="385.39062"
y="119.83008"
id="text3462"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3464"
x="385.39062"
y="119.83008">ManualTumble</tspan><tspan
sodipodi:role="line"
x="385.39062"
y="134.83008"
id="tspan3466">true</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="43.847656"
y="288.51562"
id="text3468"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3470"
x="43.847656"
y="288.51562">Rotated</tspan><tspan
sodipodi:role="line"
x="43.847656"
y="303.51562"
id="tspan3472">false</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="156.84766"
y="288.51562"
id="text3474"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3476"
x="156.84766"
y="288.51562">Rotated</tspan><tspan
sodipodi:role="line"
x="156.84766"
y="303.51562"
id="tspan3478">true</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="269.34766"
y="288.58008"
id="text3480"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3482"
x="269.34766"
y="288.58008">Flipped</tspan><tspan
sodipodi:role="line"
x="269.34766"
y="303.58008"
id="tspan3484">false</tspan></text>
<text
xml:space="preserve"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Monospace"
x="381.84766"
y="288.58008"
id="text3486"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3488"
x="381.84766"
y="288.58008">Flipped</tspan><tspan
sodipodi:role="line"
x="381.84766"
y="303.58008"
id="tspan3490">true</tspan></text>
</g>
</svg>

Antes

Largura:  |  Altura:  |  Tamanho: 17 KiB

+1 -2
Ver Arquivo
@@ -660,8 +660,7 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
* End the label and eject...
*/
puts("^IDR:CUPS.GRF^FS");
puts("^XZ");
puts("^XZ");
/*
* Free compression buffers...
+2 -14
Ver Arquivo
@@ -16,8 +16,8 @@
include ../Makedefs
OBJS = checkpo po2strings.o strings2po.o translate.o
TARGETS = checkpo po2strings strings2po translate
OBJS = po2strings.o strings2po.o translate.o
TARGETS = po2strings strings2po translate
#
@@ -95,18 +95,6 @@ pot:
done
#
# checkpo - A simple utility to check PO files for correct translation
# strings.
#
# checkpo filename.po [... filenameN.po]
#
checkpo: checkpo.o ../cups/$(LIBCUPS)
echo Linking $<...
$(CC) $(LDFLAGS) -o checkpo checkpo.o $(LIBS)
#
# po2strings - A simple utility which uses iconv to convert GNU gettext
# message catalogs to Mac OS X .strings files.
-343
Ver Arquivo
@@ -1,343 +0,0 @@
/*
* "$Id$"
*
* Verify that translations in the .po file have the same number and type of
* printf-style format strings.
*
* Usage:
*
* checkpo filename.po [... filenameN.po]
*
* Compile with:
*
* gcc -o checkpo checkpo.c `cups-config --libs`
*
* Contents:
*
* main() - Validate .po files.
* abbreviate() - Abbreviate a message string as needed.
* collect_formats() - Collect all of the format strings in the msgid.
* free_formats() - Free all of the format strings.
*/
#include <stdio.h>
#include <stdlib.h>
#include <cups/string.h>
#include <cups/i18n.h>
/*
* Local functions...
*/
static char *abbreviate(const char *s, char *buf, int bufsize);
static cups_array_t *collect_formats(const char *id);
static void free_formats(cups_array_t *fmts);
/*
* 'main()' - Validate .po files.
*/
int /* O - Exit code */
main(int argc, /* I - Number of command-line args */
char *argv[]) /* I - Command-line arguments */
{
int i; /* Looping var */
cups_array_t *po; /* .po file */
_cups_message_t *msg; /* Current message */
cups_array_t *idfmts, /* Format strings in msgid */
*strfmts; /* Format strings in msgstr */
char *idfmt, /* Current msgid format string */
*strfmt; /* Current msgstr format string */
int fmtidx, /* Format index */
fmtcount; /* Format count */
int status, /* Exit status */
pass, /* Pass/fail status */
untranslated; /* Untranslated messages */
char idbuf[80], /* Abbreviated msgid */
strbuf[80]; /* Abbreviated msgstr */
if (argc < 2)
{
puts("Usage: checkpo filename.po [... filenameN.po]");
return (1);
}
/*
* Check every .po file on the command-line...
*/
for (i = 1, status = 0; i < argc; i ++)
{
/*
* Use the CUPS .po loader to get the message strings...
*/
if ((po = _cupsMessageLoad(argv[i])) == NULL)
{
perror(argv[i]);
return (1);
}
printf("%s: ", argv[i]);
fflush(stdout);
/*
* Scan every message for a % string and then match them up with
* the corresponding string in the translation...
*/
pass = 1;
untranslated = 0;
for (msg = (_cups_message_t *)cupsArrayFirst(po);
msg;
msg = (_cups_message_t *)cupsArrayNext(po))
{
if (!msg->str || !msg->str[0])
{
untranslated ++;
continue;
}
else if (strchr(msg->id, '%'))
{
idfmts = collect_formats(msg->id);
strfmts = collect_formats(msg->str);
fmtidx = 0;
for (strfmt = (char *)cupsArrayFirst(strfmts);
strfmt;
strfmt = (char *)cupsArrayNext(strfmts))
{
if (isdigit(strfmt[1] & 255) && strfmt[2] == '$')
{
/*
* Handle positioned format stuff...
*/
fmtidx = strfmt[1] - '1';
strfmt += 3;
if ((idfmt = (char *)cupsArrayIndex(idfmts, fmtidx)) != NULL)
idfmt ++;
}
else
{
/*
* Compare against the current format...
*/
idfmt = (char *)cupsArrayIndex(idfmts, fmtidx);
}
fmtidx ++;
if (!idfmt || strcmp(strfmt, idfmt))
break;
fmtcount ++;
}
if (cupsArrayCount(strfmts) != cupsArrayCount(idfmts) || strfmt)
{
if (pass)
{
pass = 0;
puts("FAIL");
}
printf(" Bad translation string \"%s\"\n for \"%s\"\n",
abbreviate(msg->str, strbuf, sizeof(strbuf)),
abbreviate(msg->id, idbuf, sizeof(idbuf)));
fputs(" Translation formats:", stdout);
for (strfmt = (char *)cupsArrayFirst(strfmts);
strfmt;
strfmt = (char *)cupsArrayNext(strfmts))
printf(" %s", strfmt);
fputs("\n Original formats:", stdout);
for (idfmt = (char *)cupsArrayFirst(idfmts);
idfmt;
idfmt = (char *)cupsArrayNext(idfmts))
printf(" %s", idfmt);
putchar('\n');
}
free_formats(idfmts);
free_formats(strfmts);
}
if ((!strncmp(msg->id, "ALERT:", 6) && strncmp(msg->str, "ALERT:", 6)) ||
(!strncmp(msg->id, "CRIT:", 5) && strncmp(msg->str, "CRIT:", 5)) ||
(!strncmp(msg->id, "DEBUG:", 6) && strncmp(msg->str, "DEBUG:", 6)) ||
(!strncmp(msg->id, "DEBUG2:", 7) && strncmp(msg->str, "DEBUG2:", 7)) ||
(!strncmp(msg->id, "EMERG:", 6) && strncmp(msg->str, "EMERG:", 6)) ||
(!strncmp(msg->id, "ERROR:", 6) && strncmp(msg->str, "ERROR:", 6)) ||
(!strncmp(msg->id, "INFO:", 5) && strncmp(msg->str, "INFO:", 5)) ||
(!strncmp(msg->id, "NOTICE:", 7) && strncmp(msg->str, "NOTICE:", 7)) ||
(!strncmp(msg->id, "WARNING:", 8) && strncmp(msg->str, "WARNING:", 8)))
{
if (pass)
{
pass = 0;
puts("FAIL");
}
printf(" Bad prefix on filter message \"%s\"\n for \"%s\"\n",
abbreviate(msg->str, strbuf, sizeof(strbuf)),
abbreviate(msg->id, idbuf, sizeof(idbuf)));
}
}
if (pass)
{
if ((untranslated * 10) >= cupsArrayCount(po))
{
/*
* Only allow 10% of messages to be untranslated before we fail...
*/
pass = 0;
puts("FAIL");
printf(" Too many untranslated messages (%d of %d)\n", untranslated,
cupsArrayCount(po));
}
else if (untranslated > 0)
printf("PASS (%d of %d untranslated)\n", untranslated,
cupsArrayCount(po));
else
puts("PASS");
}
if (!pass)
status = 1;
_cupsMessageFree(po);
}
return (status);
}
/*
* 'abbreviate()' - Abbreviate a message string as needed.
*/
static char * /* O - Abbreviated string */
abbreviate(const char *s, /* I - String to abbreviate */
char *buf, /* I - Buffer */
int bufsize) /* I - Size of buffer */
{
char *bufptr; /* Pointer into buffer */
for (bufptr = buf, bufsize -= 4; *s && bufsize > 0; s ++)
{
if (*s == '\n')
{
if (bufsize < 2)
break;
*bufptr++ = '\\';
*bufptr++ = 'n';
bufsize -= 2;
}
else if (*s == '\t')
{
if (bufsize < 2)
break;
*bufptr++ = '\\';
*bufptr++ = 't';
bufsize -= 2;
}
else if (*s >= 0 && *s < ' ')
{
if (bufsize < 4)
break;
sprintf(bufptr, "\\%03o", *s);
bufptr += 4;
bufsize -= 4;
}
else
{
*bufptr++ = *s;
bufsize --;
}
}
if (*s)
strcpy(bufptr, "...");
else
*bufptr = '\0';
return (buf);
}
/*
* 'collect_formats()' - Collect all of the format strings in the msgid.
*/
static cups_array_t * /* O - Array of format strings */
collect_formats(const char *id) /* I - msgid string */
{
cups_array_t *fmts; /* Array of format strings */
char buf[255], /* Format string buffer */
*bufptr; /* Pointer into format string */
fmts = cupsArrayNew(NULL, NULL);
while ((id = strchr(id, '%')) != NULL)
{
if (id[1] == '%')
{
/*
* Skip %%...
*/
id += 2;
continue;
}
for (bufptr = buf; *id && bufptr < (buf + sizeof(buf) - 1); id ++)
{
*bufptr++ = *id;
if (strchr("CDEFGIOSUXcdeifgopsux", *id))
{
id ++;
break;
}
}
*bufptr = '\0';
cupsArrayAdd(fmts, strdup(buf));
}
return (fmts);
}
/*
* 'free_formats()' - Free all of the format strings.
*/
static void
free_formats(cups_array_t *fmts) /* I - Array of format strings */
{
char *s; /* Current string */
for (s = (char *)cupsArrayFirst(fmts); s; s = (char *)cupsArrayNext(fmts))
free(s);
cupsArrayDelete(fmts);
}
/*
* End of "$Id$".
*/

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