Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| d63b19a5da |
+1
-1
@@ -1,4 +1,4 @@
|
||||
CGI - CUPS v1.1.19 - 03/14/2003
|
||||
CGI - CUPS v1.1.19 - 05/27/2003
|
||||
-------------------------------
|
||||
|
||||
This file describes the experimental scripting/CGI support
|
||||
|
||||
+161
-1
@@ -1,8 +1,168 @@
|
||||
CHANGES.txt - 04/10/2003
|
||||
CHANGES.txt - 05/27/2003
|
||||
------------------------
|
||||
|
||||
CHANGES IN CUPS V1.1.19
|
||||
|
||||
- The GNU TLS code incorrectly used
|
||||
gnutls_check_pending() instead of
|
||||
gnutls_record_check_pending() (STR #128)
|
||||
- The ppdEmit() functions output "PageSize Custom"
|
||||
instead of "CustomPageSize True" in the DSC comments.
|
||||
Also, the custom page size code did not use the
|
||||
ParamCustomPageSize attributes (STR #127)
|
||||
- The cupstestppd command did not list the conflicting
|
||||
options (STR #123)
|
||||
- The lpq command did not ensure that there was
|
||||
whitespace between the fields in the job listing (STR
|
||||
#117)
|
||||
- The German web templates had errors (STR #119)
|
||||
- The configure script didn't specify the static
|
||||
libraries properly when configuring with the
|
||||
--disable-shared option (STR #104)
|
||||
- The cups.list file used file dependencies for package
|
||||
formats other than portable, RPM, and Debian (STR #98)
|
||||
- cupsLangGet() didn't use its language cache (STR #97)
|
||||
- "lpq -P" would segfault instead of showing a usage
|
||||
message (STR #94)
|
||||
- Fixed compiler warnings in pdftops filter (STR #96)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.1.19rc5
|
||||
|
||||
- Jobs with banner pages that were printed to implicit
|
||||
classes would get double banner pages for each
|
||||
file/banner in the job (STR #68)
|
||||
- The mime.convs file was missing the filter definition
|
||||
for Windows BMP (image/x-bitmap) files (STR #85)
|
||||
- The scheduler allowed some READ-ONLY job attributes to
|
||||
be set, which could cause the scheduler to fail on the
|
||||
next restart (STR #82)
|
||||
- The lp and lpr commands did not report when the
|
||||
scheduler was not responding; instead, the user would
|
||||
incorrectly see a "no default destination" error (STR
|
||||
#70)
|
||||
- cupsLangGet() could fail on OSX due to a corrupt
|
||||
language preference (STR #78)
|
||||
- Added more checks for HTTP request timeouts.
|
||||
- The scheduler dropped the first non-alpha character
|
||||
after an open brace when doing attribute substitutions
|
||||
in banner pages (STR #77)
|
||||
- The scheduler child might send SIGUSR1 to the parent
|
||||
before the signal handler was installed; this didn't
|
||||
prevent the scheduler from starting but produced an
|
||||
annoying error message (STR #45)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.1.19rc4
|
||||
|
||||
- The lp command did not accept "-" for printing from
|
||||
the standard input as required by POSIX 1003.1 (STR
|
||||
#59)
|
||||
- Added the job-originating-host-name information for
|
||||
the page_log file documentation in the SAM (STR #31)
|
||||
- The German web interface templates did not use the
|
||||
right paths for job operations (STR #54)
|
||||
- The scheduler would consume all available CPU if
|
||||
started with a pending job in the queue (STR #35)
|
||||
- The polling daemon allocated an extra localization
|
||||
buffer but did not free it, causing cups-polld to
|
||||
eventually use all available memory (STR #40)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.1.19rc3
|
||||
|
||||
- The scheduler could get in an infinite loop cancelling
|
||||
jobs using "cancel -u user dest" (STR #48)
|
||||
- The "cancel -u user" command did nothing (it should
|
||||
cancel all jobs on all printers owned by the named
|
||||
user - STR #48)
|
||||
- The scheduler would write 0-length job control files
|
||||
(STR #46)
|
||||
- Updated the French man pages (translation provided by
|
||||
Gilles QUERRET)
|
||||
- The scheduler would delete all printers from
|
||||
printers.conf if a job was active when a HUP signal
|
||||
was handled (STR #47)
|
||||
- The cups-polld program would leak memory if it was
|
||||
unable to send browse packets to the loopback
|
||||
interface (STR #40)
|
||||
- The scheduler did not put the
|
||||
job-originating-host-name attribute in the job
|
||||
attributes group.
|
||||
- The text filter did not default to wrapping text as
|
||||
defined by the IPP implementation document.
|
||||
- Scan backends first, PPDs second (STR #37)
|
||||
- Updated the Netatalk documentation in the SAM (STR #38
|
||||
and #39)
|
||||
- The test suite sent text files to a non-PS print queue,
|
||||
which requires ESP Ghostscript (provided separately).
|
||||
Now send the JPEG test file (STR #33)
|
||||
- The test suite did not show the estimated disk space
|
||||
requirements (STR #33)
|
||||
- The test suite did not set the MaxLogSize directive to
|
||||
0 to prevent log file rotation (STR #33)
|
||||
- The test suite still setup the old CUPS Ghostscript
|
||||
symlinks (STR #33)
|
||||
- The pstops filter did not report the correct number of
|
||||
copies for the page_log file when printing collated
|
||||
copies to a printer that doesn't support them in
|
||||
hardware (STR #32)
|
||||
- cupsLangGet() needs to set the CTYPE locale to "C"
|
||||
(POSIX) to avoid erroneous tolower/toupper values (fix
|
||||
suggested by Bjoern Jacke)
|
||||
- Fixed a typo in the cups.list.in file.
|
||||
- Updated all of the Western European locales to default
|
||||
to ISO-8859-15 (for Euro support, suggested by Bjoern
|
||||
Jacke)
|
||||
- Updated the German message catalog (update provided by
|
||||
Bjoern Jacke)
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.1.19rc2
|
||||
|
||||
- cupsLangGet() now sets the encoding field based on the
|
||||
trailing charset in the locale name, and doesn't look
|
||||
for a message catalog in a specific locale.charset
|
||||
directory. This fixes STR #26 and is more in line
|
||||
with the CUPS 1.2 implementation.
|
||||
- The configure script now aborts if the "ar" command or
|
||||
compilers cannot be found.
|
||||
- The static cupsimage library was not built by default.
|
||||
- The path for the "ln" command was hardcoded in
|
||||
Makedefs.in instead of being checked at configure time
|
||||
(STR #28).
|
||||
- Banner pages containing unescaped { characters would
|
||||
not work.
|
||||
- The printer-state-time collection attribute was
|
||||
encoded as an enumeration instead of an integer.
|
||||
- The printer-is-accepting-jobs collection attribute was
|
||||
was not added to the collection value.
|
||||
- The printer-state-sequence-number collection attribute
|
||||
was not added to the collection value.
|
||||
- Fixed typo and const mismatch in IPP backend.
|
||||
- Updated the man pages for the new configuration
|
||||
directives.
|
||||
- Updated the SAM for MacOS 10.2, the CUPS drivers for
|
||||
windows, the available LPD backend options, and the
|
||||
new configuration directives.
|
||||
- The imagetops filter didn't position images properly
|
||||
on the page (STR #18)
|
||||
- The configure script didn't add CPPFLAGS to the
|
||||
compiler options or LDFLAGS to the DSO options (STR
|
||||
#13)
|
||||
- The scheduler would try to write a debug log message
|
||||
when starting a job that contained a NULL string.
|
||||
Since not all versions of snprintf() support NULL
|
||||
string pointers this caused some problems (STR #20)
|
||||
- The testipp program now supports reading of IPP
|
||||
message files such as those used for the job history
|
||||
in /var/spool/cups.
|
||||
|
||||
|
||||
CHANGES IN CUPS V1.1.19rc1
|
||||
|
||||
- Added CUPS support files for Java, Perl, and PHP
|
||||
(located in the "scripting" subdirectory...)
|
||||
- The scheduler now supports fast-reloads of the
|
||||
cupsd.conf file when it is updated via HTTP.
|
||||
- The scheduler always changed the ownership of log
|
||||
|
||||
+3
-1
@@ -1,4 +1,4 @@
|
||||
CREDITS.txt - 12/12/2002
|
||||
CREDITS.txt - 04/26/2003
|
||||
------------------------
|
||||
|
||||
Few projects are completed by one person, and CUPS is no exception. We'd
|
||||
@@ -11,6 +11,7 @@ like to thank the following individuals for their contributions:
|
||||
L. Peter Deutsch - MD5 code.
|
||||
Dr. ZP Han - setgid()/setuid().
|
||||
Guy Harris - *BSD shared libraries and lots of other fixes.
|
||||
Bjoern Jacke - I18N stuff.
|
||||
Wang Jian - CUPS RPM corrections.
|
||||
Roderick Johnstone - Beta tester of the millenium.
|
||||
Till Kamppeter - Bug fixes, beta testing, evangelism.
|
||||
@@ -23,6 +24,7 @@ like to thank the following individuals for their contributions:
|
||||
Ulrich Oldendorf - German locale.
|
||||
Giulio Orsero - Bug fixes and testing.
|
||||
Kurt Pfeifle - Bug fixes, beta testing, evangelism.
|
||||
Gilles QUERRET - French man pages.
|
||||
Petter Reinholdtsen - HP-UX compiler stuff.
|
||||
Stuart Stevens - HP JetDirect IPP information.
|
||||
Andrea Suatoni - IRIX desktop integration and testing.
|
||||
|
||||
+14
-10
@@ -1,5 +1,5 @@
|
||||
ENCRYPTION - CUPS v1.1.7 - 02/21/2001
|
||||
-------------------------------------
|
||||
ENCRYPTION - CUPS v1.1.19 - 05/27/2003
|
||||
--------------------------------------
|
||||
|
||||
This file describes the encryption support provided by CUPS.
|
||||
|
||||
@@ -17,15 +17,16 @@ LEGAL STUFF
|
||||
|
||||
BEFORE USING THE ENCRYPTION SUPPORT, PLEASE VERIFY THAT IT IS
|
||||
LEGAL TO DO SO IN YOUR COUNTRY. CUPS by itself doesn't include
|
||||
any encryption code, but it can link against the OpenSSL library
|
||||
which does.
|
||||
any encryption code, but it can link against the OpenSSL, GNU
|
||||
TLS, or CDSA libraries which do.
|
||||
|
||||
|
||||
OVERVIEW OF ENCRYPTION SUPPORT IN CUPS
|
||||
|
||||
CUPS supports SSL/2.0, SSL/3.0, and TLS/1.0 encryption using
|
||||
keys as large as 128-bits. Encryption support is provided via
|
||||
the OpenSSL library and some new hooks in the CUPS code.
|
||||
the OpenSSL, GNU TLS, or CDSA libraries and some new hooks in
|
||||
the CUPS code.
|
||||
|
||||
CUPS provides support for dedicated (https) and "upgrade" (TLS)
|
||||
encryption of sessions. The "HTTP Upgrade" method is described
|
||||
@@ -79,19 +80,22 @@ to /etc/cups/cupsd.conf.
|
||||
|
||||
BEFORE YOU BEGIN
|
||||
|
||||
You'll need the OpenSSL library from:
|
||||
You'll need the OpenSSL, GNU TLS, or CDSA libraries from:
|
||||
|
||||
http://www.openssl.org
|
||||
http://www.openssl.org/
|
||||
http://www.gnutls.org/
|
||||
http://www.intel.com/labs/archive/cdsa.htm
|
||||
|
||||
|
||||
CONFIGURING WITH ENCRYPTION SUPPORT
|
||||
|
||||
Once you have the OpenSSL library installed, you'll need to
|
||||
configure CUPS to use it with the "--enable-ssl" option:
|
||||
Once you have the OpenSSL, GNU TLS, or CDSA libraries installed,
|
||||
you'll need to configure CUPS to use it with the "--enable-ssl"
|
||||
option:
|
||||
|
||||
./configure --enable-ssl
|
||||
|
||||
If the OpenSSL stuff is not in a standard location, make sure to
|
||||
If the library stuff is not in a standard location, make sure to
|
||||
define the CFLAGS, CXXFLAGS, and LDFLAGS environment variables
|
||||
with the appropriate compiler and linker options first.
|
||||
|
||||
|
||||
+2
-7
@@ -1,10 +1,5 @@
|
||||
INSTALL - CUPS v1.1.19rc1 - 04/11/2003
|
||||
--------------------------------------
|
||||
|
||||
**** THIS IS A RELEASE CANDIDATE AND NOT A PRODUCTION ****
|
||||
**** RELEASE. REPORT ALL PROBLEMS USING THE FORM AT: ****
|
||||
**** ****
|
||||
**** http://www.cups.org/str.php ****
|
||||
INSTALL - CUPS v1.1.19 - 05/27/2003
|
||||
-----------------------------------
|
||||
|
||||
This file describes how to compile and install CUPS from source
|
||||
code. For more information on CUPS see the file called
|
||||
|
||||
+4
-4
@@ -34,7 +34,7 @@ DSO = @DSO@
|
||||
HTMLDOC = @HTMLDOC@
|
||||
INSTALL = @INSTALL@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN = /bin/ln -sf
|
||||
LN = @LN@ -sf
|
||||
MV = @MV@
|
||||
NROFF = @NROFF@
|
||||
RANLIB = @RANLIB@
|
||||
@@ -85,11 +85,11 @@ LIBZ = @LIBZ@
|
||||
|
||||
ARFLAGS = @ARFLAGS@
|
||||
BACKLIBS = @BACKLIBS@
|
||||
CFLAGS = $(RC_CFLAGS) @CFLAGS@ -I.. $(OPTIONS)
|
||||
CFLAGS = $(RC_CFLAGS) @CPPFLAGS@ @CFLAGS@ -I.. $(OPTIONS)
|
||||
COMMONLIBS = @COMMONLIBS@
|
||||
CXXFLAGS = $(RC_CFLAGS) @CXXFLAGS@ -I.. $(OPTIONS)
|
||||
CXXFLAGS = $(RC_CFLAGS) @CPPFLAGS@ @CXXFLAGS@ -I.. $(OPTIONS)
|
||||
CXXLIBS = @CXXLIBS@
|
||||
DSOFLAGS = @DSOFLAGS@
|
||||
DSOFLAGS = @LDFLAGS@ @DSOFLAGS@
|
||||
DSOLIBS = @DSOLIBS@ $(COMMONLIBS)
|
||||
IMGLIBS = @IMGLIBS@ -lm
|
||||
LDFLAGS = -L../cups -L../filter $(RC_CFLAGS) @LDFLAGS@ $(OPTIM)
|
||||
|
||||
+2
-7
@@ -1,10 +1,5 @@
|
||||
README - CUPS v1.1.19rc1 - 04/11/2003
|
||||
-------------------------------------
|
||||
|
||||
**** THIS IS A RELEASE CANDIDATE AND NOT A PRODUCTION ****
|
||||
**** RELEASE. REPORT ALL PROBLEMS USING THE FORM AT: ****
|
||||
**** ****
|
||||
**** http://www.cups.org/str.php ****
|
||||
README - CUPS v1.1.19 - 05/27/2003
|
||||
----------------------------------
|
||||
|
||||
Looking for compile instructions? Read the file "INSTALL.txt"
|
||||
instead...
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
betest
|
||||
ipp
|
||||
lpd
|
||||
usb
|
||||
parallel
|
||||
betest
|
||||
scsi
|
||||
serial
|
||||
socket
|
||||
usb
|
||||
|
||||
+2
-2
@@ -129,7 +129,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
hostname[1024], /* Hostname */
|
||||
username[255], /* Username info */
|
||||
resource[1024]; /* Resource info (printer name) */
|
||||
const char *filename; /* File to print */
|
||||
char *filename; /* File to print */
|
||||
int port; /* Port number (not used) */
|
||||
char uri[HTTP_MAX_URI];/* Updated URI without user/pass */
|
||||
ipp_status_t ipp_status; /* Status of IPP request */
|
||||
@@ -895,7 +895,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
* Remove the temporary file if necessary...
|
||||
*/
|
||||
|
||||
if (tmpfilename[6])
|
||||
if (tmpfilename[0])
|
||||
unlink(tmpfilename);
|
||||
|
||||
/*
|
||||
|
||||
+30
-6
@@ -26,6 +26,7 @@
|
||||
* main() - Parse options and commands.
|
||||
* show_jobs() - Show jobs.
|
||||
* show_printer() - Show printer status.
|
||||
* usage() - Show program usage.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -51,6 +52,7 @@
|
||||
static int show_jobs(http_t *, const char *, const char *, const int,
|
||||
const int);
|
||||
static void show_printer(http_t *, const char *);
|
||||
static void usage(void);
|
||||
|
||||
|
||||
/*
|
||||
@@ -128,6 +130,15 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
else
|
||||
{
|
||||
i ++;
|
||||
|
||||
if (i >= argc)
|
||||
{
|
||||
httpClose(http);
|
||||
cupsFreeDests(num_dests, dests);
|
||||
|
||||
usage();
|
||||
}
|
||||
|
||||
dest = argv[i];
|
||||
}
|
||||
|
||||
@@ -155,10 +166,11 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
break;
|
||||
|
||||
default :
|
||||
fputs("Usage: lpq [-P dest] [-l] [+interval]\n", stderr);
|
||||
httpClose(http);
|
||||
cupsFreeDests(num_dests, dests);
|
||||
return (1);
|
||||
cupsFreeDests(num_dests, dests);
|
||||
|
||||
usage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (isdigit(argv[i][0]))
|
||||
@@ -427,15 +439,15 @@ show_jobs(http_t *http, /* I - HTTP connection to server */
|
||||
else
|
||||
strlcpy(namestr, jobname, sizeof(namestr));
|
||||
|
||||
printf("%s: %-34.34s[job %d localhost]\n", jobuser, rankstr, jobid);
|
||||
printf(" %-40.40s%d bytes\n", namestr, jobsize);
|
||||
printf("%s: %-33.33s [job %d localhost]\n", jobuser, rankstr, jobid);
|
||||
printf(" %-39.39s %d bytes\n", namestr, jobsize);
|
||||
}
|
||||
else
|
||||
#ifdef __osf__
|
||||
printf("%-6s %-10.10s %-4d %-10d %-27.27s %d bytes\n", rankstr, jobuser,
|
||||
jobpriority, jobid, jobname, jobsize);
|
||||
#else
|
||||
printf("%-7s %-8.8s%-8d%-32.32s%d bytes\n", rankstr, jobuser,
|
||||
printf("%-7s %-7.7s %-7d %-31.31s %d bytes\n", rankstr, jobuser,
|
||||
jobid, jobname, jobsize);
|
||||
#endif /* __osf */
|
||||
|
||||
@@ -544,6 +556,18 @@ show_printer(http_t *http, /* I - HTTP connection to server */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'usage()' - Show program usage.
|
||||
*/
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
fputs("Usage: lpq [-P dest] [-l] [+interval]\n", stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
||||
+5
-1
@@ -321,7 +321,11 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
if (printer == NULL)
|
||||
{
|
||||
fputs("lpr: error - no default destination available.\n", stderr);
|
||||
if (cupsLastError() >= IPP_BAD_REQUEST)
|
||||
fputs("lpr: error - scheduler not responding!\n", stderr);
|
||||
else
|
||||
fputs("lpr: error - no default destination available.\n", stderr);
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
cupsd.conf
|
||||
pam.conf
|
||||
+5
-3
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: client.conf 3041 2002-12-17 19:00:27Z swdev $"
|
||||
# "$Id: client.conf 3705 2003-05-09 19:14:44Z mike $"
|
||||
#
|
||||
# Sample client configuration file for the Common UNIX Printing System
|
||||
# (CUPS).
|
||||
@@ -34,7 +34,9 @@
|
||||
#
|
||||
# ServerName: the hostname of your server. By default CUPS will use the
|
||||
# hostname of the system or the value of the CUPS_SERVER environment
|
||||
# variable.
|
||||
# variable. ONLY ONE SERVER NAME MAY BE SPECIFIED AT A TIME. To use
|
||||
# more than one server you must use a local scheduler with browsing
|
||||
# and possibly polling.
|
||||
#
|
||||
|
||||
#ServerName myhost.domain.com
|
||||
@@ -61,5 +63,5 @@
|
||||
|
||||
|
||||
#
|
||||
# End of "$Id: client.conf 3041 2002-12-17 19:00:27Z swdev $".
|
||||
# End of "$Id: client.conf 3705 2003-05-09 19:14:44Z mike $".
|
||||
#
|
||||
|
||||
+6
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: mime.convs 3041 2002-12-17 19:00:27Z swdev $"
|
||||
# "$Id: mime.convs 3709 2003-05-12 17:38:18Z mike $"
|
||||
#
|
||||
# MIME converts file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -55,6 +55,7 @@ image/gif application/vnd.cups-postscript 66 imagetops
|
||||
image/png application/vnd.cups-postscript 66 imagetops
|
||||
image/jpeg application/vnd.cups-postscript 66 imagetops
|
||||
image/tiff application/vnd.cups-postscript 66 imagetops
|
||||
image/x-bitmap application/vnd.cups-postscript 66 imagetops
|
||||
image/x-photocd application/vnd.cups-postscript 66 imagetops
|
||||
image/x-portable-anymap application/vnd.cups-postscript 66 imagetops
|
||||
image/x-portable-bitmap application/vnd.cups-postscript 66 imagetops
|
||||
@@ -63,7 +64,7 @@ image/x-portable-pixmap application/vnd.cups-postscript 66 imagetops
|
||||
image/x-sgi-rgb application/vnd.cups-postscript 66 imagetops
|
||||
image/x-xbitmap application/vnd.cups-postscript 66 imagetops
|
||||
image/x-xpixmap application/vnd.cups-postscript 66 imagetops
|
||||
image/x-xwindowdump application/vnd.cups-postscript 66 imagetops
|
||||
#image/x-xwindowdump application/vnd.cups-postscript 66 imagetops
|
||||
image/x-sun-raster application/vnd.cups-postscript 66 imagetops
|
||||
|
||||
|
||||
@@ -86,6 +87,7 @@ image/gif application/vnd.cups-raster 100 imagetoraster
|
||||
image/png application/vnd.cups-raster 100 imagetoraster
|
||||
image/jpeg application/vnd.cups-raster 100 imagetoraster
|
||||
image/tiff application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-bitmap application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-photocd application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-portable-anymap application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-portable-bitmap application/vnd.cups-raster 100 imagetoraster
|
||||
@@ -94,7 +96,7 @@ image/x-portable-pixmap application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-sgi-rgb application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-xbitmap application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-xpixmap application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-xwindowdump application/vnd.cups-raster 100 imagetoraster
|
||||
#image/x-xwindowdump application/vnd.cups-raster 100 imagetoraster
|
||||
image/x-sun-raster application/vnd.cups-raster 100 imagetoraster
|
||||
|
||||
# pstoraster is now part of ESP Ghostscript...
|
||||
@@ -112,5 +114,5 @@ image/x-sun-raster application/vnd.cups-raster 100 imagetoraster
|
||||
#application/octet-stream application/vnd.cups-raw 0 -
|
||||
|
||||
#
|
||||
# End of "$Id: mime.convs 3041 2002-12-17 19:00:27Z swdev $".
|
||||
# End of "$Id: mime.convs 3709 2003-05-12 17:38:18Z mike $".
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-common.m4 3582 2003-04-10 14:30:48Z mike $"
|
||||
dnl "$Id: cups-common.m4 3724 2003-05-14 18:24:38Z mike $"
|
||||
dnl
|
||||
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -28,6 +28,11 @@ AC_PREREQ(2.50)
|
||||
dnl Set the name of the config header file...
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Version number information...
|
||||
CUPS_VERSION="1.1.19"
|
||||
AC_SUBST(CUPS_VERSION)
|
||||
AC_DEFINE_UNQUOTED(CUPS_SVERSION, "CUPS v$CUPS_VERSION")
|
||||
|
||||
dnl Default compiler flags...
|
||||
CFLAGS="${CFLAGS:=}"
|
||||
CPPFLAGS="${CPPFLAGS:=}"
|
||||
@@ -47,6 +52,7 @@ fi
|
||||
AC_PROG_RANLIB
|
||||
AC_PATH_PROG(AR,ar)
|
||||
AC_PATH_PROG(HTMLDOC,htmldoc)
|
||||
AC_PATH_PROG(LN,ln)
|
||||
AC_PATH_PROG(MV,mv)
|
||||
AC_PATH_PROG(NROFF,nroff)
|
||||
if test "$NROFF" = ""; then
|
||||
@@ -61,6 +67,16 @@ AC_PATH_PROG(RM,rm)
|
||||
AC_PATH_PROG(SED,sed)
|
||||
AC_PATH_PROG(STRIP,strip)
|
||||
|
||||
if test "x$AR" = x; then
|
||||
AC_MSG_ERROR([Unable to find required library archive command.])
|
||||
fi
|
||||
if test "x$CC" = x; then
|
||||
AC_MSG_ERROR([Unable to find required C compiler command.])
|
||||
fi
|
||||
if test "x$CXX" = x; then
|
||||
AC_MSG_ERROR([Unable to find required C++ compiler command.])
|
||||
fi
|
||||
|
||||
dnl Architecture checks...
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
@@ -186,5 +202,5 @@ AC_SUBST(BACKLIBS)
|
||||
AC_SUBST(COMMONLIBS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-common.m4 3582 2003-04-10 14:30:48Z mike $".
|
||||
dnl End of "$Id: cups-common.m4 3724 2003-05-14 18:24:38Z mike $".
|
||||
dnl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl
|
||||
dnl "$Id: cups-sharedlibs.m4 3255 2003-01-28 15:33:18Z mike $"
|
||||
dnl "$Id: cups-sharedlibs.m4 3737 2003-05-16 19:07:15Z mike $"
|
||||
dnl
|
||||
dnl Shared library support for the Common UNIX Printing System (CUPS).
|
||||
dnl
|
||||
@@ -87,8 +87,8 @@ AC_SUBST(LIBCUPS)
|
||||
AC_SUBST(LIBCUPSIMAGE)
|
||||
|
||||
if test x$enable_shared = xno; then
|
||||
LINKCUPS="-lcups \$(SSLLIBS)"
|
||||
LINKCUPSIMAGE="-lcupsimage"
|
||||
LINKCUPS="../cups/libcups.a \$(SSLLIBS)"
|
||||
LINKCUPSIMAGE="../filter/libcupsimage.a"
|
||||
else
|
||||
if test $uname = AIX; then
|
||||
LINKCUPS="-lcups_s"
|
||||
@@ -152,5 +152,5 @@ AC_SUBST(IMGLIBS)
|
||||
AC_SUBST(EXPORT_LDFLAGS)
|
||||
|
||||
dnl
|
||||
dnl End of "$Id: cups-sharedlibs.m4 3255 2003-01-28 15:33:18Z mike $".
|
||||
dnl End of "$Id: cups-sharedlibs.m4 3737 2003-05-16 19:07:15Z mike $".
|
||||
dnl
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
* Version of software...
|
||||
*/
|
||||
|
||||
#define CUPS_SVERSION "CUPS v1.1.19rc1"
|
||||
#define CUPS_SVERSION "CUPS v1.1.19rc3"
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
# WWW: http://www.cups.org
|
||||
#
|
||||
|
||||
VERSION="1.1.19rc1"
|
||||
VERSION="@CUPS_VERSION@"
|
||||
APIVERSION="1.1"
|
||||
|
||||
prefix=@prefix@
|
||||
|
||||
+22
-6
@@ -29,7 +29,12 @@
|
||||
%vendor Easy Software Products
|
||||
%license LICENSE.txt
|
||||
%readme README.txt
|
||||
%version 1.1.19rc1
|
||||
%version @CUPS_VERSION@
|
||||
%description The Common UNIX Printing System provides a portable printing
|
||||
%description layer for UNIX® operating systems. It has been developed by
|
||||
%description Easy Software Products to promote a standard printing solution
|
||||
%description for all UNIX vendors and users. CUPS provides the System V and
|
||||
%description Berkeley command-line interfaces.
|
||||
%provides cups-devel
|
||||
%provides cups-libs
|
||||
%provides cupsys
|
||||
@@ -37,11 +42,14 @@
|
||||
%provides cupsys-client
|
||||
%provides cupsys-devel
|
||||
%provides libcups1
|
||||
%provides libcupsimage.so.2
|
||||
%provides libcups.so.2
|
||||
%provides libcupsys2
|
||||
%provides libcupsys2-dev
|
||||
|
||||
%format rpm deb portable
|
||||
%provides libcups.so.2
|
||||
%provides libcupsimage.so.2
|
||||
%format all
|
||||
|
||||
#
|
||||
# GNU variables...
|
||||
#
|
||||
@@ -207,14 +215,14 @@ f 0444 root sys $LOCALEDIR/be/cups_be locale/be/cups_be
|
||||
f 0444 root sys $LOCALEDIR/cs/cups_cs locale/cs/cups_cs
|
||||
f 0444 root sys $LOCALEDIR/de/cups_de locale/de/cups_de
|
||||
f 0444 root sys $LOCALEDIR/en/cups_en locale/en/cups_en
|
||||
f 0444 root sys $LOCALEDIR/en_US/cups_en_US locale/en_US/cups_en_US
|
||||
f 0444 root sys $LOCALEDIR/es/cups_es locale/es/cups_es
|
||||
f 0444 root sys $LOCALEDIR/fr/cups_fr locale/fr/cups_fr
|
||||
f 0444 root sys $LOCALEDIR/it/cups_it locale/it/cups_it
|
||||
f 0444 root sys $LOCALEDIR/ru_RU.cp1251/cups_ru_RU.cp1251 locale/ru_RU.cp1251/cups_ru_RU.cp1251
|
||||
f 0444 root sys $LOCALEDIR/ru_RU.koi8r/cups_ru_RU.koi8r locale/ru_RU.koi8r/cups_ru_RU.koi8r
|
||||
f 0444 root sys $LOCALEDIR/ru_RU/cups_ru_RU locale/ru_RU/cups_ru_RU
|
||||
f 0444 root sys $LOCALEDIR/sv/cups_sv locale/sv/cups_sv
|
||||
f 0444 root sys $LOCALEDIR/uk/cups_uk locale/uk/cups_uk
|
||||
f 0444 root sys $LOCALEDIR/uk_UA.cp1251/cups_uk_UA.cp1251 locale/uk_UA.cp1251/cups_uk_UA.cp1251
|
||||
f 0444 root sys $LOCALEDIR/uk_UA/cups_uk_UA locale/uk_UA/cups_uk_UA
|
||||
f 0444 root sys $LOCALEDIR/zh_CN/cups_zh_CN locale/zh_CN/cups_zh_CN
|
||||
|
||||
d 0555 root sys $DATADIR -
|
||||
@@ -268,6 +276,9 @@ f 0444 root sys $DATADIR/model ppd/*.ppd
|
||||
d 0555 root sys $DATADIR/templates -
|
||||
c 0444 root sys $DATADIR/templates templates/*.tmpl
|
||||
|
||||
d 0555 root sys $DATADIR/templates/de -
|
||||
c 0444 root sys $DATADIR/templates/de templates/de/*.tmpl
|
||||
|
||||
d 0555 root sys $DATADIR/templates/fr -
|
||||
c 0444 root sys $DATADIR/templates/fr templates/fr/*.tmpl
|
||||
|
||||
@@ -308,6 +319,7 @@ f 0444 root sys $INCLUDEDIR/cups/ppd.h cups/ppd.h
|
||||
f 0444 root sys $INCLUDEDIR/cups/raster.h filter/raster.h
|
||||
|
||||
f 0444 root sys $LIBDIR/libcups.a cups/libcups.a
|
||||
f 0444 root sys $LIBDIR/libcupsimage.a filter/libcupsimage.a
|
||||
|
||||
# Documentation files
|
||||
d 0555 root sys $DOCDIR -
|
||||
@@ -315,6 +327,10 @@ f 0444 root sys $DOCDIR doc/*.css
|
||||
f 0444 root sys $DOCDIR doc/*.html
|
||||
f 0444 root sys $DOCDIR doc/*.pdf
|
||||
f 0444 root sys $DOCDIR/robots.txt doc/robots.txt
|
||||
d 0555 root sys $DOCDIR/de -
|
||||
f 0444 root sys $DOCDIR/de doc/de/*.css
|
||||
f 0444 root sys $DOCDIR/de doc/de/*.html
|
||||
f 0444 root sys $DOCDIR/de doc/de/*.pdf
|
||||
d 0555 root sys $DOCDIR/fr -
|
||||
f 0444 root sys $DOCDIR/fr doc/fr/*.css
|
||||
f 0444 root sys $DOCDIR/fr doc/fr/*.html
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.spec 3606 2003-04-11 19:16:08Z mike $"
|
||||
# "$Id: cups.spec 3724 2003-05-14 18:24:38Z mike $"
|
||||
#
|
||||
# RPM "spec" file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.1.19rc1
|
||||
Version: 1.1.19
|
||||
Release: 1
|
||||
Copyright: GPL
|
||||
Group: System Environment/Daemons
|
||||
@@ -215,5 +215,5 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/lib/*.so*
|
||||
|
||||
#
|
||||
# End of "$Id: cups.spec 3606 2003-04-11 19:16:08Z mike $".
|
||||
# End of "$Id: cups.spec 3724 2003-05-14 18:24:38Z mike $".
|
||||
#
|
||||
|
||||
@@ -8,4 +8,6 @@ libcups_s.a
|
||||
libcups.2.dylib
|
||||
libcups.dylib
|
||||
testhttp
|
||||
testipp
|
||||
testlang
|
||||
testppd
|
||||
|
||||
+100
-24
@@ -196,26 +196,52 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
|
||||
* Send DSC comments with option...
|
||||
*/
|
||||
|
||||
if (fprintf(fp, "%%%%BeginFeature: *%s %s\n",
|
||||
((ppd_option_t *)choices[i]->option)->keyword,
|
||||
choices[i]->choice) < 0)
|
||||
{
|
||||
free(choices);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if ((strcasecmp(((ppd_option_t *)choices[i]->option)->keyword, "PageSize") == 0 ||
|
||||
strcasecmp(((ppd_option_t *)choices[i]->option)->keyword, "PageRegion") == 0) &&
|
||||
strcasecmp(choices[i]->choice, "Custom") == 0)
|
||||
{
|
||||
/*
|
||||
* Variable size; write out standard size options (this should
|
||||
* eventually be changed to use the parameter positions defined
|
||||
* in the PPD file...)
|
||||
* Variable size; write out standard size options, using the
|
||||
* parameter positions defined in the PPD file...
|
||||
*/
|
||||
|
||||
ppd_attr_t *attr; /* PPD attribute */
|
||||
int pos, /* Position of custom value */
|
||||
values[5]; /* Values for custom command */
|
||||
|
||||
|
||||
fputs("%%BeginFeature: *CustomPageSize True\n", fp);
|
||||
|
||||
size = ppdPageSize(ppd, "Custom");
|
||||
fprintf(fp, "%.0f %.0f 0 0 0\n", size->width, size->length);
|
||||
|
||||
memset(values, 0, sizeof(values));
|
||||
|
||||
if ((attr = ppdFindAttr(ppd, "ParamCustomPageSize", "Width")) != NULL)
|
||||
{
|
||||
pos = atoi(attr->value) - 1;
|
||||
|
||||
if (pos < 0 || pos > 4)
|
||||
pos = 0;
|
||||
}
|
||||
else
|
||||
pos = 0;
|
||||
|
||||
values[pos] = (int)size->width;
|
||||
|
||||
if ((attr = ppdFindAttr(ppd, "ParamCustomPageSize", "Height")) != NULL)
|
||||
{
|
||||
pos = atoi(attr->value) - 1;
|
||||
|
||||
if (pos < 0 || pos > 4)
|
||||
pos = 1;
|
||||
}
|
||||
else
|
||||
pos = 1;
|
||||
|
||||
values[pos] = (int)size->length;
|
||||
|
||||
fprintf(fp, "%d %d %d %d %d\n", values[0], values[1],
|
||||
values[2], values[3], values[4]);
|
||||
|
||||
if (choices[i]->code == NULL)
|
||||
{
|
||||
@@ -228,6 +254,13 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
|
||||
fputs(ppd_custom_code, fp);
|
||||
}
|
||||
}
|
||||
else if (fprintf(fp, "%%%%BeginFeature: *%s %s\n",
|
||||
((ppd_option_t *)choices[i]->option)->keyword,
|
||||
choices[i]->choice) < 0)
|
||||
{
|
||||
free(choices);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (choices[i]->code != NULL && choices[i]->code[0] != '\0')
|
||||
{
|
||||
@@ -274,7 +307,8 @@ ppdEmitFd(ppd_file_t *ppd, /* I - PPD file record */
|
||||
ppd_section_t section) /* I - Section to write */
|
||||
{
|
||||
int i, /* Looping var */
|
||||
count; /* Number of choices */
|
||||
count, /* Number of choices */
|
||||
custom_size; /* Non-zero if this option is a custom size */
|
||||
ppd_choice_t **choices; /* Choices */
|
||||
ppd_size_t *size; /* Custom page size */
|
||||
char buf[1024]; /* Output buffer for feature */
|
||||
@@ -311,9 +345,22 @@ ppdEmitFd(ppd_file_t *ppd, /* I - PPD file record */
|
||||
* Send DSC comments with option...
|
||||
*/
|
||||
|
||||
snprintf(buf, sizeof(buf), "%%%%BeginFeature: *%s %s\n",
|
||||
((ppd_option_t *)choices[i]->option)->keyword,
|
||||
choices[i]->choice);
|
||||
if ((strcasecmp(((ppd_option_t *)choices[i]->option)->keyword, "PageSize") == 0 ||
|
||||
strcasecmp(((ppd_option_t *)choices[i]->option)->keyword, "PageRegion") == 0) &&
|
||||
strcasecmp(choices[i]->choice, "Custom") == 0)
|
||||
{
|
||||
custom_size = 1;
|
||||
|
||||
strcpy(buf, "%%BeginFeature: *CustomPageSize True\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
custom_size = 0;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%%%%BeginFeature: *%s %s\n",
|
||||
((ppd_option_t *)choices[i]->option)->keyword,
|
||||
choices[i]->choice);
|
||||
}
|
||||
|
||||
if (write(fd, buf, strlen(buf)) < 1)
|
||||
{
|
||||
@@ -321,19 +368,48 @@ ppdEmitFd(ppd_file_t *ppd, /* I - PPD file record */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if ((strcasecmp(((ppd_option_t *)choices[i]->option)->keyword, "PageSize") == 0 ||
|
||||
strcasecmp(((ppd_option_t *)choices[i]->option)->keyword, "PageRegion") == 0) &&
|
||||
strcasecmp(choices[i]->choice, "Custom") == 0)
|
||||
if (custom_size)
|
||||
{
|
||||
/*
|
||||
* Variable size; write out standard size options (this should
|
||||
* eventually be changed to use the parameter positions defined
|
||||
* in the PPD file...)
|
||||
* Variable size; write out standard size options, using the
|
||||
* parameter positions defined in the PPD file...
|
||||
*/
|
||||
|
||||
ppd_attr_t *attr; /* PPD attribute */
|
||||
int pos, /* Position of custom value */
|
||||
values[5]; /* Values for custom command */
|
||||
|
||||
|
||||
size = ppdPageSize(ppd, "Custom");
|
||||
snprintf(buf, sizeof(buf), "%.0f %.0f 0 0 0\n", size->width,
|
||||
size->length);
|
||||
|
||||
memset(values, 0, sizeof(values));
|
||||
|
||||
if ((attr = ppdFindAttr(ppd, "ParamCustomPageSize", "Width")) != NULL)
|
||||
{
|
||||
pos = atoi(attr->value) - 1;
|
||||
|
||||
if (pos < 0 || pos > 4)
|
||||
pos = 0;
|
||||
}
|
||||
else
|
||||
pos = 0;
|
||||
|
||||
values[pos] = (int)size->width;
|
||||
|
||||
if ((attr = ppdFindAttr(ppd, "ParamCustomPageSize", "Height")) != NULL)
|
||||
{
|
||||
pos = atoi(attr->value) - 1;
|
||||
|
||||
if (pos < 0 || pos > 4)
|
||||
pos = 1;
|
||||
}
|
||||
else
|
||||
pos = 1;
|
||||
|
||||
values[pos] = (int)size->length;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%d %d %d %d %d\n", values[0], values[1],
|
||||
values[2], values[3], values[4]);
|
||||
|
||||
if (write(fd, buf, strlen(buf)) < 1)
|
||||
{
|
||||
|
||||
+39
-3
@@ -909,6 +909,9 @@ httpRead(http_t *http, /* I - HTTP data */
|
||||
* Buffer small reads for better performance...
|
||||
*/
|
||||
|
||||
if (!http->blocking && !httpWait(http, 1000))
|
||||
return (0);
|
||||
|
||||
if (http->data_remaining > sizeof(http->buffer))
|
||||
bytes = sizeof(http->buffer);
|
||||
else
|
||||
@@ -945,7 +948,10 @@ httpRead(http_t *http, /* I - HTTP data */
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
else
|
||||
{
|
||||
http->error = EPIPE;
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
if (http->used > 0)
|
||||
@@ -965,10 +971,18 @@ httpRead(http_t *http, /* I - HTTP data */
|
||||
}
|
||||
#ifdef HAVE_SSL
|
||||
else if (http->tls)
|
||||
{
|
||||
if (!http->blocking && !httpWait(http, 1000))
|
||||
return (0);
|
||||
|
||||
bytes = http_read_ssl(http, buffer, length);
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
else
|
||||
{
|
||||
if (!http->blocking && !httpWait(http, 1000))
|
||||
return (0);
|
||||
|
||||
DEBUG_printf(("httpRead: reading %d bytes from socket...\n", length));
|
||||
bytes = recv(http->fd, buffer, length, 0);
|
||||
DEBUG_printf(("httpRead: read %d bytes from socket...\n", bytes));
|
||||
@@ -987,6 +1001,11 @@ httpRead(http_t *http, /* I - HTTP data */
|
||||
http->error = errno;
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
else
|
||||
{
|
||||
http->error = EPIPE;
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (http->data_remaining == 0)
|
||||
{
|
||||
@@ -1084,6 +1103,24 @@ httpWait(http_t *http, /* I - HTTP data */
|
||||
if (http->used)
|
||||
return (1);
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
if (http->tls)
|
||||
{
|
||||
# ifdef HAVE_LIBSSL
|
||||
if (SSL_pending((SSL *)(http->tls)))
|
||||
return (1);
|
||||
# elif defined(HAVE_GNUTLS)
|
||||
if (gnutls_record_check_pending(((http_tls_t *)(http->tls))->session))
|
||||
return (1);
|
||||
# elif defined(HAVE_CDSASSL)
|
||||
size_t bytes; /* Bytes that are available */
|
||||
|
||||
if (!SSLGetBufferedReadSize((SSLContextRef)http->tls, &bytes) && bytes > 0)
|
||||
return;
|
||||
# endif /* HAVE_LIBSSL */
|
||||
}
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
/*
|
||||
* Then try doing a select() to poll the socket...
|
||||
*/
|
||||
@@ -1326,7 +1363,7 @@ httpGets(char *line, /* I - Line to read into */
|
||||
bytes = http_read_ssl(http, bufend, HTTP_MAX_BUFFER - http->used);
|
||||
else
|
||||
#endif /* HAVE_SSL */
|
||||
bytes = recv(http->fd, bufend, HTTP_MAX_BUFFER - http->used, 0);
|
||||
bytes = recv(http->fd, bufend, HTTP_MAX_BUFFER - http->used, 0);
|
||||
|
||||
if (bytes < 0)
|
||||
{
|
||||
@@ -1358,8 +1395,7 @@ httpGets(char *line, /* I - Line to read into */
|
||||
}
|
||||
else if (bytes == 0)
|
||||
{
|
||||
if (http->blocking)
|
||||
http->error = EPIPE;
|
||||
http->error = EPIPE;
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
+1
-1
@@ -332,7 +332,6 @@ extern void httpSetField(http_t *http, http_field_t field,
|
||||
extern const char *httpStatus(http_status_t status);
|
||||
extern int httpTrace(http_t *http, const char *uri);
|
||||
extern http_status_t httpUpdate(http_t *http);
|
||||
extern int httpWait(http_t *http, int msec);
|
||||
extern int httpWrite(http_t *http, const char *buffer, int length);
|
||||
extern char *httpEncode64(char *out, const char *in);
|
||||
extern char *httpDecode64(char *out, const char *in);
|
||||
@@ -347,6 +346,7 @@ extern char *httpMD5String(const md5_byte_t *, char [33]);
|
||||
extern void httpClearCookie(http_t *http);
|
||||
#define httpGetCookie(http) ((http)->cookie)
|
||||
extern void httpSetCookie(http_t *http, const char *cookie);
|
||||
extern int httpWait(http_t *http, int msec);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+10
-1
@@ -1395,6 +1395,8 @@ ippWriteFile(int fd, /* I - HTTP data */
|
||||
{
|
||||
DEBUG_printf(("ippWriteFile(%d, %p)\n", fd, ipp));
|
||||
|
||||
ipp->state = IPP_IDLE;
|
||||
|
||||
return (ippWriteIO(&fd, (ipp_iocb_t)ipp_write_file, 1, NULL, ipp));
|
||||
}
|
||||
|
||||
@@ -2465,7 +2467,14 @@ ipp_read_http(http_t *http, /* I - Client connection */
|
||||
if (http->data_remaining == 0)
|
||||
{
|
||||
if (http->data_encoding == HTTP_ENCODE_CHUNKED)
|
||||
httpGets(len, sizeof(len), http);
|
||||
{
|
||||
/*
|
||||
* Get the trailing CR LF after the chunk...
|
||||
*/
|
||||
|
||||
if (!httpGets(len, sizeof(len), http))
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (http->data_encoding != HTTP_ENCODE_CHUNKED)
|
||||
{
|
||||
|
||||
+312
-150
@@ -25,11 +25,13 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* cupsLangEncoding() - Return the character encoding (us-ascii, etc.)
|
||||
* for the given language.
|
||||
* cupsLangFlush() - Flush all language data out of the cache.
|
||||
* cupsLangFree() - Free language data.
|
||||
* cupsLangGet() - Get a language.
|
||||
* cupsLangEncoding() - Return the character encoding (us-ascii, etc.)
|
||||
* for the given language.
|
||||
* cupsLangFlush() - Flush all language data out of the cache.
|
||||
* cupsLangFree() - Free language data.
|
||||
* cupsLangGet() - Get a language.
|
||||
* appleLangDefault() - Get the default locale string.
|
||||
* cups_cache_lookup() - Lookup a language in the cache...
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -39,23 +41,38 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#ifdef WIN32
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif /* WIN32 */
|
||||
#include "string.h"
|
||||
#include "language.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
static const char *appleLangDefault(void);
|
||||
static const char *appleLangDefault(void);
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
static cups_lang_t *cups_cache_lookup(const char *name,
|
||||
cups_encoding_t encoding);
|
||||
|
||||
|
||||
/*
|
||||
* Local globals...
|
||||
*/
|
||||
|
||||
static cups_lang_t *lang_cache = NULL; /* Language string cache */
|
||||
static const char lang_blank[] = ""; /* Blank constant string */
|
||||
static const char * const lang_encodings[] = /* Encoding strings */
|
||||
{
|
||||
static cups_lang_t *lang_cache = NULL;
|
||||
/* Language string cache */
|
||||
static const char lang_blank[] = "";
|
||||
/* Blank constant string */
|
||||
static const char * const lang_encodings[] =
|
||||
{ /* Encoding strings */
|
||||
"us-ascii",
|
||||
"iso-8859-1",
|
||||
"iso-8859-2",
|
||||
@@ -84,8 +101,8 @@ static const char * const lang_encodings[] = /* Encoding strings */
|
||||
"koi8-r",
|
||||
"koi8-u"
|
||||
};
|
||||
static const char * const lang_default[] = /* Default POSIX locale */
|
||||
{
|
||||
static const char * const lang_default[] =
|
||||
{ /* Default POSIX locale */
|
||||
#include "cups_C.h"
|
||||
NULL
|
||||
};
|
||||
@@ -113,20 +130,34 @@ cupsLangEncoding(cups_lang_t *lang) /* I - Language data */
|
||||
void
|
||||
cupsLangFlush(void)
|
||||
{
|
||||
int i; /* Looping var */
|
||||
cups_lang_t *lang, /* Current language */
|
||||
*next; /* Next language */
|
||||
int i; /* Looping var */
|
||||
cups_lang_t *lang, /* Current language */
|
||||
*next; /* Next language */
|
||||
|
||||
|
||||
/*
|
||||
* Free all languages in the cache...
|
||||
*/
|
||||
|
||||
for (lang = lang_cache; lang != NULL; lang = next)
|
||||
{
|
||||
/*
|
||||
* Free all messages...
|
||||
*/
|
||||
|
||||
for (i = 0; i < CUPS_MSG_MAX; i ++)
|
||||
if (lang->messages[i] != NULL && lang->messages[i] != lang_blank)
|
||||
free(lang->messages[i]);
|
||||
|
||||
/*
|
||||
* Then free the language structure itself...
|
||||
*/
|
||||
|
||||
next = lang->next;
|
||||
free(lang);
|
||||
}
|
||||
|
||||
lang_cache = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -148,21 +179,54 @@ cupsLangFree(cups_lang_t *lang) /* I - Language to free */
|
||||
* 'cupsLangGet()' - Get a language.
|
||||
*/
|
||||
|
||||
cups_lang_t * /* O - Language data */
|
||||
cupsLangGet(const char *language) /* I - Language or locale */
|
||||
cups_lang_t * /* O - Language data */
|
||||
cupsLangGet(const char *language) /* I - Language or locale */
|
||||
{
|
||||
int i, count; /* Looping vars */
|
||||
char langname[32], /* Requested language name */
|
||||
*langptr, /* Pointer into language name */
|
||||
real[32], /* Real language name */
|
||||
*realptr, /* Pointer into real language name */
|
||||
filename[1024], /* Filename for language locale file */
|
||||
*localedir; /* Directory for locale files */
|
||||
FILE *fp; /* Language locale file pointer */
|
||||
char line[1024]; /* Line from file */
|
||||
cups_msg_t msg; /* Message number */
|
||||
char *text; /* Message text */
|
||||
cups_lang_t *lang; /* Current language... */
|
||||
int i, count; /* Looping vars */
|
||||
char langname[16], /* Requested language name */
|
||||
country[16], /* Country code */
|
||||
charset[16], /* Character set */
|
||||
*ptr, /* Pointer into language/ */
|
||||
real[48], /* Real language name */
|
||||
filename[1024], /* Filename for language locale file */
|
||||
*localedir; /* Directory for locale files */
|
||||
cups_encoding_t encoding; /* Encoding to use */
|
||||
FILE *fp; /* Language locale file pointer */
|
||||
char line[1024]; /* Line from file */
|
||||
cups_msg_t msg; /* Message number */
|
||||
char *text; /* Message text */
|
||||
cups_lang_t *lang; /* Current language... */
|
||||
const char *oldlocale; /* Old locale name */
|
||||
static const char * const locale_encodings[] =
|
||||
{ /* Locale charset names */
|
||||
"ASCII",
|
||||
"ISO8859-1",
|
||||
"ISO8859-2",
|
||||
"ISO8859-3",
|
||||
"ISO8859-4",
|
||||
"ISO8859-5",
|
||||
"ISO8859-6",
|
||||
"ISO8859-7",
|
||||
"ISO8859-8",
|
||||
"ISO8859-9",
|
||||
"ISO8859-10",
|
||||
"UTF-8",
|
||||
"ISO8859-13",
|
||||
"ISO8859-14",
|
||||
"ISO8859-15",
|
||||
"CP874",
|
||||
"CP1250",
|
||||
"CP1251",
|
||||
"CP1252",
|
||||
"CP1253",
|
||||
"CP1254",
|
||||
"CP1255",
|
||||
"CP1256",
|
||||
"CP1257",
|
||||
"CP1258",
|
||||
"KOI8R",
|
||||
"KOI8U"
|
||||
};
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -185,118 +249,148 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
* Convert the language string passed in to a locale string. "C" is the
|
||||
* standard POSIX locale and is copied unchanged. Otherwise the
|
||||
* language string is converted from ll-cc (language-country) to ll_cc
|
||||
* to match the file naming convention used by all POSIX-compliant
|
||||
* operating systems.
|
||||
* Set the locale back to POSIX while we do string ops, since
|
||||
* apparently some buggy C libraries break ctype() for non-I18N
|
||||
* chars...
|
||||
*/
|
||||
|
||||
if (language == NULL || language[0] == '\0' ||
|
||||
#if defined(__APPLE__) || !defined(LC_CTYPE)
|
||||
oldlocale = setlocale(LC_ALL, "C");
|
||||
#else
|
||||
oldlocale = setlocale(LC_CTYPE, "C");
|
||||
#endif /* __APPLE__ || !LC_CTYPE */
|
||||
|
||||
/*
|
||||
* Parse the language string passed in to a locale string. "C" is the
|
||||
* standard POSIX locale and is copied unchanged. Otherwise the
|
||||
* language string is converted from ll-cc[.charset] (language-country)
|
||||
* to ll_CC[.CHARSET] to match the file naming convention used by all
|
||||
* POSIX-compliant operating systems. Invalid language names are mapped
|
||||
* to the POSIX locale.
|
||||
*/
|
||||
|
||||
country[0] = '\0';
|
||||
charset[0] = '\0';
|
||||
|
||||
if (language == NULL || !language[0] ||
|
||||
strcmp(language, "POSIX") == 0)
|
||||
strcpy(langname, "C");
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Copy the locale string over safely...
|
||||
* Copy the parts of the locale string over safely...
|
||||
*/
|
||||
|
||||
strlcpy(langname, language, sizeof(langname));
|
||||
}
|
||||
|
||||
if (strlen(langname) < 2)
|
||||
strcpy(real, "C");
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Convert the language name to a normalized form, e.g.:
|
||||
*
|
||||
* ll[_CC[.charset]]
|
||||
*/
|
||||
|
||||
real[0] = tolower(langname[0]);
|
||||
real[1] = tolower(langname[1]);
|
||||
realptr = real + 2;
|
||||
langptr = langname + 2;
|
||||
|
||||
if (*langptr == '_' || *langptr == '-')
|
||||
{
|
||||
/*
|
||||
* Add country code...
|
||||
*/
|
||||
|
||||
*realptr++ = '_';
|
||||
langptr ++;
|
||||
|
||||
*realptr++ = toupper(*langptr++);
|
||||
*realptr++ = toupper(*langptr++);
|
||||
}
|
||||
|
||||
if (*langptr == '.')
|
||||
{
|
||||
/*
|
||||
* Add charset...
|
||||
*/
|
||||
|
||||
*langptr++ = '\0';
|
||||
*realptr++ = '.';
|
||||
|
||||
while (*langptr)
|
||||
for (ptr = langname; *language; language ++)
|
||||
if (*language == '_' || *language == '-')
|
||||
{
|
||||
if ((realptr - real) < (sizeof(real) - 1) &&
|
||||
*langptr != '-' && *langptr != '_')
|
||||
*realptr++ = tolower(*langptr++);
|
||||
else
|
||||
langptr ++;
|
||||
language ++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (ptr < (langname + sizeof(langname) - 1))
|
||||
*ptr++ = tolower(*language);
|
||||
|
||||
*realptr = '\0';
|
||||
*ptr = '\0';
|
||||
|
||||
for (ptr = country; *language; language ++)
|
||||
if (*language == '.')
|
||||
{
|
||||
language ++;
|
||||
break;
|
||||
}
|
||||
else if (ptr < (country + sizeof(country) - 1))
|
||||
*ptr++ = toupper(*language);
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
for (ptr = charset; *language; language ++)
|
||||
if (ptr < (charset + sizeof(charset) - 1))
|
||||
*ptr++ = toupper(*language);
|
||||
|
||||
*ptr = '\0';
|
||||
|
||||
/*
|
||||
* Force a POSIX locale for an invalid language name...
|
||||
*/
|
||||
|
||||
if (strlen(langname) != 2)
|
||||
{
|
||||
strcpy(langname, "C");
|
||||
country[0] = '\0';
|
||||
charset[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* See if we already have this language loaded...
|
||||
* Restore the locale...
|
||||
*/
|
||||
|
||||
for (lang = lang_cache; lang != NULL; lang = lang->next)
|
||||
if (strcmp(lang->language, langname) == 0)
|
||||
{
|
||||
lang->used ++;
|
||||
|
||||
return (lang);
|
||||
}
|
||||
|
||||
#if defined(__APPLE__) || !defined(LC_CTYPE)
|
||||
setlocale(LC_ALL, oldlocale);
|
||||
#else
|
||||
setlocale(LC_CTYPE, oldlocale);
|
||||
#endif /* __APPLE__ || !LC_CTYPE */
|
||||
|
||||
/*
|
||||
* Next try to open a locale file; we will try the charset-localized
|
||||
* file first, then the country-localized file, and finally look for
|
||||
* a generic language file. If all else fails we will use the POSIX
|
||||
* locale.
|
||||
* Figure out the desired encoding...
|
||||
*/
|
||||
|
||||
encoding = CUPS_US_ASCII;
|
||||
|
||||
for (i = 0; i < (int)(sizeof(locale_encodings) / sizeof(locale_encodings[0])); i ++)
|
||||
if (!strcmp(charset, locale_encodings[i]))
|
||||
{
|
||||
encoding = (cups_encoding_t)i;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now find the message catalog for this locale...
|
||||
*/
|
||||
|
||||
if ((localedir = getenv("LOCALEDIR")) == NULL)
|
||||
localedir = CUPS_LOCALEDIR;
|
||||
|
||||
for (fp = NULL; fp == NULL;)
|
||||
{
|
||||
snprintf(filename, sizeof(filename), "%s/%s/cups_%s", localedir,
|
||||
real, real);
|
||||
/*
|
||||
* See if we already have this language/country loaded...
|
||||
*/
|
||||
|
||||
if ((fp = fopen(filename, "r")) == NULL)
|
||||
snprintf(real, sizeof(real), "%s_%s", langname, country);
|
||||
|
||||
if ((lang = cups_cache_lookup(real, encoding)) != NULL)
|
||||
return (lang);
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/%s/cups_%s", localedir, real, real);
|
||||
|
||||
if (access(filename, 0))
|
||||
{
|
||||
/*
|
||||
* Country localization not available, look for generic localization...
|
||||
*/
|
||||
|
||||
if ((lang = cups_cache_lookup(langname, encoding)) != NULL)
|
||||
return (lang);
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/%s/cups_%s", localedir,
|
||||
langname, langname);
|
||||
|
||||
if (access(filename, 0))
|
||||
{
|
||||
if ((realptr = strchr(real, '.')) != NULL)
|
||||
*realptr = '\0';
|
||||
else if ((realptr = strchr(real, '_')) != NULL)
|
||||
*realptr = '\0';
|
||||
else
|
||||
break;
|
||||
/*
|
||||
* No generic localization, so use POSIX...
|
||||
*/
|
||||
|
||||
strcpy(real, "C");
|
||||
snprintf(filename, sizeof(filename), "%s/C/cups_C", localedir);
|
||||
}
|
||||
else
|
||||
strcpy(real, langname);
|
||||
}
|
||||
|
||||
/*
|
||||
* OK, we have an open messages file; the first line will contain the
|
||||
* language encoding (us-ascii, iso-8859-1, etc.), and the rest will
|
||||
* be messages consisting of:
|
||||
* Open the messages file; the first line contains the default
|
||||
* language encoding (us-ascii, iso-8859-1, etc.), and the rest are
|
||||
* messages consisting of:
|
||||
*
|
||||
* #### SP message text
|
||||
*
|
||||
@@ -311,6 +405,11 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
* All leading whitespace is deleted.
|
||||
*/
|
||||
|
||||
if (strcmp(real, "C"))
|
||||
fp = fopen(filename, "r");
|
||||
else
|
||||
fp = NULL;
|
||||
|
||||
if (fp == NULL)
|
||||
strlcpy(line, lang_default[0], sizeof(line));
|
||||
else if (fgets(line, sizeof(line), fp) == NULL)
|
||||
@@ -369,14 +468,19 @@ cupsLangGet(const char *language) /* I - Language or locale */
|
||||
*/
|
||||
|
||||
lang->used ++;
|
||||
strlcpy(lang->language, langname, sizeof(lang->language));
|
||||
strlcpy(lang->language, real, sizeof(lang->language));
|
||||
|
||||
for (i = 0; i < (sizeof(lang_encodings) / sizeof(lang_encodings[0])); i ++)
|
||||
if (strcmp(lang_encodings[i], line) == 0)
|
||||
{
|
||||
lang->encoding = (cups_encoding_t)i;
|
||||
break;
|
||||
}
|
||||
if (charset[0])
|
||||
lang->encoding = encoding;
|
||||
else
|
||||
{
|
||||
for (i = 0; i < (sizeof(lang_encodings) / sizeof(lang_encodings[0])); i ++)
|
||||
if (strcmp(lang_encodings[i], line) == 0)
|
||||
{
|
||||
lang->encoding = (cups_encoding_t)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the strings from the file...
|
||||
@@ -463,36 +567,65 @@ typedef struct
|
||||
|
||||
static const apple_name_locale_t apple_name_locale[] =
|
||||
{
|
||||
{ "English" , "en_US" },{ "French" , "fr" }, { "German" , "de" }, { "Italian" , "it" },
|
||||
{ "Dutch" , "nl" }, { "Swedish" , "sv" }, { "Spanish" , "es" }, { "Danish" , "da" },
|
||||
{ "Portuguese" , "pt" }, { "Norwegian" , "no" }, { "Hebrew" , "he" }, { "Japanese" , "ja" },
|
||||
{ "Arabic" , "ar" }, { "Finnish" , "fi" }, { "Greek" , "el" }, { "Icelandic" , "is" },
|
||||
{ "Maltese" , "mt" }, { "Turkish" , "tr" }, { "Croatian" , "hr" }, { "Chinese" , "zh" },
|
||||
{ "Urdu" , "ur" }, { "Hindi" , "hi" }, { "Thai" , "th" }, { "Korean" , "ko" },
|
||||
{ "Lithuanian" , "lt" }, { "Polish" , "pl" }, { "Hungarian" , "hu" }, { "Estonian" , "et" },
|
||||
{ "Latvian" , "lv" }, { "Sami" , "se" }, { "Faroese" , "fo" }, { "Farsi" , "fa" },
|
||||
{ "Russian" , "ru" }, { "Chinese" , "zh" }, { "Dutch" , "nl" }, { "Irish" , "ga" },
|
||||
{ "Albanian" , "sq" }, { "Romanian" , "ro" }, { "Czech" , "cs" }, { "Slovak" , "sk" },
|
||||
{ "Slovenian" , "sl" }, { "Yiddish" , "yi" }, { "Serbian" , "sr" }, { "Macedonian", "mk" },
|
||||
{ "Bulgarian" , "bg" }, { "Ukrainian" , "uk" }, { "Byelorussian", "be" }, { "Uzbek" , "uz" },
|
||||
{ "Kazakh" , "kk" }, { "Azerbaijani", "az" }, { "Azerbaijani" , "az" }, { "Armenian" , "hy" },
|
||||
{ "Georgian" , "ka" }, { "Moldavian" , "mo" }, { "Kirghiz" , "ky" }, { "Tajiki" , "tg" },
|
||||
{ "Turkmen" , "tk" }, { "Mongolian" , "mn" }, { "Mongolian" , "mn" }, { "Pashto" , "ps" },
|
||||
{ "Kurdish" , "ku" }, { "Kashmiri" , "ks" }, { "Sindhi" , "sd" }, { "Tibetan" , "bo" },
|
||||
{ "Nepali" , "ne" }, { "Sanskrit" , "sa" }, { "Marathi" , "mr" }, { "Bengali" , "bn" },
|
||||
{ "Assamese" , "as" }, { "Gujarati" , "gu" }, { "Punjabi" , "pa" }, { "Oriya" , "or" },
|
||||
{ "Malayalam" , "ml" }, { "Kannada" , "kn" }, { "Tamil" , "ta" }, { "Telugu" , "te" },
|
||||
{ "Sinhalese" , "si" }, { "Burmese" , "my" }, { "Khmer" , "km" }, { "Lao" , "lo" },
|
||||
{ "Vietnamese" , "vi" }, { "Indonesian" , "id" }, { "Tagalog" , "tl" }, { "Malay" , "ms" },
|
||||
{ "Malay" , "ms" }, { "Amharic" , "am" }, { "Tigrinya" , "ti" }, { "Oromo" , "om" },
|
||||
{ "Somali" , "so" }, { "Swahili" , "sw" }, { "Kinyarwanda" , "rw" }, { "Rundi" , "rn" },
|
||||
{ "Nyanja" , "" }, { "Malagasy" , "mg" }, { "Esperanto" , "eo" }, { "Welsh" , "cy" },
|
||||
{ "Basque" , "eu" }, { "Catalan" , "ca" }, { "Latin" , "la" }, { "Quechua" , "qu" },
|
||||
{ "Guarani" , "gn" }, { "Aymara" , "ay" }, { "Tatar" , "tt" }, { "Uighur" , "ug" },
|
||||
{ "Dzongkha" , "dz" }, { "Javanese" , "jv" }, { "Sundanese" , "su" }, { "Galician" , "gl" },
|
||||
{ "Afrikaans" , "af" }, { "Breton" , "br" }, { "Inuktitut" , "iu" }, { "Scottish" , "gd" },
|
||||
{ "Manx" , "gv" }, { "Irish" , "ga" }, { "Tongan" , "to" }, { "Greek" , "el" },
|
||||
{ "Greenlandic", "kl" }, { "Azerbaijani", "az" }
|
||||
{ "English" , "en_US.UTF-8" }, { "French" , "fr.UTF-8" },
|
||||
{ "German" , "de.UTF-8" }, { "Italian" , "it.UTF-8" },
|
||||
{ "Dutch" , "nl.UTF-8" }, { "Swedish" , "sv.UTF-8" },
|
||||
{ "Spanish" , "es.UTF-8" }, { "Danish" , "da.UTF-8" },
|
||||
{ "Portuguese" , "pt.UTF-8" }, { "Norwegian" , "no.UTF-8" },
|
||||
{ "Hebrew" , "he.UTF-8" }, { "Japanese" , "ja.UTF-8" },
|
||||
{ "Arabic" , "ar.UTF-8" }, { "Finnish" , "fi.UTF-8" },
|
||||
{ "Greek" , "el.UTF-8" }, { "Icelandic" , "is.UTF-8" },
|
||||
{ "Maltese" , "mt.UTF-8" }, { "Turkish" , "tr.UTF-8" },
|
||||
{ "Croatian" , "hr.UTF-8" }, { "Chinese" , "zh.UTF-8" },
|
||||
{ "Urdu" , "ur.UTF-8" }, { "Hindi" , "hi.UTF-8" },
|
||||
{ "Thai" , "th.UTF-8" }, { "Korean" , "ko.UTF-8" },
|
||||
{ "Lithuanian" , "lt.UTF-8" }, { "Polish" , "pl.UTF-8" },
|
||||
{ "Hungarian" , "hu.UTF-8" }, { "Estonian" , "et.UTF-8" },
|
||||
{ "Latvian" , "lv.UTF-8" }, { "Sami" , "se.UTF-8" },
|
||||
{ "Faroese" , "fo.UTF-8" }, { "Farsi" , "fa.UTF-8" },
|
||||
{ "Russian" , "ru.UTF-8" }, { "Chinese" , "zh.UTF-8" },
|
||||
{ "Dutch" , "nl.UTF-8" }, { "Irish" , "ga.UTF-8" },
|
||||
{ "Albanian" , "sq.UTF-8" }, { "Romanian" , "ro.UTF-8" },
|
||||
{ "Czech" , "cs.UTF-8" }, { "Slovak" , "sk.UTF-8" },
|
||||
{ "Slovenian" , "sl.UTF-8" }, { "Yiddish" , "yi.UTF-8" },
|
||||
{ "Serbian" , "sr.UTF-8" }, { "Macedonian" , "mk.UTF-8" },
|
||||
{ "Bulgarian" , "bg.UTF-8" }, { "Ukrainian" , "uk.UTF-8" },
|
||||
{ "Byelorussian", "be.UTF-8" }, { "Uzbek" , "uz.UTF-8" },
|
||||
{ "Kazakh" , "kk.UTF-8" }, { "Azerbaijani", "az.UTF-8" },
|
||||
{ "Azerbaijani" , "az.UTF-8" }, { "Armenian" , "hy.UTF-8" },
|
||||
{ "Georgian" , "ka.UTF-8" }, { "Moldavian" , "mo.UTF-8" },
|
||||
{ "Kirghiz" , "ky.UTF-8" }, { "Tajiki" , "tg.UTF-8" },
|
||||
{ "Turkmen" , "tk.UTF-8" }, { "Mongolian" , "mn.UTF-8" },
|
||||
{ "Mongolian" , "mn.UTF-8" }, { "Pashto" , "ps.UTF-8" },
|
||||
{ "Kurdish" , "ku.UTF-8" }, { "Kashmiri" , "ks.UTF-8" },
|
||||
{ "Sindhi" , "sd.UTF-8" }, { "Tibetan" , "bo.UTF-8" },
|
||||
{ "Nepali" , "ne.UTF-8" }, { "Sanskrit" , "sa.UTF-8" },
|
||||
{ "Marathi" , "mr.UTF-8" }, { "Bengali" , "bn.UTF-8" },
|
||||
{ "Assamese" , "as.UTF-8" }, { "Gujarati" , "gu.UTF-8" },
|
||||
{ "Punjabi" , "pa.UTF-8" }, { "Oriya" , "or.UTF-8" },
|
||||
{ "Malayalam" , "ml.UTF-8" }, { "Kannada" , "kn.UTF-8" },
|
||||
{ "Tamil" , "ta.UTF-8" }, { "Telugu" , "te.UTF-8" },
|
||||
{ "Sinhalese" , "si.UTF-8" }, { "Burmese" , "my.UTF-8" },
|
||||
{ "Khmer" , "km.UTF-8" }, { "Lao" , "lo.UTF-8" },
|
||||
{ "Vietnamese" , "vi.UTF-8" }, { "Indonesian" , "id.UTF-8" },
|
||||
{ "Tagalog" , "tl.UTF-8" }, { "Malay" , "ms.UTF-8" },
|
||||
{ "Malay" , "ms.UTF-8" }, { "Amharic" , "am.UTF-8" },
|
||||
{ "Tigrinya" , "ti.UTF-8" }, { "Oromo" , "om.UTF-8" },
|
||||
{ "Somali" , "so.UTF-8" }, { "Swahili" , "sw.UTF-8" },
|
||||
{ "Kinyarwanda" , "rw.UTF-8" }, { "Rundi" , "rn.UTF-8" },
|
||||
{ "Nyanja" , "" }, { "Malagasy" , "mg.UTF-8" },
|
||||
{ "Esperanto" , "eo.UTF-8" }, { "Welsh" , "cy.UTF-8" },
|
||||
{ "Basque" , "eu.UTF-8" }, { "Catalan" , "ca.UTF-8" },
|
||||
{ "Latin" , "la.UTF-8" }, { "Quechua" , "qu.UTF-8" },
|
||||
{ "Guarani" , "gn.UTF-8" }, { "Aymara" , "ay.UTF-8" },
|
||||
{ "Tatar" , "tt.UTF-8" }, { "Uighur" , "ug.UTF-8" },
|
||||
{ "Dzongkha" , "dz.UTF-8" }, { "Javanese" , "jv.UTF-8" },
|
||||
{ "Sundanese" , "su.UTF-8" }, { "Galician" , "gl.UTF-8" },
|
||||
{ "Afrikaans" , "af.UTF-8" }, { "Breton" , "br.UTF-8" },
|
||||
{ "Inuktitut" , "iu.UTF-8" }, { "Scottish" , "gd.UTF-8" },
|
||||
{ "Manx" , "gv.UTF-8" }, { "Irish" , "ga.UTF-8" },
|
||||
{ "Tongan" , "to.UTF-8" }, { "Greek" , "el.UTF-8" },
|
||||
{ "Greenlandic" , "kl.UTF-8" }, { "Azerbaijani", "az.UTF-8" }
|
||||
};
|
||||
|
||||
|
||||
@@ -520,7 +653,8 @@ appleLangDefault(void)
|
||||
kCFPreferencesCurrentApplication);
|
||||
|
||||
if (localizationList != NULL &&
|
||||
CFGetTypeID(localizationList) == CFArrayGetTypeID())
|
||||
CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
|
||||
CFArrayGetCount(localizationList) > 0)
|
||||
{
|
||||
localizationName = CFArrayGetValueAtIndex(localizationList, 0);
|
||||
|
||||
@@ -567,6 +701,34 @@ appleLangDefault(void)
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
|
||||
/*
|
||||
* 'cups_cache_lookup()' - Lookup a language in the cache...
|
||||
*/
|
||||
|
||||
static cups_lang_t * /* O - Language data or NULL */
|
||||
cups_cache_lookup(const char *name,/* I - Name of locale */
|
||||
cups_encoding_t encoding)
|
||||
/* I - Encoding of locale */
|
||||
{
|
||||
cups_lang_t *lang; /* Current language */
|
||||
|
||||
|
||||
/*
|
||||
* Loop through the cache and return a match if found...
|
||||
*/
|
||||
|
||||
for (lang = lang_cache; lang != NULL; lang = lang->next)
|
||||
if (!strcmp(lang->language, name) && encoding == lang->encoding)
|
||||
{
|
||||
lang->used ++;
|
||||
|
||||
return (lang);
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
||||
+291
-20
@@ -34,7 +34,15 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cups/string.h>
|
||||
#include <errno.h>
|
||||
#include "ipp.h"
|
||||
#ifdef WIN32
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
/*
|
||||
@@ -95,6 +103,7 @@ ipp_uchar_t collection[] = /* Collection buffer */
|
||||
*/
|
||||
|
||||
void hex_dump(ipp_uchar_t *buffer, int bytes);
|
||||
void print_attributes(ipp_t *ipp, int indent);
|
||||
int read_cb(void *data, ipp_uchar_t *buffer, int bytes);
|
||||
int write_cb(void *data, ipp_uchar_t *buffer, int bytes);
|
||||
|
||||
@@ -111,6 +120,8 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
ipp_t *request; /* Request */
|
||||
ipp_state_t state; /* State */
|
||||
int length; /* Length of data */
|
||||
int fd; /* File descriptor */
|
||||
int i; /* Looping var */
|
||||
|
||||
|
||||
request = ippNew();
|
||||
@@ -172,28 +183,73 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
printf("%d bytes read.\n", rpos);
|
||||
|
||||
puts("Core IPP tests passed.");
|
||||
|
||||
for (i = 1; i < argc; i ++)
|
||||
{
|
||||
if ((fd = open(argv[i], O_RDONLY)) < 0)
|
||||
{
|
||||
printf("Unable to open \"%s\" - %s\n", argv[i], strerror(errno));
|
||||
continue;
|
||||
}
|
||||
|
||||
request = ippNew();
|
||||
while ((state = ippReadFile(fd, request)) == IPP_ATTRIBUTE);
|
||||
|
||||
if (state != IPP_DATA)
|
||||
printf("Error reading IPP message from \"%s\"!\n", argv[i]);
|
||||
else
|
||||
{
|
||||
printf("\n%s:\n", argv[i]);
|
||||
print_attributes(request, 4);
|
||||
}
|
||||
|
||||
ippDelete(request);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
hex_dump(ipp_uchar_t *buffer,
|
||||
int bytes)
|
||||
{
|
||||
int i, j;
|
||||
int ch;
|
||||
/*
|
||||
* 'hex_dump()' - Produce a hex dump of a buffer.
|
||||
*/
|
||||
|
||||
void
|
||||
hex_dump(ipp_uchar_t *buffer, /* I - Buffer to dump */
|
||||
int bytes) /* I - Number of bytes */
|
||||
{
|
||||
int i, j; /* Looping vars */
|
||||
int ch; /* Current ASCII char */
|
||||
|
||||
|
||||
/*
|
||||
* Show lines of 16 bytes at a time...
|
||||
*/
|
||||
|
||||
for (i = 0; i < bytes; i += 16)
|
||||
{
|
||||
/*
|
||||
* Show the offset...
|
||||
*/
|
||||
|
||||
printf("%04x ", i);
|
||||
|
||||
/*
|
||||
* Then up to 16 bytes in hex...
|
||||
*/
|
||||
|
||||
for (j = 0; j < 16; j ++)
|
||||
if ((i + j) < bytes)
|
||||
printf(" %02x", buffer[i + j]);
|
||||
else
|
||||
printf(" ");
|
||||
|
||||
/*
|
||||
* Then the ASCII representation of the bytes...
|
||||
*/
|
||||
|
||||
putchar(' ');
|
||||
putchar(' ');
|
||||
|
||||
@@ -212,34 +268,249 @@ hex_dump(ipp_uchar_t *buffer,
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
read_cb(void *data,
|
||||
ipp_uchar_t *buffer,
|
||||
int bytes)
|
||||
{
|
||||
int count;
|
||||
/*
|
||||
* 'print_attributes()' - Print the attributes in a request...
|
||||
*/
|
||||
|
||||
void
|
||||
print_attributes(ipp_t *ipp, /* I - IPP request */
|
||||
int indent) /* I - Indentation */
|
||||
{
|
||||
int i; /* Looping var */
|
||||
ipp_tag_t group; /* Current group */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
ipp_value_t *val; /* Current value */
|
||||
static const char * const tags[] = /* Value/group tag strings */
|
||||
{
|
||||
"reserved-00",
|
||||
"operation-attributes-tag",
|
||||
"job-attributes-tag",
|
||||
"end-of-attributes-tag",
|
||||
"printer-attributes-tag",
|
||||
"unsupported-attributes-tag",
|
||||
"subscription-attributes-tag",
|
||||
"event-attributes-tag",
|
||||
"reserved-08",
|
||||
"reserved-09",
|
||||
"reserved-0A",
|
||||
"reserved-0B",
|
||||
"reserved-0C",
|
||||
"reserved-0D",
|
||||
"reserved-0E",
|
||||
"reserved-0F",
|
||||
"unsupported",
|
||||
"default",
|
||||
"unknown",
|
||||
"no-value",
|
||||
"reserved-14",
|
||||
"not-settable",
|
||||
"delete-attr",
|
||||
"admin-define",
|
||||
"reserved-18",
|
||||
"reserved-19",
|
||||
"reserved-1A",
|
||||
"reserved-1B",
|
||||
"reserved-1C",
|
||||
"reserved-1D",
|
||||
"reserved-1E",
|
||||
"reserved-1F",
|
||||
"reserved-20",
|
||||
"integer",
|
||||
"boolean",
|
||||
"enum",
|
||||
"reserved-24",
|
||||
"reserved-25",
|
||||
"reserved-26",
|
||||
"reserved-27",
|
||||
"reserved-28",
|
||||
"reserved-29",
|
||||
"reserved-2a",
|
||||
"reserved-2b",
|
||||
"reserved-2c",
|
||||
"reserved-2d",
|
||||
"reserved-2e",
|
||||
"reserved-2f",
|
||||
"octetString",
|
||||
"dateTime",
|
||||
"resolution",
|
||||
"rangeOfInteger",
|
||||
"begCollection",
|
||||
"textWithLanguage",
|
||||
"nameWithLanguage",
|
||||
"endCollection",
|
||||
"reserved-38",
|
||||
"reserved-39",
|
||||
"reserved-3a",
|
||||
"reserved-3b",
|
||||
"reserved-3c",
|
||||
"reserved-3d",
|
||||
"reserved-3e",
|
||||
"reserved-3f",
|
||||
"reserved-40",
|
||||
"textWithoutLanguage",
|
||||
"nameWithoutLanguage",
|
||||
"reserved-43",
|
||||
"keyword",
|
||||
"uri",
|
||||
"uriScheme",
|
||||
"charset",
|
||||
"naturalLanguage",
|
||||
"mimeMediaType",
|
||||
"memberName"
|
||||
};
|
||||
|
||||
|
||||
for (group = IPP_TAG_ZERO, attr = ipp->attrs; attr; attr = attr->next)
|
||||
{
|
||||
if (attr->group_tag == IPP_TAG_ZERO || !attr->name)
|
||||
{
|
||||
group = IPP_TAG_ZERO;
|
||||
putchar('\n');
|
||||
continue;
|
||||
}
|
||||
|
||||
if (group != attr->group_tag)
|
||||
{
|
||||
group = attr->group_tag;
|
||||
|
||||
putchar('\n');
|
||||
for (i = 2; i < indent; i ++)
|
||||
putchar(' ');
|
||||
|
||||
printf("%s:\n\n", tags[group]);
|
||||
}
|
||||
|
||||
for (i = 0; i < indent; i ++)
|
||||
putchar(' ');
|
||||
|
||||
printf("%s (%s):", attr->name, tags[attr->value_tag]);
|
||||
|
||||
switch (attr->value_tag)
|
||||
{
|
||||
case IPP_TAG_ENUM :
|
||||
case IPP_TAG_INTEGER :
|
||||
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
|
||||
printf(" %d", val->integer);
|
||||
putchar('\n');
|
||||
break;
|
||||
|
||||
case IPP_TAG_BOOLEAN :
|
||||
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
|
||||
printf(" %s", val->boolean ? "true" : "false");
|
||||
putchar('\n');
|
||||
break;
|
||||
|
||||
case IPP_TAG_RANGE :
|
||||
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
|
||||
printf(" %d-%d", val->range.lower, val->range.upper);
|
||||
putchar('\n');
|
||||
break;
|
||||
|
||||
case IPP_TAG_DATE :
|
||||
{
|
||||
time_t vtime; /* Date/Time value */
|
||||
struct tm *vdate; /* Date info */
|
||||
char vstring[256]; /* Formatted time */
|
||||
|
||||
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
|
||||
{
|
||||
vtime = ippDateToTime(val->date);
|
||||
vdate = localtime(&vtime);
|
||||
strftime(vstring, sizeof(vstring), "%c", vdate);
|
||||
printf(" (%s)", vstring);
|
||||
}
|
||||
}
|
||||
putchar('\n');
|
||||
break;
|
||||
|
||||
case IPP_TAG_RESOLUTION :
|
||||
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
|
||||
printf(" %dx%d%s", val->resolution.xres, val->resolution.yres,
|
||||
val->resolution.units == IPP_RES_PER_INCH ? "dpi" : "dpc");
|
||||
putchar('\n');
|
||||
break;
|
||||
|
||||
case IPP_TAG_STRING :
|
||||
case IPP_TAG_TEXTLANG :
|
||||
case IPP_TAG_NAMELANG :
|
||||
case IPP_TAG_TEXT :
|
||||
case IPP_TAG_NAME :
|
||||
case IPP_TAG_KEYWORD :
|
||||
case IPP_TAG_URI :
|
||||
case IPP_TAG_URISCHEME :
|
||||
case IPP_TAG_CHARSET :
|
||||
case IPP_TAG_LANGUAGE :
|
||||
case IPP_TAG_MIMETYPE :
|
||||
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
|
||||
printf(" \"%s\"", val->string.text);
|
||||
putchar('\n');
|
||||
break;
|
||||
|
||||
case IPP_TAG_BEGIN_COLLECTION :
|
||||
putchar('\n');
|
||||
|
||||
for (i = 0, val = attr->values; i < attr->num_values; i ++, val ++)
|
||||
print_attributes(val->collection, indent + 4);
|
||||
break;
|
||||
|
||||
default :
|
||||
putchar('\n');
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'read_cb()' - Read data from a buffer.
|
||||
*/
|
||||
|
||||
int /* O - Number of bytes read */
|
||||
read_cb(void *data, /* I - Data */
|
||||
ipp_uchar_t *buffer, /* O - Buffer to read */
|
||||
int bytes) /* I - Number of bytes to read */
|
||||
{
|
||||
int count; /* Number of bytes */
|
||||
|
||||
|
||||
/*
|
||||
* Copy bytes from the data buffer to the read buffer...
|
||||
*/
|
||||
|
||||
for (count = bytes; count > 0 && rpos < wused; count --, rpos ++)
|
||||
*buffer++ = wbuffer[rpos];
|
||||
|
||||
/*
|
||||
* Return the number of bytes read...
|
||||
*/
|
||||
|
||||
return (bytes - count);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
write_cb(void *data,
|
||||
ipp_uchar_t *buffer,
|
||||
int bytes)
|
||||
{
|
||||
int count;
|
||||
/*
|
||||
* 'write_cb()' - Write data into a buffer.
|
||||
*/
|
||||
|
||||
printf("write_cb(data=%p, buffer=%p, bytes=%d)\n", data, buffer, bytes);
|
||||
int /* O - Number of bytes written */
|
||||
write_cb(void *data, /* I - Data */
|
||||
ipp_uchar_t *buffer, /* I - Buffer to write */
|
||||
int bytes) /* I - Number of bytes to write */
|
||||
{
|
||||
int count; /* Number of bytes */
|
||||
|
||||
|
||||
/*
|
||||
* Loop until all bytes are written...
|
||||
*/
|
||||
|
||||
for (count = bytes; count > 0 && wused < sizeof(wbuffer); count --, wused ++)
|
||||
wbuffer[wused] = *buffer++;
|
||||
|
||||
printf(" count=%d, returning %d\n", count, bytes - count);
|
||||
/*
|
||||
* Return the number of bytes written...
|
||||
*/
|
||||
|
||||
return (bytes - count);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,6 @@ all: $(DOCUMENTS:.shtml=.pdf) $(DOCUMENTS:.shtml=.html) overview.pdf
|
||||
#
|
||||
|
||||
ps: $(DOCUMENTS:.shtml=.ps) overview.ps
|
||||
cd de; $(MAKE) $(MFLAGS) ps
|
||||
cd fr; $(MAKE) $(MFLAGS) ps
|
||||
|
||||
|
||||
|
||||
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
+295
-115
@@ -119,8 +119,8 @@ Copyright 1997-2003, All Rights Reserved<BR>
|
||||
<LI><A HREF="#BrowseAddress">BrowseAddress</A></LI>
|
||||
<LI><A HREF="#BrowseAllow">BrowseAllow</A></LI>
|
||||
<LI><A HREF="#BrowseDeny">BrowseDeny</A></LI>
|
||||
<LI><A HREF="#BrowseOrder">BrowseOrder</A></LI>
|
||||
<LI><A HREF="#BrowseInterval">BrowseInterval</A></LI>
|
||||
<LI><A HREF="#BrowseOrder">BrowseOrder</A></LI>
|
||||
<LI><A HREF="#BrowsePoll">BrowsePoll</A></LI>
|
||||
<LI><A HREF="#BrowsePort">BrowsePort</A></LI>
|
||||
<LI><A HREF="#BrowseProtocols">BrowseProtocols</A></LI>
|
||||
@@ -138,6 +138,8 @@ Copyright 1997-2003, All Rights Reserved<BR>
|
||||
<LI><A HREF="#DocumentRoot">DocumentRoot</A></LI>
|
||||
<LI><A HREF="#Encryption">Encryption</A></LI>
|
||||
<LI><A HREF="#ErrorLog">ErrorLog</A></LI>
|
||||
<LI><A HREF="#FaxRetryInterval">FaxRetryInterval</A></LI>
|
||||
<LI><A HREF="#FaxRetryLimit">FaxRetryLimit</A></LI>
|
||||
<LI><A HREF="#FileDevice">FileDevice</A></LI>
|
||||
<LI><A HREF="#FilterLimit">FilterLimit</A></LI>
|
||||
<LI><A HREF="#FilterNice">FilterNice</A></LI>
|
||||
@@ -145,8 +147,8 @@ Copyright 1997-2003, All Rights Reserved<BR>
|
||||
<LI><A HREF="#Group">Group</A></LI>
|
||||
<LI><A HREF="#HideImplicitMembers">HideImplicitMembers</A></LI>
|
||||
<LI><A HREF="#HostNameLookups">HostNameLookups</A></LI>
|
||||
<LI><A HREF="#ImplicitClasses">ImplicitClasses</A></LI>
|
||||
<LI><A HREF="#ImplicitAnyClasses">ImplicitAnyClasses</A></LI>
|
||||
<LI><A HREF="#ImplicitClasses">ImplicitClasses</A></LI>
|
||||
<LI><A HREF="#Include">Include</A></LI>
|
||||
<LI><A HREF="#KeepAlive">KeepAlive</A></LI>
|
||||
<LI><A HREF="#KeepAliveTimeout">KeepAliveTimeout</A></LI>
|
||||
@@ -168,8 +170,8 @@ Copyright 1997-2003, All Rights Reserved<BR>
|
||||
<LI><A HREF="#Order">Order</A></LI>
|
||||
<LI><A HREF="#PageLog">PageLog</A></LI>
|
||||
<LI><A HREF="#Port">Port</A></LI>
|
||||
<LI><A HREF="#PreserveJobHistory">PreserveJobHistory</A></LI>
|
||||
<LI><A HREF="#PreserveJobFiles">PreserveJobFiles</A></LI>
|
||||
<LI><A HREF="#PreserveJobHistory">PreserveJobHistory</A></LI>
|
||||
<LI><A HREF="#Printcap">Printcap</A></LI>
|
||||
<LI><A HREF="#PrintcapFormat">PrintcapFormat</A></LI>
|
||||
<LI><A HREF="#PrintcapGUI">PrintcapGUI</A></LI>
|
||||
@@ -262,18 +264,20 @@ Copyright 1997-2003, All Rights Reserved<BR>
|
||||
<LI><A HREF="#8_1">The Basics</A></LI>
|
||||
<LI><A HREF="#8_2">Printing from LPD Clients</A></LI>
|
||||
<LI><A HREF="#8_3">Printing to LPD Servers</A></LI>
|
||||
<LI><A HREF="#8_4">Printing from Mac OS Clients</A></LI>
|
||||
<LI><A HREF="#8_4">Printing from Mac OS 10.2 and Later Clients</A></LI>
|
||||
<LI><A HREF="#8_5">Printing from Mac OS 10.1 and Earlier Clients</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#8_4_1">Columbia Appletalk Package (CAP)</A></LI>
|
||||
<LI><A HREF="#8_4_2">XINET KA/Spool</A></LI>
|
||||
<LI><A HREF="#8_4_3">NetATalk</A></LI>
|
||||
<LI><A HREF="#8_5_1">Columbia Appletalk Package (CAP)</A></LI>
|
||||
<LI><A HREF="#8_5_2">XINET KA/Spool</A></LI>
|
||||
<LI><A HREF="#8_5_3">Netatalk</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#8_5">Printing to Mac OS Servers</A></LI>
|
||||
<LI><A HREF="#8_6">Printing from Windows Clients</A></LI>
|
||||
<LI><A HREF="#8_6">Printing to Mac OS 10.2 and Later Servers</A></LI>
|
||||
<LI><A HREF="#8_7">Printing to Mac OS 10.1 and Earlier Servers</A></LI>
|
||||
<LI><A HREF="#8_8">Printing from Windows Clients</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#8_6_1">Exporting Printer Drivers</A></LI>
|
||||
<LI><A HREF="#8_8_1">Exporting Printer Drivers</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#8_7">Printing to Windows Servers</A></LI>
|
||||
<LI><A HREF="#8_9">Printing to Windows Servers</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#LICENSE">A - Software License Agreement</A></B>
|
||||
<UL>
|
||||
@@ -300,10 +304,12 @@ Copyright 1997-2003, All Rights Reserved<BR>
|
||||
<LI><A HREF="#10_3">Common Network Interface Settings</A></LI>
|
||||
<LI><A HREF="#AXIS">Configuring Axis Print Servers</A></LI>
|
||||
<LI><A HREF="#LINKSYS">Configuring Linksys Print Servers</A></LI>
|
||||
<LI><A HREF="#LPD_OPTIONS">Configuring LPD Printing Options</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#PRINTER_DRIVERS">C - Printer Drivers</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#11_1">Printer Drivers</A></LI>
|
||||
<LI><A HREF="#DYMO">DYMO Label Printer</A></LI>
|
||||
<LI><A HREF="#EPSON9">EPSON 9-pin Dot Matrix</A></LI>
|
||||
<LI><A HREF="#EPSON24">EPSON 24-pin Dot Matrix</A></LI>
|
||||
<LI><A HREF="#STCOLOR">EPSON Stylus Color</A></LI>
|
||||
@@ -818,7 +824,8 @@ file:/directory/filename</CODE> while network devices use the more
|
||||
might look like:</P>
|
||||
<UL>
|
||||
<PRE>
|
||||
<B>/usr/sbin/lpadmin -p DotMatrix -E -v serial:/dev/ttyS0?baud=9600+size=8+parity=none+flow=soft deskjet.ppd ENTER</B>
|
||||
<B>/usr/sbin/lpadmin -p DotMatrix -E -m epson9.ppd \
|
||||
-v serial:/dev/ttyS0?baud=9600+size=8+parity=none+flow=soft <I>ENTER</I></B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<P>Here you specify the serial port (e.g. S0,S1, d0, d1), baud rate
|
||||
@@ -1215,6 +1222,8 @@ BrowseRelay 192.168.1 192.168.3.255 ENTER
|
||||
BrowseRelay 192.168.2 192.168.3.255 ENTER
|
||||
</B></PRE>
|
||||
</UL>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H2><A NAME="6_2">Load Balancing and Failsafe Operation</A></H2>
|
||||
<P>When using server polling or broadcasting, CUPS clients can
|
||||
automatically merge identical printers on multiple servers into a
|
||||
@@ -1224,8 +1233,12 @@ BrowseRelay 192.168.2 192.168.3.255 ENTER
|
||||
<P>If you have two printers, LaserJet@ServerA and LaserJet@ServerB, a
|
||||
third implicit class called<I> LaserJet</I> will be created
|
||||
automatically on the client that refers to both printers. If the client
|
||||
also has a local printer with the name LaserJet then an implicit class
|
||||
named<I> AnyLaserJet</I> will be created instead.</P>
|
||||
also has a local printer with the name LaserJet and the<A HREF="#ImplicitAnyClasses">
|
||||
<CODE>ImplicitAnyClasses</CODE></A> directive is enabled, then an
|
||||
implicit class named<I> AnyLaserJet</I> will be created instead.
|
||||
Otherwise, the local printer will prevent the creation of an implicit
|
||||
class, since CUPS will assume that the local printer will always be
|
||||
more available than a remote one.</P>
|
||||
<P>The client will alternate between servers and automatically stop
|
||||
sending jobs to a server if it goes down, providing a load-balancing
|
||||
effect and fail-safe operation with automatic switchover.</P>
|
||||
@@ -1233,7 +1246,8 @@ BrowseRelay 192.168.2 192.168.3.255 ENTER
|
||||
<TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
|
||||
<TR><TD><B> NOTE:</B>
|
||||
<P>Note that implicit classes (<A HREF="#ImplicitClasses"><CODE>
|
||||
ImplicitClasses</CODE></A>) are enabled by default.</P>
|
||||
ImplicitClasses</CODE></A>) are enabled and implicit "any" classes (<A HREF="#ImplicitAnyClasses">
|
||||
<CODE>ImplicitAnyClasses</CODE></A>) are disabled by default.</P>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
@@ -1342,8 +1356,10 @@ HREF="#CLIENT_SETUP"> Chapter 5, "Client Setup"</A> for more
|
||||
<LI><A HREF="#Deny"><CODE>Deny</CODE></A></LI>
|
||||
<LI><A HREF="#DocumentRoot"><CODE>DocumentRoot</CODE></A></LI>
|
||||
<LI><A HREF="#Encryption"><CODE>Encryption</CODE></A></LI>
|
||||
</TD><TD VALIGN="TOP"> </TD><TD VALIGN="TOP">
|
||||
<LI><A HREF="#ErrorLog"><CODE>ErrorLog</CODE></A></LI>
|
||||
</TD><TD VALIGN="TOP"> </TD><TD VALIGN="TOP">
|
||||
<LI><A HREF="#FaxRetryInterval"><CODE>FaxRetryInterval</CODE></A></LI>
|
||||
<LI><A HREF="#FaxRetryLimit"><CODE>FaxRetryLimit</CODE></A></LI>
|
||||
<LI><A HREF="#FileDevice"><CODE>FileDevice</CODE></A></LI>
|
||||
<LI><A HREF="#FilterLimit"><CODE>FilterLimit</CODE></A></LI>
|
||||
<LI><A HREF="#FilterNice"><CODE>FilterNice</CODE></A></LI>
|
||||
@@ -1351,8 +1367,8 @@ HREF="#CLIENT_SETUP"> Chapter 5, "Client Setup"</A> for more
|
||||
<LI><A HREF="#Group"><CODE>Group</CODE></A></LI>
|
||||
<LI><A HREF="#HideImplicitMembers"><CODE>HideImplicitMembers</CODE></A></LI>
|
||||
<LI><A HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A></LI>
|
||||
<LI><A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A></LI>
|
||||
<LI><A HREF="#ImplicitAnyClasses"><CODE>ImplicitAnyClasses</CODE></A></LI>
|
||||
<LI><A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A></LI>
|
||||
<LI><A HREF="#Include"><CODE>Include</CODE></A></LI>
|
||||
<LI><A HREF="#KeepAliveTimeout"><CODE>KeepAliveTimeout</CODE></A></LI>
|
||||
<LI><A HREF="#KeepAlive"><CODE>KeepAlive</CODE></A></LI>
|
||||
@@ -1370,10 +1386,10 @@ HREF="#CLIENT_SETUP"> Chapter 5, "Client Setup"</A> for more
|
||||
<LI><A HREF="#MaxJobsPerPrinter"><CODE>MaxJobsPerPrinter</CODE></A></LI>
|
||||
<LI><A HREF="#MaxJobsPerUser"><CODE>MaxJobsPerUser</CODE></A></LI>
|
||||
<LI><A HREF="#MaxLogSize"><CODE>MaxLogSize</CODE></A></LI>
|
||||
</TD><TD VALIGN="TOP"> </TD><TD VALIGN="TOP">
|
||||
<LI><A HREF="#MaxRequestSize"><CODE>MaxRequestSize</CODE></A></LI>
|
||||
<LI><A HREF="#Order"><CODE>Order</CODE></A></LI>
|
||||
<LI><A HREF="#PageLog"><CODE>PageLog</CODE></A></LI>
|
||||
</TD><TD VALIGN="TOP"> </TD><TD VALIGN="TOP">
|
||||
<LI><A HREF="#Port"><CODE>Port</CODE></A></LI>
|
||||
<LI><A HREF="#PreserveJobFiles"><CODE>PreserveJobFiles</CODE></A></LI>
|
||||
<LI><A HREF="#PreserveJobHistory"><CODE>PreserveJobHistory</CODE></A></LI>
|
||||
@@ -1518,7 +1534,7 @@ AuthGroupName lp
|
||||
Group</CODE> authentication.</P>
|
||||
<P>The <CODE>AuthGroupName</CODE> directive must appear inside a<A HREF="#Location">
|
||||
<CODE>Location</CODE></A> directive.
|
||||
<!-- NEED 3in -->
|
||||
<!-- NEED 4in -->
|
||||
</P>
|
||||
<H3><A NAME="AuthType">AuthType</A></H3>
|
||||
<HR>
|
||||
@@ -1659,26 +1675,6 @@ BrowseDeny from @IF(name)
|
||||
@IF(name)</CODE> name will block browse data from the named interface.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="BrowseOrder">BrowseOrder</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
BrowseOrder allow,deny
|
||||
BrowseOrder deny,allow
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>BrowseOrder</CODE> directive specifies the order of
|
||||
allow/deny processing. The default order is <CODE>deny,allow</CODE>:</P>
|
||||
<UL>
|
||||
<LI><CODE>allow,deny</CODE> - Browse packets are accepted unless
|
||||
specifically denied.</LI>
|
||||
<LI><CODE>deny,allow</CODE> - Browse packets are rejected unless
|
||||
specifically allowed.</LI>
|
||||
</UL>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="BrowseInterval">BrowseInterval</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
@@ -1699,6 +1695,26 @@ HREF="#BrowseTimeout"> <CODE>BrowseTimeout</CODE></A> value. Otherwise
|
||||
updates.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="BrowseOrder">BrowseOrder</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
BrowseOrder allow,deny
|
||||
BrowseOrder deny,allow
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>BrowseOrder</CODE> directive specifies the order of
|
||||
allow/deny processing. The default order is <CODE>deny,allow</CODE>:</P>
|
||||
<UL>
|
||||
<LI><CODE>allow,deny</CODE> - Browse packets are accepted unless
|
||||
specifically denied.</LI>
|
||||
<LI><CODE>deny,allow</CODE> - Browse packets are rejected unless
|
||||
specifically allowed.</LI>
|
||||
</UL>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="BrowsePoll">BrowsePoll</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
@@ -2039,7 +2055,6 @@ DocumentRoot /foo/bar/doc/cups
|
||||
Encryption Never
|
||||
Encryption IfRequested
|
||||
Encryption Required
|
||||
Encryption Always
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
@@ -2068,6 +2083,37 @@ ErrorLog syslog
|
||||
in the name.</P>
|
||||
<P>The special name "syslog" can be used to send the error information
|
||||
to the system log instead of a plain file.
|
||||
<!-- NEED 2in -->
|
||||
</P>
|
||||
<H3><A NAME="FaxRetryInterval">FaxRetryInterval</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
FaxRetryInterval 300
|
||||
FaxRetryInterval 30
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>FaxRetryInterval</CODE> directive determines how often fax
|
||||
print jobs are retried when the backend is unable to send the fax. The
|
||||
value is the number of seconds between tries.</P>
|
||||
<P>The default setting is <CODE>300</CODE> seconds.
|
||||
<!-- NEED 2in -->
|
||||
</P>
|
||||
<H3><A NAME="FaxRetryLimit">FaxRetryLimit</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
FaxRetryLimit 5
|
||||
FaxRetryLimit 100
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>FaxRetryLimit</CODE> directive determines how many times a
|
||||
fax job is retried before it is canceled.</P>
|
||||
<P>The default setting is <CODE>5</CODE>.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="FileDevice">FileDevice</A></H3>
|
||||
@@ -2211,23 +2257,6 @@ Double</CODE> lookups also prevent clients with unregistered addresses
|
||||
absolutely required.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="ImplicitClasses">ImplicitClasses</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
ImplicitClasses On
|
||||
ImplicitClasses Off
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>ImplicitClasses</CODE> directive controls whether implicit
|
||||
classes are created based upon the available network printers and
|
||||
classes. The default setting is <CODE>On</CODE> but is automatically
|
||||
turned <CODE>Off</CODE> if<A HREF="#Browsing"> <CODE>Browsing</CODE></A>
|
||||
is turned <CODE>Off</CODE>.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="ImplicitAnyClasses">ImplicitAnyClasses</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
@@ -2245,6 +2274,23 @@ ImplicitAnyClasses Off
|
||||
enabled for this directive to have any effect.</P>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="ImplicitClasses">ImplicitClasses</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
ImplicitClasses On
|
||||
ImplicitClasses Off
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>ImplicitClasses</CODE> directive controls whether implicit
|
||||
classes are created based upon the available network printers and
|
||||
classes. The default setting is <CODE>On</CODE> but is automatically
|
||||
turned <CODE>Off</CODE> if<A HREF="#Browsing"> <CODE>Browsing</CODE></A>
|
||||
is turned <CODE>Off</CODE>.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="Include">Include</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
@@ -2533,9 +2579,9 @@ MaxClientsPerHost 10
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>MaxClientsPerHost</CODE> directive controls the maximum
|
||||
number of simultaneous clients that will be allowed from a single host
|
||||
by the server. The default is 10 or 1/10th the <CODE>MaxClients</CODE>
|
||||
value, whichever is greater. A value of 0 uses the automatic setting
|
||||
based on the <CODE>MaxClients</CODE> value.</P>
|
||||
by the server. The default is the <CODE>MaxClients</CODE> value. A
|
||||
value of 0 uses the automatic setting based on the <CODE>MaxClients</CODE>
|
||||
value.</P>
|
||||
<P>This directive provides a small measure of protection against Denial
|
||||
of Service attacks from a single host.
|
||||
<!-- NEED 3in -->
|
||||
@@ -2715,25 +2761,6 @@ Port 80
|
||||
*:nnn</CODE>". The default port is 631.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="PreserveJobHistory">PreserveJobHistory</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
PreserveJobHistory On
|
||||
PreserveJobHistory Off
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>PreserveJobHistory</CODE> directive controls whether the
|
||||
history of completed, cancelled, or aborted print jobs is stored on
|
||||
disk.</P>
|
||||
<P>A value of <CODE>On</CODE> (the default) preserves job information
|
||||
until the administrator purges it with the <CODE>cancel</CODE> command.</P>
|
||||
<P>A value of <CODE>Off</CODE> removes the job information as soon as
|
||||
each job is completed, cancelled, or aborted.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="PreserveJobFiles">PreserveJobFiles</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
@@ -2754,6 +2781,25 @@ PreserveJobFiles Off
|
||||
soon as each job is completed, cancelled, or aborted.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="PreserveJobHistory">PreserveJobHistory</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
<UL>
|
||||
<PRE>
|
||||
PreserveJobHistory On
|
||||
PreserveJobHistory Off
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>Description</H4>
|
||||
<P>The <CODE>PreserveJobHistory</CODE> directive controls whether the
|
||||
history of completed, cancelled, or aborted print jobs is stored on
|
||||
disk.</P>
|
||||
<P>A value of <CODE>On</CODE> (the default) preserves job information
|
||||
until the administrator purges it with the <CODE>cancel</CODE> command.</P>
|
||||
<P>A value of <CODE>Off</CODE> removes the job information as soon as
|
||||
each job is completed, cancelled, or aborted.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="Printcap">Printcap</A></H3>
|
||||
<HR>
|
||||
<H4>Examples</H4>
|
||||
@@ -3195,7 +3241,9 @@ ServerName 11.22.33.44
|
||||
<P>The <CODE>ServerName</CODE> directive specifies sets the remote
|
||||
server that is to be used for all client operations. That is, it
|
||||
redirects all client requests to the remote server. The default is to
|
||||
use the local server ("<VAR>localhost</VAR>").</P>
|
||||
use the local server ("<VAR>localhost</VAR>").
|
||||
<!-- NEW PAGE -->
|
||||
</P>
|
||||
<H2><A NAME="7_7">Changing the Printer Configuration</A></H2>
|
||||
<P>The CUPS scheduler (cupsd) uses the<VAR> /etc/cups/printers.conf</VAR>
|
||||
file to store the list of available printers. This file contains only
|
||||
@@ -3414,7 +3462,7 @@ Location Building 3321
|
||||
<CENTER>
|
||||
<TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
|
||||
<TR><TD><B> NOTE:</B>
|
||||
<P>Do not confuse this <CODE>Location</CODE> directive with the one for
|
||||
<P>Do not confuse this <CODE>Location</CODE> directive with the one in
|
||||
cupsd.conf. They are completely different.</P>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
@@ -3517,6 +3565,8 @@ StateMessage Ready to print.
|
||||
<P>This directive must appear inside a<A HREF="#Printer"> <CODE>Printer</CODE>
|
||||
</A> or<A HREF="#DefaultPrinter"> <CODE>DefaultPrinter</CODE></A>
|
||||
directive.</P>
|
||||
|
||||
<!-- NEW PAGE -->
|
||||
<H2><A NAME="7_9">Changing the Classes Configuration</A></H2>
|
||||
<P>The CUPS scheduler (cupsd) uses the<VAR> /etc/cups/classes.conf</VAR>
|
||||
file to store the list of available classes. This file contains only
|
||||
@@ -3727,7 +3777,7 @@ Location Building 3321
|
||||
<CENTER>
|
||||
<TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
|
||||
<TR><TD><B> NOTE:</B>
|
||||
<P>Do not confuse this <CODE>Location</CODE> directive with the one for
|
||||
<P>Do not confuse this <CODE>Location</CODE> directive with the one in
|
||||
cupsd.conf. They are completely different.</P>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
@@ -3768,7 +3818,7 @@ Printer foo@bar
|
||||
<CENTER>
|
||||
<TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
|
||||
<TR><TD><B> NOTE:</B>
|
||||
<P>Do not confuse this <CODE>Printer</CODE> directive with the one for
|
||||
<P>Do not confuse this <CODE>Printer</CODE> directive with the one in
|
||||
printers.conf. They are completely different.</P>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
@@ -4135,9 +4185,9 @@ I [20/May/1999:19:22:24 +0000] Job 2 was cancelled by 'mike'.
|
||||
printer. Each line contains the following information:</P>
|
||||
<UL>
|
||||
<PRE>
|
||||
printer user job-id date-time page-number num-copies job-billing
|
||||
printer user job-id date-time page-number num-copies job-billing hostname
|
||||
|
||||
DeskJet root 2 [20/May/1999:19:21:05 +0000] 1 0 acme-123
|
||||
DeskJet root 2 [20/May/1999:19:21:05 +0000] 1 0 acme-123 localhost
|
||||
</PRE>
|
||||
</UL>
|
||||
<P>The<I> printer</I> field contains the name of the printer that
|
||||
@@ -4158,7 +4208,10 @@ requesting-user-name</CODE> attribute) that submitted this file for
|
||||
will always be 1.</P>
|
||||
<P>The<I> job-billing</I> field contains a copy of the <CODE>job-billing</CODE>
|
||||
attribute provided with the IPP <CODE>create-job</CODE> or <CODE>
|
||||
print-job</CODE> requests or "-" if none was provided.
|
||||
print-job</CODE> requests or "-" if none was provided.</P>
|
||||
<P>The<I> hostname</I> field contains the name of the host (the IPP <CODE>
|
||||
job-originating-host-name</CODE> attribute) that originated the print
|
||||
job.
|
||||
<!-- NEW PAGE -->
|
||||
</P>
|
||||
<H2><A NAME="FILE_TYPING_FILTERING">File Typing and Filtering</A></H2>
|
||||
@@ -4207,6 +4260,8 @@ text/html html htm \
|
||||
8-bit chars (CR, NL, TAB, BS, 32-126, 160-254)</LI>
|
||||
<LI><CODE>string(offset,"string")</CODE> - True if bytes are identical
|
||||
to string</LI>
|
||||
<LI><CODE>istring(offset,"string")</CODE> - True if bytes are identical
|
||||
to string after reducing both strings to lowercase</LI>
|
||||
<LI><CODE>contains(offset,range,"string")</CODE> - True if the range of
|
||||
bytes contains the string</LI>
|
||||
<LI><CODE>char(offset,value)</CODE> - True if byte is identical</LI>
|
||||
@@ -4308,7 +4363,7 @@ myproduct.convs
|
||||
<UL>
|
||||
<PRE>
|
||||
acme-msword.types
|
||||
acme.msword.convs
|
||||
acme-msword.convs
|
||||
</PRE>
|
||||
</UL>
|
||||
<P>This will help to prevent name collisions if you install many
|
||||
@@ -4411,16 +4466,40 @@ server = /usr/lib/cups/daemon/cups-lpd
|
||||
servers and printers. Use a device URI of <CODE>lpd://server/name</CODE>
|
||||
to print to a printer on an LPD server, where <CODE>server</CODE> is
|
||||
the hostname or IP address of the server and <CODE>name</CODE> is the
|
||||
queue name.</P>
|
||||
queue name. Additional options can be specified after the remote queue
|
||||
name to control how the LPD requests are sent - consult<A HREF="#COMMON_NETWORK">
|
||||
Appendix B - Common Network Settings</A> for a complete description.</P>
|
||||
<P>Microsoft Windows NT provides an LPD service under the name "TCP/IP
|
||||
Printing Services". To enable LPD printing on NT, open the "Services"
|
||||
control panel, select the "TCP/IP Printing Services" service, and click
|
||||
on the "Start" button. Any shared printer will then be available via
|
||||
the LPD protocol.</P>
|
||||
<H2><A NAME="8_4">Printing from Mac OS Clients</A></H2>
|
||||
<P>CUPS does not provide Mac OS support directly. However, there are
|
||||
several free and commercial software packages that do.</P>
|
||||
<H3><A NAME="8_4_1">Columbia Appletalk Package (CAP)</A></H3>
|
||||
the LPD protocol.
|
||||
<!-- NEED 4in -->
|
||||
</P>
|
||||
<H2><A NAME="8_4">Printing from Mac OS 10.2 and Later Clients</A></H2>
|
||||
<P>Since Mac OS 10.2 uses CUPS as its printing system, all CUPS printers
|
||||
will be available to the clients automatically.
|
||||
<CENTER>
|
||||
<TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
|
||||
<TR><TD><B>Note:</B>
|
||||
<P>Certain legacy MacOS X applications, including most Adobe
|
||||
applications, produce PICT files with embedded PostScript. Since the
|
||||
filter needed to convert these files to pure PostScript is only
|
||||
available on MacOS X, you need to either use a MacOS X print server or
|
||||
replace the MacOS X IPP backend with the standard CUPS IPP backend. The
|
||||
CUPS IPP backend will detect and locally convert these print files to
|
||||
PostScript prior to sending the job to the server.</P>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
<!-- NEED 4in -->
|
||||
</P>
|
||||
<H2><A NAME="8_5">Printing from Mac OS 10.1 and Earlier Clients</A></H2>
|
||||
<P>CUPS does not provide support for Mac OS 10.1 and earlier directly.
|
||||
However, there are several free and commercial software packages that
|
||||
do.</P>
|
||||
<H3><A NAME="8_5_1">Columbia Appletalk Package (CAP)</A></H3>
|
||||
<P>Because the CAP LaserWriter server (<CODE>lwsrv(8)</CODE>) does not
|
||||
support specification of PPD files, we do not recommend that you use
|
||||
CAP with CUPS. However, you can run the <CODE>lpsrv</CODE> program for
|
||||
@@ -4434,7 +4513,7 @@ lwsrv -n "<I>Name</I>" -p <I>printer</I> -a /usr/lib/adicts -f /usr/li
|
||||
printer, and <CODE>printer</CODE> is the name of the CUPS print queue.
|
||||
<!-- NEED 3in -->
|
||||
</P>
|
||||
<H3><A NAME="8_4_2">XINET KA/Spool</A></H3>
|
||||
<H3><A NAME="8_5_2">XINET KA/Spool</A></H3>
|
||||
<P>To use your system as a print server for Mac OS clients, configure
|
||||
each printer using a <CODE>papserver(8)</CODE> in the<VAR>
|
||||
/usr/adm/appletalk/services</VAR> file, specifying the corresponding
|
||||
@@ -4454,7 +4533,9 @@ lwsrv -n "<I>Name</I>" -p <I>printer</I> -a /usr/lib/adicts -f /usr/li
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<H3><A NAME="8_4_3">NetATalk</A></H3>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="8_5_3">Netatalk</A></H3>
|
||||
<P>To use your system as a print server for Mac OS clients, configure
|
||||
each printer in the<VAR> papd.conf</VAR> file, specifying the
|
||||
corresponding PPD file in the<VAR> /etc/cups/ppd</VAR> directory for
|
||||
@@ -4462,7 +4543,7 @@ lwsrv -n "<I>Name</I>" -p <I>printer</I> -a /usr/lib/adicts -f /usr/li
|
||||
would look like:</P>
|
||||
<UL>
|
||||
<PRE>
|
||||
Printer Description:MyPrinter@MyServer:\
|
||||
Printer Name@Zone Name:\
|
||||
:pr=|/usr/bin/lp -d MyPrinter:\
|
||||
:op=daemon:\
|
||||
:pd=/etc/cups/ppd/MyPrinter.ppd:
|
||||
@@ -4470,12 +4551,21 @@ Printer Description:MyPrinter@MyServer:\
|
||||
</UL>
|
||||
|
||||
<!-- NEED 2in -->
|
||||
<H2><A NAME="8_5">Printing to Mac OS Servers</A></H2>
|
||||
<H2><A NAME="8_6">Printing to Mac OS 10.2 and Later Servers</A></H2>
|
||||
<P>Since MacOS 10.2 and later use CUPS, all you need to do is enable
|
||||
printer sharing to allow CUPS clients to print to a Mac OS server. You
|
||||
will need to download and install ESP Ghostscript on your server to
|
||||
provide PostScript printing support for non-PostScript printers,
|
||||
however.
|
||||
<!-- NEED 2in -->
|
||||
</P>
|
||||
<H2><A NAME="8_7">Printing to Mac OS 10.1 and Earlier Servers</A></H2>
|
||||
<P>CUPS currently does not provide a backend to communicate with a Mac
|
||||
OS server. However, you can write and install a short shell script in
|
||||
the<VAR> /usr/lib/cups/backend</VAR> directory that sends a print file
|
||||
using the appropriate command. The following is a short script that
|
||||
will run the <CODE>papif</CODE> command provided with CAP.</P>
|
||||
OS 10.1 and earlier server. However, you can write and install a short
|
||||
shell script in the<VAR> /usr/lib/cups/backend</VAR> directory that
|
||||
sends a print file using the appropriate command. The following is a
|
||||
short script that will run the <CODE>papif</CODE> command provided with
|
||||
CAP.</P>
|
||||
<P>After copying this script to<VAR> /usr/lib/cups/backend/cap</VAR>,
|
||||
specify a device URI of <CODE>cap://server/printer</CODE> to use this
|
||||
backend with a print queue.
|
||||
@@ -4540,7 +4630,7 @@ exit 0
|
||||
</UL>
|
||||
|
||||
<!-- NEED 2in -->
|
||||
<H2><A NAME="8_6">Printing from Windows Clients</A></H2>
|
||||
<H2><A NAME="8_8">Printing from Windows Clients</A></H2>
|
||||
<P>While CUPS does not provide Windows support directly, the free SAMBA
|
||||
software package does. SAMBA version 2.0.6 is the first release of
|
||||
SAMBA that supports CUPS. You can download SAMBA from:</P>
|
||||
@@ -4559,15 +4649,18 @@ printcap name = cups
|
||||
</UL>
|
||||
<P>That's all there is to it! Remote users will now be able to browse
|
||||
and print to printers on your system.</P>
|
||||
<H3><A NAME="8_6_1">Exporting Printer Drivers</A></H3>
|
||||
<H3><A NAME="8_8_1">Exporting Printer Drivers</A></H3>
|
||||
<P>You can optionally export printer drivers from your CUPS server using
|
||||
the <CODE>cupsaddsmb</CODE> command and the SAMBA 2.2.0 or higher
|
||||
software.</P>
|
||||
<P>Before you can export the printers you must download the current
|
||||
Adobe PostScript printer drivers from the Adobe web site (<A HREF="http://www.adobe.com/">
|
||||
http://www.adobe.com/</A>). Use the free <CODE>unzip</CODE> software to
|
||||
extract the files from the self-extracting ZIP file containing the
|
||||
drivers; you will need the following files:</P>
|
||||
<P>Before you can export the printers you must download the CUPS drivers
|
||||
for Windows from the CUPS site (<A HREF="http://www.cups.org/">
|
||||
http://www.cups.org/</A>) or the current Adobe PostScript printer
|
||||
drivers from the Adobe web site (<A HREF="http://www.adobe.com/">
|
||||
http://www.adobe.com/</A>). If you download the Adobe drivers, use the
|
||||
free <CODE>unzip</CODE> software to extract the files from the
|
||||
self-extracting ZIP file containing the drivers; you will need the
|
||||
following files:</P>
|
||||
<UL>
|
||||
<PRE>
|
||||
ADFONTS.MFM
|
||||
@@ -4639,7 +4732,7 @@ smbpasswd(1)</CODE> command. Otherwise you will not be able to
|
||||
<P>Notice in the above examples that the user <CODE>root</CODE> was used
|
||||
which was defined in the <CODE>write list</CODE> of the<VAR> smb.conf</VAR>
|
||||
file.</P>
|
||||
<H2><A NAME="8_7">Printing to Windows Servers</A></H2>
|
||||
<H2><A NAME="8_9">Printing to Windows Servers</A></H2>
|
||||
<P>CUPS can print to Windows servers in one of two ways. The first way
|
||||
uses the LPD protocol on the CUPS system and the "TCP/IP Printing
|
||||
Services" on the Windows system. You can find out more about this
|
||||
@@ -5819,11 +5912,86 @@ ftp> <B>quit ENTER</B>
|
||||
</PRE>
|
||||
</UL>
|
||||
<P>Your Linksys print server is now ready for use!</P>
|
||||
<H2><A NAME="LPD_OPTIONS">Configuring LPD Printing Options</A></H2>
|
||||
<P>The LPD backend supports several options which are included in the
|
||||
device URI, e.g.:</P>
|
||||
<PRE>
|
||||
lpd://server/name?option1=value1+option2=value2+...+optionN=valueN
|
||||
</PRE>
|
||||
<P>The following table summarizes the options and values that are
|
||||
supported:
|
||||
<!-- NEED 9in -->
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER="1" WIDTH="80%">
|
||||
<TR><TH>Option=Value</TH><TH>Description</TH></TR>
|
||||
<TR><TD>banner=off
|
||||
<BR> banner=no
|
||||
<BR> banner=false</TD><TD VALIGN="TOP">Does not request a LPD banner
|
||||
page for the job. (Default)</TD></TR>
|
||||
<TR><TD>banner=on
|
||||
<BR> banner=yes
|
||||
<BR> banner=true</TD><TD VALIGN="TOP">Requests a LPD banner page for the
|
||||
job.</TD></TR>
|
||||
<TR><TD>format=c
|
||||
<BR> format=d
|
||||
<BR> format=f
|
||||
<BR> format=g
|
||||
<BR> format=l
|
||||
<BR> format=n
|
||||
<BR> format=o
|
||||
<BR> format=p
|
||||
<BR> format=r
|
||||
<BR> format=t
|
||||
<BR> format=v</TD><TD VALIGN="TOP">Specifies the LPD format code of the
|
||||
print job. "format=l" is raw output, while "format=o" is PostScript.
|
||||
(Default is "format=l" for raw output)</TD></TR>
|
||||
<TR><TD>manual_copies=off
|
||||
<BR> manual_copies=no
|
||||
<BR> manual_copies=false</TD><TD VALIGN="TOP">Specifies that the backend
|
||||
should not send multiple copies of a print job in the print data file.</TD>
|
||||
</TR>
|
||||
<TR><TD>manual_copies=on
|
||||
<BR> manual_copies=yes
|
||||
<BR> manual_copies=true</TD><TD VALIGN="TOP">Specifies that the backend
|
||||
should send multiple copies of a print job in the print data file to
|
||||
print more than one copy. (Default)</TD></TR>
|
||||
<TR><TD>order=control,data</TD><TD VALIGN="TOP">Specifies that the LPD
|
||||
control file should be sent before the print data file. (Default)</TD></TR>
|
||||
<TR><TD>order=data,control=</TD><TD VALIGN="TOP">Specifies that the
|
||||
print data file should be sent before the LPD control file.</TD></TR>
|
||||
<TR><TD>reserve=off
|
||||
<BR> reserve=no
|
||||
<BR> reserve=false</TD><TD VALIGN="TOP">Specifies that the backend
|
||||
should not reserve a priviledged source port as required by RFC 1179.
|
||||
(Default)</TD></TR>
|
||||
<TR><TD>reserve=on
|
||||
<BR> reserve=yes
|
||||
<BR> reserve=true</TD><TD VALIGN="TOP">Specifies that the backend should
|
||||
reserve a priviledges source port from 721 to 731 inclusive as required
|
||||
by RFC 1179. This option may cause reduced printing performance when
|
||||
more than 11 LPD printers are defined on the server due to port
|
||||
contention issues.</TD></TR>
|
||||
<TR><TD>sanitize_title=off
|
||||
<BR> sanitize_title=no
|
||||
<BR> sanitize_title=false</TD><TD VALIGN="TOP">Specifies that the
|
||||
backend should not sanitize the job title string. (Default on OSX)</TD></TR>
|
||||
<TR><TD>sanitize_title=on
|
||||
<BR> sanitize_title=yes
|
||||
<BR> sanitize_title=true</TD><TD VALIGN="TOP">Specifies that the backend
|
||||
should sanitize the job title string. (Default on all but OSX)</TD></TR>
|
||||
<TR><TD>timeout=N</TD><TD VALIGN="TOP">Specifies the response timeout
|
||||
for all LPD commands and transactions in seconds. (Default is 300
|
||||
seconds)</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
</P>
|
||||
<H1 ALIGN="RIGHT"><A NAME="PRINTER_DRIVERS">C - Printer Drivers</A></H1>
|
||||
<P>This appendix lists the printer drivers that are provided with CUPS.</P>
|
||||
<H2><A NAME="11_1">Printer Drivers</A></H2>
|
||||
<P>CUPS includes the following printer drivers:</P>
|
||||
<UL>
|
||||
<LI><A HREF="#DYMO">DYMO Label Printer</A>,<VAR> dymo.ppd</VAR></LI>
|
||||
<LI><A HREF="#EPSON9">EPSON 9-pin Dot Matrix</A>,<VAR> epson9.ppd</VAR></LI>
|
||||
<LI><A HREF="#EPSON24">EPSON 24-pin Dot Matrix</A>,<VAR> epson24.ppd</VAR>
|
||||
</LI>
|
||||
@@ -5832,6 +6000,10 @@ ftp> <B>quit ENTER</B>
|
||||
<LI><A HREF="#DESKJET">HP DeskJet</A>,<VAR> deskjet.ppd</VAR></LI>
|
||||
<LI><A HREF="#LASERJET">HP LaserJet</A>,<VAR> laserjet.ppd</VAR></LI>
|
||||
</UL>
|
||||
<H2><A NAME="DYMO">DYMO Label Printer</A></H2>
|
||||
<P>The DYMO Label Printer driver (<VAR>dymo.ppd</VAR>) supports the DYMO
|
||||
LabelWriter 300 series (300/310/315/320/330/330 Turbo) thermal label
|
||||
printers. It provides 136, 203, and 300 DPI output in black only.</P>
|
||||
<H2><A NAME="EPSON9">EPSON 9-pin Dot Matrix</A></H2>
|
||||
<P>The EPSON 9-pin Dot Matrix driver (<VAR>epson9.ppd</VAR>) supports
|
||||
9-pin dot matrix printers that implement the ESC/P command set. It
|
||||
@@ -5921,14 +6093,22 @@ ftp> <B>quit ENTER</B>
|
||||
<TR VALIGN="TOP"><TD>/usr/lib/libcups.so.2
|
||||
<BR> /usr/lib/libcupsimage.so.2</TD><TD>Shared libraries (all others)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/libexec/cups/backend/</TD><TD>Backends for
|
||||
various types of printer connections (*BSD and OSX)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/lib/cups/backend/</TD><TD>Backends for various
|
||||
types of printer connections.</TD></TR>
|
||||
types of printer connections (all others)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/libexec/cups/cgi-bin/</TD><TD>CGI programs for
|
||||
the scheduler (*BSD and OSX)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/lib/cups/cgi-bin/</TD><TD>CGI programs for the
|
||||
scheduler.</TD></TR>
|
||||
scheduler (all others)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/libexec/cups/daemon/</TD><TD>Daemons for
|
||||
polling and LPD support (*BSD and OSX)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/lib/cups/daemon/</TD><TD>Daemons for polling
|
||||
and LPD support.</TD></TR>
|
||||
and LPD support (all others)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/libexec/cups/filter/</TD><TD>Filters for
|
||||
various types of files (*BSD and OSX)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/lib/cups/filter/</TD><TD>Filters for various
|
||||
types of files.</TD></TR>
|
||||
types of files (all others)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/lib/locale/</TD><TD>The location of
|
||||
language-specific message files. (System V)</TD></TR>
|
||||
<TR VALIGN="TOP"><TD>/usr/lib/nls/msg/</TD><TD>The location of
|
||||
@@ -5984,8 +6164,8 @@ ftp> <B>quit ENTER</B>
|
||||
<P>Commercial support for CUPS is available from Easy Software Products.
|
||||
For more information please contact us at:</P>
|
||||
<UL>
|
||||
<LI>WWW:<A HREF="http://www.easysw.com"> <CODE>http://www.easysw.com</CODE>
|
||||
</A></LI>
|
||||
<LI>WWW:<A HREF="http://www.easysw.com/cups/"> <CODE>
|
||||
http://www.easysw.com/cups/</CODE></A></LI>
|
||||
<LI>EMail:<A HREF="mailto:info@easysw.com"> info@easysw.com</A></LI>
|
||||
<LI>Telephone (M-F, 9-5 EST): +1.301.373.9600</LI>
|
||||
</UL>
|
||||
|
||||
Arquivo binário não exibido.
+386
-138
@@ -453,7 +453,8 @@ in <A HREF="#PRINTER_DRIVERS">Appendix C, "Printer Drivers"</A>.
|
||||
<P>For a dot matrix printer connected to the serial port this would might look like:
|
||||
|
||||
<UL><PRE>
|
||||
<B>/usr/sbin/lpadmin -p DotMatrix -E -v serial:/dev/ttyS0?baud=9600+size=8+parity=none+flow=soft deskjet.ppd ENTER</B>
|
||||
<B>/usr/sbin/lpadmin -p DotMatrix -E -m epson9.ppd \
|
||||
-v serial:/dev/ttyS0?baud=9600+size=8+parity=none+flow=soft <I>ENTER</I></B>
|
||||
</PRE></UL>
|
||||
|
||||
<P>Here you specify the serial port (e.g. S0,S1, d0, d1), baud rate
|
||||
@@ -624,8 +625,10 @@ quotas:</P>
|
||||
|
||||
<UL>
|
||||
<PRE>
|
||||
<B>/usr/sbin/lpadmin -p <I>printer</I> -o job-quota-period=604800 -o job-k-limit=1024 <I>ENTER</I></B>
|
||||
<B>/usr/sbin/lpadmin -p <I>printer</I> -o job-quota-period=604800 -o job-page-limit=100 <I>ENTER</I></B>
|
||||
<B>/usr/sbin/lpadmin -p <I>printer</I> -o job-quota-period=604800 \
|
||||
-o job-k-limit=1024 <I>ENTER</I></B>
|
||||
<B>/usr/sbin/lpadmin -p <I>printer</I> -o job-quota-period=604800 \
|
||||
-o job-page-limit=100 <I>ENTER</I></B>
|
||||
</PRE>
|
||||
</UL>
|
||||
|
||||
@@ -944,6 +947,7 @@ BrowseRelay 192.168.1 192.168.3.255 ENTER
|
||||
BrowseRelay 192.168.2 192.168.3.255 ENTER
|
||||
</B></PRE></UL>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H2>Load Balancing and Failsafe Operation</H2>
|
||||
|
||||
<P>When using server polling or broadcasting, CUPS clients can
|
||||
@@ -952,11 +956,17 @@ single <I>implicit class</I> queue. Clients assume that printers with
|
||||
the same name on multiple servers are in fact the same printer or type
|
||||
of printer being served by multiple machines.</P>
|
||||
|
||||
<P>If you have two printers, LaserJet@ServerA and LaserJet@ServerB, a
|
||||
third implicit class called <I>LaserJet</I> will be created
|
||||
automatically on the client that refers to both printers. If the client
|
||||
also has a local printer with the name LaserJet then an implicit class
|
||||
named <I>AnyLaserJet</I> will be created instead.</P>
|
||||
<P>If you have two printers, LaserJet@ServerA and
|
||||
LaserJet@ServerB, a third implicit class called <I>LaserJet</I>
|
||||
will be created automatically on the client that refers to both
|
||||
printers. If the client also has a local printer with the name
|
||||
LaserJet and the <A
|
||||
HREF="#ImplicitAnyClasses"><CODE>ImplicitAnyClasses</CODE></A>
|
||||
directive is enabled, then an implicit class named
|
||||
<I>AnyLaserJet</I> will be created instead. Otherwise, the local
|
||||
printer will prevent the creation of an implicit class, since
|
||||
CUPS will assume that the local printer will always be more
|
||||
available than a remote one.</P>
|
||||
|
||||
<P>The client will alternate between servers and automatically stop
|
||||
sending jobs to a server if it goes down, providing a load-balancing
|
||||
@@ -965,8 +975,11 @@ effect and fail-safe operation with automatic switchover.</P>
|
||||
<CENTER><TABLE BGCOLOR="#cccccc" BORDER="1" CELLPADDING="5" WIDTH="80%">
|
||||
<TR>
|
||||
<TD><B> NOTE:</B>
|
||||
<P>Note that implicit classes (<A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A>)
|
||||
are enabled by default.</P>
|
||||
<P>Note that implicit classes (<A
|
||||
HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A>)
|
||||
are enabled and implicit "any" classes (<A
|
||||
HREF="#ImplicitAnyClasses"><CODE>ImplicitAnyClasses</CODE></A>)
|
||||
are disabled by default.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
@@ -1088,6 +1101,7 @@ determine how the server operates:
|
||||
<LI><A HREF="#Deny"><CODE>Deny</CODE></A>
|
||||
<LI><A HREF="#DocumentRoot"><CODE>DocumentRoot</CODE></A>
|
||||
<LI><A HREF="#Encryption"><CODE>Encryption</CODE></A>
|
||||
<LI><A HREF="#ErrorLog"><CODE>ErrorLog</CODE></A>
|
||||
|
||||
</TD>
|
||||
<TD VALIGN="TOP">
|
||||
@@ -1095,7 +1109,8 @@ determine how the server operates:
|
||||
</TD>
|
||||
<TD VALIGN="TOP">
|
||||
|
||||
<LI><A HREF="#ErrorLog"><CODE>ErrorLog</CODE></A>
|
||||
<LI><A HREF="#FaxRetryInterval"><CODE>FaxRetryInterval</CODE></A>
|
||||
<LI><A HREF="#FaxRetryLimit"><CODE>FaxRetryLimit</CODE></A>
|
||||
<LI><A HREF="#FileDevice"><CODE>FileDevice</CODE></A>
|
||||
<LI><A HREF="#FilterLimit"><CODE>FilterLimit</CODE></A>
|
||||
<LI><A HREF="#FilterNice"><CODE>FilterNice</CODE></A>
|
||||
@@ -1103,8 +1118,8 @@ determine how the server operates:
|
||||
<LI><A HREF="#Group"><CODE>Group</CODE></A>
|
||||
<LI><A HREF="#HideImplicitMembers"><CODE>HideImplicitMembers</CODE></A>
|
||||
<LI><A HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A>
|
||||
<LI><A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A>
|
||||
<LI><A HREF="#ImplicitAnyClasses"><CODE>ImplicitAnyClasses</CODE></A>
|
||||
<LI><A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A>
|
||||
<LI><A HREF="#Include"><CODE>Include</CODE></A>
|
||||
<LI><A HREF="#KeepAliveTimeout"><CODE>KeepAliveTimeout</CODE></A>
|
||||
<LI><A HREF="#KeepAlive"><CODE>KeepAlive</CODE></A>
|
||||
@@ -1122,9 +1137,6 @@ determine how the server operates:
|
||||
<LI><A HREF="#MaxJobsPerPrinter"><CODE>MaxJobsPerPrinter</CODE></A>
|
||||
<LI><A HREF="#MaxJobsPerUser"><CODE>MaxJobsPerUser</CODE></A>
|
||||
<LI><A HREF="#MaxLogSize"><CODE>MaxLogSize</CODE></A>
|
||||
<LI><A HREF="#MaxRequestSize"><CODE>MaxRequestSize</CODE></A>
|
||||
<LI><A HREF="#Order"><CODE>Order</CODE></A>
|
||||
<LI><A HREF="#PageLog"><CODE>PageLog</CODE></A>
|
||||
|
||||
</TD>
|
||||
<TD VALIGN="TOP">
|
||||
@@ -1132,6 +1144,9 @@ determine how the server operates:
|
||||
</TD>
|
||||
<TD VALIGN="TOP">
|
||||
|
||||
<LI><A HREF="#MaxRequestSize"><CODE>MaxRequestSize</CODE></A>
|
||||
<LI><A HREF="#Order"><CODE>Order</CODE></A>
|
||||
<LI><A HREF="#PageLog"><CODE>PageLog</CODE></A>
|
||||
<LI><A HREF="#Port"><CODE>Port</CODE></A>
|
||||
<LI><A HREF="#PreserveJobFiles"><CODE>PreserveJobFiles</CODE></A>
|
||||
<LI><A HREF="#PreserveJobHistory"><CODE>PreserveJobHistory</CODE></A>
|
||||
@@ -1320,7 +1335,7 @@ AuthGroupName lp
|
||||
<P>The <CODE>AuthGroupName</CODE> directive must appear inside a
|
||||
<A HREF="#Location"><CODE>Location</CODE></A> directive.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<!-- NEED 4in -->
|
||||
<H3><A NAME="AuthType">AuthType</A></H3>
|
||||
<HR>
|
||||
|
||||
@@ -1491,6 +1506,29 @@ interfaces. The <CODE>@IF(name)</CODE> name will block browse
|
||||
data from the named interface.
|
||||
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="BrowseInterval">BrowseInterval</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
BrowseInterval 0
|
||||
BrowseInterval 30
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>BrowseInterval</CODE> directive specifies the maximum amount of
|
||||
time between browsing updates. Specifying a value of 0 seconds disables
|
||||
outgoing browse updates but allows a server to receive printer information
|
||||
from other hosts.
|
||||
|
||||
<P>The <CODE>BrowseInterval</CODE> value should always be less than the
|
||||
<A HREF="#BrowseTimeout"><CODE>BrowseTimeout</CODE></A> value. Otherwise
|
||||
printers and classes will disappear from client systems between updates.
|
||||
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="BrowseOrder">BrowseOrder</A></H3>
|
||||
<HR>
|
||||
@@ -1517,28 +1555,6 @@ processing. The default order is <CODE>deny,allow</CODE>:
|
||||
|
||||
</UL>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="BrowseInterval">BrowseInterval</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
BrowseInterval 0
|
||||
BrowseInterval 30
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>BrowseInterval</CODE> directive specifies the maximum amount of
|
||||
time between browsing updates. Specifying a value of 0 seconds disables
|
||||
outgoing browse updates but allows a server to receive printer information
|
||||
from other hosts.
|
||||
|
||||
<P>The <CODE>BrowseInterval</CODE> value should always be less than the
|
||||
<A HREF="#BrowseTimeout"><CODE>BrowseTimeout</CODE></A> value. Otherwise
|
||||
printers and classes will disappear from client systems between updates.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="BrowsePoll">BrowsePoll</A></H3>
|
||||
<HR>
|
||||
@@ -1947,7 +1963,6 @@ the web content by providing subdirectories for each language needed.
|
||||
Encryption Never
|
||||
Encryption IfRequested
|
||||
Encryption Required
|
||||
Encryption Always
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
@@ -1983,6 +1998,45 @@ default error log file is <VAR>/var/log/cups/error_log</VAR>.
|
||||
to the system log instead of a plain file.
|
||||
|
||||
|
||||
<!-- NEED 2in -->
|
||||
<H3><A NAME="FaxRetryInterval">FaxRetryInterval</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
FaxRetryInterval 300
|
||||
FaxRetryInterval 30
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>FaxRetryInterval</CODE> directive determines how
|
||||
often fax print jobs are retried when the backend is unable to
|
||||
send the fax. The value is the number of seconds between tries.
|
||||
|
||||
<P>The default setting is <CODE>300</CODE> seconds.
|
||||
|
||||
|
||||
<!-- NEED 2in -->
|
||||
<H3><A NAME="FaxRetryLimit">FaxRetryLimit</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
FaxRetryLimit 5
|
||||
FaxRetryLimit 100
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>FaxRetryLimit</CODE> directive determines how many
|
||||
times a fax job is retried before it is canceled.
|
||||
|
||||
<P>The default setting is <CODE>5</CODE>.
|
||||
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="FileDevice">FileDevice</A></H3>
|
||||
<HR>
|
||||
@@ -2156,25 +2210,6 @@ performance problems with hostname lookups. Set this option to
|
||||
<CODE>On</CODE> or <CODE>Double</CODE> only if absolutely
|
||||
required.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="ImplicitClasses">ImplicitClasses</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
ImplicitClasses On
|
||||
ImplicitClasses Off
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>ImplicitClasses</CODE> directive controls whether implicit
|
||||
classes are created based upon the available network printers and classes.
|
||||
The default setting is <CODE>On</CODE> but is automatically turned
|
||||
<CODE>Off</CODE> if <A HREF="#Browsing"><CODE>Browsing</CODE></A> is
|
||||
turned <CODE>Off</CODE>.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="ImplicitAnyClasses">ImplicitAnyClasses</A></H3>
|
||||
<HR>
|
||||
@@ -2196,6 +2231,25 @@ setting is <CODE>Off</CODE>.</P>
|
||||
<P><A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A>
|
||||
must be enabled for this directive to have any effect.</P>
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="ImplicitClasses">ImplicitClasses</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
ImplicitClasses On
|
||||
ImplicitClasses Off
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>ImplicitClasses</CODE> directive controls whether implicit
|
||||
classes are created based upon the available network printers and classes.
|
||||
The default setting is <CODE>On</CODE> but is automatically turned
|
||||
<CODE>Off</CODE> if <A HREF="#Browsing"><CODE>Browsing</CODE></A> is
|
||||
turned <CODE>Off</CODE>.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="Include">Include</A></H3>
|
||||
<HR>
|
||||
@@ -2525,10 +2579,9 @@ MaxClientsPerHost 10
|
||||
|
||||
<P>The <CODE>MaxClientsPerHost</CODE> directive controls the
|
||||
maximum number of simultaneous clients that will be allowed from
|
||||
a single host by the server. The default is 10 or 1/10th the
|
||||
<CODE>MaxClients</CODE> value, whichever is greater. A value of
|
||||
0 uses the automatic setting based on the
|
||||
<CODE>MaxClients</CODE> value.</P>
|
||||
a single host by the server. The default is the
|
||||
<CODE>MaxClients</CODE> value. A value of 0 uses the automatic
|
||||
setting based on the <CODE>MaxClients</CODE> value.</P>
|
||||
|
||||
<P>This directive provides a small measure of protection against
|
||||
Denial of Service attacks from a single host.
|
||||
@@ -2743,30 +2796,6 @@ on. Multiple <CODE>Port</CODE> lines can be specified to listen
|
||||
on multiple ports. The <CODE>Port</CODE> directive is equivalent
|
||||
to "<CODE>Listen *:nnn</CODE>". The default port is 631.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="PreserveJobHistory">PreserveJobHistory</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
PreserveJobHistory On
|
||||
PreserveJobHistory Off
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>PreserveJobHistory</CODE> directive controls whether
|
||||
the history of completed, cancelled, or aborted print jobs is stored
|
||||
on disk.
|
||||
|
||||
<P>A value of <CODE>On</CODE> (the default) preserves job information
|
||||
until the administrator purges it with the <CODE>cancel</CODE>
|
||||
command.
|
||||
|
||||
<P>A value of <CODE>Off</CODE> removes the job information as soon as
|
||||
each job is completed, cancelled, or aborted.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="PreserveJobFiles">PreserveJobFiles</A></H3>
|
||||
<HR>
|
||||
@@ -2791,6 +2820,30 @@ can be restarted (and reprinted) as desired until they are purged.
|
||||
<P>A value of <CODE>Off</CODE> (the default) removes the job files as
|
||||
soon as each job is completed, cancelled, or aborted.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="PreserveJobHistory">PreserveJobHistory</A></H3>
|
||||
<HR>
|
||||
|
||||
<H4>Examples</H4>
|
||||
|
||||
<UL><PRE>
|
||||
PreserveJobHistory On
|
||||
PreserveJobHistory Off
|
||||
</PRE></UL>
|
||||
|
||||
<H4>Description</H4>
|
||||
|
||||
<P>The <CODE>PreserveJobHistory</CODE> directive controls whether
|
||||
the history of completed, cancelled, or aborted print jobs is stored
|
||||
on disk.
|
||||
|
||||
<P>A value of <CODE>On</CODE> (the default) preserves job information
|
||||
until the administrator purges it with the <CODE>cancel</CODE>
|
||||
command.
|
||||
|
||||
<P>A value of <CODE>Off</CODE> removes the job information as soon as
|
||||
each job is completed, cancelled, or aborted.
|
||||
|
||||
<!-- NEED 3in -->
|
||||
<H3><A NAME="Printcap">Printcap</A></H3>
|
||||
<HR>
|
||||
@@ -3308,7 +3361,7 @@ for all client operations. That is, it redirects all client requests to the rem
|
||||
The default is to use the local server ("<VAR>localhost</VAR>").
|
||||
|
||||
|
||||
|
||||
<!-- NEW PAGE -->
|
||||
<H2>Changing the Printer Configuration</H2>
|
||||
|
||||
<P>The CUPS scheduler (cupsd) uses the <VAR>/etc/cups/printers.conf</VAR> file
|
||||
@@ -3568,7 +3621,7 @@ Location Building 3321
|
||||
<B>NOTE:</B>
|
||||
|
||||
<P>Do not confuse this <CODE>Location</CODE> directive with the
|
||||
one for cupsd.conf. They are completely different.
|
||||
one in cupsd.conf. They are completely different.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
@@ -3681,7 +3734,7 @@ The following are some example messages:</P>
|
||||
or <A HREF="#DefaultPrinter"><CODE>DefaultPrinter</CODE></A> directive.</P>
|
||||
|
||||
|
||||
|
||||
<!-- NEW PAGE -->
|
||||
<H2>Changing the Classes Configuration</H2>
|
||||
|
||||
<P>The CUPS scheduler (cupsd) uses the <VAR>/etc/cups/classes.conf</VAR> file
|
||||
@@ -3940,7 +3993,7 @@ Location Building 3321
|
||||
<B>NOTE:</B>
|
||||
|
||||
<P>Do not confuse this <CODE>Location</CODE> directive with the
|
||||
one for cupsd.conf. They are completely different.
|
||||
one in cupsd.conf. They are completely different.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
@@ -3990,7 +4043,7 @@ It can be added by the <CODE>lpadmin -c</CODE> command.</P>
|
||||
<B>NOTE:</B>
|
||||
|
||||
<P>Do not confuse this <CODE>Printer</CODE> directive with the
|
||||
one for printers.conf. They are completely different.
|
||||
one in printers.conf. They are completely different.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
@@ -4440,9 +4493,9 @@ field in the <VAR>access_log</VAR> file.
|
||||
Each line contains the following information:
|
||||
|
||||
<UL><PRE>
|
||||
printer user job-id date-time page-number num-copies job-billing
|
||||
printer user job-id date-time page-number num-copies job-billing hostname
|
||||
|
||||
DeskJet root 2 [20/May/1999:19:21:05 +0000] 1 0 acme-123
|
||||
DeskJet root 2 [20/May/1999:19:21:05 +0000] 1 0 acme-123 localhost
|
||||
</PRE></UL>
|
||||
|
||||
<P>The <I>printer</I> field contains the name of the printer that
|
||||
@@ -4470,6 +4523,10 @@ produce copies on their own, the <I>num-pages</I> field will always be 1.
|
||||
<CODE>create-job</CODE> or <CODE>print-job</CODE> requests or "-" if none
|
||||
was provided.
|
||||
|
||||
<P>The <I>hostname</I> field contains the name of the host (the
|
||||
IPP <CODE>job-originating-host-name</CODE> attribute) that
|
||||
originated the print job.
|
||||
|
||||
<!-- NEW PAGE -->
|
||||
<H2><A NAME="FILE_TYPING_FILTERING">File Typing and Filtering</A></H2>
|
||||
|
||||
@@ -4534,6 +4591,9 @@ printable 8-bit chars (CR, NL, TAB, BS, 32-126, 160-254)
|
||||
<LI><CODE>string(offset,"string")</CODE> - True if bytes are
|
||||
identical to string
|
||||
|
||||
<LI><CODE>istring(offset,"string")</CODE> - True if bytes are
|
||||
identical to string after reducing both strings to lowercase
|
||||
|
||||
<LI><CODE>contains(offset,range,"string")</CODE> - True if the
|
||||
range of bytes contains the string
|
||||
|
||||
@@ -4647,7 +4707,7 @@ add the company or author name:
|
||||
|
||||
<UL><PRE>
|
||||
acme-msword.types
|
||||
acme.msword.convs
|
||||
acme-msword.convs
|
||||
</PRE></UL>
|
||||
|
||||
<P>This will help to prevent name collisions if you install many
|
||||
@@ -4765,11 +4825,15 @@ server.
|
||||
|
||||
<H2>Printing to LPD Servers</H2>
|
||||
|
||||
<P>CUPS provides the <CODE>lpd</CODE> backend for printing to LPD-based
|
||||
servers and printers. Use a device URI of <CODE>lpd://server/name</CODE>
|
||||
to print to a printer on an LPD server, where <CODE>server</CODE>
|
||||
is the hostname or IP address of the server and <CODE>name</CODE> is
|
||||
the queue name.
|
||||
<P>CUPS provides the <CODE>lpd</CODE> backend for printing to
|
||||
LPD-based servers and printers. Use a device URI of
|
||||
<CODE>lpd://server/name</CODE> to print to a printer on an LPD
|
||||
server, where <CODE>server</CODE> is the hostname or IP address
|
||||
of the server and <CODE>name</CODE> is the queue name.
|
||||
Additional options can be specified after the remote queue name
|
||||
to control how the LPD requests are sent - consult <A
|
||||
HREF="#COMMON_NETWORK">Appendix B - Common Network Settings</A>
|
||||
for a complete description.
|
||||
|
||||
<P>Microsoft Windows NT provides an LPD service under the name "TCP/IP
|
||||
Printing Services". To enable LPD printing on NT, open the "Services"
|
||||
@@ -4777,10 +4841,37 @@ control panel, select the "TCP/IP Printing Services" service, and click
|
||||
on the "Start" button. Any shared printer will then be available via
|
||||
the LPD protocol.
|
||||
|
||||
<H2>Printing from Mac OS Clients</H2>
|
||||
|
||||
<P>CUPS does not provide Mac OS support directly. However, there are several
|
||||
free and commercial software packages that do.
|
||||
<!-- NEED 4in -->
|
||||
|
||||
<H2>Printing from Mac OS 10.2 and Later Clients</H2>
|
||||
|
||||
<P>Since Mac OS 10.2 uses CUPS as its printing system, all CUPS
|
||||
printers will be available to the clients automatically.
|
||||
|
||||
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" BGCOLOR="#cccccc">
|
||||
<TR>
|
||||
<TD><B>Note:</B>
|
||||
|
||||
<P>Certain legacy MacOS X applications, including most Adobe
|
||||
applications, produce PICT files with embedded PostScript. Since
|
||||
the filter needed to convert these files to pure PostScript is
|
||||
only available on MacOS X, you need to either use a MacOS X
|
||||
print server or replace the MacOS X IPP backend with the
|
||||
standard CUPS IPP backend. The CUPS IPP backend will detect and
|
||||
locally convert these print files to PostScript prior to sending
|
||||
the job to the server.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
|
||||
|
||||
<!-- NEED 4in -->
|
||||
<H2>Printing from Mac OS 10.1 and Earlier Clients</H2>
|
||||
|
||||
<P>CUPS does not provide support for Mac OS 10.1 and earlier
|
||||
directly. However, there are several free and commercial
|
||||
software packages that do.
|
||||
|
||||
<H3>Columbia Appletalk Package (CAP)</H3>
|
||||
|
||||
@@ -4822,7 +4913,8 @@ character.
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
|
||||
<H3>NetATalk</H3>
|
||||
<!-- NEED 3in -->
|
||||
<H3>Netatalk</H3>
|
||||
|
||||
<P>To use your system as a print server for Mac OS clients,
|
||||
configure each printer in the <VAR>papd.conf</VAR> file, specifying the
|
||||
@@ -4831,25 +4923,38 @@ each printer. For a printer named <CODE>MyPrinter</CODE> the entry
|
||||
would look like:
|
||||
|
||||
<UL><PRE>
|
||||
Printer Description:MyPrinter@MyServer:\
|
||||
Printer Name@Zone Name:\
|
||||
:pr=|/usr/bin/lp -d MyPrinter:\
|
||||
:op=daemon:\
|
||||
:pd=/etc/cups/ppd/MyPrinter.ppd:
|
||||
</PRE></UL>
|
||||
|
||||
|
||||
<!-- NEED 2in -->
|
||||
<H2>Printing to Mac OS 10.2 and Later Servers</H2>
|
||||
|
||||
<H2>Printing to Mac OS Servers</H2>
|
||||
<P>Since MacOS 10.2 and later use CUPS, all you need to do is
|
||||
enable printer sharing to allow CUPS clients to print to a Mac
|
||||
OS server. You will need to download and install ESP Ghostscript
|
||||
on your server to provide PostScript printing support for
|
||||
non-PostScript printers, however.
|
||||
|
||||
<P>CUPS currently does not provide a backend to communicate with a Mac OS
|
||||
server. However, you can write and install a short shell script
|
||||
in the <VAR>/usr/lib/cups/backend</VAR> directory that sends a print file
|
||||
using the appropriate command. The following is a short script that will
|
||||
run the <CODE>papif</CODE> command provided with CAP.
|
||||
|
||||
<P>After copying this script to <VAR>/usr/lib/cups/backend/cap</VAR>,
|
||||
specify a device URI of <CODE>cap://server/printer</CODE> to use this
|
||||
backend with a print queue.
|
||||
<!-- NEED 2in -->
|
||||
<H2>Printing to Mac OS 10.1 and Earlier Servers</H2>
|
||||
|
||||
<P>CUPS currently does not provide a backend to communicate with
|
||||
a Mac OS 10.1 and earlier server. However, you can write and
|
||||
install a short shell script in the
|
||||
<VAR>/usr/lib/cups/backend</VAR> directory that sends a print
|
||||
file using the appropriate command. The following is a short
|
||||
script that will run the <CODE>papif</CODE> command provided
|
||||
with CAP.
|
||||
|
||||
<P>After copying this script to
|
||||
<VAR>/usr/lib/cups/backend/cap</VAR>, specify a device URI of
|
||||
<CODE>cap://server/printer</CODE> to use this backend with a
|
||||
print queue.
|
||||
|
||||
<!-- NEED 8in -->
|
||||
<UL>
|
||||
@@ -4937,12 +5042,14 @@ print to printers on your system.
|
||||
server using the <CODE>cupsaddsmb</CODE> command and the SAMBA
|
||||
2.2.0 or higher software.
|
||||
|
||||
<P>Before you can export the printers you must download the
|
||||
current Adobe PostScript printer drivers from the Adobe web
|
||||
site (<A HREF="http://www.adobe.com/">http://www.adobe.com/</A>).
|
||||
Use the free <CODE>unzip</CODE> software to extract the files
|
||||
from the self-extracting ZIP file containing the drivers; you
|
||||
will need the following files:
|
||||
<P>Before you can export the printers you must download the CUPS
|
||||
drivers for Windows from the CUPS site (<A
|
||||
HREF="http://www.cups.org/">http://www.cups.org/</A>) or the
|
||||
current Adobe PostScript printer drivers from the Adobe web site
|
||||
(<A HREF="http://www.adobe.com/">http://www.adobe.com/</A>). If
|
||||
you download the Adobe drivers, use the free <CODE>unzip</CODE>
|
||||
software to extract the files from the self-extracting ZIP file
|
||||
containing the drivers; you will need the following files:
|
||||
|
||||
<UL><PRE>
|
||||
ADFONTS.MFM
|
||||
@@ -4960,8 +5067,9 @@ PSMON.DLL
|
||||
directory - you may need to rename some of the files so the
|
||||
filenames are all UPPERCASE.
|
||||
|
||||
<P>Next, configure SAMBA (via the <VAR>smb.conf</VAR> file) to support printing
|
||||
through CUPS and provide a printer driver download share, as follows:
|
||||
<P>Next, configure SAMBA (via the <VAR>smb.conf</VAR> file) to
|
||||
support printing through CUPS and provide a printer driver
|
||||
download share, as follows:
|
||||
|
||||
<UL><PRE>
|
||||
[global]
|
||||
@@ -4988,14 +5096,16 @@ read only = yes
|
||||
write list = root
|
||||
</PRE></UL>
|
||||
|
||||
<P>This configuration assumes a FHS-compliant installation of SAMBA;
|
||||
adjust the [printers] and [print$] share paths accordingly on your system as needed.
|
||||
That is, the directory for your printer drivers can be anywhere on the
|
||||
system; just make sure it is writable by the users specified by
|
||||
the <CODE>write list</CODE> directive plus readable and executable by all users.
|
||||
Also, make sure that you have SAMBA passwords defined for each user in the
|
||||
<CODE>write list</CODE> using SAMBA's <CODE>smbpasswd(1)</CODE> command.
|
||||
Otherwise you will not be able to authenticate.
|
||||
<P>This configuration assumes a FHS-compliant installation of
|
||||
SAMBA; adjust the [printers] and [print$] share paths
|
||||
accordingly on your system as needed. That is, the directory for
|
||||
your printer drivers can be anywhere on the system; just make
|
||||
sure it is writable by the users specified by the <CODE>write
|
||||
list</CODE> directive plus readable and executable by all users.
|
||||
Also, make sure that you have SAMBA passwords defined for each
|
||||
user in the <CODE>write list</CODE> using SAMBA's
|
||||
<CODE>smbpasswd(1)</CODE> command. Otherwise you will not be
|
||||
able to authenticate.
|
||||
|
||||
<P>Finally, run the <CODE>cupsaddsmb</CODE> command to export
|
||||
the printer drivers for one or more queues:
|
||||
@@ -5004,7 +5114,6 @@ the printer drivers for one or more queues:
|
||||
<B>cupsaddsmb -U root printer1 ... printerN <I>ENTER</I></B>
|
||||
</PRE></UL>
|
||||
|
||||
|
||||
<P>Running <CODE>cupsaddsmb</CODE> with the <CODE>-a</CODE> option
|
||||
will export all printers:
|
||||
|
||||
@@ -5012,8 +5121,9 @@ will export all printers:
|
||||
<B>cupsaddsmb -U root -a <I>ENTER</I></B>
|
||||
</PRE></UL>
|
||||
|
||||
<P>Notice in the above examples that the user <CODE>root</CODE> was used
|
||||
which was defined in the <CODE>write list</CODE> of the <VAR>smb.conf</VAR> file.
|
||||
<P>Notice in the above examples that the user <CODE>root</CODE>
|
||||
was used which was defined in the <CODE>write list</CODE> of
|
||||
the <VAR>smb.conf</VAR> file.
|
||||
|
||||
<H2>Printing to Windows Servers</H2>
|
||||
|
||||
@@ -5487,6 +5597,119 @@ ftp> <B>quit ENTER</B>
|
||||
|
||||
<P>Your Linksys print server is now ready for use!
|
||||
|
||||
<H2><A NAME="LPD_OPTIONS">Configuring LPD Printing Options</A></H2>
|
||||
|
||||
<P>The LPD backend supports several options which are included in the
|
||||
device URI, e.g.:
|
||||
|
||||
<PRE>
|
||||
lpd://server/name?option1=value1+option2=value2+...+optionN=valueN
|
||||
</PRE>
|
||||
|
||||
<P>The following table summarizes the options and values that are supported:
|
||||
|
||||
<!-- NEED 9in -->
|
||||
<CENTER><TABLE BORDER="1" WIDTH="80%">
|
||||
<TR>
|
||||
<TH>Option=Value</TH>
|
||||
<TH>Description</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>banner=off<BR>
|
||||
banner=no<BR>
|
||||
banner=false</TD>
|
||||
<TD VALIGN="TOP">Does not request a LPD banner page for
|
||||
the job. (Default)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>banner=on<BR>
|
||||
banner=yes<BR>
|
||||
banner=true</TD>
|
||||
<TD VALIGN="TOP">Requests a LPD banner page for the
|
||||
job.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>format=c<BR>
|
||||
format=d<BR>
|
||||
format=f<BR>
|
||||
format=g<BR>
|
||||
format=l<BR>
|
||||
format=n<BR>
|
||||
format=o<BR>
|
||||
format=p<BR>
|
||||
format=r<BR>
|
||||
format=t<BR>
|
||||
format=v</TD>
|
||||
<TD VALIGN="TOP">Specifies the LPD format code of the
|
||||
print job. "format=l" is raw output, while "format=o" is PostScript.
|
||||
(Default is "format=l" for raw output)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>manual_copies=off<BR>
|
||||
manual_copies=no<BR>
|
||||
manual_copies=false</TD>
|
||||
<TD VALIGN="TOP">Specifies that the backend should not
|
||||
send multiple copies of a print job in the print data
|
||||
file.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>manual_copies=on<BR>
|
||||
manual_copies=yes<BR>
|
||||
manual_copies=true</TD>
|
||||
<TD VALIGN="TOP">Specifies that the backend should send
|
||||
multiple copies of a print job in the print data file to
|
||||
print more than one copy. (Default)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>order=control,data</TD>
|
||||
<TD VALIGN="TOP">Specifies that the LPD control file
|
||||
should be sent before the print data file.
|
||||
(Default)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>order=data,control=</TD>
|
||||
<TD VALIGN="TOP">Specifies that the print data file
|
||||
should be sent before the LPD control file.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>reserve=off<BR>
|
||||
reserve=no<BR>
|
||||
reserve=false</TD>
|
||||
<TD VALIGN="TOP">Specifies that the backend should not
|
||||
reserve a priviledged source port as required by RFC
|
||||
1179. (Default)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>reserve=on<BR>
|
||||
reserve=yes<BR>
|
||||
reserve=true</TD>
|
||||
<TD VALIGN="TOP">Specifies that the backend should
|
||||
reserve a priviledges source port from 721 to 731
|
||||
inclusive as required by RFC 1179. This option may cause
|
||||
reduced printing performance when more than 11 LPD
|
||||
printers are defined on the server due to port
|
||||
contention issues.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>sanitize_title=off<BR>
|
||||
sanitize_title=no<BR>
|
||||
sanitize_title=false</TD>
|
||||
<TD VALIGN="TOP">Specifies that the backend should not
|
||||
sanitize the job title string. (Default on OSX)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>sanitize_title=on<BR>
|
||||
sanitize_title=yes<BR>
|
||||
sanitize_title=true</TD>
|
||||
<TD VALIGN="TOP">Specifies that the backend should
|
||||
sanitize the job title string. (Default on all but OSX)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>timeout=N</TD>
|
||||
<TD VALIGN="TOP">Specifies the response timeout for all LPD
|
||||
commands and transactions in seconds. (Default is 300 seconds)</TD>
|
||||
</TR>
|
||||
</TABLE></CENTER>
|
||||
|
||||
<H1 ALIGN="RIGHT"><A NAME="PRINTER_DRIVERS">C - Printer Drivers</A></H1>
|
||||
|
||||
@@ -5498,6 +5721,8 @@ ftp> <B>quit ENTER</B>
|
||||
|
||||
<UL>
|
||||
|
||||
<LI><A HREF="#DYMO">DYMO Label Printer</A>, <VAR>dymo.ppd</VAR>
|
||||
|
||||
<LI><A HREF="#EPSON9">EPSON 9-pin Dot Matrix</A>, <VAR>epson9.ppd</VAR>
|
||||
|
||||
<LI><A HREF="#EPSON24">EPSON 24-pin Dot Matrix</A>, <VAR>epson24.ppd</VAR>
|
||||
@@ -5512,6 +5737,13 @@ ftp> <B>quit ENTER</B>
|
||||
|
||||
</UL>
|
||||
|
||||
<H2><A NAME="DYMO">DYMO Label Printer</A></H2>
|
||||
|
||||
<P>The DYMO Label Printer driver (<VAR>dymo.ppd</VAR>) supports
|
||||
the DYMO LabelWriter 300 series (300/310/315/320/330/330 Turbo)
|
||||
thermal label printers. It provides 136, 203, and 300 DPI output
|
||||
in black only.
|
||||
|
||||
<H2><A NAME="EPSON9">EPSON 9-pin Dot Matrix</A></H2>
|
||||
|
||||
<P>The EPSON 9-pin Dot Matrix driver (<VAR>epson9.ppd</VAR>) supports
|
||||
@@ -5676,20 +5908,36 @@ printers.</TD>
|
||||
<TD>Shared libraries (all others)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/libexec/cups/backend/</TD>
|
||||
<TD>Backends for various types of printer connections (*BSD and OSX)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/lib/cups/backend/</TD>
|
||||
<TD>Backends for various types of printer connections.</TD>
|
||||
<TD>Backends for various types of printer connections (all others)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/libexec/cups/cgi-bin/</TD>
|
||||
<TD>CGI programs for the scheduler (*BSD and OSX)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/lib/cups/cgi-bin/</TD>
|
||||
<TD>CGI programs for the scheduler.</TD>
|
||||
<TD>CGI programs for the scheduler (all others)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/libexec/cups/daemon/</TD>
|
||||
<TD>Daemons for polling and LPD support (*BSD and OSX)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/lib/cups/daemon/</TD>
|
||||
<TD>Daemons for polling and LPD support.</TD>
|
||||
<TD>Daemons for polling and LPD support (all others)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/libexec/cups/filter/</TD>
|
||||
<TD>Filters for various types of files (*BSD and OSX)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/lib/cups/filter/</TD>
|
||||
<TD>Filters for various types of files.</TD>
|
||||
<TD>Filters for various types of files (all others)</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>/usr/lib/locale/</TD>
|
||||
@@ -5798,8 +6046,8 @@ For more information please contact us at:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>WWW: <A HREF="http://www.easysw.com">
|
||||
<CODE>http://www.easysw.com</CODE></A>
|
||||
<LI>WWW: <A HREF="http://www.easysw.com/cups/">
|
||||
<CODE>http://www.easysw.com/cups/</CODE></A>
|
||||
|
||||
<LI>EMail: <A HREF="mailto:info@easysw.com">info@easysw.com</A>
|
||||
|
||||
|
||||
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
+3
-19
@@ -1,31 +1,15 @@
|
||||
gziptoany
|
||||
hpgltops
|
||||
images
|
||||
imagetops
|
||||
imagetoraster
|
||||
libcupsimage.a
|
||||
libcupsimage.dylib.2
|
||||
libcupsimage_s.a
|
||||
libcupsimage.sl.2
|
||||
libcupsimage.so.2
|
||||
libcupsimage_s.a
|
||||
pstops
|
||||
rastertodymo
|
||||
rastertoepson
|
||||
rastertohp
|
||||
texttops
|
||||
rastertoalps
|
||||
rastertoalps-oem
|
||||
rastertobj
|
||||
rastertobj-oem
|
||||
rastertoescp
|
||||
rastertoescp-oem
|
||||
rastertoescp2
|
||||
rastertoescp2-oem
|
||||
rastertoescp2x
|
||||
rastertoescp2x-oem
|
||||
rastertopcl
|
||||
rastertopcl-oem
|
||||
texttopcl
|
||||
texttopcl-oem
|
||||
decode-escp2
|
||||
decode-pcl
|
||||
images
|
||||
testdither
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
include ../Makedefs
|
||||
|
||||
TARGETS = gziptoany hpgltops texttops pstops imagetops imagetoraster \
|
||||
rastertodymo rastertoepson rastertohp
|
||||
rastertodymo rastertoepson rastertohp libcupsimage.a
|
||||
|
||||
HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
|
||||
hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
|
||||
|
||||
+2
-2
@@ -293,11 +293,11 @@ WriteCommon(void)
|
||||
puts("% x y w h ESPrf - Fill a rectangle.\n"
|
||||
"userdict/ESPrf/rectfill where{pop/rectfill load}\n"
|
||||
"{{gsave newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto\n"
|
||||
"neg 0 rlineto closepath fill grestore}bind}ifelse put\n");
|
||||
"neg 0 rlineto closepath fill grestore}bind}ifelse put");
|
||||
puts("% x y w h ESPrs - Stroke a rectangle.\n"
|
||||
"userdict/ESPrs/rectstroke where{pop/rectstroke load}\n"
|
||||
"{{gsave newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto\n"
|
||||
"neg 0 rlineto closepath stroke grestore}bind}ifelse put\n");
|
||||
"neg 0 rlineto closepath stroke grestore}bind}ifelse put");
|
||||
}
|
||||
|
||||
|
||||
|
||||
+18
-40
@@ -80,8 +80,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
ypages, /* # y pages */
|
||||
xpage, /* Current x page */
|
||||
ypage, /* Current y page */
|
||||
page, /* Current page number */
|
||||
pos; /* Position on page */
|
||||
page; /* Current page number */
|
||||
int x0, y0, /* Corners of the page in image coords */
|
||||
x1, y1;
|
||||
ib_t *row; /* Current row */
|
||||
@@ -172,7 +171,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
options = NULL;
|
||||
num_options = cupsParseOptions(argv[5], 0, &options);
|
||||
|
||||
ppd = SetCommonOptions(num_options, options, 1);
|
||||
ppd = SetCommonOptions(num_options, options, 0);
|
||||
|
||||
if ((val = cupsGetOption("multiple-document-handling", num_options, options)) != NULL)
|
||||
{
|
||||
@@ -586,6 +585,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
printf("{ neg 1 add dup 0 lt { pop 1 } { %.3f exp neg 1 add } "
|
||||
"ifelse %.3f mul } bind settransfer\n", g, b);
|
||||
|
||||
WriteCommon();
|
||||
WriteLabelProlog(cupsGetOption("page-label", num_options, options),
|
||||
PageBottom, PageTop, PageWidth);
|
||||
|
||||
@@ -605,6 +605,16 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
|
||||
row = malloc(img->xsize * abs(colorspace) + 3);
|
||||
|
||||
UpdatePageVars();
|
||||
|
||||
fprintf(stderr, "DEBUG: XPosition=%d, YPosition=%d, Orientation=%d\n",
|
||||
XPosition, YPosition, Orientation);
|
||||
fprintf(stderr, "DEBUG: xprint=%.0f, yprint=%.0f\n", xprint, yprint);
|
||||
fprintf(stderr, "DEBUG: PageLeft=%.0f, PageRight=%.0f, PageWidth=%.0f\n",
|
||||
PageLeft, PageRight, PageWidth);
|
||||
fprintf(stderr, "DEBUG: PageBottom=%.0f, PageTop=%.0f, PageLength=%.0f\n",
|
||||
PageBottom, PageTop, PageLength);
|
||||
|
||||
for (page = 1; Copies > 0; Copies --)
|
||||
for (xpage = 0; xpage < xpages; xpage ++)
|
||||
for (ypage = 0; ypage < ypages; ypage ++, page ++)
|
||||
@@ -641,58 +651,26 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
y0 = img->ysize * ypage / ypages;
|
||||
y1 = img->ysize * (ypage + 1) / ypages - 1;
|
||||
|
||||
switch (Orientation)
|
||||
{
|
||||
default : /* Portrait */
|
||||
pos = XPosition;
|
||||
break;
|
||||
case 1 : /* Landscape */
|
||||
pos = YPosition;
|
||||
break;
|
||||
case 2 : /* Reverse Portrait */
|
||||
pos = -XPosition;
|
||||
break;
|
||||
case 3 : /* Reverse Lanscape */
|
||||
pos = -YPosition;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (pos)
|
||||
switch (XPosition)
|
||||
{
|
||||
case -1 :
|
||||
left = PageLeft;
|
||||
left = PageLeft;
|
||||
break;
|
||||
default :
|
||||
left = PageLeft + (PageWidth - xprint * 72.0) * 0.5;
|
||||
left = (PageLeft + PageRight - xprint * 72.0) * 0.5;
|
||||
break;
|
||||
case 1 :
|
||||
left = PageRight - xprint * 72.0;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (Orientation)
|
||||
{
|
||||
default : /* Portrait */
|
||||
pos = YPosition;
|
||||
break;
|
||||
case 1 : /* Landscape */
|
||||
pos = -XPosition;
|
||||
break;
|
||||
case 2 : /* Reverse Portrait */
|
||||
pos = -YPosition;
|
||||
break;
|
||||
case 3 : /* Reverse Lanscape */
|
||||
pos = XPosition;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (pos)
|
||||
switch (YPosition)
|
||||
{
|
||||
case -1 :
|
||||
top = PageBottom + 72.0 * yprint;
|
||||
break;
|
||||
default :
|
||||
top = PageBottom + (PageLength + yprint * 72.0) * 0.5;
|
||||
top = (PageBottom + PageTop + yprint * 72.0) * 0.5;
|
||||
break;
|
||||
case 1 :
|
||||
top = PageTop;
|
||||
|
||||
+2
-2
@@ -742,7 +742,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
if (is_first_page(NumPages))
|
||||
{
|
||||
if (ppd == NULL || ppd->num_filters == 0)
|
||||
fprintf(stderr, "PAGE: %d %d\n", page, Copies);
|
||||
fprintf(stderr, "PAGE: %d %d\n", page, slowcollate ? 1 : Copies);
|
||||
|
||||
printf("%%%%Page: %d %d\n", page, page);
|
||||
page ++;
|
||||
@@ -828,7 +828,7 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
*/
|
||||
|
||||
if (ppd == NULL || ppd->num_filters == 0)
|
||||
fprintf(stderr, "PAGE: %d %d\n", page, Copies);
|
||||
fprintf(stderr, "PAGE: %d %d\n", page, slowcollate ? 1 : Copies);
|
||||
|
||||
printf("%%%%Page: %d %d\n", page, page);
|
||||
page ++;
|
||||
|
||||
@@ -600,7 +600,7 @@ TextMain(const char *name, /* I - Name of filter */
|
||||
ppd = SetCommonOptions(num_options, options, 1);
|
||||
|
||||
if ((val = cupsGetOption("wrap", num_options, options)) == NULL)
|
||||
WrapLines = 0;
|
||||
WrapLines = 1;
|
||||
else
|
||||
WrapLines = strcasecmp(val, "true") == 0;
|
||||
|
||||
|
||||
+1
-2
@@ -28,8 +28,7 @@ include ../Makedefs
|
||||
# Locales...
|
||||
#
|
||||
|
||||
LOCALES = C be cs de en es fr he it ru_RU.koi8r ru_RU.cp1251 \
|
||||
sv uk uk_UA.cp1251 zh_CN
|
||||
LOCALES = C be cs de en en_US es fr he it ru_RU sv uk uk_UA zh_CN
|
||||
|
||||
|
||||
#
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
iso-8859-1
|
||||
iso-8859-15
|
||||
Okay
|
||||
Abbrechen
|
||||
Hilfe
|
||||
@@ -106,8 +106,8 @@ Links
|
||||
Recht
|
||||
Unterseite
|
||||
Oberseite
|
||||
Dateiname(s)
|
||||
Druker
|
||||
Dateiname(n)
|
||||
Drucker
|
||||
Installierte Optionen
|
||||
Automatisch
|
||||
400 Der Server versteht die Anfrage Ihres Browsers nicht.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
iso-8859-1
|
||||
iso-8859-15
|
||||
OK
|
||||
Cancel
|
||||
Help
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
koi8-r
|
||||
iso-8859-1
|
||||
OK
|
||||
Cancel
|
||||
Help
|
||||
@@ -14,7 +14,7 @@ Default
|
||||
Options
|
||||
More Info
|
||||
Black
|
||||
Colour
|
||||
Color
|
||||
Cyan
|
||||
Magenta
|
||||
Yellow
|
||||
@@ -39,8 +39,8 @@ Use Natural Image Size
|
||||
Zoom by Percent
|
||||
Zoom by PPI
|
||||
Mirror Image:
|
||||
Colour Saturation:
|
||||
Colour Hue:
|
||||
Color Saturation:
|
||||
Color Hue:
|
||||
Fit to Page:
|
||||
Shading:
|
||||
Pen Width:
|
||||
@@ -108,7 +108,7 @@ Bottom
|
||||
Top
|
||||
Filename(s)
|
||||
Print
|
||||
Installed Options
|
||||
Options Installed
|
||||
Auto
|
||||
400 Your browser sent a request that this server could not understand.
|
||||
This server could not verify that you are authorized to access the resource.
|
||||
@@ -126,6 +126,7 @@ The precondition on the request evaluated to false.
|
||||
The request is too large for this server to process.
|
||||
The request URI is too large for this server to process.
|
||||
The request format is not understood by this server.
|
||||
426 An upgrade to a secure connection is required. If you are seeing this message in a web browser then it does not support HTTP encryption upgrades.
|
||||
500 The server has detected an unrecoverable error and cannot process your request.
|
||||
The requested method is not implemented by this server.
|
||||
The proxy server received an invalid response from an upstream server.
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
iso-8859-1
|
||||
iso-8859-15
|
||||
OK
|
||||
Cancel
|
||||
Ayuda
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
iso-8859-1
|
||||
iso-8859-15
|
||||
OK
|
||||
Annulation
|
||||
Aide
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
iso-8859-1
|
||||
iso-8859-15
|
||||
Continua
|
||||
Annulla
|
||||
Aiuto
|
||||
|
||||
+44
-2
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: cupsd.conf.man 3041 2002-12-17 19:00:27Z swdev $"
|
||||
.\" "$Id: cupsd.conf.man 3623 2003-04-16 19:03:38Z mike $"
|
||||
.\"
|
||||
.\" cupsd.conf man page for the Common UNIX Printing System (CUPS).
|
||||
.\"
|
||||
@@ -48,6 +48,10 @@ AuthClass
|
||||
.br
|
||||
Specifies the authentication class (User, Group, System)
|
||||
.TP 5
|
||||
AuthGroupName
|
||||
.br
|
||||
Specifies the authentication group.
|
||||
.TP 5
|
||||
AuthType
|
||||
.br
|
||||
Specifies the authentication type (None, Basic, Digest)
|
||||
@@ -152,6 +156,19 @@ ErrorLog
|
||||
.br
|
||||
Specifies the error log filename.
|
||||
.TP 5
|
||||
FaxRetryInterval
|
||||
.br
|
||||
Specifies the interval between retries of fax jobs in seconds.
|
||||
.TP 5
|
||||
FaxRetryLimit
|
||||
.br
|
||||
Specifies the number of retries that are done for fax jobs.
|
||||
.TP 5
|
||||
FileDevice
|
||||
.br
|
||||
Specifies whether the file pseudo-device can be used for new
|
||||
printer queues.
|
||||
.TP 5
|
||||
FilterLimit
|
||||
.br
|
||||
Specifies the maximum cost of filters that are run concurrently.
|
||||
@@ -189,6 +206,10 @@ ImplicitClasses
|
||||
Specifies whether or not to create implicit classes from identical
|
||||
remote printers.
|
||||
.TP 5
|
||||
Include
|
||||
.br
|
||||
Includes the named file.
|
||||
.TP 5
|
||||
KeepAlive
|
||||
.br
|
||||
Specifies whether or not to support HTTP Keep-Alive.
|
||||
@@ -207,6 +228,10 @@ LimitRequestBody
|
||||
.br
|
||||
Specifies the maximum size of any print job request.
|
||||
.TP 5
|
||||
Listen
|
||||
.br
|
||||
Listens to the specified address and port.
|
||||
.TP 5
|
||||
<Location /path> ... </Location>
|
||||
.br
|
||||
Specifies access control for the named location.
|
||||
@@ -223,6 +248,11 @@ MaxClients
|
||||
.br
|
||||
Specifies the maximum number of simultaneous clients to support.
|
||||
.TP 5
|
||||
MaxClientsPerHost
|
||||
.br
|
||||
Specifies the maximum number of simultaneous clients to support from a
|
||||
single address.
|
||||
.TP 5
|
||||
MaxCopies
|
||||
.br
|
||||
Specifies the maximum number of copies that a user can print of each job.
|
||||
@@ -274,6 +304,10 @@ Printcap
|
||||
Specifies the filename for a printcap file that is updated automatically
|
||||
with a list of available printers (needed for legacy applications)
|
||||
.TP 5
|
||||
PrintcapFormat
|
||||
.br
|
||||
Specifies the format of the printcap file.
|
||||
.TP 5
|
||||
PrintcapGUI
|
||||
.br
|
||||
Specifies whether to generate option panel definition files on some
|
||||
@@ -333,6 +367,14 @@ ServerRoot
|
||||
.br
|
||||
Specifies the directory where the server configuration files can be found.
|
||||
.TP 5
|
||||
SSLListen
|
||||
.br
|
||||
Listens on the specified address and port for encrypted connections.
|
||||
.TP 5
|
||||
SSLPort
|
||||
.br
|
||||
Listens on the specified port for encrypted connections.
|
||||
.TP 5
|
||||
SystemGroup
|
||||
.br
|
||||
Specifies the group to use for System class authentication.
|
||||
@@ -355,5 +397,5 @@ http://localhost:631/documentation.html
|
||||
.SH COPYRIGHT
|
||||
Copyright 1993-2003 by Easy Software Products, All Rights Reserved.
|
||||
.\"
|
||||
.\" End of "$Id: cupsd.conf.man 3041 2002-12-17 19:00:27Z swdev $".
|
||||
.\" End of "$Id: cupsd.conf.man 3623 2003-04-16 19:03:38Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.\"
|
||||
.\" "$Id: backend.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: backend.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" backend man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.10
|
||||
.\" Based on cvs revision 1.11
|
||||
.\"
|
||||
.\" Copyright 1997-2003 by Easy Software Products.
|
||||
.\"
|
||||
@@ -101,7 +101,7 @@ Le fuseau horaire du serveur.
|
||||
.TP 5
|
||||
USER
|
||||
.br
|
||||
L'utilisateur exécutant le programme (généralement lp). Vous pouvez
|
||||
L'utilisateur exécutant le programme (généralement root). Vous pouvez
|
||||
trouver cette information dans le fichier cupsd.conf.
|
||||
.SH VOIR AUSSI
|
||||
cupsd(8), filter(1)
|
||||
@@ -114,5 +114,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: backend.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: backend.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: cups-config.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: cups-config.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" cups-config man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.3
|
||||
@@ -58,7 +58,7 @@ cups-config \- R
|
||||
--version
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
\fBcups-config\fR est le programme visualisation de la configuration de CUPS. Il doit être
|
||||
\fBcups-config\fR est le programme de visualisation de la configuration de CUPS. Il doit être
|
||||
utilisé par les développeurs pour déterminer les options du compilateur et du linkeur,
|
||||
ainsi que l'endroit où ont été installés les filtres,
|
||||
fichiers de configuration et pilotes.
|
||||
@@ -93,5 +93,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: cups-config.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: cups-config.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: cups-lpd.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: cups-lpd.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" cups-lpd man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.10
|
||||
@@ -78,14 +78,14 @@ Cette option est souvent utilis
|
||||
.br
|
||||
.nf
|
||||
|
||||
printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd \
|
||||
printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd \
|
||||
-o document-format=application/octet-stream
|
||||
|
||||
server = /usr/lib/cups/daemon/cups-lpd
|
||||
server_args = -o document-format=application/octet-stream
|
||||
.fi
|
||||
.LP
|
||||
Dans cet exemple, le format du documet est réinitialisé à la valeur
|
||||
Dans cet exemple, le format du document est réinitialisé à la valeur
|
||||
\fIapplication/octet-stream\fR, ce qui force l'auto-détection du type de
|
||||
fichier.
|
||||
.SH COMPATIBILITÉ
|
||||
@@ -108,5 +108,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: cups-lpd.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: cups-lpd.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: cupsaddsmb.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: cupsaddsmb.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" cupsaddsmb man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.6
|
||||
@@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.TH cupsaddsmb 8 "Common UNIX Printing System" "27 septembre 2002" "Easy Software Products"
|
||||
.SH NOM
|
||||
cupsaddsmb \- Export d'imprimante vers Samba pour les clients Windows
|
||||
cupsaddsmb \- Exportation d'imprimantes vers Samba pour les clients Windows
|
||||
.SH SYNOPSIS
|
||||
.B cupsaddsmb
|
||||
[ -a ] [ -U
|
||||
@@ -94,7 +94,7 @@ Windows, disponibles sur le site Internet de CUPS.
|
||||
Il est recommandé d'utiliser ces pilotes CUPS car ils permettent le comptage
|
||||
du nombre de pages, les pages de garde et les labels sur tous les types
|
||||
d'imprimantes. Ces pilotes ne sont cependant disponibles que pour les
|
||||
plateformes Windows NT, 2000 et XP. Pour des plateformes Windows 95, 98 et Me,
|
||||
plates-formes Windows NT, 2000 et XP. Pour des plates-formes Windows 95, 98 et Me,
|
||||
il est nécessaire d'utiliser les pilotes Adobe.
|
||||
.LP
|
||||
Après décompression des fichiers, créer un répertoire «\ drivers\ » dans le
|
||||
@@ -115,7 +115,7 @@ disponibles en t
|
||||
Il est recommandé d'utiliser ces pilotes CUPS car ils permettent le comptage
|
||||
du nombre de pages, les pages de garde et les labels sur tous les types
|
||||
d'imprimantes. Ces pilotes ne sont cependant disponibles que pour les
|
||||
plateformes Windows NT, 2000 et XP. Pour des plateformes Windows 95, 98 et Me,
|
||||
plates-formes Windows NT, 2000 et XP. Pour des plates-formes Windows 95, 98 et Me,
|
||||
il est nécessaire d'utiliser les pilotes Adobe.
|
||||
.LP
|
||||
Une fois les fichiers décompressés, créez un répertoire «\ drivers\ » dans
|
||||
@@ -147,5 +147,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: cupsaddsmb.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: cupsaddsmb.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: cupsd.conf.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: cupsd.conf.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" cupsd.conf man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.10
|
||||
@@ -241,7 +241,7 @@ D
|
||||
.TP 5
|
||||
MaxLogSize
|
||||
.br
|
||||
Définit la taille maximale des fichiers de trace. Au delà de cette taille, les fichiers
|
||||
Définit la taille maximale des fichiers de trace. Au-delà de cette taille, les fichiers
|
||||
sont recyclés (on ne garde que les entrées les plus récentes pour supprimer les plus vieilles).
|
||||
Indiquer 0 pour supprimer la rotation des fichiers.
|
||||
.TP 5
|
||||
@@ -287,11 +287,11 @@ D
|
||||
.TP 5
|
||||
RequestRoot
|
||||
.br
|
||||
Définit le répertoire où sont stockées les fichiers de travail et les données des requêtes HTTP.
|
||||
Définit le répertoire où sont stockés les fichiers de travail et les données des requêtes HTTP.
|
||||
.TP 5
|
||||
Require
|
||||
.br
|
||||
Définit qu'un identification par utilisateur ou par groupe est nécessaire.
|
||||
Définit qu'une identification par utilisateur ou par groupe est nécessaire.
|
||||
.TP 5
|
||||
RIPCache
|
||||
.br
|
||||
@@ -355,5 +355,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: cupsd.conf.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: cupsd.conf.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
+35
-11
@@ -1,8 +1,8 @@
|
||||
.\"
|
||||
.\" "$Id: cupstestppd.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: cupstestppd.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" cupstestppd man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.3
|
||||
.\" Based on cvs revision 1.4
|
||||
.\"
|
||||
.\" Copyright 1997-2003 by Easy Software Products.
|
||||
.\"
|
||||
@@ -22,15 +22,15 @@
|
||||
.\" EMail: cups-info@cups.org
|
||||
.\" WWW: http://www.cups.org
|
||||
.\"
|
||||
.TH cupstestppd 1 "Common UNIX Printing System" "13 Décembre 2002" "Easy Software Products"
|
||||
.SH NAME
|
||||
.TH cupstestppd 1 "Common UNIX Printing System" "14 Février 2003" "Easy Software Products"
|
||||
.SH NOM
|
||||
cupstestppd \- Teste la conformité des fichiers PPD
|
||||
.SH SYNOPSIS
|
||||
.B cupstestppd
|
||||
[ -v ] nom_fichier.ppd [ ... nom_fichierN.ppd ]
|
||||
[ -q ] [ -v[v] ] nom_fichier.ppd[.gz] [ ... nom_fichierN.ppd[.gz] ]
|
||||
.br
|
||||
.B cupstestppd
|
||||
[ -v ] -
|
||||
[ -v[v] ] -
|
||||
.SH DESCRIPTION
|
||||
\fIcupstestppd\fR teste la conformité des fichiers PPD envers la
|
||||
spécification de format de fichier édictée par Adobe, dans sa version
|
||||
@@ -41,11 +41,18 @@ fichier PPD. Toutes les sorties sont effectu
|
||||
Le premier mode d'appel de \fIcupstestppd\fR nécessite la présence
|
||||
d'un ou plusieurs fichiers PPD dans la ligne de commandes. Le second
|
||||
mode d'appel affiche les caractéristiques des fichiers PPD fournis sur
|
||||
l'entrée standard. Il est possible d'envoyer des fichiers PPD compressés
|
||||
en utilisant les outils appropriés.
|
||||
l'entrée standard.
|
||||
.LP
|
||||
L'option \fB-q\fR indique qu'aucune information ne doit être affichée
|
||||
à l'écran.
|
||||
.LP
|
||||
L'option \fI-v\fR indique qu'il faut afficher toutes les informations d'un fichier
|
||||
PPD en plus des résultats des tests de conformité.
|
||||
PPD à la place du statut PASS/FAILED/ERROR (conforme/non conforme/erreur).
|
||||
.LP
|
||||
L'option \fI-vv\fR indique qu'il faut afficher toutes les informations d'un fichier
|
||||
PPD en plus du résultat des tests de conformité.
|
||||
.LP
|
||||
Les options \fB-q\fR, \fI-v\fR et \fI-vv\fR sont mutuellement exclusives.
|
||||
.SH CODE DE RETOUR
|
||||
\fIcupstestppd\fR renvoie 0 en cas de réussite aux tests et une valeur différente de 0
|
||||
en cas d'échec. Les codes d'erreur sont les suivants\ :
|
||||
@@ -65,14 +72,31 @@ Le fichier PPD contient des erreurs de format ne pouvant
|
||||
4
|
||||
.br
|
||||
Le fichier PPD n'est pas conforme à la spécification Adobe.
|
||||
.SH EXEMPLES
|
||||
La commande suivante teste tous les fichiers PPD du répertoire courant, et
|
||||
affiche le nom de tous les fichiers non conformes\ :
|
||||
.nf
|
||||
|
||||
find . -name \\*.ppd \\! -exec cupstestppd -q '{}' \\; print
|
||||
|
||||
.fi
|
||||
La commande suivante teste tous les fichiers PPD du répertoire courant, et
|
||||
affiche les résultats détaillées des fichiers non conformes\ :
|
||||
.nf
|
||||
|
||||
find . -name \\*.ppd \\! -exec cupstestppd -q '{}' \\; \\
|
||||
-exec cupstestppd -v '{}' \\;
|
||||
|
||||
.fi
|
||||
.SH VOIR AUSSI
|
||||
CUPS Software Administrators Manual,
|
||||
CUPS Software Programmers Manual,
|
||||
http://localhost:631/documentation.html
|
||||
http://localhost:631/documentation.html,
|
||||
Spécification du format de fichier Adobe Postscript Printer, version 4.3
|
||||
.SH COPYRIGHT
|
||||
Copyright 1993-2003 Easy Software Products, All Rights Reserved.
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: cupstestppd.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: cupstestppd.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: filter.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: filter.man 3671 2003-04-28 01:42:07Z mike $"
|
||||
.\"
|
||||
.\" filter man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.10
|
||||
@@ -37,7 +37,7 @@ formats en entr
|
||||
compréhensible par CUPS, soit retraité par un autre filtre pour obtenir
|
||||
un format imprimable.
|
||||
.LP
|
||||
Ces programmes doivent être capable de lire un fichier de la ligne de
|
||||
Ces programmes doivent être capables de lire un fichier de la ligne de
|
||||
commande ou via l'entrée standard, si besoin est en recopiant son contenu
|
||||
dans un fichier temporaire. Toute sortie doit être faite sur la sortie standard.
|
||||
.LP
|
||||
@@ -49,11 +49,11 @@ lors de l'ex
|
||||
CHARSET
|
||||
.br
|
||||
Le jeu de caractères par défaut (généralement us-ascii ou iso-8859-1).
|
||||
.TP5
|
||||
.TP 5
|
||||
CLASS
|
||||
.br
|
||||
Contient le nom de la classe lorsqu'un travail d'impression est envoyé à une cla
|
||||
sse d'imprimante. Cette variable n'est pas définie si le travail d'impression n'
|
||||
sse d'imprimantes. Cette variable n'est pas définie si le travail d'impression n'
|
||||
est pas envoyé à une classe.
|
||||
.TP 5
|
||||
CONTENT_TYPE
|
||||
@@ -123,5 +123,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: filter.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: filter.man 3671 2003-04-28 01:42:07Z mike $".
|
||||
.\"
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: lp.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: lp.man 3623 2003-04-16 19:03:38Z mike $"
|
||||
.\"
|
||||
.\" lp/cancel man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.12
|
||||
@@ -144,7 +144,7 @@ D
|
||||
\-u \fInom_utilisateur\fR
|
||||
.br
|
||||
Annule les travaux d'impression de l'utilisateur \fInom_utilisateur\fR.
|
||||
.TP5
|
||||
.TP 5
|
||||
\-H \fIméthode\fR
|
||||
.br
|
||||
Définit quand l'impression doit être effectuée. La valeur \fIimmediate\fR effectue
|
||||
@@ -180,5 +180,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: lp.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: lp.man 3623 2003-04-16 19:03:38Z mike $".
|
||||
.\"
|
||||
|
||||
+15
-9
@@ -1,8 +1,8 @@
|
||||
.\"
|
||||
.\" "$Id: lpadmin.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: lpadmin.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" lpadmin man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.9
|
||||
.\" Based on cvs revision 1.11
|
||||
.\"
|
||||
.\" Copyright 1997-2003 by Easy Software Products.
|
||||
.\"
|
||||
@@ -84,12 +84,12 @@ D
|
||||
\-o \fIname=value\fR
|
||||
.br
|
||||
Définit une option PPD ou serveur pour une imprimante. La liste des options
|
||||
PPD peut être obtenu en utilisant la commande \fIlptions -l\fR.
|
||||
PPD peut être obtenue en utilisant la commande \fIlpoptions -l\fR.
|
||||
.TP 5
|
||||
\-o \fIjob-k-limit=valeur\fR
|
||||
.br
|
||||
Définit les quotas par utilisateur en kilo-octets. La valeur est un nombre
|
||||
entier de kilo-octets (valant 1024 octets).
|
||||
entier de kilo-octets (valant 1\ 024 octets).
|
||||
.TP 5
|
||||
\-o \fIjob-page-limit=valeur\fR
|
||||
.br
|
||||
@@ -101,19 +101,25 @@ pages.
|
||||
.br
|
||||
Définit les quotas par utilisateur en impressions par intervalle de temps. La
|
||||
valeur est un nombre entier définissant le nombre de secondes entre chaque
|
||||
impression. Une journée contient 86400 secondes.
|
||||
impression. Une journée contient 86\ 400 secondes.
|
||||
.TP 5
|
||||
\-o \fIprotocol=nom\fR
|
||||
Définit le protocole à utiliser lors des communications binaires pour les
|
||||
impressions. Les protocoles sont None (Aucun), BCP et TBCP. Le protocole
|
||||
par défaut est None.
|
||||
.TP 5
|
||||
\-r \fIclasse\fR
|
||||
.br
|
||||
Supprime \fIl'imprimante\fR de la \fIclasse\fR. Si la classe d'imprimante devient
|
||||
vide, celle-ci est supprimée.
|
||||
.TP 5
|
||||
\-u \fIallow:user,user\fR
|
||||
\-u \fIdeny:user,user\fR
|
||||
\-u \fIallow:utilisateur,utilisateur,@groupe\fR
|
||||
\-u \fIdeny:utilisateur,utilisateur,@groupe\fR
|
||||
\-u \fIallow:all\fR
|
||||
\-u \fIdeny:none\fR
|
||||
.br
|
||||
Définit les accès par utilisateur sur une imprimante. Les deux dernières expressions
|
||||
Définit les accès par utilisateur sur une imprimante. Les noms commençant par le symbole
|
||||
@ sont des noms de groupes UNIX. Les deux dernières expressions
|
||||
suppriment les contrôles d'accès par utilisateur.
|
||||
.TP 5
|
||||
\-v \fIdevice-uri\fR
|
||||
@@ -158,5 +164,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: lpadmin.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: lpadmin.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: lpoptions.man 3456 2003-03-12 20:41:43Z mike $"
|
||||
.\" "$Id: lpoptions.man 3664 2003-04-26 17:09:56Z mike $"
|
||||
.\"
|
||||
.\" lpoptions man page for the Common UNIX Printing System (CUPS).
|
||||
.\" Based on cvs revision 1.11
|
||||
@@ -81,7 +81,7 @@ D
|
||||
.TP 5
|
||||
\-l
|
||||
.br
|
||||
Affiche les options spécifiques d'une imprimante et leur paramétrage.
|
||||
Affiche les options spécifiques d'une imprimante et ses paramétrages.
|
||||
.TP 5
|
||||
\-o \fIoption=valeur\fR
|
||||
.br
|
||||
@@ -123,5 +123,5 @@ Copyright 1993-2003 Easy Software Products, Tous droits r
|
||||
.SH TRADUCTION
|
||||
Gilles QUERRET <gilles.querret@nerim.net>
|
||||
.\"
|
||||
.\" End of "$Id: lpoptions.man 3456 2003-03-12 20:41:43Z mike $".
|
||||
.\" End of "$Id: lpoptions.man 3664 2003-04-26 17:09:56Z mike $".
|
||||
.\"
|
||||
|
||||
+5
-4
@@ -1,5 +1,5 @@
|
||||
.\"
|
||||
.\" "$Id: lp.man 3152 2003-01-27 14:44:41Z mike $"
|
||||
.\" "$Id: lp.man 3687 2003-05-01 18:40:05Z mike $"
|
||||
.\"
|
||||
.\" lp/cancel man page for the Common UNIX Printing System (CUPS).
|
||||
.\"
|
||||
@@ -21,7 +21,7 @@
|
||||
.\" EMail: cups-info@cups.org
|
||||
.\" WWW: http://www.cups.org
|
||||
.\"
|
||||
.TH lp 1 "Common UNIX Printing System" "24 January 2003" "Easy Software Products"
|
||||
.TH lp 1 "Common UNIX Printing System" "1 May 2003" "Easy Software Products"
|
||||
.SH NAME
|
||||
lp \- print files
|
||||
.br
|
||||
@@ -80,7 +80,8 @@ cancel \- cancel jobs
|
||||
.I destination-id
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
\fBlp\fR submits files for printing or alters a pending job.
|
||||
\fBlp\fR submits files for printing or alters a pending job. Use
|
||||
a filename of "-" to force printing from the standard input.
|
||||
.LP
|
||||
\fBcancel\fR cancels existing print jobs. The \fI-a\fR option will remove
|
||||
all jobs from the specified destination.
|
||||
@@ -176,5 +177,5 @@ http://localhost:631/documentation.html
|
||||
.SH COPYRIGHT
|
||||
Copyright 1993-2003 by Easy Software Products, All Rights Reserved.
|
||||
.\"
|
||||
.\" End of "$Id: lp.man 3152 2003-01-27 14:44:41Z mike $".
|
||||
.\" End of "$Id: lp.man 3687 2003-05-01 18:40:05Z mike $".
|
||||
.\"
|
||||
|
||||
@@ -39,7 +39,7 @@ BuiltinFontWidths::~BuiltinFontWidths() {
|
||||
gfree(tab);
|
||||
}
|
||||
|
||||
GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) {
|
||||
GBool BuiltinFontWidths::getWidth(const char *name, Gushort *width) {
|
||||
int h;
|
||||
BuiltinFontWidth *p;
|
||||
|
||||
@@ -53,8 +53,8 @@ GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
int BuiltinFontWidths::hash(char *name) {
|
||||
char *p;
|
||||
int BuiltinFontWidths::hash(const char *name) {
|
||||
const char *p;
|
||||
unsigned int h;
|
||||
|
||||
h = 0;
|
||||
|
||||
@@ -23,8 +23,8 @@ class BuiltinFontWidths;
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
struct BuiltinFont {
|
||||
char *name;
|
||||
char **defaultBaseEnc;
|
||||
const char *name;
|
||||
const char **defaultBaseEnc;
|
||||
short ascent;
|
||||
short descent;
|
||||
short bbox[4];
|
||||
@@ -34,7 +34,7 @@ struct BuiltinFont {
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
struct BuiltinFontWidth {
|
||||
char *name;
|
||||
const char *name;
|
||||
Gushort width;
|
||||
BuiltinFontWidth *next;
|
||||
};
|
||||
@@ -44,11 +44,11 @@ public:
|
||||
|
||||
BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA);
|
||||
~BuiltinFontWidths();
|
||||
GBool getWidth(char *name, Gushort *width);
|
||||
GBool getWidth(const char *name, Gushort *width);
|
||||
|
||||
private:
|
||||
|
||||
int hash(char *name);
|
||||
int hash(const char *name);
|
||||
|
||||
BuiltinFontWidth **tab;
|
||||
int size;
|
||||
|
||||
+2
-2
@@ -154,7 +154,7 @@ CMap::CMap(GString *collectionA, GString *cMapNameA, int wModeA) {
|
||||
refCnt = 1;
|
||||
}
|
||||
|
||||
void CMap::useCMap(CMapCache *cache, char *useName) {
|
||||
void CMap::useCMap(CMapCache *cache, const char *useName) {
|
||||
GString *useNameStr;
|
||||
CMap *subCMap;
|
||||
|
||||
@@ -279,7 +279,7 @@ GBool CMap::match(GString *collectionA, GString *cMapNameA) {
|
||||
return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA);
|
||||
}
|
||||
|
||||
CID CMap::getCID(char *s, int len, int *nUsed) {
|
||||
CID CMap::getCID(const char *s, int len, int *nUsed) {
|
||||
CMapVectorEntry *vec;
|
||||
int n, i;
|
||||
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ public:
|
||||
// Return the CID corresponding to the character code starting at
|
||||
// <s>, which contains <len> bytes. Sets *<nUsed> to the number of
|
||||
// bytes used by the char code.
|
||||
CID getCID(char *s, int len, int *nUsed);
|
||||
CID getCID(const char *s, int len, int *nUsed);
|
||||
|
||||
// Return the writing mode (0=horizontal, 1=vertical).
|
||||
int getWMode() { return wMode; }
|
||||
@@ -56,7 +56,7 @@ private:
|
||||
|
||||
CMap(GString *collectionA, GString *cMapNameA);
|
||||
CMap(GString *collectionA, GString *cMapNameA, int wModeA);
|
||||
void useCMap(CMapCache *cache, char *useName);
|
||||
void useCMap(CMapCache *cache, const char *useName);
|
||||
void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src);
|
||||
void addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end,
|
||||
Guint nBytes);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#ifndef COMPACTFONTINFO_H
|
||||
#define COMPACTFONTINFO_H
|
||||
|
||||
static char *type1CStdStrings[391] = {
|
||||
static const char *type1CStdStrings[391] = {
|
||||
".notdef",
|
||||
"space",
|
||||
"exclam",
|
||||
|
||||
+7
-7
@@ -34,13 +34,13 @@ Dict::~Dict() {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < length; ++i) {
|
||||
gfree(entries[i].key);
|
||||
gfree((void *)entries[i].key);
|
||||
entries[i].val.free();
|
||||
}
|
||||
gfree(entries);
|
||||
}
|
||||
|
||||
void Dict::add(char *key, Object *val) {
|
||||
void Dict::add(const char *key, Object *val) {
|
||||
if (length + 1 > size) {
|
||||
size += 8;
|
||||
entries = (DictEntry *)grealloc(entries, size * sizeof(DictEntry));
|
||||
@@ -50,7 +50,7 @@ void Dict::add(char *key, Object *val) {
|
||||
++length;
|
||||
}
|
||||
|
||||
inline DictEntry *Dict::find(char *key) {
|
||||
inline DictEntry *Dict::find(const char *key) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < length; ++i) {
|
||||
@@ -60,25 +60,25 @@ inline DictEntry *Dict::find(char *key) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GBool Dict::is(char *type) {
|
||||
GBool Dict::is(const char *type) {
|
||||
DictEntry *e;
|
||||
|
||||
return (e = find("Type")) && e->val.isName(type);
|
||||
}
|
||||
|
||||
Object *Dict::lookup(char *key, Object *obj) {
|
||||
Object *Dict::lookup(const char *key, Object *obj) {
|
||||
DictEntry *e;
|
||||
|
||||
return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull();
|
||||
}
|
||||
|
||||
Object *Dict::lookupNF(char *key, Object *obj) {
|
||||
Object *Dict::lookupNF(const char *key, Object *obj) {
|
||||
DictEntry *e;
|
||||
|
||||
return (e = find(key)) ? e->val.copy(obj) : obj->initNull();
|
||||
}
|
||||
|
||||
char *Dict::getKey(int i) {
|
||||
const char *Dict::getKey(int i) {
|
||||
return entries[i].key;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -22,7 +22,7 @@
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
struct DictEntry {
|
||||
char *key;
|
||||
const char *key;
|
||||
Object val;
|
||||
};
|
||||
|
||||
@@ -43,18 +43,18 @@ public:
|
||||
int getLength() { return length; }
|
||||
|
||||
// Add an entry. NB: does not copy key.
|
||||
void add(char *key, Object *val);
|
||||
void add(const char *key, Object *val);
|
||||
|
||||
// Check if dictionary is of specified type.
|
||||
GBool is(char *type);
|
||||
GBool is(const char *type);
|
||||
|
||||
// Look up an entry and return the value. Returns a null object
|
||||
// if <key> is not in the dictionary.
|
||||
Object *lookup(char *key, Object *obj);
|
||||
Object *lookupNF(char *key, Object *obj);
|
||||
Object *lookup(const char *key, Object *obj);
|
||||
Object *lookupNF(const char *key, Object *obj);
|
||||
|
||||
// Iterative accessors.
|
||||
char *getKey(int i);
|
||||
const char *getKey(int i);
|
||||
Object *getVal(int i, Object *obj);
|
||||
Object *getValNF(int i, Object *obj);
|
||||
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
int length; // number of entries in dictionary
|
||||
int ref; // reference count
|
||||
|
||||
DictEntry *find(char *key);
|
||||
DictEntry *find(const char *key);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
//========================================================================
|
||||
|
||||
static struct {
|
||||
char *name;
|
||||
char *xlfd;
|
||||
char *encoding;
|
||||
const char *name;
|
||||
const char *xlfd;
|
||||
const char *encoding;
|
||||
} displayFontTab[] = {
|
||||
{"Courier", "-*-courier-medium-r-normal-*-%s-*-*-*-*-*-iso8859-1", "Latin1"},
|
||||
{"Courier-Bold", "-*-courier-bold-r-normal-*-%s-*-*-*-*-*-iso8859-1", "Latin1"},
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
#include "GlobalParams.h"
|
||||
#include "Error.h"
|
||||
|
||||
void CDECL error(int pos, char *msg, ...) {
|
||||
void CDECL error(int pos, const char *msg, ...) {
|
||||
va_list args;
|
||||
|
||||
// NB: this can be called before the globalParams object is created
|
||||
|
||||
+1
-1
@@ -18,6 +18,6 @@
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
|
||||
extern void CDECL error(int pos, char *msg, ...);
|
||||
extern void CDECL error(int pos, const char *msg, ...);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "FontEncodingTables.h"
|
||||
|
||||
char *macRomanEncoding[256] = {
|
||||
const char *macRomanEncoding[256] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -269,7 +269,7 @@ char *macRomanEncoding[256] = {
|
||||
"caron"
|
||||
};
|
||||
|
||||
char *macExpertEncoding[256] = {
|
||||
const char *macExpertEncoding[256] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -528,7 +528,7 @@ char *macExpertEncoding[256] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
char *winAnsiEncoding[256] = {
|
||||
const char *winAnsiEncoding[256] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -787,7 +787,7 @@ char *winAnsiEncoding[256] = {
|
||||
"ydieresis"
|
||||
};
|
||||
|
||||
char *standardEncoding[256] = {
|
||||
const char *standardEncoding[256] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -1046,7 +1046,7 @@ char *standardEncoding[256] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
char *expertEncoding[256] = {
|
||||
const char *expertEncoding[256] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -1305,7 +1305,7 @@ char *expertEncoding[256] = {
|
||||
"Ydieresissmall"
|
||||
};
|
||||
|
||||
char *symbolEncoding[256] = {
|
||||
const char *symbolEncoding[256] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -1564,7 +1564,7 @@ char *symbolEncoding[256] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
char *zapfDingbatsEncoding[256] = {
|
||||
const char *zapfDingbatsEncoding[256] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
#ifndef FONTENCODINGTABLES_H
|
||||
#define FONTENCODINGTABLES_H
|
||||
|
||||
extern char *macRomanEncoding[];
|
||||
extern char *macExpertEncoding[];
|
||||
extern char *winAnsiEncoding[];
|
||||
extern char *standardEncoding[];
|
||||
extern char *expertEncoding[];
|
||||
extern char *symbolEncoding[];
|
||||
extern char *zapfDingbatsEncoding[];
|
||||
extern const char *macRomanEncoding[];
|
||||
extern const char *macExpertEncoding[];
|
||||
extern const char *winAnsiEncoding[];
|
||||
extern const char *standardEncoding[];
|
||||
extern const char *expertEncoding[];
|
||||
extern const char *symbolEncoding[];
|
||||
extern const char *zapfDingbatsEncoding[];
|
||||
|
||||
#endif
|
||||
|
||||
+33
-32
@@ -29,7 +29,7 @@
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
static inline char *nextLine(char *line, char *end) {
|
||||
static inline const char *nextLine(const char *line, const char *end) {
|
||||
while (line < end && *line != '\n' && *line != '\r')
|
||||
++line;
|
||||
while (line < end && *line == '\n' || *line == '\r')
|
||||
@@ -37,7 +37,7 @@ static inline char *nextLine(char *line, char *end) {
|
||||
return line;
|
||||
}
|
||||
|
||||
static char hexChars[17] = "0123456789ABCDEF";
|
||||
static const char hexChars[17] = "0123456789ABCDEF";
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// FontFile
|
||||
@@ -53,8 +53,9 @@ FontFile::~FontFile() {
|
||||
// Type1FontFile
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
Type1FontFile::Type1FontFile(char *file, int len) {
|
||||
char *line, *line1, *p, *p2;
|
||||
Type1FontFile::Type1FontFile(const char *file, int len) {
|
||||
const char *line, *line1;
|
||||
char *p, *p2;
|
||||
GBool haveEncoding;
|
||||
char buf[256];
|
||||
char c;
|
||||
@@ -188,7 +189,7 @@ struct Type1CPrivateDict {
|
||||
GBool nominalWidthXFP;
|
||||
};
|
||||
|
||||
Type1CFontFile::Type1CFontFile(char *fileA, int lenA) {
|
||||
Type1CFontFile::Type1CFontFile(const char *fileA, int lenA) {
|
||||
Guchar *nameIdxPtr, *idxPtr0, *idxPtr1;
|
||||
|
||||
file = fileA;
|
||||
@@ -228,15 +229,15 @@ Type1CFontFile::~Type1CFontFile() {
|
||||
}
|
||||
}
|
||||
|
||||
char *Type1CFontFile::getName() {
|
||||
const char *Type1CFontFile::getName() {
|
||||
return name->getCString();
|
||||
}
|
||||
|
||||
char **Type1CFontFile::getEncoding() {
|
||||
const char **Type1CFontFile::getEncoding() {
|
||||
if (!encoding) {
|
||||
readNameAndEncoding();
|
||||
}
|
||||
return encoding;
|
||||
return (const char **)encoding;
|
||||
}
|
||||
|
||||
void Type1CFontFile::readNameAndEncoding() {
|
||||
@@ -595,7 +596,7 @@ void Type1CFontFile::convertToType1(FontFileOutputFunc outputFuncA,
|
||||
}
|
||||
}
|
||||
|
||||
void Type1CFontFile::convertToCIDType0(char *psName,
|
||||
void Type1CFontFile::convertToCIDType0(const char *psName,
|
||||
FontFileOutputFunc outputFuncA,
|
||||
void *outputStreamA) {
|
||||
Type1CTopDict dict;
|
||||
@@ -883,7 +884,7 @@ void Type1CFontFile::convertToCIDType0(char *psName,
|
||||
gfree(fdSelect);
|
||||
}
|
||||
|
||||
void Type1CFontFile::convertToType0(char *psName,
|
||||
void Type1CFontFile::convertToType0(const char *psName,
|
||||
FontFileOutputFunc outputFuncA,
|
||||
void *outputStreamA) {
|
||||
Type1CTopDict dict;
|
||||
@@ -1405,7 +1406,7 @@ Gushort *Type1CFontFile::readCharset(int charset, int nGlyphs) {
|
||||
return glyphNames;
|
||||
}
|
||||
|
||||
void Type1CFontFile::eexecWrite(char *s) {
|
||||
void Type1CFontFile::eexecWrite(const char *s) {
|
||||
Guchar *p;
|
||||
Guchar x;
|
||||
|
||||
@@ -1422,7 +1423,7 @@ void Type1CFontFile::eexecWrite(char *s) {
|
||||
}
|
||||
}
|
||||
|
||||
void Type1CFontFile::eexecCvtGlyph(char *glyphName, Guchar *s, int n) {
|
||||
void Type1CFontFile::eexecCvtGlyph(const char *glyphName, Guchar *s, int n) {
|
||||
char eBuf[256];
|
||||
|
||||
cvtGlyph(s, n);
|
||||
@@ -2098,7 +2099,7 @@ void Type1CFontFile::eexecWriteCharstring(Guchar *s, int n) {
|
||||
}
|
||||
}
|
||||
|
||||
void Type1CFontFile::getDeltaInt(char *buf, char *key, double *opA,
|
||||
void Type1CFontFile::getDeltaInt(char *buf, const char *key, double *opA,
|
||||
int n) {
|
||||
int x, i;
|
||||
|
||||
@@ -2113,7 +2114,7 @@ void Type1CFontFile::getDeltaInt(char *buf, char *key, double *opA,
|
||||
sprintf(buf, "] def\n");
|
||||
}
|
||||
|
||||
void Type1CFontFile::getDeltaReal(char *buf, char *key, double *opA,
|
||||
void Type1CFontFile::getDeltaReal(char *buf, const char *key, double *opA,
|
||||
int n) {
|
||||
double x;
|
||||
int i;
|
||||
@@ -2318,7 +2319,7 @@ struct TTFontTableHdr {
|
||||
};
|
||||
|
||||
struct T42Table {
|
||||
char *tag; // 4-byte tag
|
||||
const char *tag; // 4-byte tag
|
||||
GBool required; // required by the TrueType spec?
|
||||
};
|
||||
|
||||
@@ -2344,7 +2345,7 @@ static T42Table t42Tables[nT42Tables] = {
|
||||
|
||||
// Glyph names in some arbitrary standard that Apple uses for their
|
||||
// TrueType fonts.
|
||||
static char *macGlyphNames[258] = {
|
||||
static const char *macGlyphNames[258] = {
|
||||
".notdef",
|
||||
"null",
|
||||
"CR",
|
||||
@@ -2618,7 +2619,7 @@ struct TrueTypeLoca {
|
||||
int length;
|
||||
};
|
||||
|
||||
TrueTypeFontFile::TrueTypeFontFile(char *fileA, int lenA) {
|
||||
TrueTypeFontFile::TrueTypeFontFile(const char *fileA, int lenA) {
|
||||
int pos, i, idx, n, length;
|
||||
Guint size, startPos, endPos;
|
||||
|
||||
@@ -2704,11 +2705,11 @@ TrueTypeFontFile::~TrueTypeFontFile() {
|
||||
gfree(tableHdrs);
|
||||
}
|
||||
|
||||
char *TrueTypeFontFile::getName() {
|
||||
const char *TrueTypeFontFile::getName() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char **TrueTypeFontFile::getEncoding() {
|
||||
const char **TrueTypeFontFile::getEncoding() {
|
||||
int cmap[256];
|
||||
int nCmaps, cmapPlatform, cmapEncoding, cmapFmt;
|
||||
int cmapLen, cmapOffset, cmapFirst;
|
||||
@@ -2719,7 +2720,7 @@ char **TrueTypeFontFile::getEncoding() {
|
||||
int stringIdx, stringPos, n;
|
||||
|
||||
if (encoding) {
|
||||
return encoding;
|
||||
return (const char **)encoding;
|
||||
}
|
||||
|
||||
//----- construct the (char code) -> (glyph idx) mapping
|
||||
@@ -2877,10 +2878,10 @@ char **TrueTypeFontFile::getEncoding() {
|
||||
}
|
||||
}
|
||||
|
||||
return encoding;
|
||||
return (const char **)encoding;
|
||||
}
|
||||
|
||||
void TrueTypeFontFile::convertToType42(char *name, char **encodingA,
|
||||
void TrueTypeFontFile::convertToType42(const char *name, const char **encodingA,
|
||||
CharCodeToUnicode *toUnicode,
|
||||
GBool pdfFontHasEncoding,
|
||||
FontFileOutputFunc outputFunc,
|
||||
@@ -2913,7 +2914,7 @@ void TrueTypeFontFile::convertToType42(char *name, char **encodingA,
|
||||
(*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40);
|
||||
}
|
||||
|
||||
void TrueTypeFontFile::convertToCIDType2(char *name, Gushort *cidMap,
|
||||
void TrueTypeFontFile::convertToCIDType2(const char *name, Gushort *cidMap,
|
||||
int nCIDs,
|
||||
FontFileOutputFunc outputFunc,
|
||||
void *outputStream) {
|
||||
@@ -3021,7 +3022,7 @@ void TrueTypeFontFile::convertToCIDType2(char *name, Gushort *cidMap,
|
||||
56);
|
||||
}
|
||||
|
||||
void TrueTypeFontFile::convertToType0(char *name, Gushort *cidMap,
|
||||
void TrueTypeFontFile::convertToType0(const char *name, Gushort *cidMap,
|
||||
int nCIDs,
|
||||
FontFileOutputFunc outputFunc,
|
||||
void *outputStream) {
|
||||
@@ -3157,7 +3158,7 @@ double TrueTypeFontFile::getFixed(int pos) {
|
||||
return (double)x + (double)y / 65536;
|
||||
}
|
||||
|
||||
int TrueTypeFontFile::seekTable(char *tag) {
|
||||
int TrueTypeFontFile::seekTable(const char *tag) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nTables; ++i) {
|
||||
@@ -3168,7 +3169,7 @@ int TrueTypeFontFile::seekTable(char *tag) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int TrueTypeFontFile::seekTableIdx(char *tag) {
|
||||
int TrueTypeFontFile::seekTableIdx(const char *tag) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nTables; ++i) {
|
||||
@@ -3179,10 +3180,10 @@ int TrueTypeFontFile::seekTableIdx(char *tag) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
void TrueTypeFontFile::cvtEncoding(char **encodingA, GBool pdfFontHasEncoding,
|
||||
void TrueTypeFontFile::cvtEncoding(const char **encodingA, GBool pdfFontHasEncoding,
|
||||
FontFileOutputFunc outputFunc,
|
||||
void *outputStream) {
|
||||
char *name;
|
||||
const char *name;
|
||||
char buf[64];
|
||||
int i;
|
||||
|
||||
@@ -3206,7 +3207,7 @@ void TrueTypeFontFile::cvtEncoding(char **encodingA, GBool pdfFontHasEncoding,
|
||||
(*outputFunc)(outputStream, "readonly def\n", 13);
|
||||
}
|
||||
|
||||
void TrueTypeFontFile::cvtCharStrings(char **encodingA,
|
||||
void TrueTypeFontFile::cvtCharStrings(const char **encodingA,
|
||||
CharCodeToUnicode *toUnicode,
|
||||
GBool pdfFontHasEncoding,
|
||||
FontFileOutputFunc outputFunc,
|
||||
@@ -3214,7 +3215,7 @@ void TrueTypeFontFile::cvtCharStrings(char **encodingA,
|
||||
int unicodeCmap, macRomanCmap, msSymbolCmap;
|
||||
int nCmaps, cmapPlatform, cmapEncoding, cmapFmt, cmapOffset;
|
||||
T42FontIndexMode mode;
|
||||
char *name;
|
||||
const char *name;
|
||||
char buf[64], buf2[16];
|
||||
Unicode u;
|
||||
int pos, i, j, k;
|
||||
@@ -3607,7 +3608,7 @@ void TrueTypeFontFile::cvtSfnts(FontFileOutputFunc outputFunc,
|
||||
gfree(locaTable);
|
||||
}
|
||||
|
||||
void TrueTypeFontFile::dumpString(char *s, int length,
|
||||
void TrueTypeFontFile::dumpString(const char *s, int length,
|
||||
FontFileOutputFunc outputFunc,
|
||||
void *outputStream) {
|
||||
char buf[64];
|
||||
@@ -3635,7 +3636,7 @@ void TrueTypeFontFile::dumpString(char *s, int length,
|
||||
(*outputFunc)(outputStream, "00>\n", 4);
|
||||
}
|
||||
|
||||
Guint TrueTypeFontFile::computeTableChecksum(char *data, int length) {
|
||||
Guint TrueTypeFontFile::computeTableChecksum(const char *data, int length) {
|
||||
Guint checksum, word;
|
||||
int i;
|
||||
|
||||
|
||||
+29
-29
@@ -24,7 +24,7 @@ class CharCodeToUnicode;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
typedef void (*FontFileOutputFunc)(void *stream, char *data, int len);
|
||||
typedef void (*FontFileOutputFunc)(void *stream, const char *data, int len);
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// FontFile
|
||||
@@ -38,11 +38,11 @@ public:
|
||||
|
||||
// Returns the font name, as specified internally by the font file.
|
||||
// Returns NULL if no name is available.
|
||||
virtual char *getName() = 0;
|
||||
virtual const char *getName() = 0;
|
||||
|
||||
// Returns the custom font encoding, or NULL if the encoding is not
|
||||
// available.
|
||||
virtual char **getEncoding() = 0;
|
||||
virtual const char **getEncoding() = 0;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@@ -52,10 +52,10 @@ public:
|
||||
class Type1FontFile: public FontFile {
|
||||
public:
|
||||
|
||||
Type1FontFile(char *file, int len);
|
||||
Type1FontFile(const char *file, int len);
|
||||
virtual ~Type1FontFile();
|
||||
virtual char *getName() { return name; }
|
||||
virtual char **getEncoding() { return encoding; }
|
||||
virtual const char *getName() { return name; }
|
||||
virtual const char **getEncoding() { return (const char **)encoding; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -73,11 +73,11 @@ struct Type1CPrivateDict;
|
||||
class Type1CFontFile: public FontFile {
|
||||
public:
|
||||
|
||||
Type1CFontFile(char *fileA, int lenA);
|
||||
Type1CFontFile(const char *fileA, int lenA);
|
||||
virtual ~Type1CFontFile();
|
||||
|
||||
virtual char *getName();
|
||||
virtual char **getEncoding();
|
||||
virtual const char *getName();
|
||||
virtual const char **getEncoding();
|
||||
|
||||
// Convert to a Type 1 font, suitable for embedding in a PostScript
|
||||
// file. The name will be used as the PostScript font name.
|
||||
@@ -86,13 +86,13 @@ public:
|
||||
// Convert to a Type 0 CIDFont, suitable for embedding in a
|
||||
// PostScript file. The name will be used as the PostScript font
|
||||
// name.
|
||||
void convertToCIDType0(char *psName,
|
||||
void convertToCIDType0(const char *psName,
|
||||
FontFileOutputFunc outputFuncA, void *outputStreamA);
|
||||
|
||||
// Convert to a Type 0 (but non-CID) composite font, suitable for
|
||||
// embedding in a PostScript file. The name will be used as the
|
||||
// PostScript font name.
|
||||
void convertToType0(char *psName,
|
||||
void convertToType0(const char *psName,
|
||||
FontFileOutputFunc outputFuncA, void *outputStreamA);
|
||||
|
||||
private:
|
||||
@@ -102,16 +102,16 @@ private:
|
||||
void readPrivateDict(Type1CPrivateDict *privateDict,
|
||||
int offset, int size);
|
||||
Gushort *readCharset(int charset, int nGlyphs);
|
||||
void eexecWrite(char *s);
|
||||
void eexecCvtGlyph(char *glyphName, Guchar *s, int n);
|
||||
void eexecWrite(const char *s);
|
||||
void eexecCvtGlyph(const char *glyphName, Guchar *s, int n);
|
||||
void cvtGlyph(Guchar *s, int n);
|
||||
void cvtGlyphWidth(GBool useOp);
|
||||
void eexecDumpNum(double x, GBool fpA);
|
||||
void eexecDumpOp1(int opA);
|
||||
void eexecDumpOp2(int opA);
|
||||
void eexecWriteCharstring(Guchar *s, int n);
|
||||
void getDeltaInt(char *buf, char *key, double *opA, int n);
|
||||
void getDeltaReal(char *buf, char *key, double *opA, int n);
|
||||
void getDeltaInt(char *buf, const char *key, double *opA, int n);
|
||||
void getDeltaReal(char *buf, const char *key, double *opA, int n);
|
||||
int getIndexLen(Guchar *indexPtr);
|
||||
Guchar *getIndexValPtr(Guchar *indexPtr, int i);
|
||||
Guchar *getIndexEnd(Guchar *indexPtr);
|
||||
@@ -119,7 +119,7 @@ private:
|
||||
double getNum(Guchar **ptr, GBool *fp);
|
||||
char *getString(int sid, char *buf);
|
||||
|
||||
char *file;
|
||||
const char *file;
|
||||
int len;
|
||||
|
||||
GString *name;
|
||||
@@ -153,22 +153,22 @@ struct TTFontTableHdr;
|
||||
class TrueTypeFontFile: public FontFile {
|
||||
public:
|
||||
|
||||
TrueTypeFontFile(char *fileA, int lenA);
|
||||
TrueTypeFontFile(const char *fileA, int lenA);
|
||||
~TrueTypeFontFile();
|
||||
|
||||
// This always returns NULL, since it's probably better to trust the
|
||||
// font name in the PDF file rather than the one in the TrueType
|
||||
// font file.
|
||||
virtual char *getName();
|
||||
virtual const char *getName();
|
||||
|
||||
virtual char **getEncoding();
|
||||
virtual const char **getEncoding();
|
||||
|
||||
// Convert to a Type 42 font, suitable for embedding in a PostScript
|
||||
// file. The name will be used as the PostScript font name (so we
|
||||
// don't need to depend on the 'name' table in the font). The
|
||||
// encoding is needed because the PDF Font object can modify the
|
||||
// encoding.
|
||||
void convertToType42(char *name, char **encodingA,
|
||||
void convertToType42(const char *name, const char **encodingA,
|
||||
CharCodeToUnicode *toUnicode,
|
||||
GBool pdfFontHasEncoding,
|
||||
FontFileOutputFunc outputFunc, void *outputStream);
|
||||
@@ -177,14 +177,14 @@ public:
|
||||
// PostScript file. The name will be used as the PostScript font
|
||||
// name (so we don't need to depend on the 'name' table in the
|
||||
// font).
|
||||
void convertToCIDType2(char *name, Gushort *cidMap, int nCIDs,
|
||||
void convertToCIDType2(const char *name, Gushort *cidMap, int nCIDs,
|
||||
FontFileOutputFunc outputFunc, void *outputStream);
|
||||
|
||||
// Convert to a Type 0 (but non-CID) composite font, suitable for
|
||||
// embedding in a PostScript file. The name will be used as the
|
||||
// PostScript font name (so we don't need to depend on the 'name'
|
||||
// table in the font).
|
||||
void convertToType0(char *name, Gushort *cidMap, int nCIDs,
|
||||
void convertToType0(const char *name, Gushort *cidMap, int nCIDs,
|
||||
FontFileOutputFunc outputFunc, void *outputStream);
|
||||
|
||||
// Write a TTF file, filling in any missing tables that are required
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
char *file;
|
||||
const char *file;
|
||||
int len;
|
||||
|
||||
char **encoding;
|
||||
@@ -212,19 +212,19 @@ private:
|
||||
int getShort(int pos);
|
||||
Guint getULong(int pos);
|
||||
double getFixed(int pos);
|
||||
int seekTable(char *tag);
|
||||
int seekTableIdx(char *tag);
|
||||
void cvtEncoding(char **encodingA, GBool pdfFontHasEncoding,
|
||||
int seekTable(const char *tag);
|
||||
int seekTableIdx(const char *tag);
|
||||
void cvtEncoding(const char **encodingA, GBool pdfFontHasEncoding,
|
||||
FontFileOutputFunc outputFunc, void *outputStream);
|
||||
void cvtCharStrings(char **encodingA, CharCodeToUnicode *toUnicode,
|
||||
void cvtCharStrings(const char **encodingA, CharCodeToUnicode *toUnicode,
|
||||
GBool pdfFontHasEncoding,
|
||||
FontFileOutputFunc outputFunc, void *outputStream);
|
||||
int getCmapEntry(int cmapFmt, int pos, int code);
|
||||
void cvtSfnts(FontFileOutputFunc outputFunc, void *outputStream,
|
||||
GString *name);
|
||||
void dumpString(char *s, int length,
|
||||
void dumpString(const char *s, int length,
|
||||
FontFileOutputFunc outputFunc, void *outputStream);
|
||||
Guint computeTableChecksum(char *data, int length);
|
||||
Guint computeTableChecksum(const char *data, int length);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -720,7 +720,7 @@ enum PSOp {
|
||||
// Note: 'if' and 'ifelse' are parsed separately.
|
||||
// The rest are listed here in alphabetical order.
|
||||
// The index in this table is equivalent to the entry in PSOp.
|
||||
char *psOpNames[] = {
|
||||
const char *psOpNames[] = {
|
||||
"abs",
|
||||
"add",
|
||||
"and",
|
||||
|
||||
+13
-13
@@ -31,8 +31,8 @@
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
struct StdFontMapEntry {
|
||||
char *altName;
|
||||
char *properName;
|
||||
const char *altName;
|
||||
const char *properName;
|
||||
};
|
||||
|
||||
static StdFontMapEntry stdFontMap[] = {
|
||||
@@ -90,7 +90,7 @@ static StdFontMapEntry stdFontMap[] = {
|
||||
// GfxFont
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
GfxFont *GfxFont::makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict) {
|
||||
GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict) {
|
||||
GString *nameA;
|
||||
GfxFont *font;
|
||||
Object obj1;
|
||||
@@ -126,7 +126,7 @@ GfxFont *GfxFont::makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict) {
|
||||
return font;
|
||||
}
|
||||
|
||||
GfxFont::GfxFont(char *tagA, Ref idA, GString *nameA) {
|
||||
GfxFont::GfxFont(const char *tagA, Ref idA, GString *nameA) {
|
||||
ok = gFalse;
|
||||
tag = new GString(tagA);
|
||||
id = idA;
|
||||
@@ -373,18 +373,18 @@ char *GfxFont::readEmbFontFile(XRef *xref, int *len) {
|
||||
// Gfx8BitFont
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
|
||||
Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
|
||||
GfxFontType typeA, Dict *fontDict):
|
||||
GfxFont(tagA, idA, nameA)
|
||||
{
|
||||
BuiltinFont *builtinFont;
|
||||
char **baseEnc;
|
||||
const char **baseEnc;
|
||||
GBool baseEncFromFontFile;
|
||||
char *buf;
|
||||
int len;
|
||||
FontFile *fontFile;
|
||||
int code, code2;
|
||||
char *charName;
|
||||
const char *charName;
|
||||
GBool missing, hex;
|
||||
Unicode toUnicode[256];
|
||||
double mul;
|
||||
@@ -601,7 +601,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
|
||||
} else if (obj3.isName()) {
|
||||
if (code < 256) {
|
||||
if (encFree[code]) {
|
||||
gfree(enc[code]);
|
||||
gfree((void *)enc[code]);
|
||||
}
|
||||
enc[code] = copyString(obj3.getName());
|
||||
encFree[code] = gTrue;
|
||||
@@ -777,7 +777,7 @@ Gfx8BitFont::~Gfx8BitFont() {
|
||||
|
||||
for (i = 0; i < 256; ++i) {
|
||||
if (encFree[i] && enc[i]) {
|
||||
gfree(enc[i]);
|
||||
gfree((void *)enc[i]);
|
||||
}
|
||||
}
|
||||
ctu->decRefCnt();
|
||||
@@ -789,7 +789,7 @@ Gfx8BitFont::~Gfx8BitFont() {
|
||||
}
|
||||
}
|
||||
|
||||
int Gfx8BitFont::getNextChar(char *s, int len, CharCode *code,
|
||||
int Gfx8BitFont::getNextChar(const char *s, int len, CharCode *code,
|
||||
Unicode *u, int uSize, int *uLen,
|
||||
double *dx, double *dy, double *ox, double *oy) {
|
||||
CharCode c;
|
||||
@@ -837,7 +837,7 @@ static int cmpWidthExcepV(const void *w1, const void *w2) {
|
||||
((GfxFontCIDWidthExcepV *)w2)->first;
|
||||
}
|
||||
|
||||
GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
|
||||
GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
|
||||
Dict *fontDict):
|
||||
GfxFont(tagA, idA, nameA)
|
||||
{
|
||||
@@ -1153,7 +1153,7 @@ GfxCIDFont::~GfxCIDFont() {
|
||||
}
|
||||
}
|
||||
|
||||
int GfxCIDFont::getNextChar(char *s, int len, CharCode *code,
|
||||
int GfxCIDFont::getNextChar(const char *s, int len, CharCode *code,
|
||||
Unicode *u, int uSize, int *uLen,
|
||||
double *dx, double *dy, double *ox, double *oy) {
|
||||
CID cid;
|
||||
@@ -1292,7 +1292,7 @@ GfxFontDict::~GfxFontDict() {
|
||||
gfree(fonts);
|
||||
}
|
||||
|
||||
GfxFont *GfxFontDict::lookup(char *tag) {
|
||||
GfxFont *GfxFontDict::lookup(const char *tag) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < numFonts; ++i) {
|
||||
|
||||
+12
-12
@@ -84,9 +84,9 @@ class GfxFont {
|
||||
public:
|
||||
|
||||
// Build a GfxFont object.
|
||||
static GfxFont *makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict);
|
||||
static GfxFont *makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict);
|
||||
|
||||
GfxFont(char *tagA, Ref idA, GString *nameA);
|
||||
GfxFont(const char *tagA, Ref idA, GString *nameA);
|
||||
|
||||
virtual ~GfxFont();
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
Ref *getID() { return &id; }
|
||||
|
||||
// Does this font match the tag?
|
||||
GBool matches(char *tagA) { return !tag->cmp(tagA); }
|
||||
GBool matches(const char *tagA) { return !tag->cmp(tagA); }
|
||||
|
||||
// Get base font name.
|
||||
GString *getName() { return name; }
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
// is the number of entries available in <u>, and <uLen> is set to
|
||||
// the number actually used. Returns the number of bytes used by
|
||||
// the char code.
|
||||
virtual int getNextChar(char *s, int len, CharCode *code,
|
||||
virtual int getNextChar(const char *s, int len, CharCode *code,
|
||||
Unicode *u, int uSize, int *uLen,
|
||||
double *dx, double *dy, double *ox, double *oy) = 0;
|
||||
|
||||
@@ -184,23 +184,23 @@ protected:
|
||||
class Gfx8BitFont: public GfxFont {
|
||||
public:
|
||||
|
||||
Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
|
||||
Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
|
||||
GfxFontType typeA, Dict *fontDict);
|
||||
|
||||
virtual ~Gfx8BitFont();
|
||||
|
||||
virtual int getNextChar(char *s, int len, CharCode *code,
|
||||
virtual int getNextChar(const char *s, int len, CharCode *code,
|
||||
Unicode *u, int uSize, int *uLen,
|
||||
double *dx, double *dy, double *ox, double *oy);
|
||||
|
||||
// Return the encoding.
|
||||
char **getEncoding() { return enc; }
|
||||
const char **getEncoding() { return enc; }
|
||||
|
||||
// Return the Unicode map.
|
||||
CharCodeToUnicode *getToUnicode();
|
||||
|
||||
// Return the character name associated with <code>.
|
||||
char *getCharName(int code) { return enc[code]; }
|
||||
const char *getCharName(int code) { return enc[code]; }
|
||||
|
||||
// Returns true if the PDF font specified an encoding.
|
||||
GBool getHasEncoding() { return hasEncoding; }
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
char *enc[256]; // char code --> char name
|
||||
const char *enc[256]; // char code --> char name
|
||||
char encFree[256]; // boolean for each char name: if set,
|
||||
// the string is malloc'ed
|
||||
CharCodeToUnicode *ctu; // char code --> Unicode
|
||||
@@ -236,14 +236,14 @@ private:
|
||||
class GfxCIDFont: public GfxFont {
|
||||
public:
|
||||
|
||||
GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
|
||||
GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GString *nameA,
|
||||
Dict *fontDict);
|
||||
|
||||
virtual ~GfxCIDFont();
|
||||
|
||||
virtual GBool isCIDFont() { return gTrue; }
|
||||
|
||||
virtual int getNextChar(char *s, int len, CharCode *code,
|
||||
virtual int getNextChar(const char *s, int len, CharCode *code,
|
||||
Unicode *u, int uSize, int *uLen,
|
||||
double *dx, double *dy, double *ox, double *oy);
|
||||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
~GfxFontDict();
|
||||
|
||||
// Get the specified font.
|
||||
GfxFont *lookup(char *tag);
|
||||
GfxFont *lookup(const char *tag);
|
||||
|
||||
// Iterative access.
|
||||
int getNumFonts() { return numFonts; }
|
||||
|
||||
@@ -30,7 +30,7 @@ static inline double clip01(double x) {
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
static char *gfxColorSpaceModeNames[] = {
|
||||
static const char *gfxColorSpaceModeNames[] = {
|
||||
"DeviceGray",
|
||||
"CalGray",
|
||||
"DeviceRGB",
|
||||
@@ -121,7 +121,7 @@ int GfxColorSpace::getNumColorSpaceModes() {
|
||||
return nGfxColorSpaceModes;
|
||||
}
|
||||
|
||||
char *GfxColorSpace::getColorSpaceModeName(int idx) {
|
||||
const char *GfxColorSpace::getColorSpaceModeName(int idx) {
|
||||
return gfxColorSpaceModeNames[idx];
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
static int getNumColorSpaceModes();
|
||||
|
||||
// Return the name of the <idx>th color space mode.
|
||||
static char *getColorSpaceModeName(int idx);
|
||||
static const char *getColorSpaceModeName(int idx);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
+18
-18
@@ -70,7 +70,7 @@ DisplayFontParam::DisplayFontParam(GString *nameA,
|
||||
}
|
||||
}
|
||||
|
||||
DisplayFontParam::DisplayFontParam(char *nameA, char *xlfdA, char *encodingA) {
|
||||
DisplayFontParam::DisplayFontParam(const char *nameA, const char *xlfdA, const char *encodingA) {
|
||||
name = new GString(nameA);
|
||||
kind = displayFontX;
|
||||
x.xlfd = new GString(xlfdA);
|
||||
@@ -125,7 +125,7 @@ PSFontParam::~PSFontParam() {
|
||||
// parsing
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
GlobalParams::GlobalParams(char *cfgFileName) {
|
||||
GlobalParams::GlobalParams(const char *cfgFileName) {
|
||||
UnicodeMap *map;
|
||||
DisplayFontParam *dfp;
|
||||
GString *fileName;
|
||||
@@ -157,7 +157,7 @@ GlobalParams::GlobalParams(char *cfgFileName) {
|
||||
displayCIDFonts = new GHash();
|
||||
displayNamedCIDFonts = new GHash();
|
||||
#if HAVE_PAPER_H
|
||||
char *paperName;
|
||||
const char *paperName;
|
||||
const struct paper *paperType;
|
||||
paperinit();
|
||||
if ((paperName = systempapername())) {
|
||||
@@ -644,7 +644,7 @@ void GlobalParams::parsePSFont(GList *tokens, GString *fileName, int line) {
|
||||
psFonts->add(param->pdfFontName, param);
|
||||
}
|
||||
|
||||
void GlobalParams::parsePSFont16(char *cmdName, GList *fontList,
|
||||
void GlobalParams::parsePSFont16(const char *cmdName, GList *fontList,
|
||||
GList *tokens, GString *fileName, int line) {
|
||||
PSFontParam *param;
|
||||
int wMode;
|
||||
@@ -724,7 +724,7 @@ void GlobalParams::parseInitialZoom(GList *tokens,
|
||||
initialZoom = ((GString *)tokens->get(1))->copy();
|
||||
}
|
||||
|
||||
void GlobalParams::parseFontRastControl(char *cmdName, FontRastControl *val,
|
||||
void GlobalParams::parseFontRastControl(const char *cmdName, FontRastControl *val,
|
||||
GList *tokens, GString *fileName,
|
||||
int line) {
|
||||
GString *tok;
|
||||
@@ -741,7 +741,7 @@ void GlobalParams::parseFontRastControl(char *cmdName, FontRastControl *val,
|
||||
}
|
||||
}
|
||||
|
||||
void GlobalParams::parseCommand(char *cmdName, GString **val,
|
||||
void GlobalParams::parseCommand(const char *cmdName, GString **val,
|
||||
GList *tokens, GString *fileName, int line) {
|
||||
if (tokens->getLength() != 2) {
|
||||
error(-1, "Bad '%s' config file command (%s:%d)",
|
||||
@@ -754,7 +754,7 @@ void GlobalParams::parseCommand(char *cmdName, GString **val,
|
||||
*val = ((GString *)tokens->get(1))->copy();
|
||||
}
|
||||
|
||||
void GlobalParams::parseYesNo(char *cmdName, GBool *flag,
|
||||
void GlobalParams::parseYesNo(const char *cmdName, GBool *flag,
|
||||
GList *tokens, GString *fileName, int line) {
|
||||
GString *tok;
|
||||
|
||||
@@ -826,11 +826,11 @@ GlobalParams::~GlobalParams() {
|
||||
// accessors
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
CharCode GlobalParams::getMacRomanCharCode(char *charName) {
|
||||
CharCode GlobalParams::getMacRomanCharCode(const char *charName) {
|
||||
return macRomanReverseMap->lookup(charName);
|
||||
}
|
||||
|
||||
Unicode GlobalParams::mapNameToUnicode(char *charName) {
|
||||
Unicode GlobalParams::mapNameToUnicode(const char *charName) {
|
||||
return nameToUnicode->lookup(charName);
|
||||
}
|
||||
|
||||
@@ -1076,7 +1076,7 @@ GBool GlobalParams::getTextKeepTinyChars() {
|
||||
}
|
||||
|
||||
GString *GlobalParams::findFontFile(GString *fontName,
|
||||
char *ext1, char *ext2) {
|
||||
const char *ext1, const char *ext2) {
|
||||
GString *dir, *fileName;
|
||||
FILE *f;
|
||||
int i;
|
||||
@@ -1221,7 +1221,7 @@ void GlobalParams::addDisplayFont(DisplayFontParam *param) {
|
||||
globalParamsUnlock;
|
||||
}
|
||||
|
||||
void GlobalParams::setPSFile(char *file) {
|
||||
void GlobalParams::setPSFile(const char *file) {
|
||||
globalParamsLock;
|
||||
if (psFile) {
|
||||
delete psFile;
|
||||
@@ -1239,7 +1239,7 @@ void GlobalParams::setPSImageableArea(int left, int bottom, int right, int top)
|
||||
globalParamsUnlock;
|
||||
}
|
||||
|
||||
GBool GlobalParams::setPSPaperSize(char *size) {
|
||||
GBool GlobalParams::setPSPaperSize(const char *size) {
|
||||
globalParamsLock;
|
||||
if (!strcmp(size, "letter")) {
|
||||
psPaperWidth = 612;
|
||||
@@ -1332,14 +1332,14 @@ void GlobalParams::setPSASCIIHex(GBool hex) {
|
||||
globalParamsUnlock;
|
||||
}
|
||||
|
||||
void GlobalParams::setTextEncoding(char *encodingName) {
|
||||
void GlobalParams::setTextEncoding(const char *encodingName) {
|
||||
globalParamsLock;
|
||||
delete textEncoding;
|
||||
textEncoding = new GString(encodingName);
|
||||
globalParamsUnlock;
|
||||
}
|
||||
|
||||
GBool GlobalParams::setTextEOL(char *s) {
|
||||
GBool GlobalParams::setTextEOL(const char *s) {
|
||||
globalParamsLock;
|
||||
if (!strcmp(s, "unix")) {
|
||||
textEOL = eolUnix;
|
||||
@@ -1361,14 +1361,14 @@ void GlobalParams::setTextKeepTinyChars(GBool keep) {
|
||||
globalParamsUnlock;
|
||||
}
|
||||
|
||||
void GlobalParams::setInitialZoom(char *s) {
|
||||
void GlobalParams::setInitialZoom(const char *s) {
|
||||
globalParamsLock;
|
||||
delete initialZoom;
|
||||
initialZoom = new GString(s);
|
||||
globalParamsUnlock;
|
||||
}
|
||||
|
||||
GBool GlobalParams::setT1libControl(char *s) {
|
||||
GBool GlobalParams::setT1libControl(const char *s) {
|
||||
GBool ok;
|
||||
|
||||
globalParamsLock;
|
||||
@@ -1377,7 +1377,7 @@ GBool GlobalParams::setT1libControl(char *s) {
|
||||
return ok;
|
||||
}
|
||||
|
||||
GBool GlobalParams::setFreeTypeControl(char *s) {
|
||||
GBool GlobalParams::setFreeTypeControl(const char *s) {
|
||||
GBool ok;
|
||||
|
||||
globalParamsLock;
|
||||
@@ -1386,7 +1386,7 @@ GBool GlobalParams::setFreeTypeControl(char *s) {
|
||||
return ok;
|
||||
}
|
||||
|
||||
GBool GlobalParams::setFontRastControl(FontRastControl *val, char *s) {
|
||||
GBool GlobalParams::setFontRastControl(FontRastControl *val, const char *s) {
|
||||
if (!strcmp(s, "none")) {
|
||||
*val = fontRastNone;
|
||||
} else if (!strcmp(s, "plain")) {
|
||||
|
||||
+17
-17
@@ -69,7 +69,7 @@ public:
|
||||
};
|
||||
|
||||
DisplayFontParam(GString *nameA, DisplayFontParamKind kindA);
|
||||
DisplayFontParam(char *nameA, char *xlfdA, char *encodingA);
|
||||
DisplayFontParam(const char *nameA, const char *xlfdA, const char *encodingA);
|
||||
~DisplayFontParam();
|
||||
};
|
||||
|
||||
@@ -125,15 +125,15 @@ public:
|
||||
|
||||
// Initialize the global parameters by attempting to read a config
|
||||
// file.
|
||||
GlobalParams(char *cfgFileName);
|
||||
GlobalParams(const char *cfgFileName);
|
||||
|
||||
~GlobalParams();
|
||||
|
||||
//----- accessors
|
||||
|
||||
CharCode getMacRomanCharCode(char *charName);
|
||||
CharCode getMacRomanCharCode(const char *charName);
|
||||
|
||||
Unicode mapNameToUnicode(char *charName);
|
||||
Unicode mapNameToUnicode(const char *charName);
|
||||
FILE *getCIDToUnicodeFile(GString *collection);
|
||||
UnicodeMap *getResidentUnicodeMap(GString *encodingName);
|
||||
FILE *getUnicodeMapFile(GString *encodingName);
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
GBool getPSASCIIHex();
|
||||
EndOfLineKind getTextEOL();
|
||||
GBool getTextKeepTinyChars();
|
||||
GString *findFontFile(GString *fontName, char *ext1, char *ext2);
|
||||
GString *findFontFile(GString *fontName, const char *ext1, const char *ext2);
|
||||
GString *getInitialZoom();
|
||||
FontRastControl getT1libControl();
|
||||
FontRastControl getFreeTypeControl();
|
||||
@@ -175,8 +175,8 @@ public:
|
||||
//----- functions to set parameters
|
||||
|
||||
void addDisplayFont(DisplayFontParam *param);
|
||||
void setPSFile(char *file);
|
||||
GBool setPSPaperSize(char *size);
|
||||
void setPSFile(const char *file);
|
||||
GBool setPSPaperSize(const char *size);
|
||||
void setPSImageableArea(int left, int bottom, int right, int top);
|
||||
void setPSPaperWidth(int width);
|
||||
void setPSPaperHeight(int height);
|
||||
@@ -188,12 +188,12 @@ public:
|
||||
void setPSEmbedCIDTrueType(GBool embed);
|
||||
void setPSOPI(GBool opi);
|
||||
void setPSASCIIHex(GBool hex);
|
||||
void setTextEncoding(char *encodingName);
|
||||
GBool setTextEOL(char *s);
|
||||
void setTextEncoding(const char *encodingName);
|
||||
GBool setTextEOL(const char *s);
|
||||
void setTextKeepTinyChars(GBool keep);
|
||||
void setInitialZoom(char *s);
|
||||
GBool setT1libControl(char *s);
|
||||
GBool setFreeTypeControl(char *s);
|
||||
void setInitialZoom(const char *s);
|
||||
GBool setT1libControl(const char *s);
|
||||
GBool setFreeTypeControl(const char *s);
|
||||
void setMapNumericCharNames(GBool map);
|
||||
void setPrintCommands(GBool printCommandsA);
|
||||
void setErrQuiet(GBool errQuietA);
|
||||
@@ -213,20 +213,20 @@ private:
|
||||
void parsePSPaperSize(GList *tokens, GString *fileName, int line);
|
||||
void parsePSLevel(GList *tokens, GString *fileName, int line);
|
||||
void parsePSFont(GList *tokens, GString *fileName, int line);
|
||||
void parsePSFont16(char *cmdName, GList *fontList,
|
||||
void parsePSFont16(const char *cmdName, GList *fontList,
|
||||
GList *tokens, GString *fileName, int line);
|
||||
void parseTextEncoding(GList *tokens, GString *fileName, int line);
|
||||
void parseTextEOL(GList *tokens, GString *fileName, int line);
|
||||
void parseFontDir(GList *tokens, GString *fileName, int line);
|
||||
void parseInitialZoom(GList *tokens, GString *fileName, int line);
|
||||
void parseFontRastControl(char *cmdName, FontRastControl *val,
|
||||
void parseFontRastControl(const char *cmdName, FontRastControl *val,
|
||||
GList *tokens, GString *fileName, int line);
|
||||
void parseCommand(char *cmdName, GString **val,
|
||||
void parseCommand(const char *cmdName, GString **val,
|
||||
GList *tokens, GString *fileName, int line);
|
||||
void parseYesNo(char *cmdName, GBool *flag,
|
||||
void parseYesNo(const char *cmdName, GBool *flag,
|
||||
GList *tokens, GString *fileName, int line);
|
||||
UnicodeMap *getUnicodeMap2(GString *encodingName);
|
||||
GBool setFontRastControl(FontRastControl *val, char *s);
|
||||
GBool setFontRastControl(FontRastControl *val, const char *s);
|
||||
|
||||
//----- static tables
|
||||
|
||||
|
||||
@@ -1452,7 +1452,7 @@ int JBIG2Stream::lookChar() {
|
||||
return EOF;
|
||||
}
|
||||
|
||||
GString *JBIG2Stream::getPSFilter(char *indent) {
|
||||
GString *JBIG2Stream::getPSFilter(const char *indent) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(char *indent);
|
||||
virtual GString *getPSFilter(const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
||||
private:
|
||||
|
||||
@@ -47,7 +47,7 @@ NameToCharCode::~NameToCharCode() {
|
||||
gfree(tab);
|
||||
}
|
||||
|
||||
void NameToCharCode::add(char *name, CharCode c) {
|
||||
void NameToCharCode::add(const char *name, CharCode c) {
|
||||
NameToCharCodeEntry *oldTab;
|
||||
int h, i, oldSize;
|
||||
|
||||
@@ -89,7 +89,7 @@ void NameToCharCode::add(char *name, CharCode c) {
|
||||
++len;
|
||||
}
|
||||
|
||||
CharCode NameToCharCode::lookup(char *name) {
|
||||
CharCode NameToCharCode::lookup(const char *name) {
|
||||
int h;
|
||||
|
||||
h = hash(name);
|
||||
@@ -104,8 +104,8 @@ CharCode NameToCharCode::lookup(char *name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NameToCharCode::hash(char *name) {
|
||||
char *p;
|
||||
int NameToCharCode::hash(const char *name) {
|
||||
const char *p;
|
||||
unsigned int h;
|
||||
|
||||
h = 0;
|
||||
|
||||
@@ -27,12 +27,12 @@ public:
|
||||
NameToCharCode();
|
||||
~NameToCharCode();
|
||||
|
||||
void add(char *name, CharCode c);
|
||||
CharCode lookup(char *name);
|
||||
void add(const char *name, CharCode c);
|
||||
CharCode lookup(const char *name);
|
||||
|
||||
private:
|
||||
|
||||
int hash(char *name);
|
||||
int hash(const char *name);
|
||||
|
||||
NameToCharCodeEntry *tab;
|
||||
int size;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
static struct {
|
||||
Unicode u;
|
||||
char *name;
|
||||
const char *name;
|
||||
} nameToUnicodeTab[] = {
|
||||
{0x0021, "!"},
|
||||
{0x0023, "#"},
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// Object
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
char *objTypeNames[numObjTypes] = {
|
||||
const char *objTypeNames[numObjTypes] = {
|
||||
"boolean",
|
||||
"integer",
|
||||
"real",
|
||||
@@ -134,7 +134,7 @@ void Object::free() {
|
||||
type = objNone;
|
||||
}
|
||||
|
||||
char *Object::getTypeName() {
|
||||
const char *Object::getTypeName() {
|
||||
return objTypeNames[type];
|
||||
}
|
||||
|
||||
|
||||
+21
-21
@@ -89,7 +89,7 @@ public:
|
||||
{ initObj(objReal); real = realA; return this; }
|
||||
Object *initString(GString *stringA)
|
||||
{ initObj(objString); string = stringA; return this; }
|
||||
Object *initName(char *nameA)
|
||||
Object *initName(const char *nameA)
|
||||
{ initObj(objName); name = copyString(nameA); return this; }
|
||||
Object *initNull()
|
||||
{ initObj(objNull); return this; }
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
Object *initStream(Stream *streamA);
|
||||
Object *initRef(int numA, int genA)
|
||||
{ initObj(objRef); ref.num = numA; ref.gen = genA; return this; }
|
||||
Object *initCmd(char *cmdA)
|
||||
Object *initCmd(const char *cmdA)
|
||||
{ initObj(objCmd); cmd = copyString(cmdA); return this; }
|
||||
Object *initError()
|
||||
{ initObj(objError); return this; }
|
||||
@@ -134,11 +134,11 @@ public:
|
||||
GBool isNone() { return type == objNone; }
|
||||
|
||||
// Special type checking.
|
||||
GBool isName(char *nameA)
|
||||
GBool isName(const char *nameA)
|
||||
{ return type == objName && !strcmp(name, nameA); }
|
||||
GBool isDict(char *dictType);
|
||||
GBool isStream(char *dictType);
|
||||
GBool isCmd(char *cmdA)
|
||||
GBool isDict(const char *dictType);
|
||||
GBool isStream(const char *dictType);
|
||||
GBool isCmd(const char *cmdA)
|
||||
{ return type == objCmd && !strcmp(cmd, cmdA); }
|
||||
|
||||
// Accessors. NB: these assume object is of correct type.
|
||||
@@ -164,16 +164,16 @@ public:
|
||||
|
||||
// Dict accessors.
|
||||
int dictGetLength();
|
||||
void dictAdd(char *key, Object *val);
|
||||
GBool dictIs(char *dictType);
|
||||
Object *dictLookup(char *key, Object *obj);
|
||||
Object *dictLookupNF(char *key, Object *obj);
|
||||
char *dictGetKey(int i);
|
||||
void dictAdd(const char *key, Object *val);
|
||||
GBool dictIs(const char *dictType);
|
||||
Object *dictLookup(const char *key, Object *obj);
|
||||
Object *dictLookupNF(const char *key, Object *obj);
|
||||
const char *dictGetKey(int i);
|
||||
Object *dictGetVal(int i, Object *obj);
|
||||
Object *dictGetValNF(int i, Object *obj);
|
||||
|
||||
// Stream accessors.
|
||||
GBool streamIs(char *dictType);
|
||||
GBool streamIs(const char *dictType);
|
||||
void streamReset();
|
||||
void streamClose();
|
||||
int streamGetChar();
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
Dict *streamGetDict();
|
||||
|
||||
// Output.
|
||||
char *getTypeName();
|
||||
const char *getTypeName();
|
||||
void print(FILE *f = stdout);
|
||||
|
||||
// Memory testing.
|
||||
@@ -239,22 +239,22 @@ inline Object *Object::arrayGetNF(int i, Object *obj)
|
||||
inline int Object::dictGetLength()
|
||||
{ return dict->getLength(); }
|
||||
|
||||
inline void Object::dictAdd(char *key, Object *val)
|
||||
inline void Object::dictAdd(const char *key, Object *val)
|
||||
{ dict->add(key, val); }
|
||||
|
||||
inline GBool Object::dictIs(char *dictType)
|
||||
inline GBool Object::dictIs(const char *dictType)
|
||||
{ return dict->is(dictType); }
|
||||
|
||||
inline GBool Object::isDict(char *dictType)
|
||||
inline GBool Object::isDict(const char *dictType)
|
||||
{ return type == objDict && dictIs(dictType); }
|
||||
|
||||
inline Object *Object::dictLookup(char *key, Object *obj)
|
||||
inline Object *Object::dictLookup(const char *key, Object *obj)
|
||||
{ return dict->lookup(key, obj); }
|
||||
|
||||
inline Object *Object::dictLookupNF(char *key, Object *obj)
|
||||
inline Object *Object::dictLookupNF(const char *key, Object *obj)
|
||||
{ return dict->lookupNF(key, obj); }
|
||||
|
||||
inline char *Object::dictGetKey(int i)
|
||||
inline const char *Object::dictGetKey(int i)
|
||||
{ return dict->getKey(i); }
|
||||
|
||||
inline Object *Object::dictGetVal(int i, Object *obj)
|
||||
@@ -269,10 +269,10 @@ inline Object *Object::dictGetValNF(int i, Object *obj)
|
||||
|
||||
#include "Stream.h"
|
||||
|
||||
inline GBool Object::streamIs(char *dictType)
|
||||
inline GBool Object::streamIs(const char *dictType)
|
||||
{ return stream->getDict()->is(dictType); }
|
||||
|
||||
inline GBool Object::isStream(char *dictType)
|
||||
inline GBool Object::isStream(const char *dictType)
|
||||
{ return type == objStream && streamIs(dictType); }
|
||||
|
||||
inline void Object::streamReset()
|
||||
|
||||
+22
-22
@@ -44,7 +44,7 @@
|
||||
// PostScript prolog and setup
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
static char *prolog[] = {
|
||||
static const char *prolog[] = {
|
||||
"/xpdf 75 dict def xpdf begin",
|
||||
"% PDF special state",
|
||||
"/pdfDictSize 14 def",
|
||||
@@ -353,7 +353,7 @@ static char *prolog[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static char *cmapProlog[] = {
|
||||
static const char *cmapProlog[] = {
|
||||
"/CIDInit /ProcSet findresource begin",
|
||||
"10 dict begin",
|
||||
" begincmap",
|
||||
@@ -403,11 +403,11 @@ static char *cmapProlog[] = {
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
struct PSSubstFont {
|
||||
char *psName; // PostScript name
|
||||
const char *psName; // PostScript name
|
||||
double mWidth; // width of 'm' character
|
||||
};
|
||||
|
||||
static char *psFonts[] = {
|
||||
static const char *psFonts[] = {
|
||||
"Courier",
|
||||
"Courier-Bold",
|
||||
"Courier-Oblique",
|
||||
@@ -494,11 +494,11 @@ extern "C" {
|
||||
typedef void (*SignalFunc)(int);
|
||||
}
|
||||
|
||||
static void outputToFile(void *stream, char *data, int len) {
|
||||
static void outputToFile(void *stream, const char *data, int len) {
|
||||
fwrite(data, 1, len, (FILE *)stream);
|
||||
}
|
||||
|
||||
PSOutputDev::PSOutputDev(char *fileName, XRef *xrefA, Catalog *catalog,
|
||||
PSOutputDev::PSOutputDev(const char *fileName, XRef *xrefA, Catalog *catalog,
|
||||
int firstPage, int lastPage, PSOutMode modeA) {
|
||||
FILE *f;
|
||||
PSFileType fileTypeA;
|
||||
@@ -566,7 +566,7 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
|
||||
PDFRectangle *box;
|
||||
Dict *resDict;
|
||||
Annots *annots;
|
||||
char **p;
|
||||
const char **p;
|
||||
int pg;
|
||||
Object obj1, obj2;
|
||||
int i;
|
||||
@@ -872,10 +872,10 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
|
||||
GString *name;
|
||||
PSFontParam *fontParam;
|
||||
GString *psNameStr;
|
||||
char *psName;
|
||||
const char *psName;
|
||||
char type3Name[64], buf[16];
|
||||
UnicodeMap *uMap;
|
||||
char *charName;
|
||||
const char *charName;
|
||||
double xs, ys;
|
||||
int code;
|
||||
double w1, w2;
|
||||
@@ -1086,9 +1086,9 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
|
||||
}
|
||||
}
|
||||
writePS("/");
|
||||
writePSName(charName ? charName : (char *)".notdef");
|
||||
writePSName(charName ? charName : ".notdef");
|
||||
}
|
||||
writePS((i == 256-8) ? (char *)"]\n" : (char *)"\n");
|
||||
writePS((i == 256-8) ? "]\n" : "\n");
|
||||
}
|
||||
writePS("pdfMakeFont\n");
|
||||
}
|
||||
@@ -1098,7 +1098,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
|
||||
}
|
||||
}
|
||||
|
||||
void PSOutputDev::setupEmbeddedType1Font(Ref *id, char *psName) {
|
||||
void PSOutputDev::setupEmbeddedType1Font(Ref *id, const char *psName) {
|
||||
static char hexChar[17] = "0123456789abcdef";
|
||||
Object refObj, strObj, obj1, obj2;
|
||||
Dict *dict;
|
||||
@@ -1223,7 +1223,7 @@ void PSOutputDev::setupEmbeddedType1Font(Ref *id, char *psName) {
|
||||
|
||||
//~ This doesn't handle .pfb files or binary eexec data (which only
|
||||
//~ happens in pfb files?).
|
||||
void PSOutputDev::setupExternalType1Font(GString *fileName, char *psName) {
|
||||
void PSOutputDev::setupExternalType1Font(GString *fileName, const char *psName) {
|
||||
FILE *fontFile;
|
||||
int c;
|
||||
int i;
|
||||
@@ -1264,7 +1264,7 @@ void PSOutputDev::setupExternalType1Font(GString *fileName, char *psName) {
|
||||
}
|
||||
|
||||
void PSOutputDev::setupEmbeddedType1CFont(GfxFont *font, Ref *id,
|
||||
char *psName) {
|
||||
const char *psName) {
|
||||
char *fontBuf;
|
||||
int fontLen;
|
||||
Type1CFontFile *t1cFile;
|
||||
@@ -1302,7 +1302,7 @@ void PSOutputDev::setupEmbeddedType1CFont(GfxFont *font, Ref *id,
|
||||
}
|
||||
|
||||
void PSOutputDev::setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id,
|
||||
char *psName) {
|
||||
const char *psName) {
|
||||
char *fontBuf;
|
||||
int fontLen;
|
||||
TrueTypeFontFile *ttFile;
|
||||
@@ -1344,7 +1344,7 @@ void PSOutputDev::setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id,
|
||||
writePS("%%EndResource\n");
|
||||
}
|
||||
|
||||
void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, char *psName) {
|
||||
void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, const char *psName) {
|
||||
GString *fileName;
|
||||
char *fontBuf;
|
||||
int fontLen;
|
||||
@@ -1390,7 +1390,7 @@ void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, char *psName) {
|
||||
}
|
||||
|
||||
void PSOutputDev::setupEmbeddedCIDType0Font(GfxFont *font, Ref *id,
|
||||
char *psName) {
|
||||
const char *psName) {
|
||||
char *fontBuf;
|
||||
int fontLen;
|
||||
Type1CFontFile *t1cFile;
|
||||
@@ -1434,7 +1434,7 @@ void PSOutputDev::setupEmbeddedCIDType0Font(GfxFont *font, Ref *id,
|
||||
}
|
||||
|
||||
void PSOutputDev::setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id,
|
||||
char *psName) {
|
||||
const char *psName) {
|
||||
char *fontBuf;
|
||||
int fontLen;
|
||||
TrueTypeFontFile *ttFile;
|
||||
@@ -1481,7 +1481,7 @@ void PSOutputDev::setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id,
|
||||
writePS("%%EndResource\n");
|
||||
}
|
||||
|
||||
void PSOutputDev::setupType3Font(GfxFont *font, char *psName,
|
||||
void PSOutputDev::setupType3Font(GfxFont *font, const char *psName,
|
||||
Dict *parentResDict) {
|
||||
Dict *resDict;
|
||||
Dict *charProcs;
|
||||
@@ -3254,7 +3254,7 @@ void PSOutputDev::writePSChar(char c) {
|
||||
}
|
||||
}
|
||||
|
||||
void PSOutputDev::writePS(char *s) {
|
||||
void PSOutputDev::writePS(const char *s) {
|
||||
if (t3String) {
|
||||
t3String->append(s);
|
||||
} else {
|
||||
@@ -3300,8 +3300,8 @@ void PSOutputDev::writePSString(GString *s) {
|
||||
writePSChar(')');
|
||||
}
|
||||
|
||||
void PSOutputDev::writePSName(char *s) {
|
||||
char *p;
|
||||
void PSOutputDev::writePSName(const char *s) {
|
||||
const char *p;
|
||||
char c;
|
||||
|
||||
p = s;
|
||||
|
||||
+12
-12
@@ -45,13 +45,13 @@ enum PSFileType {
|
||||
psGeneric // write to a generic stream
|
||||
};
|
||||
|
||||
typedef void (*PSOutputFunc)(void *stream, char *data, int len);
|
||||
typedef void (*PSOutputFunc)(void *stream, const char *data, int len);
|
||||
|
||||
class PSOutputDev: public OutputDev {
|
||||
public:
|
||||
|
||||
// Open a PostScript output file, and write the prolog.
|
||||
PSOutputDev(char *fileName, XRef *xrefA, Catalog *catalog,
|
||||
PSOutputDev(const char *fileName, XRef *xrefA, Catalog *catalog,
|
||||
int firstPage, int lastPage, PSOutMode modeA);
|
||||
|
||||
// Open a PSOutputDev that will write to a generic stream.
|
||||
@@ -156,14 +156,14 @@ private:
|
||||
void setupResources(Dict *resDict);
|
||||
void setupFonts(Dict *resDict);
|
||||
void setupFont(GfxFont *font, Dict *parentResDict);
|
||||
void setupEmbeddedType1Font(Ref *id, char *psName);
|
||||
void setupExternalType1Font(GString *fileName, char *psName);
|
||||
void setupEmbeddedType1CFont(GfxFont *font, Ref *id, char *psName);
|
||||
void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, char *psName);
|
||||
void setupExternalTrueTypeFont(GfxFont *font, char *psName);
|
||||
void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, char *psName);
|
||||
void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, char *psName);
|
||||
void setupType3Font(GfxFont *font, char *psName, Dict *parentResDict);
|
||||
void setupEmbeddedType1Font(Ref *id, const char *psName);
|
||||
void setupExternalType1Font(GString *fileName, const char *psName);
|
||||
void setupEmbeddedType1CFont(GfxFont *font, Ref *id, const char *psName);
|
||||
void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, const char *psName);
|
||||
void setupExternalTrueTypeFont(GfxFont *font, const char *psName);
|
||||
void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, const char *psName);
|
||||
void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, const char *psName);
|
||||
void setupType3Font(GfxFont *font, const char *psName, Dict *parentResDict);
|
||||
void setupImages(Dict *resDict);
|
||||
void setupImage(Ref id, Stream *str);
|
||||
void addProcessColor(double c, double m, double y, double k);
|
||||
@@ -187,10 +187,10 @@ private:
|
||||
GBool getFileSpec(Object *fileSpec, Object *fileName);
|
||||
#endif
|
||||
void writePSChar(char c);
|
||||
void writePS(char *s);
|
||||
void writePS(const char *s);
|
||||
void writePSFmt(const char *fmt, ...);
|
||||
void writePSString(GString *s);
|
||||
void writePSName(char *s);
|
||||
void writePSName(const char *s);
|
||||
GString *filterPSName(GString *name);
|
||||
|
||||
PSLevel level; // PostScript level (1, 2, separation)
|
||||
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário