if ((print_fd = open(argv[6], O_RDONLY)) < 0)
{
- _cupsLangPrintError(stderr, "ERROR",
- _("Unable to open print file"));
+ _cupsLangPrintError("ERROR", _("Unable to open print file"));
return (CUPS_BACKEND_FAILED);
}
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to locate printer \"%s\".\n"), hostname);
+ _("Unable to locate printer \"%s\"."), hostname);
return (CUPS_BACKEND_STOP);
}
fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
- _cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer."));
for (delay = 5;;)
{
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to contact printer, queuing on next "
- "printer in class.\n"));
+ "printer in class."));
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("The printer is not responding.\n"));
+ _("The printer is not responding."));
return (CUPS_BACKEND_FAILED);
}
case EHOSTDOWN :
_cupsLangPrintFilter(stderr, "WARNING",
_("Network printer \"%s\" may not exist or "
- "is unavailable at this time.\n"),
+ "is unavailable at this time."),
hostname);
break;
case EHOSTUNREACH :
_cupsLangPrintFilter(stderr, "WARNING",
_("Network printer \"%s\" is unreachable at "
- "this time.\n"), hostname);
+ "this time."), hostname);
break;
case ECONNREFUSED :
default :
_cupsLangPrintFilter(stderr, "WARNING",
- _("Network printer \"%s\" is busy.\n"),
+ _("Network printer \"%s\" is busy."),
hostname);
break;
}
else
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Network printer \"%s\" is not responding.\n"),
+ _("Network printer \"%s\" is not responding."),
hostname);
sleep(30);
}
}
fputs("STATE: -connecting-to-device\n", stderr);
- _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
#ifdef AF_INET6
if (addr->addr.addr.sa_family == AF_INET6)
backendNetworkSideCB);
if (print_fd != 0 && tbytes >= 0)
- _cupsLangPrintFilter(stderr, "INFO", _("Print file sent.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Print file sent."));
}
#ifdef __APPLE__
* Shutdown the socket and wait for the other end to finish...
*/
- _cupsLangPrintFilter(stderr, "INFO", _("Waiting for printer to finish.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Waiting for printer to finish."));
shutdown(device_fd, 1);
close(print_fd);
if (tbytes >= 0)
- _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
}
{
fprintf(stderr, "DEBUG: Fatal USB error.\n");
_cupsLangPrintFilter(stderr, "ERROR",
- _("There was an unrecoverable USB error.\n"));
+ _("There was an unrecoverable USB error."));
if (!g.make)
fputs("DEBUG: USB make string is NULL\n", stderr);
fputs("STATE: +apple-missing-usbclassdriver-error\n", stderr);
_cupsLangPrintFilter(stderr, "ERROR",
- _("There was an unrecoverable USB error.\n"));
+ _("There was an unrecoverable USB error."));
fprintf(stderr, "DEBUG: Could not load %s\n", print_buffer);
if (driverBundlePath)
if (countdown <= 0)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Waiting for printer to become available.\n"));
+ _("Waiting for printer to become available."));
fprintf(stderr, "DEBUG: USB printer status: 0x%08x\n", (int)status);
countdown = SUBSEQUENT_LOG_INTERVAL; /* subsequent log entries, every 15 seconds */
}
{
fprintf(stderr, "DEBUG: Fatal USB error.\n");
_cupsLangPrintFilter(stderr, "ERROR",
- _("There was an unrecoverable USB error.\n"));
+ _("There was an unrecoverable USB error."));
fputs("DEBUG: Couldn't create side-channel thread\n", stderr);
registry_close();
return (CUPS_BACKEND_STOP);
{
fprintf(stderr, "DEBUG: Fatal USB error.\n");
_cupsLangPrintFilter(stderr, "ERROR",
- _("There was an unrecoverable USB error.\n"));
+ _("There was an unrecoverable USB error."));
fputs("DEBUG: Couldn't create read thread\n", stderr);
registry_close();
return (CUPS_BACKEND_STOP);
while (status == noErr && copies-- > 0)
{
- _cupsLangPrintFilter(stderr, "INFO", _("Sending data to printer.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Sending data to printer."));
if (print_fd != STDIN_FILENO)
{
else if (errno != EAGAIN && errno != EINTR)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to read print data.\n"));
+ _("Unable to read print data."));
perror("DEBUG: select");
registry_close();
return (CUPS_BACKEND_FAILED);
if (errno != EAGAIN && errno != EINTR)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to read print data.\n"));
+ _("Unable to read print data."));
perror("DEBUG: read");
registry_close();
return (CUPS_BACKEND_FAILED);
* Write error - bail if we don't see an error we can retry...
*/
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to send data to printer.\n"));
+ _("Unable to send data to printer."));
fprintf(stderr, "DEBUG: USB class driver WritePipe returned %x\n",
iostatus);
if (!keepLooking && g.status_timer != NULL)
{
fputs("STATE: -offline-report\n", stderr);
- _cupsLangPrintFilter(stderr, "INFO", _("Printer is now online.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Printer is now online."));
CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), g.status_timer, kCFRunLoopDefaultMode);
CFRelease(g.status_timer);
g.status_timer = NULL;
void *info)
{
fputs("STATE: +offline-report\n", stderr);
- _cupsLangPrintFilter(stderr, "INFO", _("Printer is offline.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Printer is offline."));
if (getenv("CLASS") != NULL)
{
*wait_eof = false;
else
_cupsLangPrintFilter(stderr, "WARNING",
- _("Boolean expected for waiteof option \"%s\".\n"),
+ _("Boolean expected for waiteof option \"%s\"."),
value);
}
else if (!strcasecmp(name, "serial"))
perror("DEBUG: Unable to set binary preference to ppc");
# endif /* __x86_64__ */
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to use legacy USB class driver.\n"));
+ _("Unable to use legacy USB class driver."));
exit(CUPS_BACKEND_STOP);
}
}
fprintf(stderr, "DEBUG: Unable to exec %s: %s\n", usbpath,
strerror(err));
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to use legacy USB class driver.\n"));
+ _("Unable to use legacy USB class driver."));
exit(CUPS_BACKEND_STOP);
}
while ((printer = find_device(print_cb, uri)) == NULL)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Waiting for printer to become available.\n"));
+ _("Waiting for printer to become available."));
sleep(5);
}
bytes, 3600000) < 0)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to send data to printer.\n"));
+ _("Unable to send data to printer."));
tbytes = -1;
break;
}
{
_cupsLangPrintFilter(stderr, "ERROR",
_("ERROR: Unable to send data to "
- "printer.\n"));
+ "printer."));
tbytes = -1;
break;
}
_cupsLangPrintFilter(stderr, "INFO",
_("Unable to contact printer, queuing on next "
- "printer in class.\n"));
+ "printer in class."));
/*
* Sleep 5 seconds to keep the job from requeuing too rapidly...
if (errno == EBUSY)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Printer busy, will retry in 10 seconds.\n"));
+ _("Printer busy, will retry in 10 seconds."));
sleep(10);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT ||
{
_cupsLangPrintFilter(stderr, "INFO",
_("Printer not connected, will retry in 30 "
- "seconds.\n"));
+ "seconds."));
sleep(30);
}
else
if (busy)
_cupsLangPrintFilter(stderr, "INFO",
- _("Printer is busy, will retry in 5 seconds.\n"));
+ _("Printer is busy, will retry in 5 seconds."));
sleep(5);
}
if (busy)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Printer is busy, will retry in 5 seconds.\n"));
+ _("Printer is busy, will retry in 5 seconds."));
sleep(5);
}
}
{
_cupsLangPrintFilter(stderr, "ERROR",
_("No device URI found in argv[0] or in DEVICE_URI "
- "environment variable.\n"));
+ "environment variable."));
return (1);
}
if ((print_fd = open(argv[6], O_RDONLY)) < 0)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to open print file"));
+ _cupsLangPrintError("ERROR", _("Unable to open print file"));
return (CUPS_BACKEND_FAILED);
}
LANGFILES="$LANGFILES templates/$lang/header.tmpl"
fi
done
-elif test "x$CUPS_BUNDLEDIR" != ""
+elif test "x$CUPS_BUNDLEDIR" != ""; then
INSTALL_LANGUAGES="install-langbundle"
UNINSTALL_LANGUAGES="uninstall-langbundle"
fi
*/
void
-_cupsLangPrintError(const char *message)/* I - Message */
+_cupsLangPrintError(const char *prefix, /* I - Non-localized message prefix */
+ const char *message)/* I - Message */
{
int bytes; /* Number of bytes formatted */
int last_errno; /* Last error */
* Format the message...
*/
- snprintf(buffer, sizeof(buffer), "%s: %s\n",
+ snprintf(buffer, sizeof(buffer), "%s%s: %s\n", prefix ? prefix : "",
_cupsLangString(cg->lang_default, message), strerror(last_errno));
/*
*/
va_start(ap, message);
- snprintf(temp, sizeof(temp), "%s: %s", prefix,
+ snprintf(temp, sizeof(temp), "%s: %s\n", prefix,
_cupsLangString(cg->lang_default, message));
vsnprintf(buffer, sizeof(buffer), temp, ap);
va_end(ap);
# endif /* __APPLE__ */
extern void _cupsCharmapFlush(void);
extern const char *_cupsEncodingName(cups_encoding_t encoding);
-extern void _cupsLangPrintError(const char *message);
+extern void _cupsLangPrintError(const char *prefix,
+ const char *message);
extern int _cupsLangPrintFilter(FILE *fp, const char *prefix,
const char *message, ...)
# ifdef __GNUC__
if (argc < 6 || argc > 7)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("%s job-id user title copies options [file]\n"),
+ _("%s job-id user title copies options [file]"),
"rastertoescpx");
return (1);
}
int linenum; /* Line number */
_cupsLangPrintFilter(stderr, "ERROR",
- _("The PPD file could not be opened.\n"));
+ _("The PPD file could not be opened."));
status = ppdLastError(&linenum);
{
if ((fd = open(argv[6], O_RDONLY)) == -1)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+ _cupsLangPrintError("ERROR", _("Unable to open raster file"));
return (1);
}
}
page ++;
fprintf(stderr, "PAGE: %d 1\n", page);
- _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), page);
StartPage(ppd, &header);
if ((y & 127) == 0)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Printing page %d, %d%% complete.\n"),
- Page, 100 * y / header.cupsHeight);
+ _("Printing page %d, %d%% complete."),
+ page, 100 * y / header.cupsHeight);
fprintf(stderr, "ATTR: job-media-progress=%d\n",
100 * y / header.cupsHeight);
}
* Eject the page...
*/
- _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), page);
EndPage(ppd, &header);
if (fd != 0)
close(fd);
- if (Page == 0)
+ if (page == 0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
return (1);
}
else
{
- _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
return (0);
}
}
if (argc < 6 || argc > 7)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("%s job-id user title copies options [file]\n"),
+ _("%s job-id user title copies options [file]"),
"rastertopclx");
return (1);
}
int linenum; /* Line number */
_cupsLangPrintFilter(stderr, "ERROR",
- _("The PPD file could not be opened.\n"));
+ _("The PPD file could not be opened."));
status = ppdLastError(&linenum);
{
if ((fd = open(argv[6], O_RDONLY)) == -1)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+ _cupsLangPrintError("ERROR", _("Unable to open raster file"));
return (1);
}
}
Page ++;
fprintf(stderr, "PAGE: %d %d\n", Page, header.NumCopies);
- _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), Page);
StartPage(ppd, &header, atoi(argv[1]), argv[2], argv[3],
num_options, options);
if ((y & 127) == 0)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Printing page %d, %d%% complete.\n"),
+ _("Printing page %d, %d%% complete."),
Page, 100 * y / header.cupsHeight);
fprintf(stderr, "ATTR: job-media-progress=%d\n",
100 * y / header.cupsHeight);
* Eject the page...
*/
- _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page);
EndPage(ppd, &header);
if (Page == 0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
return (1);
}
else
{
- _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
return (0);
}
}
if (!*ptr)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Missing value on line %d of banner file.\n"),
+ _("Missing value on line %d of banner file."),
linenum);
continue;
}
*/
fclose(fp);
- _cupsLangPrintFilter(stderr, "ERROR", _("Bad charset file \"%s\".\n"),
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad charset file \"%s\"."),
filename);
exit(1);
}
*/
_cupsLangPrintFilter(stderr, "ERROR",
- _("Bad font description line \"%s\".\n"), valptr);
+ _("Bad font description line \"%s\"."), valptr);
fclose(fp);
exit(1);
}
fonts->directions[fonts->num_fonts] = -1;
else
{
- _cupsLangPrintFilter(stderr, "ERROR", _("Bad text direction \"%s\".\n"),
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad text direction \"%s\"."),
valptr);
fclose(fp);
exit(1);
*/
_cupsLangPrintFilter(stderr, "ERROR",
- _("Bad font description line \"%s\".\n"), valptr);
+ _("Bad font description line \"%s\"."), valptr);
fclose(fp);
exit(1);
}
fonts->widths[fonts->num_fonts] = 2;
else
{
- _cupsLangPrintFilter(stderr, "ERROR", _("Bad text width \"%s\".\n"),
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad text width \"%s\"."),
valptr);
fclose(fp);
exit(1);
if (cupsArrayCount(fonts->unique) == 0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("No fonts in charset file.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR", _("No fonts in charset file."));
exit(1);
}
if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to open print file"));
+ _cupsLangPrintError("ERROR", _("Unable to open print file"));
return (1);
}
}
if (!doc->pages)
{
- _cupsLangPrintError(stderr, "EMERG",
- _("Unable to allocate memory for pages array"));
+ _cupsLangPrintError("EMERG", _("Unable to allocate memory for pages array"));
exit(1);
}
if ((pageinfo = calloc(1, sizeof(pstops_page_t))) == NULL)
{
- _cupsLangPrintError(stderr, "EMERG",
- _("Unable to allocate memory for page info"));
+ _cupsLangPrintError("EMERG", _("Unable to allocate memory for page info"));
exit(1);
}
if (cupsFileSeek(fp, offset) < 0)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to see in file"));
+ _cupsLangPrintError("ERROR", _("Unable to see in file"));
return;
}
if (bytes > sizeof(buffer))
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Buffer overflow detected, aborting.\n"));
+ _("Buffer overflow detected, aborting."));
exit(1);
}
if ((option = ppdFindOption(ppd, name + 1)) == NULL)
{
- _cupsLangPrintFilter(stderr, "WARNING", _("Unknown option \"%s\".\n"),
+ _cupsLangPrintFilter(stderr, "WARNING", _("Unknown option \"%s\"."),
name + 1);
return (num_options);
}
{
_cupsLangPrintFilter(stderr, "WARNING",
_("Option \"%s\" cannot be included via "
- "%%%%IncludeFeature.\n"), name + 1);
+ "%%%%IncludeFeature."), name + 1);
return (num_options);
}
if (!ppdFindChoice(option, value))
{
_cupsLangPrintFilter(stderr, "WARNING",
- _("Unknown choice \"%s\" for option \"%s\".\n"),
+ _("Unknown choice \"%s\" for option \"%s\"."),
value, name + 1);
return (num_options);
}
{
_cupsLangPrintFilter(stderr, "ERROR",
_("Unsupported brightness value %s, using "
- "brightness=100.\n"), val);
+ "brightness=100."), val);
doc->brightness = 1.0f;
}
else
if (intval < 1 || intval > 10000)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unsupported gamma value %s, using gamma=1000.\n"),
+ _("Unsupported gamma value %s, using gamma=1000."),
val);
doc->gamma = 1.0f;
}
default :
_cupsLangPrintFilter(stderr, "ERROR",
_("Unsupported number-up value %d, using "
- "number-up=1.\n"), intval);
+ "number-up=1."), intval);
doc->number_up = 1;
break;
}
{
_cupsLangPrintFilter(stderr, "ERROR",
_("Unsupported number-up-layout value %s, using "
- "number-up-layout=lrtb.\n"), val);
+ "number-up-layout=lrtb."), val);
doc->number_up_layout = PSTOPS_LAYOUT_LRTB;
}
}
{
_cupsLangPrintFilter(stderr, "ERROR",
_("Unsupported page-border value %s, using "
- "page-border=none.\n"), val);
+ "page-border=none."), val);
doc->page_border = PSTOPS_BORDERNONE;
}
}
{
if ((fd = open(argv[6], O_RDONLY)) == -1)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+ _cupsLangPrintError("ERROR", _("Unable to open raster file"));
sleep(1);
return (1);
}
int linenum; /* Line number */
_cupsLangPrintFilter(stderr, "ERROR",
- _("The PPD file could not be opened.\n"));
+ _("The PPD file could not be opened."));
status = ppdLastError(&linenum);
page ++;
fprintf(stderr, "PAGE: %d %d\n", page, header.NumCopies);
- _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), page);
/*
* Start the page...
if ((y & 127) == 0)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Printing page %d, %d%% complete.\n"),
- Page, 100 * y / header.cupsHeight);
+ _("Printing page %d, %d%% complete."),
+ page, 100 * y / header.cupsHeight);
fprintf(stderr, "ATTR: job-media-progress=%d\n",
100 * y / header.cupsHeight);
}
* Eject the page...
*/
- _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), page);
EndPage(&header);
* If no pages were printed, send an error message...
*/
- if (Page == 0)
+ if (page == 0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
return (1);
}
else
{
- _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
return (0);
}
}
*/
_cupsLangPrintFilter(stderr, "ERROR",
- _("%s job-id user title copies options [file]\n"),
+ _("%s job-id user title copies options [file]"),
"rastertohp");
return (1);
}
{
if ((fd = open(argv[6], O_RDONLY)) == -1)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+ _cupsLangPrintError("ERROR", _("Unable to open raster file"));
sleep(1);
return (1);
}
int linenum; /* Line number */
_cupsLangPrintFilter(stderr, "ERROR",
- _("The PPD file could not be opened.\n"));
+ _("The PPD file could not be opened."));
status = ppdLastError(&linenum);
if ((y & 127) == 0)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Printing page %d, %d%% complete.\n"),
+ _("Printing page %d, %d%% complete."),
Page, 100 * y / header.cupsHeight);
fprintf(stderr, "ATTR: job-media-progress=%d\n",
100 * y / header.cupsHeight);
* Eject the page...
*/
- _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page);
EndPage();
if (Page == 0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
return (1);
}
else
{
- _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
return (0);
}
}
{
if ((fd = open(argv[6], O_RDONLY)) == -1)
{
- _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+ _cupsLangPrintError("ERROR", _("Unable to open raster file"));
sleep(1);
return (1);
}
int linenum; /* Line number */
_cupsLangPrintFilter(stderr, "ERROR",
- _("The PPD file could not be opened.\n"));
+ _("The PPD file could not be opened."));
status = ppdLastError(&linenum);
Page ++;
fprintf(stderr, "PAGE: %d 1\n", Page);
- _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), Page);
/*
* Start the page...
if ((y & 15) == 0)
{
_cupsLangPrintFilter(stderr, "INFO",
- _("Printing page %d, %d%% complete.\n"),
+ _("Printing page %d, %d%% complete."),
Page, 100 * y / header.cupsHeight);
fprintf(stderr, "ATTR: job-media-progress=%d\n",
100 * y / header.cupsHeight);
* Eject the page...
*/
- _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page);
EndPage(ppd, &header);
if (Page == 0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
return (1);
}
else
{
- _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
return (0);
}
if (PageColumns < 1)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("Bad columns value %d.\n"),
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad columns value %d."),
PageColumns);
return (1);
}
if (CharsPerInch <= 0.0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("Bad cpi value %f.\n"),
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad cpi value %f."),
CharsPerInch);
return (1);
}
if (LinesPerInch <= 0.0)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("Bad lpi value %f.\n"),
+ _cupsLangPrintFilter(stderr, "ERROR", _("Bad lpi value %f."),
LinesPerInch);
return (1);
}
SizeLines <= 0 || SizeLines > 32767)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to print %dx%d text page.\n"),
+ _("Unable to print %dx%d text page."),
SizeColumns, SizeLines);
exit(1);
}
if ((Page = calloc(sizeof(lchar_t *), SizeLines)) == NULL)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to print %dx%d text page.\n"),
+ _("Unable to print %dx%d text page."),
SizeColumns, SizeLines);
exit(1);
}
if ((Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines)) == NULL)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to print %dx%d text page.\n"),
+ _("Unable to print %dx%d text page."),
SizeColumns, SizeLines);
exit(1);
}
if (ColumnWidth <= 0)
{
_cupsLangPrintFilter(stderr, "ERROR",
- _("Unable to print %d text columns.\n"), PageColumns);
+ _("Unable to print %d text columns."), PageColumns);
exit(1);
}
if ((tempfd = cupsTempFd(TempFile, sizeof(TempFile))) == -1)
{
- _cupsLangPrintError(_("ERROR: Unable to create temporary file"));
+ _cupsLangPrintError("ERROR", _("Unable to create temporary file"));
httpClose(http);
exit(1);
}
if ((out = cupsTempFile2(tempfile, sizeof(tempfile))) < 0)
{
- _cupsLangPrintError(_("ERROR: Unable to create temporary file"));
+ _cupsLangPrintError(NULL, _("lpadmin: Unable to create temporary file"));
ippDelete(request);
if (ppdfile != file)
unlink(ppdfile);