Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 6a383a416a |
+100
-1
@@ -1,6 +1,105 @@
|
||||
CHANGES.txt - 07/10/2000
|
||||
CHANGES.txt - 08/04/2000
|
||||
------------------------
|
||||
|
||||
CHANGES IN CUPS v1.1.2
|
||||
|
||||
- Makefile/configure fixes
|
||||
- RPM spec file and EPM list file fixes
|
||||
- The cupsTempFile() function now uses a different
|
||||
algorithm for generating temp files and "reserves"
|
||||
them to avoid possible security exploitation.
|
||||
- Now use /dev/random (if available) to seed the random
|
||||
number generator for certificates.
|
||||
- The /var/spool/cups and /var/spool/cups/tmp directories
|
||||
were incorrectly owned by root; they are now owned by
|
||||
the filter user, typically "lp".
|
||||
- The scheduler now resets the permissions on the spool
|
||||
and temp directories as needed to match the filter
|
||||
user.
|
||||
- Now expose ppdCollect() as an externally callable
|
||||
function.
|
||||
- The image filters now support filtering from the
|
||||
standard input.
|
||||
- The imagetoraster filter now collects all printer
|
||||
options and job patch files and applies them to the
|
||||
page header as needed.
|
||||
- Added format and banner options to LPD backend.
|
||||
- The send-document operation didn't start a job
|
||||
immediately when last-document was true.
|
||||
- The set-job-attributes operation didn't correctly
|
||||
replace the current job-hold-until value.
|
||||
- Removed the option wrapper code from ppdEmit() and
|
||||
friends since it caused problems with Ghostscript
|
||||
and many PS printers.
|
||||
- Was setting TZ environment variable twice for job
|
||||
filters.
|
||||
- Added syslog logging in cups-lpd to aide in
|
||||
debugging problems.
|
||||
- The HP-UX parallel port backend did not list the
|
||||
available parallel ports on some systems (printf
|
||||
calling problem...)
|
||||
- The lp and lpr commands overrode user options if
|
||||
-d/-P were specified after -o.
|
||||
- The scheduler would crash with a */* filter.
|
||||
- Added support for a "default" filter for unknown file
|
||||
types. The example provided in the mime.types and
|
||||
mime.convs file prints unknown files as if "-oraw" was
|
||||
specified for the job. This functionality is disabled
|
||||
by default.
|
||||
- The "compatibility" mode fix for older backends did not
|
||||
work for smbspool. Added a workaround for it.
|
||||
- The HP-GL/2 filter didn't perform the right pen scaling
|
||||
with some files and the "fitplot" option.
|
||||
- New Software Performance Specification document that
|
||||
describes the memory, disk, and CPU usage of all the
|
||||
CUPS software.
|
||||
|
||||
|
||||
CHANGES IN CUPS v1.1.1
|
||||
|
||||
- The pstoraster Makefile still referenced one of the
|
||||
old PDF filter files.
|
||||
- The filter Makefile used INSTALL_DATA instead of
|
||||
INSTALL_LIB to install the CUPS image library.
|
||||
- The administration CGI didn't work properly with
|
||||
network devices.
|
||||
- The BrowseACL variable was not updated after the
|
||||
cupsd.conf file was loaded.
|
||||
- The lpd mini-daemon didn't support printer instances.
|
||||
- Now use a default umask of 077 for child processes.
|
||||
- Now put temp files in /var/spool/cups/tmp for child
|
||||
processes and the root user, unless TMPDIR or TempDir
|
||||
is defined otherwise.
|
||||
- cupsGetPPD() no longer uses easy-to-guess filenames.
|
||||
- The CUPS-Delete-Class and CUPS-Delete-Printer
|
||||
operations now save classes.conf file as needed.
|
||||
- The lppasswd command wouldn't add a user.
|
||||
- The ppdOpen() function could cause a segfault if a
|
||||
0-length PPD file was read.
|
||||
- The image filters were not handling images with
|
||||
different X and Y resolutions properly.
|
||||
- The imagetoraster filter defaulted to RGB output
|
||||
instead of black output like pstoraster.
|
||||
- The pstops filter didn't handle binary data properly.
|
||||
- The pstops filter didn't handle copies properly for
|
||||
PS files lacking DSC comments.
|
||||
- The pstops filter now appends %%EOF to the end of
|
||||
documents if they don't have it.
|
||||
- The cupsGetPPD() function didn't work with remote
|
||||
printers lacking the @server in the name.
|
||||
- The configure script didn't work right when only
|
||||
--prefix was specified.
|
||||
- The ppdEmit() code now wraps all printer commands so
|
||||
that buggy PostScript printers will still print a file
|
||||
after receiving an option that isn't available.
|
||||
- Fixed the DeskJet margin bug, and disabled 600dpi
|
||||
color mode until it can be fixed.
|
||||
- The cupsAddDest() function didn't sort instances
|
||||
correctly in all cases.
|
||||
- The time-at-xyz attributes now expand to the date and
|
||||
time in banner files.
|
||||
|
||||
|
||||
CHANGES IN CUPS v1.1
|
||||
|
||||
- Documentation updates.
|
||||
|
||||
+3
-1
@@ -30,6 +30,7 @@ AR = @AR@
|
||||
AWK = @AWK@
|
||||
CC = @LIBTOOL@ @CC@
|
||||
CHMOD = @CHMOD@
|
||||
CHOWN = @CHOWN@
|
||||
CP = @CP@
|
||||
CXX = @LIBTOOL@ @CXX@
|
||||
DSO = @DSO@
|
||||
@@ -119,8 +120,9 @@ top_srcdir = @top_srcdir@
|
||||
BINDIR = @bindir@
|
||||
DATADIR = @CUPS_DATADIR@
|
||||
DOCDIR = @CUPS_DOCROOT@
|
||||
ESP_ROOT = @ESP_ROOT@
|
||||
INCLUDEDIR = $(includedir)
|
||||
INITDIR = @INITDIR@
|
||||
INITDDIR = @INITDDIR@
|
||||
LIBDIR = $(libdir)
|
||||
LOCALEDIR = @CUPS_LOCALEDIR@
|
||||
LOGDIR = @CUPS_LOGDIR@
|
||||
|
||||
+9
-21
@@ -28,7 +28,7 @@ include Makedefs
|
||||
# Directories to make...
|
||||
#
|
||||
|
||||
DIRS = cups backend berkeley cgi-bin doc filter man pdftops pstoraster \
|
||||
DIRS = cups backend berkeley cgi-bin filter man pdftops pstoraster \
|
||||
scheduler systemv
|
||||
|
||||
#
|
||||
@@ -64,32 +64,20 @@ install:
|
||||
(cd conf; $(MAKE) $(MFLAGS) install)
|
||||
echo Installing in data...
|
||||
(cd data; $(MAKE) $(MFLAGS) install)
|
||||
echo Installing in doc...
|
||||
(cd doc; $(MAKE) $(MFLAGS) install)
|
||||
echo Installing in fonts...
|
||||
(cd fonts; $(MAKE) $(MFLAGS) install)
|
||||
(cd fonts; $(MAKE) $(MFLAGS) install)
|
||||
echo Installing in locale...
|
||||
echo Installing in ppd...
|
||||
(cd ppd; $(MAKE) $(MFLAGS) install)
|
||||
(cd locale; $(MAKE) $(MFLAGS) install)
|
||||
echo Installing in templates...
|
||||
(cd templates; $(MAKE) $(MFLAGS) install)
|
||||
echo Installing startup script...
|
||||
if test -d $(prefix)/sbin/init.d; then \
|
||||
$(INSTALL_SCRIPT) cups.sh $(prefix)/sbin/init.d/cups; \
|
||||
$(CHMOD) ugo+rx $(prefix)/sbin/init.d/cups; \
|
||||
ln -s ../init.d/cups $(prefix)/sbin/rc0.d/K000cups; \
|
||||
ln -s ../init.d/cups $(prefix)/sbin/rc2.d/S999cups; \
|
||||
fi
|
||||
if test -d $(prefix)/etc/rc.d/init.d; then \
|
||||
$(INSTALL_SCRIPT) cups.sh $(prefix)/etc/rc.d/init.d/cups; \
|
||||
$(CHMOD) ugo+rx $(prefix)/etc/rc.d/cups; \
|
||||
ln -s ../init.d/cups $(prefix)/etc/rc.d/rc0.d/K00cups; \
|
||||
ln -s ../init.d/cups $(prefix)/etc/rc.d/rc2.d/S99cups; \
|
||||
fi
|
||||
if test -d $(prefix)/etc/init.d; then \
|
||||
$(INSTALL_SCRIPT) cups.sh $(prefix)/etc/init.d/cups; \
|
||||
$(CHMOD) ugo+rx $(prefix)/etc/init.d/cups; \
|
||||
ln -s ../init.d/cups $(prefix)/etc/rc0.d/K00cups; \
|
||||
ln -s ../init.d/cups $(prefix)/etc/rc2.d/S99cups; \
|
||||
if test "x$INITDIR" != "x"; then \
|
||||
$(INSTALL_SCRIPT) cups.sh $prefix/$INITDIR/init.d/cups; \
|
||||
$(CHMOD) ugo+rx $prefix/$INITDIR/init.d/cups; \
|
||||
ln -s $INITDDIR/cups $prefix/$INITDIR/rc0.d/K00cups; \
|
||||
ln -s $INITDDIR/cups $prefix/$INITDIR/rc2.d/S99cups; \
|
||||
fi
|
||||
|
||||
#
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
README - CUPS v1.1 - 07/10/2000
|
||||
-------------------------------
|
||||
README - CUPS v1.1.2 - 08/04/2000
|
||||
---------------------------------
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
|
||||
+101
-7
@@ -60,7 +60,8 @@ extern int rresvport(int *port); /* Hello? No prototype for this... */
|
||||
|
||||
static int lpd_command(int lpd_fd, char *format, ...);
|
||||
static int lpd_queue(char *hostname, char *printer, char *filename,
|
||||
char *user, int copies);
|
||||
char *user, char *title, int copies, int banner,
|
||||
int format);
|
||||
|
||||
|
||||
/*
|
||||
@@ -79,9 +80,15 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
hostname[1024], /* Hostname */
|
||||
username[255], /* Username info (not used) */
|
||||
resource[1024], /* Resource info (printer name) */
|
||||
*options, /* Pointer to options */
|
||||
name[255], /* Name of option */
|
||||
value[255], /* Value of option */
|
||||
*ptr, /* Pointer into name or value */
|
||||
filename[1024]; /* File to print */
|
||||
int port; /* Port number (not used) */
|
||||
int status; /* Status of LPD job */
|
||||
int banner; /* Print banner page? */
|
||||
int format; /* Print format */
|
||||
|
||||
|
||||
if (argc == 1)
|
||||
@@ -142,6 +149,83 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
|
||||
httpSeparate(argv[0], method, username, hostname, &port, resource);
|
||||
|
||||
/*
|
||||
* See if there are any options...
|
||||
*/
|
||||
|
||||
banner = 0;
|
||||
format = 'l';
|
||||
|
||||
if ((options = strchr(resource, '?')) != NULL)
|
||||
{
|
||||
/*
|
||||
* Yup, terminate the device name string and move to the first
|
||||
* character of the options...
|
||||
*/
|
||||
|
||||
*options++ = '\0';
|
||||
|
||||
/*
|
||||
* Parse options...
|
||||
*/
|
||||
|
||||
while (*options)
|
||||
{
|
||||
/*
|
||||
* Get the name...
|
||||
*/
|
||||
|
||||
for (ptr = name; *options && *options != '=';)
|
||||
*ptr++ = *options++;
|
||||
*ptr = '\0';
|
||||
|
||||
if (*options == '=')
|
||||
{
|
||||
/*
|
||||
* Get the value...
|
||||
*/
|
||||
|
||||
options ++;
|
||||
|
||||
for (ptr = value; *options && *options != '+';)
|
||||
*ptr++ = *options++;
|
||||
*ptr = '\0';
|
||||
|
||||
if (*options == '+')
|
||||
options ++;
|
||||
}
|
||||
else
|
||||
value[0] = '\0';
|
||||
|
||||
/*
|
||||
* Process the option...
|
||||
*/
|
||||
|
||||
if (strcasecmp(name, "banner") == 0)
|
||||
{
|
||||
/*
|
||||
* Set the banner...
|
||||
*/
|
||||
|
||||
banner = !value[0] ||
|
||||
strcasecmp(value, "on") == 0 ||
|
||||
strcasecmp(value, "yes") == 0 ||
|
||||
strcasecmp(value, "true") == 0;
|
||||
}
|
||||
else if (strcasecmp(name, "format") == 0 && value[0])
|
||||
{
|
||||
/*
|
||||
* Set output format...
|
||||
*/
|
||||
|
||||
if (strchr("cdfglnoprtv", value[0]) != NULL)
|
||||
format = value[0];
|
||||
else
|
||||
fprintf(stderr, "ERROR: Unknown format character \"%c\"\n", value[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Queue the job...
|
||||
*/
|
||||
@@ -149,14 +233,16 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
|
||||
if (argc > 6)
|
||||
{
|
||||
status = lpd_queue(hostname, resource + 1, filename,
|
||||
argv[2] /* user */, atoi(argv[4]) /* copies */);
|
||||
argv[2] /* user */, argv[3] /* title */,
|
||||
atoi(argv[4]) /* copies */, banner, format);
|
||||
|
||||
if (!status)
|
||||
fprintf(stderr, "PAGE: 1 %d\n", atoi(argv[4]));
|
||||
}
|
||||
else
|
||||
status = lpd_queue(hostname, resource + 1, filename,
|
||||
argv[2] /* user */, 1);
|
||||
argv[2] /* user */, argv[3] /* title */, 1,
|
||||
banner, format);
|
||||
|
||||
/*
|
||||
* Remove the temporary file if necessary...
|
||||
@@ -231,7 +317,10 @@ lpd_queue(char *hostname, /* I - Host to connect to */
|
||||
char *printer, /* I - Printer/queue name */
|
||||
char *filename, /* I - File to print */
|
||||
char *user, /* I - Requesting user */
|
||||
int copies) /* I - Number of copies */
|
||||
char *title, /* I - Job title */
|
||||
int copies, /* I - Number of copies */
|
||||
int banner, /* I - Print LPD banner? */
|
||||
int format) /* I - Format specifier */
|
||||
{
|
||||
FILE *fp; /* Job file */
|
||||
char localhost[255]; /* Local host name */
|
||||
@@ -354,13 +443,18 @@ lpd_queue(char *hostname, /* I - Host to connect to */
|
||||
gethostname(localhost, sizeof(localhost));
|
||||
localhost[31] = '\0'; /* RFC 1179, Section 7.2 - host name < 32 chars */
|
||||
|
||||
snprintf(control, sizeof(control), "H%s\nP%s\n", localhost, user);
|
||||
snprintf(control, sizeof(control), "H%s\nP%s\nJ%s\n", localhost, user, title);
|
||||
cptr = control + strlen(control);
|
||||
|
||||
if (banner)
|
||||
{
|
||||
snprintf(cptr, sizeof(control) - (cptr - control), "L%s\n", user);
|
||||
cptr += strlen(cptr);
|
||||
}
|
||||
|
||||
while (copies > 0)
|
||||
{
|
||||
|
||||
snprintf(cptr, sizeof(control) - (cptr - control), "ldfA%03d%s\n",
|
||||
snprintf(cptr, sizeof(control) - (cptr - control), "%cdfA%03d%s\n", format,
|
||||
getpid() % 1000, localhost);
|
||||
cptr += strlen(cptr);
|
||||
copies --;
|
||||
|
||||
@@ -497,7 +497,8 @@ list_devices(void)
|
||||
{
|
||||
sprintf(device, "/dev/c%dt%dd0_lp", i, j);
|
||||
if (access(device, 0) == 0)
|
||||
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d,%d\"\n", i, j);
|
||||
printf("direct parallel:%s \"Unknown\" \"Parallel Port #%d,%d\"\n",
|
||||
device, i, j);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+8
-6
@@ -160,9 +160,10 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
if ((dest = cupsGetDest(printer, instance, num_dests, dests)) != NULL)
|
||||
{
|
||||
for (j = 0; j < dest->num_options; j ++)
|
||||
num_options = cupsAddOption(dest->options[j].name,
|
||||
dest->options[j].value,
|
||||
num_options, &options);
|
||||
if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
|
||||
num_options = cupsAddOption(dest->options[j].name,
|
||||
dest->options[j].value,
|
||||
num_options, &options);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -235,9 +236,10 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
printer = dests[j].name;
|
||||
|
||||
for (j = 0; j < dest->num_options; j ++)
|
||||
num_options = cupsAddOption(dest->options[j].name,
|
||||
dest->options[j].value,
|
||||
num_options, &options);
|
||||
if (cupsGetOption(dest->options[j].name, num_options, options) == NULL)
|
||||
num_options = cupsAddOption(dest->options[j].name,
|
||||
dest->options[j].value,
|
||||
num_options, &options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+26
-22
@@ -192,33 +192,37 @@ ippSetCGIVars(ipp_t *response, /* I - Response data to be copied... */
|
||||
break;
|
||||
|
||||
case IPP_TAG_URI :
|
||||
httpSeparate(attr->values[i].string.text, method, username,
|
||||
hostname, &port, resource);
|
||||
if (strchr(attr->values[i].string.text, ':') != NULL)
|
||||
{
|
||||
httpSeparate(attr->values[i].string.text, method, username,
|
||||
hostname, &port, resource);
|
||||
|
||||
if (strcmp(method, "ipp") == 0 ||
|
||||
strcmp(method, "http") == 0)
|
||||
{
|
||||
/*
|
||||
* Map localhost access to localhost...
|
||||
*/
|
||||
if (strcmp(method, "ipp") == 0 ||
|
||||
strcmp(method, "http") == 0)
|
||||
{
|
||||
/*
|
||||
* Map localhost access to localhost...
|
||||
*/
|
||||
|
||||
if (strcasecmp(hostname, server) == 0 &&
|
||||
strcmp(getenv("REMOTE_ADDR"), "127.0.0.1") == 0)
|
||||
strcpy(hostname, "localhost");
|
||||
if (strcasecmp(hostname, server) == 0 &&
|
||||
(strcmp(getenv("REMOTE_HOST"), "127.0.0.1") == 0 ||
|
||||
strcmp(getenv("REMOTE_HOST"), "localhost") == 0))
|
||||
strcpy(hostname, "localhost");
|
||||
|
||||
/*
|
||||
* Rewrite URI with HTTP address...
|
||||
*/
|
||||
/*
|
||||
* Rewrite URI with HTTP address...
|
||||
*/
|
||||
|
||||
if (username[0])
|
||||
snprintf(uri, sizeof(uri), "http://%s@%s:%d%s", username,
|
||||
hostname, port, resource);
|
||||
else
|
||||
snprintf(uri, sizeof(uri), "http://%s:%d%s", hostname, port,
|
||||
resource);
|
||||
if (username[0])
|
||||
snprintf(uri, sizeof(uri), "http://%s@%s:%d%s", username,
|
||||
hostname, port, resource);
|
||||
else
|
||||
snprintf(uri, sizeof(uri), "http://%s:%d%s", hostname, port,
|
||||
resource);
|
||||
|
||||
strcat(valptr, uri);
|
||||
break;
|
||||
strcat(valptr, uri);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
case IPP_TAG_STRING :
|
||||
|
||||
+13
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: mime.convs 1019 2000-04-18 19:41:12Z mike $"
|
||||
# "$Id: mime.convs 1270 2000-08-03 18:05:22Z mike $"
|
||||
#
|
||||
# MIME converts file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -59,6 +59,17 @@ application/vnd.cups-form application/vnd.cups-postscript 50 formtops
|
||||
image/* application/vnd.cups-raster 50 imagetoraster
|
||||
application/vnd.cups-postscript application/vnd.cups-raster 50 pstoraster
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# End of "$Id: mime.convs 1019 2000-04-18 19:41:12Z mike $".
|
||||
# Raw filter...
|
||||
#
|
||||
# Uncomment the following filter and the application/octet-stream type
|
||||
# in mime.types to allow printing of arbitrary files without the -oraw
|
||||
# option.
|
||||
#
|
||||
|
||||
#*/* application/vnd.cups-raw 0 -
|
||||
|
||||
#
|
||||
# End of "$Id: mime.convs 1270 2000-08-03 18:05:22Z mike $".
|
||||
#
|
||||
|
||||
+13
-2
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: mime.types 1152 2000-06-22 18:25:29Z mike $"
|
||||
# "$Id: mime.types 1270 2000-08-03 18:05:22Z mike $"
|
||||
#
|
||||
# MIME types file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -122,6 +122,17 @@ application/vnd.cups-postscript string(0,<1B>%-12345X)
|
||||
application/vnd.cups-raster string(0,"RaSt") string(0,"tSaR")
|
||||
application/vnd.cups-raw
|
||||
|
||||
########################################################################
|
||||
#
|
||||
# End of "$Id: mime.types 1152 2000-06-22 18:25:29Z mike $".
|
||||
# Raw print file support...
|
||||
#
|
||||
# Uncomment the following type and the application/octet-stream
|
||||
# filter line in mime.convs to allow raw file printing without the
|
||||
# -oraw option.
|
||||
#
|
||||
|
||||
#application/octet-stream
|
||||
|
||||
#
|
||||
# End of "$Id: mime.types 1270 2000-08-03 18:05:22Z mike $".
|
||||
#
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
* Version of software...
|
||||
*/
|
||||
|
||||
#define CUPS_SVERSION "CUPS v1.1"
|
||||
#define CUPS_SVERSION "CUPS v1.1.2"
|
||||
|
||||
/*
|
||||
* Where are files stored?
|
||||
|
||||
+66
-6
@@ -121,6 +121,7 @@ AC_PROG_CPP
|
||||
AC_PROG_RANLIB
|
||||
AC_PATH_PROG(AR,ar)
|
||||
AC_PATH_PROG(CHMOD,chmod)
|
||||
AC_PATH_PROG(CHOWN,chown)
|
||||
AC_PATH_PROG(CP,cp)
|
||||
AC_PATH_PROG(MV,mv)
|
||||
AC_PATH_PROG(NROFF,nroff)
|
||||
@@ -328,8 +329,12 @@ if test "$prefix" = "NONE"; then
|
||||
fi
|
||||
|
||||
dnl Fix "exec_prefix" variable if it hasn't been specified...
|
||||
if test "$exec_prefix" = "NONE" -a "$prefix" = "/"; then
|
||||
exec_prefix="/usr"
|
||||
if test "$exec_prefix" = "NONE"; then
|
||||
if test "$prefix" = "/"; then
|
||||
exec_prefix="/usr"
|
||||
else
|
||||
exec_prefix="$prefix"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Fix "sharedstatedir" variable if it hasn't been specified...
|
||||
@@ -353,13 +358,21 @@ if test "$includedir" = "\${prefix}/include" -a "$prefix" = "/"; then
|
||||
fi
|
||||
|
||||
dnl Fix "localstatedir" variable if it hasn't been specified...
|
||||
if test "$localstatedir" = "\${prefix}/var" -a "$prefix" = "/"; then
|
||||
localstatedir="/var"
|
||||
if test "$localstatedir" = "\${prefix}/var"; then
|
||||
if test "$prefix" = "/"; then
|
||||
localstatedir="/var"
|
||||
else
|
||||
localstatedir="$prefix/var"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Fix "sysconfdir" variable if it hasn't been specified...
|
||||
if test "$sysconfdir" = "\${prefix}/etc" -a "$prefix" = "/"; then
|
||||
sysconfdir="/etc"
|
||||
if test "$sysconfdir" = "\${prefix}/etc"; then
|
||||
if test "$prefix" = "/"; then
|
||||
sysconfdir="/etc"
|
||||
else
|
||||
sysconfdir="$prefix/etc"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Fix "libdir" variable for IRIX 6.x...
|
||||
@@ -402,6 +415,53 @@ AC_SUBST(CAT1EXT)
|
||||
AC_SUBST(CAT5EXT)
|
||||
AC_SUBST(CAT8EXT)
|
||||
|
||||
dnl Setup init.d locations...
|
||||
if test $prefix = "/"; then
|
||||
case "$uname" in
|
||||
FreeBSD* | NetBSD* | OpenBSD*)
|
||||
# *BSD
|
||||
INITDIR=""
|
||||
INITDDIR=""
|
||||
;;
|
||||
|
||||
Linux*)
|
||||
# Linux seems to choose an init.d directory at random...
|
||||
if test -d /sbin/init.d; then
|
||||
# SuSE
|
||||
INITDIR="/sbin/init.d"
|
||||
INITDDIR=".."
|
||||
else
|
||||
if test -d /etc/rc.d; then
|
||||
# RedHat
|
||||
INITDIR="/etc/rc.d"
|
||||
INITDDIR="../init.d"
|
||||
else
|
||||
# Others
|
||||
INITDIR="/etc"
|
||||
INITDDIR="../init.d"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
OSF1* | HP-UX*)
|
||||
INITDIR="/sbin"
|
||||
INITDDIR="../init.d"
|
||||
;;
|
||||
|
||||
*)
|
||||
INITDIR="/etc"
|
||||
INITDDIR="../init.d"
|
||||
;;
|
||||
|
||||
esac
|
||||
else
|
||||
INITDIR="/etc"
|
||||
INITDDIR="../init.d"
|
||||
fi
|
||||
|
||||
AC_SUBST(INITDIR)
|
||||
AC_SUBST(INITDDIR)
|
||||
|
||||
dnl Setup default locations...
|
||||
CUPS_SERVERROOT='${prefix}/etc/cups'
|
||||
CUPS_LOGDIR='${prefix}/var/log/cups'
|
||||
|
||||
+7
-4
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.list 1202 2000-07-07 21:25:17Z mike $"
|
||||
# "$Id: cups.list 1277 2000-08-04 14:53:49Z mike $"
|
||||
#
|
||||
# ESP Package Manager (EPM) file list for the Common UNIX Printing
|
||||
# System (CUPS).
|
||||
@@ -28,7 +28,7 @@
|
||||
%vendor Easy Software Products
|
||||
%license LICENSE.txt
|
||||
%readme README.txt
|
||||
%version 1.1
|
||||
%version 1.1.2
|
||||
%incompat printpro
|
||||
|
||||
%system all
|
||||
@@ -111,7 +111,8 @@ l 0555 root sys $LIBDIR/libcupsimage.so libcupsimage.so.2
|
||||
|
||||
# Directories
|
||||
d 0755 root sys $LOGDIR -
|
||||
d 0755 root sys $REQUESTS -
|
||||
d 0700 lp sys $REQUESTS -
|
||||
d 1700 lp sys $REQUESTS/tmp -
|
||||
|
||||
# Data files
|
||||
f 0444 root sys $LOCALEDIR/C/cups_C locale/C/cups_C
|
||||
@@ -389,6 +390,8 @@ f 0444 root sys $DOCDIR/sdd.html doc/sdd.html
|
||||
f 0444 root sys $DOCDIR/sdd.pdf doc/sdd.pdf
|
||||
f 0444 root sys $DOCDIR/spm.html doc/spm.html
|
||||
f 0444 root sys $DOCDIR/spm.pdf doc/spm.pdf
|
||||
f 0444 root sys $DOCDIR/sps.html doc/sps.html
|
||||
f 0444 root sys $DOCDIR/sps.pdf doc/sps.pdf
|
||||
f 0444 root sys $DOCDIR/ssr.html doc/ssr.html
|
||||
f 0444 root sys $DOCDIR/ssr.pdf doc/ssr.pdf
|
||||
f 0444 root sys $DOCDIR/sum.html doc/sum.html
|
||||
@@ -502,5 +505,5 @@ f 0444 root sys $MANDIR/man5/printers.conf.5 man/printers.conf.man
|
||||
i 0555 root sys cups cups.sh
|
||||
|
||||
#
|
||||
# End of "$Id: cups.list 1202 2000-07-07 21:25:17Z mike $".
|
||||
# End of "$Id: cups.list 1277 2000-08-04 14:53:49Z mike $".
|
||||
#
|
||||
|
||||
+61
-21
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# "$Id: cups.spec 1214 2000-07-10 20:58:19Z mike $"
|
||||
# "$Id: cups.spec 1277 2000-08-04 14:53:49Z mike $"
|
||||
#
|
||||
# RPM "spec" file for the Common UNIX Printing System (CUPS).
|
||||
#
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
Summary: Common Unix Printing System
|
||||
Name: cups
|
||||
Version: 1.1
|
||||
Version: 1.1.2
|
||||
Release: 0
|
||||
Copyright: GPL
|
||||
Group: System Environment/Daemons
|
||||
Source: ftp://ftp.easysw.com/pub/cups/1.1/cups-1.1-source.tar.gz
|
||||
Source: ftp://ftp.easysw.com/pub/cups/%version/cups-%version-source.tar.gz
|
||||
Url: http://www.cups.org
|
||||
Packager: Michael Sweet <mike@easysw.com>
|
||||
Vendor: Easy Software Products
|
||||
@@ -68,46 +68,86 @@ make
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||
|
||||
make datadir=$RPM_BUILD_ROOT/usr/share \
|
||||
make prefix=$RPM_BUILD_ROOT \
|
||||
exec_prefix=$RPM_BUILD_ROOT/usr \
|
||||
includedir=$RPM_BUILD_ROOT/usr/include \
|
||||
infodir=$RPM_BUILD_ROOT/usr/info \
|
||||
libdir=$RPM_BUILD_ROOT/usr/lib \
|
||||
localestatedir=$RPM_BUILD_ROOT/var \
|
||||
prefix=$RPM_BUILD_ROOT \
|
||||
sharedstatedir=$RPM_BUILD_ROOT/usr/com \
|
||||
sysconfdir=$RPM_BUILD_ROOT/etc \
|
||||
BINDIR=$RPM_BUILD_ROOT/usr/bin \
|
||||
DATADIR=$RPM_BUILD_ROOT/usr/share/cups \
|
||||
DOCDIR=$RPM_BUILD_ROOT/usr/share/doc/cups \
|
||||
INCLUDEDIR=$RPM_BUILD_ROOT/usr/include \
|
||||
LIBDIR=$RPM_BUILD_ROOT/usr/lib \
|
||||
LOCALEDIR=$RPM_BUILD_ROOT/usr/share/locale \
|
||||
MANDIR=$RPM_BUILD_ROOT/usr/man \
|
||||
PAMDIR=$RPM_BUILD_ROOT/etc/pam.d \
|
||||
REQUESTS=$RPM_BUILD_ROOT/var/spool/cups \
|
||||
SBINDIR=$RPM_BUILD_ROOT/usr/sbin \
|
||||
SERVERBIN=$RPM_BUILD_ROOT/usr/lib/cups \
|
||||
SERVERROOT=$RPM_BUILD_ROOT/etc/cups \
|
||||
install
|
||||
|
||||
install -m 755 -o root -g root cups.sh $RPM_BUILD_ROOT/etc/rc.d/init.d/cups
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add cups
|
||||
/sbin/chkconfig cups on
|
||||
/etc/rc.d/init.d/cups start
|
||||
if test -x /sbin/chkconfig; then
|
||||
/sbin/chkconfig --add cups
|
||||
/sbin/chkconfig cups on
|
||||
fi
|
||||
|
||||
if test -f /sbin/init.d/cups; then
|
||||
/sbin/init.d/cups start
|
||||
fi
|
||||
if test -f /etc/rc.d/init.d/cups; then
|
||||
/etc/rc.d/init.d/cups start
|
||||
fi
|
||||
if test -f /etc/init.d/cups; then
|
||||
/etc/init.d/cups start
|
||||
fi
|
||||
|
||||
%preun
|
||||
/etc/rc.d/init.d/cups stop
|
||||
/sbin/chkconfig --del cups
|
||||
if test -f /sbin/init.d/cups; then
|
||||
/sbin/init.d/cups stop
|
||||
fi
|
||||
if test -f /etc/rc.d/init.d/cups; then
|
||||
/etc/rc.d/init.d/cups stop
|
||||
fi
|
||||
if test -f /etc/init.d/cups; then
|
||||
/etc/init.d/cups stop
|
||||
fi
|
||||
|
||||
if test -x /sbin/chkconfig; then
|
||||
/sbin/chkconfig --del cups
|
||||
fi
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
/etc/*
|
||||
/etc/cups/certs
|
||||
%config /etc/cups/classes.conf
|
||||
%config /etc/cups/client.conf
|
||||
%config /etc/cups/cupsd.conf
|
||||
/etc/cups/interfaces
|
||||
/etc/cups/mime.types
|
||||
/etc/cups/mime.convs
|
||||
/etc/cups/ppd
|
||||
%config /etc/cups/printers.conf
|
||||
/etc/pam.d/*
|
||||
/etc/init.d/*
|
||||
/etc/rc0.d/*
|
||||
/etc/rc2.d/*
|
||||
/etc/rc.d/*
|
||||
/usr/bin/*
|
||||
/usr/lib/*.so*
|
||||
/usr/man/*
|
||||
/usr/sbin/*
|
||||
/usr/share/*
|
||||
/usr/lib/cups/*
|
||||
/var/*
|
||||
%attr(0700,lp,root) /var/spool/cups
|
||||
%attr(1700,lp,root) /var/spool/cups/tmp
|
||||
/sbin/init.d/*
|
||||
|
||||
%files devel
|
||||
/usr/include/cups/*
|
||||
/usr/lib/*.a
|
||||
|
||||
#
|
||||
# End of "$Id: cups.spec 1214 2000-07-10 20:58:19Z mike $".
|
||||
# End of "$Id: cups.spec 1277 2000-08-04 14:53:49Z mike $".
|
||||
#
|
||||
|
||||
+2
-3
@@ -87,9 +87,8 @@ cupsAddDest(const char *name, /* I - Name of destination */
|
||||
for (i = num_dests; i > 0; i --, dest ++)
|
||||
if (strcasecmp(name, dest->name) < 0)
|
||||
break;
|
||||
else if (instance == NULL && dest->instance != NULL)
|
||||
break;
|
||||
else if (instance != NULL && dest->instance != NULL &&
|
||||
else if (strcasecmp(name, dest->name) == 0 &&
|
||||
instance != NULL && dest->instance != NULL &&
|
||||
strcasecmp(instance, dest->instance) < 0)
|
||||
break;
|
||||
|
||||
|
||||
+88
-88
@@ -25,8 +25,10 @@
|
||||
*
|
||||
* Contents:
|
||||
*
|
||||
* ppdEmit() - Emit code for marked options to a file.
|
||||
* ppdEmitFd() - Emit code for marked options to a file.
|
||||
* ppdCollect() - Collect all marked options that reside in the specified
|
||||
* ppdEmit() - Emit code for marked options to a file.
|
||||
* ppdEmitFd() - Emit code for marked options to a file.
|
||||
* ppd_sort() - Sort options by ordering numbers...
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -49,8 +51,88 @@
|
||||
*/
|
||||
|
||||
static int ppd_sort(ppd_choice_t **c1, ppd_choice_t **c2);
|
||||
static int ppd_collect(ppd_file_t *ppd, ppd_section_t section,
|
||||
ppd_choice_t ***choices);
|
||||
|
||||
|
||||
/*
|
||||
* 'ppdCollect()' - Collect all marked options that reside in the specified
|
||||
* section.
|
||||
*/
|
||||
|
||||
int /* O - Number of options marked */
|
||||
ppdCollect(ppd_file_t *ppd, /* I - PPD file data */
|
||||
ppd_section_t section, /* I - Section to collect */
|
||||
ppd_choice_t ***choices) /* O - Pointers to choices */
|
||||
{
|
||||
int i, j, k, m; /* Looping vars */
|
||||
ppd_group_t *g, /* Current group */
|
||||
*sg; /* Current sub-group */
|
||||
ppd_option_t *o; /* Current option */
|
||||
ppd_choice_t *c; /* Current choice */
|
||||
int count; /* Number of choices collected */
|
||||
ppd_choice_t **collect; /* Collected choices */
|
||||
|
||||
|
||||
if (ppd == NULL)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* Allocate memory for up to 1000 selected choices...
|
||||
*/
|
||||
|
||||
count = 0;
|
||||
collect = calloc(sizeof(ppd_choice_t *), 1000);
|
||||
|
||||
/*
|
||||
* Loop through all options and add choices as needed...
|
||||
*/
|
||||
|
||||
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 (o->section == section)
|
||||
for (k = o->num_choices, c = o->choices; k > 0; k --, c ++)
|
||||
if (c->marked && count < 1000)
|
||||
{
|
||||
collect[count] = c;
|
||||
count ++;
|
||||
}
|
||||
|
||||
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 (o->section == section)
|
||||
for (m = o->num_choices, c = o->choices; m > 0; m --, c ++)
|
||||
if (c->marked && count < 1000)
|
||||
{
|
||||
collect[count] = c;
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have more than 1 marked choice, sort them...
|
||||
*/
|
||||
|
||||
if (count > 1)
|
||||
qsort(collect, count, sizeof(ppd_choice_t *),
|
||||
(int (*)(const void *, const void *))ppd_sort);
|
||||
|
||||
/*
|
||||
* Return the array and number of choices; if 0, free the array since
|
||||
* it isn't needed.
|
||||
*/
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
*choices = collect;
|
||||
return (count);
|
||||
}
|
||||
else
|
||||
{
|
||||
*choices = NULL;
|
||||
free(collect);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@@ -68,7 +150,7 @@ ppdEmit(ppd_file_t *ppd, /* I - PPD file record */
|
||||
ppd_size_t *size; /* Custom page size */
|
||||
|
||||
|
||||
if ((count = ppd_collect(ppd, section, &choices)) == 0)
|
||||
if ((count = ppdCollect(ppd, section, &choices)) == 0)
|
||||
return (0);
|
||||
|
||||
for (i = 0; i < count; i ++)
|
||||
@@ -155,7 +237,7 @@ ppdEmitFd(ppd_file_t *ppd, /* I - PPD file record */
|
||||
char buf[1024]; /* Output buffer for feature */
|
||||
|
||||
|
||||
if ((count = ppd_collect(ppd, section, &choices)) == 0)
|
||||
if ((count = ppdCollect(ppd, section, &choices)) == 0)
|
||||
return (0);
|
||||
|
||||
for (i = 0; i < count; i ++)
|
||||
@@ -214,88 +296,6 @@ ppd_sort(ppd_choice_t **c1, /* I - First choice */
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 'ppd_collect()' - Collect all marked options that reside in the specified
|
||||
* section.
|
||||
*/
|
||||
|
||||
static int /* O - Number of options marked */
|
||||
ppd_collect(ppd_file_t *ppd, /* I - PPD file data */
|
||||
ppd_section_t section, /* I - Section to collect */
|
||||
ppd_choice_t ***choices) /* O - Pointers to choices */
|
||||
{
|
||||
int i, j, k, m; /* Looping vars */
|
||||
ppd_group_t *g, /* Current group */
|
||||
*sg; /* Current sub-group */
|
||||
ppd_option_t *o; /* Current option */
|
||||
ppd_choice_t *c; /* Current choice */
|
||||
int count; /* Number of choices collected */
|
||||
ppd_choice_t **collect; /* Collected choices */
|
||||
|
||||
|
||||
if (ppd == NULL)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* Allocate memory for up to 1000 selected choices...
|
||||
*/
|
||||
|
||||
count = 0;
|
||||
collect = calloc(sizeof(ppd_choice_t *), 1000);
|
||||
|
||||
/*
|
||||
* Loop through all options and add choices as needed...
|
||||
*/
|
||||
|
||||
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 (o->section == section)
|
||||
for (k = o->num_choices, c = o->choices; k > 0; k --, c ++)
|
||||
if (c->marked && count < 1000)
|
||||
{
|
||||
collect[count] = c;
|
||||
count ++;
|
||||
}
|
||||
|
||||
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 (o->section == section)
|
||||
for (m = o->num_choices, c = o->choices; m > 0; m --, c ++)
|
||||
if (c->marked && count < 1000)
|
||||
{
|
||||
collect[count] = c;
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have more than 1 marked choice, sort them...
|
||||
*/
|
||||
|
||||
if (count > 1)
|
||||
qsort(collect, count, sizeof(ppd_choice_t *),
|
||||
(int (*)(const void *, const void *))ppd_sort);
|
||||
|
||||
/*
|
||||
* Return the array and number of choices; if 0, free the array since
|
||||
* it isn't needed.
|
||||
*/
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
*choices = collect;
|
||||
return (count);
|
||||
}
|
||||
else
|
||||
{
|
||||
*choices = NULL;
|
||||
free(collect);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* End of "$Id$".
|
||||
*/
|
||||
|
||||
+46
-2
@@ -1573,7 +1573,7 @@ ppd_read(FILE *fp, /* I - File to read from */
|
||||
*textptr, /* Text pointer */
|
||||
*strptr, /* Pointer into string */
|
||||
*lineptr, /* Current position in line buffer */
|
||||
line[262144]; /* Line buffer (256k) */
|
||||
line[65536]; /* Line buffer (64k) */
|
||||
|
||||
|
||||
/*
|
||||
@@ -1588,6 +1588,8 @@ ppd_read(FILE *fp, /* I - File to read from */
|
||||
* Now loop until we have a valid line...
|
||||
*/
|
||||
|
||||
*string = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
/*
|
||||
@@ -1621,10 +1623,12 @@ ppd_read(FILE *fp, /* I - File to read from */
|
||||
ungetc(ch, fp);
|
||||
}
|
||||
|
||||
*lineptr++ = '\n';
|
||||
ch = '\n';
|
||||
|
||||
if (!endquote) /* Continue for multi-line text */
|
||||
break;
|
||||
|
||||
*lineptr++ = '\n';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1639,6 +1643,46 @@ ppd_read(FILE *fp, /* I - File to read from */
|
||||
}
|
||||
}
|
||||
|
||||
if (endquote)
|
||||
{
|
||||
/*
|
||||
* Didn't finish this quoted string...
|
||||
*/
|
||||
|
||||
while ((ch = getc(fp)) != EOF)
|
||||
if (ch == '\"')
|
||||
break;
|
||||
}
|
||||
|
||||
if (ch != '\n')
|
||||
{
|
||||
/*
|
||||
* Didn't finish this line...
|
||||
*/
|
||||
|
||||
while ((ch = getc(fp)) != EOF)
|
||||
if (ch == '\r' || ch == '\n')
|
||||
{
|
||||
/*
|
||||
* Line feed or carriage return...
|
||||
*/
|
||||
|
||||
if (ch == '\r')
|
||||
{
|
||||
/*
|
||||
* Check for a trailing line feed...
|
||||
*/
|
||||
|
||||
if ((ch = getc(fp)) == EOF)
|
||||
break;
|
||||
if (ch != 0x0a)
|
||||
ungetc(ch, fp);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (lineptr > line && lineptr[-1] == '\n')
|
||||
lineptr --;
|
||||
|
||||
|
||||
@@ -207,6 +207,8 @@ typedef struct /**** Files ****/
|
||||
*/
|
||||
|
||||
extern void ppdClose(ppd_file_t *ppd);
|
||||
extern int ppdCollect(ppd_file_t *ppd, ppd_section_t section,
|
||||
ppd_choice_t ***choices);
|
||||
extern int ppdConflicts(ppd_file_t *ppd);
|
||||
extern int ppdEmit(ppd_file_t *ppd, FILE *fp,
|
||||
ppd_section_t section);
|
||||
|
||||
+168
-22
@@ -29,8 +29,10 @@
|
||||
* cupsGetDefault() - Get the default printer or class.
|
||||
* cupsGetPPD() - Get the PPD file for a printer.
|
||||
* cupsGetPrinters() - Get a list of printers.
|
||||
* cupsLastError() - Return the last IPP error that occurred.
|
||||
* cupsPrintFile() - Print a file to a printer or class.
|
||||
* cupsPrintFiles() - Print one or more files to a printer or class.
|
||||
* cupsTempFile() - Generate a temporary filename.
|
||||
* cups_connect() - Connect to the specified host...
|
||||
* cups_local_auth() - Get the local authorization certificate if
|
||||
* available/applicable...
|
||||
@@ -48,6 +50,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
# include <io.h>
|
||||
@@ -176,6 +179,15 @@ cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
|
||||
encode[255]; /* Encoded username:password */
|
||||
|
||||
|
||||
if (http == NULL || request == NULL || resource == NULL)
|
||||
{
|
||||
if (request != NULL)
|
||||
ippDelete(request);
|
||||
|
||||
last_error = IPP_INTERNAL_ERROR;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
DEBUG_printf(("cupsDoFileRequest(%08x, %08s, \'%s\', \'%s\')\n",
|
||||
http, request, resource, filename ? filename : "(null)"));
|
||||
|
||||
@@ -432,6 +444,12 @@ cupsGetClasses(char ***classes) /* O - Classes */
|
||||
char **temp; /* Temporary pointer */
|
||||
|
||||
|
||||
if (classes == NULL)
|
||||
{
|
||||
last_error = IPP_INTERNAL_ERROR;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to connect to the server...
|
||||
*/
|
||||
@@ -650,13 +668,19 @@ cupsGetDefault(void)
|
||||
const char * /* O - Filename for PPD file */
|
||||
cupsGetPPD(const char *name) /* I - Printer name */
|
||||
{
|
||||
ipp_t *request, /* IPP request */
|
||||
*response; /* IPP response */
|
||||
ipp_attribute_t *attr; /* Current attribute */
|
||||
cups_lang_t *language; /* Local language */
|
||||
FILE *fp; /* PPD file */
|
||||
int bytes; /* Number of bytes read */
|
||||
char buffer[8192]; /* Buffer for file */
|
||||
char printer[HTTP_MAX_URI], /* Printer name */
|
||||
method[HTTP_MAX_URI], /* Method/scheme name */
|
||||
username[HTTP_MAX_URI], /* Username:password */
|
||||
hostname[HTTP_MAX_URI], /* Hostname */
|
||||
resource[HTTP_MAX_URI]; /* Resource name */
|
||||
char *tempdir; /* Temporary file directory */
|
||||
int port; /* Port number */
|
||||
const char *password; /* Password string */
|
||||
char realm[HTTP_MAX_VALUE], /* realm="xyz" string */
|
||||
nonce[HTTP_MAX_VALUE], /* nonce="xyz" string */
|
||||
@@ -666,6 +690,12 @@ cupsGetPPD(const char *name) /* I - Printer name */
|
||||
static char filename[HTTP_MAX_URI]; /* Local filename */
|
||||
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
last_error = IPP_INTERNAL_ERROR;
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* See if we can connect to the server...
|
||||
*/
|
||||
@@ -676,20 +706,89 @@ cupsGetPPD(const char *name) /* I - Printer name */
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (strchr(name, '@') == NULL)
|
||||
{
|
||||
/*
|
||||
* Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the following
|
||||
* attributes:
|
||||
*
|
||||
* attributes-charset
|
||||
* attributes-natural-language
|
||||
* printer-uri
|
||||
*/
|
||||
|
||||
request = ippNew();
|
||||
|
||||
request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
|
||||
request->request.op.request_id = 1;
|
||||
|
||||
language = cupsLangDefault();
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
|
||||
"attributes-charset", NULL, cupsLangEncoding(language));
|
||||
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
|
||||
"attributes-natural-language", NULL, language->language);
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "ipp://localhost/printers/%s", name);
|
||||
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
|
||||
"printer-uri", NULL, buffer);
|
||||
|
||||
/*
|
||||
* Do the request and get back a response...
|
||||
*/
|
||||
|
||||
if ((response = cupsDoRequest(cups_server, request, "/")) != NULL)
|
||||
{
|
||||
last_error = response->request.status.status_code;
|
||||
|
||||
if ((attr = ippFindAttribute(response, "printer-uri-supported",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
{
|
||||
/*
|
||||
* Get the actual server and printer names...
|
||||
*/
|
||||
|
||||
httpSeparate(attr->values[0].string.text, method, username, hostname,
|
||||
&port, resource);
|
||||
strcpy(printer, strrchr(resource, '/') + 1);
|
||||
|
||||
/*
|
||||
* Remap local hostname to localhost...
|
||||
*/
|
||||
|
||||
gethostname(buffer, sizeof(buffer));
|
||||
|
||||
if (strcasecmp(buffer, hostname) == 0)
|
||||
strcpy(hostname, "localhost");
|
||||
}
|
||||
|
||||
ippDelete(response);
|
||||
}
|
||||
|
||||
cupsLangFree(language);
|
||||
|
||||
/*
|
||||
* Reconnect to the correct server as needed...
|
||||
*/
|
||||
|
||||
if (strcasecmp(cups_server->hostname, hostname) != 0)
|
||||
{
|
||||
httpClose(cups_server);
|
||||
|
||||
if ((cups_server = httpConnect(hostname, ippPort())) == NULL)
|
||||
{
|
||||
last_error = IPP_SERVICE_UNAVAILABLE;
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Then check for the cache file...
|
||||
* Get a temp file...
|
||||
*/
|
||||
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
tempdir = "C:/WINDOWS/TEMP";
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/%s.ppd", tempdir, printer);
|
||||
#else
|
||||
if ((tempdir = getenv("TMPDIR")) == NULL)
|
||||
tempdir = "/tmp";
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/%d.%s.ppd", tempdir, getuid(), printer);
|
||||
#endif /* WIN32 || __EMX__ */
|
||||
cupsTempFile(filename, sizeof(filename));
|
||||
|
||||
/*
|
||||
* And send a request to the HTTP server...
|
||||
@@ -788,6 +887,7 @@ cupsGetPPD(const char *name) /* I - Printer name */
|
||||
* Can't open file; close the server connection and return NULL...
|
||||
*/
|
||||
|
||||
httpFlush(cups_server);
|
||||
httpClose(cups_server);
|
||||
cups_server = NULL;
|
||||
return (NULL);
|
||||
@@ -817,6 +917,12 @@ cupsGetPrinters(char ***printers) /* O - Printers */
|
||||
char **temp; /* Temporary pointer */
|
||||
|
||||
|
||||
if (printers == NULL)
|
||||
{
|
||||
last_error = IPP_INTERNAL_ERROR;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to connect to the server...
|
||||
*/
|
||||
@@ -1253,7 +1359,9 @@ char * /* O - Filename */
|
||||
cupsTempFile(char *filename, /* I - Pointer to buffer */
|
||||
int len) /* I - Size of buffer */
|
||||
{
|
||||
int fd; /* File descriptor for temp file */
|
||||
char *tmpdir; /* TMPDIR environment var */
|
||||
struct timeval curtime; /* Current time */
|
||||
static char buf[1024] = ""; /* Buffer if you pass in NULL and 0 */
|
||||
|
||||
|
||||
@@ -1272,26 +1380,64 @@ cupsTempFile(char *filename, /* I - Pointer to buffer */
|
||||
*/
|
||||
|
||||
if ((tmpdir = getenv("TMPDIR")) == NULL)
|
||||
tmpdir = "/var/tmp";
|
||||
|
||||
if ((int)(strlen(tmpdir) + 8) > len)
|
||||
{
|
||||
#ifdef WIN32
|
||||
tmpdir = "C:/WINDOWS/TEMP";
|
||||
#else
|
||||
/*
|
||||
* The specified directory exceeds the size of the buffer; default it...
|
||||
* Put root temp files in restricted temp directory...
|
||||
*/
|
||||
|
||||
strcpy(buf, "/var/tmp/XXXXXX");
|
||||
return (mktemp(buf));
|
||||
if (getuid() == 0)
|
||||
tmpdir = CUPS_REQUESTS "/tmp";
|
||||
else
|
||||
tmpdir = "/var/tmp";
|
||||
#endif /* WIN32 */
|
||||
}
|
||||
else
|
||||
|
||||
/*
|
||||
* Make the temporary name using the specified directory...
|
||||
*/
|
||||
|
||||
do
|
||||
{
|
||||
/*
|
||||
* Make the temporary name using the specified directory...
|
||||
* Get the current time of day...
|
||||
*/
|
||||
|
||||
sprintf(filename, "%s/XXXXXX", tmpdir);
|
||||
return (mktemp(filename));
|
||||
gettimeofday(&curtime, NULL);
|
||||
|
||||
/*
|
||||
* Format a string using the hex time values...
|
||||
*/
|
||||
|
||||
snprintf(filename, len, "%s/%08x%05x", tmpdir,
|
||||
curtime.tv_sec, curtime.tv_usec);
|
||||
|
||||
/*
|
||||
* Open the file in "exclusive" mode, making sure that we don't
|
||||
* stomp on an existing file or someone's symlink crack...
|
||||
*/
|
||||
|
||||
#ifdef O_NOFOLLOW
|
||||
fd = open(filename, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, 0600);
|
||||
#else
|
||||
fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0600);
|
||||
#endif /* O_NOFOLLOW */
|
||||
}
|
||||
while (fd < 0);
|
||||
|
||||
/*
|
||||
* Close the temp file - it'll be reopened later as needed...
|
||||
*/
|
||||
|
||||
close(fd);
|
||||
|
||||
/*
|
||||
* Return the temp filename...
|
||||
*/
|
||||
|
||||
return (filename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -465,7 +465,7 @@ gsave
|
||||
pageWidth 36 mul % Center of page
|
||||
pageWidth 14 mul % Bottom of page
|
||||
2 copy moveto % Position text
|
||||
(Printed Using CUPS v1.1) CENTER % Show text centered
|
||||
(Printed Using CUPS v1.1.x) CENTER % Show text centered
|
||||
|
||||
pageWidth 3 mul sub % Move down...
|
||||
2 copy moveto % Position text
|
||||
@@ -500,6 +500,6 @@ gsave
|
||||
grestore
|
||||
showpage
|
||||
%
|
||||
% End of "$Id: testprint.ps 985 2000-03-13 18:55:00Z mike $".
|
||||
% End of "$Id: testprint.ps 1260 2000-08-01 17:52:30Z mike $".
|
||||
%
|
||||
%%EOF
|
||||
|
||||
+2
-9
@@ -47,7 +47,8 @@ include ../Makedefs
|
||||
#
|
||||
|
||||
DOCUMENTS = cmp.shtml idd.shtml ipp.shtml sam.shtml sdd.shtml \
|
||||
spm.shtml ssr.shtml stp.shtml sum.shtml svd.shtml
|
||||
spm.shtml sps.shtml ssr.shtml stp.shtml sum.shtml \
|
||||
svd.shtml
|
||||
DOCIMAGES = images/cups-block-diagram.gif images/cups-large.gif \
|
||||
images/cups-medium.gif images/cups-small.gif
|
||||
WEBPAGES = cups.css cupsdoc.css index.html documentation.html
|
||||
@@ -101,14 +102,6 @@ all: $(DOCUMENTS:.shtml=.pdf) $(DOCUMENTS:.shtml=.html) overview.pdf
|
||||
ps: $(DOCUMENTS:.shtml=.ps) overview.ps
|
||||
|
||||
|
||||
#
|
||||
# Make manuals for printing...
|
||||
#
|
||||
|
||||
print: sam-7x8.pdf spm-7x8.pdf sum-7x8.pdf \
|
||||
sam-7x8.ps spm-7x8.ps sum-7x8.ps
|
||||
|
||||
|
||||
#
|
||||
# Remove all generated files...
|
||||
#
|
||||
|
||||
+210
-212
@@ -29,225 +29,225 @@ Copyright 1997-2000, All Rights Reserved<BR>
|
||||
<HR>
|
||||
<H1 ALIGN="CENTER"><A NAME="CONTENTS">Table of Contents</A></H1>
|
||||
<BR>
|
||||
<BR><B><A HREF="#1">1 Scope</A></B>
|
||||
<BR><B><A HREF="#1">1 Scope</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#1_1">1.1 Identification</A></LI>
|
||||
<LI><A HREF="#1_2">1.2 System Overview</A></LI>
|
||||
<LI><A HREF="#1_3">1.3 Document Overview</A></LI>
|
||||
<LI><A HREF="#1_1">1.1 Identification</A></LI>
|
||||
<LI><A HREF="#1_2">1.2 System Overview</A></LI>
|
||||
<LI><A HREF="#1_3">1.3 Document Overview</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#2">2 References</A></B>
|
||||
<B><A HREF="#2">2 References</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#2_1">2.1 CUPS Documentation</A></LI>
|
||||
<LI><A HREF="#2_2">2.2 Other Documents</A></LI>
|
||||
<LI><A HREF="#2_1">2.1 CUPS Documentation</A></LI>
|
||||
<LI><A HREF="#2_2">2.2 Other Documents</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#3">3 File Management</A></B>
|
||||
<B><A HREF="#3">3 File Management</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#3_1">3.1 Directory Structure</A></LI>
|
||||
<LI><A HREF="#3_2">3.2 Source Files</A></LI>
|
||||
<LI><A HREF="#3_3">3.3 Configuration Management</A></LI>
|
||||
<LI><A HREF="#3_1">3.1 Directory Structure</A></LI>
|
||||
<LI><A HREF="#3_2">3.2 Source Files</A></LI>
|
||||
<LI><A HREF="#3_3">3.3 Configuration Management</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#4">4 Trouble Report Processing</A></B>
|
||||
<B><A HREF="#4">4 Trouble Report Processing</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#4_1">4.1 Classification</A></LI>
|
||||
<LI><A HREF="#4_2">4.2 Identification</A></LI>
|
||||
<LI><A HREF="#4_3">4.3 Correction</A></LI>
|
||||
<LI><A HREF="#4_4">4.4 Notification</A></LI>
|
||||
<LI><A HREF="#4_1">4.1 Classification</A></LI>
|
||||
<LI><A HREF="#4_2">4.2 Identification</A></LI>
|
||||
<LI><A HREF="#4_3">4.3 Correction</A></LI>
|
||||
<LI><A HREF="#4_4">4.4 Notification</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#5">5 Software Releases</A></B>
|
||||
<B><A HREF="#5">5 Software Releases</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#5_1">5.1 Version Numbering</A></LI>
|
||||
<LI><A HREF="#5_2">5.2 Generation</A></LI>
|
||||
<LI><A HREF="#5_3">5.3 Testing</A></LI>
|
||||
<LI><A HREF="#5_4">5.4 Release</A></LI>
|
||||
<LI><A HREF="#5_1">5.1 Version Numbering</A></LI>
|
||||
<LI><A HREF="#5_2">5.2 Generation</A></LI>
|
||||
<LI><A HREF="#5_3">5.3 Testing</A></LI>
|
||||
<LI><A HREF="#5_4">5.4 Release</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#6">A Glossary</A></B>
|
||||
<B><A HREF="#6">A Glossary</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#6_1">A.1 Terms</A></LI>
|
||||
<LI><A HREF="#6_2">A.2 Acronyms</A></LI>
|
||||
<LI><A HREF="#6_1">A.1 Terms</A></LI>
|
||||
<LI><A HREF="#6_2">A.2 Acronyms</A></LI>
|
||||
</UL>
|
||||
<B><A HREF="#7">B Coding Requirements</A></B>
|
||||
<B><A HREF="#7">B Coding Requirements</A></B>
|
||||
<UL>
|
||||
<LI><A HREF="#7_1">B.1 Source Files</A></LI>
|
||||
<LI><A HREF="#7_1">B.1 Source Files</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_1_1">B.1.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_1_2">B.1.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_1_1">B.1.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_1_2">B.1.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_2">B.2 Functions</A></LI>
|
||||
<LI><A HREF="#7_2">B.2 Functions</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_2_1">B.2.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_2_2">B.2.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_2_1">B.2.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_2_2">B.2.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_3">B.3 Methods</A></LI>
|
||||
<LI><A HREF="#7_3">B.3 Methods</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_3_1">B.3.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_3_2">B.3.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_3_1">B.3.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_3_2">B.3.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_4">B.4 Variables</A></LI>
|
||||
<LI><A HREF="#7_4">B.4 Variables</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_4_1">B.4.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_4_2">B.4.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_4_1">B.4.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_4_2">B.4.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_5">B.5 Types</A></LI>
|
||||
<LI><A HREF="#7_5">B.5 Types</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_5_1">B.5.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_5_2">B.5.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_5_1">B.5.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_5_2">B.5.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_6">B.6 Structures</A></LI>
|
||||
<LI><A HREF="#7_6">B.6 Structures</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_6_1">B.6.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_6_2">B.6.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_6_1">B.6.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_6_2">B.6.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_7">B.7 Classes</A></LI>
|
||||
<LI><A HREF="#7_7">B.7 Classes</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_7_1">B.7.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_7_2">B.7.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_7_1">B.7.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_7_2">B.7.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_8">B.8 Constants</A></LI>
|
||||
<LI><A HREF="#7_8">B.8 Constants</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_8_1">B.8.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_8_2">B.8.2 Documentation</A></LI>
|
||||
<LI><A HREF="#7_8_1">B.8.1 Naming</A></LI>
|
||||
<LI><A HREF="#7_8_2">B.8.2 Documentation</A></LI>
|
||||
</UL>
|
||||
<LI><A HREF="#7_9">B.9 Code</A></LI>
|
||||
<LI><A HREF="#7_9">B.9 Code</A></LI>
|
||||
<UL>
|
||||
<LI><A HREF="#7_9_1">B.9.1 Documentation</A></LI>
|
||||
<LI><A HREF="#7_9_2">B.9.2 Style</A></LI>
|
||||
<LI><A HREF="#7_9_1">B.9.1 Documentation</A></LI>
|
||||
<LI><A HREF="#7_9_2">B.9.2 Style</A></LI>
|
||||
</UL>
|
||||
</UL>
|
||||
<B><A HREF="#8">C Software Trouble Report Form</A></B><HR>
|
||||
<H1><A NAME="1">1 Scope</A></H1>
|
||||
<H2><A NAME="1_1">1.1 Identification</A></H2>
|
||||
<B><A HREF="#8">C Software Trouble Report Form</A></B><HR>
|
||||
<H1><A NAME="1">1 Scope</A></H1>
|
||||
<H2><A NAME="1_1">1.1 Identification</A></H2>
|
||||
This configuration management plan document provides the guidelines
|
||||
for development and maintenance of the Common UNIX Printing System
|
||||
("CUPS") Version 1.1 software.
|
||||
<H2><A NAME="1_2">1.2 System Overview</A></H2>
|
||||
<P> CUPS provides a portable printing layer for UNIX®-based operating
|
||||
<H2><A NAME="1_2">1.2 System Overview</A></H2>
|
||||
<P>CUPS provides a portable printing layer for UNIX®-based operating
|
||||
systems. It has been developed by <A HREF="http://www.easysw.com">Easy
|
||||
Software Products</A> to promote a standard printing solution for all
|
||||
UNIX vendors and users. CUPS provides the System V and Berkeley
|
||||
command-line interfaces. </P>
|
||||
<P> CUPS uses the Internet Printing Protocol ("IPP") as the basis for
|
||||
<P>CUPS uses the Internet Printing Protocol ("IPP") as the basis for
|
||||
managing print jobs and queues. The Line Printer Daemon ("LPD") Server
|
||||
Message Block ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are
|
||||
also supported with reduced functionality. CUPS adds network printer
|
||||
browsing and PostScript Printer Description ("PPD") based printing
|
||||
options to support real-world printing under UNIX. </P>
|
||||
<P> CUPS also includes a customized version of GNU Ghostscript
|
||||
<P>CUPS also includes a customized version of GNU Ghostscript
|
||||
(currently based off GNU Ghostscript 5.50) and an image file RIP that
|
||||
are used to support non-PostScript printers. Sample drivers for HP and
|
||||
EPSON printers are included that use these filters. </P>
|
||||
<H2><A NAME="1_3">1.3 Document Overview</A></H2>
|
||||
<H2><A NAME="1_3">1.3 Document Overview</A></H2>
|
||||
This configuration management document is organized into the following
|
||||
sections:
|
||||
<UL>
|
||||
<LI> 1 - Scope</LI>
|
||||
<LI> 2 - References</LI>
|
||||
<LI> 3 - File Management</LI>
|
||||
<LI> 4 - Trouble Report Processing</LI>
|
||||
<LI> 5 - Software Releases</LI>
|
||||
<LI> A - Glossary</LI>
|
||||
<LI> B - Coding Requirements</LI>
|
||||
<LI>1 - Scope</LI>
|
||||
<LI>2 - References</LI>
|
||||
<LI>3 - File Management</LI>
|
||||
<LI>4 - Trouble Report Processing</LI>
|
||||
<LI>5 - Software Releases</LI>
|
||||
<LI>A - Glossary</LI>
|
||||
<LI>B - Coding Requirements</LI>
|
||||
</UL>
|
||||
<H1><A NAME="2">2 References</A></H1>
|
||||
<H2><A NAME="2_1">2.1 CUPS Documentation</A></H2>
|
||||
<P> The following CUPS documentation is referenced by this document: </P>
|
||||
<H1><A NAME="2">2 References</A></H1>
|
||||
<H2><A NAME="2_1">2.1 CUPS Documentation</A></H2>
|
||||
<P>The following CUPS documentation is referenced by this document: </P>
|
||||
<UL>
|
||||
<LI> CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
|
||||
<LI> CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
|
||||
<LI> CUPS-IPP-1.1: CUPS Implmentation of IPP </LI>
|
||||
<LI> CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
|
||||
<LI> CUPS-SDD-1.1: CUPS Software Design Description </LI>
|
||||
<LI> CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
|
||||
<LI> CUPS-SSR-1.1: CUPS Software Security Report </LI>
|
||||
<LI> CUPS-STP-1.1: CUPS Software Test Plan </LI>
|
||||
<LI> CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
|
||||
<LI> CUPS-SVD-1.1.x: CUPS Software Version Description </LI>
|
||||
<LI>CUPS-CMP-1.1: CUPS Configuration Management Plan </LI>
|
||||
<LI>CUPS-IDD-1.1: CUPS System Interface Design Description </LI>
|
||||
<LI>CUPS-IPP-1.1: CUPS Implmentation of IPP </LI>
|
||||
<LI>CUPS-SAM-1.1.x: CUPS Software Administrators Manual </LI>
|
||||
<LI>CUPS-SDD-1.1: CUPS Software Design Description </LI>
|
||||
<LI>CUPS-SPM-1.1.x: CUPS Software Programming Manual </LI>
|
||||
<LI>CUPS-SSR-1.1: CUPS Software Security Report </LI>
|
||||
<LI>CUPS-STP-1.1: CUPS Software Test Plan </LI>
|
||||
<LI>CUPS-SUM-1.1.x: CUPS Software Users Manual </LI>
|
||||
<LI>CUPS-SVD-1.1: CUPS Software Version Description </LI>
|
||||
</UL>
|
||||
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
|
||||
<P> The following non-CUPS documents are referenced by this document: </P>
|
||||
<H2><A NAME="2_2">2.2 Other Documents</A></H2>
|
||||
<P>The following non-CUPS documents are referenced by this document: </P>
|
||||
<UL>
|
||||
<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/5003.PPD_Spec_v4.3.pdf">
|
||||
Adobe PostScript Printer Description File Format Specification,
|
||||
Adobe PostScript Printer Description File Format Specification,
|
||||
Version 4.3.</A></LI>
|
||||
<LI><A HREF="http://partners.adobe.com/asn/developer/PDFS/TN/PLRM.pdf">
|
||||
Adobe PostScript Language Reference, Third Edition.</A></LI>
|
||||
<LI> IPP: Job and Printer Set Operations </LI>
|
||||
<LI> IPP/1.1: Encoding and Transport </LI>
|
||||
<LI> IPP/1.1: Implementers Guide </LI>
|
||||
<LI> IPP/1.1: Model and Semantics </LI>
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt"> RFC 1179, Line
|
||||
Adobe PostScript Language Reference, Third Edition.</A></LI>
|
||||
<LI>IPP: Job and Printer Set Operations </LI>
|
||||
<LI>IPP/1.1: Encoding and Transport </LI>
|
||||
<LI>IPP/1.1: Implementers Guide </LI>
|
||||
<LI>IPP/1.1: Model and Semantics </LI>
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC 1179, Line
|
||||
Printer Daemon Protocol</A></LI>
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt"> RFC 2567, Design
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2567.txt">RFC 2567, Design
|
||||
Goals for an Internet Printing Protocol</A></LI>
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt"> RFC 2568, Rationale
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2568.txt">RFC 2568, Rationale
|
||||
for the Structure of the Model and Protocol</A> for the Internet
|
||||
Printing Protocol</LI>
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt"> RFC 2569, Mapping
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2569.txt">RFC 2569, Mapping
|
||||
between LPD and IPP Protocols</A></LI>
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt"> RFC 2616, Hypertext
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616, Hypertext
|
||||
Transfer Protocol -- HTTP/1.1</A></LI>
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt"> RFC 2617, HTTP
|
||||
<LI><A HREF="http://www.ietf.org/rfc/rfc2617.txt">RFC 2617, HTTP
|
||||
Authentication: Basic and Digest Access</A> Authentication </LI>
|
||||
</UL>
|
||||
<H1><A NAME="3">3 File Management</A></H1>
|
||||
<H2><A NAME="3_1">3.1 Directory Structure</A></H2>
|
||||
<H1><A NAME="3">3 File Management</A></H1>
|
||||
<H2><A NAME="3_1">3.1 Directory Structure</A></H2>
|
||||
Each source file shall be placed a sub-directory corresponding to the
|
||||
software sub-system it belongs to ("scheduler", "cups", etc.) To remain
|
||||
compatible with older UNIX filesystems, directory names shall not
|
||||
exceed 16 characters in length.
|
||||
<H2><A NAME="3_2">3.2 Source Files</A></H2>
|
||||
<H2><A NAME="3_2">3.2 Source Files</A></H2>
|
||||
Source files shall be documented and formatted as described in
|
||||
Appendix B, Coding Requirements.
|
||||
<H2><A NAME="3_3">3.3 Configuration Management</A></H2>
|
||||
<H2><A NAME="3_3">3.3 Configuration Management</A></H2>
|
||||
Source files shall be placed under the control of the Concurrent
|
||||
Versions System ("CVS") software. Source files shall be "checked in"
|
||||
with each change so that modifications can be tracked.
|
||||
<P> Documentation on the CVS software is included with the whitepaper,
|
||||
<P>Documentation on the CVS software is included with the whitepaper,
|
||||
"CVS II: Parallelizing Software Development". </P>
|
||||
<H1><A NAME="4">4 Trouble Report Processing</A></H1>
|
||||
<H1><A NAME="4">4 Trouble Report Processing</A></H1>
|
||||
A Software Trouble Report ("STR") shall be submitted every time a user
|
||||
or vendor experiences a problem with the CUPS software. Trouble reports
|
||||
are maintained in a database with one of the following states:
|
||||
<OL>
|
||||
<LI> STR is closed with complete resolution</LI>
|
||||
<LI> STR is closed without resolution</LI>
|
||||
<LI> STR is active</LI>
|
||||
<LI> STR is pending (new STR or additional information available)</LI>
|
||||
<LI>STR is closed with complete resolution</LI>
|
||||
<LI>STR is closed without resolution</LI>
|
||||
<LI>STR is active</LI>
|
||||
<LI>STR is pending (new STR or additional information available)</LI>
|
||||
</OL>
|
||||
Trouble reports shall be processed using the following steps.
|
||||
<H2><A NAME="4_1">4.1 Classification</A></H2>
|
||||
<H2><A NAME="4_1">4.1 Classification</A></H2>
|
||||
When a trouble report is received it must be classified at one of the
|
||||
following levels:
|
||||
<OL>
|
||||
<LI> Request for enhancement</LI>
|
||||
<LI> Documentation error</LI>
|
||||
<LI> Unable to print a file</LI>
|
||||
<LI> Unable to print to a printer</LI>
|
||||
<LI> Unable to print at all</LI>
|
||||
<LI>Request for enhancement</LI>
|
||||
<LI>Documentation error</LI>
|
||||
<LI>Unable to print a file</LI>
|
||||
<LI>Unable to print to a printer</LI>
|
||||
<LI>Unable to print at all</LI>
|
||||
</OL>
|
||||
The scope of the problem should also be determined as:
|
||||
<OL>
|
||||
<LI> Specific to a machine</LI>
|
||||
<LI> Specific to an operating system</LI>
|
||||
<LI> Applies to all machines and operating systems</LI>
|
||||
<LI>Specific to a machine</LI>
|
||||
<LI>Specific to an operating system</LI>
|
||||
<LI>Applies to all machines and operating systems</LI>
|
||||
</OL>
|
||||
<H2><A NAME="4_2">4.2 Identification</A></H2>
|
||||
<H2><A NAME="4_2">4.2 Identification</A></H2>
|
||||
Once the level and scope of the trouble report is determined the
|
||||
software sub-system(s) involved with the problem are determined. This
|
||||
may involve additional communication with the user or vendor to isolate
|
||||
the problem to a specific cause.
|
||||
<P> When the sub-system(s) involved have been identified, an engineer
|
||||
<P>When the sub-system(s) involved have been identified, an engineer
|
||||
will then determine the change(s) needed and estimate the time required
|
||||
for the change(s). </P>
|
||||
<H2><A NAME="4_3">4.3 Correction</A></H2>
|
||||
<H2><A NAME="4_3">4.3 Correction</A></H2>
|
||||
Corrections are scheduled based upon the severity and complexity of
|
||||
the problem. Once all changes have been made, documented, and tested
|
||||
successfully a new software release snapshot is generated. Additional
|
||||
tests are added as necessary for proper testing of the changes.
|
||||
<H2><A NAME="4_4">4.4 Notification</A></H2>
|
||||
<H2><A NAME="4_4">4.4 Notification</A></H2>
|
||||
The user or vendor is notified when the fix is available or if the
|
||||
problem was caused by user error.
|
||||
<H1><A NAME="5">5 Software Releases</A></H1>
|
||||
<H2><A NAME="5_1">5.1 Version Numbering</A></H2>
|
||||
<H1><A NAME="5">5 Software Releases</A></H1>
|
||||
<H2><A NAME="5_1">5.1 Version Numbering</A></H2>
|
||||
CUPS uses a three-part version number separated by periods to
|
||||
represent the major, minor, and patch release numbers:
|
||||
<UL>
|
||||
@@ -292,81 +292,79 @@ numbers reset to 0:
|
||||
2.0.0 Production release of 2.0.0
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="5_2">5.2 Generation</A></H2>
|
||||
<H2><A NAME="5_2">5.2 Generation</A></H2>
|
||||
Software releases shall be generated for each successfully completed
|
||||
software trouble report. All object and executable files shall be
|
||||
deleted prior to performing a full build to ensure that source files
|
||||
are recompiled.
|
||||
<H2><A NAME="5_3">5.3 Testing</A></H2>
|
||||
<H2><A NAME="5_3">5.3 Testing</A></H2>
|
||||
Software testing shall be conducted according to the CUPS Software
|
||||
Test Plan, CUPS-STP-1.1. Failed tests cause STRs to be generated to
|
||||
correct the problems found.
|
||||
<H2><A NAME="5_4">5.4 Release</A></H2>
|
||||
<H2><A NAME="5_4">5.4 Release</A></H2>
|
||||
When testing has been completed successfully a new distribution image
|
||||
is created from the current CVS code "snapshot". No production release
|
||||
shall contain software that has not passed the appropriate software
|
||||
tests.
|
||||
<H1 TYPE="A" VALUE="1"><A NAME="6">A Glossary</A></H1>
|
||||
<H2><A NAME="6_1">A.1 Terms</A></H2>
|
||||
<H1 TYPE="A" VALUE="1"><A NAME="6">A Glossary</A></H1>
|
||||
<H2><A NAME="6_1">A.1 Terms</A></H2>
|
||||
<DL>
|
||||
<DT> C </DT>
|
||||
<DD> A computer language. </DD>
|
||||
<DT> parallel </DT>
|
||||
<DD> Sending or receiving data more than 1 bit at a time. </DD>
|
||||
<DT> pipe </DT>
|
||||
<DD> A one-way communications channel between two programs. </DD>
|
||||
<DT> serial </DT>
|
||||
<DD> Sending or receiving data 1 bit at a time. </DD>
|
||||
<DT> socket </DT>
|
||||
<DD> A two-way network communications channel. </DD>
|
||||
<DT>C </DT>
|
||||
<DD>A computer language. </DD>
|
||||
<DT>parallel </DT>
|
||||
<DD>Sending or receiving data more than 1 bit at a time. </DD>
|
||||
<DT>pipe </DT>
|
||||
<DD>A one-way communications channel between two programs. </DD>
|
||||
<DT>serial </DT>
|
||||
<DD>Sending or receiving data 1 bit at a time. </DD>
|
||||
<DT>socket </DT>
|
||||
<DD>A two-way network communications channel. </DD>
|
||||
</DL>
|
||||
<H2><A NAME="6_2">A.2 Acronyms</A></H2>
|
||||
<H2><A NAME="6_2">A.2 Acronyms</A></H2>
|
||||
<DL>
|
||||
<DT> ASCII </DT>
|
||||
<DD> American Standard Code for Information Interchange </DD>
|
||||
<DT> CUPS </DT>
|
||||
<DD> Common UNIX Printing System </DD>
|
||||
<DT> ESC/P </DT>
|
||||
<DD> EPSON Standard Code for Printers </DD>
|
||||
<DT> FTP </DT>
|
||||
<DD> File Transfer Protocol </DD>
|
||||
<DT> HP-GL </DT>
|
||||
<DD> Hewlett-Packard Graphics Language </DD>
|
||||
<DT> HP-PCL </DT>
|
||||
<DD> Hewlett-Packard 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>
|
||||
<DT>ASCII </DT>
|
||||
<DD>American Standard Code for Information Interchange </DD>
|
||||
<DT>CUPS </DT>
|
||||
<DD>Common UNIX Printing System </DD>
|
||||
<DT>ESC/P </DT>
|
||||
<DD>EPSON Standard Code for Printers </DD>
|
||||
<DT>FTP </DT>
|
||||
<DD>File Transfer Protocol </DD>
|
||||
<DT>HP-GL </DT>
|
||||
<DD>Hewlett-Packard Graphics Language </DD>
|
||||
<DT>HP-PCL </DT>
|
||||
<DD>Hewlett-Packard Page Control Language </DD>
|
||||
<DT>HP-PJL </DT>
|
||||
<DD>Hewlett-Packard Printer Job Language </DD>
|
||||
<DT>IETF </DT>
|
||||
<DD>Internet Engineering Task Force </DD>
|
||||
<DT>IPP </DT>
|
||||
<DD>Internet Printing Protocol </DD>
|
||||
<DT>ISO </DT>
|
||||
<DD>International Standards Organization </DD>
|
||||
<DT>LPD </DT>
|
||||
<DD>Line Printer Daemon </DD>
|
||||
<DT>MIME </DT>
|
||||
<DD>Multimedia Internet Mail Exchange </DD>
|
||||
<DT>PPD </DT>
|
||||
<DD>PostScript Printer Description </DD>
|
||||
<DT>SMB </DT>
|
||||
<DD>Server Message Block </DD>
|
||||
<DT>TFTP </DT>
|
||||
<DD>Trivial File Transfer Protocol </DD>
|
||||
</DL>
|
||||
<H1><A NAME="7">B Coding Requirements</A></H1>
|
||||
<H1><A NAME="7">B Coding Requirements</A></H1>
|
||||
These coding requirements provide detailed information on source file
|
||||
formatting and documentation content. These guidelines shall be applied
|
||||
to all C and C++ source files provided with CUPS.
|
||||
<H2><A NAME="7_1">B.1 Source Files</A></H2>
|
||||
<H3><A NAME="7_1_1">B.1.1 Naming</A></H3>
|
||||
<H2><A NAME="7_1">B.1 Source Files</A></H2>
|
||||
<H3><A NAME="7_1_1">B.1.1 Naming</A></H3>
|
||||
All source files names shall be 16 characters or less in length to
|
||||
ensure compatibility with older UNIX filesystems. Source files
|
||||
containing functions shall have an extension of ".c" for ANSI C and
|
||||
".cxx" for C++ source files. All other "include" files shall have an
|
||||
extension of ".h".
|
||||
<H3><A NAME="7_1_2">B.1.2 Documentation</A></H3>
|
||||
<H3><A NAME="7_1_2">B.1.2 Documentation</A></H3>
|
||||
The top of each source file shall contain a header giving the name of
|
||||
the file, the purpose or nature of the source file, the copyright and
|
||||
licensing notice, and the functions contained in the file. The file
|
||||
@@ -374,7 +372,7 @@ name and revision information is provided by the CVS "$Id$" tag:
|
||||
<UL>
|
||||
<PRE>
|
||||
/*
|
||||
* "36;Id$"
|
||||
* "$Id$"
|
||||
*
|
||||
* Description of file contents.
|
||||
*
|
||||
@@ -412,20 +410,20 @@ that code has been lost near the end of the file:
|
||||
<UL>
|
||||
<PRE>
|
||||
/*
|
||||
* End of "36;Id$".
|
||||
* End of "$Id$".
|
||||
*/
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_2">B.2 Functions</A></H2>
|
||||
<H3><A NAME="7_2_1">B.2.1 Naming</A></H3>
|
||||
<H2><A NAME="7_2">B.2 Functions</A></H2>
|
||||
<H3><A NAME="7_2_1">B.2.1 Naming</A></H3>
|
||||
Functions with a global scope shall be capitalized ("DoThis",
|
||||
"DoThat", "DoSomethingElse", etc.) The only exception to this rule
|
||||
shall be the CUPS interface library functions which may begin with a
|
||||
prefix word in lowercase ("cupsDoThis", "cupsDoThat", etc.)
|
||||
<P> Functions with a local scope shall be declared "static" and be
|
||||
<P>Functions with a local scope shall be declared "static" and be
|
||||
lowercase with underscores between words ("do_this", "do_that",
|
||||
"do_something_else", etc.) </P>
|
||||
<H3><A NAME="7_2_2">B.2.2 Documentation</A></H3>
|
||||
<H3><A NAME="7_2_2">B.2.2 Documentation</A></H3>
|
||||
Each function shall begin with a comment header describing what the
|
||||
function does, the possible input limits (if any), and the possible
|
||||
output values (if any), and any special information needed:
|
||||
@@ -445,11 +443,11 @@ do_this(float x) /* I - Power value (0.0 <= x <= 1.1) */
|
||||
}
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_3">B.3 Methods</A></H2>
|
||||
<H3><A NAME="7_3_1">B.3.1 Naming</A></H3>
|
||||
<H2><A NAME="7_3">B.3 Methods</A></H2>
|
||||
<H3><A NAME="7_3_1">B.3.1 Naming</A></H3>
|
||||
Methods shall be in lowercase with underscores between words
|
||||
("do_this", "do_that", "do_something_else", etc.)
|
||||
<H3><A NAME="7_3_2">B.3.2 Documentation</A></H3>
|
||||
<H3><A NAME="7_3_2">B.3.2 Documentation</A></H3>
|
||||
Each method shall begin with a comment header describing what the
|
||||
method does, the possible input limits (if any), and the possible
|
||||
output values (if any), and any special information needed:
|
||||
@@ -469,19 +467,19 @@ class::do_this(float x) /* I - Power value (0.0 <= x <= 1.0) */
|
||||
}
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_4">B.4 Variables</A></H2>
|
||||
<H3><A NAME="7_4_1">B.4.1 Naming</A></H3>
|
||||
<H2><A NAME="7_4">B.4 Variables</A></H2>
|
||||
<H3><A NAME="7_4_1">B.4.1 Naming</A></H3>
|
||||
Variables with a global scope shall be capitalized ("ThisVariable",
|
||||
"ThatVariable", "ThisStateVariable", etc.) The only exception to this
|
||||
rule shall be the CUPS interface library global variables which must
|
||||
begin with the prefix "cups" ("cupsThisVariable", "cupsThatVariable",
|
||||
etc.) Global variables shall be replaced by function arguments whenever
|
||||
possible.
|
||||
<P> Variables with a local scope shall be lowercase with underscores
|
||||
<P>Variables with a local scope shall be lowercase with underscores
|
||||
between words ("this_variable", "that_variable", etc.) Any local
|
||||
variables shared by functions within a source file shall be declared
|
||||
"static". </P>
|
||||
<H3><A NAME="7_4_2">B.4.2 Documentation</A></H3>
|
||||
<H3><A NAME="7_4_2">B.4.2 Documentation</A></H3>
|
||||
Each variable shall be declared on a separate line and shall be
|
||||
immediately followed by a comment block describing the variable:
|
||||
<UL>
|
||||
@@ -490,12 +488,12 @@ int this_variable; /* The current state of this */
|
||||
int that_variable; /* The current state of that */
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_5">B.5 Types</A></H2>
|
||||
<H3><A NAME="7_5_1">B.5.1 Naming</A></H3>
|
||||
<H2><A NAME="7_5">B.5 Types</A></H2>
|
||||
<H3><A NAME="7_5_1">B.5.1 Naming</A></H3>
|
||||
All type names shall be lowercase with underscores between words and
|
||||
"_t" appended to the end of the name ("this_type_t", "that_type_t",
|
||||
etc.)
|
||||
<H3><A NAME="7_5_2">B.5.2 Documentation</A></H3>
|
||||
<H3><A NAME="7_5_2">B.5.2 Documentation</A></H3>
|
||||
Each type shall have a comment block immediately before the typedef:
|
||||
<UL>
|
||||
<PRE>
|
||||
@@ -505,12 +503,12 @@ etc.)
|
||||
typedef int cups_this_type_t;
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_6">B.6 Structures</A></H2>
|
||||
<H3><A NAME="7_6_1">B.6.1 Naming</A></H3>
|
||||
<H2><A NAME="7_6">B.6 Structures</A></H2>
|
||||
<H3><A NAME="7_6_1">B.6.1 Naming</A></H3>
|
||||
All structure names shall be lowercase with underscores between words
|
||||
and "_str" appended to the end of the name ("this_struct_str",
|
||||
"that_struct_str", etc.)
|
||||
<H3><A NAME="7_6_2">B.6.2 Documentation</A></H3>
|
||||
<H3><A NAME="7_6_2">B.6.2 Documentation</A></H3>
|
||||
Each structure shall have a comment block immediately before the
|
||||
struct and each member shall be documented in accordance with the
|
||||
variable naming policy above:
|
||||
@@ -526,11 +524,11 @@ struct cups_this_struct_str
|
||||
};
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_7">B.7 Classes</A></H2>
|
||||
<H3><A NAME="7_7_1">B.7.1 Naming</A></H3>
|
||||
<H2><A NAME="7_7">B.7 Classes</A></H2>
|
||||
<H3><A NAME="7_7_1">B.7.1 Naming</A></H3>
|
||||
All class names shall be lowercase with underscores between words
|
||||
("this_class", "that_class", etc.)
|
||||
<H3><A NAME="7_7_2">B.7.2 Documentation</A></H3>
|
||||
<H3><A NAME="7_7_2">B.7.2 Documentation</A></H3>
|
||||
Each class shall have a comment block immediately before the class and
|
||||
each member shall be documented in accordance with the variable naming
|
||||
policy above:
|
||||
@@ -546,15 +544,15 @@ class cups_this_class
|
||||
};
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_8">B.8 Constants</A></H2>
|
||||
<H3><A NAME="7_8_1">B.8.1 Naming</A></H3>
|
||||
<H2><A NAME="7_8">B.8 Constants</A></H2>
|
||||
<H3><A NAME="7_8_1">B.8.1 Naming</A></H3>
|
||||
All constant names shall be uppercase with underscored between words
|
||||
("THIS_CONSTANT", "THAT_CONSTANT", etc.) Constants defined for the CUPS
|
||||
interface library must begin with an uppercase prefix
|
||||
("CUPS_THIS_CONSTANT", "CUPS_THAT_CONSTANT", etc.)
|
||||
<P> Typed enumerations shall be used whenever possible to allow for
|
||||
type checking by the compiler. </P>
|
||||
<H3><A NAME="7_8_2">B.8.2 Documentation</A></H3>
|
||||
<P>Typed enumerations shall be used whenever possible to allow for type
|
||||
checking by the compiler. </P>
|
||||
<H3><A NAME="7_8_2">B.8.2 Documentation</A></H3>
|
||||
Comment blocks shall immediately follow each constant:
|
||||
<UL>
|
||||
<PRE>
|
||||
@@ -565,8 +563,8 @@ enum
|
||||
};
|
||||
</PRE>
|
||||
</UL>
|
||||
<H2><A NAME="7_9">B.9 Code</A></H2>
|
||||
<H3><A NAME="7_9_1">B.9.1 Documentation</A></H3>
|
||||
<H2><A NAME="7_9">B.9 Code</A></H2>
|
||||
<H3><A NAME="7_9_1">B.9.1 Documentation</A></H3>
|
||||
All source code shall utilize block comments within functions to
|
||||
describe the operations being performed by a group of statements:
|
||||
<UL>
|
||||
@@ -593,8 +591,8 @@ do
|
||||
} while (i == (sizeof(array) / sizeof(array[0])));
|
||||
</PRE>
|
||||
</UL>
|
||||
<H3><A NAME="7_9_2">B.9.2 Style</A></H3>
|
||||
<H4 TYPE="a">B.9.2.a Indentation</H4>
|
||||
<H3><A NAME="7_9_2">B.9.2 Style</A></H3>
|
||||
<H4 TYPE="a">B.9.2.a Indentation</H4>
|
||||
All code blocks enclosed by brackets shall begin with the opening
|
||||
brace on a new line. The code then follows starting on a new line after
|
||||
the brace and is indented 2 spaces. The closing brace is then placed on
|
||||
@@ -634,11 +632,11 @@ switch (array[i])
|
||||
}
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>B.9.2.b Spacing</H4>
|
||||
<H4>B.9.2.b Spacing</H4>
|
||||
A space shall follow each reserved word ("if", "while", etc.) Spaces
|
||||
shall not be inserted between a function name and the arguments in
|
||||
parenthesis.
|
||||
<H4>B.9.2.c Return Values</H4>
|
||||
<H4>B.9.2.c Return Values</H4>
|
||||
Parenthesis shall surround values returned from a function using
|
||||
"return":
|
||||
<UL>
|
||||
@@ -646,7 +644,7 @@ parenthesis.
|
||||
return (STATE_IDLE);
|
||||
</PRE>
|
||||
</UL>
|
||||
<H4>B.9.2.d Loops</H4>
|
||||
<H4>B.9.2.d Loops</H4>
|
||||
Whenever convenient loops should count downward to zero to improve
|
||||
program performance:
|
||||
<UL>
|
||||
@@ -655,20 +653,20 @@ for (i = sizeof(array) / sizeof(array[0]) - 1; i >= 0; i --)
|
||||
array[i] = STATE_IDLE;
|
||||
</PRE>
|
||||
</UL>
|
||||
<H1 ALIGN="RIGHT"><A NAME="8">C Software Trouble Report Form</A></H1>
|
||||
<H1 ALIGN="RIGHT"><A NAME="8">C Software Trouble Report Form</A></H1>
|
||||
<CENTER>
|
||||
<TABLE WIDTH="80%">
|
||||
<TR><TH ALIGN="RIGHT"> Summary of Problem:</TH><TD ALIGN="LEFT">
|
||||
________________________________________</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT"> Problem Severity:</TH><TD ALIGN="LEFT"> __1=RFE
|
||||
<TR><TH ALIGN="RIGHT">Summary of Problem:</TH><TD ALIGN="LEFT">
|
||||
________________________________________</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT">Problem Severity:</TH><TD ALIGN="LEFT">__1=RFE
|
||||
<BR> __2=Documentation-Error
|
||||
<BR> __3=Unable-to-Print-a-File
|
||||
<BR> __4=Unable-to-Print-to-a-Printer
|
||||
<BR> __5=Unable-to-Print-at-All</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT"> Problem Scope:</TH><TD ALIGN="LEFT"> __1=Machine
|
||||
<TR><TH ALIGN="RIGHT">Problem Scope:</TH><TD ALIGN="LEFT">__1=Machine
|
||||
__2=Operating-System __3=All</TD></TR>
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP"> Detailed Description of Problem:</TH><TD
|
||||
ALIGN="LEFT"> ________________________________________
|
||||
<TR><TH ALIGN="RIGHT" VALIGN="TOP">Detailed Description of Problem:</TH><TD
|
||||
ALIGN="LEFT">________________________________________
|
||||
<BR> ________________________________________
|
||||
<BR> ________________________________________
|
||||
<BR> ________________________________________
|
||||
|
||||
+102
-99
@@ -1,6 +1,6 @@
|
||||
%PDF-1.2
|
||||
%âãÏÓ
|
||||
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000705214846Z)/Title( CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
|
||||
1 0 obj<</Producer(htmldoc 1.8.8 Copyright 1997-2000 Easy Software Products, All Rights Reserved.)/CreationDate(D:20000731155313Z)/Title( CUPS Configuration Management Plan)/Author(Easy Software Products)>>endobj
|
||||
2 0 obj<</Type/Encoding/Differences[ 32/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle/parenleft/parenright/asterisk/plus/comma/minus/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde 128/Euro 130/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE 145/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe 159/Ydieresis/space/exclamdown/cent/sterling/currency/yen/brokenbar/section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]>>endobj
|
||||
3 0 obj<</Type/Font/Subtype/Type1/BaseFont/Courier/Encoding 2 0 R>>endobj
|
||||
4 0 obj<</Type/Font/Subtype/Type1/BaseFont/Times-Roman/Encoding 2 0 R>>endobj
|
||||
@@ -306,9 +306,11 @@ endobj
|
||||
xÚ+ä2T0 | ||||