Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet 289f19a5d3 Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.0.2@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
139 arquivos alterados com 8098 adições e 5674 exclusões
+98
Ver Arquivo
@@ -0,0 +1,98 @@
CHANGES.txt - 11/04/1999
------------------------
CHANGES IN CUPS v1.0.2
- The HP-GL/2 filter didn't always scale the output
correctly.
- The HP-GL/2 filter now supports changing the page size
automatically when the "fitplot" option is not used.
- The cancel-job operation was expecting a resource name
of the form "/job/#" instead of "/jobs/#"; this
prevented the cancel and lprm commands from working.
- The backends didn't log pages when files were printed
using the "-oraw" option.
- The authorization code did not work with the Slackware
long shadow password package because its crypt() can
return NULL.
- The chunking code didn't work for reading the response
of a POST request.
- cupsGetPPD() now does authentication as needed.
- The N-up code in the PostScript filter didn't work
with some printers (grestoreall would restore the
default blank page and device settings).
- The N-up code in the PostScript filter didn't scale
the pages to fit within the imageable area of the
page.
- Wasn't doing an fchown() on the request files. This
caused problems when the default root account group
and CUPS group were not the same.
CHANGES IN CUPS v1.0.1
- Documentation updates.
- Fixed a bunch of possible buffer-overflow conditions.
- The scheduler now supports authentication using PAM.
- Updated the Italian message file.
- httpEncode64() didn't add an extra "=" if there was
only one byte in the last three-byte group.
- Now drop any trailing character set from the locale
string (e.g. "en_US.ISO_8859-1" becomes "en_US")
- Fixed "timezone" vs "tm_gmtoff" usage for BSD-based
operating systems.
- Updated IPP security so that "get" operations can be
done from any resource name; this allows the CGIs to
work with printer authentication enabled so long as
authentication isn't turned on for the whole "site".
- The IPP code didn't properly handle the "unsupported"
group; this caused problems with the HP JetDirect since
it doesn't seem to support the "copies" attribute.
- The HTTP chunking code was missing a CR LF pair at the
end of a 0-length chunk.
- The httpSeparate() function didn't handle embedded
usernames and passwords in the URI properly.
- Doing "lpadmin -p printer -E" didn't restart printing
if there were pending jobs.
- The cancel-job operation now requires either a
requesting-user-name attribute or an authenticated
username.
- The add-printer code did not report errors if the
interface script or PPD file could not be renamed.
- Request files are now created without world read
permissions.
- Added a cupsLastError() function to the CUPS API to
retrieve the IPP error code from the last request.
- Options are now case-insensitive.
- The lpq command now provides 10 characters for the
username instead of the original (Berkeley standard)
7.
- The cancel command needed a local CUPS server to work
(or the appropriate ServerName in cupsd.conf)
- The cancel and lprm commands didn't report the IPP
error if the job could not be cancelled.
- The lp and lpr commands didn't intercept SIGTERM to
remove temporary files when printing from stdin.
- The lp and lpr commands didn't report the IPP error if
the job could not be printed.
+25
Ver Arquivo
@@ -0,0 +1,25 @@
CREDITS.txt - 10/01/1999
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
like to thank the following individuals for their contributions:
Nathaniel Barbour - Lots of testing and feedback.
N. Becker - setsid().
Jean-Eric Cuendet - GhostScript filters for CUPS.
Van Dang - HTTP and IPP policeman.
Dr. ZP Han - setgid()/setuid().
Guy Harris - *BSD shared libraries and lots of other fixes.
Wang Jian - CUPS RPM corrections.
Roderick Johnstone - Beta tester of the millenium.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Mark Lawrence - Microsoft interoperability testing.
Jason McMullan - Original CUPS RPM distributions.
Wes Morgan - *BSD fixes.
Ulrich Oldendorf - German locale.
Petter Reinholdtsen - HP-UX compiler stuff.
Stuart Stevens - HP JetDirect IPP information.
Kiko - Bug fixes.
If I've missed someone, please let me know by sending an email to
"mike@easysw.com".
+1 -1
Ver Arquivo
@@ -37,13 +37,13 @@ DSO = @DSO@
HTMLDOC = @HTMLDOC@
LN = /bin/ln -sf
MKDIR = @MKDIR@ -p
MV = @MV@
NROFF = @NROFF@
PACK = @PACK@
RANLIB = @RANLIB@
RM = @RM@ -f
SED = @SED@
SHELL = /bin/sh
SMBCLIENT = @SMBCLIENT@
#
# Libraries...
+23 -18
Ver Arquivo
@@ -1,16 +1,6 @@
README - CUPS v1.0b9 - 09/03/1999
README - CUPS v1.0.2 - 11/04/1999
---------------------------------
BETA SOFTWARE BETA SOFTWARE BETA SOFTWARE BETA SOFTWARE BETA SOFTWARE
WARNING - This is a BETA release of CUPS, which means that it may
contain "bugs" that could prevent you from printing. If
you are concerned that this may cause you lost time or
money, please STOP and do not install this software!
BETA SOFTWARE BETA SOFTWARE BETA SOFTWARE BETA SOFTWARE BETA SOFTWARE
INTRODUCTION
The Common UNIX Printing System provides a portable printing layer for
@@ -20,9 +10,8 @@ and users. CUPS provides the System V and Berkeley command-line
interfaces.
CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis for
managing print jobs and queues. The Line Printer Daemon (LPD,
RFC1179), Server Message Block (SMB), and AppSocket protocols are also
supported with reduced functionality.
managing print jobs and queues. The Line Printer Daemon (LPD, RFC1179)
and AppSocket protocols are also supported with reduced functionality.
CUPS adds network printer browsing and PostScript Printer Description
("PPD")-based printing options to support real world applications under
@@ -57,7 +46,7 @@ the binary distributions from Easy Software Products:
- Digital UNIX (aka OSF1 aka Compaq Tru64 UNIX) 4.0 or higher
- HP-UX 10.20 or higher
- IRIX 5.3 or higher
- Linux 2.0 with glibc2 or higher (tested with RedHat 5.2)
- Linux 2.0 with glibc2 or higher
- Solaris 2.5 or higher (SPARC or Intel)
@@ -65,8 +54,9 @@ INSTALLING CUPS
We are currently distributing CUPS binary distributions in TAR format
with installation and removal scripts generated by our ESP Package
Manager (EPM) software, which is also included with the source
distribution.
Manager (EPM) software, which is available from:
http://www.easysw.com/epm
WARNING: Installing CUPS will overwrite your existing printing system.
Backup files are made by the installation script and restored by the
@@ -85,6 +75,20 @@ After asking you a few yes/no questions the CUPS software will be
installed and the scheduler will be started automatically.
READING THE DOCUMENTATION
Once you have installed the software you can access the documentation
(and a bunch of other stuff) on-line at:
http://localhost:631
If you're having trouble getting that far, the documentation is located
in the "/usr/share/cups/doc" directory in the binary distributions, and
under the "doc" directory in the source archives.
Please read the documentation before asking questions.
SETTING UP PRINTER QUEUES
CUPS works best with PPD (PostScript Printer Description) files. In a
@@ -161,7 +165,8 @@ REPORTING PROBLEMS
If you have problems, please send an email to cups-support@cups.org.
Include your operating system and version, compiler and version, and
any errors or problems you've run into.
any errors or problems you've run into. If you are running a version
of Linux, be sure to provide the Linux distribution you have, too.
OTHER RESOURCES
+12 -15
Ver Arquivo
@@ -24,8 +24,8 @@
include ../Makedefs
TARGETS = ipp lpd parallel serial smb socket
OBJS = ipp.o lpd.o parallel.o serial.o socket.o
TARGETS = betest ipp lpd parallel serial socket
OBJS = betest.o ipp.o lpd.o parallel.o serial.o socket.o
#
# Make all targets...
@@ -50,6 +50,16 @@ install:
-$(LN) ipp $(SERVERROOT)/backend/http
$(CHMOD) u+s $(SERVERROOT)/backend/lpd
#
# betest
#
betest: betest.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o betest betest.o $(LIBS)
betest.o: ../cups/string.h ../Makedefs
#
# ipp
#
@@ -91,19 +101,6 @@ serial: serial.o ../cups/$(LIBCUPS)
serial.o: ../cups/cups.h ../Makedefs
#
# smb
#
# Note: reading through these commands is a good way to get a headache... :)
#
smb: smb.sh ../Makedefs
echo Generating $@...
$(RM) smb
sedcmd="1,\$$s/^SMBCLIENT=.\*/SMBCLIENT=`echo $(SMBCLIENT) | sed -e '1,$$s/\\//\\\\\\//g'`/" ;\
$(SED) -e "$$sedcmd" <smb.sh >smb
$(CHMOD) +x smb
#
# socket
#
+85
Ver Arquivo
@@ -0,0 +1,85 @@
/*
* "$Id$"
*
* Backend test program for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-1999 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
* copyright law. Distribution and use rights are outlined in the file
* "LICENSE" which should have been included with this file. If this
* file is missing or damaged please contact Easy Software Products
* at:
*
* Attn: CUPS Licensing Information
* Easy Software Products
* 44141 Airport View Drive, Suite 204
* Hollywood, Maryland 20636-3111 USA
*
* Voice: (301) 373-9603
* EMail: cups-info@cups.org
* WWW: http://www.cups.org
*
* Contents:
*
* main() - Run the named backend.
*/
/*
* Include necessary headers.
*/
#include <stdio.h>
#include <stdlib.h>
#include <cups/string.h>
#include <unistd.h>
/*
* 'main()' - Run the named backend.
*
* Usage:
*
* betest device-uri job-id user title copies options [file]
*/
int /* O - Exit status */
main(int argc, /* I - Number of command-line arguments (7 or 8) */
char *argv[]) /* I - Command-line arguments */
{
char backend[255]; /* Method in URI */
if (argc < 7 || argc > 8)
{
fputs("Usage: betest device-uri job-id user title copies options [file]\n",
stderr);
return (1);
}
/*
* Extract the method from the device-uri - that's the program we want to
* execute.
*/
if (sscanf(argv[1], "%254[^:]", backend) != 1)
{
fputs("betest: Bad device-uri - no colon!\n", stderr);
return (1);
}
/*
* Execute and return
*/
execl(backend, argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7],
NULL);
return (1);
}
/*
* End of "$Id$".
*/
+41 -12
Ver Arquivo
@@ -133,8 +133,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
request->request.op.operation_id = IPP_PRINT_JOB;
request->request.op.request_id = 1;
sprintf(uri, "%s://%s:%d%s", method, hostname, port, resource);
language = cupsLangDefault();
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
@@ -144,13 +142,21 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
"attributes-natural-language", NULL,
language != NULL ? language->language : "C");
snprintf(uri, sizeof(uri), "%s://%s:%d%s", method, hostname, port, resource);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, uri);
fprintf(stderr, "DEBUG: printer-uri = \"%s\"\n", uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, argv[2]);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, argv[3]);
fprintf(stderr, "DEBUG: requesting-user-name = \"%s\"\n", argv[2]);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
argv[3]);
fprintf(stderr, "DEBUG: job-name = \"%s\"\n", argv[3]);
/*
* Handle options on the command-line...
@@ -166,7 +172,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, "document-format",
NULL, "application/octet-stream");
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", atoi(argv[4]));
if (fp != stdin)
ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", atoi(argv[4]));
for (i = 0; i < num_options; i ++)
{
@@ -174,7 +181,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Skip the "raw" option - handled above...
*/
if (strcmp(options[i].name, "raw") == 0)
if (strcasecmp(options[i].name, "raw") == 0)
continue;
/*
@@ -218,7 +225,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else
{
if (strncmp(option, "no", 2) == 0)
if (strncasecmp(option, "no", 2) == 0)
{
option += 2;
n = 0;
@@ -249,9 +256,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
{
n2 = strtol(s + 1, &s, 0);
if (strcmp(s, "dpc") == 0)
if (strcasecmp(s, "dpc") == 0)
ippAddResolution(request, IPP_TAG_JOB, option, IPP_RES_PER_CM, n, n2);
else if (strcmp(s, "dpi") == 0)
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);
@@ -272,8 +279,11 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
httpClearFields(http);
httpSetField(http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
httpEncode64(password, username);
httpSetField(http, HTTP_FIELD_AUTHORIZATION, password);
if (username[0])
{
httpEncode64(password, username);
httpSetField(http, HTTP_FIELD_AUTHORIZATION, password);
}
if (fp != stdin)
{
@@ -358,8 +368,16 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
ippRead(http, response);
if (response->request.status.status_code > IPP_OK_CONFLICT)
{
ipp_attribute_t *attr;
fprintf(stderr, "ERROR: Print file was not accepted (%04x)!\n",
response->request.status.status_code);
for (attr = response->attrs; attr != NULL; attr = attr->next)
if (attr->name != NULL)
fprintf(stderr, "ERROR: attribute \"%s\"\n", attr->name);
}
else if ((job_id = ippFindAttribute(response, "job-id", IPP_TAG_INTEGER)) == NULL)
fputs("INFO: Print file accepted - job ID unknown.\n", stderr);
else
@@ -369,9 +387,15 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
else
{
response = NULL;
httpFlush(http);
fprintf(stderr, "ERROR: Print request was not accepted (%d)!\n", status);
if (status == HTTP_ERROR)
{
fprintf(stderr, "WARNING: Did not receive the IPP response (%d)\n",
errno);
status = HTTP_OK;
}
else
fprintf(stderr, "ERROR: Print request was not accepted (%d)!\n", status);
}
break;
@@ -392,7 +416,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*/
if (fp != stdin)
{
if (status == HTTP_OK)
fprintf(stderr, "PAGE: 1 %d\n", atoi(argv[4]));
fclose(fp);
}
/*
* Return the queue status...
+24 -9
Ver Arquivo
@@ -125,7 +125,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
fclose(fp);
}
else
strcpy(filename, argv[6]);
{
strncpy(filename, argv[6], sizeof(filename) - 1);
filename[sizeof(filename) - 1] = '\0';
}
/*
* Extract the hostname and printer name from the URI...
@@ -137,8 +140,17 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Queue the job...
*/
status = lpd_queue(hostname, resource + 1, filename,
argv[2] /* user */, atoi(argv[4]) /* copies */);
if (argc > 6)
{
status = lpd_queue(hostname, resource + 1, filename,
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 */, 1);
/*
* Remove the temporary file if necessary...
@@ -175,7 +187,7 @@ lpd_command(int fd, /* I - Socket connection to LPD host */
*/
va_start(ap, format);
bytes = vsprintf(buf, format, ap);
bytes = vsnprintf(buf, sizeof(buf), format, ap);
va_end(ap);
fprintf(stderr, "DEBUG: lpd_command %02.2x %s", buf[0], buf + 1);
@@ -308,19 +320,22 @@ 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 */
sprintf(control, "H%s\nP%s\n", localhost, user);
snprintf(control, sizeof(control), "H%s\nP%s\n", localhost, user);
cptr = control + strlen(control);
while (copies > 0)
{
sprintf(cptr, "ldfA%03.3d%s\n", getpid() % 1000, localhost);
snprintf(cptr, sizeof(control) - (cptr - control), "ldfA%03.3d%s\n",
getpid() % 1000, localhost);
cptr += strlen(cptr);
copies --;
}
sprintf(cptr, "UdfA%03.3d%s\nNdfA%03.3d%s\n",
getpid() % 1000, localhost,
getpid() % 1000, localhost);
snprintf(cptr, sizeof(control) - (cptr - control),
"UdfA%03.3d%s\nNdfA%03.3d%s\n",
getpid() % 1000, localhost,
getpid() % 1000, localhost);
fprintf(stderr, "DEBUG: Control file is:\n%s", control);
+30 -13
Ver Arquivo
@@ -63,6 +63,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*options; /* Pointer to options */
int port; /* Port number (not used) */
FILE *fp; /* Print file */
int copies; /* Number of copies to print */
int fd; /* Parallel device */
int error; /* Error code (if any) */
size_t nbytes, /* Number of bytes written */
@@ -83,7 +84,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*/
if (argc == 6)
fp = stdin;
{
fp = stdin;
copies = 1;
}
else
{
/*
@@ -95,6 +99,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
perror("ERROR: unable to open print file");
return (1);
}
copies = atoi(argv[4]);
}
/*
@@ -143,23 +149,34 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Finally, send the print file...
*/
tbytes = 0;
while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0)
while (copies > 0)
{
/*
* Write the print data to the printer...
*/
copies --;
if (write(fd, buffer, nbytes) < nbytes)
if (fp != stdin)
{
perror("ERROR: Unable to send print file to printer");
break;
fputs("PAGE: 1 1\n", stderr);
rewind(fp);
}
else
tbytes += nbytes;
if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %u bytes...\n", tbytes);
tbytes = 0;
while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0)
{
/*
* Write the print data to the printer...
*/
if (write(fd, buffer, nbytes) < nbytes)
{
perror("ERROR: Unable to send print file to printer");
break;
}
else
tbytes += nbytes;
if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %u bytes...\n", tbytes);
}
}
/*
+30 -13
Ver Arquivo
@@ -66,6 +66,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*ptr; /* Pointer into name or value */
int port; /* Port number (not used) */
FILE *fp; /* Print file */
int copies; /* Number of copies to print */
int fd; /* Parallel device */
int error; /* Error code (if any) */
size_t nbytes, /* Number of bytes written */
@@ -86,7 +87,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*/
if (argc == 6)
fp = stdin;
{
fp = stdin;
copies = 1;
}
else
{
/*
@@ -98,6 +102,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
perror("ERROR: unable to open print file");
return (1);
}
copies = atoi(argv[4]);
}
/*
@@ -261,23 +267,34 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Finally, send the print file...
*/
tbytes = 0;
while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0)
while (copies > 0)
{
/*
* Write the print data to the printer...
*/
copies --;
if (write(fd, buffer, nbytes) < nbytes)
if (fp != stdin)
{
perror("ERROR: Unable to send print file to printer");
break;
fputs("PAGE: 1 1\n", stderr);
rewind(fp);
}
else
tbytes += nbytes;
if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %u bytes...\n", tbytes);
tbytes = 0;
while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0)
{
/*
* Write the print data to the printer...
*/
if (write(fd, buffer, nbytes) < nbytes)
{
perror("ERROR: Unable to send print file to printer");
break;
}
else
tbytes += nbytes;
if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %u bytes...\n", tbytes);
}
}
/*
-88
Ver Arquivo
@@ -1,88 +0,0 @@
#!/bin/sh
#
# "$Id$"
#
# SMB printing script for the Common UNIX Printing System (CUPS).
#
# Copyright 1993-1999 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
# property of Easy Software Products and are protected by Federal
# copyright law. Distribution and use rights are outlined in the file
# "LICENSE.txt" which should have been included with this file. If this
# file is missing or damaged please contact Easy Software Products
# at:
#
# Attn: CUPS Licensing Information
# Easy Software Products
# 44145 Airport View Drive, Suite 204
# Hollywood, Maryland 20636-3111 USA
#
# Voice: (301) 373-9603
# EMail: cups-info@cups.org
# WWW: http://www.cups.org
#
SMBCLIENT=/usr/local/samba/bin/smbclient
#
# Usage:
#
# printer job user title copies options [filename]
#
if [ $# -lt 5 -o $# -gt 6 ]; then
# Too few or too many arguments
echo 'Usage: smb job-id user title copies options [file]' >&2
exit 1
fi
#
# If "filename" is not on the command-line, then we read the print
# data from stdin and write it to a temporary file.
#
if [ $# = 5 ]; then
# Collect all print data and put it in a temporary file...
if [ "$TMPDIR" = "" ]; then
TMPDIR=/var/tmp
fi
filename="$TMPDIR/$$.smb"
cat >$filename
else
# Use the file on the command-line...
filename="$6"
fi
#
# Take apart the URI in $0...
#
uri="$0"
host=`echo $uri | awk -F/ '{print substr($3, index($3, "@") + 1)}'`
user=`echo $uri | awk -F/ '{print substr($3, 0, index($3, "@") - 1)}'`
if [ "$user" != "" ]; then
user="-U $user"
fi
printer=`echo $uri | awk -F/ '{print $4}'`
#
# Send the file to the remote system...
#
$SMBCLIENT //$host/$printer $user -P -N <<EOF
print $filename
EOF
#
# Lastly, remove the temporary file as needed...
#
if [ $# = 5 ]; then
rm -f $filename
fi
#
# End of "$Id$".
#
+85 -63
Ver Arquivo
@@ -66,6 +66,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
username[255], /* Username info (not used) */
resource[1024]; /* Resource info (not used) */
FILE *fp; /* Print file */
int copies; /* Number of copies to print */
int port; /* Port number */
int fd; /* AppSocket */
int error; /* Error code (if any) */
@@ -93,7 +94,10 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
*/
if (argc == 6)
fp = stdin;
{
fp = stdin;
copies = 1;
}
else
{
/*
@@ -105,6 +109,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
perror("ERROR: unable to open print file");
return (1);
}
copies = atoi(argv[4]);
}
/*
@@ -135,91 +141,107 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
addr.sin_family = hostaddr->h_addrtype;
addr.sin_port = htons(port);
for (;;)
while (copies > 0)
{
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
for (;;)
{
perror("ERROR: Unable to connect to printer");
return (1);
}
if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
{
error = errno;
close(fd);
fd = -1;
if (error == ECONNREFUSED)
{
fprintf(stderr, "INFO: Network host \'%s\' is busy; will retry in 30 seconds...\n",
hostname);
sleep(30);
}
else
if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
{
perror("ERROR: Unable to connect to printer");
return (1);
return (1);
}
}
else
break;
}
/*
* Finally, send the print file...
*/
fputs("INFO: Connected to host, sending print job...\n", stderr);
tbytes = 0;
while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0)
{
/*
* Write the print data to the printer...
*/
tbytes += nbytes;
bufptr = buffer;
while (nbytes > 0)
{
if ((wbytes = send(fd, bufptr, nbytes, 0)) < 0)
if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
{
perror("ERROR: Unable to send print file to printer");
break;
}
error = errno;
close(fd);
fd = -1;
nbytes -= wbytes;
bufptr += wbytes;
if (error == ECONNREFUSED)
{
fprintf(stderr, "INFO: Network host \'%s\' is busy; will retry in 30 seconds...\n",
hostname);
sleep(30);
}
else
{
perror("ERROR: Unable to connect to printer");
return (1);
}
}
else
break;
}
/*
* Check for possible data coming back from the printer...
* Finally, send the print file...
*/
timeout.tv_sec = 0;
timeout.tv_usec = 0;
FD_ZERO(&input);
FD_SET(fd, &input);
if (select(fd + 1, &input, NULL, NULL, &timeout) > 0)
copies --;
if (fp != stdin)
{
fputs("PAGE: 1 1\n", stderr);
rewind(fp);
}
fputs("INFO: Connected to host, sending print job...\n", stderr);
tbytes = 0;
while ((nbytes = fread(buffer, 1, sizeof(buffer), fp)) > 0)
{
/*
* Grab the data coming back and spit it out to stderr...
* Write the print data to the printer...
*/
if ((nbytes = recv(fd, buffer, sizeof(buffer), 0)) > 0)
fprintf(stderr, "INFO: Received %u bytes of back-channel data!\n",
nbytes);
tbytes += nbytes;
bufptr = buffer;
while (nbytes > 0)
{
if ((wbytes = send(fd, bufptr, nbytes, 0)) < 0)
{
perror("ERROR: Unable to send print file to printer");
break;
}
nbytes -= wbytes;
bufptr += wbytes;
}
/*
* Check for possible data coming back from the printer...
*/
timeout.tv_sec = 0;
timeout.tv_usec = 0;
FD_ZERO(&input);
FD_SET(fd, &input);
if (select(fd + 1, &input, NULL, NULL, &timeout) > 0)
{
/*
* Grab the data coming back and spit it out to stderr...
*/
if ((nbytes = recv(fd, buffer, sizeof(buffer), 0)) > 0)
fprintf(stderr, "INFO: Received %u bytes of back-channel data!\n",
nbytes);
}
else if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %u bytes...\n", tbytes);
}
else if (argc > 6)
fprintf(stderr, "INFO: Sending print file, %u bytes...\n", tbytes);
/*
* Close the socket connection...
*/
close(fd);
}
/*
* Close the socket connection and input file and return...
* Close the input file and return...
*/
close(fd);
if (fp != stdin)
fclose(fp);
+10 -1
Ver Arquivo
@@ -411,7 +411,8 @@ show_status(http_t *http, /* I - HTTP connection to server */
"attributes-natural-language", NULL,
language->language);
sprintf(printer_uri, "ipp://localhost/printers/%s", printer);
snprintf(printer_uri, sizeof(printer_uri),
"ipp://localhost/printers/%s", printer);
attr = ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, printer_uri);
@@ -433,7 +434,15 @@ show_status(http_t *http, /* I - HTTP connection to server */
if (strncmp(device, "file:", 5) == 0)
printf("\tprinter is on device \'%s\' speed -1\n", device + 5);
else
{
/*
* Just show the method...
*/
*strchr(device, ':') = '\0';
printf("\tprinter is on device \'%s\' speed -1\n", device);
}
printf("\tqueuing is %sabled\n", accepting ? "en" : "dis");
printf("\tprinting is %sabled\n",
pstate == IPP_PRINTER_STOPPED ? "dis" : "en");
+5 -5
Ver Arquivo
@@ -219,7 +219,7 @@ show_jobs(http_t *http, /* I - HTTP connection to server */
}
else
{
sprintf(resource, "ipp://localhost/printers/%s", dest);
snprintf(resource, sizeof(resource), "ipp://localhost/printers/%s", dest);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri",
NULL, resource);
@@ -237,7 +237,7 @@ show_jobs(http_t *http, /* I - HTTP connection to server */
*/
if (!longstatus)
puts("Rank\tPri Owner Job Files Total Size");
puts("Rank\tPri Owner Job Files Total Size");
jobcount = 0;
@@ -338,7 +338,7 @@ show_jobs(http_t *http, /* I - HTTP connection to server */
}
printf("[job %03dlocalhost]\n", jobid);
printf("\t%-33s%d bytes\n", jobname, jobsize);
printf("\t%-32.32s %d bytes\n", jobname, jobsize);
}
else
{
@@ -350,8 +350,8 @@ show_jobs(http_t *http, /* I - HTTP connection to server */
rank ++;
}
printf(" %-5d%-7.7s%-7d%-19s%d bytes\n", jobpriority, jobuser, jobid,
jobname, jobsize);
printf(" %-4d %-10.10s %-6d %-18.18s %d bytes\n", jobpriority, jobuser,
jobid, jobname, jobsize);
}
if (attr == NULL)
break;
+46 -4
Ver Arquivo
@@ -23,7 +23,8 @@
*
* Contents:
*
* main() - Parse options and send files for printing.
* main() - Parse options and send files for printing.
* sighandler() - Signal catcher for when we print from stdin...
*/
/*
@@ -35,6 +36,25 @@
#include <cups/cups.h>
#ifndef WIN32
# include <signal.h>
/*
* Local functions.
*/
void sighandler(void);
#endif /* !WIN32 */
/*
* Globals...
*/
char tempfile[1024]; /* Temporary file for printing from stdin */
/*
* 'main()' - Parse options and send files for printing.
*/
@@ -54,7 +74,6 @@ main(int argc, /* I - Number of command-line arguments */
cups_option_t *options; /* Options */
int silent, /* Silent or verbose output? */
deletefile; /* Delete file after print? */
char tempfile[1024]; /* Temporary file for printing from stdin */
char buffer[8192]; /* Copy buffer */
FILE *temp; /* Temporary file pointer */
@@ -190,7 +209,8 @@ main(int argc, /* I - Number of command-line arguments */
if (job_id < 1)
{
fprintf(stderr, "lpr: unable to print file \'%s\'.\n", argv[i]);
fprintf(stderr, "lpr: unable to print file \'%s\' - error code %x.\n",
argv[i], cupsLastError());
return (1);
}
else if (deletefile)
@@ -209,6 +229,10 @@ main(int argc, /* I - Number of command-line arguments */
return (1);
}
#ifndef WIN32
signal(SIGTERM, sighandler);
#endif /* !WIN32 */
temp = fopen(cupsTempFile(tempfile, sizeof(tempfile)), "w");
if (temp == NULL)
@@ -238,7 +262,8 @@ main(int argc, /* I - Number of command-line arguments */
if (job_id < 1)
{
fputs("lpr: unable to print standard input.\n", stderr);
fprintf(stderr, "lpr: unable to print standard input - error code %x.\n",
cupsLastError());
return (1);
}
}
@@ -247,6 +272,23 @@ main(int argc, /* I - Number of command-line arguments */
}
#ifndef WIN32
/*
* 'sighandler()' - Signal catcher for when we print from stdin...
*/
void
sighandler(void)
{
/*
* Remove the temporary file we're using to print from stdin...
*/
unlink(tempfile);
}
#endif /* !WIN32 */
/*
* End of "$Id$".
*/
+21 -5
Ver Arquivo
@@ -65,6 +65,7 @@ main(int argc, /* I - Number of command-line arguments */
job_id = 0;
dest = cupsGetDefault();
response = NULL;
http = NULL;
/*
* Open a connection to the server...
@@ -146,7 +147,7 @@ main(int argc, /* I - Number of command-line arguments */
if (dest)
{
sprintf(uri, "ipp://localhost/printers/%s", dest);
snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s", dest);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id",
@@ -159,6 +160,9 @@ main(int argc, /* I - Number of command-line arguments */
uri);
}
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requesting-user-name", NULL, cupsUser());
/*
* Do the request and get back a response...
*/
@@ -170,10 +174,22 @@ main(int argc, /* I - Number of command-line arguments */
if (response != NULL)
{
if (response->request.status.status_code == IPP_NOT_FOUND)
fputs("lprm: Job or printer not found!\n", stderr);
else if (response->request.status.status_code > IPP_OK_CONFLICT)
fputs("lprm: Unable to cancel job(s)!\n", stderr);
switch (response->request.status.status_code)
{
case IPP_NOT_FOUND :
fputs("lprm: Job or printer not found!\n", stderr);
break;
case IPP_NOT_AUTHORIZED :
fputs("lprm: Not authorized to lprm job(s)!\n", stderr);
break;
case IPP_FORBIDDEN :
fprintf(stderr, "lprm: You don't own job ID %d!\n", job_id);
break;
default :
if (response->request.status.status_code > IPP_OK_CONFLICT)
fputs("lprm: Unable to lprm job(s)!\n", stderr);
break;
}
ippDelete(response);
}
+17 -15
Ver Arquivo
@@ -38,6 +38,7 @@
#include <cups/cups.h>
#include <cups/language.h>
#include <cups/debug.h>
#include <config.h>
/*
@@ -99,18 +100,22 @@ main(int argc, /* I - Number of command-line arguments */
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"10\">");
else
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">");
printf("<TITLE>%s on %s - Common UNIX Printing System</TITLE>\n",
printf("<TITLE>%s on %s - " CUPS_SVERSION "</TITLE>\n",
name == NULL ? "Classes" : name, getenv("SERVER_NAME"));
puts("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/cups.css\">");
puts("<MAP NAME=\"navbar\">");
#ifdef ESPPRINTPRO
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,76,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"88,10,158,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"170,10,210,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"222,10,354,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"366,10,442,30\" HREF=\"http://www.easysw.com/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"454,10,530,30\" HREF=\"http://www.easysw.com/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
#else
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,85,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"95,10,175,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"185,10,235,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"245,10,395,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
#ifdef ESPPRINTPRO
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.easysw.com/printpro/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"505,10,585,30\" HREF=\"http://www.easysw.com/printpro/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
#else
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.cups.org\" ALT=\"Download the Current CUPS Software\">");
#endif /* ESPPRINTPRO */
puts("</MAP>");
@@ -119,11 +124,7 @@ main(int argc, /* I - Number of command-line arguments */
puts("<P ALIGN=CENTER>");
puts("<A HREF=\"http://www.easysw.com\" ALT=\"Easy Software Products Home Page\">");
puts("<IMG SRC=\"/images/logo.gif\" WIDTH=\"71\" HEIGHT=\"40\" BORDER=0 ALT=\"Easy Software Products Home Page\"></A>");
#ifdef ESPPRINTPRO
puts("<IMG SRC=\"/images/navbar.gif\" WIDTH=\"600\" HEIGHT=\"40\" USEMAP=\"#navbar\" BORDER=0>");
#else
puts("<IMG SRC=\"/images/navbar.gif\" WIDTH=\"540\" HEIGHT=\"40\" USEMAP=\"#navbar\" BORDER=0>");
#endif /* ESPPRINTPRO */
printf("<H1>%s on %s</H1>\n", name == NULL ? "Classes" : name,
getenv("SERVER_NAME"));
@@ -215,7 +216,7 @@ show_class_list(http_t *http, /* I - HTTP connection */
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(http, request, "/classes/")) != NULL)
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
/*
* Loop through the classes returned in the list and display
@@ -296,7 +297,7 @@ show_class_info(http_t *http,
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
sprintf(uri, "ipp://localhost/classes/%s", name);
snprintf(uri, sizeof(uri), "ipp://localhost/classes/%s", name);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
@@ -304,7 +305,7 @@ show_class_info(http_t *http,
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(http, request, uri + 15)) == NULL)
if ((response = cupsDoRequest(http, request, "/")) == NULL)
{
puts("<P>Unable to communicate with CUPS server!");
return;
@@ -340,7 +341,8 @@ show_class_info(http_t *http,
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
{
strcpy(uri, "http:");
strcpy(uri + 5, strchr(attr->values[0].string.text, '/'));
strncpy(uri + 5, strchr(attr->values[0].string.text, '/'), sizeof(uri) - 6);
uri[sizeof(uri) - 1] = '\0';
}
/*
@@ -396,11 +398,11 @@ show_class_info(http_t *http,
"attributes-natural-language", NULL,
language->language);
sprintf(uri, "ipp://localhost/printers/%s", name);
snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s", name);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
jobs = cupsDoRequest(http, request, uri + 15);
jobs = cupsDoRequest(http, request, "/");
}
else
jobs = NULL;
+14 -14
Ver Arquivo
@@ -38,6 +38,7 @@
#include <cups/cups.h>
#include <cups/language.h>
#include <cups/debug.h>
#include <config.h>
/*
@@ -99,18 +100,22 @@ main(int argc, /* I - Number of command-line arguments */
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"10\">");
else
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">");
printf("<TITLE>%s on %s - Common UNIX Printing System</TITLE>\n",
printf("<TITLE>%s on %s - " CUPS_SVERSION "</TITLE>\n",
job == NULL ? "Jobs" : job, getenv("SERVER_NAME"));
puts("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/cups.css\">");
puts("<MAP NAME=\"navbar\">");
#ifdef ESPPRINTPRO
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,76,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"88,10,158,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"170,10,210,30\" HREF=\"jobs\" ALT=\"Current Jobs Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"222,10,354,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"366,10,442,30\" HREF=\"http://www.easysw.com/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"454,10,530,30\" HREF=\"http://www.easysw.com/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
#else
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,85,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"95,10,175,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"185,10,235,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"245,10,395,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
#ifdef ESPPRINTPRO
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.easysw.com/printpro/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"505,10,585,30\" HREF=\"http://www.easysw.com/printpro/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
#else
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.cups.org\" ALT=\"Download the Current CUPS Software\">");
#endif /* ESPPRINTPRO */
puts("</MAP>");
@@ -119,11 +124,7 @@ main(int argc, /* I - Number of command-line arguments */
puts("<P ALIGN=CENTER>");
puts("<A HREF=\"http://www.easysw.com\" ALT=\"Easy Software Products Home Page\">");
puts("<IMG SRC=\"/images/logo.gif\" WIDTH=\"71\" HEIGHT=\"40\" BORDER=0 ALT=\"Easy Software Products Home Page\"></A>");
#ifdef ESPPRINTPRO
puts("<IMG SRC=\"/images/navbar.gif\" WIDTH=\"600\" HEIGHT=\"40\" USEMAP=\"#navbar\" BORDER=0>");
#else
puts("<IMG SRC=\"/images/navbar.gif\" WIDTH=\"540\" HEIGHT=\"40\" USEMAP=\"#navbar\" BORDER=0>");
#endif /* ESPPRINTPRO */
fflush(stdout);
@@ -216,7 +217,7 @@ show_job_list(http_t *http, /* I - HTTP connection */
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(http, request, "/jobs/")) != NULL)
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
/*
* Do a table for the jobs...
@@ -385,14 +386,14 @@ show_job_info(http_t *http, /* I - Server connection */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
sprintf(uri, "ipp://localhost/jobs/%s", name);
snprintf(uri, sizeof(uri), "ipp://localhost/jobs/%s", name);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri);
/*
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(http, request, uri + 15)) == NULL)
if ((response = cupsDoRequest(http, request, "/")) == NULL)
{
puts("<P>Unable to communicate with CUPS server!");
return;
@@ -506,8 +507,7 @@ show_job_info(http_t *http, /* I - Server connection */
for (attr = response->attrs; attr != NULL; attr = attr->next)
{
if (attr->group_tag != IPP_TAG_JOB &&
attr->group_tag != IPP_TAG_EXTENSION)
if (attr->group_tag != IPP_TAG_JOB)
continue;
if (strcmp(attr->name, "job-uri") == 0 ||
+17 -15
Ver Arquivo
@@ -38,6 +38,7 @@
#include <cups/cups.h>
#include <cups/language.h>
#include <cups/debug.h>
#include <config.h>
/*
@@ -99,18 +100,22 @@ main(int argc, /* I - Number of command-line arguments */
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"10\">");
else
puts("<META HTTP-EQUIV=\"Refresh\" CONTENT=\"30\">");
printf("<TITLE>%s on %s - Common UNIX Printing System</TITLE>\n",
printf("<TITLE>%s on %s - " CUPS_SVERSION "</TITLE>\n",
printer == NULL ? "Printers" : printer, getenv("SERVER_NAME"));
puts("<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"/cups.css\">");
puts("<MAP NAME=\"navbar\">");
#ifdef ESPPRINTPRO
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,76,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"88,10,158,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"170,10,210,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"222,10,354,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"366,10,442,30\" HREF=\"http://www.easysw.com/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"454,10,530,30\" HREF=\"http://www.easysw.com/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
#else
puts("<AREA SHAPE=\"RECT\" COORDS=\"10,10,85,30\" HREF=\"/printers\" ALT=\"Current Printer Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"95,10,175,30\" HREF=\"/classes\" ALT=\"Current Printer Classes Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"185,10,235,30\" HREF=\"/jobs\" ALT=\"Current Jobs Status\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"245,10,395,30\" HREF=\"/documentation.html\" ALT=\"Read CUPS Documentation On-Line\">");
#ifdef ESPPRINTPRO
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.easysw.com/printpro/software.html\" ALT=\"Download the Current ESP Print Pro Software\">");
puts("<AREA SHAPE=\"RECT\" COORDS=\"505,10,585,30\" HREF=\"http://www.easysw.com/printpro/support.html\" ALT=\"Get Tech Support for Current ESP Print Pro\">");
#else
puts("<AREA SHAPE=\"RECT\" COORDS=\"405,10,490,30\" HREF=\"http://www.cups.org\" ALT=\"Download the Current CUPS Software\">");
#endif /* ESPPRINTPRO */
puts("</MAP>");
@@ -119,11 +124,7 @@ main(int argc, /* I - Number of command-line arguments */
puts("<P ALIGN=CENTER>");
puts("<A HREF=\"http://www.easysw.com\" ALT=\"Easy Software Products Home Page\">");
puts("<IMG SRC=\"/images/logo.gif\" WIDTH=\"71\" HEIGHT=\"40\" BORDER=0 ALT=\"Easy Software Products Home Page\"></A>");
#ifdef ESPPRINTPRO
puts("<IMG SRC=\"/images/navbar.gif\" WIDTH=\"600\" HEIGHT=\"40\" USEMAP=\"#navbar\" BORDER=0>");
#else
puts("<IMG SRC=\"/images/navbar.gif\" WIDTH=\"540\" HEIGHT=\"40\" USEMAP=\"#navbar\" BORDER=0>");
#endif /* ESPPRINTPRO */
printf("<H1>%s on %s</H1>\n", printer == NULL ? "Printers" : printer,
getenv("SERVER_NAME"));
@@ -215,7 +216,7 @@ show_printer_list(http_t *http, /* I - HTTP connection */
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(http, request, "/printers/")) != NULL)
if ((response = cupsDoRequest(http, request, "/")) != NULL)
{
/*
* Loop through the printers returned in the list and display
@@ -296,7 +297,7 @@ show_printer_info(http_t *http,
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
sprintf(uri, "ipp://localhost/printers/%s", name);
snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s", name);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
@@ -304,7 +305,7 @@ show_printer_info(http_t *http,
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(http, request, uri + 15)) == NULL)
if ((response = cupsDoRequest(http, request, "/")) == NULL)
{
puts("<P>Unable to communicate with CUPS server!");
return;
@@ -340,7 +341,8 @@ show_printer_info(http_t *http,
if ((attr = ippFindAttribute(response, "printer-uri-supported", IPP_TAG_URI)) != NULL)
{
strcpy(uri, "http:");
strcpy(uri + 5, strchr(attr->values[0].string.text, '/'));
strncpy(uri + 5, strchr(attr->values[0].string.text, '/'), sizeof(uri) - 6);
uri[sizeof(uri) - 1] = '\0';
}
/*
@@ -398,11 +400,11 @@ show_printer_info(http_t *http,
"attributes-natural-language", NULL,
language->language);
sprintf(uri, "ipp://localhost/printers/%s", name);
snprintf(uri, sizeof(uri), "ipp://localhost/printers/%s", name);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
jobs = cupsDoRequest(http, request, uri + 15);
jobs = cupsDoRequest(http, request, "/");
}
else
jobs = NULL;
+9 -2
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: classes.conf 333 1999-05-17 18:03:40Z mike $"
# "$Id: classes.conf 678 1999-09-22 18:10:55Z mike $"
#
# Sample class configuration file for the Common UNIX Printing System
# (CUPS) scheduler.
@@ -59,6 +59,13 @@
#Location Room 101 in the activities building
#
# Accepting: is the class accepting jobs?
#
#Accepting Yes
#Accepting No
#
#
# Printer: adds a printer to the class.
#
@@ -68,5 +75,5 @@
#</Class>
#
# End of "$Id: classes.conf 333 1999-05-17 18:03:40Z mike $".
# End of "$Id: classes.conf 678 1999-09-22 18:10:55Z mike $".
#
+2
Ver Arquivo
@@ -0,0 +1,2 @@
# This is a dummy printcap file that is automatically generated by the
# CUPS software for old applications that rely on it.
+10 -3
Ver Arquivo
@@ -1,5 +1,5 @@
#
# "$Id: printers.conf 334 1999-05-17 18:11:26Z mike $"
# "$Id: printers.conf 678 1999-09-22 18:10:55Z mike $"
#
# Sample printer configuration file for the Common UNIX Printing System
# (CUPS) scheduler.
@@ -77,13 +77,20 @@
# State: sets the initial state of the printer. Can be one of the
# following:
#
# Idle - Printer is available to accept new jobs.
# Idle - Printer is available to print new jobs.
# Stopped - Printer is disabled but accepting new jobs.
#
#State Idle
#
# Accepting: is the printer accepting jobs?
#
#Accepting Yes
#Accepting No
#</Printer>
#
# End of "$Id: printers.conf 334 1999-05-17 18:11:26Z mike $".
# End of "$Id: printers.conf 678 1999-09-22 18:10:55Z mike $".
#
+8 -1
Ver Arquivo
@@ -28,7 +28,7 @@
* Version of software...
*/
#define CUPS_SVERSION "CUPS v1.0b9"
#define CUPS_SVERSION "CUPS v1.0.2"
/*
* Where are files stored?
@@ -82,6 +82,13 @@
#undef HAVE_STRCASECMP
#undef HAVE_STRNCASECMP
/*
* Do we have the (v)snprintf() functions?
*/
#undef HAVE_SNPRINTF
#undef HAVE_VSNPRINTF
/*
* What signal functions to use?
*/
+22 -14
Ver Arquivo
@@ -45,8 +45,8 @@ CFLAGS="${CFLAGS:=}"
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],[if eval "test x$enable_debug = xyes"; then
OPTIM="-g "
fi])
AC_ARG_ENABLE(shared, [ --disable-shared turn off shared libraries [default=no]])
if test "$disable_shared" != "yes"; then
AC_ARG_ENABLE(shared, [ --enable-shared turn on shared libraries [default=yes]])
if test "$enable_shared" != "no"; then
case "$uname" in
SunOS* | UNIX_S*)
LIBCUPS="libcups.so.1"
@@ -58,7 +58,12 @@ if test "$disable_shared" != "yes"; then
LIBCUPSIMAGE="libcupsimage.sl.1"
DSO="ld -b -z +h \$@ -o"
;;
OSF1* | Linux* | FreeBSD*)
FreeBSD* | NetBSD* | OpenBSD*)
LIBCUPS="libcups.so.1"
LIBCUPSIMAGE="libcupsimage.so.1"
DSO="\$(CC) -Wl,-soname,\$@ -shared \$(OPTIM) -o"
;;
OSF1* | Linux*)
LIBCUPS="libcups.so.1"
LIBCUPSIMAGE="libcupsimage.so.1"
DSO="\$(CC) -Wl,-soname,\$@ -shared \$(OPTIM) -o"
@@ -120,12 +125,6 @@ fi
AC_SUBST(CAT)
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(SED,sed)
AC_PATH_PROG(SMBCLIENT,smbclient)
if test "$SMBCLIENT" = ""; then
echo "Looking for smbclient in standard locations..."
AC_PATH_PROG(SMBCLIENT,smbclient,samba_not_detected,
/usr/samba/bin:/usr/local/samba/bin:/usr/freeware/samba/bin:/opt/samba/bin)
fi
dnl Architecture checks...
AC_C_BIGENDIAN
@@ -160,16 +159,23 @@ AC_SUBST(LIBPNG)
AC_SUBST(LIBTIFF)
AC_SUBST(LIBZ)
AC_CHECK_HEADER(jpeglib.h,
dnl AC_CHECK_HEADER(jpeglib.h,
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
AC_DEFINE(HAVE_LIBJPEG)
LIBJPEG="-ljpeg")
AC_CHECK_HEADER(png.h,
dnl AC_CHECK_HEADER(png.h,
AC_CHECK_LIB(png, png_read_info,
AC_DEFINE(HAVE_LIBPNG)
LIBPNG="-lpng")
AC_CHECK_HEADER(tiff.h,
dnl AC_CHECK_HEADER(tiff.h,
AC_CHECK_LIB(tiff, TIFFReadScanline,
AC_DEFINE(HAVE_LIBTIFF)
LIBTIFF="-ltiff")
AC_CHECK_HEADER(zlib.h,
dnl AC_CHECK_HEADER(zlib.h,
AC_CHECK_LIB(z, deflateInit,
AC_DEFINE(HAVE_LIBZ)
LIBZ="-lz")
@@ -182,6 +188,8 @@ dnl Checks for string functions.
AC_CHECK_FUNCS(strdup)
AC_CHECK_FUNCS(strcasecmp)
AC_CHECK_FUNCS(strncasecmp)
AC_CHECK_FUNCS(snprintf)
AC_CHECK_FUNCS(vsnprintf)
dnl Checks for signal functions.
AC_CHECK_FUNCS(sigset)
@@ -194,7 +202,7 @@ AC_CHECK_FUNCS(wait3)
dnl Update compiler options...
if test -n "$GXX"; then
if test -z "$OPTIM"; then
OPTIM="-O2"
OPTIM="-O2"
fi
if test $PICFLAG = 1; then
OPTIM="-fPIC $OPTIM"
+317
Ver Arquivo
@@ -0,0 +1,317 @@
#
# "$Id: cups.list 775 1999-11-04 13:35:01Z mike $"
#
# ESP Package Manager (EPM) file list for the Common UNIX Printing
# System (CUPS).
#
# EPM can be found in the "epm" subdirectory of this distribution.
# Please report problems and fixes to "epm@easysw.com".
#
# Copyright 1997-1999 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
# property of Easy Software Products and are protected by Federal
# copyright law. Distribution and use rights are outlined in the file
# "LICENSE.txt" which should have been included with this file. If this
# file is missing or damaged please contact Easy Software Products
# at:
#
# Attn: CUPS Licensing Information
# Easy Software Products
# 44141 Airport View Drive, Suite 204
# Hollywood, Maryland 20636-3111 USA
#
# Voice: (301) 373-9603
# EMail: cups-info@cups.org
# WWW: http://www.cups.org
#
%product Common UNIX Printing System
%copyright 1993-1999 by Easy Software Products, All Rights Reserved.
%vendor Easy Software Products
%license LICENSE.cups
%readme README.cups
%version 1.0.2
%incompat printpro
%system all
# Server files
f 0555 root sys /var/cups/backend/ipp backend/ipp
l 0555 root sys /var/cups/backend/http ipp
f 4550 root sys /var/cups/backend/lpd backend/lpd
f 0555 root sys /var/cups/backend/parallel backend/parallel
f 0555 root sys /var/cups/backend/serial backend/serial
f 0555 root sys /var/cups/backend/socket backend/socket
f 0500 root sys /usr/sbin/cupsd scheduler/cupsd
f 0555 root sys /var/cups/cgi-bin/classes.cgi cgi-bin/classes.cgi
f 0555 root sys /var/cups/cgi-bin/jobs.cgi cgi-bin/jobs.cgi
f 0555 root sys /var/cups/cgi-bin/printers.cgi cgi-bin/printers.cgi
f 0555 root sys /var/cups/filter/pstoraster pstoraster/pstoraster
l 0555 root sys /var/cups/filter/pdftops pstoraster
f 0555 root sys /var/cups/filter/imagetops filter/imagetops
f 0555 root sys /var/cups/filter/pstops filter/pstops
f 0555 root sys /var/cups/filter/texttops filter/texttops
f 0555 root sys /var/cups/filter/rastertohp filter/rastertohp
f 0555 root sys /var/cups/filter/hpgltops filter/hpgltops
f 0555 root sys /var/cups/filter/imagetoraster filter/imagetoraster
# Admin commands
l 0555 root sys /usr/bin/disable /usr/sbin/accept
l 0555 root sys /usr/bin/enable /usr/sbin/accept
l 0555 root sys /usr/lib/accept /usr/sbin/accept
l 0555 root sys /usr/lib/lpadmin /usr/sbin/lpadmin
l 0555 root sys /usr/lib/reject accept
f 0555 root sys /usr/sbin/accept systemv/accept
f 0555 root sys /usr/sbin/esplicense license/esplicense
f 0555 root sys /usr/sbin/lpadmin systemv/lpadmin
f 0555 root sys /usr/sbin/lpc berkeley/lpc
l 0555 root sys /usr/sbin/reject accept
# User commands
f 0555 root sys /usr/bin/cancel systemv/cancel
f 0555 root sys /usr/bin/lp systemv/lp
f 0555 root sys /usr/bin/lpq berkeley/lpq
f 0555 root sys /usr/bin/lpr berkeley/lpr
f 0555 root sys /usr/bin/lprm berkeley/lprm
f 0555 root sys /usr/bin/lpstat systemv/lpstat
f 0555 root sys /usr/bin/lpwin gui/lpwin
# DSOs
%system hpux
f 0555 root sys /usr/lib/libcups.sl.1 cups/libcups.sl.1
l 0555 root sys /usr/lib/libcups.sl libcups.sl.1
f 0555 root sys /usr/lib/libcupsimage.sl.1 filter/libcupsimage.sl.1
l 0555 root sys /usr/lib/libcupsimage.sl libcupsimage.sl.1
%system irix-6.5
f 0555 root sys /usr/lib32/libcups.so.1 cups/libcups.so.1
l 0555 root sys /usr/lib32/libcups.so libcups.so.1
f 0555 root sys /usr/lib32/libcupsimage.so.1 filter/libcupsimage.so.1
l 0555 root sys /usr/lib32/libcupsimage.so libcupsimage.so.1
%system !irix-6.5 !hpux
f 0555 root sys /usr/lib/libcups.so.1 cups/libcups.so.1
l 0555 root sys /usr/lib/libcups.so libcups.so.1
f 0555 root sys /usr/lib/libcupsimage.so.1 filter/libcupsimage.so.1
l 0555 root sys /usr/lib/libcupsimage.so libcupsimage.so.1
%system all
# Directories
d 0755 root sys /var/cups/interfaces
d 0755 root sys /var/cups/logs
d 0755 root sys /var/cups/ppd
d 0755 root sys /var/cups/requests
# Data files
f 0444 root sys /usr/lib/locale/C/cups_C locale/C/cups_C
f 0444 root sys /usr/lib/locale/de/cups_de locale/de/cups_de
f 0444 root sys /usr/lib/locale/en/cups_en locale/en/cups_en
f 0444 root sys /usr/lib/locale/es/cups_es locale/es/cups_es
f 0444 root sys /usr/lib/locale/fr/cups_fr locale/fr/cups_fr
f 0444 root sys /usr/lib/locale/it/cups_it locale/it/cups_it
f 0444 root sys /usr/share/cups/data/8859-1 data/8859-1
f 0444 root sys /usr/share/cups/data/8859-14 data/8859-14
f 0444 root sys /usr/share/cups/data/8859-15 data/8859-15
f 0444 root sys /usr/share/cups/data/8859-2 data/8859-2
f 0444 root sys /usr/share/cups/data/8859-3 data/8859-3
f 0444 root sys /usr/share/cups/data/8859-4 data/8859-4
f 0444 root sys /usr/share/cups/data/8859-5 data/8859-5
f 0444 root sys /usr/share/cups/data/8859-6 data/8859-6
f 0444 root sys /usr/share/cups/data/8859-7 data/8859-7
f 0444 root sys /usr/share/cups/data/8859-8 data/8859-8
f 0444 root sys /usr/share/cups/data/8859-9 data/8859-9
f 0444 root sys /usr/share/cups/data/HPGLprolog data/HPGLprolog
f 0444 root sys /usr/share/cups/data/psglyphs data/psglyphs
f 0444 root sys /usr/share/cups/fonts/AvantGarde-Book fonts/AvantGarde-Book
f 0444 root sys /usr/share/cups/fonts/AvantGarde-BookOblique fonts/AvantGarde-BookOblique
f 0444 root sys /usr/share/cups/fonts/AvantGarde-Demi fonts/AvantGarde-Demi
f 0444 root sys /usr/share/cups/fonts/AvantGarde-DemiOblique fonts/AvantGarde-DemiOblique
f 0444 root sys /usr/share/cups/fonts/Bookman-Demi fonts/Bookman-Demi
f 0444 root sys /usr/share/cups/fonts/Bookman-DemiItalic fonts/Bookman-DemiItalic
f 0444 root sys /usr/share/cups/fonts/Bookman-Light fonts/Bookman-Light
f 0444 root sys /usr/share/cups/fonts/Bookman-LightItalic fonts/Bookman-LightItalic
f 0444 root sys /usr/share/cups/fonts/Courier fonts/Courier
f 0444 root sys /usr/share/cups/fonts/Courier-Bold fonts/Courier-Bold
f 0444 root sys /usr/share/cups/fonts/Courier-BoldOblique fonts/Courier-BoldOblique
f 0444 root sys /usr/share/cups/fonts/Courier-Oblique fonts/Courier-Oblique
f 0444 root sys /usr/share/cups/fonts/Helvetica fonts/Helvetica
f 0444 root sys /usr/share/cups/fonts/Helvetica-Bold fonts/Helvetica-Bold
f 0444 root sys /usr/share/cups/fonts/Helvetica-BoldOblique fonts/Helvetica-BoldOblique
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow fonts/Helvetica-Narrow
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow-Bold fonts/Helvetica-Narrow-Bold
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow-BoldOblique fonts/Helvetica-Narrow-BoldOblique
f 0444 root sys /usr/share/cups/fonts/Helvetica-Narrow-Oblique fonts/Helvetica-Narrow-Oblique
f 0444 root sys /usr/share/cups/fonts/Helvetica-Oblique fonts/Helvetica-Oblique
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-Bold fonts/NewCenturySchlbk-Bold
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-BoldItalic fonts/NewCenturySchlbk-BoldItalic
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-Italic fonts/NewCenturySchlbk-Italic
f 0444 root sys /usr/share/cups/fonts/NewCenturySchlbk-Roman fonts/NewCenturySchlbk-Roman
f 0444 root sys /usr/share/cups/fonts/Palatino-Bold fonts/Palatino-Bold
f 0444 root sys /usr/share/cups/fonts/Palatino-BoldItalic fonts/Palatino-BoldItalic
f 0444 root sys /usr/share/cups/fonts/Palatino-Italic fonts/Palatino-Italic
f 0444 root sys /usr/share/cups/fonts/Palatino-Roman fonts/Palatino-Roman
f 0444 root sys /usr/share/cups/fonts/Symbol fonts/Symbol
f 0444 root sys /usr/share/cups/fonts/Times-Bold fonts/Times-Bold
f 0444 root sys /usr/share/cups/fonts/Times-BoldItalic fonts/Times-BoldItalic
f 0444 root sys /usr/share/cups/fonts/Times-Italic fonts/Times-Italic
f 0444 root sys /usr/share/cups/fonts/Times-Roman fonts/Times-Roman
f 0444 root sys /usr/share/cups/fonts/Utopia-Bold fonts/Utopia-Bold
f 0444 root sys /usr/share/cups/fonts/Utopia-BoldItalic fonts/Utopia-BoldItalic
f 0444 root sys /usr/share/cups/fonts/Utopia-Italic fonts/Utopia-Italic
f 0444 root sys /usr/share/cups/fonts/Utopia-Regular fonts/Utopia-Regular
f 0444 root sys /usr/share/cups/fonts/ZapfChancery-MediumItalic fonts/ZapfChancery-MediumItalic
f 0444 root sys /usr/share/cups/fonts/ZapfDingbats fonts/ZapfDingbats
f 0444 root sys /usr/share/cups/pstoraster/Fontmap pstoraster/Fontmap
f 0444 root sys /usr/share/cups/pstoraster/gs_l2img.ps pstoraster/gs_l2img.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_pfile.ps pstoraster/gs_pfile.ps
f 0444 root sys /usr/share/cups/pstoraster/pfbtogs.ps pstoraster/pfbtogs.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_wl1_e.ps pstoraster/gs_wl1_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_wl2_e.ps pstoraster/gs_wl2_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_wl5_e.ps pstoraster/gs_wl5_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_wan_e.ps pstoraster/gs_wan_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_pdf_e.ps pstoraster/gs_pdf_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_sym_e.ps pstoraster/gs_sym_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_std_e.ps pstoraster/gs_std_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_dbt_e.ps pstoraster/gs_dbt_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_mex_e.ps pstoraster/gs_mex_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_mro_e.ps pstoraster/gs_mro_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_iso_e.ps pstoraster/gs_iso_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_ksb_e.ps pstoraster/gs_ksb_e.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_ttf.ps pstoraster/gs_ttf.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_pdf.ps pstoraster/gs_pdf.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_ccfnt.ps pstoraster/gs_ccfnt.ps
f 0444 root sys /usr/share/cups/pstoraster/pdf_sec.ps pstoraster/pdf_sec.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_res.ps pstoraster/gs_res.ps
f 0444 root sys /usr/share/cups/pstoraster/pdf_base.ps pstoraster/pdf_base.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_btokn.ps pstoraster/gs_btokn.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_diskf.ps pstoraster/gs_diskf.ps
f 0444 root sys /usr/share/cups/pstoraster/pdf_2ps.ps pstoraster/pdf_2ps.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_init.ps pstoraster/gs_init.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_kanji.ps pstoraster/gs_kanji.ps
f 0444 root sys /usr/share/cups/pstoraster/pdf_draw.ps pstoraster/pdf_draw.ps
f 0444 root sys /usr/share/cups/pstoraster/pdf_font.ps pstoraster/pdf_font.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_type1.ps pstoraster/gs_type1.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_fonts.ps pstoraster/gs_fonts.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_statd.ps pstoraster/gs_statd.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_lev2.ps pstoraster/gs_lev2.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_typ42.ps pstoraster/gs_typ42.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_pdfwr.ps pstoraster/gs_pdfwr.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_cidfn.ps pstoraster/gs_cidfn.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_cmdl.ps pstoraster/gs_cmdl.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_dps1.ps pstoraster/gs_dps1.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_setpd.ps pstoraster/gs_setpd.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_cmap.ps pstoraster/gs_cmap.ps
f 0444 root sys /usr/share/cups/pstoraster/gs_fform.ps pstoraster/gs_fform.ps
f 0444 root sys /usr/share/cups/pstoraster/pdf_main.ps pstoraster/pdf_main.ps
f 0444 root sys /usr/share/cups/model/deskjet.ppd ppd/deskjet.ppd
f 0444 root sys /usr/share/cups/model/laserjet.ppd ppd/laserjet.ppd
# Config files
c 0644 root sys /var/cups/conf/classes.conf conf/classes.conf
c 0644 root sys /var/cups/conf/cupsd.conf conf/cupsd.conf
f 0644 root sys /var/cups/conf/mime.convs conf/mime.convs
f 0644 root sys /var/cups/conf/mime.types conf/mime.types
c 0644 root sys /var/cups/conf/printers.conf conf/printers.conf
# Dummy printcap file for Digital UNIX and Linux...
%system dunix linux
f 0644 root sys /etc/printcap conf/printcap
%system all
# Developer files
f 0444 root sys /usr/include/cups/cups.h cups/cups.h
f 0444 root sys /usr/include/cups/http.h cups/http.h
f 0444 root sys /usr/include/cups/ipp.h cups/ipp.h
f 0444 root sys /usr/include/cups/language.h cups/language.h
f 0444 root sys /usr/include/cups/mime.h cups/mime.h
f 0444 root sys /usr/include/cups/ppd.h cups/ppd.h
f 0444 root sys /usr/include/cups/raster.h cups/raster.h
%system irix-6.5
f 0444 root sys /usr/lib32/libcups.a cups/libcups.a
%system !irix-6.5
f 0444 root sys /usr/lib/libcups.a cups/libcups.a
%system all
# Documentation files
f 0444 root sys /usr/share/cups/doc/cmp.html doc/cmp.html
f 0444 root sys /usr/share/cups/doc/cmp.pdf doc/cmp.pdf
f 0444 root sys /usr/share/cups/doc/cupsdoc.css doc/cupsdoc.css
f 0444 root sys /usr/share/cups/doc/cups.css doc/cups.css
f 0444 root sys /usr/share/cups/doc/documentation.html doc/documentation.html
f 0444 root sys /usr/share/cups/doc/idd.html doc/idd.html
f 0444 root sys /usr/share/cups/doc/idd.pdf doc/idd.pdf
f 0444 root sys /usr/share/cups/doc/images/classes.gif doc/images/classes.gif
f 0444 root sys /usr/share/cups/doc/images/cups-bar.gif doc/images/cups-bar.gif
f 0444 root sys /usr/share/cups/doc/images/cups-block-diagram.gif doc/images/cups-block-diagram.gif
f 0444 root sys /usr/share/cups/doc/images/cups-large.gif doc/images/cups-large.gif
f 0444 root sys /usr/share/cups/doc/images/cups-medium.gif doc/images/cups-medium.gif
f 0444 root sys /usr/share/cups/doc/images/cups-small.gif doc/images/cups-small.gif
f 0444 root sys /usr/share/cups/doc/images/logo.gif doc/images/logo.gif
f 0444 root sys /usr/share/cups/doc/images/navbar.gif doc/images/navbar.gif
f 0444 root sys /usr/share/cups/doc/images/printer-idle.gif doc/images/printer-idle.gif
f 0444 root sys /usr/share/cups/doc/images/printer-processing.gif doc/images/printer-processing.gif
f 0444 root sys /usr/share/cups/doc/images/printer-stopped.gif doc/images/printer-stopped.gif
f 0444 root sys /usr/share/cups/doc/index.html doc/index.html
f 0444 root sys /usr/share/cups/doc/overview.html doc/overview.html
f 0444 root sys /usr/share/cups/doc/overview.pdf doc/overview.pdf
f 0444 root sys /usr/share/cups/doc/sam.html doc/sam.html
f 0444 root sys /usr/share/cups/doc/sam.pdf doc/sam.pdf
f 0444 root sys /usr/share/cups/doc/sdd.html doc/sdd.html
f 0444 root sys /usr/share/cups/doc/sdd.pdf doc/sdd.pdf
f 0444 root sys /usr/share/cups/doc/ssr.html doc/ssr.html
f 0444 root sys /usr/share/cups/doc/ssr.pdf doc/ssr.pdf
f 0444 root sys /usr/share/cups/doc/stp.html doc/stp.html
f 0444 root sys /usr/share/cups/doc/stp.pdf doc/stp.pdf
f 0444 root sys /usr/share/cups/doc/sum.html doc/sum.html
f 0444 root sys /usr/share/cups/doc/sum.pdf doc/sum.pdf
f 0444 root sys /usr/share/cups/doc/svd.html doc/svd.html
f 0444 root sys /usr/share/cups/doc/svd.pdf doc/svd.pdf
# Man pages
%system irix
f 0444 root sys /usr/share/catman/a_man/cat1/accept.z man/accept.z
l 0444 root sys /usr/share/catman/a_man/cat1/reject.z accept.z
f 0444 root sys /usr/share/catman/u_man/cat1/backend.z man/backend.z
f 0444 root sys /usr/share/catman/u_man/cat5/classes.conf.z man/classes.conf.z
f 0444 root sys /usr/share/catman/u_man/cat5/cupsd.conf.z man/cupsd.conf.z
f 0444 root sys /usr/share/catman/a_man/cat1/cupsd.z man/cupsd.z
f 0444 root sys /usr/share/catman/a_man/cat1/enable.z man/enable.z
l 0444 root sys /usr/share/catman/a_man/cat1/disable.z enable.z
f 0444 root sys /usr/share/catman/u_man/cat1/filter.z man/filter.z
f 0444 root sys /usr/share/catman/a_man/cat1/lpadmin.z man/lpadmin.z
f 0444 root sys /usr/share/catman/a_man/cat1/lpc.z man/lpc.z
f 0444 root sys /usr/share/catman/u_man/cat1/lprm.z man/lprm.z
f 0444 root sys /usr/share/catman/u_man/cat1/lpr.z man/lpr.z
f 0444 root sys /usr/share/catman/u_man/cat1/lpstat.z man/lpstat.z
f 0444 root sys /usr/share/catman/u_man/cat1/lp.z man/lp.z
l 0444 root sys /usr/share/catman/u_man/cat1/cancel.z lp.z
f 0444 root sys /usr/share/catman/u_man/cat5/mime.convs.z man/mime.convs.z
f 0444 root sys /usr/share/catman/u_man/cat5/mime.types.z man/mime.types.z
f 0444 root sys /usr/share/catman/u_man/cat5/printers.conf.z man/printers.conf.z
%system !irix
f 0444 root sys /usr/man/man8/accept.8 man/accept.8
l 0444 root sys /usr/man/man8/reject.8 accept.8
f 0444 root sys /usr/man/man1/backend.1 man/backend.1
f 0444 root sys /usr/man/man1/classes.conf.5 man/classes.conf.5
f 0444 root sys /usr/man/man8/cupsd.8 man/cupsd.8
f 0444 root sys /usr/man/man5/cupsd.conf.5 man/cupsd.conf.5
f 0444 root sys /usr/man/man8/enable.8 man/enable.8
l 0444 root sys /usr/man/man8/disable.8 enable.8
f 0444 root sys /usr/man/man1/filter.1 man/filter.1
f 0444 root sys /usr/man/man8/lpadmin.8 man/lpadmin.8
f 0444 root sys /usr/man/man8/lpc.8 man/lpc.8
f 0444 root sys /usr/man/man1/lprm.1 man/lprm.1
f 0444 root sys /usr/man/man1/lpr.1 man/lpr.1
f 0444 root sys /usr/man/man1/lpstat.1 man/lpstat.1
f 0444 root sys /usr/man/man1/lp.1 man/lp.1
l 0444 root sys /usr/man/man1/cancel.1 lp.1
f 0444 root sys /usr/man/man5/mime.convs.5 man/mime.convs.5
f 0444 root sys /usr/man/man5/mime.types.5 man/mime.types.5
f 0444 root sys /usr/man/man5/printers.conf.5 man/printers.conf.5
# Startup script
%system all
i 0555 root sys cups cups.sh
#
# End of "$Id: cups.list 775 1999-11-04 13:35:01Z mike $".
#
+5
Ver Arquivo
@@ -64,6 +64,11 @@ case "`uname`" in
;;
esac
# Change to the root directory first, in case we are being run from a
# CD-ROM installation script...
cd /
# Start or stop the CUPS server based upon the first argument to the script.
case $1 in
start | restart | reload)
+134
Ver Arquivo
@@ -0,0 +1,134 @@
#
# "$Id: cups.spec 775 1999-11-04 13:35:01Z mike $"
#
# RPM "spec" file for the Common UNIX Printing System (CUPS).
#
# Original version by Jason McMullan <jmcc@ontv.com>.
#
# Copyright 1999 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
# property of Easy Software Products and are protected by Federal
# copyright law. Distribution and use rights are outlined in the file
# "LICENSE.txt" which should have been included with this file. If this
# file is missing or damaged please contact Easy Software Products
# at:
#
# Attn: CUPS Licensing Information
# Easy Software Products
# 44141 Airport View Drive, Suite 204
# Hollywood, Maryland 20636-3111 USA
#
# Voice: (301) 373-9603
# EMail: cups-info@cups.org
# WWW: http://www.cups.org
#
Summary: Common Unix Printing System
Name: cups
Version: 1.0.2
Release: 0
Copyright: GPL
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/1.0.2/cups-1.0.2-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: /tmp/rpmbuild
Conflicts: lpr
%package devel
Summary: Common Unix Printing System - development environment
Group: Development/Libraries
%description
The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. It has been developed by Easy Software Products
to promote a standard printing solution for all UNIX vendors and users.
CUPS provides the System V and Berkeley command-line interfaces.
%description devel
The Common UNIX Printing System provides a portable printing layer for
UNIX® operating systems. This is the development package for creating
additional printer drivers, and other CUPS services.
%prep
%setup
%build
./configure
# If we got this far, all prerequisite libraries must be here.
make
%install
# these lines just make sure the directory structure in the
# RPM_BUILD_ROOT exists
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc
mkdir -p $RPM_BUILD_ROOT/etc/rc.d
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/usr
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/man
mkdir -p $RPM_BUILD_ROOT/usr/man/man1
mkdir -p $RPM_BUILD_ROOT/usr/man/man5
mkdir -p $RPM_BUILD_ROOT/usr/man/man8
mkdir -p $RPM_BUILD_ROOT/usr/share/locale
mkdir -p $RPM_BUILD_ROOT/var/cups
mkdir -p $RPM_BUILD_ROOT/var/cups/conf
mkdir -p $RPM_BUILD_ROOT/var/cups/logs
mkdir -p $RPM_BUILD_ROOT/var/log
ln -sf /var/cups/logs $RPM_BUILD_ROOT/var/log/cups
ln -sf /var/cups/conf $RPM_BUILD_ROOT/etc/cups
make prefix=$RPM_BUILD_ROOT/usr DATADIR=$RPM_BUILD_ROOT/usr/share/cups LOCALEDIR=$RPM_BUILD_ROOT/usr/share/locale SERVERROOT=$RPM_BUILD_ROOT/var/cups install
install -m 755 -o root -g root cups.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/cups
ln -sf /usr/sbin/accept $RPM_BUILD_ROOT/usr/bin/disable
ln -sf /usr/sbin/accept $RPM_BUILD_ROOT/usr/bin/enable
ln -sf /usr/sbin/accept $RPM_BUILD_ROOT/usr/lib/accept
ln -sf /usr/sbin/accept $RPM_BUILD_ROOT/usr/lib/reject
ln -sf /usr/sbin/accept $RPM_BUILD_ROOT/usr/sbin/reject
ln -sf /usr/sbin/lpadmin $RPM_BUILD_ROOT/usr/lib/lpadmin
%post
/sbin/chkconfig --add cups
%preun
/sbin/chkconfig --del cups
%clean
rm -rf $RPM_BUILD_ROOT
%files
/etc/rc.d/init.d/cups
%config /var/cups/conf/*
/usr/bin/*
/usr/lib/*
/usr/man/*
/usr/sbin/*
%dir /usr/share/cups
/usr/share/cups/*
%dir /var/cups
/var/cups/backend/*
/var/cups/cgi-bin/*
/var/cups/filter/*
%dir /var/cups/interfaces
%dir /var/cups/logs
%dir /var/cups/ppd
%dir /var/cups/requests
%dir /etc/cups
%dir /var/log/cups
%files devel
%dir /usr/include/cups
/usr/include/cups/*
#
# End of "$Id: cups.spec 775 1999-11-04 13:35:01Z mike $".
#
+3 -2
Ver Arquivo
@@ -29,8 +29,8 @@ include ../Makedefs
#
LIBOBJS = emit.o filter.o http.o ipp.o language.o mark.o mime.o \
options.o page.o ppd.o raster.o string.o type.o usersys.o \
util.o
options.o page.o ppd.o raster.o snprintf.o string.o type.o \
usersys.o util.o
OBJS = $(LIBOBJS) testhttp.o testmime.o testppd.o
#
@@ -110,6 +110,7 @@ options.o: cups.h ../config.h ../Makedefs
page.o: ppd.h ../config.h ../Makedefs
ppd.o: language.h ppd.h ../config.h ../Makedefs
raster.o: raster.h ../config.h ../Makedefs
snprintf.o: string.h ../config.h ../Makedefs
string.o: string.h ../config.h ../Makedefs
type.o: mime.h ../config.h ../Makedefs
usersys.o: cups.h ../config.h ../Makedefs
+1
Ver Arquivo
@@ -114,6 +114,7 @@ extern int cupsGetClasses(char ***classes);
extern const char *cupsGetDefault(void);
extern const char *cupsGetPPD(const char *printer);
extern int cupsGetPrinters(char ***printers);
extern ipp_status_t cupsLastError(void);
extern int cupsPrintFile(const char *printer, const char *filename,
const char *title, int num_options,
cups_option_t *options);
+3 -3
Ver Arquivo
@@ -86,8 +86,8 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
return (-1);
}
if (strcmp(((ppd_option_t *)choices[i]->option)->keyword, "PageSize") == 0 &&
strcmp(choices[i]->choice, "Custom") == 0)
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
@@ -107,7 +107,7 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
*/
fputs("pop pop pop\n", fp);
fputs("<</PageSize[7 -2 roll]/ImagingBBox null>>setpagedevice\n", fp);
fputs("<</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice\n", fp);
}
}
+4 -2
Ver Arquivo
@@ -88,7 +88,8 @@ mimeAddFilter(mime_t *mime, /* I - MIME database */
if (temp->cost > cost)
{
temp->cost = cost;
strcpy(temp->filter, filter);
strncpy(temp->filter, filter, sizeof(temp->filter) - 1);
temp->filter[sizeof(temp->filter) - 1] = '\0';
}
}
else
@@ -116,7 +117,8 @@ mimeAddFilter(mime_t *mime, /* I - MIME database */
temp->src = src;
temp->dst = dst;
temp->cost = cost;
strcpy(temp->filter, filter);
strncpy(temp->filter, filter, sizeof(temp->filter) - 1);
temp->filter[sizeof(temp->filter) - 1] = '\0';
if (mime->num_filters > 1)
qsort(mime->filters, mime->num_filters, sizeof(mime_filter_t),
+95 -61
Ver Arquivo
@@ -284,8 +284,7 @@ httpConnect(const char *host, /* I - Host to connect to */
* Copy the hostname and port and then "reconnect"...
*/
strcpy(http->hostname, host);
memset((char *)&(http->hostaddr), 0, sizeof(http->hostaddr));
strncpy(http->hostname, host, sizeof(http->hostname) - 1);
memcpy((char *)&(http->hostaddr.sin_addr), hostaddr->h_addr, hostaddr->h_length);
http->hostaddr.sin_family = hostaddr->h_addrtype;
#ifdef WIN32
@@ -330,7 +329,8 @@ httpReconnect(http_t *http) /* I - HTTP data */
if ((http->fd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
{
http->error = errno;
http->error = errno;
http->status = HTTP_ERROR;
return (-1);
}
@@ -354,7 +354,8 @@ httpReconnect(http_t *http) /* I - HTTP data */
if (connect(http->fd, (struct sockaddr *)&(http->hostaddr),
sizeof(http->hostaddr)) < 0)
{
http->error = errno;
http->error = errno;
http->status = HTTP_ERROR;
#ifdef WIN32
closesocket(http->fd);
@@ -364,8 +365,9 @@ httpReconnect(http_t *http) /* I - HTTP data */
return (-1);
}
else
http->error = 0;
http->error = 0;
http->status = HTTP_CONTINUE;
return (0);
}
@@ -378,11 +380,11 @@ httpReconnect(http_t *http) /* I - HTTP data */
void
httpSeparate(const char *uri, /* I - Universal Resource Identifier */
char *method, /* O - Method (http, https, etc.) */
char *username, /* O - Username */
char *host, /* O - Hostname */
char *method, /* O - Method [32] (http, https, etc.) */
char *username, /* O - Username [32] */
char *host, /* O - Hostname [32] */
int *port, /* O - Port number to use */
char *resource) /* O - Resource/filename */
char *resource) /* O - Resource/filename [1024] */
{
char *ptr; /* Pointer into string... */
@@ -412,7 +414,8 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
{
if ((ptr = strchr(host, '/')) != NULL)
{
strcpy(resource, ptr);
strncpy(resource, ptr, HTTP_MAX_URI - 1);
resource[HTTP_MAX_URI - 1] = '\0';
*ptr = '\0';
}
else
@@ -427,7 +430,10 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
*port = strtol(uri, (char **)&uri, 10);
if (*uri == '/')
strcpy(resource, uri);
{
strncpy(resource, uri, HTTP_MAX_URI - 1);
resource[HTTP_MAX_URI - 1] = '\0';
}
}
else
*port = 0;
@@ -437,7 +443,10 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
return;
}
else
strcpy(method, host);
{
strncpy(method, host, 31);
method[31] = '\0';
}
/*
* If the method starts with less than 2 slashes then it is a local resource...
@@ -445,7 +454,9 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
if (strncmp(uri, "//", 2) != 0)
{
strcpy(resource, uri);
strncpy(resource, uri, 1023);
resource[1023] = '\0';
username[0] = '\0';
host[0] = '\0';
*port = 0;
@@ -460,7 +471,7 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
uri ++;
ptr = host;
while (*uri != ':' && *uri != '@' && *uri != '/' && *uri != '\0')
while (!(*uri == ':' && isdigit(uri[1])) && *uri != '@' && *uri != '/' && *uri != '\0')
*ptr ++ = *uri ++;
*ptr = '\0';
@@ -471,9 +482,11 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
* Got a username...
*/
strcpy(username, host);
strncpy(username, host, 31);
username[31] = '\0';
ptr = host;
uri ++;
while (*uri != ':' && *uri != '/' && *uri != '\0')
*ptr ++ = *uri ++;
@@ -529,7 +542,8 @@ httpSeparate(const char *uri, /* I - Universal Resource Identifier */
* The remaining portion is the resource string...
*/
strcpy(resource, uri);
strncpy(resource, uri, HTTP_MAX_URI - 1);
resource[HTTP_MAX_URI - 1] = '\0';
}
@@ -673,12 +687,15 @@ httpRead(http_t *http, /* I - HTTP data */
return (0);
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
http->data_remaining <= 0 &&
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
http->data_remaining <= 0)
{
DEBUG_puts("httpRead: Getting chunk length...");
if (httpGets(len, sizeof(len), http) == NULL)
{
DEBUG_puts("httpRead: Could not get length!");
return (0);
}
http->data_remaining = strtol(len, NULL, 16);
}
@@ -692,9 +709,7 @@ httpRead(http_t *http, /* I - HTTP data */
* data, go idle...
*/
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
if (http->data_encoding == HTTP_ENCODE_CHUNKED)
httpGets(len, sizeof(len), http);
if (http->state == HTTP_POST_RECV)
@@ -736,9 +751,7 @@ httpRead(http_t *http, /* I - HTTP data */
if (http->data_remaining == 0)
{
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
if (http->data_encoding == HTTP_ENCODE_CHUNKED)
httpGets(len, sizeof(len), http);
if (http->data_encoding != HTTP_ENCODE_CHUNKED)
@@ -773,25 +786,30 @@ httpWrite(http_t *http, /* I - HTTP data */
http->activity = time(NULL);
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
if (http->data_encoding == HTTP_ENCODE_CHUNKED)
{
if (httpPrintf(http, "%x\r\n", length) < 0)
return (-1);
if (length == 0)
{
/*
* A zero-length chunk ends a transfer; unless we are sending POST
* data, go idle...
*/
if (length == 0)
{
/*
* A zero-length chunk ends a transfer; unless we are sending POST
* data, go idle...
*/
if (http->state == HTTP_POST_RECV)
http->state ++;
else
http->state = HTTP_WAITING;
DEBUG_puts("httpWrite: changing states...");
return (0);
if (http->state == HTTP_POST_RECV)
http->state ++;
else
http->state = HTTP_WAITING;
if (httpPrintf(http, "\r\n") < 0)
return (-1);
return (0);
}
}
tbytes = 0;
@@ -813,9 +831,7 @@ httpWrite(http_t *http, /* I - HTTP data */
http->data_remaining -= bytes;
}
if (http->data_encoding == HTTP_ENCODE_CHUNKED &&
(http->state == HTTP_GET_SEND || http->state == HTTP_POST_RECV ||
http->state == HTTP_POST_SEND || http->state == HTTP_PUT_RECV))
if (http->data_encoding == HTTP_ENCODE_CHUNKED)
if (httpPrintf(http, "\r\n") < 0)
return (-1);
@@ -825,6 +841,8 @@ httpWrite(http_t *http, /* I - HTTP data */
* Finished with the transfer; unless we are sending POST data, go idle...
*/
DEBUG_puts("httpWrite: changing states...");
if (http->state == HTTP_POST_RECV)
http->state ++;
else
@@ -970,7 +988,7 @@ httpPrintf(http_t *http, /* I - HTTP data */
va_start(ap, format);
bytes = vsprintf(buf, format, ap);
bytes = vsnprintf(buf, sizeof(buf), format, ap);
va_end(ap);
DEBUG_printf(("httpPrintf: %s", buf));
@@ -1058,7 +1076,7 @@ httpGetDateTime(const char *s) /* I - Date/time string */
int hour, min, sec; /* Time */
if (sscanf(s, "%*s%d%s%d%d:%d:%d", &day, mon, &year, &hour, &min, &sec) < 6)
if (sscanf(s, "%*s%d%15s%d%d:%d:%d", &day, mon, &year, &hour, &min, &sec) < 6)
return (0);
for (i = 0; i < 12; i ++)
@@ -1178,7 +1196,10 @@ httpUpdate(http_t *http) /* I - HTTP data */
httpSetField(http, field, value);
}
else
{
http->status = HTTP_ERROR;
return (HTTP_ERROR);
}
}
/*
@@ -1186,7 +1207,10 @@ httpUpdate(http_t *http) /* I - HTTP data */
*/
if (http->error)
{
http->status = HTTP_ERROR;
return (HTTP_ERROR);
}
/*
* If we haven't already returned, then there is nothing new...
@@ -1296,7 +1320,10 @@ httpEncode64(char *out, /* I - String to write to */
in ++;
if (*in == '\0')
{
*outptr ++ = '=';
break;
}
*outptr ++ = base64[((in[0] << 2) | (in[1] >> 6)) & 63];
@@ -1326,14 +1353,18 @@ httpEncode64(char *out, /* I - String to write to */
int /* O - Content length */
httpGetLength(http_t *http) /* I - HTTP data */
{
DEBUG_printf(("httpGetLength(%08x)\n", http));
if (strcasecmp(http->fields[HTTP_FIELD_TRANSFER_ENCODING], "chunked") == 0)
{
DEBUG_puts("httpGetLength: chunked request!");
http->data_encoding = HTTP_ENCODE_CHUNKED;
http->data_remaining = 0;
}
else
{
http->data_encoding = HTTP_ENCODE_LENGTH;
http->data_encoding = HTTP_ENCODE_LENGTH;
/*
* The following is a hack for HTTP servers that don't send a
@@ -1347,6 +1378,8 @@ httpGetLength(http_t *http) /* I - HTTP data */
http->data_remaining = 2147483647;
else
http->data_remaining = atoi(http->fields[HTTP_FIELD_CONTENT_LENGTH]);
DEBUG_printf(("httpGetLength: content_length = %d\n", http->data_remaining));
}
return (http->data_remaining);
@@ -1422,6 +1455,13 @@ http_send(http_t *http, /* I - HTTP data */
*ptr = '\0';
/*
* See if we had an error the last time around; if so, reconnect...
*/
if (http->status == HTTP_ERROR || http->status >= HTTP_BAD_REQUEST)
httpReconnect(http);
/*
* Send the request header...
*/
@@ -1434,20 +1474,8 @@ http_send(http_t *http, /* I - HTTP data */
if (httpPrintf(http, "%s %s HTTP/1.1\r\n", codes[request], buf) < 1)
{
/*
* Might have lost connection; try to reconnect...
*/
if (httpReconnect(http))
return (-1);
/*
* OK, we've reconnected, send the request again...
*/
if (httpPrintf(http, "%s %s HTTP/%d.%d\r\n", codes[request], buf,
http->version / 100, http->version % 100) < 1)
return (-1);
http->status = HTTP_ERROR;
return (-1);
}
for (i = 0; i < HTTP_FIELD_MAX; i ++)
@@ -1456,11 +1484,17 @@ http_send(http_t *http, /* I - HTTP data */
DEBUG_printf(("%s: %s\n", http_fields[i], http->fields[i]));
if (httpPrintf(http, "%s: %s\r\n", http_fields[i], http->fields[i]) < 1)
return (-1);
{
http->status = HTTP_ERROR;
return (-1);
}
}
if (httpPrintf(http, "\r\n") < 1)
{
http->status = HTTP_ERROR;
return (-1);
}
httpClearFields(http);
+2 -4
Ver Arquivo
@@ -512,8 +512,6 @@ ippDateToTime(const ipp_uchar_t *date) /* I - RFC 1903 date info */
else
t -= date[9] * 3600 + date[10] * 60;
t -= timezone;
return (t);
}
@@ -595,7 +593,7 @@ ippFindAttribute(ipp_t *ipp, /* I - IPP request */
DEBUG_printf(("ippFindAttribute: attr = %08x, name = \'%s\'\n", attr,
attr->name));
if (attr->name != NULL && strcmp(attr->name, name) == 0 &&
if (attr->name != NULL && strcasecmp(attr->name, name) == 0 &&
(attr->value_tag == type ||
(attr->value_tag == IPP_TAG_TEXTLANG && type == IPP_TAG_TEXT) ||
(attr->value_tag == IPP_TAG_NAMELANG && type == IPP_TAG_NAME)))
@@ -803,7 +801,7 @@ ippRead(http_t *http, /* I - HTTP data */
ipp->state = IPP_DATA;
break;
}
else if (tag <= IPP_TAG_UNSUPPORTED)
else if (tag < IPP_TAG_UNSUPPORTED_VALUE)
{
/*
* Group tag... Set the current group and continue...
+2 -2
Ver Arquivo
@@ -75,8 +75,8 @@ typedef enum /**** Format tags for attribute formats... ****/
IPP_TAG_JOB,
IPP_TAG_END,
IPP_TAG_PRINTER,
IPP_TAG_EXTENSION,
IPP_TAG_UNSUPPORTED = 0x10,
IPP_TAG_UNSUPPORTED_GROUP,
IPP_TAG_UNSUPPORTED_VALUE = 0x10,
IPP_TAG_DEFAULT,
IPP_TAG_UNKNOWN,
IPP_TAG_NOVALUE,
+20 -4
Ver Arquivo
@@ -146,14 +146,29 @@ cupsLangGet(const char *language) /* I - Language or locale */
* standard POSIX locale and is copied unchanged. Otherwise the
* language string is converted from ll-cc (language-country) to ll_CC
* to match the file naming convention used by all POSIX-compliant
* operating systems.
* operating systems. Any trailing character set specification is
* dropped.
*/
if (language == NULL || language[0] == '\0' ||
strcmp(language, "POSIX") == 0)
strcpy(langname, "C");
else
strcpy(langname, language);
{
/*
* Copy the locale string over safely...
*/
strncpy(langname, language, sizeof(langname) - 1);
langname[sizeof(langname) - 1] = '\0';
/*
* Strip charset from "locale.charset"...
*/
if ((text = strchr(langname, '.')) != NULL)
*text = '\0';
}
if (strlen(langname) < 2)
strcpy(real, "C");
@@ -186,7 +201,7 @@ cupsLangGet(const char *language) /* I - Language or locale */
if ((localedir = getenv("LOCALEDIR")) == NULL)
localedir = CUPS_LOCALEDIR;
sprintf(filename, "%s/%s/cups_%s", localedir, real, real);
snprintf(filename, sizeof(filename), "%s/%s/cups_%s", localedir, real, real);
if ((fp = fopen(filename, "r")) == NULL)
if (strlen(real) > 2)
@@ -196,7 +211,8 @@ cupsLangGet(const char *language) /* I - Language or locale */
*/
real[2] = '\0';
sprintf(filename, "%s/%s/cups_%s", localedir, real, real);
snprintf(filename, sizeof(filename), "%s/%s/cups_%s", localedir, real,
real);
fp = fopen(filename, "r");
}
+18 -18
Ver Arquivo
@@ -117,7 +117,7 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
if (c1->marked)
break;
if (j == 0)
if (j == 0 || strcasecmp(c1->choice, "None") == 0)
c1 = NULL;
}
@@ -147,7 +147,7 @@ ppdConflicts(ppd_file_t *ppd) /* I - PPD to check */
if (c2->marked)
break;
if (j == 0)
if (j == 0 || strcasecmp(c2->choice, "None") == 0)
c2 = NULL;
}
@@ -188,7 +188,7 @@ ppdFindChoice(ppd_option_t *o, /* I - Pointer to option */
return (NULL);
for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)
if (strcmp(c->choice, choice) == 0)
if (strcasecmp(c->choice, choice) == 0)
return (c);
return (NULL);
@@ -239,12 +239,12 @@ ppdFindOption(ppd_file_t *ppd, /* I - PPD file data */
for (i = ppd->num_groups, g = ppd->groups; i > 0; i --, g ++)
{
for (j = g->num_options, o = g->options; j > 0; j --, o ++)
if (strcmp(o->keyword, option) == 0)
if (strcasecmp(o->keyword, option) == 0)
return (o);
for (j = g->num_subgroups, sg = g->subgroups; j > 0; j --, sg ++)
for (k = sg->num_options, o = sg->options; k > 0; k --, o ++)
if (strcmp(o->keyword, option) == 0)
if (strcasecmp(o->keyword, option) == 0)
return (o);
}
@@ -320,7 +320,7 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
if (ppd == NULL)
return (0);
if (strcmp(option, "PageSize") == 0 && strncmp(choice, "Custom.", 7) == 0)
if (strcasecmp(option, "PageSize") == 0 && strncasecmp(choice, "Custom.", 7) == 0)
{
/*
* Handle variable page sizes...
@@ -334,7 +334,7 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
return (0);
for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)
if (strcmp(c->choice, choice) == 0)
if (strcasecmp(c->choice, choice) == 0)
break;
if (i)
@@ -347,33 +347,33 @@ ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
if (o->ui != PPD_UI_PICKMANY)
for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)
if (strcmp(c->choice, choice) != 0)
if (strcasecmp(c->choice, choice) != 0)
c->marked = 0;
if (strcmp(option, "PageSize") == 0 || strcmp(option, "PageRegion") == 0)
if (strcasecmp(option, "PageSize") == 0 || strcasecmp(option, "PageRegion") == 0)
{
/*
* Mark current page size...
*/
for (i = 0; i < ppd->num_sizes; i ++)
ppd->sizes[i].marked = strcmp(ppd->sizes[i].name, choice) == 0;
ppd->sizes[i].marked = strcasecmp(ppd->sizes[i].name, choice) == 0;
/*
* Unmark the current PageSize or PageRegion setting, as appropriate...
*/
if (strcmp(option, "PageSize") == 0)
if (strcasecmp(option, "PageSize") == 0)
{
o = ppdFindOption(ppd, "PageRegion");
for (i = 0; i < o->num_choices; i ++)
o->choices[i].marked = 0;
if ((o = ppdFindOption(ppd, "PageRegion")) != NULL)
for (i = 0; i < o->num_choices; i ++)
o->choices[i].marked = 0;
}
else
{
o = ppdFindOption(ppd, "PageSize");
for (i = 0; i < o->num_choices; i ++)
o->choices[i].marked = 0;
if ((o = ppdFindOption(ppd, "PageSize")) != NULL)
for (i = 0; i < o->num_choices; i ++)
o->choices[i].marked = 0;
}
}
}
@@ -399,7 +399,7 @@ ppd_defaults(ppd_file_t *ppd, /* I - PPD file */
return;
for (i = g->num_options, o = g->options; i > 0; i --, o ++)
if (strcmp(o->keyword, "PageRegion") != 0)
if (strcasecmp(o->keyword, "PageRegion") != 0)
ppdMarkOption(ppd, o->keyword, o->defchoice);
for (i = g->num_subgroups, sg = g->subgroups; i > 0; i --, sg ++)
+8 -3
Ver Arquivo
@@ -33,6 +33,9 @@
* Revision History:
*
* $Log: mime.c,v $
* Revision 1.15 1999/10/10 15:40:23 mike
* Scanf, strcpy, and sprintf security changes.
*
* Revision 1.14 1999/07/12 16:09:38 mike
* Fixed all constant arrays to use "const" modifier.
*
@@ -198,7 +201,9 @@ mimeMerge(mime_t *mime, /* I - MIME database to add to */
if (pathname == NULL)
return (NULL);
strcpy(filename, pathname);
strncpy(filename, pathname, sizeof(filename) - 1);
filename[sizeof(filename) - 1] = '\0';
pathsep = filename + strlen(filename);
if (pathsep == filename ||
(pathsep[-1] != '/' && pathsep[-1] != '\\'))
@@ -298,7 +303,7 @@ mimeMerge(mime_t *mime, /* I - MIME database to add to */
* Load a mime.types file...
*/
sprintf(filename, "%s/%s", pathname, dent->d_name);
snprintf(filename, sizeof(filename), "%s/%s", pathname, dent->d_name);
load_types(mime, filename);
}
}
@@ -318,7 +323,7 @@ mimeMerge(mime_t *mime, /* I - MIME database to add to */
* Load a mime.convs file...
*/
sprintf(filename, "%s/%s", pathname, dent->d_name);
snprintf(filename, sizeof(filename), "%s/%s", pathname, dent->d_name);
load_convs(mime, filename);
}
}
+8 -8
Ver Arquivo
@@ -62,7 +62,7 @@ cupsAddOption(const char *name, /* I - Name of option */
*/
for (i = 0, temp = *options; i < num_options; i ++, temp ++)
if (strcmp(temp->name, name) == 0)
if (strcasecmp(temp->name, name) == 0)
break;
if (i >= num_options)
@@ -140,7 +140,7 @@ cupsGetOption(const char *name, /* I - Name of option */
return (NULL);
for (i = 0; i < num_options; i ++)
if (strcmp(options[i].name, name) == 0)
if (strcasecmp(options[i].name, name) == 0)
return (options[i].value);
return (NULL);
@@ -287,7 +287,7 @@ cupsMarkOptions(ppd_file_t *ppd, /* I - PPD file */
conflict = 0;
for (i = num_options; i > 0; i --, options ++)
if (strcmp(options->name, "media") == 0)
if (strcasecmp(options->name, "media") == 0)
{
/*
* Loop through the option string, separating it at commas and
@@ -324,9 +324,9 @@ cupsMarkOptions(ppd_file_t *ppd, /* I - PPD file */
conflict = 1;
}
}
else if (strcmp(options->name, "sides") == 0)
else if (strcasecmp(options->name, "sides") == 0)
{
if (strcmp(options->value, "one-sided") == 0)
if (strcasecmp(options->value, "one-sided") == 0)
{
if (ppdMarkOption(ppd, "Duplex", "None"))
conflict = 1;
@@ -335,7 +335,7 @@ cupsMarkOptions(ppd_file_t *ppd, /* I - PPD file */
if (ppdMarkOption(ppd, "KD03Duplex", "None")) /* Kodak */
conflict = 1;
}
else if (strcmp(options->value, "two-sided-long-edge") == 0)
else if (strcasecmp(options->value, "two-sided-long-edge") == 0)
{
if (ppdMarkOption(ppd, "Duplex", "DuplexNoTumble"))
conflict = 1;
@@ -344,7 +344,7 @@ cupsMarkOptions(ppd_file_t *ppd, /* I - PPD file */
if (ppdMarkOption(ppd, "KD03Duplex", "DuplexNoTumble")) /* Kodak */
conflict = 1;
}
else if (strcmp(options->value, "two-sided-short-edge") == 0)
else if (strcasecmp(options->value, "two-sided-short-edge") == 0)
{
if (ppdMarkOption(ppd, "Duplex", "DuplexTumble"))
conflict = 1;
@@ -354,7 +354,7 @@ cupsMarkOptions(ppd_file_t *ppd, /* I - PPD file */
conflict = 1;
}
}
else if (strcmp(options->name, "resolution") == 0)
else if (strcasecmp(options->name, "resolution") == 0)
{
if (ppdMarkOption(ppd, "Resolution", options->value))
conflict = 1;
+1 -1
Ver Arquivo
@@ -80,7 +80,7 @@ ppdPageSize(ppd_file_t *ppd, /* I - PPD file record */
*/
units[0] = '\0';
if (sscanf(name + 7, "%fx%f%s", &w, &l, units) < 2)
if (sscanf(name + 7, "%fx%f%254s", &w, &l, units) < 2)
return (NULL);
if (strcasecmp(units, "in") == 0)
+47 -4
Ver Arquivo
@@ -630,7 +630,8 @@ ppdOpen(FILE *fp) /* I - File to read from */
string = NULL;
}
else if (strcmp(keyword, "VariablePaperSize") == 0 &&
strcmp(string, "True") == 0)
strcmp(string, "True") == 0 &&
!ppd->variable_sizes)
{
ppd->variable_sizes = 1;
@@ -690,9 +691,51 @@ ppdOpen(FILE *fp) /* I - File to read from */
ppd->custom_margins + 1, ppd->custom_margins + 2,
ppd->custom_margins + 3);
else if (strcmp(keyword, "CustomPageSize") == 0 &&
strcmp(name, "True") == 0 &&
ppd->variable_sizes)
strcmp(name, "True") == 0)
{
if (!ppd->variable_sizes)
{
ppd->variable_sizes = 1;
/*
* Add a "Custom" page size entry...
*/
ppd_add_size(ppd, "Custom");
/*
* Add a "Custom" page size option...
*/
if ((group = ppd_get_group(ppd,
cupsLangString(language,
CUPS_MSG_GENERAL))) == NULL)
{
ppdClose(ppd);
safe_free(string);
return (NULL);
}
if ((option = ppd_get_option(group, "PageSize")) == NULL)
{
ppdClose(ppd);
safe_free(string);
return (NULL);
}
if ((choice = ppd_add_choice(option, "Custom")) == NULL)
{
ppdClose(ppd);
safe_free(string);
return (NULL);
}
strncpy(choice->text, cupsLangString(language, CUPS_MSG_VARIABLE),
sizeof(choice->text) - 1);
group = NULL;
option = NULL;
}
if ((option = ppdFindOption(ppd, "PageSize")) == NULL)
{
ppdClose(ppd);
@@ -985,7 +1028,7 @@ ppdOpen(FILE *fp) /* I - File to read from */
else if (strcmp(keyword, "OrderDependency") == 0 ||
strcmp(keyword, "NonUIOrderDependency") == 0)
{
if (sscanf(string, "%f%s%s", &order, name, keyword) != 3)
if (sscanf(string, "%f%40s%40s", &order, name, keyword) != 3)
{
ppdClose(ppd);
safe_free(string);
+287
Ver Arquivo
@@ -0,0 +1,287 @@
/*
* "$Id$"
*
* snprintf functions for the Common UNIX Printing System (CUPS).
*
* Copyright 1997-1999 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
* copyright law. Distribution and use rights are outlined in the file
* "LICENSE.txt" which should have been included with this file. If this
* file is missing or damaged please contact Easy Software Products
* at:
*
* Attn: CUPS Licensing Information
* Easy Software Products
* 44141 Airport View Drive, Suite 204
* Hollywood, Maryland 20636-3111 USA
*
* Voice: (301) 373-9603
* EMail: cups-info@cups.org
* WWW: http://www.cups.org
*
* Contents:
*
* vsnprintf() - Format a string into a fixed size buffer.
* snprintf() - Format a string into a fixed size buffer.
*/
/*
* Include necessary headers...
*/
#include <stdio.h>
#include <ctype.h>
#include "string.h"
#ifndef HAVE_VSNPRINTF
/*
* 'vsnprintf()' - Format a string into a fixed size buffer.
*/
int /* O - Number of bytes formatted */
vsnprintf(char *buffer, /* O - Output buffer */
size_t bufsize, /* O - Size of output buffer */
const char *format, /* I - printf-style format string */
va_list ap) /* I - Pointer to additional arguments */
{
char *bufptr, /* Pointer to position in buffer */
*bufend, /* Pointer to end of buffer */
sign, /* Sign of format width */
size, /* Size character (h, l, L) */
type; /* Format type character */
const char *bufformat; /* Start of format */
int width, /* Width of field */
prec; /* Number of characters of precision */
char tformat[100], /* Temporary format string for sprintf() */
temp[1024]; /* Buffer for formatted numbers */
int *chars; /* Pointer to integer for %p */
char *s; /* Pointer to string */
int slen; /* Length of string */
/*
* Loop through the format string, formatting as needed...
*/
bufptr = buffer;
bufend = buffer + bufsize - 1;
while (*format && bufptr < bufend)
{
if (*format == '%')
{
bufformat = format;
format ++;
if (*format == '%')
{
*bufptr++ = *format++;
continue;
}
else if (strchr(" -+#\'", *format))
sign = *format++;
else
sign = 0;
width = 0;
while (isdigit(*format))
width = width * 10 + *format++ - '0';
if (*format == '.')
{
format ++;
prec = 0;
while (isdigit(*format))
prec = prec * 10 + *format++ - '0';
}
else
prec = -1;
if (*format == 'l' && format[1] == 'l')
{
size = 'L';
format += 2;
}
else if (*format == 'h' || *format == 'l' || *format == 'L')
size = *format++;
if (!*format)
break;
type = *format++;
switch (type)
{
case 'E' : /* Floating point formats */
case 'G' :
case 'e' :
case 'f' :
case 'g' :
if ((format - bufformat + 1) > sizeof(tformat) ||
(width + 2) > sizeof(temp))
break;
strncpy(tformat, bufformat, format - bufformat);
tformat[format - bufformat] = '\0';
sprintf(temp, tformat, va_arg(ap, double));
if ((bufptr + strlen(temp)) > bufend)
{
strncpy(bufptr, temp, bufend - bufptr);
bufptr = bufend;
break;
}
else
{
strcpy(bufptr, temp);
bufptr += strlen(temp);
}
break;
case 'B' : /* Integer formats */
case 'X' :
case 'b' :
case 'd' :
case 'i' :
case 'o' :
case 'u' :
case 'x' :
if ((format - bufformat + 1) > sizeof(tformat) ||
(width + 2) > sizeof(temp))
break;
strncpy(tformat, bufformat, format - bufformat);
tformat[format - bufformat] = '\0';
sprintf(temp, tformat, va_arg(ap, int));
if ((bufptr + strlen(temp)) > bufend)
{
strncpy(bufptr, temp, bufend - bufptr);
bufptr = bufend;
break;
}
else
{
strcpy(bufptr, temp);
bufptr += strlen(temp);
}
break;
case 'p' : /* Pointer value */
if ((chars = va_arg(ap, int *)) != NULL)
*chars = bufptr - buffer;
break;
case 'c' : /* Character or character array */
if (width <= 1)
*bufptr++ = va_arg(ap, int);
else
{
if ((bufptr + width) > bufend)
width = bufend - bufptr;
memcpy(bufptr, va_arg(ap, char *), width);
bufptr += width;
}
break;
case 's' : /* String */
if ((s = va_arg(ap, char *)) == NULL)
s = "(null)";
slen = strlen(s);
if (slen > width && prec != width)
width = slen;
if ((bufptr + width) > bufend)
width = bufend - bufptr;
if (slen > width)
slen = width;
if (sign == '-')
{
strncpy(bufptr, s, slen);
memset(bufptr + slen, ' ', width - slen);
}
else
{
memset(bufptr, ' ', width - slen);
strncpy(bufptr + width - slen, s, slen);
}
bufptr += width;
break;
case 'n' : /* Output number of chars so far */
if ((format - bufformat + 1) > sizeof(tformat) ||
(width + 2) > sizeof(temp))
break;
strncpy(tformat, bufformat, format - bufformat);
tformat[format - bufformat] = '\0';
sprintf(temp, tformat, va_arg(ap, int));
if ((bufptr + strlen(temp)) > bufend)
{
strncpy(bufptr, temp, bufend - bufptr);
bufptr = bufend;
break;
}
else
{
strcpy(bufptr, temp);
bufptr += strlen(temp);
}
break;
}
}
else
*bufptr++ = *format++;
}
/*
* Nul-terminate the string and return the number of characters in it.
*/
*bufptr = '\0';
return (bufptr - buffer);
}
#endif /* !HAVE_VSNPRINT */
#ifndef HAVE_SNPRINTF
/*
* 'snprintf()' - Format a string into a fixed size buffer.
*/
int /* O - Number of bytes formatted */
snprintf(char *buffer, /* O - Output buffer */
size_t bufsize, /* O - Size of output buffer */
const char *format, /* I - printf-style format string */
...) /* I - Additional arguments as needed */
{
int bytes; /* Number of bytes formatted */
va_list ap; /* Pointer to additional arguments */
va_start(ap, format);
bytes = vsnprintf(buffer, bufsize, format, ap);
va_end(ap);
return (bytes);
}
#endif /* !HAVE_SNPRINTF */
/*
* End of "$Id$".
*/
+28
Ver Arquivo
@@ -29,6 +29,8 @@
* Include necessary headers...
*/
# include <stdio.h>
# include <stdarg.h>
# include <config.h>
# include <string.h>
@@ -43,6 +45,15 @@
# endif /* WIN32 || __EMX__ */
/*
* C++ magic...
*/
# ifdef __cplusplus
extern "C" {
# endif /* __cplusplus */
/*
* Prototypes...
*/
@@ -59,6 +70,23 @@ extern int strcasecmp(const char *, const char *);
extern int strncasecmp(const char *, const char *, size_t n);
# endif /* !HAVE_STRNCASECMP */
# ifndef HAVE_SNPRINTF
extern int snprintf(char *, size_t, const char *, ...);
# endif /* !HAVE_SNPRINTF */
# ifndef HAVE_VSNPRINTF
extern int vsnprintf(char *, size_t, const char *, va_list);
# endif /* !HAVE_VSNPRINTF */
/*
* C++ magic...
*/
# ifdef __cplusplus
}
# endif /* __cplusplus */
#endif /* !_CUPS_STRING_H_ */
/*
+1 -1
Ver Arquivo
@@ -104,7 +104,7 @@ main(int argc, /* I - Number of command-line args */
case 3 :
src = mimeFileType(mime, argv[1]);
sscanf(argv[2], "%[^/]/%s", super, type);
sscanf(argv[2], "%15[^/]/31%s", super, type);
dst = mimeType(mime, super, type);
filters = mimeFilter(mime, src, dst, &num_filters);
+8 -5
Ver Arquivo
@@ -108,8 +108,8 @@ mimeAddType(mime_t *mime, /* I - MIME database */
mime->num_types ++;
*types = temp;
strcpy(temp->super, super);
strcpy(temp->type, type);
strncpy(temp->super, super, sizeof(temp->super) - 1);
strncpy(temp->type, type, sizeof(temp->type) - 1);
if (mime->num_types > 1)
qsort(mime->types, mime->num_types, sizeof(mime_type_t *),
@@ -392,7 +392,7 @@ mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */
* This is just a filename match on the extension...
*/
sprintf(value[0], "*.%s", name);
snprintf(value[0], sizeof(value[0]), "*.%s", name);
length[0] = strlen(value[0]);
num_values = 1;
op = MIME_MAGIC_MATCH;
@@ -582,8 +582,11 @@ mimeType(mime_t *mime, /* I - MIME database */
* Lookup the type in the array...
*/
strcpy(key.super, super);
strcpy(key.type, type);
strncpy(key.super, super, sizeof(key.super) - 1);
key.super[sizeof(key.super) - 1] = '\0';
strncpy(key.type, type, sizeof(key.type) - 1);
key.type[sizeof(key.type) - 1] = '\0';
keyptr = &key;
match = (mime_type_t **)bsearch(&keyptr, mime->types, mime->num_types,
+137 -42
Ver Arquivo
@@ -57,7 +57,9 @@
* Local globals...
*/
static http_t *cups_server = NULL;
static http_t *cups_server = NULL; /* Current server connection */
static ipp_status_t last_error = IPP_OK; /* Last IPP error */
static char authstring[255] = ""; /* Authorization string */
/*
@@ -98,6 +100,7 @@ cupsCancelJob(const char *name, /* I - Name of printer or class */
* attributes-natural-language
* printer-uri
* job-id
* [requesting-user-name]
*/
request = ippNew();
@@ -114,21 +117,31 @@ cupsCancelJob(const char *name, /* I - Name of printer or class */
"attributes-natural-language", NULL,
language != NULL ? language->language : "C");
sprintf(uri, "ipp://%s:%d/printers/%s", hostname, ippPort(), printer);
snprintf(uri, sizeof(uri), "ipp://%s:%d/printers/%s", hostname, ippPort(), printer);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
NULL, uri);
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", job);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, cupsUser());
/*
* Do the request...
*/
if ((response = cupsDoRequest(cups_server, request, "/jobs/")) == NULL)
{
last_error = IPP_BAD_REQUEST;
return (0);
}
else
{
last_error = response->request.status.status_code;
ippDelete(response);
ippDelete(response);
return (1);
return (1);
}
}
@@ -152,8 +165,6 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
const char *password; /* Password string */
char plain[255], /* Plaintext username:password */
encode[255]; /* Encoded username:password */
static char authstring[255] = "";
/* Authorization string */
DEBUG_printf(("cupsDoFileRequest(%08x, %08s, \'%s\', \'%s\')\n",
@@ -217,10 +228,7 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
DEBUG_puts("cupsDoFileRequest: post...");
if (httpPost(http, resource))
{
httpReconnect(http);
continue;
}
/*
* Send the IPP data and wait for the response...
@@ -263,7 +271,10 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
httpFlush(http);
if ((password = cupsGetPassword("Password:")) != NULL)
printf("Authentication required for %s on %s...\n", cupsUser(),
http->hostname);
if ((password = cupsGetPassword("UNIX Password: ")) != NULL)
{
/*
* Got a password; send it to the server...
@@ -271,17 +282,23 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
if (!password[0])
break;
sprintf(plain, "%s:%s", cupsUser(), password);
snprintf(plain, sizeof(plain), "%s:%s", cupsUser(), password);
httpEncode64(encode, plain);
sprintf(authstring, "Basic %s", encode);
snprintf(authstring, sizeof(authstring), "Basic %s", encode);
continue;
}
else
break;
}
if (status != HTTP_OK)
else if (status == HTTP_ERROR)
{
if (http->error != ENETDOWN && http->error != ENETUNREACH)
continue;
else
break;
}
else if (status != HTTP_OK)
{
DEBUG_printf(("cupsDoFileRequest: error %d...\n", status));
@@ -389,8 +406,10 @@ cupsGetClasses(char ***classes) /* O - Classes */
if ((response = cupsDoRequest(cups_server, request, "/classes/")) != NULL)
{
last_error = response->request.status.status_code;
for (attr = response->attrs; attr != NULL; attr = attr->next)
if (strcmp(attr->name, "printer-name") == 0 &&
if (strcasecmp(attr->name, "printer-name") == 0 &&
attr->value_tag == IPP_TAG_NAME)
{
if (n == 0)
@@ -410,6 +429,8 @@ cupsGetClasses(char ***classes) /* O - Classes */
ippDelete(response);
}
else
last_error = IPP_BAD_REQUEST;
return (n);
}
@@ -471,17 +492,22 @@ cupsGetDefault(void)
* Do the request and get back a response...
*/
if ((response = cupsDoRequest(cups_server, request, "/printers/")) != NULL)
if ((response = cupsDoRequest(cups_server, request, "/")) != NULL)
{
last_error = response->request.status.status_code;
if ((attr = ippFindAttribute(response, "printer-name", IPP_TAG_NAME)) != NULL)
{
strcpy(def_printer, attr->values[0].string.text);
strncpy(def_printer, attr->values[0].string.text, sizeof(def_printer) - 1);
def_printer[sizeof(def_printer) - 1] = '\0';
ippDelete(response);
return (def_printer);
}
ippDelete(response);
}
else
last_error = IPP_BAD_REQUEST;
return (NULL);
}
@@ -500,8 +526,12 @@ cupsGetPPD(const char *name) /* I - Printer name */
char printer[HTTP_MAX_URI], /* Printer name */
hostname[HTTP_MAX_URI], /* Hostname */
resource[HTTP_MAX_URI]; /* Resource name */
static char filename[HTTP_MAX_URI]; /* Local filename */
char *tempdir; /* Temporary file directory */
const char *password; /* Password string */
char plain[255], /* Plaintext username:password */
encode[255]; /* Encoded username:password */
http_status_t status; /* HTTP status from server */
static char filename[HTTP_MAX_URI]; /* Local filename */
/*
@@ -518,31 +548,66 @@ cupsGetPPD(const char *name) /* I - Printer name */
#if defined(WIN32) || defined(__EMX__)
tempdir = "C:/WINDOWS/TEMP";
sprintf(filename, "%s/%s.ppd", tempdir, printer);
snprintf(filename, sizeof(filename), "%s/%s.ppd", tempdir, printer);
#else
if ((tempdir = getenv("TMPDIR")) == NULL)
tempdir = "/tmp";
sprintf(filename, "%s/%d.%s.ppd", tempdir, getuid(), printer);
snprintf(filename, sizeof(filename), "%s/%d.%s.ppd", tempdir, getuid(), printer);
#endif /* WIN32 || __EMX__ */
/*
* And send a request to the HTTP server...
*/
sprintf(resource, "/printers/%s.ppd", printer);
snprintf(resource, sizeof(resource), "/printers/%s.ppd", printer);
httpClearFields(cups_server);
httpSetField(cups_server, HTTP_FIELD_HOST, hostname);
httpGet(cups_server, resource);
switch (httpUpdate(cups_server))
do
{
case HTTP_OK : /* New file - get it! */
httpClearFields(cups_server);
httpSetField(cups_server, HTTP_FIELD_HOST, hostname);
httpSetField(cups_server, HTTP_FIELD_AUTHORIZATION, authstring);
if (httpGet(cups_server, resource))
{
status = HTTP_UNAUTHORIZED;
continue;
}
while ((status = httpUpdate(cups_server)) == HTTP_CONTINUE);
if (status == HTTP_UNAUTHORIZED)
{
DEBUG_puts("cupsGetPPD: unauthorized...");
/*
* Flush any error message...
*/
httpFlush(cups_server);
printf("Authentication required for %s on %s...\n", cupsUser(),
cups_server->hostname);
if ((password = cupsGetPassword("UNIX Password: ")) != NULL)
{
/*
* Got a password; send it to the server...
*/
if (!password[0])
break;
snprintf(plain, sizeof(plain), "%s:%s", cupsUser(), password);
httpEncode64(encode, plain);
snprintf(authstring, sizeof(authstring), "Basic %s", encode);
continue;
}
else
break;
default :
return (NULL);
}
}
while (status == HTTP_UNAUTHORIZED);
/*
* OK, we need to copy the file; open the file and copy it...
@@ -620,8 +685,10 @@ cupsGetPrinters(char ***printers) /* O - Printers */
if ((response = cupsDoRequest(cups_server, request, "/printers/")) != NULL)
{
last_error = response->request.status.status_code;
for (attr = response->attrs; attr != NULL; attr = attr->next)
if (strcmp(attr->name, "printer-name") == 0 &&
if (strcasecmp(attr->name, "printer-name") == 0 &&
attr->value_tag == IPP_TAG_NAME)
{
if (n == 0)
@@ -641,11 +708,24 @@ cupsGetPrinters(char ***printers) /* O - Printers */
ippDelete(response);
}
else
last_error = IPP_BAD_REQUEST;
return (n);
}
/*
* 'cupsLastError()' - Return the last IPP error that occurred.
*/
ipp_status_t /* O - IPP error code */
cupsLastError(void)
{
return (last_error);
}
/*
* 'cupsPrintFile()' - Print a file to a printer or class.
*/
@@ -701,7 +781,7 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
request->request.op.operation_id = IPP_PRINT_JOB;
request->request.op.request_id = 1;
sprintf(uri, "ipp://%s:%d/printers/%s", hostname, ippPort(), printer);
snprintf(uri, sizeof(uri), "ipp://%s:%d/printers/%s", hostname, ippPort(), printer);
language = cupsLangDefault();
@@ -742,7 +822,7 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
* Skip the "raw" option - handled above...
*/
if (strcmp(options[i].name, "raw") == 0)
if (strcasecmp(options[i].name, "raw") == 0)
continue;
/*
@@ -786,7 +866,7 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
}
else
{
if (strncmp(option, "no", 2) == 0)
if (strncasecmp(option, "no", 2) == 0)
{
option += 2;
n = 0;
@@ -826,9 +906,9 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
{
n2 = strtol(s + 1, &s, 0);
if (strcmp(s, "dpc") == 0)
if (strcasecmp(s, "dpc") == 0)
ippAddResolution(request, IPP_TAG_JOB, option, IPP_RES_PER_CM, n, n2);
else if (strcmp(s, "dpi") == 0)
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);
@@ -860,7 +940,7 @@ cupsPrintFile(const char *name, /* I - Printer or class name */
* Try printing the file...
*/
sprintf(uri, "/printers/%s", printer);
snprintf(uri, sizeof(uri), "/printers/%s", printer);
if ((response = cupsDoFileRequest(cups_server, request, uri, filename)) == NULL)
jobid = 0;
@@ -941,8 +1021,8 @@ cupsTempFile(char *filename, /* I - Pointer to buffer */
static char * /* I - Printer name or NULL */
cups_connect(const char *name, /* I - Destination (printer[@host]) */
char *printer, /* O - Printer name */
char *hostname) /* O - Hostname */
char *printer, /* O - Printer name [HTTP_MAX_URI] */
char *hostname) /* O - Hostname [HTTP_MAX_URI] */
{
char hostbuf[HTTP_MAX_URI];
/* Name of host */
@@ -951,18 +1031,30 @@ cups_connect(const char *name, /* I - Destination (printer[@host]) */
if (name == NULL)
{
last_error = IPP_BAD_REQUEST;
return (NULL);
}
if (sscanf(name, "%[^@]@%s", printerbuf, hostbuf) == 1)
strcpy(hostbuf, cupsServer());
if (sscanf(name, "%1023[^@]@%1023s", printerbuf, hostbuf) == 1)
{
strncpy(hostbuf, cupsServer(), sizeof(hostbuf) - 1);
hostbuf[sizeof(hostbuf) - 1] = '\0';
}
if (hostname != NULL)
strcpy(hostname, hostbuf);
{
strncpy(hostname, hostbuf, HTTP_MAX_URI - 1);
hostname[HTTP_MAX_URI - 1] = '\0';
}
else
hostname = hostbuf;
if (printer != NULL)
strcpy(printer, printerbuf);
{
strncpy(printer, printerbuf, HTTP_MAX_URI - 1);
printer[HTTP_MAX_URI - 1] = '\0';
}
else
printer = printerbuf;
@@ -975,7 +1067,10 @@ cups_connect(const char *name, /* I - Destination (printer[@host]) */
}
if ((cups_server = httpConnect(hostname, ippPort())) == NULL)
{
last_error = IPP_SERVICE_UNAVAILABLE;
return (NULL);
}
else
return (printer);
}
+2 -2
Ver Arquivo
@@ -42,7 +42,7 @@ include ../Makedefs
#
DOCUMENTS = cmp.shtml idd.shtml sam.shtml sdd.shtml ssr.shtml \
stp.shtml sum.shtml svd.shtml
stp.shtml sum.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
@@ -86,7 +86,7 @@ install:
overview.pdf: overview.html
echo Formatting $@...
htmldoc --duplex --compression=9 --jpeg --webpage -f $@ $<
htmldoc --duplex --compression=9 --jpeg --webpage -f overview.pdf overview.html
sam.html: sam.shtml
echo Formatting $@...
+5 -5
Ver Arquivo
@@ -152,10 +152,10 @@ sections:
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft) </LI>
<LI>IPP/1.0: Additional Optional Operations - Set 1 </LI>
<LI>IPP/1.0: Encoding and Transport </LI>
<LI>IPP/1.0: Implementers Guide </LI>
<LI>IPP/1.0: Model and Semantics </LI>
<LI>RFC 1179, Line Printer Daemon Protocol </LI>
<LI>RFC 2565, IPP/1.0: Encoding and Transport </LI>
<LI>RFC 2566, IPP/1.0: Model and Semantics </LI>
<LI>RFC 2639, IPP/1.0: Implementers Guide </LI>
</UL>
<H1><A NAME=3>3 File Management</A></H1>
<H2><A NAME=3_1>3.1 Directory Structure</A></H2>
@@ -340,7 +340,7 @@ extension of &quot;.h&quot;.
the file, the purpose or nature of the source file, the copyright and
licensing notice, and the functions contained in the file. The file
name and revision information is provided by the CVS &quot;$Id: cmp.shtml,v
1.3 1999/05/21 20:54:04 mike Exp $&quot; tag:
1.4 1999/09/22 20:06:18 mike Exp $&quot; tag:
<UL>
<PRE>
/*
@@ -376,7 +376,7 @@ name and revision information is provided by the CVS &quot;$Id: cmp.shtml,v
</PRE>
</UL>
The bottom of each source file shall contain a trailer giving the name
of the file using the CVS &quot;$Id: cmp.shtml,v 1.3 1999/05/21 20:54:04
of the file using the CVS &quot;$Id: cmp.shtml,v 1.4 1999/09/22 20:06:18
mike Exp $&quot; tag. The primary purpose of this is to mark the end of a
source file; if the trailer is missing it is possible that code has
been lost near the end of the file:
+123 -126
Ver Arquivo
@@ -1,6 +1,6 @@
%PDF-1.2
%âãÏÓ
1 0 obj<</Producer(htmldoc 2.0b1 Copyright 1997-1999 Michael Sweet, All Rights Reserved.)/CreationDate(D:19990521210307Z)/Title(CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
1 0 obj<</Producer(htmldoc 2.0b1 Copyright 1997-1999 Michael Sweet, All Rights Reserved.)/CreationDate(D:19991004131140Z)/Title(CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
2 0 obj<</Type/Encoding/BaseEncoding/WinAnsiEncoding>>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
@@ -400,13 +400,10 @@ endobj
endobj
198 0 obj<</Type/Page/Parent 191 0 R/Contents 199 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R/Fc 9 0 R>>>>>>endobj
199 0 obj<</Length 200 0 R/Filter/FlateDecode>>stream
xÚ•UMo"9½ó+J9%ÒЛB`oC¾„4™aŒöÀŸ«Á·«c»Aì¯ß²» E‹¢Hi»ªÞ{õÊ•·V
×ü“Âmº}Ek4oýñ8„tóœoú·=˜g—)Ì$•x5ÿUßÞ$ƒú¾}3Hêˆ$…q†Æ«\Iá™:¸iÚ„vúuè|­H2¹ZU6†B!ŒXaÁéPja #YÕ_–6*C~°ªøO­ æd!Ã
j*cœ0QÆó¯0ò€Ï¨i7éÔPàŽŠ‚Ñ^¾ÿ†‰åheV0Û9,./î^&³‹ÅüDë«4¹G¹ß
‹É íÝá^{g_åÇíFáöñŸÓx, $ëÅR#Ÿ51ZìÐFí!wѹé»zÈ—.p Œ=¬…;’¿D4ûŽaË<·ƒY#yPVIϦÀ¡ LÁyn¬°Ù#]EË ¡u­bƒ&#ë‚
xÚ•UMo"9½ó+J9%ÒЛB`oC¾„4™aŒöÀŸ«Á·«c»Aì¯ß²» E‹¢Hi»ªÞ{õÊ•·V
×ü“Âmº}Ek4oýñ8„tóœoú·=˜g—)Ì$•x5ÿUßÞ$ƒú¾}3Hêˆ$…q†Æ«\Iá™:¸iÚ„vúuè|­H2¹ZU6†B!ŒXaÁéPja #YÕ_–6*C~°ªøO­ æd!Ã
j*cœ0QÆó¯0ò€Ï¨i7éÔPàŽŠ‚Ñ^¾ÿ†‰åheV0Û9,./î^&³‹ÅüDë«4¹G¹ß
_ËrƇ'<Red¶AhGG®*Ã$°i[å×`‘}â¼22!´ò»“ýYæ€Û²%ûZ+dNKK[$r~&­*ýAºx ¢°‹Éäž_D›[††€â}˜•Ó\™¤ÐÀ¸:Q–ºÙ*“a=¼§³zv]êª~²rž
‹É íÝá^{g_åÇíFáöñŸÓx, $ëÅR#Ÿ51ZìÐFí!wѹé»zÈ—.p Œ=¬…;’¿D4ûŽaË<·ƒY#yPVIϦÀ¡ LÁyn¬°Ù#]EË ¡u­bƒ&#ë‚
G¸•ãf&Zû»™ÞŸÑºÚWÔ¸ã±(x²vpm.$º¤©ºïb,Ç¥ëRãšÉj<IÒìêøaþØO&쫨שz‚âØ…ø(~Ñ2J€·
+6ëHηÀ+°÷ƒ‹Ëo“û/0}¼KÓÛáâê Ìxøþ㱆‘&ùÊa³çQ¸
_ËrƇ'<Red¶AhGG®*Ã$°i[å×`‘}â¼22!´ò»“ýYæ€Û²%ûZ+dNKK[$r~&­*ýAºx ¢°‹Éäž_D›[††€â}˜•Ó\™¤ÐÀ¸:Q–ºÙ*“a=¼§³zv]êª~²rž
@@ -488,19 +485,19 @@ endobj
endobj
222 0 obj<</Type/Page/Parent 191 0 R/Contents 223 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 4 0 R/F8 7 0 R/F9 8 0 R>>>>>>endobj
223 0 obj<</Length 224 0 R/Filter/FlateDecode>>stream
222 0 obj<</Type/Page/Parent 191 0 R/Contents 223 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 4 0 R/F8 7 0 R/F9 8 0 R>>>>>>endobj
223 0 obj<</Length 224 0 R/Filter/FlateDecode>>stream
VMSÛ0½çWìpjgˆ'’Þ€N/”¤\Y^'flÉ•d(ÿ¾»’çchÃ!±õôöí7¿1Œè/†«1L¦ ËÁÍjðå~ñVL¯.`•~º„¥ÎÜ«0X °h?¯žò2šìðrtÃ#k?ê2A“«uÀ_@7èñ4 o-–P#pƒ8¬„qðÒ(Oé­p˜Bò1êÔ‚Ó`°2hQ9º‹PŠgmΡÌ •B%œÜÊ‹f
d9žDc¶¨í× ms~q ¶öFÌž=òä‘çÝ9£Q4ÚõrÈT­Ÿ7èÄСu­r˜â™«”ÔçY\U…*¥xy
tŽœ¿L…~
>Hê¼H›Øü¿þÄÓì{‘Ä'ü¸†ÛÇ%X%*»Ñr kTr“iH™{ƒ„¼õ Èr%ŠÖeÿÆçšè¥˜)1ÝúØKVг—3Oòš»'IQæ%Y¨t®œåz(„ $5…ÖX©©@>£—øiôÔ ÷òDLî™ÜµF%QòÆqMg¢.(LŠ~Ú¶‰l í›uXÒ4X"kgwv굉Lß3ºø{aYæíðÝ-}Š6_+Ðøæ¢3ÚƒSß#§H¥«BÁãï©9Ø=ÀÝç¸G^¦7H5!uYQʰx#DЃi×£ÿ ¢g6ø°×Ú
‘}§çÃ9ojèsŸjP_¼=¯ß!ÇŒ\¢Ô$â4 #­ŒNké¸àáã=”B°
Ô‹=ÒcWâ.zh¦Ö.ô4{ÿÊø` :ngâ.ôû¸£ÝrñÍ6™·ëe ßÂÈ¡»G÷Êvcmǭ݈Pe½ÅÍkk)ÑÚ¬.¨bÛâM»–rF×IÁd•6.‚kbÒÉ3õ×b¯FñÊÚ ÆgyñÞrŠ·¢f¸Ji•‘†’>ŠšQ~´Ó*[›fžX]Ù²§X$=¦ÑMÜ…j+Z9§öï6N.;±\à” nEI-l%í›Ø·ùö&›€E!Ô¹?.W‹!× Ü Vè™m/FRЀåêÁ¯ñ¤Ðs3?Ã2š"YZJMôÆÝYçÈtü“r1EsÂbÎÏw«ÁÏÁ_øe¼?endstream
endobj
endobj
224 0 obj
224 0 obj
845
endobj
225 0 obj<</Type/Page/Parent 191 0 R/Contents 226 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R>>>>>>endobj
226 0 obj<</Length 227 0 R/Filter/FlateDecode>>stream
225 0 obj<</Type/Page/Parent 191 0 R/Contents 226 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R>>>>>>endobj
xÚmP½R„0îyŠ+- ǶÞh§sz¨õ^XŽ8`6Ì,,œ¤Úý~÷+QÉS°-ã×crß$·w vi
M'»²ªÒšöz—ðJ!ÓMó)¨”Z1›¼”¥`>z²ˆƒ±gè‘áD2Ðnœ
ÔÏZs7Ã7 Xº@k8xsšƒq̈gà=a$tÞz={O6Àþý(zíAŒÕ6Í£ñ[œ¸wá*…g“wí¬I¿Fîq„j ìºpAO¢aIj]€ ™Å4úá$“7’âXšqº¶¯Û«¢’SÕKŠýÛá{g;sž=.öOh¥Ò£´‘»Y)*Ï"IeqXäuº…ìŸC?4ÉKòc„endstream
endobj
@@ -842,122 +839,122 @@ xref
0000014189 00000 n
0000014295 00000 n
0000014401 00000 n
0000014669 00000 n
0000014703 00000 n
0000015402 00000 n
0000015451 00000 n
0000015500 00000 n
0000015549 00000 n
0000015598 00000 n
0000015647 00000 n
0000015696 00000 n
0000015745 00000 n
0000015794 00000 n
0000015843 00000 n
0000015892 00000 n
0000015941 00000 n
0000015990 00000 n
0000016039 00000 n
0000016088 00000 n
0000016137 00000 n
0000016186 00000 n
0000016235 00000 n
0000016284 00000 n
0000016333 00000 n
0000016382 00000 n
0000016431 00000 n
0000016480 00000 n
0000016529 00000 n
0000016578 00000 n
0000016627 00000 n
0000016676 00000 n
0000016725 00000 n
0000016774 00000 n
0000016823 00000 n
0000016872 00000 n
0000016921 00000 n
0000016970 00000 n
0000017019 00000 n
0000017068 00000 n
0000017117 00000 n
0000017166 00000 n
0000017215 00000 n
0000017264 00000 n
0000017313 00000 n
0000017362 00000 n
0000017411 00000 n
0000017460 00000 n
0000017509 00000 n
0000017558 00000 n
0000017607 00000 n
0000017656 00000 n
0000017705 00000 n
0000017754 00000 n
0000017803 00000 n
0000017852 00000 n
0000017901 00000 n
0000017950 00000 n
0000017999 00000 n
0000018260 00000 n
0000018412 00000 n
0000024803 00000 n
0000024825 00000 n
0000024938 00000 n
0000025040 00000 n
0000025060 00000 n
0000025200 00000 n
0000026140 00000 n
0000026161 00000 n
0000026274 00000 n
0000026462 00000 n
0000026483 00000 n
0000026623 00000 n
0000027216 00000 n
0000027237 00000 n
0000027350 00000 n
0000027543 00000 n
0000027564 00000 n
0000027695 00000 n
0000028308 00000 n
0000028329 00000 n
0000028442 00000 n
0000028631 00000 n
0000028652 00000 n
0000028783 00000 n
0000029727 00000 n
0000029748 00000 n
0000029879 00000 n
0000030166 00000 n
0000030187 00000 n
0000030327 00000 n
0000031243 00000 n
0000031264 00000 n
0000031395 00000 n
0000031753 00000 n
0000031774 00000 n
0000031914 00000 n
0000032410 00000 n
0000032431 00000 n
0000032562 00000 n
0000033014 00000 n
0000033035 00000 n
0000033175 00000 n
0000034315 00000 n
0000034337 00000 n
0000034477 00000 n
0000035383 00000 n
0000035404 00000 n
0000035544 00000 n
0000036470 00000 n
0000036491 00000 n
0000036631 00000 n
0000037277 00000 n
0000037298 00000 n
0000037438 00000 n
0000038258 00000 n
0000038279 00000 n
0000014635 00000 n
0000014669 00000 n
0000014703 00000 n
0000015402 00000 n
0000015451 00000 n
0000015500 00000 n
0000015549 00000 n
0000015598 00000 n
0000015647 00000 n
0000015696 00000 n
0000015745 00000 n
0000015794 00000 n
0000015843 00000 n
0000015892 00000 n
0000015941 00000 n
0000015990 00000 n
0000016039 00000 n
0000016088 00000 n
0000016137 00000 n
0000016186 00000 n
0000016235 00000 n
0000016284 00000 n
0000016333 00000 n
0000016382 00000 n
0000016431 00000 n
0000016480 00000 n
0000016529 00000 n
0000016578 00000 n
0000016627 00000 n
0000016676 00000 n
0000016725 00000 n
0000016774 00000 n
0000016823 00000 n
0000016872 00000 n
0000016921 00000 n
0000016970 00000 n
0000017019 00000 n
0000017068 00000 n
0000017117 00000 n
0000017166 00000 n
0000017215 00000 n
0000017264 00000 n
0000017313 00000 n
0000017362 00000 n
0000017411 00000 n
0000017460 00000 n
0000017509 00000 n
0000017558 00000 n
0000017607 00000 n
0000017656 00000 n
0000017705 00000 n
0000017754 00000 n
0000017803 00000 n
0000017852 00000 n
0000017901 00000 n
0000017950 00000 n
0000017999 00000 n
0000018260 00000 n
0000018412 00000 n
0000024803 00000 n
0000024825 00000 n
0000024938 00000 n
0000025040 00000 n
0000025060 00000 n
0000025200 00000 n
0000026140 00000 n
0000026161 00000 n
0000026274 00000 n
0000026462 00000 n
0000026483 00000 n
0000026623 00000 n
0000027230 00000 n
0000027251 00000 n
0000027364 00000 n
0000027557 00000 n
0000027578 00000 n
0000027709 00000 n
0000028322 00000 n
0000028343 00000 n
0000028456 00000 n
0000028645 00000 n
0000028666 00000 n
0000028797 00000 n
0000029741 00000 n
0000029762 00000 n
0000029893 00000 n
0000030180 00000 n
0000030201 00000 n
0000030341 00000 n
0000031257 00000 n
0000031278 00000 n
0000031409 00000 n
0000031767 00000 n
0000031788 00000 n
0000031928 00000 n
0000032424 00000 n
0000032445 00000 n
0000032576 00000 n
0000033028 00000 n
0000033049 00000 n
0000033189 00000 n
0000034329 00000 n
0000034351 00000 n
0000034491 00000 n
0000035395 00000 n
0000035416 00000 n
0000035556 00000 n
0000036482 00000 n
0000036503 00000 n
0000036643 00000 n
0000037289 00000 n
0000037310 00000 n
0000037450 00000 n
0000038270 00000 n
0000038291 00000 n
0000038431 00000 n
0000039358 00000 n
0000039507 00000 n
0000039379 00000 n
0000039519 00000 n
+7 -7
Ver Arquivo
@@ -75,10 +75,10 @@ The following non-CUPS documents are referenced by this document:
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft)
<LI>IPP/1.0: Additional Optional Operations - Set 1
<LI>IPP/1.0: Encoding and Transport
<LI>IPP/1.0: Implementers Guide
<LI>IPP/1.0: Model and Semantics
<LI>RFC 1179, Line Printer Daemon Protocol
<LI>RFC 2565, IPP/1.0: Encoding and Transport
<LI>RFC 2566, IPP/1.0: Model and Semantics
<LI>RFC 2639, IPP/1.0: Implementers Guide
</UL>
<H1>File Management</H1>
@@ -334,12 +334,12 @@ extension of ".h".
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 name and revision
information is provided by the CVS "$Id: cmp.shtml 351 1999-05-21 20:54:09Z mike $" tag:
information is provided by the CVS "$Id: cmp.shtml 679 1999-09-22 20:06:27Z mike $" tag:
<UL>
<PRE>
/*
* "$Id: cmp.shtml 351 1999-05-21 20:54:09Z mike $"
* "$Id: cmp.shtml 679 1999-09-22 20:06:27Z mike $"
*
* Description of file contents.
*
@@ -372,14 +372,14 @@ information is provided by the CVS "$Id: cmp.shtml 351 1999-05-21 20:54:09Z mike
</UL>
The bottom of each source file shall contain a trailer giving the name
of the file using the CVS "$Id: cmp.shtml 351 1999-05-21 20:54:09Z mike $" tag. The primary purpose of this is to
of the file using the CVS "$Id: cmp.shtml 679 1999-09-22 20:06:27Z mike $" tag. The primary purpose of this is to
mark the end of a source file; if the trailer is missing it is possible
that code has been lost near the end of the file:
<UL>
<PRE>
/*
* End of "$Id: cmp.shtml 351 1999-05-21 20:54:09Z mike $".
* End of "$Id: cmp.shtml 679 1999-09-22 20:06:27Z mike $".
*/
</PRE>
</UL>
-2
Ver Arquivo
@@ -55,8 +55,6 @@ The following documentation for CUPS is available on this server:
<A HREF="ssr.html">HTML</A> |
<A HREF="ssr.pdf">PDF</A> )
<LI>Software Test Plan (Not Yet Available)
</UL>
<HR>
+146 -93
Ver Arquivo
@@ -1,13 +1,13 @@
<HTML>
<HEAD>
<TITLE>DRAFT - CUPS Interface Design Description</TITLE>
<TITLE>CUPS Interface Design Description</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-IDD-1.0">
</HEAD>
<BODY>
<CENTER><A HREF=#contents><IMG SRC="images/cups-large.gif" BORDER=0><BR>
<H1>DRAFT - CUPS Interface Design Description</H1></A><BR>
<H1>CUPS Interface Design Description</H1></A><BR>
CUPS-IDD-1.0<BR>
Easy Software Products<BR>
Copyright 1997-1999, All Rights Reserved<BR>
@@ -53,26 +53,24 @@ Copyright 1997-1999, All Rights Reserved<BR>
<LI><A HREF=#4_3>4.3 CUPS PostScript File</A></LI>
<LI><A HREF=#4_4>4.4 CUPS Raster File</A></LI>
<LI><A HREF=#4_5>4.5 CUPS Raw Files</A></LI>
<LI><A HREF=#4_6>4.6 File Transfer Protocol</A></LI>
<LI><A HREF=#4_7>4.7 Internet Printing Protocol</A></LI>
<LI><A HREF=#4_6>4.6 Internet Printing Protocol</A></LI>
<UL>
<LI><A HREF=#4_7_1>4.7.1 Get Default Destination (CUPS_GET_DEFAULT =
<LI><A HREF=#4_6_1>4.6.1 Get Default Destination (CUPS_GET_DEFAULT =
0x4001)</A></LI>
<LI><A HREF=#4_7_2>4.7.2 Get Printers (CUPS_GET_PRINTERS = 0x4002)</A></LI>
<LI><A HREF=#4_7_3>4.7.3 Add Printer (CUPS_ADD_PRINTER = 0x4003)</A></LI>
<LI><A HREF=#4_7_4>4.7.4 Delete Printer (CUPS_DELETE_PRINTER = 0x4004)</A>
<LI><A HREF=#4_6_2>4.6.2 Get Printers (CUPS_GET_PRINTERS = 0x4002)</A></LI>
<LI><A HREF=#4_6_3>4.6.3 Add Printer (CUPS_ADD_PRINTER = 0x4003)</A></LI>
<LI><A HREF=#4_6_4>4.6.4 Delete Printer (CUPS_DELETE_PRINTER = 0x4004)</A>
</LI>
<LI><A HREF=#4_7_5>4.7.5 Get Classes (CUPS_GET_CLASSES = 0x4005)</A></LI>
<LI><A HREF=#4_7_6>4.7.6 Add Class (CUPS_ADD_CLASS = 0x4006)</A></LI>
<LI><A HREF=#4_7_7>4.7.7 Delete Class (CUPS_DELETE_CLASS = 0x4007)</A></LI>
<LI><A HREF=#4_7_8>4.7.8 Accept Jobs (CUPS_ACCEPT_JOBS = 0x4008)</A></LI>
<LI><A HREF=#4_7_9>4.7.9 Reject Jobs (CUPS_REJECT_JOBS = 0x4009)</A></LI>
<LI><A HREF=#4_7_10>4.7.10 Set Default Destination (CUPS_SET_DEFAULT =
<LI><A HREF=#4_6_5>4.6.5 Get Classes (CUPS_GET_CLASSES = 0x4005)</A></LI>
<LI><A HREF=#4_6_6>4.6.6 Add Class (CUPS_ADD_CLASS = 0x4006)</A></LI>
<LI><A HREF=#4_6_7>4.6.7 Delete Class (CUPS_DELETE_CLASS = 0x4007)</A></LI>
<LI><A HREF=#4_6_8>4.6.8 Accept Jobs (CUPS_ACCEPT_JOBS = 0x4008)</A></LI>
<LI><A HREF=#4_6_9>4.6.9 Reject Jobs (CUPS_REJECT_JOBS = 0x4009)</A></LI>
<LI><A HREF=#4_6_10>4.6.10 Set Default Destination (CUPS_SET_DEFAULT =
0x400A)</A></LI>
</UL>
<LI><A HREF=#4_8>4.8 Line Printer Daemon Protocol</A></LI>
<LI><A HREF=#4_9>4.9 Server Message Block Protocol</A></LI>
<LI><A HREF=#4_10>4.10 Trivial File Transfer Protocol</A></LI>
<LI><A HREF=#4_7>4.7 Line Printer Daemon Protocol</A></LI>
<LI><A HREF=#4_8>4.8 Server Message Block Protocol</A></LI>
</UL>
<B><A HREF=#5>5 5 - Directories</A></B>
<BR>
@@ -133,10 +131,10 @@ following sections: </P>
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft) </LI>
<LI>IPP/1.0: Additional Optional Operations - Set 1 </LI>
<LI>IPP/1.0: Encoding and Transport </LI>
<LI>IPP/1.0: Implementers Guide </LI>
<LI>IPP/1.0: Model and Semantics </LI>
<LI>RFC 1179, Line Printer Daemon Protocol </LI>
<LI>RFC 2565, IPP/1.0: Encoding and Transport </LI>
<LI>RFC 2566, IPP/1.0: Model and Semantics </LI>
<LI>RFC 2639, IPP/1.0: Implementers Guide </LI>
</UL>
<H1><A NAME=3>3 Internal Interfaces</A></H1>
<H2><A NAME=3_1>3.1 Character Set Files</A></H2>
@@ -285,13 +283,18 @@ understood:
<TABLE BORDER=1 WIDTH=90%>
<TR><TH WIDTH=25%>Directive</TH><TH>Description</TH></TR>
<TR><TD>&lt;Class name&gt;
<BR> &lt;/Class&gt;</TD><TD></TR>
<BR> &lt;/Class&gt;</TD><TD>Surrounds a class definition.</TD></TR>
<TR><TD>&lt;DefaultClass name&gt;
<BR> &lt;/Class&gt;</TD><TD></TR>
<TR><TD>Info</TD><TD></TR>
<TR><TD>Location</TD><TD></TR>
<TR><TD>MoreInfo</TD><TD></TR>
<TR><TD>Printer</TD><TD></TR>
<BR> &lt;/Class&gt;</TD><TD>Surrounds a class definition for the default
destination.</TD></TR>
<TR><TD>Accepting</TD><TD>Specifies whether the class is accepting new
jobs. May be the names &quot;Yes&quot; or &quot;No&quot;.</TD></TR>
<TR><TD>Info</TD><TD>A textual description of the class.</TD></TR>
<TR><TD>Location</TD><TD>A textual location of the class.</TD></TR>
<TR><TD>MoreInfo</TD><TD>A URL pointing to additional information on
the class.</TD></TR>
<TR><TD>Printer</TD><TD>Specifies a printer that is a member of the
class.</TD></TR>
</TABLE>
</CENTER>
</P>
@@ -304,43 +307,92 @@ understood:
<CENTER>
<TABLE BORDER=1 WIDTH=90%>
<TR><TH WIDTH=25%>Directive</TH><TH>Default</TH><TH>Description</TH></TR>
<TR><TD>AccessLog</TD><TD><TD>Specifies the location of the access log
file (default &quot;logs/access_log&quot;).</TD></TR>
<TR><TD>Allow</TD><TD><TD></TR>
<TR><TD>AuthClass</TD><TD><TD></TR>
<TR><TD>AuthType</TD><TD><TD></TR>
<TR><TD>BrowseAddress</TD><TD><TD></TR>
<TR><TD>BrowseInterval</TD><TD><TD></TR>
<TR><TD>BrowsePort</TD><TD><TD></TR>
<TR><TD>BrowseTimeout</TD><TD><TD></TR>
<TR><TD>Browsing</TD><TD><TD></TR>
<TR><TD>DefaultCharset</TD><TD><TD></TR>
<TR><TD>DefaultLanguage</TD><TD><TD></TR>
<TR><TD>Deny</TD><TD><TD></TR>
<TR><TD>DocumentRoot</TD><TD><TD></TR>
<TR><TD>ErrorLog</TD><TD><TD></TR>
<TR><TD>Group</TD><TD><TD></TR>
<TR><TD>HostNameLookups</TD><TD><TD></TR>
<TR><TD>ImplicitClasses</TD><TD><TD></TR>
<TR><TD>KeepAlive</TD><TD><TD></TR>
<TR><TD>KeepAliveTimeout</TD><TD><TD></TR>
<TR><TD>AccessLog</TD><TD>logs/access_log</TD><TD>Specifies the
location of the access log file.</TD></TR>
<TR><TD>Allow</TD><TD>-</TD><TD>Allows connections from the specified
host, network, or domain.</TD></TR>
<TR><TD>AuthClass</TD><TD>-</TD><TD>Specifies what level of
authentication is required; may be either &quot;User&quot;, &quot;System&quot;, or &quot;Group&quot;.</TD>
</TR>
<TR><TD>AuthType</TD><TD>None</TD><TD>Specifies the type of
authentication to perform; may be either &quot;None&quot; or &quot;Basic&quot;.</TD></TR>
<TR><TD>BrowseAddress</TD><TD>255.255.255.255</TD><TD>Specifies a
broadcast address to send CUPS browsing packets to.</TD></TR>
<TR><TD>BrowseInterval</TD><TD>30</TD><TD>Specifies the number of
seconds between browsing updates.</TD></TR>
<TR><TD>BrowsePort</TD><TD>631</TD><TD>Specifies the UDP port number to
use for browse packets.</TD></TR>
<TR><TD>BrowseTimeout</TD><TD>300</TD><TD>Specifies the number of
seconds to wait until remote destinations are removed from the local
destination list.</TD></TR>
<TR><TD>Browsing</TD><TD>On</TD><TD>Specifies whether or not printer
and class browsing is enabled; can be &quot;On&quot; or &quot;Off&quot;.</TD></TR>
<TR><TD>DefaultCharset</TD><TD>iso-8859-1</TD><TD>Specifies the default
character set.</TD></TR>
<TR><TD>DefaultLanguage</TD><TD>current locale</TD><TD>Specifies the
default language.</TD></TR>
<TR><TD>Deny</TD><TD>-</TD><TD>Refuses connections from the specified
host, network, or domain.</TD></TR>
<TR><TD>DocumentRoot</TD><TD>/usr/share/cups/doc</TD><TD>Specifies the
document data root directory.</TD></TR>
<TR><TD>ErrorLog</TD><TD>logs/error_log</TD><TD>Specifies the error log
file location.</TD></TR>
<TR><TD>Group</TD><TD>root, sys, system</TD><TD>Specifies the group
name or ID that is used when running external programs.</TD></TR>
<TR><TD>HostNameLookups</TD><TD>Off</TD><TD>Specifies whether or not to
perform reverse IP address lookups to get the actual hostname; may be
&quot;On&quot; or &quot;Off&quot;. Hostname lookups can significantly degrade the
performance of the CUPS server if one or more DNS servers is not
functioning properly.</TD></TR>
<TR><TD>ImplicitClasses</TD><TD>On</TD><TD>Specifies whether or not to
automatically create printer classes when more than one printer or
class of the same name is detected on the network; may be &quot;On&quot; or
&quot;Off&quot;.</TD></TR>
<TR><TD>KeepAlive</TD><TD>On</TD><TD>Specifies whether or not to use
the HTTP Keep-Alive feature; may be &quot;On&quot; or &quot;Off&quot;.</TD></TR>
<TR><TD>KeepAliveTimeout</TD><TD>30</TD><TD>Specifies the amount of
time to keep the HTTP connection alive before closing it.</TD></TR>
<TR><TD>&lt;Location path&gt;
<BR> &lt;/Location&gt;</TD><TD><TD></TR>
<TR><TD>LogLevel</TD><TD><TD></TR>
<TR><TD>MaxClients</TD><TD><TD></TR>
<TR><TD>MaxLogSize</TD><TD><TD></TR>
<TR><TD>MaxRequestSize</TD><TD><TD></TR>
<TR><TD>Order</TD><TD><TD></TR>
<TR><TD>PageLog</TD><TD><TD></TR>
<TR><TD>Port</TD><TD><TD></TR>
<TR><TD>RIPCache</TD><TD><TD></TR>
<TR><TD>ServerAdmin</TD><TD><TD></TR>
<TR><TD>ServerName</TD><TD><TD></TR>
<TR><TD>ServerRoot</TD><TD><TD></TR>
<TR><TD>SystemGroup</TD><TD><TD></TR>
<TR><TD>TempDir</TD><TD><TD></TR>
<TR><TD>Timeout</TD><TD><TD></TR>
<TR><TD>User</TD><TD><TD></TR>
<BR> &lt;/Location&gt;</TD><TD>-</TD><TD>Specifies a location to restrict
access to.</TD></TR>
<TR><TD>LogLevel</TD><TD>info</TD><TD>Controls the amount of
information that is logged in the error log file. Can be one of
&quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot;, or &quot;none&quot;, in decreasing order or
verbosity.</TD></TR>
<TR><TD>MaxClients</TD><TD>100</TD><TD>Specifies the maximum number of
simultaneous active clients. This value is internally limited to 1/3
of the total number of availabel file descriptors.</TD></TR>
<TR><TD>MaxLogSize</TD><TD>0</TD><TD>Specifies the maximum size of the
access, error, and page log files in bytes. If set to 0 then no
maximum size is set. Log files are rotated automatically when this
size is exceeded.</TD></TR>
<TR><TD>MaxRequestSize</TD><TD>0</TD><TD>Specifies the maximum size of
HTTP requests in bytes. If set to 0 then there is no maximum.</TD></TR>
<TR><TD>Order</TD><TD>Allow,Deny</TD><TD>Specifies the order of Allow
and Deny directive processing; can be &quot;Deny,Allow&quot; to implicitly deny
hosts unless they are allowed by an Allow line, or &quot;Allow,Deny&quot; to
implicitly allow hosts unless they are denied by a Deny line.</TD></TR>
<TR><TD>PageLog</TD><TD>logs/page_log</TD><TD>Specifies the location of
the page log file.</TD></TR>
<TR><TD>Port</TD><TD>631</TD><TD>Specifies a port number to listen to
for HTTP connections.</TD></TR>
<TR><TD>RIPCache</TD><TD>8m</TD><TD>Specifies the size of the memory
cache in bytes that is used by RIP filters.</TD></TR>
<TR><TD>ServerAdmin</TD><TD>root@ServerName</TD><TD>Specifies the
person to contact with problems.</TD></TR>
<TR><TD>ServerName</TD><TD>hostname</TD><TD>Specifies the hostname that
is supplied to HTTP clients. This is also used to determine the
default CUPS server for the CUPS IPP client applications.</TD></TR>
<TR><TD>ServerRoot</TD><TD>/var/cups</TD><TD>Specifies the root
directory for server data files.</TD></TR>
<TR><TD>SystemGroup</TD><TD>root, sys, system</TD><TD>Specifies the
group name used for System class authentication.</TD></TR>
<TR><TD>TempDir</TD><TD>/var/tmp</TD><TD>Specifies the temporary
directory to use.</TD></TR>
<TR><TD>Timeout</TD><TD>300</TD><TD>The timeout in seconds before
client connections are closed in the middle of a request.</TD></TR>
<TR><TD>User</TD><TD>lp</TD><TD>Specifies the user that is used when
running external programs.</TD></TR>
</TABLE>
</CENTER>
</P>
@@ -353,22 +405,28 @@ understood:
<CENTER>
<TABLE BORDER=1 WIDTH=90%>
<TR><TH WIDTH=25%>Directive</TH><TH>Description</TH></TR>
<TR><TD>Accepting</TD><TD>Specifies whether the printer is accepting
new jobs. May be the names &quot;Yes&quot; or &quot;No&quot;.</TD></TR>
<TR><TD>&lt;DefaultPrinter name&gt;
<BR> &lt;/Printer&gt;</TD><TD></TR>
<TR><TD>DeviceURI</TD><TD></TR>
<TR><TD>Info</TD><TD></TR>
<TR><TD>Location</TD><TD></TR>
<TR><TD>MoreInfo</TD><TD></TR>
<BR> &lt;/Printer&gt;</TD><TD>Surrounds the printer definition for a default
destination.</TD></TR>
<TR><TD>DeviceURI</TD><TD>Specifies the device-uri attribute for the
printer.</TD></TR>
<TR><TD>Info</TD><TD>A textual description of the printer.</TD></TR>
<TR><TD>Location</TD><TD>A textual location of the printer.</TD></TR>
<TR><TD>MoreInfo</TD><TD>A URL pointing to additional information on
the printer.</TD></TR>
<TR><TD>&lt;Printer name&gt;
<BR> &lt;/Printer&gt;</TD><TD></TR>
<TR><TD>State</TD><TD></TR>
<BR> &lt;/Printer&gt;</TD><TD>Surrounds the printer definition.</TD></TR>
<TR><TD>State</TD><TD>Specifies the initial state of the printer; can
be &quot;Idle&quot; or &quot;Stopped&quot;.</TD></TR>
</TABLE>
</CENTER>
</P>
<H1><A NAME=4>4 External Interfaces</A></H1>
<H2><A NAME=4_1>4.1 AppSocket Protocol</A></H2>
<P>The AppSocket protocol is an 8-bit clean TCP/IP socket connection.
The default IP service port is 9100. </P>
The default IP service port is 9100. The URI method name is &quot;socket&quot;. </P>
<H2><A NAME=4_2>4.2 CUPS Browsing Protocol</A></H2>
<P>The CUPS Browsing Protocol is a UDP/IP-based broadcast service. By
default this service operates on IP service port 631. </P>
@@ -545,10 +603,7 @@ application/vnd.cups-raster</CODE>. </P>
<P>Raw files are printer-dependent print files that are in a format
suitable to the destination printer (e.g. HP-PCL, HP-RTL, etc.) The
MIME type for CUPS Raw files is <CODE>application/vnd.cups-raw</CODE>. </P>
<H2><A NAME=4_6>4.6 File Transfer Protocol</A></H2>
<P>The File Transfer Protocol (FTP) is described by <A HREF=http://www.ietf.org/rfc/rfc959.txt>
RFC 959: File Transfer Protocol</A>. </P>
<H2><A NAME=4_7>4.7 Internet Printing Protocol</A></H2>
<H2><A NAME=4_6>4.6 Internet Printing Protocol</A></H2>
<P>The Internet Printing Protocol is described by the following RFCs: </P>
<UL>
<LI><A HREF=http://www.ietf.org/rfc/rfc2565.txt>RFC 2565: Internet
@@ -563,20 +618,21 @@ Protocol</A></LI>
<LI><A HREF=http://www.ietf.org/rfc/rfc2569.txt>RFC 2569: Mapping
between LPD and IPP Protocols</A></LI>
</UL>
<P>The URI method name for IPP is &quot;ipp&quot;. </P>
<P>CUPS defines the following extension operations to IPP. </P>
<H3><A NAME=4_7_1>4.7.1 Get Default Destination (CUPS_GET_DEFAULT =
<H3><A NAME=4_6_1>4.6.1 Get Default Destination (CUPS_GET_DEFAULT =
0x4001)</A></H3>
<P>The get default destination operation returns the printer attributes
for the system default printer or class. The only required attributes
are <CODE>attributes-charset</CODE> and <CODE>
attributes-natural-language</CODE>. </P>
<P>Get default destination will only return <CODE>ipp-ok</CODE>. </P>
<H3><A NAME=4_7_2>4.7.2 Get Printers (CUPS_GET_PRINTERS = 0x4002)</A></H3>
<H3><A NAME=4_6_2>4.6.2 Get Printers (CUPS_GET_PRINTERS = 0x4002)</A></H3>
<P>The get printers operation returns the printer attributes for all
printers known to the system. The only required attributes are <CODE>
attributes-charset</CODE> and <CODE>attributes-natural-language</CODE>. </P>
<P>Get printers will only return <CODE>ipp-ok</CODE>. </P>
<H3><A NAME=4_7_3>4.7.3 Add Printer (CUPS_ADD_PRINTER = 0x4003)</A></H3>
<H3><A NAME=4_6_3>4.6.3 Add Printer (CUPS_ADD_PRINTER = 0x4003)</A></H3>
<P>The add printer operation adds or replaces the specified printer.
The <CODE>attributes-charset</CODE>, <CODE>attributes-natural-language</CODE>
and <CODE>printer-uri</CODE> attributes are required. </P>
@@ -589,19 +645,19 @@ body. If a valid interface script or PPD file is not provided then the
printer is treated as a generic PostScript device. </P>
<P>Add printer will return <CODE>ipp-ok</CODE>, <CODE>ipp-not-authorized</CODE>
, <CODE>ipp-bad-request</CODE>, or <CODE>ipp-attributes</CODE>. </P>
<H3><A NAME=4_7_4>4.7.4 Delete Printer (CUPS_DELETE_PRINTER = 0x4004)</A>
<H3><A NAME=4_6_4>4.6.4 Delete Printer (CUPS_DELETE_PRINTER = 0x4004)</A>
</H3>
<P>The delete printer operation removes the specified printer. The only
required attributes are <CODE>attributes-charset</CODE>, <CODE>
attributes-natural-language</CODE>, and <CODE>printer-uri</CODE>. </P>
<P>Delete printer will return <CODE>ipp-ok</CODE>, <CODE>ipp-not-found</CODE>
, or <CODE>ipp-not-authorized</CODE>. </P>
<H3><A NAME=4_7_5>4.7.5 Get Classes (CUPS_GET_CLASSES = 0x4005)</A></H3>
<H3><A NAME=4_6_5>4.6.5 Get Classes (CUPS_GET_CLASSES = 0x4005)</A></H3>
<P>The get classes operation returns the printer attributes for all
classes known to the system. The only required attributes are <CODE>
attributes-charset</CODE> and <CODE>attributes-natural-language</CODE>. </P>
<P>Get classes will only return <CODE>ipp-ok</CODE>. </P>
<H3><A NAME=4_7_6>4.7.6 Add Class (CUPS_ADD_CLASS = 0x4006)</A></H3>
<H3><A NAME=4_6_6>4.6.6 Add Class (CUPS_ADD_CLASS = 0x4006)</A></H3>
<P>The add class operation adds or replaces the specified class. The <CODE>
attributes-charset</CODE>, <CODE>attributes-natural-language</CODE>,
and <CODE>printer-uri</CODE> attributes are required. </P>
@@ -611,27 +667,27 @@ required when initially adding a printer and optional when modifying a
printer. </P>
<P>Add class will return <CODE>ipp-ok</CODE>, <CODE>ipp-not-authorized</CODE>
, <CODE>ipp-bad-request</CODE>, or <CODE>ipp-attributes</CODE>. </P>
<H3><A NAME=4_7_7>4.7.7 Delete Class (CUPS_DELETE_CLASS = 0x4007)</A></H3>
<H3><A NAME=4_6_7>4.6.7 Delete Class (CUPS_DELETE_CLASS = 0x4007)</A></H3>
<P>The delete class operation removes the specified class. The only
required attributes are <CODE>attributes-charset</CODE>, <CODE>
attributes-natural-language</CODE>, and <CODE>printer-uri</CODE>. </P>
<P>Delete class will return <CODE>ipp-ok</CODE>, <CODE>ipp-not-found</CODE>
, or <CODE>ipp-not-authorized</CODE>. </P>
<H3><A NAME=4_7_8>4.7.8 Accept Jobs (CUPS_ACCEPT_JOBS = 0x4008)</A></H3>
<H3><A NAME=4_6_8>4.6.8 Accept Jobs (CUPS_ACCEPT_JOBS = 0x4008)</A></H3>
<P>The accept jobs operation allows jobs to be accepted by the
specified destination. The only required attributes are <CODE>
attributes-charset</CODE>, <CODE>attributes-natural-language</CODE>,
and <CODE>printer-uri</CODE>. </P>
<P>Accept jobs will return <CODE>ipp-ok</CODE>, <CODE>ipp-not-found</CODE>
, or <CODE>ipp-not-authorized</CODE>. </P>
<H3><A NAME=4_7_9>4.7.9 Reject Jobs (CUPS_REJECT_JOBS = 0x4009)</A></H3>
<H3><A NAME=4_6_9>4.6.9 Reject Jobs (CUPS_REJECT_JOBS = 0x4009)</A></H3>
<P>The reject jobs operation prevents jobs from being accepted by the
specified destination. The only required attributes are <CODE>
attributes-charset</CODE>, <CODE>attributes-natural-language</CODE>,
and <CODE>printer-uri</CODE>. </P>
<P>Reject jobs will return <CODE>ipp-ok</CODE>, <CODE>ipp-not-found</CODE>
, or <CODE>ipp-not-authorized</CODE>. </P>
<H3><A NAME=4_7_10>4.7.10 Set Default Destination (CUPS_SET_DEFAULT =
<H3><A NAME=4_6_10>4.6.10 Set Default Destination (CUPS_SET_DEFAULT =
0x400A)</A></H3>
<P>The set default destination operation returns the printer attributes
for the system default printer or class. The only required attributes
@@ -640,27 +696,24 @@ are <CODE>attributes-charset</CODE>, <CODE>attributes-natural-language</CODE>
<P>Set default destination will return <CODE>ipp-ok</CODE>, <CODE>
ipp-not-authorized</CODE>, <CODE>ipp-bad-request</CODE>, or <CODE>
ipp-not-found</CODE>. </P>
<H2><A NAME=4_8>4.8 Line Printer Daemon Protocol</A></H2>
<H2><A NAME=4_7>4.7 Line Printer Daemon Protocol</A></H2>
<P>The Line Printer Daemon (LPD) protocol is described by <A HREF=http://www.ietf.org/rfc/rfc1179.txt>
RFC 1179: Line Printer Daemon Protocol</A>. </P>
<H2><A NAME=4_9>4.9 Server Message Block Protocol</A></H2>
<P>The URI method name for LPD is &quot;lpd&quot;. </P>
<H2><A NAME=4_8>4.8 Server Message Block Protocol</A></H2>
<P>The Server Message Block (SMB) and related Common Internet File
System (CIFS) protocols are described at <A HREF=http://anu.samba.org/cifs>
http://anu.samba.org/cifs</A>. </P>
<H2><A NAME=4_10>4.10 Trivial File Transfer Protocol</A></H2>
<P>The Trivial File Transfer Protocol (TFTP) is described by <A HREF=http://www.ietf.org/rfc/rfc1350.txt>
RFC 1350: The TFTP Protocol (Revision 2)</A>. </P>
<P>The URI method name for SMB is &quot;smb&quot;. </P>
<H1><A NAME=5>5 5 - Directories</A></H1>
<DL>
<DT>/usr/bin </DT>
<DD>The <CODE>cancel</CODE>, <CODE>lp</CODE>, <CODE>lpq</CODE>, <CODE>
lpr</CODE>, <CODE>lprm</CODE>, and <CODE>lpstat</CODE> commands reside
here. </DD>
<DT>/usr/lib </DT>
<DD>The <CODE>accept</CODE>, <CODE>disable</CODE>, <CODE>enable</CODE>, <CODE>
lpadmin</CODE>, and <CODE>reject</CODE> commands reside here. </DD>
<DT>/usr/sbin </DT>
<DD>The <CODE>lpc</CODE> and <CODE>cupsd</CODE> commands resize here. </DD>
<DD>The <CODE>accept</CODE>, <CODE>cupsd</CODE>, <CODE>lpadmin</CODE>, <CODE>
lpc</CODE>, and <CODE>reject</CODE> commands reside here. </DD>
<DT>/usr/share/cups </DT>
<DD>This is the root directory of the CUPS static data. </DD>
<DT>/usr/share/cups/data </DT>
+1157 -1216
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+136 -105
Ver Arquivo
@@ -3,7 +3,7 @@
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-IDD-1.0">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>DRAFT - CUPS Interface Design Description</TITLE>
<TITLE>CUPS Interface Design Description</TITLE>
</HEAD>
<BODY>
@@ -74,10 +74,10 @@ sections:
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft)
<LI>IPP/1.0: Additional Optional Operations - Set 1
<LI>IPP/1.0: Encoding and Transport
<LI>IPP/1.0: Implementers Guide
<LI>IPP/1.0: Model and Semantics
<LI>RFC 1179, Line Printer Daemon Protocol
<LI>RFC 2565, IPP/1.0: Encoding and Transport
<LI>RFC 2566, IPP/1.0: Model and Semantics
<LI>RFC 2639, IPP/1.0: Implementers Guide
</UL>
<H1>Internal Interfaces</H1>
@@ -269,28 +269,33 @@ followed by its value. The following directives are understood:
<TR>
<TD>&lt;Class name&gt;<BR>
&lt;/Class&gt;</TD>
<TD></TD>
<TD>Surrounds a class definition.</TD>
</TR>
<TR>
<TD>&lt;DefaultClass name&gt;<BR>
&lt;/Class&gt;</TD>
<TD></TD>
<TD>Surrounds a class definition for the default destination.</TD>
</TR>
<TR>
<TD>Accepting</TD>
<TD>Specifies whether the class is accepting new jobs. May be
the names "Yes" or "No".</TD>
</TR>
<TR>
<TD>Info</TD>
<TD></TD>
<TD>A textual description of the class.</TD>
</TR>
<TR>
<TD>Location</TD>
<TD></TD>
<TD>A textual location of the class.</TD>
</TR>
<TR>
<TD>MoreInfo</TD>
<TD></TD>
<TD>A URL pointing to additional information on the class.</TD>
</TR>
<TR>
<TD>Printer</TD>
<TD></TD>
<TD>Specifies a printer that is a member of the class.</TD>
</TR>
</TABLE></CENTER>
@@ -310,180 +315,208 @@ followed by its value. The following directives are understood:
</TR>
<TR>
<TD>AccessLog</TD>
<TD></TD>
<TD>Specifies the location of the access log file (default
"logs/access_log").</TD>
<TD>logs/access_log</TD>
<TD>Specifies the location of the access log file.</TD>
</TR>
<TR>
<TD>Allow</TD>
<TD></TD>
<TD></TD>
<TD>-</TD>
<TD>Allows connections from the specified host, network, or
domain.</TD>
</TR>
<TR>
<TD>AuthClass</TD>
<TD></TD>
<TD></TD>
<TD>-</TD>
<TD>Specifies what level of authentication is required; may be either
"User", "System", or "Group".</TD>
</TR>
<TR>
<TD>AuthType</TD>
<TD></TD>
<TD></TD>
<TD>None</TD>
<TD>Specifies the type of authentication to perform; may be either
"None" or "Basic".</TD>
</TR>
<TR>
<TD>BrowseAddress</TD>
<TD></TD>
<TD></TD>
<TD>255.255.255.255</TD>
<TD>Specifies a broadcast address to send CUPS browsing packets to.</TD>
</TR>
<TR>
<TD>BrowseInterval</TD>
<TD></TD>
<TD></TD>
<TD>30</TD>
<TD>Specifies the number of seconds between browsing updates.</TD>
</TR>
<TR>
<TD>BrowsePort</TD>
<TD></TD>
<TD></TD>
<TD>631</TD>
<TD>Specifies the UDP port number to use for browse packets.</TD>
</TR>
<TR>
<TD>BrowseTimeout</TD>
<TD></TD>
<TD></TD>
<TD>300</TD>
<TD>Specifies the number of seconds to wait until remote destinations
are removed from the local destination list.</TD>
</TR>
<TR>
<TD>Browsing</TD>
<TD></TD>
<TD></TD>
<TD>On</TD>
<TD>Specifies whether or not printer and class browsing is enabled; can
be "On" or "Off".</TD>
</TR>
<TR>
<TD>DefaultCharset</TD>
<TD></TD>
<TD></TD>
<TD>iso-8859-1</TD>
<TD>Specifies the default character set.</TD>
</TR>
<TR>
<TD>DefaultLanguage</TD>
<TD></TD>
<TD></TD>
<TD>current locale</TD>
<TD>Specifies the default language.</TD>
</TR>
<TR>
<TD>Deny</TD>
<TD></TD>
<TD></TD>
<TD>-</TD>
<TD>Refuses connections from the specified host, network, or
domain.</TD>
</TR>
<TR>
<TD>DocumentRoot</TD>
<TD></TD>
<TD></TD>
<TD>/usr/share/cups/doc</TD>
<TD>Specifies the document data root directory.</TD>
</TR>
<TR>
<TD>ErrorLog</TD>
<TD></TD>
<TD></TD>
<TD>logs/error_log</TD>
<TD>Specifies the error log file location.</TD>
</TR>
<TR>
<TD>Group</TD>
<TD></TD>
<TD></TD>
<TD>root, sys, system</TD>
<TD>Specifies the group name or ID that is used when running
external programs.</TD>
</TR>
<TR>
<TD>HostNameLookups</TD>
<TD></TD>
<TD></TD>
<TD>Off</TD>
<TD>Specifies whether or not to perform reverse IP address lookups to
get the actual hostname; may be "On" or "Off". Hostname lookups can
significantly degrade the performance of the CUPS server if one or
more DNS servers is not functioning properly.</TD>
</TR>
<TR>
<TD>ImplicitClasses</TD>
<TD></TD>
<TD></TD>
<TD>On</TD>
<TD>Specifies whether or not to automatically create printer classes
when more than one printer or class of the same name is detected on
the network; may be "On" or "Off".</TD>
</TR>
<TR>
<TD>KeepAlive</TD>
<TD></TD>
<TD></TD>
<TD>On</TD>
<TD>Specifies whether or not to use the HTTP Keep-Alive feature; may
be "On" or "Off".</TD>
</TR>
<TR>
<TD>KeepAliveTimeout</TD>
<TD></TD>
<TD></TD>
<TD>30</TD>
<TD>Specifies the amount of time to keep the HTTP connection alive
before closing it.</TD>
</TR>
<TR>
<TD>&lt;Location path&gt;<BR>
&lt;/Location&gt;</TD>
<TD></TD>
<TD></TD>
<TD>-</TD>
<TD>Specifies a location to restrict access to.</TD>
</TR>
<TR>
<TD>LogLevel</TD>
<TD></TD>
<TD></TD>
<TD>info</TD>
<TD>Controls the amount of information that is logged in the
error log file. Can be one of "debug", "info", "warn", "error",
or "none", in decreasing order or verbosity.</TD>
</TR>
<TR>
<TD>MaxClients</TD>
<TD></TD>
<TD></TD>
<TD>100</TD>
<TD>Specifies the maximum number of simultaneous active clients.
This value is internally limited to 1/3 of the total number of
availabel file descriptors.</TD>
</TR>
<TR>
<TD>MaxLogSize</TD>
<TD></TD>
<TD></TD>
<TD>0</TD>
<TD>Specifies the maximum size of the access, error, and page
log files in bytes. If set to 0 then no maximum size is set.
Log files are rotated automatically when this size is
exceeded.</TD>
</TR>
<TR>
<TD>MaxRequestSize</TD>
<TD></TD>
<TD></TD>
<TD>0</TD>
<TD>Specifies the maximum size of HTTP requests in bytes. If set to 0
then there is no maximum.</TD>
</TR>
<TR>
<TD>Order</TD>
<TD></TD>
<TD></TD>
<TD>Allow,Deny</TD>
<TD>Specifies the order of Allow and Deny directive processing; can
be "Deny,Allow" to implicitly deny hosts unless they are allowed by
an Allow line, or "Allow,Deny" to implicitly allow hosts unless they
are denied by a Deny line.</TD>
</TR>
<TR>
<TD>PageLog</TD>
<TD></TD>
<TD></TD>
<TD>logs/page_log</TD>
<TD>Specifies the location of the page log file.</TD>
</TR>
<TR>
<TD>Port</TD>
<TD></TD>
<TD></TD>
<TD>631</TD>
<TD>Specifies a port number to listen to for HTTP connections.</TD>
</TR>
<TR>
<TD>RIPCache</TD>
<TD></TD>
<TD></TD>
<TD>8m</TD>
<TD>Specifies the size of the memory cache in bytes that is used by
RIP filters.</TD>
</TR>
<TR>
<TD>ServerAdmin</TD>
<TD></TD>
<TD></TD>
<TD>root@ServerName</TD>
<TD>Specifies the person to contact with problems.</TD>
</TR>
<TR>
<TD>ServerName</TD>
<TD></TD>
<TD></TD>
<TD>hostname</TD>
<TD>Specifies the hostname that is supplied to HTTP clients. This
is also used to determine the default CUPS server for the CUPS IPP
client applications.</TD>
</TR>
<TR>
<TD>ServerRoot</TD>
<TD></TD>
<TD></TD>
<TD>/var/cups</TD>
<TD>Specifies the root directory for server data files.</TD>
</TR>
<TR>
<TD>SystemGroup</TD>
<TD></TD>
<TD></TD>
<TD>root, sys, system</TD>
<TD>Specifies the group name used for System class authentication.</TD>
</TR>
<TR>
<TD>TempDir</TD>
<TD></TD>
<TD></TD>
<TD>/var/tmp</TD>
<TD>Specifies the temporary directory to use.</TD>
</TR>
<TR>
<TD>Timeout</TD>
<TD></TD>
<TD></TD>
<TD>300</TD>
<TD>The timeout in seconds before client connections are closed
in the middle of a request.</TD>
</TR>
<TR>
<TD>User</TD>
<TD></TD>
<TD></TD>
<TD>lp</TD>
<TD>Specifies the user that is used when running external programs.</TD>
</TR>
</TABLE></CENTER>
@@ -500,35 +533,41 @@ followed by its value. The following directives are understood:
<TH WIDTH="25%">Directive</TH>
<TH>Description</TH>
</TR>
<TR>
<TD>Accepting</TD>
<TD>Specifies whether the printer is accepting new jobs. May be
the names "Yes" or "No".</TD>
</TR>
<TR>
<TD>&lt;DefaultPrinter name&gt;<BR>
&lt;/Printer&gt;</TD>
<TD></TD>
<TD>Surrounds the printer definition for a default destination.</TD>
</TR>
<TR>
<TD>DeviceURI</TD>
<TD></TD>
<TD>Specifies the device-uri attribute for the printer.</TD>
</TR>
<TR>
<TD>Info</TD>
<TD></TD>
<TD>A textual description of the printer.</TD>
</TR>
<TR>
<TD>Location</TD>
<TD></TD>
<TD>A textual location of the printer.</TD>
</TR>
<TR>
<TD>MoreInfo</TD>
<TD></TD>
<TD>A URL pointing to additional information on the printer.</TD>
</TR>
<TR>
<TD>&lt;Printer name&gt;<BR>
&lt;/Printer&gt;</TD>
<TD></TD>
<TD>Surrounds the printer definition.</TD>
</TR>
<TR>
<TD>State</TD>
<TD></TD>
<TD>Specifies the initial state of the printer; can be "Idle" or
"Stopped".</TD>
</TR>
</TABLE></CENTER>
@@ -537,7 +576,7 @@ followed by its value. The following directives are understood:
<H2>AppSocket Protocol</H2>
<P>The AppSocket protocol is an 8-bit clean TCP/IP socket connection.
The default IP service port is 9100.
The default IP service port is 9100. The URI method name is "socket".
<H2>CUPS Browsing Protocol</H2>
@@ -912,12 +951,6 @@ raster data for that page.
to the destination printer (e.g. HP-PCL, HP-RTL, etc.) The MIME type for CUPS
Raw files is <CODE>application/vnd.cups-raw</CODE>.
<H2>File Transfer Protocol</H2>
<P>The File Transfer Protocol (FTP) is described by
<A HREF="http://www.ietf.org/rfc/rfc959.txt">RFC 959: File Transfer
Protocol</A>.
<H2>Internet Printing Protocol</H2>
<P>The Internet Printing Protocol is described by the following RFCs:
@@ -942,6 +975,8 @@ Protocol</A>.
</UL>
<P>The URI method name for IPP is "ipp".
<P>CUPS defines the following extension operations to IPP.
<H3>Get Default Destination (CUPS_GET_DEFAULT = 0x4001)</H3>
@@ -1062,17 +1097,15 @@ are <CODE>attributes-charset</CODE>,
<A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179: Line Printer Daemon
Protocol</A>.
<P>The URI method name for LPD is "lpd".
<H2>Server Message Block Protocol</H2>
<P>The Server Message Block (SMB) and related Common Internet File
System (CIFS) protocols are described at
<A HREF="http://anu.samba.org/cifs">http://anu.samba.org/cifs</A>.
<H2>Trivial File Transfer Protocol</H2>
<P>The Trivial File Transfer Protocol (TFTP) is described by
<A HREF="http://www.ietf.org/rfc/rfc1350.txt">RFC 1350: The TFTP Protocol
(Revision 2)</A>.
<P>The URI method name for SMB is "smb".
<H1>5 - Directories</H1>
@@ -1083,12 +1116,10 @@ System (CIFS) protocols are described at
<CODE>lpr</CODE>, <CODE>lprm</CODE>, and <CODE>lpstat</CODE> commands
reside here.
<DT>/usr/lib
<DD>The <CODE>accept</CODE>, <CODE>disable</CODE>, <CODE>enable</CODE>,
<CODE>lpadmin</CODE>, and <CODE>reject</CODE> commands reside here.
<DT>/usr/sbin
<DD>The <CODE>lpc</CODE> and <CODE>cupsd</CODE> commands resize here.
<DD>The <CODE>accept</CODE>, <CODE>cupsd</CODE>,
<CODE>lpadmin</CODE>, <CODE>lpc</CODE>, and <CODE>reject</CODE>
commands reside here.
<DT>/usr/share/cups
<DD>This is the root directory of the CUPS static data.
+16 -11
Ver Arquivo
@@ -11,7 +11,7 @@
<TD><H1 ALIGN=right>An Overview of the<BR>
Common UNIX Printing System</H1></DIV>
<P ALIGN=right>May 11, 1999<BR>
<P ALIGN=right>October 4, 1999<BR>
Michael Sweet, Easy Software Products<BR>
Copyright 1998-1999, All Rights Reserved.</P>
</TD>
@@ -163,7 +163,9 @@ Apache server configuration file and defines all of the access control
properties for the server.
<P>The printer and class definition files list the available printer
queues and classes.
queues and classes. Printer classes are collections of printers. Jobs
sent to a class are forwarded to the first available printer in the
class, round-robin fashion.
<P>The MIME type files list the supported MIME types (text/plain,
application/postscript, etc.) and "magic" rules for automatically
@@ -174,13 +176,16 @@ when a <I>Print-Job</I> request is received with a
<I>document-format</I> of <I>application/octet-stream</I>.
<P>The MIME conversion rule files list the available filters. These
files are augmented by <I>AddFilter</I> entries in the printer
definition files. The filters are used when a job is dispatched so that
an application can send a convenient file format to the printing system
files are augmented by <I>cupsFilter</I> entries in the printer PPD
files. The filters are used when a job is dispatched so that an
application can send a convenient file format to the printing system
which then converts the document into a printable format as needed.
Each filter has a relative cost associated with it, and the filtering
algorithm chooses the set of filters that will convert the file to the
needed format with the lowest total "cost".
<P>The PPD files describe the capabilities of PostScript printers. There is
one PPD file for each printer.
<P>The PPD files describe the capabilities of PostScript printers.
There is one PPD file for each printer.
<H3>CUPS Interface Library</H3>
@@ -199,8 +204,8 @@ and job options. All output is sent to the standard output.
<H3>Backends</H3>
A backend program is a special filter that writes incoming data to a
device or network connection. Backends for serial, parallel, LPD, TFTP,
FTP, IPP, SMB, and AppSocket (JetDirect) connections are provided in
device or network connection. Backends for serial, parallel, LPD,
IPP, SMB, and AppSocket (JetDirect) connections are provided in
CUPS 1.0.
<H2>Berkeley and System V Commands</H2>
@@ -224,8 +229,8 @@ interfaces to ensure compatibility with existing applications.
<H2>Licensing</H2>
CUPS is available under the terms of the Aladdin Free Public
License, which means that it is basically free except for commercial
CUPS is available under the terms of the GNU General Public License
which means that it is basically free except for binary-only
distribution. Vendors wishing to license CUPS for their printing
solution should contact Easy Software Products at:
Arquivo binário não exibido.
+5 -5
Ver Arquivo
@@ -1,14 +1,14 @@
<HTML>
<HEAD>
<TITLE>DRAFT - CUPS Software Administrators Manual</TITLE>
<TITLE>CUPS Software Administrators Manual</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.0.0">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.0.2">
</HEAD>
<BODY>
<CENTER><A HREF=#contents><IMG SRC="images/cups-large.gif" BORDER=0><BR>
<H1>DRAFT - CUPS Software Administrators Manual</H1></A><BR>
CUPS-SAM-1.0.0<BR>
<H1>CUPS Software Administrators Manual</H1></A><BR>
CUPS-SAM-1.0.2<BR>
Easy Software Products<BR>
Copyright 1997-1999, All Rights Reserved<BR>
</CENTER>
@@ -92,7 +92,7 @@ Copyright 1997-1999, All Rights Reserved<BR>
<HR>
<H1 ALIGN=RIGHT><A NAME=1>Preface</A></H1>
This software administrators manual provides printer administration
information for the Common UNIX Printing System (&quot;CUPS&quot;) Version 1.0.0.
information for the Common UNIX Printing System (&quot;CUPS&quot;) Version 1.0.2.
<H2><A NAME=1_1>System Overview</A></H2>
The Common UNIX Printing System provides a portable printing layer for
UNIX&reg; operating systems. It has been developed by Easy Software
+512 -497
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+3 -3
Ver Arquivo
@@ -1,16 +1,16 @@
<HTML>
<HEAD>
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.0.0">
<META NAME="DOCNUMBER" CONTENT="CUPS-SAM-1.0.2">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>DRAFT - CUPS Software Administrators Manual</TITLE>
<TITLE>CUPS Software Administrators Manual</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=RIGHT>Preface</H1>
This software administrators manual provides printer administration
information for the Common UNIX Printing System ("CUPS") Version 1.0.0.
information for the Common UNIX Printing System ("CUPS") Version 1.0.2.
<H2>System Overview</H2>
+61 -67
Ver Arquivo
@@ -1,13 +1,13 @@
<HTML>
<HEAD>
<TITLE>DRAFT - CUPS Software Design Description</TITLE>
<TITLE>CUPS Software Design Description</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SDD-1.0">
</HEAD>
<BODY>
<CENTER><A HREF=#contents><IMG SRC="images/cups-large.gif" BORDER=0><BR>
<H1>DRAFT - CUPS Software Design Description</H1></A><BR>
<H1>CUPS Software Design Description</H1></A><BR>
CUPS-SDD-1.0<BR>
Easy Software Products<BR>
Copyright 1997-1999, All Rights Reserved<BR>
@@ -34,8 +34,7 @@ Copyright 1997-1999, All Rights Reserved<BR>
<LI><A HREF=#3_1_2>3.1.2 lpd</A></LI>
<LI><A HREF=#3_1_3>3.1.3 parallel</A></LI>
<LI><A HREF=#3_1_4>3.1.4 serial</A></LI>
<LI><A HREF=#3_1_5>3.1.5 smb</A></LI>
<LI><A HREF=#3_1_6>3.1.6 socket</A></LI>
<LI><A HREF=#3_1_5>3.1.5 socket</A></LI>
</UL>
<LI><A HREF=#3_2>3.2 Berkeley Commands</A></LI>
<UL>
@@ -45,9 +44,9 @@ Copyright 1997-1999, All Rights Reserved<BR>
</UL>
<LI><A HREF=#3_3>3.3 CGI</A></LI>
<UL>
<LI><A HREF=#3_3_1>3.3.1 classes</A></LI>
<LI><A HREF=#3_3_2>3.3.2 jobs</A></LI>
<LI><A HREF=#3_3_3>3.3.3 printers</A></LI>
<LI><A HREF=#3_3_1>3.3.1 classes.cgi</A></LI>
<LI><A HREF=#3_3_2>3.3.2 jobs.cgi</A></LI>
<LI><A HREF=#3_3_3>3.3.3 printers.cgi</A></LI>
</UL>
<LI><A HREF=#3_4>3.4 CUPS Interface Library</A></LI>
<UL>
@@ -63,8 +62,11 @@ Copyright 1997-1999, All Rights Reserved<BR>
<UL>
<LI><A HREF=#3_5_1>3.5.1 hpgltops</A></LI>
<LI><A HREF=#3_5_2>3.5.2 imagetops</A></LI>
<LI><A HREF=#3_5_3>3.5.3 pstops</A></LI>
<LI><A HREF=#3_5_4>3.5.4 texttops</A></LI>
<LI><A HREF=#3_5_3>3.5.3 imagetoraster</A></LI>
<LI><A HREF=#3_5_4>3.5.4 pstops</A></LI>
<LI><A HREF=#3_5_5>3.5.5 pstoraster</A></LI>
<LI><A HREF=#3_5_6>3.5.6 rastertohp</A></LI>
<LI><A HREF=#3_5_7>3.5.7 texttops</A></LI>
</UL>
<LI><A HREF=#3_6>3.6 Scheduler</A></LI>
<UL>
@@ -75,8 +77,9 @@ Copyright 1997-1999, All Rights Reserved<BR>
<LI><A HREF=#3_6_5>3.6.5 Directory Services</A></LI>
<LI><A HREF=#3_6_6>3.6.6 IPP</A></LI>
<LI><A HREF=#3_6_7>3.6.7 Jobs</A></LI>
<LI><A HREF=#3_6_8>3.6.8 Main</A></LI>
<LI><A HREF=#3_6_9>3.6.9 Printers</A></LI>
<LI><A HREF=#3_6_8>3.6.8 Logging</A></LI>
<LI><A HREF=#3_6_9>3.6.9 Main</A></LI>
<LI><A HREF=#3_6_10>3.6.10 Printers</A></LI>
</UL>
<LI><A HREF=#3_7>3.7 System V Commands</A></LI>
<UL>
@@ -90,12 +93,10 @@ Copyright 1997-1999, All Rights Reserved<BR>
<LI><A HREF=#3_7_8>3.7.8 reject</A></LI>
</UL>
</UL>
<B><A HREF=#4>4 Detailed Design</A></B>
<BR>
<BR><B><A HREF=#5>A Glossary</A></B>
<B><A HREF=#4>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>
<LI><A HREF=#4_1>A.1 Terms</A></LI>
<LI><A HREF=#4_2>A.2 Acronyms</A></LI>
</UL>
<HR>
<H1><A NAME=1>1 Scope</A></H1>
@@ -126,7 +127,6 @@ can be used to support non-PostScript printers. </P>
<LI>1 - Scope </LI>
<LI>2 - References </LI>
<LI>3 - Design Overview </LI>
<LI>4 - Detailed Design </LI>
<LI>A - Glossary </LI>
</UL>
<H1><A NAME=2>2 References</A></H1>
@@ -148,10 +148,10 @@ can be used to support non-PostScript printers. </P>
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft) </LI>
<LI>IPP/1.0: Additional Optional Operations - Set 1 </LI>
<LI>IPP/1.0: Encoding and Transport </LI>
<LI>IPP/1.0: Implementers Guide </LI>
<LI>IPP/1.0: Model and Semantics </LI>
<LI>RFC 1179, Line Printer Daemon Protocol </LI>
<LI>RFC 2565, IPP/1.0: Encoding and Transport </LI>
<LI>RFC 2566, IPP/1.0: Model and Semantics </LI>
<LI>RFC 2639, IPP/1.0: Implementers Guide </LI>
</UL>
<H1><A NAME=3>3 Design Overview</A></H1>
CUPS is composed of 7 software sub-systems that operate together to
@@ -219,17 +219,7 @@ form:
<LI><CODE>parity=<I>odd</I></CODE> - Sets odd parity checking. </LI>
<LI><CODE>parity=<I>none</I></CODE> - Turns parity checking off. </LI>
</UL>
<H3><A NAME=3_1_5>3.1.5 smb</A></H3>
The smb backend sends the specified job to a network host using the
Server Message Block protocol, which is used by most machines running
Microsoft&reg; Windows&reg;. The URI is of the form:
<UL>
<PRE>smb://hostname/queue
</PRE>
</UL>
Usernames and passwords required to access the printer are stored in
an external file.
<H3><A NAME=3_1_6>3.1.6 socket</A></H3>
<H3><A NAME=3_1_5>3.1.5 socket</A></H3>
The socket backend sends the specified job to a network host using the
AppSocket protocol commonly used by Hewlett-Packard and Tektronix
printers. The URI is of the form:
@@ -241,41 +231,32 @@ printers. The URI is of the form:
<H2><A NAME=3_2>3.2 Berkeley Commands</A></H2>
The Berkeley commands provide a simple command-line interface to CUPS
to submit and control print jobs. It is provided for compatibility with
existing software that is hard coded to use the Berkeley commands,
however since printer options cannot be specified using the Berkeley
commands their use it not encouraged.
existing software that is hard coded to use the Berkeley commands.
<H3><A NAME=3_2_1>3.2.1 lpc</A></H3>
The lpc command allows users and administrators to check the status
and control print queues. The version provided with CUPS supports the
following commands:
<UL>
<LI>abort - Stops a printer or all printers and any active print jobs. </LI>
<LI>disable - Prevents new jobs from being submitted to the specified
printer or all printers. </LI>
<LI>down - Stops a printer or all printers after completing the current
print jobs. </LI>
<LI>enable - Allows new jobs to be submitted. </LI>
<LI>start - Starts a printer or all printers. </LI>
<LI>quit - Quits the lpc command. </LI>
<LI>status - Shows the status of printers and jobs in the queue. </LI>
<LI>up - Starts a printer or all printers. </LI>
</UL>
<H3><A NAME=3_2_2>3.2.2 lpr</A></H3>
The lpr command submits a job for printing. The CUPS version of lpr
silently ignores the &quot;i&quot;, &quot;p&quot;, &quot;t&quot;, &quot;m&quot;, &quot;h&quot;, and &quot;s&quot; options.
silently ignores the &quot;i&quot;, &quot;t&quot;, &quot;m&quot;, &quot;h&quot;, and &quot;s&quot; options.
<H3><A NAME=3_2_3>3.2.3 lprm</A></H3>
The lprm removes one or more print jobs.
<H2><A NAME=3_3>3.3 CGI</A></H2>
The Common Gateway Interface (CGI) programs provide a web-based status
interface to monitor the status of printers, classes, and jobs.
<H3><A NAME=3_3_1>3.3.1 classes</A></H3>
<H3><A NAME=3_3_1>3.3.1 classes.cgi</A></H3>
The classes CGI lists the available printer classes and any pending
jobs for the class. The user can click on individual classes to limit
the display and click on jobs to see the job status.
<H3><A NAME=3_3_2>3.3.2 jobs</A></H3>
<H3><A NAME=3_3_2>3.3.2 jobs.cgi</A></H3>
The jobs CGI lists the queued print jobs in order of priority. The
list can be limited by printer or job. When the user displays the
status of an individual print job all job options are displayed.
<H3><A NAME=3_3_3>3.3.3 printers</A></H3>
<H3><A NAME=3_3_3>3.3.3 printers.cgi</A></H3>
The printers CGI lists the available printer queues and any pending
jobs for the printer. The user can click on individual printers to
limit the display and click on jobs to see the job status.
@@ -284,8 +265,9 @@ limit the display and click on jobs to see the job status.
language, MIME, PPD, and raster functions used by the CUPS software.
<H3><A NAME=3_4_1>3.4.1 Convenience Functions</A></H3>
Convenience functions are provided to submit an IPP request, send a
print file, cancel a job, get a list of available printers, and get a
list of available classes.
print file, cancel a job, get a list of available printers, get a list
of available classes, get the default printer or class, get the default
server name, get the local username, and get a password string.
<H3><A NAME=3_4_2>3.4.2 HTTP Functions</A></H3>
The HTTP functions provide functions to connect to HTTP servers, issue
requests, read data from a server, and write data to a server.
@@ -329,16 +311,24 @@ necessary conversions from one file type to another.
The hpgltops filter converts HP-GL/2 files into PostScript.
<H3><A NAME=3_5_2>3.5.2 imagetops</A></H3>
The imagetops filter converts image files into PostScript.
<H3><A NAME=3_5_3>3.5.3 pstops</A></H3>
<H3><A NAME=3_5_3>3.5.3 imagetoraster</A></H3>
The imagetoraster filter converts image files into CUPS raster data.
<H3><A NAME=3_5_4>3.5.4 pstops</A></H3>
The pstops filter inserts printer-specific commands from PPD files and
performs page filtering as requested by the user.
<H3><A NAME=3_5_4>3.5.4 texttops</A></H3>
<H3><A NAME=3_5_5>3.5.5 pstoraster</A></H3>
The pstoraster filter converts PostScript program data into CUPS
raster data.
<H3><A NAME=3_5_6>3.5.6 rastertohp</A></H3>
The rastertohp filter handles converting CUPS raster data to HP PCL
and supports both color and black-and-white printers.
<H3><A NAME=3_5_7>3.5.7 texttops</A></H3>
The texttops filter converts text files into PostScript.
<H2><A NAME=3_6>3.6 Scheduler</A></H2>
The scheduler is a fully-functional HTTP/1.1 server that manages the
printers, classes, and jobs in the system. It also handles a simple
broadcast-based directory service so that remote print queues and
classes can be accessed transparently from the local system.
The scheduler is a fully-functional HTTP/1.1 and IPP/1.0 server that
manages the printers, classes, and jobs in the system. It also handles
a simple broadcast-based directory service so that remote print queues
and classes can be accessed transparently from the local system.
<H3><A NAME=3_6_1>3.6.1 Authorization</A></H3>
The authorization module is responsible for performing access control
and authentication for all HTTP and IPP requests entering the system.
@@ -372,24 +362,28 @@ multiple addresses and ports as needed. </P>
<H3><A NAME=3_6_6>3.6.6 IPP</A></H3>
The IPP module handles IPP requests and acts accordingly. URI
validation is also performed here, as a client can post IPP data to any
URI on the server (which might sidestep the access control or
authentication of the HTTP server.)
URI on the server which might sidestep the access control or
authentication of the HTTP server.
<H3><A NAME=3_6_7>3.6.7 Jobs</A></H3>
The jobs module manages print jobs, starts filter and backend
processes for jobs to be printed, and monitors status messages from
those filters and backends.
<H3><A NAME=3_6_8>3.6.8 Main</A></H3>
<H3><A NAME=3_6_8>3.6.8 Logging</A></H3>
The logging module manages the access, error, and page log files that
are generated by the scheduler.
<H3><A NAME=3_6_9>3.6.9 Main</A></H3>
The main module is responsible for timing out and dispatching input
and output for client connections. It also watches for incoming <CODE>
SIGHUP</CODE> signals and reloads the server configuration files as
needed.
<H3><A NAME=3_6_9>3.6.9 Printers</A></H3>
SIGHUP</CODE> and <CODE>SIGCHLD</CODE> signals, reloads the server
configuration files as needed, and handles child process errors and
exits.
<H3><A NAME=3_6_10>3.6.10 Printers</A></H3>
The printers module is responsible for managing printers and PPD files
in the system. The printers module also reads and writes the printers
configuration file.
<H2><A NAME=3_7>3.7 System V Commands</A></H2>
The System V commands provide a robust command-line interface to CUPS
to submit and control print jobs.
to submit and control printers and jobs.
<H3><A NAME=3_7_1>3.7.1 accept</A></H3>
The accept command tells the scheduler to accept new jobs for specific
printers.
@@ -411,17 +405,17 @@ separate job ID for each file that is printed. Also, the Solaris &quot;f&quot;,
The lpadmin command manages printer queues and classes. The Solaris
&quot;A&quot;, &quot;F&quot;, &quot;I&quot;, &quot;M&quot;, &quot;P&quot;, &quot;Q&quot;, &quot;S&quot;, &quot;T&quot;, &quot;U&quot;, &quot;W&quot;, &quot;f&quot;, &quot;l&quot;, &quot;m&quot;, &quot;o&quot;,
&quot;s&quot;, &quot;t&quot;, and &quot;u&quot; options are not supported, and new options &quot;P&quot; (PPD
file) and &quot;F&quot; (filter) are provided to configure CUPS-specific features
such as PPD file and conversion filters.
file), &quot;F&quot; (filter), and &quot;E&quot; (enable and accept) are provided to
configure CUPS-specific features such as PPD file and conversion
filters.
<H3><A NAME=3_7_7>3.7.7 lpstat</A></H3>
The lpstat command lists printers, classes, and jobs as requested by
the user.
<H3><A NAME=3_7_8>3.7.8 reject</A></H3>
The reject command tells the scheduler not to accept new jobs for
specific printers.
<H1><A NAME=4>4 Detailed Design</A></H1>
<H1 TYPE=A VALUE=1><A NAME=5>A Glossary</A></H1>
<H2><A NAME=5_1>A.1 Terms</A></H2>
<H1 TYPE=A VALUE=1><A NAME=4>A Glossary</A></H1>
<H2><A NAME=4_1>A.1 Terms</A></H2>
<DL>
<DT>C </DT>
<DD>A computer language. </DD>
@@ -434,7 +428,7 @@ specific printers.
<DT>socket </DT>
<DD>A two-way network communications channel. </DD>
</DL>
<H2><A NAME=5_2>A.2 Acronyms</A></H2>
<H2><A NAME=4_2>A.2 Acronyms</A></H2>
<DL>
<DT>ASCII </DT>
<DD>American Standard Code for Information Interchange </DD>
+793 -783
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+42 -52
Ver Arquivo
@@ -3,7 +3,7 @@
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SDD-1.0">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>DRAFT - CUPS Software Design Description</TITLE>
<TITLE>CUPS Software Design Description</TITLE>
</HEAD>
<BODY>
@@ -48,8 +48,6 @@ following sections:
<LI>3 - Design Overview
<LI>4 - Detailed Design
<LI>A - Glossary
</UL>
@@ -79,10 +77,10 @@ The following non-CUPS documents are referenced by this document:
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft)
<LI>IPP/1.0: Additional Optional Operations - Set 1
<LI>IPP/1.0: Encoding and Transport
<LI>IPP/1.0: Implementers Guide
<LI>IPP/1.0: Model and Semantics
<LI>RFC 1179, Line Printer Daemon Protocol
<LI>RFC 2565, IPP/1.0: Encoding and Transport
<LI>RFC 2566, IPP/1.0: Model and Semantics
<LI>RFC 2639, IPP/1.0: Implementers Guide
</UL>
<H1>Design Overview</H1>
@@ -185,18 +183,6 @@ The options can be any combination of the following:
</UL>
<H3>smb</H3>
The smb backend sends the specified job to a network host using the Server
Message Block protocol, which is used by most machines running Microsoft&reg;
Windows&reg;. The URI is of the form:
<UL><PRE>smb://hostname/queue
</PRE></UL>
Usernames and passwords required to access the printer are stored in an
external file.
<H3>socket</H3>
The socket backend sends the specified job to a network host using the
@@ -212,9 +198,7 @@ The default port number is 9100.
The Berkeley commands provide a simple command-line interface to CUPS
to submit and control print jobs. It is provided for compatibility with
existing software that is hard coded to use the Berkeley commands,
however since printer options cannot be specified using the Berkeley
commands their use it not encouraged.
existing software that is hard coded to use the Berkeley commands.
<H3>lpc</H3>
@@ -224,28 +208,16 @@ commands:
<UL>
<LI>abort - Stops a printer or all printers and any active print jobs.
<LI>disable - Prevents new jobs from being submitted to the specified
printer or all printers.
<LI>down - Stops a printer or all printers after completing the current
print jobs.
<LI>enable - Allows new jobs to be submitted.
<LI>start - Starts a printer or all printers.
<LI>quit - Quits the lpc command.
<LI>status - Shows the status of printers and jobs in the queue.
<LI>up - Starts a printer or all printers.
</UL>
<H3>lpr</H3>
The lpr command submits a job for printing. The CUPS version of lpr silently
ignores the "i", "p", "t", "m", "h", and "s" options.
ignores the "i", "t", "m", "h", and "s" options.
<H3>lprm</H3>
@@ -256,19 +228,19 @@ The lprm removes one or more print jobs.
The Common Gateway Interface (CGI) programs provide a web-based status interface
to monitor the status of printers, classes, and jobs.
<H3>classes</H3>
<H3>classes.cgi</H3>
The classes CGI lists the available printer classes and any pending jobs for
the class. The user can click on individual classes to limit the display and
click on jobs to see the job status.
<H3>jobs</H3>
<H3>jobs.cgi</H3>
The jobs CGI lists the queued print jobs in order of priority. The list can
be limited by printer or job. When the user displays the status of an
individual print job all job options are displayed.
<H3>printers</H3>
<H3>printers.cgi</H3>
The printers CGI lists the available printer queues and any pending jobs for
the printer. The user can click on individual printers to limit the display and
@@ -282,8 +254,9 @@ language, MIME, PPD, and raster functions used by the CUPS software.
<H3>Convenience Functions</H3>
Convenience functions are provided to submit an IPP request, send a print file,
cancel a job, get a list of available printers, and get a list of available
classes.
cancel a job, get a list of available printers, get a list of available
classes, get the default printer or class, get the default server name, get
the local username, and get a password string.
<H3>HTTP Functions</H3>
@@ -354,21 +327,34 @@ The hpgltops filter converts HP-GL/2 files into PostScript.
The imagetops filter converts image files into PostScript.
<H3>imagetoraster</H3>
The imagetoraster filter converts image files into CUPS raster data.
<H3>pstops</H3>
The pstops filter inserts printer-specific commands from PPD files and
performs page filtering as requested by the user.
<H3>pstoraster</H3>
The pstoraster filter converts PostScript program data into CUPS raster data.
<H3>rastertohp</H3>
The rastertohp filter handles converting CUPS raster data to HP PCL and
supports both color and black-and-white printers.
<H3>texttops</H3>
The texttops filter converts text files into PostScript.
<H2>Scheduler</H2>
The scheduler is a fully-functional HTTP/1.1 server that manages the printers,
classes, and jobs in the system. It also handles a simple broadcast-based
directory service so that remote print queues and classes can be accessed
transparently from the local system.
The scheduler is a fully-functional HTTP/1.1 and IPP/1.0 server that
manages the printers, classes, and jobs in the system. It also handles
a simple broadcast-based directory service so that remote print queues
and classes can be accessed transparently from the local system.
<H3>Authorization</H3>
@@ -413,8 +399,8 @@ ports as needed.
The IPP module handles IPP requests and acts accordingly. URI
validation is also performed here, as a client can post IPP data to any
URI on the server (which might sidestep the access control or
authentication of the HTTP server.)
URI on the server which might sidestep the access control or
authentication of the HTTP server.
<H3>Jobs</H3>
@@ -422,11 +408,17 @@ The jobs module manages print jobs, starts filter and backend processes
for jobs to be printed, and monitors status messages from those filters
and backends.
<H3>Logging</H3>
The logging module manages the access, error, and page log files that are
generated by the scheduler.
<H3>Main</H3>
The main module is responsible for timing out and dispatching input and output
for client connections. It also watches for incoming <CODE>SIGHUP</CODE>
signals and reloads the server configuration files as needed.
and <CODE>SIGCHLD</CODE> signals, reloads the server configuration files as
needed, and handles child process errors and exits.
<H3>Printers</H3>
@@ -437,7 +429,7 @@ configuration file.
<H2>System V Commands</H2>
The System V commands provide a robust command-line interface to CUPS
to submit and control print jobs.
to submit and control printers and jobs.
<H3>accept</H3>
@@ -471,8 +463,8 @@ and "y" options are silently ignored.
The lpadmin command manages printer queues and classes. The Solaris
"A", "F", "I", "M", "P", "Q", "S", "T", "U", "W", "f", "l", "m", "o",
"s", "t", and "u" options are not supported, and new options "P" (PPD
file) and "F" (filter) are provided to configure CUPS-specific features
such as PPD file and conversion filters.
file), "F" (filter), and "E" (enable and accept) are provided to configure
CUPS-specific features such as PPD file and conversion filters.
<H3>lpstat</H3>
@@ -484,8 +476,6 @@ user.
The reject command tells the scheduler not to accept new jobs for specific
printers.
<H1>Detailed Design</H1>
<H1 TYPE=A VALUE=1>Glossary</H1>
<H2>Terms</H2>
+24 -9
Ver Arquivo
@@ -91,10 +91,10 @@ sections:</P>
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft) </LI>
<LI>IPP/1.0: Additional Optional Operations - Set 1 </LI>
<LI>IPP/1.0: Encoding and Transport </LI>
<LI>IPP/1.0: Implementers Guide </LI>
<LI>IPP/1.0: Model and Semantics </LI>
<LI>RFC 1179, Line Printer Daemon Protocol </LI>
<LI>RFC 2565, IPP/1.0: Encoding and Transport </LI>
<LI>RFC 2566, IPP/1.0: Model and Semantics </LI>
<LI>RFC 2639, IPP/1.0: Implementers Guide </LI>
</UL>
<H1><A NAME=3>3 Local Access Risks</A></H1>
<P>Local access risks are those that can be exploited only with a local
@@ -102,17 +102,32 @@ user account. This section does not address issues related to
dissemination of the root password or other security issues associated
with the UNIX operating system. </P>
<H2><A NAME=3_1>3.1 Security Breaches</A></H2>
<P>Since the default installation creates a world-readable request
directory, it is possible for local users to read the contents of print
files before they are printed. </P>
<P>This problem can be alleviated by making the request directory
readable only by the user specified in the CUPS configuration file. </P>
<P>There are two known security vulnerabilities with local access: </P>
<OL>
<LI>Since the default installation creates a world-readable request
directory, it is possible for local users to read the contents of
print files before they are printed.
<P>This problem can be alleviated by making the request directory
readable only by the user specified in the CUPS configuration file. </P>
</LI>
<LI>Device URIs are passed to backend filters in argv[0] and in an
environment variable. Since device URIs can contain usernames and
passwords it may be possible for a local user to gain access to a
remote resource.
<P>We recommend that any password-protected accounts used for remote
printing have limited access priviledges so that the possible damages
can be minimized. </P>
<P>The device URI is &quot;sanitized&quot; (the username and password are
removed) when sent to an IPP client so that a remote user cannot
exploit this vulnerability. </P>
</LI>
</OL>
<H1><A NAME=4>4 Remote Access Risks</A></H1>
<P>Remote access risks are those that can be exploited without a local
user account and/or from a remote system. This section does not address
issues related to network or firewall security. </P>
<H2><A NAME=4_1>4.1 Denial of Service Attacks</A></H2>
<P>Like all internet services, the CUPS server is vulnerable to denial
<P>Like all Internet services, the CUPS server is vulnerable to denial
of service attacks, including: </P>
<OL>
<LI>Establishing multiple connections to the server until the server
+59 -67
Ver Arquivo
@@ -1,6 +1,6 @@
%PDF-1.2
%âãÏÓ
1 0 obj<</Producer(htmldoc 2.0b1 Copyright 1997-1999 Michael Sweet, All Rights Reserved.)/CreationDate(D:19990709142834Z)/Title(DRAFT - CUPS Software Security Report)/Author(Easy Software Products)>>endobj
1 0 obj<</Producer(htmldoc 2.0b1 Copyright 1997-1999 Michael Sweet, All Rights Reserved.)/CreationDate(D:19990922200511Z)/Title(DRAFT - CUPS Software Security Report)/Author(Easy Software Products)>>endobj
2 0 obj<</Type/Encoding/BaseEncoding/WinAnsiEncoding>>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
@@ -194,13 +194,10 @@ endobj
endobj
85 0 obj<</Type/Page/Parent 72 0 R/Contents 86 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R/Fc 9 0 R>>>>>>endobj
86 0 obj<</Length 87 0 R/Filter/FlateDecode>>stream
xÚ­•OÚ0Åï|Š9²Ò&K 7
l…T´) {ââÆp•ØÔ6Úòíkc•V%]å@Æ¿7ö¼?ZÀ „nòªõ)k=½ÄÄæMЃŒ¶CX`yŽê!ûîJžýÈyÏ‘ïÊüÆË$…‰ÈwrM4Ü-èAËþ+Ï6…(KñÎøÚ-¤— )µ.…o{ÐóU]3tàü#?<³Wa×Êm«àç‰ø¡Ó ^°õN:½9ád– IIø5ß4tÄßà³Éäžî•Æ
f\£,HŽ0AÅÖÜÞrɶ糹G"Í­„ÿ³…~'aD+Æ™Òf/B*»—)ð¯·PÓ?¤õd~ H±–¤ª¬ w.n¡SÌw’é½±ïVHÝ€›%·¸ª¦I—˜ßRáÿŒímrûf¨ÖÛ¿Mîœ`ÏE§×)áUoPžb¬þ1Â\pï*Æ
l ™áÙt:…  üÞc° ç›Ý ¡×¶ŸU›JRèÕÃ]ç9K’§ÃÌG”2K$%¼nOèdxÆ^fì)ϵ=N!“„«» zbͪmyøÕ²ú¼c›qæ‚byh(ÅŠ˜#ÌÕ] ÅËØ<âGøÂ8º1X¬ŒM̵ÈÅÑÛÑqÑÑ{aßúŸéE?6²æU×~žf­¯­_Ð&Ùûendstream
xÚ­•ÁŽÚ0†ï<ÅY‰dI!áF­Š6%aO\ÜØW‰Mm£-o_*­ºÊ!Ì|ÿxæøÑñ ¯/F>!äUçSÖy~‰Á‹!+ô›p4€ w}X‘‚Âr"Ÿ²ï6dèF6ÈF® s=˜®“f<?T„)¤(g6ažw÷Cží¼,ù;e[›ˆ›‰@%ˆZ÷#¨þªŽ[p~û‘ë_Ù?Á­r×(8Óeâxnlõ¦œt{Vo‰ÚƤDì–¯ ÷-ñ7øb6kÀÓ£T¤‚SD('0#’n™¹å‚i#N–FÂýY‹ðB½#A`‚+ʨTú,\Hs–*àß¡¦HéÉò:|+PU<\uºº‡NI~Tµ}÷\¨¸Yrù¨EÒõæ·–äÆö6»}ÓTãíß&wÝ`Ç®N×[ìëÚqYcù+Ì8snÖX‚)á#wx1ŸÏÁ ¢‘;èÕ Öp¾>ÝXŠ2eêÙt±@…Ú<µêç"IžO3Ÿ`L •ðº¿<+#ÁÑöRàµb¯^¦úq÷à eÄVjH¥g¤7Añœ—­‘þ0öàRøœå †!ˆÉÖî?SÃuÉ1)OÈ”THw8—í‘a7j_ž~oõ?(&6':çœéÇñ½¡AÔwc­ª_æó<ë|íü ÕàIendstream
endobj
87 0 obj
522
536
endobj
88 0 obj<</Type/Page/Parent 72 0 R/Contents 89 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F8 7 0 R>>>>>>endobj
89 0 obj<</Length 90 0 R/Filter/FlateDecode>>stream
@@ -213,13 +210,12 @@ endobj
endobj
91 0 obj<</Type/Page/Parent 72 0 R/Contents 92 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R/F9 8 0 R>>>>>>endobj
92 0 obj<</Length 93 0 R/Filter/FlateDecode>>stream
uRÛjÜ0}÷WÌcïnöòØ”
¥´]úª•ÆY%²ÆÑÈMý÷‘³]Xƒå3ç6z®¸‘§Í–k°}u×V¾ì ÙAÛÉŸõf­{·„odM€Ö"3üòüÄWí£@WÐ43ôz¹«×
ž¡f†&…‚IùH¬o“Ášü;òP ¼ø|¡ŒŒI9hŒ¹†öèÁ2DÊj@de½PYã\REÏ<
a0J œaï£)ãÔ‰ „D”a0Ì/”Ä@’Ó¤"còy:Ñ€¬/LÅŸŽÞÿúûBœLB€'ÎØ×s;Räm½=÷3—Y7°?ÉÜ%4öˆo·¹÷ÑbuØ™1d𑳠aNce>«OÁ]˧3‡ ùðYüg Ÿ¤7JÓ{ð2Ë0³WD'¡Ïe³6¥ÓÉTÙRÌ3kwCò1C烈P8马¸üCW¿R,Ösಽ!‘ˆö§ÝKü3÷z˜ 7OÚ]ÙË¥oø©ÜA+¬ÜÐúÎ zzaýÓý½zïüØæºÔ÷ën¶ç®W›õ<ñÖ=_moê r«ßŸÛêgõ #endstream
}T]oÛ0 |ϯ úÔW'mÚìmÝP`º6Ŭ{P,%Ñ"K©$;ó~ý޲¶Æ6`éDïH>Žr:Å/§‹ MgT”£«ÅèõÇ9åsZ¬p3»8£…<žÒ'WCoB…@·:lÃÉâ' g”ç-t<g3·PÑB=CIxEqãÿ‹H…°´T¤~íŒÓQIrÖ4´×qC‚Lz^å9†«lÌh±Ñ‚*¢v–¤S¬‹Liói6á´BJÏu^Á¡£#‰#Uj+Òs· EÞ¹H;ÂÞyðäpê9Iåulú0¸B§H‰?½ÿ|ýmÜí”Gx»¦Ð„¨Ê¬UBžg—Oú´bf9Ýõi®¼ÅFý[ÍX©VÀ½£­u{ûD²®ŒEâ¥6:j°MÍ3ýßpÜÉ9'³6yžßi[¨TT+Q™HÚ†(ŒiE*@+rùãSŠ¥²Dhêa‡óÍ+ÒxhçBÐŒXAË'Sa(ê üà`)uálT6ödçµ´ÒY—
A»&Užî”Ì:ÑûZRWì¼CÖ²ï)T êÖ¯eC¥Ø²'Éï!q:Ô”ºh†¥¾ ;Uè•F mF3æÝýÍs_éuå[½˜w¢7~^ë¤û=(AíûÛëv¸íÚÖ\Šb«¬ä÷b!ëúûéV¦OKÊÖÚ;[B*ª…×L:£ÖA™BEN™XVX
—eEÉŽ"lßö½+EýðïÅ‚æšctO1Å«ÒE–8¸ÊjèÓW¾*\Yr¥iÛHŒá`„%¤›÷Àye"ÒEN ÀNnD­ÈèRwpp´†rZƒkÓ±i‡ú¤(_v ƒ½€p¿ÿÖ]½ºl·øQsì=÷ݲ¾P5YÌÄk%Nh¿Q<±ðŽ•³t}sC…Ñ80ïÙŠ¾ê¤>hb×õ»y>öM·j.»Õ1ÆO§ùÿÖöÙåi6Ç’䜿?,F_F¼qþbendstream
endobj
93 0 obj
447
760
endobj
94 0 obj<</Type/Page/Parent 72 0 R/Contents 95 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F8 7 0 R>>>>>>endobj
95 0 obj<</Length 96 0 R/Filter/FlateDecode>>stream
@@ -232,17 +228,13 @@ endobj
97 0 obj<</Type/Page/Parent 72 0 R/Contents 98 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F0 3 0 R/F4 4 0 R/F8 7 0 R/F9 8 0 R>>>>>>endobj
98 0 obj<</Length 99 0 R/Filter/FlateDecode>>stream
xÚ}WKo7¾ûWÌÑ$Ù’ßí©nÀ@[¤¶‚öà Å¥$Æ\rCr½V~}¿!¹z¬í @‘¬È™ù3œ~?šÒþLézFçW$룻ùÑéç[šÞÒ|‰_®®/h^_Ѓª]Tô›”*zÐá9œÌ¿áìM§ùìøüvrŧËY‘Ïz>KÂ+Škø¿"’ŠÔkcœŽª¢Nã×6’ ã¤0Ôå9‚k->ÚêÔyZzWã€ÏáÃ&DUO¸
äžžOfœ{¾Ö‚’Q;K•S¬C€ªò\‹¡Å'¯Œà¤Ñ‘U±sþ™8¼öªÆðõÖ븙d„`ãrr³Ã˜™Lée5JuKzTþEKУ?aæOý ^BÛ¨<r#WºFàEÑï_¿<¦O/­±Ê‹…Q\jµMW.‘ÈéF'M[i»ú…SÏ.i<»ÊuN'ÄŸŽ?…ˆ8:¬qˆêÖDÝ ªtÖf®JvЮÍþ‡N£l–´‰ ”jçUâ·Éù–)‡º‡N’‰+¡mÀÇM
z½‚®Á-cgLè>2ÞÆ… ZöȲ-\ƒä!à¸<Ð;3VâOk*N `K½Âõ$²ÑµŽ)³mëÀ Ô>t(â:- àEÀ­q4H·Æ9f#"sÒ¥œ ¹ñøí
© o­-CO%ªÆÌUiV„yPb3š ¹
Cؤq\ÆOœŠ¢ÀŠæ& %†:±aðE™”¬HY;m÷l¸'_p4éj¾Êt øA ]©t>7rß` Ö«u6ÆVg‡®3àŠB+×^’Œ¨'ÚY™£íˆ¤ôê;z:ÒD,”²èn©ô ¨/nëû ´ÌW$£qÙ̇ÁsI€‡Q·v€;Èןµ«·¢žQ?縳ç
<âhá¨$§o€SEØÚ‚éê|úF¿ûH«tHSѺd½Ì¢¸J'ø»0µ_!â@Ö-Åx)»†ûÉ¿ê›&dã¤É…–yÚ¤œ=@¹Ò¬†èº.Pž}Î}#†guPÐI ©[CK¶¦è"zFWÔ6š%\(>Õ‹ýV‹‹¢Å£²IŠFøÈóóþË*ž ¿Rh”ÔK §šÍe¸Ù^/Z$E­¹´]Óàp¯YŸ7zaC*ô¯Ó^?n‡ŸtUjÍ}+c?ª|B‹ÈËÎß+˜€^€ñ1¾—©bWäÚ5ù€\ny.-ØïK<{YãÌð–ÏËŸéÞ©qL»‚¾¹EÈ™²GFý@äÓŽ«L¯zÈc6ê›èíÌJîã±ÍcYHmàj• ~gxe {e<3sù>+ïðñ_âõ!󸍍ÃGúxÇÀÓÉÇSœ¥‡0ûÌè¶'®>•Úµ¡€e-sa˜t@:`¥ø]ÙëÖb3©àûaò:p9·XAº·å¦Q§Øû®®!þéÌI)§_¿ ȳuçé;5 Qr¥X”8—>6Àlú0,Ñ;ïUªbU
û›²ý·%áÍÎ4Æ^¹·5Ͱ+åíŠîàu¹VoKûݲ¿9‹Ç2´ Í@w"hI¢å¦Œhä4ýÒ¬eVÔªˆ Bî
<¦=¨ø7þ€ˆÆ™”Bz<Ð]½Æ²~lƒÄ Á =j~·RѸc}ýûþ¿ƒëô}°~íÕ× P^ ÷~ßm>H wÆžJÌácöt\ž• +ø‡V+µ­ <ôÈ2õïͳJ-öÉ ¶ß»rQå™
ýÊ.*ì VM?Oè_Üv©—vVNý‘ÏgcÜìŒ1»ÎÆøðG.nÎ&·8‰3×üïOó£ŽþúYU»endstream
äžžOfœ{¾Ö‚’Q;K•S¬C€ªò\‹¡Å'¯Œà¤Ñ‘U±sþ™8¼öªÆðõÖ븙d„`ãrr³Ã˜™Lée5JuKzTþEKУ?aæOý ^âÞF呹ÒÍ0/Š~ÿúå1}xàxiU^,ŒâR«mºr‰DN7"m¥i+mW¿pêÙ%gW¹Î鄸Óñ§G‡5QÝš¨D•ÎÚÌUà \BÉÚµÙÿÐi”Í’6”Rí¼Jüã6Y"Ò2åP·ñÐI2Ñb%´ ø¸I!A¯WÐ5¸eìàŒ ÝGÆÛ¸tBËY¶±…kzgÆJàiMÅ©l©W¸žD6ºÖ1e¶m½„Ú‡E\‡£Å`¡¸5ŽéÖ8Çl¤CdNº”“!7¿±]!ä­µeèI£DÕ˜¹ê#ÍŠ0ªQlF³!×@aÈ»“4ŽËø‰B"ÐR€S±ãíAXÑܤDØP'6 ¾(“’i"k§íž wâ$â Ž&]ÍW™®?há +•ÎçFî ÔzµÎÆØêìÐu\QhåÀK’õD;+s´ƒ”^}GOGZƒˆ…RÝ-•~õÅm}?¡€–ùŠdT".›ù0x. ð0êÖpùú³võVÔó"êgã·cö\a€G•äô pª[[ðá#]Oßèwÿi•i* Z—l¢—Y@Wé„ÿ`¦ö+DȺ¥x/Eb×p?áW}Ó„lÍ“ -ó"´I58{€r+¤Y9 Ñu] <ûœûF %,Îê  “<R·†–lM%ÐEô"Œ®¨m*4K:¹P|ªû­EGe“ð‘ççý—/T<~¥Ð(©—N5›¬²;Ëp³!½^´HŠ
Z•š3ri!º¦Áá^³>oô†/ Tè_§½~Ü?éªÔš!úVÆ~Tù„9:¿W0½ãc|/SŮȵkò¹Üò\Zþ°ß—xö²Æ˜á-Ÿ—>Ó½Sã˜.v}s‹3eŒúȧW™^õÇl:Õ7ÑÛ™•ÜÇc›Ç²ÚÀÕ*üÎðÊöÊx:fæò;|VÞáã¿ÄëCæñQÿP‡ôñާ“§>8Ka÷™ÑmO$\5|*µkCËZæÂ0é€ uÀJñ»²×­ÅfRÁ÷Ã>äu(àrn;±‚$ØÊM3¢N±÷]]Cü .Ò™“RN¿~Agë:›ž3ÎÓwj¢äJ±(q .}l€Ùôa0X¢w†_«TŪ ö7eúoK›iŒ½rokšaWÊÛÝÁër­>Þ–ö»e3rehîDÐ’DËMÑÈiú¥YË(¬¨UA„ÜxL{
2)…ôx* »zeýØ=ˆ9zÔün¥¢q!Çúú÷ýׇiû`ýÚ«-8® ¼@îý¾Û| îŒ=”˜ÃÇìé¸<+­Vj[Ax:é‘eêß›g•Z
ì“l¿wå¢Ê3ú•]TØ4¬š~žÐ¿¸íR/í¬œú#ŸÏƸÙcvñáÿŽ\ÜœMnqg®ùߟæGÿýŒÊUendstream
endobj
99 0 obj
1404
1405
endobj
100 0 obj<</Type/Page/Parent 72 0 R/Contents 101 0 R/Resources<</ProcSet[/PDF/Text]/Font<</F4 4 0 R/F8 7 0 R>>>>>>endobj
101 0 obj<</Length 102 0 R/Filter/FlateDecode>>stream
@@ -393,54 +385,54 @@ xref
0000014851 00000 n
0000014871 00000 n
0000015008 00000 n
0000015599 00000 n
0000015619 00000 n
0000015729 00000 n
0000015919 00000 n
0000015939 00000 n
0000016067 00000 n
0000016583 00000 n
0000016603 00000 n
0000016713 00000 n
0000016913 00000 n
0000016933 00000 n
0000017070 00000 n
0000018543 00000 n
0000018564 00000 n
0000018685 00000 n
0000019137 00000 n
0000019158 00000 n
0000019297 00000 n
0000019794 00000 n
0000019815 00000 n
0000019945 00000 n
0000020399 00000 n
0000020420 00000 n
0000020573 00000 n
0000021671 00000 n
0000021693 00000 n
0000021805 00000 n
0000021979 00000 n
0000022000 00000 n
0000022055 00000 n
0000022160 00000 n
0000022303 00000 n
0000022408 00000 n
0000022527 00000 n
0000022635 00000 n
0000022783 00000 n
0000022892 00000 n
0000022998 00000 n
0000023154 00000 n
0000023249 00000 n
0000023406 00000 n
0000023522 00000 n
0000023630 00000 n
0000023764 00000 n
0000023861 00000 n
0000023961 00000 n
0000015613 00000 n
0000015633 00000 n
0000015743 00000 n
0000015933 00000 n
0000015953 00000 n
0000016081 00000 n
0000016910 00000 n
0000016930 00000 n
0000017040 00000 n
0000017240 00000 n
0000017260 00000 n
0000017397 00000 n
0000018871 00000 n
0000018892 00000 n
0000019013 00000 n
0000019465 00000 n
0000019486 00000 n
0000019625 00000 n
0000020122 00000 n
0000020143 00000 n
0000020273 00000 n
0000020727 00000 n
0000020748 00000 n
0000020901 00000 n
0000021999 00000 n
0000022021 00000 n
0000022133 00000 n
0000022307 00000 n
0000022328 00000 n
0000022383 00000 n
0000022488 00000 n
0000022631 00000 n
0000022736 00000 n
0000022855 00000 n
0000022963 00000 n
0000023111 00000 n
0000023220 00000 n
0000023326 00000 n
0000023482 00000 n
0000023577 00000 n
0000023734 00000 n
0000023850 00000 n
0000023958 00000 n
0000024092 00000 n
0000024189 00000 n
0000024289 00000 n
trailer
<</Size 133/Root 132 0 R/Info 1 0 R>>
startxref
24144
24472
%%EOF
+29 -9
Ver Arquivo
@@ -71,10 +71,10 @@ The following non-CUPS documents are referenced by this document:
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft)
<LI>IPP/1.0: Additional Optional Operations - Set 1
<LI>IPP/1.0: Encoding and Transport
<LI>IPP/1.0: Implementers Guide
<LI>IPP/1.0: Model and Semantics
<LI>RFC 1179, Line Printer Daemon Protocol
<LI>RFC 2565, IPP/1.0: Encoding and Transport
<LI>RFC 2566, IPP/1.0: Model and Semantics
<LI>RFC 2639, IPP/1.0: Implementers Guide
</UL>
<H1>Local Access Risks</H1>
@@ -86,12 +86,32 @@ system.
<H2>Security Breaches</H2>
<P>Since the default installation creates a world-readable request directory,
it is possible for local users to read the contents of print files before they
are printed.
<P>There are two known security vulnerabilities with local access:
<P>This problem can be alleviated by making the request directory readable only
by the user specified in the CUPS configuration file.
<OL>
<LI>Since the default installation creates a world-readable
request directory, it is possible for local users to read the
contents of print files before they are printed.
<P>This problem can be alleviated by making the request
directory readable only by the user specified in the CUPS
configuration file.
<LI>Device URIs are passed to backend filters in argv[0] and in
an environment variable. Since device URIs can contain
usernames and passwords it may be possible for a local user to
gain access to a remote resource.
<P>We recommend that any password-protected accounts used for
remote printing have limited access priviledges so that the
possible damages can be minimized.
<P>The device URI is "sanitized" (the username and password are
removed) when sent to an IPP client so that a remote user
cannot exploit this vulnerability.
</OL>
<H1>Remote Access Risks</H1>
@@ -101,7 +121,7 @@ related to network or firewall security.
<H2>Denial of Service Attacks</H2>
<P>Like all internet services, the CUPS server is vulnerable to denial of
<P>Like all Internet services, the CUPS server is vulnerable to denial of
service attacks, including:
<OL>
+31 -16
Ver Arquivo
@@ -1,14 +1,14 @@
<HTML>
<HEAD>
<TITLE>DRAFT - CUPS Software Users Manual</TITLE>
<TITLE>CUPS Software Users Manual</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.0.0b1">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.0.2">
</HEAD>
<BODY>
<CENTER><A HREF=#contents><IMG SRC="images/cups-large.gif" BORDER=0><BR>
<H1>DRAFT - CUPS Software Users Manual</H1></A><BR>
CUPS-SUM-1.0.0b1<BR>
<H1>CUPS Software Users Manual</H1></A><BR>
CUPS-SUM-1.0.2<BR>
Easy Software Products<BR>
Copyright 1997-1999, All Rights Reserved<BR>
</CENTER>
@@ -48,8 +48,9 @@ Copyright 1997-1999, All Rights Reserved<BR>
<LI><A HREF=#4_1_2>Setting the Orientation</A></LI>
<LI><A HREF=#4_1_3>Printing On Both Sides of the Paper</A></LI>
<LI><A HREF=#4_1_4>Selecting a Range of Pages</A></LI>
<LI><A HREF=#4_1_5>Setting the Brightness</A></LI>
<LI><A HREF=#4_1_6>Setting the Gamma Correction</A></LI>
<LI><A HREF=#4_1_5>N-Up Printing</A></LI>
<LI><A HREF=#4_1_6>Setting the Brightness</A></LI>
<LI><A HREF=#4_1_7>Setting the Gamma Correction</A></LI>
</UL>
<LI><A HREF=#4_2>Text Options</A></LI>
<UL>
@@ -69,7 +70,7 @@ Copyright 1997-1999, All Rights Reserved<BR>
<HR>
<H1 ALIGN=RIGHT><A NAME=1>Preface</A></H1>
This software users manual describes how to use the Common UNIX
Printing System (&quot;CUPS&quot;) Version 1.0.0.
Printing System (&quot;CUPS&quot;) Version 1.0.2.
<H2><A NAME=1_1>System Overview</A></H2>
The Common UNIX Printing System provides a portable printing layer for
UNIX&reg; operating systems. It has been developed by Easy Software
@@ -354,14 +355,15 @@ in landscape orientation: </P>
</PRE>
</UL>
<H3><A NAME=4_1_3>Printing On Both Sides of the Paper</A></H3>
<P>The &quot;-o sides=two-sided-short&quot; and &quot;-o sides=two-sided-long&quot; options
will enable duplexing on the printer (if the printer supports it.) The
&quot;two-sided-short&quot; option is suitable for landscape pages, while the
&quot;two-sided-long&quot; option is suitable for portrait pages: </P>
<P>The &quot;-o sides=two-sided-short-edge&quot; and &quot;-o
sides=two-sided-long-edge&quot; options will enable duplexing on the printer
(if the printer supports it.) The &quot;two-sided-short&quot; option is suitable
for landscape pages, while the &quot;two-sided-long&quot; option is suitable for
portrait pages: </P>
<UL>
<PRE>
% lp -o sides=two-sided-short filename ENTER
% lp -o sides=two-sided-long filename ENTER
% lp -o sides=two-sided-short-edge filename ENTER
% lp -o sides=two-sided-long-edge filename ENTER
</PRE>
</UL>
<H3><A NAME=4_1_4>Selecting a Range of Pages</A></H3>
@@ -385,7 +387,19 @@ of the order of the pages in the &quot;page-range&quot; option. </P>
% lp -o page-set=even filename ENTER
</PRE>
</UL>
<H3><A NAME=4_1_5>Setting the Brightness</A></H3>
<H3><A NAME=4_1_5>N-Up Printing</A></H3>
<P>The &quot;-o number-up=value&quot; option selects N-Up printing. N-Up
printing places multiple document pages on a single printed page. CUPS
supports 1-Up, 2-Up, and 4-Up formats: </P>
<UL>
<PRE>
% lp -o number-up=1 filename ENTER
% lp -o number-up=2 filename ENTER
% lp -o number-up=4 filename ENTER
</PRE>
</UL>
<P>The default format is 1-Up. </P>
<H3><A NAME=4_1_6>Setting the Brightness</A></H3>
<P>You can control the overall brightness of the printed output using
the &quot;-o brightness=percent&quot; option: </P>
<UL>
@@ -395,7 +409,7 @@ the &quot;-o brightness=percent&quot; option: </P>
</UL>
<P>Values greater than 100 will lighten the print, while values less
than 100 will darken it. </P>
<H3><A NAME=4_1_6>Setting the Gamma Correction</A></H3>
<H3><A NAME=4_1_7>Setting the Gamma Correction</A></H3>
<P>You can control the overall gamma correction of the printed output
using the &quot;-o gamma=value&quot; option: </P>
<UL>
@@ -404,7 +418,8 @@ using the &quot;-o gamma=value&quot; option: </P>
</PRE>
</UL>
<P>Values greater than 1000 will lighten the print, while values less
than 1000 will darken it. </P>
than 1000 will darken it. The default gamma is 2200 which matches the
sRGB specification. </P>
<H2><A NAME=4_2>Text Options</A></H2>
<P>The following options apply when printing text files. </P>
<H3><A NAME=4_2_1>Setting the Number of Characters Per Inch</A></H3>
+687 -697
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+26 -10
Ver Arquivo
@@ -2,16 +2,16 @@
<HEAD>
<META NAME="Description" CONTENT="Common UNIX Printing System Software Users Manual">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.0.0b1">
<META NAME="DOCNUMBER" CONTENT="CUPS-SUM-1.0.2">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>DRAFT - CUPS Software Users Manual</TITLE>
<TITLE>CUPS Software Users Manual</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=RIGHT>Preface</H1>
This software users manual describes how to use the Common UNIX Printing
System ("CUPS") Version 1.0.0.
System ("CUPS") Version 1.0.2.
<H2>System Overview</H2>
@@ -359,14 +359,15 @@ landscape orientation:
<H3>Printing On Both Sides of the Paper</H3>
<P>The "-o sides=two-sided-short" and "-o sides=two-sided-long" options will
enable duplexing on the printer (if the printer supports it.) The "two-sided-short"
option is suitable for landscape pages, while the "two-sided-long" option is
suitable for portrait pages:
<P>The "-o sides=two-sided-short-edge" and "-o
sides=two-sided-long-edge" options will enable duplexing on the
printer (if the printer supports it.) The "two-sided-short"
option is suitable for landscape pages, while the
"two-sided-long" option is suitable for portrait pages:
<UL><PRE>
% lp -o sides=two-sided-short filename ENTER
% lp -o sides=two-sided-long filename ENTER
% lp -o sides=two-sided-short-edge filename ENTER
% lp -o sides=two-sided-long-edge filename ENTER
</PRE></UL>
<H3>Selecting a Range of Pages</H3>
@@ -391,6 +392,20 @@ the pages in the "page-range" option.
% lp -o page-set=even filename ENTER
</PRE></UL>
<H3>N-Up Printing</H3>
<P>The "-o number-up=value" option selects N-Up printing. N-Up
printing places multiple document pages on a single printed
page. CUPS supports 1-Up, 2-Up, and 4-Up formats:
<UL><PRE>
% lp -o number-up=1 filename ENTER
% lp -o number-up=2 filename ENTER
% lp -o number-up=4 filename ENTER
</PRE></UL>
<P>The default format is 1-Up.
<H3>Setting the Brightness</H3>
<P>You can control the overall brightness of the printed output using the
@@ -413,7 +428,8 @@ using the "-o gamma=value" option:
</PRE></UL>
<P>Values greater than 1000 will lighten the print, while values less
than 1000 will darken it.
than 1000 will darken it. The default gamma is 2200 which matches the
sRGB specification.
<H2>Text Options</H2>
-149
Ver Arquivo
@@ -1,149 +0,0 @@
<HTML>
<HEAD>
<TITLE>CUPS Software Version Description</TITLE>
<META NAME="AUTHOR" CONTENT="Easy Software Products">
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SVD-1.0.0">
</HEAD>
<BODY>
<CENTER><A HREF=#contents><IMG SRC="images/cups-large.gif" BORDER=0><BR>
<H1>CUPS Software Version Description</H1></A><BR>
CUPS-SVD-1.0.0<BR>
Easy Software Products<BR>
Copyright 1997-1999, 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 Additions</A></B>
<BR>
<BR><B><A HREF=#4>4 Changes</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>
This software version description document provides release
information for the Common UNIX Printing System (&quot;CUPS&quot;) Version 1.0.
<H2><A NAME=1_2>1.2 System Overview</A></H2>
The Common UNIX Printing System provides a portable printing layer for
UNIX&reg; operating systems. It has been developed by Easy Software
Products to promote a standard printing solution for all UNIX vendors
and users. CUPS provides the System V and Berkeley command-line
interfaces.
<P>CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis for
managing print jobs and queues. The Line Printer Daemon (LPD, RFC1179),
Server Message Block (SMB), and AppSocket protocols are also supported
with reduced functionality. </P>
<P>CUPS adds network printer browsing and PostScript Printer
Description (&quot;PPD&quot;)-based printing options to support real world
applications under UNIX. </P>
<P>CUPS also includes a customized version of GNU GhostScript
(currently based off GNU GhostScript 4.03) and an image file RIP that
can be used to support non-PostScript printers. </P>
<H2><A NAME=1_3>1.3 Document Overview</A></H2>
<P>This Something Something Something document is organized into the
following sections:</P>
<UL>
<LI>1 - Scope</LI>
<LI>2 - References</LI>
<LI>3 - Additions</LI>
<LI>4 - Changes</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>
The following CUPS documentation is referenced by this document:
<UL>
<LI>CUPS-CMP-1.0: CUPS Configuration Management Plan </LI>
<LI>CUPS-IDD-1.0: CUPS System Interface Design Description </LI>
<LI>CUPS-SAM-1.0.x: CUPS Software Administrators Manual </LI>
<LI>CUPS-SDD-1.0: CUPS Software Design Description </LI>
<LI>CUPS-SPM-1.0: CUPS Software Programming Manual </LI>
<LI>CUPS-SSR-1.0: CUPS Software Security Report </LI>
<LI>CUPS-STP-1.0: CUPS Software Test Plan </LI>
<LI>CUPS-SUM-1.0.x: CUPS Software Users Manual </LI>
<LI>CUPS-SVD-1.0.x: CUPS Software Version Description </LI>
</UL>
<H2><A NAME=2_2>2.2 Other Documents</A></H2>
The following non-CUPS documents are referenced by this document:
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft) </LI>
<LI>IPP/1.0: Additional Optional Operations - Set 1 </LI>
<LI>IPP/1.0: Encoding and Transport </LI>
<LI>IPP/1.0: Implementers Guide </LI>
<LI>IPP/1.0: Model and Semantics </LI>
<LI>RFC 1179, Line Printer Daemon Protocol </LI>
</UL>
<H1><A NAME=3>3 Additions</A></H1>
Since this is the first release of CUPS, there are no additions to
report.
<H1><A NAME=4>4 Changes</A></H1>
Since this is the first release of CUPS, there are no changes to
report.
<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 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>
</BODY>
</HTML>
BIN
Ver Arquivo
Arquivo binário não exibido.
-167
Ver Arquivo
@@ -1,167 +0,0 @@
<HTML>
<HEAD>
<META NAME="COPYRIGHT" CONTENT="Copyright 1997-1999, All Rights Reserved">
<META NAME="DOCNUMBER" CONTENT="CUPS-SVD-1.0.0">
<META NAME="Author" CONTENT="Easy Software Products">
<TITLE>CUPS Software Version Description</TITLE>
</HEAD>
<BODY>
<H1>Scope</H1>
<H2>Identification</H2>
This software version description document provides release information for the
Common UNIX Printing System ("CUPS") Version 1.0.
<H2>System Overview</H2>
The Common UNIX Printing System provides a portable printing layer for
UNIX&reg; operating systems. It has been developed by Easy Software
Products to promote a standard printing solution for all UNIX vendors
and users. CUPS provides the System V and Berkeley command-line interfaces.
<P>CUPS uses the Internet Printing Protocol (IETF-IPP) as the basis
for managing print jobs and queues. The Line Printer Daemon (LPD,
RFC1179), Server Message Block (SMB), and AppSocket protocols are also
supported with reduced functionality.
<P>CUPS adds network printer browsing and PostScript Printer
Description (&quot;PPD&quot;)-based printing options to support real
world applications under UNIX.
<P>CUPS also includes a customized version of GNU GhostScript
(currently based off GNU GhostScript 4.03) and an image file RIP that
can be used to support non-PostScript printers.
<H2>Document Overview</H2>
<P>This Something Something Something document is organized into the following
sections:</P>
<UL>
<LI>1 - Scope</LI>
<LI>2 - References</LI>
<LI>3 - Additions</LI>
<LI>4 - Changes</LI>
<LI>A - Glossary</LI>
</UL>
<H1>References</H1>
<H2>CUPS Documentation</H2>
The following CUPS documentation is referenced by this document:
<UL>
<LI>CUPS-CMP-1.0: CUPS Configuration Management Plan
<LI>CUPS-IDD-1.0: CUPS System Interface Design Description
<LI>CUPS-SAM-1.0.x: CUPS Software Administrators Manual
<LI>CUPS-SDD-1.0: CUPS Software Design Description
<LI>CUPS-SPM-1.0: CUPS Software Programming Manual
<LI>CUPS-SSR-1.0: CUPS Software Security Report
<LI>CUPS-STP-1.0: CUPS Software Test Plan
<LI>CUPS-SUM-1.0.x: CUPS Software Users Manual
<LI>CUPS-SVD-1.0.x: CUPS Software Version Description
</UL>
<H2>Other Documents</H2>
The following non-CUPS documents are referenced by this document:
<UL>
<LI>IEEE 1387.4, System Administration: Printing (draft)
<LI>IPP/1.0: Additional Optional Operations - Set 1
<LI>IPP/1.0: Encoding and Transport
<LI>IPP/1.0: Implementers Guide
<LI>IPP/1.0: Model and Semantics
<LI>RFC 1179, Line Printer Daemon Protocol
</UL>
<H1>Additions</H1>
Since this is the first release of CUPS, there are no additions to report.
<H1>Changes</H1>
Since this is the first release of CUPS, there are no changes to report.
<H1 TYPE=A VALUE=1>Glossary</H1>
<H2>Terms</H2>
<DL>
<DT>C
<DD>A computer language.
<DT>parallel
<DD>Sending or receiving data more than 1 bit at a time.
<DT>pipe
<DD>A one-way communications channel between two programs.
<DT>serial
<DD>Sending or receiving data 1 bit at a time.
<DT>socket
<DD>A two-way network communications channel.
</DL>
<H2>Acronyms</H2>
<DL>
<DT>ASCII
<DD>American Standard Code for Information Interchange
<DT>CUPS
<DD>Common UNIX Printing System
<DT>ESC/P
<DD>EPSON Standard Code for Printers
<DT>FTP
<DD>File Transfer Protocol
<DT>HP-GL
<DD>Hewlett-Packard Graphics Language
<DT>HP-PCL
<DD>Hewlett-Packard Printer Control Language
<DT>HP-PJL
<DD>Hewlett-Packard Printer Job Language
<DT>IETF
<DD>Internet Engineering Task Force
<DT>IPP
<DD>Internet Printing Protocol
<DT>ISO
<DD>International Standards Organization
<DT>LPD
<DD>Line Printer Daemon
<DT>MIME
<DD>Multimedia Internet Mail Exchange
<DT>PCL
<DD>Page Control Language
<DT>PPD
<DD>PostScript Printer Description
<DT>SMB
<DD>Server Message Block
<DT>TFTP
<DD>Trivial File Transfer Protocol
</DL>
</BODY>
</HTML>
+5 -2
Ver Arquivo
@@ -77,6 +77,9 @@ SetCommonOptions(int num_options, /* I - Number of options */
PageBottom = pagesize->bottom;
PageLeft = pagesize->left;
PageRight = pagesize->right;
fprintf(stderr, "DEBUG: Page = %.0fx%.0f; %.0f,%.0f to %.0f,%.0f\n",
PageWidth, PageLength, PageLeft, PageBottom, PageRight, PageTop);
}
if (ppd != NULL)
@@ -234,10 +237,10 @@ SetCommonOptions(int num_options, /* I - Number of options */
}
if ((val = cupsGetOption("sides", num_options, options)) != NULL &&
strncmp(val, "two-", 4) == 0)
strncasecmp(val, "two-", 4) == 0)
Duplex = 1;
else if ((val = cupsGetOption("Duplex", num_options, options)) != NULL &&
strcmp(val, "DuplexNoTumble") == 0)
strncasecmp(val, "Duplex", 6) == 0)
Duplex = 1;
else if (ppdIsMarked(ppd, "Duplex", "DuplexNoTumble") ||
ppdIsMarked(ppd, "Duplex", "DuplexTumble"))
+75 -32
Ver Arquivo
@@ -131,17 +131,16 @@ LA_line_attributes(int num_params, /* I - Number of parameters */
if (num_params == 0)
{
Outputf("3.0 setmiterlimit\n");
Outputf("0 setlinecap\n");
Outputf("0 setlinejoin\n");
MiterLimit = 3.0f;
LineCap = 0;
LineJoin = 0;
}
else for (i = 0; i < (num_params - 1); i += 2)
switch ((int)params[i].value.number)
{
case 1 :
Outputf("%d setlinecap\n",
params[i + 1].value.number == 1 ? 0 :
params[i + 1].value.number == 4 ? 1 : 2);
LineCap = params[i + 1].value.number == 1 ? 0 :
params[i + 1].value.number == 4 ? 1 : 2;
break;
case 2 :
switch ((int)params[i + 1].value.number)
@@ -149,21 +148,27 @@ LA_line_attributes(int num_params, /* I - Number of parameters */
case 1 :
case 2 :
case 3 :
Outputf("0 setlinejoin\n");
LineJoin = 0;
break;
case 5 :
Outputf("2 setlinejoin\n");
LineJoin = 2;
break;
default :
Outputf("1 setlinejoin\n");
LineJoin = 1;
break;
}
break;
case 3 :
Outputf("%f setmiterlimit\n",
1.0 + 0.5 * (params[i + 1].value.number - 1.0));
MiterLimit = 1.0 + 0.5 * (params[i + 1].value.number - 1.0);
break;
}
if (PageDirty)
{
printf("%.1f setmiterlimit\n", MiterLimit);
printf("%d setlinecap\n", LineCap);
printf("%d setlinejoin\n", LineJoin);
}
}
@@ -197,7 +202,7 @@ NP_number_pens(int num_params, /* I - Number of parameters */
if (num_params == 0)
PenCount = 8;
else if (num_params == 1)
else if (num_params == 1 && params[0].value.number <= 1024)
PenCount = (int)params[0].value.number;
else
fprintf(stderr, "WARNING: HP-GL/2 \'NP\' command with invalid number of parameters (%d)!\n",
@@ -206,7 +211,11 @@ NP_number_pens(int num_params, /* I - Number of parameters */
PC_pen_color(0, NULL);
for (i = 0; i <= PenCount; i ++)
Outputf("/W%d { DefaultPenWidth PenScaling mul setlinewidth } bind def\n", i);
Pens[i].width = PenWidth;
if (PageDirty)
for (i = 0; i <= PenCount; i ++)
printf("/W%d { DefaultPenWidth PenScaling mul setlinewidth } bind def\n", i);
}
@@ -235,26 +244,44 @@ PC_pen_color(int num_params, /* I - Number of parameters */
{
for (i = 0; i <= PenCount; i ++)
if (i < 8)
Outputf("/P%d { %.3f %.3f %.3f setrgbcolor } bind def\n",
i, standard_colors[i][0],
standard_colors[i][1], standard_colors[i][2]);
{
Pens[i].rgb[0] = standard_colors[i][0];
Pens[i].rgb[1] = standard_colors[i][1];
Pens[i].rgb[2] = standard_colors[i][2];
}
else
Outputf("/P%d { 0.0 0.0 0.0 setrgbcolor } bind def\n", i);
{
Pens[i].rgb[0] = 0.0f;
Pens[i].rgb[1] = 0.0f;
Pens[i].rgb[2] = 0.0f;
}
if (PageDirty)
for (i = 0; i <= PenCount; i ++)
Outputf("/P%d { %.3f %.3f %.3f setrgbcolor } bind def\n",
i, Pens[i].rgb[0], Pens[i].rgb[1], Pens[i].rgb[2]);
}
else if (num_params == 1)
else if (num_params == 1 || num_params == 4)
{
i = (int)params[0].value.number;
Outputf("/P%d { %.3f %.3f %.3f setrgbcolor } bind def\n",
i, standard_colors[i & 7][0], standard_colors[i & 7][1],
standard_colors[i & 7][2]);
if (num_params == 1)
{
Pens[i].rgb[0] = standard_colors[i & 7][0];
Pens[i].rgb[1] = standard_colors[i & 7][1];
Pens[i].rgb[2] = standard_colors[i & 7][2];
}
else
{
Pens[i].rgb[0] = params[1].value.number;
Pens[i].rgb[1] = params[2].value.number;
Pens[i].rgb[2] = params[3].value.number;
}
if (PageDirty)
Outputf("/P%d { %.3f %.3f %.3f setrgbcolor } bind def\n",
i, Pens[i].rgb[0], Pens[i].rgb[1], Pens[i].rgb[2]);
}
else if (num_params == 4)
Outputf("/P%d { %.3f %.3f %.3f setrgbcolor } bind def\n",
(int)params[0].value.number,
(params[1].value.number - ColorRange[0][0]) / ColorRange[0][1],
(params[2].value.number - ColorRange[1][0]) / ColorRange[1][1],
(params[3].value.number - ColorRange[2][0]) / ColorRange[2][1]);
else
fprintf(stderr, "WARNING: HP-GL/2 \'PC\' command with invalid number of parameters (%d)!\n",
num_params);
@@ -299,8 +326,18 @@ PW_pen_width(int num_params, /* I - Number of parameters */
}
if (num_params == 2)
Outputf("/W%d { %.1f PenScaling mul setlinewidth } bind def W%d\n",
(int)params[1].value.number, w, (int)params[1].value.number);
{
pen = (int)params[1].value.number;
Pens[pen].width = w;
if (PageDirty)
{
Outputf("/W%d { %.1f PenScaling mul setlinewidth } bind def\n", pen, w);
if (pen == PenNumber)
Outputf("W%d\n", PenNumber);
}
}
else if (num_params < 2)
{
/*
@@ -308,10 +345,16 @@ PW_pen_width(int num_params, /* I - Number of parameters */
*/
for (pen = 0; pen <= PenCount; pen ++)
Outputf("/W%d { %.1f PenScaling mul setlinewidth } bind def\n",
pen, w);
Pens[pen].width = w;
Outputf("W%d\n", PenNumber);
if (PageDirty)
{
for (pen = 0; pen <= PenCount; pen ++)
Outputf("/W%d { %.1f PenScaling mul setlinewidth } bind def\n",
pen, w);
Outputf("W%d\n", PenNumber);
}
}
else
fprintf(stderr, "WARNING: HP-GL/2 \'PW\' command with invalid number of parameters (%d)!\n",
+104 -46
Ver Arquivo
@@ -60,20 +60,16 @@ AD_define_alternate(int num_params, /* I - Number of parameters */
param_t *params) /* I - Parameters */
{
int i; /* Looping var */
int typeface, /* Typeface number */
posture, /* Posture number */
weight; /* Weight number */
float height; /* Height/size of font */
/*
* Set default font attributes...
*/
typeface = 48;
posture = 0;
weight = 0;
height = 11.5;
AlternateFont.typeface = 48;
AlternateFont.posture = 0;
AlternateFont.weight = 0;
AlternateFont.height = 11.5;
/*
* Loop through parameter value pairs...
@@ -83,16 +79,16 @@ AD_define_alternate(int num_params, /* I - Number of parameters */
switch ((int)params[i].value.number)
{
case 4 :
height = params[i + 1].value.number;
AlternateFont.height = params[i + 1].value.number;
break;
case 5 :
posture = (int)params[i + 1].value.number;
AlternateFont.posture = (int)params[i + 1].value.number;
break;
case 6 :
weight = (int)params[i + 1].value.number;
AlternateFont.weight = (int)params[i + 1].value.number;
break;
case 7 :
typeface = (int)params[i + 1].value.number;
AlternateFont.typeface = (int)params[i + 1].value.number;
break;
}
@@ -100,14 +96,22 @@ AD_define_alternate(int num_params, /* I - Number of parameters */
* Define the font...
*/
Outputf("/SA { /%s%s%s%s findfont %.1f scalefont setfont } def\n",
typeface == 48 ? "Courier" : "Helvetica",
(weight != 0 || posture != 0) ? "-" : "",
weight != 0 ? "Bold" : "",
posture != 0 ? "Oblique" : "",
height);
if (PageDirty)
printf("/SA {\n"
" /%s%s%s%s findfont\n"
" [ %f %f %f %f 0.0 0.0 ] makefont\n"
" setfont\n"
"} bind def\n",
AlternateFont.typeface == 48 ? "Courier" : "Helvetica",
(AlternateFont.weight != 0 || AlternateFont.posture != 0) ? "-" : "",
AlternateFont.weight != 0 ? "Bold" : "",
AlternateFont.posture != 0 ? "Oblique" : "",
AlternateFont.x * AlternateFont.height,
-AlternateFont.y * AlternateFont.height,
AlternateFont.y * AlternateFont.height,
AlternateFont.x * AlternateFont.height);
CharHeight[1] = height;
CharHeight[1] = AlternateFont.height;
}
@@ -171,12 +175,56 @@ void
DI_absolute_direction(int num_params, /* I - Number of parameters */
param_t *params) /* I - Parameters */
{
Outputf(CharFont == 0 ? "SS\n" : "SA\n");
if (CharFont)
{
if (num_params == 2)
{
AlternateFont.x = params[0].value.number;
AlternateFont.y = params[1].value.number;
}
if (num_params == 2)
Outputf("currentfont [ %f %f %f %f 0.0 0.0 ] makefont setfont\n",
params[0].value.number, -params[1].value.number,
params[1].value.number, params[0].value.number);
if (PageDirty)
{
printf("/SA {\n"
" /%s%s%s%s findfont\n"
" [ %f %f %f %f 0.0 0.0 ] makefont\n"
" setfont\n"
"} bind def\n",
AlternateFont.typeface == 48 ? "Courier" : "Helvetica",
(AlternateFont.weight != 0 || AlternateFont.posture != 0) ? "-" : "",
AlternateFont.weight != 0 ? "Bold" : "",
AlternateFont.posture != 0 ? "Oblique" : "",
AlternateFont.x * AlternateFont.height,
-AlternateFont.y * AlternateFont.height,
AlternateFont.y * AlternateFont.height,
AlternateFont.x * AlternateFont.height);
}
}
else
{
if (num_params == 2)
{
StandardFont.x = params[0].value.number;
StandardFont.y = params[1].value.number;
}
if (PageDirty)
{
printf("/SS {\n"
" /%s%s%s%s findfont\n"
" [ %f %f %f %f 0.0 0.0 ] makefont\n"
" setfont\n"
"} bind def\n",
StandardFont.typeface == 48 ? "Courier" : "Helvetica",
(StandardFont.weight != 0 || StandardFont.posture != 0) ? "-" : "",
StandardFont.weight != 0 ? "Bold" : "",
StandardFont.posture != 0 ? "Oblique" : "",
StandardFont.x * StandardFont.height,
-StandardFont.y * StandardFont.height,
StandardFont.y * StandardFont.height,
StandardFont.x * StandardFont.height);
}
}
}
@@ -249,7 +297,7 @@ LB_label(int num_params, /* I - Number of parameters */
return;
Outputf("gsave\n");
Outputf("currentmiterlimit 1.0 setmiterlimit\n");
Outputf("currentmiterlimit 1.0 \n");
Outputf("MP\n");
Outputf("%.3f %.3f MO\n", PenPosition[0], PenPosition[1]);
@@ -295,7 +343,9 @@ SA_select_alternate(int num_params, /* I - Number of parameters */
(void)num_params;
(void)params;
Outputf("SA\n");
if (PageDirty)
puts("SA");
CharFont = 1;
}
@@ -309,20 +359,18 @@ SD_define_standard(int num_params, /* I - Number of parameters */
param_t *params) /* I - Parameters */
{
int i; /* Looping var */
int typeface, /* Typeface number */
posture, /* Posture number */
weight; /* Weight number */
float height; /* Height/size of font */
/*
* Set default font attributes...
*/
typeface = 48;
posture = 0;
weight = 0;
height = 11.5;
StandardFont.typeface = 48;
StandardFont.posture = 0;
StandardFont.weight = 0;
StandardFont.height = 11.5;
StandardFont.x = 1.0;
StandardFont.y = 0.0;
/*
* Loop through parameter value pairs...
@@ -332,16 +380,16 @@ SD_define_standard(int num_params, /* I - Number of parameters */
switch ((int)params[i].value.number)
{
case 4 :
height = params[i + 1].value.number;
StandardFont.height = params[i + 1].value.number;
break;
case 5 :
posture = (int)params[i + 1].value.number;
StandardFont.posture = (int)params[i + 1].value.number;
break;
case 6 :
weight = (int)params[i + 1].value.number;
StandardFont.weight = (int)params[i + 1].value.number;
break;
case 7 :
typeface = (int)params[i + 1].value.number;
StandardFont.typeface = (int)params[i + 1].value.number;
break;
}
@@ -349,14 +397,22 @@ SD_define_standard(int num_params, /* I - Number of parameters */
* Define the font...
*/
Outputf("/SS { /%s%s%s%s findfont %.1f scalefont setfont } def\n",
typeface == 48 ? "Courier" : "Helvetica",
(weight != 0 || posture != 0) ? "-" : "",
weight != 0 ? "Bold" : "",
posture != 0 ? "Oblique" : "",
height);
if (PageDirty)
printf("/SS {\n"
" /%s%s%s%s findfont\n"
" [ %f %f %f %f 0.0 0.0 ] makefont\n"
" setfont\n"
"} bind def\n",
StandardFont.typeface == 48 ? "Courier" : "Helvetica",
(StandardFont.weight != 0 || StandardFont.posture != 0) ? "-" : "",
StandardFont.weight != 0 ? "Bold" : "",
StandardFont.posture != 0 ? "Oblique" : "",
StandardFont.x * StandardFont.height,
-StandardFont.y * StandardFont.height,
StandardFont.y * StandardFont.height,
StandardFont.x * StandardFont.height);
CharHeight[0] = height;
CharHeight[0] = StandardFont.height;
}
@@ -410,7 +466,9 @@ SS_select_standard(int num_params, /* I - Number of parameters */
(void)num_params;
(void)params;
Outputf("SS\n");
if (PageDirty)
puts("SS");
CharFont = 0;
}
+221 -52
Ver Arquivo
@@ -51,54 +51,153 @@
void
update_transform(void)
{
float width, /* Plot width */
height; /* Plot height */
float page_width, /* Actual page width in points */
page_length; /* Actual page length in points */
float page_width, /* Actual page width */
page_height; /* Actual page height */
float scaling; /* Scaling factor */
float left, right, /* Scaling window */
bottom, top;
float width, height; /* Scaling width and height */
float iw1[2], iw2[2]; /* Clipping window */
/*
* Get the page and input window sizes...
*/
width = IW2[0] - IW1[0];
height = IW2[1] - IW1[1];
if (FitPlot)
{
page_width = PageRight - PageLeft;
page_height = PageTop - PageBottom;
}
else
{
page_width = (P2[0] - P1[0]) * 72.0f / 1016.0f;
page_height = (P2[1] - P1[1]) * 72.0f / 1016.0f;
}
fprintf(stderr, "DEBUG: page_width = %.0f, page_height = %.0f\n",
page_width, page_height);
if (page_width == 0 || page_height == 0)
return;
/*
* Set the scaling window...
*/
switch (ScalingType)
{
case -1 : /* No user scaling */
left = P1[0];
bottom = P1[1];
right = P2[0];
top = P2[1];
break;
case 0 : /* Anisotropic (non-uniform) scaling */
left = Scaling1[0];
bottom = Scaling1[1];
right = Scaling2[0];
top = Scaling2[1];
break;
case 1 : /* Isotropic (uniform) scaling */
left = Scaling1[0];
bottom = Scaling1[1];
right = Scaling2[0];
top = Scaling2[1];
width = right - left;
height = top - bottom;
if (width == 0 || height == 0)
return;
if ((width * page_height) != (height * page_width))
{
scaling = height * page_width / page_height;
if (width < scaling)
{
width = scaling;
left = 0.5f * (left + right - width);
right = left + width;
}
else
{
height = width * page_height / page_width;
bottom = 0.5f * (bottom + top - height);
top = bottom + height;
}
}
break;
case 2 :
left = Scaling1[0];
bottom = Scaling1[1];
right = left + page_width * Scaling2[0];
top = bottom + page_height * Scaling2[1];
break;
}
width = right - left;
height = top - bottom;
if (width == 0 || height == 0)
return;
/*
* Scale the plot as needed...
* Rotate the plot as needed...
*/
if (FitPlot)
if (Rotation == 0 || Rotation == 180)
{
page_width = PageRight - PageLeft;
page_length = PageTop - PageBottom;
if (Rotation == 0 || Rotation == 180)
if ((width > height && page_width < page_height) ||
(width < height && page_width > page_height))
{
scaling = page_width / width;
if (scaling > (page_length / width))
scaling = page_length / width;
}
else
{
scaling = page_width / height;
if (scaling > (page_length / height))
scaling = page_length / height;
fputs("DEBUG: Automatically rotating the page...\n", stderr);
Rotation += 90;
}
}
else
{
page_width = PlotSize[0];
page_length = PlotSize[1];
if ((width > height && page_width > page_height) ||
(width < height && page_width < page_height))
{
fputs("DEBUG: Automatically rotating the page...\n", stderr);
Rotation = (Rotation + 90) % 360;
}
}
/*
* Scale the plot as needed...
*/
if (Rotation == 0 || Rotation == 180)
scaling = page_width / width;
else
scaling = page_width / height;
if (FitPlot)
{
if (Rotation == 0 || Rotation == 180)
scaling = page_width / width;
scaling *= page_width / PlotSize[1];
else
scaling = page_width / height;
scaling *= page_width / PlotSize[0];
}
/*
* Offset for the current P1 location...
*/
if (FitPlot)
{
left = 0;
bottom = 0;
}
else
{
left = P1[0] * 72.0f / 1016.0f;
bottom = P1[1] * 72.0f / 1016.0f;
}
/*
@@ -110,47 +209,69 @@ update_transform(void)
case 0 :
Transform[0][0] = scaling;
Transform[0][1] = 0.0;
Transform[0][2] = -IW1[0] * scaling;
Transform[0][2] = -left;
Transform[1][0] = 0.0;
Transform[1][1] = scaling;
Transform[1][2] = -IW1[1] * scaling;
Transform[1][2] = -bottom;
break;
case 90 :
Transform[0][0] = 0.0;
Transform[0][1] = -scaling;
Transform[0][2] = (height - IW1[0]) * scaling;
Transform[0][2] = PageLength - left;
Transform[1][0] = scaling;
Transform[1][1] = 0.0;
Transform[1][2] = -IW1[1] * scaling;
Transform[1][2] = -bottom;
break;
case 180 :
Transform[0][0] = -scaling;
Transform[0][1] = 0.0;
Transform[0][2] = (height - IW1[0]) * scaling;
Transform[0][2] = PageLength - left;
Transform[1][0] = 0.0;
Transform[1][1] = -scaling;
Transform[1][2] = (width - IW1[1]) * scaling;
Transform[1][2] = PageWidth - bottom;
break;
case 270 :
Transform[0][0] = 0.0;
Transform[0][1] = scaling;
Transform[0][2] = -IW1[0] * scaling;
Transform[0][2] = -left;
Transform[1][0] = -scaling;
Transform[1][1] = 0.0;
Transform[1][2] = (width - IW1[1]) * scaling;
Transform[1][2] = PageWidth - bottom;
break;
}
PenScaling = Transform[0][0] + Transform[0][1];
fprintf(stderr, "DEBUG: Transform = [ %.3f %.3f\n"
"DEBUG: %.3f %.3f\n"
"DEBUG: %.3f %.3f ]\n",
Transform[0][0], Transform[1][0], Transform[0][1],
Transform[1][1], Transform[0][2], Transform[1][2]);
if (WidthUnits)
PenScaling = page_width * scaling * 0.01f;
else
PenScaling = page_width / PageWidth * 72.0f / 25.4f;
if (PenScaling < 0.0)
PenScaling = -PenScaling;
if (PageDirty)
{
printf("/PenScaling %.3f def W%d\n", PenScaling, PenNumber);
if (IW1[0] != IW2[0] && IW1[1] != IW2[1])
{
iw1[0] = IW1[0] * 72.0f / 1016.0f;
iw1[1] = IW1[1] * 72.0f / 1016.0f;
iw2[0] = IW2[0] * 72.0f / 1016.0f;
iw2[1] = IW2[1] * 72.0f / 1016.0f;
printf("initclip MP %.3f %.3f MO %.3f %.3f LI %.3f %.3f LI %.3f %.3f LI CP clip\n",
iw1[0], iw1[1], iw1[0], iw2[1], iw2[0], iw2[1], iw2[0], iw1[1]);
}
}
}
@@ -219,7 +340,8 @@ IN_initialize(int num_params, /* I - Number of parameters */
PS_plot_size(0, NULL);
WU_width_units(0, NULL);
PW_pen_width(0, NULL);
SP_select_pen(0, NULL);
PenWidth = 1;
PenPosition[0] = PenPosition[1] = 0.0;
}
@@ -235,10 +357,10 @@ IP_input_absolute(int num_params, /* I - Number of parameters */
{
if (num_params == 0)
{
P1[0] = 0.0;
P1[1] = 0.0;
P2[0] = PlotSize[0] / 72.0f * 1016.0f;
P2[1] = PlotSize[1] / 72.0f * 1016.0f;
P1[0] = PageLeft / 72.0f * 1016.0f;
P1[1] = PageBottom / 72.0f * 1016.0f;
P2[0] = PageRight / 72.0f * 1016.0f;
P2[1] = PageTop / 72.0f * 1016.0f;
}
else if (num_params == 2)
{
@@ -262,6 +384,14 @@ IP_input_absolute(int num_params, /* I - Number of parameters */
IW2[0] = P2[0];
IW2[1] = P2[1];
if (ScalingType < 0)
{
Scaling1[0] = P1[0];
Scaling1[0] = P1[1];
Scaling2[0] = P2[0];
Scaling2[1] = P2[1];
}
update_transform();
}
@@ -303,6 +433,14 @@ IR_input_relative(int num_params, /* I - Number of parameters */
IW2[0] = P2[0];
IW2[1] = P2[1];
if (ScalingType < 0)
{
Scaling1[0] = P1[0];
Scaling1[0] = P1[1];
Scaling2[0] = P2[0];
Scaling2[1] = P2[1];
}
update_transform();
}
@@ -317,19 +455,44 @@ IW_input_window(int num_params, /* I - Number of parameters */
{
if (num_params == 0)
{
IW1[0] = P1[0];
IW1[1] = P1[1];
IW2[0] = P2[0];
IW2[1] = P2[1];
IW1[0] = PageLeft / 72.0f * 1016.0f;
IW1[1] = PageBottom / 72.0f * 1016.0f;
IW2[0] = PageRight / 72.0f * 1016.0f;
IW2[1] = PageTop / 72.0f * 1016.0f;
}
else if (num_params == 4)
{
IW1[0] = params[0].value.number;
IW1[1] = params[1].value.number;
IW2[0] = params[2].value.number;
IW2[1] = params[3].value.number;
if (ScalingType < 0)
{
IW1[0] = params[0].value.number;
IW1[1] = params[1].value.number;
IW2[0] = params[2].value.number;
IW2[1] = params[3].value.number;
}
else
{
IW1[0] = (Transform[0][0] * params[0].value.number +
Transform[0][1] * params[1].value.number +
Transform[0][2]) / 72.0f * 1016.0f;
IW1[1] = (Transform[1][0] * params[0].value.number +
Transform[1][1] * params[1].value.number +
Transform[1][2]) / 72.0f * 1016.0f;
IW2[0] = (Transform[0][0] * params[2].value.number +
Transform[0][1] * params[3].value.number +
Transform[0][2]) / 72.0f * 1016.0f;
IW2[1] = (Transform[1][0] * params[2].value.number +
Transform[1][1] * params[3].value.number +
Transform[1][2]) / 72.0f * 1016.0f;
}
fprintf(stderr, "DEBUG: IW%.0f,%.0f,%.0f,%.0f = [ %.0f %.0f %.0f %.0f ]\n",
params[0].value.number, params[1].value.number,
params[2].value.number, params[3].value.number,
IW1[0], IW1[1], IW2[0], IW2[1]);
}
update_transform();
}
@@ -368,13 +531,13 @@ PS_plot_size(int num_params, /* I - Number of parameters */
case 0 :
if (Rotation == 0 || Rotation == 180)
{
PlotSize[0] = PageRight - PageLeft;
PlotSize[1] = PageTop - PageBottom;
PlotSize[0] = PageWidth;
PlotSize[1] = PageLength;
}
else
{
PlotSize[0] = PageTop - PageBottom;
PlotSize[1] = PageRight - PageLeft;
PlotSize[0] = PageLength;
PlotSize[1] = PageWidth;
}
break;
case 1 :
@@ -450,7 +613,13 @@ SC_scale(int num_params, /* I - Number of parameters */
param_t *params) /* I - Parameters */
{
if (num_params == 0)
{
ScalingType = -1;
Scaling1[0] = P1[0];
Scaling1[0] = P1[1];
Scaling2[0] = P2[0];
Scaling2[1] = P2[1];
}
else if (num_params > 3)
{
Scaling1[0] = params[0].value.number;
@@ -461,7 +630,7 @@ SC_scale(int num_params, /* I - Number of parameters */
if (num_params > 4)
ScalingType = (int)params[4].value.number;
else
ScalingType = 0;
ScalingType = 1;
}
update_transform();
+1 -1
Ver Arquivo
@@ -161,7 +161,7 @@ ParseCommand(FILE *fp, /* I - File to read from */
break;
case '\"' :
fscanf(fp, "%[^\"]\"", buf);
fscanf(fp, "%262143[^\"]\"", buf);
if (num_params < MAX_PARAMS)
{
p[num_params].type = PARAM_STRING;
+7 -7
Ver Arquivo
@@ -128,7 +128,6 @@ main(int argc, /* I - Number of command-line arguments */
char *argv[]) /* I - Command-line arguments */
{
FILE *fp; /* Input file */
ppd_file_t *ppd; /* PPD file */
int num_params; /* Number of parameters */
param_t *params; /* Command parameters */
name_t *command, /* Command */
@@ -137,7 +136,6 @@ main(int argc, /* I - Number of command-line arguments */
cups_option_t *options; /* Print options */
const char *val; /* Option value */
int shading; /* -1 = black, 0 = grey, 1 = color */
float penwidth; /* Default pen width */
if (argc < 6 || argc > 7)
@@ -173,11 +171,13 @@ main(int argc, /* I - Number of command-line arguments */
options = NULL;
num_options = cupsParseOptions(argv[5], 0, &options);
if ((ppd = SetCommonOptions(num_options, options, 1)) != NULL)
ppdClose(ppd);
PPD = SetCommonOptions(num_options, options, 1);
PlotSize[0] = PageWidth;
PlotSize[1] = PageLength;
shading = 1;
penwidth = 1.0;
PenWidth = 1.0;
if ((val = cupsGetOption("blackplot", num_options, options)) != NULL)
shading = 0;
@@ -186,13 +186,13 @@ main(int argc, /* I - Number of command-line arguments */
FitPlot = 1;
if ((val = cupsGetOption("penwidth", num_options, options)) != NULL)
penwidth = (float)atof(val);
PenWidth = (float)atof(val);
/*
* Write the PostScript prolog and initialize the plotting "engine"...
*/
OutputProlog(argv[3], argv[2], shading, penwidth);
OutputProlog(argv[3], argv[2], shading);
IP_input_absolute(0, NULL);
+190 -5
Ver Arquivo
@@ -44,8 +44,7 @@
void
OutputProlog(char *title, /* I - Job title */
char *user, /* I - Username */
int shading, /* I - Type of shading */
float penwidth) /* I - Default pen width */
int shading) /* I - Type of shading */
{
FILE *prolog; /* Prolog file */
char line[255]; /* Line from prolog file */
@@ -73,7 +72,7 @@ OutputProlog(char *title, /* I - Job title */
puts("%%Orientation: Landscape");
puts("%%EndComments");
puts("%%BeginProlog");
printf("/DefaultPenWidth %.2f def\n", penwidth * 72.0 / 25.4);
printf("/DefaultPenWidth %.2f def\n", PenWidth * 72.0 / 25.4);
puts("3.0 setmiterlimit");
if (!shading) /* Black only */
puts("/setrgbcolor { pop pop pop } bind def");
@@ -124,6 +123,13 @@ Outputf(const char *format, /* I - Printf-style string */
{
va_list ap; /* Argument pointer */
int bytes; /* Number of bytes written */
float iw1[2], iw2[2]; /* Clipping window */
int i; /* Looping var */
ppd_size_t *size; /* Page size */
ppd_option_t *option; /* Page size option */
ppd_choice_t *choice; /* Page size choice */
float width, length; /* Page dimensions */
int landscape; /* Rotate for landscape orientation? */
/*
@@ -136,11 +142,179 @@ Outputf(const char *format, /* I - Printf-style string */
PageCount ++;
printf("%%%%Page: %d %d\n", PageCount, PageCount);
if (PPD != NULL && !FitPlot)
{
/*
* Set the page size for this page...
*/
if (Rotation == 0 || Rotation == 180)
{
width = PlotSize[0];
length = PlotSize[1];
}
else
{
width = PlotSize[1];
length = PlotSize[0];
}
landscape = 0;
/*
* Lookup the closest PageSize and set it...
*/
for (i = PPD->num_sizes, size = PPD->sizes; i > 0; i --, size ++)
if ((fabs(length - size->length) < 36.0 && size->width >= width) ||
(fabs(length - size->width) < 36.0 && size->length >= width))
break;
if (i == 0 && PPD->variable_sizes)
{
for (i = PPD->num_sizes, size = PPD->sizes; i > 0; i --, size ++)
if (strcasecmp(size->name, "custom") == 0)
break;
}
if (i > 0)
{
/*
* Found a matching size...
*/
option = ppdFindOption(PPD, "PageSize");
choice = ppdFindChoice(option, size->name);
puts("%%BeginPageSetup");
printf("%%%%BeginFeature: PageSize %s\n", size->name);
if (strcasecmp(size->name, "custom") == 0)
{
PageLeft = PPD->custom_margins[0];
PageRight = width - PPD->custom_margins[2];
PageWidth = width;
PageBottom = PPD->custom_margins[1];
PageTop = length - PPD->custom_margins[3];
PageLength = length;
printf("%.0f %.0f 0 0 0\n", width, length);
if (choice->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...
*/
puts("pop pop pop");
puts("<</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice\n");
}
else
{
/*
* Use the vendor-supplied command...
*/
printf("%s\n", choice->code);
}
}
else
{
if (choice->code)
printf("%s\n", choice->code);
if (fabs(length - size->width) < 36.0)
{
/*
* Do landscape orientation...
*/
PageLeft = size->bottom;
PageRight = size->top;
PageWidth = size->length;
PageBottom = size->left;
PageTop = size->right;
PageLength = size->width;
landscape = 1;
}
else
{
/*
* Do portrait orientation...
*/
PageLeft = size->left;
PageRight = size->right;
PageWidth = size->width;
PageBottom = size->bottom;
PageTop = size->top;
PageLength = size->length;
}
}
puts("%%EndFeature");
puts("%%EndSetup");
}
}
printf("/PenScaling %.3f def\n", PenScaling);
printf("/SA {\n"
" /%s%s%s%s findfont\n"
" [ %f %f %f %f 0.0 0.0 ] makefont\n"
" setfont\n"
"} bind def\n",
AlternateFont.typeface == 48 ? "Courier" : "Helvetica",
(AlternateFont.weight != 0 || AlternateFont.posture != 0) ? "-" : "",
AlternateFont.weight != 0 ? "Bold" : "",
AlternateFont.posture != 0 ? "Oblique" : "",
AlternateFont.x * AlternateFont.height,
-AlternateFont.y * AlternateFont.height,
AlternateFont.y * AlternateFont.height,
AlternateFont.x * AlternateFont.height);
printf("/SS {\n"
" /%s%s%s%s findfont\n"
" [ %f %f %f %f 0.0 0.0 ] makefont\n"
" setfont\n"
"} bind def\n",
StandardFont.typeface == 48 ? "Courier" : "Helvetica",
(StandardFont.weight != 0 || StandardFont.posture != 0) ? "-" : "",
StandardFont.weight != 0 ? "Bold" : "",
StandardFont.posture != 0 ? "Oblique" : "",
StandardFont.x * StandardFont.height,
-StandardFont.y * StandardFont.height,
StandardFont.y * StandardFont.height,
StandardFont.x * StandardFont.height);
if (CharFont)
puts("SA");
else
puts("SS");
printf("%.1f setmiterlimit\n", MiterLimit);
printf("%d setlinecap\n", LineCap);
printf("%d setlinejoin\n", LineJoin);
for (i = 0; i <= PenCount; i ++)
{
printf("/W%d { %.1f PenScaling mul setlinewidth } bind def\n", i,
Pens[i].width);
printf("/P%d { %.3f %.3f %.3f setrgbcolor } bind def\n",
i, Pens[i].rgb[0], Pens[i].rgb[1], Pens[i].rgb[2]);
}
puts("P1 W1");
puts("gsave");
if (Duplex && (PageCount & 1) == 0)
switch ((PageRotation / 90) & 3)
switch ((PageRotation / 90 + landscape) & 3)
{
case 0 :
printf("%.1f %.1f translate\n", PageWidth - PageRight, PageBottom);
@@ -157,7 +331,7 @@ Outputf(const char *format, /* I - Printf-style string */
break;
}
else
switch ((PageRotation / 90) & 3)
switch ((PageRotation / 90 + landscape) & 3)
{
case 0 :
printf("%.1f %.1f translate\n", PageLeft, PageBottom);
@@ -173,6 +347,17 @@ Outputf(const char *format, /* I - Printf-style string */
printf("%.1f %.1f translate\n", PageLength - PageTop, PageLeft);
break;
}
if (IW1[0] != IW2[0] && IW1[1] != IW2[1])
{
iw1[0] = IW1[0] * 72.0f / 1016.0f;
iw1[1] = IW1[1] * 72.0f / 1016.0f;
iw2[0] = IW2[0] * 72.0f / 1016.0f;
iw2[1] = IW2[1] * 72.0f / 1016.0f;
printf("initclip MP %.3f %.3f MO %.3f %.3f LI %.3f %.3f LI %.3f %.3f LI CP clip\n",
iw1[0], iw1[1], iw1[0], iw2[1], iw2[0], iw2[1], iw2[0], iw1[1]);
}
}
/*
+38 -2
Ver Arquivo
@@ -52,6 +52,31 @@ typedef struct
#define PARAM_STRING 2
/*
* Font information...
*/
typedef struct
{
int typeface, /* Typeface number */
posture, /* Posture number */
weight; /* Weight number */
float height; /* Height/size of font */
float x, y; /* X and Y direction/scaling */
} font_t;
/*
* Pen information...
*/
typedef struct
{
float rgb[3]; /* Pen color */
float width; /* Pen width */
} pen_t;
/*
* Globals...
*/
@@ -66,6 +91,8 @@ typedef struct
# define VALUE2(x,y)
#endif /* _HPGL_MAIN_C_ */
VAR ppd_file_t *PPD VALUE(NULL); /* PPD file */
VAR float P1[2], /* Lower-lefthand physical limit */
P2[2], /* Upper-righthand physical limit */
IW1[2], /* Window lower-lefthand limit */
@@ -78,9 +105,13 @@ VAR float Transform[2][3]; /* Transform matrix */
VAR int PageRotation VALUE(0); /* Page/plot rotation */
VAR char StringTerminator VALUE('\003'); /* Terminator for labels */
VAR font_t StandardFont, /* Standard font */
AlternateFont; /* Alternate font */
VAR float PenPosition[2] VALUE2(0.0f, 0.0f),
/* Current pen position */
PenScaling VALUE(1.0f); /* Pen width scaling factor */
PenScaling VALUE(1.0f), /* Pen width scaling factor */
PenWidth VALUE(1.0f); /* Default pen width */
VAR pen_t Pens[1024]; /* State of each pen */
VAR int PenMotion VALUE(0), /* 0 = absolute, 1 = relative */
PenNumber VALUE(1), /* Current pen number */
PenCount VALUE(8), /* Number of pens */
@@ -107,6 +138,11 @@ VAR float ColorRange[3][2] /* Range of color values */
#endif /* _HPGL_MAIN_C_ */
;
VAR int LineCap VALUE(0); /* Line capping */
VAR int LineJoin VALUE(0); /* Line joining */
VAR float MiterLimit VALUE(3.0f); /* Miter limit at joints */
/*
* Prototypes...
*/
@@ -187,7 +223,7 @@ extern void UL_user_line_type(int num_params, param_t *params);
extern void WU_width_units(int num_params, param_t *params);
/* hpgl-prolog.c */
extern void OutputProlog(char *title, char *user, int shading, float penwidth);
extern void OutputProlog(char *title, char *user, int shading);
extern void OutputTrailer(void);
extern int Outputf(const char *format, ...);
+3 -2
Ver Arquivo
@@ -321,6 +321,7 @@ ImageRGBToCMYK(const ib_t *in, /* I - Input pixels */
int count)/* I - Number of pixels */
{
int c, m, y, k, /* CMYK values */
km, /* Maximum K value */
diff, /* Color differences */
divk; /* Color divisor */
int cc, cm, cy; /* Calibrated CMY values */
@@ -334,8 +335,8 @@ ImageRGBToCMYK(const ib_t *in, /* I - Input pixels */
y = 255 - *in++;
k = min(c, min(m, y));
diff = 255 - (max(c, max(m, y)) - k);
k = k * diff / 255;
if ((km = max(c, max(m, y))) > k)
k = k * k / km;
if (k == 255)
c = m = y = 0;
+1 -1
Ver Arquivo
@@ -255,7 +255,7 @@ ImageSetMaxTiles(image_t *img, /* I - Image to set */
if ((cache_env = getenv("RIP_MAX_CACHE")) != NULL)
{
switch (sscanf(cache_env, "%d%s", &max_size, cache_units))
switch (sscanf(cache_env, "%d%254s", &max_size, cache_units))
{
case 0 :
max_size = 32 * 1024 * 1024;
+2 -2
Ver Arquivo
@@ -132,11 +132,11 @@ main(int argc, /* I - Number of command-line arguments */
* separate-documents-collated-copies allows for uncollated copies.
*/
Collate = strcmp(val, "separate-documents-collated-copies") != 0;
Collate = strcasecmp(val, "separate-documents-collated-copies") != 0;
}
if ((val = cupsGetOption("Collate", num_options, options)) != NULL &&
strcmp(val, "True") == 0)
strcasecmp(val, "True") == 0)
Collate = 1;
if ((val = cupsGetOption("gamma", num_options, options)) != NULL)
+37 -9
Ver Arquivo
@@ -165,6 +165,7 @@ main(int argc, /* I - Number of command-line arguments */
char *resolution, /* Output resolution */
*media_type; /* Media type */
ppd_profile_t *profile; /* Color profile */
ppd_profile_t userprofile; /* User-specified profile */
cups_raster_t *ras; /* Raster stream */
cups_page_header_t header; /* Page header */
int num_options; /* Number of print options */
@@ -235,11 +236,11 @@ main(int argc, /* I - Number of command-line arguments */
* separate-documents-collated-copies allows for uncollated copies.
*/
Collate = strcmp(val, "separate-documents-collated-copies") != 0;
Collate = strcasecmp(val, "separate-documents-collated-copies") != 0;
}
if ((val = cupsGetOption("Collate", num_options, options)) != NULL &&
strcmp(val, "True") == 0)
strcasecmp(val, "True") == 0)
Collate = 1;
if ((val = cupsGetOption("gamma", num_options, options)) != NULL)
@@ -386,7 +387,31 @@ main(int argc, /* I - Number of command-line arguments */
* Find a color profile matching the current options...
*/
if (ppd != NULL)
if ((val = cupsGetOption("profile", num_options, options)) != NULL)
{
profile = &userprofile;
sscanf(val, "%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f",
&(userprofile.density), &(userprofile.gamma),
userprofile.matrix[0] + 0, userprofile.matrix[0] + 1,
userprofile.matrix[0] + 2,
userprofile.matrix[1] + 0, userprofile.matrix[1] + 1,
userprofile.matrix[1] + 2,
userprofile.matrix[2] + 0, userprofile.matrix[2] + 1,
userprofile.matrix[2] + 2);
userprofile.density *= 0.001f;
userprofile.gamma *= 0.001f;
userprofile.matrix[0][0] *= 0.001f;
userprofile.matrix[0][1] *= 0.001f;
userprofile.matrix[0][2] *= 0.001f;
userprofile.matrix[1][0] *= 0.001f;
userprofile.matrix[1][1] *= 0.001f;
userprofile.matrix[1][2] *= 0.001f;
userprofile.matrix[2][0] *= 0.001f;
userprofile.matrix[2][1] *= 0.001f;
userprofile.matrix[2][2] *= 0.001f;
}
else if (ppd != NULL)
{
fprintf(stderr, "DEBUG: Searching for profile \"%s/%s\"...\n",
resolution, media_type);
@@ -412,10 +437,13 @@ main(int argc, /* I - Number of command-line arguments */
* If we found a color profile, use it!
*/
if (i < ppd->num_profiles)
ImageSetProfile(profile->density, profile->gamma, profile->matrix);
if (i >= ppd->num_profiles)
profile = NULL;
}
if (profile)
ImageSetProfile(profile->density, profile->gamma, profile->matrix);
/*
* Create a gamma/brightness LUT...
*/
@@ -491,8 +519,8 @@ main(int argc, /* I - Number of command-line arguments */
xprint = xinches / xpages;
yprint = yinches / ypages;
if ((val = cupsGetOption("Page", num_options, options)) != NULL &&
strncmp(val, "Custom.", 7) == 0)
if ((choice = ppdFindMarkedChoice(ppd, "PageSize")) != NULL &&
strcasecmp(choice->choice, "Custom") == 0)
{
if (Orientation & 1)
{
@@ -950,9 +978,9 @@ exec_choice(cups_page_header_t *header, /* I - Page header */
else if (strcmp(name, "cupsMediaPosition") == 0)
header->MediaPosition = atoi(value);
else if (strcmp(name, "MediaType") == 0)
strcpy(header->MediaType, value);
strncpy(header->MediaType, value, sizeof(header->MediaType) - 1);
else if (strcmp(name, "OutputType") == 0)
strcpy(header->OutputType, value);
strncpy(header->OutputType, value, sizeof(header->OutputType) - 1);
}
}
+46 -24
Ver Arquivo
@@ -162,15 +162,15 @@ main(int argc, /* I - Number of command-line arguments */
* separate-documents-collated-copies allows for uncollated copies.
*/
Collate = strcmp(val, "separate-documents-collated-copies") != 0;
Collate = strcasecmp(val, "separate-documents-collated-copies") != 0;
}
if ((val = cupsGetOption("Collate", num_options, options)) != NULL &&
strcmp(val, "True") == 0)
strcasecmp(val, "True") == 0)
Collate = 1;
if ((val = cupsGetOption("OutputOrder", num_options, options)) != NULL &&
strcmp(val, "Reverse") == 0)
strcasecmp(val, "Reverse") == 0)
Order = 1;
if ((val = cupsGetOption("number-up", num_options, options)) != NULL)
@@ -536,9 +536,9 @@ check_range(int page) /* I - Page number */
* See if we only print even or odd pages...
*/
if (strcmp(PageSet, "even") == 0 && (page & 1))
if (strcasecmp(PageSet, "even") == 0 && (page & 1))
return (0);
if (strcmp(PageSet, "odd") == 0 && !(page & 1))
if (strcasecmp(PageSet, "odd") == 0 && !(page & 1))
return (0);
}
@@ -617,7 +617,7 @@ static void
end_nup(int number) /* I - Page number */
{
if (Flip || Orientation || NUp > 1)
puts("grestoreall");
puts("ESPsave restore");
switch (NUp)
{
@@ -702,14 +702,18 @@ start_nup(int number) /* I - Page number */
int x, y; /* Relative position of subpage */
float w, l, /* Width and length of subpage */
tx, ty; /* Translation values for subpage */
float pw, pl; /* Printable width and length of full page */
if (Flip || Orientation || NUp > 1)
puts("gsave");
puts("/ESPsave save def");
if (Flip)
printf("%.0f 0 translate -1 1 scale\n", PageWidth);
pw = PageRight - PageLeft;
pl = PageTop - PageBottom;
switch (Orientation)
{
case 1 : /* Landscape */
@@ -731,44 +735,49 @@ start_nup(int number) /* I - Page number */
if (Orientation & 1)
{
x = 1 - x;
w = PageLength;
w = pl;
l = w * PageLength / PageWidth;
if (l > (PageWidth * 0.5))
if (l > (pw * 0.5))
{
l = PageWidth * 0.5;
l = pw * 0.5;
w = l * PageWidth / PageLength;
}
tx = PageWidth * 0.5 - l;
ty = (PageLength - w) * 0.5;
tx = pw * 0.5 - l;
ty = (pl - w) * 0.5;
}
else
{
l = PageWidth;
l = pw;
w = l * PageWidth / PageLength;
if (w > (PageLength * 0.5))
if (w > (pl * 0.5))
{
w = PageLength * 0.5;
w = pl * 0.5;
l = w * PageLength / PageWidth;
}
tx = PageLength * 0.5 - w;
ty = (PageWidth - l) * 0.5;
tx = pl * 0.5 - w;
ty = (pw - l) * 0.5;
}
if (Duplex && (number & 2))
printf("%.0f %.0f translate\n", PageWidth - PageRight, PageBottom);
else
printf("%.0f %.0f translate\n", PageLeft, PageBottom);
if (Orientation & 1)
{
printf("0 %.0f translate -90 rotate\n", PageLength);
printf("0 %.0f translate -90 rotate\n", pl);
printf("%.0f %.0f translate %.3f %.3f scale\n",
ty, tx + l * x, w / PageWidth, l / PageLength);
ty, tx + l * x, w / pw, l / pl);
}
else
{
printf("%.0f 0 translate 90 rotate\n", PageWidth);
printf("%.0f 0 translate 90 rotate\n", pw);
printf("%.0f %.0f translate %.3f %.3f scale\n",
tx + w * x, ty, w / PageWidth, l / PageLength);
tx + w * x, ty, w / pw, l / pl);
}
printf("newpath\n"
@@ -783,10 +792,23 @@ start_nup(int number) /* I - Page number */
case 4 :
x = number & 1;
y = 1 - ((number & 2) != 0);
w = PageWidth * 0.5;
l = PageLength * 0.5;
printf("%.0f %.0f translate 0.5 0.5 scale\n", x * w, y * l);
w = pw * 0.5;
l = w * PageLength / PageWidth;
if (l > (pl * 0.5))
{
l = pl * 0.5;
w = l * PageWidth / PageLength;
}
if (Duplex && (number & 4))
printf("%.0f %.0f translate\n", PageWidth - PageRight, PageBottom);
else
printf("%.0f %.0f translate\n", PageLeft, PageBottom);
printf("%.0f %.0f translate %.3f %.3f scale\n", x * w, y * l,
w / PageWidth, l / PageLength);
printf("newpath\n"
"0 0 moveto\n"
"%.0f 0 lineto\n"
+2 -2
Ver Arquivo
@@ -188,7 +188,7 @@ WriteProlog(char *title, /* I - Title of job */
if ((fp = fopen(CUPS_DATADIR "/data/psglyphs", "r")) != NULL)
{
while (fscanf(fp, "%x%s", &unicode, glyph) == 2)
while (fscanf(fp, "%x%63s", &unicode, glyph) == 2)
Glyphs[unicode] = strdup(glyph);
fclose(fp);
@@ -198,7 +198,7 @@ WriteProlog(char *title, /* I - Title of job */
{
memset(chars, 0, sizeof(chars));
sprintf(filename, CUPS_DATADIR "/%s", charset + 4);
snprintf(filename, sizeof(filename), CUPS_DATADIR "/%s", charset + 4);
if ((fp = fopen(filename, "r")) != NULL)
{
+114 -113
Ver Arquivo
@@ -1,123 +1,124 @@
iso-8859-1
OK
Löschen
Hilfe
Beendet
Nah
Ja
Nein
Auf
Weg von
Außer
Ausschuß
Rückstellung
Optionen
Mehr INFO
Schwarzes
Farbe
Cyan-blau
Magenta
Gelb
Okay
Abbrechen
Hilfe
Beenden
Schließen
Ja
Nein
An
Aus
Speichern
Verwerfen
Default
Optionen
Mehr Info
Schwarz
Farbe
Cyan
Magenta
Gelb
Copyright 1993-1999 durch Easy Software Products, alle Rechte vorbehalten.
General
Drucker
BildOptionen
HP-GL/2 Optionen
Extrakosten
Dokument
Anderes
DruckSeiten:
Allgemein
Drucker
Bild Optionen
HP-GL/2 Optionen
Speziell
Dokument
Andere
Druckbereich:
Gesamtes Dokument
Seitenbereich:
RückOrdnung:
Seite Format:
1-Up
2-Up
4-Up
BildScaling:
Natürliche BildGröße Des Gebrauches
Zoom durch Percent
Zoom durch PPI
SpiegelBild:
Farbe Sättigung:
Farbe Farbe:
Passen Sie, um zu paginieren:
Schattierend:
FederBreite:
Gamma Korrektur:
Umgedrehte Reihenfolge:
Seitenformat:
normal
2 auf 1
4 auf 1
Bild-Skalierung:
Natürliche Bildgröße
Zoom in Prozent
Zoom in PPI
Gespiegelte Ausgabe:
Farbsättigung:
Farbton:
Auf Seite anpassen:
Schattiert:
Strichstärke:
Gamma-Korrektur:
Helligkeit:
Fügen Sie hinzu
Löschung
ändern Sie
DruckerURI
DruckerName
DruckerStandort
Drucker-cInfo
Drucker bilden und formen
EinheitURI
Formatierung Seite
Seite Druckend
InitialisierenDrucker
DruckerZustand
Jobs Annehmend
Jobs Nicht, Annehmend
Druckjobs
Kategorie
Hinzufügen
Löschen
Ändern
Drucker-URI
Drucker-Name
Drucker-Standort
Drucker-Info
Drucker-Modell
Device-URI
Formatiere Seite
Drucke Seite
Initialisiere Drucker
Drucker-Zustand
Bereit
Nicht bereit
Druckaufträge
Klasse
Lokal
Entfernte Station
Duplexing
Heftend
Schnelle Plattenkopierprogramme
Gemischte Exemplare
Bohrung Lochen
Bedeckung
Binden
Sortierend
Klein (bis 9.5x1în)
Medium (9.5x1în bis 13x19in)
Groß (13x19in und größeres)
Kundenspezifische Größe
Remote
Duplex
Hefter
Schnellkopien
Sortieren/Gruppieren
Locher
Deckblatt
Bindung
Sortieren
Klein (bis 14x35cm)
Medium (14x35cm bis 33x48cm)
Groß (33x48cm und größer)
Benutzerspezifische Größe
Leerlauf
Verarbeitend
In Arbeit
Gestoppt
Alles
Ungerade
Gleichmäßige Seiten
Dunkleres Heller
MediaGröße
MediaArt
MediaQuelle
Lagebestimmung:
Portrait
Landschaft
Job State
Job Name
User Name
Priority
Copies
File Size
Pending
Output Mode
Resolution
400 Ihre Datenbanksuchroutine sendete einen Antrag, den dieser Server nicht verstehen könnte.
Dieser Server könnte nicht überprüfen, daß Sie autorisiert sind, das Hilfsmittel zuzugreifen.
Sie müssen zahlen, diesen Server zuzugreifen.
Sie haben nicht Erlaubnis, das Hilfsmittel auf diesem Server zuzugreifen.
Das erbetene Hilfsmittel wurde nicht auf diesem Server gefunden.
Die erbetene Methode wird nicht mit dem Hilfsmittel erlaubt.
Eine passende Darstellung für das Hilfsmittel wurde nicht auf diesem Server gefunden.
Sie haben nicht Erlaubnis, diesen Server als Proxyhauptrechner zu benutzen.
Der Antrag hat zu lang genommen, um durchzuführen und ist abgebrochen worden.
Das erbetene Hilfsmittel hat mehr als einen Wert.
Das erbetene Hilfsmittel wird gegangen und ist nicht ersetzt worden.
Die erbetene Methode benötigt ein gültiges Content-Length.
Die Vorbedingung auf dem Antrag wertete zu falschem aus.
Der Antrag ist zu groß, damit dieser Server verarbeitet.
Der AntragcUri ist zu groß, damit dieser Server verarbeitet.
Das Antragformat wird nicht durch diesen Server verstanden.
500 Der Server hat einen unrecoverable Fehler ermittelt und nicht Ihren Antrag verarbeiten kann.
Die erbetene Methode wird nicht durch diesen Server eingeführt.
Das proxy server empfing eine unzulässige Antwort von einem aufwärts gerichteten Server.
Das erbetene Hilfsmittel ist aktuell auf diesem Server nicht erreichbar.
Das proxy server hat zu lang genommen, um auf diesen Server zu reagieren.
Dieser Server unterstützt nicht die HTTP-Version, die durch Ihre Datenbanksuchroutine angefordert wird.
Gerade Seiten
Dunkler Heller
Medien-Größe
Medium
Medien-Quelle
Ausrichtung:
Hochformat
Querformat
Job-Status
Job-Name
Benutzername
Priorität
Kopien
Dateigröße
In Warteposition
Ausgabe-Modus
Auflösung
400 Der Server versteht die Anfrage Ihres Browsers nicht.
Der Server konnte nicht Ihre Berechtigung überprüfen, diese Ressource zu benutzen.
Sie müssen bezahlen, um auf diesen Server zuzugreifen.
Sie sind nicht berechtigt, auf diese Ressource des Servers zuzugreifen.
Die gewünschte Ressource wurde auf diesem Server nicht gefunden.
Die gewünschte Methode ist mit dieser Ressource nicht erlaubt.
Eine passende Art der Ressource wurde auf diesem Server nicht gefunden.
Sie können diesen Server nicht als Proxy-Server verwenden.
Der Auftrag brauchte zu lang zur Beendigung und wurde abgebrochen.
Die gewünschte Ressource besitzt mehr als einen Wert.
Die gewünschte Ressource existiert nicht mehr und wurde nicht ersetzt.
Die gewünschte Methode benötigt eine gültige Länge des Inhalts.
Die Voraussetzungen für den Auftrag sind nicht erfüllt.
Der Auftrag ist zu groß, um auf diesem Server verarbeitet zu werden.
Die URI des Auftrags ist zu groß, um auf diesem Server verarbeitet zu werden.
Das Format des Auftrags wird von diesem Server nicht verstanden.
500 Der Server hat einen nicht behebbaren Fehler entdeckt und kann Ihren Auftrag nicht verarbeiten.
Die gewünschte Methode ist auf diesen Server nicht implementiert.
Der Proxy-Server empfing eine unzulässige Antwort von einem höheren Server.
Die gewünschte Ressource ist aktuell auf diesem Server nicht verfügbarr.
Der Proxy-Server braucht zu lang, um auf diesen Server zu reagieren.
Dieser Server unterstützt nicht die HTTP-Version, die Ihr Browser benötigt.
+62 -62
Ver Arquivo
@@ -3,16 +3,16 @@ OK
Annulation
Aide
Quitté
Étroit
Fermer
Oui
Non
Sur
Outre de
Économiser
Écart
Oui
Non
Sauver
Quitté
Défaut
Options
Plus D'Information
Plus d'information
Noir
Couleur
Cyan
@@ -21,86 +21,86 @@ Jaune
Copyright 1993-1999 par Easy Software Products, tous droits réservés.
Général
Imprimante
Options D'Image
Options D'HP-GL/2
Frais supplémentaires
Options d'Image
Options d'HP-GL/2
Options supplémentaires
Document
Autre
Pages D'Impression:
Entier Document
Chaîne De Page
Commande D'Inversion:
Format De Page:
1-Up
2-Up
4-Up
Graduation D'Image:
Taille Normale D'Image D'Utilisation
Zoom par Percent
Pages d'impression:
Entier document
Chaîne de page
Commande d'Inversion:
Pages par feuilles:
1
2
4
Graduation d'image:
Emploi taille normale d'image
Zoom par pourcent
Zoom par PPI
Image De Miroir:
Saturation De Couleur:
Tonalité De Couleur:
Adaptez pour paginer:
Image de miroir:
Saturation de couleur:
Teinture de couleur:
Correspondre au page:
Ombrageant:
Largeur De Crayon lecteur:
Gamma Correction:
Largeur de crayon lecteur:
Correction de Gamma:
Éclat:
Ajoutez
Effacement
Éffacer
Modifiez
URI D'Imprimante
Nom D'Imprimante
Emplacement D'Imprimante
Information D'Imprimante
L'imprimante font et modèlent
URI De Dispositif
Page De Formatage
Imprimant La Page
D' Initialisation Imprimante
État D'Imprimante
Recevant Les Travaux
URI de l'imprimante
Nom de l'imprimante
Emplacement de l'imprimante
Information de l'imprimante
Font et modèlent de l'imprimante
Dispositif de l'URI
Formatage du page
Imprimant la page
Initialisation de l'imprimante
État de l'Imprimante
Recevant les travaux
Ne recevant pas Les Travaux
Tirages
Classe
Local
Périphérique
Distant
Duplexage
Agrafant
Rapides Copies
Assemblées Copies
Poinçon De Trou
Copie Rapides
Copies Assemblées
Poinçon de trou
Bâche
Liant
Triant
Petit (jusqu'à 9.5x1în)
Support (9.5x1în à 13x19in)
Grand (13x19in et plus grand)
Faite sur commande Taille
Ralenti
Petit (jusqu'à 9.5x1pouce)
Moyen (9.5x1pouce à 13x19pouce)
Grand (13x19pouce et plus grand)
Taille faite sur commande
Arrêter
Traitant
Arrêté
Tout
Impair
Même Pages
Plus foncé Plus Lumineux
Taille De Medias
Type De Supports
Source De Medias
Dimension du medias
Sorte de medias
Source du medias
Orientation:
Verticale
Horizontal
Job State
Job Name
User Name
Priority
État du travail
Nom du travail
Nom de l'utilisateur
Priorité
Copies
File Size
Pending
Output Mode
Grandeur du fichier
Imminent
Method de sortie
Resolution
400 Votre browser a envoyé une demande que ce serveur ne pourrait pas comprendre.
Ce serveur ne pourrait pas vérifier que vous êtes autorisés à accéder à la ressource.
400 Votre browser a envoyé une demande que ce serveur ne pouvait pas comprendre.
Ce serveur ne pouvait pas vérifier que vous êtes autoriséz à accéder à la ressource.
Vous devez payer pour accéder à ce serveur.
Vous n'avez pas la permission d'accéder à la ressource sur ce serveur.
La ressource demandée n'a pas été trouvée sur ce serveur.
@@ -112,12 +112,12 @@ La ressource demand
La ressource demandée est allée et n'a pas été substituée.
La méthode demandée exige un Content-Length valide.
La condition préalable sur la demande a évalué à faux.
La demande est trop grande pour que ce serveur traite.
L'cUri de demande est trop grand pour que ce serveur traite.
La demande est trop grande pour ce serveur.
L'Uri de demande est trop grand pour ce serveur.
Le format de demande n'est pas compris par ce serveur.
500 Le serveur a détecté une erreur irrémédiable et ne peut pas traiter votre demande.
La méthode demandée n'est pas appliquée par ce serveur.
Le proxy server a reçu une réponse incorrecte d'un serveur ascendant.
La ressource demandée est actuel indisponible sur ce serveur.
La ressource demandée est actuellement indisponible sur ce serveur.
Le proxy server a pris trop longtemps pour répondre à ce serveur.
Ce serveur ne supporte pas la version de HTTP exigée par votre browser.
+84 -84
Ver Arquivo
@@ -1,123 +1,123 @@
iso-8859-1
GIUSTO
Annullamento
Procedi
Annulla
Aiuto
Rinunciato
Vicino
Esci
Chiudi
No
Su
Fuori di
Risparmi
Scarto
Difetto
Attivo
Inattivo
Salva
Scarta
Standard
Opzioni
Più Info
Più Informazioni
Nero
Colore
Ciano
Fucsina
Colore giallo
Copyright 1993-1999 da di Easy Software Products, tutti radrizza riservato.
Generalità
Fucsia
Giallo
Copyright 1993-1999 di Easy Software Products, tutti i diritti riservati.
Generale
Stampante
Opzioni Di Immagine
Opzioni Di HP-GL/2
Supplemento
Opzioni per immagini
Opzioni per HP-GL/2
Extra
Documento
Altro
Pagine Della Stampa:
Stampa delle pagine:
Intero Documento
Gamma Di Pagina:
Ordine D'inversione:
Formato Della Pagina:
Stampa intervallo:
Ordine inverso:
Formato della pagina:
1-Up
2-Up
4-Up
Scaling Di Immagine:
Formato Naturale Di Immagine Di Uso
Zoom da Percent
Zoom da PPI
Immagine Dello Specchio:
Saturazione Di Colore:
Tonalità Di Colore:
Adattare per paginare:
Proteggendo:
Larghezza Della Penna:
Scaling dell'immagine:
Usa formato naturale dell'immagine
Zoom in percentuale
Zoom in PPI
Immagine riflessa:
Saturazione del colore:
Tonalità del colore:
Adatta alla pagina:
Ombreggiatura:
Larghezza della penna:
Correzione Gamma:
Luminosità:
Aggiungere
Cancellazione
Modificare
URI Della Stampante
Nome Della Stampante
Posizione Della Stampante
Stampante Info
Stampante fa e modella
Aggiungi
Cancella
Modifica
URI della stampante
Nome della stampante
Collocazione della stampante
Informazioni sulla stampante
Produttore e modello della stampante
URI Del Dispositivo
Pagina Di Formattazione
Stampando Pagina
D' Inizializzazione Stampante
Condizione Della Stampante
Accettando I Lavori
Non accettando I Lavori
Lavori Di Stampa
Preparazione della pagina
Stampa della Pagina
Inizializzazione Stampante
Condizione della stampante
Sto accettando le richieste di stampa
Non sto accettando le richieste di stampa
Richieste di stampa
Codice categoria
Locale
Periferico
Utilizzazione per due usi
Cucendo con punti metallici
Veloci Copie
Fascicolate Copie
Perforazione Del Foro
Covering
Legandosi
Remoto
Fronte-retro
Sto cucendo con punti metallici
Copie veloci
Copie fascicolate
Perforazione delle pagine (per fascicolatura)
Inserendo copertina
Applicando fascicolatura
Ordinando
Piccolo (fino a 9.5x1în)
Media (9.5x1în - 13x19in)
Medio (9.5x1în - 13x19in)
Grande (13x19in e più grande)
Su ordinazione Formato
Formato personalizzato
Idle
Elaborando
Arrestato
Tutto
Dispari
Anche Pagine
Pagine pari
Più Scuro Più Luminoso
Formato Di Media
Tipo Di Media
Sorgente Di Media
Formato del supporto
Tipo del supporto
Sorgente del supporto
Orientamento:
Portrait
Paesaggio
Verticale
Orizzontale
Job State
Job Name
User Name
Priority
Copies
File Size
Pending
Priorita'
Copie
Dimensioni del file
In attesa
Output Mode
Resolution
400 Il vostro browser ha trasmesso una richiesta che questo server non potrebbe capire.
Questo server non potrebbe verificare che siete autorizzati ad accedere alla risorsa.
Risoluzione
400 Il vostro browser ha trasmesso una richiesta che questo server non ha capito
Questo server non ha potuto verificare che siete autorizzati ad accedere alla risorsa.
Dovete pagare accedere a questo server.
Non avete permesso accedere alla risorsa su questo server.
Non avete il permesso di accedere alla risorsa richiesta su questo server.
La risorsa chiesta non è stata trovata su questo server.
Il metodo chiesto non è permesso con la risorsa.
Il metodo richiesto non è consentito con la risorsa desiderata.
Una rappresentazione adatta per la risorsa non è stata trovata su questo server.
Non avete permesso utilizzare questo server come calcolatore centrale di procura.
La richiesta ha preso troppo lungamente per completare ed è stata abbandonata.
Non avete il permesso utilizzare questo server come proxy.
La richiesta ha impiegato troppo tempo per essere completata ed è stata abbandonata.
La risorsa chiesta ha più di un valore.
La risorsa chiesta è andata e non è stata sostituita.
Il metodo chiesto richiede un Content-Length valido.
Il presupposto sulla richiesta ha valutato a falso.
La richiesta è troppo grande affinchè questo server elabori.
Il URI di richiesta è troppo grande affinchè questo server elabori.
Il formato di richiesta non è capito da questo server.
500 Il server ha rilevato un errore unrecoverable e non può elaborare la vostra richiesta.
Il metodo chiesto non è effettuato da questo server.
Il proxy server ha ricevuto una risposta non valida da un server verso l'alto.
La risorsa chiesta non e' piu' disponibile e non è stata ancora rimpiazzata.
Il metodo chiesto richiede un campo "Content-Length" valido.
I prerequisiti per la richiesta non sono soddisfatti.
La richiesta è troppo grande per essere elaborata da questo server.
L'URI della richiesta è troppo grande per essere elaborato da questo server.
Il formato della richiesta non è capito da questo server.
500 Il server ha rilevato un errore non recuperabile e non può elaborare la vostra richiesta.
Il metodo chiesto non è implementato da questo server.
Il proxy server ha ricevuto una risposta non valida da un server di livello superiore.
La risorsa chiesta è attualmente non disponibile su questo server.
Il proxy server ha preso troppo lungamente per rispondere a questo server.
Questo server non sostiene la versione del HTTP richiesta dal vostro browser.
Il proxy server ha impiegato troppo tempo per rispondere a questo server.
Questo server non supporta la versione HTTP richiesta dal vostro browser.
+7 -7
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: accept.8 380 1999-06-10 16:15:04Z mike $"
.\" "$Id: accept.8 680 1999-09-22 20:06:43Z mike $"
.\"
.\" accept/reject man page for the Common UNIX Printing System (CUPS).
.\"
@@ -21,7 +21,7 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH accept 8 "Common UNIX Printing System" "14 May 1999" "Easy Software Products"
.TH accept 8 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
.SH NAME
accept/reject \- accept/reject jobs sent to a destination
.SH SYNOPSIS
@@ -36,22 +36,22 @@ destination(s)
] ]
destination(s)
.SH DESCRIPTION
\fBaccept\fR instructs the printing system to accept print jobs to the
\fIaccept\fR instructs the printing system to accept print jobs to the
specified destinations.
.LP
\fBreject\fR instructs the printing system to reject print jobs to the
\fIreject\fR instructs the printing system to reject print jobs to the
specified destinations. The \fI-r\fR option sets the reason for rejecting
print jobs. If not specified the reason defaults to "Reason Unknown".
.SH COMPATIBILITY
The CUPS versions of \fBaccept\fR and \fBreject\fR may ask the user for an
The CUPS versions of \fIaccept\fR and \fIreject\fR may ask the user for an
access password depending on the printing system configuration. This differs
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 Administrator's Manual
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-1999 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: accept.8 380 1999-06-10 16:15:04Z mike $".
.\" End of "$Id: accept.8 680 1999-09-22 20:06:43Z mike $".
.\"
BIN
Ver Arquivo
Arquivo binário não exibido.
+21 -7
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: backend.1 327 1999-05-14 17:03:06Z mike $"
.\" "$Id: backend.1 680 1999-09-22 20:06:43Z mike $"
.\"
.\" backend man page for the Common UNIX Printing System (CUPS).
.\"
@@ -21,7 +21,7 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH backend 1 "Common UNIX Printing System" "14 May 1999" "Easy Software Products"
.TH backend 1 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
.SH NAME
backend \- backend transmission interfaces
.SH SYNOPSIS
@@ -45,19 +45,33 @@ CHARSET
.br
The default text character set (typically us-ascii or iso-8859-1).
.TP 5
CONTENT_TYPE
.br
The MIME type associated with the file (e.g. application/postscript).
.TP 5
DEVICE_URI
.br
The device-uri associated with the printer; this is provided for shell
scripts which may not be able to get the passed argv[0] string.
.TP 5
LANG
.br
The default language locale (typically C or en).
.TP 5
PATH
.br
The standard execution path for external programs that may be run by the backend.
The standard execution path for external programs that may be run by
the backend.
.TP 5
PPD
.br
The full pathname of the PostScript Printer Description (PPD) file for
this printer.
.TP 5
PRINTER
.br
The name of the printer.
.TP 5
RIP_CACHE
.br
The recommended amount of memory to use for Raster Image Processors (RIPs).
@@ -72,17 +86,17 @@ The name and version number of the server (typically CUPS/1.0).
.TP 5
TZ
.br
The timezone of the server (typically GMT).
The timezone of the server.
.TP 5
USER
.br
The user executing the backend (typically root).
The user executing the backend (typically lp).
.SH SEE ALSO
cupsd(8), filter(1)
CUPS Software Administrator's Manual,
CUPS Software Administrators Manual,
CUPS Interface Design Description
.SH COPYRIGHT
Copyright 1993-1999 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: backend.1 327 1999-05-14 17:03:06Z mike $".
.\" End of "$Id: backend.1 680 1999-09-22 20:06:43Z mike $".
.\"
BIN
Ver Arquivo
Arquivo binário não exibido.
+7 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: classes.conf.5 327 1999-05-14 17:03:06Z mike $"
.\" "$Id: classes.conf.5 680 1999-09-22 20:06:43Z mike $"
.\"
.\" classes.conf man page for the Common UNIX Printing System (CUPS).
.\"
@@ -21,16 +21,19 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH classes.conf 5 "Common UNIX Printing System" "14 May 1999" "Easy Software Products"
.TH classes.conf 5 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
.SH NAME
classes.conf \- class configuration file for cups
.SH DESCRIPTION
The \fIclasses.conf\fR file defines the local printer classes that are
available. It is normally generated by the \fIcupsd(8)\fR program when
printer classes are added or deleted.
.SH SEE ALSO
cupsd(8), cupsd.conf(5), mime.convs(5), mime.types(5), printers.conf(5),
CUPS Software Administrator's Manual,
CUPS Software Administrators Manual,
CUPS Interface Design Description
.SH COPYRIGHT
Copyright 1993-1999 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: classes.conf.5 327 1999-05-14 17:03:06Z mike $".
.\" End of "$Id: classes.conf.5 680 1999-09-22 20:06:43Z mike $".
.\"
Arquivo binário não exibido.
+8 -7
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: cupsd.8 327 1999-05-14 17:03:06Z mike $"
.\" "$Id: cupsd.8 680 1999-09-22 20:06:43Z mike $"
.\"
.\" cupsd man page for the Common UNIX Printing System (CUPS).
.\"
@@ -21,27 +21,28 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH cupsd 8 "Common UNIX Printing System" "14 May 1999" "Easy Software Products"
.TH cupsd 8 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
.SH NAME
cupsd \- common unix printing system daemon
.SH SYNOPSIS
.B cups
.I [ \-c config-file ]
.SH DESCRIPTION
\fBcupsd\fR is the scheduler for the Common UNIX Printing System. It implements
\fIcupsd\fR is the scheduler for the Common UNIX Printing System. It implements
a printing system based upon the Internet Printing Protocol, version 1.0. If
no options are specified on the command-line then the default configuration file
(usually \fI/var/cups/conf/cupsf.conf\fR) will be used.
.SH COMPATIBILITY
\fBcupsd\fR implements all of the required IPP/1.0 attributes and operations.
\fIcupsd\fR implements all of the required IPP/1.0 attributes and operations.
It also implements optional operation set 1 and several CUPS-specific
administation operations.
.SH SEE ALSO
classes.conf(5), cupsd.conf(5), mime.convs(5), mime.types(5), printers.conf(5),
CUPS Software Administrator's Manual,
backend(1), classes.conf(5), cupsd.conf(5), filter(1), mime.convs(5),
mime.types(5), printers.conf(5),
CUPS Software Administrators Manual,
CUPS Interface Design Description
.SH COPYRIGHT
Copyright 1993-1999 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: cupsd.8 327 1999-05-14 17:03:06Z mike $".
.\" End of "$Id: cupsd.8 680 1999-09-22 20:06:43Z mike $".
.\"
+5 -4
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: cupsd.conf.5 327 1999-05-14 17:03:06Z mike $"
.\" "$Id: cupsd.conf.5 680 1999-09-22 20:06:43Z mike $"
.\"
.\" cupsd.conf man page for the Common UNIX Printing System (CUPS).
.\"
@@ -21,16 +21,17 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH cupsd.conf 5 "Common UNIX Printing System" "14 May 1999" "Easy Software Products"
.TH cupsd.conf 5 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
.SH NAME
cupsd.conf \- server configuration file for cups
.SH DESCRIPTION
The \fIcupsd.conf\fR file configures the CUPS scheduler, \fIcupsd(8)\fR.
.SH SEE ALSO
classes.conf(5), cupsd(8), mime.convs(5), mime.types(5), printers.conf(5),
CUPS Software Administrator's Manual,
CUPS Software Administrators Manual,
CUPS Interface Design Description
.SH COPYRIGHT
Copyright 1993-1999 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: cupsd.conf.5 327 1999-05-14 17:03:06Z mike $".
.\" End of "$Id: cupsd.conf.5 680 1999-09-22 20:06:43Z mike $".
.\"
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
+7 -7
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: enable.8 380 1999-06-10 16:15:04Z mike $"
.\" "$Id: enable.8 680 1999-09-22 20:06:43Z mike $"
.\"
.\" enable/disable man page for the Common UNIX Printing System (CUPS).
.\"
@@ -21,7 +21,7 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH enable 8 "Common UNIX Printing System" "14 May 1999" "Easy Software Products"
.TH enable 8 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
.SH NAME
disable, disable \- stop/start printers and classes
.SH SYNOPSIS
@@ -35,9 +35,9 @@ destination(s)
.I reason
] ] destination(s)
.SH DESCRIPTION
\fBenable\fR starts the named printers or classes.
\fIenable\fR starts the named printers or classes.
.LP
\fBdisable\fR stops the named printers or classes. The following options may
\fIdisable\fR stops the named printers or classes. The following options may
be used:
.TP 5
\-c
@@ -49,16 +49,16 @@ Cancels all jobs on the named destination.
Sets the message associated with the stopped state. If no reason is specified
then the message is set to "Reason Unknown".
.SH COMPATIBILITY
The CUPS versions of \fBdisable\fR and \fBenable\fR may ask the user for an
The CUPS versions of \fIdisable\fR and \fIenable\fR may ask the user for an
access password depending on the printing system configuration. This differs
from the System V versions which require the root user to execute these
commands.
.SH SEE ALSO
accept(8), cancel(1), lp(1), lpadmin(8), lpstat(1), reject(8),
CUPS Software Administrator's Manual
CUPS Software Administrators Manual
.SH COPYRIGHT
Copyright 1993-1999 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: enable.8 380 1999-06-10 16:15:04Z mike $".
.\" End of "$Id: enable.8 680 1999-09-22 20:06:43Z mike $".
.\"
BIN
Ver Arquivo
Arquivo binário não exibido.
+19 -6
Ver Arquivo
@@ -1,5 +1,5 @@
.\"
.\" "$Id: filter.1 327 1999-05-14 17:03:06Z mike $"
.\" "$Id: filter.1 680 1999-09-22 20:06:43Z mike $"
.\"
.\" filter man page for the Common UNIX Printing System (CUPS).
.\"
@@ -21,7 +21,7 @@
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
.TH filter 1 "Common UNIX Printing System" "14 May 1999" "Easy Software Products"
.TH filter 1 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
.SH NAME
filter \- file conversion filter interfaces
.SH SYNOPSIS
@@ -47,6 +47,14 @@ CHARSET
.br
The default text character set (typically us-ascii or iso-8859-1).
.TP 5
CONTENT_TYPE
.br
The MIME type associated with the file (e.g. application/postscript).
.TP 5
DEVICE_URI
.br
The device-uri associated with the printer.
.TP 5
LANG
.br
The default language locale (typically C or en).
@@ -60,6 +68,11 @@ PPD
The full pathname of the PostScript Printer Description (PPD) file for
this printer.
.TP 5
PRINTER
.br
The name of the printer; this is provided for shell scripts which may not be
able to get the passed argv[0] string.
.TP 5
RIP_CACHE
.br
The recommended amount of memory to use for Raster Image Processors (RIPs).
@@ -74,11 +87,11 @@ The name and version number of the server (typically CUPS/1.0).
.TP 5
TZ
.br
The timezone of the server (typically GMT).
The timezone of the server.
.TP 5
USER
.br
The user executing the filter (typically root).
The user executing the filter (typically lp).
.SH COMPATIBILITY
While the filter interface is compatible with System V interface
scripts, it will only work with the System V interface script as the
@@ -86,10 +99,10 @@ only filter. Typically the interface script will be provided via the
\fBlpadmin(8)\fR command using the \fI-i\fR option.
.SH SEE ALSO
backend(1), cupsd(8),
CUPS Software Administrator's Manual,
CUPS Software Administrators Manual,
CUPS Interface Design Description
.SH COPYRIGHT
Copyright 1993-1999 by Easy Software Products, All Rights Reserved.
.\"
.\" End of "$Id: filter.1 327 1999-05-14 17:03:06Z mike $".
.\" End of "$Id: filter.1 680 1999-09-22 20:06:43Z mike $".
.\"

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