Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet fe03b591e0 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.1@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
167 arquivos alterados com 20652 adições e 24801 exclusões
+1 -248
Ver Arquivo
@@ -1,253 +1,6 @@
CHANGES.txt - 09/18/2000
CHANGES.txt - 07/10/2000
------------------------
CHANGES IN CUPS v1.1.3
- Makefile fixes.
- RPM spec file changes.
- Documentation updates.
- Enabled pstoraster debug messages for everything
(only logged when LogLevel set to "debug"...)
- Changed the Input/OutputAttributes fix in
pstoraster so that it works on all platforms.
- The HP-GL/2 filter didn't set the right green
color value in encoded polylines or text.
- Updated the "fitplot" code to handle plot sizes
specified as "PSwidth,length" and "PSlength,width".
- Updated the Linux parallel and USB backends to open
the device files prior to looking in /proc for
autoprobe info. This makes sure that loadable device
driver modules are in fact loaded...
- Added new FilterLimit directive to limit the number
of processing jobs/filters on a system.
- set-job-attributes didn't change the job-state to
held/pending when the job-hold-until attribute was
specified.
- set-job-attributes didn't save the new job attributes.
- Now change the "requesting-user-name" attribute in
requests from remote systems to "remroot" when an
unauthenticated "root" user is sent. This can be
changed using the new RemoteRoot directive in
cupsd.conf.
- The cancel-job, hold-job, release-job, and restart-job
operations didn't log the authenticated username.
- The cups-lpd mini-daemon now checks for a
document-format option before forcing raw mode with
filter mode 'l'.
- The cups-lpd mini-daemon now supports "-o" options
on the command-line (passed by inetd) to set global
defaults for all print queues.
- The pstops filter assumed that a file with a Trailer
comment would also have an EOF comment.
- Added new cupsSetPasswordCB(), cupsSetServer(),
cupsSetUser(), and ippSetPort() functions to better
support client applications (especially GUIs...)
- The CUPS-add-class and CUPS-add-printer operations
didn't reset the printer-name attribute on remote
print queues that had to be renamed when a local
printer was defined with the same name.
- The lpoptions command now supports a "-r" option to
remove options for a printer or instance.
- The lpadmin and admin.cgi programs no longer allow
class and printer names to begin with a number; this
caused the command-line utilities to become confused.
- The Linux USB backend now looks for both the parallel
and usblp driver names in the device list.
- Added a new FontPath directive to cupsd.conf, and also
a "--with-fontpath" option for the configure script to
specify alternate font paths for pstoraster.
- The CUPS-move-job operation didn't update the
job-printer-uri attribute.
- The scheduler only looked up printers and classes by
name in IPP requests, instead of using the full URI.
This caused problems with KUPS and friends with
remote printers.
- The scheduler now handles better localization of
hostnames (e.g. server is host.foo.com, remote is
host.subfoo.foo.com, localized is not host.subfoo...)
- The scheduler logging functions now use a common
log file checking/rotation function (courtesy of
Crutcher Dunnavant at Red Hat)
- The scheduler could accept more client connections
than it allocated for if more than one Port or Listen
line was present in cupsd.conf.
- Other minor scheduler performance tweeks.
- The lpq and lprm commands didn't support the default
printer set using lpoptions.
- The lpoptions command now supports a "-l" option to
list the printer-specific options and their current
settings.
- The web printer and class lists now show a link to the
default printer or class at the top of the page.
- The text filter now supports pretty printing of shell
and perl scripts as well as C/C++ source files.
- The top and bottom margins were reversed for landscape
text printing.
- The lpq and lprm commands didn't understand printer
instances.
- The scheduler only selected on the first 100 file
descriptors instead of the maximum file descriptor
limit.
- The scheduler client, listener, and mainline functions
now share code to disable and enable monitoring for
new client connections.
- The imagetoraster filter didn't support all of the
required pagedevice parameters.
- The serial backend now checks for 100 serial ports
under Linux.
- The scheduler used sscanf() to pull out the remote
printer location, description, and make/model strings,
but if any of these options was empty then sscanf()
would stop processing.
- Added "debug2" log level to provide a little less
verbose debugging information at the "debug" level.
- The scheduler would crash if you stopped a printer
that was currently printing a job.
- The scheduler incorrectly allowed jobs in the cancelled,
aborted, or completed state to be cancelled.
- The image filters did not load TIFF images properly
for bottom-to-top and right-to-left orientations.
- Added new cupsEncodeOptions() function to encode
CUPS options as IPP job attributes.
- The IPP backend, LPD mini-daemon, client commands,
and CUPS API did not properly encode multiple
option values separated by commas.
- Added new scheduler malloc logging in debug mode
(provides summary of total arena size, allocated,
and free bytes once a minute)
- The EPM-based distributions didn't install the
correct symlinks for a few man pages.
- Fixed a memory leak in the scheduler - wasn't
freeing old filters when deleting or renaming
printers.
- The scheduler now queries the primary IP address
for the name of the server and maps any incoming
requests from that address to the server name.
This fixes web admin mapping problems from
server.domain.com to localhost.
- The web printer modify interface now remembers
the previous device and driver settings (except
for serial ports.)
- The job-k-octets attribute is now stored as part of
the job attributes; this preserves the information
after a job is completed when job file history is
turned off.
- Dropped option sub-group parsing code for the moment,
since many Xerox PPD files abuse this feature in PPD
files and don't follow the hierarchy rules.
- Added new wrapper code around options so that duplex
options for some HP printers don't prevent prints.
- Added support for Digital UNIX/Tru64 UNIX/OSF/1 format
for "lpstat -v" output.
- Now show the URI for remote printers instead of
/dev/null in "lpstat -v" output.
- Creating classes and adding printers to a class with
the lpadmin command didn't work.
- The banner pages and test page should now format
correctly in both portrait and landscape orientations.
- Updated banner page substitution so that { can appear
by itself without quoting.
CHANGES IN CUPS v1.1.2
- Makefile/configure fixes
- RPM spec file and EPM list file fixes
- The cupsTempFile() function now uses a different
algorithm for generating temp files and "reserves"
them to avoid possible security exploitation.
- Now use /dev/random (if available) to seed the random
number generator for certificates.
- The /var/spool/cups and /var/spool/cups/tmp directories
were incorrectly owned by root; they are now owned by
the filter user, typically "lp".
- The scheduler now resets the permissions on the spool
and temp directories as needed to match the filter
user.
- Now expose ppdCollect() as an externally callable
function.
- The image filters now support filtering from the
standard input.
- The imagetoraster filter now collects all printer
options and job patch files and applies them to the
page header as needed.
- Added format and banner options to LPD backend.
- The send-document operation didn't start a job
immediately when last-document was true.
- The set-job-attributes operation didn't correctly
replace the current job-hold-until value.
- Removed the option wrapper code from ppdEmit() and
friends since it caused problems with Ghostscript
and many PS printers.
- Was setting TZ environment variable twice for job
filters.
- Added syslog logging in cups-lpd to aide in
debugging problems.
- The HP-UX parallel port backend did not list the
available parallel ports on some systems (printf
calling problem...)
- The lp and lpr commands overrode user options if
-d/-P were specified after -o.
- The scheduler would crash with a */* filter.
- Added support for a "default" filter for unknown file
types. The example provided in the mime.types and
mime.convs file prints unknown files as if "-oraw" was
specified for the job. This functionality is disabled
by default.
- The "compatibility" mode fix for older backends did not
work for smbspool. Added a workaround for it.
- The HP-GL/2 filter didn't perform the right pen scaling
with some files and the "fitplot" option.
- New Software Performance Specification document that
describes the memory, disk, and CPU usage of all the
CUPS software.
CHANGES IN CUPS v1.1.1
- The pstoraster Makefile still referenced one of the
old PDF filter files.
- The filter Makefile used INSTALL_DATA instead of
INSTALL_LIB to install the CUPS image library.
- The administration CGI didn't work properly with
network devices.
- The BrowseACL variable was not updated after the
cupsd.conf file was loaded.
- The lpd mini-daemon didn't support printer instances.
- Now use a default umask of 077 for child processes.
- Now put temp files in /var/spool/cups/tmp for child
processes and the root user, unless TMPDIR or TempDir
is defined otherwise.
- cupsGetPPD() no longer uses easy-to-guess filenames.
- The CUPS-Delete-Class and CUPS-Delete-Printer
operations now save classes.conf file as needed.
- The lppasswd command wouldn't add a user.
- The ppdOpen() function could cause a segfault if a
0-length PPD file was read.
- The image filters were not handling images with
different X and Y resolutions properly.
- The imagetoraster filter defaulted to RGB output
instead of black output like pstoraster.
- The pstops filter didn't handle binary data properly.
- The pstops filter didn't handle copies properly for
PS files lacking DSC comments.
- The pstops filter now appends %%EOF to the end of
documents if they don't have it.
- The cupsGetPPD() function didn't work with remote
printers lacking the @server in the name.
- The configure script didn't work right when only
--prefix was specified.
- The ppdEmit() code now wraps all printer commands so
that buggy PostScript printers will still print a file
after receiving an option that isn't available.
- Fixed the DeskJet margin bug, and disabled 600dpi
color mode until it can be fixed.
- The cupsAddDest() function didn't sort instances
correctly in all cases.
- The time-at-xyz attributes now expand to the date and
time in banner files.
CHANGES IN CUPS v1.1
- Documentation updates.
+1 -4
Ver Arquivo
@@ -30,7 +30,6 @@ AR = @AR@
AWK = @AWK@
CC = @LIBTOOL@ @CC@
CHMOD = @CHMOD@
CHOWN = @CHOWN@
CP = @CP@
CXX = @LIBTOOL@ @CXX@
DSO = @DSO@
@@ -63,7 +62,6 @@ INSTALL_SYSV = @INSTALL_SYSV@
LIBCUPS = @LIBCUPS@
LIBCUPSIMAGE = @LIBCUPSIMAGE@
LIBJPEG = @LIBJPEG@
LIBMALLOC = @LIBMALLOC@
LIBPNG = @LIBPNG@
LIBTIFF = @LIBTIFF@
LIBZ = @LIBZ@
@@ -121,9 +119,8 @@ top_srcdir = @top_srcdir@
BINDIR = @bindir@
DATADIR = @CUPS_DATADIR@
DOCDIR = @CUPS_DOCROOT@
ESP_ROOT = @ESP_ROOT@
INCLUDEDIR = $(includedir)
INITDIR = @INITDIR@
INITDDIR = @INITDDIR@
LIBDIR = $(libdir)
LOCALEDIR = @CUPS_LOCALEDIR@
LOGDIR = @CUPS_LOGDIR@
+19 -15
Ver Arquivo
@@ -28,7 +28,7 @@ include Makedefs
# Directories to make...
#
DIRS = cups backend berkeley cgi-bin filter man pdftops pstoraster \
DIRS = cups backend berkeley cgi-bin doc filter man pdftops pstoraster \
scheduler systemv
#
@@ -64,28 +64,32 @@ install:
(cd conf; $(MAKE) $(MFLAGS) install)
echo Installing in data...
(cd data; $(MAKE) $(MFLAGS) install)
echo Installing in doc...
(cd doc; $(MAKE) $(MFLAGS) install)
echo Installing in fonts...
(cd fonts; $(MAKE) $(MFLAGS) install)
(cd fonts; $(MAKE) $(MFLAGS) install)
echo Installing in locale...
(cd locale; $(MAKE) $(MFLAGS) install)
echo Installing in ppd...
(cd ppd; $(MAKE) $(MFLAGS) install)
echo Installing in templates...
(cd templates; $(MAKE) $(MFLAGS) install)
echo Installing startup script...
if test "x$INITDIR" != "x"; then \
$(MKDIR) $(prefix)/$(INITDIR)/init.d; \
$(RM) $(prefix)/$(INITDIR)/init.d/cups; \
$(INSTALL_SCRIPT) cups.sh $(prefix)/$(INITDIR)/init.d/cups; \
$(CHMOD) ugo+rx $(prefix)/$(INITDIR)/init.d/cups; \
$(MKDIR) $(prefix)/$(INITDIR)/rc0.d; \
$(RM) $(prefix)/$(INITDIR)/rc0.d/K00cups; \
ln -s $(INITDDIR)/cups $(prefix)/$(INITDIR)/rc0.d/K00cups; \
$(MKDIR) $(prefix)/$(INITDIR)/rc3.d; \
$(RM) $(prefix)/$(INITDIR)/rc3.d/S99cups; \
ln -s $(INITDDIR)/cups $(prefix)/$(INITDIR)/rc3.d/S99cups; \
if test -d $(prefix)/sbin/init.d; then \
$(INSTALL_SCRIPT) cups.sh $(prefix)/sbin/init.d/cups; \
$(CHMOD) ugo+rx $(prefix)/sbin/init.d/cups; \
ln -s ../init.d/cups $(prefix)/sbin/rc0.d/K000cups; \
ln -s ../init.d/cups $(prefix)/sbin/rc2.d/S999cups; \
fi
if test -d $(prefix)/etc/rc.d/init.d; then \
$(INSTALL_SCRIPT) cups.sh $(prefix)/etc/rc.d/init.d/cups; \
$(CHMOD) ugo+rx $(prefix)/etc/rc.d/cups; \
ln -s ../init.d/cups $(prefix)/etc/rc.d/rc0.d/K00cups; \
ln -s ../init.d/cups $(prefix)/etc/rc.d/rc2.d/S99cups; \
fi
if test -d $(prefix)/etc/init.d; then \
$(INSTALL_SCRIPT) cups.sh $(prefix)/etc/init.d/cups; \
$(CHMOD) ugo+rx $(prefix)/etc/init.d/cups; \
ln -s ../init.d/cups $(prefix)/etc/rc0.d/K00cups; \
ln -s ../init.d/cups $(prefix)/etc/rc2.d/S99cups; \
fi
#
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
README - CUPS v1.1.3 - 09/18/2000
---------------------------------
README - CUPS v1.1 - 07/10/2000
-------------------------------
INTRODUCTION
+1 -1
Ver Arquivo
@@ -41,7 +41,7 @@ all: $(TARGETS)
#
clean:
$(RM) $(OBJS) $(TARGETS) http
$(RM) $(OBJS) $(TARGETS)
#
+114 -7
Ver Arquivo
@@ -53,6 +53,11 @@ int /* O - Exit status */
main(int argc, /* I - Number of command-line arguments (6 or 7) */
char *argv[]) /* I - Command-line arguments */
{
int i; /* Looping var */
int n, n2; /* Attribute values */
char *option, /* Name of option */
*s; /* Pointer into option value */
const char *val; /* Pointer to option value */
int num_options; /* Number of printer options */
cups_option_t *options; /* Printer options */
char method[255], /* Method in URI */
@@ -86,8 +91,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (argc == 1)
{
char *s;
if ((s = strrchr(argv[0], '/')) != NULL)
s ++;
else
@@ -436,15 +439,119 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
options = NULL;
num_options = cupsParseOptions(argv[5], 0, &options);
if ((content_type = getenv("CONTENT_TYPE")) != NULL &&
strcasecmp(content_type, "application/vnd.cups-raw") == 0)
num_options = cupsAddOption("raw", "", num_options, &options);
if (cupsGetOption("raw", num_options, options) ||
((content_type = getenv("CONTENT_TYPE")) != NULL &&
strcasecmp(content_type, "application/vnd.cups-raw") == 0))
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, "application/vnd.cups-raw");
else if ((val = cupsGetOption("document-format", num_options, options)) != NULL)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, val);
else
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, "application/octet-stream");
if (copies_sup)
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", atoi(argv[4]));
cupsEncodeOptions(request, num_options, options);
cupsFreeOptions(num_options, options);
for (i = 0; i < num_options; i ++)
{
/*
* Skip the "raw" option - handled above...
*/
if (strcasecmp(options[i].name, "raw") == 0 ||
strcasecmp(options[i].name, "document-format") == 0)
continue;
/*
* See what the option value is; for compatibility with older interface
* scripts, we have to support single-argument options as well as
* option=value, option=low-high, and option=MxN.
*/
option = options[i].name;
val = options[i].value;
if (*val == '\0')
val = NULL;
if (val != NULL)
{
if (strcasecmp(val, "true") == 0 ||
strcasecmp(val, "on") == 0 ||
strcasecmp(val, "yes") == 0)
{
/*
* Boolean value - true...
*/
n = 1;
val = "";
}
else if (strcasecmp(val, "false") == 0 ||
strcasecmp(val, "off") == 0 ||
strcasecmp(val, "no") == 0)
{
/*
* Boolean value - false...
*/
n = 0;
val = "";
}
n = strtol(val, &s, 0);
}
else
{
if (strncasecmp(option, "no", 2) == 0)
{
option += 2;
n = 0;
}
else
n = 1;
s = "";
}
if (*s != '\0' && *s != '-' && (*s != 'x' || s == val))
/*
* String value(s)...
*/
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, option, NULL, val);
else if (val != NULL)
{
/*
* Numeric value, range, or resolution...
*/
if (*s == '-')
{
n2 = strtol(s + 1, NULL, 0);
ippAddRange(request, IPP_TAG_JOB, option, n, n2);
}
else if (*s == 'x')
{
n2 = strtol(s + 1, &s, 0);
if (strcasecmp(s, "dpc") == 0)
ippAddResolution(request, IPP_TAG_JOB, option, IPP_RES_PER_CM, n, n2);
else if (strcasecmp(s, "dpi") == 0)
ippAddResolution(request, IPP_TAG_JOB, option, IPP_RES_PER_INCH, n, n2);
else
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, option, NULL, val);
}
else
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, option, n);
}
else
/*
* Boolean value...
*/
ippAddBoolean(request, IPP_TAG_JOB, option, (char)n);
}
/*
* Now fill in the HTTP request stuff...
+7 -101
Ver Arquivo
@@ -60,8 +60,7 @@ extern int rresvport(int *port); /* Hello? No prototype for this... */
static int lpd_command(int lpd_fd, char *format, ...);
static int lpd_queue(char *hostname, char *printer, char *filename,
char *user, char *title, int copies, int banner,
int format);
char *user, int copies);
/*
@@ -80,15 +79,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
hostname[1024], /* Hostname */
username[255], /* Username info (not used) */
resource[1024], /* Resource info (printer name) */
*options, /* Pointer to options */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr, /* Pointer into name or value */
filename[1024]; /* File to print */
int port; /* Port number (not used) */
int status; /* Status of LPD job */
int banner; /* Print banner page? */
int format; /* Print format */
if (argc == 1)
@@ -149,83 +142,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
httpSeparate(argv[0], method, username, hostname, &port, resource);
/*
* See if there are any options...
*/
banner = 0;
format = 'l';
if ((options = strchr(resource, '?')) != NULL)
{
/*
* Yup, terminate the device name string and move to the first
* character of the options...
*/
*options++ = '\0';
/*
* Parse options...
*/
while (*options)
{
/*
* Get the name...
*/
for (ptr = name; *options && *options != '=';)
*ptr++ = *options++;
*ptr = '\0';
if (*options == '=')
{
/*
* Get the value...
*/
options ++;
for (ptr = value; *options && *options != '+';)
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+')
options ++;
}
else
value[0] = '\0';
/*
* Process the option...
*/
if (strcasecmp(name, "banner") == 0)
{
/*
* Set the banner...
*/
banner = !value[0] ||
strcasecmp(value, "on") == 0 ||
strcasecmp(value, "yes") == 0 ||
strcasecmp(value, "true") == 0;
}
else if (strcasecmp(name, "format") == 0 && value[0])
{
/*
* Set output format...
*/
if (strchr("cdfglnoprtv", value[0]) != NULL)
format = value[0];
else
fprintf(stderr, "ERROR: Unknown format character \"%c\"\n", value[0]);
}
}
}
/*
* Queue the job...
*/
@@ -233,16 +149,14 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (argc > 6)
{
status = lpd_queue(hostname, resource + 1, filename,
argv[2] /* user */, argv[3] /* title */,
atoi(argv[4]) /* copies */, banner, format);
argv[2] /* user */, atoi(argv[4]) /* copies */);
if (!status)
fprintf(stderr, "PAGE: 1 %d\n", atoi(argv[4]));
}
else
status = lpd_queue(hostname, resource + 1, filename,
argv[2] /* user */, argv[3] /* title */, 1,
banner, format);
argv[2] /* user */, 1);
/*
* Remove the temporary file if necessary...
@@ -317,10 +231,7 @@ lpd_queue(char *hostname, /* I - Host to connect to */
char *printer, /* I - Printer/queue name */
char *filename, /* I - File to print */
char *user, /* I - Requesting user */
char *title, /* I - Job title */
int copies, /* I - Number of copies */
int banner, /* I - Print LPD banner? */
int format) /* I - Format specifier */
int copies) /* I - Number of copies */
{
FILE *fp; /* Job file */
char localhost[255]; /* Local host name */
@@ -443,18 +354,13 @@ lpd_queue(char *hostname, /* I - Host to connect to */
gethostname(localhost, sizeof(localhost));
localhost[31] = '\0'; /* RFC 1179, Section 7.2 - host name < 32 chars */
snprintf(control, sizeof(control), "H%s\nP%s\nJ%s\n", localhost, user, title);
snprintf(control, sizeof(control), "H%s\nP%s\n", localhost, user);
cptr = control + strlen(control);
if (banner)
{
snprintf(cptr, sizeof(control) - (cptr - control), "L%s\n", user);
cptr += strlen(cptr);
}
while (copies > 0)
{
snprintf(cptr, sizeof(control) - (cptr - control), "%cdfA%03d%s\n", format,
snprintf(cptr, sizeof(control) - (cptr - control), "ldfA%03d%s\n",
getpid() % 1000, localhost);
cptr += strlen(cptr);
copies --;
+20 -44
Ver Arquivo
@@ -275,8 +275,7 @@ list_devices(void)
#ifdef __linux
int i; /* Looping var */
int fd; /* File descriptor */
char device[255], /* Device filename */
probefile[255]; /* Probe filename */
char device[255]; /* Device filename */
FILE *probe; /* /proc/parport/n/autoprobe file */
char line[1024], /* Line from file */
*delim, /* Delimiter in file */
@@ -286,41 +285,9 @@ list_devices(void)
for (i = 0; i < 4; i ++)
{
/*
* First open the device to make sure the driver module is loaded...
*/
sprintf(device, "/dev/lp%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
close(fd);
else
sprintf(device, "/proc/parport/%d/autoprobe", i);
if ((probe = fopen(device, "r")) != NULL)
{
sprintf(device, "/dev/par%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
close(fd);
}
/*
* Then try looking at the probe file...
*/
sprintf(probefile, "/proc/parport/%d/autoprobe", i);
if ((probe = fopen(probefile, "r")) == NULL)
{
/*
* Linux 2.4 kernel has different path...
*/
sprintf(probefile, "/proc/sys/dev/parport/parport%d/autoprobe", i);
probe = fopen(probefile, "r");
}
if (probe != NULL)
{
/*
* Found a probe file!
*/
memset(make, 0, sizeof(make));
memset(model, 0, sizeof(model));
strcpy(model, "Unknown");
@@ -357,13 +324,23 @@ list_devices(void)
printf("direct parallel:/dev/lp%d \"%s\" \"Parallel Port #%d\"\n",
i, model, i + 1);
}
else if (fd >= 0)
else
{
/*
* No probe file, but we know the port is there...
*/
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
sprintf(device, "/dev/lp%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
{
close(fd);
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
}
else
{
sprintf(device, "/dev/par%d", i);
if ((fd = open(device, O_WRONLY)) >= 0)
{
close(fd);
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d\"\n", device, i + 1);
}
}
}
}
#elif defined(__sgi)
@@ -520,8 +497,7 @@ list_devices(void)
{
sprintf(device, "/dev/c%dt%dd0_lp", i, j);
if (access(device, 0) == 0)
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d,%d\"\n",
device, i, j);
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d,%d\"\n", i, j);
}
/*
+1 -1
Ver Arquivo
@@ -396,7 +396,7 @@ list_devices(void)
char device[255]; /* Device filename */
for (i = 0; i < 100; i ++)
for (i = 0; i < 4; i ++)
{
sprintf(device, "/dev/ttyS%d", i);
if ((fd = open(device, O_WRONLY | O_NOCTTY | O_NDELAY)) >= 0)
+2 -25
Ver Arquivo
@@ -262,33 +262,15 @@ list_devices(void)
int i; /* Looping var */
int fd; /* File descriptor */
char device[255]; /* Device filename */
FILE *probe; /* /proc/bus/usb/devices file */
FILE *probe; /* /proc/parport/n/autoprobe file */
char line[1024], /* Line from file */
*delim, /* Delimiter in file */
make[IPP_MAX_NAME], /* Make from file */
model[IPP_MAX_NAME]; /* Model from file */
/*
* First try opening one of the USB devices to load the driver
* module as needed...
*/
if ((fd = open("/dev/usb/lp0", O_WRONLY)) >= 0)
close(fd); /* 2.3.x and 2.4.x */
else if ((fd = open("/dev/usblp0", O_WRONLY)) >= 0)
close(fd); /* 2.2.x */
/*
* Then look at the device list for the USB bus...
*/
if ((probe = fopen("/proc/bus/usb/devices", "r")) != NULL)
{
/*
* Scan the device list...
*/
i = 0;
memset(make, 0, sizeof(make));
@@ -323,8 +305,7 @@ list_devices(void)
strncpy(model, line + 12, sizeof(model) - 1);
}
else if (strncmp(line, "I:", 2) == 0 &&
(strstr(line, "Driver=printer") != NULL ||
strstr(line, "Driver=usblp") != NULL) &&
strstr(line, "Driver=printer") != NULL &&
make[0] && model[0])
{
/*
@@ -345,10 +326,6 @@ list_devices(void)
}
else
{
/*
* Just probe manually for USB devices...
*/
for (i = 0; i < 8; i ++)
{
sprintf(device, "/dev/usb/lp%d", i);
+1 -17
Ver Arquivo
@@ -65,13 +65,9 @@ main(int argc, /* I - Number of command-line arguments */
http_t *http; /* Connection to server */
const char *dest, /* Desired printer */
*user; /* Desired user */
char *instance; /* Printer instance */
int id, /* Desired job ID */
interval, /* Reporting interval */
longstatus; /* Show file details */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
/*
* Connect to the scheduler...
@@ -83,18 +79,12 @@ main(int argc, /* I - Number of command-line arguments */
* Check for command-line options...
*/
dest = NULL;
dest = cupsGetDefault();
user = NULL;
id = 0;
interval = 0;
longstatus = 0;
num_dests = cupsGetDests(&dests);
for (i = 0; i < num_dests; i ++)
if (dests[i].is_default)
dest = dests[i].name;
for (i = 1; i < argc; i ++)
if (argv[i][0] == '+')
interval = atoi(argv[i] + 1);
@@ -110,9 +100,6 @@ main(int argc, /* I - Number of command-line arguments */
i ++;
dest = argv[i];
}
if ((instance = strchr(dest, '/')) != NULL)
*instance = '\0';
break;
case 'l' : /* Long status */
@@ -121,8 +108,6 @@ main(int argc, /* I - Number of command-line arguments */
default :
fputs("Usage: lpq [-P dest] [-l] [+interval]\n", stderr);
httpClose(http);
cupsFreeDests(num_dests, dests);
return (1);
}
}
@@ -155,7 +140,6 @@ main(int argc, /* I - Number of command-line arguments */
* Close the connection to the server and return...
*/
cupsFreeDests(num_dests, dests);
httpClose(http);
return (0);
+8 -13
Ver Arquivo
@@ -123,17 +123,14 @@ main(int argc, /* I - Number of command-line arguments */
break;
case 'l' : /* Literal/raw */
num_options = cupsAddOption("raw", "", num_options, &options);
num_options = cupsParseOptions("raw", num_options, &options);
break;
case 'p' : /* Prettyprint */
num_options = cupsAddOption("prettyprint", "", num_options, &options);
num_options = cupsParseOptions("prettyprint", num_options, &options);
break;
case 'h' : /* Suppress burst page */
num_options = cupsAddOption("job-sheets", "none", num_options, &options);
break;
case 's' : /* Don't use symlinks */
break;
@@ -163,10 +160,9 @@ main(int argc, /* I - Number of command-line arguments */
if ((dest = cupsGetDest(printer, instance, num_dests, dests)) != NULL)
{
for (j = 0; j < dest->num_options; j ++)
if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
num_options = cupsAddOption(dest->options[j].name,
dest->options[j].value,
num_options, &options);
num_options = cupsAddOption(dest->options[j].name,
dest->options[j].value,
num_options, &options);
}
break;
@@ -239,10 +235,9 @@ main(int argc, /* I - Number of command-line arguments */
printer = dests[j].name;
for (j = 0; j < dest->num_options; j ++)
if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
num_options = cupsAddOption(dest->options[j].name,
dest->options[j].value,
num_options, &options);
num_options = cupsAddOption(dest->options[j].name,
dest->options[j].value,
num_options, &options);
break;
}
}
+1 -23
Ver Arquivo
@@ -50,14 +50,11 @@ main(int argc, /* I - Number of command-line arguments */
int i; /* Looping var */
int job_id; /* Job ID */
const char *dest; /* Destination printer */
char *instance; /* Pointer to instance name */
char uri[1024]; /* Printer or job URI */
ipp_t *request; /* IPP request */
ipp_t *response; /* IPP response */
ipp_op_t op; /* Operation */
cups_lang_t *language; /* Language */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
/*
@@ -66,16 +63,10 @@ main(int argc, /* I - Number of command-line arguments */
op = IPP_CANCEL_JOB;
job_id = 0;
dest = NULL;
dest = cupsGetDefault();
response = NULL;
http = NULL;
num_dests = cupsGetDests(&dests);
for (i = 0; i < num_dests; i ++)
if (dests[i].is_default)
dest = dests[i].name;
/*
* Open a connection to the server...
*/
@@ -83,7 +74,6 @@ main(int argc, /* I - Number of command-line arguments */
if ((http = httpConnect(cupsServer(), ippPort())) == NULL)
{
fputs("lprm: Unable to contact server!\n", stderr);
cupsFreeDests(num_dests, dests);
return (1);
}
@@ -103,15 +93,10 @@ main(int argc, /* I - Number of command-line arguments */
i ++;
dest = argv[i];
}
if ((instance = strchr(dest, '/')) != NULL)
*instance = '\0';
break;
default :
fprintf(stderr, "lprm: Unknown option \'%c\'!\n", argv[i][1]);
cupsFreeDests(num_dests, dests);
httpClose(http);
return (1);
}
else
@@ -211,8 +196,6 @@ main(int argc, /* I - Number of command-line arguments */
else
{
fputs("lprm: Unable to cancel job(s)!\n", stderr);
cupsFreeDests(num_dests, dests);
httpClose(http);
return (1);
}
}
@@ -226,14 +209,9 @@ main(int argc, /* I - Number of command-line arguments */
if (!cupsCancelJob(dest, 0))
{
fputs("lprm: Unable to cancel job(s)!\n", stderr);
cupsFreeDests(num_dests, dests);
httpClose(http);
return (1);
}
cupsFreeDests(num_dests, dests);
httpClose(http);
return (0);
}
+42 -123
Ver Arquivo
@@ -263,12 +263,9 @@ do_am_class(http_t *http, /* I - HTTP connection */
}
name = cgiGetVariable("PRINTER_NAME");
if (isdigit(*name))
ptr = name;
else
for (ptr = name; *ptr; ptr ++)
if (!isalnum(*ptr) && *ptr != '_')
break;
for (ptr = name; *ptr; ptr ++)
if (!isalnum(*ptr) && *ptr != '_')
break;
if (*ptr || ptr == name)
{
@@ -486,8 +483,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
ipp_attribute_t *attr, /* Current attribute */
*last; /* Last attribute */
ipp_t *request, /* IPP request */
*response, /* IPP response */
*oldinfo; /* Old printer information */
*response; /* IPP response */
ipp_status_t status; /* Request status */
const char *var; /* CGI variable */
char uri[HTTP_MAX_URI], /* Device or printer URI */
@@ -511,50 +507,48 @@ do_am_printer(http_t *http, /* I - HTTP connection */
};
if (modify)
{
/*
* Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the
* following attributes:
*
* attributes-charset
* attributes-natural-language
* printer-uri
*/
request = ippNew();
request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
request->request.op.request_id = 1;
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding(language));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s",
cgiGetVariable("PRINTER_NAME"));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, uri);
/*
* Do the request and get back a response...
*/
oldinfo = cupsDoRequest(http, request, "/");
}
if (cgiGetVariable("PRINTER_LOCATION") == NULL)
{
if (modify)
{
/*
* Update the location and description of an existing printer...
* Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the
* following attributes:
*
* attributes-charset
* attributes-natural-language
* printer-uri
*/
if (oldinfo)
ippSetCGIVars(oldinfo, NULL, NULL);
request = ippNew();
request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
request->request.op.request_id = 1;
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding(language));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s",
cgiGetVariable("PRINTER_NAME"));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, uri);
/*
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
ippSetCGIVars(response, NULL, NULL);
ippDelete(response);
}
/*
* Update the location and description of an existing printer...
*/
cgiCopyTemplateLang(stdout, TEMPLATES, "modify-printer.tmpl", getenv("LANG"));
}
@@ -567,19 +561,13 @@ do_am_printer(http_t *http, /* I - HTTP connection */
cgiCopyTemplateLang(stdout, TEMPLATES, "add-printer.tmpl", getenv("LANG"));
}
if (oldinfo)
ippDelete(oldinfo);
return;
}
name = cgiGetVariable("PRINTER_NAME");
if (isdigit(*name))
ptr = name;
else
for (ptr = name; *ptr; ptr ++)
if (!isalnum(*ptr) && *ptr != '_')
break;
for (ptr = name; *ptr; ptr ++)
if (!isalnum(*ptr) && *ptr != '_')
break;
if (*ptr || ptr == name)
{
@@ -628,32 +616,10 @@ do_am_printer(http_t *http, /* I - HTTP connection */
* Let the user choose...
*/
if (oldinfo &&
(attr = ippFindAttribute(oldinfo, "device-uri", IPP_TAG_URI)) != NULL)
{
strncpy(uri, attr->values[0].string.text, sizeof(uri) - 1);
uri[sizeof(uri) - 1] = '\0';
if ((uriptr = strchr(uri, ':')) != NULL && strncmp(uriptr, "://", 3) == 0)
*uriptr = '\0';
cgiSetVariable("CURRENT_DEVICE_URI", uri);
}
cgiCopyTemplateLang(stdout, TEMPLATES, "choose-device.tmpl", getenv("LANG"));
}
else if (strchr(var, '/') == NULL)
{
if (oldinfo &&
(attr = ippFindAttribute(response, "device-uri", IPP_TAG_URI)) != NULL)
{
/*
* Set the current device URI for the form to the old one...
*/
if (strncmp(attr->values[0].string.text, var, strlen(var)) == 0)
cgiSetVariable("DEVICE_URI", attr->values[0].string.text);
}
/*
* User needs to set the full URI...
*/
@@ -685,50 +651,6 @@ do_am_printer(http_t *http, /* I - HTTP connection */
}
else if ((var = cgiGetVariable("PPD_NAME")) == NULL)
{
if (modify)
{
/*
* Get the PPD file...
*/
FILE *fp; /* PPD file */
char filename[1024]; /* PPD filename */
ppd_file_t *ppd; /* PPD information */
char buffer[1024]; /* Buffer */
int bytes; /* Number of bytes */
sprintf(uri, "/printers/%s.ppd", name);
cupsTempFile(filename, sizeof(filename));
if (httpGet(http, uri))
httpGet(http, uri);
while (httpUpdate(http) == HTTP_CONTINUE);
if ((fp = fopen(filename, "w")) != NULL)
{
while ((bytes = httpRead(http, buffer, sizeof(buffer))) > 0)
fwrite(buffer, 1, bytes, fp);
fclose(fp);
if ((ppd = ppdOpenFile(filename)) != NULL)
{
if (ppd->manufacturer)
cgiSetVariable("CURRENT_MAKE", ppd->manufacturer);
if (ppd->nickname)
cgiSetVariable("CURRENT_MAKE_AND_MODEL", ppd->nickname);
ppdClose(ppd);
}
}
else
httpFlush(http);
unlink(filename);
}
/*
* Build a CUPS_GET_PPDS request, which requires the following
* attributes:
@@ -882,9 +804,6 @@ do_am_printer(http_t *http, /* I - HTTP connection */
else
cgiCopyTemplateLang(stdout, TEMPLATES, "printer-added.tmpl", getenv("LANG"));
}
if (oldinfo)
ippDelete(oldinfo);
}
-59
Ver Arquivo
@@ -46,7 +46,6 @@ main(int argc, /* I - Number of command-line arguments */
http_t *http; /* Connection to the server */
ipp_t *request, /* IPP request */
*response; /* IPP response */
ipp_attribute_t *attr; /* IPP attribute */
ipp_status_t status; /* Operation status... */
char uri[HTTP_MAX_URI];
/* Printer URI */
@@ -99,64 +98,6 @@ main(int argc, /* I - Number of command-line arguments */
if (op == NULL || strcasecmp(op, "print-test-page") != 0)
{
/*
* Get the default destination...
*/
request = ippNew();
request->request.op.operation_id = CUPS_GET_DEFAULT;
request->request.op.request_id = 1;
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding(language));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
if ((attr = ippFindAttribute(response, "printer-name", IPP_TAG_NAME)) != NULL)
cgiSetVariable("DEFAULT_NAME", attr->values[0].string.text);
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
{
char method[HTTP_MAX_URI],
username[HTTP_MAX_URI],
hostname[HTTP_MAX_URI],
resource[HTTP_MAX_URI],
uri[HTTP_MAX_URI];
int port; /* URI data */
const char *server; /* Name of server */
/*
* Map localhost access to localhost...
*/
server = getenv("SERVER_NAME");
httpSeparate(attr->values[0].string.text, method, username,
hostname, &port, resource);
if (strcasecmp(hostname, server) == 0 &&
(strcmp(getenv("REMOTE_HOST"), "127.0.0.1") == 0 ||
strcmp(getenv("REMOTE_HOST"), "localhost") == 0 ||
strcmp(getenv("REMOTE_HOST"), server) == 0))
strcpy(hostname, "localhost");
/*
* Rewrite URI with HTTP address...
*/
snprintf(uri, sizeof(uri), "http://%s:%d%s", hostname, port,
resource);
cgiSetVariable("DEFAULT_URI", uri);
}
ippDelete(response);
}
/*
* Get the class info...
*/
+24 -29
Ver Arquivo
@@ -96,12 +96,12 @@ ippSetCGIVars(ipp_t *response, /* I - Response data to be copied... */
resource[HTTP_MAX_URI],
uri[HTTP_MAX_URI];
int port; /* URI data */
const char *server; /* Name of server */
char server[1024]; /* Name of server */
ippSetServerVersion();
server = getenv("SERVER_NAME");
strcpy(server, cupsServer());
for (attr = response->attrs;
attr && attr->group_tag == IPP_TAG_OPERATION;
@@ -192,38 +192,33 @@ ippSetCGIVars(ipp_t *response, /* I - Response data to be copied... */
break;
case IPP_TAG_URI :
if (strchr(attr->values[i].string.text, ':') != NULL)
{
httpSeparate(attr->values[i].string.text, method, username,
hostname, &port, resource);
httpSeparate(attr->values[i].string.text, method, username,
hostname, &port, resource);
if (strcmp(method, "ipp") == 0 ||
strcmp(method, "http") == 0)
{
/*
* Map localhost access to localhost...
*/
if (strcmp(method, "ipp") == 0 ||
strcmp(method, "http") == 0)
{
/*
* Map localhost access to localhost...
*/
if (strcasecmp(hostname, server) == 0 &&
(strcmp(getenv("REMOTE_HOST"), "127.0.0.1") == 0 ||
strcmp(getenv("REMOTE_HOST"), "localhost") == 0 ||
strcmp(getenv("REMOTE_HOST"), server) == 0))
strcpy(hostname, "localhost");
if (strcasecmp(hostname, server) == 0 &&
strcmp(getenv("REMOTE_ADDR"), "127.0.0.1") == 0)
strcpy(hostname, "localhost");
/*
* Rewrite URI with HTTP address...
*/
/*
* Rewrite URI with HTTP address...
*/
if (username[0])
snprintf(uri, sizeof(uri), "http://%s@%s:%d%s", username,
hostname, port, resource);
else
snprintf(uri, sizeof(uri), "http://%s:%d%s", hostname, port,
resource);
if (username[0])
snprintf(uri, sizeof(uri), "http://%s@%s:%d%s", username,
hostname, port, resource);
else
snprintf(uri, sizeof(uri), "http://%s:%d%s", hostname, port,
resource);
strcat(valptr, uri);
break;
}
strcat(valptr, uri);
break;
}
case IPP_TAG_STRING :
-59
Ver Arquivo
@@ -46,7 +46,6 @@ main(int argc, /* I - Number of command-line arguments */
http_t *http; /* Connection to the server */
ipp_t *request, /* IPP request */
*response; /* IPP response */
ipp_attribute_t *attr; /* IPP attribute */
ipp_status_t status; /* Operation status... */
char uri[HTTP_MAX_URI];
/* Printer URI */
@@ -99,64 +98,6 @@ main(int argc, /* I - Number of command-line arguments */
if (op == NULL || strcasecmp(op, "print-test-page") != 0)
{
/*
* Get the default destination...
*/
request = ippNew();
request->request.op.operation_id = CUPS_GET_DEFAULT;
request->request.op.request_id = 1;
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding(language));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
if ((attr = ippFindAttribute(response, "printer-name", IPP_TAG_NAME)) != NULL)
cgiSetVariable("DEFAULT_NAME", attr->values[0].string.text);
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
{
char method[HTTP_MAX_URI],
username[HTTP_MAX_URI],
hostname[HTTP_MAX_URI],
resource[HTTP_MAX_URI],
uri[HTTP_MAX_URI];
int port; /* URI data */
const char *server; /* Name of server */
/*
* Map localhost access to localhost...
*/
server = getenv("SERVER_NAME");
httpSeparate(attr->values[0].string.text, method, username,
hostname, &port, resource);
if (strcasecmp(hostname, server) == 0 &&
(strcmp(getenv("REMOTE_HOST"), "127.0.0.1") == 0 ||
strcmp(getenv("REMOTE_HOST"), "localhost") == 0 ||
strcmp(getenv("REMOTE_HOST"), server) == 0))
strcpy(hostname, "localhost");
/*
* Rewrite URI with HTTP address...
*/
snprintf(uri, sizeof(uri), "http://%s:%d%s", hostname, port,
resource);
cgiSetVariable("DEFAULT_URI", uri);
}
ippDelete(response);
}
/*
* Get the printer info...
*/
+5 -29
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: cupsd.conf 1344 2000-09-06 18:32:40Z mike $"
# "$Id: cupsd.conf 1171 2000-06-27 21:15:41Z mike $"
#
# Sample configuration file for the Common UNIX Printing System (CUPS)
# scheduler.
@@ -111,13 +111,6 @@
#ErrorLog /var/log/cups/error_log
#
# FontPath: the path to locate all font files (currently only for pstoraster)
# By default /usr/share/cups/fonts.
#
#FontPath /usr/share/cups/fonts
#
# LogLevel: controls the number of messages logged to the ErrorLog
# file and can be one of the following:
@@ -177,13 +170,6 @@ LogLevel info
#RequestRoot /var/spool/cups
#
# RemoteRoot: the name of the user assigned to unauthenticated accesses
# from remote systems. By default "remroot".
#
#RemoteRoot remroot
#
# ServerBin: the root directory for the scheduler executables.
# By default /usr/lib/cups or /usr/lib32/cups (IRIX 6.5).
@@ -227,22 +213,12 @@ LogLevel info
#
# TempDir: the directory to put temporary files in. This directory must be
# writable by the user defined above! Defaults to "/var/spool/cups/tmp" or
# the value of the TMPDIR environment variable.
# writable by the user defined above! Defaults to "/var/tmp" or the value
# of the TMPDIR environment variable.
#
#TempDir /var/spool/cups/tmp
#TempDir /var/tmp
#
# FilterLimit: sets the maximum cost of all job filters that can be run
# at the same time. A limit of 0 means no limit. A typical job may need
# a filter limit of at least 200; limits less than the minimum required
# by a job force a single job to be printed at any time.
#
# The default limit is 0 (unlimited).
#
#FilterLimit 0
########
######## Network Options
@@ -562,5 +538,5 @@ Allow From 127.0.0.1
</Location>
#
# End of "$Id: cupsd.conf 1344 2000-09-06 18:32:40Z mike $".
# End of "$Id: cupsd.conf 1171 2000-06-27 21:15:41Z mike $".
#
+13 -27
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: mime.convs 1340 2000-09-06 13:53:00Z mike $"
# "$Id: mime.convs 1019 2000-04-18 19:41:12Z mike $"
#
# MIME converts file for the Common UNIX Printing System (CUPS).
#
@@ -41,38 +41,24 @@
# PostScript filters
#
#application/msword application/postscript 33 mswordtops
application/pdf application/postscript 33 pdftops
application/postscript application/vnd.cups-postscript 66 pstops
application/vnd.hp-HPGL application/postscript 66 hpgltops
image/* application/vnd.cups-postscript 66 imagetops
#text/html application/postscript 33 htmltops
application/x-cshell application/postscript 33 texttops
application/x-perl application/postscript 33 texttops
application/x-shell application/postscript 33 texttops
text/html application/postscript 33 texttops
text/plain application/postscript 33 texttops
application/vnd.cups-form application/vnd.cups-postscript 33 formtops
#application/msword application/postscript 50 mswordtops
application/pdf application/postscript 50 pdftops
application/postscript application/vnd.cups-postscript 50 pstops
application/vnd.hp-HPGL application/postscript 50 hpgltops
image/* application/vnd.cups-postscript 50 imagetops
#text/html application/postscript 50 htmltops
text/html application/postscript 50 texttops
text/plain application/postscript 50 texttops
application/vnd.cups-form application/vnd.cups-postscript 50 formtops
########################################################################
#
# Raster filters...
#
image/* application/vnd.cups-raster 100 imagetoraster
application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster
########################################################################
#
# Raw filter...
#
# Uncomment the following filter and the application/octet-stream type
# in mime.types to allow printing of arbitrary files without the -oraw
# option.
#
#*/* application/vnd.cups-raw 0 -
image/* application/vnd.cups-raster 50 imagetoraster
application/vnd.cups-postscript application/vnd.cups-raster 50 pstoraster
#
# End of "$Id: mime.convs 1340 2000-09-06 13:53:00Z mike $".
# End of "$Id: mime.convs 1019 2000-04-18 19:41:12Z mike $".
#
+2 -20
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: mime.types 1340 2000-09-06 13:53:00Z mike $"
# "$Id: mime.types 1152 2000-06-22 18:25:29Z mike $"
#
# MIME types file for the Common UNIX Printing System (CUPS).
#
@@ -110,13 +110,6 @@ image/x-bitmap bmp string(0,BM) && !printable(2,14)
text/html html htm printable(0,1024) +\
(string(0,"<HTML>") string(0,"<!DOCTYPE"))
application/x-cshell csh printable(0,1024) + string(0,#!) +\
(contains(2,80,/csh) contains(2,80,/tcsh))
application/x-perl pl printable(0,1024) + string(0,#!) +\
contains(2,80,/perl)
application/x-shell sh printable(0,1024) + string(0,#!) +\
(contains(2,80,/bash) contains(2,80,/ksh)\
contains(2,80,/sh) contains(2,80,/zsh))
text/plain txt printable(0,1024)
########################################################################
@@ -129,17 +122,6 @@ application/vnd.cups-postscript string(0,<1B>%-12345X)
application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
application/vnd.cups-raw
########################################################################
#
# Raw print file support...
#
# Uncomment the following type and the application/octet-stream
# filter line in mime.convs to allow raw file printing without the
# -oraw option.
#
#application/octet-stream
#
# End of "$Id: mime.types 1340 2000-09-06 13:53:00Z mike $".
# End of "$Id: mime.types 1152 2000-06-22 18:25:29Z mike $".
#
+1 -9
Ver Arquivo
@@ -28,7 +28,7 @@
* Version of software...
*/
#define CUPS_SVERSION "CUPS v1.1.3"
#define CUPS_SVERSION "CUPS v1.1"
/*
* Where are files stored?
@@ -41,7 +41,6 @@
#define CUPS_REQUESTS "/var/spool/cups"
#define CUPS_LOGDIR "/var/logs/cups"
#define CUPS_DATADIR "/usr/share/cups"
#define CUPS_FONTPATH "/usr/share/cups/fonts"
/*
@@ -123,13 +122,6 @@
#undef HAVE_WAITPID
#undef HAVE_WAIT3
/*
* Do we have the mallinfo function and malloc.h?
*/
#undef HAVE_MALLINFO
#undef HAVE_MALLOC_H
/*
* End of "$Id$".
*/
+8 -96
Ver Arquivo
@@ -113,8 +113,6 @@ fi
AC_ARG_ENABLE(pam, [ --enable-pam turn on PAM support [default=yes]])
AC_ARG_WITH(fontpath, [ --with-fontpath set font path for pstoraster],fontpath="$withval",fontpath="")
dnl Checks for programs...
AC_PROG_AWK
AC_PROG_CC
@@ -123,7 +121,6 @@ AC_PROG_CPP
AC_PROG_RANLIB
AC_PATH_PROG(AR,ar)
AC_PATH_PROG(CHMOD,chmod)
AC_PATH_PROG(CHOWN,chown)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(MV,mv)
AC_PATH_PROG(NROFF,nroff)
@@ -144,23 +141,9 @@ dnl Architecture checks...
AC_C_BIGENDIAN
dnl Check for libraries...
AC_CHECK_LIB(c,crypt,LIBS="$LIBS")
if test "$ac_cv_lib_c_crypt" = "no"; then
AC_CHECK_LIB(crypt,crypt)
fi
AC_CHECK_LIB(c,crypt,LIBS="$LIBS",AC_CHECK_LIB(crypt,crypt))
AC_CHECK_HEADER(crypt.h, AC_DEFINE(HAVE_CRYPT_H))
AC_CHECK_LIB(sec,getspent)
LIBMALLOC=""
AC_CHECK_LIB(c,mallinfo,LIBS="$LIBS"; AC_DEFINE(HAVE_MALLINFO),LIBS="$LIBS")
if test "$ac_cv_lib_c_mallinfo" = "no"; then
AC_CHECK_LIB(malloc,mallinfo,
LIBS="$LIBS"
LIBMALLOC="-lmalloc"
AC_DEFINE(HAVE_MALLINFO),
LIBS="$LIBS")
fi
AC_SUBST(LIBMALLOC)
if test "$enable_pam" != "no"; then
OLDLIBS="$LIBS"
AC_CHECK_LIB(dl,dlopen)
@@ -231,11 +214,7 @@ LIBS="$SAVELIBS"
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_CHECK_HEADER(crypt.h,AC_DEFINE(HAVE_CRYPT_H))
AC_CHECK_HEADER(malloc.h,AC_DEFINE(HAVE_MALLOC_H))
AC_CHECK_HEADER(shadow.h,AC_DEFINE(HAVE_SHADOW_H))
AC_CHECK_HEADER(stddef.h,AC_DEFINE(HAVE_STDDEF_H))
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
dnl Checks for string functions.
AC_CHECK_FUNCS(strdup)
@@ -349,12 +328,8 @@ if test "$prefix" = "NONE"; then
fi
dnl Fix "exec_prefix" variable if it hasn't been specified...
if test "$exec_prefix" = "NONE"; then
if test "$prefix" = "/"; then
exec_prefix="/usr"
else
exec_prefix="$prefix"
fi
if test "$exec_prefix" = "NONE" -a "$prefix" = "/"; then
exec_prefix="/usr"
fi
dnl Fix "sharedstatedir" variable if it hasn't been specified...
@@ -378,21 +353,13 @@ if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
fi
dnl Fix "localstatedir" variable if it hasn't been specified...
if test "$localstatedir" = "\${prefix}/var"; then
if test "$prefix" = "/"; then
localstatedir="/var"
else
localstatedir="$prefix/var"
fi
if test "$localstatedir" = "\${prefix}/var" -a "$prefix" = "/"; then
localstatedir="/var"
fi
dnl Fix "sysconfdir" variable if it hasn't been specified...
if test "$sysconfdir" = "\${prefix}/etc"; then
if test "$prefix" = "/"; then
sysconfdir="/etc"
else
sysconfdir="$prefix/etc"
fi
if test "$sysconfdir" = "\${prefix}/etc" -a "$prefix" = "/"; then
sysconfdir="/etc"
fi
dnl Fix "libdir" variable for IRIX 6.x...
@@ -409,11 +376,6 @@ if test "$mandir" = "\${prefix}/man" -a "$prefix" = "/"; then
fi
fi
dnl Fix "fontpath" variable...
if test "x$fontpath" = "x"; then
fontpath="$datadir/cups/fonts"
fi
dnl Setup manpage extensions...
case "$uname" in
FreeBSD* | NetBSD* | OpenBSD*)
@@ -440,53 +402,6 @@ AC_SUBST(CAT1EXT)
AC_SUBST(CAT5EXT)
AC_SUBST(CAT8EXT)
dnl Setup init.d locations...
if test $prefix = "/"; then
case "$uname" in
FreeBSD* | NetBSD* | OpenBSD*)
# *BSD
INITDIR=""
INITDDIR=""
;;
Linux*)
# Linux seems to choose an init.d directory at random...
if test -d /sbin/init.d; then
# SuSE
INITDIR="/sbin/init.d"
INITDDIR=".."
else
if test -d /etc/rc.d; then
# RedHat
INITDIR="/etc/rc.d"
INITDDIR="../init.d"
else
# Others
INITDIR="/etc"
INITDDIR="../init.d"
fi
fi
;;
OSF1* | HP-UX*)
INITDIR="/sbin"
INITDDIR="../init.d"
;;
*)
INITDIR="/etc"
INITDDIR="../init.d"
;;
esac
else
INITDIR="/etc"
INITDDIR="../init.d"
fi
AC_SUBST(INITDIR)
AC_SUBST(INITDDIR)
dnl Setup default locations...
CUPS_SERVERROOT='${prefix}/etc/cups'
CUPS_LOGDIR='${prefix}/var/log/cups'
@@ -549,9 +464,6 @@ CUPS_DOCROOT='${exec_prefix}/share/doc/cups'
AC_DEFINE_UNQUOTED(CUPS_DOCROOT, "$exec_prefix/share/doc/cups")
AC_SUBST(CUPS_DOCROOT)
dnl Set the CUPS_FONTPATH directory...
AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$fontpath")
AC_OUTPUT(Makedefs cups.sh)
dnl
+12 -17
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: cups.list 1368 2000-09-14 18:04:10Z mike $"
# "$Id: cups.list 1202 2000-07-07 21:25:17Z mike $"
#
# ESP Package Manager (EPM) file list for the Common UNIX Printing
# System (CUPS).
@@ -28,7 +28,7 @@
%vendor Easy Software Products
%license LICENSE.txt
%readme README.txt
%version 1.1.3
%version 1.1
%incompat printpro
%system all
@@ -111,8 +111,7 @@ l 0555 root sys $LIBDIR/libcupsimage.so libcupsimage.so.2
# Directories
d 0755 root sys $LOGDIR -
d 0700 lp sys $REQUESTS -
d 1700 lp sys $REQUESTS/tmp -
d 0755 root sys $REQUESTS -
# Data files
f 0444 root sys $LOCALEDIR/C/cups_C locale/C/cups_C
@@ -311,12 +310,10 @@ f 0644 root sys $SERVERROOT/mime.types conf/mime.types
c 0644 root sys $SERVERROOT/printers.conf conf/printers.conf
%system linux
# Linux version needs PAM...
%requires /lib/libpam.so.0
d 0555 root sys $PAMDIR -
c 0644 root sys $PAMDIR/cups data/cups.pam
c 0644 root sys $PAMDIR/cups.suse data/cups.suse
%install if test -f /lib/security/pam_unix.so; then
%install mv $PAMDIR/cups.suse $PAMDIR/cups
%install fi
%system all
# Developer files
@@ -392,8 +389,6 @@ f 0444 root sys $DOCDIR/sdd.html doc/sdd.html
f 0444 root sys $DOCDIR/sdd.pdf doc/sdd.pdf
f 0444 root sys $DOCDIR/spm.html doc/spm.html
f 0444 root sys $DOCDIR/spm.pdf doc/spm.pdf
f 0444 root sys $DOCDIR/sps.html doc/sps.html
f 0444 root sys $DOCDIR/sps.pdf doc/sps.pdf
f 0444 root sys $DOCDIR/ssr.html doc/ssr.html
f 0444 root sys $DOCDIR/ssr.pdf doc/ssr.pdf
f 0444 root sys $DOCDIR/sum.html doc/sum.html
@@ -446,7 +441,7 @@ d 0555 root sys $MANDIR/man5 -
d 0555 root sys $MANDIR/man1m -
f 0444 root sys $MANDIR/man1m/accept.1m man/accept.man
l 0444 root sys $MANDIR/man1m/reject.1m accept.1m
l 0444 root sys $MANDIR/man1m/reject.1m accept.man
f 0444 root sys $MANDIR/man1/backend.1 man/backend.man
f 0444 root sys $MANDIR/man1/classes.conf.5 man/classes.conf.man
f 0444 root sys $MANDIR/man1m/cups-lpd.1m man/cups-lpd.man
@@ -454,7 +449,7 @@ f 0444 root sys $MANDIR/man1m/cups-polld.1m man/cups-polld.man
f 0444 root sys $MANDIR/man1m/cupsd.1m man/cupsd.man
f 0444 root sys $MANDIR/man5/cupsd.conf.5 man/cupsd.conf.man
f 0444 root sys $MANDIR/man1m/enable.1m man/enable.man
l 0444 root sys $MANDIR/man1m/disable.1m enable.1m
l 0444 root sys $MANDIR/man1m/disable.1m enable.man
f 0444 root sys $MANDIR/man1/filter.1 man/filter.man
f 0444 root sys $MANDIR/man1m/lpadmin.1m man/lpadmin.man
f 0444 root sys $MANDIR/man1m/lpc.1m man/lpc.man
@@ -466,7 +461,7 @@ f 0444 root sys $MANDIR/man1/lprm.1 man/lprm.man
f 0444 root sys $MANDIR/man1/lpr.1 man/lpr.man
f 0444 root sys $MANDIR/man1/lpstat.1 man/lpstat.man
f 0444 root sys $MANDIR/man1/lp.1 man/lp.man
l 0444 root sys $MANDIR/man1/cancel.1 lp.1
l 0444 root sys $MANDIR/man1/cancel.1 lp.man
f 0444 root sys $MANDIR/man5/mime.convs.5 man/mime.convs.man
f 0444 root sys $MANDIR/man5/mime.types.5 man/mime.types.man
f 0444 root sys $MANDIR/man5/printers.conf.5 man/printers.conf.man
@@ -477,7 +472,7 @@ d 0555 root sys $MANDIR/man5 -
d 0555 root sys $MANDIR/man8 -
f 0444 root sys $MANDIR/man8/accept.8 man/accept.man
l 0444 root sys $MANDIR/man8/reject.8 accept.8
l 0444 root sys $MANDIR/man8/reject.8 accept.man
f 0444 root sys $MANDIR/man1/backend.1 man/backend.man
f 0444 root sys $MANDIR/man1/classes.conf.5 man/classes.conf.man
f 0444 root sys $MANDIR/man8/cups-lpd.8 man/cups-lpd.man
@@ -485,7 +480,7 @@ f 0444 root sys $MANDIR/man8/cups-polld.8 man/cups-polld.man
f 0444 root sys $MANDIR/man8/cupsd.8 man/cupsd.man
f 0444 root sys $MANDIR/man5/cupsd.conf.5 man/cupsd.conf.man
f 0444 root sys $MANDIR/man8/enable.8 man/enable.man
l 0444 root sys $MANDIR/man8/disable.8 enable.8
l 0444 root sys $MANDIR/man8/disable.8 enable.man
f 0444 root sys $MANDIR/man1/filter.1 man/filter.man
f 0444 root sys $MANDIR/man8/lpadmin.8 man/lpadmin.man
f 0444 root sys $MANDIR/man8/lpc.8 man/lpc.man
@@ -497,7 +492,7 @@ f 0444 root sys $MANDIR/man1/lprm.1 man/lprm.man
f 0444 root sys $MANDIR/man1/lpr.1 man/lpr.man
f 0444 root sys $MANDIR/man1/lpstat.1 man/lpstat.man
f 0444 root sys $MANDIR/man1/lp.1 man/lp.man
l 0444 root sys $MANDIR/man1/cancel.1 lp.1
l 0444 root sys $MANDIR/man1/cancel.1 lp.man
f 0444 root sys $MANDIR/man5/mime.convs.5 man/mime.convs.man
f 0444 root sys $MANDIR/man5/mime.types.5 man/mime.types.man
f 0444 root sys $MANDIR/man5/printers.conf.5 man/printers.conf.man
@@ -507,5 +502,5 @@ f 0444 root sys $MANDIR/man5/printers.conf.5 man/printers.conf.man
i 0555 root sys cups cups.sh
#
# End of "$Id: cups.list 1368 2000-09-14 18:04:10Z mike $".
# End of "$Id: cups.list 1202 2000-07-07 21:25:17Z mike $".
#
+1 -1
Ver Arquivo
@@ -6,7 +6,7 @@
#
# Linux chkconfig stuff:
#
# chkconfig: 0235 99 00
# chkconfig: 02 99 00
# description: Startup/shutdown script for the Common UNIX \
# Printing System (CUPS).
#
+24 -85
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: cups.spec 1339 2000-09-06 12:38:12Z mike $"
# "$Id: cups.spec 1214 2000-07-10 20:58:19Z mike $"
#
# RPM "spec" file for the Common UNIX Printing System (CUPS).
#
@@ -26,16 +26,16 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.1.3
Version: 1.1
Release: 0
Copyright: GPL
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.gz
Source: ftp://ftp.easysw.com/pub/cups/1.1/cups-1.1-source.tar.gz
Url: http://www.cups.org
Packager: Michael Sweet <mike@easysw.com>
Vendor: Easy Software Products
# use buildroot so as not to disturb the version already installed
BuildRoot: /var/tmp/%{name}-root
BuildRoot: /tmp/rpmbuild
Conflicts: lpr
%package devel
@@ -67,108 +67,47 @@ make
# RPM_BUILD_ROOT exists
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc0.d
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc3.d
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc5.d
make prefix=$RPM_BUILD_ROOT \
make datadir=$RPM_BUILD_ROOT/usr/share \
exec_prefix=$RPM_BUILD_ROOT/usr \
BINDIR=$RPM_BUILD_ROOT/usr/bin \
DATADIR=$RPM_BUILD_ROOT/usr/share/cups \
DOCDIR=$RPM_BUILD_ROOT/usr/share/doc/cups \
INCLUDEDIR=$RPM_BUILD_ROOT/usr/include \
LIBDIR=$RPM_BUILD_ROOT/usr/lib \
LOCALEDIR=$RPM_BUILD_ROOT/usr/share/locale \
MANDIR=$RPM_BUILD_ROOT/usr/man \
PAMDIR=$RPM_BUILD_ROOT/etc/pam.d \
REQUESTS=$RPM_BUILD_ROOT/var/spool/cups \
SBINDIR=$RPM_BUILD_ROOT/usr/sbin \
SERVERBIN=$RPM_BUILD_ROOT/usr/lib/cups \
SERVERROOT=$RPM_BUILD_ROOT/etc/cups \
includedir=$RPM_BUILD_ROOT/usr/include \
infodir=$RPM_BUILD_ROOT/usr/info \
libdir=$RPM_BUILD_ROOT/usr/lib \
localestatedir=$RPM_BUILD_ROOT/var \
prefix=$RPM_BUILD_ROOT \
sharedstatedir=$RPM_BUILD_ROOT/usr/com \
sysconfdir=$RPM_BUILD_ROOT/etc \
install
%post
if test -x /sbin/chkconfig; then
/sbin/chkconfig --add cups
/sbin/chkconfig cups on
fi
install -m 755 -o root -g root cups.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/cups
if test -f /sbin/init.d/cups; then
/sbin/init.d/cups start
fi
if test -f /etc/rc.d/init.d/cups; then
/etc/rc.d/init.d/cups start
fi
if test -f /etc/init.d/cups; then
/etc/init.d/cups start
fi
%post
/sbin/chkconfig --add cups
/sbin/chkconfig cups on
/etc/rc.d/init.d/cups start
%preun
if test -f /sbin/init.d/cups; then
/sbin/init.d/cups stop
fi
if test -f /etc/rc.d/init.d/cups; then
/etc/rc.d/init.d/cups stop
fi
if test -f /etc/init.d/cups; then
/etc/init.d/cups stop
fi
if test -x /sbin/chkconfig; then
/sbin/chkconfig --del cups
fi
/etc/rc.d/init.d/cups stop
/sbin/chkconfig --del cups
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir /etc/cups
%config /etc/cups/*.conf
%dir /etc/cups/certs
%dir /etc/cups/interfaces
/etc/cups/mime.types
/etc/cups/mime.convs
%dir /etc/cups/ppd
%dir /etc/pam.d
/etc/pam.d/*
# RC dirs are a pain under Linux... Uncomment the appropriate ones if you
# don't use Red Hat or Mandrake...
/etc/rc.d/init.d/*
/etc/rc.d/rc0.d/*
/etc/rc.d/rc3.d/*
/etc/rc.d/rc5.d/*
#/etc/init.d/*
#/etc/rc0.d/*
#/etc/rc3.d/*
#/etc/rc5.d/*
#/sbin/rc.d/*
#/sbin/rc.d/rc0.d/*
#/sbin/rc.d/rc3.d/*
#/sbin/rc.d/rc5.d/*
/etc/*
/usr/bin/*
/usr/lib/*.so*
%dir /usr/lib/cups
/usr/lib/cups/*
/usr/man/*
/usr/sbin/*
%dir /usr/share/cups
/usr/share/cups/*
%dir /usr/share/locale
/usr/share/locale/*
%attr(0700,lp,root) %dir /var/spool/cups
%attr(1700,lp,root) %dir/var/spool/cups/tmp
/usr/share/*
/usr/lib/cups/*
/var/*
%files devel
%dir /usr/include/cups
/usr/include/cups/*
/usr/lib/*.a
#
# End of "$Id: cups.spec 1339 2000-09-06 12:38:12Z mike $".
# End of "$Id: cups.spec 1214 2000-07-10 20:58:19Z mike $".
#
+3 -3
Ver Arquivo
@@ -59,7 +59,7 @@ all: $(TARGETS)
#
clean:
$(RM) $(OBJS) $(TARGETS) `basename $(LIBCUPS) .2`
$(RM) $(OBJS) $(TARGETS)
#
@@ -76,8 +76,8 @@ install: all
$(INSTALL_LIB) $(LIBCUPS) $(LIBDIR)
if test $(LIBCUPS) != "libcups.a" -a $(LIBCUPS) != "libcups.la"; then \
$(INSTALL_LIB) libcups.a $(LIBDIR); \
$(RM) `basename $(LIBDIR)/$(LIBCUPS) .2`; \
$(LN) $(LIBCUPS) `basename $(LIBDIR)/$(LIBCUPS) .2`; \
$(RM) `basename $(LIBCUPS) .2`; \
$(LN) $(LIBCUPS) `basename $(LIBCUPS) .2`; \
fi
+3 -9
Ver Arquivo
@@ -29,8 +29,8 @@
* Include necessary headers...
*/
# include "ipp.h"
# include "ppd.h"
# include <cups/ipp.h>
# include <cups/ppd.h>
/*
@@ -46,7 +46,7 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0103
# define CUPS_VERSION 1.0100
# define CUPS_DATE_ANY -1
@@ -75,7 +75,6 @@ enum /* Not a typedef'd enum so we can OR */
CUPS_PRINTER_LARGE = 0x4000, /* Can do D/E/A1/A0 */
CUPS_PRINTER_VARIABLE = 0x8000, /* Can do variable sizes */
CUPS_PRINTER_IMPLICIT = 0x10000, /* Implicit class */
CUPS_PRINTER_DEFAULT = 0x20000, /* Default printer on network */
CUPS_PRINTER_OPTIONS = 0xfffc /* ~(CLASS | REMOTE | IMPLICIT) */
};
@@ -126,8 +125,6 @@ extern void cupsSetDests(int num_dests, cups_dest_t *dests);
extern int cupsAddOption(const char *name, const char *value,
int num_options, cups_option_t **options);
extern void cupsEncodeOptions(ipp_t *ipp, int num_options,
cups_option_t *options);
extern void cupsFreeOptions(int num_options, cups_option_t *options);
extern const char *cupsGetOption(const char *name, int num_options,
cups_option_t *options);
@@ -138,9 +135,6 @@ extern int cupsMarkOptions(ppd_file_t *ppd, int num_options,
extern const char *cupsGetPassword(const char *prompt);
extern const char *cupsServer(void);
extern void cupsSetPasswordCB(const char *(*cb)(const char *));
extern void cupsSetServer(const char *server);
extern void cupsSetUser(const char *user);
extern const char *cupsUser(void);
# ifdef __cplusplus
+3 -2
Ver Arquivo
@@ -87,8 +87,9 @@ cupsAddDest(const char *name, /* I - Name of destination */
for (i = num_dests; i > 0; i --, dest ++)
if (strcasecmp(name, dest->name) < 0)
break;
else if (strcasecmp(name, dest->name) == 0 &&
instance != NULL && dest->instance != NULL &&
else if (instance == NULL && dest->instance != NULL)
break;
else if (instance != NULL && dest->instance != NULL &&
strcasecmp(instance, dest->instance) < 0)
break;
+171 -205
Ver Arquivo
@@ -25,10 +25,8 @@
*
* Contents:
*
* ppdCollect() - Collect all marked options that reside in the specified
* ppdEmit() - Emit code for marked options to a file.
* ppdEmitFd() - Emit code for marked options to a file.
* ppd_sort() - Sort options by ordering numbers...
* ppdEmit() - Emit code for marked options to a file.
* ppdEmitFd() - Emit code for marked options to a file.
*/
/*
@@ -51,17 +49,180 @@
*/
static int ppd_sort(ppd_choice_t **c1, ppd_choice_t **c2);
static int ppd_collect(ppd_file_t *ppd, ppd_section_t section,
ppd_choice_t ***choices);
/*
* 'ppdCollect()' - Collect all marked options that reside in the specified
* section.
* 'ppdEmit()' - Emit code for marked options to a file.
*/
int /* O - Number of options marked */
ppdCollect(ppd_file_t *ppd, /* I - PPD file data */
ppd_section_t section, /* I - Section to collect */
ppd_choice_t ***choices) /* O - Pointers to choices */
int /* O - 0 on success, -1 on failure */
ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
FILE *fp, /* I - File to write to */
ppd_section_t section) /* I - Section to write */
{
int i, /* Looping var */
count; /* Number of choices */
ppd_choice_t **choices; /* Choices */
ppd_size_t *size; /* Custom page size */
if ((count = ppd_collect(ppd, section, &choices)) == 0)
return (0);
for (i = 0; i < count; i ++)
if (section != PPD_ORDER_EXIT && section != PPD_ORDER_JCL)
{
/*
* 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(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...)
*/
size = ppdPageSize(ppd, "Custom");
fprintf(fp, "%.0f %.0f 0 0 0\n", size->width, size->length);
if (choices[i]->code == NULL)
{
/*
* This can happen with certain buggy PPD files that don't include
* a CustomPageSize command sequence... We just use a generic
* Level 2 command sequence...
*/
fputs("pop pop pop\n", fp);
fputs("<</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice\n", fp);
}
}
if (choices[i]->code != NULL && choices[i]->code[0] != '\0')
{
if (fputs(choices[i]->code, fp) < 0)
{
free(choices);
return (-1);
}
if (choices[i]->code[strlen(choices[i]->code) - 1] != '\n')
putc('\n', fp);
}
if (fputs("%%EndFeature\n", fp) < 0)
{
free(choices);
return (-1);
}
}
else if (fputs(choices[i]->code, fp) < 0)
{
free(choices);
return (-1);
}
free(choices);
return (0);
}
/*
* 'ppdEmitFd()' - Emit code for marked options to a file.
*/
int /* O - 0 on success, -1 on failure */
ppdEmitFd(ppd_file_t *ppd, /* I - PPD file record */
int fd, /* I - File to write to */
ppd_section_t section) /* I - Section to write */
{
int i, /* Looping var */
count; /* Number of choices */
ppd_choice_t **choices; /* Choices */
char buf[1024]; /* Output buffer for feature */
if ((count = ppd_collect(ppd, section, &choices)) == 0)
return (0);
for (i = 0; i < count; i ++)
if (section != PPD_ORDER_EXIT && section != PPD_ORDER_JCL)
{
/*
* Send DSC comments with option...
*/
sprintf(buf, "%%%%BeginFeature: %s %s\n",
((ppd_option_t *)choices[i]->option)->keyword, choices[i]->choice);
if (write(fd, buf, strlen(buf)) < 1)
{
free(choices);
return (-1);
}
if (write(fd, choices[i]->code, strlen(choices[i]->code)) < 1)
{
free(choices);
return (-1);
}
if (write(fd, "%%EndFeature\n", 13) < 1)
{
free(choices);
return (-1);
}
}
else if (write(fd, choices[i]->code, strlen(choices[i]->code)) < 1)
{
free(choices);
return (-1);
}
free(choices);
return (0);
}
/*
* 'ppd_sort()' - Sort options by ordering numbers...
*/
static int /* O - -1 if c1 < c2, 0 if equal, 1 otherwise */
ppd_sort(ppd_choice_t **c1, /* I - First choice */
ppd_choice_t **c2) /* I - Second choice */
{
if (((ppd_option_t *)(*c1)->option)->order < ((ppd_option_t *)(*c2)->option)->order)
return (-1);
else if (((ppd_option_t *)(*c1)->option)->order > ((ppd_option_t *)(*c2)->option)->order)
return (1);
else
return (0);
}
/*
* 'ppd_collect()' - Collect all marked options that reside in the specified
* section.
*/
static int /* O - Number of options marked */
ppd_collect(ppd_file_t *ppd, /* I - PPD file data */
ppd_section_t section, /* I - Section to collect */
ppd_choice_t ***choices) /* O - Pointers to choices */
{
int i, j, k, m; /* Looping vars */
ppd_group_t *g, /* Current group */
@@ -135,201 +296,6 @@ ppdCollect(ppd_file_t *ppd, /* I - PPD file data */
}
/*
* 'ppdEmit()' - Emit code for marked options to a file.
*/
int /* O - 0 on success, -1 on failure */
ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
FILE *fp, /* I - File to write to */
ppd_section_t section) /* I - Section to write */
{
int i, /* Looping var */
count; /* Number of choices */
ppd_choice_t **choices; /* Choices */
ppd_size_t *size; /* Custom page size */
if ((count = ppdCollect(ppd, section, &choices)) == 0)
return (0);
for (i = 0; i < count; i ++)
if (section != PPD_ORDER_EXIT && section != PPD_ORDER_JCL)
{
/*
* Send wrapper commands to prevent printer errors for unsupported
* options...
*/
if (fputs("[{\n", fp) < 0)
{
free(choices);
return (-1);
}
/*
* 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(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...)
*/
size = ppdPageSize(ppd, "Custom");
fprintf(fp, "%.0f %.0f 0 0 0\n", size->width, size->length);
if (choices[i]->code == NULL)
{
/*
* This can happen with certain buggy PPD files that don't include
* a CustomPageSize command sequence... We just use a generic
* Level 2 command sequence...
*/
fputs("pop pop pop\n", fp);
fputs("<</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice\n", fp);
}
}
if (choices[i]->code != NULL && choices[i]->code[0] != '\0')
{
if (fputs(choices[i]->code, fp) < 0)
{
free(choices);
return (-1);
}
if (choices[i]->code[strlen(choices[i]->code) - 1] != '\n')
putc('\n', fp);
}
if (fputs("%%EndFeature\n", fp) < 0)
{
free(choices);
return (-1);
}
if (fputs("} stopped cleartomark\n", fp) < 0)
{
free(choices);
return (-1);
}
}
else if (fputs(choices[i]->code, fp) < 0)
{
free(choices);
return (-1);
}
free(choices);
return (0);
}
/*
* 'ppdEmitFd()' - Emit code for marked options to a file.
*/
int /* O - 0 on success, -1 on failure */
ppdEmitFd(ppd_file_t *ppd, /* I - PPD file record */
int fd, /* I - File to write to */
ppd_section_t section) /* I - Section to write */
{
int i, /* Looping var */
count; /* Number of choices */
ppd_choice_t **choices; /* Choices */
char buf[1024]; /* Output buffer for feature */
if ((count = ppdCollect(ppd, section, &choices)) == 0)
return (0);
for (i = 0; i < count; i ++)
if (section != PPD_ORDER_EXIT && section != PPD_ORDER_JCL)
{
/*
* Send wrapper commands to prevent printer errors for unsupported
* options...
*/
if (write(fd, "[{\n", 3) < 1)
{
free(choices);
return (-1);
}
/*
* Send DSC comments with option...
*/
sprintf(buf, "%%%%BeginFeature: %s %s\n",
((ppd_option_t *)choices[i]->option)->keyword, choices[i]->choice);
if (write(fd, buf, strlen(buf)) < 1)
{
free(choices);
return (-1);
}
if (write(fd, choices[i]->code, strlen(choices[i]->code)) < 1)
{
free(choices);
return (-1);
}
if (write(fd, "%%EndFeature\n", 13) < 1)
{
free(choices);
return (-1);
}
if (write(fd, "} stopped cleartomark\n", 22) < 1)
{
free(choices);
return (-1);
}
}
else if (write(fd, choices[i]->code, strlen(choices[i]->code)) < 1)
{
free(choices);
return (-1);
}
free(choices);
return (0);
}
/*
* 'ppd_sort()' - Sort options by ordering numbers...
*/
static int /* O - -1 if c1 < c2, 0 if equal, 1 otherwise */
ppd_sort(ppd_choice_t **c1, /* I - First choice */
ppd_choice_t **c2) /* I - Second choice */
{
if (((ppd_option_t *)(*c1)->option)->order < ((ppd_option_t *)(*c2)->option)->order)
return (-1);
else if (((ppd_option_t *)(*c1)->option)->order > ((ppd_option_t *)(*c2)->option)->order)
return (1);
else
return (0);
}
/*
* End of "$Id$".
*/
+1 -1
Ver Arquivo
@@ -47,7 +47,7 @@
# include <netinet/tcp.h>
# endif /* WIN32 || __EMX__ */
# include "md5.h"
# include <cups/md5.h>
/*
+4 -25
Ver Arquivo
@@ -44,7 +44,6 @@
* ippNew() - Allocate a new IPP request.
* ippPort() - Return the default IPP port number.
* ippRead() - Read data for an IPP request.
* ippSetPort() - Set the default port number.
* ippTimeToDate() - Convert from UNIX time to RFC 1903 format.
* ippWrite() - Write data for an IPP request.
* _ipp_add_attr() - Add a new attribute to the request.
@@ -66,13 +65,6 @@
#include <ctype.h>
/*
* Local globals...
*/
static int ipp_port = 0;
/*
* Local functions...
*/
@@ -1585,25 +1577,12 @@ ippPort(void)
struct servent *port; /* Port number info */
if (ipp_port)
return (ipp_port);
else if ((server_port = getenv("IPP_PORT")) != NULL)
return (ipp_port = atoi(server_port));
if ((server_port = getenv("IPP_PORT")) != NULL)
return (atoi(server_port));
else if ((port = getservbyname("ipp", NULL)) == NULL)
return (ipp_port = IPP_PORT);
return (IPP_PORT);
else
return (ipp_port = ntohs(port->s_port));
}
/*
* 'ippSetPort()' - Set the default port number.
*/
void
ippSetPort(int p) /* I - Port number to use */
{
ipp_port = p;
return (ntohs(port->s_port));
}
+1 -2
Ver Arquivo
@@ -30,7 +30,7 @@
* Include necessary headers...
*/
# include "http.h"
# include <cups/http.h>
/*
@@ -342,7 +342,6 @@ extern ipp_state_t ippRead(http_t *http, ipp_t *ipp);
extern const ipp_uchar_t *ippTimeToDate(time_t t);
extern ipp_state_t ippWrite(http_t *http, ipp_t *ipp);
extern int ippPort(void);
extern void ippSetPort(int p);
extern ipp_attribute_t *_ipp_add_attr(ipp_t *, int);
extern void _ipp_free_attr(ipp_attribute_t *);
+5 -275
Ver Arquivo
@@ -23,12 +23,11 @@
*
* Contents:
*
* cupsAddOption() - Add an option to an option array.
* cupsEncodeOptions() - Encode printer options into IPP attributes.
* cupsFreeOptions() - Free all memory used by options.
* cupsGetOption() - Get an option value.
* cupsParseOptions() - Parse options from a command-line argument.
* cupsMarkOptions() - Mark command-line options in a PPD file.
* cupsAddOption() - Add an option to an option array.
* cupsFreeOptions() - Free all memory used by options.
* cupsGetOption() - Get an option value.
* cupsParseOptions() - Parse options from a command-line argument.
* cupsMarkOptions() - Mark command-line options in a PPD file.
*/
/*
@@ -39,7 +38,6 @@
#include <stdlib.h>
#include <ctype.h>
#include "string.h"
#include "debug.h"
/*
@@ -102,274 +100,6 @@ cupsAddOption(const char *name, /* I - Name of option */
}
/*
* 'cupsEncodeOptions()' - Encode printer options into IPP attributes.
*/
void
cupsEncodeOptions(ipp_t *ipp, /* I - Request to add to */
int num_options, /* I - Number of options */
cups_option_t *options) /* I - Options */
{
int i, j; /* Looping vars */
int count; /* Number of values */
int n; /* Attribute value */
char *s, /* Pointer into option value */
*val, /* Pointer to option value */
*copy, /* Copy of option value */
*sep; /* Option separator */
ipp_attribute_t *attr; /* IPP job-id attribute */
DEBUG_printf(("cupsEncodeOptions(%p, %d, %p)\n", ipp, num_options, options));
if (ipp == NULL || num_options < 1 || options == NULL)
return;
/*
* Handle the document format stuff first...
*/
if ((val = (char *)cupsGetOption("document-format", num_options, options)) != NULL)
ippAddString(ipp, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, val);
else if (cupsGetOption("raw", num_options, options))
ippAddString(ipp, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, "application/vnd.cups-raw");
else
ippAddString(ipp, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, "application/octet-stream");
/*
* Then add all other options...
*/
for (i = 0; i < num_options; i ++)
{
/*
* Skip document format options - handled above...
*/
if (strcasecmp(options[i].name, "raw") == 0 ||
strcasecmp(options[i].name, "document-format") == 0)
continue;
/*
* Count the number of values...
*/
for (count = 1, sep = options[i].value;
(sep = strchr(sep + 1, ',')) != NULL;
count ++);
DEBUG_printf(("cupsEncodeOptions: option = \'%s\', count = %d\n",
options[i].name, count));
if ((attr = _ipp_add_attr(ipp, count)) == NULL)
{
/*
* Ran out of memory!
*/
DEBUG_puts("cupsEncodeOptions: Ran out of memory for attributes!");
return;
}
attr->group_tag = IPP_TAG_JOB;
if ((attr->name = strdup(options[i].name)) == NULL)
{
/*
* Ran out of memory!
*/
DEBUG_puts("cupsEncodeOptions: Ran out of memory for name!");
return;
}
if (count > 1)
{
/*
* Make a copy of the value we can fiddle with...
*/
if ((copy = strdup(options[i].value)) == NULL)
{
/*
* Ran out of memory!
*/
DEBUG_puts("cupsEncodeOptions: Ran out of memory for value copy!");
return;
}
val = copy;
}
else
{
/*
* Since we have a single value, use the value directly...
*/
val = options[i].value;
copy = NULL;
}
/*
* See what the option value is; for compatibility with older interface
* scripts, we have to support single-argument options as well as
* option=value, option=low-high, option=MxN, and option=val1,val2,...,valN.
*/
if (*val == '\0')
{
/*
* Old-style System V boolean value...
*/
attr->value_tag = IPP_TAG_BOOLEAN;
if (strncasecmp(attr->name, "no", 2) == 0)
{
DEBUG_puts("cupsEncodeOptions: Added boolean false value...");
strcpy(attr->name, attr->name + 2);
attr->values[0].boolean = 0;
}
else
{
DEBUG_puts("cupsEncodeOptions: Added boolean true value...");
attr->values[0].boolean = 1;
}
}
else
{
/*
* Scan the value string for values...
*/
for (j = 0; *val != '\0'; val = sep, j ++)
{
/*
* Find the end of this value and mark it if needed...
*/
if ((sep = strchr(val, ',')) != NULL)
*sep++ = '\0';
else
sep = val + strlen(val);
/*
* See what kind of value it is...
*/
if (strcasecmp(val, "true") == 0 ||
strcasecmp(val, "on") == 0 ||
strcasecmp(val, "yes") == 0)
{
/*
* Boolean value - true...
*/
attr->value_tag = IPP_TAG_BOOLEAN;
attr->values[j].boolean = 1;
DEBUG_puts("cupsEncodeOptions: Added boolean true value...");
}
else if (strcasecmp(val, "false") == 0 ||
strcasecmp(val, "off") == 0 ||
strcasecmp(val, "no") == 0)
{
/*
* Boolean value - false...
*/
attr->value_tag = IPP_TAG_BOOLEAN;
attr->values[j].boolean = 0;
DEBUG_puts("cupsEncodeOptions: Added boolean false value...");
}
else
{
/*
* Number, range, resolution, or string...
*/
n = strtol(val, &s, 0);
if (*s != '\0' && *s != '-' && (*s != 'x' || s == val))
{
/*
* String value(s)...
*/
if ((attr->values[j].string.text = strdup(val)) == NULL)
{
/*
* Ran out of memory!
*/
DEBUG_puts("cupsEncodeOptions: Ran out of memory for string!");
return;
}
attr->value_tag = IPP_TAG_NAME;
DEBUG_printf(("cupsEncodeOptions: Added string value \'%s\'...\n", val));
}
else if (*s == '-')
{
attr->value_tag = IPP_TAG_RANGE;
attr->values[j].range.lower = n;
attr->values[j].range.upper = strtol(s + 1, NULL, 0);
DEBUG_printf(("cupsEncodeOptions: Added range option value %d-%d...\n",
n, attr->values[j].range.upper));
}
else if (*s == 'x')
{
attr->value_tag = IPP_TAG_RESOLUTION;
attr->values[j].resolution.xres = n;
attr->values[j].resolution.yres = strtol(s + 1, &s, 0);
if (strcasecmp(s, "dpc") == 0)
attr->values[j].resolution.units = IPP_RES_PER_CM;
else if (strcasecmp(s, "dpi") == 0)
attr->values[j].resolution.units = IPP_RES_PER_INCH;
else
{
if ((attr->values[j].string.text = strdup(val)) == NULL)
{
/*
* Ran out of memory!
*/
DEBUG_puts("cupsEncodeOptions: Ran out of memory for string!");
return;
}
attr->value_tag = IPP_TAG_NAME;
DEBUG_printf(("cupsEncodeOptions: Added string value \'%s\'...\n", val));
continue;
}
DEBUG_printf(("cupsEncodeOptions: Adding resolution option value %s...\n",
val));
}
else
{
attr->value_tag = IPP_TAG_INTEGER;
attr->values[j].integer = n;
DEBUG_printf(("cupsEncodeOptions: Adding integer option value %d...\n", n));
}
}
}
}
}
}
/*
* 'cupsFreeOptions()' - Free all memory used by options.
*/
+41 -46
Ver Arquivo
@@ -1028,6 +1028,45 @@ ppdOpen(FILE *fp) /* I - File to read from */
}
else if (strcmp(keyword, "CloseGroup") == 0)
group = NULL;
else if (strcmp(keyword, "OpenSubGroup") == 0)
{
/*
* Open a new sub-group...
*/
DEBUG_printf(("group = %p, subgroup = %p\n", group, subgroup));
if (group == NULL || subgroup != NULL)
{
ppdClose(ppd);
safe_free(string);
return (NULL);
}
if (group->num_subgroups == 0)
subgroup = malloc(sizeof(ppd_group_t));
else
subgroup = realloc(group->subgroups,
(group->num_subgroups + 1) * sizeof(ppd_group_t));
if (subgroup == NULL)
{
ppdClose(ppd);
safe_free(string);
return (NULL);
}
group->subgroups = subgroup;
subgroup += group->num_subgroups;
group->num_subgroups ++;
memset(subgroup, 0, sizeof(ppd_group_t));
ppd_decode(string);
ppd_fix(string);
strncpy(subgroup->text, string, sizeof(subgroup->text) - 1);
}
else if (strcmp(keyword, "CloseSubGroup") == 0)
subgroup = NULL;
else if (strcmp(keyword, "OrderDependency") == 0 ||
strcmp(keyword, "NonUIOrderDependency") == 0)
{
@@ -1534,7 +1573,7 @@ ppd_read(FILE *fp, /* I - File to read from */
*textptr, /* Text pointer */
*strptr, /* Pointer into string */
*lineptr, /* Current position in line buffer */
line[65536]; /* Line buffer (64k) */
line[262144]; /* Line buffer (256k) */
/*
@@ -1549,8 +1588,6 @@ ppd_read(FILE *fp, /* I - File to read from */
* Now loop until we have a valid line...
*/
*string = NULL;
do
{
/*
@@ -1584,12 +1621,10 @@ ppd_read(FILE *fp, /* I - File to read from */
ungetc(ch, fp);
}
ch = '\n';
*lineptr++ = '\n';
if (!endquote) /* Continue for multi-line text */
break;
*lineptr++ = '\n';
}
else
{
@@ -1604,46 +1639,6 @@ ppd_read(FILE *fp, /* I - File to read from */
}
}
if (endquote)
{
/*
* Didn't finish this quoted string...
*/
while ((ch = getc(fp)) != EOF)
if (ch == '\"')
break;
}
if (ch != '\n')
{
/*
* Didn't finish this line...
*/
while ((ch = getc(fp)) != EOF)
if (ch == '\r' || ch == '\n')
{
/*
* Line feed or carriage return...
*/
if (ch == '\r')
{
/*
* Check for a trailing line feed...
*/
if ((ch = getc(fp)) == EOF)
break;
if (ch != 0x0a)
ungetc(ch, fp);
}
break;
}
}
if (lineptr > line && lineptr[-1] == '\n')
lineptr --;
-2
Ver Arquivo
@@ -207,8 +207,6 @@ typedef struct /**** Files ****/
*/
extern void ppdClose(ppd_file_t *ppd);
extern int ppdCollect(ppd_file_t *ppd, ppd_section_t section,
ppd_choice_t ***choices);
extern int ppdConflicts(ppd_file_t *ppd);
extern int ppdEmit(ppd_file_t *ppd, FILE *fp,
ppd_section_t section);
+105 -202
Ver Arquivo
@@ -24,13 +24,9 @@
*
* Contents:
*
* cupsGetPassword() - Get a password from the user...
* cupsServer() - Return the hostname of the default server...
* cupsSetPasswordCB() - Set the password callback for CUPS.
* cupsSetServer() - Set the default server name...
* cupsSetUser() - Set the default user name...
* cupsUser() - Return the current users name.
* cups_get_password() - Get a password from the user...
* cupsUser() - Return the current users name.
* cupsGetPassword() - Get a password from the user...
* cupsServer() - Return the hostname of the default server...
*/
/*
@@ -38,173 +34,11 @@
*/
#include "cups.h"
#include "string.h"
#include <config.h>
#include <stdlib.h>
#include <ctype.h>
/*
* Local functions...
*/
static const char *cups_get_password(const char *prompt);
/*
* Local globals...
*/
static char cups_user[65] = "",
cups_server[256] = "";
static const char *(*cups_pwdcb)(const char *) = cups_get_password;
/*
* 'cupsGetPassword()' - Get a password from the user...
*/
const char * /* O - Password */
cupsGetPassword(const char *prompt) /* I - Prompt string */
{
return ((*cups_pwdcb)(prompt));
}
/*
* 'cupsServer()' - Return the hostname of the default server...
*/
const char * /* O - Server name */
cupsServer(void)
{
FILE *fp; /* client.conf file */
char *server; /* Pointer to server name */
const char *home; /* Home directory of user */
static char line[1024]; /* Line from file */
/*
* First see if we have already set the server name...
*/
if (!cups_server[0])
{
/*
* Then see if the CUPS_SERVER environment variable is set...
*/
if ((server = getenv("CUPS_SERVER")) == NULL)
{
/*
* Next check to see if we have a $HOME/.cupsrc or client.conf file...
*/
if ((home = getenv("HOME")) != NULL)
{
snprintf(line, sizeof(line), "%s/.cupsrc", home);
fp = fopen(line, "r");
}
else
fp = NULL;
if (fp == NULL)
{
if ((home = getenv("CUPS_SERVERROOT")) != NULL)
{
snprintf(line, sizeof(line), "%s/client.conf", home);
fp = fopen(line, "r");
}
else
fp = fopen(CUPS_SERVERROOT "/client.conf", "r");
}
server = "localhost";
if (fp != NULL)
{
/*
* Read the config file and look for a ServerName line...
*/
while (fgets(line, sizeof(line), fp) != NULL)
if (strncmp(line, "ServerName ", 11) == 0)
{
/*
* Got it! Drop any trailing newline and find the name...
*/
server = line + strlen(line) - 1;
if (*server == '\n')
*server = '\0';
for (server = line + 11; isspace(*server); server ++);
break;
}
fclose(fp);
}
}
/*
* Copy the server name over...
*/
strncpy(cups_server, server, sizeof(cups_server) - 1);
cups_server[sizeof(cups_server) - 1] = '\0';
}
return (cups_server);
}
/*
* 'cupsSetPasswordCB()' - Set the password callback for CUPS.
*/
void
cupsSetPasswordCB(const char *(*cb)(const char *)) /* I - Callback function */
{
if (cb == (const char *(*)(const char *))0)
cups_pwdcb = cups_get_password;
else
cups_pwdcb = cb;
}
/*
* 'cupsSetServer()' - Set the default server name...
*/
void
cupsSetServer(const char *server) /* I - Server name */
{
if (server)
{
strncpy(cups_server, server, sizeof(cups_server) - 1);
cups_server[sizeof(cups_server) - 1] = '\0';
}
else
cups_server[0] = '\0';
}
/*
* 'cupsSetUser()' - Set the default user name...
*/
void
cupsSetUser(const char *user) /* I - User name */
{
if (user)
{
strncpy(cups_user, user, sizeof(cups_user) - 1);
cups_user[sizeof(cups_user) - 1] = '\0';
}
else
cups_user[0] = '\0';
}
#if defined(WIN32) || defined(__EMX__)
/*
* WIN32 and OS/2 username and password stuff...
@@ -217,19 +51,16 @@ cupsSetUser(const char *user) /* I - User name */
const char * /* O - User name */
cupsUser(void)
{
if (!cups_user[0])
strcpy(cups_user, "WindowsUser");
return (cups_user);
return ("WindowsUser");
}
/*
* 'cups_get_password()' - Get a password from the user...
* 'cupsGetPassword()' - Get a password from the user...
*/
static const char * /* O - Password */
cups_get_password(const char *prompt) /* I - Prompt string */
const char * /* O - Password */
cupsGetPassword(const char *prompt) /* I - Prompt string */
{
return (NULL);
}
@@ -250,49 +81,121 @@ cupsUser(void)
struct passwd *pwd; /* User/password entry */
if (!cups_user[0])
{
/*
* Rewind the password file...
*/
/*
* Rewind the password file...
*/
setpwent();
setpwent();
/*
* Lookup the password entry for the current user.
*/
/*
* Lookup the password entry for the current user.
*/
if ((pwd = getpwuid(getuid())) == NULL)
strcpy(cups_user, "unknown"); /* Unknown user! */
else
{
/*
* Rewind the password file again and copy the username...
*/
if ((pwd = getpwuid(getuid())) == NULL)
return ("unknown"); /* Unknown user! */
setpwent();
/*
* Rewind the password file again and return the username...
*/
strncpy(cups_user, pwd->pw_name, sizeof(cups_user) - 1);
cups_user[sizeof(cups_user) - 1] = '\0';
}
}
setpwent();
return (cups_user);
return (pwd->pw_name);
}
/*
* 'cups_get_password()' - Get a password from the user...
* 'cupsGetPassword()' - Get a password from the user...
*/
static const char * /* O - Password */
cups_get_password(const char *prompt) /* I - Prompt string */
const char * /* O - Password */
cupsGetPassword(const char *prompt) /* I - Prompt string */
{
return (getpass(prompt));
}
#endif /* WIN32 || __EMX__ */
/*
* 'cupsServer()' - Return the hostname of the default server...
*/
const char * /* O - Server name */
cupsServer(void)
{
FILE *fp; /* client.conf file */
char *server; /* Pointer to server name */
const char *home; /* Home directory of user */
static char line[1024]; /* Line from file */
/*
* First see if the CUPS_SERVER environment variable is set...
*/
if ((server = getenv("CUPS_SERVER")) != NULL)
return (server);
/*
* Next check to see if we have a $HOME/.cupsrc or client.conf file...
*/
if ((home = getenv("HOME")) != NULL)
{
snprintf(line, sizeof(line), "%s/.cupsrc", home);
fp = fopen(line, "r");
}
else
fp = NULL;
if (fp == NULL)
{
if ((home = getenv("CUPS_SERVERROOT")) != NULL)
{
snprintf(line, sizeof(line), "%s/client.conf", home);
fp = fopen(line, "r");
}
else
fp = fopen(CUPS_SERVERROOT "/client.conf", "r");
}
if (fp == NULL)
return ("localhost");
/*
* Read the config file and look for a ServerName line...
*/
while (fgets(line, sizeof(line), fp) != NULL)
if (strncmp(line, "ServerName ", 11) == 0)
{
/*
* Got it! Drop any trailing newline and find the name...
*/
server = line + strlen(line) - 1;
if (*server == '\n')
*server = '\0';
for (server = line + 11; isspace(*server); server ++);
if (*server)
{
fclose(fp);
return (server);
}
}
/*
* Didn't see a ServerName line, so return "localhost"...
*/
fclose(fp);
return ("localhost");
}
/*
* End of "$Id$".
*/
+172 -184
Ver Arquivo
@@ -29,10 +29,8 @@
* cupsGetDefault() - Get the default printer or class.
* cupsGetPPD() - Get the PPD file for a printer.
* cupsGetPrinters() - Get a list of printers.
* cupsLastError() - Return the last IPP error that occurred.
* cupsPrintFile() - Print a file to a printer or class.
* cupsPrintFiles() - Print one or more files to a printer or class.
* cupsTempFile() - Generate a temporary filename.
* cups_connect() - Connect to the specified host...
* cups_local_auth() - Get the local authorization certificate if
* available/applicable...
@@ -50,7 +48,6 @@
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#if defined(WIN32) || defined(__EMX__)
# include <io.h>
@@ -177,19 +174,9 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
nonce[HTTP_MAX_VALUE], /* nonce="xyz" string */
plain[255], /* Plaintext username:password */
encode[255]; /* Encoded username:password */
char prompt[1024]; /* Prompt string */
if (http == NULL || request == NULL || resource == NULL)
{
if (request != NULL)
ippDelete(request);
last_error = IPP_INTERNAL_ERROR;
return (NULL);
}
DEBUG_printf(("cupsDoFileRequest(%p, %08s, \'%s\', \'%s\')\n",
DEBUG_printf(("cupsDoFileRequest(%08x, %08s, \'%s\', \'%s\')\n",
http, request, resource, filename ? filename : "(null)"));
/*
@@ -309,10 +296,10 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
* Nope - get a password from the user...
*/
snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(),
http->hostname);
printf("Authentication required for %s on %s...\n", cupsUser(),
http->hostname);
if ((password = cupsGetPassword(prompt)) != NULL)
if ((password = cupsGetPassword("UNIX Password: ")) != NULL)
{
/*
* Got a password; send it to the server...
@@ -445,12 +432,6 @@ cupsGetClasses(char ***classes) /* O - Classes */
char **temp; /* Temporary pointer */
if (classes == NULL)
{
last_error = IPP_INTERNAL_ERROR;
return (0);
}
/*
* Try to connect to the server...
*/
@@ -669,35 +650,22 @@ cupsGetDefault(void)
const char * /* O - Filename for PPD file */
cupsGetPPD(const char *name) /* I - Printer name */
{
ipp_t *request, /* IPP request */
*response; /* IPP response */
ipp_attribute_t *attr; /* Current attribute */
cups_lang_t *language; /* Local language */
FILE *fp; /* PPD file */
int bytes; /* Number of bytes read */
char buffer[8192]; /* Buffer for file */
char printer[HTTP_MAX_URI], /* Printer name */
method[HTTP_MAX_URI], /* Method/scheme name */
username[HTTP_MAX_URI], /* Username:password */
hostname[HTTP_MAX_URI], /* Hostname */
resource[HTTP_MAX_URI]; /* Resource name */
int port; /* Port number */
char *tempdir; /* Temporary file directory */
const char *password; /* Password string */
char realm[HTTP_MAX_VALUE], /* realm="xyz" string */
nonce[HTTP_MAX_VALUE], /* nonce="xyz" string */
plain[255], /* Plaintext username:password */
encode[255]; /* Encoded username:password */
http_status_t status; /* HTTP status from server */
char prompt[1024]; /* Prompt string */
static char filename[HTTP_MAX_URI]; /* Local filename */
if (name == NULL)
{
last_error = IPP_INTERNAL_ERROR;
return (NULL);
}
/*
* See if we can connect to the server...
*/
@@ -708,89 +676,20 @@ cupsGetPPD(const char *name) /* I - Printer name */
return (NULL);
}
if (strchr(name, '@') == NULL)
{
/*
* Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the following
* attributes:
*
* attributes-charset
* attributes-natural-language
* printer-uri
*/
request = ippNew();
request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
request->request.op.request_id = 1;
language = cupsLangDefault();
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
"attributes-charset", NULL, cupsLangEncoding(language));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
snprintf(buffer, sizeof(buffer), "ipp://localhost/printers/%s", name);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, buffer);
/*
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(cups_server, request, "/")) != NULL)
{
last_error = response->request.status.status_code;
if ((attr = ippFindAttribute(response, "printer-uri-supported",
IPP_TAG_URI)) != NULL)
{
/*
* Get the actual server and printer names...
*/
httpSeparate(attr->values[0].string.text, method, username, hostname,
&port, resource);
strcpy(printer, strrchr(resource, '/') + 1);
/*
* Remap local hostname to localhost...
*/
gethostname(buffer, sizeof(buffer));
if (strcasecmp(buffer, hostname) == 0)
strcpy(hostname, "localhost");
}
ippDelete(response);
}
cupsLangFree(language);
/*
* Reconnect to the correct server as needed...
*/
if (strcasecmp(cups_server->hostname, hostname) != 0)
{
httpClose(cups_server);
if ((cups_server = httpConnect(hostname, ippPort())) == NULL)
{
last_error = IPP_SERVICE_UNAVAILABLE;
return (NULL);
}
}
}
/*
* Get a temp file...
* Then check for the cache file...
*/
cupsTempFile(filename, sizeof(filename));
#if defined(WIN32) || defined(__EMX__)
tempdir = "C:/WINDOWS/TEMP";
snprintf(filename, sizeof(filename), "%s/%s.ppd", tempdir, printer);
#else
if ((tempdir = getenv("TMPDIR")) == NULL)
tempdir = "/tmp";
snprintf(filename, sizeof(filename), "%s/%d.%s.ppd", tempdir, getuid(), printer);
#endif /* WIN32 || __EMX__ */
/*
* And send a request to the HTTP server...
@@ -833,10 +732,10 @@ cupsGetPPD(const char *name) /* I - Printer name */
* Nope, get a password from the user...
*/
snprintf(prompt, sizeof(prompt), "Password for %s on %s? ", cupsUser(),
cups_server->hostname);
printf("Authentication required for %s on %s...\n", cupsUser(),
cups_server->hostname);
if ((password = cupsGetPassword(prompt)) != NULL)
if ((password = cupsGetPassword("UNIX Password: ")) != NULL)
{
/*
* Got a password; send it to the server...
@@ -889,7 +788,6 @@ cupsGetPPD(const char *name) /* I - Printer name */
* Can't open file; close the server connection and return NULL...
*/
httpFlush(cups_server);
httpClose(cups_server);
cups_server = NULL;
return (NULL);
@@ -919,12 +817,6 @@ cupsGetPrinters(char ***printers) /* O - Printers */
char **temp; /* Temporary pointer */
if (printers == NULL)
{
last_error = IPP_INTERNAL_ERROR;
return (0);
}
/*
* Try to connect to the server...
*/
@@ -1030,7 +922,7 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
int num_options,/* I - Number of options */
cups_option_t *options) /* I - Options */
{
DEBUG_printf(("cupsPrintFile(\'%s\', \'%s\', %d, %p)\n",
DEBUG_printf(("cupsPrintFile(\'%s\', \'%s\', %d, %08x)\n",
printer, filename, num_options, options));
return (cupsPrintFiles(name, 1, &filename, title, num_options, options));
@@ -1050,6 +942,9 @@ cupsPrintFiles(const char *name, /* I - Printer or class name */
cups_option_t *options) /* I - Options */
{
int i; /* Looping var */
int n, n2; /* Attribute values */
char *option, /* Name of option */
*s; /* Pointer into option value */
const char *val; /* Pointer to option value */
ipp_t *request; /* IPP request */
ipp_t *response; /* IPP response */
@@ -1061,7 +956,7 @@ cupsPrintFiles(const char *name, /* I - Printer or class name */
int jobid; /* New job ID */
DEBUG_printf(("cupsPrintFiles(\'%s\', %d, %p, %d, %p)\n",
DEBUG_printf(("cupsPrintFiles(\'%s\', %d, %p, %d, %08x)\n",
printer, num_files, files, num_options, options));
if (name == NULL || num_files < 1 || files == NULL)
@@ -1105,6 +1000,20 @@ cupsPrintFiles(const char *name, /* I - Printer or class name */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, uri);
/*
* Handle raw print files...
*/
if (cupsGetOption("raw", num_options, options))
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, "application/vnd.cups-raw");
else if ((val = cupsGetOption("document-format", num_options, options)) != NULL)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, val);
else
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, "application/octet-stream");
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, cupsUser());
@@ -1112,10 +1021,129 @@ cupsPrintFiles(const char *name, /* I - Printer or class name */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, title);
/*
* Then add all options...
* Then add all options on the command-line...
*/
cupsEncodeOptions(request, num_options, options);
for (i = 0; i < num_options; i ++)
{
/*
* Skip the "raw" option - handled above...
*/
if (strcasecmp(options[i].name, "raw") == 0 ||
strcasecmp(options[i].name, "document-format") == 0)
continue;
/*
* See what the option value is; for compatibility with older interface
* scripts, we have to support single-argument options as well as
* option=value, option=low-high, and option=MxN.
*/
option = options[i].name;
val = options[i].value;
if (*val == '\0')
val = NULL;
if (val != NULL)
{
if (strcasecmp(val, "true") == 0 ||
strcasecmp(val, "on") == 0 ||
strcasecmp(val, "yes") == 0)
{
/*
* Boolean value - true...
*/
n = 1;
val = "";
}
else if (strcasecmp(val, "false") == 0 ||
strcasecmp(val, "off") == 0 ||
strcasecmp(val, "no") == 0)
{
/*
* Boolean value - false...
*/
n = 0;
val = "";
}
n = strtol(val, &s, 0);
}
else
{
if (strncasecmp(option, "no", 2) == 0)
{
option += 2;
n = 0;
}
else
n = 1;
s = "";
}
if (*s != '\0' && *s != '-' && (*s != 'x' || s == val))
{
/*
* String value(s)...
*/
DEBUG_printf(("cupsPrintFile: Adding string option \'%s\' with value \'%s\'...\n",
option, val));
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, option, NULL, val);
}
else if (val != NULL)
{
/*
* Numeric value, range, or resolution...
*/
if (*s == '-')
{
n2 = strtol(s + 1, NULL, 0);
ippAddRange(request, IPP_TAG_JOB, option, n, n2);
DEBUG_printf(("cupsPrintFile: Adding range option \'%s\' with value %d-%d...\n",
option, n, n2));
}
else if (*s == 'x')
{
n2 = strtol(s + 1, &s, 0);
if (strcasecmp(s, "dpc") == 0)
ippAddResolution(request, IPP_TAG_JOB, option, IPP_RES_PER_CM, n, n2);
else if (strcasecmp(s, "dpi") == 0)
ippAddResolution(request, IPP_TAG_JOB, option, IPP_RES_PER_INCH, n, n2);
else
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, option, NULL, val);
DEBUG_printf(("cupsPrintFile: Adding resolution option \'%s\' with value %s...\n",
option, val));
}
else
{
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, option, n);
DEBUG_printf(("cupsPrintFile: Adding integer option \'%s\' with value %d...\n",
option, n));
}
}
else
{
/*
* Boolean value...
*/
DEBUG_printf(("cupsPrintFile: Adding boolean option \'%s\' with value %d...\n",
option, n));
ippAddBoolean(request, IPP_TAG_JOB, option, (char)n);
}
}
/*
* Do the request...
@@ -1225,9 +1253,7 @@ char * /* O - Filename */
cupsTempFile(char *filename, /* I - Pointer to buffer */
int len) /* I - Size of buffer */
{
int fd; /* File descriptor for temp file */
char *tmpdir; /* TMPDIR environment var */
struct timeval curtime; /* Current time */
static char buf[1024] = ""; /* Buffer if you pass in NULL and 0 */
@@ -1246,64 +1272,26 @@ cupsTempFile(char *filename, /* I - Pointer to buffer */
*/
if ((tmpdir = getenv("TMPDIR")) == NULL)
{
#ifdef WIN32
tmpdir = "C:/WINDOWS/TEMP";
#else
/*
* Put root temp files in restricted temp directory...
*/
tmpdir = "/var/tmp";
if (getuid() == 0)
tmpdir = CUPS_REQUESTS "/tmp";
else
tmpdir = "/var/tmp";
#endif /* WIN32 */
}
/*
* Make the temporary name using the specified directory...
*/
do
if ((int)(strlen(tmpdir) + 8) > len)
{
/*
* Get the current time of day...
* The specified directory exceeds the size of the buffer; default it...
*/
gettimeofday(&curtime, NULL);
/*
* Format a string using the hex time values...
*/
snprintf(filename, len, "%s/%p%05x", tmpdir,
curtime.tv_sec, curtime.tv_usec);
/*
* Open the file in "exclusive" mode, making sure that we don't
* stomp on an existing file or someone's symlink crack...
*/
#ifdef O_NOFOLLOW
fd = open(filename, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, 0600);
#else
fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0600);
#endif /* O_NOFOLLOW */
strcpy(buf, "/var/tmp/XXXXXX");
return (mktemp(buf));
}
while (fd < 0);
else
{
/*
* Make the temporary name using the specified directory...
*/
/*
* Close the temp file - it'll be reopened later as needed...
*/
close(fd);
/*
* Return the temp filename...
*/
return (filename);
sprintf(filename, "%s/XXXXXX", tmpdir);
return (mktemp(filename));
}
}
+1 -5
Ver Arquivo
@@ -94,11 +94,7 @@ install:
-if test "$(PAMDIR)" != ""; then \
$(MKDIR) $(PAMDIR); \
$(CHMOD) ugo+rx $(PAMDIR); \
if test -f /lib/security/pam_unix.so; then \
$(INSTALL_DATA) cups.suse $(PAMDIR)/cups; \
else \
$(INSTALL_DATA) cups.pam $(PAMDIR)/cups; \
fi \
$(INSTALL_DATA) cups.pam $(PAMDIR)/cups; \
fi
+25 -33
Ver Arquivo
@@ -22,28 +22,28 @@
% to third parties or copied or duplicated in any form, in whole or
% in part, without the prior written consent of Easy Software Products.
%
/CENTER { % Draw centered text
/CENTER \{ % Draw centered text
% (name) CENTER -
dup stringwidth pop % Get the width of the string
0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
show % Show the string
} bind def
/RIGHT { % Draw right-justified text
/RIGHT \{ % Draw right-justified text
% (name) RIGHT -
dup stringwidth pop % Get the width of the string
neg 0 rmoveto % Shift left the entire distance
show % Show the string
} bind def
/NUMBER { % Draw a number
/NUMBER \{ % Draw a number
% power n NUMBER -
1 index 1 eq { % power == 1?
1 index 1 eq \{ % power == 1?
round cvi exch pop % Convert "n" to integer
} {
} \{
1 index mul round exch div % Truncate extra decimal places
} ifelse
100 string cvs show % Convert to a string and show it...
} bind def
/CUPSLOGO { % Draw the CUPS logo
/CUPSLOGO \{ % Draw the CUPS logo
% height CUPSLOGO
% Start with a big C...
/Helvetica findfont 1 index scalefont setfont
@@ -61,14 +61,14 @@
dup 1.2 mul moveto
(System) show
} bind def
/ESPLOGO { % Draw the ESP logo
/ESPLOGO \{ % Draw the ESP logo
% height ESPLOGO
% Compute the size of the logo...
0 0
2 index 1.5 mul 3 index
% Do the "metallic" fill from 10% black to 40% black...
1 -0.001 0 {
1 -0.001 0 \{
dup % loopval
-0.15 mul % loopval * -0.15
0.9 add % 0.9 - loopval * 0.15
@@ -151,20 +151,14 @@ gsave
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
/boxWidth % width of text box
pageWidth pageHeight lt
{ pageWidth 54 mul }
{ pageHeight 42 mul }
ifelse def
newpath % Clear bounding path
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
pageWidth 4 mul scalefont def % size = pageWidth * 4 (nominally 34)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
pageWidth 2 mul scalefont def % size = pageWidth * 2 (nominally 17)
% Offset page to account for lower-left margin...
pageLeft 72 mul
@@ -176,30 +170,28 @@ gsave
pageWidth 36 mul % Center of page
pageHeight 72 mul % Top of page
pageWidth -7 mul add % - 2 lines
pageWidth -9 mul add % - 1 line
moveto % Position text
bigFont setfont % Font
(Classified) CENTER % Show text centered
pageWidth 36 mul % Center of page
pageHeight 6 mul % Bottom of page
pageWidth 8 mul % Bottom of page
moveto % Position text
bigFont setfont % Font
(Classified) CENTER % Show text centered
% Job information box...
pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul 9 add % x = pageWidth * 1/4 * 72 + 9
pageHeight 27 mul 9 sub % y = pageHeight * 3/8 * 72 - 9
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
0.5 setgray rectfill % Draw a shadow
pageWidth 36 mul % x = pageWidth * 1/2 * 72
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul % y = pageHeight * 1/4 * 72
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul % x = pageWidth * 1/4 * 72
pageHeight 27 mul % y = pageHeight * 3/8 * 72
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
4 copy 1 setgray rectfill % Clear the box to white
0 setgray rectstroke % Draw a black box around it...
@@ -209,7 +201,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 5 mul add % y += 2 lines
pageWidth 4 mul add % y += 2 lines
2 copy % Copy X & Y
moveto
(Job ID: ) RIGHT
@@ -218,7 +210,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 2 mul add % y += 1 line
pageWidth 1 mul add % y += 1 line
2 copy % Copy X & Y
moveto
(Title: ) RIGHT
@@ -227,7 +219,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -1 mul add % y -= 1 line
pageWidth -2 mul add % y -= 1 line
2 copy % Copy X & Y
moveto
(Requesting User: ) RIGHT
@@ -236,7 +228,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -4 mul add % y -= 2 lines
pageWidth -5 mul add % y -= 2 lines
2 copy % Copy X & Y
moveto
(Billing Info: ) RIGHT
@@ -262,6 +254,6 @@ gsave
grestore
showpage
%
% End of "$Id: classified 1379 2000-09-18 17:12:42Z mike $".
% End of "$Id: classified 1075 2000-05-11 20:02:21Z mike $".
%
%%EOF
+25 -33
Ver Arquivo
@@ -22,28 +22,28 @@
% to third parties or copied or duplicated in any form, in whole or
% in part, without the prior written consent of Easy Software Products.
%
/CENTER { % Draw centered text
/CENTER \{ % Draw centered text
% (name) CENTER -
dup stringwidth pop % Get the width of the string
0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
show % Show the string
} bind def
/RIGHT { % Draw right-justified text
/RIGHT \{ % Draw right-justified text
% (name) RIGHT -
dup stringwidth pop % Get the width of the string
neg 0 rmoveto % Shift left the entire distance
show % Show the string
} bind def
/NUMBER { % Draw a number
/NUMBER \{ % Draw a number
% power n NUMBER -
1 index 1 eq { % power == 1?
1 index 1 eq \{ % power == 1?
round cvi exch pop % Convert "n" to integer
} {
} \{
1 index mul round exch div % Truncate extra decimal places
} ifelse
100 string cvs show % Convert to a string and show it...
} bind def
/CUPSLOGO { % Draw the CUPS logo
/CUPSLOGO \{ % Draw the CUPS logo
% height CUPSLOGO
% Start with a big C...
/Helvetica findfont 1 index scalefont setfont
@@ -61,14 +61,14 @@
dup 1.2 mul moveto
(System) show
} bind def
/ESPLOGO { % Draw the ESP logo
/ESPLOGO \{ % Draw the ESP logo
% height ESPLOGO
% Compute the size of the logo...
0 0
2 index 1.5 mul 3 index
% Do the "metallic" fill from 10% black to 40% black...
1 -0.001 0 {
1 -0.001 0 \{
dup % loopval
-0.15 mul % loopval * -0.15
0.9 add % 0.9 - loopval * 0.15
@@ -151,20 +151,14 @@ gsave
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
/boxWidth % width of text box
pageWidth pageHeight lt
{ pageWidth 54 mul }
{ pageHeight 42 mul }
ifelse def
newpath % Clear bounding path
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
pageWidth 4 mul scalefont def % size = pageWidth * 4 (nominally 34)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
pageWidth 2 mul scalefont def % size = pageWidth * 2 (nominally 17)
% Offset page to account for lower-left margin...
pageLeft 72 mul
@@ -176,30 +170,28 @@ gsave
pageWidth 36 mul % Center of page
pageHeight 72 mul % Top of page
pageWidth -7 mul add % - 2 lines
pageWidth -9 mul add % - 1 line
moveto % Position text
bigFont setfont % Font
(Confidential) CENTER % Show text centered
pageWidth 36 mul % Center of page
pageHeight 6 mul % Bottom of page
pageWidth 8 mul % Bottom of page
moveto % Position text
bigFont setfont % Font
(Confidential) CENTER % Show text centered
% Job information box...
pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul 9 add % x = pageWidth * 1/4 * 72 + 9
pageHeight 27 mul 9 sub % y = pageHeight * 3/8 * 72 - 9
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
0.5 setgray rectfill % Draw a shadow
pageWidth 36 mul % x = pageWidth * 1/2 * 72
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul % y = pageHeight * 1/4 * 72
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul % x = pageWidth * 1/4 * 72
pageHeight 27 mul % y = pageHeight * 3/8 * 72
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
4 copy 1 setgray rectfill % Clear the box to white
0 setgray rectstroke % Draw a black box around it...
@@ -209,7 +201,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 5 mul add % y += 2 lines
pageWidth 4 mul add % y += 2 lines
2 copy % Copy X & Y
moveto
(Job ID: ) RIGHT
@@ -218,7 +210,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 2 mul add % y += 1 line
pageWidth 1 mul add % y += 1 line
2 copy % Copy X & Y
moveto
(Title: ) RIGHT
@@ -227,7 +219,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -1 mul add % y -= 1 line
pageWidth -2 mul add % y -= 1 line
2 copy % Copy X & Y
moveto
(Requesting User: ) RIGHT
@@ -236,7 +228,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -4 mul add % y -= 2 lines
pageWidth -5 mul add % y -= 2 lines
2 copy % Copy X & Y
moveto
(Billing Info: ) RIGHT
@@ -262,6 +254,6 @@ gsave
grestore
showpage
%
% End of "$Id: confidential 1379 2000-09-18 17:12:42Z mike $".
% End of "$Id: confidential 1075 2000-05-11 20:02:21Z mike $".
%
%%EOF
-2
Ver Arquivo
@@ -1,2 +0,0 @@
auth required /lib/security/pam_unix.so nullok shadow
account required /lib/security/pam_unix.so
+25 -33
Ver Arquivo
@@ -22,28 +22,28 @@
% to third parties or copied or duplicated in any form, in whole or
% in part, without the prior written consent of Easy Software Products.
%
/CENTER { % Draw centered text
/CENTER \{ % Draw centered text
% (name) CENTER -
dup stringwidth pop % Get the width of the string
0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
show % Show the string
} bind def
/RIGHT { % Draw right-justified text
/RIGHT \{ % Draw right-justified text
% (name) RIGHT -
dup stringwidth pop % Get the width of the string
neg 0 rmoveto % Shift left the entire distance
show % Show the string
} bind def
/NUMBER { % Draw a number
/NUMBER \{ % Draw a number
% power n NUMBER -
1 index 1 eq { % power == 1?
1 index 1 eq \{ % power == 1?
round cvi exch pop % Convert "n" to integer
} {
} \{
1 index mul round exch div % Truncate extra decimal places
} ifelse
100 string cvs show % Convert to a string and show it...
} bind def
/CUPSLOGO { % Draw the CUPS logo
/CUPSLOGO \{ % Draw the CUPS logo
% height CUPSLOGO
% Start with a big C...
/Helvetica findfont 1 index scalefont setfont
@@ -61,14 +61,14 @@
dup 1.2 mul moveto
(System) show
} bind def
/ESPLOGO { % Draw the ESP logo
/ESPLOGO \{ % Draw the ESP logo
% height ESPLOGO
% Compute the size of the logo...
0 0
2 index 1.5 mul 3 index
% Do the "metallic" fill from 10% black to 40% black...
1 -0.001 0 {
1 -0.001 0 \{
dup % loopval
-0.15 mul % loopval * -0.15
0.9 add % 0.9 - loopval * 0.15
@@ -151,20 +151,14 @@ gsave
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
/boxWidth % width of text box
pageWidth pageHeight lt
{ pageWidth 54 mul }
{ pageHeight 42 mul }
ifelse def
newpath % Clear bounding path
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
pageWidth 4 mul scalefont def % size = pageWidth * 4 (nominally 34)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
pageWidth 2 mul scalefont def % size = pageWidth * 2 (nominally 17)
% Offset page to account for lower-left margin...
pageLeft 72 mul
@@ -176,30 +170,28 @@ gsave
pageWidth 36 mul % Center of page
pageHeight 72 mul % Top of page
pageWidth -7 mul add % - 2 lines
pageWidth -9 mul add % - 1 line
moveto % Position text
bigFont setfont % Font
(Secret) CENTER % Show text centered
pageWidth 36 mul % Center of page
pageHeight 6 mul % Bottom of page
pageWidth 8 mul % Bottom of page
moveto % Position text
bigFont setfont % Font
(Secret) CENTER % Show text centered
% Job information box...
pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul 9 add % x = pageWidth * 1/4 * 72 + 9
pageHeight 27 mul 9 sub % y = pageHeight * 3/8 * 72 - 9
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
0.5 setgray rectfill % Draw a shadow
pageWidth 36 mul % x = pageWidth * 1/2 * 72
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul % y = pageHeight * 1/4 * 72
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul % x = pageWidth * 1/4 * 72
pageHeight 27 mul % y = pageHeight * 3/8 * 72
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
4 copy 1 setgray rectfill % Clear the box to white
0 setgray rectstroke % Draw a black box around it...
@@ -209,7 +201,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 5 mul add % y += 2 lines
pageWidth 4 mul add % y += 2 lines
2 copy % Copy X & Y
moveto
(Job ID: ) RIGHT
@@ -218,7 +210,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 2 mul add % y += 1 line
pageWidth 1 mul add % y += 1 line
2 copy % Copy X & Y
moveto
(Title: ) RIGHT
@@ -227,7 +219,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -1 mul add % y -= 1 line
pageWidth -2 mul add % y -= 1 line
2 copy % Copy X & Y
moveto
(Requesting User: ) RIGHT
@@ -236,7 +228,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -4 mul add % y -= 2 lines
pageWidth -5 mul add % y -= 2 lines
2 copy % Copy X & Y
moveto
(Billing Info: ) RIGHT
@@ -262,6 +254,6 @@ gsave
grestore
showpage
%
% End of "$Id: secret 1379 2000-09-18 17:12:42Z mike $".
% End of "$Id: secret 1075 2000-05-11 20:02:21Z mike $".
%
%%EOF
+39 -31
Ver Arquivo
@@ -22,28 +22,28 @@
% to third parties or copied or duplicated in any form, in whole or
% in part, without the prior written consent of Easy Software Products.
%
/CENTER { % Draw centered text
/CENTER \{ % Draw centered text
% (name) CENTER -
dup stringwidth pop % Get the width of the string
0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
show % Show the string
} bind def
/RIGHT { % Draw right-justified text
/RIGHT \{ % Draw right-justified text
% (name) RIGHT -
dup stringwidth pop % Get the width of the string
neg 0 rmoveto % Shift left the entire distance
show % Show the string
} bind def
/NUMBER { % Draw a number
/NUMBER \{ % Draw a number
% power n NUMBER -
1 index 1 eq { % power == 1?
1 index 1 eq \{ % power == 1?
round cvi exch pop % Convert "n" to integer
} {
} \{
1 index mul round exch div % Truncate extra decimal places
} ifelse
100 string cvs show % Convert to a string and show it...
} bind def
/CUPSLOGO { % Draw the CUPS logo
/CUPSLOGO \{ % Draw the CUPS logo
% height CUPSLOGO
% Start with a big C...
/Helvetica findfont 1 index scalefont setfont
@@ -61,14 +61,14 @@
dup 1.2 mul moveto
(System) show
} bind def
/ESPLOGO { % Draw the ESP logo
/ESPLOGO \{ % Draw the ESP logo
% height ESPLOGO
% Compute the size of the logo...
0 0
2 index 1.5 mul 3 index
% Do the "metallic" fill from 10% black to 40% black...
1 -0.001 0 {
1 -0.001 0 \{
dup % loopval
-0.15 mul % loopval * -0.15
0.9 add % 0.9 - loopval * 0.15
@@ -151,39 +151,47 @@ gsave
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
/boxWidth % width of text box
pageWidth pageHeight lt
{ pageWidth 54 mul }
{ pageHeight 42 mul }
ifelse def
newpath % Clear bounding path
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
pageWidth 4 mul scalefont def % size = pageWidth * 4 (nominally 34)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
pageWidth 2 mul scalefont def % size = pageWidth * 2 (nominally 17)
% Offset page to account for lower-left margin...
pageLeft 72 mul
pageBottom 72 mul
translate
% Draw the label at the top and bottom...
0 setgray % Color
pageWidth 36 mul % Center of page
pageHeight 72 mul % Top of page
pageWidth -9 mul add % - 1 line
moveto % Position text
bigFont setfont % Font
(Banner) CENTER % Show text centered
pageWidth 36 mul % Center of page
pageWidth 8 mul % Bottom of page
moveto % Position text
bigFont setfont % Font
(Banner) CENTER % Show text centered
% Job information box...
pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul 9 add % x = pageWidth * 1/4 * 72 + 9
pageHeight 27 mul 9 sub % y = pageHeight * 3/8 * 72 - 9
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
0.5 setgray rectfill % Draw a shadow
pageWidth 36 mul % x = pageWidth * 1/2 * 72
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul % y = pageHeight * 1/4 * 72
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul % x = pageWidth * 1/4 * 72
pageHeight 27 mul % y = pageHeight * 3/8 * 72
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
4 copy 1 setgray rectfill % Clear the box to white
0 setgray rectstroke % Draw a black box around it...
@@ -193,7 +201,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 5 mul add % y += 2 lines
pageWidth 4 mul add % y += 2 lines
2 copy % Copy X & Y
moveto
(Job ID: ) RIGHT
@@ -202,7 +210,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 2 mul add % y += 1 line
pageWidth 1 mul add % y += 1 line
2 copy % Copy X & Y
moveto
(Title: ) RIGHT
@@ -211,7 +219,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -1 mul add % y -= 1 line
pageWidth -2 mul add % y -= 1 line
2 copy % Copy X & Y
moveto
(Requesting User: ) RIGHT
@@ -220,7 +228,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -4 mul add % y -= 2 lines
pageWidth -5 mul add % y -= 2 lines
2 copy % Copy X & Y
moveto
(Billing Info: ) RIGHT
@@ -246,6 +254,6 @@ gsave
grestore
showpage
%
% End of "$Id: standard 1379 2000-09-18 17:12:42Z mike $".
% End of "$Id: standard 1075 2000-05-11 20:02:21Z mike $".
%
%%EOF
+28 -35
Ver Arquivo
@@ -213,22 +213,15 @@ gsave
/yResolution exch abs def % yResolution = abs(yres)
/xResolution exch abs def % xResolution = abs(xres)
% Figure out the sizes of things...
/wheelSize % size of wheels
pageWidth pageHeight lt
{ pageWidth 9 mul }
{ pageHeight 7 mul }
ifelse def
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
pageWidth 4 mul scalefont def % size = pageWidth * 4 (nominally 34)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
pageWidth 2 mul scalefont def % size = pageWidth * 2 (nominally 17)
/smallFont /Times-Roman findfont % smallFont = Times-Roman
pageHeight scalefont def % size = pageHeight (nominally 11)
pageWidth 1.5 mul scalefont def % size = pageWidth * 1.5 (nominally 13)
% Offset page to account for lower-left margin...
pageLeft 72 mul
@@ -246,7 +239,7 @@ gsave
translate
% Size the wheel...
wheelSize
pageWidth 9 mul % radius = pageWidth * 1/8 * 72
% Draw the colors...
dup (C) exch 0 1 1 OCTANT 45 rotate
@@ -275,7 +268,7 @@ gsave
translate
% Size the wheel...
wheelSize
pageWidth 9 mul % radius = pageWidth * 1/8 * 72
% Loop at 1 degree increments
0 1 359 {
@@ -297,7 +290,7 @@ gsave
(1 Degree Radial Lines) CENTER % Show the text centered
% Imageable area...
pageHeight 15 mul % Height of imageable area
pageWidth 19.5 mul % Height of imageable area
pageWidth 4.5 mul % x = pageWidth * 1/16 * 72
pageHeight 35.5 mul % y = pageHeight * 1/2 * 72
@@ -326,7 +319,7 @@ gsave
smallFont setfont % Font
pageWidth 14 mul % x = pageWidth * 3/16 * 72
pageHeight 36 mul % y = pageWidth * 1/2 * 72
pageHeight -2 mul add % y -= 2 * smallFont height
pageWidth -3 mul add % y -= 2 * smallFont height
% Page Size inches
2 copy moveto % Move to x & y
@@ -337,7 +330,7 @@ gsave
(in) show % "in"
% Page Size millimeters
pageHeight sub % Move down...
pageWidth -1.5 mul add % Move down...
2 copy moveto % Move to x & y
10 pageWidth 25.4 mul NUMBER % pageWidth
@@ -346,7 +339,7 @@ gsave
(mm) show % "mm"
% Lower-left inches
pageHeight 2 mul sub % Move down...
pageWidth -3 mul add % Move down...
2 copy moveto % Move to x & y
(Lower-Left: ) RIGHT % Label
@@ -356,7 +349,7 @@ gsave
(in) show % "in"
% Lower-left millimeters
pageHeight sub % Move down...
pageWidth -1.5 mul add % Move down...
2 copy moveto % Move to x & y
10 pageLeft 25.4 mul NUMBER % pageLeft
@@ -365,7 +358,7 @@ gsave
(mm) show % "mm"
% Upper-right inches
pageHeight 2 mul sub % Move down...
pageWidth -3 mul add % Move down...
2 copy moveto % Move to x & y
(Upper-Right: ) RIGHT % Label
@@ -375,7 +368,7 @@ gsave
(in) show % "in"
% Upper-right millimeters
pageHeight sub % Move down...
pageWidth -1.5 mul add % Move down...
2 copy moveto % Move to x & y
10 pageRight 25.4 mul NUMBER % pageRight
@@ -384,7 +377,7 @@ gsave
(mm) show % "mm"
% Resolution dots-per-inch
pageHeight 2 mul sub % Move down...
pageWidth -3 mul add % Move down...
2 copy moveto % Move to x & y
(Resolution: ) RIGHT % Label
@@ -394,7 +387,7 @@ gsave
(dpi) show % "dpi"
% Resolution dots-per-meter
pageHeight sub % Move down...
pageWidth -1.5 mul add % Move down...
moveto % Move to x & y
1 xResolution 39.27 mul NUMBER % xResolution
@@ -403,7 +396,7 @@ gsave
(dpm) show % "dpm"
% Interpreter Information...
pageHeight 15 mul % Height of interpreter information
pageWidth 19.5 mul % Height of interpreter info
pageWidth 40.5 mul % x = pageWidth * 9/16 * 72
pageHeight 35.5 mul % y = pageHeight * 1/2 * 72
@@ -432,7 +425,7 @@ gsave
smallFont setfont % Font
pageWidth 49 mul % x = pageWidth * 11/16 * 72
pageHeight 36 mul % y = pageWidth * 1/2 * 72
pageHeight 2 mul sub % y -= 2 * smallFont height
pageWidth -3 mul add % y -= 2 * smallFont height
% Language level
2 copy moveto % Move to x & y
@@ -441,7 +434,7 @@ gsave
1 languagelevel NUMBER % Language level
% Version
pageHeight 2 mul sub % Move down...
pageWidth -3 mul add % Move down...
2 copy moveto % Move to x & y
(Version: ) RIGHT % Label
version show % Version
@@ -450,13 +443,13 @@ gsave
(\)) show % ")"
% Product
pageHeight 2 mul sub % Move down...
pageWidth -3 mul add % Move down...
2 copy moveto % Move to x & y
(Product: ) RIGHT % Label
product show % Product name
% Serial Number
pageHeight 2 mul sub % Move down...
pageWidth -3 mul add % Move down...
2 copy moveto % Move to x & y
(Serial #: ) RIGHT % Label
1 serialnumber NUMBER % S/N
@@ -470,28 +463,28 @@ gsave
% Draw the copyright notice at the bottom...
pageWidth 36 mul % Center of page
pageHeight 10 mul % Bottom of page
pageWidth 14 mul % Bottom of page
2 copy moveto % Position text
(Printed Using CUPS v1.1.x) CENTER % Show text centered
(Printed Using CUPS v1.1) CENTER % Show text centered
pageHeight 2 mul sub % Move down...
pageWidth 3 mul sub % Move down...
2 copy moveto % Position text
smallFont setfont % Font
(Copyright 1993-2000 Easy Software Products, All Rights Reserved.) CENTER
pageHeight sub % Move down...
pageWidth 1.5 mul sub % Move down...
2 copy moveto % Position text
(CUPS, and the CUPS logo are the trademark property of) CENTER
pageHeight sub % Move down...
pageWidth 1.5 mul sub % Move down...
2 copy moveto % Position text
(Easy Software Products, 44141 Airport View Drive, Suite 204,) CENTER
pageHeight sub % Move down...
pageWidth 1.5 mul sub % Move down...
2 copy moveto % Position text
(Hollywood, Maryland, 20636-3111, USA.) CENTER
% Then the CUPS logo....
gsave
pageWidth 4 mul
pageHeight 4 mul
pageWidth 6 mul
translate
pageWidth 9 mul CUPSLOGO
grestore
@@ -499,7 +492,7 @@ gsave
% And the ESP logo....
gsave
pageWidth 59 mul
pageHeight 4 mul
pageWidth 6 mul
translate
pageWidth 6 mul ESPLOGO
grestore
@@ -507,6 +500,6 @@ gsave
grestore
showpage
%
% End of "$Id: testprint.ps 1379 2000-09-18 17:12:42Z mike $".
% End of "$Id: testprint.ps 985 2000-03-13 18:55:00Z mike $".
%
%%EOF
+25 -33
Ver Arquivo
@@ -22,28 +22,28 @@
% to third parties or copied or duplicated in any form, in whole or
% in part, without the prior written consent of Easy Software Products.
%
/CENTER { % Draw centered text
/CENTER \{ % Draw centered text
% (name) CENTER -
dup stringwidth pop % Get the width of the string
0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
show % Show the string
} bind def
/RIGHT { % Draw right-justified text
/RIGHT \{ % Draw right-justified text
% (name) RIGHT -
dup stringwidth pop % Get the width of the string
neg 0 rmoveto % Shift left the entire distance
show % Show the string
} bind def
/NUMBER { % Draw a number
/NUMBER \{ % Draw a number
% power n NUMBER -
1 index 1 eq { % power == 1?
1 index 1 eq \{ % power == 1?
round cvi exch pop % Convert "n" to integer
} {
} \{
1 index mul round exch div % Truncate extra decimal places
} ifelse
100 string cvs show % Convert to a string and show it...
} bind def
/CUPSLOGO { % Draw the CUPS logo
/CUPSLOGO \{ % Draw the CUPS logo
% height CUPSLOGO
% Start with a big C...
/Helvetica findfont 1 index scalefont setfont
@@ -61,14 +61,14 @@
dup 1.2 mul moveto
(System) show
} bind def
/ESPLOGO { % Draw the ESP logo
/ESPLOGO \{ % Draw the ESP logo
% height ESPLOGO
% Compute the size of the logo...
0 0
2 index 1.5 mul 3 index
% Do the "metallic" fill from 10% black to 40% black...
1 -0.001 0 {
1 -0.001 0 \{
dup % loopval
-0.15 mul % loopval * -0.15
0.9 add % 0.9 - loopval * 0.15
@@ -151,20 +151,14 @@ gsave
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
/boxWidth % width of text box
pageWidth pageHeight lt
{ pageWidth 54 mul }
{ pageHeight 42 mul }
ifelse def
newpath % Clear bounding path
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
pageWidth 4 mul scalefont def % size = pageWidth * 4 (nominally 34)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
pageWidth 2 mul scalefont def % size = pageWidth * 2 (nominally 17)
% Offset page to account for lower-left margin...
pageLeft 72 mul
@@ -176,30 +170,28 @@ gsave
pageWidth 36 mul % Center of page
pageHeight 72 mul % Top of page
pageWidth -7 mul add % - 2 lines
pageWidth -9 mul add % - 1 line
moveto % Position text
bigFont setfont % Font
(Top Secret) CENTER % Show text centered
pageWidth 36 mul % Center of page
pageHeight 6 mul % Bottom of page
pageWidth 8 mul % Bottom of page
moveto % Position text
bigFont setfont % Font
(Top Secret) CENTER % Show text centered
% Job information box...
pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul 9 add % x = pageWidth * 1/4 * 72 + 9
pageHeight 27 mul 9 sub % y = pageHeight * 3/8 * 72 - 9
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
0.5 setgray rectfill % Draw a shadow
pageWidth 36 mul % x = pageWidth * 1/2 * 72
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul % y = pageHeight * 1/4 * 72
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul % x = pageWidth * 1/4 * 72
pageHeight 27 mul % y = pageHeight * 3/8 * 72
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
4 copy 1 setgray rectfill % Clear the box to white
0 setgray rectstroke % Draw a black box around it...
@@ -209,7 +201,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 5 mul add % y += 2 lines
pageWidth 4 mul add % y += 2 lines
2 copy % Copy X & Y
moveto
(Job ID: ) RIGHT
@@ -218,7 +210,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 2 mul add % y += 1 line
pageWidth 1 mul add % y += 1 line
2 copy % Copy X & Y
moveto
(Title: ) RIGHT
@@ -227,7 +219,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -1 mul add % y -= 1 line
pageWidth -2 mul add % y -= 1 line
2 copy % Copy X & Y
moveto
(Requesting User: ) RIGHT
@@ -236,7 +228,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -4 mul add % y -= 2 lines
pageWidth -5 mul add % y -= 2 lines
2 copy % Copy X & Y
moveto
(Billing Info: ) RIGHT
@@ -262,6 +254,6 @@ gsave
grestore
showpage
%
% End of "$Id: topsecret 1379 2000-09-18 17:12:42Z mike $".
% End of "$Id: topsecret 1075 2000-05-11 20:02:21Z mike $".
%
%%EOF
+25 -33
Ver Arquivo
@@ -22,28 +22,28 @@
% to third parties or copied or duplicated in any form, in whole or
% in part, without the prior written consent of Easy Software Products.
%
/CENTER { % Draw centered text
/CENTER \{ % Draw centered text
% (name) CENTER -
dup stringwidth pop % Get the width of the string
0.5 mul neg 0 rmoveto % Shift left 1/2 of the distance
show % Show the string
} bind def
/RIGHT { % Draw right-justified text
/RIGHT \{ % Draw right-justified text
% (name) RIGHT -
dup stringwidth pop % Get the width of the string
neg 0 rmoveto % Shift left the entire distance
show % Show the string
} bind def
/NUMBER { % Draw a number
/NUMBER \{ % Draw a number
% power n NUMBER -
1 index 1 eq { % power == 1?
1 index 1 eq \{ % power == 1?
round cvi exch pop % Convert "n" to integer
} {
} \{
1 index mul round exch div % Truncate extra decimal places
} ifelse
100 string cvs show % Convert to a string and show it...
} bind def
/CUPSLOGO { % Draw the CUPS logo
/CUPSLOGO \{ % Draw the CUPS logo
% height CUPSLOGO
% Start with a big C...
/Helvetica findfont 1 index scalefont setfont
@@ -61,14 +61,14 @@
dup 1.2 mul moveto
(System) show
} bind def
/ESPLOGO { % Draw the ESP logo
/ESPLOGO \{ % Draw the ESP logo
% height ESPLOGO
% Compute the size of the logo...
0 0
2 index 1.5 mul 3 index
% Do the "metallic" fill from 10% black to 40% black...
1 -0.001 0 {
1 -0.001 0 \{
dup % loopval
-0.15 mul % loopval * -0.15
0.9 add % 0.9 - loopval * 0.15
@@ -151,20 +151,14 @@ gsave
/pageWidth pageRight pageLeft sub def % pageWidth = pageRight - pageLeft
/pageHeight pageTop pageBottom sub def% pageHeight = pageTop - pageBottom
/boxWidth % width of text box
pageWidth pageHeight lt
{ pageWidth 54 mul }
{ pageHeight 42 mul }
ifelse def
newpath % Clear bounding path
% Create fonts...
/bigFont /Helvetica-Bold findfont % bigFont = Helvetica-Bold
pageHeight 3 mul scalefont def % size = pageHeight * 3 (nominally 33)
pageWidth 4 mul scalefont def % size = pageWidth * 4 (nominally 34)
/mediumFont /Helvetica findfont % mediumFont = Helvetica
pageHeight 1.5 mul scalefont def % size = pageHeight * 1.5 (nominally 16.5)
pageWidth 2 mul scalefont def % size = pageWidth * 2 (nominally 17)
% Offset page to account for lower-left margin...
pageLeft 72 mul
@@ -176,30 +170,28 @@ gsave
pageWidth 36 mul % Center of page
pageHeight 72 mul % Top of page
pageWidth -7 mul add % - 2 lines
pageWidth -9 mul add % - 1 line
moveto % Position text
bigFont setfont % Font
(Unclassified) CENTER % Show text centered
pageWidth 36 mul % Center of page
pageHeight 6 mul % Bottom of page
pageWidth 8 mul % Bottom of page
moveto % Position text
bigFont setfont % Font
(Unclassified) CENTER % Show text centered
% Job information box...
pageWidth 36 mul 9 add % x = pageWidth * 1/2 * 72 + 9
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul 9 sub % y = pageHeight * 1/2 * 72 - 9
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul 9 add % x = pageWidth * 1/4 * 72 + 9
pageHeight 27 mul 9 sub % y = pageHeight * 3/8 * 72 - 9
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
0.5 setgray rectfill % Draw a shadow
pageWidth 36 mul % x = pageWidth * 1/2 * 72
boxWidth 0.5 mul sub % x-= 1/2 box width
pageHeight 30 mul % y = pageHeight * 1/4 * 72
boxWidth % w = box width
pageHeight 14 mul % h = pageHeight * 1/2 * 72
pageWidth 18 mul % x = pageWidth * 1/4 * 72
pageHeight 27 mul % y = pageHeight * 3/8 * 72
pageWidth 36 mul % w = pageWidth * 1/2 * 72
pageHeight 18 mul % h = pageHeight * 1/4 * 72
4 copy 1 setgray rectfill % Clear the box to white
0 setgray rectstroke % Draw a black box around it...
@@ -209,7 +201,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 5 mul add % y += 2 lines
pageWidth 4 mul add % y += 2 lines
2 copy % Copy X & Y
moveto
(Job ID: ) RIGHT
@@ -218,7 +210,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight 2 mul add % y += 1 line
pageWidth 1 mul add % y += 1 line
2 copy % Copy X & Y
moveto
(Title: ) RIGHT
@@ -227,7 +219,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -1 mul add % y -= 1 line
pageWidth -2 mul add % y -= 1 line
2 copy % Copy X & Y
moveto
(Requesting User: ) RIGHT
@@ -236,7 +228,7 @@ gsave
pageWidth 36 mul % x = pageWidth * 1/2 * 72
pageHeight 36 mul % y = pageHeight * 1/2 * 72
pageHeight -4 mul add % y -= 2 lines
pageWidth -5 mul add % y -= 2 lines
2 copy % Copy X & Y
moveto
(Billing Info: ) RIGHT
@@ -262,6 +254,6 @@ gsave
grestore
showpage
%
% End of "$Id: unclassified 1379 2000-09-18 17:12:42Z mike $".
% End of "$Id: unclassified 1075 2000-05-11 20:02:21Z mike $".
%
%%EOF
+10 -15
Ver Arquivo
@@ -47,8 +47,7 @@ include ../Makedefs
#
DOCUMENTS = cmp.shtml idd.shtml ipp.shtml sam.shtml sdd.shtml \
spm.shtml sps.shtml ssr.shtml stp.shtml sum.shtml \
svd.shtml
spm.shtml ssr.shtml stp.shtml sum.shtml svd.shtml
DOCIMAGES = images/cups-block-diagram.gif images/cups-large.gif \
images/cups-medium.gif images/cups-small.gif
WEBPAGES = cups.css cupsdoc.css index.html documentation.html
@@ -79,7 +78,6 @@ WEBIMAGES = images/accept-jobs.gif \
images/printer-stopped.gif \
images/reject-jobs.gif \
images/release-job.gif \
images/restart-job.gif \
images/right.gif \
images/show-active.gif \
images/show-completed.gif \
@@ -103,6 +101,14 @@ all: $(DOCUMENTS:.shtml=.pdf) $(DOCUMENTS:.shtml=.html) overview.pdf
ps: $(DOCUMENTS:.shtml=.ps) overview.ps
#
# Make manuals for printing...
#
print: sam-7x8.pdf spm-7x8.pdf sum-7x8.pdf \
sam-7x8.ps spm-7x8.ps sum-7x8.ps
#
# Remove all generated files...
#
@@ -209,18 +215,7 @@ sum-7x8.ps: sum.shtml
--size 7x8.5in --left 0.5in --right 0.25in \
--top 0.25in --bottom 0.25in --fontsize 10 --headfootsize 10 -f $@ sum.shtml
$(DOCUMENTS:.shtml=.html): \
glossary.shtml printing-overview.shtml \
references.shtml system-overview.shtml \
../LICENSE.html
$(DOCUMENTS:.shtml=.pdf): \
glossary.shtml printing-overview.shtml \
references.shtml system-overview.shtml \
../LICENSE.html
$(DOCUMENTS:.shtml=.ps): \
glossary.shtml printing-overview.shtml \
$(DOCUMENTS): glossary.shtml printing-overview.shtml \
references.shtml system-overview.shtml \
../LICENSE.html
+212 -210
Ver Arquivo
@@ -29,225 +29,225 @@ Copyright 1997-2000, All Rights Reserved<BR>
<HR>
<H1 ALIGN="CENTER"><A NAME="CONTENTS">Table of Contents</A></H1>
<BR>
<BR><B><A HREF="#1">1 Scope</A></B>
<BR><B><A HREF="#1">1 Scope</A></B>
<UL>
<LI><A HREF="#1_1">1.1 Identification</A></LI>
<LI><A HREF="#1_2">1.2 System Overview</A></LI>
<LI><A HREF="#1_3">1.3 Document Overview</A></LI>
<LI><A HREF="#1_1">1.1 Identification</A></LI>
<LI><A HREF="#1_2">1.2 System Overview</A></LI>
<LI><A HREF="#1_3">1.3 Document Overview</A></LI>
</UL>
<B><A HREF="#2">2 References</A></B>
<B><A HREF="#2">2 References</A></B>
<UL>
<LI><A HREF="#2_1">2.1 CUPS Documentation</A></LI>
<LI><A HREF="#2_2">2.2 Other Documents</A></LI>
<LI><A HREF="#2_1">2.1 CUPS Documentation</A></LI>
<LI><A HREF="#2_2">2.2 Other Documents</A></LI>
</UL>
<B><A HREF="#3">3 File Management</A></B>
<B><A HREF="#3">3 File Management</A></B>
<UL>
<LI><A HREF="#3_1">3.1 Directory Structure</A></LI>
<LI><A HREF="#3_2">3.2 Source Files</A></LI>
<LI><A HREF="#3_3">3.3 Configuration Management</A></LI>
<LI><A HREF="#3_1">3.1 Directory Structure</A></LI>
<LI><A HREF="#3_2">3.2 Source Files</A></LI>
<LI><A HREF="#3_3">3.3 Configuration Management</A></LI>
</UL>
<B><A HREF="#4">4 Trouble Report Processing</A></B>
<B><A HREF="#4">4 Trouble Report Processing</A></B>
<UL>
<LI><A HREF="#4_1">4.1 Classification</A></LI>
<LI><A HREF="#4_2">4.2 Identification</A></LI>
<LI><A HREF="#4_3">4.3 Correction</A></LI>
<LI><A HREF="#4_4">4.4 Notification</A></LI>
<LI><A HREF="#4_1">4.1 Classification</A></LI>
<LI><A HREF="#4_2">4.2 Identification</A></LI>
<LI><A HREF="#4_3">4.3 Correction</A></LI>
<LI><A HREF="#4_4">4.4 Notification</A></LI>
</UL>
<B><A HREF="#5">5 Software Releases</A></B>
<B><A HREF="#5">5 Software Releases</A></B>
<UL>
<LI><A HREF="#5_1">5.1 Version Numbering</A></LI>
<LI><A HREF="#5_2">5.2 Generation</A></LI>
<LI><A HREF="#5_3">5.3 Testing</A></LI>
<LI><A HREF="#5_4">5.4 Release</A></LI>
<LI><A HREF="#5_1">5.1 Version Numbering</A></LI>
<LI><A HREF="#5_2">5.2 Generation</A></LI>
<LI><A HREF="#5_3">5.3 Testing</A></LI>
<LI><A HREF="#5_4">5.4 Release</A></LI>
</UL>
<B><A HREF="#6">A Glossary</A></B>
<B><A HREF="#6">A Glossary</A></B>
<UL>
<LI><A HREF="#6_1">A.1 Terms</A></LI>
<LI><A HREF="#6_2">A.2 Acronyms</A></LI>
<LI><A HREF="#6_1">A.1 Terms</A></LI>
<LI><A HREF="#6_2">A.2 Acronyms</A></LI>
</UL>
<B><A HREF="#7">B Coding Requirements</A></B>
<B><A HREF="#7">B Coding Requirements</A></B>
<UL>
<LI><A HREF="#7_1">B.1 Source Files</A></LI>
<LI><A HREF="#7_1">B.1 Source Files</A></LI>
<UL>
<LI><A HREF="#7_1_1">B.1.1 Naming</A></LI>
<LI><A HREF="#7_1_2">B.1.2 Documentation</A></LI>
<LI><A HREF="#7_1_1">B.1.1 Naming</A></LI>
<LI><A HREF="#7_1_2">B.1.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_2">B.2 Functions</A></LI>
<LI><A HREF="#7_2">B.2 Functions</A></LI>
<UL>
<LI><A HREF="#7_2_1">B.2.1 Naming</A></LI>
<LI><A HREF="#7_2_2">B.2.2 Documentation</A></LI>
<LI><A HREF="#7_2_1">B.2.1 Naming</A></LI>
<LI><A HREF="#7_2_2">B.2.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_3">B.3 Methods</A></LI>
<LI><A HREF="#7_3">B.3 Methods</A></LI>
<UL>
<LI><A HREF="#7_3_1">B.3.1 Naming</A></LI>
<LI><A HREF="#7_3_2">B.3.2 Documentation</A></LI>
<LI><A HREF="#7_3_1">B.3.1 Naming</A></LI>
<LI><A HREF="#7_3_2">B.3.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_4">B.4 Variables</A></LI>
<LI><A HREF="#7_4">B.4 Variables</A></LI>
<UL>
<LI><A HREF="#7_4_1">B.4.1 Naming</A></LI>
<LI><A HREF="#7_4_2">B.4.2 Documentation</A></LI>
<LI><A HREF="#7_4_1">B.4.1 Naming</A></LI>
<LI><A HREF="#7_4_2">B.4.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_5">B.5 Types</A></LI>
<LI><A HREF="#7_5">B.5 Types</A></LI>
<UL>
<LI><A HREF="#7_5_1">B.5.1 Naming</A></LI>
<LI><A HREF="#7_5_2">B.5.2 Documentation</A></LI>
<LI><A HREF="#7_5_1">B.5.1 Naming</A></LI>
<LI><A HREF="#7_5_2">B.5.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_6">B.6 Structures</A></LI>
<LI><A HREF="#7_6">B.6 Structures</A></LI>
<UL>
<LI><A HREF="#7_6_1">B.6.1 Naming</A></LI>
<LI><A HREF="#7_6_2">B.6.2 Documentation</A></LI>
<LI><A HREF="#7_6_1">B.6.1 Naming</A></LI>
<LI><A HREF="#7_6_2">B.6.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_7">B.7 Classes</A></LI>
<LI><A HREF="#7_7">B.7 Classes</A></LI>
<UL>
<LI><A HREF="#7_7_1">B.7.1 Naming</A></LI>
<LI><A HREF="#7_7_2">B.7.2 Documentation</A></LI>
<LI><A HREF="#7_7_1">B.7.1 Naming</A></LI>
<LI><A HREF="#7_7_2">B.7.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_8">B.8 Constants</A></LI>
<LI><A HREF="#7_8">B.8 Constants</A></LI>
<UL>
<LI><A HREF="#7_8_1">B.8.1 Naming</A></LI>
<LI><A HREF="#7_8_2">B.8.2 Documentation</A></LI>
<LI><A HREF="#7_8_1">B.8.1 Naming</A></LI>
<LI><A HREF="#7_8_2">B.8.2 Documentation</A></LI>
</UL>
<LI><A HREF="#7_9">B.9 Code</A></LI>
<LI><A HREF="#7_9">B.9 Code</A></LI>
<UL>
<LI><A HREF="#7_9_1">B.9.1 Documentation</A></LI>
<LI><A HREF="#7_9_2">B.9.2 Style</A></LI>
<LI><A HREF="#7_9_1">B.9.1 Documentation</A></LI>
<LI><A HREF="#7_9_2">B.9.2 Style</A></LI>
</UL>
</UL>
<B><A HREF="#8">C Software Trouble Report Form</A></B><HR>
<H1><A NAME="1">1 Scope</A></H1>
<H2><A NAME="1_1">1.1 Identification</A></H2>
<B><A HREF="#8">C Software Trouble Report Form</A></B><HR>
<H1><A NAME="1">1 Scope</A></H1>
<H2><A NAME="1_1">1.1 Identification</A></H2>
This configuration management plan document provides the guidelines
for development and maintenance of the Common UNIX Printing System
(&quot;CUPS&quot;) Version 1.1 software.
<H2><A NAME="1_2">1.2 System Overview</A></H2>
<P>CUPS provides a portable printing layer for UNIX&reg;-based operating
<H2><A NAME="1_2">1.2 System Overview</A></H2>
<P> CUPS provides a portable printing layer for UNIX&reg;-based operating
systems. It has been developed by <A HREF="http://www.easysw.com">Easy
Software Products</A> to promote a standard printing solution for all
UNIX vendors and users. CUPS provides the System V and Berkeley
command-line interfaces. </P>
<P>CUPS uses the Internet Printing Protocol (&quot;IPP&quot;) as the basis for
<P> CUPS uses the Internet Printing Protocol (&quot;IPP&quot;) as the basis for
managing print jobs and queues. The Line Printer Daemon (&quot;LPD&quot;) Server
Message Block (&quot;SMB&quot;), and AppSocket (a.k.a. JetDirect) protocols are
also supported with reduced functionality. CUPS adds network printer
browsing and PostScript Printer Description (&quot;PPD&quot;) based printing
options to support real-world printing under UNIX. </P>
<P>CUPS also includes a customized version of GNU Ghostscript
<P> CUPS also includes a customized version of GNU Ghostscript
(currently based off GNU Ghostscript 5.50) and an image file RIP that
are used to support non-PostScript printers. Sample drivers for HP and
EPSON printers are included that use these filters. </P>
<H2><A NAME="1_3">1.3 Document Overview</A></H2>
<H2><A NAME="1_3">1.3 Document Overview</A></H2>
This configuration management document is organized into the following
sections:
<UL>
<LI>1 - Scope</LI>
<LI>2 - References</LI>
<LI>3 - File Management</LI>
<LI>4 - Trouble Report Processing</LI>
<LI>5 - Software Releases</LI>
<LI>A - Glossary</LI>
<LI>B - Coding Requirements</LI>
<LI> 1 - Scope</LI>
<LI> 2 - References</LI>
<LI> 3 - File Management</LI>
<LI> 4 - Trouble Report Processing</LI>
<LI> 5 - Software Releases</LI>
<LI> A - Glossary</LI>
<LI> B - Coding Requirements</LI>
</UL>
<H1><A NAME="2">2 References</A></H1>
<H2><A NAME="2_1">2.1 CUPS Documentation</A></H2>
<P>The following CUPS documentation is referenced by this document: </P>
<H1><A NAME="2">2 References</A></H1>
<H2><A NAME="2_1">2.1 CUPS Documentation</A></H2>
<P> The following CUPS documentation is referenced by this document: </P>
<UL>
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
<LI>CUPS-IPP-1.1: CUPS Implementation of IPP </LI>
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
<LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
<LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
<LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
<LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
<LI> CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
<LI> CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
<LI> CUPS-IPP-1.1: CUPS Implmentation of IPP </LI>
<LI> CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
<LI> CUPS-SDD-1.1: CUPS Software Design Description </LI>
<LI> CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
<LI> CUPS-SSR-1.1: CUPS Software Security Report </LI>
<LI> CUPS-STP-1.1: CUPS Software Test Plan </LI>
<LI> CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
<LI> CUPS-SVD-1.1.x: CUPS Software Version Description </LI>
</UL>
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
<P>The following non-CUPS documents are referenced by this document: </P>
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
<P> The following non-CUPS documents are referenced by this document: </P>
<UL>
<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
Adobe PostScript Printer Description File Format Specification,
Adobe PostScript Printer Description File Format Specification,
Version 4.3.</A></LI>
<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf">
Adobe PostScript Language Reference, Third Edition.</A></LI>
<LI>IPP: Job and Printer Set Operations </LI>
<LI>IPP/1.1: Encoding and Transport </LI>
<LI>IPP/1.1: Implementers Guide </LI>
<LI>IPP/1.1: Model and Semantics </LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179, Line
Adobe PostScript Language Reference, Third Edition.</A></LI>
<LI> IPP: Job and Printer Set Operations </LI>
<LI> IPP/1.1: Encoding and Transport </LI>
<LI> IPP/1.1: Implementers Guide </LI>
<LI> IPP/1.1: Model and Semantics </LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt"> RFC 1179, Line
Printer Daemon Protocol</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt">RFC 2567, Design
<LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt"> RFC 2567, Design
Goals for an Internet Printing Protocol</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt">RFC 2568, Rationale
<LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt"> RFC 2568, Rationale
for the Structure of the Model and Protocol</A> for the Internet
Printing Protocol</LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt">RFC 2569, Mapping
<LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt"> RFC 2569, Mapping
between LPD and IPP Protocols</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616, Hypertext
<LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt"> RFC 2616, Hypertext
Transfer Protocol -- HTTP/1.1</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617, HTTP
<LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt"> RFC 2617, HTTP
Authentication: Basic and Digest Access</A> Authentication </LI>
</UL>
<H1><A NAME="3">3 File Management</A></H1>
<H2><A NAME="3_1">3.1 Directory Structure</A></H2>
<H1><A NAME="3">3 File Management</A></H1>
<H2><A NAME="3_1">3.1 Directory Structure</A></H2>
Each source file shall be placed a sub-directory corresponding to the
software sub-system it belongs to (&quot;scheduler&quot;, &quot;cups&quot;, etc.) To remain
compatible with older UNIX filesystems, directory names shall not
exceed 16 characters in length.
<H2><A NAME="3_2">3.2 Source Files</A></H2>
<H2><A NAME="3_2">3.2 Source Files</A></H2>
Source files shall be documented and formatted as described in
Appendix B, Coding Requirements.
<H2><A NAME="3_3">3.3 Configuration Management</A></H2>
<H2><A NAME="3_3">3.3 Configuration Management</A></H2>
Source files shall be placed under the control of the Concurrent
Versions System (&quot;CVS&quot;) software. Source files shall be &quot;checked in&quot;
with each change so that modifications can be tracked.
<P>Documentation on the CVS software is included with the whitepaper,
<P> Documentation on the CVS software is included with the whitepaper,
&quot;CVS II: Parallelizing Software Development&quot;. </P>
<H1><A NAME="4">4 Trouble Report Processing</A></H1>
<H1><A NAME="4">4 Trouble Report Processing</A></H1>
A Software Trouble Report (&quot;STR&quot;) shall be submitted every time a user
or vendor experiences a problem with the CUPS software. Trouble reports
are maintained in a database with one of the following states:
<OL>
<LI>STR is closed with complete resolution</LI>
<LI>STR is closed without resolution</LI>
<LI>STR is active</LI>
<LI>STR is pending (new STR or additional information available)</LI>
<LI> STR is closed with complete resolution</LI>
<LI> STR is closed without resolution</LI>
<LI> STR is active</LI>
<LI> STR is pending (new STR or additional information available)</LI>
</OL>
Trouble reports shall be processed using the following steps.
<H2><A NAME="4_1">4.1 Classification</A></H2>
<H2><A NAME="4_1">4.1 Classification</A></H2>
When a trouble report is received it must be classified at one of the
following levels:
<OL>
<LI>Request for enhancement</LI>
<LI>Documentation error</LI>
<LI>Unable to print a file</LI>
<LI>Unable to print to a printer</LI>
<LI>Unable to print at all</LI>
<LI> Request for enhancement</LI>
<LI> Documentation error</LI>
<LI> Unable to print a file</LI>
<LI> Unable to print to a printer</LI>
<LI> Unable to print at all</LI>
</OL>
The scope of the problem should also be determined as:
<OL>
<LI>Specific to a machine</LI>
<LI>Specific to an operating system</LI>
<LI>Applies to all machines and operating systems</LI>
<LI> Specific to a machine</LI>
<LI> Specific to an operating system</LI>
<LI> Applies to all machines and operating systems</LI>
</OL>
<H2><A NAME="4_2">4.2 Identification</A></H2>
<H2><A NAME="4_2">4.2 Identification</A></H2>
Once the level and scope of the trouble report is determined the
software sub-system(s) involved with the problem are determined. This
may involve additional communication with the user or vendor to isolate
the problem to a specific cause.
<P>When the sub-system(s) involved have been identified, an engineer
<P> When the sub-system(s) involved have been identified, an engineer
will then determine the change(s) needed and estimate the time required
for the change(s). </P>
<H2><A NAME="4_3">4.3 Correction</A></H2>
<H2><A NAME="4_3">4.3 Correction</A></H2>
Corrections are scheduled based upon the severity and complexity of
the problem. Once all changes have been made, documented, and tested
successfully a new software release snapshot is generated. Additional
tests are added as necessary for proper testing of the changes.
<H2><A NAME="4_4">4.4 Notification</A></H2>
<H2><A NAME="4_4">4.4 Notification</A></H2>
The user or vendor is notified when the fix is available or if the
problem was caused by user error.
<H1><A NAME="5">5 Software Releases</A></H1>
<H2><A NAME="5_1">5.1 Version Numbering</A></H2>
<H1><A NAME="5">5 Software Releases</A></H1>
<H2><A NAME="5_1">5.1 Version Numbering</A></H2>
CUPS uses a three-part version number separated by periods to
represent the major, minor, and patch release numbers:
<UL>
@@ -292,79 +292,81 @@ numbers reset to 0:
2.0.0 Production release of 2.0.0
</PRE>
</UL>
<H2><A NAME="5_2">5.2 Generation</A></H2>
<H2><A NAME="5_2">5.2 Generation</A></H2>
Software releases shall be generated for each successfully completed
software trouble report. All object and executable files shall be
deleted prior to performing a full build to ensure that source files
are recompiled.
<H2><A NAME="5_3">5.3 Testing</A></H2>
<H2><A NAME="5_3">5.3 Testing</A></H2>
Software testing shall be conducted according to the CUPS Software
Test Plan, CUPS-STP-1.1. Failed tests cause STRs to be generated to
correct the problems found.
<H2><A NAME="5_4">5.4 Release</A></H2>
<H2><A NAME="5_4">5.4 Release</A></H2>
When testing has been completed successfully a new distribution image
is created from the current CVS code &quot;snapshot&quot;. No production release
shall contain software that has not passed the appropriate software
tests.
<H1 TYPE="A" VALUE="1"><A NAME="6">A Glossary</A></H1>
<H2><A NAME="6_1">A.1 Terms</A></H2>
<H1 TYPE="A" VALUE="1"><A NAME="6">A Glossary</A></H1>
<H2><A NAME="6_1">A.1 Terms</A></H2>
<DL>
<DT>C </DT>
<DD>A computer language. </DD>
<DT>parallel </DT>
<DD>Sending or receiving data more than 1 bit at a time. </DD>
<DT>pipe </DT>
<DD>A one-way communications channel between two programs. </DD>
<DT>serial </DT>
<DD>Sending or receiving data 1 bit at a time. </DD>
<DT>socket </DT>
<DD>A two-way network communications channel. </DD>
<DT> C </DT>
<DD> A computer language. </DD>
<DT> parallel </DT>
<DD> Sending or receiving data more than 1 bit at a time. </DD>
<DT> pipe </DT>
<DD> A one-way communications channel between two programs. </DD>
<DT> serial </DT>
<DD> Sending or receiving data 1 bit at a time. </DD>
<DT> socket </DT>
<DD> A two-way network communications channel. </DD>
</DL>
<H2><A NAME="6_2">A.2 Acronyms</A></H2>
<H2><A NAME="6_2">A.2 Acronyms</A></H2>
<DL>
<DT>ASCII </DT>
<DD>American Standard Code for Information Interchange </DD>
<DT>CUPS </DT>
<DD>Common UNIX Printing System </DD>
<DT>ESC/P </DT>
<DD>EPSON Standard Code for Printers </DD>
<DT>FTP </DT>
<DD>File Transfer Protocol </DD>
<DT>HP-GL </DT>
<DD>Hewlett-Packard Graphics Language </DD>
<DT>HP-PCL </DT>
<DD>Hewlett-Packard Page Control Language </DD>
<DT>HP-PJL </DT>
<DD>Hewlett-Packard Printer Job Language </DD>
<DT>IETF </DT>
<DD>Internet Engineering Task Force </DD>
<DT>IPP </DT>
<DD>Internet Printing Protocol </DD>
<DT>ISO </DT>
<DD>International Standards Organization </DD>
<DT>LPD </DT>
<DD>Line Printer Daemon </DD>
<DT>MIME </DT>
<DD>Multimedia Internet Mail Exchange </DD>
<DT>PPD </DT>
<DD>PostScript Printer Description </DD>
<DT>SMB </DT>
<DD>Server Message Block </DD>
<DT>TFTP </DT>
<DD>Trivial File Transfer Protocol </DD>
<DT> ASCII </DT>
<DD> American Standard Code for Information Interchange </DD>
<DT> CUPS </DT>
<DD> Common UNIX Printing System </DD>
<DT> ESC/P </DT>
<DD> EPSON Standard Code for Printers </DD>
<DT> FTP </DT>
<DD> File Transfer Protocol </DD>
<DT> HP-GL </DT>
<DD> Hewlett-Packard Graphics Language </DD>
<DT> HP-PCL </DT>
<DD> Hewlett-Packard Printer Control Language </DD>
<DT> HP-PJL </DT>
<DD> Hewlett-Packard Printer Job Language </DD>
<DT> IETF </DT>
<DD> Internet Engineering Task Force </DD>
<DT> IPP </DT>
<DD> Internet Printing Protocol </DD>
<DT> ISO </DT>
<DD> International Standards Organization </DD>
<DT> LPD </DT>
<DD> Line Printer Daemon </DD>
<DT> MIME </DT>
<DD> Multimedia Internet Mail Exchange </DD>
<DT> PCL </DT>
<DD> Page Control Language </DD>
<DT> PPD </DT>
<DD> PostScript Printer Description </DD>
<DT> SMB </DT>
<DD> Server Message Block </DD>
<DT> TFTP </DT>
<DD> Trivial File Transfer Protocol </DD>
</DL>
<H1><A NAME="7">B Coding Requirements</A></H1>
<H1><A NAME="7">B Coding Requirements</A></H1>
These coding requirements provide detailed information on source file
formatting and documentation content. These guidelines shall be applied
to all C and C++ source files provided with CUPS.
<H2><A NAME="7_1">B.1 Source Files</A></H2>
<H3><A NAME="7_1_1">B.1.1 Naming</A></H3>
<H2><A NAME="7_1">B.1 Source Files</A></H2>
<H3><A NAME="7_1_1">B.1.1 Naming</A></H3>
All source files names shall be 16 characters or less in length to
ensure compatibility with older UNIX filesystems. Source files
containing functions shall have an extension of &quot;.c&quot; for ANSI C and
&quot;.cxx&quot; for C++ source files. All other &quot;include&quot; files shall have an
extension of &quot;.h&quot;.
<H3><A NAME="7_1_2">B.1.2 Documentation</A></H3>
<H3><A NAME="7_1_2">B.1.2 Documentation</A></H3>
The top of each source file shall contain a header giving the name of
the file, the purpose or nature of the source file, the copyright and
licensing notice, and the functions contained in the file. The file
@@ -372,7 +374,7 @@ name and revision information is provided by the CVS &quot;$Id$&quot; tag:
<UL>
<PRE>
/*
* &quot;$Id$&quot;
* &quot;36;Id$&quot;
*
* Description of file contents.
*
@@ -410,20 +412,20 @@ that code has been lost near the end of the file:
<UL>
<PRE>
/*
* End of &quot;$Id$&quot;.
* End of &quot;36;Id$&quot;.
*/
</PRE>
</UL>
<H2><A NAME="7_2">B.2 Functions</A></H2>
<H3><A NAME="7_2_1">B.2.1 Naming</A></H3>
<H2><A NAME="7_2">B.2 Functions</A></H2>
<H3><A NAME="7_2_1">B.2.1 Naming</A></H3>
Functions with a global scope shall be capitalized (&quot;DoThis&quot;,
&quot;DoThat&quot;, &quot;DoSomethingElse&quot;, etc.) The only exception to this rule
shall be the CUPS interface library functions which may begin with a
prefix word in lowercase (&quot;cupsDoThis&quot;, &quot;cupsDoThat&quot;, etc.)
<P>Functions with a local scope shall be declared &quot;static&quot; and be
<P> Functions with a local scope shall be declared &quot;static&quot; and be
lowercase with underscores between words (&quot;do_this&quot;, &quot;do_that&quot;,
&quot;do_something_else&quot;, etc.) </P>
<H3><A NAME="7_2_2">B.2.2 Documentation</A></H3>
<H3><A NAME="7_2_2">B.2.2 Documentation</A></H3>
Each function shall begin with a comment header describing what the
function does, the possible input limits (if any), and the possible
output values (if any), and any special information needed:
@@ -443,11 +445,11 @@ do_this(float x) /* I - Power value (0.0 &lt;= x &lt;= 1.1) */
}
</PRE>
</UL>
<H2><A NAME="7_3">B.3 Methods</A></H2>
<H3><A NAME="7_3_1">B.3.1 Naming</A></H3>
<H2><A NAME="7_3">B.3 Methods</A></H2>
<H3><A NAME="7_3_1">B.3.1 Naming</A></H3>
Methods shall be in lowercase with underscores between words
(&quot;do_this&quot;, &quot;do_that&quot;, &quot;do_something_else&quot;, etc.)
<H3><A NAME="7_3_2">B.3.2 Documentation</A></H3>
<H3><A NAME="7_3_2">B.3.2 Documentation</A></H3>
Each method shall begin with a comment header describing what the
method does, the possible input limits (if any), and the possible
output values (if any), and any special information needed:
@@ -467,19 +469,19 @@ class::do_this(float x) /* I - Power value (0.0 &lt;= x &lt;= 1.0) */
}
</PRE>
</UL>
<H2><A NAME="7_4">B.4 Variables</A></H2>
<H3><A NAME="7_4_1">B.4.1 Naming</A></H3>
<H2><A NAME="7_4">B.4 Variables</A></H2>
<H3><A NAME="7_4_1">B.4.1 Naming</A></H3>
Variables with a global scope shall be capitalized (&quot;ThisVariable&quot;,
&quot;ThatVariable&quot;, &quot;ThisStateVariable&quot;, etc.) The only exception to this
rule shall be the CUPS interface library global variables which must
begin with the prefix &quot;cups&quot; (&quot;cupsThisVariable&quot;, &quot;cupsThatVariable&quot;,
etc.) Global variables shall be replaced by function arguments whenever
possible.
<P>Variables with a local scope shall be lowercase with underscores
<P> Variables with a local scope shall be lowercase with underscores
between words (&quot;this_variable&quot;, &quot;that_variable&quot;, etc.) Any local
variables shared by functions within a source file shall be declared
&quot;static&quot;. </P>
<H3><A NAME="7_4_2">B.4.2 Documentation</A></H3>
<H3><A NAME="7_4_2">B.4.2 Documentation</A></H3>
Each variable shall be declared on a separate line and shall be
immediately followed by a comment block describing the variable:
<UL>
@@ -488,12 +490,12 @@ int this_variable; /* The current state of this */
int that_variable; /* The current state of that */
</PRE>
</UL>
<H2><A NAME="7_5">B.5 Types</A></H2>
<H3><A NAME="7_5_1">B.5.1 Naming</A></H3>
<H2><A NAME="7_5">B.5 Types</A></H2>
<H3><A NAME="7_5_1">B.5.1 Naming</A></H3>
All type names shall be lowercase with underscores between words and
&quot;_t&quot; appended to the end of the name (&quot;this_type_t&quot;, &quot;that_type_t&quot;,
etc.)
<H3><A NAME="7_5_2">B.5.2 Documentation</A></H3>
<H3><A NAME="7_5_2">B.5.2 Documentation</A></H3>
Each type shall have a comment block immediately before the typedef:
<UL>
<PRE>
@@ -503,12 +505,12 @@ etc.)
typedef int cups_this_type_t;
</PRE>
</UL>
<H2><A NAME="7_6">B.6 Structures</A></H2>
<H3><A NAME="7_6_1">B.6.1 Naming</A></H3>
<H2><A NAME="7_6">B.6 Structures</A></H2>
<H3><A NAME="7_6_1">B.6.1 Naming</A></H3>
All structure names shall be lowercase with underscores between words
and &quot;_str&quot; appended to the end of the name (&quot;this_struct_str&quot;,
&quot;that_struct_str&quot;, etc.)
<H3><A NAME="7_6_2">B.6.2 Documentation</A></H3>
<H3><A NAME="7_6_2">B.6.2 Documentation</A></H3>
Each structure shall have a comment block immediately before the
struct and each member shall be documented in accordance with the
variable naming policy above:
@@ -524,11 +526,11 @@ struct cups_this_struct_str
};
</PRE>
</UL>
<H2><A NAME="7_7">B.7 Classes</A></H2>
<H3><A NAME="7_7_1">B.7.1 Naming</A></H3>
<H2><A NAME="7_7">B.7 Classes</A></H2>
<H3><A NAME="7_7_1">B.7.1 Naming</A></H3>
All class names shall be lowercase with underscores between words
(&quot;this_class&quot;, &quot;that_class&quot;, etc.)
<H3><A NAME="7_7_2">B.7.2 Documentation</A></H3>
<H3><A NAME="7_7_2">B.7.2 Documentation</A></H3>
Each class shall have a comment block immediately before the class and
each member shall be documented in accordance with the variable naming
policy above:
@@ -544,15 +546,15 @@ class cups_this_class
};
</PRE>
</UL>
<H2><A NAME="7_8">B.8 Constants</A></H2>
<H3><A NAME="7_8_1">B.8.1 Naming</A></H3>
<H2><A NAME="7_8">B.8 Constants</A></H2>
<H3><A NAME="7_8_1">B.8.1 Naming</A></H3>
All constant names shall be uppercase with underscored between words
(&quot;THIS_CONSTANT&quot;, &quot;THAT_CONSTANT&quot;, etc.) Constants defined for the CUPS
interface library must begin with an uppercase prefix
(&quot;CUPS_THIS_CONSTANT&quot;, &quot;CUPS_THAT_CONSTANT&quot;, etc.)
<P>Typed enumerations shall be used whenever possible to allow for type
checking by the compiler. </P>
<H3><A NAME="7_8_2">B.8.2 Documentation</A></H3>
<P> Typed enumerations shall be used whenever possible to allow for
type checking by the compiler. </P>
<H3><A NAME="7_8_2">B.8.2 Documentation</A></H3>
Comment blocks shall immediately follow each constant:
<UL>
<PRE>
@@ -563,8 +565,8 @@ enum
};
</PRE>
</UL>
<H2><A NAME="7_9">B.9 Code</A></H2>
<H3><A NAME="7_9_1">B.9.1 Documentation</A></H3>
<H2><A NAME="7_9">B.9 Code</A></H2>
<H3><A NAME="7_9_1">B.9.1 Documentation</A></H3>
All source code shall utilize block comments within functions to
describe the operations being performed by a group of statements:
<UL>
@@ -591,8 +593,8 @@ do
} while (i == (sizeof(array) / sizeof(array[0])));
</PRE>
</UL>
<H3><A NAME="7_9_2">B.9.2 Style</A></H3>
<H4 TYPE="a">B.9.2.a Indentation</H4>
<H3><A NAME="7_9_2">B.9.2 Style</A></H3>
<H4 TYPE="a">B.9.2.a Indentation</H4>
All code blocks enclosed by brackets shall begin with the opening
brace on a new line. The code then follows starting on a new line after
the brace and is indented 2 spaces. The closing brace is then placed on
@@ -632,11 +634,11 @@ switch (array[i])
}
</PRE>
</UL>
<H4>B.9.2.b Spacing</H4>
<H4>B.9.2.b Spacing</H4>
A space shall follow each reserved word (&quot;if&quot;, &quot;while&quot;, etc.) Spaces
shall not be inserted between a function name and the arguments in
parenthesis.
<H4>B.9.2.c Return Values</H4>
<H4>B.9.2.c Return Values</H4>
Parenthesis shall surround values returned from a function using
&quot;return&quot;:
<UL>
@@ -644,7 +646,7 @@ parenthesis.
return (STATE_IDLE);
</PRE>
</UL>
<H4>B.9.2.d Loops</H4>
<H4>B.9.2.d Loops</H4>
Whenever convenient loops should count downward to zero to improve
program performance:
<UL>
@@ -653,20 +655,20 @@ for (i = sizeof(array) / sizeof(array[0]) - 1; i &gt;= 0; i --)
array[i] = STATE_IDLE;
</PRE>
</UL>
<H1 ALIGN="RIGHT"><A NAME="8">C Software Trouble Report Form</A></H1>
<H1 ALIGN="RIGHT"><A NAME="8">C Software Trouble Report Form</A></H1>
<CENTER>
<TABLE WIDTH="80%">
<TR><TH ALIGN="RIGHT">Summary of Problem:</TH><TD ALIGN="LEFT">
________________________________________</TD></TR>
<TR><TH ALIGN="RIGHT">Problem Severity:</TH><TD ALIGN="LEFT">__1=RFE
<TR><TH ALIGN="RIGHT"> Summary of Problem:</TH><TD ALIGN="LEFT">
________________________________________</TD></TR>
<TR><TH ALIGN="RIGHT"> Problem Severity:</TH><TD ALIGN="LEFT"> __1=RFE
<BR> __2=Documentation-Error
<BR> __3=Unable-to-Print-a-File
<BR> __4=Unable-to-Print-to-a-Printer
<BR> __5=Unable-to-Print-at-All</TD></TR>
<TR><TH ALIGN="RIGHT">Problem Scope:</TH><TD ALIGN="LEFT">__1=Machine
<TR><TH ALIGN="RIGHT"> Problem Scope:</TH><TD ALIGN="LEFT"> __1=Machine
__2=Operating-System __3=All</TD></TR>
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Detailed Description of Problem:</TH><TD
ALIGN="LEFT">________________________________________
<TR><TH ALIGN="RIGHT" VALIGN="TOP"> Detailed Description of Problem:</TH><TD
ALIGN="LEFT"> ________________________________________
<BR> ________________________________________
<BR> ________________________________________
<BR> ________________________________________
+124 -125
Ver Arquivo
@@ -1,6 +1,6 @@
%PDF-1.2
%âãÏÓ
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000824182222Z)/Title( CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000705214846Z)/Title( CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
2 0 obj<</Type/Encoding/Differences[ 32/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 128/Euro 130/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE 145/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe 159/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]>>endobj
3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Times-Roman/Encoding 2 0 R>>endobj
@@ -306,12 +306,12 @@ endobj
xÚ+ä2T0BCc3JÎår
ár
á
äHendstream
endobj
156 0 obj
äHendstream
endobj
156 0 obj
31
endobj
157 0 obj<</Type/Page/Parent 150 0 R/Contents 158 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R/Fc 9 0 R>>>>/Annots 14 0 R>>endobj
157 0 obj<</Type/Page/Parent 150 0 R/Contents 158 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R/Fc 9 0 R>>>>/Annots 14 0 R>>endobj
158 0 obj<</Length 159 0 R/Filter/FlateDecode>>stream
VMoÛ8½çW zJ€µjÉŸÙ[§Y/šTk9Å|¡%ÊfC‰
IÙpýÎtì¸éb³„â ç½7Ã<_ÄÐÅŸF ô†W“ÅÅÇÏ×taQâÎp4†EqC–«†_-¾»Ýxäw;½~”¸ý(†YÁk+J3+TíCûÇ!4EC
@@ -371,12 +371,11 @@ endobj
|ý¸ÿœì¦öëÐŽC(íÎ|ñ‰#Í”ê–Æ ä#Q5®M_RÍÓÕ@5‡b€‚°¯â,&vBYiîCj§ª Ö¦c.ž,Th¹G:Pïû ìÜÌáVGÂ_ðÑÓt¡Üþ«Á%¨Z4Þ0­^ìÊ7;æîU@ÂåZ9£%è:Ɇ{Úåà@øÈËB1DN±ÞŠ„"ü³éˆí,‡3Ë„vÿˆ!h kI©&,ù2©ãYàL…RG)Re:äëÇn$>° 'v~(¦M!x.}E¶Ñ2(N­pس
-eï÷ïàmŠ”(ůG1^p6ÑÒ²÷Á3cÚNÄW!°W>ãÕv‘^“ˆÞ¿
ç»röyöUDK­endstream
540
endobj
172 0 obj<</Type/Page/Parent 150 0 R/Contents 173 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F8 7 0 R>>>>>>endobj
endobj
171 0 obj
540
endobj
áÒw³P04TIS041Ó3V072PIÑPp
172 0 obj<</Type/Page/Parent 150 0 R/Contents 173 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F8 7 0 R>>>>>>endobj
173 0 obj<</Length 174 0 R/Filter/FlateDecode>>stream
xÚ+ä2T0BCc3JÎår
áÒw³P04TIS041Ó3V072PIÑPp
@@ -710,122 +709,122 @@ xref
0000008191 00000 n
0000008296 00000 n
0000008401 00000 n
0000008713 00000 n
0000008816 00000 n
0000009120 00000 n
0000009225 00000 n
0000009330 00000 n
0000009434 00000 n
0000009539 00000 n
0000009644 00000 n
0000009748 00000 n
0000009853 00000 n
0000009958 00000 n
0000010062 00000 n
0000010167 00000 n
0000010272 00000 n
0000010376 00000 n
0000010477 00000 n
0000010509 00000 n
0000010541 00000 n
0000011261 00000 n
0000011309 00000 n
0000011357 00000 n
0000011405 00000 n
0000011453 00000 n
0000011502 00000 n
0000011551 00000 n
0000011600 00000 n
0000011649 00000 n
0000011698 00000 n
0000011747 00000 n
0000011796 00000 n
0000011845 00000 n
0000011894 00000 n
0000011943 00000 n
0000011992 00000 n
0000012041 00000 n
0000012090 00000 n
0000012139 00000 n
0000012188 00000 n
0000012237 00000 n
0000012286 00000 n
0000012335 00000 n
0000012384 00000 n
0000012433 00000 n
0000012482 00000 n
0000012531 00000 n
0000012580 00000 n
0000012629 00000 n
0000012678 00000 n
0000012727 00000 n
0000012776 00000 n
0000012825 00000 n
0000012874 00000 n
0000012923 00000 n
0000012972 00000 n
0000013021 00000 n
0000013070 00000 n
0000013119 00000 n
0000013168 00000 n
0000013217 00000 n
0000013266 00000 n
0000013315 00000 n
0000013364 00000 n
0000013413 00000 n
0000013462 00000 n
0000013511 00000 n
0000013560 00000 n
0000013609 00000 n
0000013658 00000 n
0000013707 00000 n
0000013756 00000 n
0000013805 00000 n
0000013854 00000 n
0000013903 00000 n
0000014164 00000 n
0000014316 00000 n
0000020676 00000 n
0000020698 00000 n
0000020793 00000 n
0000020895 00000 n
0000020915 00000 n
0000021069 00000 n
0000022130 00000 n
0000022151 00000 n
0000022264 00000 n
0000022452 00000 n
0000022473 00000 n
0000022627 00000 n
0000024026 00000 n
0000024048 00000 n
0000024161 00000 n
0000024354 00000 n
0000024375 00000 n
0000024506 00000 n
0000025117 00000 n
0000025138 00000 n
0000025251 00000 n
0000025441 00000 n
0000025462 00000 n
0000025593 00000 n
0000026594 00000 n
0000026615 00000 n
0000026728 00000 n
0000026930 00000 n
0000026951 00000 n
0000027091 00000 n
0000028109 00000 n
0000028130 00000 n
0000028243 00000 n
0000028442 00000 n
0000028463 00000 n
0000028603 00000 n
0000029270 00000 n
0000029291 00000 n
0000029404 00000 n
0000008506 00000 n
0000008610 00000 n
0000008713 00000 n
0000008816 00000 n
0000009120 00000 n
0000009225 00000 n
0000009330 00000 n
0000009434 00000 n
0000009539 00000 n
0000009644 00000 n
0000009748 00000 n
0000009853 00000 n
0000009958 00000 n
0000010062 00000 n
0000010167 00000 n
0000010272 00000 n
0000010376 00000 n
0000010477 00000 n
0000010509 00000 n
0000010541 00000 n
0000011261 00000 n
0000011309 00000 n
0000011357 00000 n
0000011405 00000 n
0000011453 00000 n
0000011502 00000 n
0000011551 00000 n
0000011600 00000 n
0000011649 00000 n
0000011698 00000 n
0000011747 00000 n
0000011796 00000 n
0000011845 00000 n
0000011894 00000 n
0000011943 00000 n
0000011992 00000 n
0000012041 00000 n
0000012090 00000 n
0000012139 00000 n
0000012188 00000 n
0000012237 00000 n
0000012286 00000 n
0000012335 00000 n
0000012384 00000 n
0000012433 00000 n
0000012482 00000 n
0000012531 00000 n
0000012580 00000 n
0000012629 00000 n
0000012678 00000 n
0000012727 00000 n
0000012776 00000 n
0000012825 00000 n
0000012874 00000 n
0000012923 00000 n
0000012972 00000 n
0000013021 00000 n
0000013070 00000 n
0000013119 00000 n
0000013168 00000 n
0000013217 00000 n
0000013266 00000 n
0000013315 00000 n
0000013364 00000 n
0000013413 00000 n
0000013462 00000 n
0000013511 00000 n
0000013560 00000 n
0000013609 00000 n
0000013658 00000 n
0000013707 00000 n
0000013756 00000 n
0000013805 00000 n
0000013854 00000 n
0000013903 00000 n
0000014164 00000 n
0000014316 00000 n
0000020676 00000 n
0000020698 00000 n
0000020793 00000 n
0000020895 00000 n
0000020915 00000 n
0000021069 00000 n
0000022130 00000 n
0000022151 00000 n
0000022264 00000 n
0000022452 00000 n
0000022473 00000 n
0000022627 00000 n
0000024028 00000 n
0000024050 00000 n
0000024163 00000 n
0000024356 00000 n
0000024377 00000 n
0000024508 00000 n
0000025119 00000 n
0000025140 00000 n
0000025253 00000 n
0000025443 00000 n
0000025464 00000 n
0000025595 00000 n
0000026596 00000 n
0000026617 00000 n
0000026730 00000 n
0000026932 00000 n
0000026953 00000 n
0000027093 00000 n
0000028111 00000 n
0000028132 00000 n
0000028245 00000 n
0000028444 00000 n
0000028465 00000 n
0000028605 00000 n
0000029278 00000 n
0000029299 00000 n
0000029618 00000 n
0000029412 00000 n
0000029605 00000 n
0000030901 00000 n
0000029626 00000 n
0000029766 00000 n
-4
Ver Arquivo
@@ -56,10 +56,6 @@ The following documentation for CUPS is available on this server:
<A HREF="sdd.html">HTML</A> |
<A HREF="sdd.pdf">PDF</A> )
<LI>Software Performance Specification (
<A HREF="sps.html">HTML</A> |
<A HREF="sps.pdf">PDF</A> )
<LI>Software Version Description (
<A HREF="svd.html">HTML</A> |
<A HREF="svd.pdf">PDF</A> )
BIN
Ver Arquivo
Arquivo binário não exibido.
+500 -492
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+736 -677
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+845 -848
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+1129 -1185
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Arquivo binário não exibido.
+2 -2
Ver Arquivo
@@ -7,14 +7,14 @@
<UL>
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description
<LI>CUPS-IPP-1.1: CUPS Implementation of IPP
<LI>CUPS-IPP-1.1: CUPS Implmentation of IPP
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual
<LI>CUPS-SDD-1.1: CUPS Software Design Description
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual
<LI>CUPS-SSR-1.1: CUPS Software Security Report
<LI>CUPS-STP-1.1: CUPS Software Test Plan
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual
<LI>CUPS-SVD-1.1: CUPS Software Version Description
<LI>CUPS-SVD-1.1.x: CUPS Software Version Description
</UL>
<H2>Other Documents</H2>
+7 -49
Ver Arquivo
@@ -4,7 +4,7 @@
<TITLE> CUPS Software Administrators Manual</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.1.3">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<STYLE>
BODY { font-family: serif; font-size: 11.0pt }
@@ -22,7 +22,7 @@ PRE { font-size: 9.0pt }
<BODY BGCOLOR="#ffffff">
<CENTER><A HREF="#CONTENTS"><IMG SRC="images/cups-large.gif" BORDER="0" WIDTH="100%"><BR>
<H1> CUPS Software Administrators Manual</H1></A><BR>
CUPS-SAM-1.1.3<BR>
CUPS-SAM-1.1<BR>
Easy Software Products<BR>
Copyright 1997-2000, All Rights Reserved<BR>
</CENTER>
@@ -128,7 +128,6 @@ Copyright 1997-2000, All Rights Reserved<BR>
<LI><A HREF="#Deny">Deny</A></LI>
<LI><A HREF="#DocumentRoot">DocumentRoot</A></LI>
<LI><A HREF="#ErrorLog">ErrorLog</A></LI>
<LI><A HREF="#FilterLimit">FilterLimit</A></LI>
<LI><A HREF="#Group">Group</A></LI>
<LI><A HREF="#HostNameLookups">HostNameLookups</A></LI>
<LI><A HREF="#ImplicitClasses">ImplicitClasses</A></LI>
@@ -146,7 +145,6 @@ Copyright 1997-2000, All Rights Reserved<BR>
<LI><A HREF="#PreserveJobHistory">PreserveJobHistory</A></LI>
<LI><A HREF="#PreserveJobFiles">PreserveJobFiles</A></LI>
<LI><A HREF="#Printcap">Printcap</A></LI>
<LI><A HREF="#RemoteRoot">RemoteRoot</A></LI>
<LI><A HREF="#RequestRoot">RequestRoot</A></LI>
<LI><A HREF="#RIPCache">RIPCache</A></LI>
<LI><A HREF="#ServerAdmin">ServerAdmin</A></LI>
@@ -247,7 +245,7 @@ Machine!</A></LI>
<H1 ALIGN="RIGHT"><A NAME="1">Preface</A></H1>
<P>This software administrators manual provides printer administration
information for the Common UNIX Printing System<SUP>TM</SUP> (&quot;CUPS<SUP>
TM</SUP>&quot;), version 1.1.3. </P>
TM</SUP>&quot;), version 1.1. </P>
<H2><A NAME="1_1">System Overview</A></H2>
<P>CUPS provides a portable printing layer for UNIX&reg;-based operating
systems. It has been developed by <A HREF="http://www.easysw.com">Easy
@@ -1040,7 +1038,6 @@ determine how the server operates: </P>
<LI><A HREF="#Deny"><CODE>Deny</CODE></A></LI>
<LI><A HREF="#DocumentRoot"><CODE>DocumentRoot</CODE></A></LI>
<LI><A HREF="#ErrorLog"><CODE>ErrorLog</CODE></A></LI>
<LI><A HREF="#FilterLimit"><CODE>FilterLimit</CODE></A></LI>
<LI><A HREF="#Group"><CODE>Group</CODE></A></LI>
<LI><A HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A></LI>
<LI><A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A></LI>
@@ -1059,7 +1056,6 @@ determine how the server operates: </P>
<LI><A HREF="#PreserveJobFiles"><CODE>PreserveJobFiles</CODE></A></LI>
<LI><A HREF="#PreserveJobHistory"><CODE>PreserveJobHistory</CODE></A></LI>
<LI><A HREF="#Printcap"><CODE>Printcap</CODE></A></LI>
<LI><A HREF="#RemoteRoot"><CODE>RemoteRoot</CODE></A></LI>
<LI><A HREF="#RequestRoot"><CODE>RequestRoot</CODE></A></LI>
<LI><A HREF="#RIPCache"><CODE>RIPCache</CODE></A></LI>
<LI><A HREF="#ServerAdmin"><CODE>ServerAdmin</CODE></A></LI>
@@ -1601,28 +1597,6 @@ default error log file is <VAR>/var/log/cups/error_log</VAR>. </P>
to the system log instead of a plain file.
<!-- NEED 3in ---->
</P>
<H3><A NAME="FilterLimit">FilterLimit</A></H3>
<HR>
<H4>Examples</H4>
<UL>
<PRE>
FilterLimit 0
FilterLimit 200
FilterLimit 1000
</PRE>
</UL>
<H4>Description</H4>
<P>The <CODE>FilterLimit</CODE> directive sets the maximum cost of all
running job filters. It can be used to limit the number of filter
programs that are run on a server to minimize disk, memory, and CPU
resource problems. A limit of 0 disables filter limiting. </P>
<P>An average print to a non-PostScript printer needs a filter limit of
about 200. A PostScript printer needs about half that (100). Setting
the limit below these thresholds will effectively limit the scheduler
to printing a single job at any time. </P>
<P>The default limit is 0.
<!-- NEED 3in ---->
</P>
<H3><A NAME="Group">Group</A></H3>
<HR>
<H4>Examples</H4>
@@ -1957,22 +1931,6 @@ printcap file can then be used by applications that are hardcoded to
look at the printcap file for the available printers.
<!-- NEED 3in ---->
</P>
<H3><A NAME="RemoteRoot">RemoteRoot</A></H3>
<HR>
<H4>Examples</H4>
<UL>
<PRE>
RemoteRoot remroot
RemoteRoot root
</PRE>
</UL>
<H4>Description</H4>
<P>The <CODE>RemoteRoot</CODE> directive sets the username for
unauthenticated root requests from remote hosts. The default username
is <VAR>remroot</VAR>. Setting <CODE>RemoteRoot</CODE> to <VAR>root</VAR>
effectively disables this security mechanism.
<!-- NEED 3in ---->
</P>
<H3><A NAME="RequestRoot">RequestRoot</A></H3>
<HR>
<H4>Examples</H4>
@@ -2372,10 +2330,10 @@ Password again: <B>(password) ENTER</B> [password is not echoed]
<!-- NEW PAGE ---->
<H2><A NAME="PRINTER_ACCOUNTING">Printer Accounting</A></H2>
<P>ESP Print Pro maintains a log of all accesses, errors, and pages
that are printed. The log files are normally stored in the <VAR>
/var/log/cups</VAR> directory. You can change this by editing the <VAR>
/etc/cups/cupsd.conf</VAR> configuration file. </P>
<P>CUPS maintains a log of all accesses, errors, and pages that are </P>
<P>The log files are normally stored in the <VAR>/var/log/cups</VAR>
directory. You can change this by editing the <VAR>/etc/cups/cupsd.conf</VAR>
configuration file. </P>
<H3><A NAME="7_6_1">The access_log File</A></H3>
<P>The <VAR>access_log</VAR> file lists each HTTP resource that is
accessed by a web browser or CUPS/IPP client. Each line is in the
+2211 -2294
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+7 -53
Ver Arquivo
@@ -1,7 +1,7 @@
<HTML>
<HEAD>
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.1.3">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.1">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>CUPS Software Administrators Manual</TITLE>
</HEAD>
@@ -11,7 +11,7 @@
<P>This software administrators manual provides printer administration
information for the Common UNIX Printing System<SUP>TM</SUP>
("CUPS<SUP>TM</SUP>"), version 1.1.3.
("CUPS<SUP>TM</SUP>"), version 1.1.
<EMBED SRC="system-overview.shtml">
@@ -848,7 +848,6 @@ determine how the server operates:
<LI><A HREF="#Deny"><CODE>Deny</CODE></A>
<LI><A HREF="#DocumentRoot"><CODE>DocumentRoot</CODE></A>
<LI><A HREF="#ErrorLog"><CODE>ErrorLog</CODE></A>
<LI><A HREF="#FilterLimit"><CODE>FilterLimit</CODE></A>
<LI><A HREF="#Group"><CODE>Group</CODE></A>
<LI><A HREF="#HostNameLookups"><CODE>HostNameLookups</CODE></A>
<LI><A HREF="#ImplicitClasses"><CODE>ImplicitClasses</CODE></A>
@@ -873,7 +872,6 @@ determine how the server operates:
<LI><A HREF="#PreserveJobFiles"><CODE>PreserveJobFiles</CODE></A>
<LI><A HREF="#PreserveJobHistory"><CODE>PreserveJobHistory</CODE></A>
<LI><A HREF="#Printcap"><CODE>Printcap</CODE></A>
<LI><A HREF="#RemoteRoot"><CODE>RemoteRoot</CODE></A>
<LI><A HREF="#RequestRoot"><CODE>RequestRoot</CODE></A>
<LI><A HREF="#RIPCache"><CODE>RIPCache</CODE></A>
<LI><A HREF="#ServerAdmin"><CODE>ServerAdmin</CODE></A>
@@ -1538,33 +1536,6 @@ default error log file is <VAR>/var/log/cups/error_log</VAR>.
<P>The special name "syslog" can be used to send the error information
to the system log instead of a plain file.
<!-- NEED 3in -->
<H3><A NAME="FilterLimit">FilterLimit</A></H3>
<HR>
<H4>Examples</H4>
<UL><PRE>
FilterLimit 0
FilterLimit 200
FilterLimit 1000
</PRE></UL>
<H4>Description</H4>
<P>The <CODE>FilterLimit</CODE> directive sets the maximum cost
of all running job filters. It can be used to limit the number
of filter programs that are run on a server to minimize disk,
memory, and CPU resource problems. A limit of 0 disables filter
limiting.
<P>An average print to a non-PostScript printer needs a filter
limit of about 200. A PostScript printer needs about half that
(100). Setting the limit below these thresholds will effectively
limit the scheduler to printing a single job at any time.
<P>The default limit is 0.
<!-- NEED 3in -->
<H3><A NAME="Group">Group</A></H3>
<HR>
@@ -1963,24 +1934,6 @@ printcap file is written whenever a printer is added or removed. The
printcap file can then be used by applications that are hardcoded to
look at the printcap file for the available printers.
<!-- NEED 3in -->
<H3><A NAME="RemoteRoot">RemoteRoot</A></H3>
<HR>
<H4>Examples</H4>
<UL><PRE>
RemoteRoot remroot
RemoteRoot root
</PRE></UL>
<H4>Description</H4>
<P>The <CODE>RemoteRoot</CODE> directive sets the username for
unauthenticated root requests from remote hosts. The default
username is <VAR>remroot</VAR>. Setting <CODE>RemoteRoot</CODE>
to <VAR>root</VAR> effectively disables this security mechanism.
<!-- NEED 3in -->
<H3><A NAME="RequestRoot">RequestRoot</A></H3>
<HR>
@@ -2447,10 +2400,11 @@ Password again: <B>(password) ENTER</B> [password is not echoed]
<!-- NEW PAGE -->
<H2><A NAME="PRINTER_ACCOUNTING">Printer Accounting</A></H2>
<P>ESP Print Pro maintains a log of all accesses, errors, and
pages that are printed. The log files are normally stored in the
<VAR>/var/log/cups</VAR> directory. You can change this by
editing the <VAR>/etc/cups/cupsd.conf</VAR> configuration file.
<P>CUPS maintains a log of all accesses, errors, and pages that are
<P>The log files are normally stored in the <VAR>/var/log/cups</VAR>
directory. You can change this by editing the
<VAR>/etc/cups/cupsd.conf</VAR> configuration file.
<H3>The access_log File</H3>
+2 -2
Ver Arquivo
@@ -172,14 +172,14 @@ EPSON printers are included that use these filters. </P>
<UL>
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
<LI>CUPS-IPP-1.1: CUPS Implementation of IPP </LI>
<LI>CUPS-IPP-1.1: CUPS Implmentation of IPP </LI>
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
<LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
<LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
<LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
<LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
<LI>CUPS-SVD-1.1.x: CUPS Software Version Description </LI>
</UL>
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
<P>The following non-CUPS documents are referenced by this document: </P>
+136 -136
Ver Arquivo
@@ -1,6 +1,6 @@
%PDF-1.2
%âãÏÓ
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000824182250Z)/Title( CUPS Software Design Description)/Author(Easy Software Products)>>endobj
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000710174133Z)/Title( CUPS Software Design Description)/Author(Easy Software Products)>>endobj
2 0 obj<</Type/Encoding/Differences[ 32/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 128/Euro 130/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE 145/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe 159/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]>>endobj
3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier-Oblique/Encoding 2 0 R>>endobj
@@ -385,12 +385,12 @@ endobj
xÚ+ä2T0BCc3JÎår
ár
á
äHendstream
endobj
211 0 obj
äHendstream
endobj
211 0 obj
31
endobj
212 0 obj<</Type/Page/Parent 205 0 R/Contents 213 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 5 0 R/F8 8 0 R/F9 9 0 R/Fc 10 0 R>>>>/Annots 15 0 R>>endobj
212 0 obj<</Type/Page/Parent 205 0 R/Contents 213 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 5 0 R/F8 8 0 R/F9 9 0 R/Fc 10 0 R>>>>/Annots 15 0 R>>endobj
213 0 obj<</Length 214 0 R/Filter/FlateDecode>>stream
xÚ¥UÛnÛ8}÷W ú”kÖ’¯Ù·¦Îf½hS5rŠ>ø…¦(›
%º$eÃýúÎr}iº(PذAÍ휙ÃÑ×N=ü$0N¡?Qunç×ÿÜ@Úƒy‰–Ñxóâ*¼ž Öd­Ýþ€¥ÁΘ²öªT‚{eêè:€$i]Ó1‘ë|­8Sú·
@@ -861,137 +861,137 @@ xref
0000015722 00000 n
0000015771 00000 n
0000015820 00000 n
0000015967 00000 n
0000016016 00000 n
0000016065 00000 n
0000016114 00000 n
0000016163 00000 n
0000016212 00000 n
0000016261 00000 n
0000016310 00000 n
0000016359 00000 n
0000016408 00000 n
0000016457 00000 n
0000016506 00000 n
0000016555 00000 n
0000016604 00000 n
0000016653 00000 n
0000016702 00000 n
0000016751 00000 n
0000016800 00000 n
0000016849 00000 n
0000016898 00000 n
0000016947 00000 n
0000016996 00000 n
0000017045 00000 n
0000017094 00000 n
0000017143 00000 n
0000017192 00000 n
0000017241 00000 n
0000017290 00000 n
0000017339 00000 n
0000017388 00000 n
0000017437 00000 n
0000017486 00000 n
0000017535 00000 n
0000017584 00000 n
0000017633 00000 n
0000017682 00000 n
0000017731 00000 n
0000017780 00000 n
0000017829 00000 n
0000017878 00000 n
0000017927 00000 n
0000017976 00000 n
0000018025 00000 n
0000018074 00000 n
0000018123 00000 n
0000018172 00000 n
0000018221 00000 n
0000018270 00000 n
0000018319 00000 n
0000018368 00000 n
0000018417 00000 n
0000018466 00000 n
0000018515 00000 n
0000018564 00000 n
0000018613 00000 n
0000018662 00000 n
0000018711 00000 n
0000018760 00000 n
0000018809 00000 n
0000019038 00000 n
0000019190 00000 n
0000025540 00000 n
0000025562 00000 n
0000025657 00000 n
0000025759 00000 n
0000025779 00000 n
0000025934 00000 n
0000026941 00000 n
0000026962 00000 n
0000027075 00000 n
0000027260 00000 n
0000027281 00000 n
0000027436 00000 n
0000028835 00000 n
0000028857 00000 n
0000028970 00000 n
0000029160 00000 n
0000029181 00000 n
0000029331 00000 n
0000030370 00000 n
0000030391 00000 n
0000030550 00000 n
0000031481 00000 n
0000031502 00000 n
0000031633 00000 n
0000032595 00000 n
0000032616 00000 n
0000032747 00000 n
0000033671 00000 n
0000033692 00000 n
0000033842 00000 n
0000034895 00000 n
0000034916 00000 n
0000035047 00000 n
0000035793 00000 n
0000035814 00000 n
0000035945 00000 n
0000037078 00000 n
0000037100 00000 n
0000037240 00000 n
0000038194 00000 n
0000038215 00000 n
0000038346 00000 n
0000038937 00000 n
0000038958 00000 n
0000039071 00000 n
0000039260 00000 n
0000039281 00000 n
0000039421 00000 n
0000040089 00000 n
0000040110 00000 n
0000040223 00000 n
0000040412 00000 n
0000040433 00000 n
0000040587 00000 n
0000042983 00000 n
0000043005 00000 n
0000043160 00000 n
0000044798 00000 n
0000044820 00000 n
0000044875 00000 n
0000044980 00000 n
0000045124 00000 n
0000045230 00000 n
0000045350 00000 n
0000045459 00000 n
0000045608 00000 n
0000045718 00000 n
0000045825 00000 n
0000015869 00000 n
0000015918 00000 n
0000015967 00000 n
0000016016 00000 n
0000016065 00000 n
0000016114 00000 n
0000016163 00000 n
0000016212 00000 n
0000016261 00000 n
0000016310 00000 n
0000016359 00000 n
0000016408 00000 n
0000016457 00000 n
0000016506 00000 n
0000016555 00000 n
0000016604 00000 n
0000016653 00000 n
0000016702 00000 n
0000016751 00000 n
0000016800 00000 n
0000016849 00000 n
0000016898 00000 n
0000016947 00000 n
0000016996 00000 n
0000017045 00000 n
0000017094 00000 n
0000017143 00000 n
0000017192 00000 n
0000017241 00000 n
0000017290 00000 n
0000017339 00000 n
0000017388 00000 n
0000017437 00000 n
0000017486 00000 n
0000017535 00000 n
0000017584 00000 n
0000017633 00000 n
0000017682 00000 n
0000017731 00000 n
0000017780 00000 n
0000017829 00000 n
0000017878 00000 n
0000017927 00000 n
0000017976 00000 n
0000018025 00000 n
0000018074 00000 n
0000018123 00000 n
0000018172 00000 n
0000018221 00000 n
0000018270 00000 n
0000018319 00000 n
0000018368 00000 n
0000018417 00000 n
0000018466 00000 n
0000018515 00000 n
0000018564 00000 n
0000018613 00000 n
0000018662 00000 n
0000018711 00000 n
0000018760 00000 n
0000018809 00000 n
0000019038 00000 n
0000019190 00000 n
0000025540 00000 n
0000025562 00000 n
0000025657 00000 n
0000025759 00000 n
0000025779 00000 n
0000025934 00000 n
0000026941 00000 n
0000026962 00000 n
0000027075 00000 n
0000027260 00000 n
0000027281 00000 n
0000027436 00000 n
0000028837 00000 n
0000028859 00000 n
0000028972 00000 n
0000029162 00000 n
0000029183 00000 n
0000029333 00000 n
0000030372 00000 n
0000030393 00000 n
0000030552 00000 n
0000031483 00000 n
0000031504 00000 n
0000031635 00000 n
0000032597 00000 n
0000032618 00000 n
0000032749 00000 n
0000033673 00000 n
0000033694 00000 n
0000033844 00000 n
0000034897 00000 n
0000034918 00000 n
0000035049 00000 n
0000035795 00000 n
0000035816 00000 n
0000035947 00000 n
0000037080 00000 n
0000037102 00000 n
0000037242 00000 n
0000038196 00000 n
0000038217 00000 n
0000038348 00000 n
0000038939 00000 n
0000038960 00000 n
0000039073 00000 n
0000039262 00000 n
0000039283 00000 n
0000039423 00000 n
0000040091 00000 n
0000040112 00000 n
0000040225 00000 n
0000040414 00000 n
0000040435 00000 n
0000040589 00000 n
0000042985 00000 n
0000043007 00000 n
0000043162 00000 n
0000044800 00000 n
0000044822 00000 n
0000044877 00000 n
0000044982 00000 n
0000045126 00000 n
0000045232 00000 n
0000045352 00000 n
0000045461 00000 n
0000045610 00000 n
0000045720 00000 n
0000046115 00000 n
0000045827 00000 n
0000045981 00000 n
0000046322 00000 n
0000046117 00000 n
0000046214 00000 n
+3177 -3396
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+8149 -8480
Ver Arquivo
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
+3 -261
Ver Arquivo
@@ -1,7 +1,7 @@
<HTML>
<HEAD>
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SPM-1.1.3">
<META NAME="DOCNUMBER" CONTENT="CUPS-SPM-1.1">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>CUPS Software Programmers Manual</TITLE>
</HEAD>
@@ -10,7 +10,7 @@
<H1 ALIGN="RIGHT">Preface</H1>
<P>This software programmers manual provides software programming
information for the Common UNIX Printing System ("CUPS") Version 1.1.3.
information for the Common UNIX Printing System ("CUPS") Version 1.1.
<EMBED SRC="system-overview.shtml">
@@ -450,65 +450,6 @@ if (jobid == 0)
puts(cupsErrorString(cupsLastError()));
</PRE></UL>
<H3>Passwords and Authentication</H3>
<P>CUPS supports authentication of any request, including
submission of print jobs. The default mechanism for getting the
username and password is to use the login user and a password
from the console.
<P>To support other types of applications, in particular
Graphical User Interfaces ("GUIs"), the CUPS API provides
functions to set the default username and to register a callback
function that returns a password string.
<P>The <A HREF="cupsSetPasswordCB"><CODE>cupsSetPasswordCB()</CODE></A>
function is used to set a password callback in your program. Only one
function can be used at any time.
<P>The <A HREF="cupsSetUser"><CODE>cupsSetUser()</CODE></A> function sets
the current username for authentication. This function can be called by
your password callback function to change the current username as needed.
<P>The following example shows a simple password callback that gets a
username and password from the user:
<UL><PRE>
#include &lt;cups/cups.h&gt;
const char *
my_password_cb(const char *prompt)
{
char user[65];
puts(prompt);
/* Get a username from the user */
printf("Username: ");
if (fgets(user, sizeof(user), stdin) == NULL)
return (NULL);
/* Strip the newline from the string and set the user */
user[strlen(user) - 1] = '\0';
cupsSetUser(user);
/* Use getpass() to ask for the password... */
return (getpass("Password: "));
}
...
cupsSetPasswordCB(my_password_cb);
</PRE></UL>
<P>Similarly, a GUI interface could display the prompt string in a
window with input fields for the username and password. The username
should probably default to the value of
<A HREF="#cupsUser"><CODE>cupsUser()</CODE></A> to make things easier
on the user.
<H2>PPD Services</H2>
<P>CUPS includes functions to access and manipulate PostScript Printer
@@ -3318,9 +3259,6 @@ password = cupsGetPassword("Please enter a password:");
<P>
<A HREF="#cupsServer">cupsServer()</A>,
<A HREF="#cupsSetPasswordCB">cupsSetPasswordCB()</A>,
<A HREF="#cupsSetServer">cupsSetServer()</A>,
<A HREF="#cupsSetUser">cupsSetUser()</A>,
<A HREF="#cupsUser()">cupsUser()</A>
<!-- NEW PAGE --><H2><A NAME="cupsGetPPD">cupsGetPPD()</A></H2>
@@ -4491,160 +4429,8 @@ server = cupsServer();
<P>
<A HREF="#cupsGetPassword">cupsGetPassword()</A>,
<A HREF="#cupsSetPasswordCB">cupsSetPasswordCB()</A>,
<A HREF="#cupsSetServer">cupsSetServer()</A>,
<A HREF="#cupsSetUser">cupsSetUser()</A>,
<A HREF="#cupsUser">cupsUser()</A>
<!-- NEW PAGE --><H2><A NAME="cupsSetPasswordCB">cupsSetPasswordCB()</A></H2>
<H3>Usage</H3>
<PRE>
void
cupsSetPasswordCB(const char *(*cb)(const char *prompt));
</PRE>
<H3>Arguments</H3>
<CENTER><TABLE WIDTH="80%" BORDER>
<TR>
<TH>Argument</TH>
<TH>Description</TH>
</TR>
<TR>
<TD>cb</TD>
<TD>The password callback function.</TD>
</TR>
</TABLE></CENTER>
<H3>Description</H3>
<P><CODE>cupsSetPasswordCB()</CODE> sets the callback function to use when
asking the user for a password. The callback function must accept a single
character string pointer (the prompt string) and return <CODE>NULL</CODE>
if the user did not enter a password string or a pointer to the password
string otherwise.
<H3>Example</H3>
<PRE>
#include &lt;cups/cups.h&gt;
const char *
my_password_cb(const char *prompt)
{
return (getpass(prompt));
}
...
char *password;
...
cupsSetPasswordCB(my_password_cb);
password = cupsGetPassword("Please enter a password:");
</PRE>
<H3>See Also</H3>
<P>
<A HREF="#cupsServer">cupsServer()</A>,
<A HREF="#cupsSetServer">cupsSetServer()</A>,
<A HREF="#cupsSetUser">cupsSetUser()</A>,
<A HREF="#cupsUser()">cupsUser()</A>
<!-- NEW PAGE --><H2><A NAME="cupsSetServer">cupsSetServer()</A></H2>
<H3>Usage</H3>
<PRE>
void
cupsSetServer(const char *server);
</PRE>
<H3>Arguments</H3>
<CENTER><TABLE WIDTH="80%" BORDER>
<TR>
<TH>Argument</TH>
<TH>Description</TH>
</TR>
<TR>
<TD>server</TD>
<TD>The default server to use.</TD>
</TR>
</TABLE></CENTER>
<H3>Description</H3>
<P><CODE>cupsSetServer()</CODE> sets the default server to use for
the CUPS API. If the <CODE>server</CODE> argument is <CODE>NULL</CODE>,
the default server is used.
<H3>Example</H3>
<PRE>
#include &lt;cups/cups.h&gt;
cupsSetServer("foo.bar.com");
</PRE>
<H3>See Also</H3>
<P>
<A HREF="#cupsServer">cupsServer()</A>,
<A HREF="#cupsSetPasswordCB">cupsSetPasswordCB()</A>,
<A HREF="#cupsSetUser">cupsSetUser()</A>,
<A HREF="#cupsUser()">cupsUser()</A>
<!-- NEW PAGE --><H2><A NAME="cupsSetUser">cupsSetUser()</A></H2>
<H3>Usage</H3>
<PRE>
void
cupsSetUser(const char *user);
</PRE>
<H3>Arguments</H3>
<CENTER><TABLE WIDTH="80%" BORDER>
<TR>
<TH>Argument</TH>
<TH>Description</TH>
</TR>
<TR>
<TD>user</TD>
<TD>The user name string to use.</TD>
</TR>
</TABLE></CENTER>
<H3>Description</H3>
<P><CODE>cupsSetUser()</CODE> sets the default user name for authentication.
If the <CODE>user</CODE> argument is <CODE>NULL</CODE> then the current
login user is used.
<H3>Example</H3>
<PRE>
#include &lt;cups/cups.h&gt;
...
cupsSetUser("root");
</PRE>
<H3>See Also</H3>
<P>
<A HREF="#cupsServer">cupsServer()</A>,
<A HREF="#cupsSetPasswordCB">cupsSetPasswordCB()</A>,
<A HREF="#cupsSetServer">cupsSetServer()</A>,
<A HREF="#cupsUser()">cupsUser()</A>
<!-- NEW PAGE --><H2><A NAME="cupsTempFile">cupsTempFile()</A></H2>
<H3>Usage</H3>
@@ -7261,8 +7047,7 @@ http = httpConnect(cupsServer(), ippPort());
<H3>See Also</H3>
<A HREF="#cupsServer"><CODE>cupsServer()</CODE></A>,
<A HREF="#ippSetPort"><CODE>ippSetPort()</CODE></A>
<A HREF="#cupsServer"><CODE>cupsServer()</CODE></A>
<!-- NEW PAGE --><H2><A NAME="ippRead">ippRead()</A></H2>
@@ -7327,49 +7112,6 @@ if (status == IPP_DATA)
<A HREF="#ippWrite"><CODE>ippWrite()</CODE></A>
<!-- NEW PAGE --><H2><A NAME="ippSetPort">ippSetPort()</A></H2>
<H3>Usage</H3>
<PRE>
void
ippSetPort(int port);
</PRE>
<H3>Arguments</H3>
<CENTER><TABLE WIDTH="80%" BORDER>
<TR>
<TH>Argument</TH>
<TH>Description</TH>
</TR>
<TR>
<TD>port</TD>
<TD>The port number to use</TD>
</TR>
</TABLE></CENTER>
<H3>Description</H3>
<P>The <CODE>ippSetPort()</CODE> function sets the default IPP port number
for requests.
<H3>Example</H3>
<PRE>
#include &lt;cups/http.h>
#include &lt;cups/ipp.h>
...
ippSetPort(8631);
</PRE>
<H3>See Also</H3>
<A HREF="#ippPort"><CODE>ippPort()</CODE></A>
<!-- NEW PAGE --><H2><A NAME="ippTimeToDate">ippTimeToDate()</A></H2>
<H3>Usage</H3>
-297
Ver Arquivo
@@ -1,297 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE> CUPS Software Performance Specification</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SPS-1.1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<STYLE>
BODY { font-family: serif; font-size: 11.0pt }
H1 { font-family: sans-serif; font-size: 20.0pt }
H2 { font-family: sans-serif; font-size: 17.0pt }
H3 { font-family: sans-serif; font-size: 14.0pt }
H4 { font-family: sans-serif; font-size: 11.0pt }
H5 { font-family: sans-serif; font-size: 9.0pt }
H6 { font-family: sans-serif; font-size: 8.0pt }
SUB { font-size: 8.0pt }
SUP { font-size: 8.0pt }
PRE { font-size: 9.0pt }
</STYLE>
</HEAD>
<BODY>
<CENTER><A HREF="#CONTENTS"><IMG SRC="images/cups-large.gif" BORDER="0" WIDTH="100%"><BR>
<H1> CUPS Software Performance Specification</H1></A><BR>
CUPS-SPS-1.1<BR>
Easy Software Products<BR>
Copyright 1997-2000, All Rights Reserved<BR>
</CENTER>
<HR>
<H1 ALIGN="CENTER"><A NAME="CONTENTS">Table of Contents</A></H1>
<BR>
<BR><B><A HREF="#1">1 Scope</A></B>
<UL>
<LI><A HREF="#1_1">1.1 Identification</A></LI>
<LI><A HREF="#1_2">1.2 System Overview</A></LI>
<LI><A HREF="#1_3">1.3 Document Overview</A></LI>
</UL>
<B><A HREF="#2">2 References</A></B>
<UL>
<LI><A HREF="#2_1">2.1 CUPS Documentation</A></LI>
<LI><A HREF="#2_2">2.2 Other Documents</A></LI>
</UL>
<B><A HREF="#3">3 Programs</A></B>
<BR>
<BR><B><A HREF="#4">4 Scheduler Objects</A></B>
<BR>
<BR><B><A HREF="#5">A Glossary</A></B>
<UL>
<LI><A HREF="#5_1">A.1 Terms</A></LI>
<LI><A HREF="#5_2">A.2 Acronyms</A></LI>
</UL>
<HR>
<H1><A NAME="1">1 Scope</A></H1>
<H2><A NAME="1_1">1.1 Identification</A></H2>
<P>This software performance specification provides an analysis of the
memory, disk, and processor utilitization of each program in the Common
UNIX Printing System (&quot;CUPS&quot;) Version 1.1.</P>
<P>For the purposes of comparison, all figures are for the Linux Intel
platform. Memory utilization on other platforms should be similar. </P>
<H2><A NAME="1_2">1.2 System Overview</A></H2>
<P>CUPS provides a portable printing layer for UNIX&reg;-based operating
systems. It has been developed by <A HREF="http://www.easysw.com">Easy
Software Products</A> to promote a standard printing solution for all
UNIX vendors and users. CUPS provides the System V and Berkeley
command-line interfaces. </P>
<P>CUPS uses the Internet Printing Protocol (&quot;IPP&quot;) as the basis for
managing print jobs and queues. The Line Printer Daemon (&quot;LPD&quot;) Server
Message Block (&quot;SMB&quot;), and AppSocket (a.k.a. JetDirect) protocols are
also supported with reduced functionality. CUPS adds network printer
browsing and PostScript Printer Description (&quot;PPD&quot;) based printing
options to support real-world printing under UNIX. </P>
<P>CUPS also includes a customized version of GNU Ghostscript
(currently based off GNU Ghostscript 5.50) and an image file RIP that
are used to support non-PostScript printers. Sample drivers for HP and
EPSON printers are included that use these filters. </P>
<H2><A NAME="1_3">1.3 Document Overview</A></H2>
<P>This software performance specification is organized into the
following sections:</P>
<UL>
<LI>1 - Scope</LI>
<LI>2 - References</LI>
<LI>3 - Programs</LI>
<LI>4 - Scheduler Objects</LI>
<LI>A - Glossary</LI>
</UL>
<H1><A NAME="2">2 References</A></H1>
<H2><A NAME="2_1">2.1 CUPS Documentation</A></H2>
<P>The following CUPS documentation is referenced by this document: </P>
<UL>
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
<LI>CUPS-IPP-1.1: CUPS Implementation of IPP </LI>
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
<LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
<LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
<LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
<LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
</UL>
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
<P>The following non-CUPS documents are referenced by this document: </P>
<UL>
<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
Adobe PostScript Printer Description File Format Specification,
Version 4.3.</A></LI>
<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf">
Adobe PostScript Language Reference, Third Edition.</A></LI>
<LI>IPP: Job and Printer Set Operations </LI>
<LI>IPP/1.1: Encoding and Transport </LI>
<LI>IPP/1.1: Implementers Guide </LI>
<LI>IPP/1.1: Model and Semantics </LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179, Line
Printer Daemon Protocol</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt">RFC 2567, Design
Goals for an Internet Printing Protocol</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt">RFC 2568, Rationale
for the Structure of the Model and Protocol</A> for the Internet
Printing Protocol</LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt">RFC 2569, Mapping
between LPD and IPP Protocols</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616, Hypertext
Transfer Protocol -- HTTP/1.1</A></LI>
<LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617, HTTP
Authentication: Basic and Digest Access</A> Authentication </LI>
</UL>
<H1><A NAME="3">3 Programs</A></H1>
<P>The following table describes the average memory, disk, and CPU
usage of each program in CUPS. </P>
<P>The base memory column shows the initial memory requirements for
each program, including any shared libraries that are provided by CUPS. </P>
<P>The max memory column shows the maximum amount of memory that will
be used by the program based upon the default configuration settings
supplied with CUPS. </P>
<P>The temp files column indicates whether any temporary files are
created. </P>
<P>The CPU usage column specifies a relative CPU usage by the program
under normal conditions, either low, medium, or high. Low usage
indicates that the program will never use more than 33% of the
available CPU time. Medium usage indicates the program will use as much
as 66% of the available CPU time. High usage indicates the program uses
66% or more of the available CPU time.
<CENTER>
<TABLE BORDER="1" WIDTH="80%">
<TR><TH COLSPAN="3">Backends</TH></TR>
<TR><TH>Program</TH><TH>Base Memory</TH><TH>Max Memory</TH><TH>Temp
Files</TH><TH>CPU Usage</TH></TR>
<TR><TD>ipp</TD><TD>91k</TD><TD>256k</TD><TD>Up to size of print file</TD><TD>
Low</TD></TR>
<TR><TD>lpd</TD><TD>89k</TD><TD>89k</TD><TD>Up to size of print file</TD><TD>
Low</TD></TR>
<TR><TD>parallel</TD><TD>85k</TD><TD>85k</TD><TD>Up to size of print
file</TD><TD>Low</TD></TR>
<TR><TD>serial</TD><TD>85k</TD><TD>85k</TD><TD>Up to size of print file</TD><TD>
Low</TD></TR>
<TR><TD>socket</TD><TD>85k</TD><TD>85k</TD><TD>Up to size of print file</TD><TD>
Low</TD></TR>
<TR><TD>usb</TD><TD>85k</TD><TD>85k</TD><TD>Up to size of print file</TD><TD>
Low</TD></TR>
<TR><TH COLSPAN="3">CGIs</TH></TR>
<TR><TH>Program</TH><TH>Base Memory</TH><TH>Max Memory</TH><TH>Temp
Files</TH><TH>CPU Usage</TH></TR>
<TR><TD>admin.cgi</TD><TD>107k</TD><TD>256k</TD><TD>Up to size of PPD
file</TD><TD>Medium</TD></TR>
<TR><TD>classes.cgi</TD><TD>95k</TD><TD>Size of class objects</TD><TD>
None</TD><TD>Medium</TD></TR>
<TR><TD>jobs.cgi</TD><TD>93k</TD><TD>Size of job objects</TD><TD>None</TD><TD>
Medium</TD></TR>
<TR><TD>printers.cgi</TD><TD>95k</TD><TD>Size of printer objects</TD><TD>
None</TD><TD>Medium</TD></TR>
<TR><TH COLSPAN="3">Command-Line Programs</TH></TR>
<TR><TH>Program</TH><TH>Base Memory</TH><TH>Max Memory</TH><TH>Temp
Files</TH><TH>CPU Usage</TH></TR>
<TR><TD>accept</TD><TD>88k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>cancel</TD><TD>88k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>disable</TD><TD>88k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>enable</TD><TD>88k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lp</TD><TD>90k</TD><TD>256k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lpadmin</TD><TD>148k</TD><TD>256k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lpc</TD><TD>86k</TD><TD>Size of job and printer objects</TD><TD>
None</TD><TD>Medium</TD></TR>
<TR><TD>lpinfo</TD><TD>89k</TD><TD>Size of device and PPD objects</TD><TD>
None</TD><TD>Medium</TD></TR>
<TR><TD>lpmove</TD><TD>88k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lpoptions</TD><TD>89k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lppasswd</TD><TD>90k</TD><TD>90k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lpq</TD><TD>87k</TD><TD>Size of job objects</TD><TD>None</TD><TD>
Medium</TD></TR>
<TR><TD>lpr</TD><TD>87k</TD><TD>256k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lprm</TD><TD>84k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>lpstat</TD><TD>119k</TD><TD>Size of job, printer, and class
objects</TD><TD>None</TD><TD>Medium</TD></TR>
<TR><TD>reject</TD><TD>88k</TD><TD>128k</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TH COLSPAN="3">Daemons</TH></TR>
<TR><TH>Program</TH><TH>Base Memory</TH><TH>Max Memory</TH><TH>Temp
Files</TH><TH>CPU Usage</TH></TR>
<TR><TD>cups-lpd</TD><TD>92k</TD><TD>256k</TD><TD>One file per control
or data file from client</TD><TD>Low</TD></TR>
<TR><TD>cupsd</TD><TD>308k</TD><TD>See Scheduler Requirements</TD><TD>
See Scheduler Requirements</TD><TD>Medium</TD></TR>
<TR><TD>cups-polld</TD><TD>84k</TD><TD>Size of printer and class objects</TD><TD>
None</TD><TD>Low</TD></TR>
<TR><TH COLSPAN="3">Filters</TH></TR>
<TR><TH>Program</TH><TH>Base Memory</TH><TH>Max Memory</TH><TH>Temp
Files</TH><TH>CPU Usage</TH></TR>
<TR><TD>hpgltops</TD><TD>263k</TD><TD>320k</TD><TD>None</TD><TD>Medium</TD>
</TR>
<TR><TD>imagetops</TD><TD>628k</TD><TD>10M</TD><TD>Swap file for
uncompressed image data</TD><TD>Medium</TD></TR>
<TR><TD>imagetoraster</TD><TD>652k</TD><TD>10M</TD><TD>Swap file for
uncompressed image data</TD><TD>High</TD></TR>
<TR><TD>pstops</TD><TD>775k</TD><TD>840k</TD><TD>Up to size of print
file</TD><TD>Medium</TD></TR>
<TR><TD>pstoraster</TD><TD>4M</TD><TD>14M</TD><TD>Swap file for command
lists</TD><TD>High</TD></TR>
<TR><TD>rastertoepson</TD><TD>693k</TD><TD>1M</TD><TD>None</TD><TD>Low</TD>
</TR>
<TR><TD>rastertohp</TD><TD>690k</TD><TD>1M</TD><TD>None</TD><TD>Low</TD></TR>
<TR><TD>texttops</TD><TD>638k</TD><TD>4*cols*rows</TD><TD>None</TD><TD>
Low</TD></TR>
</TABLE>
</CENTER>
</P>
<H1><A NAME="4">4 Scheduler Objects</A></H1>
<P>The <CODE>cupsd</CODE> program is the CUPS scheduler process. It
manages many interdependent server objects that are used to manage and
print files to printers. </P>
<P>The following table provides the memory and disk cost associated
with each server object.
<CENTER>
<TABLE BORDER="1" WIDTH="80%">
<TR><TH>Object</TH><TH>Memory Per</TH><TH>Disk Per</TH></TR>
<TR><TD>Browse ACL</TD><TD>1k</TD><TD>120</TD></TR>
<TR><TD>Browse Poll</TD><TD>24</TD><TD>80</TD></TR>
<TR><TD>Browse Relay</TD><TD>28</TD><TD>80</TD></TR>
<TR><TD>Certificate</TD><TD>76</TD><TD>32</TD></TR>
<TR><TD>Class</TD><TD>9k</TD><TD>200</TD></TR>
<TR><TD>Client</TD><TD>13k</TD><TD>-</TD></TR>
<TR><TD>Device</TD><TD>256</TD><TD>-</TD></TR>
<TR><TD>Job</TD><TD>2k</TD><TD>1k + size of document files</TD></TR>
<TR><TD>Location ACL</TD><TD>1k</TD><TD>120</TD></TR>
<TR><TD>MIME Filter</TD><TD>268</TD><TD>80</TD></TR>
<TR><TD>MIME Type</TD><TD>340</TD><TD>80</TD></TR>
<TR><TD>PPD</TD><TD>200</TD><TD>656</TD></TR>
<TR><TD>Printer</TD><TD>11k</TD><TD>32k</TD></TR>
</TABLE>
</CENTER>
</P>
<H1 TYPE="A" VALUE="1"><A NAME="5">A Glossary</A></H1>
<H2><A NAME="5_1">A.1 Terms</A></H2>
<DL>
<DT>C </DT>
<DD>A computer language. </DD>
<DT>parallel </DT>
<DD>Sending or receiving data more than 1 bit at a time. </DD>
<DT>pipe </DT>
<DD>A one-way communications channel between two programs. </DD>
<DT>serial </DT>
<DD>Sending or receiving data 1 bit at a time. </DD>
<DT>socket </DT>
<DD>A two-way network communications channel. </DD>
</DL>
<H2><A NAME="5_2">A.2 Acronyms</A></H2>
<DL>
<DT>ASCII </DT>
<DD>American Standard Code for Information Interchange </DD>
<DT>CUPS </DT>
<DD>Common UNIX Printing System </DD>
<DT>ESC/P </DT>
<DD>EPSON Standard Code for Printers </DD>
<DT>FTP </DT>
<DD>File Transfer Protocol </DD>
<DT>HP-GL </DT>
<DD>Hewlett-Packard Graphics Language </DD>
<DT>HP-PCL </DT>
<DD>Hewlett-Packard Page Control Language </DD>
<DT>HP-PJL </DT>
<DD>Hewlett-Packard Printer Job Language </DD>
<DT>IETF </DT>
<DD>Internet Engineering Task Force </DD>
<DT>IPP </DT>
<DD>Internet Printing Protocol </DD>
<DT>ISO </DT>
<DD>International Standards Organization </DD>
<DT>LPD </DT>
<DD>Line Printer Daemon </DD>
<DT>MIME </DT>
<DD>Multimedia Internet Mail Exchange </DD>
<DT>PPD </DT>
<DD>PostScript Printer Description </DD>
<DT>SMB </DT>
<DD>Server Message Block </DD>
<DT>TFTP </DT>
<DD>Trivial File Transfer Protocol </DD>
</DL>
</BODY>
</HTML>
BIN
Ver Arquivo
Arquivo binário não exibido.
-457
Ver Arquivo
@@ -1,457 +0,0 @@
<HTML>
<HEAD>
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SPS-1.1">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>CUPS Software Performance Specification</TITLE>
</HEAD>
<BODY>
<H1>Scope</H1>
<H2>Identification</H2>
<P>This software performance specification provides an analysis of the
memory, disk, and processor utilitization of each program in the
Common UNIX Printing System ("CUPS") Version 1.1.</P>
<P>For the purposes of comparison, all figures are for the Linux Intel
platform. Memory utilization on other platforms should be similar.
<EMBED SRC="system-overview.shtml">
<H2>Document Overview</H2>
<P>This software performance specification is organized into the
following sections:</P>
<UL>
<LI>1 - Scope</LI>
<LI>2 - References</LI>
<LI>3 - Programs</LI>
<LI>4 - Scheduler Objects</LI>
<LI>A - Glossary</LI>
</UL>
<EMBED SRC="references.shtml">
<H1>Programs</H1>
<P>The following table describes the average memory, disk, and CPU usage of
each program in CUPS.
<P>The base memory column shows the initial memory requirements for each
program, including any shared libraries that are provided by CUPS.
<P>The max memory column shows the maximum amount of memory that will be
used by the program based upon the default configuration settings supplied
with CUPS.
<P>The temp files column indicates whether any temporary files are created.
<P>The CPU usage column specifies a relative CPU usage by the program under
normal conditions, either low, medium, or high. Low usage indicates that
the program will never use more than 33% of the available CPU time. Medium
usage indicates the program will use as much as 66% of the available CPU
time. High usage indicates the program uses 66% or more of the available CPU
time.
<CENTER><TABLE WIDTH="80%" BORDER="1">
<TR>
<TH COLSPAN="3">Backends</TH>
</TR>
<TR>
<TH>Program</TH>
<TH>Base Memory</TH>
<TH>Max Memory</TH>
<TH>Temp Files</TH>
<TH>CPU Usage</TH>
</TR>
<TR>
<TD>ipp</TD>
<TD>91k</TD>
<TD>256k</TD>
<TD>Up to size of print file</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lpd</TD>
<TD>89k</TD>
<TD>89k</TD>
<TD>Up to size of print file</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>parallel</TD>
<TD>85k</TD>
<TD>85k</TD>
<TD>Up to size of print file</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>serial</TD>
<TD>85k</TD>
<TD>85k</TD>
<TD>Up to size of print file</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>socket</TD>
<TD>85k</TD>
<TD>85k</TD>
<TD>Up to size of print file</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>usb</TD>
<TD>85k</TD>
<TD>85k</TD>
<TD>Up to size of print file</TD>
<TD>Low</TD>
</TR>
<TR>
<TH COLSPAN="3">CGIs</TH>
</TR>
<TR>
<TH>Program</TH>
<TH>Base Memory</TH>
<TH>Max Memory</TH>
<TH>Temp Files</TH>
<TH>CPU Usage</TH>
</TR>
<TR>
<TD>admin.cgi</TD>
<TD>107k</TD>
<TD>256k</TD>
<TD>Up to size of PPD file</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>classes.cgi</TD>
<TD>95k</TD>
<TD>Size of class objects</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>jobs.cgi</TD>
<TD>93k</TD>
<TD>Size of job objects</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>printers.cgi</TD>
<TD>95k</TD>
<TD>Size of printer objects</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TH COLSPAN="3">Command-Line Programs</TH>
</TR>
<TR>
<TH>Program</TH>
<TH>Base Memory</TH>
<TH>Max Memory</TH>
<TH>Temp Files</TH>
<TH>CPU Usage</TH>
</TR>
<TR>
<TD>accept</TD>
<TD>88k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>cancel</TD>
<TD>88k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>disable</TD>
<TD>88k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>enable</TD>
<TD>88k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lp</TD>
<TD>90k</TD>
<TD>256k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lpadmin</TD>
<TD>148k</TD>
<TD>256k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lpc</TD>
<TD>86k</TD>
<TD>Size of job and printer objects</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>lpinfo</TD>
<TD>89k</TD>
<TD>Size of device and PPD objects</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>lpmove</TD>
<TD>88k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lpoptions</TD>
<TD>89k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lppasswd</TD>
<TD>90k</TD>
<TD>90k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lpq</TD>
<TD>87k</TD>
<TD>Size of job objects</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>lpr</TD>
<TD>87k</TD>
<TD>256k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lprm</TD>
<TD>84k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>lpstat</TD>
<TD>119k</TD>
<TD>Size of job, printer, and class objects</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>reject</TD>
<TD>88k</TD>
<TD>128k</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TH COLSPAN="3">Daemons</TH>
</TR>
<TR>
<TH>Program</TH>
<TH>Base Memory</TH>
<TH>Max Memory</TH>
<TH>Temp Files</TH>
<TH>CPU Usage</TH>
</TR>
<TR>
<TD>cups-lpd</TD>
<TD>92k</TD>
<TD>256k</TD>
<TD>One file per control or data file from client</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>cupsd</TD>
<TD>308k</TD>
<TD>See Scheduler Requirements</TD>
<TD>See Scheduler Requirements</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>cups-polld</TD>
<TD>84k</TD>
<TD>Size of printer and class objects</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TH COLSPAN="3">Filters</TH>
</TR>
<TR>
<TH>Program</TH>
<TH>Base Memory</TH>
<TH>Max Memory</TH>
<TH>Temp Files</TH>
<TH>CPU Usage</TH>
</TR>
<TR>
<TD>hpgltops</TD>
<TD>263k</TD>
<TD>320k</TD>
<TD>None</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>imagetops</TD>
<TD>628k</TD>
<TD>10M</TD>
<TD>Swap file for uncompressed image data</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>imagetoraster</TD>
<TD>652k</TD>
<TD>10M</TD>
<TD>Swap file for uncompressed image data</TD>
<TD>High</TD>
</TR>
<TR>
<TD>pstops</TD>
<TD>775k</TD>
<TD>840k</TD>
<TD>Up to size of print file</TD>
<TD>Medium</TD>
</TR>
<TR>
<TD>pstoraster</TD>
<TD>4M</TD>
<TD>14M</TD>
<TD>Swap file for command lists</TD>
<TD>High</TD>
</TR>
<TR>
<TD>rastertoepson</TD>
<TD>693k</TD>
<TD>1M</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>rastertohp</TD>
<TD>690k</TD>
<TD>1M</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
<TR>
<TD>texttops</TD>
<TD>638k</TD>
<TD>4*cols*rows</TD>
<TD>None</TD>
<TD>Low</TD>
</TR>
</TABLE></CENTER>
<H1>Scheduler Objects</H1>
<P>The <CODE>cupsd</CODE> program is the CUPS scheduler process. It manages
many interdependent server objects that are used to manage and print files
to printers.
<P>The following table provides the memory and disk cost associated with each
server object.
<CENTER><TABLE WIDTH="80%" BORDER="1">
<TR>
<TH>Object</TH>
<TH>Memory Per</TH>
<TH>Disk Per</TH>
</TR>
<TR>
<TD>Browse ACL</TD>
<TD>1k</TD>
<TD>120</TD>
</TR>
<TR>
<TD>Browse Poll</TD>
<TD>24</TD>
<TD>80</TD>
</TR>
<TR>
<TD>Browse Relay</TD>
<TD>28</TD>
<TD>80</TD>
</TR>
<TR>
<TD>Certificate</TD>
<TD>76</TD>
<TD>32</TD>
</TR>
<TR>
<TD>Class</TD>
<TD>9k</TD>
<TD>200</TD>
</TR>
<TR>
<TD>Client</TD>
<TD>13k</TD>
<TD>-</TD>
</TR>
<TR>
<TD>Device</TD>
<TD>256</TD>
<TD>-</TD>
</TR>
<TR>
<TD>Job</TD>
<TD>2k</TD>
<TD>1k + size of document files</TD>
</TR>
<TR>
<TD>Location ACL</TD>
<TD>1k</TD>
<TD>120</TD>
</TR>
<TR>
<TD>MIME Filter</TD>
<TD>268</TD>
<TD>80</TD>
</TR>
<TR>
<TD>MIME Type</TD>
<TD>340</TD>
<TD>80</TD>
</TR>
<TR>
<TD>PPD</TD>
<TD>200</TD>
<TD>656</TD>
</TR>
<TR>
<TD>Printer</TD>
<TD>11k</TD>
<TD>32k</TD>
</TR>
</TABLE></CENTER>
<EMBED SRC="glossary.shtml">
</BODY>
</HTML>
+2 -2
Ver Arquivo
@@ -92,14 +92,14 @@ sections:</P>
<UL>
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
<LI>CUPS-IPP-1.1: CUPS Implementation of IPP </LI>
<LI>CUPS-IPP-1.1: CUPS Implmentation of IPP </LI>
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
<LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
<LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
<LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
<LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
<LI>CUPS-SVD-1.1.x: CUPS Software Version Description </LI>
</UL>
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
<P>The following non-CUPS documents are referenced by this document: </P>
BIN
Ver Arquivo
Arquivo binário não exibido.
+2 -2
Ver Arquivo
@@ -86,14 +86,14 @@ EPSON printers are included that use these filters. </P>
<UL>
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
<LI>CUPS-IPP-1.1: CUPS Implementation of IPP </LI>
<LI>CUPS-IPP-1.1: CUPS Implmentation of IPP </LI>
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
<LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
<LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
<LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
<LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
<LI>CUPS-SVD-1.1.x: CUPS Software Version Description </LI>
</UL>
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
<P>The following non-CUPS documents are referenced by this document: </P>
BIN
Ver Arquivo
Arquivo binário não exibido.
+3 -3
Ver Arquivo
@@ -4,7 +4,7 @@
<TITLE> CUPS Software Users Manual</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.1.3">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<STYLE>
BODY { font-family: serif; font-size: 11.0pt }
@@ -22,7 +22,7 @@ PRE { font-size: 9.0pt }
<BODY BGCOLOR="#ffffff">
<CENTER><A HREF="#CONTENTS"><IMG SRC="images/cups-large.gif" BORDER="0" WIDTH="100%"><BR>
<H1> CUPS Software Users Manual</H1></A><BR>
CUPS-SUM-1.1.3<BR>
CUPS-SUM-1.1<BR>
Easy Software Products<BR>
Copyright 1997-2000, All Rights Reserved<BR>
</CENTER>
@@ -125,7 +125,7 @@ Copyright 1997-2000, All Rights Reserved<BR>
<HR>
<H1 ALIGN="RIGHT"><A NAME="1">Preface</A></H1>
<P>This software users manual describes how to use the Common UNIX
Printing System<SUP>TM</SUP> (&quot;CUPS<SUP>TM</SUP>&quot;) Version 1.1.3. </P>
Printing System<SUP>TM</SUP> (&quot;CUPS<SUP>TM</SUP>&quot;) Version 1.1. </P>
<H2><A NAME="1_1">System Overview</A></H2>
<P>CUPS provides a portable printing layer for UNIX&reg;-based operating
systems. It has been developed by <A HREF="http://www.easysw.com">Easy
+205 -207
Ver Arquivo
@@ -1,6 +1,6 @@
%PDF-1.2
%âãÏÓ
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000824182337Z)/Title( CUPS Software Users Manual)/Author(Easy Software Products)>>endobj
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000710174143Z)/Title( CUPS Software Users Manual)/Author(Easy Software Products)>>endobj
2 0 obj<</Type/Encoding/Differences[ 32/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 128/Euro 130/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE 145/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe 159/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]>>endobj
3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier-Bold/Encoding 2 0 R>>endobj
@@ -343,13 +343,10 @@ h)
Wuáiè†X!dr¸Ñ˜ÄjøCýsȵèÝJ´§•¸rŽlH[âã‹:\…’K\[°'¢@Ø¢C­€]Ÿ«VrU×Ê=öEèà£ÃDïû¯´ùÖÕÌŸêsí¯#èùVž«áxåÛ-â;^WÈ\OÌɱonn0¾d=äª\ÝT”‚lˆ{ó€¼0ÚT¹WWojò$ ð\{–l lbÕ¹.¶*qeÝKž„‰×ñÒáÊY²Ñ˜×Ó{Šyq—KΈÚ{ÈhzªX¯üPy8Å:F—« »òúh9ÔNþnï5ùÒ*¹Ä€+“,¯ñª è¨Wo'ÍéŧñýGH©\SßËy°†ÇeŽæãvQ°2Ÿ,+çEQÁse¼(*t.a#‡s5–r*WÍçª>š^¸
vt6מÍ•4™¿peM/\œ¥ùp‰'óg®úÃÉ<–kÎ-‡Í‹ó·•Ü:\[æ»uîªßFwÒ²ßmµwpœOm›.Ò,²Î-ï\·u›þà,•\×FÍÕI¿\¹r¶ûRãkT§×ćk¥äjÔûËÛ}©4fÜkbÄኔ\¹zß¿h£¶W]nj¯‰;×NÁU
UPn9Ár­4áËNÅ•r¸RW6|ŒŽ¹Î«Ëë51áp%C®wшﲫÝÊ-§h®š+Vqõó¡¸g¯r~ô'/ÙÅlp\ëQ®Ó¿^òHjÁZv,¥Šk£tEr<Џ¨ëdÞ7ÛnlÌ\—᯻?"éx@·‰+×à¢Zr—Ûj{‡àꤥÈ]|Ëíé71âp
.7.y<€
£®[‘"K~­lâŽÃÕ¿(—óM
-áðì8—Ðpz®”ÃÕ¿¨7RNf™*Œj1\·Ùÿj®˜ÃÕ»¨ðTà¹b\Šã|f.ÅEußÁnßÊ#`ÂÃÄžk¨Šã|f.ÝÀT5_ŽÜp
×^­óŠã|®áE…ÒÁ&ŒJ[=Ì®9·r‡Çù\Ër¥#Bq­Q\µÚÕš8JqœÁ5¼HËU;â*”ñÆË- é5qxœÁ5¼(S:"×Ã%¢"ÎSÇù0\ƒ‹´\?Œê´áò;ô¼RqœÃ5¸¨[ývGסµœm”MçÃp
.7.y<€
£®[‘"K~­lâŽÃÕ¿(—óM
-áðì8—Ðpz®”ÃÕ¿¨7RNf™*Œj1\·Ùÿj®˜ÃÕ»¨ðTà¹b\Šã|f.ÅEußÁnßÊ#`ÂÃÄžk¨Šã|f.ÝÀT5_ŽÜp
E2þW=/WÁá’.ªn»Ê·EÞÙ¹j—t‘è¶²¾Æ6ÓJ\‚Ã%_”ßö¿ž#Wé“«{œÍ%_T
×^­óŠã|®áE…ÒÁ&ŒJ[=Ì®9·r‡Çù\Ër¥#Bq­Q\µÚÕš8JqœÁ5¼HËU;â*”ñÆË- é5qxœÁ5¼(S:"×Ã%¢"ÎSÇù0\ƒ‹´\?Œê´áò;ô¼RqœÃ5¸¨[ývGסµœm”MçÃp
.Òr?ŒjÕ£YU4ñ"Ú4®þE\-š+Uý6.5MìçCqõ/Òr¹ê^,ÕMìçCqõ/Òríùáa«68Íòþ ‰ýã|(®þEY/MõÊ•;ãŠK
W'T•šØ;·ãê]ÄçJ\ñ®óÛ‹_¾,{lÔMìçÃqõ.Ê;Š-qen¸:ù‡Ýxã¼ì‘ª›Ø;·ãê]4ˆ£*,WÚâæ)­Š«ó~(EO¢Må’/Ú÷#¢âÂùåªÇ¸äã|H.ÅÀn÷X®µW£‹ç¯AeNä’/ªúC%;s Ï\BsŠCqœÉ%_T÷$[DX®W;Ê.é"Ñ Í« ¸—|Q&°üÂeÎ=Üyä’Žóa¹ä‹
E2þW=/WÁá’.ªn»Ê·EÞÙ¹j—t‘è¶²¾Æ6ÓJ\‚Ã%_”ßö¿ž#Wé“«{œÍ%_T
@@ -363,13 +360,14 @@ endobj
%°ß{ZÀ‘›ì ù=Å¡­´e&=@~¯thG„â‚¥Âèo‘ßoXÀQã¸÷}ô•±mç˜Á8lc®Á9æ½Qæ#/Á9°Üè–ã‚s`™±Åš3‡}€²×ÀXcV@éK`3ËÚ¬Þ€ò9°ÊÜX@=€ÀXa6.@l`3°½9êT˜ËÍ" mœ£ „m®gƒú¡€S˜ „A:ઢ©€ìÚ„>G˜ ‡bH}fv_ï\bAB/0Ò
-Vè׋‘Ã]‡+_Ž V˜È+ A,0
-V裥ÈaÜ媗#ˆ(Â
-g€M>kΩj-k€MœdY“½´¬ +ÈcX]>±rz‹€5D'V
œéöÔ1GNÀY™8樼A:©Ôï˜gB©œÇ ÜÏ™.H,8ޏÃtºc
wàÊêd†kÍÁ…Tú‰:,c=càÔ4Æ €?R§é°ŒÖÛNÓaÓ™_‚& :C¢Åqí±`»0ºk…äªé0‘qƒph­ ±÷UKó„ªY.´v†èuâ,øV­!zÕzìÓÝ ¹ð†èQ:j ÖÖãrfØ ¬OKüñÍPË%¢¹-±±’.h­
Ñ“&æV>¬­'BõÊXZ?Þ¹±´°öõ^†˜È,e \<1÷3–½í#×½{&ܸ¥rU¤ÍJÉ\"š LdöܹK0;¸)82i\o\´;¼•Ÿ'–‘P¬.t¬Â^¿¹1p1_uFÃÒÇàd}¡ãNSbé¥
*âƒ-ôéBäpÝåB} Â(»‚Ç¥€VÏP„#C̾:\ÕB")£œ· Å ÙHd.„Ð'TæB,ÝÄ‹u+_†pd8üƒȇ
B8j¤—Â!Gl#´A `1Û¨«>BðÌØå
h)‚¸ú,(ÖCéÑg­¡% ÇÜ ýŽhIÂ1ó3?ú•‚+~€áï€d¼s°=z @KŽy>rs˜y€Õø©bå™H*:sˆ‡–(30Ê&ÐúyÖ9eˆιÈQDs‘ƒ²ÔÄ9£Ò7”AÄžžQéI+Ò@½t>¥Ï)Mª’ζÚ&HšÔ¡9!"li¥åÚ‡kˆ´ål¨vc! »ô™ ±¢g83âžö¼nų¢ †®@žâÌcˆñqCË`3Ĉ9qx@Ë`iˆf(Í4€ó`¦Ÿ¬TÔ‡
-g€M>kΩj-k€MœdY“½´¬ +ÈcX]>±rz‹€5D'V
œéöÔ1GNÀY™8樼A:©Ôï˜gB©œÇ ÜÏ™.H,8ޏÃtºc
wàÊêd†kÍÁ…Tú‰:,c=càÔ4Æ €?R§é°ŒÖÛNÓaÓ™_‚& :C¢Åqí±`»0ºk…äªé0‘qƒph­ ±÷UKó„ªY.´v†èuâ,øV­!zÕzìÓÝ ¹ð†èQ:j ÖÖãrfØ ¬OKüñÍPË%¢¹-±±’.h­
Ñ“&æV>¬­'BõÊXZ?Þ¹±´°öõ^†˜È,e \<1÷3–½í#×½{&ܸ¥rU¤ÍJÉ\"š LdöܹK0;¸)82i\o\´;¼•Ÿ'–‘P¬.t¬Â^¿¹1p1_uFÃÒÇàd}¡ãNSbé¥
—XŒÒ¸°DôÖ!‰kvKÄgиš…X!•kæø—°MäšÕ)¹/T®9½3eû‰Ê5c`OJš#sÍ6Ähi/t®™†1±ŒÁ5Ï#îí2¸fbÔ,%=pÍ`sM®ôT9×ÄÚÁÈdr‰<\)´ášRY©Ã\®éÀx™dl.FÚÏ$ŽËšk¢ÉóÄ×þ9椰áòoŠü,M+.ß`ɧv\~UÑ&Yؒ˧ƒ¶Ê¶åòf—ŒoÍEΡö41qÏåcÚb™®î†Ë½,ÚŸ›pÂÕ
\EiW°/)áøf08Ô&[õ cœFwžÿf<[l2êR6WqÀúßtŽ*OôÛø\+Š¿S;‹añcq€‰‹ÙaQt_zî¬ñ¹‘‘«ˆ¸ÿ¥ó/9k·6\"â—{”56¼OßYqYtØqœ=šÌñ…Ie˜>˜¹l:ìŒöªÿì§Œý¹K.ê4Li¯ƒ~/ÛÌæqµ¶\Mä¦ÜÝo·Û/¯oåe»}È,?mcÍå¢ÃœSþ#†KȵqÀe'‰³tŽ+¼Û9á
®ÃÌK_8.±´îBrvm¦(ˆ=$W›…ÄupÇU/«»Ð\¬•O_ºäj‚áÚ´.¹‚ÑzÜöžKdKÑxw gÑ q!Øý^
—XŒÒ¸°DôÖ!‰kvKÄgиš…X!•kæø—°MäšÕ)¹/T®9½3eû‰Ê5c`OJš#sÍ6Ähi/t®™†1±ŒÁ5Ï#îí2¸fbÔ,%=pÍ`sM®ôT9×ÄÚÁÈdr‰<\)´ášRY©Ã\®éÀx™dl.FÚÏ$ŽËšk¢ÉóÄ×þ9椰áòoŠü,M+.ß`ɧv\~UÑ&Yؒ˧ƒ¶Ê¶åòf—ŒoÍEΡö41qÏåcÚb™®î†Ë½,ÚŸ›pÂÕ
·¶øhß"7\o¶è®Ë’CW+Âé,—\ŽºìþІÆÕŠ'küâª-.¹ø©ÕªGw-qËe‘^HÝž“‹Kæ–ʇìþ‹ë6øà"æÅÇ[ï¹ðÃõV^qÙññýw/·÷Æuê5ƒAÞm_}ÝÛ'ש۞¶wê~z|õy_ß\çŽ;žpØ>ÜËývûøúêý–“pÍPàÿÿÿârõä
@@ -1103,202 +1101,202 @@ xref
0000002025 00000 n
0000002103 00000 n
0000002180 00000 n
0000000220 00000 n
0000001786 00000 n
0000001860 00000 n
0000001939 00000 n
0000002025 00000 n
0000002103 00000 n
0000002180 00000 n
0000002259 00000 n
0000002342 00000 n
0000002419 00000 n
0000002501 00000 n
0000002586 00000 n
0000002645 00000 n
0000002697 00000 n
0000002782 00000 n
0000002834 00000 n
0000002918 00000 n
0000002949 00000 n
0000003053 00000 n
0000003157 00000 n
0000003261 00000 n
0000003365 00000 n
0000003469 00000 n
0000003521 00000 n
0000003626 00000 n
0000003730 00000 n
0000003761 00000 n
0000003812 00000 n
0000003897 00000 n
0000003921 00000 n
0000004026 00000 n
0000004130 00000 n
0000004161 00000 n
0000004217 00000 n
0000004302 00000 n
0000004352 00000 n
0000004437 00000 n
0000004468 00000 n
0000004521 00000 n
0000004606 00000 n
0000004662 00000 n
0000004747 00000 n
0000004806 00000 n
0000004890 00000 n
0000004928 00000 n
0000004980 00000 n
0000005065 00000 n
0000005089 00000 n
0000005193 00000 n
0000005298 00000 n
0000005403 00000 n
0000005508 00000 n
0000005613 00000 n
0000005718 00000 n
0000005822 00000 n
0000005927 00000 n
0000006032 00000 n
0000006137 00000 n
0000006242 00000 n
0000006347 00000 n
0000006452 00000 n
0000006557 00000 n
0000006662 00000 n
0000006766 00000 n
0000006871 00000 n
0000006976 00000 n
0000007081 00000 n
0000007186 00000 n
0000007291 00000 n
0000007396 00000 n
0000007501 00000 n
0000007605 00000 n
0000007710 00000 n
0000007815 00000 n
0000007920 00000 n
0000008025 00000 n
0000008130 00000 n
0000008235 00000 n
0000008340 00000 n
0000008445 00000 n
0000008550 00000 n
0000008655 00000 n
0000008760 00000 n
0000008865 00000 n
0000008970 00000 n
0000009075 00000 n
0000009180 00000 n
0000009285 00000 n
0000009390 00000 n
0000009494 00000 n
0000009597 00000 n
0000009700 00000 n
0000010025 00000 n
0000010130 00000 n
0000010235 00000 n
0000010340 00000 n
0000010444 00000 n
0000010549 00000 n
0000010654 00000 n
0000010760 00000 n
0000010865 00000 n
0000010970 00000 n
0000011075 00000 n
0000011180 00000 n
0000011285 00000 n
0000011390 00000 n
0000011495 00000 n
0000011600 00000 n
0000011705 00000 n
0000011810 00000 n
0000011916 00000 n
0000012022 00000 n
0000012128 00000 n
0000012234 00000 n
0000012339 00000 n
0000012444 00000 n
0000012640 00000 n
0000012674 00000 n
0000012708 00000 n
0000013674 00000 n
0000013723 00000 n
0000013772 00000 n
0000013821 00000 n
0000013870 00000 n
0000013919 00000 n
0000013968 00000 n
0000014017 00000 n
0000014066 00000 n
0000014115 00000 n
0000014164 00000 n
0000014213 00000 n
0000014262 00000 n
0000014311 00000 n
0000014360 00000 n
0000014409 00000 n
0000014458 00000 n
0000014507 00000 n
0000014556 00000 n
0000014605 00000 n
0000014654 00000 n
0000014703 00000 n
0000014752 00000 n
0000014801 00000 n
0000014850 00000 n
0000014899 00000 n
0000014948 00000 n
0000014997 00000 n
0000015046 00000 n
0000015095 00000 n
0000015144 00000 n
0000015193 00000 n
0000015242 00000 n
0000015291 00000 n
0000015340 00000 n
0000015389 00000 n
0000015438 00000 n
0000015487 00000 n
0000015536 00000 n
0000015585 00000 n
0000015634 00000 n
0000015683 00000 n
0000015732 00000 n
0000015781 00000 n
0000015830 00000 n
0000015879 00000 n
0000015928 00000 n
0000015977 00000 n
0000016026 00000 n
0000016075 00000 n
0000016124 00000 n
0000016173 00000 n
0000016222 00000 n
0000016271 00000 n
0000016320 00000 n
0000016369 00000 n
0000016418 00000 n
0000016467 00000 n
0000016516 00000 n
0000016565 00000 n
0000016614 00000 n
0000016663 00000 n
0000016712 00000 n
0000016761 00000 n
0000016810 00000 n
0000016859 00000 n
0000016908 00000 n
0000016957 00000 n
0000017006 00000 n
0000017411 00000 n
0000017565 00000 n
0000023915 00000 n
0000023937 00000 n
0000024032 00000 n
0000024134 00000 n
0000002259 00000 n
0000002342 00000 n
0000002419 00000 n
0000002501 00000 n
0000002586 00000 n
0000002645 00000 n
0000002697 00000 n
0000002782 00000 n
0000002834 00000 n
0000002918 00000 n
0000002949 00000 n
0000003053 00000 n
0000003157 00000 n
0000003261 00000 n
0000003365 00000 n
0000003469 00000 n
0000003521 00000 n
0000003626 00000 n
0000003730 00000 n
0000003761 00000 n
0000003812 00000 n
0000003897 00000 n
0000003921 00000 n
0000004026 00000 n
0000004130 00000 n
0000004161 00000 n
0000004217 00000 n
0000004302 00000 n
0000004352 00000 n
0000004437 00000 n
0000004468 00000 n
0000004521 00000 n
0000004606 00000 n
0000004662 00000 n
0000004747 00000 n
0000004806 00000 n
0000004890 00000 n
0000004928 00000 n
0000004980 00000 n
0000005065 00000 n
0000005089 00000 n
0000005193 00000 n
0000005298 00000 n
0000005403 00000 n
0000005508 00000 n
0000005613 00000 n
0000005718 00000 n
0000005822 00000 n
0000005927 00000 n
0000006032 00000 n
0000006137 00000 n
0000006242 00000 n
0000006347 00000 n
0000006452 00000 n
0000006557 00000 n
0000006662 00000 n
0000006766 00000 n
0000006871 00000 n
0000006976 00000 n
0000007081 00000 n
0000007186 00000 n
0000007291 00000 n
0000007396 00000 n
0000007501 00000 n
0000007605 00000 n
0000007710 00000 n
0000007815 00000 n
0000007920 00000 n
0000008025 00000 n
0000008130 00000 n
0000008235 00000 n
0000008340 00000 n
0000008445 00000 n
0000008550 00000 n
0000008655 00000 n
0000008760 00000 n
0000008865 00000 n
0000008970 00000 n
0000009075 00000 n
0000009180 00000 n
0000009285 00000 n
0000009390 00000 n
0000009494 00000 n
0000009597 00000 n
0000009700 00000 n
0000010025 00000 n
0000010130 00000 n
0000010235 00000 n
0000010340 00000 n
0000010444 00000 n
0000010549 00000 n
0000010654 00000 n
0000010760 00000 n
0000010865 00000 n
0000010970 00000 n
0000011075 00000 n
0000011180 00000 n
0000011285 00000 n
0000011390 00000 n
0000011495 00000 n
0000011600 00000 n
0000011705 00000 n
0000011810 00000 n
0000011916 00000 n
0000012022 00000 n
0000012128 00000 n
0000012234 00000 n
0000012339 00000 n
0000012444 00000 n
0000012640 00000 n
0000012674 00000 n
0000012708 00000 n
0000013674 00000 n
0000013723 00000 n
0000013772 00000 n
0000013821 00000 n
0000013870 00000 n
0000013919 00000 n
0000013968 00000 n
0000014017 00000 n
0000014066 00000 n
0000014115 00000 n
0000014164 00000 n
0000014213 00000 n
0000014262 00000 n
0000014311 00000 n
0000014360 00000 n
0000014409 00000 n
0000014458 00000 n
0000014507 00000 n
0000014556 00000 n
0000014605 00000 n
0000014654 00000 n
0000014703 00000 n
0000014752 00000 n
0000014801 00000 n
0000014850 00000 n
0000014899 00000 n
0000014948 00000 n
0000014997 00000 n
0000015046 00000 n
0000015095 00000 n
0000015144 00000 n
0000015193 00000 n
0000015242 00000 n
0000015291 00000 n
0000015340 00000 n
0000015389 00000 n
0000015438 00000 n
0000015487 00000 n
0000015536 00000 n
0000015585 00000 n
0000015634 00000 n
0000015683 00000 n
0000015732 00000 n
0000015781 00000 n
0000015830 00000 n
0000015879 00000 n
0000015928 00000 n
0000015977 00000 n
0000016026 00000 n
0000016075 00000 n
0000016124 00000 n
0000016173 00000 n
0000016222 00000 n
0000016271 00000 n
0000016320 00000 n
0000016369 00000 n
0000016418 00000 n
0000016467 00000 n
0000016516 00000 n
0000016565 00000 n
0000016614 00000 n
0000016663 00000 n
0000016712 00000 n
0000016761 00000 n
0000016810 00000 n
0000016859 00000 n
0000016908 00000 n
0000016957 00000 n
0000017006 00000 n
0000017411 00000 n
0000017565 00000 n
0000023912 00000 n
0000023934 00000 n
0000024029 00000 n
0000024131 00000 n
0000024151 00000 n
0000024298 00000 n
0000025202 00000 n
0000025223 00000 n
0000025417 00000 n
0000026540 00000 n
0000026562 00000 n
0000026704 00000 n
0000024301 00000 n
0000027130 00000 n
0000027151 00000 n
0000025228 00000 n
0000027265 00000 n
0000027450 00000 n
+2 -2
Ver Arquivo
@@ -2,7 +2,7 @@
<HEAD>
<META NAME="Description" CONTENT="Common UNIX Printing System Software Users Manual">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-2000, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.1.3">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.1">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>CUPS Software Users Manual</TITLE>
</HEAD>
@@ -11,7 +11,7 @@
<H1 ALIGN="RIGHT">Preface</H1>
<P>This software users manual describes how to use the Common UNIX Printing
System<SUP>TM</SUP> ("CUPS<SUP>TM</SUP>") Version 1.1.3.
System<SUP>TM</SUP> ("CUPS<SUP>TM</SUP>") Version 1.1.
<EMBED SRC="system-overview.shtml">
+2 -2
Ver Arquivo
@@ -110,14 +110,14 @@ following sections:</P>
<UL>
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
<LI>CUPS-IPP-1.1: CUPS Implementation of IPP </LI>
<LI>CUPS-IPP-1.1: CUPS Implmentation of IPP </LI>
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
<LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
<LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
<LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
<LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
<LI>CUPS-SVD-1.1.x: CUPS Software Version Description </LI>
</UL>
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
<P>The following non-CUPS documents are referenced by this document: </P>
+66 -66
Ver Arquivo
@@ -1,6 +1,6 @@
%PDF-1.2
%âãÏÓ
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000824182343Z)/Title( CUPS Software Version Description)/Author(Easy Software Products)>>endobj
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000710174146Z)/Title( CUPS Software Version Description)/Author(Easy Software Products)>>endobj
2 0 obj<</Type/Encoding/Differences[ 32/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 128/Euro 130/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE 145/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe 159/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]>>endobj
3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier-Bold/Encoding 2 0 R>>endobj
@@ -229,12 +229,12 @@ endobj
110 0 obj<</Length 111 0 R/Filter/FlateDecode>>stream
xÚ+ä2T0BCc3JÎår
ár
á
äHendstream
endobj
á
äHendstream
endobj
111 0 obj
31
endobj
endobj
112 0 obj<</Type/Page/Parent 105 0 R/Contents 113 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 5 0 R/F8 8 0 R/F9 9 0 R/Fc 10 0 R>>>>/Annots 20 0 R>>endobj
113 0 obj<</Length 114 0 R/Filter/FlateDecode>>stream
xÚµV]s£6}ϯ¸³OÉLMƒ?ú–mêÎn–~‘AØly%ˆÇýõ=’°!NâÍL·ãÆBGºçÜ{tÅ÷3\ü<û4QRž]ÍÏ~ý}J¾Kó 3£ñ„æé¹Gq"6übþÍÌzc;;Žoæf)¯ê<ËV碲Ѐ<¯…úcg¤¡óu®H‰¬Þ2Éé‰K4¥\%2ßÔæ¿Hš{ÑFЧ3$yÁ™â”W™¥ÙŸðê5§kQ–>ÜÍþ¦Hæ P­tp„ô†–]¼S5/iqþáú!Š?,.èk¼—¢|'°¢|j—~ϧœo5öãüÌu\¤M?<ý¸¿¥`ä9
@@ -478,67 +478,67 @@ xref
0000006734 00000 n
0000006839 00000 n
0000006944 00000 n
0000007259 00000 n
0000007364 00000 n
0000007469 00000 n
0000007573 00000 n
0000007678 00000 n
0000007783 00000 n
0000007887 00000 n
0000007992 00000 n
0000008097 00000 n
0000008310 00000 n
0000008342 00000 n
0000008374 00000 n
0000008762 00000 n
0000008810 00000 n
0000008858 00000 n
0000008906 00000 n
0000008954 00000 n
0000009002 00000 n
0000009050 00000 n
0000009098 00000 n
0000009146 00000 n
0000009194 00000 n
0000009242 00000 n
0000009290 00000 n
0000009338 00000 n
0000009386 00000 n
0000009434 00000 n
0000009482 00000 n
0000009530 00000 n
0000009578 00000 n
0000009626 00000 n
0000009674 00000 n
0000009722 00000 n
0000009770 00000 n
0000009818 00000 n
0000009866 00000 n
0000009914 00000 n
0000009963 00000 n
0000010012 00000 n
0000010061 00000 n
0000010110 00000 n
0000010159 00000 n
0000010340 00000 n
0000010492 00000 n
0000016844 00000 n
0000016866 00000 n
0000016961 00000 n
0000017063 00000 n
0000017083 00000 n
0000017238 00000 n
0000018412 00000 n
0000018434 00000 n
0000018547 00000 n
0000018734 00000 n
0000018755 00000 n
0000018910 00000 n
0000020309 00000 n
0000020331 00000 n
0000020444 00000 n
0000007049 00000 n
0000007154 00000 n
0000007259 00000 n
0000007364 00000 n
0000007469 00000 n
0000007573 00000 n
0000007678 00000 n
0000007783 00000 n
0000007887 00000 n
0000007992 00000 n
0000008097 00000 n
0000008310 00000 n
0000008342 00000 n
0000008374 00000 n
0000008762 00000 n
0000008810 00000 n
0000008858 00000 n
0000008906 00000 n
0000008954 00000 n
0000009002 00000 n
0000009050 00000 n
0000009098 00000 n
0000009146 00000 n
0000009194 00000 n
0000009242 00000 n
0000009290 00000 n
0000009338 00000 n
0000009386 00000 n
0000009434 00000 n
0000009482 00000 n
0000009530 00000 n
0000009578 00000 n
0000009626 00000 n
0000009674 00000 n
0000009722 00000 n
0000009770 00000 n
0000009818 00000 n
0000009866 00000 n
0000009914 00000 n
0000009963 00000 n
0000010012 00000 n
0000010061 00000 n
0000010110 00000 n
0000010159 00000 n
0000010340 00000 n
0000010492 00000 n
0000016844 00000 n
0000016866 00000 n
0000016961 00000 n
0000017063 00000 n
0000017083 00000 n
0000017238 00000 n
0000018412 00000 n
0000018434 00000 n
0000018547 00000 n
0000018734 00000 n
0000018755 00000 n
0000018910 00000 n
0000020311 00000 n
0000020333 00000 n
0000020656 00000 n
0000020446 00000 n
0000020637 00000 n
0000021776 00000 n
0000020658 00000 n
0000020807 00000 n
+4 -4
Ver Arquivo
@@ -51,7 +51,7 @@ all: $(TARGETS)
#
clean:
$(RM) $(OBJS) $(TARGETS) $(LIBCUPSIMAGE) `basename $(LIBCUPSIMAGE) .2`
$(RM) $(OBJS) $(TARGETS) $(LIBCUPSIMAGE)
#
@@ -69,10 +69,10 @@ install:
$(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups
-$(MKDIR) $(LIBDIR)
$(CHMOD) ugo+rx $(LIBDIR)
$(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
$(INSTALL_DATA) $(LIBCUPSIMAGE) $(LIBDIR)
-if test $(LIBCUPSIMAGE) != "libcupsimage.a" -a $(LIBCUPSIMAGE) != "libcupsimage.la"; then \
$(RM) `basename $(LIBDIR)/$(LIBCUPSIMAGE) .2`; \
$(LN) $(LIBCUPSIMAGE) `basename $(LIBDIR)/$(LIBCUPSIMAGE) .2`; \
$(RM) `basename $(LIBCUPSIMAGE) .2`; \
$(LN) $(LIBCUPSIMAGE) `basename $(LIBCUPSIMAGE) .2`; \
fi
+4 -4
Ver Arquivo
@@ -153,13 +153,13 @@ SetCommonOptions(int num_options, /* I - Number of options */
PageBottom = (float)atof(val);
break;
case 1 :
PageLeft = (float)atof(val);
PageRight = PageWidth - (float)atof(val);
break;
case 2 :
PageTop = PageLength - (float)atof(val);
break;
case 3 :
PageRight = PageWidth - (float)atof(val);
PageLeft = (float)atof(val);
break;
}
}
@@ -172,13 +172,13 @@ SetCommonOptions(int num_options, /* I - Number of options */
PageTop = PageLength - (float)atof(val);
break;
case 1 :
PageRight = PageWidth - (float)atof(val);
PageLeft = (float)atof(val);
break;
case 2 :
PageBottom = (float)atof(val);
break;
case 3 :
PageLeft = (float)atof(val);
PageRight = PageWidth - (float)atof(val);
break;
}
}
-6
Ver Arquivo
@@ -237,7 +237,6 @@ PC_pen_color(int num_params, /* I - Number of parameters */
{ 0.0, 1.0, 1.0 } /* Cyan */
};
if (num_params == 0)
{
for (i = 0; i <= PenCount; i ++)
@@ -277,11 +276,6 @@ PC_pen_color(int num_params, /* I - Number of parameters */
(ColorRange[1][1] - ColorRange[1][0]);
Pens[i].rgb[2] = (params[3].value.number - ColorRange[2][0]) /
(ColorRange[2][1] - ColorRange[2][0]);
fprintf(stderr, "DEBUG: Pen %d %.0f %.0f %.0f = %.3f %.3f %.3f\n",
i, params[1].value.number, params[2].value.number,
params[3].value.number, Pens[i].rgb[0], Pens[i].rgb[1],
Pens[i].rgb[2]);
}
if (PageDirty && i == PenNumber)
+1 -1
Ver Arquivo
@@ -319,7 +319,7 @@ LB_label(int num_params, /* I - Number of parameters */
Pens[CharPen].rgb[CharPen], Pens[CharPen].rgb[2],
Pens[CharPen].width * PenScaling);
Outputf("%.3f %.3f %.3f %.2f SP\n", Pens[PenNumber].rgb[0],
Pens[PenNumber].rgb[1], Pens[PenNumber].rgb[2],
Pens[PenNumber].rgb[PenNumber], Pens[PenNumber].rgb[2],
Pens[PenNumber].width * PenScaling);
}
+9 -6
Ver Arquivo
@@ -43,8 +43,6 @@
#include "hpgltops.h"
#define max(a,b) ((a) < (b) ? (b) : (a))
/*
* 'update_transform()' - Update the page transformation matrix as needed.
@@ -157,7 +155,12 @@ update_transform(void)
scaling = page_width / height;
if (FitPlot)
scaling *= max(page_width, page_height) / max(PlotSize[1], PlotSize[0]);
{
if (Rotation == 0 || Rotation == 180)
scaling *= page_width / PlotSize[1];
else
scaling *= page_width / PlotSize[0];
}
/*
* Offset for the current P1 location...
@@ -226,9 +229,9 @@ update_transform(void)
if (FitPlot)
{
if (Rotation == 0 || Rotation == 180)
PenScaling = page_width / PlotSize[1];
PenScaling *= page_width / PlotSize[1];
else
PenScaling = page_width / PlotSize[0];
PenScaling *= page_width / PlotSize[0];
}
else
PenScaling = 1.0;
@@ -537,7 +540,7 @@ PS_plot_size(int num_params, /* I - Number of parameters */
* sends a two-argument PS command as documented in the
* HP-GL/2 Reference Manual from HP. Instead, applications
* send the width before the length, which causes all sorts
* of problems when scaling.
* of problems.
*
* Rather than fight it, we now look for them as width,length
* instead of length,width.
+1 -1
Ver Arquivo
@@ -387,7 +387,7 @@ PE_polyline_encoded(int num_params, /* I - Number of parameters */
PenNumber = (int)decode_number(&s, base_bits, 1.0);
if (PageDirty)
printf("%.3f %.3f %.3f %.2f SP\n", Pens[PenNumber].rgb[0],
Pens[PenNumber].rgb[1], Pens[PenNumber].rgb[2],
Pens[PenNumber].rgb[PenNumber], Pens[PenNumber].rgb[2],
Pens[PenNumber].width * PenScaling);
#ifdef DEBUG
+1 -1
Ver Arquivo
@@ -334,7 +334,7 @@ ImageRGBToCMYK(const ib_t *in, /* I - Input pixels */
k = min(c, min(m, y));
if ((km = max(c, max(m, y))) > k)
k = k * k * k / km / km;
k = k * k / km;
c -= k;
m -= k;
+58 -98
Ver Arquivo
@@ -54,7 +54,6 @@ ImageReadTIFF(image_t *img, /* IO - Image */
TIFF *tif; /* TIFF file */
uint32 width, height; /* Size of image */
uint16 photometric, /* Colorspace */
compression, /* Type of compression */
orientation, /* Orientation */
resunit, /* Units for resolution */
samples, /* Number of samples/pixel */
@@ -69,7 +68,6 @@ ImageReadTIFF(image_t *img, /* IO - Image */
num_colors, /* Number of colors */
bpp, /* Bytes per pixel */
x, y, /* Current x & y */
row, /* Current row in image */
xstart, ystart, /* Starting x & y */
xdir, ydir, /* X & y direction */
xcount, ycount, /* X & Y counters */
@@ -103,7 +101,6 @@ ImageReadTIFF(image_t *img, /* IO - Image */
if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &width) ||
!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &height) ||
!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric) ||
!TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression) ||
!TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samples) ||
!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bits))
{
@@ -142,11 +139,6 @@ ImageReadTIFF(image_t *img, /* IO - Image */
img->xppi = 128;
img->yppi = 128;
}
fprintf(stderr, "DEBUG: TIFF resolution = %fx%f, units=%d\n",
xres, yres, resunit);
fprintf(stderr, "DEBUG: Stored resolution = %dx%d PPI\n",
img->xppi, img->yppi);
}
/*
@@ -178,35 +170,6 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Set the X & Y start and direction according to the image orientation...
*/
switch (orientation)
{
case ORIENTATION_TOPRIGHT :
fputs("DEBUG: orientation = top-right\n", stderr);
break;
case ORIENTATION_RIGHTTOP :
fputs("DEBUG: orientation = right-top\n", stderr);
break;
default :
case ORIENTATION_TOPLEFT :
fputs("DEBUG: orientation = top-left\n", stderr);
break;
case ORIENTATION_LEFTTOP :
fputs("DEBUG: orientation = left-top\n", stderr);
break;
case ORIENTATION_BOTLEFT :
fputs("DEBUG: orientation = bottom-left\n", stderr);
break;
case ORIENTATION_LEFTBOT :
fputs("DEBUG: orientation = left-bottom\n", stderr);
break;
case ORIENTATION_BOTRIGHT :
fputs("DEBUG: orientation = bottom-right\n", stderr);
break;
case ORIENTATION_RIGHTBOT :
fputs("DEBUG: orientation = right-bottom\n", stderr);
break;
}
switch (orientation)
{
case ORIENTATION_TOPRIGHT :
@@ -278,23 +241,20 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* each which must be handled separately...
*/
fprintf(stderr, "DEBUG: photometric = %d\n", photometric);
fprintf(stderr, "DEBUG: compression = %d\n", compression);
switch (photometric)
{
case PHOTOMETRIC_MINISWHITE :
case PHOTOMETRIC_MINISBLACK :
if (photometric == PHOTOMETRIC_MINISWHITE)
{
zero = 255;
one = 0;
}
else
if (photometric == PHOTOMETRIC_MINISBLACK)
{
zero = 0;
one = 255;
}
else
{
zero = 255;
one = 0;
}
if (orientation < ORIENTATION_LEFTTOP)
{
@@ -302,13 +262,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Row major order...
*/
for (y = ystart, ycount = img->ysize, row = 0;
for (y = ystart, ycount = img->ysize;
ycount > 0;
ycount --, y += ydir, row ++)
ycount --, y += ydir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart, bit = 128;
xcount > 0;
xcount --, p += pstep)
@@ -329,7 +289,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart, bit = 0xc0;
xcount > 0;
xcount --, p += pstep)
@@ -350,7 +310,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart, bit = 0xf0;
xcount > 0;
xcount --, p += pstep)
@@ -370,7 +330,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (xdir < 0 || zero || alpha)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
if (alpha)
{
@@ -410,7 +370,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
}
else
TIFFReadScanline(tif, in, row, 0);
TIFFReadScanline(tif, in, y, 0);
if (img->colorspace == IMAGE_WHITE)
{
@@ -450,13 +410,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Column major order...
*/
for (x = xstart, xcount = img->xsize, row = 0;
for (x = xstart, xcount = img->xsize;
xcount > 0;
xcount --, x += xdir, row ++)
xcount --, x += xdir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + ystart, bit = 128;
ycount > 0;
ycount --, p += ydir)
@@ -477,7 +437,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + ystart, bit = 0xc0;
ycount > 0;
ycount --, p += ydir)
@@ -499,7 +459,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + ystart, bit = 0xf0;
ycount > 0;
ycount --, p += ydir)
@@ -519,7 +479,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (ydir < 0 || zero || alpha)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
if (alpha)
{
@@ -559,7 +519,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
}
else
TIFFReadScanline(tif, in, row, 0);
TIFFReadScanline(tif, in, x, 0);
if (img->colorspace == IMAGE_WHITE)
{
@@ -617,13 +577,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Row major order...
*/
for (y = ystart, ycount = img->ysize, row = 0;
for (y = ystart, ycount = img->ysize;
ycount > 0;
ycount --, y += ydir, row ++)
ycount --, y += ydir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline,
p = in + xstart * 3, bit = 128;
xcount > 0;
@@ -653,7 +613,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline,
p = in + xstart * 3, bit = 0xc0;
xcount > 0;
@@ -678,7 +638,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline,
p = in + 3 * xstart, bit = 0xf0;
xcount > 0;
@@ -704,7 +664,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, p = in + 3 * xstart, scanptr = scanline;
xcount > 0;
@@ -754,13 +714,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Column major order...
*/
for (x = xstart, xcount = img->xsize, row = 0;
for (x = xstart, xcount = img->xsize;
xcount > 0;
xcount --, x += xdir, row ++)
xcount --, x += xdir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline,
p = in + 3 * ystart, bit = 128;
ycount > 0;
@@ -790,7 +750,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline,
p = in + 3 * ystart, bit = 0xc0;
ycount > 0;
@@ -815,7 +775,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline,
p = in + 3 * ystart, bit = 0xf0;
ycount > 0;
@@ -841,7 +801,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, p = in + 3 * ystart, scanptr = scanline;
ycount > 0;
@@ -894,13 +854,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Row major order...
*/
for (y = ystart, ycount = img->ysize, row = 0;
for (y = ystart, ycount = img->ysize;
ycount > 0;
ycount --, y += ydir, row ++)
ycount --, y += ydir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart * 3, bit = 0xf0;
xcount > 0;
xcount --, p += pstep)
@@ -931,7 +891,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart * 3;
xcount > 0;
xcount --, p += pstep, scanptr ++)
@@ -946,7 +906,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart * 3;
xcount > 0;
xcount -= 2, p += 2 * pstep, scanptr += 3)
@@ -970,7 +930,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (xdir < 0 || alpha)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
if (alpha)
{
@@ -996,7 +956,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
}
else
TIFFReadScanline(tif, in, row, 0);
TIFFReadScanline(tif, in, y, 0);
if ((saturation != 100 || hue != 0) && bpp > 1)
ImageRGBAdjust(in, img->xsize, saturation, hue);
@@ -1039,13 +999,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Column major order...
*/
for (x = xstart, xcount = img->xsize, row = 0;
for (x = xstart, xcount = img->xsize;
xcount > 0;
xcount --, x += xdir, row ++)
xcount --, x += xdir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + ystart * 3, bit = 0xf0;
ycount > 0;
ycount --, p += pstep)
@@ -1076,7 +1036,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + ystart * 3;
ycount > 0;
ycount --, p += pstep, scanptr ++)
@@ -1091,7 +1051,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + ystart * 3;
ycount > 0;
ycount -= 2, p += 2 * pstep, scanptr += 3)
@@ -1115,7 +1075,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (ydir < 0 || alpha)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
if (alpha)
{
@@ -1141,7 +1101,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
}
else
TIFFReadScanline(tif, in, row, 0);
TIFFReadScanline(tif, in, x, 0);
if ((saturation != 100 || hue != 0) && bpp > 1)
ImageRGBAdjust(in, img->ysize, saturation, hue);
@@ -1191,13 +1151,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Row major order...
*/
for (y = ystart, ycount = img->ysize, row = 0;
for (y = ystart, ycount = img->ysize;
ycount > 0;
ycount --, y += ydir, row ++)
ycount --, y += ydir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart * 3, bit = 0xf0;
xcount > 0;
xcount --, p += pstep)
@@ -1237,7 +1197,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart * 3;
xcount > 0;
xcount --, p += pstep, scanptr ++)
@@ -1283,7 +1243,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, scanptr = scanline, p = in + xstart * 3;
xcount > 0;
xcount --, p += pstep, scanptr += 2)
@@ -1329,7 +1289,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, y, 0);
for (xcount = img->xsize, p = in + xstart * 3, scanptr = scanline;
xcount > 0;
@@ -1412,13 +1372,13 @@ ImageReadTIFF(image_t *img, /* IO - Image */
* Column major order...
*/
for (x = xstart, xcount = img->xsize, row = 0;
for (x = xstart, xcount = img->xsize;
xcount > 0;
xcount --, x += xdir, row ++)
xcount --, x += xdir)
{
if (bits == 1)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + xstart * 3, bit = 0xf0;
ycount > 0;
ycount --, p += pstep)
@@ -1458,7 +1418,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 2)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + xstart * 3;
ycount > 0;
ycount --, p += pstep, scanptr ++)
@@ -1504,7 +1464,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else if (bits == 4)
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, scanptr = scanline, p = in + xstart * 3;
ycount > 0;
ycount --, p += pstep, scanptr += 2)
@@ -1550,7 +1510,7 @@ ImageReadTIFF(image_t *img, /* IO - Image */
}
else
{
TIFFReadScanline(tif, scanline, row, 0);
TIFFReadScanline(tif, scanline, x, 0);
for (ycount = img->ysize, p = in + xstart * 3, scanptr = scanline;
ycount > 0;
+52 -137
Ver Arquivo
@@ -73,7 +73,6 @@ main(int argc, /* I - Number of command-line arguments */
ysize,
xsize2,
ysize2;
float aspect; /* Aspect ratio */
int xpages, /* # x pages */
ypages, /* # y pages */
xpage, /* Current x page */
@@ -94,63 +93,24 @@ main(int argc, /* I - Number of command-line arguments */
float g; /* Gamma correction value */
float b; /* Brightness factor */
float zoom; /* Zoom facter */
int xppi, yppi; /* Pixels-per-inch */
int ppi; /* Pixels-per-inch */
int hue, sat; /* Hue and saturation adjustment */
int realcopies; /* Real copies being printed */
float left, top; /* Left and top of image */
char filename[1024]; /* Name of file to print */
/*
* Check arguments...
*/
if (argc < 6 || argc > 7)
if (argc != 7)
{
fputs("ERROR: imagetops job-id user title copies options [file]\n", stderr);
fputs("ERROR: imagetops job-id user title copies options file\n", stderr);
return (1);
}
fprintf(stderr, "INFO: %s %s %s %s %s %s %s\n", argv[0], argv[1], argv[2],
argv[3], argv[4], argv[5], argv[6] ? argv[6] : "(null)");
/*
* Copy stdin as needed...
*/
if (argc == 6)
{
FILE *fp; /* File to read from */
char buffer[8192]; /* Buffer to read into */
int bytes; /* # of bytes to read */
if ((fp = fopen(cupsTempFile(filename, sizeof(filename)), "w")) == NULL)
{
perror("ERROR: Unable to copy image file");
return (1);
}
fprintf(stderr, "DEBUG: imagetops - copying to temp print file \"%s\"\n",
filename);
while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0)
fwrite(buffer, 1, bytes, fp);
fclose(fp);
}
else
{
strncpy(filename, argv[6], sizeof(filename) - 1);
filename[sizeof(filename) - 1] = '\0';
}
/*
* Process command-line options and write the prolog...
*/
zoom = 0.0;
xppi = 0;
yppi = 0;
ppi = 0;
hue = 0;
sat = 100;
g = 1.0;
@@ -191,8 +151,7 @@ main(int argc, /* I - Number of command-line arguments */
zoom = atoi(val) * 0.01;
if ((val = cupsGetOption("ppi", num_options, options)) != NULL)
if (sscanf(val, "%dx%d", &xppi, &yppi) < 2)
yppi = xppi;
ppi = atoi(val);
if ((val = cupsGetOption("position", num_options, options)) != NULL)
{
@@ -255,12 +214,7 @@ main(int argc, /* I - Number of command-line arguments */
colorspace = ColorDevice ? IMAGE_RGB : IMAGE_WHITE;
img = ImageOpen(filename, colorspace, IMAGE_WHITE, sat, hue, NULL);
if (argc == 6)
unlink(filename);
if (img == NULL)
if ((img = ImageOpen(argv[6], colorspace, IMAGE_WHITE, sat, hue, NULL)) == NULL)
{
fputs("ERROR: Unable to open image file for printing!\n", stderr);
ppdClose(ppd);
@@ -273,56 +227,46 @@ main(int argc, /* I - Number of command-line arguments */
* Scale as necessary...
*/
if (zoom == 0.0 && ppi == 0)
ppi = img->xppi;
xprint = (PageRight - PageLeft) / 72.0;
yprint = (PageTop - PageBottom) / 72.0;
if (zoom == 0.0 && xppi == 0)
{
xppi = img->xppi;
yppi = img->yppi;
}
if (yppi == 0)
yppi = xppi;
if (xppi > 0)
if (ppi > 0)
{
/*
* Scale the image as neccesary to match the desired pixels-per-inch.
*/
xinches = (float)img->xsize / (float)xppi;
yinches = (float)img->ysize / (float)yppi;
xinches = (float)img->xsize / (float)ppi;
yinches = (float)img->ysize / (float)ppi;
if (cupsGetOption("orientation", num_options, options) == NULL &&
cupsGetOption("landscape", num_options, options) == NULL)
/*
* Rotate the image if it will fit landscape but not portrait...
*/
if ((xinches > xprint || yinches > yprint) &&
xinches <= yprint && yinches <= xprint)
{
/*
* Rotate the image if it will fit landscape but not portrait...
* Rotate the image as needed...
*/
if ((xinches > xprint || yinches > yprint) &&
xinches <= yprint && yinches <= xprint)
{
/*
* Rotate the image as needed...
*/
Orientation = (Orientation + 1) & 3;
xsize = yprint;
yprint = xprint;
xprint = xsize;
Orientation = (Orientation + 1) & 3;
xsize = yprint;
yprint = xprint;
xprint = xsize;
xsize = PageLeft;
PageLeft = PageBottom;
PageBottom = PageWidth - PageRight;
PageRight = PageTop;
PageTop = PageLength - xsize;
xsize = PageLeft;
PageLeft = PageBottom;
PageBottom = PageWidth - PageRight;
PageRight = PageTop;
PageTop = PageLength - xsize;
xsize = PageWidth;
PageWidth = PageLength;
PageLength = xsize;
}
xsize = PageWidth;
PageWidth = PageLength;
PageLength = xsize;
}
}
else
@@ -331,75 +275,36 @@ main(int argc, /* I - Number of command-line arguments */
* Scale percentage of page size...
*/
aspect = (float)img->yppi / (float)img->xppi;
fprintf(stderr, "DEBUG: img->xppi = %d, img->yppi = %d, aspect = %f\n",
img->xppi, img->yppi, aspect);
xsize = xprint * zoom;
ysize = xsize * img->ysize / img->xsize / aspect;
ysize = xsize * img->ysize / img->xsize;
if (ysize > (yprint * zoom))
{
ysize = yprint * zoom;
xsize = ysize * img->xsize * aspect / img->ysize;
xsize = ysize * img->xsize / img->ysize;
}
xsize2 = yprint * zoom;
ysize2 = xsize2 * img->ysize / img->xsize / aspect;
ysize2 = xsize2 * img->ysize / img->xsize;
if (ysize2 > (xprint * zoom))
{
ysize2 = xprint * zoom;
xsize2 = ysize2 * img->xsize * aspect / img->ysize;
xsize2 = ysize2 * img->xsize / img->ysize;
}
fprintf(stderr, "DEBUG: xsize = %.0f, ysize = %.0f\n", xsize, ysize);
fprintf(stderr, "DEBUG: xsize2 = %.0f, ysize2 = %.0f\n", xsize2, ysize2);
/*
* Choose the rotation with the largest area, but prefer
* portrait if they are equal...
*/
if (cupsGetOption("orientation", num_options, options) == NULL &&
cupsGetOption("landscape", num_options, options) == NULL)
if ((xsize * ysize) < (xsize2 * xsize2))
{
/*
* Choose the rotation with the largest area, but prefer
* portrait if they are equal...
* Do landscape orientation...
*/
if ((xsize * ysize) < (xsize2 * xsize2))
{
/*
* Do landscape orientation...
*/
Orientation = 1;
xinches = xsize2;
yinches = ysize2;
xprint = (PageTop - PageBottom) / 72.0;
yprint = (PageRight - PageLeft) / 72.0;
xsize = PageLeft;
PageLeft = PageBottom;
PageBottom = PageWidth - PageRight;
PageRight = PageTop;
PageTop = PageLength - xsize;
xsize = PageWidth;
PageWidth = PageLength;
PageLength = xsize;
}
else
{
/*
* Do portrait orientation...
*/
Orientation = 0;
xinches = xsize;
yinches = ysize;
}
}
else if (Orientation & 1)
{
Orientation = 1;
xinches = xsize2;
yinches = ysize2;
xprint = (PageTop - PageBottom) / 72.0;
@@ -415,6 +320,16 @@ main(int argc, /* I - Number of command-line arguments */
PageWidth = PageLength;
PageLength = xsize;
}
else
{
/*
* Do portrait orientation...
*/
Orientation = 0;
xinches = xsize;
yinches = ysize;
}
}
xpages = ceil(xinches / xprint);
+73 -165
Ver Arquivo
@@ -24,8 +24,6 @@
* Contents:
*
* main() - Main entry...
* exec_code() - Execute PostScript setpagedevice commands as
* appropriate.
* format_CMY() - Convert image data to CMY.
* format_CMYK() - Convert image data to CMYK.
* format_K() - Convert image data to black.
@@ -42,6 +40,10 @@
* Include necessary headers...
*/
/*
* Include necessary headers...
*/
#include "common.h"
#include "image.h"
#include "raster.h"
@@ -121,7 +123,7 @@ int Planes[] = /* Number of planes for each colorspace */
* Local functions...
*/
static void exec_code(cups_page_header_t *header, const char *code);
static void exec_choice(cups_page_header_t *header, ppd_choice_t *choice);
static void format_CMY(cups_page_header_t *header, unsigned char *row, int y, int z, int xsize, int ysize, int yerr0, int yerr1, ib_t *r0, ib_t *r1);
static void format_CMYK(cups_page_header_t *header, unsigned char *row, int y, int z, int xsize, int ysize, int yerr0, int yerr1, ib_t *r0, ib_t *r1);
static void format_K(cups_page_header_t *header, unsigned char *row, int y, int z, int xsize, int ysize, int yerr0, int yerr1, ib_t *r0, ib_t *r1);
@@ -153,7 +155,6 @@ main(int argc, /* I - Number of command-line arguments */
ysize,
xsize2,
ysize2;
float aspect; /* Aspect ratio */
int xpages, /* # x pages */
ypages, /* # y pages */
xpage, /* Current x page */
@@ -164,9 +165,7 @@ main(int argc, /* I - Number of command-line arguments */
int x0, y0, /* Corners of the page in image coords */
x1, y1;
ppd_file_t *ppd; /* PPD file */
ppd_choice_t *choice, /* PPD option choice */
**choices; /* List of marked choices */
int count; /* Number of marked choices */
ppd_choice_t *choice; /* PPD option choice */
char *resolution, /* Output resolution */
*media_type; /* Media type */
ppd_profile_t *profile; /* Color profile */
@@ -181,7 +180,7 @@ main(int argc, /* I - Number of command-line arguments */
float g; /* Gamma correction value */
float b; /* Brightness factor */
float zoom; /* Zoom facter */
int xppi, yppi; /* Pixels-per-inch */
int ppi; /* Pixels-per-inch */
int hue, sat; /* Hue and saturation adjustment */
izoom_t *z; /* ImageZoom buffer */
int primary, /* Primary image colorspace */
@@ -198,59 +197,23 @@ main(int argc, /* I - Number of command-line arguments */
ib_t lut[256]; /* Gamma/brightness LUT */
int plane, /* Current color plane */
num_planes; /* Number of color planes */
char filename[1024]; /* Name of file to print */
/*
* Check arguments...
*/
if (argc < 6 || argc > 7)
if (argc != 7)
{
fputs("ERROR: imagetoraster job-id user title copies options [file]\n", stderr);
fputs("ERROR: imagetoraster job-id user title copies options file\n", stderr);
return (1);
}
fprintf(stderr, "INFO: %s %s %s %s %s %s %s\n", argv[0], argv[1], argv[2],
argv[3], argv[4], argv[5], argv[6] ? argv[6] : "(null)");
/*
* Copy stdin as needed...
*/
if (argc == 6)
{
FILE *fp; /* File to read from */
char buffer[8192]; /* Buffer to read into */
int bytes; /* # of bytes to read */
if ((fp = fopen(cupsTempFile(filename, sizeof(filename)), "w")) == NULL)
{
perror("ERROR: Unable to copy image file");
return (1);
}
fprintf(stderr, "DEBUG: imagetoraster - copying to temp print file \"%s\"\n",
filename);
while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0)
fwrite(buffer, 1, bytes, fp);
fclose(fp);
}
else
{
strncpy(filename, argv[6], sizeof(filename) - 1);
filename[sizeof(filename) - 1] = '\0';
}
argv[3], argv[4], argv[5], argv[6]);
/*
* Process command-line options and write the prolog...
*/
zoom = 0.0;
xppi = 0;
yppi = 0;
ppi = 0;
hue = 0;
sat = 100;
g = 1.0;
@@ -291,8 +254,7 @@ main(int argc, /* I - Number of command-line arguments */
zoom = atoi(val) * 0.01;
if ((val = cupsGetOption("ppi", num_options, options)) != NULL)
if (sscanf(val, "%dx%d", &xppi, &yppi) < 2)
yppi = xppi;
ppi = atoi(val);
if ((val = cupsGetOption("position", num_options, options)) != NULL)
{
@@ -358,38 +320,35 @@ main(int argc, /* I - Number of command-line arguments */
header.HWResolution[1] = 100;
header.cupsBitsPerColor = 1;
header.cupsColorOrder = CUPS_ORDER_CHUNKED;
header.cupsColorSpace = CUPS_CSPACE_K;
header.cupsColorSpace = CUPS_CSPACE_RGB;
if (ppd && ppd->patches)
exec_code(&header, ppd->patches);
if ((choice = ppdFindMarkedChoice(ppd, "ColorModel")) != NULL)
exec_choice(&header, choice);
if ((count = ppdCollect(ppd, PPD_ORDER_DOCUMENT, &choices)) > 0)
for (i = 0; i < count; i ++)
exec_code(&header, choices[i]->code);
if ((choice = ppdFindMarkedChoice(ppd, "CutMedia")) != NULL)
exec_choice(&header, choice);
if ((count = ppdCollect(ppd, PPD_ORDER_ANY, &choices)) > 0)
for (i = 0; i < count; i ++)
exec_code(&header, choices[i]->code);
if ((choice = ppdFindMarkedChoice(ppd, "ESPFinishing")) != NULL)
exec_choice(&header, choice);
if ((count = ppdCollect(ppd, PPD_ORDER_PROLOG, &choices)) > 0)
for (i = 0; i < count; i ++)
exec_code(&header, choices[i]->code);
if ((count = ppdCollect(ppd, PPD_ORDER_PAGE, &choices)) > 0)
for (i = 0; i < count; i ++)
exec_code(&header, choices[i]->code);
/*
* Get the media type and resolution that have been chosen...
*/
if ((choice = ppdFindMarkedChoice(ppd, "InputSlot")) != NULL)
exec_choice(&header, choice);
if ((choice = ppdFindMarkedChoice(ppd, "MediaType")) != NULL)
{
exec_choice(&header, choice);
media_type = choice->choice;
}
else
media_type = "";
if ((choice = ppdFindMarkedChoice(ppd, "Resolution")) != NULL)
{
exec_choice(&header, choice);
resolution = choice->choice;
}
else
resolution = "";
@@ -555,12 +514,7 @@ main(int argc, /* I - Number of command-line arguments */
fputs("INFO: Loading image file...\n", stderr);
img = ImageOpen(filename, primary, secondary, sat, hue, lut);
if (argc == 6)
unlink(filename);
if (img == NULL)
if ((img = ImageOpen(argv[6], primary, secondary, sat, hue, lut)) == NULL)
{
fputs("ERROR: Unable to open image file for printing!\n", stderr);
ppdClose(ppd);
@@ -571,16 +525,10 @@ main(int argc, /* I - Number of command-line arguments */
* Scale as necessary...
*/
if (zoom == 0.0 && xppi == 0)
{
xppi = img->xppi;
yppi = img->yppi;
}
if (zoom == 0.0 && ppi == 0)
ppi = img->xppi;
if (yppi == 0)
yppi = xppi;
if (xppi > 0)
if (ppi > 0)
{
/*
* Scale the image as neccesary to match the desired pixels-per-inch.
@@ -597,28 +545,24 @@ main(int argc, /* I - Number of command-line arguments */
yprint = (PageTop - PageBottom) / 72.0;
}
xinches = (float)img->xsize / (float)xppi;
yinches = (float)img->ysize / (float)yppi;
xinches = (float)img->xsize / (float)ppi;
yinches = (float)img->ysize / (float)ppi;
if (cupsGetOption("orientation", num_options, options) == NULL &&
cupsGetOption("landscape", num_options, options) == NULL)
/*
* Rotate the image if it will fit landscape but not portrait...
*/
if ((xinches > xprint || yinches > yprint) &&
xinches <= yprint && yinches <= xprint)
{
/*
* Rotate the image if it will fit landscape but not portrait...
* Rotate the image as needed...
*/
if ((xinches > xprint || yinches > yprint) &&
xinches <= yprint && yinches <= xprint)
{
/*
* Rotate the image as needed...
*/
Orientation = (Orientation + 1) & 3;
xsize = yprint;
yprint = xprint;
xprint = xsize;
}
Orientation = (Orientation + 1) & 3;
xsize = yprint;
yprint = xprint;
xprint = xsize;
}
}
else
@@ -629,87 +573,57 @@ main(int argc, /* I - Number of command-line arguments */
xprint = (PageRight - PageLeft) / 72.0;
yprint = (PageTop - PageBottom) / 72.0;
aspect = (float)img->yppi / (float)img->xppi;
fprintf(stderr, "DEBUG: img->xppi = %d, img->yppi = %d, aspect = %f\n",
img->xppi, img->yppi, aspect);
xsize = xprint * zoom;
ysize = xsize * img->ysize / img->xsize / aspect;
ysize = xsize * img->ysize / img->xsize;
if (ysize > (yprint * zoom))
{
ysize = yprint * zoom;
xsize = ysize * img->xsize * aspect / img->ysize;
xsize = ysize * img->xsize / img->ysize;
}
xsize2 = yprint * zoom;
ysize2 = xsize2 * img->ysize / img->xsize / aspect;
ysize2 = xsize2 * img->ysize / img->xsize;
if (ysize2 > (xprint * zoom))
{
ysize2 = xprint * zoom;
xsize2 = ysize2 * img->xsize * aspect / img->ysize;
xsize2 = ysize2 * img->xsize / img->ysize;
}
fprintf(stderr, "DEBUG: xsize = %.0f, ysize = %.0f\n", xsize, ysize);
fprintf(stderr, "DEBUG: xsize2 = %.0f, ysize2 = %.0f\n", xsize2, ysize2);
/*
* Choose the rotation with the largest area, but prefer
* portrait if they are equal...
*/
if (cupsGetOption("orientation", num_options, options) == NULL &&
cupsGetOption("landscape", num_options, options) == NULL)
if ((xsize * ysize) < (xsize2 * xsize2))
{
/*
* Choose the rotation with the largest area, but prefer
* portrait if they are equal...
* Do landscape orientation...
*/
if ((xsize * ysize) < (xsize2 * xsize2))
{
/*
* Do landscape orientation...
*/
Orientation = 1;
xinches = xsize2;
yinches = ysize2;
xprint = (PageTop - PageBottom) / 72.0;
yprint = (PageRight - PageLeft) / 72.0;
}
else
{
/*
* Do portrait orientation...
*/
Orientation = 0;
xinches = xsize;
yinches = ysize;
}
}
else if (Orientation & 1)
{
Orientation = 1;
xinches = xsize2;
yinches = ysize2;
xprint = (PageTop - PageBottom) / 72.0;
yprint = (PageRight - PageLeft) / 72.0;
}
else
{
/*
* Do portrait orientation...
*/
xsize = PageLeft;
PageLeft = PageBottom;
PageBottom = PageWidth - PageRight;
PageRight = PageTop;
PageTop = PageLength - xsize;
xsize = PageWidth;
PageWidth = PageLength;
PageLength = xsize;
Orientation = 0;
xinches = xsize;
yinches = ysize;
}
}
xpages = ceil(xinches / xprint);
ypages = ceil(yinches / yprint);
fprintf(stderr, "DEBUG: xpages = %d, ypages = %d\n", xpages, ypages);
/*
* Compute the bitmap size...
*/
@@ -746,9 +660,6 @@ main(int argc, /* I - Number of command-line arguments */
header.Margins[0] = PageLeft;
header.Margins[1] = PageBottom;
fprintf(stderr, "DEBUG: PageSize = [%d %d]\n", header.PageSize[0],
header.PageSize[1]);
switch (Orientation)
{
case 0 :
@@ -1209,19 +1120,20 @@ main(int argc, /* I - Number of command-line arguments */
/*
* 'exec_code()' - Execute PostScript setpagedevice commands as appropriate.
* 'exec_choice()' - Execute PostScript setpagedevice commands as appropriate.
*/
static void
exec_code(cups_page_header_t *header, /* I - Page header */
const char *code) /* I - Option choice to execute */
exec_choice(cups_page_header_t *header, /* I - Page header */
ppd_choice_t *choice) /* I - Option choice to execute */
{
char *ptr, /* Pointer into name/value string */
char *code, /* Pointer into code string */
*ptr, /* Pointer into name/value string */
name[255], /* Name of pagedevice entry */
value[1024]; /* Value of pagedevice entry */
for (; *code != '\0';)
for (code = choice->code; *code != '\0';)
{
/*
* Search for the start of a dictionary name...
@@ -1279,7 +1191,7 @@ exec_code(cups_page_header_t *header, /* I - Page header */
{
code ++;
if (isdigit(*code))
*ptr++ = (char)strtol(code, (char **)&code, 8);
*ptr++ = (char)strtol(code, &code, 8);
else
*ptr++ = *code++;
}
@@ -1330,10 +1242,6 @@ exec_code(cups_page_header_t *header, /* I - Page header */
else if (strcmp(name, "cupsMediaPosition") == 0 || /* Compatibility */
strcmp(name, "MediaPosition") == 0)
header->MediaPosition = atoi(value);
else if (strcmp(name, "MediaClass") == 0)
strncpy(header->MediaClass, value, sizeof(header->MediaClass) - 1);
else if (strcmp(name, "MediaColor") == 0)
strncpy(header->MediaColor, value, sizeof(header->MediaColor) - 1);
else if (strcmp(name, "MediaType") == 0)
strncpy(header->MediaType, value, sizeof(header->MediaType) - 1);
else if (strcmp(name, "OutputType") == 0)
+2 -22
Ver Arquivo
@@ -101,7 +101,6 @@ main(int argc, /* I - Number of command-line arguments */
int page_count; /* Page count for NUp */
int subpage; /* Sub-page number */
int copy; /* Current copy */
int saweof; /* Did we see a %%EOF tag? */
/*
@@ -261,8 +260,6 @@ main(int argc, /* I - Number of command-line arguments */
puts(line);
saweof = 0;
if (ppd != NULL && ppd->patches != NULL)
puts(ppd->patches);
@@ -310,11 +307,7 @@ main(int argc, /* I - Number of command-line arguments */
tbytes = atoi(strchr(line, ':') + 1);
while (tbytes > 0)
{
if (tbytes > sizeof(line))
nbytes = fread(line, 1, sizeof(line), fp);
else
nbytes = fread(line, 1, tbytes, fp);
nbytes = fread(line, 1, sizeof(line), fp);
fwrite(line, 1, nbytes, stdout);
tbytes -= nbytes;
}
@@ -333,8 +326,6 @@ main(int argc, /* I - Number of command-line arguments */
level ++;
else if (strcmp(line, "%%EndDocument") == 0 && level > 0)
level --;
else if (strcmp(line, "%%EOF") == 0 && level == 0)
saweof = 1;
else if (strncmp(line, "%%Page:", 7) == 0 && level == 0)
{
if (sscanf(line, "%*s%*s%d", &number) == 1)
@@ -388,10 +379,7 @@ main(int argc, /* I - Number of command-line arguments */
tbytes = atoi(strchr(line, ':') + 1);
while (tbytes > 0)
{
if (tbytes > sizeof(line))
nbytes = fread(line, 1, sizeof(line), fp);
else
nbytes = fread(line, 1, tbytes, fp);
nbytes = fread(line, 1, sizeof(line), fp);
if (!sloworder)
fwrite(line, 1, nbytes, stdout);
@@ -551,18 +539,10 @@ main(int argc, /* I - Number of command-line arguments */
ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
rewind(temp);
copy_bytes(temp, 0);
Copies --;
}
}
}
/*
* Send %%EOF if needed...
*/
if (!saweof)
puts("%%EOF");
/*
* End the job with the appropriate JCL command or CTRL-D otherwise.
*/
+5 -6
Ver Arquivo
@@ -148,7 +148,7 @@ StartPage(cups_page_header_t *header) /* I - Page header */
}
printf("\033&l%dP", header->PageSize[1] / 12);/* Set page length */
printf("\033&l0E"); /* Set top margin to 0 */
printf("\033&l3E"); /* Set top margin to 1/2 inch */
printf("\033&l%dX", header->NumCopies); /* Set number copies */
@@ -169,10 +169,6 @@ StartPage(cups_page_header_t *header) /* I - Page header */
* Set graphics mode...
*/
printf("\033*t%dR", header->HWResolution[0]); /* Set resolution */
printf("\033*r%dS", header->cupsWidth); /* Set width */
printf("\033*r%dT", header->cupsHeight); /* Set height */
if (header->cupsColorSpace == CUPS_CSPACE_KCMY)
{
NumPlanes = 4;
@@ -186,7 +182,10 @@ StartPage(cups_page_header_t *header) /* I - Page header */
else
NumPlanes = 1; /* Black&white graphics */
printf("\033&a0H\033&a330V"); /* Set top-of-page */
printf("\033*t%dR", header->HWResolution[0]); /* Set resolution */
printf("\033*r%dS", header->cupsWidth); /* Set width */
printf("\033*r%dT", header->cupsHeight); /* Set height */
printf("\033&a0H\033&a0V"); /* Set top-of-page */
printf("\033*r1A"); /* Start graphics */
if (header->cupsCompression)
+14 -401
Ver Arquivo
@@ -52,15 +52,7 @@ int NumPages = 0; /* Number of pages in document */
int CharsPerInch = 10; /* Number of character columns per inch */
int LinesPerInch = 6; /* Number of lines per inch */
int UTF8 = 0; /* Use UTF-8 encoding? */
int NumKeywords = 0; /* Number of known keywords */
char **Keywords = NULL; /* List of known keywords */
/*
* Local globals...
*/
static char *code_keywords[] = /* List of known C/C++ keywords... */
char *Keywords[] = /* List of known keywords... */
{
"and",
"and_eq",
@@ -128,344 +120,6 @@ static char *code_keywords[] = /* List of known C/C++ keywords... */
"while",
"xor",
"xor_eq"
},
*sh_keywords[] = /* List of known Boure/Korn/zsh/bash keywords... */
{
"alias",
"bg",
"break",
"case",
"cd",
"command",
"continue",
"do",
"done",
"echo",
"elif",
"else",
"esac",
"eval",
"exec",
"exit",
"export",
"fc",
"fg",
"fi",
"for",
"function",
"getopts",
"if",
"in",
"jobs",
"kill",
"let",
"limit",
"newgrp",
"print",
"pwd",
"read",
"readonly",
"return",
"select",
"set",
"shift",
"test",
"then",
"time",
"times",
"trap",
"typeset",
"ulimit",
"umask",
"unalias",
"unlimit",
"unset",
"until",
"wait",
"whence"
"while",
},
*csh_keywords[] = /* List of known csh/tcsh keywords... */
{
"alias",
"aliases",
"bg",
"bindkey",
"break",
"breaksw",
"builtins",
"case",
"cd",
"chdir",
"complete",
"continue",
"default",
"dirs",
"echo",
"echotc",
"else",
"end",
"endif",
"eval",
"exec",
"exit",
"fg",
"foreach",
"glob",
"goto",
"history",
"if",
"jobs",
"kill",
"limit",
"login",
"logout",
"ls",
"nice",
"nohup",
"notify",
"onintr",
"popd",
"pushd",
"pwd",
"rehash",
"repeat",
"set",
"setenv",
"settc",
"shift",
"source",
"stop",
"suspend",
"switch",
"telltc",
"then",
"time",
"umask",
"unalias",
"unbindkey",
"unhash",
"unlimit",
"unset",
"unsetenv",
"wait",
"where",
"which",
"while"
},
*perl_keywords[] = /* List of known perl keywords... */
{
"abs",
"accept",
"alarm",
"and",
"atan2",
"bind",
"binmode",
"bless",
"caller",
"chdir",
"chmod",
"chomp",
"chop",
"chown",
"chr",
"chroot",
"closdir",
"close",
"connect",
"continue",
"cos",
"crypt",
"dbmclose",
"dbmopen",
"defined",
"delete",
"die",
"do",
"dump",
"each",
"else",
"elsif",
"endgrent",
"endhostent",
"endnetent",
"endprotoent",
"endpwent",
"endservent",
"eof",
"eval",
"exec",
"exists",
"exit",
"exp",
"fcntl",
"fileno",
"flock",
"for",
"foreach",
"fork",
"format",
"formline",
"getc",
"getgrent",
"getgrgid",
"getgrnam",
"gethostbyaddr",
"gethostbyname",
"gethostent",
"getlogin",
"getnetbyaddr",
"getnetbyname",
"getnetent",
"getpeername",
"getpgrp",
"getppid",
"getpriority",
"getprotobyname",
"getprotobynumber",
"getprotoent",
"getpwent",
"getpwnam",
"getpwuid",
"getservbyname",
"getservbyport",
"getservent",
"getsockname",
"getsockopt",
"glob",
"gmtime",
"goto",
"grep",
"hex",
"if",
"import",
"index",
"int",
"ioctl",
"join",
"keys",
"kill",
"last",
"lc",
"lcfirst",
"length",
"link",
"listen",
"local",
"localtime",
"log",
"lstat",
"map",
"mkdir",
"msgctl",
"msgget",
"msgrcv",
"msgsend",
"my",
"next",
"no",
"not",
"oct",
"open",
"opendir",
"or",
"ord",
"pack",
"package",
"pipe",
"pop",
"pos",
"print",
"printf",
"push",
"quotemeta",
"rand",
"read",
"readdir",
"readlink",
"recv",
"redo",
"ref",
"rename",
"require",
"reset",
"return",
"reverse",
"rewinddir",
"rindex",
"rmdir",
"scalar",
"seek",
"seekdir",
"select",
"semctl",
"semget",
"semop",
"send",
"setgrent",
"sethostent",
"setnetent",
"setpgrp",
"setpriority",
"setprotoent",
"setpwent",
"setservent",
"setsockopt",
"shift",
"shmctl",
"shmget",
"shmread",
"shmwrite",
"shutdown",
"sin",
"sleep",
"socket",
"socketpair",
"sort",
"splice",
"split",
"sprintf",
"sqrt",
"srand",
"stat",
"study",
"sub",
"substr",
"symlink",
"syscall",
"sysread",
"sysseek",
"system",
"syswrite",
"tell",
"telldir",
"tie",
"tied",
"time",
"times"
"times",
"truncate",
"uc",
"ucfirst",
"umask",
"undef",
"unless",
"unlink",
"unpack",
"unshift",
"untie",
"until",
"use",
"utime",
"values",
"vec",
"wait",
"waitpid",
"wantarray",
"warn",
"while",
"write"
};
@@ -541,43 +195,13 @@ TextMain(char *name, /* I - Name of filter */
if ((val = cupsGetOption("prettyprint", num_options, options)) != NULL)
{
PrettyPrint = 1;
PageLeft = 72.0f;
PageRight = PageWidth - 36.0f;
PageBottom = PageBottom > 36.0f ? PageBottom : 36.0f;
PageTop = PageLength - 36.0f;
CharsPerInch = 12;
LinesPerInch = 8;
if ((val = getenv("CONTENT_TYPE")) == NULL)
{
PrettyPrint = PRETTY_CODE;
NumKeywords = sizeof(code_keywords) / sizeof(code_keywords[0]);
Keywords = code_keywords;
}
else if (strcasecmp(val, "application/x-cshell") == 0)
{
PrettyPrint = PRETTY_SHELL;
NumKeywords = sizeof(csh_keywords) / sizeof(csh_keywords[0]);
Keywords = csh_keywords;
}
else if (strcasecmp(val, "application/x-perl") == 0)
{
PrettyPrint = PRETTY_PERL;
NumKeywords = sizeof(perl_keywords) / sizeof(perl_keywords[0]);
Keywords = perl_keywords;
}
else if (strcasecmp(val, "application/x-shell") == 0)
{
PrettyPrint = PRETTY_SHELL;
NumKeywords = sizeof(sh_keywords) / sizeof(sh_keywords[0]);
Keywords = sh_keywords;
}
else
{
PrettyPrint = PRETTY_CODE;
NumKeywords = sizeof(code_keywords) / sizeof(code_keywords[0]);
Keywords = code_keywords;
}
}
ppd = SetCommonOptions(num_options, options, 1);
@@ -646,8 +270,8 @@ TextMain(char *name, /* I - Name of filter */
*keyptr = '\0';
keyptr = keyword;
if (bsearch(&keyptr, Keywords, NumKeywords, sizeof(char *),
compare_keywords))
if (bsearch(&keyptr, Keywords, sizeof(Keywords) / sizeof(Keywords[0]),
sizeof(Keywords[0]), compare_keywords))
{
/*
* Put keywords in boldface...
@@ -692,8 +316,8 @@ TextMain(char *name, /* I - Name of filter */
*keyptr = '\0';
keyptr = keyword;
if (bsearch(&keyptr, Keywords, NumKeywords, sizeof(char *),
compare_keywords))
if (bsearch(&keyptr, Keywords, sizeof(Keywords) / sizeof(Keywords[0]),
sizeof(Keywords[0]), compare_keywords))
{
/*
* Put keywords in boldface...
@@ -746,8 +370,8 @@ TextMain(char *name, /* I - Name of filter */
*keyptr = '\0';
keyptr = keyword;
if (bsearch(&keyptr, Keywords, NumKeywords, sizeof(char *),
compare_keywords))
if (bsearch(&keyptr, Keywords, sizeof(Keywords) / sizeof(Keywords[0]),
sizeof(Keywords[0]), compare_keywords))
{
/*
* Put keywords in boldface...
@@ -856,8 +480,8 @@ TextMain(char *name, /* I - Name of filter */
keyptr = keyword;
if (!(attr & ATTR_ITALIC) &&
bsearch(&keyptr, Keywords, NumKeywords, sizeof(char *),
compare_keywords))
bsearch(&keyptr, Keywords, sizeof(Keywords) / sizeof(Keywords[0]),
sizeof(Keywords[0]), compare_keywords))
{
/*
* Put keywords in boldface...
@@ -893,8 +517,7 @@ TextMain(char *name, /* I - Name of filter */
cstring = -1;
attr |= ATTR_BLUE;
}
else if (ch == '*' && lastch == '/' && !cstring &&
PrettyPrint != PRETTY_SHELL)
else if (ch == '*' && lastch == '/' && !cstring)
{
/*
* Start a C-style comment...
@@ -903,8 +526,7 @@ TextMain(char *name, /* I - Name of filter */
ccomment = 1;
attr |= ATTR_ITALIC | ATTR_GREEN;
}
else if (ch == '/' && lastch == '/' && !cstring &&
PrettyPrint == PRETTY_CODE)
else if (ch == '/' && lastch == '/' && !cstring)
{
/*
* Start a C++-style comment...
@@ -912,16 +534,7 @@ TextMain(char *name, /* I - Name of filter */
attr |= ATTR_ITALIC | ATTR_GREEN;
}
else if (ch == '#' && !cstring && PrettyPrint != PRETTY_CODE)
{
/*
* Start a shell-style comment...
*/
attr |= ATTR_ITALIC | ATTR_GREEN;
}
else if (ch == '#' && column == 0 && !ccomment && !cstring &&
PrettyPrint == PRETTY_CODE)
else if (ch == '#' && column == 0 && !ccomment && !cstring)
{
/*
* Start a preprocessor command...
@@ -981,7 +594,7 @@ TextMain(char *name, /* I - Name of filter */
Page[line][column].attr |= ATTR_BOLD;
}
else if ((ch == '/' || ch == '*') && lastch == '/' &&
column < ColumnWidth && PrettyPrint != PRETTY_SHELL)
column < ColumnWidth)
{
/*
* Highlight first comment character...
+2 -9
Ver Arquivo
@@ -46,12 +46,6 @@
#define ATTR_GREEN 0x40
#define ATTR_BLUE 0x80
#define PRETTY_OFF 0
#define PRETTY_CODE 1
#define PRETTY_SHELL 2
#define PRETTY_PERL 3
#define PRETTY_HTML 4
/*
* Structures...
@@ -74,15 +68,14 @@ extern int WrapLines, /* Wrap text in lines */
PageColumns, /* Number of columns on a page */
ColumnGutter, /* Number of characters between text columns */
ColumnWidth, /* Width of each column */
PrettyPrint, /* Do pretty code formatting? */
PrettyPrint, /* Do pretty code formatting */
Copies; /* Number of copies to produce */
extern lchar_t **Page; /* Page characters */
extern int NumPages; /* Number of pages in document */
extern int CharsPerInch, /* Number of character columns per inch */
LinesPerInch, /* Number of lines per inch */
UTF8; /* Use UTF-8 encoding? */
extern int NumKeywords; /* Number of known keywords */
extern char **Keywords; /* List of known keywords... */
extern char *Keywords[]; /* List of known keywords... */
/*
+5 -5
Ver Arquivo
@@ -637,7 +637,7 @@ WriteProlog(char *title, /* I - Title of job */
*/
for (i = 0, num_fonts = 0; i < NumFonts; i ++)
for (j = PrettyPrint ? 2 : 1; j >= 0; j --)
for (j = 1 + PrettyPrint; j >= 0; j --)
{
for (k = 0; k < num_fonts; k ++)
if (strcmp(Fonts[i][j], fonts[k]) == 0)
@@ -717,13 +717,13 @@ WriteProlog(char *title, /* I - Title of job */
snprintf(filename, sizeof(filename), "%s/fonts/%s", datadir, fonts[i]);
if ((fp = fopen(filename, "rb")) != NULL)
{
while ((j = fread(line, 1, sizeof(line), fp)) > 0)
fwrite(line, 1, j, stdout);
while (fgets(line, sizeof(line), fp) != NULL)
fputs(line, stdout);
fclose(fp);
}
puts("\n%%EndResource");
puts("%%EndResource");
}
}
@@ -763,7 +763,7 @@ WriteProlog(char *title, /* I - Title of job */
puts("% Reencode fonts");
for (i = PrettyPrint ? 2 : 1; i >= 0; i --)
for (i = 1 + PrettyPrint; i >= 0; i --)
{
printf("/%s findfont\n", Fonts[0][i]);
puts("dup length 1 add dict begin\n"
-1
Ver Arquivo
@@ -52,7 +52,6 @@ all: $(CAT1) $(CAT5) $(CAT8)
#
clean:
$(RM) $(CAT1) $(CAT5) $(CAT8)
#
+3 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: accept.man 1231 2000-07-20 17:10:57Z mike $"
.\" "$Id: accept.man 911 2000-02-23 03:17:06Z mike $"
.\"
.\" accept/reject man page for the Common UNIX Printing System (CUPS).
.\"
@@ -49,10 +49,9 @@ from the System V versions which require the root user to execute these
commands.
.SH SEE ALSO
cancel(1), disable(8), enable(8), lp(1), lpadmin(8), lpstat(1),
CUPS Software Administrators Manual,
http://localhost:631/documentation.html
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-2000 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: accept.man 1231 2000-07-20 17:10:57Z mike $".
.\" End of "$Id: accept.man 911 2000-02-23 03:17:06Z mike $".
.\"
+3 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: backend.man 1231 2000-07-20 17:10:57Z mike $"
.\" "$Id: backend.man 1180 2000-06-28 16:50:04Z mike $"
.\"
.\" backend man page for the Common UNIX Printing System (CUPS).
.\"
@@ -100,10 +100,9 @@ The user executing the backend (typically lp).
cupsd(8), filter(1)
CUPS Interface Design Description,
CUPS Software Administrators Manual,
CUPS Software Programmers Manual,
http://localhost:631/documentation.html
CUPS Software Programmers Manual
.SH COPYRIGHT
Copyright 1993-2000 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: backend.man 1231 2000-07-20 17:10:57Z mike $".
.\" End of "$Id: backend.man 1180 2000-06-28 16:50:04Z mike $".
.\"
+3 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: classes.conf.man 1231 2000-07-20 17:10:57Z mike $"
.\" "$Id: classes.conf.man 1151 2000-06-22 18:21:40Z mike $"
.\"
.\" classes.conf man page for the Common UNIX Printing System (CUPS).
.\"
@@ -63,10 +63,9 @@ StateMessage
Specifies the message associated with the state.
.SH SEE ALSO
cupsd(8), cupsd.conf(5), mime.convs(5), mime.types(5), printers.conf(5),
CUPS Software Administrators Manual,
http://localhost:631/documentation.html
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-2000 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: classes.conf.man 1231 2000-07-20 17:10:57Z mike $".
.\" End of "$Id: classes.conf.man 1151 2000-06-22 18:21:40Z mike $".
.\"
+3 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: cups-lpd.man 1231 2000-07-20 17:10:57Z mike $"
.\" "$Id: cups-lpd.man 1061 2000-05-10 21:07:04Z mike $"
.\"
.\" cups-lpd man page for the Common UNIX Printing System (CUPS).
.\"
@@ -49,10 +49,9 @@ LPD and IPP Protocols. Since many LPD implementations stray from this
definition, remote status reporting to LPD clients may be unreliable.
.SH SEE ALSO
inetd(8),
CUPS Software Administrators Manual,
http://localhost:631/documentation.html
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-2000 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: cups-lpd.man 1231 2000-07-20 17:10:57Z mike $".
.\" End of "$Id: cups-lpd.man 1061 2000-05-10 21:07:04Z mike $".
.\"
+3 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: cups-polld.man 1231 2000-07-20 17:10:57Z mike $"
.\" "$Id: cups-polld.man 1061 2000-05-10 21:07:04Z mike $"
.\"
.\" cups-polld man page for the Common UNIX Printing System (CUPS).
.\"
@@ -37,10 +37,9 @@ This program is started automatically by \fBcupsd\fR for each
BrowsePoll directive found in the \fBcupsd.conf\fR file.
.SH SEE ALSO
cupsd.conf(5),
CUPS Software Administrators Manual,
http://localhost:631/documentation.html
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-2000 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: cups-polld.man 1231 2000-07-20 17:10:57Z mike $".
.\" End of "$Id: cups-polld.man 1061 2000-05-10 21:07:04Z mike $".
.\"
+3 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: cupsd.conf.man 1231 2000-07-20 17:10:57Z mike $"
.\" "$Id: cupsd.conf.man 1170 2000-06-27 21:11:16Z mike $"
.\"
.\" cupsd.conf man page for the Common UNIX Printing System (CUPS).
.\"
@@ -237,10 +237,9 @@ User
Specifies the user name or ID that is used when running external programs.
.SH SEE ALSO
classes.conf(5), cupsd(8), mime.convs(5), mime.types(5), printers.conf(5),
CUPS Software Administrators Manual,
http://localhost:631/documentation.html
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-2000 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: cupsd.conf.man 1231 2000-07-20 17:10:57Z mike $".
.\" End of "$Id: cupsd.conf.man 1170 2000-06-27 21:11:16Z mike $".
.\"
+3 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: cupsd.man 1231 2000-07-20 17:10:57Z mike $"
.\" "$Id: cupsd.man 1151 2000-06-22 18:21:40Z mike $"
.\"
.\" cupsd man page for the Common UNIX Printing System (CUPS).
.\"
@@ -42,10 +42,9 @@ backend(1), classes.conf(5), cupsd.conf(5), filter(1), mime.convs(5),
mime.types(5), printers.conf(5),
CUPS Implementation of IPP,
CUPS Interface Design Description,
CUPS Software Administrators Manual,
http://localhost:631/documentation.html
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-2000 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: cupsd.man 1231 2000-07-20 17:10:57Z mike $".
.\" End of "$Id: cupsd.man 1151 2000-06-22 18:21:40Z mike $".
.\"

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