]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Load cups into easysw/current.
authorjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 20 Feb 2006 18:43:55 +0000 (18:43 +0000)
committerjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Mon, 20 Feb 2006 18:43:55 +0000 (18:43 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@60 a1ca3aef-8c08-0410-bb20-df032aa958be

283 files changed:
CHANGES.txt
CREDITS.txt
Makedefs.in
Makefile
backend/Makefile
backend/ipp.c
backend/parallel.c
backend/serial.c
backend/socket.c
backend/usb-unix.c
berkeley/Makefile
cgi-bin/Dependencies
cgi-bin/Makefile
cgi-bin/admin.c
cgi-bin/classes.c
cgi-bin/ipp-var.c
cgi-bin/jobs.c
cgi-bin/printers.c
cgi-bin/template.c
cgi-bin/testtemplate.c [new file with mode: 0644]
conf/Makefile
conf/cupsd.conf.in
config-scripts/cups-common.m4
config-scripts/cups-defaults.m4
config-scripts/cups-launchd.m4
config-scripts/cups-manpages.m4
config-scripts/cups-opsys.m4
config-scripts/cups-sharedlibs.m4
config.h.in
configure.in
cups-config.in
cups/Dependencies
cups/Makefile
cups/array.c
cups/attr.c
cups/backchannel.c
cups/cups.h
cups/dir.c
cups/emit.c
cups/encode.c
cups/getputfile.c
cups/http-addrlist.c
cups/http.c
cups/ipp-support.c
cups/ipp.h
cups/language.c
cups/language.h
cups/mark.c
cups/ppd.c
cups/ppd.h
cups/util.c
data/Makefile
data/mac-roman.txt [new file with mode: 0644]
doc/Makefile
doc/cups.css
doc/help/cupsd-conf-reference.html
doc/index.html.in
doc/ja/images/accept-jobs.gif [new file with mode: 0644]
doc/ja/images/add-class.gif [new file with mode: 0644]
doc/ja/images/add-printer.gif [new file with mode: 0644]
doc/ja/images/add-this-printer.gif [new file with mode: 0644]
doc/ja/images/cancel-all-jobs.gif [new file with mode: 0644]
doc/ja/images/cancel-job.gif [new file with mode: 0644]
doc/ja/images/cancel.gif [new file with mode: 0644]
doc/ja/images/change-settings.gif [new file with mode: 0644]
doc/ja/images/continue.gif [new file with mode: 0644]
doc/ja/images/delete-class.gif [new file with mode: 0644]
doc/ja/images/delete-printer.gif [new file with mode: 0644]
doc/ja/images/edit-configuration-file.gif [new file with mode: 0644]
doc/ja/images/export-samba.gif [new file with mode: 0644]
doc/ja/images/help.gif [new file with mode: 0644]
doc/ja/images/hold-job.gif [new file with mode: 0644]
doc/ja/images/manage-classes.gif [new file with mode: 0644]
doc/ja/images/manage-jobs.gif [new file with mode: 0644]
doc/ja/images/manage-printers.gif [new file with mode: 0644]
doc/ja/images/manage-server.gif [new file with mode: 0644]
doc/ja/images/modify-class.gif [new file with mode: 0644]
doc/ja/images/modify-printer.gif [new file with mode: 0644]
doc/ja/images/move-job.gif [new file with mode: 0644]
doc/ja/images/move-jobs.gif [new file with mode: 0644]
doc/ja/images/print-test-page.gif [new file with mode: 0644]
doc/ja/images/publish-printer.gif [new file with mode: 0644]
doc/ja/images/reject-jobs.gif [new file with mode: 0644]
doc/ja/images/release-job.gif [new file with mode: 0644]
doc/ja/images/restart-job.gif [new file with mode: 0644]
doc/ja/images/save-changes.gif [new file with mode: 0644]
doc/ja/images/search.gif [new file with mode: 0644]
doc/ja/images/set-allowed-users.gif [new file with mode: 0644]
doc/ja/images/set-as-default.gif [new file with mode: 0644]
doc/ja/images/set-printer-options.gif [new file with mode: 0644]
doc/ja/images/show-active.gif [new file with mode: 0644]
doc/ja/images/show-all-jobs.gif [new file with mode: 0644]
doc/ja/images/show-all.gif [new file with mode: 0644]
doc/ja/images/show-completed.gif [new file with mode: 0644]
doc/ja/images/show-next.gif [new file with mode: 0644]
doc/ja/images/show-previous.gif [new file with mode: 0644]
doc/ja/images/sort-ascending.gif [new file with mode: 0644]
doc/ja/images/sort-descending.gif [new file with mode: 0644]
doc/ja/images/start-class.gif [new file with mode: 0644]
doc/ja/images/start-printer.gif [new file with mode: 0644]
doc/ja/images/stop-class.gif [new file with mode: 0644]
doc/ja/images/stop-printer.gif [new file with mode: 0644]
doc/ja/images/unpublish-printer.gif [new file with mode: 0644]
doc/ja/images/use-default-config.gif [new file with mode: 0644]
doc/ja/images/view-access-log.gif [new file with mode: 0644]
doc/ja/images/view-error-log.gif [new file with mode: 0644]
doc/ja/images/view-page-log.gif [new file with mode: 0644]
doc/ja/index.html.in [new file with mode: 0644]
filter/Dependencies
filter/Makefile
filter/image-zoom.c
filter/imagetops.c
filter/imagetoraster.c
filter/pstops.c
fonts/Makefile
init/cups.sh.in
init/org.cups.cupsd.plist
locale/Makefile
locale/cups.pot
locale/cups_fr.po
locale/cups_ja.po
man/Makefile
man/accept.man
man/backend.man
man/cancel.man [new file with mode: 0644]
man/classes.conf.man
man/cups-config.man
man/cups-deviced.man.in [new file with mode: 0644]
man/cups-driverd.man.in [new file with mode: 0644]
man/cups-lpd.man.in [moved from man/cups-lpd.man with 57% similarity]
man/cups-polld.man
man/cupsaddsmb.man.in [moved from man/cupsaddsmb.man with 66% similarity]
man/cupsd.conf.man.in [moved from man/cupsd.conf.man with 60% similarity]
man/cupsd.man.in [moved from man/cupsd.man with 51% similarity]
man/cupsenable.man
man/cupstestppd.man
man/filter.man
man/lp.man
man/lpadmin.man
man/lpc.man
man/lpinfo.man
man/lpmove.man
man/lpoptions.man
man/lppasswd.man
man/lpq.man
man/lpr.man
man/lprm.man
man/lpstat.man
man/mantohtml.c
man/mime.convs.man
man/mime.types.man
man/printers.conf.man
monitor/Dependencies [new file with mode: 0644]
monitor/Makefile [new file with mode: 0644]
monitor/bcp.c [new file with mode: 0644]
monitor/tbcp.c [new file with mode: 0644]
notifier/Dependencies
notifier/Makefile
packaging/cups-dbus.conf [new file with mode: 0644]
packaging/cups.list.in
packaging/cups.spec.in
pdftops/Dependencies
pdftops/JBIG2Stream.cxx
pdftops/JPXStream.cxx
pdftops/Makefile
pdftops/SplashXPathScanner.cxx
pdftops/Stream.cxx
pdftops/Stream.h
pdftops/UnicodeTypeTable.cxx
pdftops/gmem.c
ppd/Makefile
ppd/dymo.ppd
ppd/zebra.ppd
ppd/zebracpl.ppd
ppd/zebraep1.ppd
ppd/zebraep2.ppd
scheduler/Dependencies
scheduler/Makefile
scheduler/auth.c
scheduler/auth.h
scheduler/banners.c
scheduler/banners.h
scheduler/cert.c
scheduler/classes.c
scheduler/client.c
scheduler/client.h
scheduler/conf.c
scheduler/conf.h
scheduler/cups-deviced.c
scheduler/cups-driverd.c
scheduler/cups-lpd.c
scheduler/dirsvc.c
scheduler/env.c
scheduler/filter.c
scheduler/ipp.c
scheduler/job.c
scheduler/job.h
scheduler/listen.c
scheduler/main.c
scheduler/mime.h
scheduler/network.c
scheduler/policy.c
scheduler/printers.c
scheduler/printers.h
scheduler/process.c
scheduler/server.c
scheduler/statbuf.c
scheduler/subscriptions.c
scheduler/sysman.c
scheduler/testmime.c
systemv/Dependencies
systemv/Makefile
systemv/accept.c
systemv/cancel.c
templates/Makefile
templates/classes.tmpl
templates/edit-config.tmpl.in
templates/header.tmpl.in
templates/ja/add-class.tmpl [new file with mode: 0644]
templates/ja/add-printer.tmpl [new file with mode: 0644]
templates/ja/admin.tmpl [new file with mode: 0644]
templates/ja/choose-device.tmpl [new file with mode: 0644]
templates/ja/choose-make.tmpl [new file with mode: 0644]
templates/ja/choose-model.tmpl [new file with mode: 0644]
templates/ja/choose-serial.tmpl [new file with mode: 0644]
templates/ja/choose-uri.tmpl [new file with mode: 0644]
templates/ja/class-added.tmpl [new file with mode: 0644]
templates/ja/class-confirm.tmpl [new file with mode: 0644]
templates/ja/class-deleted.tmpl [new file with mode: 0644]
templates/ja/class-jobs-header.tmpl [new file with mode: 0644]
templates/ja/class-modified.tmpl [new file with mode: 0644]
templates/ja/classes-header.tmpl [new file with mode: 0644]
templates/ja/classes.tmpl [new file with mode: 0644]
templates/ja/error-op.tmpl [new file with mode: 0644]
templates/ja/error.tmpl [new file with mode: 0644]
templates/ja/header.tmpl.in [new file with mode: 0644]
templates/ja/help-header.tmpl [new file with mode: 0644]
templates/ja/job-cancel.tmpl [new file with mode: 0644]
templates/ja/job-hold.tmpl [new file with mode: 0644]
templates/ja/job-move.tmpl [new file with mode: 0644]
templates/ja/job-moved.tmpl [new file with mode: 0644]
templates/ja/job-release.tmpl [new file with mode: 0644]
templates/ja/job-restart.tmpl [new file with mode: 0644]
templates/ja/jobs-header.tmpl [new file with mode: 0644]
templates/ja/jobs.tmpl [new file with mode: 0644]
templates/ja/modify-class.tmpl [new file with mode: 0644]
templates/ja/modify-printer.tmpl [new file with mode: 0644]
templates/ja/option-conflict.tmpl [new file with mode: 0644]
templates/ja/option-trailer.tmpl [new file with mode: 0644]
templates/ja/pager.tmpl [new file with mode: 0644]
templates/ja/printer-accept.tmpl [new file with mode: 0644]
templates/ja/printer-added.tmpl [new file with mode: 0644]
templates/ja/printer-configured.tmpl [new file with mode: 0644]
templates/ja/printer-confirm.tmpl [new file with mode: 0644]
templates/ja/printer-default.tmpl [new file with mode: 0644]
templates/ja/printer-deleted.tmpl [new file with mode: 0644]
templates/ja/printer-jobs-header.tmpl [new file with mode: 0644]
templates/ja/printer-modified.tmpl [new file with mode: 0644]
templates/ja/printer-purge.tmpl [new file with mode: 0644]
templates/ja/printer-reject.tmpl [new file with mode: 0644]
templates/ja/printer-start.tmpl [new file with mode: 0644]
templates/ja/printer-stop.tmpl [new file with mode: 0644]
templates/ja/printers-header.tmpl [new file with mode: 0644]
templates/ja/printers.tmpl [new file with mode: 0644]
templates/ja/restart.tmpl [new file with mode: 0644]
templates/ja/samba-export.tmpl [new file with mode: 0644]
templates/ja/samba-exported.tmpl [new file with mode: 0644]
templates/ja/search.tmpl [new file with mode: 0644]
templates/ja/test-page.tmpl [new file with mode: 0644]
templates/ja/users.tmpl [new file with mode: 0644]
templates/jobs.tmpl
templates/pager.tmpl
templates/printers.tmpl
test/4.2-cups-printer-ops.test
test/5.8-cancel.sh
test/Dependencies
test/get-printers.test [new file with mode: 0644]
test/ipptest.c
test/run-stp-tests.sh
test/str-header.html
test/str-trailer.html
tools/checkglobals [new file with mode: 0755]
tools/makesrcdist

index e820b917e47117d59a920c806cb754f9905f1660..fc1ac357e290eb78eb549cfb7079d87e56d27b1b 100644 (file)
@@ -1,8 +1,13 @@
-CHANGES.txt - 01/29/2006
+CHANGES.txt - 02/17/2006
 ------------------------
 
 CHANGES IN CUPS V1.2.0b1
 
+       - The scheduler now creates a job-uuid attribute that
+         uniquely identifies a job on a network (STR #1410)
+       - The init script now unsets the TMPDIR environment
+         variable to prevent user temporary directories from
+         being used by cupsd accidentally (STR #1424)
        - Added support for launchd on MacOS X.
        - Added support for notify_post on MacOS X.
        - Added support for DBUS on Linux.
index 522774972d2fc564abbc2b751156d1ddaadd8196..585072bb32cd8003dbcca034bc5a0626ee03f80d 100644 (file)
@@ -1,4 +1,4 @@
-CREDITS.txt - 04/26/2003
+CREDITS.txt - 02/17/2006
 ------------------------
 
 Few projects are completed by one person, and CUPS is no exception.  We'd
@@ -15,6 +15,7 @@ like to thank the following individuals for their contributions:
     Wang Jian           - CUPS RPM corrections.
     Roderick Johnstone  - Beta tester of the millenium.
     Till Kamppeter      - Bug fixes, beta testing, evangelism.
+    Kenshi Muto         - Japanese localization, patches, and testing.
     Kiko                - Bug fixes.
     Sergey V. Kovalyov  - ESP Print Pro and CUPS beta tester.
     Mark Lawrence       - Microsoft interoperability testing.
@@ -28,6 +29,8 @@ like to thank the following individuals for their contributions:
     Petter Reinholdtsen - HP-UX compiler stuff.
     Stuart Stevens      - HP JetDirect IPP information.
     Andrea Suatoni      - IRIX desktop integration and testing.
+    Tomohiro Kato       - Japanese localization.
+    Tim Waugh           - Lots of patches, testing, and Linux integration.
 
 If I've missed someone, please let me know by sending an email to
 "mike@easysw.com".
index c3cdf4bb72745a0494395e922d8eff6673813a29..06a2ceb9b188cd0ebed2a52d923ef1dcacde0250 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makedefs.in 5044 2006-02-01 21:35:30Z mike $"
+# "$Id: Makedefs.in 5136 2006-02-19 18:46:46Z mike $"
 #
 #   Common makefile definitions for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2006 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
@@ -33,6 +33,7 @@ CXX           =       @LIBTOOL@ @CXX@
 DSO            =       @DSO@
 HTMLDOC                =       @HTMLDOC@
 INSTALL                =       @INSTALL@
+LD             =       @LD@
 LIBTOOL                =       @LIBTOOL@
 LN             =       @LN@ -sf
 MV             =       @MV@
@@ -61,6 +62,7 @@ INSTALL_SCRIPT        =       $(INSTALL) -m 755
 CUPS_USER      =       @CUPS_USER@
 CUPS_GROUP     =       @CUPS_GROUP@
 CUPS_SYSTEM_GROUPS =   @CUPS_SYSTEM_GROUPS@
+CUPS_PRIMARY_SYSTEM_GROUP =    @CUPS_PRIMARY_SYSTEM_GROUP@
 
 #
 # Default permissions...
@@ -172,6 +174,7 @@ STATEDIR    =       $(BUILDROOT)@CUPS_STATEDIR@
 
 MAN1EXT                =       @MAN1EXT@
 MAN5EXT                =       @MAN5EXT@
+MAN7EXT                =       @MAN7EXT@
 MAN8EXT                =       @MAN8EXT@
 MAN8DIR                =       @MAN8DIR@
 
@@ -179,6 +182,7 @@ PAMDIR              =       $(BUILDROOT)@PAMDIR@
 PAMFILE                =       @PAMFILE@
 
 DEFAULT_LAUNCHD_CONF   =       @DEFAULT_LAUNCHD_CONF@
+DBUSDIR                =       @DBUSDIR@
 
 
 #
@@ -186,7 +190,7 @@ DEFAULT_LAUNCHD_CONF        =       @DEFAULT_LAUNCHD_CONF@
 #
 
 .SILENT:
-.SUFFIXES:     .1 .1.gz .1m .1m.gz .5 .5.gz .8 .8.gz .a .c .cxx .h .man .o .gz
+.SUFFIXES:     .1 .1.gz .1m .1m.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .gz
 
 .c.o:
        echo Compiling $<...
@@ -196,17 +200,17 @@ DEFAULT_LAUNCHD_CONF      =       @DEFAULT_LAUNCHD_CONF@
        echo Compiling $<...
        $(CXX) $(OPTIM) $(CXXFLAGS) -c $<
 
-.man.1 .man.1m .man.5 .man.8:
+.man.1 .man.1m .man.5 .man.7 .man.8:
        echo Linking $<...
        $(RM) $@
        $(LN) $< $@
 
-.man.1.gz .man.1m.gz .man.5.gz .man.8.gz .man.gz:
+.man.1.gz .man.1m.gz .man.5.gz .man.7.gz .man.8.gz .man.gz:
        echo -n Compressing $<...
        $(RM) $@
        gzip -v9 <$< >$@
 
 
 #
-# End of "$Id: Makedefs.in 5044 2006-02-01 21:35:30Z mike $"
+# End of "$Id: Makedefs.in 5136 2006-02-19 18:46:46Z mike $"
 #
index eb98a5dc695de4bab81032b8c84fc990679b698c..428bf20fe92548d2fd5c3a2c0afebe0c0c851cc9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5045 2006-02-01 21:48:01Z mike $"
+# "$Id: Makefile 5136 2006-02-19 18:46:46Z mike $"
 #
 #   Top-level Makefile for the Common UNIX Printing System (CUPS).
 #
@@ -28,8 +28,9 @@ include Makedefs
 # Directories to make...
 #
 
-DIRS   =       cups backend berkeley cgi-bin filter locale man pdftops \
-               notifier scheduler systemv test
+DIRS   =       cups backend berkeley cgi-bin filter locale man monitor \
+               notifier pdftops scheduler systemv test
+
 
 #
 # Make all targets...
@@ -42,6 +43,7 @@ all:
                (cd $$dir ; $(MAKE) $(MFLAGS)) || exit 1;\
        done
 
+
 #
 # Remove object and target files...
 #
@@ -52,6 +54,7 @@ clean:
                (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\
        done
 
+
 #
 # Make dependencies
 #
@@ -113,6 +116,10 @@ install:   installhdrs
                        $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
                fi \
        fi
+       if test "x$(DBUSDIR)" != "x"; then \
+               $(INSTALL_DIR) $(BUILDROOT)$(DBUSDIR); \
+               $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \
+       fi
 
 
 #
@@ -120,7 +127,7 @@ install:    installhdrs
 #
 
 installsrc:
-       gnutar --dereference --exclude=CVS -cf - . | gnutar -C $(SRCROOT) -xf -
+       gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf -
 
 installhdrs:
        (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\
@@ -166,6 +173,7 @@ pkg:
 tardist:
        epm $(EPMFLAGS) -f tardist cups packaging/cups.list
 
+
 #
-# End of "$Id: Makefile 5045 2006-02-01 21:48:01Z mike $".
+# End of "$Id: Makefile 5136 2006-02-19 18:46:46Z mike $".
 #
index 8ec13cf7c304719f897f37fe7a6da0afb8741d72..bebaa471dd534b8b9a13ab63a3fedeb3a0ac9131 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5047 2006-02-02 05:14:15Z mike $"
+# "$Id: Makefile 5131 2006-02-18 05:31:36Z mike $"
 #
 #   Backend makefile for the Common UNIX Printing System (CUPS).
 #
@@ -26,8 +26,8 @@
 
 include ../Makedefs
 
-RBACKENDS =    lpd
-UBACKENDS =    ipp parallel scsi serial socket usb
+RBACKENDS =    ipp lpd
+UBACKENDS =    parallel scsi serial socket usb
 TARGETS        =       betest test1284 $(RBACKENDS) $(UBACKENDS)
 OBJS   =       betest.o ipp.o lpd.o parallel.o scsi.o \
                serial.o socket.o test1284.o usb.o
@@ -61,7 +61,7 @@ depend:
 #
 
 install:       all
-       $(INSTALL_DIR) $(SERVERBIN)/backend
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
        for file in $(RBACKENDS); do \
                $(LIBTOOL) $(INSTALL) -m 700 $$file $(SERVERBIN)/backend; \
        done
@@ -179,5 +179,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5047 2006-02-02 05:14:15Z mike $".
+# End of "$Id: Makefile 5131 2006-02-18 05:31:36Z mike $".
 #
index 9db806cb6882d9b56bf8619c4b3a8ee222e2f5e7..9feb672b094950f94047b73ce479b79960352d74 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: ipp.c 5133 2006-02-19 15:01:12Z mike $"
  *
  *   IPP backend for the Common UNIX Printing System (CUPS).
  *
@@ -62,20 +62,23 @@ static char *password = NULL;       /* Password for device URI */
 static char    pstmpname[1024] = "";   /* Temporary PostScript file name */
 #endif /* __APPLE__ */
 static char    tmpfilename[1024] = ""; /* Temporary spool file name */
+static int     job_cancelled = 0;      /* Job cancelled? */
 
 
 /*
  * Local functions...
  */
 
-void           check_printer_state(http_t *http, const char *uri,
+static void    cancel_job(http_t *http, const char *uri, int id,
+                          const char *resource, const char *user, int version);
+static void    check_printer_state(http_t *http, const char *uri,
                                    const char *resource, const char *user,
                                    int version);
-const char     *password_cb(const char *);
-int            report_printer_state(ipp_t *ipp);
+static const char *password_cb(const char *);
+static int     report_printer_state(ipp_t *ipp);
 
 #ifdef __APPLE__
-int            run_pictwps_filter(char **argv, const char *filename);
+static int     run_pictwps_filter(char **argv, const char *filename);
 #endif /* __APPLE__ */
 static void    sigterm_handler(int sig);
 
@@ -89,7 +92,7 @@ static void   sigterm_handler(int sig);
  */
 
 int                                    /* O - Exit status */
-main(int  argc,                                /* I - Number of command-line arguments (6 or 7) */
+main(int  argc,                                /* I - Number of command-line args */
      char *argv[])                     /* I - Command-line arguments */
 {
   int          i;                      /* Looping var */
@@ -103,7 +106,9 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
                name[255],              /* Name of option */
                value[255],             /* Value of option */
                *ptr;                   /* Pointer into name or value */
-  char         *filename;              /* File to print */
+  int          num_files;              /* Number of files to print */
+  char         **files,                /* Files to print */
+               *filename;              /* Pointer to single filename */
   int          port;                   /* Port number (not used) */
   char         uri[HTTP_MAX_URI];      /* Updated URI without user/pass */
   ipp_status_t ipp_status;             /* Status of IPP request */
@@ -115,19 +120,19 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
                waitprinter;            /* Wait for printer ready? */
   ipp_attribute_t *job_id_attr;                /* job-id attribute */
   int          job_id;                 /* job-id value */
-  ipp_attribute_t *job_sheets;         /* job-media-sheets-completed attribute */
-  ipp_attribute_t *job_state;          /* job-state attribute */
-  ipp_attribute_t *copies_sup;         /* copies-supported attribute */
-  ipp_attribute_t *format_sup;         /* document-format-supported attribute */
+  ipp_attribute_t *job_sheets;         /* job-media-sheets-completed */
+  ipp_attribute_t *job_state;          /* job-state */
+  ipp_attribute_t *copies_sup;         /* copies-supported */
+  ipp_attribute_t *format_sup;         /* document-format-supported */
   ipp_attribute_t *printer_state;      /* printer-state attribute */
-  ipp_attribute_t *printer_accepting;  /* printer-is-accepting-jobs attribute */
+  ipp_attribute_t *printer_accepting;  /* printer-is-accepting-jobs */
   int          copies;                 /* Number of copies remaining */
   const char   *content_type;          /* CONTENT_TYPE environment variable */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Actions for POSIX signals */
 #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
   int          version;                /* IPP version */
-  int          reasons;                /* Number of printer-state-reasons shown */
+  int          reasons;                /* Number of printer-state-reasons */
   static const char * const pattrs[] =
                {                       /* Printer attributes we want */
                  "copies-supported",
@@ -183,26 +188,23 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
     else
       s = argv[0];
 
-    printf("network %s \"Unknown\" \"Internet Printing Protocol (%s)\"\n", s, s);
+    printf("network %s \"Unknown\" \"Internet Printing Protocol (%s)\"\n",
+           s, s);
     return (CUPS_BACKEND_OK);
   }
-  else if (argc < 6 || argc > 7)
+  else if (argc < 6)
   {
-    fprintf(stderr, "Usage: %s job-id user title copies options [file]\n",
+    fprintf(stderr,
+            "Usage: %s job-id user title copies options [file ... fileN]\n",
             argv[0]);
     return (CUPS_BACKEND_STOP);
   }
 
  /*
-  * Get the content type...
+  * Get the (final) content type...
   */
 
-  if (argc > 6)
-    content_type = getenv("CONTENT_TYPE");
-  else
-    content_type = "application/vnd.cups-raw";
-
-  if (content_type == NULL)
+  if ((content_type = getenv("FINAL_CONTENT_TYPE")) == NULL)
     content_type = "application/octet-stream";
 
  /*
@@ -255,10 +257,26 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
       }
 
     close(fd);
-    filename = tmpfilename;
+
+   /*
+    * Point to the single file from stdin...
+    */
+
+    filename  = tmpfilename;
+    files     = &filename;
+    num_files = 1;
   }
   else
-    filename = argv[6];
+  {
+   /*
+    * Point to the files on the command-line...
+    */
+
+    num_files = argc - 6;
+    files     = argv + 6;
+  }
+
+  fprintf(stderr, "DEBUG: %d files to send in job...\n", num_files);
 
  /*
   * See if there are any options...
@@ -474,7 +492,9 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
        * available printer in the class.
        */
 
-        fprintf(stderr, "INFO: Unable to connect to %s, queuing on next printer in class...\n",
+        fprintf(stderr,
+               "INFO: Unable to connect to %s, queuing on next printer in "
+               "class...\n",
                hostname);
 
         if (argc == 6 || strcmp(filename, argv[6]))
@@ -492,7 +512,9 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       if (errno == ECONNREFUSED || errno == EHOSTDOWN ||
           errno == EHOSTUNREACH)
       {
-       fprintf(stderr, "INFO: Network host \'%s\' is busy; will retry in 30 seconds...\n",
+       fprintf(stderr,
+               "INFO: Network host \'%s\' is busy; will retry in 30 "
+               "seconds...\n",
                 hostname);
        sleep(30);
       }
@@ -574,7 +596,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
        * Switch to IPP/1.0...
        */
 
-       fputs("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n", stderr);
+       fputs("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n",
+             stderr);
        version = 0;
        httpReconnect(http);
       }
@@ -640,7 +663,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
                                         IPP_TAG_BOOLEAN);
 
     if (printer_state == NULL ||
-       (printer_state->values[0].integer > IPP_PRINTER_PROCESSING && waitprinter) ||
+       (printer_state->values[0].integer > IPP_PRINTER_PROCESSING &&
+        waitprinter) ||
        printer_accepting == NULL ||
        !printer_accepting->values[0].boolean)
     {
@@ -651,7 +675,9 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       * available printer in the class.
       */
 
-      fprintf(stderr, "INFO: Unable to queue job on %s, queuing on next printer in class...\n",
+      fprintf(stderr,
+              "INFO: Unable to queue job on %s, queuing on next printer in "
+             "class...\n",
              hostname);
 
       ippDelete(supported);
@@ -684,6 +710,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   */
 
   reasons = 0;
+  job_id  = 0;
 
   while (copies > 0)
   {
@@ -691,7 +718,14 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
     * Build the IPP request...
     */
 
-    request = ippNewRequest(IPP_PRINT_JOB);
+    if (job_cancelled)
+      break;
+
+    if (num_files > 1)
+      request = ippNewRequest(IPP_CREATE_JOB);
+    else
+      request = ippNewRequest(IPP_PRINT_JOB);
+
     request->request.op.version[1] = version;
 
     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
@@ -719,12 +753,13 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
     num_options = cupsParseOptions(argv[5], 0, &options);
 
 #ifdef __APPLE__
-    if (content_type != NULL && strcasecmp(content_type, "application/pictwps") == 0)
+    if (content_type != NULL &&
+        !strcasecmp(content_type, "application/pictwps") && num_files == 1)
     {
       if (format_sup != NULL)
       {
        for (i = 0; i < format_sup->num_values; i ++)
-         if (strcasecmp(content_type, format_sup->values[i].string.text) == 0)
+         if (!strcasecmp(content_type, format_sup->values[i].string.text))
            break;
       }
 
@@ -741,10 +776,12 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
         filename = pstmpname;
 
        /*
-       * Change the MIME type to application/postscript...
+       * Change the MIME type to application/postscript and change the
+       * number of copies to 1...
        */
 
        content_type = "application/postscript";
+       copies       = 1;
       }
     }
 #endif /* __APPLE__ */
@@ -752,7 +789,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
     if (content_type != NULL && format_sup != NULL)
     {
       for (i = 0; i < format_sup->num_values; i ++)
-        if (strcasecmp(content_type, format_sup->values[i].string.text) == 0)
+        if (!strcasecmp(content_type, format_sup->values[i].string.text))
           break;
 
       if (i < format_sup->num_values)
@@ -792,15 +829,20 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
     * Do the request...
     */
 
-    if ((response = cupsDoFileRequest(http, request, resource, filename)) == NULL)
-      ipp_status = cupsLastError();
+    if (num_files > 1)
+      response = cupsDoRequest(http, request, resource);
     else
-      ipp_status = response->request.status.status_code;
+      response = cupsDoFileRequest(http, request, resource, files[0]);
+
+    ipp_status = cupsLastError();
 
     if (ipp_status > IPP_OK_CONFLICT)
     {
       job_id = 0;
 
+      if (job_cancelled)
+        break;
+
       if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
          ipp_status == IPP_PRINTER_BUSY)
       {
@@ -809,7 +851,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       }
       else
         fprintf(stderr, "ERROR: Print file was not accepted (%s)!\n",
-               ippErrorString(ipp_status));
+               cupsLastErrorString());
     }
     else if ((job_id_attr = ippFindAttribute(response, "job-id",
                                              IPP_TAG_INTEGER)) == NULL)
@@ -823,8 +865,47 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
       fprintf(stderr, "NOTICE: Print file accepted - job ID %d.\n", job_id);
     }
 
-    if (response)
-      ippDelete(response);
+    ippDelete(response);
+
+    if (job_cancelled)
+      break;
+
+    if (job_id && num_files > 1)
+    {
+      for (i = 0; i < num_files; i ++)
+      {
+       request = ippNewRequest(IPP_SEND_DOCUMENT);
+
+       request->request.op.version[1] = version;
+
+       ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+                    NULL, uri);
+
+        ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id",
+                     job_id);
+
+       if (argv[2][0])
+         ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                       "requesting-user-name", NULL, argv[2]);
+
+        if ((i + 1) == num_files)
+         ippAddBoolean(request, IPP_TAG_OPERATION, "last-document", 1);
+
+        ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
+                    "document-format", NULL, content_type);
+
+        ippDelete(cupsDoFileRequest(http, request, resource, files[i]));
+
+       if (cupsLastError() > IPP_OK_CONFLICT)
+       {
+         ipp_status = cupsLastError();
+
+         fprintf(stderr, "ERROR: Unable to add file %d to job: %s\n",
+                 job_id, cupsLastErrorString());
+         break;
+       }
+      }
+    }
 
     if (ipp_status <= IPP_OK_CONFLICT && argc > 6)
     {
@@ -846,7 +927,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
     fputs("INFO: Waiting for job to complete...\n", stderr);
 
-    for (;;)
+    for (; !job_cancelled;)
     {
      /*
       * Build an IPP_GET_JOB_ATTRIBUTES request...
@@ -876,10 +957,8 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
       if (!copies_sup)
        httpReconnect(http);
 
-      if ((response = cupsDoRequest(http, request, resource)) == NULL)
-       ipp_status = cupsLastError();
-      else
-       ipp_status = response->request.status.status_code;
+      response   = cupsDoRequest(http, request, resource);
+      ipp_status = cupsLastError();
 
       if (ipp_status == IPP_NOT_FOUND)
       {
@@ -898,8 +977,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
        if (ipp_status != IPP_SERVICE_UNAVAILABLE &&
            ipp_status != IPP_PRINTER_BUSY)
        {
-         if (response)
-           ippDelete(response);
+         ippDelete(response);
 
           fprintf(stderr, "ERROR: Unable to get job %d attributes (%s)!\n",
                  job_id, ippErrorString(ipp_status));
@@ -907,7 +985,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
        }
       }
 
-      if (response != NULL)
+      if (response)
       {
        if ((job_state = ippFindAttribute(response, "job-state",
                                          IPP_TAG_ENUM)) != NULL)
@@ -922,7 +1000,8 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
            if ((job_sheets = ippFindAttribute(response, 
                                               "job-media-sheets-completed",
                                               IPP_TAG_INTEGER)) != NULL)
-             fprintf(stderr, "PAGE: total %d\n", job_sheets->values[0].integer);
+             fprintf(stderr, "PAGE: total %d\n",
+                     job_sheets->values[0].integer);
 
            ippDelete(response);
            break;
@@ -930,8 +1009,7 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
        }
       }
 
-      if (response)
-       ippDelete(response);
+      ippDelete(response);
 
      /*
       * Check the printer state and report it if necessary...
@@ -948,11 +1026,15 @@ main(int  argc,                          /* I - Number of command-line arguments (6 or 7) */
   }
 
  /*
-  * Check the printer state and report it if necessary...
+  * Cancel the job as needed...
   */
 
-/*      if (!copies_sup)
-       httpReconnect(http);*/
+  if (job_cancelled && job_id)
+    cancel_job(http, uri, job_id, resource, argv[2], version);
+
+ /*
+  * Check the printer state and report it if necessary...
+  */
 
   check_printer_state(http, uri, resource, argv[2], version);
 
@@ -962,8 +1044,7 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
 
   httpClose(http);
 
-  if (supported)
-    ippDelete(supported);
+  ippDelete(supported);
 
  /*
   * Remove the temporary file(s) if necessary...
@@ -985,11 +1066,51 @@ main(int  argc,                          /* I - Number of command-line arguments (6 or 7) */
 }
 
 
+/*
+ * 'cancel_job()' - Cancel a print job.
+ */
+
+static void
+cancel_job(http_t     *http,           /* I - HTTP connection */
+           const char *uri,            /* I - printer-uri */
+          int        id,               /* I - job-id */
+          const char *resource,        /* I - Resource path */
+          const char *user,            /* I - requesting-user-name */
+          int        version)          /* I - IPP version */
+{
+  ipp_t        *request;                       /* Cancel-Job request */
+
+
+  fputs("INFO: Cancelling print job...\n", stderr);
+
+  request = ippNewRequest(IPP_CANCEL_JOB);
+  request->request.op.version[1] = version;
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+               NULL, uri);
+  ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", id);
+
+  if (user && user[0])
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                 "requesting-user-name", NULL, user);
+
+ /*
+  * Do the request...
+  */
+
+  ippDelete(cupsDoRequest(http, request, resource));
+
+  if (cupsLastError() > IPP_OK_CONFLICT)
+    fprintf(stderr, "ERROR: Unable to cancel job %d: %s\n", id,
+            cupsLastErrorString());
+}
+
+
 /*
  * 'check_printer_state()' - Check the printer state...
  */
 
-void
+static void
 check_printer_state(
     http_t      *http,                 /* I - HTTP connection */
     const char  *uri,                  /* I - Printer URI */
@@ -1034,7 +1155,7 @@ check_printer_state(
  * 'password_cb()' - Disable the password prompt for cupsDoFileRequest().
  */
 
-const char *                           /* O - Password  */
+static const char *                    /* O - Password  */
 password_cb(const char *prompt)                /* I - Prompt (not used) */
 {
   (void)prompt;
@@ -1065,7 +1186,7 @@ password_cb(const char *prompt)           /* I - Prompt (not used) */
  * 'report_printer_state()' - Report the printer state.
  */
 
-int                                    /* O - Number of reasons shown */
+static int                             /* O - Number of reasons shown */
 report_printer_state(ipp_t *ipp)       /* I - IPP response */
 {
   int                  i;              /* Looping var */
@@ -1183,7 +1304,7 @@ report_printer_state(ipp_t *ipp)  /* I - IPP response */
  * PostScript file for printing...
  */
 
-int                                    /* O - Exit status of filter */
+static int                             /* O - Exit status of filter */
 run_pictwps_filter(char       **argv,  /* I - Command-line arguments */
                    const char *filename)/* I - Filename */
 {
@@ -1351,8 +1472,19 @@ sigterm_handler(int sig)         /* I - Signal */
 {
   (void)sig;   /* remove compiler warnings... */
 
+  if (!job_cancelled)
+  {
+   /*
+    * Flag that the job should be cancelled...
+    */
+
+    job_cancelled = 1;
+    return;
+  }
+
  /*
-  * Remove the temporary file(s) if necessary...
+  * The scheduler already tried to cancel us once, now just terminate
+  * after removing our temp files!
   */
 
   if (tmpfilename[0])
@@ -1368,5 +1500,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: ipp.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: ipp.c 5133 2006-02-19 15:01:12Z mike $".
  */
index d1a85a0bb43c885225996e2a94db150a27717499..1f559ffaf958d7052a347fa88f2eab7a683b3235 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: parallel.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: parallel.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   Parallel port backend for the Common UNIX Printing System (CUPS).
  *
@@ -361,7 +361,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
          {
            fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
                    rbytes);
-            cupsBackchannelWrite(resource, rbytes, 1.0);
+            cupsBackChannelWrite(resource, rbytes, 1.0);
           }
        }
 
@@ -728,5 +728,5 @@ list_devices(void)
 
 
 /*
- * End of "$Id: parallel.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: parallel.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 32aa2f4b8d724604423fe68e6034c4852ecee66e..66a0354cf2b8bb5867e6a3dc33ca6f8b7a25a98f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: serial.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: serial.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   Serial port backend for the Common UNIX Printing System (CUPS).
  *
@@ -585,7 +585,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
          {
            fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
                    rbytes);
-            cupsBackchannelWrite(resource, rbytes, 1.0);
+            cupsBackChannelWrite(resource, rbytes, 1.0);
           }
        }
 
@@ -1111,5 +1111,5 @@ list_devices(void)
 
 
 /*
- * End of "$Id: serial.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: serial.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 713b21337c58ea2bd21293408284171dea398ae0..ab541be6000082f91f6a628a3d29d2ff2f9f3407 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: socket.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: socket.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   AppSocket backend for the Common UNIX Printing System (CUPS).
  *
@@ -375,7 +375,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
          {
            fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
                    rbytes);
-            cupsBackchannelWrite(resource, rbytes, 1.0);
+            cupsBackChannelWrite(resource, rbytes, 1.0);
           }
        }
 
@@ -454,7 +454,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
          {
            fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
                    rbytes);
-           cupsBackchannelWrite(resource, rbytes, 1.0);
+           cupsBackChannelWrite(resource, rbytes, 1.0);
          }
          else
            break;
@@ -488,5 +488,5 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
 
 /*
- * End of "$Id: socket.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: socket.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 4470e9c65b5ef6f226cf7341deda1d076f715f8a..b5aeb454873d1a536cf96e3a7391ed8aad8145c0 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * "$Id: usb-unix.c 4881 2005-12-15 22:03:40Z mike $"
+ * "$Id: usb-unix.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   USB port backend for the Common UNIX Printing System (CUPS).
  *
  *   This file is included from "usb.c" when compiled on UNIX/Linux.
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -246,7 +246,7 @@ print_device(const char *uri,               /* I - Device URI */
          {
            fprintf(stderr, "DEBUG: Received %d bytes of back-channel data!\n",
                    rbytes);
-            cupsBackchannelWrite(backbuf, rbytes, 1.0);
+            cupsBackChannelWrite(backbuf, rbytes, 1.0);
           }
        }
 
@@ -616,5 +616,5 @@ open_device(const char *uri)                /* I - Device URI */
 
 
 /*
- * End of "$Id: usb-unix.c 4881 2005-12-15 22:03:40Z mike $".
+ * End of "$Id: usb-unix.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 454f6d657534f75315dedac1ff900fe144a2fd26..6f438cda39e26e8257ae0f1d3d6bc2db35209832 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4494 2005-02-18 02:18:11Z mike $"
+# "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $"
 #
 #   Berkeley commands makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2006 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
@@ -56,11 +56,11 @@ depend:
 #
 
 install:       all
-       $(INSTALL_DIR) $(BINDIR)
+       $(INSTALL_DIR) -m 755 $(BINDIR)
        $(INSTALL_BIN) lpq $(BINDIR)
        $(INSTALL_BIN) lpr $(BINDIR)
        $(INSTALL_BIN) lprm $(BINDIR)
-       $(INSTALL_DIR) $(SBINDIR)
+       $(INSTALL_DIR) -m 755 $(SBINDIR)
        $(INSTALL_BIN) lpc $(SBINDIR)
 
 
@@ -108,5 +108,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4494 2005-02-18 02:18:11Z mike $".
+# End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".
 #
index 71c7c38694d1bca9a567a39289cd878f964dd41e..a1e09d3988f9496b09b017c8722955a3480b78ef 100644 (file)
@@ -50,3 +50,6 @@ testcgi.o: ../cups/array.h help-index.h
 testhi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 testhi.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 testhi.o: ../cups/array.h help-index.h
+testtemplate.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+testtemplate.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+testtemplate.o: ../cups/language.h ../cups/array.h help-index.h
index fd218a306ef793ec44657301d14669ea19b5915c..4962215bc74bc012bd02e8a113357e17569ffff3 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4869 2005-12-06 02:43:40Z mike $"
+# "$Id: Makefile 5111 2006-02-16 02:08:09Z mike $"
 #
 #   CGI makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products.
+#   Copyright 1997-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 #   property of Easy Software Products and are protected by Federal
 include ../Makedefs
 
 CGIS   =       admin.cgi classes.cgi help.cgi jobs.cgi printers.cgi
-TARGETS        =       libcgi.a $(CGIS) testcgi testhi
+TARGETS        =       libcgi.a $(CGIS) testcgi testhi testtemplate
 LIBOBJS        =       help-index.o html.o ipp-var.o search.o template.o var.o
 OBJS   =       $(LIBOBJS) admin.o classes.o help.o \
-               jobs.o printers.o testcgi.o testhi.o
+               jobs.o printers.o testcgi.o testhi.o testtemplate.o
 
 
 #
@@ -59,7 +59,7 @@ depend:
 #
 
 install:       all
-       $(INSTALL_DIR) $(SERVERBIN)/cgi-bin
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/cgi-bin
        for file in $(CGIS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/cgi-bin; \
        done
@@ -139,6 +139,15 @@ testhi:    testhi.o ../Makedefs libcgi.a
        $(CC) $(LDFLAGS) -o $@ testhi.o libcgi.a $(LIBS)
 
 
+#
+# testtemplate
+#
+
+testtemplate:  testtemplate.o ../Makedefs libcgi.a
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o $@ testtemplate.o libcgi.a $(LIBS)
+
+
 #
 # Dependencies...
 #
@@ -147,5 +156,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4869 2005-12-06 02:43:40Z mike $".
+# End of "$Id: Makefile 5111 2006-02-16 02:08:09Z mike $".
 #
index 254c32097901d52c548a7487ca8c3b56d3cef53e..3547ee5fdb5989fbe19093f914213f5874f598ad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: admin.c 5057 2006-02-02 20:38:29Z mike $"
+ * "$Id: admin.c 5107 2006-02-15 19:14:17Z mike $"
  *
  *   Administration CGI for the Common UNIX Printing System (CUPS).
  *
@@ -85,6 +85,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
   * Connect to the HTTP server...
   */
 
+  fputs("DEBUG: admin.cgi started...\n", stderr);
+
   http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
 
   if (!http)
@@ -96,6 +98,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
     exit(1);
   }
 
+  fprintf(stderr, "DEBUG: http=%p\n", http);
+
  /*
   * Set the web interface section...
   */
@@ -112,6 +116,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * Nope, send the administration menu...
     */
 
+    fputs("DEBUG: No form data, showing main menu...\n", stderr);
+
     do_menu(http);
   }
   else if ((op = cgiGetVariable("OP")) != NULL)
@@ -120,6 +126,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * Do the operation...
     */
 
+    fprintf(stderr, "DEBUG: op=\"%s\"...\n", op);
+
     if (!strcmp(op, "redirect"))
     {
       const char *url;                 /* Redirection URL... */
@@ -1073,6 +1081,8 @@ do_config_printer(http_t *http)           /* I - HTTP connection */
 
   title = cgiText(_("Set Printer Options"));
 
+  fprintf(stderr, "DEBUG: do_config_printer(http=%p)\n", http);
+
  /*
   * Get the printer name...
   */
@@ -1089,18 +1099,24 @@ do_config_printer(http_t *http)         /* I - HTTP connection */
     return;
   }
 
+  fprintf(stderr, "DEBUG: printer=\"%s\", uri=\"%s\"...\n", printer, uri);
+
  /*
   * Get the PPD file...
   */
 
-  if ((filename = cupsGetPPD(printer)) == NULL)
+  if ((filename = cupsGetPPD2(http, printer)) == NULL)
   {
+    fputs("DEBUG: No PPD file!?!\n", stderr);
+
     cgiStartHTML(title);
     cgiShowIPPError(_("Unable to get PPD file!"));
     cgiEndHTML();
     return;
   }
 
+  fprintf(stderr, "DEBUG: Got PPD file: \"%s\"\n", filename);
+
   if ((ppd = ppdOpenFile(filename)) == NULL)
   {
     cgiSetVariable("ERROR", ppdErrorString(ppdLastError(&i)));
@@ -1150,6 +1166,8 @@ do_config_printer(http_t *http)           /* I - HTTP connection */
     * Show the options to the user...
     */
 
+    fputs("DEBUG: Showing options...\n", stderr);
+
     ppdLocalize(ppd);
 
     cgiStartHTML("Set Printer Options");
@@ -1409,6 +1427,8 @@ do_config_printer(http_t *http)           /* I - HTTP connection */
     * Set default options...
     */
 
+    fputs("DEBUG: Setting options...\n", stderr);
+
     out = cupsTempFile2(tempfile, sizeof(tempfile));
     in  = cupsFileOpen(filename, "r");
 
@@ -3590,5 +3610,5 @@ match_string(const char *a,               /* I - First string */
 
     
 /*
- * End of "$Id: admin.c 5057 2006-02-02 20:38:29Z mike $".
+ * End of "$Id: admin.c 5107 2006-02-15 19:14:17Z mike $".
  */
index fbea241992d95b4795a90654dc396eea72d7f955..abf19ffffa1658e3f399cb44fd1f8496a7d02dcd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: classes.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: classes.c 5097 2006-02-10 04:06:23Z mike $"
  *
  *   Class status CGI for the Common UNIX Printing System (CUPS).
  *
@@ -344,6 +344,7 @@ show_all_classes(http_t     *http,  /* I - Connection to server */
     * Delete the response...
     */
 
+    cupsArrayDelete(classes);
     ippDelete(response);
   }
   else
@@ -459,5 +460,5 @@ show_class(http_t     *http,                /* I - Connection to server */
 
 
 /*
- * End of "$Id: classes.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: classes.c 5097 2006-02-10 04:06:23Z mike $".
  */
index 6a59d5c8b757cb35e67399168317899d211594da..dbc2ea2a5c69a9e53405f95dcbbc638a49670d73 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp-var.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: ipp-var.c 5097 2006-02-10 04:06:23Z mike $"
  *
  *   CGI <-> IPP variable routines for the Common UNIX Printing System (CUPS).
  *
@@ -1248,6 +1248,7 @@ cgiShowJobs(http_t     *http,             /* I - Connection to server */
     if (count > 0)
       cgiCopyTemplateLang("pager.tmpl");
 
+    cupsArrayDelete(jobs);
     ippDelete(response);
   }
 }
@@ -1272,5 +1273,5 @@ cgiText(const char *message)              /* I - Message */
 
 
 /*
- * End of "$Id: ipp-var.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: ipp-var.c 5097 2006-02-10 04:06:23Z mike $".
  */
index a73c34f90efc083745520f2281f5e982cf76004c..ed379b001341167109b72c51d2a1569038939619 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: jobs.c 4931 2006-01-14 20:37:40Z mike $"
+ * "$Id: jobs.c 5104 2006-02-15 03:21:04Z mike $"
  *
  *   Job status CGI for the Common UNIX Printing System (CUPS).
  *
@@ -164,11 +164,11 @@ do_job_op(http_t      *http,              /* I - HTTP connection */
 
   request = ippNewRequest(op);
 
+  snprintf(uri, sizeof(uri), "ipp://localhost/jobs/%d", job_id);
+
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri",
                NULL, uri);
 
-  snprintf(uri, sizeof(uri), "ipp://localhost/jobs/%d", job_id);
-
   if ((user = getenv("REMOTE_USER")) == NULL)
     user = "guest";
 
@@ -199,5 +199,5 @@ do_job_op(http_t      *http,                /* I - HTTP connection */
 
 
 /*
- * End of "$Id: jobs.c 4931 2006-01-14 20:37:40Z mike $".
+ * End of "$Id: jobs.c 5104 2006-02-15 03:21:04Z mike $".
  */
index fc0b65a9ec02fd801d4450d98e675101c6798509..b745e2336f86b3eed2b8ce9e086977a4e574c7f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: printers.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: printers.c 5104 2006-02-15 03:21:04Z mike $"
  *
  *   Printer status CGI for the Common UNIX Printing System (CUPS).
  *
@@ -201,6 +201,9 @@ show_all_printers(http_t     *http, /* I - Connection to server */
                        *urlend;        /* End of URL */
 
 
+  fprintf(stderr, "DEBUG: show_all_printers(http=%p, user=\"%s\")\n",
+          http, user);
+
  /*
   * Show the standard header...
   */
@@ -351,6 +354,7 @@ show_all_printers(http_t     *http, /* I - Connection to server */
     * Delete the response...
     */
 
+    cupsArrayDelete(printers);
     ippDelete(response);
   }
   else
@@ -381,6 +385,9 @@ show_printer(http_t     *http,              /* I - Connection to server */
   char         refresh[1024];          /* Refresh URL */
 
 
+  fprintf(stderr, "DEBUG: show_printer(http=%p, printer=\"%s\")\n",
+          http, printer);
+
  /*
   * Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the following
   * attributes:
@@ -466,5 +473,5 @@ show_printer(http_t     *http,              /* I - Connection to server */
 
 
 /*
- * End of "$Id: printers.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: printers.c 5104 2006-02-15 03:21:04Z mike $".
  */
index dfcd1b85e8e72792ef2cdf082ee69ee62a03110b..774d7fe8fb69fb0b08aa99a3c99e4af24e94bfb4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: template.c 4921 2006-01-12 21:26:26Z mike $"
+ * "$Id: template.c 5113 2006-02-16 12:02:44Z mike $"
  *
  *   CGI template function.
  *
  */
 
 #include "cgi-private.h"
+#include <errno.h>
 
 
 /*
  * Local functions...
  */
 
-static void    cgi_copy(FILE *out, FILE *in, int element, char term);
+static void    cgi_copy(FILE *out, FILE *in, int element, char term,
+                        int indent);
 static void    cgi_puts(const char *s, FILE *out);
 
 
@@ -56,18 +58,25 @@ cgiCopyTemplateFile(FILE       *out,        /* I - Output file */
   FILE *in;                            /* Input file */
 
 
+  fprintf(stderr, "DEBUG: cgiCopyTemplateFile(out=%p, tmpl=\"%s\")\n", out,
+          tmpl);
+
  /*
   * Open the template file...
   */
 
   if ((in = fopen(tmpl, "r")) == NULL)
+  {
+    fprintf(stderr, "ERROR: Unable to open template file \"%s\" - %s\n",
+            tmpl, strerror(errno));
     return;
+  }
 
  /*
   * Parse the file to the end...
   */
 
-  cgi_copy(out, in, 0, 0);
+  cgi_copy(out, in, 0, 0, 0);
 
  /*
   * Close the template file and return...
@@ -92,6 +101,8 @@ cgiCopyTemplateLang(const char *tmpl)        /* I - Base filename */
   FILE         *in;                    /* Input file */
 
 
+  fprintf(stderr, "DEBUG: cgiCopyTemplateLang(tmpl=\"%s\")\n", tmpl);
+
  /*
   * Convert the language to a locale name...
   */
@@ -101,14 +112,18 @@ cgiCopyTemplateLang(const char *tmpl)     /* I - Base filename */
     for (i = 0; lang[i] && i < 15; i ++)
       if (isalnum(lang[i] & 255))
         locale[i] = tolower(lang[i]);
-      else
+      else if (lang[i] == '-')
         locale[i] = '_';
+      else
+        break;
 
     locale[i] = '\0';
   }
   else
     locale[0] = '\0';
 
+  fprintf(stderr, "DEBUG: locale=\"%s\"...\n", locale);
+
  /*
   * See if we have a template file for this language...
   */
@@ -125,18 +140,24 @@ cgiCopyTemplateLang(const char *tmpl)     /* I - Base filename */
       snprintf(filename, sizeof(filename), "%s/%s", directory, tmpl);
   }
 
+  fprintf(stderr, "DEBUG: Template file is \"%s\"...\n", filename);
+
  /*
   * Open the template file...
   */
 
   if ((in = fopen(filename, "r")) == NULL)
+  {
+    fprintf(stderr, "ERROR: Unable to open template file \"%s\" - %s\n",
+            filename, strerror(errno));
     return;
+  }
 
  /*
   * Parse the file to the end...
   */
 
-  cgi_copy(stdout, in, 0, 0);
+  cgi_copy(stdout, in, 0, 0, 0);
 
  /*
   * Close the template file and return...
@@ -195,25 +216,29 @@ cgiSetServerVersion(void)
  */
 
 static void
-cgi_copy(FILE *out,            /* I - Output file */
-         FILE *in,             /* I - Input file */
-        int  element,          /* I - Element number (0 to N) */
-        char term)             /* I - Terminating character */
+cgi_copy(FILE *out,                    /* I - Output file */
+         FILE *in,                     /* I - Input file */
+        int  element,                  /* I - Element number (0 to N) */
+        char term,                     /* I - Terminating character */
+        int  indent)                   /* I - Debug info indentation */
 {
-  int          ch;             /* Character from file */
-  char         op;             /* Operation */
-  char         name[255],      /* Name of variable */
-               *nameptr,       /* Pointer into name */
-               innername[255], /* Inner comparison name */
-               *innerptr,      /* Pointer into inner name */
-               *s;             /* String pointer */
-  const char   *value;         /* Value of variable */
-  const char   *innerval;      /* Inner value */
-  const char   *outptr;        /* Output string pointer */
-  char         outval[1024],   /* Formatted output string */
-               compare[1024];  /* Comparison string */
-  int          result;         /* Result of comparison */
-
+  int          ch;                     /* Character from file */
+  char         op;                     /* Operation */
+  char         name[255],              /* Name of variable */
+               *nameptr,               /* Pointer into name */
+               innername[255],         /* Inner comparison name */
+               *innerptr,              /* Pointer into inner name */
+               *s;                     /* String pointer */
+  const char   *value;                 /* Value of variable */
+  const char   *innerval;              /* Inner value */
+  const char   *outptr;                /* Output string pointer */
+  char         outval[1024],           /* Formatted output string */
+               compare[1024];          /* Comparison string */
+  int          result;                 /* Result of comparison */
+
+
+  fprintf(stderr, "DEBUG: %*sStarting at file position %ld...\n", indent, "",
+          ftell(in));
 
  /*
   * Parse the file to the end...
@@ -240,6 +265,8 @@ cgi_copy(FILE *out,         /* I - Output file */
 
       if (s == name && isspace(ch & 255))
       {
+        fprintf(stderr, "DEBUG: %*sLone { at %ld...\n", indent, "", ftell(in));
+
         if (out)
        {
           putc('{', out);
@@ -249,6 +276,10 @@ cgi_copy(FILE *out,                /* I - Output file */
        continue;
       }
 
+      if (ch == '}')
+       fprintf(stderr, "DEBUG: %*s\"{%s}\" at %ld...\n", indent, "", name,
+               ftell(in));
+
      /*
       * See if it has a value...
       */
@@ -310,16 +341,24 @@ cgi_copy(FILE *out,               /* I - Output file */
 
        pos = ftell(in);
 
+        fprintf(stderr, "DEBUG: %*sLooping on \"%s\" at %ld, count=%d...\n",
+               indent, "", name + 1, pos, count);
+
         if (count > 0)
        {
           for (i = 0; i < count; i ++)
          {
-           fseek(in, pos, SEEK_SET);
-           cgi_copy(out, in, i, '}');
+           if (i)
+             fseek(in, pos, SEEK_SET);
+
+           cgi_copy(out, in, i, '}', indent + 2);
          }
         }
        else
-         cgi_copy(NULL, in, 0, '}');
+         cgi_copy(NULL, in, 0, '}', indent + 2);
+
+        fprintf(stderr, "DEBUG: %*sFinished looping on \"%s\"...\n", indent,
+               "", name + 1);
 
         continue;
       }
@@ -375,13 +414,16 @@ cgi_copy(FILE *out,               /* I - Output file */
       *   {name!value?true:false}    Not equal
       */
 
+      op = ch;
+
       if (ch == '?')
       {
        /*
         * Test for existance...
        */
 
-        result = cgiGetArray(name, element) != NULL && outptr[0];
+        result     = cgiGetArray(name, element) != NULL && outptr[0];
+       compare[0] = '\0';
       }
       else
       {
@@ -389,8 +431,6 @@ cgi_copy(FILE *out,         /* I - Output file */
         * Compare to a string...
        */
 
-        op = ch;
-
        for (s = compare; (ch = getc(in)) != EOF;)
           if (ch == '?')
             break;
@@ -446,7 +486,12 @@ cgi_copy(FILE *out,                /* I - Output file */
         *s = '\0';
 
         if (ch != '?')
+       {
+         fprintf(stderr,
+                 "DEBUG: %*sBad terminator '%c' at file position %ld...\n",
+                 indent, "", ch, ftell(in));
          return;
+       }
 
        /*
         * Do the comparison...
@@ -472,14 +517,21 @@ cgi_copy(FILE *out,               /* I - Output file */
        }
       }
 
+      fprintf(stderr,
+              "DEBUG: %*sStarting \"{%s%c%s\" at %ld, result=%d...\n",
+             indent, "", name, op, compare, ftell(in), result);
+
       if (result)
       {
        /*
        * Comparison true; output first part and ignore second...
        */
 
-       cgi_copy(out, in, element, ':');
-       cgi_copy(NULL, in, element, '}');
+        fprintf(stderr, "DEBUG: %*sOutput first part...\n", indent, "");
+       cgi_copy(out, in, element, ':', indent + 2);
+
+        fprintf(stderr, "DEBUG: %*sSkip second part...\n", indent, "");
+       cgi_copy(NULL, in, element, '}', indent + 2);
       }
       else
       {
@@ -487,9 +539,15 @@ cgi_copy(FILE *out,                /* I - Output file */
        * Comparison false; ignore first part and output second...
        */
 
-       cgi_copy(NULL, in, element, ':');
-       cgi_copy(out, in, element, '}');
+        fprintf(stderr, "DEBUG: %*sSkip first part...\n", indent, "");
+       cgi_copy(NULL, in, element, ':', indent + 2);
+
+        fprintf(stderr, "DEBUG: %*sOutput second part...\n", indent, "");
+       cgi_copy(out, in, element, '}', indent + 2);
       }
+
+      fprintf(stderr, "DEBUG: %*sFinished \"{%s%c%s\", out=%p...\n", indent, "",
+              name, op, compare, out);
     }
     else if (ch == '\\')       /* Quoted char */
     {
@@ -501,6 +559,17 @@ cgi_copy(FILE *out,                /* I - Output file */
     else if (out)
       putc(ch, out);
 
+  if (ch == EOF)
+    fprintf(stderr, "DEBUG: %*sReturning at file position %ld on EOF...\n",
+           indent, "", ftell(in));
+  else
+    fprintf(stderr,
+            "DEBUG: %*sReturning at file position %ld on character '%c'...\n",
+           indent, "", ftell(in), ch);
+
+  if (ch == EOF && term)
+    fprintf(stderr, "ERROR: %*sSaw EOF, expected '%c'!\n", indent, "", term);
+
  /*
   * Flush any pending output...
   */
@@ -569,5 +638,5 @@ cgi_puts(const char *s,                     /* I - String to output */
 
 
 /*
- * End of "$Id: template.c 4921 2006-01-12 21:26:26Z mike $".
+ * End of "$Id: template.c 5113 2006-02-16 12:02:44Z mike $".
  */
diff --git a/cgi-bin/testtemplate.c b/cgi-bin/testtemplate.c
new file mode 100644 (file)
index 0000000..fa4714a
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * "$Id: testtemplate.c 5111 2006-02-16 02:08:09Z mike $"
+ *
+ *   CGI template test program for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2006 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 USA
+ *
+ *       Voice: (301) 373-9600
+ *       EMail: cups-info@cups.org
+ *         WWW: http://www.cups.org
+ *
+ * Contents:
+ *
+ *   main() - Test the template code.
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include "cgi.h"
+
+
+/*
+ * 'main()' - Test the template code.
+ */
+
+int                                    /* O - Exit status */
+main(int  argc,                                /* I - Number of command-line arguments */
+     char *argv[])                     /* I - Command-line arguments */
+{
+  int  i;                              /* Looping var */
+  char *value;                         /* Value in name=value */
+  FILE *out;                           /* Where to send output */
+
+
+ /*
+  * Don't buffer stdout or stderr so that the mixed output is sane...
+  */
+
+  setbuf(stdout, NULL);
+  setbuf(stderr, NULL);
+
+ /*
+  * Loop through the command-line, assigning variables for any args with
+  * "name=value"...
+  */
+
+  out = stdout;
+
+  for (i = 1; i < argc; i ++)
+  {
+    if (!strcmp(argv[i], "-o"))
+    {
+      i ++;
+      if (i < argc)
+      {
+        out = fopen(argv[i], "w");
+       if (!out)
+       {
+         perror(argv[i]);
+         return (1);
+       }
+      }
+    }
+    else if (!strcmp(argv[i], "-e"))
+    {
+      i ++;
+
+      if (i < argc)
+      {
+        if (!freopen(argv[i], "w", stderr))
+       {
+         perror(argv[i]);
+         return (1);
+       }
+      }
+    }
+    else if (!strcmp(argv[i], "-q"))
+      freopen("/dev/null", "w", stderr);
+    else if ((value = strchr(argv[i], '=')) != NULL)
+    {
+      *value++ = '\0';
+      cgiSetVariable(argv[i], value);
+    }
+    else
+      cgiCopyTemplateFile(out, argv[i]);
+  }
+
+ /*
+  * Return with no errors...
+  */
+
+  return (0);
+}
+
+
+/*
+ * End of "$Id: testtemplate.c 5111 2006-02-16 02:08:09Z mike $".
+ */
index cf2f88a8a28f5e5ffe33b1d45dbdddb91932a444..6949cb3db773dd776cbf60b778910b8be44e6fec 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5008 2006-01-27 19:30:34Z mike $"
+# "$Id: Makefile 5126 2006-02-17 16:11:30Z mike $"
 #
 #   Configuration file makefile for the Common UNIX Printing System (CUPS).
 #
@@ -51,23 +51,27 @@ clean:
 #
 
 install:       all
-       $(INSTALL_DIR) $(SERVERROOT)
+       $(INSTALL_DIR) -m 755 $(SERVERROOT)
        for file in $(KEEP); do \
                if test -r $(SERVERROOT)/$$file ; then \
                        $(INSTALL_CONFIG) $$file $(SERVERROOT)/$$file.N ; \
+                       chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file.N || true; \
                else \
                        $(INSTALL_CONFIG) $$file $(SERVERROOT) ; \
+                       chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file || true; \
                fi ; \
        done
        $(INSTALL_CONFIG) cupsd.conf $(SERVERROOT)/cupsd.conf.default
+       -chgrp $(CUPS_GROUP) $(SERVERROOT)/cupsd.conf.default
        for file in $(REPLACE); do \
                if test -r $(SERVERROOT)/$$file ; then \
                        $(MV) $(SERVERROOT)/$$file $(SERVERROOT)/$$file.O ; \
                fi ; \
                $(INSTALL_CONFIG) $$file $(SERVERROOT) ; \
+               chgrp $(CUPS_GROUP) $(SERVERROOT)/$$file || true; \
        done
        -if test x$(PAMDIR) != x$(BUILDROOT); then \
-               $(INSTALL_DIR) $(PAMDIR); \
+               $(INSTALL_DIR) -m 755 $(PAMDIR); \
                if test -r $(PAMDIR)/cups/$(PAMFILE) ; then \
                        $(INSTALL_DATA) $(PAMFILE) $(PAMDIR)/cups.N ; \
                else \
@@ -77,5 +81,5 @@ install:      all
 
 
 #
-# End of "$Id: Makefile 5008 2006-01-27 19:30:34Z mike $".
+# End of "$Id: Makefile 5126 2006-02-17 16:11:30Z mike $".
 #
index e3b73ea7a559d342788c4f1734a047c6c53ec282..426077b1bca5effab3995cea1f8ccd470195555a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: cupsd.conf.in 4817 2005-11-04 16:21:01Z mike $"
+# "$Id: cupsd.conf.in 5114 2006-02-16 12:28:29Z mike $"
 #
 #   Sample configuration file for the Common UNIX Printing System (CUPS)
 #   scheduler.  See "man cupsd.conf" for a complete description of this
@@ -11,7 +11,7 @@
 LogLevel info
 
 # Administrator user group...
-SystemGroup @CUPS_GROUP@
+SystemGroup @CUPS_SYSTEM_GROUPS@
 
 # Only listen for connections from the local machine.
 Listen localhost:@DEFAULT_IPP_PORT@
@@ -72,5 +72,5 @@ DefaultAuthType Basic
 </Policy>
 
 #
-# End of "$Id: cupsd.conf.in 4817 2005-11-04 16:21:01Z mike $".
+# End of "$Id: cupsd.conf.in 5114 2006-02-16 12:28:29Z mike $".
 #
index 95ba2d9c5b6c0c573b36d6abaec696a57dea9bce..442cd5325fd5a17fbd880be20214cb26698f2810 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-common.m4 5025 2006-01-30 03:49:12Z mike $"
+dnl "$Id: cups-common.m4 5136 2006-02-19 18:46:46Z mike $"
 dnl
 dnl   Common configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
 dnl   property of Easy Software Products and are protected by Federal
@@ -53,6 +53,7 @@ fi
 AC_PROG_RANLIB
 AC_PATH_PROG(AR,ar)
 AC_PATH_PROG(HTMLDOC,htmldoc)
+AC_PATH_PROG(LD,ld)
 AC_PATH_PROG(LN,ln)
 AC_PATH_PROG(MV,mv)
 AC_PATH_PROG(RM,rm)
@@ -166,11 +167,6 @@ AC_TRY_COMPILE([#include <time.h>],[struct tm t;
        AC_DEFINE(HAVE_TM_GMTOFF),
        AC_MSG_RESULT(no))
 
-dnl See if we have POSIX ACL support...
-dnl TODO: Linux/Solaris/IRIX/etc. version
-
-AC_CHECK_FUNCS(acl_init)
-
 dnl Flags for "ar" command...
 case $uname in
         Darwin* | *BSD*)
@@ -184,6 +180,10 @@ esac
 AC_SUBST(ARFLAGS)
 
 dnl Extra platform-specific libraries...
+BACKLIBS=""
+CUPSDLIBS=""
+DBUSDIR=""
+
 case $uname in
         Darwin*)
                 BACKLIBS="-framework IOKit"
@@ -206,7 +206,6 @@ case $uname in
 
                dnl Check for the new membership functions in MacOSX 10.4 (Tiger)...
                AC_CHECK_HEADER(membership.h,AC_DEFINE(HAVE_MEMBERSHIP_H))
-               AC_CHECK_HEADER(membershipPriv.h,AC_DEFINE(HAVE_MEMBERSHIPPRIV_H))
                AC_CHECK_FUNCS(mbr_uid_to_uuid)
 
                dnl Check for notify_post support
@@ -216,31 +215,34 @@ case $uname in
 
        Linux*)
                dnl Check for DBUS support
-                BACKLIBS=""
-               CUPSDLIBS=""
-
                AC_PATH_PROG(PKGCONFIG, pkg-config)
                if test "x$PKGCONFIG" != x; then
                        AC_MSG_CHECKING(for DBUS)
                        if $PKGCONFIG --exists dbus-1; then
                                AC_MSG_RESULT(yes)
-                               AC_DEFINE(HAVE_DBUS)
-                               CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
-                               CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
+                               AC_CHECK_LIB(dbus-1,
+                                   dbus_message_iter_init_append,
+                                   AC_DEFINE(HAVE_DBUS)
+                                   CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
+                                   CUPSDLIBS="`$PKGCONFIG --libs dbus-1`"
+                                   DBUSDIR="/etc/dbus-1/system.d")
                        else
                                AC_MSG_RESULT(no)
                        fi
                fi
                ;;
-
-        *)
-                BACKLIBS=""
-               CUPSDLIBS=""
-                ;;
 esac
 
+dnl See if we have POSIX ACL support...
+SAVELIBS="$LIBS"
+LIBS=""
+AC_SEARCH_LIBS(acl_init, acl, AC_DEFINE(HAVE_ACL_INIT))
+CUPSDLIBS="$CUPSDLIBS $LIBS"
+LIBS="$SAVELIBS"
+
 AC_SUBST(BACKLIBS)
 AC_SUBST(CUPSDLIBS)
+AC_SUBST(DBUSDIR)
 
 dnl New default port definition for IPP...
 AC_ARG_WITH(ipp-port, [  --with-ipp-port         set default port number for IPP ],
@@ -251,5 +253,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
 
 dnl
-dnl End of "$Id: cups-common.m4 5025 2006-01-30 03:49:12Z mike $".
+dnl End of "$Id: cups-common.m4 5136 2006-02-19 18:46:46Z mike $".
 dnl
index 4da730c2ad229860f09fc321f831ce0cb7bc31eb..9a53517798376f347cc62be425950f259b3aff39 100644 (file)
@@ -115,6 +115,100 @@ else
 fi
 AC_SUBST(CUPS_USE_NETWORK_DEFAULT)
 
+dnl Determine the correct username and group for this OS...
+AC_ARG_WITH(cups-user, [  --with-cups-user        set default user for CUPS],
+       CUPS_USER="$withval",
+       AC_MSG_CHECKING(for default print user)
+       if test -f /etc/passwd; then
+               CUPS_USER=""
+               for user in lp lpd guest daemon nobody; do
+                       if test "`grep \^${user}: /etc/passwd`" != ""; then
+                               CUPS_USER="$user"
+                               AC_MSG_RESULT($user)
+                               break;
+                       fi
+               done
+
+               if test x$CUPS_USER = x; then
+                       CUPS_USER="nobody"
+                       AC_MSG_RESULT(not found, using "$CUPS_USER")
+               fi
+       else
+               CUPS_USER="nobody"
+               AC_MSG_RESULT(no password file, using "$CUPS_USER")
+       fi)
+
+AC_ARG_WITH(cups-group, [  --with-cups-group       set default group for CUPS],
+       CUPS_GROUP="$withval",
+       AC_MSG_CHECKING(for default print group)
+       if test -f /etc/group; then
+               if test x$uname = xDarwin; then
+                       GROUP_LIST="nobody"
+               else
+                       GROUP_LIST="lp nobody"
+               fi
+
+               CUPS_GROUP=""
+               for group in $GROUP_LIST; do
+                       if test "`grep \^${group}: /etc/group`" != ""; then
+                               CUPS_GROUP="$group"
+                               AC_MSG_RESULT($group)
+                               break;
+                       fi
+               done
+
+               if test x$CUPS_GROUP = x; then
+                       CUPS_GROUP="nobody"
+                       AC_MSG_RESULT(not found, using "$CUPS_GROUP")
+               fi
+       else
+               CUPS_GROUP="nobody"
+               AC_MSG_RESULT(no group file, using "$CUPS_GROUP")
+       fi)
+
+AC_ARG_WITH(system-groups, [  --with-system-groups    set default system groups for CUPS],
+       CUPS_SYSTEM_GROUPS="$withval",
+       if test x$uname = xDarwin; then
+               GROUP_LIST="admin"
+       else
+               GROUP_LIST="lpadmin sys system root"
+       fi
+
+       AC_MSG_CHECKING(for default system groups)
+       if test -f /etc/group; then
+               CUPS_SYSTEM_GROUPS=""
+               for group in $GROUP_LIST; do
+                       if test "`grep \^${group}: /etc/group`" != ""; then
+                               if test "x$CUPS_SYSTEM_GROUPS" = x; then
+                                       CUPS_SYSTEM_GROUPS="$group"
+                               else
+                                       CUPS_SYSTEM_GROUPS="$CUPS_SYSTEM_GROUPS $group"
+                               fi
+                       fi
+               done
+
+               if test "x$CUPS_SYSTEM_GROUPS" = x; then
+                       CUPS_SYSTEM_GROUPS="$GROUP_LIST"
+                       AC_MSG_RESULT(no groups found, using "$CUPS_SYSTEM_GROUPS")
+               else
+                       AC_MSG_RESULT("$CUPS_SYSTEM_GROUPS")
+               fi
+       else
+               CUPS_SYSTEM_GROUPS="$GROUP_LIST"
+               AC_MSG_RESULT(no group file, using "$CUPS_SYSTEM_GROUPS")
+       fi)
+
+CUPS_PRIMARY_SYSTEM_GROUP="`echo $CUPS_SYSTEM_GROUPS | awk '{print $1}'`"
+
+AC_SUBST(CUPS_USER)
+AC_SUBST(CUPS_GROUP)
+AC_SUBST(CUPS_SYSTEM_GROUPS)
+AC_SUBST(CUPS_PRIMARY_SYSTEM_GROUP)
+
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER")
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SYSTEM_GROUPS, "$CUPS_SYSTEM_GROUPS")
+
 
 dnl
 dnl End of "$Id$".
index 8e075e9bffd2cfa14649cefa0ffe585c2d0c9009..1da73934f48f5d25ea5b9d51c4f2cb69c162f292 100644 (file)
@@ -23,7 +23,7 @@ dnl         WWW: http://www.cups.org
 dnl
 
 
-AC_ARG_ENABLE(launchd, [  --enable-launchd            turn on launchd support, default=yes])
+AC_ARG_ENABLE(launchd, [  --enable-launchd        turn on launchd support, default=yes])
 
 DEFAULT_LAUNCHD_CONF=""
 LAUNCHDLIBS=""
index 6a887d13d002b69359c2e6dfeb33d318bbd60989..0c2c25161d87bdd21f1245e056947fa8943f20ec 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-manpages.m4 4833 2005-11-12 21:46:52Z mike $"
+dnl "$Id: cups-manpages.m4 5099 2006-02-13 02:46:10Z mike $"
 dnl
 dnl   Manpage stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -58,6 +58,7 @@ case "$uname" in
                # *BSD
                MAN1EXT=1
                MAN5EXT=5
+               MAN7EXT=7
                MAN8EXT=8
                MAN8DIR=8
                ;;
@@ -65,6 +66,7 @@ case "$uname" in
                # SGI IRIX
                MAN1EXT=1
                MAN5EXT=5
+               MAN7EXT=7
                MAN8EXT=1m
                MAN8DIR=1
                ;;
@@ -72,6 +74,7 @@ case "$uname" in
                # Solaris and HP-UX
                MAN1EXT=1
                MAN5EXT=5
+               MAN7EXT=7
                MAN8EXT=1m
                MAN8DIR=1m
                ;;
@@ -79,6 +82,7 @@ case "$uname" in
                # Linux and GNU Hurd
                MAN1EXT=1.gz
                MAN5EXT=5.gz
+               MAN7EXT=7.gz
                MAN8EXT=8.gz
                MAN8DIR=8
                ;;
@@ -86,6 +90,7 @@ case "$uname" in
                # All others
                MAN1EXT=1
                MAN5EXT=5
+               MAN7EXT=7
                MAN8EXT=8
                MAN8DIR=8
                ;;
@@ -93,9 +98,10 @@ esac
 
 AC_SUBST(MAN1EXT)
 AC_SUBST(MAN5EXT)
+AC_SUBST(MAN7EXT)
 AC_SUBST(MAN8EXT)
 AC_SUBST(MAN8DIR)
 
 dnl
-dnl End of "$Id: cups-manpages.m4 4833 2005-11-12 21:46:52Z mike $".
+dnl End of "$Id: cups-manpages.m4 5099 2006-02-13 02:46:10Z mike $".
 dnl
index b2b53126dfd676232c2fbb0a7cac46046bc10123..c5ce0335c39fcaf6201641af6313327da442faff 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-opsys.m4 4960 2006-01-20 16:41:20Z mike $"
+dnl "$Id: cups-opsys.m4 5075 2006-02-05 01:00:29Z mike $"
 dnl
 dnl   Operating system stuff for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
 dnl   property of Easy Software Products and are protected by Federal
@@ -38,63 +38,6 @@ case "$uname" in
                ;;
 esac
 
-dnl Determine the correct username and group for this OS...
-AC_ARG_WITH(cups-user, [  --with-cups-user        set default user for CUPS],
-       CUPS_USER="$withval",
-       AC_MSG_CHECKING(for default print user)
-       if test -f /etc/passwd; then
-               CUPS_USER=""
-               for user in lp lpd guest daemon nobody; do
-                       if test "`grep \^${user}: /etc/passwd`" != ""; then
-                               CUPS_USER="$user"
-                               AC_MSG_RESULT($user)
-                               break;
-                       fi
-               done
-
-               if test x$CUPS_USER = x; then
-                       CUPS_USER="${USER:=nobody}"
-                       AC_MSG_RESULT(not found, using "$CUPS_USER")
-               fi
-       else
-               CUPS_USER="${USER:=nobody}"
-               AC_MSG_RESULT(no password file, using "$CUPS_USER")
-       fi)
-
-AC_ARG_WITH(cups-group, [  --with-cups-group       set default group for CUPS],
-       CUPS_GROUP="$withval",
-       AC_MSG_CHECKING(for default print group)
-       if test -f /etc/group; then
-               if test x$uname = xDarwin; then
-                       GROUP_LIST="lp admin"
-               else
-                       GROUP_LIST="lpadmin sys system root"
-               fi
-
-               CUPS_GROUP=""
-               for group in $GROUP_LIST; do
-                       if test "`grep \^${group}: /etc/group`" != ""; then
-                               CUPS_GROUP="$group"
-                               AC_MSG_RESULT($group)
-                               break;
-                       fi
-               done
-
-               if test x$CUPS_GROUP = x; then
-                       CUPS_GROUP="${GROUP:=nobody}"
-                       AC_MSG_RESULT(not found, using "$CUPS_GROUP")
-               fi
-       else
-               CUPS_GROUP="${GROUP:=nobody}"
-               AC_MSG_RESULT(no group file, using "$CUPS_GROUP")
-       fi)
-
-AC_SUBST(CUPS_USER)
-AC_SUBST(CUPS_GROUP)
-
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_USER, "$CUPS_USER")
-AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GROUP, "$CUPS_GROUP")
-
 dnl
-dnl "$Id: cups-opsys.m4 4960 2006-01-20 16:41:20Z mike $"
+dnl "$Id: cups-opsys.m4 5075 2006-02-05 01:00:29Z mike $"
 dnl
index afaab9cf50e0ab6dfff4f578da31e37d4df6ee8c..2e52b24363b584fa64aad9f9e994e28f50617d74 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-sharedlibs.m4 5007 2006-01-27 18:25:42Z mike $"
+dnl "$Id: cups-sharedlibs.m4 5112 2006-02-16 04:41:59Z mike $"
 dnl
 dnl   Shared library support for the Common UNIX Printing System (CUPS).
 dnl
@@ -38,7 +38,7 @@ if test x$enable_shared != xno; then
                HP-UX*)
                        LIBCUPS="libcups.sl.2"
                        LIBCUPSIMAGE="libcupsimage.sl.2"
-                       DSO="ld"
+                       DSO="\$(LD)"
                        DSOFLAGS="$DSOFLAGS -b -z +h \$@"
                        ;;
                IRIX)
@@ -152,5 +152,5 @@ AC_SUBST(IMGLIBS)
 AC_SUBST(EXPORT_LDFLAGS)
 
 dnl
-dnl End of "$Id: cups-sharedlibs.m4 5007 2006-01-27 18:25:42Z mike $".
+dnl End of "$Id: cups-sharedlibs.m4 5112 2006-02-16 04:41:59Z mike $".
 dnl
index 032146ea62720faddf6a7c80050dd19c1b4451b5..b0b5798f7802c7ef5fc344623c62dea70b6ef6f1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: config.h.in 5028 2006-01-31 01:16:43Z mike $"
+ * "$Id: config.h.in 5082 2006-02-05 21:58:58Z mike $"
  *
  *   Configuration file for the Common UNIX Printing System (CUPS).
  *
  */
 
 #undef HAVE_MEMBERSHIP_H
-#undef HAVE_MEMBERSHIPPRIV_H
 #undef HAVE_MBR_UID_TO_UUID
 
 
 #endif /* !_CUPS_CONFIG_H_ */
 
 /*
- * End of "$Id: config.h.in 5028 2006-01-31 01:16:43Z mike $".
+ * End of "$Id: config.h.in 5082 2006-02-05 21:58:58Z mike $".
  */
index 811d48b5fe8187b59d33389e51e6d8ed97c4cf5a..636edc724e208bc5c2b0a4aaf509c6e730cef239 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: configure.in 5020 2006-01-28 13:36:15Z mike $"
+dnl "$Id: configure.in 5124 2006-02-17 16:05:21Z mike $"
 dnl
 dnl   Configuration script for the Common UNIX Printing System (CUPS).
 dnl
@@ -49,12 +49,15 @@ AC_SUBST(MAKEDEFS)
 sinclude(config-scripts/cups-scripting.m4)
 
 AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh cups-config
-          conf/cupsd.conf conf/pam.std doc/index.html
-         doc/help/standard.html templates/edit-config.tmpl
-         templates/header.tmpl)
+          conf/cupsd.conf conf/pam.std doc/index.html doc/ja/index.html
+         doc/help/standard.html man/cups-deviced.man
+         man/cups-driverd.man man/cups-lpd.man man/cupsaddsmb.man
+         man/cupsd.man man/cupsd.conf.man
+         templates/edit-config.tmpl templates/header.tmpl
+         templates/ja/header.tmpl)
 
 chmod +x cups-config
 
 dnl
-dnl End of "$Id: configure.in 5020 2006-01-28 13:36:15Z mike $".
+dnl End of "$Id: configure.in 5124 2006-02-17 16:05:21Z mike $".
 dnl
index fdea47ea2525ffd84ec5057e85871cec57296ec9..2f5ea715c68f101b3f632dd9adfd3bc1c01d3975 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 #
-# "$Id: cups-config.in 4802 2005-10-19 13:48:06Z mike $"
+# "$Id: cups-config.in 5134 2006-02-19 15:16:08Z mike $"
 # 
 #   CUPS configuration utility.
 #
-#   Copyright 2001-2005 by Easy Software Products, all rights reserved.
+#   Copyright 2001-2006 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
@@ -36,6 +36,7 @@ sysconfdir=@sysconfdir@
 cups_datadir=@CUPS_DATADIR@
 cups_serverbin=@CUPS_SERVERBIN@
 cups_serverroot=@CUPS_SERVERROOT@
+INSTALLSTATIC=@INSTALLSTATIC@
 
 # flags for C++ compiler:
 CFLAGS=""
@@ -116,7 +117,11 @@ while test $# -gt 0; do
            echo $cups_serverroot
            ;;
        --static)
-           static=yes
+           if test -z "$INSTALLSTATIC"; then
+               echo "WARNING: Static libraries not installed!" >&2
+           else
+               static=yes
+           fi
            ;;
        --version)
            echo $VERSION
@@ -130,5 +135,5 @@ while test $# -gt 0; do
 done
 
 #
-# End of "$Id: cups-config.in 4802 2005-10-19 13:48:06Z mike $".
+# End of "$Id: cups-config.in 5134 2006-02-19 15:16:08Z mike $".
 #
index f4b6f6787b098b25e194c795db4acb8b482c91cb..d77ea16abe77627f8a0feead7a43e25f4c126446 100644 (file)
@@ -58,7 +58,8 @@ page.o: ppd.h array.h file.h string.h ../config.h
 ppd.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h array.h
 ppd.o: file.h language.h i18n.h normalize.h transcode.h debug.h
 snprintf.o: string.h ../config.h
-string.o: string.h ../config.h
+string.o: debug.h string.h ../config.h globals.h cups.h ipp.h http.h md5.h
+string.o: ppd.h array.h file.h language.h i18n.h normalize.h transcode.h
 tempfile.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
 tempfile.o: array.h file.h language.h i18n.h normalize.h transcode.h debug.h
 transcode.o: globals.h string.h ../config.h cups.h ipp.h http.h md5.h ppd.h
index e23017bf394d1825f8a362763953bf0916ed0f50..63caff9f080a823588ff798e15fb10ca2e732295 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5023 2006-01-29 14:39:44Z mike $"
+# "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $"
 #
 #   API library Makefile for the Common UNIX Printing System (CUPS).
 #
@@ -142,7 +142,7 @@ depend:
 #
 
 install:       all installhdrs $(INSTALLSTATIC)
-       $(INSTALL_DIR) $(LIBDIR)
+       $(INSTALL_DIR) -m 755 $(LIBDIR)
        $(INSTALL_LIB) $(LIBCUPS) $(LIBDIR)
        if test $(LIBCUPS) = "libcups.so.2" -o $(LIBCUPS) = "libcups.sl.2"; then \
                $(RM) $(LIBDIR)/`basename $(LIBCUPS) .2`; \
@@ -162,7 +162,7 @@ installstatic:
        fi
 
 installhdrs:
-       $(INSTALL_DIR) $(INCLUDEDIR)/cups
+       $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
        for file in $(HEADERS); do \
                $(INSTALL_DATA) $$file $(INCLUDEDIR)/cups; \
        done
@@ -357,5 +357,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5023 2006-01-29 14:39:44Z mike $".
+# End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".
 #
index 71d6498477ea9ac559adc66030dc32a78c0025fa..65003b8aaef9c2c8a58e3b60350ef46835c43c05 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: array.c 4970 2006-01-24 14:05:45Z mike $"
+ * "$Id: array.c 5119 2006-02-16 15:52:06Z mike $"
  *
  *   Sorted array routines for the Common UNIX Printing System (CUPS).
  *
@@ -42,7 +42,7 @@
  *   cupsArrayRemove()  - Remove an element from the array.
  *   cupsArrayRestore() - Reset the current element to the last cupsArraySave.
  *   cupsArraySave()    - Mark the current element for a later cupsArrayRestore.
- *   cups_find()        - Find an element in the array...
+ *   cups_array_find()  - Find an element in the array...
  */
 
 /*
@@ -78,6 +78,7 @@ struct _cups_array_s                  /**** CUPS array structure ****/
                        alloc_elements, /* Allocated array elements */
                        current,        /* Current element */
                        insert,         /* Last inserted element */
+                       unique,         /* Are all elements unique? */
                        num_saved,      /* Number of saved elements */
                        saved[_CUPS_MAXSAVE];
                                        /* Saved elements */
@@ -91,22 +92,22 @@ struct _cups_array_s                        /**** CUPS array structure ****/
  * Local functions...
  */
 
-static int     cups_find(cups_array_t *a, void *e, int prev, int *rdiff);
+static int     cups_array_add(cups_array_t *a, void *e, int insert);
+static int     cups_array_find(cups_array_t *a, void *e, int prev, int *rdiff);
 
 
 /*
  * 'cupsArrayAdd()' - Add an element to the array.
+ *
+ * When adding an element to a sorted array, non-unique elements are
+ * appended at the end of the run.  For unsorted arrays, the element
+ * is inserted at the end of the array.
  */
 
 int                                    /* O - 1 on success, 0 on failure */
 cupsArrayAdd(cups_array_t *a,          /* I - Array */
              void         *e)          /* I - Element */
 {
-  int  i,                              /* Looping var */
-       current,                        /* Current element */
-       diff;                           /* Comparison with current element */
-
-
   DEBUG_printf(("cupsArrayAdd(a=%p, e=%p)\n", a, e));
 
  /*
@@ -120,112 +121,10 @@ cupsArrayAdd(cups_array_t *a,            /* I - Array */
   }
 
  /*
-  * Verify we have room for the new element...
-  */
-
-  if (a->num_elements >= a->alloc_elements)
-  {
-   /*
-    * Allocate additional elements; start with 16 elements, then
-    * double the size until 1024 elements, then add 1024 elements
-    * thereafter...
-    */
-
-    void       **temp;                 /* New array elements */
-    int                count;                  /* New allocation count */
-
-
-    if (a->alloc_elements == 0)
-    {
-      count = 16;
-      temp  = malloc(count * sizeof(void *));
-    }
-    else
-    {
-      if (a->alloc_elements < 1024)
-        count = a->alloc_elements * 2;
-      else
-        count = a->alloc_elements + 1024;
-
-      temp = realloc(a->elements, count * sizeof(void *));
-    }
-
-    DEBUG_printf(("cupsArrayAdd: count=%d\n", count));
-
-    if (!temp)
-    {
-      DEBUG_puts("cupsAddAdd: allocation failed, returning 0");
-      return (0);
-    }
-
-    a->alloc_elements = count;
-    a->elements       = temp;
-  }
-
- /*
-  * Find the insertion point for the new element; if there is no
-  * compare function or elements, just add it to the end...
-  */
-
-  if (!a->num_elements || !a->compare)
-  {
-   /*
-    * Append to the end...
-    */
-
-    current = a->num_elements;
-  }
-  else
-  {
-   /*
-    * Do a binary search for the insertion point...
-    */
-
-    current = cups_find(a, e, a->insert, &diff);
-
-    if (diff > 0)
-      current ++;
-  }
-
- /*
-  * Insert or append the element...
+  * Append the element...
   */
 
-  if (current < a->num_elements)
-  {
-   /*
-    * Shift other elements to the right...
-    */
-
-    memmove(a->elements + current + 1, a->elements + current,
-            (a->num_elements - current) * sizeof(void *));
-
-    if (a->current >= current)
-      a->current ++;
-
-    for (i = 0; i < a->num_saved; i ++)
-      if (a->saved[i] >= current)
-       a->saved[i] ++;
-
-    DEBUG_printf(("cupsArrayAdd: insert element at index %d...\n", current));
-  }
-#ifdef DEBUG
-  else
-    printf("cupsArrayAdd: append element at %d...\n", current);
-#endif /* DEBUG */
-
-  a->elements[current] = e;
-  a->num_elements ++;
-  a->insert = current;
-
-#ifdef DEBUG
-  for (current = 0; current < a->num_elements; current ++)
-    printf("cupsArrayAdd: a->elements[%d]=%p\n", current, a->elements[current]);
-#endif /* DEBUG */
-
-  DEBUG_puts("cupsArrayAdd: returning 1");
-
-  return (1);
+  return (cups_array_add(a, e, 0));
 }
 
 
@@ -251,6 +150,7 @@ cupsArrayClear(cups_array_t *a)             /* I - Array */
   a->num_elements = 0;
   a->current      = -1;
   a->insert       = -1;
+  a->unique       = 1;
   a->num_saved    = 0;
 }
 
@@ -357,6 +257,7 @@ cupsArrayDup(cups_array_t *a)               /* I - Array */
   da->data      = a->data;
   da->current   = a->current;
   da->insert    = a->insert;
+  da->unique    = a->unique;
   da->num_saved = a->num_saved;
 
   memcpy(da->saved, a->saved, sizeof(a->saved));
@@ -421,13 +322,25 @@ cupsArrayFind(cups_array_t *a,            /* I - Array */
   * Yes, look for a match...
   */
 
-  current = cups_find(a, e, a->current, &diff);
+  current = cups_array_find(a, e, a->current, &diff);
   if (!diff)
   {
    /*
-    * Found a match...
+    * Found a match!  If the array does not contain unique values, find
+    * the first element that is the same...
     */
 
+    if (!a->unique && a->compare)
+    {
+     /*
+      * The array is not unique, find the first match...
+      */
+
+      while (current > 0 && !(*(a->compare))(e, a->elements[current - 1],
+                                             a->data))
+        current --;
+    }
+
     a->current = current;
 
     return (a->elements[current]);
@@ -489,18 +402,15 @@ cupsArrayIndex(cups_array_t *a,           /* I - Array */
 /*
  * 'cupsArrayInsert()' - Insert an element in the array.
  *
- * When inserting an element in a sorted array, this function works
- * just like cupsArrayAdd().  For unsorted arrays, the element is
- * inserted at the beginning of the array.
+ * When inserting an element in a sorted array, non-unique elements are
+ * inserted at the beginning of the run.  For unsorted arrays, the element
+ * is inserted at the beginning of the array.
  */
 
 int                                    /* O - 0 on failure, 1 on success */
 cupsArrayInsert(cups_array_t *a,       /* I - Array */
                void         *e)        /* I - Element */
 {
-  int  i;                              /* Looping var */
-
-
   DEBUG_printf(("cupsArrayInsert(a=%p, e=%p)\n", a, e));
 
  /*
@@ -513,81 +423,11 @@ cupsArrayInsert(cups_array_t *a,  /* I - Array */
     return (0);
   }
 
- /*
-  * Inserting into a sorted array is the same as adding...
-  */
-
-  if (a->compare)
-    return (cupsArrayAdd(a, e));
-
- /*
-  * Verify we have room for the new element...
-  */
-
-  if (a->num_elements >= a->alloc_elements)
-  {
-   /*
-    * Allocate additional elements; start with 16 elements, then
-    * double the size until 1024 elements, then add 1024 elements
-    * thereafter...
-    */
-
-    void       **temp;                 /* New array elements */
-    int                count;                  /* New allocation count */
-
-
-    if (a->alloc_elements == 0)
-    {
-      count = 16;
-      temp  = malloc(count * sizeof(void *));
-    }
-    else
-    {
-      if (a->alloc_elements < 1024)
-        count = a->alloc_elements * 2;
-      else
-        count = a->alloc_elements + 1024;
-
-      temp = realloc(a->elements, count * sizeof(void *));
-    }
-
-    DEBUG_printf(("cupsArrayInsert: count=%d\n", count));
-
-    if (!temp)
-    {
-      DEBUG_puts("cupsAddInsert: allocation failed, returning 0");
-      return (0);
-    }
-
-    a->alloc_elements = count;
-    a->elements       = temp;
-  }
-
  /*
   * Insert the element...
   */
 
-  memmove(a->elements + 1, a->elements, a->num_elements * sizeof(void *));
-
-  if (a->current >= 0)
-    a->current ++;
-
-  for (i = 0; i < a->num_saved; i ++)
-    if (a->saved[i] >= 0)
-      a->saved[i] ++;
-
-  a->elements[0] = e;
-  a->num_elements ++;
-  a->insert = 0;
-
-#ifdef DEBUG
-  for (i = 0; i < a->num_elements; i ++)
-    printf("cupsArrayInsert: a->elements[%d]=%p\n", i, a->elements[i]);
-#endif /* DEBUG */
-
-  DEBUG_puts("cupsArrayInsert: returning 1");
-
-  return (1);
+  return (cups_array_add(a, e, 1));
 }
 
 
@@ -639,6 +479,7 @@ cupsArrayNew(cups_array_func_t f,   /* I - Comparison function */
   a->current   = -1;
   a->insert    = -1;
   a->num_saved = 0;
+  a->unique    = 1;
 
   return (a);
 }
@@ -721,7 +562,7 @@ cupsArrayRemove(cups_array_t *a,    /* I - Array */
   if (!a->num_elements)
     return (0);
 
-  current = cups_find(a, e, a->current, &diff);
+  current = cups_array_find(a, e, a->current, &diff);
   if (diff)
     return (0);
 
@@ -745,6 +586,9 @@ cupsArrayRemove(cups_array_t *a,    /* I - Array */
     if (current <= a->saved[i])
       a->saved[i] --;
 
+  if (a->num_elements <= 1)
+    a->unique = 1;
+
   return (1);
 }
 
@@ -795,14 +639,182 @@ cupsArraySave(cups_array_t *a)           /* I - Array */
 
 
 /*
- * 'cups_find()' - Find an element in the array...
+ * 'cups_array_add()' - Insert or append an element to the array...
+ */
+
+static int                             /* O - 1 on success, 0 on failure */
+cups_array_add(cups_array_t *a,                /* I - Array */
+               void         *e,                /* I - Element to add */
+              int          insert)     /* I - 1 = insert, 0 = append */
+{
+  int  i,                              /* Looping var */
+       current,                        /* Current element */
+       diff;                           /* Comparison with current element */
+
+
+  DEBUG_printf(("cups_array_add(a=%p, e=%p, insert=%d)\n", a, e, insert));
+
+ /*
+  * Verify we have room for the new element...
+  */
+
+  if (a->num_elements >= a->alloc_elements)
+  {
+   /*
+    * Allocate additional elements; start with 16 elements, then
+    * double the size until 1024 elements, then add 1024 elements
+    * thereafter...
+    */
+
+    void       **temp;                 /* New array elements */
+    int                count;                  /* New allocation count */
+
+
+    if (a->alloc_elements == 0)
+    {
+      count = 16;
+      temp  = malloc(count * sizeof(void *));
+    }
+    else
+    {
+      if (a->alloc_elements < 1024)
+        count = a->alloc_elements * 2;
+      else
+        count = a->alloc_elements + 1024;
+
+      temp = realloc(a->elements, count * sizeof(void *));
+    }
+
+    DEBUG_printf(("cups_array_add: count=%d\n", count));
+
+    if (!temp)
+    {
+      DEBUG_puts("cupsAddAdd: allocation failed, returning 0");
+      return (0);
+    }
+
+    a->alloc_elements = count;
+    a->elements       = temp;
+  }
+
+ /*
+  * Find the insertion point for the new element; if there is no
+  * compare function or elements, just add it to the beginning or end...
+  */
+
+  if (!a->num_elements || !a->compare)
+  {
+   /*
+    * No elements or comparison function, insert/append as needed...
+    */
+
+    if (insert)
+      current = 0;                     /* Insert at beginning */
+    else
+      current = a->num_elements;       /* Append to the end */
+  }
+  else
+  {
+   /*
+    * Do a binary search for the insertion point...
+    */
+
+    current = cups_array_find(a, e, a->insert, &diff);
+
+    if (diff > 0)
+    {
+     /*
+      * Insert after the current element...
+      */
+
+      current ++;
+    }
+    else if (!diff)
+    {
+     /*
+      * Compared equal, make sure we add to the begining or end of
+      * the current run of equal elements...
+      */
+
+      a->unique = 0;
+
+      if (insert)
+      {
+       /*
+        * Insert at beginning of run...
+       */
+
+       while (current > 0 && !(*(a->compare))(e, a->elements[current - 1],
+                                               a->data))
+          current --;
+      }
+      else
+      {
+       /*
+        * Append at end of run...
+       */
+
+       do
+       {
+          current ++;
+       }
+       while (current < a->num_elements &&
+               !(*(a->compare))(e, a->elements[current], a->data));
+      }
+    }
+  }
+
+ /*
+  * Insert or append the element...
+  */
+
+  if (current < a->num_elements)
+  {
+   /*
+    * Shift other elements to the right...
+    */
+
+    memmove(a->elements + current + 1, a->elements + current,
+            (a->num_elements - current) * sizeof(void *));
+
+    if (a->current >= current)
+      a->current ++;
+
+    for (i = 0; i < a->num_saved; i ++)
+      if (a->saved[i] >= current)
+       a->saved[i] ++;
+
+    DEBUG_printf(("cups_array_add: insert element at index %d...\n", current));
+  }
+#ifdef DEBUG
+  else
+    printf("cups_array_add: append element at %d...\n", current);
+#endif /* DEBUG */
+
+  a->elements[current] = e;
+  a->num_elements ++;
+  a->insert = current;
+
+#ifdef DEBUG
+  for (current = 0; current < a->num_elements; current ++)
+    printf("cups_array_add: a->elements[%d]=%p\n", current, a->elements[current]);
+#endif /* DEBUG */
+
+  DEBUG_puts("cups_array_add: returning 1");
+
+  return (1);
+}
+
+
+/*
+ * 'cups_array_find()' - Find an element in the array...
  */
 
 static int                             /* O - Index of match */
-cups_find(cups_array_t *a,             /* I - Array */
-          void         *e,             /* I - Element */
-         int          prev,            /* I - Previous index */
-         int          *rdiff)          /* O - Difference of match */
+cups_array_find(cups_array_t *a,       /* I - Array */
+               void         *e,        /* I - Element */
+               int          prev,      /* I - Previous index */
+               int          *rdiff)    /* O - Difference of match */
 {
   int  left,                           /* Left side of search */
        right,                          /* Right side of search */
@@ -810,7 +822,7 @@ cups_find(cups_array_t *a,          /* I - Array */
        diff;                           /* Comparison with current element */
 
 
-  DEBUG_printf(("cups_find(a=%p, e=%p, prev=%d, rdiff=%p)\n", a, e, prev,
+  DEBUG_printf(("cups_array_find(a=%p, e=%p, prev=%d, rdiff=%p)\n", a, e, prev,
                 rdiff));
 
   if (a->compare)
@@ -819,7 +831,7 @@ cups_find(cups_array_t *a,          /* I - Array */
     * Do a binary search for the element...
     */
 
-    DEBUG_puts("cups_find: binary search");
+    DEBUG_puts("cups_array_find: binary search");
 
     if (prev >= 0 && prev < a->num_elements)
     {
@@ -835,7 +847,7 @@ cups_find(cups_array_t *a,          /* I - Array */
         * Exact or edge match, return it!
        */
 
-        DEBUG_printf(("cups_find: Returning %d, diff=%d\n", prev, diff));
+        DEBUG_printf(("cups_array_find: Returning %d, diff=%d\n", prev, diff));
 
        *rdiff = diff;
 
@@ -875,7 +887,7 @@ cups_find(cups_array_t *a,          /* I - Array */
       current = (left + right) / 2;
       diff    = (*(a->compare))(e, a->elements[current], a->data);
 
-      DEBUG_printf(("cups_find: left=%d, right=%d, current=%d, diff=%d\n",
+      DEBUG_printf(("cups_array_find: left=%d, right=%d, current=%d, diff=%d\n",
                     left, right, current, diff));
 
       if (diff == 0)
@@ -908,7 +920,7 @@ cups_find(cups_array_t *a,          /* I - Array */
     * Do a linear pointer search...
     */
 
-    DEBUG_puts("cups_find: linear search");
+    DEBUG_puts("cups_array_find: linear search");
 
     diff = 0;
 
@@ -921,7 +933,7 @@ cups_find(cups_array_t *a,          /* I - Array */
   * Return the closest element and the difference...
   */
 
-  DEBUG_printf(("cups_find: Returning %d, diff=%d\n", current, diff));
+  DEBUG_printf(("cups_array_find: Returning %d, diff=%d\n", current, diff));
 
   *rdiff = diff;
 
@@ -930,5 +942,5 @@ cups_find(cups_array_t *a,          /* I - Array */
 
 
 /*
- * End of "$Id: array.c 4970 2006-01-24 14:05:45Z mike $".
+ * End of "$Id: array.c 5119 2006-02-16 15:52:06Z mike $".
  */
index 36f911d0b03ff8ca56dccac7c4c4ae0bb9a49a3e..96b89ea056450d7594054ee7d93ad18909764d60 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * "$Id: attr.c 4785 2005-10-13 19:39:05Z mike $"
+ * "$Id: attr.c 5119 2006-02-16 15:52:06Z mike $"
  *
  *   PPD model-specific attribute routines for the Common UNIX Printing System
  *   (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
 #include <stdlib.h>
 
 
-/*
- * Private function...
- */
-
-extern int     _ppd_attr_compare(ppd_attr_t **a, ppd_attr_t **b);
-
-
 /*
  * 'ppdFindAttr()' - Find the first matching attribute...
  *
@@ -56,64 +49,30 @@ ppdFindAttr(ppd_file_t *ppd,        /* I - PPD file data */
             const char *name,  /* I - Attribute name */
             const char *spec)  /* I - Specifier string or NULL */
 {
-  ppd_attr_t   key,            /* Search key */
-               *keyptr,        /* Pointer to key */
-               **match;        /* Matching attribute */
+  ppd_attr_t   key;            /* Search key */
 
 
  /*
   * Range check input...
   */
 
-  if (ppd == NULL || name == NULL || ppd->num_attrs == 0)
+  if (!ppd || !name || ppd->num_attrs == 0)
     return (NULL);
 
  /*
-  * Do a binary search for a matching attribute...
+  * Search for a matching attribute...
   */
 
   memset(&key, 0, sizeof(key));
-  strncpy(key.name, name, sizeof(key.name) - 1);
+  strlcpy(key.name, name, sizeof(key.name));
   if (spec)
-    strncpy(key.spec, spec, sizeof(key.spec) - 1);
-
-  keyptr = &key;
-
-  match = bsearch(&keyptr, ppd->attrs, ppd->num_attrs, sizeof(ppd_attr_t *),
-                  (int (*)(const void *, const void *))_ppd_attr_compare);
-
-  if (match == NULL)
-  {
-   /* 
-    * No match!
-    */
-
-    ppd->cur_attr = -1;
-    return (NULL);
-  }
-
-  if (match > ppd->attrs && spec == NULL)
-  {
-   /*
-    * Find the first attribute with the same name...
-    */
-
-    while (match > ppd->attrs)
-    {
-      if (strcmp(match[-1]->name, name) != 0)
-        break;
-
-      match --;
-    }
-  }
+    strlcpy(key.spec, spec, sizeof(key.spec));
 
  /*
-  * Save the current attribute and return its value...
+  * Return the first matching attribute, if any...
   */
 
-  ppd->cur_attr = match - ppd->attrs;
-
-  return (*match);
+  return ((ppd_attr_t *)cupsArrayFind(ppd->sorted_attrs, &key));
 }
 
 
@@ -128,46 +87,36 @@ ppdFindNextAttr(ppd_file_t *ppd,   /* I - PPD file data */
                 const char *name,      /* I - Attribute name */
                const char *spec)       /* I - Specifier string or NULL */
 {
-  ppd_attr_t   **match;                /* Matching attribute */
+  ppd_attr_t   *attr;                  /* Current attribute */
 
 
  /*
   * Range check input...
   */
 
-  if (ppd == NULL || name == NULL || ppd->num_attrs == 0 || ppd->cur_attr < 0)
+  if (!ppd || !name || ppd->num_attrs == 0 ||
+      !cupsArrayCurrent(ppd->sorted_attrs))
     return (NULL);
 
  /*
   * See if there are more attributes to return...
   */
 
-  ppd->cur_attr ++;
-
-  if (ppd->cur_attr >= ppd->num_attrs)
-  {
-   /*
-    * Nope...
-    */
-
-    ppd->cur_attr = -1;
+  if ((attr = (ppd_attr_t *)cupsArrayNext(ppd->sorted_attrs)) == NULL)
     return (NULL);
-  }
 
  /*
   * Check the next attribute to see if it is a match...
   */
 
-  match = ppd->attrs + ppd->cur_attr;
-
-  if (strcmp((*match)->name, name) != 0 ||
-      (spec != NULL && strcmp((*match)->spec, spec) != 0))
+  if (strcasecmp(attr->name, name) || (spec && strcasecmp(attr->spec, spec)))
   {
    /*
-    * Nope...
+    * Nope, reset the current pointer to the end of the array...
     */
 
-    ppd->cur_attr = -1;
+    cupsArrayIndex(ppd->sorted_attrs, cupsArrayCount(ppd->sorted_attrs));
+
     return (NULL);
   }
   
@@ -175,10 +124,10 @@ ppdFindNextAttr(ppd_file_t *ppd,  /* I - PPD file data */
   * Return the next attribute's value...
   */
 
-  return (*match);
+  return (attr);
 }
 
 
 /*
- * End of "$Id: attr.c 4785 2005-10-13 19:39:05Z mike $".
+ * End of "$Id: attr.c 5119 2006-02-16 15:52:06Z mike $".
  */
index 3cb3a0def00497899d312a1d109f52387f274120..bdc18edba4ef16181271c86c25ef28766f8d6c8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: backchannel.c 4828 2005-11-11 12:53:38Z mike $"
+ * "$Id: backchannel.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   Backchannel functions for the Common UNIX Printing System (CUPS).
  *
@@ -64,7 +64,7 @@ static void   cups_setup(fd_set *set, struct timeval *tval,
  */
 
 int                                    /* O - Bytes read or -1 on error */
-cupsBackchannelRead(char   *buffer,    /* I - Buffer to read */
+cupsBackChannelRead(char   *buffer,    /* I - Buffer to read */
                     int    bytes,      /* I - Bytes to read */
                    double timeout)     /* I - Timeout in seconds */
 {
@@ -111,7 +111,7 @@ cupsBackchannelRead(char   *buffer, /* I - Buffer to read */
  */
 
 int                                    /* O - Bytes written or -1 on error */
-cupsBackchannelWrite(
+cupsBackChannelWrite(
     const char *buffer,                        /* I - Buffer to write */
     int        bytes,                  /* I - Bytes to write */
     double     timeout)                        /* I - Timeout in seconds */
@@ -197,5 +197,5 @@ cups_setup(fd_set         *set,             /* I - Set for select() */
 
 
 /*
- * End of "$Id: backchannel.c 4828 2005-11-11 12:53:38Z mike $".
+ * End of "$Id: backchannel.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 6263b82e662cd5f080cfa042250739fb71793adb..30ddcb17d43795521ac13942583f7e9fb32da073 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups.h 4973 2006-01-25 02:36:02Z mike $"
+ * "$Id: cups.h 5099 2006-02-13 02:46:10Z mike $"
  *
  *   API definitions for the Common UNIX Printing System (CUPS).
  *
@@ -218,8 +218,8 @@ extern int          cupsSetDests2(http_t *http, int num_dests,
                                      cups_dest_t *dests);
 
 /**** New in CUPS 1.2 ****/
-extern int             cupsBackchannelRead(char *buffer, int bytes, double timeout);
-extern int             cupsBackchannelWrite(const char *buffer, int bytes,
+extern int             cupsBackChannelRead(char *buffer, int bytes, double timeout);
+extern int             cupsBackChannelWrite(const char *buffer, int bytes,
                                             double timeout);
 extern void            cupsEncodeOptions2(ipp_t *ipp, int num_options,
                                           cups_option_t *options,
@@ -237,5 +237,5 @@ extern cups_file_t  *cupsTempFile2(char *filename, int len);
 #endif /* !_CUPS_CUPS_H_ */
 
 /*
- * End of "$Id: cups.h 4973 2006-01-25 02:36:02Z mike $".
+ * End of "$Id: cups.h 5099 2006-02-13 02:46:10Z mike $".
  */
index ac684afeefe5f2ec7f8f5530e6a1972e5923d539..e06edea91ccc34c20a6874c579b446fab0960ada 100644 (file)
@@ -391,7 +391,7 @@ cupsDirRead(cups_dir_t *dp)         /* I - Directory */
   strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename));
 
   snprintf(filename, sizeof(filename), "%s/%s", dp->directory, entry->d_name);
-  if (lstat(filename, &(dp->entry.fileinfo)))
+  if (stat(filename, &(dp->entry.fileinfo)))
   {
     DEBUG_printf(("    stat() failed for \"%s\" - %s...\n", filename,
                   strerror(errno)));
index 7fa67dd0f8c43b76590faf9f6b46554987383781..f914f14d023a8fd3782e7e68a7c3d6f820a0bdc4 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: emit.c 4980 2006-01-25 19:57:45Z mike $"
+ * "$Id: emit.c 5086 2006-02-07 02:45:26Z mike $"
  *
  *   PPD code emission routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -926,5 +926,5 @@ ppd_sort(ppd_choice_t **c1, /* I - First choice */
 
 
 /*
- * End of "$Id: emit.c 4980 2006-01-25 19:57:45Z mike $".
+ * End of "$Id: emit.c 5086 2006-02-07 02:45:26Z mike $".
  */
index af16f54816eeb895b349c071797d2f636a101774..071b29ea17d5062dec4bddf8833d879d06d3e602 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: encode.c 4977 2006-01-25 15:52:30Z mike $"
+ * "$Id: encode.c 5128 2006-02-17 18:59:03Z mike $"
  *
  *   Option encoding routines for the Common UNIX Printing System (CUPS).
  *
@@ -71,6 +71,7 @@ static const _ipp_option_t ipp_options[] =
   { "job-page-limit",          IPP_TAG_INTEGER,        IPP_TAG_JOB },
   { "job-priority",            IPP_TAG_INTEGER,        IPP_TAG_JOB },
   { "job-quota-period",                IPP_TAG_INTEGER,        IPP_TAG_JOB },
+  { "job-uuid",                        IPP_TAG_URI,            IPP_TAG_JOB },
   { "landscape",               IPP_TAG_BOOLEAN,        IPP_TAG_JOB },
   { "media",                   IPP_TAG_KEYWORD,        IPP_TAG_JOB },
   { "mirror",                  IPP_TAG_BOOLEAN,        IPP_TAG_JOB },
@@ -509,5 +510,5 @@ compare_ipp_options(_ipp_option_t *a,       /* I - First option */
 
 
 /*
- * End of "$Id: encode.c 4977 2006-01-25 15:52:30Z mike $".
+ * End of "$Id: encode.c 5128 2006-02-17 18:59:03Z mike $".
  */
index da1579fa840c94b00508948fc299e710716b290d..e14094a52decf0ece816fff068bd334abd3b2833 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: getputfile.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: getputfile.c 5103 2006-02-14 19:27:42Z mike $"
  *
  *   Get/put file functions for the Common UNIX Printing System (CUPS).
  *
@@ -260,7 +260,8 @@ cupsPutFd(http_t     *http,         /* I - HTTP connection to server */
           const char *resource,                /* I - Resource name */
          int        fd)                /* I - File descriptor */
 {
-  int          bytes;                  /* Number of bytes read */
+  int          bytes,                  /* Number of bytes read */
+               retries;                /* Number of retries */
   char         buffer[8192];           /* Buffer for file */
   http_status_t        status;                 /* HTTP status from server */
 
@@ -284,6 +285,8 @@ cupsPutFd(http_t     *http,         /* I - HTTP connection to server */
   * Then send PUT requests to the HTTP server...
   */
 
+  retries = 0;
+
   do
   {
     DEBUG_printf(("cupsPutFd: starting attempt, authstring=\"%s\"...\n",
@@ -331,6 +334,26 @@ cupsPutFd(http_t     *http,                /* I - HTTP connection to server */
       while ((status = httpUpdate(http)) == HTTP_CONTINUE);
     }
 
+    if (status == HTTP_ERROR && !retries)
+    {
+      DEBUG_printf(("cupsPutFd: retry on status %d\n", status));
+
+      retries ++;
+
+      /* Flush any error message... */
+      httpFlush(http);
+
+      /* Reconnect... */
+      if (httpReconnect(http))
+      {
+        status = HTTP_ERROR;
+        break;
+      }
+
+      /* Try again... */
+      continue;
+    }
+
     DEBUG_printf(("cupsPutFd: status=%d\n", status));
 
     if (status == HTTP_UNAUTHORIZED)
@@ -377,7 +400,8 @@ cupsPutFd(http_t     *http,         /* I - HTTP connection to server */
     }
 #endif /* HAVE_SSL */
   }
-  while (status == HTTP_UNAUTHORIZED || status == HTTP_UPGRADE_REQUIRED);
+  while (status == HTTP_UNAUTHORIZED || status == HTTP_UPGRADE_REQUIRED ||
+         (status == HTTP_ERROR && retries < 2));
 
  /*
   * See if we actually put the file or an error...
@@ -447,5 +471,5 @@ cupsPutFile(http_t     *http,               /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: getputfile.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: getputfile.c 5103 2006-02-14 19:27:42Z mike $".
  */
index 0a77b7ea6c111251d373ff1d7ffed580bca4287d..a6f06133ea0f9e8c37bf3cdd1d446e14f0f2281c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http-addrlist.c 4976 2006-01-25 15:07:40Z mike $"
+ * "$Id: http-addrlist.c 5103 2006-02-14 19:27:42Z mike $"
  *
  *   HTTP address list routines for the Common UNIX Printing System (CUPS).
  *
@@ -128,7 +128,11 @@ httpAddrConnect(
     * Close this socket and move to the next address...
     */
 
+#ifdef WIN32
     closesocket(*sock);
+#else
+    close(*sock);
+#endif /* WIN32 */
 
     addrlist = addrlist->next;
   }
@@ -589,5 +593,5 @@ httpAddrGetList(const char *hostname,       /* I - Hostname, IP address, or NULL for p
 
 
 /*
- * End of "$Id: http-addrlist.c 4976 2006-01-25 15:07:40Z mike $".
+ * End of "$Id: http-addrlist.c 5103 2006-02-14 19:27:42Z mike $".
  */
index fc6a20d077cbaad68bca2b038b6696f374ad9ce5..251fc3481ba9179e1bb882968fb1d056c14d3278 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: http.c 5103 2006-02-14 19:27:42Z mike $"
  *
  *   HTTP routines for the Common UNIX Printing System (CUPS).
  *
@@ -1311,12 +1311,16 @@ httpReconnect(http_t *http)             /* I - HTTP data */
   */
 
   if (http->fd >= 0)
+  {
 #ifdef WIN32
     closesocket(http->fd);
 #else
     close(http->fd);
 #endif /* WIN32 */
 
+    http->fd = -1;
+  }
+
  /*
   * Connect to the server...
   */
@@ -2573,5 +2577,5 @@ http_write_ssl(http_t     *http,  /* I - HTTP data */
 
 
 /*
- * End of "$Id: http.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: http.c 5103 2006-02-14 19:27:42Z mike $".
  */
index 8c1a82daab412e890abfdfbe8d2d48102312ad9c..9a08e6266bd41818bf85184ce397fe7f5a7d748e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp-support.c 4987 2006-01-26 00:25:21Z mike $"
+ * "$Id: ipp-support.c 5090 2006-02-08 17:08:01Z mike $"
  *
  *   Internet Printing Protocol support functions for the Common UNIX
  *   Printing System (CUPS).
@@ -55,7 +55,8 @@ static const char * const ipp_status_oks[] =  /* "OK" status codes */
                  "successful-ok-ignored-subscriptions",
                  "successful-ok-ignored-notifications",
                  "successful-ok-too-many-events",
-                 "successful-ok-but-cancel-subscription"
+                 "successful-ok-but-cancel-subscription",
+                 "successful-ok-events-complete"
                },
                * const ipp_status_400s[] =     /* Client errors */
                {
@@ -174,7 +175,7 @@ ippErrorString(ipp_status_t error)  /* I - Error status */
   * See if the error code is a known value...
   */
 
-  if (error >= IPP_OK && error <= IPP_OK_BUT_CANCEL_SUBSCRIPTION)
+  if (error >= IPP_OK && error <= IPP_OK_EVENTS_COMPLETE)
     return (ipp_status_oks[error]);
   else if (error == IPP_REDIRECTION_OTHER_SITE)
     return ("redirection-other-site");
@@ -326,5 +327,5 @@ ippSetPort(int p)                   /* I - Port number to use */
 
 
 /*
- * End of "$Id: ipp-support.c 4987 2006-01-26 00:25:21Z mike $".
+ * End of "$Id: ipp-support.c 5090 2006-02-08 17:08:01Z mike $".
  */
index 4a337a84e0e31397732c55a73cf0223e8a9cc926..ae8dd61c13ec4131baf9862a4639efbc8f1eaa1e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.h 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: ipp.h 5090 2006-02-08 17:08:01Z mike $"
  *
  *   Internet Printing Protocol definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -269,6 +269,7 @@ typedef enum                                /**** IPP status codes... ****/
   IPP_OK_IGNORED_NOTIFICATIONS,
   IPP_OK_TOO_MANY_EVENTS,
   IPP_OK_BUT_CANCEL_SUBSCRIPTION,
+  IPP_OK_EVENTS_COMPLETE,
   IPP_REDIRECTION_OTHER_SITE = 0x300,
   IPP_BAD_REQUEST = 0x0400,
   IPP_FORBIDDEN,
@@ -496,5 +497,5 @@ extern ipp_state_t  ippWriteIO(void *dst, ipp_iocb_t cb, int blocking,
 #endif /* !_CUPS_IPP_H_ */
 
 /*
- * End of "$Id: ipp.h 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: ipp.h 5090 2006-02-08 17:08:01Z mike $".
  */
index 3f8f2a8f9ddedaa30d83ff727648606126502fdc..169c38af9157cb220a1f419ee84b813ec4920b0c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: language.c 4985 2006-01-25 21:57:18Z mike $"
+ * "$Id: language.c 5109 2006-02-15 20:11:10Z mike $"
  *
  *   I18N/language support for the Common UNIX Printing System (CUPS).
  *
@@ -53,6 +53,7 @@
 #include "globals.h"
 #include "debug.h"
 #include <stdlib.h>
+#include <errno.h>
 #ifdef HAVE_LANGINFO_H
 #  include <langinfo.h>
 #endif /* HAVE_LANGINFO_H */
@@ -100,7 +101,7 @@ static const char * const lang_encodings[] =
                          "windows-1256",       "windows-1257",
                          "windows-1258",       "koi8-r",
                          "koi8-u",             "iso-8859-11",
-                         "iso-8859-16",        "unknown",
+                         "iso-8859-16",        "mac-roman",
                          "unknown",            "unknown",
                          "unknown",            "unknown",
                          "unknown",            "unknown",
@@ -290,7 +291,7 @@ cupsLangGet(const char *language)   /* I - Language or locale */
                  "CP1250",     "CP1251",       "CP1252",       "CP1253",
                  "CP1254",     "CP1255",       "CP1256",       "CP1257",
                  "CP1258",     "KOI8R",        "KOI8U",        "ISO885911",
-                 "ISO885916",  "",             "",             "",
+                 "ISO885916",  "MACROMAN",     "",             "",
 
                  "",           "",             "",             "",
                  "",           "",             "",             "",
@@ -523,7 +524,9 @@ cupsLangGet(const char *language)   /* I - Language or locale */
 
   if (charset[0])
   {
-    for (i = 0; i < (int)(sizeof(locale_encodings) / sizeof(locale_encodings[0])); i ++)
+    for (i = 0;
+         i < (int)(sizeof(locale_encodings) / sizeof(locale_encodings[0]));
+        i ++)
       if (!strcasecmp(charset, locale_encodings[i]))
       {
        encoding = (cups_encoding_t)i;
@@ -539,13 +542,18 @@ cupsLangGet(const char *language) /* I - Language or locale */
   * See if we already have this language/country loaded...
   */
 
-  snprintf(real, sizeof(real), "%s_%s", langname, country);
+  if (country[0])
+  {
+    snprintf(real, sizeof(real), "%s_%s", langname, country);
 
-  if ((lang = cups_cache_lookup(real, encoding)) != NULL)
-    return (lang);
+    if ((lang = cups_cache_lookup(real, encoding)) != NULL)
+      return (lang);
 
-  snprintf(filename, sizeof(filename), "%s/%s/cups_%s", cg->localedir,
-           real, real);
+    snprintf(filename, sizeof(filename), "%s/%s/cups_%s.po", cg->localedir,
+             real, real);
+  }
+  else
+    filename[0] = '\0';                        /* anti-compiler-warning-code */
 
   if (!country[0] || access(filename, 0))
   {
@@ -556,7 +564,7 @@ cupsLangGet(const char *language)   /* I - Language or locale */
     if ((lang = cups_cache_lookup(langname, encoding)) != NULL)
       return (lang);
 
-    snprintf(filename, sizeof(filename), "%s/%s/cups_%s", cg->localedir,
+    snprintf(filename, sizeof(filename), "%s/%s/cups_%s.po", cg->localedir,
              langname, langname);
 
     if (access(filename, 0))
@@ -565,8 +573,10 @@ cupsLangGet(const char *language)  /* I - Language or locale */
       * No generic localization, so use POSIX...
       */
 
+      DEBUG_printf(("access(\"%s\", 0): %s\n", filename, strerror(errno)));
+
       strcpy(real, "C");
-      snprintf(filename, sizeof(filename), "%s/C/cups_C", cg->localedir);
+      snprintf(filename, sizeof(filename), "%s/C/cups_C.po", cg->localedir);
     }
     else
       strcpy(real, langname);
@@ -593,12 +603,14 @@ cupsLangGet(const char *language) /* I - Language or locale */
     lang->next     = cg->lang_cache;
     cg->lang_cache = lang;
   }
+  else
+  {
+   /*
+    * Free all old strings as needed...
+    */
 
- /*
-  * Free all old strings as needed...
-  */
-
-  _cupsMessageFree(lang->strings);
+    _cupsMessageFree(lang->strings);
+  }
 
  /*
   * Then assign the language and encoding fields...
@@ -701,6 +713,8 @@ _cupsMessageLoad(const char *filename)      /* I - Message catalog to load */
   int                  length;         /* Length of combined strings */
 
 
+  DEBUG_printf(("_cupsMessageLoad(filename=\"%s\")\n", filename));
+
  /*
   * Create an array to hold the messages...
   */
@@ -723,10 +737,12 @@ _cupsMessageLoad(const char *filename)    /* I - Message catalog to load */
   *     msgid "some text"
   *     msgstr "localized text"
   *
-  * The localized text can span multiple lines using the form:
+  * The ID and localized text can span multiple lines using the form:
   *
-  *     msgid "some long text"
-  *     msgstr "localized text spanning "
+  *     msgid ""
+  *     "some long text"
+  *     msgstr ""
+  *     "localized text spanning "
   *     "multiple lines"
   */
 
@@ -771,6 +787,17 @@ _cupsMessageLoad(const char *filename)     /* I - Message catalog to load */
 
     if (!strncmp(s, "msgid", 5))
     {
+     /*
+      * Add previous message as needed...
+      */
+
+      if (m)
+        cupsArrayAdd(a, m);
+
+     /*
+      * Create a new message with the given msgid string...
+      */
+
       if ((m = (_cups_message_t *)calloc(1, sizeof(_cups_message_t))) == NULL)
       {
         cupsFileClose(fp);
@@ -778,44 +805,64 @@ _cupsMessageLoad(const char *filename)    /* I - Message catalog to load */
       }
 
       m->id = strdup(ptr);
-      cupsArrayAdd(a, m);
     }
-    else if ((s[0] == '\"' || !strncmp(s, "msgstr", 6)) && m)
+    else if (s[0] == '\"' && m)
     {
-      if (m->str)
-      {
-       /*
-       * Append the string...
-       */
+     /*
+      * Append to current string...
+      */
 
-       length = strlen(m->str);
+      length = strlen(m->str ? m->str : m->id);
 
-       if ((temp = realloc(m->str, length + strlen(ptr) + 1)) == NULL)
-       {
-         cupsFileClose(fp);
-         return (a);
-       }
-       else
-         m->str = temp;
+      if ((temp = realloc(m->str ? m->str : m->id,
+                          length + strlen(ptr) + 1)) == NULL)
+      {
+       cupsFileClose(fp);
+       return (a);
+      }
 
+      if (m->str)
+      {
        /*
-        * Copy the new portion at the end - safe because the buffer is
-       * allocated to the correct size...
+        * Copy the new portion to the end of the msgstr string - safe
+       * to use strcpy because the buffer is allocated to the correct
+       * size...
        */
 
+        m->str = temp;
+
        strcpy(m->str + length, ptr);
       }
       else
       {
        /*
-       * Set the string...
+        * Copy the new portion to the end of the msgid string - safe
+       * to use strcpy because the buffer is allocated to the correct
+       * size...
        */
 
-       m->str = strdup(ptr);
+        m->id = temp;
+
+       strcpy(m->id + length, ptr);
       }
     }
+    else if (!strncmp(s, "msgstr", 6) && m)
+    {
+     /*
+      * Set the string...
+      */
+
+      m->str = strdup(ptr);
+    }
   }
 
+ /*
+  * Add the last message string to the array as needed...
+  */
+
+  if (m)
+    cupsArrayAdd(a, m);
+
  /*
   * Close the message catalog file and return the new array...
   */
@@ -1249,5 +1296,5 @@ cups_unquote(char       *d,               /* O - Unquoted string */
 
 
 /*
- * End of "$Id: language.c 4985 2006-01-25 21:57:18Z mike $".
+ * End of "$Id: language.c 5109 2006-02-15 20:11:10Z mike $".
  */
index 1f697cc1d259a5bbf77701d71a34e31aa1a3ccc6..94f7bf81a622b4e1002690f3526dfe680aa26449 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: language.h 4903 2006-01-10 20:02:46Z mike $"
+ * "$Id: language.h 5085 2006-02-06 13:27:53Z mike $"
  *
  *   Multi-language support for the Common UNIX Printing System (CUPS).
  *
@@ -75,6 +75,7 @@ typedef enum cups_encoding_e          /**** Language Encodings ****/
   CUPS_KOI8_U,                         /* KOI-8-U */
   CUPS_ISO8859_11,                     /* ISO-8859-11 */
   CUPS_ISO8859_16,                     /* ISO-8859-16 */
+  CUPS_MAC_ROMAN,                      /* MacRoman */
   CUPS_ENCODING_SBCS_END = 63,         /* End of single-bybte encodings @private@ */
 
   CUPS_WINDOWS_932,                    /* Japanese JIS X0208-1990 */
@@ -118,5 +119,5 @@ extern cups_lang_t  *cupsLangGet(const char *language);
 #endif /* !_CUPS_LANGUAGE_H_ */
 
 /*
- * End of "$Id: language.h 4903 2006-01-10 20:02:46Z mike $".
+ * End of "$Id: language.h 5085 2006-02-06 13:27:53Z mike $".
  */
index 33202bda9c0a81fdd6c20672aabb7f5690959297..c901781db7230713e56e24a74be6a38b753e0e38 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: mark.c 4980 2006-01-25 19:57:45Z mike $"
+ * "$Id: mark.c 5119 2006-02-16 15:52:06Z mike $"
  *
  *   Option marking routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -31,6 +31,8 @@
  *   ppdFindChoice()       - Return a pointer to an option choice.
  *   ppdFindMarkedChoice() - Return the marked choice for the specified option.
  *   ppdFindOption()       - Return a pointer to the specified option.
+ *   ppdFirstOption()      - Return the first option in the PPD file.
+ *   ppdNextOption()       - Return the next option in the PPD file.
  *   ppdIsMarked()         - Check to see if an option is marked...
  *   ppdMarkDefaults()     - Mark all default options in the PPD file.
  *   ppdMarkOption()       - Mark an option in a PPD file.
@@ -323,6 +325,9 @@ ppdMarkOption(ppd_file_t *ppd,              /* I - PPD file record */
   ppd_choice_t *c;                     /* Choice pointer */
 
 
+  DEBUG_printf(("ppdMarkOption(ppd=%p, option=\"%s\", choice=\"%s\")\n",
+               ppd, option, choice));
+
  /*
   * Range check input...
   */
@@ -465,7 +470,7 @@ ppdMarkOption(ppd_file_t *ppd,              /* I - PPD file record */
          */
 
          for (j = 0; j < ppd->num_sizes; j ++)
-           ppd->sizes[i].marked = !strcasecmp(ppd->sizes[i].name,
+           ppd->sizes[j].marked = !strcasecmp(ppd->sizes[j].name,
                                               choice);
 
         /*
@@ -477,7 +482,7 @@ ppdMarkOption(ppd_file_t *ppd,              /* I - PPD file record */
          {
            if ((o = ppdFindOption(ppd, "PageRegion")) != NULL)
              for (j = 0; j < o->num_choices; j ++)
-               o->choices[i].marked = 0;
+               o->choices[j].marked = 0;
          }
          else
          {
@@ -519,6 +524,42 @@ ppdMarkOption(ppd_file_t *ppd,             /* I - PPD file record */
 }
 
 
+/*
+ * 'ppdFirstOption()' - Return the first option in the PPD file.
+ *
+ * Options are returned from all groups in sorted order.
+ *
+ * @since CUPS 1.2@
+ */
+
+ppd_option_t *                         /* O - First option or NULL */
+ppdFirstOption(ppd_file_t *ppd)                /* I - PPD file */
+{
+  if (!ppd)
+    return (NULL);
+  else
+    return ((ppd_option_t *)cupsArrayFirst(ppd->options));
+}
+
+
+/*
+ * 'ppdNextOption()' - Return the next option in the PPD file.
+ *
+ * Options are returned from all groups in sorted order.
+ *
+ * @since CUPS 1.2@
+ */
+
+ppd_option_t *                         /* O - Next option or NULL */
+ppdNextOption(ppd_file_t *ppd)         /* I - PPD file */
+{
+  if (!ppd)
+    return (NULL);
+  else
+    return ((ppd_option_t *)cupsArrayNext(ppd->options));
+}
+
+
 /*
  * 'ppd_defaults()' - Set the defaults for this group and all sub-groups.
  */
@@ -545,5 +586,5 @@ ppd_defaults(ppd_file_t  *ppd,      /* I - PPD file */
 
 
 /*
- * End of "$Id: mark.c 4980 2006-01-25 19:57:45Z mike $".
+ * End of "$Id: mark.c 5119 2006-02-16 15:52:06Z mike $".
  */
index 672ee27d3febe2722822e8af7bece94905a600ba..1b0ed647121074aed380990f6cd74e39208b4b42 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ppd.c 4990 2006-01-26 02:21:45Z mike $"
+ * "$Id: ppd.c 5119 2006-02-16 15:52:06Z mike $"
  *
  *   PPD file routines for the Common UNIX Printing System (CUPS).
  *
  *
  * Contents:
  *
- *   _ppd_attr_compare()    - Compare two attributes.
  *   ppdClose()             - Free all memory used by the PPD file.
  *   ppdErrorString()       - Returns the text assocated with a status.
  *   ppdLastError()         - Return the status from the last ppdOpen*().
  *   ppdOpen()              - Read a PPD file into memory.
+ *   ppdOpen2()             - Read a PPD file into memory.
  *   ppdOpenFd()            - Read a PPD file into memory.
  *   ppdOpenFile()          - Read a PPD file into memory.
  *   ppdSetConformance()    - Set the conformance level for PPD files.
  *   ppd_add_attr()         - Add an attribute to the PPD data.
  *   ppd_add_choice()       - Add a choice to an option.
  *   ppd_add_size()         - Add a page size.
+ *   ppd_compare_attrs()    - Compare two attributes.
  *   ppd_compare_coptions() - Compare two custom options.
  *   ppd_compare_cparams()  - Compare two custom parameters.
  *   ppd_compare_options()  - Compare two options.
@@ -97,7 +98,9 @@ static ppd_attr_t     *ppd_add_attr(ppd_file_t *ppd, const char *name,
                                      const char *value);
 static ppd_choice_t    *ppd_add_choice(ppd_option_t *option, const char *name);
 static ppd_size_t      *ppd_add_size(ppd_file_t *ppd, const char *name);
-static int             ppd_compare_coptions(ppd_coption_t *a, ppd_coption_t *b);
+static int             ppd_compare_attrs(ppd_attr_t *a, ppd_attr_t *b);
+static int             ppd_compare_coptions(ppd_coption_t *a,
+                                            ppd_coption_t *b);
 static int             ppd_compare_cparams(ppd_cparam_t *a, ppd_cparam_t *b);
 static int             ppd_compare_options(ppd_option_t *a, ppd_option_t *b);
 static int             ppd_decode(char *string);
@@ -115,26 +118,6 @@ static int         ppd_read(cups_file_t *fp, char *keyword, char *option,
                                 _cups_globals_t *cg);
 
 
-/*
- * '_ppd_attr_compare()' - Compare two attributes.
- */
-
-int                                    /* O - Result of comparison */
-_ppd_attr_compare(ppd_attr_t **a,      /* I - First attribute */
-                  ppd_attr_t **b)      /* I - Second attribute */
-{
-  int  ret;                            /* Result of comparison */
-
-
-  if ((ret = strcasecmp((*a)->name, (*b)->name)) != 0)
-    return (ret);
-  else if ((*a)->spec[0] && (*b)->spec[0])
-    return (strcasecmp((*a)->spec, (*b)->spec));
-  else
-    return (0);
-}
-
-
 /*
  * 'ppdClose()' - Free all memory used by the PPD file.
  */
@@ -442,6 +425,16 @@ ppdOpen2(cups_file_t *fp)          /* I - File to read from */
                                        /* Global data */
   static const char * const ui_keywords[] =
                        {
+#ifdef CUPS_USE_FULL_UI_KEYWORDS_LIST
+ /*
+  * Adobe defines some 41 keywords as "UI", meaning that they are
+  * user interface elements and that they should be treated as such
+  * even if the PPD creator doesn't use Open/CloseUI around them.
+  *
+  * Since this can cause previously invisible options to appear and
+  * confuse users, the default is to only treat the PageSize and
+  * PageRegion keywords this way.
+  */
                          /* Boolean keywords */
                          "BlackSubstitution",
                          "Booklet",
@@ -486,6 +479,10 @@ ppdOpen2(cups_file_t *fp)          /* I - File to read from */
                          "StapleWhen",
                          "StapleX",
                          "StapleY"
+#else /* !CUPS_USE_FULL_UI_KEYWORDS_LIST */
+                         "PageRegion",
+                         "PageSize"
+#endif /* CUPS_USE_FULL_UI_KEYWORDS_LIST */
                        };
 
 
@@ -651,17 +648,7 @@ ppdOpen2(cups_file_t *fp)          /* I - File to read from */
 
         if (!group)
        {
-          if (strcmp(keyword, "Collate") && strcmp(keyword, "Duplex") &&
-              strcmp(keyword, "InputSlot") && strcmp(keyword, "ManualFeed") &&
-              strcmp(keyword, "MediaType") && strcmp(keyword, "MediaColor") &&
-              strcmp(keyword, "MediaWeight") && strcmp(keyword, "OutputBin") &&
-              strcmp(keyword, "OutputMode") && strcmp(keyword, "OutputOrder") &&
-             strcmp(keyword, "PageSize") && strcmp(keyword, "PageRegion"))
-           group = ppd_get_group(ppd, "Extra", _("Extra"), cg);
-         else
-           group = ppd_get_group(ppd, "General", _("General"), cg);
-
-          if (group == NULL)
+          if ((group = ppd_get_group(ppd, "General", _("General"), cg)) == NULL)
            goto error;
 
           DEBUG_printf(("Adding to group %s...\n", group->text));
@@ -1158,17 +1145,7 @@ ppdOpen2(cups_file_t *fp)                /* I - File to read from */
         option = ppd_get_option(subgroup, name);
       else if (group == NULL)
       {
-        if (strcmp(name, "Collate") && strcmp(name, "Duplex") &&
-            strcmp(name, "InputSlot") && strcmp(name, "ManualFeed") &&
-            strcmp(name, "MediaType") && strcmp(name, "MediaColor") &&
-            strcmp(name, "MediaWeight") && strcmp(name, "OutputBin") &&
-            strcmp(name, "OutputMode") && strcmp(name, "OutputOrder") &&
-           strcmp(name, "PageSize") && strcmp(name, "PageRegion"))
-         group = ppd_get_group(ppd, "Extra", _("Extra"), cg);
-       else
-         group = ppd_get_group(ppd, "General", _("General"), cg);
-
-        if (group == NULL)
+       if ((group = ppd_get_group(ppd, "General", _("General"), cg)) == NULL)
          goto error;
 
         DEBUG_printf(("Adding to group %s...\n", group->text));
@@ -1727,14 +1704,6 @@ ppdOpen2(cups_file_t *fp)                /* I - File to read from */
     }
   }
 
- /*
-  * Sort the attributes...
-  */
-
-  if (ppd->num_attrs > 1)
-    qsort(ppd->attrs, ppd->num_attrs, sizeof(ppd_attr_t *),
-          (int (*)(const void *, const void *))_ppd_attr_compare);
-
  /*
   * Return the PPD file structure...
   */
@@ -1902,6 +1871,14 @@ ppd_add_attr(ppd_file_t *ppd,            /* I - PPD file data */
   if (ppd == NULL || name == NULL || spec == NULL)
     return (NULL);
 
+ /*
+  * Create the array as needed...
+  */
+
+  if (!ppd->sorted_attrs)
+    ppd->sorted_attrs = cupsArrayNew((cups_array_func_t)ppd_compare_attrs,
+                                     NULL);
+
  /*
   * Allocate memory for the new attribute...
   */
@@ -1933,6 +1910,12 @@ ppd_add_attr(ppd_file_t *ppd,            /* I - PPD file data */
   strlcpy(temp->text, text, sizeof(temp->text));
   temp->value = (char *)value;
 
+ /*
+  * Add the attribute to the sorted array...
+  */
+
+  cupsArrayAdd(ppd->sorted_attrs, temp);
+
  /*
   * Return the attribute...
   */
@@ -2002,6 +1985,26 @@ ppd_add_size(ppd_file_t *ppd,            /* I - PPD file */
 }
 
 
+/*
+ * 'ppd_compare_attrs()' - Compare two attributes.
+ */
+
+static int                             /* O - Result of comparison */
+ppd_compare_attrs(ppd_attr_t *a,       /* I - First attribute */
+                  ppd_attr_t *b)       /* I - Second attribute */
+{
+  int  ret;                            /* Result of comparison */
+
+
+  if ((ret = strcasecmp(a->name, b->name)) != 0)
+    return (ret);
+  else if (a->spec[0] && b->spec[0])
+    return (strcasecmp(a->spec, b->spec));
+  else
+    return (0);
+}
+
+
 /*
  * 'ppd_compare_coptions()' - Compare two custom options.
  */
@@ -2646,6 +2649,19 @@ ppd_read(cups_file_t    *fp,             /* I - File to read from */
 
     DEBUG_printf(("LINE = \"%s\"\n", line));
 
+   /*
+    * The dynamically created PPDs for older style Mac OS X
+    * drivers include a large blob of data inserted as comments
+    * at the end of the file.  As an optimization we can stop
+    * reading the PPD when we get to the start of this data.
+    */
+
+    if (!strcmp(line, "*%APLWORKSET START"))
+    {
+      free(line);
+      return (0);
+    }
+
     if (ch == EOF && lineptr == line)
     {
       free(line);
@@ -2880,5 +2896,5 @@ ppd_read(cups_file_t    *fp,              /* I - File to read from */
 
 
 /*
- * End of "$Id: ppd.c 4990 2006-01-26 02:21:45Z mike $".
+ * End of "$Id: ppd.c 5119 2006-02-16 15:52:06Z mike $".
  */
index 0ac53fa281fdb5da7f114e8e96fd3b6b686301d1..5d944af964cc9cf1d55db58372087d200c8c0a94 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ppd.h 4980 2006-01-25 19:57:45Z mike $"
+ * "$Id: ppd.h 5119 2006-02-16 15:52:06Z mike $"
  *
  *   PostScript Printer Description definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -311,13 +311,14 @@ typedef struct ppd_file_s         /**** PPD File ****/
   /**** New in CUPS 1.1.19 ****/
   char         *protocols;             /* Protocols (BCP, TBCP) string @since CUPS 1.1.19@ */
   char         *pcfilename;            /* PCFileName string @since CUPS 1.1.19@ */
-  int          num_attrs;              /* Number of attributes @since CUPS 1.1.19@ */
-  int          cur_attr;               /* Current attribute @since CUPS 1.1.19@ */
-  ppd_attr_t   **attrs;                /* Attributes @since CUPS 1.1.19@ */
+  int          num_attrs;              /* Number of attributes @since CUPS 1.1.19@ @private@ */
+  int          cur_attr;               /* Current attribute @since CUPS 1.1.19@ @private@ */
+  ppd_attr_t   **attrs;                /* Attributes @since CUPS 1.1.19@ @private@ */
 
   /**** New in CUPS 1.2 ****/
-  cups_array_t *options;               /* Option lookup array @since CUPS 1.2@ */
-  cups_array_t *coptions;              /* Custom options array @since CUPS 1.2@ */
+  cups_array_t *sorted_attrs;          /* Attribute lookup array @since CUPS 1.2@ @private@ */
+  cups_array_t *options;               /* Option lookup array @since CUPS 1.2@ @private@ */
+  cups_array_t *coptions;              /* Custom options array @since CUPS 1.2@ @private@ */
 } ppd_file_t;
 
 
@@ -373,7 +374,9 @@ extern ppd_coption_t        *ppdFindCustomOption(ppd_file_t *ppd,
 extern ppd_cparam_t    *ppdFindCustomParam(ppd_coption_t *opt,
                                            const char *name);
 extern ppd_cparam_t    *ppdFirstCustomParam(ppd_coption_t *opt);
+extern ppd_option_t    *ppdFirstOption(ppd_file_t *ppd);
 extern ppd_cparam_t    *ppdNextCustomParam(ppd_coption_t *opt);
+extern ppd_option_t    *ppdNextOption(ppd_file_t *ppd);
 extern int             ppdLocalize(ppd_file_t *ppd);
 extern ppd_file_t      *ppdOpen2(cups_file_t *fp);
 
@@ -388,5 +391,5 @@ extern ppd_file_t   *ppdOpen2(cups_file_t *fp);
 #endif /* !_CUPS_PPD_H_ */
 
 /*
- * End of "$Id: ppd.h 4980 2006-01-25 19:57:45Z mike $".
+ * End of "$Id: ppd.h 5119 2006-02-16 15:52:06Z mike $".
  */
index b1108effb3c40c967c1c5b26396869b3fef68a68..2ab77291050a98585961752de6f84ccb5ba71473 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: util.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: util.c 5064 2006-02-03 16:51:05Z mike $"
  *
  *   Printing utilities for the Common UNIX Printing System (CUPS).
  *
@@ -1531,6 +1531,7 @@ cupsPrintFiles2(http_t        *http,      /* I - HTTP connection */
   char         uri[HTTP_MAX_URI];      /* Printer URI */
   cups_lang_t  *language;              /* Language to use */
   int          jobid;                  /* New job ID */
+  const char   *base;                  /* Basename of current filename */
 
 
   DEBUG_printf(("cupsPrintFiles(http=%p, name=\"%s\", num_files=%d, "
@@ -1686,6 +1687,18 @@ cupsPrintFiles2(http_t        *http,     /* I - HTTP connection */
       ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
                    "requesting-user-name", NULL, cupsUser());
 
+     /*
+      * Add the original document filename...
+      */
+
+      if ((base = strrchr(files[i], '/')) != NULL)
+        base ++;
+      else
+        base = files[i];
+
+      ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "document-name",
+                   NULL, base);
+
      /*
       * Is this the last document?
       */
@@ -1990,5 +2003,5 @@ cups_set_error(ipp_status_t status,       /* I - IPP status code */
 
 
 /*
- * End of "$Id: util.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: util.c 5064 2006-02-03 16:51:05Z mike $".
  */
index 60383a9580245759e84eeef3a603744549086860..88c344f258e0f876097c2b5e726547878e7dddfd 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $"
+# "$Id: Makefile 5085 2006-02-06 13:27:53Z mike $"
 #
 #   Datafile makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1993-2005 by Easy Software Products.
+#   Copyright 1993-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 #   property of Easy Software Products and are protected by Federal
@@ -59,6 +59,7 @@ CHARMAPS =    \
                iso-8859-9.txt \
                koi8-r.txt \
                koi8-u.txt \
+               mac-roman.txt \
                unibreak.txt \
                uni-comb.txt \
                uni-fold.txt \
@@ -137,25 +138,25 @@ clean:
 #
 
 install:       all
-       $(INSTALL_DIR) $(DATADIR)/banners
+       $(INSTALL_DIR) -m 755 $(DATADIR)/banners
        for file in $(BANNERS); do \
                $(INSTALL_DATA) $$file $(DATADIR)/banners; \
        done
-       $(INSTALL_DIR) $(DATADIR)/charmaps
+       $(INSTALL_DIR) -m 755 $(DATADIR)/charmaps
        for file in $(CHARMAPS); do \
                $(INSTALL_DATA) $$file $(DATADIR)/charmaps; \
        done
-       $(INSTALL_DIR) $(DATADIR)/charsets
+       $(INSTALL_DIR) -m 755 $(DATADIR)/charsets
        for file in $(CHARSETS); do \
                $(INSTALL_DATA) $$file $(DATADIR)/charsets; \
        done
-       $(INSTALL_DIR) $(DATADIR)/data
+       $(INSTALL_DIR) -m 755 $(DATADIR)/data
        for file in $(DATAFILES); do \
                $(INSTALL_DATA) $$file $(DATADIR)/data; \
        done
-       $(INSTALL_DIR) $(DATADIR)/profiles
+       $(INSTALL_DIR) -m 755 $(DATADIR)/profiles
 
 
 #
-# End of "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $".
+# End of "$Id: Makefile 5085 2006-02-06 13:27:53Z mike $".
 #
diff --git a/data/mac-roman.txt b/data/mac-roman.txt
new file mode 100644 (file)
index 0000000..6e68bea
--- /dev/null
@@ -0,0 +1,223 @@
+0x20   0x0020 #        SPACE
+0x21   0x0021 #        EXCLAMATION MARK
+0x22   0x0022 #        QUOTATION MARK
+0x23   0x0023 #        NUMBER SIGN
+0x24   0x0024 #        DOLLAR SIGN
+0x25   0x0025 #        PERCENT SIGN
+0x26   0x0026 #        AMPERSAND
+0x27   0x0027 #        APOSTROPHE
+0x28   0x0028 #        LEFT PARENTHESIS
+0x29   0x0029 #        RIGHT PARENTHESIS
+0x2A   0x002A #        ASTERISK
+0x2B   0x002B #        PLUS SIGN
+0x2C   0x002C #        COMMA
+0x2D   0x002D #        HYPHEN-MINUS
+0x2E   0x002E #        FULL STOP
+0x2F   0x002F #        SOLIDUS
+0x30   0x0030 #        DIGIT ZERO
+0x31   0x0031 #        DIGIT ONE
+0x32   0x0032 #        DIGIT TWO
+0x33   0x0033 #        DIGIT THREE
+0x34   0x0034 #        DIGIT FOUR
+0x35   0x0035 #        DIGIT FIVE
+0x36   0x0036 #        DIGIT SIX
+0x37   0x0037 #        DIGIT SEVEN
+0x38   0x0038 #        DIGIT EIGHT
+0x39   0x0039 #        DIGIT NINE
+0x3A   0x003A #        COLON
+0x3B   0x003B #        SEMICOLON
+0x3C   0x003C #        LESS-THAN SIGN
+0x3D   0x003D #        EQUALS SIGN
+0x3E   0x003E #        GREATER-THAN SIGN
+0x3F   0x003F #        QUESTION MARK
+0x40   0x0040 #        COMMERCIAL AT
+0x41   0x0041 #        LATIN CAPITAL LETTER A
+0x42   0x0042 #        LATIN CAPITAL LETTER B
+0x43   0x0043 #        LATIN CAPITAL LETTER C
+0x44   0x0044 #        LATIN CAPITAL LETTER D
+0x45   0x0045 #        LATIN CAPITAL LETTER E
+0x46   0x0046 #        LATIN CAPITAL LETTER F
+0x47   0x0047 #        LATIN CAPITAL LETTER G
+0x48   0x0048 #        LATIN CAPITAL LETTER H
+0x49   0x0049 #        LATIN CAPITAL LETTER I
+0x4A   0x004A #        LATIN CAPITAL LETTER J
+0x4B   0x004B #        LATIN CAPITAL LETTER K
+0x4C   0x004C #        LATIN CAPITAL LETTER L
+0x4D   0x004D #        LATIN CAPITAL LETTER M
+0x4E   0x004E #        LATIN CAPITAL LETTER N
+0x4F   0x004F #        LATIN CAPITAL LETTER O
+0x50   0x0050 #        LATIN CAPITAL LETTER P
+0x51   0x0051 #        LATIN CAPITAL LETTER Q
+0x52   0x0052 #        LATIN CAPITAL LETTER R
+0x53   0x0053 #        LATIN CAPITAL LETTER S
+0x54   0x0054 #        LATIN CAPITAL LETTER T
+0x55   0x0055 #        LATIN CAPITAL LETTER U
+0x56   0x0056 #        LATIN CAPITAL LETTER V
+0x57   0x0057 #        LATIN CAPITAL LETTER W
+0x58   0x0058 #        LATIN CAPITAL LETTER X
+0x59   0x0059 #        LATIN CAPITAL LETTER Y
+0x5A   0x005A #        LATIN CAPITAL LETTER Z
+0x5B   0x005B #        LEFT SQUARE BRACKET
+0x5C   0x005C #        REVERSE SOLIDUS
+0x5D   0x005D #        RIGHT SQUARE BRACKET
+0x5E   0x005E #        CIRCUMFLEX ACCENT
+0x5F   0x005F #        LOW LINE
+0x60   0x0060 #        GRAVE ACCENT
+0x61   0x0061 #        LATIN SMALL LETTER A
+0x62   0x0062 #        LATIN SMALL LETTER B
+0x63   0x0063 #        LATIN SMALL LETTER C
+0x64   0x0064 #        LATIN SMALL LETTER D
+0x65   0x0065 #        LATIN SMALL LETTER E
+0x66   0x0066 #        LATIN SMALL LETTER F
+0x67   0x0067 #        LATIN SMALL LETTER G
+0x68   0x0068 #        LATIN SMALL LETTER H
+0x69   0x0069 #        LATIN SMALL LETTER I
+0x6A   0x006A #        LATIN SMALL LETTER J
+0x6B   0x006B #        LATIN SMALL LETTER K
+0x6C   0x006C #        LATIN SMALL LETTER L
+0x6D   0x006D #        LATIN SMALL LETTER M
+0x6E   0x006E #        LATIN SMALL LETTER N
+0x6F   0x006F #        LATIN SMALL LETTER O
+0x70   0x0070 #        LATIN SMALL LETTER P
+0x71   0x0071 #        LATIN SMALL LETTER Q
+0x72   0x0072 #        LATIN SMALL LETTER R
+0x73   0x0073 #        LATIN SMALL LETTER S
+0x74   0x0074 #        LATIN SMALL LETTER T
+0x75   0x0075 #        LATIN SMALL LETTER U
+0x76   0x0076 #        LATIN SMALL LETTER V
+0x77   0x0077 #        LATIN SMALL LETTER W
+0x78   0x0078 #        LATIN SMALL LETTER X
+0x79   0x0079 #        LATIN SMALL LETTER Y
+0x7A   0x007A #        LATIN SMALL LETTER Z
+0x7B   0x007B #        LEFT CURLY BRACKET
+0x7C   0x007C #        VERTICAL LINE
+0x7D   0x007D #        RIGHT CURLY BRACKET
+0x7E   0x007E #        TILDE
+0x80   0x00C4 #        LATIN CAPITAL LETTER A WITH DIAERESIS
+0x81   0x00C5 #        LATIN CAPITAL LETTER A WITH RING ABOVE
+0x82   0x00C7 #        LATIN CAPITAL LETTER C WITH CEDILLA
+0x83   0x00C9 #        LATIN CAPITAL LETTER E WITH ACUTE
+0x84   0x00D1 #        LATIN CAPITAL LETTER N WITH TILDE
+0x85   0x00D6 #        LATIN CAPITAL LETTER O WITH DIAERESIS
+0x86   0x00DC #        LATIN CAPITAL LETTER U WITH DIAERESIS
+0x87   0x00E1 #        LATIN SMALL LETTER A WITH ACUTE
+0x88   0x00E0 #        LATIN SMALL LETTER A WITH GRAVE
+0x89   0x00E2 #        LATIN SMALL LETTER A WITH CIRCUMFLEX
+0x8A   0x00E4 #        LATIN SMALL LETTER A WITH DIAERESIS
+0x8B   0x00E3 #        LATIN SMALL LETTER A WITH TILDE
+0x8C   0x00E5 #        LATIN SMALL LETTER A WITH RING ABOVE
+0x8D   0x00E7 #        LATIN SMALL LETTER C WITH CEDILLA
+0x8E   0x00E9 #        LATIN SMALL LETTER E WITH ACUTE
+0x8F   0x00E8 #        LATIN SMALL LETTER E WITH GRAVE
+0x90   0x00EA #        LATIN SMALL LETTER E WITH CIRCUMFLEX
+0x91   0x00EB #        LATIN SMALL LETTER E WITH DIAERESIS
+0x92   0x00ED #        LATIN SMALL LETTER I WITH ACUTE
+0x93   0x00EC #        LATIN SMALL LETTER I WITH GRAVE
+0x94   0x00EE #        LATIN SMALL LETTER I WITH CIRCUMFLEX
+0x95   0x00EF #        LATIN SMALL LETTER I WITH DIAERESIS
+0x96   0x00F1 #        LATIN SMALL LETTER N WITH TILDE
+0x97   0x00F3 #        LATIN SMALL LETTER O WITH ACUTE
+0x98   0x00F2 #        LATIN SMALL LETTER O WITH GRAVE
+0x99   0x00F4 #        LATIN SMALL LETTER O WITH CIRCUMFLEX
+0x9A   0x00F6 #        LATIN SMALL LETTER O WITH DIAERESIS
+0x9B   0x00F5 #        LATIN SMALL LETTER O WITH TILDE
+0x9C   0x00FA #        LATIN SMALL LETTER U WITH ACUTE
+0x9D   0x00F9 #        LATIN SMALL LETTER U WITH GRAVE
+0x9E   0x00FB #        LATIN SMALL LETTER U WITH CIRCUMFLEX
+0x9F   0x00FC #        LATIN SMALL LETTER U WITH DIAERESIS
+0xA0   0x2020 #        DAGGER
+0xA1   0x00B0 #        DEGREE SIGN
+0xA2   0x00A2 #        CENT SIGN
+0xA3   0x00A3 #        POUND SIGN
+0xA4   0x00A7 #        SECTION SIGN
+0xA5   0x2022 #        BULLET
+0xA6   0x00B6 #        PILCROW SIGN
+0xA7   0x00DF #        LATIN SMALL LETTER SHARP S
+0xA8   0x00AE #        REGISTERED SIGN
+0xA9   0x00A9 #        COPYRIGHT SIGN
+0xAA   0x2122 #        TRADE MARK SIGN
+0xAB   0x00B4 #        ACUTE ACCENT
+0xAC   0x00A8 #        DIAERESIS
+0xAD   0x2260 #        NOT EQUAL TO
+0xAE   0x00C6 #        LATIN CAPITAL LETTER AE
+0xAF   0x00D8 #        LATIN CAPITAL LETTER O WITH STROKE
+0xB0   0x221E #        INFINITY
+0xB1   0x00B1 #        PLUS-MINUS SIGN
+0xB2   0x2264 #        LESS-THAN OR EQUAL TO
+0xB3   0x2265 #        GREATER-THAN OR EQUAL TO
+0xB4   0x00A5 #        YEN SIGN
+0xB5   0x00B5 #        MICRO SIGN
+0xB6   0x2202 #        PARTIAL DIFFERENTIAL
+0xB7   0x2211 #        N-ARY SUMMATION
+0xB8   0x220F #        N-ARY PRODUCT
+0xB9   0x03C0 #        GREEK SMALL LETTER PI
+0xBA   0x222B #        INTEGRAL
+0xBB   0x00AA #        FEMININE ORDINAL INDICATOR
+0xBC   0x00BA #        MASCULINE ORDINAL INDICATOR
+0xBD   0x2126 #        OHM SIGN
+0xBE   0x00E6 #        LATIN SMALL LETTER AE
+0xBF   0x00F8 #        LATIN SMALL LETTER O WITH STROKE
+0xC0   0x00BF #        INVERTED QUESTION MARK
+0xC1   0x00A1 #        INVERTED EXCLAMATION MARK
+0xC2   0x00AC #        NOT SIGN
+0xC3   0x221A #        SQUARE ROOT
+0xC4   0x0192 #        LATIN SMALL LETTER F WITH HOOK
+0xC5   0x2248 #        ALMOST EQUAL TO
+0xC6   0x2206 #        INCREMENT
+0xC7   0x00AB #        LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xC8   0x00BB #        RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+0xC9   0x2026 #        HORIZONTAL ELLIPSIS
+0xCA   0x00A0 #        NO-BREAK SPACE
+0xCB   0x00C0 #        LATIN CAPITAL LETTER A WITH GRAVE
+0xCC   0x00C3 #        LATIN CAPITAL LETTER A WITH TILDE
+0xCD   0x00D5 #        LATIN CAPITAL LETTER O WITH TILDE
+0xCE   0x0152 #        LATIN CAPITAL LIGATURE OE
+0xCF   0x0153 #        LATIN SMALL LIGATURE OE
+0xD0   0x2013 #        EN DASH
+0xD1   0x2014 #        EM DASH
+0xD2   0x201C #        LEFT DOUBLE QUOTATION MARK
+0xD3   0x201D #        RIGHT DOUBLE QUOTATION MARK
+0xD4   0x2018 #        LEFT SINGLE QUOTATION MARK
+0xD5   0x2019 #        RIGHT SINGLE QUOTATION MARK
+0xD6   0x00F7 #        DIVISION SIGN
+0xD7   0x25CA #        LOZENGE
+0xD8   0x00FF #        LATIN SMALL LETTER Y WITH DIAERESIS
+0xD9   0x0178 #        LATIN CAPITAL LETTER Y WITH DIAERESIS
+0xDA   0x2044 #        FRACTION SLASH
+0xDB   0x00A4 #        CURRENCY SIGN
+0xDC   0x2039 #        SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+0xDD   0x203A #        SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+0xDE   0xFB01 #        LATIN SMALL LIGATURE FI
+0xDF   0xFB02 #        LATIN SMALL LIGATURE FL
+0xE0   0x2021 #        DOUBLE DAGGER
+0xE1   0x00B7 #        MIDDLE DOT
+0xE2   0x201A #        SINGLE LOW-9 QUOTATION MARK
+0xE3   0x201E #        DOUBLE LOW-9 QUOTATION MARK
+0xE4   0x2030 #        PER MILLE SIGN
+0xE5   0x00C2 #        LATIN CAPITAL LETTER A WITH CIRCUMFLEX
+0xE6   0x00CA #        LATIN CAPITAL LETTER E WITH CIRCUMFLEX
+0xE7   0x00C1 #        LATIN CAPITAL LETTER A WITH ACUTE
+0xE8   0x00CB #        LATIN CAPITAL LETTER E WITH DIAERESIS
+0xE9   0x00C8 #        LATIN CAPITAL LETTER E WITH GRAVE
+0xEA   0x00CD #        LATIN CAPITAL LETTER I WITH ACUTE
+0xEB   0x00CE #        LATIN CAPITAL LETTER I WITH CIRCUMFLEX
+0xEC   0x00CF #        LATIN CAPITAL LETTER I WITH DIAERESIS
+0xED   0x00CC #        LATIN CAPITAL LETTER I WITH GRAVE
+0xEE   0x00D3 #        LATIN CAPITAL LETTER O WITH ACUTE
+0xEF   0x00D4 #        LATIN CAPITAL LETTER O WITH CIRCUMFLEX
+0xF0   0x2665 #        BLACK HEART SUIT
+0xF1   0x00D2 #        LATIN CAPITAL LETTER O WITH GRAVE
+0xF2   0x00DA #        LATIN CAPITAL LETTER U WITH ACUTE
+0xF3   0x00DB #        LATIN CAPITAL LETTER U WITH CIRCUMFLEX
+0xF4   0x00D9 #        LATIN CAPITAL LETTER U WITH GRAVE
+0xF5   0x0131 #        LATIN SMALL LETTER DOTLESS I
+0xF6   0x02C6 #        MODIFIER LETTER CIRCUMFLEX ACCENT
+0xF7   0x02DC #        SMALL TILDE
+0xF8   0x00AF #        MACRON
+0xF9   0x02D8 #        BREVE
+0xFA   0x02D9 #        DOT ABOVE
+0xFB   0x02DA #        RING ABOVE
+0xFC   0x00B8 #        CEDILLA
+0xFD   0x02DD #        DOUBLE ACUTE ACCENT
+0xFE   0x02DB #        OGONEK
+0xFF   0x02C7 #        CARON
index 3482b78a876e64f9b2e3c36019d8836dfc4754e3..373f5b09cfc4108ea0e59727ca9b882c6063e14a 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 5054 2006-02-02 18:16:27Z mike $"
+# "$Id: Makefile 5124 2006-02-17 16:05:21Z mike $"
 #
 #   Documentation makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1993-2005 by Easy Software Products.
+#   Copyright 1993-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 #   property of Easy Software Products and are protected by Federal
@@ -28,30 +28,24 @@ include ../Makedefs
 # Document files...
 #
 
+LANGUAGES      =       ja
 WEBPAGES       =       cups.css cupsdoc.css index.html robots.txt
-WEBIMAGES      =       \
-                       favicon.ico \
+WEBBUTTONS     =       \
                        images/accept-jobs.gif \
                        images/add-class.gif \
                        images/add-printer.gif \
                        images/add-this-printer.gif \
-                       images/bottom-left.gif \
-                       images/bottom-right.gif \
                        images/cancel.gif \
                        images/cancel-all-jobs.gif \
                        images/cancel-job.gif \
                        images/change-settings.gif \
-                       images/classes.gif \
                        images/continue.gif \
                        images/delete-class.gif \
                        images/delete-printer.gif \
                        images/edit-configuration-file.gif \
-                       images/esp-logo.gif \
                        images/export-samba.gif \
-                       images/happy.gif \
                        images/help.gif \
                        images/hold-job.gif \
-                       images/logo.gif \
                        images/manage-classes.gif \
                        images/manage-jobs.gif \
                        images/manage-printers.gif \
@@ -60,9 +54,6 @@ WEBIMAGES     =       \
                        images/modify-printer.gif \
                        images/move-job.gif \
                        images/move-jobs.gif \
-                       images/printer-idle.gif \
-                       images/printer-processing.gif \
-                       images/printer-stopped.gif \
                        images/print-test-page.gif \
                        images/publish-printer.gif \
                        images/reject-jobs.gif \
@@ -84,16 +75,27 @@ WEBIMAGES   =       \
                        images/start-printer.gif \
                        images/stop-class.gif \
                        images/stop-printer.gif \
-                       images/tab-left.gif \
-                       images/tab-right.gif \
-                       images/top-left.gif \
-                       images/top-middle.gif \
-                       images/top-right.gif \
                        images/unpublish-printer.gif \
                        images/use-default-config.gif \
                        images/view-access-log.gif \
                        images/view-error-log.gif \
                        images/view-page-log.gif
+WEBIMAGES      =       \
+                       favicon.ico \
+                       images/bottom-left.gif \
+                       images/bottom-right.gif \
+                       images/classes.gif \
+                       images/esp-logo.gif \
+                       images/happy.gif \
+                       images/logo.gif \
+                       images/printer-idle.gif \
+                       images/printer-processing.gif \
+                       images/printer-stopped.gif \
+                       images/tab-left.gif \
+                       images/tab-right.gif \
+                       images/top-left.gif \
+                       images/top-middle.gif \
+                       images/top-right.gif
 HELPFILES      =       \
                        help/access_log-reference.html \
                        help/api-array.html \
@@ -111,9 +113,12 @@ HELPFILES  =       \
                        help/subscriptions-conf-reference.html \
                        help/man-accept.html \
                        help/man-backend.html \
+                       help/man-cancel.html \
+                       help/man-classes.conf.html \
                        help/man-cupsaddsmb.html \
                        help/man-cups-config.html \
                        help/man-cupsd.html \
+                       help/man-cupsd.conf.html \
                        help/man-cupsenable.html \
                        help/man-cups-lpd.html \
                        help/man-cups-polld.html \
@@ -130,6 +135,9 @@ HELPFILES   =       \
                        help/man-lpr.html \
                        help/man-lprm.html \
                        help/man-lpstat.html \
+                       help/man-mime.convs.html \
+                       help/man-mime.types.html \
+                       help/man-printers.conf.html \
                        help/network.html \
                        help/overview.html \
                        help/spec-ipp.html \
@@ -157,18 +165,25 @@ clean:
 #
 
 install:       all
-       $(INSTALL_DIR) $(DOCDIR)
+       $(INSTALL_DIR) -m 755 $(DOCDIR)
        for file in $(WEBPAGES); do \
                $(INSTALL_MAN) $$file $(DOCDIR); \
        done
-       $(INSTALL_DIR) $(DOCDIR)/help
+       $(INSTALL_DIR) -m 755 $(DOCDIR)/help
        for file in $(HELPFILES); do \
                $(INSTALL_MAN) $$file $(DOCDIR)/help; \
        done
-       $(INSTALL_DIR) $(DOCDIR)/images
-       for file in $(WEBIMAGES); do \
+       $(INSTALL_DIR) -m 755 $(DOCDIR)/images
+       for file in $(WEBIMAGES) $(WEBBUTTONS); do \
                $(INSTALL_MAN) $$file $(DOCDIR)/images; \
        done
+       for lang in $(LANGUAGES); do \
+               $(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang/images; \
+               $(INSTALL_MAN) $$lang/index.html $(DOCDIR)/$$lang; \
+               for file in $(WEBBUTTONS); do \
+                       $(INSTALL_MAN) $$lang/$$file $(DOCDIR)/$$lang/images; \
+               done \
+       done
 
 
 #
index fe76ae63355da6290275284eb98d404112fe2b55..8ffb8e7d1ba3c79b6d7abafc2940201e0546a5a9 100644 (file)
@@ -20,7 +20,7 @@ PRE {
 }
 
 PRE.command {
-  margin-left: 3em;
+  margin-left: 36pt;
 }
 
 PRE EM {
@@ -30,13 +30,13 @@ PRE EM {
 P.command {
   color: #7f0000;
   font-family: monospace;
-  margin-left: 3em;
+  margin-left: 36pt;
 }
 
 BLOCKQUOTE {
   background: #cccc99;
   border: solid thin #999966;
-  padding: 10px;
+  padding: 10pt;
 }
 
 A:link, A:visited {
@@ -57,7 +57,7 @@ A.sel, TR.sel {
 }
 
 TR.sel TD {
-  padding: 4;
+  padding: 4pt;
 }
 
 A.unsel {
@@ -76,7 +76,7 @@ INPUT[TYPE="TEXT"], TEXTAREA {
 
 INPUT[TYPE="IMAGE"] {
   border: none;
-  padding: 2;
+  padding: 2pt;
   vertical-align: bottom;
 }
 
@@ -91,25 +91,25 @@ TR.header, TR.header TH, TH.header, TR.trailer, TR.trailer TH, TH.trailer {
 TR.page, TD.page {
   background-color: #eeeebb;
   height: 100%;
-  padding-top: 20px;
-  padding-bottom: 20px;
+  padding-top: 20pt;
+  padding-bottom: 20pt;
 }
 
 TR.data, TD.data, TR.data TD {
   padding: 5;
-  border-bottom: solid 2px #000000;
+  border-bottom: solid 2pt #000000;
 }
 
 TR.data TH {
-  border-bottom: solid 2px #000000;
-  padding-top: 10;
-  padding-left: 5;
+  border-bottom: solid 2pt #000000;
+  padding-top: 10pt;
+  padding-left: 5pt;
   text-align: left;
 }
 
 DIV.table TABLE {
   border: solid thin #999966;
-  border-spacing: 0px;
+  border-spacing: 0;
   margin-left: auto;
   margin-right: auto;
 }
@@ -125,7 +125,7 @@ DIV.table CAPTION {
 
 DIV.table TABLE TD {
   border: solid thin #bbbb88;
-  padding-top: 5px;
+  padding-top: 5pt;
 }
 
 DIV.table TABLE TH {
@@ -135,7 +135,7 @@ DIV.table TABLE TH {
 }
 
 TH.label {
-  padding-top: 10;
+  padding-top: 10pt;
   text-align: right;
   vertical-align: top;
 }
@@ -164,12 +164,12 @@ H3 SPAN.info {
 }
 
 H2.title, H3.title {
-  border-bottom: solid 2px #000000;
+  border-bottom: solid 2pt #000000;
 }
 
 IMG.button {
   border: none;
-  padding: 2;
+  padding: 2pt;
   vertical-align: middle;
 }
 
@@ -177,8 +177,8 @@ DIV.sidebar {
   background: #ddddaa;
   border: solid 2px #cccc99;
   float: right;
-  margin-left: 10px;
-  padding: 5;
+  margin-left: 10pt;
+  padding: 5pt;
   width: 25%;
 }
 
@@ -186,44 +186,44 @@ DIV.sidebar P.l0 {
   margin-bottom: 0;
   margin-left: 0;
   margin-right: 0;
-  margin-top: 1em;
+  margin-top: 12pt;
 }
 
 DIV.sidebar P.l1 {
   margin-bottom: 0;
-  margin-left: 3em;
+  margin-left: 36pt;
   margin-right: 0;
   margin-top: 0;
-  text-indent: -2em;
+  text-indent: -18pt;
 }
 
 DIV.sidebar P.l2 {
   font-style: italic;
   margin-bottom: 0;
-  margin-left: 4em;
+  margin-left: 54pt;
   margin-right: 0;
   margin-top: 0;
-  text-indent: -2em;
+  text-indent: -18pt;
 }
 
 TABLE.pager {
   background: #cccc99;
   border: solid thin #999966;
-  margin-top: 10px;
-  padding: 2px;
+  margin-top: 10pt;
+  padding: 2pt;
 }
 
 DT {
-  margin-left: 3em;
-  margin-top: 1em;
+  margin-left: 36pt;
+  margin-top: 12pt;
 }
 
 DD {
-  margin-left: 5em;
+  margin-left: 54pt;
 }
 
 P.summary {
-  margin-left: 5em;
+  margin-left: 54pt;
   font-family: monospace;
 }
 
index 348afa573d9d69914adcc30b4d593e9f17ffd65f..a36626aff510f1fc8b285f25670190c533d3f46a 100644 (file)
@@ -5,6 +5,22 @@
 </HEAD>
 <BODY>
 
+<!-- MISSING:
+
+BrowseLocalProtocols
+BrowseRemoteProtocols
+DefaultAuthType
+DefaultPolicy
+FilterNice
+JobRetryInterval
+JobRetryLimit
+PassEnv
+Policy
+ServerTokens
+SetEnv
+
+-->
+
 <P>The <VAR>/etc/cups/cupsd.conf</VAR> file contains
 configuration <I>directives</I> that control how the server
 functions. Each directive is listed on a line by itself followed
index 8864d1a0be6a5a5deb2ba1a400937164f41b370c..1c32e7ad3df759045e4418bc10f5e67cf2410f86 100644 (file)
@@ -3,7 +3,8 @@
 <HEAD>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
        <TITLE>Home - CUPS @CUPS_VERSION@</TITLE>
-       <LINK REL=STYLESHEET TYPE="text/css" HREF="/cups.css">
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
+       <LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
 </HEAD>
 <BODY>
 <TABLE WIDTH="100%" STYLE="height: 100%;" BORDER="0" CELLSPACING="0" CELLPADDING="0" SUMMARY="Common UNIX Printing System @CUPS_VERSION@">
diff --git a/doc/ja/images/accept-jobs.gif b/doc/ja/images/accept-jobs.gif
new file mode 100644 (file)
index 0000000..7ee4db6
Binary files /dev/null and b/doc/ja/images/accept-jobs.gif differ
diff --git a/doc/ja/images/add-class.gif b/doc/ja/images/add-class.gif
new file mode 100644 (file)
index 0000000..aa046eb
Binary files /dev/null and b/doc/ja/images/add-class.gif differ
diff --git a/doc/ja/images/add-printer.gif b/doc/ja/images/add-printer.gif
new file mode 100644 (file)
index 0000000..19869c6
Binary files /dev/null and b/doc/ja/images/add-printer.gif differ
diff --git a/doc/ja/images/add-this-printer.gif b/doc/ja/images/add-this-printer.gif
new file mode 100644 (file)
index 0000000..75dcf19
Binary files /dev/null and b/doc/ja/images/add-this-printer.gif differ
diff --git a/doc/ja/images/cancel-all-jobs.gif b/doc/ja/images/cancel-all-jobs.gif
new file mode 100644 (file)
index 0000000..3be5118
Binary files /dev/null and b/doc/ja/images/cancel-all-jobs.gif differ
diff --git a/doc/ja/images/cancel-job.gif b/doc/ja/images/cancel-job.gif
new file mode 100644 (file)
index 0000000..c6ce936
Binary files /dev/null and b/doc/ja/images/cancel-job.gif differ
diff --git a/doc/ja/images/cancel.gif b/doc/ja/images/cancel.gif
new file mode 100644 (file)
index 0000000..b182a5d
Binary files /dev/null and b/doc/ja/images/cancel.gif differ
diff --git a/doc/ja/images/change-settings.gif b/doc/ja/images/change-settings.gif
new file mode 100644 (file)
index 0000000..d31acf1
Binary files /dev/null and b/doc/ja/images/change-settings.gif differ
diff --git a/doc/ja/images/continue.gif b/doc/ja/images/continue.gif
new file mode 100644 (file)
index 0000000..540aabf
Binary files /dev/null and b/doc/ja/images/continue.gif differ
diff --git a/doc/ja/images/delete-class.gif b/doc/ja/images/delete-class.gif
new file mode 100644 (file)
index 0000000..a9307db
Binary files /dev/null and b/doc/ja/images/delete-class.gif differ
diff --git a/doc/ja/images/delete-printer.gif b/doc/ja/images/delete-printer.gif
new file mode 100644 (file)
index 0000000..5525d10
Binary files /dev/null and b/doc/ja/images/delete-printer.gif differ
diff --git a/doc/ja/images/edit-configuration-file.gif b/doc/ja/images/edit-configuration-file.gif
new file mode 100644 (file)
index 0000000..8b8a879
Binary files /dev/null and b/doc/ja/images/edit-configuration-file.gif differ
diff --git a/doc/ja/images/export-samba.gif b/doc/ja/images/export-samba.gif
new file mode 100644 (file)
index 0000000..a839670
Binary files /dev/null and b/doc/ja/images/export-samba.gif differ
diff --git a/doc/ja/images/help.gif b/doc/ja/images/help.gif
new file mode 100644 (file)
index 0000000..b0369cf
Binary files /dev/null and b/doc/ja/images/help.gif differ
diff --git a/doc/ja/images/hold-job.gif b/doc/ja/images/hold-job.gif
new file mode 100644 (file)
index 0000000..67c5e84
Binary files /dev/null and b/doc/ja/images/hold-job.gif differ
diff --git a/doc/ja/images/manage-classes.gif b/doc/ja/images/manage-classes.gif
new file mode 100644 (file)
index 0000000..0643673
Binary files /dev/null and b/doc/ja/images/manage-classes.gif differ
diff --git a/doc/ja/images/manage-jobs.gif b/doc/ja/images/manage-jobs.gif
new file mode 100644 (file)
index 0000000..8054528
Binary files /dev/null and b/doc/ja/images/manage-jobs.gif differ
diff --git a/doc/ja/images/manage-printers.gif b/doc/ja/images/manage-printers.gif
new file mode 100644 (file)
index 0000000..65e824a
Binary files /dev/null and b/doc/ja/images/manage-printers.gif differ
diff --git a/doc/ja/images/manage-server.gif b/doc/ja/images/manage-server.gif
new file mode 100644 (file)
index 0000000..2b2d235
Binary files /dev/null and b/doc/ja/images/manage-server.gif differ
diff --git a/doc/ja/images/modify-class.gif b/doc/ja/images/modify-class.gif
new file mode 100644 (file)
index 0000000..38d40a7
Binary files /dev/null and b/doc/ja/images/modify-class.gif differ
diff --git a/doc/ja/images/modify-printer.gif b/doc/ja/images/modify-printer.gif
new file mode 100644 (file)
index 0000000..261b384
Binary files /dev/null and b/doc/ja/images/modify-printer.gif differ
diff --git a/doc/ja/images/move-job.gif b/doc/ja/images/move-job.gif
new file mode 100644 (file)
index 0000000..f0d2b54
Binary files /dev/null and b/doc/ja/images/move-job.gif differ
diff --git a/doc/ja/images/move-jobs.gif b/doc/ja/images/move-jobs.gif
new file mode 100644 (file)
index 0000000..e381fe4
Binary files /dev/null and b/doc/ja/images/move-jobs.gif differ
diff --git a/doc/ja/images/print-test-page.gif b/doc/ja/images/print-test-page.gif
new file mode 100644 (file)
index 0000000..88995e5
Binary files /dev/null and b/doc/ja/images/print-test-page.gif differ
diff --git a/doc/ja/images/publish-printer.gif b/doc/ja/images/publish-printer.gif
new file mode 100644 (file)
index 0000000..7c47333
Binary files /dev/null and b/doc/ja/images/publish-printer.gif differ
diff --git a/doc/ja/images/reject-jobs.gif b/doc/ja/images/reject-jobs.gif
new file mode 100644 (file)
index 0000000..ed1ac6b
Binary files /dev/null and b/doc/ja/images/reject-jobs.gif differ
diff --git a/doc/ja/images/release-job.gif b/doc/ja/images/release-job.gif
new file mode 100644 (file)
index 0000000..245126e
Binary files /dev/null and b/doc/ja/images/release-job.gif differ
diff --git a/doc/ja/images/restart-job.gif b/doc/ja/images/restart-job.gif
new file mode 100644 (file)
index 0000000..af27eaa
Binary files /dev/null and b/doc/ja/images/restart-job.gif differ
diff --git a/doc/ja/images/save-changes.gif b/doc/ja/images/save-changes.gif
new file mode 100644 (file)
index 0000000..2637b49
Binary files /dev/null and b/doc/ja/images/save-changes.gif differ
diff --git a/doc/ja/images/search.gif b/doc/ja/images/search.gif
new file mode 100644 (file)
index 0000000..c03e1f5
Binary files /dev/null and b/doc/ja/images/search.gif differ
diff --git a/doc/ja/images/set-allowed-users.gif b/doc/ja/images/set-allowed-users.gif
new file mode 100644 (file)
index 0000000..891c123
Binary files /dev/null and b/doc/ja/images/set-allowed-users.gif differ
diff --git a/doc/ja/images/set-as-default.gif b/doc/ja/images/set-as-default.gif
new file mode 100644 (file)
index 0000000..14834a7
Binary files /dev/null and b/doc/ja/images/set-as-default.gif differ
diff --git a/doc/ja/images/set-printer-options.gif b/doc/ja/images/set-printer-options.gif
new file mode 100644 (file)
index 0000000..e218b00
Binary files /dev/null and b/doc/ja/images/set-printer-options.gif differ
diff --git a/doc/ja/images/show-active.gif b/doc/ja/images/show-active.gif
new file mode 100644 (file)
index 0000000..156f79d
Binary files /dev/null and b/doc/ja/images/show-active.gif differ
diff --git a/doc/ja/images/show-all-jobs.gif b/doc/ja/images/show-all-jobs.gif
new file mode 100644 (file)
index 0000000..4178a97
Binary files /dev/null and b/doc/ja/images/show-all-jobs.gif differ
diff --git a/doc/ja/images/show-all.gif b/doc/ja/images/show-all.gif
new file mode 100644 (file)
index 0000000..4178a97
Binary files /dev/null and b/doc/ja/images/show-all.gif differ
diff --git a/doc/ja/images/show-completed.gif b/doc/ja/images/show-completed.gif
new file mode 100644 (file)
index 0000000..c577842
Binary files /dev/null and b/doc/ja/images/show-completed.gif differ
diff --git a/doc/ja/images/show-next.gif b/doc/ja/images/show-next.gif
new file mode 100644 (file)
index 0000000..86cd446
Binary files /dev/null and b/doc/ja/images/show-next.gif differ
diff --git a/doc/ja/images/show-previous.gif b/doc/ja/images/show-previous.gif
new file mode 100644 (file)
index 0000000..57ae163
Binary files /dev/null and b/doc/ja/images/show-previous.gif differ
diff --git a/doc/ja/images/sort-ascending.gif b/doc/ja/images/sort-ascending.gif
new file mode 100644 (file)
index 0000000..075c460
Binary files /dev/null and b/doc/ja/images/sort-ascending.gif differ
diff --git a/doc/ja/images/sort-descending.gif b/doc/ja/images/sort-descending.gif
new file mode 100644 (file)
index 0000000..79fcb4d
Binary files /dev/null and b/doc/ja/images/sort-descending.gif differ
diff --git a/doc/ja/images/start-class.gif b/doc/ja/images/start-class.gif
new file mode 100644 (file)
index 0000000..bd9c619
Binary files /dev/null and b/doc/ja/images/start-class.gif differ
diff --git a/doc/ja/images/start-printer.gif b/doc/ja/images/start-printer.gif
new file mode 100644 (file)
index 0000000..222e457
Binary files /dev/null and b/doc/ja/images/start-printer.gif differ
diff --git a/doc/ja/images/stop-class.gif b/doc/ja/images/stop-class.gif
new file mode 100644 (file)
index 0000000..ee44b7c
Binary files /dev/null and b/doc/ja/images/stop-class.gif differ
diff --git a/doc/ja/images/stop-printer.gif b/doc/ja/images/stop-printer.gif
new file mode 100644 (file)
index 0000000..7912e9d
Binary files /dev/null and b/doc/ja/images/stop-printer.gif differ
diff --git a/doc/ja/images/unpublish-printer.gif b/doc/ja/images/unpublish-printer.gif
new file mode 100644 (file)
index 0000000..8ea47aa
Binary files /dev/null and b/doc/ja/images/unpublish-printer.gif differ
diff --git a/doc/ja/images/use-default-config.gif b/doc/ja/images/use-default-config.gif
new file mode 100644 (file)
index 0000000..ac7c16c
Binary files /dev/null and b/doc/ja/images/use-default-config.gif differ
diff --git a/doc/ja/images/view-access-log.gif b/doc/ja/images/view-access-log.gif
new file mode 100644 (file)
index 0000000..d6e06a9
Binary files /dev/null and b/doc/ja/images/view-access-log.gif differ
diff --git a/doc/ja/images/view-error-log.gif b/doc/ja/images/view-error-log.gif
new file mode 100644 (file)
index 0000000..e16274b
Binary files /dev/null and b/doc/ja/images/view-error-log.gif differ
diff --git a/doc/ja/images/view-page-log.gif b/doc/ja/images/view-page-log.gif
new file mode 100644 (file)
index 0000000..8416e2d
Binary files /dev/null and b/doc/ja/images/view-page-log.gif differ
diff --git a/doc/ja/index.html.in b/doc/ja/index.html.in
new file mode 100644 (file)
index 0000000..f749437
--- /dev/null
@@ -0,0 +1,141 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+       <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
+       <TITLE>ホーム - CUPS @CUPS_VERSION@</TITLE>
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
+       <LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
+</HEAD>
+<BODY>
+<TABLE WIDTH="100%" STYLE="height: 100%;" BORDER="0" CELLSPACING="0" CELLPADDING="0" SUMMARY="Common UNIX Printing System @CUPS_VERSION@">
+<TR CLASS="HEADER">
+<TD VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG SRC="/images/top-left.gif" WIDTH="15" HEIGHT="80" ALT=""></TD>
+<TD VALIGN="TOP" WIDTH="55" ROWSPAN="2"><IMG SRC="/images/top-middle.gif" WIDTH="55" HEIGHT="80" ALT=""></TD>
+<TD WIDTH="100%" HEIGHT="60"><H1>Common UNIX Printing System @CUPS_VERSION@</H1></TD>
+<TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG
+SRC="/images/top-right.gif" WIDTH="15" HEIGHT="15" ALT=""></TD>
+</TR>
+<TR CLASS="HEADER"><TD WIDTH="100%" VALIGN="BOTTOM" NOWRAP>
+
+<A CLASS="sel" HREF="/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
+HEIGHT="4" ALIGN="TOP" BORDER="0"
+ALT="">&nbsp;&nbsp;ホーム&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="unsel" HREF="/admin/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
+HEIGHT="4" ALIGN="TOP" BORDER="0"
+ALT="">&nbsp;&nbsp;管理&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="unsel" HREF="/classes/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
+HEIGHT="4" ALIGN="TOP" BORDER="0"
+ALT="">&nbsp;&nbsp;クラス&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="unsel" HREF="/help/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
+HEIGHT="4" ALIGN="TOP" BORDER="0"
+ALT="">&nbsp;&nbsp;ドキュメント/ヘルプ&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="unsel" HREF="/jobs/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
+HEIGHT="4" ALIGN="TOP" BORDER="0"
+ALT="">&nbsp;&nbsp;ジョブ&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="unsel" HREF="/printers/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
+HEIGHT="4" ALIGN="TOP" BORDER="0"
+ALT="">&nbsp;&nbsp;プリンタ&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+</TD></TR>
+<TR CLASS="page">
+<TD WIDTH="15">&nbsp;</TD>
+<TD COLSPAN="2" WIDTH="100%" VALIGN="TOP" CLASS="page">
+
+<H2 CLASS="title">ようこそ!</H2>
+
+<P>この Web ページでは、システム管理作業はもちろん、プリンタやジョブ
+の監視ができます。作業を行うには、上にあるタブをクリックするか、下の
+ボタンをクリックしてください。</P>
+
+<P>
+<A HREF="/help/"><IMG SRC="/images/help.gif" CLASS="button" ALT="Help"></A>
+<A HREF="/admin?OP=add-class"><IMG SRC="/images/add-class.gif" CLASS="button" ALT="クラスの追加"></A>
+<A HREF="/admin?OP=add-printer"><IMG SRC="/images/add-printer.gif" CLASS="button" ALT="プリンタの追加"></A>
+<A HREF="/classes"><IMG SRC="/images/manage-classes.gif" CLASS="button" ALT="クラスの管理"></A>
+<A HREF="/jobs"><IMG SRC="/images/manage-jobs.gif" CLASS="button" ALT="ジョブの管理"></A>
+<A HREF="/printers"><IMG SRC="/images/manage-printers.gif" CLASS="button" ALT="プリンタの管理"></A>
+<A HREF="/admin"><IMG SRC="/images/manage-server.gif" CLASS="button" ALT="サーバの管理"></A>
+</P>
+
+<P><I>ユーザ名とパスワードを尋ねられたら、あなたのユーザ名とパスワード、
+あるいは、ユーザ名 "root" とそのパスワードを入力してください。</I></P>
+
+<H2 CLASS="title">CUPS について</H2>
+
+<P>
+<IMG SRC="/images/happy.gif" ALIGN="LEFT" WIDTH="196" HEIGHT="144"
+STYLE="padding-right: 10px;" ALT="ご機嫌なコンピュータとプリンタ">
+
+<A HREF="http://www.easysw.com/"><IMG SRC="/images/esp-logo.gif"
+ALIGN="RIGHT" WIDTH="110" HEIGHT="68" BORDER="0"
+STYLE="padding-left: 10px; padding-bottom: 10px;"
+ALT="Easy Software Products"></A>
+
+CUPS は、UNIX<SUP>&reg;</SUP> ベースのオペレーティングシステムのための、
+ポータブルな印刷レイヤを提供します。標準印刷ソリューションを促進する
+ために、<A HREF="http://www.easysw.com">Easy Software
+Products</a> によって開発および保守されています。CUPS は
+MacOS<SUP>&reg;</SUP> X および多くの Linux<SUP>&reg;</SUP>
+ディストリビューションで採用されている標準印刷システムです。</P>
+
+<P>CUPS は
+印刷ジョブとキューの管理に <A HREF="http://www.pwg.org/ipp/"
+TARGET="_blank">Internet Printing Protocol ("IPP")</A>
+を基礎として使い、ネットワークプリンタのブラウズ、
+実世界の印刷をサポートするための印刷オプションに基づく
+PostScript Printer Description ("PPD") の機能を追加しています。<BR CLEAR="ALL"></P>
+
+<H2 CLASS="title">プリンタドライバと支援</H2>
+
+<P>プリンタドライバと支援については、公式 CUPS サイトを訪れてください:</P>
+
+<PRE>
+    <A HREF="http://www.cups.org/" TARGET="_blank">www.cups.org</A>
+</PRE>
+
+<P>CUPS の商用サポート、および <A
+HREF="http://www.easysw.com/printpro/">ESP Print Pro</A> と呼ばれる
+拡張バージョンは、以下の場所で入手可能です:</P>
+
+<PRE>
+    <A HREF="http://www.easysw.com/" TARGET="_blank">www.easysw.com</A>
+</PRE>
+
+</TD>
+<TD WIDTH="15">&nbsp;</TD>
+</TR>
+<TR CLASS="header">
+<TD VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-left.gif"
+WIDTH="15" HEIGHT="15" ALT=""></TD>
+<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
+
+<P><SMALL>The Common UNIX Printing System, CUPS, and the CUPS logo are the
+trademark property of <A HREF="http://www.easysw.com">Easy Software
+Products</A>. CUPS is copyright 1997-2006 by Easy Software Products,
+All Rights Reserved.</SMALL></P>
+
+</TD>
+
+<TD ALIGN="RIGHT" VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-right.gif"
+WIDTH="15" HEIGHT="15" ALT=""></TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>
index 243dc3e9baf491fb6bc9de8fd4e6b12f6aa681c2..b790955637380412bdb33083d1d9f6d6255565f6 100644 (file)
@@ -115,7 +115,8 @@ common.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 common.o: ../cups/language.h ../cups/string.h ../config.h
 pstops.o: common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 pstops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-pstops.o: ../cups/language.h ../cups/string.h ../config.h
+pstops.o: ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
+pstops.o: ../cups/array.h
 raster.o: raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
 raster.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 raster.o: ../cups/string.h ../config.h
index aff050503a5ad95c0f4acfeec964eca202616afc..c181b3f3e8af4262faf06a023f641c82d65d2f1b 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $"
+# "$Id: Makefile 5089 2006-02-08 04:05:01Z mike $"
 #
 #   Filter makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products.
+#   Copyright 1997-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 #   property of Easy Software Products and are protected by Federal
@@ -72,7 +72,7 @@ depend:
 #
 
 install:       all installhdrs $(INSTALLSTATIC)
-       $(INSTALL_DIR) $(SERVERBIN)/filter
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
        for file in $(FILTERS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
        done
@@ -98,7 +98,7 @@ installstatic:
        fi
 
 installhdrs:
-       $(INSTALL_DIR) $(INCLUDEDIR)/cups
+       $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
        $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
        $(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups
 
@@ -227,7 +227,7 @@ imagetoraster:      imagetoraster.o common.o $(LIBCUPSIMAGE) \
 
 pstops:        pstops.o common.o ../cups/$(LIBCUPS)
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
+       $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
 
 
 #
@@ -284,5 +284,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $".
+# End of "$Id: Makefile 5089 2006-02-08 04:05:01Z mike $".
 #
index f449826bc528df54bd74de8153482aa30c297f98..42cc478ad89a10afaa89d677b0fa98476cea7f35 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-zoom.c 4741 2005-10-02 04:25:52Z mike $"
+ * "$Id: image-zoom.c 5086 2006-02-07 02:45:26Z mike $"
  *
  *   cupsImage zoom routines for the Common UNIX Printing System (CUPS).
  *
@@ -92,10 +92,10 @@ cupsImageZoomFill(cups_izoom_t *z,  /* I - Zoom record to fill */
 cups_izoom_t *
 cupsImageZoomNew(
     cups_image_t  *img,                        /* I - cupsImage to zoom */
-    int           x0,                  /* I - Upper-lefthand corner */
-    int           y0,                  /* I - ... */
-    int           x1,                  /* I - Lower-righthand corner */
-    int           y1,                  /* I - ... */
+    int           xc0,                 /* I - Upper-lefthand corner */
+    int           yc0,                 /* I - ... */
+    int           xc1,                 /* I - Lower-righthand corner */
+    int           yc1,                 /* I - ... */
     int           xsize,               /* I - Final width of image */
     int           ysize,               /* I - Final height of image */
     int           rotated,             /* I - Non-zero if image is rotated 90 degs */
@@ -107,8 +107,8 @@ cupsImageZoomNew(
 
   if (xsize > CUPS_IMAGE_MAX_WIDTH ||
       ysize > CUPS_IMAGE_MAX_HEIGHT ||
-      (x1 - x0) > CUPS_IMAGE_MAX_WIDTH ||
-      (y1 - y0) > CUPS_IMAGE_MAX_HEIGHT)
+      (xc1 - xc0) > CUPS_IMAGE_MAX_WIDTH ||
+      (yc1 - yc0) > CUPS_IMAGE_MAX_HEIGHT)
     return (NULL);             /* Protect against integer overflow */
 
   if ((z = (cups_izoom_t *)calloc(1, sizeof(cups_izoom_t))) == NULL)
@@ -132,10 +132,10 @@ cupsImageZoomNew(
 
   if (rotated)
   {
-    z->xorig   = x1;
-    z->yorig   = y0;
-    z->width   = y1 - y0 + 1;
-    z->height  = x1 - x0 + 1;
+    z->xorig   = xc1;
+    z->yorig   = yc0;
+    z->width   = yc1 - yc0 + 1;
+    z->height  = xc1 - xc0 + 1;
     z->xsize   = xsize;
     z->ysize   = ysize;
     z->xmod    = z->width % z->xsize;
@@ -159,10 +159,10 @@ cupsImageZoomNew(
   }
   else
   {
-    z->xorig   = x0;
-    z->yorig   = y0;
-    z->width   = x1 - x0 + 1;
-    z->height  = y1 - y0 + 1;
+    z->xorig   = xc0;
+    z->yorig   = yc0;
+    z->width   = xc1 - xc0 + 1;
+    z->height  = yc1 - yc0 + 1;
     z->xsize   = xsize;
     z->ysize   = ysize;
     z->xmod    = z->width % z->xsize;
@@ -366,5 +366,5 @@ zoom_nearest(cups_izoom_t *z,               /* I - Zoom record to fill */
 
 
 /*
- * End of "$Id: image-zoom.c 4741 2005-10-02 04:25:52Z mike $".
+ * End of "$Id: image-zoom.c 5086 2006-02-07 02:45:26Z mike $".
  */
index 23e33a0dad9996bb83994aad5046f500197b0b9e..d417c9b54faa3b09c6781a3fb3e60a181539707a 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: imagetops.c 4741 2005-10-02 04:25:52Z mike $"
+ * "$Id: imagetops.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   Image file to PostScript filter for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1993-2005 by Easy Software Products.
+ *   Copyright 1993-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -81,9 +81,9 @@ main(int  argc,                               /* I - Number of command-line arguments */
                xpage,                  /* Current x page */
                ypage,                  /* Current y page */
                page;                   /* Current page number */
-  int          x0, y0,                 /* Corners of the page in image coords */
-               x1, y1;
-  cups_ib_t            *row;                   /* Current row */
+  int          xc0, yc0,                       /* Corners of the page in image coords */
+               xc1, yc1;
+  cups_ib_t    *row;                   /* Current row */
   int          y;                      /* Current Y coordinate in image */
   int          colorspace;             /* Output colorspace */
   int          out_offset,             /* Offset into output buffer */
@@ -99,7 +99,8 @@ main(int  argc,                               /* I - Number of command-line arguments */
   float                zoom;                   /* Zoom facter */
   int          xppi, yppi;             /* Pixels-per-inch */
   int          hue, sat;               /* Hue and saturation adjustment */
-  int          realcopies;             /* Real copies being printed */
+  int          realcopies,             /* Real copies being printed */
+               emit_jcl;               /* Emit JCL? */
   float                left, top;              /* Left and top of image */
   char         filename[1024];         /* Name of file to print */
   time_t       curtime;                /* Current time */
@@ -192,13 +193,37 @@ main(int  argc,                           /* I - Number of command-line arguments */
     Collate = 1;
 
   if ((val = cupsGetOption("gamma", num_options, options)) != NULL)
+  {
+   /*
+    * Get gamma value from 1 to 10000...
+    */
+
     g = atoi(val) * 0.001f;
 
+    if (g < 0.001f)
+      g = 0.001f;
+    else if (g > 10.0f)
+      g = 10.0f;
+  }
+
   if ((val = cupsGetOption("brightness", num_options, options)) != NULL)
+  {
+   /*
+    * Get brightness value from 10 to 1000.
+    */
+
     b = atoi(val) * 0.01f;
 
+    if (b < 0.1f)
+      b = 0.1f;
+    else if (b > 10.0f)
+      b = 10.0f;
+  }
+
   if ((val = cupsGetOption("scaling", num_options, options)) != NULL)
     zoom = atoi(val) * 0.01;
+  else if (cupsGetOption("fitplot", num_options, options))
+    zoom = 1.0;
 
   if ((val = cupsGetOption("ppi", num_options, options)) != NULL)
     if (sscanf(val, "%dx%d", &xppi, &yppi) < 2)
@@ -263,6 +288,13 @@ main(int  argc,                            /* I - Number of command-line arguments */
       strcasecmp(val, "True") == 0)
     Flip = 1;
 
+  if ((val = cupsGetOption("emit-jcl", num_options, options)) != NULL &&
+      (!strcasecmp(val, "false") || !strcasecmp(val, "off") ||
+       !strcasecmp(val, "no") || !strcmp(val, "0")))
+    emit_jcl = 0;
+  else
+    emit_jcl = 1;
+
  /*
   * Open the input image to print...
   */
@@ -557,7 +589,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
   * Write any JCL commands that are needed to print PostScript code...
   */
 
-  ppdEmitJCL(ppd, stdout, atoi(argv[1]), argv[2], argv[3]);
+  if (emit_jcl)
+    ppdEmitJCL(ppd, stdout, atoi(argv[1]), argv[2], argv[3]);
 
  /*
   * Start sending the document with any commands needed...
@@ -796,21 +829,21 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
         puts("gsave");
 
-       x0 = cupsImageGetWidth(img) * xpage / xpages;
-       x1 = cupsImageGetWidth(img) * (xpage + 1) / xpages - 1;
-       y0 = cupsImageGetHeight(img) * ypage / ypages;
-       y1 = cupsImageGetHeight(img) * (ypage + 1) / ypages - 1;
+       xc0 = cupsImageGetWidth(img) * xpage / xpages;
+       xc1 = cupsImageGetWidth(img) * (xpage + 1) / xpages - 1;
+       yc0 = cupsImageGetHeight(img) * ypage / ypages;
+       yc1 = cupsImageGetHeight(img) * (ypage + 1) / ypages - 1;
 
         printf("%.1f %.1f translate\n", left, top);
 
        printf("%.3f %.3f scale\n\n",
-              xprint * 72.0 / (x1 - x0 + 1),
-              yprint * 72.0 / (y1 - y0 + 1));
+              xprint * 72.0 / (xc1 - xc0 + 1),
+              yprint * 72.0 / (yc1 - yc0 + 1));
 
        if (LanguageLevel == 1)
        {
-         printf("/picture %d string def\n", (x1 - x0 + 1) * abs(colorspace));
-         printf("%d %d 8[1 0 0 -1 0 1]", (x1 - x0 + 1), (y1 - y0 + 1));
+         printf("/picture %d string def\n", (xc1 - xc0 + 1) * abs(colorspace));
+         printf("%d %d 8[1 0 0 -1 0 1]", (xc1 - xc0 + 1), (yc1 - yc0 + 1));
 
           if (colorspace == CUPS_IMAGE_WHITE)
             puts("{currentfile picture readhexstring pop} image");
@@ -818,10 +851,10 @@ main(int  argc,                           /* I - Number of command-line arguments */
             printf("{currentfile picture readhexstring pop} false %d colorimage\n",
                   abs(colorspace));
 
-          for (y = y0; y <= y1; y ++)
+          for (y = yc0; y <= yc1; y ++)
           {
-            cupsImageGetRow(img, x0, y, x1 - x0 + 1, row);
-            ps_hex(row, (x1 - x0 + 1) * abs(colorspace), y == y1);
+            cupsImageGetRow(img, xc0, y, xc1 - xc0 + 1, row);
+            ps_hex(row, (xc1 - xc0 + 1) * abs(colorspace), y == yc1);
           }
        }
        else
@@ -844,7 +877,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
                 "/Width %d"
                 "/Height %d"
                 "/BitsPerComponent 8",
-                x1 - x0 + 1, y1 - y0 + 1);
+                xc1 - xc0 + 1, yc1 - yc0 + 1);
 
           switch (colorspace)
          {
@@ -861,19 +894,19 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
           fputs("/DataSource currentfile /ASCII85Decode filter", stdout);
 
-          if (((x1 - x0 + 1) / xprint) < 100.0)
+          if (((xc1 - xc0 + 1) / xprint) < 100.0)
             fputs("/Interpolate true", stdout);
 
           puts("/cupsImageMatrix[1 0 0 -1 0 1]>>image");
 
-          for (y = y0, out_offset = 0; y <= y1; y ++)
+          for (y = yc0, out_offset = 0; y <= yc1; y ++)
           {
-            cupsImageGetRow(img, x0, y, x1 - x0 + 1, row + out_offset);
+            cupsImageGetRow(img, xc0, y, xc1 - xc0 + 1, row + out_offset);
 
-            out_length = (x1 - x0 + 1) * abs(colorspace) + out_offset;
+            out_length = (xc1 - xc0 + 1) * abs(colorspace) + out_offset;
             out_offset = out_length & 3;
 
-            ps_ascii85(row, out_length, y == y1);
+            ps_ascii85(row, out_length, y == yc1);
 
             if (out_offset > 0)
               memcpy(row, row + out_length - out_offset, out_offset);
@@ -892,7 +925,13 @@ main(int  argc,                            /* I - Number of command-line arguments */
   * End the job with the appropriate JCL command or CTRL-D otherwise.
   */
 
-  ppdEmitJCLEnd(ppd, stdout);
+  if (emit_jcl)
+  {
+    if (ppd && ppd->jcl_end)
+      ppdEmitJCLEnd(ppd, stdout);
+    else
+      putchar(0x04);
+  }
 
  /*
   * Close files...
@@ -1024,5 +1063,5 @@ ps_ascii85(cups_ib_t *data,               /* I - Data to print */
 
 
 /*
- * End of "$Id: imagetops.c 4741 2005-10-02 04:25:52Z mike $".
+ * End of "$Id: imagetops.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 6fdea10381424277516551d78619b899db6430c5..f0dce921c3a9116370f958bf04043df7dc002a2d 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: imagetoraster.c 4767 2005-10-10 19:23:23Z mike $"
+ * "$Id: imagetoraster.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   Image file to raster filter for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1993-2005 by Easy Software Products.
+ *   Copyright 1993-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -60,7 +60,7 @@ int   Flip = 0,                       /* Flip/mirror pages */
        YPosition = 0,                  /* Vertical position on page */
        Collate = 0,                    /* Collate copies? */
        Copies = 1;                     /* Number of copies */
-int    Floyd16x16[16][16] =            /* Traditional Floyd ordered dither */
+int    Floyd16xc16[16][16] =           /* Traditional Floyd ordered dither */
        {
          { 0,   128, 32,  160, 8,   136, 40,  168,
            2,   130, 34,  162, 10,  138, 42,  170 },
@@ -212,8 +212,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
                        xtemp,          /* Bitmap width in pixels */
                        ytemp,          /* Bitmap height in pixels */
                        page;           /* Current page number */
-  int                  x0, y0,         /* Corners of the page in image coords */
-                       x1, y1;
+  int                  xc0, yc0,               /* Corners of the page in image coords */
+                       xc1, yc1;
   ppd_file_t           *ppd;           /* PPD file */
   ppd_choice_t         *choice,        /* PPD option choice */
                        **choices;      /* List of marked choices */
@@ -407,13 +407,37 @@ main(int  argc,                           /* I - Number of command-line arguments */
     Collate = 1;
 
   if ((val = cupsGetOption("gamma", num_options, options)) != NULL)
+  {
+   /*
+    * Get gamma value from 1 to 10000...
+    */
+
     g = atoi(val) * 0.001f;
 
+    if (g < 0.001f)
+      g = 0.001f;
+    else if (g > 10.0f)
+      g = 10.0f;
+  }
+
   if ((val = cupsGetOption("brightness", num_options, options)) != NULL)
+  {
+   /*
+    * Get brightness value from 10 to 1000.
+    */
+
     b = atoi(val) * 0.01f;
 
+    if (b < 0.1f)
+      b = 0.1f;
+    else if (b > 10.0f)
+      b = 10.0f;
+  }
+
   if ((val = cupsGetOption("scaling", num_options, options)) != NULL)
     zoom = atoi(val) * 0.01;
+  else if (cupsGetOption("fitplot", num_options, options))
+    zoom = 1.0;
 
   if ((val = cupsGetOption("ppi", num_options, options)) != NULL)
     if (sscanf(val, "%dx%d", &xppi, &yppi) < 2)
@@ -1234,20 +1258,20 @@ main(int  argc,                         /* I - Number of command-line arguments */
 
        if (Orientation & 1)
        {
-         x0    = img->xsize * ypage / ypages;
-         x1    = img->xsize * (ypage + 1) / ypages - 1;
-         y0    = img->ysize * xpage / xpages;
-         y1    = img->ysize * (xpage + 1) / xpages - 1;
+         xc0    = img->xsize * ypage / ypages;
+         xc1    = img->xsize * (ypage + 1) / ypages - 1;
+         yc0    = img->ysize * xpage / xpages;
+         yc1    = img->ysize * (xpage + 1) / xpages - 1;
 
          xtemp = header.HWResolution[0] * yprint;
          ytemp = header.HWResolution[1] * xprint;
        }
        else
        {
-         x0    = img->xsize * xpage / xpages;
-         x1    = img->xsize * (xpage + 1) / xpages - 1;
-         y0    = img->ysize * ypage / ypages;
-         y1    = img->ysize * (ypage + 1) / ypages - 1;
+         xc0    = img->xsize * xpage / xpages;
+         xc1    = img->xsize * (xpage + 1) / xpages - 1;
+         yc0    = img->ysize * ypage / ypages;
+         yc1    = img->ysize * (ypage + 1) / ypages - 1;
 
          xtemp = header.HWResolution[0] * xprint;
          ytemp = header.HWResolution[1] * yprint;
@@ -1262,10 +1286,10 @@ main(int  argc,                         /* I - Number of command-line arguments */
          */
 
           if (Flip)
-           z = cupsImageZoomNew(img, x0, y0, x1, y1, -xtemp, ytemp,
+           z = cupsImageZoomNew(img, xc0, yc0, xc1, yc1, -xtemp, ytemp,
                                 Orientation & 1, zoom_type);
           else
-           z = cupsImageZoomNew(img, x0, y0, x1, y1, xtemp, ytemp,
+           z = cupsImageZoomNew(img, xc0, yc0, xc1, yc1, xtemp, ytemp,
                                 Orientation & 1, zoom_type);
 
          /*
@@ -1670,7 +1694,7 @@ format_CMY(cups_page_header2_t *header,   /* I - Page header */
         {
           case 1 :
               bitmask = 64 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize ; x > 0; x --)
               {
@@ -1758,7 +1782,7 @@ format_CMY(cups_page_header2_t *header,   /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize; x > 0; x --)
               {
@@ -1782,7 +1806,7 @@ format_CMY(cups_page_header2_t *header,   /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
 
               for (x = xsize; x > 0; x --)
@@ -1806,7 +1830,7 @@ format_CMY(cups_page_header2_t *header,   /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  cptr ++;
                  mptr ++;
@@ -1876,7 +1900,7 @@ format_CMY(cups_page_header2_t *header,   /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               switch (z)
              {
@@ -1931,7 +1955,7 @@ format_CMY(cups_page_header2_t *header,   /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
               r0 += z;
 
@@ -1946,7 +1970,7 @@ format_CMY(cups_page_header2_t *header,   /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  ptr ++;
                }
@@ -2045,7 +2069,7 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 128 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize ; x > 0; x --)
               {
@@ -2080,9 +2104,9 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
               for (x = xsize ; x > 0; x --, r0 += 4)
               {
                if ((r0[0] & 63) > dither[x & 7])
-                 *ptr ^= (0xc0 & OnPixels[r0[0]]);
+                 *ptr ^= (0x0 & OnPixels[r0[0]]);
                else
-                 *ptr ^= (0xc0 & OffPixels[r0[0]]);
+                 *ptr ^= (0x0 & OffPixels[r0[0]]);
 
                if ((r0[1] & 63) > dither[x & 7])
                  *ptr ^= (0x30 & OnPixels[r0[1]]);
@@ -2148,7 +2172,7 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize; x > 0; x --)
               {
@@ -2175,7 +2199,7 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
 
               for (x = xsize; x > 0; x --)
@@ -2204,7 +2228,7 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  cptr ++;
                  mptr ++;
@@ -2286,7 +2310,7 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
               r0      += z;
 
               for (x = xsize; x > 0; x --, r0 += 4)
@@ -2305,7 +2329,7 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
              break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
               r0      += z;
 
@@ -2320,7 +2344,7 @@ format_CMYK(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  ptr ++;
                }
@@ -2412,7 +2436,7 @@ format_K(cups_page_header2_t *header,     /* I - Page header */
   {
     case 1 :
         bitmask = 0x80 >> (bitoffset & 7);
-        dither  = Floyd16x16[y & 15];
+        dither  = Floyd16xc16[y & 15];
 
         for (x = xsize; x > 0; x --)
         {
@@ -2430,7 +2454,7 @@ format_K(cups_page_header2_t *header,     /* I - Page header */
         break;
 
     case 2 :
-        bitmask = 0xc0 >> (bitoffset & 7);
+        bitmask = 0x0 >> (bitoffset & 7);
         dither  = Floyd8x8[y & 7];
 
         for (x = xsize; x > 0; x --)
@@ -2444,7 +2468,7 @@ format_K(cups_page_header2_t *header,     /* I - Page header */
            bitmask >>= 2;
          else
          {
-           bitmask = 0xc0;
+           bitmask = 0x0;
 
            ptr ++;
           }
@@ -2537,7 +2561,7 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 128 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               for (x = xsize ; x > 0; x --, r0 += 4)
               {
@@ -2572,9 +2596,9 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
               for (x = xsize ; x > 0; x --, r0 += 4)
               {
                if ((r0[3] & 63) > dither[x & 7])
-                 *ptr ^= (0xc0 & OnPixels[r0[3]]);
+                 *ptr ^= (0x0 & OnPixels[r0[3]]);
                else
-                 *ptr ^= (0xc0 & OffPixels[r0[3]]);
+                 *ptr ^= (0x0 & OffPixels[r0[3]]);
 
                if ((r0[0] & 63) > dither[x & 7])
                  *ptr ^= (0x30 & OnPixels[r0[0]]);
@@ -2657,7 +2681,7 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               for (x = xsize; x > 0; x --)
               {
@@ -2684,7 +2708,7 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
               dither  = Floyd8x8[y & 7];
 
               for (x = xsize; x > 0; x --)
@@ -2713,7 +2737,7 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  cptr ++;
                  mptr ++;
@@ -2795,7 +2819,7 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
              if (z == 0)
                r0 += 3;
              else
@@ -2817,7 +2841,7 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
              break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
               dither  = Floyd8x8[y & 7];
               if (z == 0)
                r0 += 3;
@@ -2835,7 +2859,7 @@ format_KCMY(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  ptr ++;
                }
@@ -2950,7 +2974,7 @@ format_KCMYcm(cups_page_header2_t *header,/* I - Page header */
         switch (header->cupsBitsPerColor)
         {
           case 1 :
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               for (x = xsize ; x > 0; x --)
               {
@@ -3015,7 +3039,7 @@ format_KCMYcm(cups_page_header2_t *header,/* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               for (x = xsize; x > 0; x --)
               {
@@ -3095,7 +3119,7 @@ format_KCMYcm(cups_page_header2_t *header,/* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               switch (z)
              {
@@ -3281,7 +3305,7 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 128 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize ; x > 0; x --)
               {
@@ -3315,9 +3339,9 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
               for (x = xsize ; x > 0; x --, r0 += 3)
               {
                if ((r0[0] & 63) > dither[x & 7])
-                 *ptr ^= (0xc0 & OnPixels[r0[0]]);
+                 *ptr ^= (0x0 & OnPixels[r0[0]]);
                else
-                 *ptr ^= (0xc0 & OffPixels[r0[0]]);
+                 *ptr ^= (0x0 & OffPixels[r0[0]]);
 
                if ((r0[1] & 63) > dither[x & 7])
                  *ptr ^= (0x30 & OnPixels[r0[1]]);
@@ -3392,7 +3416,7 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize; x > 0; x --)
               {
@@ -3416,7 +3440,7 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
 
               for (x = xsize; x > 0; x --)
@@ -3440,7 +3464,7 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  cptr ++;
                  mptr ++;
@@ -3516,7 +3540,7 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               switch (z)
              {
@@ -3571,7 +3595,7 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
               r0 += z;
 
@@ -3586,7 +3610,7 @@ format_RGBA(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  ptr ++;
                }
@@ -3678,7 +3702,7 @@ format_W(cups_page_header2_t *header,     /* I - Page header */
   {
     case 1 :
         bitmask = 0x80 >> (bitoffset & 7);
-        dither  = Floyd16x16[y & 15];
+        dither  = Floyd16xc16[y & 15];
 
         for (x = xsize; x > 0; x --)
         {
@@ -3696,7 +3720,7 @@ format_W(cups_page_header2_t *header,     /* I - Page header */
         break;
 
     case 2 :
-        bitmask = 0xc0 >> (bitoffset & 7);
+        bitmask = 0x0 >> (bitoffset & 7);
         dither  = Floyd8x8[y & 7];
 
         for (x = xsize; x > 0; x --)
@@ -3710,7 +3734,7 @@ format_W(cups_page_header2_t *header,     /* I - Page header */
            bitmask >>= 2;
          else
          {
-           bitmask = 0xc0;
+           bitmask = 0x0;
 
            ptr ++;
           }
@@ -3802,7 +3826,7 @@ format_YMC(cups_page_header2_t *header,   /* I - Page header */
         {
           case 1 :
               bitmask = 64 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize ; x > 0; x --, r0 += 3)
               {
@@ -3902,7 +3926,7 @@ format_YMC(cups_page_header2_t *header,   /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               for (x = xsize; x > 0; x --)
               {
@@ -3926,7 +3950,7 @@ format_YMC(cups_page_header2_t *header,   /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
 
               for (x = xsize; x > 0; x --)
@@ -3950,7 +3974,7 @@ format_YMC(cups_page_header2_t *header,   /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  cptr ++;
                  mptr ++;
@@ -4020,7 +4044,7 @@ format_YMC(cups_page_header2_t *header,   /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-             dither  = Floyd16x16[y & 15];
+             dither  = Floyd16xc16[y & 15];
 
               switch (z)
              {
@@ -4075,7 +4099,7 @@ format_YMC(cups_page_header2_t *header,   /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
              dither  = Floyd8x8[y & 7];
               z       = 2 - z;
               r0      += z;
@@ -4091,7 +4115,7 @@ format_YMC(cups_page_header2_t *header,   /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  ptr ++;
                }
@@ -4192,7 +4216,7 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 128 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               for (x = xsize ; x > 0; x --, r0 += 4)
               {
@@ -4228,9 +4252,9 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
               for (x = xsize ; x > 0; x --, r0 += 4)
               {
                if ((r0[2] & 63) > dither[x & 7])
-                 *ptr ^= (0xc0 & OnPixels[r0[2]]);
+                 *ptr ^= (0x0 & OnPixels[r0[2]]);
                else
-                 *ptr ^= (0xc0 & OffPixels[r0[2]]);
+                 *ptr ^= (0x0 & OffPixels[r0[2]]);
 
                if ((r0[1] & 63) > dither[x & 7])
                  *ptr ^= (0x30 & OnPixels[r0[1]]);
@@ -4313,7 +4337,7 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               for (x = xsize; x > 0; x --)
               {
@@ -4341,7 +4365,7 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
               dither  = Floyd8x8[y & 7];
 
               for (x = xsize; x > 0; x --)
@@ -4370,7 +4394,7 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  cptr ++;
                  mptr ++;
@@ -4452,7 +4476,7 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
         {
           case 1 :
               bitmask = 0x80 >> (bitoffset & 7);
-              dither  = Floyd16x16[y & 15];
+              dither  = Floyd16xc16[y & 15];
 
               if (z < 3)
                r0 += 2 - z;
@@ -4475,7 +4499,7 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
               break;
 
           case 2 :
-              bitmask = 0xc0 >> (bitoffset & 7);
+              bitmask = 0x0 >> (bitoffset & 7);
               dither  = Floyd8x8[y & 7];
               if (z == 3)
                r0 += 3;
@@ -4493,7 +4517,7 @@ format_YMCK(cups_page_header2_t *header,  /* I - Page header */
                  bitmask >>= 2;
                else
                {
-                 bitmask = 0xc0;
+                 bitmask = 0x0;
 
                  ptr ++;
                }
@@ -4587,5 +4611,5 @@ make_lut(cups_ib_t  *lut,         /* I - Lookup table */
 
 
 /*
- * End of "$Id: imagetoraster.c 4767 2005-10-10 19:23:23Z mike $".
+ * End of "$Id: imagetoraster.c 5099 2006-02-13 02:46:10Z mike $".
  */
index f6fe0b8a7106614d41492c7d7f0166895b1051d9..0a2de3196daffb0140d1b966c1d00aaaab0d0a47 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: pstops.c 4672 2005-09-18 04:25:46Z mike $"
+ * "$Id: pstops.c 5092 2006-02-09 00:54:31Z mike $"
  *
  *   PostScript filter for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1993-2005 by Easy Software Products.
+ *   Copyright 1993-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  * Contents:
  *
  *   main()            - Main entry...
+ *   add_page()        - Add a page to the Pages array...
  *   check_range()     - Check to see if the current page is selected for
  *   copy_bytes()      - Copy bytes from the input file to stdout...
  *   do_prolog()       - Send the necessary document prolog commands...
  *   do_setup()        - Send the necessary document setup commands...
  *   end_nup()         - End processing for N-up printing...
  *   include_feature() - Include a printer option/feature command.
- *   psbcp()           - Enable the binary communications protocol on the printer.
  *   psgets()          - Get a line from a file.
- *   pswrite()         - Write data from a file.
  *   start_nup()       - Start processing for N-up printing...
  */
 
  */
 
 #include "common.h"
+#include <math.h>
+#include <cups/file.h>
+#include <cups/array.h>
 
 
 /*
  * Constants...
  */
 
-#define MAX_PAGES      10000
-
 #define BORDER_NONE    0               /* No border or hairline border */
 #define BORDER_THICK   1               /* Think border */
 #define BORDER_SINGLE  2               /* Single-line hairline border */
 #define PROT_TBCP      2               /* Adobe TBCP protocol */
 
 
+/*
+ * Types...
+ */
+
+typedef struct                         /**** Page information ****/
+{
+  char         *label;                 /* Page label */
+  off_t                offset;                 /* Offset to start of page */
+  ssize_t      length;                 /* Number of bytes for page */
+  int          lbrt[4];                /* PageBoundingBox */
+  const char   *input_slot,            /* Input slot option or NULL */
+               *manual_feed;           /* Manual feed option or NULL */
+} page_info_t;
+
+
 /*
  * Globals...
  */
 
 int            NumPages = 0;           /* Number of pages in file */
-long           Pages[MAX_PAGES];       /* Offsets to each page */
+cups_array_t   *Pages;                 /* Info on each page */
 const char     *PageRanges = NULL;     /* Range of pages selected */
 const char     *PageSet = NULL;        /* All, Even, Odd pages */
 int            Order = 0,              /* 0 = normal, 1 = reverse pages */
                Flip = 0,               /* Flip/mirror pages */
+               FitPlot = 0,            /* Fit pages to media */
                NUp = 1,                /* Number of pages on each sheet (1, 2, 4) */
                Collate = 0,            /* Collate copies? */
                Copies = 1,             /* Number of copies */
                UseESPsp = 0,           /* Use ESPshowpage? */
                Border = BORDER_NONE,   /* Border around pages */
                Layout = LAYOUT_LRTB,   /* Layout of N-up pages */
-               NormalLandscape = 0,    /* Normal rotation for landscape? */
-               Protocol = PROT_STANDARD;
-                                       /* Transmission protocol to use */
+               NormalLandscape = 0;    /* Normal rotation for landscape? */
 
 
 /*
  * Local functions...
  */
 
-static int     check_range(int page);
-static void    copy_bytes(FILE *fp, size_t length);
-static void    do_prolog(ppd_file_t *ppd);
-static void    do_setup(ppd_file_t *ppd, int copies,  int collate,
-                        int slowcollate, float g, float b);
-static void    end_nup(int number);
-static void    include_feature(ppd_file_t *ppd, const char *line, FILE *out);
-#define                is_first_page(p)        (NUp == 1 || (((p)+1) % NUp) == 1)
-#define                is_last_page(p)         (NUp > 1 && (((p)+1) % NUp) == 0)
-#define        is_not_last_page(p)     (NUp > 1 && ((p) % NUp) != 0)
-static void    psbcp(ppd_file_t *ppd);
-static char    *psgets(char *buf, size_t *bytes, FILE *fp);
-static size_t  pswrite(const char *buf, size_t bytes, FILE *fp);
-static void    start_nup(int number, int show_border);
+static page_info_t     *add_page(const char *label, off_t offset,
+                                 const int *lbrt);
+static int             check_range(int page);
+static void            copy_bytes(cups_file_t *fp, off_t offset,
+                                  size_t length);
+static void            do_prolog(ppd_file_t *ppd);
+static void            do_setup(ppd_file_t *ppd, int copies,  int collate,
+                                int slowcollate, float g, float b);
+static void            end_nup(int number);
+static void            include_feature(ppd_file_t *ppd, const char *line,
+                                       cups_file_t *out);
+#define                        is_first_page(p)        (NUp == 1 || (((p)+1) % NUp) == 1)
+#define                        is_last_page(p)         (NUp > 1 && (((p)+1) % NUp) == 0)
+#define                is_not_last_page(p)     (NUp > 1 && ((p) % NUp) != 0)
+static char            *psgets(char *buf, size_t *bytes, FILE *fp);
+static void            start_nup(int number, int show_border, const int *lbrt);
 
 
 /*
  * 'main()' - Main entry...
  */
 
-int                            /* O - Exit status */
-main(int  argc,                        /* I - Number of command-line arguments */
-     char *argv[])             /* I - Command-line arguments */
+int                                    /* O - Exit status */
+main(int  argc,                                /* I - Number of command-line args */
+     char *argv[])                     /* I - Command-line arguments */
 {
-  FILE         *fp;            /* Print file */
-  ppd_file_t   *ppd;           /* PPD file */
-  ppd_attr_t   *attr;          /* Attribute in PPD file */
-  int          num_options;    /* Number of print options */
-  cups_option_t        *options;       /* Print options */
-  const char   *val;           /* Option value */
-  char         tempfile[255];  /* Temporary file name */
-  FILE         *temp;          /* Temporary file */
-  int          tempfd;         /* Temporary file descriptor */
-  int          number;         /* Page number */
-  int          slowcollate;    /* 1 if we need to collate manually */
-  int          sloworder;      /* 1 if we need to order manually */
-  int          slowduplex;     /* 1 if we need an even number of pages */
-  char         line[8192];     /* Line buffer */
-  size_t       len;            /* Length of line buffer */
-  float                g;              /* Gamma correction value */
-  float                b;              /* Brightness factor */
-  int          level;          /* Nesting level for embedded files */
-  int          nbytes,         /* Number of bytes read */
-               tbytes;         /* Total bytes to read for binary data */
-  int          page;           /* Current page sequence number */
-  int          real_page;      /* "Real" page number in document */
-  int          page_count;     /* Page count for NUp */
-  int          basepage;       /* Base page number */
-  int          subpage;        /* Sub-page number */
-  int          copy;           /* Current copy */
-  int          saweof;         /* Did we see a %%EOF tag? */
-  int          sent_espsp,     /* Did we send the ESPshowpage commands? */
-               sent_prolog,    /* Did we send the prolog commands? */
-               sent_setup;     /* Did we send the setup commands? */
-
+  FILE         *fp;                    /* Print file */
+  ppd_file_t   *ppd;                   /* PPD file */
+  ppd_attr_t   *attr;                  /* Attribute in PPD file */
+  ppd_option_t *option;                /* Option */
+  ppd_choice_t *choice;                /* Marked option choice */
+  int          num_options;            /* Number of print options */
+  cups_option_t        *options;               /* Print options */
+  const char   *val;                   /* Option value */
+  char         tempfile[255];          /* Temporary file name */
+  cups_file_t  *temp;                  /* Temporary file */
+  int          number;                 /* Page number */
+  int          slowcollate;            /* 1 if we need to collate manually */
+  int          sloworder;              /* 1 if we need to order manually */
+  int          slowduplex;             /* 1 if we need an even page count */
+  char         line[8192];             /* Line buffer */
+  int          lbrt[4],                /* BoundingBox */
+               pagelbrt[4];            /* PageBoundingBox */
+  size_t       len;                    /* Length of line buffer */
+  float                g;                      /* Gamma correction value */
+  float                b;                      /* Brightness factor */
+  int          level;                  /* Nesting level for embedded files */
+  int          nbytes,                 /* Number of bytes read */
+               tbytes;                 /* Bytes to read for binary data */
+  int          page;                   /* Current page sequence number */
+  int          real_page;              /* "Real" page number in document */
+  int          page_count;             /* Page count for NUp */
+  int          basepage;               /* Base page number */
+  int          subpage;                /* Sub-page number */
+  int          copy;                   /* Current copy */
+  int          saweof;                 /* Did we see a %%EOF tag? */
+  int          sent_espsp,             /* Did we send ESPshowpage commands? */
+               sent_prolog,            /* Did we send the prolog commands? */
+               sent_setup,             /* Did we send the setup commands? */
+               emit_jcl;               /* Emit JCL? */
+  float                min_order;              /* Minimum output order for selection */
+  char         label[256];             /* Page label */
+  page_info_t  *pageinfo;              /* Page information */
+  const char   *ap_input_slot,         /* First page InputSlot option */
+               *ap_manual_feed,        /* First page ManualFeed option */
+               *input_slot,            /* Original InputSlot option */
+               *manual_feed;           /* Original ManualFeed option */
 
  /*
   * Make sure status messages are not buffered...
@@ -236,9 +262,25 @@ main(int  argc,                    /* I - Number of command-line arguments */
        !strcasecmp(val, "yes")))
     Collate = 1;
 
-  if ((val = cupsGetOption("OutputOrder", num_options, options)) != NULL &&
-      !strcasecmp(val, "Reverse"))
-    Order = 1;
+  if ((val = cupsGetOption("OutputOrder", num_options, options)) != NULL)
+  {
+    if (!strcasecmp(val, "Reverse"))
+      Order = 1;
+  }
+  else if (ppd)
+  {
+   /*
+    * Figure out the right default output order from the PPD file...
+    */
+
+    if ((choice = ppdFindMarkedChoice(ppd, "OutputBin")) != NULL &&
+        (attr = ppdFindAttr(ppd, "PageStackOrder", choice->choice)) != NULL &&
+       attr->value)
+      Order = !strcasecmp(attr->value, "Reverse");
+    else if ((attr = ppdFindAttr(ppd, "DefaultOutputOrder", NULL)) != NULL &&
+             attr->value)
+      Order = !strcasecmp(attr->value, "Reverse");
+  }
 
   if ((val = cupsGetOption("number-up", num_options, options)) != NULL)
     NUp = atoi(val);
@@ -278,38 +320,131 @@ main(int  argc,                  /* I - Number of command-line arguments */
   }
 
   if ((val = cupsGetOption("gamma", num_options, options)) != NULL)
+  {
+   /*
+    * Get gamma value from 1 to 10000...
+    */
+
     g = atoi(val) * 0.001f;
 
+    if (g < 0.001f)
+      g = 0.001f;
+    else if (g > 10.0f)
+      g = 10.0f;
+  }
+
   if ((val = cupsGetOption("brightness", num_options, options)) != NULL)
+  {
+   /*
+    * Get brightness value from 10 to 1000.
+    */
+
     b = atoi(val) * 0.01f;
 
+    if (b < 0.1f)
+      b = 0.1f;
+    else if (b > 10.0f)
+      b = 10.0f;
+  }
+
   if ((val = cupsGetOption("mirror", num_options, options)) != NULL &&
-      (!strcasecmp(val, "true") ||!strcasecmp(val, "on") ||
+      (!strcasecmp(val, "true") || !strcasecmp(val, "on") ||
        !strcasecmp(val, "yes")))
     Flip = 1;
 
+  if ((val = cupsGetOption("fitplot", num_options, options)) != NULL &&
+      (!strcasecmp(val, "true") || !strcasecmp(val, "on") ||
+       !strcasecmp(val, "yes")))
+    FitPlot = 1;
+
+  if ((val = cupsGetOption("emit-jcl", num_options, options)) != NULL &&
+      (!strcasecmp(val, "false") || !strcasecmp(val, "off") ||
+       !strcasecmp(val, "no") || !strcmp(val, "0")))
+    emit_jcl = 0;
+  else
+    emit_jcl = 1;
+
  /*
-  * See if we have to filter the fast or slow way...
+  * Handle input slot/manual feed selections...
   */
 
+  if ((choice = ppdFindMarkedChoice(ppd, "InputSlot")) != NULL)
+    input_slot = choice->choice;
+  else
+    input_slot = NULL;
+
+  if ((choice = ppdFindMarkedChoice(ppd, "ManualFeed")) != NULL)
+    manual_feed = choice->choice;
+  else
+    manual_feed = NULL;
+
+  ap_input_slot  = cupsGetOption("AP_FIRSTPAGE_InputSlot", num_options,
+                                 options);
+  ap_manual_feed = cupsGetOption("AP_FIRSTPAGE_ManualFeed", num_options,
+                                 options);
+  min_order      = 999.0f;
+
+  if (ppd && (ap_input_slot || ap_manual_feed))
+  {
+   /*
+    * The first page/sheet will be using different options than
+    * the rest, so figure out the minimum order dependency for
+    * each of the options...
+    */
+
+    if ((option = ppdFindOption(ppd, "PageRegion")) != NULL &&
+        option->order < min_order)
+      min_order = option->order;
+
+    if ((option = ppdFindOption(ppd, "InputSlot")) != NULL &&
+        option->order < min_order)
+      min_order = option->order;
+
+    if ((option = ppdFindOption(ppd, "ManualFeed")) != NULL &&
+        option->order < min_order)
+      min_order = option->order;
+  }
+
   if (ppd && ppd->manual_copies && Duplex && Copies > 1)
   {
    /*
     * Force collated copies when printing a duplexed document to
     * a non-PS printer that doesn't do hardware copy generation.
     * Otherwise the copies will end up on the front/back side of
-    * each page.  Also, set the "slowduplex" option to make sure
-    * that we output an even number of pages...
+    * each page.
     */
 
-    Collate    = 1;
-    slowduplex = 1;
+    Collate = 1;
   }
-  else
-    slowduplex = 0;
 
-  if (ppdFindOption(ppd, "Collate") == NULL && Collate && Copies > 1)
+ /*
+  * See if we have to filter the fast or slow way...
+  */
+
+  if (Collate && Copies > 1)
+  {
+   /*
+    * See if we need to manually collate the pages...
+    */
+
     slowcollate = 1;
+
+    if ((choice = ppdFindMarkedChoice(ppd, "Collate")) != NULL &&
+        !strcasecmp(choice->choice, "True"))
+    {
+     /*
+      * Hardware collate option is selected, see if the option is
+      * conflicting - if not, collate in hardware.  Otherwise,
+      * turn the hardware collate option off...
+      */
+
+      if ((option = ppdFindOption(ppd, "Option")) != NULL &&
+          !option->conflicted)
+       slowcollate = 0;
+      else
+        ppdMarkOption(ppd, "Collate", "False");
+    }
+  }
   else
     slowcollate = 0;
 
@@ -318,6 +453,11 @@ main(int  argc,                    /* I - Number of command-line arguments */
   else
     sloworder = 0;
 
+  if ((slowcollate || sloworder) && Duplex)
+    slowduplex = 1;
+  else
+    slowduplex = 0;
+
  /*
   * If we need to filter slowly, then create a temporary file for page data...
   *
@@ -327,38 +467,12 @@ main(int  argc,                   /* I - Number of command-line arguments */
 
   if (sloworder || slowcollate)
   {
-    tempfd = cupsTempFd(tempfile, sizeof(tempfile));
-    if (tempfd < 0)
-    {
-      perror("ERROR: Unable to open temp file");
-      temp = NULL;
-    }
-    else
-      temp = fdopen(tempfd, "wb+");
-
-    if (temp == NULL)
+    if ((temp = cupsTempFile2(tempfile, sizeof(tempfile))) == NULL)
       slowcollate = sloworder = 0;
   }
   else
     temp = NULL;
 
- /*
-  * See if we should use a binary transmission protocol...
-  */
-
-  if ((attr = ppdFindAttr(ppd, "cupsProtocol", NULL)) != NULL &&
-      attr->value != NULL)
-  {
-    if (!strcasecmp(attr->value, "TBCP"))
-      Protocol = PROT_TBCP;
-    else if (!strcasecmp(attr->value, "BCP"))
-    {
-      Protocol = PROT_BCP;
-
-      psbcp(ppd);
-    }
-  }
-
  /*
   * Write any "exit server" options that have been selected...
   */
@@ -369,7 +483,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
   * Write any JCL commands that are needed to print PostScript code...
   */
 
-  ppdEmitJCL(ppd, stdout, atoi(argv[1]), argv[2], argv[3]);
+  if (emit_jcl)
+    ppdEmitJCL(ppd, stdout, atoi(argv[1]), argv[2], argv[3]);
 
  /*
   * Read the first line to see if we have DSC comments...
@@ -408,13 +523,6 @@ main(int  argc,                    /* I - Number of command-line arguments */
       break;
   }
 
- /*
-  * Switch to TBCP mode as needed...
-  */
-
-  if (Protocol == PROT_TBCP)
-    fputs("\001M", stdout);
-
  /*
   * Start sending the document with any commands needed...
   */
@@ -486,8 +594,14 @@ main(int  argc,                    /* I - Number of command-line arguments */
     */
 
     puts("%%Pages: (atend)");
+    printf("%%%%BoundingBox: %.0f %.0f %.0f %.0f\n", PageLeft, PageBottom,
+           PageRight, PageTop);
 
-    level = 0;
+    level   = 0;
+    lbrt[0] = 0;
+    lbrt[1] = 0;
+    lbrt[2] = (int)PageWidth;
+    lbrt[3] = (int)PageLength;
 
     while (!feof(fp))
     {
@@ -573,10 +687,17 @@ main(int  argc,                   /* I - Number of command-line arguments */
           do_setup(ppd, Copies, Collate, slowcollate, g, b);
        }
       }
+      else if (!strncmp(line, "%%BoundingBox:", 14) && level == 0)
+      {
+        if (sscanf(line + 14, "%d%d%d%d", pagelbrt + 0, pagelbrt + 1,
+                  pagelbrt + 2, pagelbrt + 3) == 4)
+         memcpy(lbrt, pagelbrt, sizeof(lbrt));
+      }
       else if (!strncmp(line, "%%Page:", 7) && level == 0)
         break;
-      else if (!strncmp(line, "%%IncludeFeature:", 17) && level == 0 && NUp == 1)
-        include_feature(ppd, line, stdout);
+      else if (!strncmp(line, "%%IncludeFeature:", 17) && level == 0 &&
+               NUp == 1 && !FitPlot)
+        include_feature(ppd, line, NULL);
       else if (!strncmp(line, "%%BeginBinary:", 14) ||
                (!strncmp(line, "%%BeginData:", 12) &&
                !strstr(line, "ASCII") && !strstr(line, "Hex")))
@@ -601,12 +722,12 @@ main(int  argc,                   /* I - Number of command-line arguments */
            return (1);
          }
 
-         pswrite(line, nbytes, stdout);
+         fwrite(line, 1, nbytes, stdout);
          tbytes -= nbytes;
        }
       }
       else if (strncmp(line, "%%Pages:", 8) != 0)
-        pswrite(line, len, stdout);
+        fwrite(line, 1, len, stdout);
     }
 
    /*
@@ -669,16 +790,34 @@ main(int  argc,                   /* I - Number of command-line arguments */
     * Then read all of the pages, filtering as needed...
     */
 
-    for (page = 1, real_page = 1;;)
+    for (page = 1, real_page = 1, pageinfo = NULL;;)
     {
       if (!strncmp(line, "%%", 2))
         fprintf(stderr, "DEBUG: %d %s", level, line);
 
       if (!strncmp(line, "%%BeginDocument:", 16) ||
-          !strncmp(line, "%%BeginDocument ", 16))      /* Adobe Acrobat BUG */
+          !strncmp(line, "%%BeginDocument ", 16) ||    /* Adobe Acrobat BUG */
+         !strncmp(line, "%ADO_BeginApplication", 21))
+      {
         level ++;
-      else if (!strncmp(line, "%%EndDocument", 13) && level > 0)
+
+       if (!sloworder)
+          fputs(line, stdout);
+
+       if (slowcollate || sloworder)
+         cupsFilePuts(temp, line);
+      }
+      else if ((!strncmp(line, "%%EndDocument", 13) ||
+               !strncmp(line, "%ADO_EndApplication", 19)) && level > 0)
+      {
         level --;
+
+       if (!sloworder)
+          fputs(line, stdout);
+
+       if (slowcollate || sloworder)
+         cupsFilePuts(temp, line);
+      }
       else if (!strcmp(line, "\004") && len == 1)
         break;
       else if (!strncmp(line, "%%EOF", 5) && level == 0)
@@ -701,9 +840,11 @@ main(int  argc,                    /* I - Number of command-line arguments */
               fprintf(stderr, "DEBUG: %d %s", level, line);
 
            if (!strncmp(line, "%%BeginDocument:", 16) ||
-               !strncmp(line, "%%BeginDocument ", 16)) /* Adobe Acrobat BUG */
+               !strncmp(line, "%%BeginDocument ", 16) || /* Adobe Acrobat BUG */
+               !strncmp(line, "%ADO_BeginApplication", 21))
               level ++;
-           else if (!strncmp(line, "%%EndDocument", 13) && level > 0)
+           else if ((!strncmp(line, "%%EndDocument", 13) ||
+                     !strncmp(line, "%ADO_EndApplication", 19)) && level > 0)
               level --;
            else if (!strncmp(line, "%%Page:", 7) && level == 0)
            {
@@ -744,8 +885,29 @@ main(int  argc,                    /* I - Number of command-line arguments */
         if (!sloworder && NumPages > 0)
          end_nup(NumPages - 1);
 
+        if (sscanf(line, "%%%%Page:%255s%*d", label) != 1)
+         sprintf(label, "%d", page);
+
        if (slowcollate || sloworder)
-         Pages[NumPages] = ftell(temp);
+       {
+         pageinfo = add_page(label, cupsFileTell(temp), lbrt);
+
+          if (ap_input_slot || ap_manual_feed)
+         {
+           if (page == 0)
+           {
+             pageinfo->input_slot  = ap_input_slot;
+             pageinfo->manual_feed = ap_manual_feed;
+           }
+           else if (page == (1 + Duplex))
+           {
+             pageinfo->input_slot  = input_slot;
+             pageinfo->manual_feed = manual_feed;
+           }
+         }
+       }
+       else
+         pageinfo = NULL;
 
         if (!sloworder)
        {
@@ -754,17 +916,49 @@ main(int  argc,                   /* I - Number of command-line arguments */
            if (ppd == NULL || ppd->num_filters == 0)
              fprintf(stderr, "PAGE: %d %d\n", page, slowcollate ? 1 : Copies);
 
-            printf("%%%%Page: %d %d\n", page, page);
+            if (NUp > 1)
+             printf("%%%%Page: %d %d\n", page, page);
+           else
+              printf("%%%%Page: %s %d\n", label, page);
+
+            if (ap_input_slot || ap_manual_feed)
+           {
+             if (page == 0)
+             {
+               if (ap_input_slot)
+                 ppdMarkOption(ppd, "InputSlot", ap_input_slot);
+               if (ap_manual_feed)
+                 ppdMarkOption(ppd, "ManualFeed", ap_manual_feed);
+             }
+             else if (page == (1 + Duplex))
+             {
+               if (input_slot)
+                 ppdMarkOption(ppd, "InputSlot", input_slot);
+               if (manual_feed)
+                 ppdMarkOption(ppd, "ManualFeed", manual_feed);
+             }
+
+              ppdEmitAfterOrder(ppd, stdout, PPD_ORDER_DOCUMENT, 1, min_order);
+              ppdEmitAfterOrder(ppd, stdout, PPD_ORDER_ANY, 1, min_order);
+           }
+
            page ++;
            ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
          }
 
-         start_nup(NumPages, 1);
+         start_nup(NumPages, 1, lbrt);
        }
 
        NumPages ++;
        real_page ++;
       }
+      else if (!strncmp(line, "%%PageBoundingBox:", 18) && level == 0 &&
+               pageinfo)
+      {
+        if (sscanf(line + 18, "%d%d%d%d", pagelbrt + 0, pagelbrt + 1,
+                  pagelbrt + 2, pagelbrt + 3) == 4)
+         memcpy(pageinfo->lbrt, pagelbrt, sizeof(pageinfo->lbrt));
+      }
       else if (!strncmp(line, "%%BeginBinary:", 14) ||
                (!strncmp(line, "%%BeginData:", 12) &&
                !strstr(line, "ASCII") && !strstr(line, "Hex")))
@@ -778,7 +972,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
        if (!sloworder)
          fputs(line, stdout);
        if (slowcollate || sloworder)
-         fputs(line, temp);
+         cupsFilePuts(temp, line);
 
        while (tbytes > 0)
        {
@@ -794,15 +988,16 @@ main(int  argc,                   /* I - Number of command-line arguments */
          }
 
           if (!sloworder)
-           pswrite(line, nbytes, stdout);
+           fwrite(line, 1, nbytes, stdout);
 
           if (slowcollate || sloworder)
-           fwrite(line, 1, nbytes, temp);
+           cupsFileWrite(temp, line, nbytes);
 
          tbytes -= nbytes;
        }
       }
-      else if (!strncmp(line, "%%IncludeFeature:", 17))
+      else if (!strncmp(line, "%%IncludeFeature:", 17) && level == 0 &&
+               NUp == 1 && !FitPlot)
       {
        /*
         * Embed printer commands as needed...
@@ -810,16 +1005,16 @@ main(int  argc,                  /* I - Number of command-line arguments */
 
         if (level == 0 && NUp == 1)
        {
-         include_feature(ppd, line, stdout);
+         include_feature(ppd, line, NULL);
 
           if (slowcollate || sloworder)
            include_feature(ppd, line, temp);
        }
       }
-      else if (!strncmp(line, "%%BeginFeature:", 15) && NUp > 1)
+      else if (!strncmp(line, "%%BeginFeature:", 15) && (NUp > 1 || FitPlot))
       {
        /*
-        * Strip page options for N-up > 1...
+        * Strip page options for N-up > 1 or "fitplot"...
        */
 
         do
@@ -838,12 +1033,19 @@ main(int  argc,                  /* I - Number of command-line arguments */
       else
       {
         if (!sloworder)
-          pswrite(line, len, stdout);
+          fwrite(line, 1, len, stdout);
 
        if (slowcollate || sloworder)
-         fwrite(line, 1, len, temp);
+         cupsFileWrite(temp, line, len);
       }
 
+     /*
+      * Get next line from file...
+      */
+
+      if (pageinfo)
+       pageinfo->length = cupsFileTell(temp) - pageinfo->offset;
+
       len = sizeof(line);
       if (psgets(line, &len, fp) == NULL)
         break;
@@ -855,11 +1057,11 @@ main(int  argc,                  /* I - Number of command-line arguments */
 
       if (is_not_last_page(NumPages))
       {
-       start_nup(NUp - 1, 0);
+       start_nup(NUp - 1, 0, lbrt);
         end_nup(NUp - 1);
       }
 
-      if (Duplex && !(page & 1))
+      if (slowduplex && !(page & 1))
       {
        /*
         * Make sure we have an even number of pages...
@@ -872,7 +1074,7 @@ main(int  argc,                    /* I - Number of command-line arguments */
        page ++;
        ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
 
-       start_nup(NUp - 1, 0);
+       start_nup(NUp - 1, 0, lbrt);
        puts("showpage");
         end_nup(NUp - 1);
       }
@@ -880,38 +1082,51 @@ main(int  argc,                  /* I - Number of command-line arguments */
 
     if (slowcollate || sloworder)
     {
-      Pages[NumPages] = ftell(temp);
-
       if (!sloworder)
       {
         while (Copies > 1)
        {
-         rewind(temp);
-
-         for (number = 0; number < NumPages; number ++)
+         for (number = 0, pageinfo = (page_info_t *)cupsArrayFirst(Pages);
+              number < NumPages && pageinfo;
+              number ++, pageinfo = (page_info_t *)cupsArrayNext(Pages))
          {
            if (is_first_page(number))
            {
              if (ppd == NULL || ppd->num_filters == 0)
                fprintf(stderr, "PAGE: %d 1\n", page);
 
-              printf("%%%%Page: %d %d\n", page, page);
+              if (NUp == 1)
+               printf("%%%%Page: %s %d\n", pageinfo->label, page);
+              else
+               printf("%%%%Page: %d %d\n", page, page);
+
+              if (pageinfo->input_slot || pageinfo->manual_feed)
+             {
+               if (pageinfo->input_slot)
+                 ppdMarkOption(ppd, "InputSlot", pageinfo->input_slot);
+               if (pageinfo->manual_feed)
+                 ppdMarkOption(ppd, "ManualFeed", pageinfo->manual_feed);
+
+               ppdEmitAfterOrder(ppd, stdout, PPD_ORDER_DOCUMENT, 1, min_order);
+               ppdEmitAfterOrder(ppd, stdout, PPD_ORDER_ANY, 1, min_order);
+              }
+
              page ++;
              ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
            }
 
-           start_nup(number, 1);
-           copy_bytes(temp, Pages[number + 1] - Pages[number]);
+           start_nup(number, 1, pageinfo->lbrt);
+           copy_bytes(temp, pageinfo->offset, pageinfo->length);
            end_nup(number);
          }
 
           if (is_not_last_page(NumPages))
          {
-           start_nup(NUp - 1, 0);
+           start_nup(NUp - 1, 0, lbrt);
             end_nup(NUp - 1);
          }
 
-         if (Duplex && !(page & 1))
+         if (slowduplex && !(page & 1))
          {
           /*
             * Make sure we have an even number of pages...
@@ -924,7 +1139,7 @@ main(int  argc,                    /* I - Number of command-line arguments */
            page ++;
            ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
 
-           start_nup(NUp - 1, 0);
+           start_nup(NUp - 1, 0, lbrt);
            puts("showpage");
             end_nup(NUp - 1);
          }
@@ -941,7 +1156,7 @@ main(int  argc,                    /* I - Number of command-line arguments */
 
         do
        {
-         if (Duplex && (page_count & 1))
+         if (slowduplex && (page_count & 1))
             basepage = page_count;
          else
            basepage = page_count - 1;
@@ -952,14 +1167,31 @@ main(int  argc,                  /* I - Number of command-line arguments */
              fprintf(stderr, "PAGE: %d %d\n", page,
                      slowcollate ? 1 : Copies);
 
-            printf("%%%%Page: %d %d\n", page, page);
+           pageinfo = (page_info_t *)cupsArrayIndex(Pages, basepage);
+
+            if (NUp == 1)
+              printf("%%%%Page: %s %d\n", pageinfo->label, page);
+           else
+              printf("%%%%Page: %d %d\n", page, page);
+
+            if (pageinfo->input_slot || pageinfo->manual_feed)
+           {
+             if (pageinfo->input_slot)
+               ppdMarkOption(ppd, "InputSlot", pageinfo->input_slot);
+             if (pageinfo->manual_feed)
+               ppdMarkOption(ppd, "ManualFeed", pageinfo->manual_feed);
+
+              ppdEmitAfterOrder(ppd, stdout, PPD_ORDER_DOCUMENT, 1, min_order);
+              ppdEmitAfterOrder(ppd, stdout, PPD_ORDER_ANY, 1, min_order);
+            }
+
            page ++;
 
            ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
 
             if (basepage >= page_count)
            {
-             start_nup(NUp - 1, 0);
+             start_nup(NUp - 1, 0, pageinfo->lbrt);
              puts("showpage");
               end_nup(NUp - 1);
            }
@@ -969,15 +1201,16 @@ main(int  argc,                  /* I - Number of command-line arguments */
                   subpage < NUp && number < NumPages;
                   subpage ++, number ++)
              {
-               start_nup(number, 1);
-               fseek(temp, Pages[number], SEEK_SET);
-               copy_bytes(temp, Pages[number + 1] - Pages[number]);
+               pageinfo = (page_info_t *)cupsArrayIndex(Pages, number);
+
+               start_nup(number, 1, pageinfo->lbrt);
+               copy_bytes(temp, pageinfo->offset, pageinfo->length);
                end_nup(number);
              }
 
               if (is_not_last_page(number))
              {
-               start_nup(NUp - 1, 0);
+               start_nup(NUp - 1, 0, lbrt);
                end_nup(NUp - 1);
              }
            }
@@ -1007,7 +1240,7 @@ main(int  argc,                   /* I - Number of command-line arguments */
 
       if (!(!strcmp(line, "\004") && len == 1) &&
           strncmp(line, "%%Pages:", 8) != 0)
-        pswrite(line, len, stdout);
+        fwrite(line, 1, len, stdout);
 
       if (!strncmp(line, "%%EOF", 5))
       {
@@ -1050,10 +1283,10 @@ main(int  argc,                 /* I - Number of command-line arguments */
 
     while ((nbytes = fread(line, 1, sizeof(line), fp)) > 0)
     {
-      pswrite(line, nbytes, stdout);
+      fwrite(line, 1, nbytes, stdout);
 
       if (slowcollate)
-       fwrite(line, 1, nbytes, temp);
+       cupsFileWrite(temp, line, nbytes);
     }
 
     if (UseESPsp)
@@ -1070,8 +1303,7 @@ main(int  argc,                   /* I - Number of command-line arguments */
          fputs("PAGE: 1 1\n", stderr);
 
         ppdEmit(ppd, stdout, PPD_ORDER_PAGE);
-       rewind(temp);
-       copy_bytes(temp, 0);
+       copy_bytes(temp, 0, 0);
        Copies --;
 
         if (UseESPsp)
@@ -1094,7 +1326,13 @@ main(int  argc,                  /* I - Number of command-line arguments */
   * End the job with the appropriate JCL command or CTRL-D otherwise.
   */
 
-  ppdEmitJCLEnd(ppd, stdout);
+  if (emit_jcl)
+  {
+    if (ppd && ppd->jcl_end)
+      ppdEmitJCLEnd(ppd, stdout);
+    else
+      putchar(0x04);
+  }
 
  /*
   * Close files and remove the temporary file if needed...
@@ -1102,7 +1340,7 @@ main(int  argc,                   /* I - Number of command-line arguments */
 
   if (slowcollate || sloworder)
   {
-    fclose(temp);
+    cupsFileClose(temp);
     unlink(tempfile);
   }
 
@@ -1179,21 +1417,64 @@ check_range(int page)   /* I - Page number */
 }
 
 
+/*
+ * 'add_page()' - Add a page to the Pages array...
+ */
+
+static page_info_t *                   /* O - New page info object */
+add_page(const char *label,            /* I - Page label */
+         off_t      offset,            /* I - Offset in file */
+        const int  *lbrt)              /* I - BoundingBox for page */
+{
+  page_info_t  *pageinfo;              /* New page info object */
+
+
+  if (!Pages)
+    Pages = cupsArrayNew(NULL, NULL);
+
+  if (!Pages)
+  {
+    fprintf(stderr, "EMERG: Unable to allocate memory for pages array: %s\n",
+            strerror(errno));
+    exit(1);
+  }
+
+  if ((pageinfo = calloc(1, sizeof(page_info_t))) == NULL)
+  {
+    fprintf(stderr, "EMERG: Unable to allocate memory for page info: %s\n",
+            strerror(errno));
+    exit(1);
+  }
+
+  pageinfo->label  = strdup(label);
+  pageinfo->offset = offset;
+
+  memcpy(pageinfo->lbrt, lbrt, sizeof(pageinfo->lbrt));
+
+  cupsArrayAdd(Pages, pageinfo);
+
+  return (pageinfo);
+}
+
+
 /*
  * 'copy_bytes()' - Copy bytes from the input file to stdout...
  */
 
 static void
-copy_bytes(FILE   *fp,         /* I - File to read from */
-           size_t length)      /* I - Length of page data */
+copy_bytes(cups_file_t *fp,            /* I - File to read from */
+           off_t       offset,         /* I - Offset to page data */
+           size_t      length)         /* I - Length of page data */
 {
-  char         buffer[8192];   /* Data buffer */
-  size_t       nbytes,         /* Number of bytes read */
-               nleft;          /* Number of bytes left/remaining */
+  char         buffer[8192];           /* Data buffer */
+  ssize_t      nbytes;                 /* Number of bytes read */
+  size_t       nleft;                  /* Number of bytes left/remaining */
 
 
   nleft = length;
 
+  cupsFileSeek(fp, offset);
+
   while (nleft > 0 || length == 0)
   {
     if (nleft > sizeof(buffer) || length == 0)
@@ -1201,12 +1482,12 @@ copy_bytes(FILE   *fp,          /* I - File to read from */
     else
       nbytes = nleft;
 
-    if ((nbytes = fread(buffer, 1, nbytes, fp)) < 1)
+    if ((nbytes = cupsFileRead(fp, buffer, nbytes)) < 1)
       return;
 
     nleft -= nbytes;
 
-    pswrite(buffer, nbytes, stdout);
+    fwrite(buffer, 1, nbytes, stdout);
   }
 }
 
@@ -1222,7 +1503,7 @@ do_prolog(ppd_file_t *ppd)                /* I - PPD file */
   * Send the document prolog commands...
   */
 
-  if (ppd != NULL && ppd->patches != NULL)
+  if (ppd && ppd->patches)
   {
     puts("%%BeginFeature: *JobPatchFile 1");
     puts(ppd->patches);
@@ -1362,9 +1643,9 @@ end_nup(int number)       /* I - Page number */
  */
 
 static void
-include_feature(ppd_file_t *ppd,       /* I - PPD file */
-                const char *line,      /* I - DSC line */
-               FILE       *out)        /* I - Output file */
+include_feature(ppd_file_t  *ppd,      /* I - PPD file */
+                const char  *line,     /* I - DSC line */
+               cups_file_t *out)       /* I - Output file */
 {
   char         name[255],              /* Option name */
                value[255];             /* Option value */
@@ -1395,8 +1676,8 @@ include_feature(ppd_file_t *ppd,  /* I - PPD file */
   if (option->section == PPD_ORDER_EXIT ||
       option->section == PPD_ORDER_JCL)
   {
-    fprintf(stderr, "WARNING: Option \"%s\" cannot be included via IncludeFeature!\n",
-            name + 1);
+    fprintf(stderr, "WARNING: Option \"%s\" cannot be included via "
+                    "IncludeFeature!\n", name + 1);
     return;
   }
 
@@ -1411,72 +1692,34 @@ include_feature(ppd_file_t *ppd,        /* I - PPD file */
   * Emit the option...
   */
 
-  fputs("[{\n", out);
-  fprintf(out, "%%%%BeginFeature: %s %s\n", name, value);
-  if (choice->code && choice->code[0])
-  {
-    fputs(choice->code, out);
-
-    if (choice->code[strlen(choice->code) - 1] != '\n')
-      putc('\n', out);
-  }
-  fputs("%%EndFeature\n", out);
-  fputs("} stopped cleartomark\n", out);
-}
-
-
-/*
- * 'psbcp()' - Enable the binary communications protocol on the printer.
- */
-
-static void
-psbcp(ppd_file_t *ppd)                 /* I - PPD file */
-{
-  if (ppd->jcl_begin)
-    fputs(ppd->jcl_begin, stdout);
-  if (ppd->jcl_ps)
-    fputs(ppd->jcl_ps, stdout);
-
-  if (ppd->language_level == 1)
+  if (out)
   {
-   /*
-    * Use setsoftwareiomode for BCP mode...
-    */
-
-    fputs("%!PS-Adobe-3.0 ExitServer\n", stdout);
-    fputs("%%Title: (BCP - Level 1)\n", stdout);
-    fputs("%%EndComments\n", stdout);
-    fputs("%%BeginExitServer: 0\n", stdout);
-    fputs("serverdict begin 0 exitserver\n", stdout);
-    fputs("%%EndExitServer\n", stdout);
-    fputs("statusdict begin\n", stdout);
-    fputs("/setsoftwareiomode known {100 setsoftwareiomode}\n", stdout);
-    fputs("end\n", stdout);
-    fputs("%EOF\n", stdout);
+    cupsFilePuts(out, "[{\n");
+    cupsFilePrintf(out, "%%%%BeginFeature: %s %s\n", name, value);
+    if (choice->code && choice->code[0])
+    {
+      if (choice->code[strlen(choice->code) - 1] != '\n')
+       cupsFilePrintf(out, "%s\n", choice->code);
+      else
+       cupsFilePuts(out, choice->code);
+    }
+    cupsFilePuts(out, "%%EndFeature\n");
+    cupsFilePuts(out, "} stopped cleartomark\n");
   }
   else
   {
-   /*
-    * Use setdevparams for BCP mode...
-    */
-
-    fputs("%!PS-Adobe-3.0\n", stdout);
-    fputs("%%Title: (BCP - Level 2)\n", stdout);
-    fputs("%%EndComments\n", stdout);
-    fputs("currentsysparams\n", stdout);
-    fputs("/CurInputDevice 2 copy known {\n", stdout);
-    fputs("get\n", stdout);
-    fputs("<</Protocol /Binary>> setdevparams\n", stdout);
-    fputs("}{\n", stdout);
-    fputs("pop pop\n", stdout);
-    fputs("} ifelse\n", stdout);
-    fputs("%EOF\n", stdout);
+    puts("[{");
+    printf("%%%%BeginFeature: %s %s\n", name, value);
+    if (choice->code && choice->code[0])
+    {
+      if (choice->code[strlen(choice->code) - 1] != '\n')
+        printf("%s\n", choice->code);
+      else
+        fputs(choice->code, stdout);
+    }
+    puts("%%EndFeature");
+    puts("} stopped cleartomark");
   }
-
-  if (ppd->jcl_end)
-    fputs(ppd->jcl_end, stdout);
-  else if (ppd->num_filters == 0)
-    putchar(0x04);
 }
 
 
@@ -1558,80 +1801,14 @@ psgets(char   *buf,                     /* I  - Buffer to read into */
 }
 
 
-/*
- * 'pswrite()' - Write data from a file.
- */
-
-static size_t                          /* O - Number of bytes written */
-pswrite(const char *buf,               /* I - Buffer to write */
-        size_t     bytes,              /* I - Bytes to write */
-       FILE       *fp)                 /* I - File to write to */
-{
-  size_t       count;                  /* Remaining bytes */
-
-
-  switch (Protocol)
-  {
-    case PROT_STANDARD :
-        return (fwrite(buf, 1, bytes, fp));
-
-    case PROT_BCP :
-        for (count = bytes; count > 0; count --, buf ++)
-         switch (*buf)
-         {
-           case 0x01 : /* CTRL-A */
-           case 0x03 : /* CTRL-C */
-           case 0x04 : /* CTRL-D */
-           case 0x05 : /* CTRL-E */
-           case 0x11 : /* CTRL-Q */
-           case 0x13 : /* CTRL-S */
-           case 0x14 : /* CTRL-T */
-           case 0x1c : /* CTRL-\ */
-               putchar(0x01);
-               putchar(*buf ^ 0x40);
-               break;
-
-           default :
-               putchar(*buf);
-               break;
-         }
-        return (bytes);
-
-    case PROT_TBCP :
-        for (count = bytes; count > 0; count --, buf ++)
-         switch (*buf)
-         {
-           case 0x01 : /* CTRL-A */
-           case 0x03 : /* CTRL-C */
-           case 0x04 : /* CTRL-D */
-           case 0x05 : /* CTRL-E */
-           case 0x11 : /* CTRL-Q */
-           case 0x13 : /* CTRL-S */
-           case 0x14 : /* CTRL-T */
-           case 0x1b : /* CTRL-[ (aka ESC) */
-           case 0x1c : /* CTRL-\ */
-               putchar(0x01);
-               putchar(*buf ^ 0x40);
-               break;
-
-           default :
-               putchar(*buf);
-               break;
-         }
-        return (bytes);
-  }
-
-  return (fwrite(buf, 1, bytes, fp));
-}
-
-
 /*
  * 'start_nup()' - Start processing for N-up printing...
  */
 
 static void
-start_nup(int number,                  /* I - Page number */
-          int show_border)             /* I - Show the page border? */
+start_nup(int       number,            /* I - Page number */
+          int       show_border,       /* I - Show the page border? */
+         const int *lbrt)              /* I - Page BoundingBox */ 
 {
   int  pos;                            /* Position on page */
   int  x, y;                           /* Relative position of subpage */
@@ -1647,8 +1824,8 @@ start_nup(int number,                     /* I - Page number */
     printf("%.1f 0.0 translate -1 1 scale\n", PageWidth);
 
   pos = number % NUp;
-  pw  = PageRight - PageLeft;
-  pl  = PageTop - PageBottom;
+  pw  = lbrt[2] - lbrt[0];
+  pl  = lbrt[3] - lbrt[1];
 
   fprintf(stderr, "DEBUG: pw = %.1f, pl = %.1f\n", pw, pl);
   fprintf(stderr, "DEBUG: PageLeft = %.1f, PageRight = %.1f\n", PageLeft, PageRight);
@@ -1670,14 +1847,34 @@ start_nup(int number,                   /* I - Page number */
 
   if (Duplex && NUp > 1 && ((number / NUp) & 1))
     printf("%.1f %.1f translate\n", PageWidth - PageRight, PageBottom);
-  else if (NUp > 1)
+  else if (NUp > 1 || FitPlot)
     printf("%.1f %.1f translate\n", PageLeft, PageBottom);
 
   switch (NUp)
   {
     default :
-        w = PageWidth;
-       l = PageLength;
+        if (FitPlot)
+       {
+          w = PageRight - PageLeft;
+          l = w * pl / pw;
+
+          if (l > (PageTop - PageBottom))
+          {
+            l = PageTop - PageBottom;
+            w = l * pw / pl;
+          }
+
+          tx = 0.5 * (PageRight - PageLeft - w);
+          ty = 0.5 * (PageTop - PageBottom - l);
+
+         printf("%.1f %.1f translate %.3f %.3f scale\n", tx, ty, w / pw,
+                l / pl);
+       }
+       else
+       {
+          w = PageWidth;
+         l = PageLength;
+       }
        break;
 
     case 2 :
@@ -1987,11 +2184,12 @@ start_nup(int number,                   /* I - Page number */
     * Clip the page that follows to the bounding box of the page...
     */
 
-    printf("0 0 %.1f %.1f ESPrc\n", PageWidth, PageLength);
+    printf("%d %d translate\n", -lbrt[0], -lbrt[1]);
+    printf("0 0 %.1f %.1f ESPrc\n", w, l);
   }
 }
 
 
 /*
- * End of "$Id: pstops.c 4672 2005-09-18 04:25:46Z mike $".
+ * End of "$Id: pstops.c 5092 2006-02-09 00:54:31Z mike $".
  */
index 9f4afb8f374f0190eb4bfba5ebb68cf8a4241718..e22041de1ad3e258199ea241f37dd84af923d47e 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $"
+# "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $"
 #
 #   Fonts makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1993-2005 by Easy Software Products.
+#   Copyright 1993-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 #   property of Easy Software Products and are protected by Federal
@@ -51,12 +51,12 @@ clean:
 #
 
 install:       all
-       $(INSTALL_DIR) $(DATADIR)/fonts
+       $(INSTALL_DIR) -m 755 $(DATADIR)/fonts
        for file in $(FONTS); do \
                $(INSTALL_DATA) $$file $(DATADIR)/fonts; \
        done
 
 
 #
-# End of "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $".
+# End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".
 #
index 06f3c924b91d8c65c7b8d4ffd85d39b36db9c970..975af256c97b6012d048933551998deca9bda466 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: cups.sh.in 4971 2006-01-24 14:33:18Z mike $"
+# "$Id: cups.sh.in 5118 2006-02-16 14:29:53Z mike $"
 #
 #   Startup/shutdown script for the Common UNIX Printing System (CUPS).
 #
@@ -102,11 +102,10 @@ esac
 #### OS-Independent Stuff
 
 #
-# Set the timezone, if possible...  This allows the
-# scheduler and all child processes to know the local
-# timezone when reporting dates and times to the user. 
-# If no timezone information is found, then Greenwich
-# Mean Time (GMT) will probably be used.
+# Set the timezone, if possible...  This allows the scheduler and
+# all child processes to know the local timezone when reporting
+# dates and times to the user.  If no timezone information is
+# found, then Greenwich Mean Time (GMT) will probably be used.
 #
 
 for file in /etc/TIMEZONE /etc/rc.config /etc/sysconfig/clock; do
@@ -127,6 +126,15 @@ if test "x$TZ" != x; then
        export TZ
 fi
 
+#
+# Don't use TMPDIR environment variable from init script, as that can
+# cause cupsd to set TempDir to a user's temporary directory instead
+# of the default...
+#
+
+unset TMPDIR
+
+
 #
 # See if the CUPS server (cupsd) is running...
 #
@@ -207,5 +215,5 @@ exit 0
 
 
 #
-# End of "$Id: cups.sh.in 4971 2006-01-24 14:33:18Z mike $".
+# End of "$Id: cups.sh.in 5118 2006-02-16 14:29:53Z mike $".
 #
index 67f19cbd2d09c2d9ef0c2f6a57998116ce809b1e..c4341fc15a3b54f9d3d4e00874271669cae4ac18 100644 (file)
@@ -2,8 +2,6 @@
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-       <key>Enabled</key>
-       <true/>
        <key>Label</key>
        <string>org.cups.cupsd</string>
        <key>OnDemand</key>
index bad408908454609721bfabb1093088c2bf5e4f56..de9d14e7d0a2becbfddfb91b4bfef514a5f035d1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 4965 2006-01-21 06:12:17Z mike $"
+# "$Id: Makefile 5114 2006-02-16 12:28:29Z mike $"
 #
 #   Locale file makefile for the Common UNIX Printing System (CUPS).
 #
@@ -46,15 +46,22 @@ clean:
        $(RM) translate translate.o
 
 
+#
+# Update dependencies...
+#
+
+depend:
+
+
 #
 # Install files...
 #
 
 install:       all
-       $(INSTALL_DIR) $(LOCALEDIR)
+       $(INSTALL_DIR) -m 755 $(LOCALEDIR)
        for loc in $(LOCALES) ; do \
-               $(INSTALL_DIR) $(LOCALEDIR)/$$loc ; \
-               $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc ; \
+               $(INSTALL_DIR) -m 755 $(LOCALEDIR)/$$loc ; \
+               $(INSTALL_DATA) cups_$$loc.po $(LOCALEDIR)/$$loc/cups_$$loc.po ; \
        done
 
 
@@ -95,5 +102,5 @@ translate.o: ../cups/http.h ../cups/i18n.h ../cups/language.h ../cups/string.h
 
 
 #
-# End of "$Id: Makefile 4965 2006-01-21 06:12:17Z mike $".
+# End of "$Id: Makefile 5114 2006-02-16 12:28:29Z mike $".
 #
index 0f443a783c6e47c0dcf6a35f5e83fbb05389ef63..d1a0aeb8f05e30f8d078e34b6df7bd16d73391c4 100644 (file)
@@ -29,7 +29,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2006-01-18 22:26-0500\n"
+"POT-Creation-Date: 2006-02-15 19:50-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -37,7 +37,7 @@ msgstr ""
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: cgi-bin/admin.c:1276 cgi-bin/admin.c:1154
+#: cgi-bin/admin.c:1276 cgi-bin/admin.c:1154 cgi-bin/admin.c:1195
 msgid "Options Installed"
 msgstr ""
 
@@ -94,33 +94,33 @@ msgstr ""
 msgid "Auto"
 msgstr ""
 
-#: scheduler/client.c:2247 scheduler/client.c:2251
+#: scheduler/client.c:2247 scheduler/client.c:2251 scheduler/client.c:2274
 msgid "Enter your username and password or the root username and password to access this page."
 msgstr ""
 
-#: scheduler/client.c:2252 scheduler/client.c:2256
+#: scheduler/client.c:2252 scheduler/client.c:2256 scheduler/client.c:2279
 msgid "You must use a https: URL to access this page."
 msgstr ""
 
-#: scheduler/ipp.c:236 scheduler/ipp.c:244
+#: scheduler/ipp.c:236 scheduler/ipp.c:244 scheduler/ipp.c:246
 #, c-format
 msgid "Bad request version number %d.%d!"
 msgstr ""
 
-#: scheduler/ipp.c:246 scheduler/ipp.c:254
+#: scheduler/ipp.c:246 scheduler/ipp.c:254 scheduler/ipp.c:256
 msgid "No attributes in request!"
 msgstr ""
 
-#: scheduler/ipp.c:269 scheduler/ipp.c:277
+#: scheduler/ipp.c:269 scheduler/ipp.c:277 scheduler/ipp.c:279
 #, c-format
 msgid "Attribute groups are out of order (%x < %x)!"
 msgstr ""
 
-#: scheduler/ipp.c:379 scheduler/ipp.c:389
+#: scheduler/ipp.c:379 scheduler/ipp.c:389 scheduler/ipp.c:391
 msgid "Missing required attributes!"
 msgstr ""
 
-#: scheduler/ipp.c:575 scheduler/ipp.c:585
+#: scheduler/ipp.c:575 scheduler/ipp.c:585 scheduler/ipp.c:591
 #, c-format
 msgid "%s not supported!"
 msgstr ""
@@ -136,116 +136,122 @@ msgstr ""
 #: scheduler/ipp.c:5237 scheduler/ipp.c:5526 scheduler/ipp.c:5834
 #: scheduler/ipp.c:6113 scheduler/ipp.c:6155 scheduler/ipp.c:6657
 #: scheduler/ipp.c:7365 scheduler/ipp.c:8251 scheduler/ipp.c:8662
-#: scheduler/ipp.c:8742 scheduler/ipp.c:8917
+#: scheduler/ipp.c:8742 scheduler/ipp.c:8917 scheduler/ipp.c:702
+#: scheduler/ipp.c:1093 scheduler/ipp.c:2357 scheduler/ipp.c:2472
+#: scheduler/ipp.c:3993 scheduler/ipp.c:4730 scheduler/ipp.c:4973
+#: scheduler/ipp.c:5357 scheduler/ipp.c:5769 scheduler/ipp.c:6077
+#: scheduler/ipp.c:6368 scheduler/ipp.c:6410 scheduler/ipp.c:6916
+#: scheduler/ipp.c:7626 scheduler/ipp.c:8589 scheduler/ipp.c:9003
+#: scheduler/ipp.c:9084 scheduler/ipp.c:9259
 msgid "The printer or class was not found."
 msgstr ""
 
-#: scheduler/ipp.c:762 scheduler/ipp.c:777
+#: scheduler/ipp.c:762 scheduler/ipp.c:777 scheduler/ipp.c:784
 msgid "The printer-uri must be of the form \"ipp://HOSTNAME/classes/CLASSNAME\"."
 msgstr ""
 
 #: scheduler/ipp.c:778 scheduler/ipp.c:1454 scheduler/ipp.c:793
-#: scheduler/ipp.c:1482
+#: scheduler/ipp.c:1482 scheduler/ipp.c:800 scheduler/ipp.c:1515
 #, c-format
 msgid "The printer-uri \"%s\" contains invalid characters."
 msgstr ""
 
-#: scheduler/ipp.c:811 scheduler/ipp.c:826
+#: scheduler/ipp.c:811 scheduler/ipp.c:826 scheduler/ipp.c:833
 #, c-format
 msgid "A printer named \"%s\" already exists!"
 msgstr ""
 
-#: scheduler/ipp.c:904 scheduler/ipp.c:924
+#: scheduler/ipp.c:904 scheduler/ipp.c:924 scheduler/ipp.c:933
 #, c-format
 msgid "Attempt to set %s printer-state to bad value %d!"
 msgstr ""
 
-#: scheduler/ipp.c:1000 scheduler/ipp.c:1022
+#: scheduler/ipp.c:1000 scheduler/ipp.c:1022 scheduler/ipp.c:1034
 #, c-format
 msgid "add_class: Unknown printer-op-policy \"%s\"."
 msgstr ""
 
-#: scheduler/ipp.c:1013 scheduler/ipp.c:1035
+#: scheduler/ipp.c:1013 scheduler/ipp.c:1035 scheduler/ipp.c:1047
 #, c-format
 msgid "add_class: Unknown printer-error-policy \"%s\"."
 msgstr ""
 
-#: scheduler/ipp.c:1144 scheduler/ipp.c:1168
+#: scheduler/ipp.c:1144 scheduler/ipp.c:1168 scheduler/ipp.c:1200
 msgid "Unable to allocate memory for file types!"
 msgstr ""
 
 #: scheduler/ipp.c:1290 scheduler/ipp.c:4501 scheduler/ipp.c:1316
-#: scheduler/ipp.c:4705
+#: scheduler/ipp.c:4705 scheduler/ipp.c:1348 scheduler/ipp.c:4804
 #, c-format
 msgid "Character set \"%s\" not supported!"
 msgstr ""
 
 #: scheduler/ipp.c:1299 scheduler/ipp.c:4510 scheduler/ipp.c:1325
-#: scheduler/ipp.c:4714
+#: scheduler/ipp.c:4714 scheduler/ipp.c:1357 scheduler/ipp.c:4813
 #, c-format
 msgid "Language \"%s\" not supported!"
 msgstr ""
 
 #: scheduler/ipp.c:1309 scheduler/ipp.c:4520 scheduler/ipp.c:1335
-#: scheduler/ipp.c:4724
+#: scheduler/ipp.c:4724 scheduler/ipp.c:1367 scheduler/ipp.c:4823
 #, c-format
 msgid "The notify-user-data value is too large (%d > 63 octets)!"
 msgstr ""
 
-#: scheduler/ipp.c:1326 scheduler/ipp.c:1352
+#: scheduler/ipp.c:1326 scheduler/ipp.c:1352 scheduler/ipp.c:1384
 msgid "The notify-lease-duration attribute cannot be used with job subscriptions."
 msgstr ""
 
-#: scheduler/ipp.c:1438 scheduler/ipp.c:1466
+#: scheduler/ipp.c:1438 scheduler/ipp.c:1466 scheduler/ipp.c:1499
 msgid "The printer-uri must be of the form \"ipp://HOSTNAME/printers/PRINTERNAME\"."
 msgstr ""
 
-#: scheduler/ipp.c:1487 scheduler/ipp.c:1515
+#: scheduler/ipp.c:1487 scheduler/ipp.c:1515 scheduler/ipp.c:1548
 #, c-format
 msgid "A class named \"%s\" already exists!"
 msgstr ""
 
-#: scheduler/ipp.c:1575 scheduler/ipp.c:1607
+#: scheduler/ipp.c:1575 scheduler/ipp.c:1607 scheduler/ipp.c:1644
 #, c-format
 msgid "File device URIs have been disabled! To enable, see the FileDevice directive in \"%s/cupsd.conf\"."
 msgstr ""
 
-#: scheduler/ipp.c:1595 scheduler/ipp.c:1627
+#: scheduler/ipp.c:1595 scheduler/ipp.c:1627 scheduler/ipp.c:1664
 #, c-format
 msgid "Bad device-uri \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:1626 scheduler/ipp.c:1659
+#: scheduler/ipp.c:1626 scheduler/ipp.c:1659 scheduler/ipp.c:1698
 #, c-format
 msgid "Bad port-monitor \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:1669 scheduler/ipp.c:1705
+#: scheduler/ipp.c:1669 scheduler/ipp.c:1705 scheduler/ipp.c:1744
 #, c-format
 msgid "Bad printer-state value %d!"
 msgstr ""
 
-#: scheduler/ipp.c:1762 scheduler/ipp.c:1800
+#: scheduler/ipp.c:1762 scheduler/ipp.c:1800 scheduler/ipp.c:1842
 #, c-format
 msgid "Unknown printer-op-policy \"%s\"."
 msgstr ""
 
-#: scheduler/ipp.c:1775 scheduler/ipp.c:1813
+#: scheduler/ipp.c:1775 scheduler/ipp.c:1813 scheduler/ipp.c:1855
 #, c-format
 msgid "Unknown printer-error-policy \"%s\"."
 msgstr ""
 
-#: scheduler/ipp.c:1837 scheduler/ipp.c:1875
+#: scheduler/ipp.c:1837 scheduler/ipp.c:1875 scheduler/ipp.c:1919
 #, c-format
 msgid "Unable to copy interface script - %s!"
 msgstr ""
 
-#: scheduler/ipp.c:1862 scheduler/ipp.c:1900
+#: scheduler/ipp.c:1862 scheduler/ipp.c:1900 scheduler/ipp.c:1944
 #, c-format
 msgid "Unable to copy PPD file - %s!"
 msgstr ""
 
-#: scheduler/ipp.c:1915 scheduler/ipp.c:1954
+#: scheduler/ipp.c:1915 scheduler/ipp.c:1954 scheduler/ipp.c:2000
 msgid "Unable to copy PPD file!"
 msgstr ""
 
@@ -254,7 +260,10 @@ msgstr ""
 #: scheduler/ipp.c:7538 scheduler/ipp.c:7776 scheduler/ipp.c:8261
 #: scheduler/ipp.c:2116 scheduler/ipp.c:2412 scheduler/ipp.c:5102
 #: scheduler/ipp.c:5955 scheduler/ipp.c:7452 scheduler/ipp.c:7599
-#: scheduler/ipp.c:7839 scheduler/ipp.c:8334
+#: scheduler/ipp.c:7839 scheduler/ipp.c:8334 scheduler/ipp.c:2158
+#: scheduler/ipp.c:2451 scheduler/ipp.c:5220 scheduler/ipp.c:6210
+#: scheduler/ipp.c:7713 scheduler/ipp.c:7928 scheduler/ipp.c:8167
+#: scheduler/ipp.c:8672
 msgid "Got a printer-uri attribute but no job-id!"
 msgstr ""
 
@@ -264,6 +273,9 @@ msgstr ""
 #: scheduler/ipp.c:2138 scheduler/ipp.c:2484 scheduler/ipp.c:5125
 #: scheduler/ipp.c:5978 scheduler/ipp.c:6201 scheduler/ipp.c:7475
 #: scheduler/ipp.c:7622 scheduler/ipp.c:7862 scheduler/ipp.c:8357
+#: scheduler/ipp.c:2180 scheduler/ipp.c:2523 scheduler/ipp.c:5243
+#: scheduler/ipp.c:6233 scheduler/ipp.c:6456 scheduler/ipp.c:7736
+#: scheduler/ipp.c:7951 scheduler/ipp.c:8190 scheduler/ipp.c:8695
 #, c-format
 msgid "Bad job-uri attribute \"%s\"!"
 msgstr ""
@@ -275,7 +287,7 @@ msgstr ""
 msgid "Job #%d doesn't exist!"
 msgstr ""
 
-#: scheduler/ipp.c:2131 scheduler/ipp.c:2172
+#: scheduler/ipp.c:2131 scheduler/ipp.c:2172 scheduler/ipp.c:2214
 #, c-format
 msgid "Job #%d is not held for authentication!"
 msgstr ""
@@ -285,20 +297,20 @@ msgstr ""
 msgid "You are not authorized to authenticate job #%d owned by \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:2221 scheduler/ipp.c:2264
+#: scheduler/ipp.c:2221 scheduler/ipp.c:2264 scheduler/ipp.c:2303
 msgid "The printer-uri attribute is required!"
 msgstr ""
 
-#: scheduler/ipp.c:2238 scheduler/ipp.c:2283
+#: scheduler/ipp.c:2238 scheduler/ipp.c:2283 scheduler/ipp.c:2322
 msgid "Missing requesting-user-name attribute!"
 msgstr ""
 
-#: scheduler/ipp.c:2277 scheduler/ipp.c:2324
+#: scheduler/ipp.c:2277 scheduler/ipp.c:2324 scheduler/ipp.c:2363
 #, c-format
 msgid "The printer-uri \"%s\" is not valid."
 msgstr ""
 
-#: scheduler/ipp.c:2410 scheduler/ipp.c:2460
+#: scheduler/ipp.c:2410 scheduler/ipp.c:2460 scheduler/ipp.c:2499
 #, c-format
 msgid "No active jobs on %s!"
 msgstr ""
@@ -308,83 +320,84 @@ msgstr ""
 msgid "You are not authorized to delete job #%d owned by \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:2476 scheduler/ipp.c:2527
+#: scheduler/ipp.c:2476 scheduler/ipp.c:2527 scheduler/ipp.c:2563
 #, c-format
 msgid "Job #%d is already %s - can't cancel."
 msgstr ""
 
-#: scheduler/ipp.c:3720 scheduler/ipp.c:3914
+#: scheduler/ipp.c:3720 scheduler/ipp.c:3914 scheduler/ipp.c:4006
 msgid "The printer or class is not shared!"
 msgstr ""
 
 #: scheduler/ipp.c:3746 scheduler/ipp.c:6647 scheduler/ipp.c:3940
-#: scheduler/ipp.c:6695
+#: scheduler/ipp.c:6695 scheduler/ipp.c:4032 scheduler/ipp.c:6954
 #, c-format
 msgid "Destination \"%s\" is not accepting jobs."
 msgstr ""
 
 #: scheduler/ipp.c:3759 scheduler/ipp.c:6443 scheduler/ipp.c:3954
-#: scheduler/ipp.c:6487
+#: scheduler/ipp.c:6487 scheduler/ipp.c:4046 scheduler/ipp.c:6739
 #, c-format
 msgid "Bad copies value %d."
 msgstr ""
 
 #: scheduler/ipp.c:3775 scheduler/ipp.c:6459 scheduler/ipp.c:3971
-#: scheduler/ipp.c:6504
+#: scheduler/ipp.c:6504 scheduler/ipp.c:4063 scheduler/ipp.c:6756
 #, c-format
 msgid "Bad page-ranges values %d-%d."
 msgstr ""
 
-#: scheduler/ipp.c:3795 scheduler/ipp.c:3991
+#: scheduler/ipp.c:3795 scheduler/ipp.c:3991 scheduler/ipp.c:4083
 msgid "Too many active jobs."
 msgstr ""
 
 #: scheduler/ipp.c:3801 scheduler/ipp.c:6668 scheduler/ipp.c:3997
-#: scheduler/ipp.c:6716
+#: scheduler/ipp.c:6716 scheduler/ipp.c:4089 scheduler/ipp.c:6975
 msgid "Quota limit reached."
 msgstr ""
 
 #: scheduler/ipp.c:3824 scheduler/ipp.c:6691 scheduler/ipp.c:4022
-#: scheduler/ipp.c:6741
+#: scheduler/ipp.c:6741 scheduler/ipp.c:4114 scheduler/ipp.c:7000
 #, c-format
 msgid "Unable to add job for destination \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:4469 scheduler/ipp.c:4673
+#: scheduler/ipp.c:4469 scheduler/ipp.c:4673 scheduler/ipp.c:4770
 msgid "No subscription attributes in request!"
 msgstr ""
 
-#: scheduler/ipp.c:4559 scheduler/ipp.c:4763
+#: scheduler/ipp.c:4559 scheduler/ipp.c:4763 scheduler/ipp.c:4869
 msgid "notify-events not specified!"
 msgstr ""
 
-#: scheduler/ipp.c:4577 scheduler/ipp.c:4781
+#: scheduler/ipp.c:4577 scheduler/ipp.c:4781 scheduler/ipp.c:4887
 #, c-format
 msgid "Job %d not found!"
 msgstr ""
 
-#: scheduler/ipp.c:4827 scheduler/ipp.c:4957
+#: scheduler/ipp.c:4827 scheduler/ipp.c:4957 scheduler/ipp.c:5075
 msgid "No default printer"
 msgstr ""
 
-#: scheduler/ipp.c:4930 scheduler/ipp.c:5060
+#: scheduler/ipp.c:4930 scheduler/ipp.c:5060 scheduler/ipp.c:5178
 msgid "cups-deviced failed to execute."
 msgstr ""
 
-#: scheduler/ipp.c:5393 scheduler/ipp.c:5479
+#: scheduler/ipp.c:5393 scheduler/ipp.c:5479 scheduler/ipp.c:5722
 msgid "cups-driverd failed to execute."
 msgstr ""
 
-#: scheduler/ipp.c:5571 scheduler/ipp.c:5594
+#: scheduler/ipp.c:5571 scheduler/ipp.c:5594 scheduler/ipp.c:5837
 msgid "No destinations added."
 msgstr ""
 
-#: scheduler/ipp.c:5794 scheduler/ipp.c:5736
+#: scheduler/ipp.c:5794 scheduler/ipp.c:5736 scheduler/ipp.c:2615
+#: scheduler/ipp.c:5530 scheduler/ipp.c:5979 scheduler/ipp.c:7840
 #, c-format
 msgid "notify-subscription-id %d no good!"
 msgstr ""
 
-#: scheduler/ipp.c:5878 scheduler/ipp.c:5822
+#: scheduler/ipp.c:5878 scheduler/ipp.c:5822 scheduler/ipp.c:6065
 #, c-format
 msgid "Job #%s does not exist!"
 msgstr ""
@@ -396,11 +409,15 @@ msgstr ""
 #: scheduler/ipp.c:5143 scheduler/ipp.c:5844 scheduler/ipp.c:5996
 #: scheduler/ipp.c:6174 scheduler/ipp.c:6219 scheduler/ipp.c:7493
 #: scheduler/ipp.c:7640 scheduler/ipp.c:7880 scheduler/ipp.c:8375
+#: scheduler/ipp.c:2199 scheduler/ipp.c:2541 scheduler/ipp.c:5261
+#: scheduler/ipp.c:6087 scheduler/ipp.c:6251 scheduler/ipp.c:6429
+#: scheduler/ipp.c:6474 scheduler/ipp.c:7754 scheduler/ipp.c:7969
+#: scheduler/ipp.c:8208 scheduler/ipp.c:8713
 #, c-format
 msgid "Job #%d does not exist!"
 msgstr ""
 
-#: scheduler/ipp.c:5969 scheduler/ipp.c:5915
+#: scheduler/ipp.c:5969 scheduler/ipp.c:5915 scheduler/ipp.c:6150
 msgid "No subscriptions found."
 msgstr ""
 
@@ -410,7 +427,7 @@ msgid "Not authorized to hold job #%d owned by \"%s\"!"
 msgstr ""
 
 #: scheduler/ipp.c:6203 scheduler/ipp.c:8315 scheduler/ipp.c:6250
-#: scheduler/ipp.c:8390
+#: scheduler/ipp.c:8390 scheduler/ipp.c:6505 scheduler/ipp.c:8728
 #, c-format
 msgid "Job #%d is finished and cannot be altered!"
 msgstr ""
@@ -420,42 +437,42 @@ msgstr ""
 msgid "You are not authorized to move job #%d owned by \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:6228 scheduler/ipp.c:6098
+#: scheduler/ipp.c:6228 scheduler/ipp.c:6098 scheduler/ipp.c:6353
 msgid "job-printer-uri attribute missing!"
 msgstr ""
 
 #: scheduler/ipp.c:6485 scheduler/ipp.c:7847 scheduler/ipp.c:6531
-#: scheduler/ipp.c:7913
+#: scheduler/ipp.c:7913 scheduler/ipp.c:6783 scheduler/ipp.c:8238
 #, c-format
 msgid "Unsupported compression \"%s\"!"
 msgstr ""
 
 #: scheduler/ipp.c:6504 scheduler/ipp.c:7866 scheduler/ipp.c:6550
-#: scheduler/ipp.c:7932
+#: scheduler/ipp.c:7932 scheduler/ipp.c:6802 scheduler/ipp.c:8257
 msgid "No file!?!"
 msgstr ""
 
-#: scheduler/ipp.c:6522 scheduler/ipp.c:6568
+#: scheduler/ipp.c:6522 scheduler/ipp.c:6568 scheduler/ipp.c:6820
 #, c-format
 msgid "Could not scan type \"%s\"!"
 msgstr ""
 
 #: scheduler/ipp.c:6574 scheduler/ipp.c:7936 scheduler/ipp.c:6620
-#: scheduler/ipp.c:8001
+#: scheduler/ipp.c:8001 scheduler/ipp.c:6879 scheduler/ipp.c:8332
 #, c-format
 msgid "Unsupported format '%s/%s'!"
 msgstr ""
 
-#: scheduler/ipp.c:6621 scheduler/ipp.c:6669
+#: scheduler/ipp.c:6621 scheduler/ipp.c:6669 scheduler/ipp.c:6928
 msgid "Printer not shared!"
 msgstr ""
 
-#: scheduler/ipp.c:6661 scheduler/ipp.c:6709
+#: scheduler/ipp.c:6661 scheduler/ipp.c:6709 scheduler/ipp.c:6968
 #, c-format
 msgid "Too many jobs - %d jobs, max jobs is %d."
 msgstr ""
 
-#: scheduler/ipp.c:7448 scheduler/ipp.c:7507
+#: scheduler/ipp.c:7448 scheduler/ipp.c:7507 scheduler/ipp.c:7768
 #, c-format
 msgid "Job #%d is not held!"
 msgstr ""
@@ -465,12 +482,12 @@ msgstr ""
 msgid "You are not authorized to release job id %d owned by \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:7592 scheduler/ipp.c:7654
+#: scheduler/ipp.c:7592 scheduler/ipp.c:7654 scheduler/ipp.c:7983
 #, c-format
 msgid "Job #%d is not complete!"
 msgstr ""
 
-#: scheduler/ipp.c:7608 scheduler/ipp.c:7670
+#: scheduler/ipp.c:7608 scheduler/ipp.c:7670 scheduler/ipp.c:8001
 #, c-format
 msgid "Job #%d cannot be restarted - no files!"
 msgstr ""
@@ -486,7 +503,7 @@ msgid "You are not authorized to send document for job #%d owned by \"%s\"!"
 msgstr ""
 
 #: scheduler/ipp.c:7883 scheduler/ipp.c:8803 scheduler/ipp.c:7949
-#: scheduler/ipp.c:8883
+#: scheduler/ipp.c:8883 scheduler/ipp.c:8274 scheduler/ipp.c:9225
 #, c-format
 msgid "Bad document-format \"%s\"!"
 msgstr ""
@@ -496,34 +513,35 @@ msgstr ""
 msgid "You are not authorized to alter job id %d owned by \"%s\"!"
 msgstr ""
 
-#: scheduler/ipp.c:8371 scheduler/ipp.c:8446
+#: scheduler/ipp.c:8371 scheduler/ipp.c:8446 scheduler/ipp.c:8783
 #, c-format
 msgid "%s cannot be changed."
 msgstr ""
 
-#: scheduler/ipp.c:8387 scheduler/ipp.c:8462
+#: scheduler/ipp.c:8387 scheduler/ipp.c:8462 scheduler/ipp.c:8799
 msgid "Bad job-priority value!"
 msgstr ""
 
-#: scheduler/ipp.c:8395 scheduler/ipp.c:8470
+#: scheduler/ipp.c:8395 scheduler/ipp.c:8470 scheduler/ipp.c:8807
 msgid "Job is completed and cannot be changed."
 msgstr ""
 
-#: scheduler/ipp.c:8409 scheduler/ipp.c:8484
+#: scheduler/ipp.c:8409 scheduler/ipp.c:8484 scheduler/ipp.c:8821
 msgid "Bad job-state value!"
 msgstr ""
 
 #: scheduler/ipp.c:8423 scheduler/ipp.c:8435 scheduler/ipp.c:8446
 #: scheduler/ipp.c:8498 scheduler/ipp.c:8510 scheduler/ipp.c:8521
+#: scheduler/ipp.c:8835 scheduler/ipp.c:8850 scheduler/ipp.c:8861
 msgid "Job state cannot be changed."
 msgstr ""
 
-#: scheduler/ipp.c:8787 scheduler/ipp.c:8867
+#: scheduler/ipp.c:8787 scheduler/ipp.c:8867 scheduler/ipp.c:9209
 #, c-format
 msgid "Unsupported compression attribute %s!"
 msgstr ""
 
-#: scheduler/ipp.c:8815 scheduler/ipp.c:8894
+#: scheduler/ipp.c:8815 scheduler/ipp.c:8894 scheduler/ipp.c:9236
 #, c-format
 msgid "Unsupported format \"%s\"!"
 msgstr ""
@@ -553,36 +571,37 @@ msgid "?Invalid help command unknown\n"
 msgstr ""
 
 #: berkeley/lpc.c:478 berkeley/lpc.c:490 berkeley/lpc.c:475 berkeley/lpc.c:487
+#: berkeley/lpc.c:476 berkeley/lpc.c:488
 #, c-format
 msgid "\tprinter is on device '%s' speed -1\n"
 msgstr ""
 
-#: berkeley/lpc.c:496 berkeley/lpc.c:493
+#: berkeley/lpc.c:496 berkeley/lpc.c:493 berkeley/lpc.c:494
 msgid "\tqueuing is enabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:498 berkeley/lpc.c:495
+#: berkeley/lpc.c:498 berkeley/lpc.c:495 berkeley/lpc.c:496
 msgid "\tqueuing is disabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:501 berkeley/lpc.c:498
+#: berkeley/lpc.c:501 berkeley/lpc.c:498 berkeley/lpc.c:499
 msgid "\tprinting is enabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:503 berkeley/lpc.c:500
+#: berkeley/lpc.c:503 berkeley/lpc.c:500 berkeley/lpc.c:501
 msgid "\tprinting is disabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:506 berkeley/lpc.c:503
+#: berkeley/lpc.c:506 berkeley/lpc.c:503 berkeley/lpc.c:504
 msgid "\tno entries\n"
 msgstr ""
 
-#: berkeley/lpc.c:508 berkeley/lpc.c:505
+#: berkeley/lpc.c:508 berkeley/lpc.c:505 berkeley/lpc.c:506
 #, c-format
 msgid "\t%d entries\n"
 msgstr ""
 
-#: berkeley/lpc.c:510 berkeley/lpc.c:507
+#: berkeley/lpc.c:510 berkeley/lpc.c:507 berkeley/lpc.c:508
 msgid "\tdaemon present\n"
 msgstr ""
 
@@ -595,7 +614,7 @@ msgstr ""
 #: systemv/lpadmin.c:284 systemv/lp.c:135 systemv/lpinfo.c:80
 #: systemv/lpmove.c:84 systemv/accept.c:106 systemv/cancel.c:93
 #: systemv/lpmove.c:89 berkeley/lpq.c:124 systemv/lp.c:136
-#: systemv/lpstat.c:116
+#: systemv/lpstat.c:116 berkeley/lpr.c:116 systemv/lp.c:140
 #, c-format
 msgid "%s: Sorry, no encryption support compiled in!\n"
 msgstr ""
@@ -823,7 +842,7 @@ msgid "%s: Unable to connect to server: %s\n"
 msgstr ""
 
 #: systemv/accept.c:217 systemv/accept.c:227 systemv/accept.c:268
-#: systemv/accept.c:278 systemv/accept.c:206
+#: systemv/accept.c:278 systemv/accept.c:206 systemv/accept.c:230
 #, c-format
 msgid "%s: Operation failed: %s\n"
 msgstr ""
@@ -935,79 +954,80 @@ msgid ""
 "  -v               Be verbose (show commands)\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:120
+#: systemv/cupstestppd.c:120 systemv/cupstestppd.c:137
 msgid "cupstestppd: The -q option is incompatible with the -v option.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:136
+#: systemv/cupstestppd.c:136 systemv/cupstestppd.c:153
 msgid "cupstestppd: The -v option is incompatible with the -q option.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:193
+#: systemv/cupstestppd.c:193 systemv/cupstestppd.c:210
 #, c-format
 msgid ""
 " FAIL\n"
 "      **FAIL**  Unable to open PPD file - %s\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:204
+#: systemv/cupstestppd.c:204 systemv/cupstestppd.c:221
 #, c-format
 msgid ""
 " FAIL\n"
 "      **FAIL**  Unable to open PPD file - %s on line %d.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:213
+#: systemv/cupstestppd.c:213 systemv/cupstestppd.c:230
 msgid "                REF: Page 42, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:217
+#: systemv/cupstestppd.c:217 systemv/cupstestppd.c:234
 msgid "                REF: Page 20, section 3.4.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:222
+#: systemv/cupstestppd.c:222 systemv/cupstestppd.c:239
 msgid "                REF: Pages 45-46, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:227
+#: systemv/cupstestppd.c:227 systemv/cupstestppd.c:244
 msgid "                REF: Pages 42-45, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:231
+#: systemv/cupstestppd.c:231 systemv/cupstestppd.c:248
 msgid "                REF: Pages 48-49, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:235
+#: systemv/cupstestppd.c:235 systemv/cupstestppd.c:252
 msgid "                REF: Pages 52-54, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:239
+#: systemv/cupstestppd.c:239 systemv/cupstestppd.c:256
 msgid "                REF: Page 15, section 3.2.\n"
 msgstr ""
 
 #: systemv/cupstestppd.c:243 systemv/cupstestppd.c:247
+#: systemv/cupstestppd.c:260 systemv/cupstestppd.c:264
 msgid "                REF: Page 15, section 3.1.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:251
+#: systemv/cupstestppd.c:251 systemv/cupstestppd.c:268
 msgid "                REF: Pages 16-17, section 3.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:255
+#: systemv/cupstestppd.c:255 systemv/cupstestppd.c:272
 msgid "                REF: Page 19, section 3.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:259
+#: systemv/cupstestppd.c:259 systemv/cupstestppd.c:276
 msgid "                REF: Page 27, section 3.5.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:280
+#: systemv/cupstestppd.c:280 systemv/cupstestppd.c:299
 msgid ""
 "\n"
 "    DETAILED CONFORMANCE TEST RESULTS\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:307
+#: systemv/cupstestppd.c:307 systemv/cupstestppd.c:326
 #, c-format
 msgid "        WARN    %s has no corresponding options!\n"
 msgstr ""
@@ -1027,238 +1047,253 @@ msgstr ""
 #: systemv/cupstestppd.c:781 systemv/cupstestppd.c:801
 #: systemv/cupstestppd.c:832 systemv/cupstestppd.c:854
 #: systemv/cupstestppd.c:902 systemv/cupstestppd.c:931
-#: systemv/cupstestppd.c:952
+#: systemv/cupstestppd.c:952 systemv/cupstestppd.c:337
+#: systemv/cupstestppd.c:352 systemv/cupstestppd.c:373
+#: systemv/cupstestppd.c:388 systemv/cupstestppd.c:416
+#: systemv/cupstestppd.c:436 systemv/cupstestppd.c:458
+#: systemv/cupstestppd.c:478 systemv/cupstestppd.c:498
+#: systemv/cupstestppd.c:518 systemv/cupstestppd.c:536
+#: systemv/cupstestppd.c:554 systemv/cupstestppd.c:594
+#: systemv/cupstestppd.c:614 systemv/cupstestppd.c:634
+#: systemv/cupstestppd.c:654 systemv/cupstestppd.c:674
+#: systemv/cupstestppd.c:692 systemv/cupstestppd.c:709
+#: systemv/cupstestppd.c:731 systemv/cupstestppd.c:749
+#: systemv/cupstestppd.c:766 systemv/cupstestppd.c:784
+#: systemv/cupstestppd.c:800 systemv/cupstestppd.c:820
+#: systemv/cupstestppd.c:851 systemv/cupstestppd.c:873
+#: systemv/cupstestppd.c:921 systemv/cupstestppd.c:950
+#: systemv/cupstestppd.c:971
 msgid " FAIL\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:321
+#: systemv/cupstestppd.c:321 systemv/cupstestppd.c:340
 msgid ""
 "      **FAIL**  REQUIRED DefaultImageableArea\n"
 "                REF: Page 102, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:336
+#: systemv/cupstestppd.c:336 systemv/cupstestppd.c:355
 #, c-format
 msgid ""
 "      **FAIL**  BAD DefaultImageableArea %s!\n"
 "                REF: Page 102, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:346
+#: systemv/cupstestppd.c:346 systemv/cupstestppd.c:365
 msgid "        PASS    DefaultImageableArea\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:357
+#: systemv/cupstestppd.c:357 systemv/cupstestppd.c:376
 msgid ""
 "      **FAIL**  REQUIRED DefaultPaperDimension\n"
 "                REF: Page 103, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:372
+#: systemv/cupstestppd.c:372 systemv/cupstestppd.c:391
 #, c-format
 msgid ""
 "      **FAIL**  BAD DefaultPaperDimension %s!\n"
 "                REF: Page 103, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:380
+#: systemv/cupstestppd.c:380 systemv/cupstestppd.c:399
 msgid "        PASS    DefaultPaperDimension\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:400
+#: systemv/cupstestppd.c:400 systemv/cupstestppd.c:419
 #, c-format
 msgid ""
 "      **FAIL**  BAD Default%s %s\n"
 "                REF: Page 40, section 4.5.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:409
+#: systemv/cupstestppd.c:409 systemv/cupstestppd.c:428
 #, c-format
 msgid "        PASS    Default%s\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:420
+#: systemv/cupstestppd.c:420 systemv/cupstestppd.c:439
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED Default%s\n"
 "                REF: Page 40, section 4.5.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:432
+#: systemv/cupstestppd.c:432 systemv/cupstestppd.c:451
 msgid "        PASS    FileVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:442
+#: systemv/cupstestppd.c:442 systemv/cupstestppd.c:461
 msgid ""
 "      **FAIL**  REQUIRED FileVersion\n"
 "                REF: Page 56, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:452
+#: systemv/cupstestppd.c:452 systemv/cupstestppd.c:471
 msgid "        PASS    FormatVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:462
+#: systemv/cupstestppd.c:462 systemv/cupstestppd.c:481
 msgid ""
 "      **FAIL**  REQUIRED FormatVersion\n"
 "                REF: Page 56, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:472
+#: systemv/cupstestppd.c:472 systemv/cupstestppd.c:491
 msgid "        PASS    LanguageEncoding\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:482
+#: systemv/cupstestppd.c:482 systemv/cupstestppd.c:501
 msgid ""
 "      **FAIL**  REQUIRED LanguageEncoding\n"
 "                REF: Pages 56-57, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:492
+#: systemv/cupstestppd.c:492 systemv/cupstestppd.c:511
 msgid "        PASS    LanguageVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:502
+#: systemv/cupstestppd.c:502 systemv/cupstestppd.c:521
 msgid ""
 "      **FAIL**  REQUIRED LanguageVersion\n"
 "                REF: Pages 57-58, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:520
+#: systemv/cupstestppd.c:520 systemv/cupstestppd.c:539
 msgid ""
 "      **FAIL**  BAD Manufacturer (should be \"HP\")\n"
 "                REF: Page 211, table D.1.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:528
+#: systemv/cupstestppd.c:528 systemv/cupstestppd.c:547
 msgid "        PASS    Manufacturer\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:538
+#: systemv/cupstestppd.c:538 systemv/cupstestppd.c:557
 msgid ""
 "      **FAIL**  REQUIRED Manufacturer\n"
 "                REF: Pages 58-59, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:559
+#: systemv/cupstestppd.c:559 systemv/cupstestppd.c:578
 #, c-format
 msgid ""
 "      **FAIL**  BAD ModelName - \"%c\" not allowed in string.\n"
 "                REF: Pages 59-60, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:568
+#: systemv/cupstestppd.c:568 systemv/cupstestppd.c:587
 msgid "        PASS    ModelName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:578
+#: systemv/cupstestppd.c:578 systemv/cupstestppd.c:597
 msgid ""
 "      **FAIL**  REQUIRED ModelName\n"
 "                REF: Pages 59-60, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:588
+#: systemv/cupstestppd.c:588 systemv/cupstestppd.c:607
 msgid "        PASS    NickName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:598
+#: systemv/cupstestppd.c:598 systemv/cupstestppd.c:617
 msgid ""
 "      **FAIL**  REQUIRED NickName\n"
 "                REF: Page 60, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:608
+#: systemv/cupstestppd.c:608 systemv/cupstestppd.c:627
 msgid "        PASS    PageSize\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:618
+#: systemv/cupstestppd.c:618 systemv/cupstestppd.c:637
 msgid ""
 "      **FAIL**  REQUIRED PageSize\n"
 "                REF: Pages 99-100, section 5.14.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:628
+#: systemv/cupstestppd.c:628 systemv/cupstestppd.c:647
 msgid "        PASS    PageRegion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:638
+#: systemv/cupstestppd.c:638 systemv/cupstestppd.c:657
 msgid ""
 "      **FAIL**  REQUIRED PageRegion\n"
 "                REF: Page 100, section 5.14.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:648
+#: systemv/cupstestppd.c:648 systemv/cupstestppd.c:667
 msgid "        PASS    PCFileName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:658
+#: systemv/cupstestppd.c:658 systemv/cupstestppd.c:677
 msgid ""
 "      **FAIL**  REQUIRED PCFileName\n"
 "                REF: Pages 61-62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:676
+#: systemv/cupstestppd.c:676 systemv/cupstestppd.c:695
 msgid ""
 "      **FAIL**  BAD Product - not \"(string)\".\n"
 "                REF: Page 62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:683
+#: systemv/cupstestppd.c:683 systemv/cupstestppd.c:702
 msgid "        PASS    Product\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:693
+#: systemv/cupstestppd.c:693 systemv/cupstestppd.c:712
 msgid ""
 "      **FAIL**  REQUIRED Product\n"
 "                REF: Page 62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:715
+#: systemv/cupstestppd.c:715 systemv/cupstestppd.c:734
 msgid ""
 "      **FAIL**  BAD PSVersion - not \"(string) int\".\n"
 "                REF: Pages 62-64, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:723
+#: systemv/cupstestppd.c:723 systemv/cupstestppd.c:742
 msgid "        PASS    PSVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:733
+#: systemv/cupstestppd.c:733 systemv/cupstestppd.c:752
 msgid ""
 "      **FAIL**  REQUIRED PSVersion\n"
 "                REF: Pages 62-64, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:750
+#: systemv/cupstestppd.c:750 systemv/cupstestppd.c:769
 msgid ""
 "      **FAIL**  BAD ShortNickName - longer than 31 chars.\n"
 "                REF: Pages 64-65, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:758
+#: systemv/cupstestppd.c:758 systemv/cupstestppd.c:777
 msgid "        PASS    ShortNickName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:768
+#: systemv/cupstestppd.c:768 systemv/cupstestppd.c:787
 msgid ""
 "      **FAIL**  REQUIRED ShortNickName\n"
 "                REF: Page 64-65, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:784
+#: systemv/cupstestppd.c:784 systemv/cupstestppd.c:803
 msgid ""
 "      **FAIL**  BAD JobPatchFile attribute in file\n"
 "                REF: Page 24, section 3.4.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:804
+#: systemv/cupstestppd.c:804 systemv/cupstestppd.c:823
 msgid ""
 "      **FAIL**  REQUIRED PageSize\n"
 "                REF: Page 41, section 5.\n"
 "                REF: Page 99, section 5.14.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:835
+#: systemv/cupstestppd.c:835 systemv/cupstestppd.c:854
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED ImageableArea for PageSize %s\n"
@@ -1266,7 +1301,7 @@ msgid ""
 "                REF: Page 102, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:857
+#: systemv/cupstestppd.c:857 systemv/cupstestppd.c:876
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED PaperDimension for PageSize %s\n"
@@ -1274,109 +1309,109 @@ msgid ""
 "                REF: Page 103, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:905
+#: systemv/cupstestppd.c:905 systemv/cupstestppd.c:924
 #, c-format
 msgid ""
 "      **FAIL**  Bad %s choice %s!\n"
 "                REF: Page 84, section 5.9\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:934
+#: systemv/cupstestppd.c:934 systemv/cupstestppd.c:953
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED %s does not define choice None!\n"
 "                REF: Page 122, section 5.17\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:955
+#: systemv/cupstestppd.c:955 systemv/cupstestppd.c:974
 #, c-format
 msgid ""
 "      **FAIL**  Bad %s choice %s!\n"
 "                REF: Page 122, section 5.17\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:967
+#: systemv/cupstestppd.c:967 systemv/cupstestppd.c:986
 msgid " PASS\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:976
+#: systemv/cupstestppd.c:976 systemv/cupstestppd.c:997
 #, c-format
 msgid ""
 "        WARN    Duplex option keyword %s should be named Duplex or JCLDuplex!\n"
 "                REF: Page 122, section 5.17\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:986
+#: systemv/cupstestppd.c:986 systemv/cupstestppd.c:1007
 msgid "        WARN    Default choices conflicting!\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:994
+#: systemv/cupstestppd.c:994 systemv/cupstestppd.c:1015
 #, c-format
 msgid ""
 "        WARN    Obsolete PPD version %.1f!\n"
 "                REF: Page 42, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1002
+#: systemv/cupstestppd.c:1002 systemv/cupstestppd.c:1023
 msgid ""
 "        WARN    LanguageEncoding required by PPD 4.3 spec.\n"
 "                REF: Pages 56-57, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1010
+#: systemv/cupstestppd.c:1010 systemv/cupstestppd.c:1031
 msgid ""
 "        WARN    Manufacturer required by PPD 4.3 spec.\n"
 "                REF: Pages 58-59, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1023
+#: systemv/cupstestppd.c:1023 systemv/cupstestppd.c:1044
 msgid ""
 "        WARN    PCFileName longer than 8.3 in violation of PPD spec.\n"
 "                REF: Pages 61-62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1031
+#: systemv/cupstestppd.c:1031 systemv/cupstestppd.c:1052
 msgid ""
 "        WARN    ShortNickName required by PPD 4.3 spec.\n"
 "                REF: Pages 64-65, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1048
+#: systemv/cupstestppd.c:1048 systemv/cupstestppd.c:1069
 msgid ""
 "        WARN    Protocols contains both PJL and BCP; expected TBCP.\n"
 "                REF: Pages 78-79, section 5.7.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1057
+#: systemv/cupstestppd.c:1057 systemv/cupstestppd.c:1078
 msgid ""
 "        WARN    Protocols contains PJL but JCL attributes are not set.\n"
 "                REF: Pages 78-79, section 5.7.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1085
+#: systemv/cupstestppd.c:1085 systemv/cupstestppd.c:1106
 #, c-format
 msgid ""
 "        WARN    %s shares a common prefix with %s\n"
 "                REF: Page 15, section 3.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1097
+#: systemv/cupstestppd.c:1097 systemv/cupstestppd.c:1118
 #, c-format
 msgid "    %d ERROR%s FOUND\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1100
+#: systemv/cupstestppd.c:1100 systemv/cupstestppd.c:1121
 msgid "    NO ERRORS FOUND\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1360
+#: systemv/cupstestppd.c:1360 systemv/cupstestppd.c:1465
 #, c-format
 msgid ""
 "        WARN    \"%s %s\" conflicts with \"%s %s\"\n"
 "                (constraint=\"%s %s %s %s\")\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1376
+#: systemv/cupstestppd.c:1376 systemv/cupstestppd.c:1481
 msgid ""
 "Usage: cupstestppd [-q] [-r] [-v[v]] filename1.ppd[.gz] [... filenameN.ppd[.gz]]\n"
 "       program | cupstestppd [-q] [-r] [-v[v]] -\n"
@@ -1475,23 +1510,27 @@ msgid "no system default destination\n"
 msgstr ""
 
 #: systemv/lpstat.c:1313 systemv/lpstat.c:1281 systemv/lpstat.c:1309
+#: systemv/lpstat.c:1311
 #, c-format
 msgid "Output for printer %s is sent to remote printer %s on %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1319 systemv/lpstat.c:1323 systemv/lpstat.c:1287
-#: systemv/lpstat.c:1291 systemv/lpstat.c:1315
+#: systemv/lpstat.c:1291 systemv/lpstat.c:1315 systemv/lpstat.c:1317
+#: systemv/lpstat.c:1321
 #, c-format
 msgid "Output for printer %s is sent to %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1331 systemv/lpstat.c:1299 systemv/lpstat.c:1327
+#: systemv/lpstat.c:1329
 #, c-format
 msgid "Output for printer %s/%s is sent to remote printer %s on %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1337 systemv/lpstat.c:1341 systemv/lpstat.c:1305
-#: systemv/lpstat.c:1309 systemv/lpstat.c:1333
+#: systemv/lpstat.c:1309 systemv/lpstat.c:1333 systemv/lpstat.c:1335
+#: systemv/lpstat.c:1339
 #, c-format
 msgid "Output for printer %s/%s is sent to %s\n"
 msgstr ""
@@ -1499,6 +1538,7 @@ msgstr ""
 #: systemv/lpstat.c:1346 systemv/lpstat.c:1349 systemv/lpstat.c:1352
 #: systemv/lpstat.c:1314 systemv/lpstat.c:1317 systemv/lpstat.c:1320
 #: systemv/lpstat.c:1342 systemv/lpstat.c:1345 systemv/lpstat.c:1348
+#: systemv/lpstat.c:1344 systemv/lpstat.c:1347 systemv/lpstat.c:1350
 #, c-format
 msgid "device for %s: %s\n"
 msgstr ""
@@ -1506,6 +1546,7 @@ msgstr ""
 #: systemv/lpstat.c:1359 systemv/lpstat.c:1362 systemv/lpstat.c:1365
 #: systemv/lpstat.c:1327 systemv/lpstat.c:1330 systemv/lpstat.c:1333
 #: systemv/lpstat.c:1355 systemv/lpstat.c:1358 systemv/lpstat.c:1361
+#: systemv/lpstat.c:1357 systemv/lpstat.c:1360 systemv/lpstat.c:1363
 #, c-format
 msgid "device for %s/%s: %s\n"
 msgstr ""
@@ -1516,32 +1557,38 @@ msgid "lpstat: get-jobs failed: %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1681 systemv/lpstat.c:1635 systemv/lpstat.c:1663
+#: systemv/lpstat.c:1665
 #, c-format
 msgid "\tqueued for %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2037 systemv/lpstat.c:1971 systemv/lpstat.c:1999
+#: systemv/lpstat.c:2001
 #, c-format
 msgid "printer %s is idle.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2042 systemv/lpstat.c:1976 systemv/lpstat.c:2004
+#: systemv/lpstat.c:2006
 #, c-format
 msgid "printer %s now printing %s-%d.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2048 systemv/lpstat.c:1982 systemv/lpstat.c:2010
+#: systemv/lpstat.c:2012
 #, c-format
 msgid "printer %s disabled since %s -\n"
 msgstr ""
 
 #: systemv/lpstat.c:2056 systemv/lpstat.c:2169 systemv/lpstat.c:1990
 #: systemv/lpstat.c:2103 systemv/lpstat.c:2018 systemv/lpstat.c:2131
+#: systemv/lpstat.c:2020 systemv/lpstat.c:2133
 msgid "\treason unknown\n"
 msgstr ""
 
 #: systemv/lpstat.c:2063 systemv/lpstat.c:2176 systemv/lpstat.c:1997
 #: systemv/lpstat.c:2110 systemv/lpstat.c:2025 systemv/lpstat.c:2138
+#: systemv/lpstat.c:2027 systemv/lpstat.c:2140
 msgid ""
 "\tForm mounted:\n"
 "\tContent types: any\n"
@@ -1550,56 +1597,66 @@ msgstr ""
 
 #: systemv/lpstat.c:2069 systemv/lpstat.c:2182 systemv/lpstat.c:2003
 #: systemv/lpstat.c:2116 systemv/lpstat.c:2031 systemv/lpstat.c:2144
+#: systemv/lpstat.c:2033 systemv/lpstat.c:2146
 #, c-format
 msgid "\tDescription: %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2074 systemv/lpstat.c:2187 systemv/lpstat.c:2008
 #: systemv/lpstat.c:2121 systemv/lpstat.c:2036 systemv/lpstat.c:2149
+#: systemv/lpstat.c:2038 systemv/lpstat.c:2151
 msgid "\tAlerts:"
 msgstr ""
 
 #: systemv/lpstat.c:2083 systemv/lpstat.c:2196 systemv/lpstat.c:2017
 #: systemv/lpstat.c:2130 systemv/lpstat.c:2045 systemv/lpstat.c:2158
+#: systemv/lpstat.c:2047 systemv/lpstat.c:2160
 #, c-format
 msgid "\tLocation: %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2088 systemv/lpstat.c:2201 systemv/lpstat.c:2022
 #: systemv/lpstat.c:2135 systemv/lpstat.c:2050 systemv/lpstat.c:2163
+#: systemv/lpstat.c:2052 systemv/lpstat.c:2165
 msgid "\tConnection: remote\n"
 msgstr ""
 
 #: systemv/lpstat.c:2092 systemv/lpstat.c:2205 systemv/lpstat.c:2026
 #: systemv/lpstat.c:2139 systemv/lpstat.c:2054 systemv/lpstat.c:2167
+#: systemv/lpstat.c:2056 systemv/lpstat.c:2169
 #, c-format
 msgid "\tInterface: %s.ppd\n"
 msgstr ""
 
 #: systemv/lpstat.c:2097 systemv/lpstat.c:2210 systemv/lpstat.c:2031
 #: systemv/lpstat.c:2144 systemv/lpstat.c:2059 systemv/lpstat.c:2172
+#: systemv/lpstat.c:2061 systemv/lpstat.c:2174
 msgid "\tConnection: direct\n"
 msgstr ""
 
 #: systemv/lpstat.c:2101 systemv/lpstat.c:2214 systemv/lpstat.c:2035
 #: systemv/lpstat.c:2148 systemv/lpstat.c:2063 systemv/lpstat.c:2176
+#: systemv/lpstat.c:2065 systemv/lpstat.c:2178
 #, c-format
 msgid "\tInterface: %s/interfaces/%s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2105 systemv/lpstat.c:2218 systemv/lpstat.c:2039
 #: systemv/lpstat.c:2152 systemv/lpstat.c:2067 systemv/lpstat.c:2180
+#: systemv/lpstat.c:2069 systemv/lpstat.c:2182
 #, c-format
 msgid "\tInterface: %s/ppd/%s.ppd\n"
 msgstr ""
 
 #: systemv/lpstat.c:2107 systemv/lpstat.c:2220 systemv/lpstat.c:2041
 #: systemv/lpstat.c:2154 systemv/lpstat.c:2069 systemv/lpstat.c:2182
+#: systemv/lpstat.c:2071 systemv/lpstat.c:2184
 msgid "\tOn fault: no alert\n"
 msgstr ""
 
 #: systemv/lpstat.c:2108 systemv/lpstat.c:2221 systemv/lpstat.c:2042
 #: systemv/lpstat.c:2155 systemv/lpstat.c:2070 systemv/lpstat.c:2183
+#: systemv/lpstat.c:2072 systemv/lpstat.c:2185
 msgid "\tAfter fault: continue\n"
 msgstr ""
 
@@ -1607,21 +1664,26 @@ msgstr ""
 #: systemv/lpstat.c:2239 systemv/lpstat.c:2046 systemv/lpstat.c:2060
 #: systemv/lpstat.c:2159 systemv/lpstat.c:2173 systemv/lpstat.c:2074
 #: systemv/lpstat.c:2088 systemv/lpstat.c:2187 systemv/lpstat.c:2201
+#: systemv/lpstat.c:2076 systemv/lpstat.c:2090 systemv/lpstat.c:2189
+#: systemv/lpstat.c:2203
 msgid "\tUsers allowed:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2119 systemv/lpstat.c:2232 systemv/lpstat.c:2053
 #: systemv/lpstat.c:2166 systemv/lpstat.c:2081 systemv/lpstat.c:2194
+#: systemv/lpstat.c:2083 systemv/lpstat.c:2196
 msgid "\tUsers denied:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2127 systemv/lpstat.c:2240 systemv/lpstat.c:2061
 #: systemv/lpstat.c:2174 systemv/lpstat.c:2089 systemv/lpstat.c:2202
+#: systemv/lpstat.c:2091 systemv/lpstat.c:2204
 msgid "\t\t(all)\n"
 msgstr ""
 
 #: systemv/lpstat.c:2129 systemv/lpstat.c:2242 systemv/lpstat.c:2063
 #: systemv/lpstat.c:2176 systemv/lpstat.c:2091 systemv/lpstat.c:2204
+#: systemv/lpstat.c:2093 systemv/lpstat.c:2206
 msgid "\tForms allowed:\n"
 msgstr ""
 
@@ -1629,54 +1691,66 @@ msgstr ""
 #: systemv/lpstat.c:2246 systemv/lpstat.c:2064 systemv/lpstat.c:2067
 #: systemv/lpstat.c:2177 systemv/lpstat.c:2180 systemv/lpstat.c:2092
 #: systemv/lpstat.c:2095 systemv/lpstat.c:2205 systemv/lpstat.c:2208
+#: systemv/lpstat.c:2094 systemv/lpstat.c:2097 systemv/lpstat.c:2207
+#: systemv/lpstat.c:2210
 msgid "\t\t(none)\n"
 msgstr ""
 
 #: systemv/lpstat.c:2131 systemv/lpstat.c:2244 systemv/lpstat.c:2065
 #: systemv/lpstat.c:2178 systemv/lpstat.c:2093 systemv/lpstat.c:2206
+#: systemv/lpstat.c:2095 systemv/lpstat.c:2208
 msgid "\tBanner required\n"
 msgstr ""
 
 #: systemv/lpstat.c:2132 systemv/lpstat.c:2245 systemv/lpstat.c:2066
 #: systemv/lpstat.c:2179 systemv/lpstat.c:2094 systemv/lpstat.c:2207
+#: systemv/lpstat.c:2096 systemv/lpstat.c:2209
 msgid "\tCharset sets:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2134 systemv/lpstat.c:2247 systemv/lpstat.c:2068
 #: systemv/lpstat.c:2181 systemv/lpstat.c:2096 systemv/lpstat.c:2209
+#: systemv/lpstat.c:2098 systemv/lpstat.c:2211
 msgid "\tDefault pitch:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2135 systemv/lpstat.c:2248 systemv/lpstat.c:2069
 #: systemv/lpstat.c:2182 systemv/lpstat.c:2097 systemv/lpstat.c:2210
+#: systemv/lpstat.c:2099 systemv/lpstat.c:2212
 msgid "\tDefault page size:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2136 systemv/lpstat.c:2249 systemv/lpstat.c:2070
 #: systemv/lpstat.c:2183 systemv/lpstat.c:2098 systemv/lpstat.c:2211
+#: systemv/lpstat.c:2100 systemv/lpstat.c:2213
 msgid "\tDefault port settings:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2146 systemv/lpstat.c:2080 systemv/lpstat.c:2108
+#: systemv/lpstat.c:2110
 #, c-format
 msgid "printer %s/%s is idle.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2153 systemv/lpstat.c:2087 systemv/lpstat.c:2115
+#: systemv/lpstat.c:2117
 #, c-format
 msgid "printer %s/%s now printing %s-%d.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2160 systemv/lpstat.c:2094 systemv/lpstat.c:2122
+#: systemv/lpstat.c:2124
 #, c-format
 msgid "printer %s/%s disabled since %s -\n"
 msgstr ""
 
 #: systemv/lpstat.c:2279 systemv/lpstat.c:2212 systemv/lpstat.c:2240
+#: systemv/lpstat.c:2242
 msgid "scheduler is running\n"
 msgstr ""
 
 #: systemv/lpstat.c:2281 systemv/lpstat.c:2214 systemv/lpstat.c:2242
+#: systemv/lpstat.c:2244
 msgid "scheduler is not running\n"
 msgstr ""
 
@@ -2010,7 +2084,7 @@ msgstr ""
 msgid "lp: unable to print file: %s\n"
 msgstr ""
 
-#: systemv/lp.c:656 systemv/lp.c:653 systemv/lp.c:713
+#: systemv/lp.c:656 systemv/lp.c:653 systemv/lp.c:713 systemv/lp.c:729
 #, c-format
 msgid "request id is %s-%d (%d file(s))\n"
 msgstr ""
@@ -2202,274 +2276,289 @@ msgid ""
 "       lppasswd [-g groupname] -x [username]\n"
 msgstr ""
 
-#: cgi-bin/admin.c:125
+#: cgi-bin/admin.c:125 cgi-bin/admin.c:142
 msgid "Start Printer"
 msgstr ""
 
-#: cgi-bin/admin.c:127
+#: cgi-bin/admin.c:127 cgi-bin/admin.c:144
 msgid "Stop Printer"
 msgstr ""
 
-#: cgi-bin/admin.c:129
+#: cgi-bin/admin.c:129 cgi-bin/admin.c:146
 msgid "Start Class"
 msgstr ""
 
-#: cgi-bin/admin.c:131
+#: cgi-bin/admin.c:131 cgi-bin/admin.c:148
 msgid "Stop Class"
 msgstr ""
 
-#: cgi-bin/admin.c:133
+#: cgi-bin/admin.c:133 cgi-bin/admin.c:150
 msgid "Accept Jobs"
 msgstr ""
 
-#: cgi-bin/admin.c:135
+#: cgi-bin/admin.c:135 cgi-bin/admin.c:152
 msgid "Reject Jobs"
 msgstr ""
 
-#: cgi-bin/admin.c:137
+#: cgi-bin/admin.c:137 cgi-bin/admin.c:154
 msgid "Purge Jobs"
 msgstr ""
 
-#: cgi-bin/admin.c:141
+#: cgi-bin/admin.c:141 cgi-bin/admin.c:158
 msgid "Set As Default"
 msgstr ""
 
 #: cgi-bin/admin.c:168 cgi-bin/admin.c:179 cgi-bin/admin.c:2690
+#: cgi-bin/admin.c:185 cgi-bin/admin.c:196 cgi-bin/admin.c:2734
 msgid "Administration"
 msgstr ""
 
-#: cgi-bin/admin.c:224
+#: cgi-bin/admin.c:224 cgi-bin/admin.c:241
 msgid "Modify Class"
 msgstr ""
 
-#: cgi-bin/admin.c:224
+#: cgi-bin/admin.c:224 cgi-bin/admin.c:241
 msgid "Add Class"
 msgstr ""
 
-#: cgi-bin/admin.c:385
+#: cgi-bin/admin.c:385 cgi-bin/admin.c:402
 msgid "The class name may only contain up to 127 printable characters and may not contain spaces, slashes (/), or the pound sign (#)."
 msgstr ""
 
-#: cgi-bin/admin.c:444
+#: cgi-bin/admin.c:444 cgi-bin/admin.c:462
 msgid "Unable to modify class:"
 msgstr ""
 
-#: cgi-bin/admin.c:445
+#: cgi-bin/admin.c:445 cgi-bin/admin.c:463
 msgid "Unable to add class:"
 msgstr ""
 
-#: cgi-bin/admin.c:514
+#: cgi-bin/admin.c:514 cgi-bin/admin.c:532
 msgid "Modify Printer"
 msgstr ""
 
-#: cgi-bin/admin.c:514
+#: cgi-bin/admin.c:514 cgi-bin/admin.c:532
 msgid "Add Printer"
 msgstr ""
 
-#: cgi-bin/admin.c:583
+#: cgi-bin/admin.c:583 cgi-bin/admin.c:602
 msgid "The printer name may only contain up to 127 printable characters and may not contain spaces, slashes (/), or the pound sign (#)."
 msgstr ""
 
-#: cgi-bin/admin.c:900
+#: cgi-bin/admin.c:900 cgi-bin/admin.c:930
 msgid "Unable to get list of printer drivers:"
 msgstr ""
 
-#: cgi-bin/admin.c:983
+#: cgi-bin/admin.c:983 cgi-bin/admin.c:1014
 msgid "Unable to modify printer:"
 msgstr ""
 
-#: cgi-bin/admin.c:984
+#: cgi-bin/admin.c:984 cgi-bin/admin.c:1015
 msgid "Unable to add printer:"
 msgstr ""
 
-#: cgi-bin/admin.c:1051
+#: cgi-bin/admin.c:1051 cgi-bin/admin.c:1082
 msgid "Set Printer Options"
 msgstr ""
 
 #: cgi-bin/admin.c:1062 cgi-bin/admin.c:2330 cgi-bin/admin.c:2391
 #: cgi-bin/admin.c:3112 cgi-bin/admin.c:3213 cgi-bin/admin.c:3449
+#: cgi-bin/admin.c:1095 cgi-bin/admin.c:2374 cgi-bin/admin.c:2435
+#: cgi-bin/admin.c:3156 cgi-bin/admin.c:3258 cgi-bin/admin.c:3496
 msgid "Missing form variable!"
 msgstr ""
 
-#: cgi-bin/admin.c:1076
+#: cgi-bin/admin.c:1076 cgi-bin/admin.c:1113
 msgid "Unable to get PPD file!"
 msgstr ""
 
-#: cgi-bin/admin.c:1084
+#: cgi-bin/admin.c:1084 cgi-bin/admin.c:1123
 msgid "Unable to open PPD file:"
 msgstr ""
 
-#: cgi-bin/admin.c:1241
+#: cgi-bin/admin.c:1241 cgi-bin/admin.c:1282
 msgid "Banners"
 msgstr ""
 
-#: cgi-bin/admin.c:1255
+#: cgi-bin/admin.c:1255 cgi-bin/admin.c:1296
 msgid "Starting Banner"
 msgstr ""
 
-#: cgi-bin/admin.c:1262
+#: cgi-bin/admin.c:1262 cgi-bin/admin.c:1303
 msgid "Ending Banner"
 msgstr ""
 
-#: cgi-bin/admin.c:1280
+#: cgi-bin/admin.c:1280 cgi-bin/admin.c:1321
 msgid "Policies"
 msgstr ""
 
-#: cgi-bin/admin.c:1304
+#: cgi-bin/admin.c:1304 cgi-bin/admin.c:1345
 msgid "Error Policy"
 msgstr ""
 
-#: cgi-bin/admin.c:1331
+#: cgi-bin/admin.c:1331 cgi-bin/admin.c:1372
 msgid "Operation Policy"
 msgstr ""
 
-#: cgi-bin/admin.c:1352 cgi-bin/admin.c:1372
+#: cgi-bin/admin.c:1352 cgi-bin/admin.c:1372 cgi-bin/admin.c:1393
+#: cgi-bin/admin.c:1413
 msgid "PS Binary Protocol"
 msgstr ""
 
-#: cgi-bin/admin.c:1358
+#: cgi-bin/admin.c:1358 cgi-bin/admin.c:1399
 msgid "None"
 msgstr ""
 
-#: cgi-bin/admin.c:1490
+#: cgi-bin/admin.c:1490 cgi-bin/admin.c:1534
 msgid "Unable to set options:"
 msgstr ""
 
 #: cgi-bin/admin.c:1591 cgi-bin/admin.c:1607 cgi-bin/admin.c:1620
-#: cgi-bin/admin.c:2099 cgi-bin/admin.c:2106
+#: cgi-bin/admin.c:2099 cgi-bin/admin.c:2106 cgi-bin/admin.c:1635
+#: cgi-bin/admin.c:1651 cgi-bin/admin.c:1664 cgi-bin/admin.c:2143
+#: cgi-bin/admin.c:2150
 msgid "Change Settings"
 msgstr ""
 
 #: cgi-bin/admin.c:1592 cgi-bin/admin.c:1608 cgi-bin/admin.c:1621
+#: cgi-bin/admin.c:1636 cgi-bin/admin.c:1652 cgi-bin/admin.c:1665
 msgid "Unable to change server settings:"
 msgstr ""
 
-#: cgi-bin/admin.c:2097 cgi-bin/admin.c:2190
+#: cgi-bin/admin.c:2097 cgi-bin/admin.c:2190 cgi-bin/admin.c:2141
+#: cgi-bin/admin.c:2234
 msgid "Unable to upload cupsd.conf file:"
 msgstr ""
 
 #: cgi-bin/admin.c:2134 cgi-bin/admin.c:2146 cgi-bin/admin.c:2193
 #: cgi-bin/admin.c:2200 cgi-bin/admin.c:2232 cgi-bin/admin.c:2244
-#: cgi-bin/admin.c:2267
+#: cgi-bin/admin.c:2267 cgi-bin/admin.c:2178 cgi-bin/admin.c:2190
+#: cgi-bin/admin.c:2237 cgi-bin/admin.c:2276 cgi-bin/admin.c:2288
+#: cgi-bin/admin.c:2311
 msgid "Edit Configuration File"
 msgstr ""
 
-#: cgi-bin/admin.c:2135 cgi-bin/admin.c:2147
+#: cgi-bin/admin.c:2135 cgi-bin/admin.c:2147 cgi-bin/admin.c:2179
+#: cgi-bin/admin.c:2191
 msgid "Unable to create temporary file:"
 msgstr ""
 
 #: cgi-bin/admin.c:2233 cgi-bin/admin.c:2245 cgi-bin/admin.c:2268
+#: cgi-bin/admin.c:2277 cgi-bin/admin.c:2289 cgi-bin/admin.c:2312
 msgid "Unable to access cupsd.conf file:"
 msgstr ""
 
-#: cgi-bin/admin.c:2247
+#: cgi-bin/admin.c:2247 cgi-bin/admin.c:2291
 msgid "Unable to edit cupsd.conf files larger than 1MB!"
 msgstr ""
 
-#: cgi-bin/admin.c:2316
+#: cgi-bin/admin.c:2316 cgi-bin/admin.c:2360
 msgid "Delete Class"
 msgstr ""
 
-#: cgi-bin/admin.c:2357
+#: cgi-bin/admin.c:2357 cgi-bin/admin.c:2401
 msgid "Unable to delete class:"
 msgstr ""
 
-#: cgi-bin/admin.c:2377
+#: cgi-bin/admin.c:2377 cgi-bin/admin.c:2421
 msgid "Delete Printer"
 msgstr ""
 
-#: cgi-bin/admin.c:2418
+#: cgi-bin/admin.c:2418 cgi-bin/admin.c:2462
 msgid "Unable to delete printer:"
 msgstr ""
 
-#: cgi-bin/admin.c:2447
+#: cgi-bin/admin.c:2447 cgi-bin/admin.c:2491
 msgid "Export Printers to Samba"
 msgstr ""
 
-#: cgi-bin/admin.c:2515
+#: cgi-bin/admin.c:2515 cgi-bin/admin.c:2559
 msgid "Unable to fork process!"
 msgstr ""
 
-#: cgi-bin/admin.c:2534
+#: cgi-bin/admin.c:2534 cgi-bin/admin.c:2578
 msgid "Unable to connect to server!"
 msgstr ""
 
-#: cgi-bin/admin.c:2538
+#: cgi-bin/admin.c:2538 cgi-bin/admin.c:2582
 msgid "Unable to get printer attributes!"
 msgstr ""
 
-#: cgi-bin/admin.c:2543
+#: cgi-bin/admin.c:2543 cgi-bin/admin.c:2587
 msgid "Unable to convert PPD file!"
 msgstr ""
 
-#: cgi-bin/admin.c:2547
+#: cgi-bin/admin.c:2547 cgi-bin/admin.c:2591
 msgid "Unable to copy Windows 2000 printer driver files!"
 msgstr ""
 
-#: cgi-bin/admin.c:2552
+#: cgi-bin/admin.c:2552 cgi-bin/admin.c:2596
 msgid "Unable to install Windows 2000 printer driver files!"
 msgstr ""
 
-#: cgi-bin/admin.c:2557
+#: cgi-bin/admin.c:2557 cgi-bin/admin.c:2601
 msgid "Unable to copy Windows 9x printer driver files!"
 msgstr ""
 
-#: cgi-bin/admin.c:2562
+#: cgi-bin/admin.c:2562 cgi-bin/admin.c:2606
 msgid "Unable to install Windows 9x printer driver files!"
 msgstr ""
 
-#: cgi-bin/admin.c:2567
+#: cgi-bin/admin.c:2567 cgi-bin/admin.c:2611
 msgid "Unable to set Windows printer driver!"
 msgstr ""
 
-#: cgi-bin/admin.c:2572
+#: cgi-bin/admin.c:2572 cgi-bin/admin.c:2616
 msgid "No printer drivers found!"
 msgstr ""
 
-#: cgi-bin/admin.c:2576
+#: cgi-bin/admin.c:2576 cgi-bin/admin.c:2620
 msgid "Unable to execute cupsaddsmb command!"
 msgstr ""
 
-#: cgi-bin/admin.c:2582
+#: cgi-bin/admin.c:2582 cgi-bin/admin.c:2626
 #, c-format
 msgid "cupsaddsmb failed with status %d"
 msgstr ""
 
-#: cgi-bin/admin.c:2592
+#: cgi-bin/admin.c:2592 cgi-bin/admin.c:2636
 #, c-format
 msgid "cupsaddsmb crashed on signal %d"
 msgstr ""
 
-#: cgi-bin/admin.c:2608
+#: cgi-bin/admin.c:2608 cgi-bin/admin.c:2652
 msgid "A Samba username is required to export printer drivers!"
 msgstr ""
 
-#: cgi-bin/admin.c:2612
+#: cgi-bin/admin.c:2612 cgi-bin/admin.c:2656
 msgid "A Samba password is required to export printer drivers!"
 msgstr ""
 
-#: cgi-bin/admin.c:2704
+#: cgi-bin/admin.c:2704 cgi-bin/admin.c:2748
 msgid "Unable to open cupsd.conf file:"
 msgstr ""
 
-#: cgi-bin/admin.c:3144 cgi-bin/admin.c:3400
+#: cgi-bin/admin.c:3144 cgi-bin/admin.c:3400 cgi-bin/admin.c:3189
+#: cgi-bin/admin.c:3447
 msgid "Unable to change printer:"
 msgstr ""
 
 #: cgi-bin/admin.c:3214 cgi-bin/admin.c:3259 cgi-bin/admin.c:3399
-#: cgi-bin/admin.c:3417
+#: cgi-bin/admin.c:3417 cgi-bin/admin.c:3305 cgi-bin/admin.c:3446
+#: cgi-bin/admin.c:3464
 msgid "Set Allowed Users"
 msgstr ""
 
-#: cgi-bin/admin.c:3262
+#: cgi-bin/admin.c:3262 cgi-bin/admin.c:3308
 msgid "Unable to get printer attributes:"
 msgstr ""
 
 #: cgi-bin/admin.c:3450 cgi-bin/admin.c:3488 cgi-bin/admin.c:3506
+#: cgi-bin/admin.c:3497 cgi-bin/admin.c:3536 cgi-bin/admin.c:3554
 msgid "Set Publishing"
 msgstr ""
 
-#: cgi-bin/admin.c:3489
+#: cgi-bin/admin.c:3489 cgi-bin/admin.c:3537
 msgid "Unable to change printer-is-shared attribute:"
 msgstr ""
 
@@ -2477,15 +2566,16 @@ msgstr ""
 msgid "Classes"
 msgstr ""
 
-#: cgi-bin/classes.c:355
+#: cgi-bin/classes.c:355 cgi-bin/classes.c:356
 msgid "Unable to get class list:"
 msgstr ""
 
-#: cgi-bin/classes.c:454
+#: cgi-bin/classes.c:454 cgi-bin/classes.c:455
 msgid "Unable to get class status:"
 msgstr ""
 
 #: cgi-bin/ipp-var.c:366 cgi-bin/ipp-var.c:419 cgi-bin/ipp-var.c:489
+#: cgi-bin/ipp-var.c:490
 msgid "Move Job"
 msgstr ""
 
@@ -2493,23 +2583,23 @@ msgstr ""
 msgid "Unable to find destination for job!"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:421 cgi-bin/ipp-var.c:491
+#: cgi-bin/ipp-var.c:421 cgi-bin/ipp-var.c:491 cgi-bin/ipp-var.c:492
 msgid "Move All Jobs"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:496
+#: cgi-bin/ipp-var.c:496 cgi-bin/ipp-var.c:497
 msgid "Unable to move job"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:498
+#: cgi-bin/ipp-var.c:498 cgi-bin/ipp-var.c:499
 msgid "Unable to move jobs"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:603
+#: cgi-bin/ipp-var.c:603 cgi-bin/ipp-var.c:605
 msgid "Print Test Page"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:606
+#: cgi-bin/ipp-var.c:606 cgi-bin/ipp-var.c:608
 msgid "Unable to print test page:"
 msgstr ""
 
@@ -2521,15 +2611,15 @@ msgstr ""
 msgid "Job operation failed:"
 msgstr ""
 
-#: cgi-bin/printers.c:161 cgi-bin/printers.c:208
+#: cgi-bin/printers.c:161 cgi-bin/printers.c:208 cgi-bin/printers.c:211
 msgid "Printers"
 msgstr ""
 
-#: cgi-bin/printers.c:362
+#: cgi-bin/printers.c:362 cgi-bin/printers.c:366
 msgid "Unable to get printer list:"
 msgstr ""
 
-#: cgi-bin/printers.c:461
+#: cgi-bin/printers.c:461 cgi-bin/printers.c:468
 msgid "Unable to get printer status:"
 msgstr ""
 
@@ -2629,7 +2719,7 @@ msgstr ""
 msgid "JCL"
 msgstr ""
 
-#: scheduler/ipp.c:2184
+#: scheduler/ipp.c:2184 scheduler/ipp.c:2226
 msgid "No authentication information provided!"
 msgstr ""
 
@@ -2726,13 +2816,14 @@ msgid "lpc> "
 msgstr ""
 
 #: berkeley/lpq.c:93 systemv/cancel.c:250 systemv/cancel.c:332
+#: systemv/cancel.c:331
 #, c-format
 msgid "%s: Unable to contact server!\n"
 msgstr ""
 
 #: berkeley/lpq.c:138 berkeley/lpr.c:128 berkeley/lprm.c:144
 #: systemv/accept.c:120 systemv/cancel.c:107 systemv/lp.c:150
-#: systemv/lpstat.c:144
+#: systemv/lpstat.c:144 berkeley/lpr.c:130 systemv/lp.c:154
 #, c-format
 msgid "%s: Error - expected username after '-U' option!\n"
 msgstr ""
@@ -2748,7 +2839,7 @@ msgid "%s: Unknown destination \"%s\"!\n"
 msgstr ""
 
 #: berkeley/lpq.c:201 berkeley/lprm.c:167 systemv/accept.c:146
-#: systemv/cancel.c:135 systemv/lp.c:227 systemv/lpstat.c:300
+#: systemv/cancel.c:135 systemv/lp.c:227 systemv/lpstat.c:300 systemv/lp.c:231
 #, c-format
 msgid "%s: Error - expected hostname after '-h' option!\n"
 msgstr ""
@@ -2767,83 +2858,84 @@ msgstr ""
 msgid "Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]\n"
 msgstr ""
 
-#: berkeley/lpr.c:148
+#: berkeley/lpr.c:148 berkeley/lpr.c:150
 #, c-format
 msgid "%s: Error - expected hostname after '-H' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:171
+#: berkeley/lpr.c:171 berkeley/lpr.c:173
 #, c-format
 msgid "%s: Error - expected value after '-%c' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:185
+#: berkeley/lpr.c:185 berkeley/lpr.c:187
 #, c-format
 msgid "%s: Warning - '%c' format modifier not supported - output may not be correct!\n"
 msgstr ""
 
-#: berkeley/lpr.c:199
+#: berkeley/lpr.c:199 berkeley/lpr.c:201
 #, c-format
 msgid "%s: error - expected option=value after '-o' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:250
+#: berkeley/lpr.c:250 berkeley/lpr.c:258
 #, c-format
 msgid "%s: Error - expected destination after '-P' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:285
+#: berkeley/lpr.c:285 berkeley/lpr.c:293
 #, c-format
 msgid "%s: Error - expected copy count after '-#' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:309
+#: berkeley/lpr.c:309 berkeley/lpr.c:317
 #, c-format
 msgid "%s: Error - expected name after '-%c' option!\n"
 msgstr ""
 
 #: berkeley/lpr.c:320 berkeley/lprm.c:179 systemv/accept.c:176
 #: systemv/cancel.c:169 systemv/lp.c:529 systemv/lpstat.c:461
+#: berkeley/lpr.c:328 systemv/lp.c:545
 #, c-format
 msgid "%s: Error - unknown option '%c'!\n"
 msgstr ""
 
-#: berkeley/lpr.c:333 systemv/lp.c:554
+#: berkeley/lpr.c:333 systemv/lp.c:554 berkeley/lpr.c:341 systemv/lp.c:570
 #, c-format
 msgid "%s: Error - unable to access \"%s\" - %s\n"
 msgstr ""
 
-#: berkeley/lpr.c:351 systemv/lp.c:571
+#: berkeley/lpr.c:351 systemv/lp.c:571 berkeley/lpr.c:359 systemv/lp.c:587
 #, c-format
 msgid "%s: Error - too many files - \"%s\"\n"
 msgstr ""
 
-#: berkeley/lpr.c:393 systemv/lp.c:621
+#: berkeley/lpr.c:393 systemv/lp.c:621 berkeley/lpr.c:401 systemv/lp.c:637
 #, c-format
 msgid "%s: Error - %s environment variable names non-existent destination \"%s\"!\n"
 msgstr ""
 
-#: berkeley/lpr.c:398 systemv/lp.c:626
+#: berkeley/lpr.c:398 systemv/lp.c:626 berkeley/lpr.c:406 systemv/lp.c:642
 #, c-format
 msgid "%s: Error - no default destination available.\n"
 msgstr ""
 
-#: berkeley/lpr.c:402 systemv/lp.c:630
+#: berkeley/lpr.c:402 systemv/lp.c:630 berkeley/lpr.c:410 systemv/lp.c:646
 #, c-format
 msgid "%s: Error - scheduler not responding!\n"
 msgstr ""
 
-#: berkeley/lpr.c:452 systemv/lp.c:670
+#: berkeley/lpr.c:452 systemv/lp.c:670 berkeley/lpr.c:460 systemv/lp.c:686
 #, c-format
 msgid "%s: Error - unable to create temporary file \"%s\" - %s\n"
 msgstr ""
 
-#: berkeley/lpr.c:462 systemv/lp.c:679
+#: berkeley/lpr.c:462 systemv/lp.c:679 berkeley/lpr.c:470 systemv/lp.c:695
 #, c-format
 msgid "%s: Error - unable to write to temporary file \"%s\" - %s\n"
 msgstr ""
 
-#: berkeley/lpr.c:476 systemv/lp.c:693
+#: berkeley/lpr.c:476 systemv/lp.c:693 berkeley/lpr.c:484 systemv/lp.c:709
 #, c-format
 msgid "%s: Error - stdin is empty, so no job has been sent.\n"
 msgstr ""
@@ -2863,112 +2955,112 @@ msgstr ""
 msgid "%s: Error - expected username after '-u' option!\n"
 msgstr ""
 
-#: systemv/cancel.c:308 systemv/cancel.c:373
+#: systemv/cancel.c:308 systemv/cancel.c:373 systemv/cancel.c:372
 #, c-format
 msgid "%s: %s failed: %s\n"
 msgstr ""
 
-#: systemv/lp.c:173
+#: systemv/lp.c:173 systemv/lp.c:177
 #, c-format
 msgid "%s: Error - expected destination after '-d' option!\n"
 msgstr ""
 
-#: systemv/lp.c:206
+#: systemv/lp.c:206 systemv/lp.c:210
 #, c-format
 msgid "%s: Error - expected form after '-f' option!\n"
 msgstr ""
 
-#: systemv/lp.c:213
+#: systemv/lp.c:213 systemv/lp.c:217
 #, c-format
 msgid "%s: Warning - form option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:247
+#: systemv/lp.c:247 systemv/lp.c:251
 #, c-format
 msgid "%s: Expected job ID after '-i' option!\n"
 msgstr ""
 
-#: systemv/lp.c:258
+#: systemv/lp.c:258 systemv/lp.c:262
 #, c-format
 msgid "%s: Error - cannot print files and alter jobs simultaneously!\n"
 msgstr ""
 
-#: systemv/lp.c:271
+#: systemv/lp.c:271 systemv/lp.c:275
 #, c-format
 msgid "%s: Error - bad job ID!\n"
 msgstr ""
 
-#: systemv/lp.c:296
+#: systemv/lp.c:296 systemv/lp.c:308
 #, c-format
 msgid "%s: Error - expected copies after '-n' option!\n"
 msgstr ""
 
-#: systemv/lp.c:319
+#: systemv/lp.c:319 systemv/lp.c:331
 #, c-format
 msgid "%s: Error - expected option string after '-o' option!\n"
 msgstr ""
 
-#: systemv/lp.c:340
+#: systemv/lp.c:340 systemv/lp.c:352
 #, c-format
 msgid "%s: Error - expected priority after '-%c' option!\n"
 msgstr ""
 
-#: systemv/lp.c:363
+#: systemv/lp.c:363 systemv/lp.c:375
 #, c-format
 msgid "%s: Error - priority must be between 1 and 100.\n"
 msgstr ""
 
-#: systemv/lp.c:387
+#: systemv/lp.c:387 systemv/lp.c:399
 #, c-format
 msgid "%s: Error - expected title after '-t' option!\n"
 msgstr ""
 
-#: systemv/lp.c:405
+#: systemv/lp.c:405 systemv/lp.c:417
 #, c-format
 msgid "%s: Error - expected mode list after '-y' option!\n"
 msgstr ""
 
-#: systemv/lp.c:413
+#: systemv/lp.c:413 systemv/lp.c:425
 #, c-format
 msgid "%s: Warning - mode option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:427
+#: systemv/lp.c:427 systemv/lp.c:439
 #, c-format
 msgid "%s: Error - expected hold name after '-H' option!\n"
 msgstr ""
 
-#: systemv/lp.c:451
+#: systemv/lp.c:451 systemv/lp.c:463
 #, c-format
 msgid "%s: Need job ID ('-i jobid') before '-H restart'!\n"
 msgstr ""
 
-#: systemv/lp.c:475
+#: systemv/lp.c:475 systemv/lp.c:487
 #, c-format
 msgid "%s: Error - expected page list after '-P' option!\n"
 msgstr ""
 
-#: systemv/lp.c:496
+#: systemv/lp.c:496 systemv/lp.c:508
 #, c-format
 msgid "%s: Error - expected character set after '-S' option!\n"
 msgstr ""
 
-#: systemv/lp.c:504
+#: systemv/lp.c:504 systemv/lp.c:516
 #, c-format
 msgid "%s: Warning - character set option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:516
+#: systemv/lp.c:516 systemv/lp.c:528
 #, c-format
 msgid "%s: Error - expected content type after '-T' option!\n"
 msgstr ""
 
-#: systemv/lp.c:524
+#: systemv/lp.c:524 systemv/lp.c:536
 #, c-format
 msgid "%s: Warning - content type option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:538
+#: systemv/lp.c:538 systemv/lp.c:554
 #, c-format
 msgid "%s: Error - cannot print from stdin if files or a job ID are provided!\n"
 msgstr ""
@@ -2993,6 +3085,104 @@ msgstr ""
 msgid "%s: Unable to connect to server\n"
 msgstr ""
 
+#: cups/notify.c:91
+msgid "Print Job:"
+msgstr ""
+
+#: cups/notify.c:96
+msgid "pending"
+msgstr ""
+
+#: cups/notify.c:99
+msgid "held"
+msgstr ""
+
+#: cups/notify.c:102 cups/notify.c:143
+msgid "processing"
+msgstr ""
+
+#: cups/notify.c:105 cups/notify.c:146
+msgid "stopped"
+msgstr ""
+
+#: cups/notify.c:108
+msgid "canceled"
+msgstr ""
+
+#: cups/notify.c:111
+msgid "aborted"
+msgstr ""
+
+#: cups/notify.c:114
+msgid "completed"
+msgstr ""
+
+#: cups/notify.c:117 cups/notify.c:149
+msgid "unknown"
+msgstr ""
+
+#: cups/notify.c:126
+msgid "untitled"
+msgstr ""
+
+#: cups/notify.c:135
+msgid "Printer:"
+msgstr ""
+
+#: cups/notify.c:140
+msgid "idle"
+msgstr ""
+
+#: scheduler/ipp.c:5513
+msgid "Missing notify-subscription-ids attribute!"
+msgstr ""
+
+#: scheduler/ipp.c:7851
+msgid "Job subscriptions cannot be renewed!"
+msgstr ""
+
+#: scheduler/main.c:163
+msgid "cupsd: Expected config filename after \"-c\" option!\n"
+msgstr ""
+
+#: scheduler/main.c:218
+msgid "cupsd: launchd(8) support not compiled in, running in normal mode.\n"
+msgstr ""
+
+#: scheduler/main.c:225
+#, c-format
+msgid "cupsd: Unknown option \"%c\" - aborting!\n"
+msgstr ""
+
+#: scheduler/main.c:232
+#, c-format
+msgid "cupsd: Unknown argument \"%s\" - aborting!\n"
+msgstr ""
+
+#: scheduler/main.c:2315
+msgid ""
+"Usage: cupsd [-c config-file] [-f] [-F] [-h] [-l]\n"
+"\n"
+"-c config-file      Load alternate configuration file\n"
+"-f                  Run in the foreground\n"
+"-F                  Run in the foreground but detach\n"
+"-h                  Show this usage message\n"
+"-l                  Run cupsd from launchd(8)\n"
+msgstr ""
+
+#: systemv/cupstestppd.c:1343
+#, c-format
+msgid "        WARN    Line %d only contains whitespace!\n"
+msgstr ""
+
+#: systemv/cupstestppd.c:1361
+msgid "        WARN    File contains a mix of CR, LF, and CR LF line endings!\n"
+msgstr ""
+
+#: systemv/cupstestppd.c:1366
+msgid "        WARN    Non-Windows PPD files should use lines ending with only LF, not CR LF!\n"
+msgstr ""
+
 
 #
 # End of "$Id$".
index e7f9a29dccd0f56adf18c08a21e5c0272d83a3ef..c5a5e6c86501f7a187a13123f9253c6e429edef9 100644 (file)
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2006-01-18 22:26-0500\n"
+"POT-Creation-Date: 2006-02-15 19:50-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -10,7 +10,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: cgi-bin/admin.c:1276 cgi-bin/admin.c:1154
+#: cgi-bin/admin.c:1276 cgi-bin/admin.c:1154 cgi-bin/admin.c:1195
 msgid "Options Installed"
 msgstr "Options Installées"
 
@@ -67,7 +67,7 @@ msgstr "Non"
 msgid "Auto"
 msgstr "Automobile"
 
-#: scheduler/client.c:2247 scheduler/client.c:2251
+#: scheduler/client.c:2247 scheduler/client.c:2251 scheduler/client.c:2274
 msgid ""
 "Enter your username and password or the root username and password to access "
 "this page."
@@ -75,29 +75,29 @@ msgstr ""
 "Entrez votre username et mot de passe ou le username de racine et le mot de "
 "passe pour accéder à cette page."
 
-#: scheduler/client.c:2252 scheduler/client.c:2256
+#: scheduler/client.c:2252 scheduler/client.c:2256 scheduler/client.c:2279
 msgid "You must use a https: URL to access this page."
 msgstr "Vous devez employer des https:  URL pour accéder à cette page."
 
-#: scheduler/ipp.c:236 scheduler/ipp.c:244
+#: scheduler/ipp.c:236 scheduler/ipp.c:244 scheduler/ipp.c:246
 #, c-format
 msgid "Bad request version number %d.%d!"
 msgstr "Mauvais nombre de version de demande %d.%d!"
 
-#: scheduler/ipp.c:246 scheduler/ipp.c:254
+#: scheduler/ipp.c:246 scheduler/ipp.c:254 scheduler/ipp.c:256
 msgid "No attributes in request!"
 msgstr "Aucuns attributs dans la demande!"
 
-#: scheduler/ipp.c:269 scheduler/ipp.c:277
+#: scheduler/ipp.c:269 scheduler/ipp.c:277 scheduler/ipp.c:279
 #, c-format
 msgid "Attribute groups are out of order (%x < %x)!"
 msgstr "Les groupes d'attribut sont en panne (%x < %x)!"
 
-#: scheduler/ipp.c:379 scheduler/ipp.c:389
+#: scheduler/ipp.c:379 scheduler/ipp.c:389 scheduler/ipp.c:391
 msgid "Missing required attributes!"
 msgstr "Attributs requis manquants!"
 
-#: scheduler/ipp.c:575 scheduler/ipp.c:585
+#: scheduler/ipp.c:575 scheduler/ipp.c:585 scheduler/ipp.c:591
 #, c-format
 msgid "%s not supported!"
 msgstr "%s non soutenu!"
@@ -113,83 +113,89 @@ msgstr "%s non soutenu!"
 #: scheduler/ipp.c:5237 scheduler/ipp.c:5526 scheduler/ipp.c:5834
 #: scheduler/ipp.c:6113 scheduler/ipp.c:6155 scheduler/ipp.c:6657
 #: scheduler/ipp.c:7365 scheduler/ipp.c:8251 scheduler/ipp.c:8662
-#: scheduler/ipp.c:8742 scheduler/ipp.c:8917
+#: scheduler/ipp.c:8742 scheduler/ipp.c:8917 scheduler/ipp.c:702
+#: scheduler/ipp.c:1093 scheduler/ipp.c:2357 scheduler/ipp.c:2472
+#: scheduler/ipp.c:3993 scheduler/ipp.c:4730 scheduler/ipp.c:4973
+#: scheduler/ipp.c:5357 scheduler/ipp.c:5769 scheduler/ipp.c:6077
+#: scheduler/ipp.c:6368 scheduler/ipp.c:6410 scheduler/ipp.c:6916
+#: scheduler/ipp.c:7626 scheduler/ipp.c:8589 scheduler/ipp.c:9003
+#: scheduler/ipp.c:9084 scheduler/ipp.c:9259
 msgid "The printer or class was not found."
 msgstr "L'imprimeur ou la classe n'a pas été trouvé."
 
-#: scheduler/ipp.c:762 scheduler/ipp.c:777
+#: scheduler/ipp.c:762 scheduler/ipp.c:777 scheduler/ipp.c:784
 msgid ""
 "The printer-uri must be of the form \"ipp://HOSTNAME/classes/CLASSNAME\"."
 msgstr ""
 "L'printer-uri doit être de la forme \"ipp://HOSTNAME/classes/CLASSNAME\"."
 
 #: scheduler/ipp.c:778 scheduler/ipp.c:1454 scheduler/ipp.c:793
-#: scheduler/ipp.c:1482
+#: scheduler/ipp.c:1482 scheduler/ipp.c:800 scheduler/ipp.c:1515
 #, c-format
 msgid "The printer-uri \"%s\" contains invalid characters."
 msgstr "L'printer-uri \"%s\" contient les caractères inadmissibles."
 
-#: scheduler/ipp.c:811 scheduler/ipp.c:826
+#: scheduler/ipp.c:811 scheduler/ipp.c:826 scheduler/ipp.c:833
 #, c-format
 msgid "A printer named \"%s\" already exists!"
 msgstr "Un imprimeur appelé \"%s\" existe déjà!"
 
-#: scheduler/ipp.c:904 scheduler/ipp.c:924
+#: scheduler/ipp.c:904 scheduler/ipp.c:924 scheduler/ipp.c:933
 #, c-format
 msgid "Attempt to set %s printer-state to bad value %d!"
 msgstr "Essayez de placer l'imprimeur-état de %s à la mauvaise valeur %d!"
 
-#: scheduler/ipp.c:1000 scheduler/ipp.c:1022
+#: scheduler/ipp.c:1000 scheduler/ipp.c:1022 scheduler/ipp.c:1034
 #, c-format
 msgid "add_class: Unknown printer-op-policy \"%s\"."
 msgstr "add_class:  printer-op-policy inconnue \"%s\"."
 
-#: scheduler/ipp.c:1013 scheduler/ipp.c:1035
+#: scheduler/ipp.c:1013 scheduler/ipp.c:1035 scheduler/ipp.c:1047
 #, c-format
 msgid "add_class: Unknown printer-error-policy \"%s\"."
 msgstr "add_class:  printer-error-policy inconnue \"%s\"."
 
-#: scheduler/ipp.c:1144 scheduler/ipp.c:1168
+#: scheduler/ipp.c:1144 scheduler/ipp.c:1168 scheduler/ipp.c:1200
 msgid "Unable to allocate memory for file types!"
 msgstr "Incapable d'assigner la mémoire pour des types de dossier!"
 
 #: scheduler/ipp.c:1290 scheduler/ipp.c:4501 scheduler/ipp.c:1316
-#: scheduler/ipp.c:4705
+#: scheduler/ipp.c:4705 scheduler/ipp.c:1348 scheduler/ipp.c:4804
 #, c-format
 msgid "Character set \"%s\" not supported!"
 msgstr "Jeu de caractères \"%s\" non soutenu!"
 
 #: scheduler/ipp.c:1299 scheduler/ipp.c:4510 scheduler/ipp.c:1325
-#: scheduler/ipp.c:4714
+#: scheduler/ipp.c:4714 scheduler/ipp.c:1357 scheduler/ipp.c:4813
 #, c-format
 msgid "Language \"%s\" not supported!"
 msgstr "Langue \"%s\" non soutenue!"
 
 #: scheduler/ipp.c:1309 scheduler/ipp.c:4520 scheduler/ipp.c:1335
-#: scheduler/ipp.c:4724
+#: scheduler/ipp.c:4724 scheduler/ipp.c:1367 scheduler/ipp.c:4823
 #, c-format
 msgid "The notify-user-data value is too large (%d > 63 octets)!"
 msgstr "La valeur de notify-user-data est trop grande (%d > 63 octets)!"
 
-#: scheduler/ipp.c:1326 scheduler/ipp.c:1352
+#: scheduler/ipp.c:1326 scheduler/ipp.c:1352 scheduler/ipp.c:1384
 msgid ""
 "The notify-lease-duration attribute cannot be used with job subscriptions."
 msgstr ""
 "L'attribut de notify-lease-duration ne peut pas être employé avec des "
 "abonnements du travail."
 
-#: scheduler/ipp.c:1438 scheduler/ipp.c:1466
+#: scheduler/ipp.c:1438 scheduler/ipp.c:1466 scheduler/ipp.c:1499
 msgid ""
 "The printer-uri must be of the form \"ipp://HOSTNAME/printers/PRINTERNAME\"."
 msgstr ""
 "L'printer-uri doit être de la forme \"ipp://HOSTNAME/printers/PRINTERNAME\"."
 
-#: scheduler/ipp.c:1487 scheduler/ipp.c:1515
+#: scheduler/ipp.c:1487 scheduler/ipp.c:1515 scheduler/ipp.c:1548
 #, c-format
 msgid "A class named \"%s\" already exists!"
 msgstr "Une classe appelée \"%s\" existe déjà!"
 
-#: scheduler/ipp.c:1575 scheduler/ipp.c:1607
+#: scheduler/ipp.c:1575 scheduler/ipp.c:1607 scheduler/ipp.c:1644
 #, c-format
 msgid ""
 "File device URIs have been disabled! To enable, see the FileDevice directive "
@@ -198,42 +204,42 @@ msgstr ""
 "Le dispositif URIs de dossier ont été neutralisés!  Pour permettre, voyez la "
 "directive de FileDevice dans \"%s/cupsd.conf\"."
 
-#: scheduler/ipp.c:1595 scheduler/ipp.c:1627
+#: scheduler/ipp.c:1595 scheduler/ipp.c:1627 scheduler/ipp.c:1664
 #, c-format
 msgid "Bad device-uri \"%s\"!"
 msgstr "Mauvais device-uri \"%s\"!"
 
-#: scheduler/ipp.c:1626 scheduler/ipp.c:1659
+#: scheduler/ipp.c:1626 scheduler/ipp.c:1659 scheduler/ipp.c:1698
 #, c-format
 msgid "Bad port-monitor \"%s\"!"
 msgstr "Mauvais port-monitor \"%s\"!"
 
-#: scheduler/ipp.c:1669 scheduler/ipp.c:1705
+#: scheduler/ipp.c:1669 scheduler/ipp.c:1705 scheduler/ipp.c:1744
 #, c-format
 msgid "Bad printer-state value %d!"
 msgstr "Mauvaise valeur %d de printer-state!"
 
-#: scheduler/ipp.c:1762 scheduler/ipp.c:1800
+#: scheduler/ipp.c:1762 scheduler/ipp.c:1800 scheduler/ipp.c:1842
 #, c-format
 msgid "Unknown printer-op-policy \"%s\"."
 msgstr "printer-op-policy inconnue \"%s\"."
 
-#: scheduler/ipp.c:1775 scheduler/ipp.c:1813
+#: scheduler/ipp.c:1775 scheduler/ipp.c:1813 scheduler/ipp.c:1855
 #, c-format
 msgid "Unknown printer-error-policy \"%s\"."
 msgstr "printer-error-policy inconnue \"%s\"."
 
-#: scheduler/ipp.c:1837 scheduler/ipp.c:1875
+#: scheduler/ipp.c:1837 scheduler/ipp.c:1875 scheduler/ipp.c:1919
 #, c-format
 msgid "Unable to copy interface script - %s!"
 msgstr "Incapable de copier le manuscrit d'interface - %s!"
 
-#: scheduler/ipp.c:1862 scheduler/ipp.c:1900
+#: scheduler/ipp.c:1862 scheduler/ipp.c:1900 scheduler/ipp.c:1944
 #, c-format
 msgid "Unable to copy PPD file - %s!"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: scheduler/ipp.c:1915 scheduler/ipp.c:1954
+#: scheduler/ipp.c:1915 scheduler/ipp.c:1954 scheduler/ipp.c:2000
 msgid "Unable to copy PPD file!"
 msgstr "Incapable de copier le dossier de PPD!"
 
@@ -242,7 +248,10 @@ msgstr "Incapable de copier le dossier de PPD!"
 #: scheduler/ipp.c:7538 scheduler/ipp.c:7776 scheduler/ipp.c:8261
 #: scheduler/ipp.c:2116 scheduler/ipp.c:2412 scheduler/ipp.c:5102
 #: scheduler/ipp.c:5955 scheduler/ipp.c:7452 scheduler/ipp.c:7599
-#: scheduler/ipp.c:7839 scheduler/ipp.c:8334
+#: scheduler/ipp.c:7839 scheduler/ipp.c:8334 scheduler/ipp.c:2158
+#: scheduler/ipp.c:2451 scheduler/ipp.c:5220 scheduler/ipp.c:6210
+#: scheduler/ipp.c:7713 scheduler/ipp.c:7928 scheduler/ipp.c:8167
+#: scheduler/ipp.c:8672
 msgid "Got a printer-uri attribute but no job-id!"
 msgstr "N'a obtenu un attribut de printer-uri mais aucune job-id!"
 
@@ -252,6 +261,9 @@ msgstr "N'a obtenu un attribut de printer-uri mais aucune job-id!"
 #: scheduler/ipp.c:2138 scheduler/ipp.c:2484 scheduler/ipp.c:5125
 #: scheduler/ipp.c:5978 scheduler/ipp.c:6201 scheduler/ipp.c:7475
 #: scheduler/ipp.c:7622 scheduler/ipp.c:7862 scheduler/ipp.c:8357
+#: scheduler/ipp.c:2180 scheduler/ipp.c:2523 scheduler/ipp.c:5243
+#: scheduler/ipp.c:6233 scheduler/ipp.c:6456 scheduler/ipp.c:7736
+#: scheduler/ipp.c:7951 scheduler/ipp.c:8190 scheduler/ipp.c:8695
 #, c-format
 msgid "Bad job-uri attribute \"%s\"!"
 msgstr "Mauvais attribut \"%s\" de job-uri!"
@@ -263,7 +275,7 @@ msgstr "Mauvais attribut \"%s\" de job-uri!"
 msgid "Job #%d doesn't exist!"
 msgstr "Le travail # %d n'existe pas!"
 
-#: scheduler/ipp.c:2131 scheduler/ipp.c:2172
+#: scheduler/ipp.c:2131 scheduler/ipp.c:2172 scheduler/ipp.c:2214
 #, c-format
 msgid "Job #%d is not held for authentication!"
 msgstr "Le travail # %d n'est pas tenu pour l'authentification!"
@@ -274,20 +286,20 @@ msgid "You are not authorized to authenticate job #%d owned by \"%s\"!"
 msgstr ""
 "Vous n'êtes pas autorisés à authentifier le travail # %d possédés par \"%s\"!"
 
-#: scheduler/ipp.c:2221 scheduler/ipp.c:2264
+#: scheduler/ipp.c:2221 scheduler/ipp.c:2264 scheduler/ipp.c:2303
 msgid "The printer-uri attribute is required!"
 msgstr "L'attribut de printer-uri est exigé!"
 
-#: scheduler/ipp.c:2238 scheduler/ipp.c:2283
+#: scheduler/ipp.c:2238 scheduler/ipp.c:2283 scheduler/ipp.c:2322
 msgid "Missing requesting-user-name attribute!"
 msgstr "Attribut absent de requesting-user-name!"
 
-#: scheduler/ipp.c:2277 scheduler/ipp.c:2324
+#: scheduler/ipp.c:2277 scheduler/ipp.c:2324 scheduler/ipp.c:2363
 #, c-format
 msgid "The printer-uri \"%s\" is not valid."
 msgstr "L'printer-uri \"%s\" est inadmissible."
 
-#: scheduler/ipp.c:2410 scheduler/ipp.c:2460
+#: scheduler/ipp.c:2410 scheduler/ipp.c:2460 scheduler/ipp.c:2499
 #, c-format
 msgid "No active jobs on %s!"
 msgstr "Aucuns JOBS actifs sur %s!"
@@ -298,83 +310,84 @@ msgid "You are not authorized to delete job #%d owned by \"%s\"!"
 msgstr ""
 "Vous n'êtes pas autorisés à supprimer le travail # %d possédés par \"%s\"!"
 
-#: scheduler/ipp.c:2476 scheduler/ipp.c:2527
+#: scheduler/ipp.c:2476 scheduler/ipp.c:2527 scheduler/ipp.c:2563
 #, c-format
 msgid "Job #%d is already %s - can't cancel."
 msgstr "Le travail # %d est déjà %s - ne peut pas décommander."
 
-#: scheduler/ipp.c:3720 scheduler/ipp.c:3914
+#: scheduler/ipp.c:3720 scheduler/ipp.c:3914 scheduler/ipp.c:4006
 msgid "The printer or class is not shared!"
 msgstr "L'imprimeur ou la classe n'est pas partagé!"
 
 #: scheduler/ipp.c:3746 scheduler/ipp.c:6647 scheduler/ipp.c:3940
-#: scheduler/ipp.c:6695
+#: scheduler/ipp.c:6695 scheduler/ipp.c:4032 scheduler/ipp.c:6954
 #, c-format
 msgid "Destination \"%s\" is not accepting jobs."
 msgstr "La destination \"%s\" n'accepte pas les travaux."
 
 #: scheduler/ipp.c:3759 scheduler/ipp.c:6443 scheduler/ipp.c:3954
-#: scheduler/ipp.c:6487
+#: scheduler/ipp.c:6487 scheduler/ipp.c:4046 scheduler/ipp.c:6739
 #, c-format
 msgid "Bad copies value %d."
 msgstr "Mauvaise valeur %d de copies."
 
 #: scheduler/ipp.c:3775 scheduler/ipp.c:6459 scheduler/ipp.c:3971
-#: scheduler/ipp.c:6504
+#: scheduler/ipp.c:6504 scheduler/ipp.c:4063 scheduler/ipp.c:6756
 #, c-format
 msgid "Bad page-ranges values %d-%d."
 msgstr "Mauvaises valeurs %d-%d de page-ranges."
 
-#: scheduler/ipp.c:3795 scheduler/ipp.c:3991
+#: scheduler/ipp.c:3795 scheduler/ipp.c:3991 scheduler/ipp.c:4083
 msgid "Too many active jobs."
 msgstr "Trop de JOBS actifs."
 
 #: scheduler/ipp.c:3801 scheduler/ipp.c:6668 scheduler/ipp.c:3997
-#: scheduler/ipp.c:6716
+#: scheduler/ipp.c:6716 scheduler/ipp.c:4089 scheduler/ipp.c:6975
 msgid "Quota limit reached."
 msgstr "La limite de quote-part a atteint."
 
 #: scheduler/ipp.c:3824 scheduler/ipp.c:6691 scheduler/ipp.c:4022
-#: scheduler/ipp.c:6741
+#: scheduler/ipp.c:6741 scheduler/ipp.c:4114 scheduler/ipp.c:7000
 #, c-format
 msgid "Unable to add job for destination \"%s\"!"
 msgstr "Incapable d'ajouter le travail pour la destination \"%s\"!"
 
-#: scheduler/ipp.c:4469 scheduler/ipp.c:4673
+#: scheduler/ipp.c:4469 scheduler/ipp.c:4673 scheduler/ipp.c:4770
 msgid "No subscription attributes in request!"
 msgstr "Aucuns attributs d'abonnement dans la demande!"
 
-#: scheduler/ipp.c:4559 scheduler/ipp.c:4763
+#: scheduler/ipp.c:4559 scheduler/ipp.c:4763 scheduler/ipp.c:4869
 msgid "notify-events not specified!"
 msgstr "notify-events non indiqués!"
 
-#: scheduler/ipp.c:4577 scheduler/ipp.c:4781
+#: scheduler/ipp.c:4577 scheduler/ipp.c:4781 scheduler/ipp.c:4887
 #, c-format
 msgid "Job %d not found!"
 msgstr "Le travail %d non trouvé!"
 
-#: scheduler/ipp.c:4827 scheduler/ipp.c:4957
+#: scheduler/ipp.c:4827 scheduler/ipp.c:4957 scheduler/ipp.c:5075
 msgid "No default printer"
 msgstr "Aucun imprimeur de défaut"
 
-#: scheduler/ipp.c:4930 scheduler/ipp.c:5060
+#: scheduler/ipp.c:4930 scheduler/ipp.c:5060 scheduler/ipp.c:5178
 msgid "cups-deviced failed to execute."
 msgstr "les cups-deviced ne se sont pas exécutées."
 
-#: scheduler/ipp.c:5393 scheduler/ipp.c:5479
+#: scheduler/ipp.c:5393 scheduler/ipp.c:5479 scheduler/ipp.c:5722
 msgid "cups-driverd failed to execute."
 msgstr "les cups-driverd ne se sont pas exécutées."
 
-#: scheduler/ipp.c:5571 scheduler/ipp.c:5594
+#: scheduler/ipp.c:5571 scheduler/ipp.c:5594 scheduler/ipp.c:5837
 msgid "No destinations added."
 msgstr "Aucunes destinations supplémentaires."
 
-#: scheduler/ipp.c:5794 scheduler/ipp.c:5736
+#: scheduler/ipp.c:5794 scheduler/ipp.c:5736 scheduler/ipp.c:2615
+#: scheduler/ipp.c:5530 scheduler/ipp.c:5979 scheduler/ipp.c:7840
 #, c-format
 msgid "notify-subscription-id %d no good!"
 msgstr "notify-subscription-id %d aucun bon!"
 
-#: scheduler/ipp.c:5878 scheduler/ipp.c:5822
+#: scheduler/ipp.c:5878 scheduler/ipp.c:5822 scheduler/ipp.c:6065
 #, c-format
 msgid "Job #%s does not exist!"
 msgstr "Le travail # %s n'existe pas!"
@@ -386,11 +399,15 @@ msgstr "Le travail # %s n'existe pas!"
 #: scheduler/ipp.c:5143 scheduler/ipp.c:5844 scheduler/ipp.c:5996
 #: scheduler/ipp.c:6174 scheduler/ipp.c:6219 scheduler/ipp.c:7493
 #: scheduler/ipp.c:7640 scheduler/ipp.c:7880 scheduler/ipp.c:8375
+#: scheduler/ipp.c:2199 scheduler/ipp.c:2541 scheduler/ipp.c:5261
+#: scheduler/ipp.c:6087 scheduler/ipp.c:6251 scheduler/ipp.c:6429
+#: scheduler/ipp.c:6474 scheduler/ipp.c:7754 scheduler/ipp.c:7969
+#: scheduler/ipp.c:8208 scheduler/ipp.c:8713
 #, c-format
 msgid "Job #%d does not exist!"
 msgstr "Le travail # %d n'existe pas!"
 
-#: scheduler/ipp.c:5969 scheduler/ipp.c:5915
+#: scheduler/ipp.c:5969 scheduler/ipp.c:5915 scheduler/ipp.c:6150
 msgid "No subscriptions found."
 msgstr "Abonnement n'a pas trouvé."
 
@@ -400,7 +417,7 @@ msgid "Not authorized to hold job #%d owned by \"%s\"!"
 msgstr "Non autorisé à juger le travail # %d possédés par \"%s\"!"
 
 #: scheduler/ipp.c:6203 scheduler/ipp.c:8315 scheduler/ipp.c:6250
-#: scheduler/ipp.c:8390
+#: scheduler/ipp.c:8390 scheduler/ipp.c:6505 scheduler/ipp.c:8728
 #, c-format
 msgid "Job #%d is finished and cannot be altered!"
 msgstr "Le travail # %d est fini et ne peut pas être changé!"
@@ -411,42 +428,42 @@ msgid "You are not authorized to move job #%d owned by \"%s\"!"
 msgstr ""
 "Vous n'êtes pas autorisés à déplacer le travail # %d possédés par \"%s\"!"
 
-#: scheduler/ipp.c:6228 scheduler/ipp.c:6098
+#: scheduler/ipp.c:6228 scheduler/ipp.c:6098 scheduler/ipp.c:6353
 msgid "job-printer-uri attribute missing!"
 msgstr "disparus d'attribut de job-printer-uri!"
 
 #: scheduler/ipp.c:6485 scheduler/ipp.c:7847 scheduler/ipp.c:6531
-#: scheduler/ipp.c:7913
+#: scheduler/ipp.c:7913 scheduler/ipp.c:6783 scheduler/ipp.c:8238
 #, c-format
 msgid "Unsupported compression \"%s\"!"
 msgstr "Compression non soutenue \"%s\"!"
 
 #: scheduler/ipp.c:6504 scheduler/ipp.c:7866 scheduler/ipp.c:6550
-#: scheduler/ipp.c:7932
+#: scheduler/ipp.c:7932 scheduler/ipp.c:6802 scheduler/ipp.c:8257
 msgid "No file!?!"
 msgstr "Aucun dossier!?!"
 
-#: scheduler/ipp.c:6522 scheduler/ipp.c:6568
+#: scheduler/ipp.c:6522 scheduler/ipp.c:6568 scheduler/ipp.c:6820
 #, c-format
 msgid "Could not scan type \"%s\"!"
 msgstr "N'a pas pu balayer le type \"%s\"!"
 
 #: scheduler/ipp.c:6574 scheduler/ipp.c:7936 scheduler/ipp.c:6620
-#: scheduler/ipp.c:8001
+#: scheduler/ipp.c:8001 scheduler/ipp.c:6879 scheduler/ipp.c:8332
 #, c-format
 msgid "Unsupported format '%s/%s'!"
 msgstr "Format non soutenu '%s/%s '!"
 
-#: scheduler/ipp.c:6621 scheduler/ipp.c:6669
+#: scheduler/ipp.c:6621 scheduler/ipp.c:6669 scheduler/ipp.c:6928
 msgid "Printer not shared!"
 msgstr "Imprimeur non partagé!"
 
-#: scheduler/ipp.c:6661 scheduler/ipp.c:6709
+#: scheduler/ipp.c:6661 scheduler/ipp.c:6709 scheduler/ipp.c:6968
 #, c-format
 msgid "Too many jobs - %d jobs, max jobs is %d."
 msgstr "Trop de travaux - les travaux de %d, les travaux maximum est %d."
 
-#: scheduler/ipp.c:7448 scheduler/ipp.c:7507
+#: scheduler/ipp.c:7448 scheduler/ipp.c:7507 scheduler/ipp.c:7768
 #, c-format
 msgid "Job #%d is not held!"
 msgstr "Le travail # %d n'est pas tenu!"
@@ -458,12 +475,12 @@ msgstr ""
 "Vous n'êtes pas autorisés à libérer l'identification de travail %d possédée "
 "par \"%s\"!"
 
-#: scheduler/ipp.c:7592 scheduler/ipp.c:7654
+#: scheduler/ipp.c:7592 scheduler/ipp.c:7654 scheduler/ipp.c:7983
 #, c-format
 msgid "Job #%d is not complete!"
 msgstr "Le travail # %d n'est pas complet!"
 
-#: scheduler/ipp.c:7608 scheduler/ipp.c:7670
+#: scheduler/ipp.c:7608 scheduler/ipp.c:7670 scheduler/ipp.c:8001
 #, c-format
 msgid "Job #%d cannot be restarted - no files!"
 msgstr "Le travail # %d ne peuvent pas être remis en marche - aucuns dossiers!"
@@ -483,7 +500,7 @@ msgstr ""
 "possédés par \"%s\"!"
 
 #: scheduler/ipp.c:7883 scheduler/ipp.c:8803 scheduler/ipp.c:7949
-#: scheduler/ipp.c:8883
+#: scheduler/ipp.c:8883 scheduler/ipp.c:8274 scheduler/ipp.c:9225
 #, c-format
 msgid "Bad document-format \"%s\"!"
 msgstr "Mauvais document-format \"%s\"!"
@@ -495,34 +512,35 @@ msgstr ""
 "Vous n'êtes pas autorisés à changer l'identification de travail %d possédée "
 "par \"%s\"!"
 
-#: scheduler/ipp.c:8371 scheduler/ipp.c:8446
+#: scheduler/ipp.c:8371 scheduler/ipp.c:8446 scheduler/ipp.c:8783
 #, c-format
 msgid "%s cannot be changed."
 msgstr "%s ne peut pas être changé."
 
-#: scheduler/ipp.c:8387 scheduler/ipp.c:8462
+#: scheduler/ipp.c:8387 scheduler/ipp.c:8462 scheduler/ipp.c:8799
 msgid "Bad job-priority value!"
 msgstr "Mauvaise valeur de job-priority!"
 
-#: scheduler/ipp.c:8395 scheduler/ipp.c:8470
+#: scheduler/ipp.c:8395 scheduler/ipp.c:8470 scheduler/ipp.c:8807
 msgid "Job is completed and cannot be changed."
 msgstr "Le travail est accompli et ne peut pas être changé."
 
-#: scheduler/ipp.c:8409 scheduler/ipp.c:8484
+#: scheduler/ipp.c:8409 scheduler/ipp.c:8484 scheduler/ipp.c:8821
 msgid "Bad job-state value!"
 msgstr "Mauvaise valeur de job-state!"
 
 #: scheduler/ipp.c:8423 scheduler/ipp.c:8435 scheduler/ipp.c:8446
 #: scheduler/ipp.c:8498 scheduler/ipp.c:8510 scheduler/ipp.c:8521
+#: scheduler/ipp.c:8835 scheduler/ipp.c:8850 scheduler/ipp.c:8861
 msgid "Job state cannot be changed."
 msgstr "L'état du travail ne peut pas être changé."
 
-#: scheduler/ipp.c:8787 scheduler/ipp.c:8867
+#: scheduler/ipp.c:8787 scheduler/ipp.c:8867 scheduler/ipp.c:9209
 #, c-format
 msgid "Unsupported compression attribute %s!"
 msgstr "Attribut non soutenu %s de compression!"
 
-#: scheduler/ipp.c:8815 scheduler/ipp.c:8894
+#: scheduler/ipp.c:8815 scheduler/ipp.c:8894 scheduler/ipp.c:9236
 #, c-format
 msgid "Unsupported format \"%s\"!"
 msgstr "Format non soutenu \"%s\"!"
@@ -552,36 +570,37 @@ msgid "?Invalid help command unknown\n"
 msgstr ""
 
 #: berkeley/lpc.c:478 berkeley/lpc.c:490 berkeley/lpc.c:475 berkeley/lpc.c:487
+#: berkeley/lpc.c:476 berkeley/lpc.c:488
 #, c-format
 msgid "\tprinter is on device '%s' speed -1\n"
 msgstr ""
 
-#: berkeley/lpc.c:496 berkeley/lpc.c:493
+#: berkeley/lpc.c:496 berkeley/lpc.c:493 berkeley/lpc.c:494
 msgid "\tqueuing is enabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:498 berkeley/lpc.c:495
+#: berkeley/lpc.c:498 berkeley/lpc.c:495 berkeley/lpc.c:496
 msgid "\tqueuing is disabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:501 berkeley/lpc.c:498
+#: berkeley/lpc.c:501 berkeley/lpc.c:498 berkeley/lpc.c:499
 msgid "\tprinting is enabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:503 berkeley/lpc.c:500
+#: berkeley/lpc.c:503 berkeley/lpc.c:500 berkeley/lpc.c:501
 msgid "\tprinting is disabled\n"
 msgstr ""
 
-#: berkeley/lpc.c:506 berkeley/lpc.c:503
+#: berkeley/lpc.c:506 berkeley/lpc.c:503 berkeley/lpc.c:504
 msgid "\tno entries\n"
 msgstr ""
 
-#: berkeley/lpc.c:508 berkeley/lpc.c:505
+#: berkeley/lpc.c:508 berkeley/lpc.c:505 berkeley/lpc.c:506
 #, c-format
 msgid "\t%d entries\n"
 msgstr ""
 
-#: berkeley/lpc.c:510 berkeley/lpc.c:507
+#: berkeley/lpc.c:510 berkeley/lpc.c:507 berkeley/lpc.c:508
 msgid "\tdaemon present\n"
 msgstr ""
 
@@ -594,7 +613,7 @@ msgstr ""
 #: systemv/lpadmin.c:284 systemv/lp.c:135 systemv/lpinfo.c:80
 #: systemv/lpmove.c:84 systemv/accept.c:106 systemv/cancel.c:93
 #: systemv/lpmove.c:89 berkeley/lpq.c:124 systemv/lp.c:136
-#: systemv/lpstat.c:116
+#: systemv/lpstat.c:116 berkeley/lpr.c:116 systemv/lp.c:140
 #, c-format
 msgid "%s: Sorry, no encryption support compiled in!\n"
 msgstr ""
@@ -829,7 +848,7 @@ msgid "%s: Unable to connect to server: %s\n"
 msgstr ""
 
 #: systemv/accept.c:217 systemv/accept.c:227 systemv/accept.c:268
-#: systemv/accept.c:278 systemv/accept.c:206
+#: systemv/accept.c:278 systemv/accept.c:206 systemv/accept.c:230
 #, c-format
 msgid "%s: Operation failed: %s\n"
 msgstr ""
@@ -941,79 +960,80 @@ msgid ""
 "  -v               Be verbose (show commands)\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:120
+#: systemv/cupstestppd.c:120 systemv/cupstestppd.c:137
 msgid "cupstestppd: The -q option is incompatible with the -v option.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:136
+#: systemv/cupstestppd.c:136 systemv/cupstestppd.c:153
 msgid "cupstestppd: The -v option is incompatible with the -q option.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:193
+#: systemv/cupstestppd.c:193 systemv/cupstestppd.c:210
 #, fuzzy, c-format
 msgid ""
 " FAIL\n"
 "      **FAIL**  Unable to open PPD file - %s\n"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: systemv/cupstestppd.c:204
+#: systemv/cupstestppd.c:204 systemv/cupstestppd.c:221
 #, c-format
 msgid ""
 " FAIL\n"
 "      **FAIL**  Unable to open PPD file - %s on line %d.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:213
+#: systemv/cupstestppd.c:213 systemv/cupstestppd.c:230
 msgid "                REF: Page 42, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:217
+#: systemv/cupstestppd.c:217 systemv/cupstestppd.c:234
 msgid "                REF: Page 20, section 3.4.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:222
+#: systemv/cupstestppd.c:222 systemv/cupstestppd.c:239
 msgid "                REF: Pages 45-46, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:227
+#: systemv/cupstestppd.c:227 systemv/cupstestppd.c:244
 msgid "                REF: Pages 42-45, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:231
+#: systemv/cupstestppd.c:231 systemv/cupstestppd.c:248
 msgid "                REF: Pages 48-49, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:235
+#: systemv/cupstestppd.c:235 systemv/cupstestppd.c:252
 msgid "                REF: Pages 52-54, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:239
+#: systemv/cupstestppd.c:239 systemv/cupstestppd.c:256
 msgid "                REF: Page 15, section 3.2.\n"
 msgstr ""
 
 #: systemv/cupstestppd.c:243 systemv/cupstestppd.c:247
+#: systemv/cupstestppd.c:260 systemv/cupstestppd.c:264
 msgid "                REF: Page 15, section 3.1.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:251
+#: systemv/cupstestppd.c:251 systemv/cupstestppd.c:268
 msgid "                REF: Pages 16-17, section 3.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:255
+#: systemv/cupstestppd.c:255 systemv/cupstestppd.c:272
 msgid "                REF: Page 19, section 3.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:259
+#: systemv/cupstestppd.c:259 systemv/cupstestppd.c:276
 msgid "                REF: Page 27, section 3.5.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:280
+#: systemv/cupstestppd.c:280 systemv/cupstestppd.c:299
 msgid ""
 "\n"
 "    DETAILED CONFORMANCE TEST RESULTS\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:307
+#: systemv/cupstestppd.c:307 systemv/cupstestppd.c:326
 #, c-format
 msgid "        WARN    %s has no corresponding options!\n"
 msgstr ""
@@ -1033,238 +1053,253 @@ msgstr ""
 #: systemv/cupstestppd.c:781 systemv/cupstestppd.c:801
 #: systemv/cupstestppd.c:832 systemv/cupstestppd.c:854
 #: systemv/cupstestppd.c:902 systemv/cupstestppd.c:931
-#: systemv/cupstestppd.c:952
+#: systemv/cupstestppd.c:952 systemv/cupstestppd.c:337
+#: systemv/cupstestppd.c:352 systemv/cupstestppd.c:373
+#: systemv/cupstestppd.c:388 systemv/cupstestppd.c:416
+#: systemv/cupstestppd.c:436 systemv/cupstestppd.c:458
+#: systemv/cupstestppd.c:478 systemv/cupstestppd.c:498
+#: systemv/cupstestppd.c:518 systemv/cupstestppd.c:536
+#: systemv/cupstestppd.c:554 systemv/cupstestppd.c:594
+#: systemv/cupstestppd.c:614 systemv/cupstestppd.c:634
+#: systemv/cupstestppd.c:654 systemv/cupstestppd.c:674
+#: systemv/cupstestppd.c:692 systemv/cupstestppd.c:709
+#: systemv/cupstestppd.c:731 systemv/cupstestppd.c:749
+#: systemv/cupstestppd.c:766 systemv/cupstestppd.c:784
+#: systemv/cupstestppd.c:800 systemv/cupstestppd.c:820
+#: systemv/cupstestppd.c:851 systemv/cupstestppd.c:873
+#: systemv/cupstestppd.c:921 systemv/cupstestppd.c:950
+#: systemv/cupstestppd.c:971
 msgid " FAIL\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:321
+#: systemv/cupstestppd.c:321 systemv/cupstestppd.c:340
 msgid ""
 "      **FAIL**  REQUIRED DefaultImageableArea\n"
 "                REF: Page 102, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:336
+#: systemv/cupstestppd.c:336 systemv/cupstestppd.c:355
 #, c-format
 msgid ""
 "      **FAIL**  BAD DefaultImageableArea %s!\n"
 "                REF: Page 102, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:346
+#: systemv/cupstestppd.c:346 systemv/cupstestppd.c:365
 msgid "        PASS    DefaultImageableArea\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:357
+#: systemv/cupstestppd.c:357 systemv/cupstestppd.c:376
 msgid ""
 "      **FAIL**  REQUIRED DefaultPaperDimension\n"
 "                REF: Page 103, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:372
+#: systemv/cupstestppd.c:372 systemv/cupstestppd.c:391
 #, c-format
 msgid ""
 "      **FAIL**  BAD DefaultPaperDimension %s!\n"
 "                REF: Page 103, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:380
+#: systemv/cupstestppd.c:380 systemv/cupstestppd.c:399
 msgid "        PASS    DefaultPaperDimension\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:400
+#: systemv/cupstestppd.c:400 systemv/cupstestppd.c:419
 #, c-format
 msgid ""
 "      **FAIL**  BAD Default%s %s\n"
 "                REF: Page 40, section 4.5.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:409
+#: systemv/cupstestppd.c:409 systemv/cupstestppd.c:428
 #, c-format
 msgid "        PASS    Default%s\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:420
+#: systemv/cupstestppd.c:420 systemv/cupstestppd.c:439
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED Default%s\n"
 "                REF: Page 40, section 4.5.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:432
+#: systemv/cupstestppd.c:432 systemv/cupstestppd.c:451
 msgid "        PASS    FileVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:442
+#: systemv/cupstestppd.c:442 systemv/cupstestppd.c:461
 msgid ""
 "      **FAIL**  REQUIRED FileVersion\n"
 "                REF: Page 56, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:452
+#: systemv/cupstestppd.c:452 systemv/cupstestppd.c:471
 msgid "        PASS    FormatVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:462
+#: systemv/cupstestppd.c:462 systemv/cupstestppd.c:481
 msgid ""
 "      **FAIL**  REQUIRED FormatVersion\n"
 "                REF: Page 56, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:472
+#: systemv/cupstestppd.c:472 systemv/cupstestppd.c:491
 msgid "        PASS    LanguageEncoding\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:482
+#: systemv/cupstestppd.c:482 systemv/cupstestppd.c:501
 msgid ""
 "      **FAIL**  REQUIRED LanguageEncoding\n"
 "                REF: Pages 56-57, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:492
+#: systemv/cupstestppd.c:492 systemv/cupstestppd.c:511
 msgid "        PASS    LanguageVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:502
+#: systemv/cupstestppd.c:502 systemv/cupstestppd.c:521
 msgid ""
 "      **FAIL**  REQUIRED LanguageVersion\n"
 "                REF: Pages 57-58, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:520
+#: systemv/cupstestppd.c:520 systemv/cupstestppd.c:539
 msgid ""
 "      **FAIL**  BAD Manufacturer (should be \"HP\")\n"
 "                REF: Page 211, table D.1.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:528
+#: systemv/cupstestppd.c:528 systemv/cupstestppd.c:547
 msgid "        PASS    Manufacturer\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:538
+#: systemv/cupstestppd.c:538 systemv/cupstestppd.c:557
 msgid ""
 "      **FAIL**  REQUIRED Manufacturer\n"
 "                REF: Pages 58-59, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:559
+#: systemv/cupstestppd.c:559 systemv/cupstestppd.c:578
 #, c-format
 msgid ""
 "      **FAIL**  BAD ModelName - \"%c\" not allowed in string.\n"
 "                REF: Pages 59-60, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:568
+#: systemv/cupstestppd.c:568 systemv/cupstestppd.c:587
 msgid "        PASS    ModelName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:578
+#: systemv/cupstestppd.c:578 systemv/cupstestppd.c:597
 msgid ""
 "      **FAIL**  REQUIRED ModelName\n"
 "                REF: Pages 59-60, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:588
+#: systemv/cupstestppd.c:588 systemv/cupstestppd.c:607
 msgid "        PASS    NickName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:598
+#: systemv/cupstestppd.c:598 systemv/cupstestppd.c:617
 msgid ""
 "      **FAIL**  REQUIRED NickName\n"
 "                REF: Page 60, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:608
+#: systemv/cupstestppd.c:608 systemv/cupstestppd.c:627
 msgid "        PASS    PageSize\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:618
+#: systemv/cupstestppd.c:618 systemv/cupstestppd.c:637
 msgid ""
 "      **FAIL**  REQUIRED PageSize\n"
 "                REF: Pages 99-100, section 5.14.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:628
+#: systemv/cupstestppd.c:628 systemv/cupstestppd.c:647
 msgid "        PASS    PageRegion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:638
+#: systemv/cupstestppd.c:638 systemv/cupstestppd.c:657
 msgid ""
 "      **FAIL**  REQUIRED PageRegion\n"
 "                REF: Page 100, section 5.14.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:648
+#: systemv/cupstestppd.c:648 systemv/cupstestppd.c:667
 msgid "        PASS    PCFileName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:658
+#: systemv/cupstestppd.c:658 systemv/cupstestppd.c:677
 msgid ""
 "      **FAIL**  REQUIRED PCFileName\n"
 "                REF: Pages 61-62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:676
+#: systemv/cupstestppd.c:676 systemv/cupstestppd.c:695
 msgid ""
 "      **FAIL**  BAD Product - not \"(string)\".\n"
 "                REF: Page 62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:683
+#: systemv/cupstestppd.c:683 systemv/cupstestppd.c:702
 msgid "        PASS    Product\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:693
+#: systemv/cupstestppd.c:693 systemv/cupstestppd.c:712
 msgid ""
 "      **FAIL**  REQUIRED Product\n"
 "                REF: Page 62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:715
+#: systemv/cupstestppd.c:715 systemv/cupstestppd.c:734
 msgid ""
 "      **FAIL**  BAD PSVersion - not \"(string) int\".\n"
 "                REF: Pages 62-64, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:723
+#: systemv/cupstestppd.c:723 systemv/cupstestppd.c:742
 msgid "        PASS    PSVersion\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:733
+#: systemv/cupstestppd.c:733 systemv/cupstestppd.c:752
 msgid ""
 "      **FAIL**  REQUIRED PSVersion\n"
 "                REF: Pages 62-64, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:750
+#: systemv/cupstestppd.c:750 systemv/cupstestppd.c:769
 msgid ""
 "      **FAIL**  BAD ShortNickName - longer than 31 chars.\n"
 "                REF: Pages 64-65, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:758
+#: systemv/cupstestppd.c:758 systemv/cupstestppd.c:777
 msgid "        PASS    ShortNickName\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:768
+#: systemv/cupstestppd.c:768 systemv/cupstestppd.c:787
 msgid ""
 "      **FAIL**  REQUIRED ShortNickName\n"
 "                REF: Page 64-65, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:784
+#: systemv/cupstestppd.c:784 systemv/cupstestppd.c:803
 msgid ""
 "      **FAIL**  BAD JobPatchFile attribute in file\n"
 "                REF: Page 24, section 3.4.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:804
+#: systemv/cupstestppd.c:804 systemv/cupstestppd.c:823
 msgid ""
 "      **FAIL**  REQUIRED PageSize\n"
 "                REF: Page 41, section 5.\n"
 "                REF: Page 99, section 5.14.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:835
+#: systemv/cupstestppd.c:835 systemv/cupstestppd.c:854
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED ImageableArea for PageSize %s\n"
@@ -1272,7 +1307,7 @@ msgid ""
 "                REF: Page 102, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:857
+#: systemv/cupstestppd.c:857 systemv/cupstestppd.c:876
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED PaperDimension for PageSize %s\n"
@@ -1280,32 +1315,32 @@ msgid ""
 "                REF: Page 103, section 5.15.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:905
+#: systemv/cupstestppd.c:905 systemv/cupstestppd.c:924
 #, c-format
 msgid ""
 "      **FAIL**  Bad %s choice %s!\n"
 "                REF: Page 84, section 5.9\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:934
+#: systemv/cupstestppd.c:934 systemv/cupstestppd.c:953
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED %s does not define choice None!\n"
 "                REF: Page 122, section 5.17\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:955
+#: systemv/cupstestppd.c:955 systemv/cupstestppd.c:974
 #, c-format
 msgid ""
 "      **FAIL**  Bad %s choice %s!\n"
 "                REF: Page 122, section 5.17\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:967
+#: systemv/cupstestppd.c:967 systemv/cupstestppd.c:986
 msgid " PASS\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:976
+#: systemv/cupstestppd.c:976 systemv/cupstestppd.c:997
 #, c-format
 msgid ""
 "        WARN    Duplex option keyword %s should be named Duplex or "
@@ -1313,77 +1348,77 @@ msgid ""
 "                REF: Page 122, section 5.17\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:986
+#: systemv/cupstestppd.c:986 systemv/cupstestppd.c:1007
 msgid "        WARN    Default choices conflicting!\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:994
+#: systemv/cupstestppd.c:994 systemv/cupstestppd.c:1015
 #, c-format
 msgid ""
 "        WARN    Obsolete PPD version %.1f!\n"
 "                REF: Page 42, section 5.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1002
+#: systemv/cupstestppd.c:1002 systemv/cupstestppd.c:1023
 msgid ""
 "        WARN    LanguageEncoding required by PPD 4.3 spec.\n"
 "                REF: Pages 56-57, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1010
+#: systemv/cupstestppd.c:1010 systemv/cupstestppd.c:1031
 msgid ""
 "        WARN    Manufacturer required by PPD 4.3 spec.\n"
 "                REF: Pages 58-59, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1023
+#: systemv/cupstestppd.c:1023 systemv/cupstestppd.c:1044
 msgid ""
 "        WARN    PCFileName longer than 8.3 in violation of PPD spec.\n"
 "                REF: Pages 61-62, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1031
+#: systemv/cupstestppd.c:1031 systemv/cupstestppd.c:1052
 msgid ""
 "        WARN    ShortNickName required by PPD 4.3 spec.\n"
 "                REF: Pages 64-65, section 5.3.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1048
+#: systemv/cupstestppd.c:1048 systemv/cupstestppd.c:1069
 msgid ""
 "        WARN    Protocols contains both PJL and BCP; expected TBCP.\n"
 "                REF: Pages 78-79, section 5.7.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1057
+#: systemv/cupstestppd.c:1057 systemv/cupstestppd.c:1078
 msgid ""
 "        WARN    Protocols contains PJL but JCL attributes are not set.\n"
 "                REF: Pages 78-79, section 5.7.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1085
+#: systemv/cupstestppd.c:1085 systemv/cupstestppd.c:1106
 #, c-format
 msgid ""
 "        WARN    %s shares a common prefix with %s\n"
 "                REF: Page 15, section 3.2.\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1097
+#: systemv/cupstestppd.c:1097 systemv/cupstestppd.c:1118
 #, c-format
 msgid "    %d ERROR%s FOUND\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1100
+#: systemv/cupstestppd.c:1100 systemv/cupstestppd.c:1121
 msgid "    NO ERRORS FOUND\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1360
+#: systemv/cupstestppd.c:1360 systemv/cupstestppd.c:1465
 #, c-format
 msgid ""
 "        WARN    \"%s %s\" conflicts with \"%s %s\"\n"
 "                (constraint=\"%s %s %s %s\")\n"
 msgstr ""
 
-#: systemv/cupstestppd.c:1376
+#: systemv/cupstestppd.c:1376 systemv/cupstestppd.c:1481
 msgid ""
 "Usage: cupstestppd [-q] [-r] [-v[v]] filename1.ppd[.gz] [... filenameN.ppd[."
 "gz]]\n"
@@ -1485,23 +1520,27 @@ msgid "no system default destination\n"
 msgstr ""
 
 #: systemv/lpstat.c:1313 systemv/lpstat.c:1281 systemv/lpstat.c:1309
+#: systemv/lpstat.c:1311
 #, c-format
 msgid "Output for printer %s is sent to remote printer %s on %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1319 systemv/lpstat.c:1323 systemv/lpstat.c:1287
-#: systemv/lpstat.c:1291 systemv/lpstat.c:1315
+#: systemv/lpstat.c:1291 systemv/lpstat.c:1315 systemv/lpstat.c:1317
+#: systemv/lpstat.c:1321
 #, c-format
 msgid "Output for printer %s is sent to %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1331 systemv/lpstat.c:1299 systemv/lpstat.c:1327
+#: systemv/lpstat.c:1329
 #, c-format
 msgid "Output for printer %s/%s is sent to remote printer %s on %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1337 systemv/lpstat.c:1341 systemv/lpstat.c:1305
-#: systemv/lpstat.c:1309 systemv/lpstat.c:1333
+#: systemv/lpstat.c:1309 systemv/lpstat.c:1333 systemv/lpstat.c:1335
+#: systemv/lpstat.c:1339
 #, c-format
 msgid "Output for printer %s/%s is sent to %s\n"
 msgstr ""
@@ -1509,6 +1548,7 @@ msgstr ""
 #: systemv/lpstat.c:1346 systemv/lpstat.c:1349 systemv/lpstat.c:1352
 #: systemv/lpstat.c:1314 systemv/lpstat.c:1317 systemv/lpstat.c:1320
 #: systemv/lpstat.c:1342 systemv/lpstat.c:1345 systemv/lpstat.c:1348
+#: systemv/lpstat.c:1344 systemv/lpstat.c:1347 systemv/lpstat.c:1350
 #, c-format
 msgid "device for %s: %s\n"
 msgstr ""
@@ -1516,6 +1556,7 @@ msgstr ""
 #: systemv/lpstat.c:1359 systemv/lpstat.c:1362 systemv/lpstat.c:1365
 #: systemv/lpstat.c:1327 systemv/lpstat.c:1330 systemv/lpstat.c:1333
 #: systemv/lpstat.c:1355 systemv/lpstat.c:1358 systemv/lpstat.c:1361
+#: systemv/lpstat.c:1357 systemv/lpstat.c:1360 systemv/lpstat.c:1363
 #, c-format
 msgid "device for %s/%s: %s\n"
 msgstr ""
@@ -1526,32 +1567,38 @@ msgid "lpstat: get-jobs failed: %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:1681 systemv/lpstat.c:1635 systemv/lpstat.c:1663
+#: systemv/lpstat.c:1665
 #, c-format
 msgid "\tqueued for %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2037 systemv/lpstat.c:1971 systemv/lpstat.c:1999
+#: systemv/lpstat.c:2001
 #, c-format
 msgid "printer %s is idle.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2042 systemv/lpstat.c:1976 systemv/lpstat.c:2004
+#: systemv/lpstat.c:2006
 #, c-format
 msgid "printer %s now printing %s-%d.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2048 systemv/lpstat.c:1982 systemv/lpstat.c:2010
+#: systemv/lpstat.c:2012
 #, c-format
 msgid "printer %s disabled since %s -\n"
 msgstr ""
 
 #: systemv/lpstat.c:2056 systemv/lpstat.c:2169 systemv/lpstat.c:1990
 #: systemv/lpstat.c:2103 systemv/lpstat.c:2018 systemv/lpstat.c:2131
+#: systemv/lpstat.c:2020 systemv/lpstat.c:2133
 msgid "\treason unknown\n"
 msgstr ""
 
 #: systemv/lpstat.c:2063 systemv/lpstat.c:2176 systemv/lpstat.c:1997
 #: systemv/lpstat.c:2110 systemv/lpstat.c:2025 systemv/lpstat.c:2138
+#: systemv/lpstat.c:2027 systemv/lpstat.c:2140
 msgid ""
 "\tForm mounted:\n"
 "\tContent types: any\n"
@@ -1560,56 +1607,66 @@ msgstr ""
 
 #: systemv/lpstat.c:2069 systemv/lpstat.c:2182 systemv/lpstat.c:2003
 #: systemv/lpstat.c:2116 systemv/lpstat.c:2031 systemv/lpstat.c:2144
+#: systemv/lpstat.c:2033 systemv/lpstat.c:2146
 #, c-format
 msgid "\tDescription: %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2074 systemv/lpstat.c:2187 systemv/lpstat.c:2008
 #: systemv/lpstat.c:2121 systemv/lpstat.c:2036 systemv/lpstat.c:2149
+#: systemv/lpstat.c:2038 systemv/lpstat.c:2151
 msgid "\tAlerts:"
 msgstr ""
 
 #: systemv/lpstat.c:2083 systemv/lpstat.c:2196 systemv/lpstat.c:2017
 #: systemv/lpstat.c:2130 systemv/lpstat.c:2045 systemv/lpstat.c:2158
+#: systemv/lpstat.c:2047 systemv/lpstat.c:2160
 #, c-format
 msgid "\tLocation: %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2088 systemv/lpstat.c:2201 systemv/lpstat.c:2022
 #: systemv/lpstat.c:2135 systemv/lpstat.c:2050 systemv/lpstat.c:2163
+#: systemv/lpstat.c:2052 systemv/lpstat.c:2165
 msgid "\tConnection: remote\n"
 msgstr ""
 
 #: systemv/lpstat.c:2092 systemv/lpstat.c:2205 systemv/lpstat.c:2026
 #: systemv/lpstat.c:2139 systemv/lpstat.c:2054 systemv/lpstat.c:2167
+#: systemv/lpstat.c:2056 systemv/lpstat.c:2169
 #, c-format
 msgid "\tInterface: %s.ppd\n"
 msgstr ""
 
 #: systemv/lpstat.c:2097 systemv/lpstat.c:2210 systemv/lpstat.c:2031
 #: systemv/lpstat.c:2144 systemv/lpstat.c:2059 systemv/lpstat.c:2172
+#: systemv/lpstat.c:2061 systemv/lpstat.c:2174
 msgid "\tConnection: direct\n"
 msgstr ""
 
 #: systemv/lpstat.c:2101 systemv/lpstat.c:2214 systemv/lpstat.c:2035
 #: systemv/lpstat.c:2148 systemv/lpstat.c:2063 systemv/lpstat.c:2176
+#: systemv/lpstat.c:2065 systemv/lpstat.c:2178
 #, c-format
 msgid "\tInterface: %s/interfaces/%s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2105 systemv/lpstat.c:2218 systemv/lpstat.c:2039
 #: systemv/lpstat.c:2152 systemv/lpstat.c:2067 systemv/lpstat.c:2180
+#: systemv/lpstat.c:2069 systemv/lpstat.c:2182
 #, c-format
 msgid "\tInterface: %s/ppd/%s.ppd\n"
 msgstr ""
 
 #: systemv/lpstat.c:2107 systemv/lpstat.c:2220 systemv/lpstat.c:2041
 #: systemv/lpstat.c:2154 systemv/lpstat.c:2069 systemv/lpstat.c:2182
+#: systemv/lpstat.c:2071 systemv/lpstat.c:2184
 msgid "\tOn fault: no alert\n"
 msgstr ""
 
 #: systemv/lpstat.c:2108 systemv/lpstat.c:2221 systemv/lpstat.c:2042
 #: systemv/lpstat.c:2155 systemv/lpstat.c:2070 systemv/lpstat.c:2183
+#: systemv/lpstat.c:2072 systemv/lpstat.c:2185
 msgid "\tAfter fault: continue\n"
 msgstr ""
 
@@ -1617,21 +1674,26 @@ msgstr ""
 #: systemv/lpstat.c:2239 systemv/lpstat.c:2046 systemv/lpstat.c:2060
 #: systemv/lpstat.c:2159 systemv/lpstat.c:2173 systemv/lpstat.c:2074
 #: systemv/lpstat.c:2088 systemv/lpstat.c:2187 systemv/lpstat.c:2201
+#: systemv/lpstat.c:2076 systemv/lpstat.c:2090 systemv/lpstat.c:2189
+#: systemv/lpstat.c:2203
 msgid "\tUsers allowed:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2119 systemv/lpstat.c:2232 systemv/lpstat.c:2053
 #: systemv/lpstat.c:2166 systemv/lpstat.c:2081 systemv/lpstat.c:2194
+#: systemv/lpstat.c:2083 systemv/lpstat.c:2196
 msgid "\tUsers denied:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2127 systemv/lpstat.c:2240 systemv/lpstat.c:2061
 #: systemv/lpstat.c:2174 systemv/lpstat.c:2089 systemv/lpstat.c:2202
+#: systemv/lpstat.c:2091 systemv/lpstat.c:2204
 msgid "\t\t(all)\n"
 msgstr ""
 
 #: systemv/lpstat.c:2129 systemv/lpstat.c:2242 systemv/lpstat.c:2063
 #: systemv/lpstat.c:2176 systemv/lpstat.c:2091 systemv/lpstat.c:2204
+#: systemv/lpstat.c:2093 systemv/lpstat.c:2206
 msgid "\tForms allowed:\n"
 msgstr ""
 
@@ -1639,54 +1701,66 @@ msgstr ""
 #: systemv/lpstat.c:2246 systemv/lpstat.c:2064 systemv/lpstat.c:2067
 #: systemv/lpstat.c:2177 systemv/lpstat.c:2180 systemv/lpstat.c:2092
 #: systemv/lpstat.c:2095 systemv/lpstat.c:2205 systemv/lpstat.c:2208
+#: systemv/lpstat.c:2094 systemv/lpstat.c:2097 systemv/lpstat.c:2207
+#: systemv/lpstat.c:2210
 msgid "\t\t(none)\n"
 msgstr ""
 
 #: systemv/lpstat.c:2131 systemv/lpstat.c:2244 systemv/lpstat.c:2065
 #: systemv/lpstat.c:2178 systemv/lpstat.c:2093 systemv/lpstat.c:2206
+#: systemv/lpstat.c:2095 systemv/lpstat.c:2208
 msgid "\tBanner required\n"
 msgstr ""
 
 #: systemv/lpstat.c:2132 systemv/lpstat.c:2245 systemv/lpstat.c:2066
 #: systemv/lpstat.c:2179 systemv/lpstat.c:2094 systemv/lpstat.c:2207
+#: systemv/lpstat.c:2096 systemv/lpstat.c:2209
 msgid "\tCharset sets:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2134 systemv/lpstat.c:2247 systemv/lpstat.c:2068
 #: systemv/lpstat.c:2181 systemv/lpstat.c:2096 systemv/lpstat.c:2209
+#: systemv/lpstat.c:2098 systemv/lpstat.c:2211
 msgid "\tDefault pitch:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2135 systemv/lpstat.c:2248 systemv/lpstat.c:2069
 #: systemv/lpstat.c:2182 systemv/lpstat.c:2097 systemv/lpstat.c:2210
+#: systemv/lpstat.c:2099 systemv/lpstat.c:2212
 msgid "\tDefault page size:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2136 systemv/lpstat.c:2249 systemv/lpstat.c:2070
 #: systemv/lpstat.c:2183 systemv/lpstat.c:2098 systemv/lpstat.c:2211
+#: systemv/lpstat.c:2100 systemv/lpstat.c:2213
 msgid "\tDefault port settings:\n"
 msgstr ""
 
 #: systemv/lpstat.c:2146 systemv/lpstat.c:2080 systemv/lpstat.c:2108
+#: systemv/lpstat.c:2110
 #, c-format
 msgid "printer %s/%s is idle.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2153 systemv/lpstat.c:2087 systemv/lpstat.c:2115
+#: systemv/lpstat.c:2117
 #, c-format
 msgid "printer %s/%s now printing %s-%d.  enabled since %s\n"
 msgstr ""
 
 #: systemv/lpstat.c:2160 systemv/lpstat.c:2094 systemv/lpstat.c:2122
+#: systemv/lpstat.c:2124
 #, c-format
 msgid "printer %s/%s disabled since %s -\n"
 msgstr ""
 
 #: systemv/lpstat.c:2279 systemv/lpstat.c:2212 systemv/lpstat.c:2240
+#: systemv/lpstat.c:2242
 msgid "scheduler is running\n"
 msgstr ""
 
 #: systemv/lpstat.c:2281 systemv/lpstat.c:2214 systemv/lpstat.c:2242
+#: systemv/lpstat.c:2244
 msgid "scheduler is not running\n"
 msgstr ""
 
@@ -2021,7 +2095,7 @@ msgstr ""
 msgid "lp: unable to print file: %s\n"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: systemv/lp.c:656 systemv/lp.c:653 systemv/lp.c:713
+#: systemv/lp.c:656 systemv/lp.c:653 systemv/lp.c:713 systemv/lp.c:729
 #, c-format
 msgid "request id is %s-%d (%d file(s))\n"
 msgstr ""
@@ -2213,302 +2287,317 @@ msgid ""
 "       lppasswd [-g groupname] -x [username]\n"
 msgstr ""
 
-#: cgi-bin/admin.c:125
+#: cgi-bin/admin.c:125 cgi-bin/admin.c:142
 #, fuzzy
 msgid "Start Printer"
 msgstr "Imprimeur"
 
-#: cgi-bin/admin.c:127
+#: cgi-bin/admin.c:127 cgi-bin/admin.c:144
 #, fuzzy
 msgid "Stop Printer"
 msgstr "Imprimeur"
 
-#: cgi-bin/admin.c:129
+#: cgi-bin/admin.c:129 cgi-bin/admin.c:146
 #, fuzzy
 msgid "Start Class"
 msgstr "Classe"
 
-#: cgi-bin/admin.c:131
+#: cgi-bin/admin.c:131 cgi-bin/admin.c:148
 #, fuzzy
 msgid "Stop Class"
 msgstr "Classe"
 
-#: cgi-bin/admin.c:133
+#: cgi-bin/admin.c:133 cgi-bin/admin.c:150
 msgid "Accept Jobs"
 msgstr ""
 
-#: cgi-bin/admin.c:135
+#: cgi-bin/admin.c:135 cgi-bin/admin.c:152
 msgid "Reject Jobs"
 msgstr ""
 
-#: cgi-bin/admin.c:137
+#: cgi-bin/admin.c:137 cgi-bin/admin.c:154
 msgid "Purge Jobs"
 msgstr ""
 
-#: cgi-bin/admin.c:141
+#: cgi-bin/admin.c:141 cgi-bin/admin.c:158
 msgid "Set As Default"
 msgstr ""
 
 #: cgi-bin/admin.c:168 cgi-bin/admin.c:179 cgi-bin/admin.c:2690
+#: cgi-bin/admin.c:185 cgi-bin/admin.c:196 cgi-bin/admin.c:2734
 msgid "Administration"
 msgstr ""
 
-#: cgi-bin/admin.c:224
+#: cgi-bin/admin.c:224 cgi-bin/admin.c:241
 msgid "Modify Class"
 msgstr ""
 
-#: cgi-bin/admin.c:224
+#: cgi-bin/admin.c:224 cgi-bin/admin.c:241
 #, fuzzy
 msgid "Add Class"
 msgstr "Classe"
 
-#: cgi-bin/admin.c:385
+#: cgi-bin/admin.c:385 cgi-bin/admin.c:402
 msgid ""
 "The class name may only contain up to 127 printable characters and may not "
 "contain spaces, slashes (/), or the pound sign (#)."
 msgstr ""
 
-#: cgi-bin/admin.c:444
+#: cgi-bin/admin.c:444 cgi-bin/admin.c:462
 msgid "Unable to modify class:"
 msgstr ""
 
-#: cgi-bin/admin.c:445
+#: cgi-bin/admin.c:445 cgi-bin/admin.c:463
 msgid "Unable to add class:"
 msgstr ""
 
-#: cgi-bin/admin.c:514
+#: cgi-bin/admin.c:514 cgi-bin/admin.c:532
 #, fuzzy
 msgid "Modify Printer"
 msgstr "Imprimeur"
 
-#: cgi-bin/admin.c:514
+#: cgi-bin/admin.c:514 cgi-bin/admin.c:532
 #, fuzzy
 msgid "Add Printer"
 msgstr "Imprimeur"
 
-#: cgi-bin/admin.c:583
+#: cgi-bin/admin.c:583 cgi-bin/admin.c:602
 msgid ""
 "The printer name may only contain up to 127 printable characters and may not "
 "contain spaces, slashes (/), or the pound sign (#)."
 msgstr ""
 
-#: cgi-bin/admin.c:900
+#: cgi-bin/admin.c:900 cgi-bin/admin.c:930
 msgid "Unable to get list of printer drivers:"
 msgstr ""
 
-#: cgi-bin/admin.c:983
+#: cgi-bin/admin.c:983 cgi-bin/admin.c:1014
 #, fuzzy
 msgid "Unable to modify printer:"
 msgstr "Incapable de copier le dossier de PPD!"
 
-#: cgi-bin/admin.c:984
+#: cgi-bin/admin.c:984 cgi-bin/admin.c:1015
 #, fuzzy
 msgid "Unable to add printer:"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: cgi-bin/admin.c:1051
+#: cgi-bin/admin.c:1051 cgi-bin/admin.c:1082
 msgid "Set Printer Options"
 msgstr ""
 
 #: cgi-bin/admin.c:1062 cgi-bin/admin.c:2330 cgi-bin/admin.c:2391
 #: cgi-bin/admin.c:3112 cgi-bin/admin.c:3213 cgi-bin/admin.c:3449
+#: cgi-bin/admin.c:1095 cgi-bin/admin.c:2374 cgi-bin/admin.c:2435
+#: cgi-bin/admin.c:3156 cgi-bin/admin.c:3258 cgi-bin/admin.c:3496
 #, fuzzy
 msgid "Missing form variable!"
 msgstr "Attributs requis manquants!"
 
-#: cgi-bin/admin.c:1076
+#: cgi-bin/admin.c:1076 cgi-bin/admin.c:1113
 #, fuzzy
 msgid "Unable to get PPD file!"
 msgstr "Incapable de copier le dossier de PPD!"
 
-#: cgi-bin/admin.c:1084
+#: cgi-bin/admin.c:1084 cgi-bin/admin.c:1123
 #, fuzzy
 msgid "Unable to open PPD file:"
 msgstr "Incapable de copier le dossier de PPD!"
 
-#: cgi-bin/admin.c:1241
+#: cgi-bin/admin.c:1241 cgi-bin/admin.c:1282
 msgid "Banners"
 msgstr ""
 
-#: cgi-bin/admin.c:1255
+#: cgi-bin/admin.c:1255 cgi-bin/admin.c:1296
 msgid "Starting Banner"
 msgstr ""
 
-#: cgi-bin/admin.c:1262
+#: cgi-bin/admin.c:1262 cgi-bin/admin.c:1303
 msgid "Ending Banner"
 msgstr ""
 
-#: cgi-bin/admin.c:1280
+#: cgi-bin/admin.c:1280 cgi-bin/admin.c:1321
 msgid "Policies"
 msgstr ""
 
-#: cgi-bin/admin.c:1304
+#: cgi-bin/admin.c:1304 cgi-bin/admin.c:1345
 msgid "Error Policy"
 msgstr ""
 
-#: cgi-bin/admin.c:1331
+#: cgi-bin/admin.c:1331 cgi-bin/admin.c:1372
 msgid "Operation Policy"
 msgstr ""
 
-#: cgi-bin/admin.c:1352 cgi-bin/admin.c:1372
+#: cgi-bin/admin.c:1352 cgi-bin/admin.c:1372 cgi-bin/admin.c:1393
+#: cgi-bin/admin.c:1413
 msgid "PS Binary Protocol"
 msgstr ""
 
-#: cgi-bin/admin.c:1358
+#: cgi-bin/admin.c:1358 cgi-bin/admin.c:1399
 #, fuzzy
 msgid "None"
 msgstr "Non"
 
-#: cgi-bin/admin.c:1490
+#: cgi-bin/admin.c:1490 cgi-bin/admin.c:1534
 msgid "Unable to set options:"
 msgstr ""
 
 #: cgi-bin/admin.c:1591 cgi-bin/admin.c:1607 cgi-bin/admin.c:1620
-#: cgi-bin/admin.c:2099 cgi-bin/admin.c:2106
+#: cgi-bin/admin.c:2099 cgi-bin/admin.c:2106 cgi-bin/admin.c:1635
+#: cgi-bin/admin.c:1651 cgi-bin/admin.c:1664 cgi-bin/admin.c:2143
+#: cgi-bin/admin.c:2150
 msgid "Change Settings"
 msgstr ""
 
 #: cgi-bin/admin.c:1592 cgi-bin/admin.c:1608 cgi-bin/admin.c:1621
+#: cgi-bin/admin.c:1636 cgi-bin/admin.c:1652 cgi-bin/admin.c:1665
 msgid "Unable to change server settings:"
 msgstr ""
 
-#: cgi-bin/admin.c:2097 cgi-bin/admin.c:2190
+#: cgi-bin/admin.c:2097 cgi-bin/admin.c:2190 cgi-bin/admin.c:2141
+#: cgi-bin/admin.c:2234
 msgid "Unable to upload cupsd.conf file:"
 msgstr ""
 
 #: cgi-bin/admin.c:2134 cgi-bin/admin.c:2146 cgi-bin/admin.c:2193
 #: cgi-bin/admin.c:2200 cgi-bin/admin.c:2232 cgi-bin/admin.c:2244
-#: cgi-bin/admin.c:2267
+#: cgi-bin/admin.c:2267 cgi-bin/admin.c:2178 cgi-bin/admin.c:2190
+#: cgi-bin/admin.c:2237 cgi-bin/admin.c:2276 cgi-bin/admin.c:2288
+#: cgi-bin/admin.c:2311
 msgid "Edit Configuration File"
 msgstr ""
 
-#: cgi-bin/admin.c:2135 cgi-bin/admin.c:2147
+#: cgi-bin/admin.c:2135 cgi-bin/admin.c:2147 cgi-bin/admin.c:2179
+#: cgi-bin/admin.c:2191
 #, fuzzy
 msgid "Unable to create temporary file:"
 msgstr "Incapable d'assigner la mémoire pour des types de dossier!"
 
 #: cgi-bin/admin.c:2233 cgi-bin/admin.c:2245 cgi-bin/admin.c:2268
+#: cgi-bin/admin.c:2277 cgi-bin/admin.c:2289 cgi-bin/admin.c:2312
 msgid "Unable to access cupsd.conf file:"
 msgstr ""
 
-#: cgi-bin/admin.c:2247
+#: cgi-bin/admin.c:2247 cgi-bin/admin.c:2291
 msgid "Unable to edit cupsd.conf files larger than 1MB!"
 msgstr ""
 
-#: cgi-bin/admin.c:2316
+#: cgi-bin/admin.c:2316 cgi-bin/admin.c:2360
 msgid "Delete Class"
 msgstr ""
 
-#: cgi-bin/admin.c:2357
+#: cgi-bin/admin.c:2357 cgi-bin/admin.c:2401
 msgid "Unable to delete class:"
 msgstr ""
 
-#: cgi-bin/admin.c:2377
+#: cgi-bin/admin.c:2377 cgi-bin/admin.c:2421
 #, fuzzy
 msgid "Delete Printer"
 msgstr "Imprimeur"
 
-#: cgi-bin/admin.c:2418
+#: cgi-bin/admin.c:2418 cgi-bin/admin.c:2462
 #, fuzzy
 msgid "Unable to delete printer:"
 msgstr "Aucun imprimeur de défaut"
 
-#: cgi-bin/admin.c:2447
+#: cgi-bin/admin.c:2447 cgi-bin/admin.c:2491
 msgid "Export Printers to Samba"
 msgstr ""
 
-#: cgi-bin/admin.c:2515
+#: cgi-bin/admin.c:2515 cgi-bin/admin.c:2559
 #, fuzzy
 msgid "Unable to fork process!"
 msgstr "Incapable de copier le manuscrit d'interface - %s!"
 
-#: cgi-bin/admin.c:2534
+#: cgi-bin/admin.c:2534 cgi-bin/admin.c:2578
 #, fuzzy
 msgid "Unable to connect to server!"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: cgi-bin/admin.c:2538
+#: cgi-bin/admin.c:2538 cgi-bin/admin.c:2582
 #, fuzzy
 msgid "Unable to get printer attributes!"
 msgstr "Incapable de copier le manuscrit d'interface - %s!"
 
-#: cgi-bin/admin.c:2543
+#: cgi-bin/admin.c:2543 cgi-bin/admin.c:2587
 #, fuzzy
 msgid "Unable to convert PPD file!"
 msgstr "Incapable de copier le dossier de PPD!"
 
-#: cgi-bin/admin.c:2547
+#: cgi-bin/admin.c:2547 cgi-bin/admin.c:2591
 #, fuzzy
 msgid "Unable to copy Windows 2000 printer driver files!"
 msgstr "Incapable de copier le manuscrit d'interface - %s!"
 
-#: cgi-bin/admin.c:2552
+#: cgi-bin/admin.c:2552 cgi-bin/admin.c:2596
 msgid "Unable to install Windows 2000 printer driver files!"
 msgstr ""
 
-#: cgi-bin/admin.c:2557
+#: cgi-bin/admin.c:2557 cgi-bin/admin.c:2601
 #, fuzzy
 msgid "Unable to copy Windows 9x printer driver files!"
 msgstr "Incapable de copier le manuscrit d'interface - %s!"
 
-#: cgi-bin/admin.c:2562
+#: cgi-bin/admin.c:2562 cgi-bin/admin.c:2606
 msgid "Unable to install Windows 9x printer driver files!"
 msgstr ""
 
-#: cgi-bin/admin.c:2567
+#: cgi-bin/admin.c:2567 cgi-bin/admin.c:2611
 msgid "Unable to set Windows printer driver!"
 msgstr ""
 
-#: cgi-bin/admin.c:2572
+#: cgi-bin/admin.c:2572 cgi-bin/admin.c:2616
 msgid "No printer drivers found!"
 msgstr ""
 
-#: cgi-bin/admin.c:2576
+#: cgi-bin/admin.c:2576 cgi-bin/admin.c:2620
 msgid "Unable to execute cupsaddsmb command!"
 msgstr ""
 
-#: cgi-bin/admin.c:2582
+#: cgi-bin/admin.c:2582 cgi-bin/admin.c:2626
 #, c-format
 msgid "cupsaddsmb failed with status %d"
 msgstr ""
 
-#: cgi-bin/admin.c:2592
+#: cgi-bin/admin.c:2592 cgi-bin/admin.c:2636
 #, c-format
 msgid "cupsaddsmb crashed on signal %d"
 msgstr ""
 
-#: cgi-bin/admin.c:2608
+#: cgi-bin/admin.c:2608 cgi-bin/admin.c:2652
 msgid "A Samba username is required to export printer drivers!"
 msgstr ""
 
-#: cgi-bin/admin.c:2612
+#: cgi-bin/admin.c:2612 cgi-bin/admin.c:2656
 msgid "A Samba password is required to export printer drivers!"
 msgstr ""
 
-#: cgi-bin/admin.c:2704
+#: cgi-bin/admin.c:2704 cgi-bin/admin.c:2748
 #, fuzzy
 msgid "Unable to open cupsd.conf file:"
 msgstr "Incapable de copier le dossier de PPD!"
 
-#: cgi-bin/admin.c:3144 cgi-bin/admin.c:3400
+#: cgi-bin/admin.c:3144 cgi-bin/admin.c:3400 cgi-bin/admin.c:3189
+#: cgi-bin/admin.c:3447
 msgid "Unable to change printer:"
 msgstr ""
 
 #: cgi-bin/admin.c:3214 cgi-bin/admin.c:3259 cgi-bin/admin.c:3399
-#: cgi-bin/admin.c:3417
+#: cgi-bin/admin.c:3417 cgi-bin/admin.c:3305 cgi-bin/admin.c:3446
+#: cgi-bin/admin.c:3464
 msgid "Set Allowed Users"
 msgstr ""
 
-#: cgi-bin/admin.c:3262
+#: cgi-bin/admin.c:3262 cgi-bin/admin.c:3308
 #, fuzzy
 msgid "Unable to get printer attributes:"
 msgstr "Incapable de copier le manuscrit d'interface - %s!"
 
 #: cgi-bin/admin.c:3450 cgi-bin/admin.c:3488 cgi-bin/admin.c:3506
+#: cgi-bin/admin.c:3497 cgi-bin/admin.c:3536 cgi-bin/admin.c:3554
 msgid "Set Publishing"
 msgstr ""
 
-#: cgi-bin/admin.c:3489
+#: cgi-bin/admin.c:3489 cgi-bin/admin.c:3537
 msgid "Unable to change printer-is-shared attribute:"
 msgstr ""
 
@@ -2517,15 +2606,16 @@ msgstr ""
 msgid "Classes"
 msgstr "Classe"
 
-#: cgi-bin/classes.c:355
+#: cgi-bin/classes.c:355 cgi-bin/classes.c:356
 msgid "Unable to get class list:"
 msgstr ""
 
-#: cgi-bin/classes.c:454
+#: cgi-bin/classes.c:454 cgi-bin/classes.c:455
 msgid "Unable to get class status:"
 msgstr ""
 
 #: cgi-bin/ipp-var.c:366 cgi-bin/ipp-var.c:419 cgi-bin/ipp-var.c:489
+#: cgi-bin/ipp-var.c:490
 msgid "Move Job"
 msgstr ""
 
@@ -2534,23 +2624,23 @@ msgstr ""
 msgid "Unable to find destination for job!"
 msgstr "Incapable d'ajouter le travail pour la destination \"%s\"!"
 
-#: cgi-bin/ipp-var.c:421 cgi-bin/ipp-var.c:491
+#: cgi-bin/ipp-var.c:421 cgi-bin/ipp-var.c:491 cgi-bin/ipp-var.c:492
 msgid "Move All Jobs"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:496
+#: cgi-bin/ipp-var.c:496 cgi-bin/ipp-var.c:497
 msgid "Unable to move job"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:498
+#: cgi-bin/ipp-var.c:498 cgi-bin/ipp-var.c:499
 msgid "Unable to move jobs"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:603
+#: cgi-bin/ipp-var.c:603 cgi-bin/ipp-var.c:605
 msgid "Print Test Page"
 msgstr ""
 
-#: cgi-bin/ipp-var.c:606
+#: cgi-bin/ipp-var.c:606 cgi-bin/ipp-var.c:608
 #, fuzzy
 msgid "Unable to print test page:"
 msgstr "Incapable de copier le dossier de PPD - %s!"
@@ -2563,17 +2653,17 @@ msgstr ""
 msgid "Job operation failed:"
 msgstr ""
 
-#: cgi-bin/printers.c:161 cgi-bin/printers.c:208
+#: cgi-bin/printers.c:161 cgi-bin/printers.c:208 cgi-bin/printers.c:211
 #, fuzzy
 msgid "Printers"
 msgstr "Imprimeur"
 
-#: cgi-bin/printers.c:362
+#: cgi-bin/printers.c:362 cgi-bin/printers.c:366
 #, fuzzy
 msgid "Unable to get printer list:"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: cgi-bin/printers.c:461
+#: cgi-bin/printers.c:461 cgi-bin/printers.c:468
 #, fuzzy
 msgid "Unable to get printer status:"
 msgstr "Incapable de copier le manuscrit d'interface - %s!"
@@ -2676,7 +2766,7 @@ msgstr "Automobile"
 msgid "JCL"
 msgstr ""
 
-#: scheduler/ipp.c:2184
+#: scheduler/ipp.c:2184 scheduler/ipp.c:2226
 msgid "No authentication information provided!"
 msgstr ""
 
@@ -2773,13 +2863,14 @@ msgid "lpc> "
 msgstr ""
 
 #: berkeley/lpq.c:93 systemv/cancel.c:250 systemv/cancel.c:332
+#: systemv/cancel.c:331
 #, fuzzy, c-format
 msgid "%s: Unable to contact server!\n"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
 #: berkeley/lpq.c:138 berkeley/lpr.c:128 berkeley/lprm.c:144
 #: systemv/accept.c:120 systemv/cancel.c:107 systemv/lp.c:150
-#: systemv/lpstat.c:144
+#: systemv/lpstat.c:144 berkeley/lpr.c:130 systemv/lp.c:154
 #, c-format
 msgid "%s: Error - expected username after '-U' option!\n"
 msgstr ""
@@ -2795,7 +2886,7 @@ msgid "%s: Unknown destination \"%s\"!\n"
 msgstr "Incapable d'ajouter le travail pour la destination \"%s\"!"
 
 #: berkeley/lpq.c:201 berkeley/lprm.c:167 systemv/accept.c:146
-#: systemv/cancel.c:135 systemv/lp.c:227 systemv/lpstat.c:300
+#: systemv/cancel.c:135 systemv/lp.c:227 systemv/lpstat.c:300 systemv/lp.c:231
 #, c-format
 msgid "%s: Error - expected hostname after '-h' option!\n"
 msgstr ""
@@ -2816,86 +2907,87 @@ msgid ""
 "Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]\n"
 msgstr ""
 
-#: berkeley/lpr.c:148
+#: berkeley/lpr.c:148 berkeley/lpr.c:150
 #, c-format
 msgid "%s: Error - expected hostname after '-H' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:171
+#: berkeley/lpr.c:171 berkeley/lpr.c:173
 #, c-format
 msgid "%s: Error - expected value after '-%c' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:185
+#: berkeley/lpr.c:185 berkeley/lpr.c:187
 #, c-format
 msgid ""
 "%s: Warning - '%c' format modifier not supported - output may not be "
 "correct!\n"
 msgstr ""
 
-#: berkeley/lpr.c:199
+#: berkeley/lpr.c:199 berkeley/lpr.c:201
 #, c-format
 msgid "%s: error - expected option=value after '-o' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:250
+#: berkeley/lpr.c:250 berkeley/lpr.c:258
 #, c-format
 msgid "%s: Error - expected destination after '-P' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:285
+#: berkeley/lpr.c:285 berkeley/lpr.c:293
 #, c-format
 msgid "%s: Error - expected copy count after '-#' option!\n"
 msgstr ""
 
-#: berkeley/lpr.c:309
+#: berkeley/lpr.c:309 berkeley/lpr.c:317
 #, c-format
 msgid "%s: Error - expected name after '-%c' option!\n"
 msgstr ""
 
 #: berkeley/lpr.c:320 berkeley/lprm.c:179 systemv/accept.c:176
 #: systemv/cancel.c:169 systemv/lp.c:529 systemv/lpstat.c:461
+#: berkeley/lpr.c:328 systemv/lp.c:545
 #, fuzzy, c-format
 msgid "%s: Error - unknown option '%c'!\n"
 msgstr "Incapable d'ajouter le travail pour la destination \"%s\"!"
 
-#: berkeley/lpr.c:333 systemv/lp.c:554
+#: berkeley/lpr.c:333 systemv/lp.c:554 berkeley/lpr.c:341 systemv/lp.c:570
 #, c-format
 msgid "%s: Error - unable to access \"%s\" - %s\n"
 msgstr ""
 
-#: berkeley/lpr.c:351 systemv/lp.c:571
+#: berkeley/lpr.c:351 systemv/lp.c:571 berkeley/lpr.c:359 systemv/lp.c:587
 #, c-format
 msgid "%s: Error - too many files - \"%s\"\n"
 msgstr ""
 
-#: berkeley/lpr.c:393 systemv/lp.c:621
+#: berkeley/lpr.c:393 systemv/lp.c:621 berkeley/lpr.c:401 systemv/lp.c:637
 #, c-format
 msgid ""
 "%s: Error - %s environment variable names non-existent destination \"%s\"!\n"
 msgstr ""
 
-#: berkeley/lpr.c:398 systemv/lp.c:626
+#: berkeley/lpr.c:398 systemv/lp.c:626 berkeley/lpr.c:406 systemv/lp.c:642
 #, c-format
 msgid "%s: Error - no default destination available.\n"
 msgstr ""
 
-#: berkeley/lpr.c:402 systemv/lp.c:630
+#: berkeley/lpr.c:402 systemv/lp.c:630 berkeley/lpr.c:410 systemv/lp.c:646
 #, c-format
 msgid "%s: Error - scheduler not responding!\n"
 msgstr ""
 
-#: berkeley/lpr.c:452 systemv/lp.c:670
+#: berkeley/lpr.c:452 systemv/lp.c:670 berkeley/lpr.c:460 systemv/lp.c:686
 #, fuzzy, c-format
 msgid "%s: Error - unable to create temporary file \"%s\" - %s\n"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: berkeley/lpr.c:462 systemv/lp.c:679
+#: berkeley/lpr.c:462 systemv/lp.c:679 berkeley/lpr.c:470 systemv/lp.c:695
 #, fuzzy, c-format
 msgid "%s: Error - unable to write to temporary file \"%s\" - %s\n"
 msgstr "Incapable de copier le dossier de PPD - %s!"
 
-#: berkeley/lpr.c:476 systemv/lp.c:693
+#: berkeley/lpr.c:476 systemv/lp.c:693 berkeley/lpr.c:484 systemv/lp.c:709
 #, c-format
 msgid "%s: Error - stdin is empty, so no job has been sent.\n"
 msgstr ""
@@ -2915,112 +3007,112 @@ msgstr ""
 msgid "%s: Error - expected username after '-u' option!\n"
 msgstr ""
 
-#: systemv/cancel.c:308 systemv/cancel.c:373
+#: systemv/cancel.c:308 systemv/cancel.c:373 systemv/cancel.c:372
 #, c-format
 msgid "%s: %s failed: %s\n"
 msgstr ""
 
-#: systemv/lp.c:173
+#: systemv/lp.c:173 systemv/lp.c:177
 #, c-format
 msgid "%s: Error - expected destination after '-d' option!\n"
 msgstr ""
 
-#: systemv/lp.c:206
+#: systemv/lp.c:206 systemv/lp.c:210
 #, c-format
 msgid "%s: Error - expected form after '-f' option!\n"
 msgstr ""
 
-#: systemv/lp.c:213
+#: systemv/lp.c:213 systemv/lp.c:217
 #, c-format
 msgid "%s: Warning - form option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:247
+#: systemv/lp.c:247 systemv/lp.c:251
 #, c-format
 msgid "%s: Expected job ID after '-i' option!\n"
 msgstr ""
 
-#: systemv/lp.c:258
+#: systemv/lp.c:258 systemv/lp.c:262
 #, c-format
 msgid "%s: Error - cannot print files and alter jobs simultaneously!\n"
 msgstr ""
 
-#: systemv/lp.c:271
+#: systemv/lp.c:271 systemv/lp.c:275
 #, c-format
 msgid "%s: Error - bad job ID!\n"
 msgstr ""
 
-#: systemv/lp.c:296
+#: systemv/lp.c:296 systemv/lp.c:308
 #, c-format
 msgid "%s: Error - expected copies after '-n' option!\n"
 msgstr ""
 
-#: systemv/lp.c:319
+#: systemv/lp.c:319 systemv/lp.c:331
 #, c-format
 msgid "%s: Error - expected option string after '-o' option!\n"
 msgstr ""
 
-#: systemv/lp.c:340
+#: systemv/lp.c:340 systemv/lp.c:352
 #, c-format
 msgid "%s: Error - expected priority after '-%c' option!\n"
 msgstr ""
 
-#: systemv/lp.c:363
+#: systemv/lp.c:363 systemv/lp.c:375
 #, c-format
 msgid "%s: Error - priority must be between 1 and 100.\n"
 msgstr ""
 
-#: systemv/lp.c:387
+#: systemv/lp.c:387 systemv/lp.c:399
 #, c-format
 msgid "%s: Error - expected title after '-t' option!\n"
 msgstr ""
 
-#: systemv/lp.c:405
+#: systemv/lp.c:405 systemv/lp.c:417
 #, c-format
 msgid "%s: Error - expected mode list after '-y' option!\n"
 msgstr ""
 
-#: systemv/lp.c:413
+#: systemv/lp.c:413 systemv/lp.c:425
 #, c-format
 msgid "%s: Warning - mode option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:427
+#: systemv/lp.c:427 systemv/lp.c:439
 #, c-format
 msgid "%s: Error - expected hold name after '-H' option!\n"
 msgstr ""
 
-#: systemv/lp.c:451
+#: systemv/lp.c:451 systemv/lp.c:463
 #, c-format
 msgid "%s: Need job ID ('-i jobid') before '-H restart'!\n"
 msgstr ""
 
-#: systemv/lp.c:475
+#: systemv/lp.c:475 systemv/lp.c:487
 #, c-format
 msgid "%s: Error - expected page list after '-P' option!\n"
 msgstr ""
 
-#: systemv/lp.c:496
+#: systemv/lp.c:496 systemv/lp.c:508
 #, c-format
 msgid "%s: Error - expected character set after '-S' option!\n"
 msgstr ""
 
-#: systemv/lp.c:504
+#: systemv/lp.c:504 systemv/lp.c:516
 #, c-format
 msgid "%s: Warning - character set option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:516
+#: systemv/lp.c:516 systemv/lp.c:528
 #, c-format
 msgid "%s: Error - expected content type after '-T' option!\n"
 msgstr ""
 
-#: systemv/lp.c:524
+#: systemv/lp.c:524 systemv/lp.c:536
 #, c-format
 msgid "%s: Warning - content type option ignored!\n"
 msgstr ""
 
-#: systemv/lp.c:538
+#: systemv/lp.c:538 systemv/lp.c:554
 #, c-format
 msgid ""
 "%s: Error - cannot print from stdin if files or a job ID are provided!\n"
@@ -3047,3 +3139,107 @@ msgstr ""
 #, fuzzy, c-format
 msgid "%s: Unable to connect to server\n"
 msgstr "Incapable de copier le dossier de PPD - %s!"
+
+#: cups/notify.c:91
+msgid "Print Job:"
+msgstr ""
+
+#: cups/notify.c:96
+msgid "pending"
+msgstr ""
+
+#: cups/notify.c:99
+msgid "held"
+msgstr ""
+
+#: cups/notify.c:102 cups/notify.c:143
+msgid "processing"
+msgstr ""
+
+#: cups/notify.c:105 cups/notify.c:146
+msgid "stopped"
+msgstr ""
+
+#: cups/notify.c:108
+msgid "canceled"
+msgstr ""
+
+#: cups/notify.c:111
+msgid "aborted"
+msgstr ""
+
+#: cups/notify.c:114
+msgid "completed"
+msgstr ""
+
+#: cups/notify.c:117 cups/notify.c:149
+msgid "unknown"
+msgstr ""
+
+#: cups/notify.c:126
+msgid "untitled"
+msgstr ""
+
+#: cups/notify.c:135
+#, fuzzy
+msgid "Printer:"
+msgstr "Imprimeur"
+
+#: cups/notify.c:140
+msgid "idle"
+msgstr ""
+
+#: scheduler/ipp.c:5513
+#, fuzzy
+msgid "Missing notify-subscription-ids attribute!"
+msgstr "Attribut absent de requesting-user-name!"
+
+#: scheduler/ipp.c:7851
+#, fuzzy
+msgid "Job subscriptions cannot be renewed!"
+msgstr "Aucuns attributs d'abonnement dans la demande!"
+
+#: scheduler/main.c:163
+msgid "cupsd: Expected config filename after \"-c\" option!\n"
+msgstr ""
+
+#: scheduler/main.c:218
+msgid "cupsd: launchd(8) support not compiled in, running in normal mode.\n"
+msgstr ""
+
+#: scheduler/main.c:225
+#, fuzzy, c-format
+msgid "cupsd: Unknown option \"%c\" - aborting!\n"
+msgstr "Incapable d'ajouter le travail pour la destination \"%s\"!"
+
+#: scheduler/main.c:232
+#, fuzzy, c-format
+msgid "cupsd: Unknown argument \"%s\" - aborting!\n"
+msgstr "Incapable d'ajouter le travail pour la destination \"%s\"!"
+
+#: scheduler/main.c:2315
+msgid ""
+"Usage: cupsd [-c config-file] [-f] [-F] [-h] [-l]\n"
+"\n"
+"-c config-file      Load alternate configuration file\n"
+"-f                  Run in the foreground\n"
+"-F                  Run in the foreground but detach\n"
+"-h                  Show this usage message\n"
+"-l                  Run cupsd from launchd(8)\n"
+msgstr ""
+
+#: systemv/cupstestppd.c:1343
+#, c-format
+msgid "        WARN    Line %d only contains whitespace!\n"
+msgstr ""
+
+#: systemv/cupstestppd.c:1361
+msgid ""
+"        WARN    File contains a mix of CR, LF, and CR LF line endings!\n"
+msgstr ""
+
+#: systemv/cupstestppd.c:1366
+msgid ""
+"        WARN    Non-Windows PPD files should use lines ending with only LF, "
+"not CR LF!\n"
+msgstr ""
index d7d78e5c4fa173cba03bcea8ecf641b0d977a14f..b05ac29665738e692ce1977644d6a0dff508d0cb 100644 (file)
 #       EMail: cups-info@cups.org
 #         WWW: http://www.cups.org
 #
-
-
-
 msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2006-01-18 22:26-0500\n"
-"PO-Revision-Date: 2006-01-21 11:31+0900\n"
+"POT-Creation-Date: 2006-02-15 19:50-0500\n"
+"PO-Revision-Date: 2006-02-17 11:17+0900\n"
 "Last-Translator: Kenshi Muto <kmuto@debian.org>\n"
 "Language-Team: Japanese <LL@li.org>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: cgi-bin/admin.c:1276 cgi-bin/admin.c:1154
+#: cgi-bin/admin.c:1276 cgi-bin/admin.c:1154 cgi-bin/admin.c:1195
 msgid "Options Installed"
 msgstr "インストールされたオプション"
 
@@ -93,33 +90,37 @@ msgstr "いいえ"
 msgid "Auto"
 msgstr "自動"
 
-#: scheduler/client.c:2247 scheduler/client.c:2251
-msgid "Enter your username and password or the root username and password to access this page."
-msgstr "このページにアクセスするために、あなたのユーザ名とパスワード、あるいは root のユーザ名とパスワードを入力してください。"
+#: scheduler/client.c:2247 scheduler/client.c:2251 scheduler/client.c:2274
+msgid ""
+"Enter your username and password or the root username and password to access "
+"this page."
+msgstr ""
+"このページにアクセスするために、あなたのユーザ名とパスワード、あるいは root "
+"のユーザ名とパスワードを入力してください。"
 
-#: scheduler/client.c:2252 scheduler/client.c:2256
+#: scheduler/client.c:2252 scheduler/client.c:2256 scheduler/client.c:2279
 msgid "You must use a https: URL to access this page."
 msgstr "このページにアクセスするためには、https: URL を使う必要があります。"
 
-#: scheduler/ipp.c:236 scheduler/ipp.c:244
+#: scheduler/ipp.c:236 scheduler/ipp.c:244 scheduler/ipp.c:246
 #, c-format
 msgid "Bad request version number %d.%d!"
 msgstr "バージョン番号 %d.%d は無効なリクエストです!"
 
-#: scheduler/ipp.c:246 scheduler/ipp.c:254
+#: scheduler/ipp.c:246 scheduler/ipp.c:254 scheduler/ipp.c:256
 msgid "No attributes in request!"
 msgstr "リクエストに属性がありません!"
 
-#: scheduler/ipp.c:269 scheduler/ipp.c:277
+#: scheduler/ipp.c:269 scheduler/ipp.c:277 scheduler/ipp.c:279
 #, c-format
 msgid "Attribute groups are out of order (%x < %x)!"
 msgstr "属性グループは範囲外です (%x < %x)!"
 
-#: scheduler/ipp.c:379 scheduler/ipp.c:389
+#: scheduler/ipp.c:379 scheduler/ipp.c:389 scheduler/ipp.c:391
 msgid "Missing required attributes!"
 msgstr "必須の属性が設定されていません!"
 
-#: scheduler/ipp.c:575 scheduler/ipp.c:585
+#: scheduler/ipp.c:575 scheduler/ipp.c:585 scheduler/ipp.c:591
 #, c-format
 msgid "%s not supported!"
 msgstr "%s はサポートされていません!"
@@ -135,116 +136,135 @@ msgstr "%s はサポートされていません!"
 #: scheduler/ipp.c:5237 scheduler/ipp.c:5526 scheduler/ipp.c:5834
 #: scheduler/ipp.c:6113 scheduler/ipp.c:6155 scheduler/ipp.c:6657
 #: scheduler/ipp.c:7365 scheduler/ipp.c:8251 scheduler/ipp.c:8662
-#: scheduler/ipp.c:8742 scheduler/ipp.c:8917
+#: scheduler/ipp.c:8742 scheduler/ipp.c:8917 scheduler/ipp.c:702
+#: scheduler/ipp.c:1093 scheduler/ipp.c:2357 scheduler/ipp.c:2472
+#: scheduler/ipp.c:3993 scheduler/ipp.c:4730 scheduler/ipp.c:4973
+#: scheduler/ipp.c:5357 scheduler/ipp.c:5769 scheduler/ipp.c:6077
+#: scheduler/ipp.c:6368 scheduler/ipp.c:6410 scheduler/ipp.c:6916
+#: scheduler/ipp.c:7626 scheduler/ipp.c:8589 scheduler/ipp.c:9003
+#: scheduler/ipp.c:9084 scheduler/ipp.c:9259
 msgid "The printer or class was not found."
 msgstr "プリンタまたはクラスが見つかりませんでした。"
 
-#: scheduler/ipp.c:762 scheduler/ipp.c:777
-msgid "The printer-uri must be of the form \"ipp://HOSTNAME/classes/CLASSNAME\"."
-msgstr "printer-uri は、\"ipp://ホスト名/classes/クラス名\" 形式でなければなりません。"
+#: scheduler/ipp.c:762 scheduler/ipp.c:777 scheduler/ipp.c:784
+msgid ""
+"The printer-uri must be of the form \"ipp://HOSTNAME/classes/CLASSNAME\"."
+msgstr ""
+"printer-uri は、\"ipp://ホスト名/classes/クラス名\" 形式でなければなりませ"
+"ん。"
 
 #: scheduler/ipp.c:778 scheduler/ipp.c:1454 scheduler/ipp.c:793
-#: scheduler/ipp.c:1482
+#: scheduler/ipp.c:1482 scheduler/ipp.c:800 scheduler/ipp.c:1515
 #, c-format
 msgid "The printer-uri \"%s\" contains invalid characters."
 msgstr "printer-uri \"%s\" には、無効な文字が含まれています。"
 
-#: scheduler/ipp.c:811 scheduler/ipp.c:826
+#: scheduler/ipp.c:811 scheduler/ipp.c:826 scheduler/ipp.c:833
 #, c-format
 msgid "A printer named \"%s\" already exists!"
 msgstr "プリンタ名 \"%s\" はすでに存在します!"
 
-#: scheduler/ipp.c:904 scheduler/ipp.c:924
+#: scheduler/ipp.c:904 scheduler/ipp.c:924 scheduler/ipp.c:933
 #, c-format
 msgid "Attempt to set %s printer-state to bad value %d!"
 msgstr "%s printer-state に 不正な値 %d を設定しようとしています!"
 
-#: scheduler/ipp.c:1000 scheduler/ipp.c:1022
+#: scheduler/ipp.c:1000 scheduler/ipp.c:1022 scheduler/ipp.c:1034
 #, c-format
 msgid "add_class: Unknown printer-op-policy \"%s\"."
 msgstr "add_class: \"%s\" は未知の printer-op-policy です。"
 
-#: scheduler/ipp.c:1013 scheduler/ipp.c:1035
+#: scheduler/ipp.c:1013 scheduler/ipp.c:1035 scheduler/ipp.c:1047
 #, c-format
 msgid "add_class: Unknown printer-error-policy \"%s\"."
 msgstr "add_class: \"%s\" は未知の printer-error-policy です。"
 
-#: scheduler/ipp.c:1144 scheduler/ipp.c:1168
+#: scheduler/ipp.c:1144 scheduler/ipp.c:1168 scheduler/ipp.c:1200
 msgid "Unable to allocate memory for file types!"
 msgstr "ファイルタイプ用にメモリを割り当てられません!"
 
 #: scheduler/ipp.c:1290 scheduler/ipp.c:4501 scheduler/ipp.c:1316
-#: scheduler/ipp.c:4705
+#: scheduler/ipp.c:4705 scheduler/ipp.c:1348 scheduler/ipp.c:4804
 #, c-format
 msgid "Character set \"%s\" not supported!"
 msgstr "文字セット \"%s\" はサポートされていません!"
 
 #: scheduler/ipp.c:1299 scheduler/ipp.c:4510 scheduler/ipp.c:1325
-#: scheduler/ipp.c:4714
+#: scheduler/ipp.c:4714 scheduler/ipp.c:1357 scheduler/ipp.c:4813
 #, c-format
 msgid "Language \"%s\" not supported!"
 msgstr "言語 \"%s\" はサポートされていません!"
 
 #: scheduler/ipp.c:1309 scheduler/ipp.c:4520 scheduler/ipp.c:1335
-#: scheduler/ipp.c:4724
+#: scheduler/ipp.c:4724 scheduler/ipp.c:1367 scheduler/ipp.c:4823
 #, c-format
 msgid "The notify-user-data value is too large (%d > 63 octets)!"
 msgstr "notify-user-data 値が大きすぎます (%d > 63 オクテット)!"
 
-#: scheduler/ipp.c:1326 scheduler/ipp.c:1352
-msgid "The notify-lease-duration attribute cannot be used with job subscriptions."
-msgstr "notify-lease-duration 属性は、ジョブサブスクリプションと一緒に使うことはできません。"
+#: scheduler/ipp.c:1326 scheduler/ipp.c:1352 scheduler/ipp.c:1384
+msgid ""
+"The notify-lease-duration attribute cannot be used with job subscriptions."
+msgstr ""
+"notify-lease-duration 属性は、ジョブサブスクリプションと一緒に使うことはでき"
+"ません。"
 
-#: scheduler/ipp.c:1438 scheduler/ipp.c:1466
-msgid "The printer-uri must be of the form \"ipp://HOSTNAME/printers/PRINTERNAME\"."
-msgstr "printer-uri は \"ipp://ホスト名/printers/プリンタ名\" 形式でなければなりません。"
+#: scheduler/ipp.c:1438 scheduler/ipp.c:1466 scheduler/ipp.c:1499
+msgid ""
+"The printer-uri must be of the form \"ipp://HOSTNAME/printers/PRINTERNAME\"."
+msgstr ""
+"printer-uri は \"ipp://ホスト名/printers/プリンタ名\" 形式でなければなりませ"
+"ん。"
 
-#: scheduler/ipp.c:1487 scheduler/ipp.c:1515
+#: scheduler/ipp.c:1487 scheduler/ipp.c:1515 scheduler/ipp.c:1548
 #, c-format
 msgid "A class named \"%s\" already exists!"
 msgstr "クラス名 \"%s\" はすでに存在します!"
 
-#: scheduler/ipp.c:1575 scheduler/ipp.c:1607
+#: scheduler/ipp.c:1575 scheduler/ipp.c:1607 scheduler/ipp.c:1644
 #, c-format
-msgid "File device URIs have been disabled! To enable, see the FileDevice directive in \"%s/cupsd.conf\"."
-msgstr "ファイルデバイス URI は無効になっています! 有効にするために、\"%s/cupsd.conf\" の FileDevice ディレクティブを確認してください。"
+msgid ""
+"File device URIs have been disabled! To enable, see the FileDevice directive "
+"in \"%s/cupsd.conf\"."
+msgstr ""
+"ファイルデバイス URI は無効になっています! 有効にするために、\"%s/cupsd.conf"
+"\" の FileDevice ディレクティブを確認してください。"
 
-#: scheduler/ipp.c:1595 scheduler/ipp.c:1627
+#: scheduler/ipp.c:1595 scheduler/ipp.c:1627 scheduler/ipp.c:1664
 #, c-format
 msgid "Bad device-uri \"%s\"!"
 msgstr "\"%s\" は無効な device-uri です!"
 
-#: scheduler/ipp.c:1626 scheduler/ipp.c:1659
+#: scheduler/ipp.c:1626 scheduler/ipp.c:1659 scheduler/ipp.c:1698
 #, c-format
 msgid "Bad port-monitor \"%s\"!"
 msgstr "\"%s\" は無効な port-monitor です!"
 
-#: scheduler/ipp.c:1669 scheduler/ipp.c:1705
+#: scheduler/ipp.c:1669 scheduler/ipp.c:1705 scheduler/ipp.c:1744
 #, c-format
 msgid "Bad printer-state value %d!"
 msgstr "%d は無効な printer-state 値です!"
 
-#: scheduler/ipp.c:1762 scheduler/ipp.c:1800
+#: scheduler/ipp.c:1762 scheduler/ipp.c:1800 scheduler/ipp.c:1842
 #, c-format
 msgid "Unknown printer-op-policy \"%s\"."
 msgstr "\"%s\" は未知の printer-op-policy です。"
 
-#: scheduler/ipp.c:1775 scheduler/ipp.c:1813
+#: scheduler/ipp.c:1775 scheduler/ipp.c:1813 scheduler/ipp.c:1855
 #, c-format
 msgid "Unknown printer-error-policy \"%s\"."
 msgstr "\"%s\" は未知の printer-error-policy です。"
 
-#: scheduler/ipp.c:1837 scheduler/ipp.c:1875
+#: scheduler/ipp.c:1837 scheduler/ipp.c:1875 scheduler/ipp.c:1919
 #, c-format
 msgid "Unable to copy interface script - %s!"
 msgstr "インターフェイススクリプトをコピーできません - %s!"
 
-#: scheduler/ipp.c:1862 scheduler/ipp.c:1900
+#: scheduler/ipp.c:1862 scheduler/ipp.c:1900 scheduler/ipp.c:1944
 #, c-format
 msgid "Unable to copy PPD file - %s!"
 msgstr " PPD ファイルをコピーできません - %s!"
 
-#: scheduler/ipp.c:1915 scheduler/ipp.c:1954
+#: scheduler/ipp.c:1915 scheduler/ipp.c:1954 scheduler/ipp.c:2000
 msgid "Unable to copy PPD file!"
 msgstr "PPD ファイルをコピーできません!"
 
@@ -253,7 +273,10 @@ msgstr "PPD ファイルをコピーできません!"
 #: scheduler/ipp.c:7538 scheduler/ipp.c:7776 scheduler/ipp.c:8261
 #: scheduler/ipp.c:2116 scheduler/ipp.c:2412 scheduler/ipp.c:5102
 #: scheduler/ipp.c:5955 scheduler/ipp.c:7452 scheduler/ipp.c:7599
-#: scheduler/ipp.c:7839 scheduler/ipp.c:8334
+#: scheduler/ipp.c:7839 scheduler/ipp.c:8334 scheduler/ipp.c:2158
+#: scheduler/ipp.c:2451 scheduler/ipp.c:5220 scheduler/ipp.c:6210
+#: scheduler/ipp.c:7713 scheduler/ipp.c:7928 scheduler/ipp.c:8167
+#: scheduler/ipp.c:8672
 msgid "Got a printer-uri attribute but no job-id!"
 msgstr "printer-uri 属性を取得しましたが、job-id を取得できませんでした!"
 
@@ -263,6 +286,9 @@ msgstr "printer-uri 属性を取得しましたが、job-id を取得できま
 #: scheduler/ipp.c:2138 scheduler/ipp.c:2484 scheduler/ipp.c:5125
 #: scheduler/ipp.c:5978 scheduler/ipp.c:6201 scheduler/ipp.c:7475
 #: scheduler/ipp.c:7622 scheduler/ipp.c:7862 scheduler/ipp.c:8357
+#: scheduler/ipp.c:2180 scheduler/ipp.c:2523 scheduler/ipp.c:5243
+#: scheduler/ipp.c:6233 scheduler/ipp.c:6456 scheduler/ipp.c:7736
+#: scheduler/ipp.c:7951 scheduler/ipp.c:8190 scheduler/ipp.c:8695
 #, c-format
 msgid "Bad job-uri attribute \"%s\"!"
 msgstr "\"%s\" は無効な job-uri 属性です!"
@@ -274,7 +300,7 @@ msgstr "\"%s\" は無効な job-uri 属性です!"
 msgid "Job #%d doesn't exist!"
 msgstr "ジョブ #%d は存在しません!"
 
-#: scheduler/ipp.c:2131 scheduler/ipp.c:2172
+#: scheduler/ipp.c:2131 scheduler/ipp.c:2172 scheduler/ipp.c:2214
 #, c-format
 msgid "Job #%d is not held for authentication!"
 msgstr "ジョブ #%d は認証が行われていません!"
@@ -282,22 +308,24 @@ msgstr "ジョブ #%d は認証が行われていません!"
 #: scheduler/ipp.c:2153 scheduler/ipp.c:2195
 #, c-format
 msgid "You are not authorized to authenticate job #%d owned by \"%s\"!"
-msgstr "あなたは \"%2$s\" の所有しているジョブ #%1$d を証明することを許可されていません!"
+msgstr ""
+"あなたは \"%2$s\" の所有しているジョブ #%1$d を証明することを許可されていませ"
+"ん!"
 
-#: scheduler/ipp.c:2221 scheduler/ipp.c:2264
+#: scheduler/ipp.c:2221 scheduler/ipp.c:2264 scheduler/ipp.c:2303
 msgid "The printer-uri attribute is required!"
 msgstr "printer-uri 属性は必須です!"
 
-#: scheduler/ipp.c:2238 scheduler/ipp.c:2283
+#: scheduler/ipp.c:2238 scheduler/ipp.c:2283 scheduler/ipp.c:2322
 msgid "Missing requesting-user-name attribute!"
 msgstr "requesting-user-name 属性が設定されていません!"
 
-#: scheduler/ipp.c:2277 scheduler/ipp.c:2324
+#: scheduler/ipp.c:2277 scheduler/ipp.c:2324 scheduler/ipp.c:2363
 #, c-format
 msgid "The printer-uri \"%s\" is not valid."
 msgstr "printer-uri \"%s\" は有効ではありません。"
 
-#: scheduler/ipp.c:2410 scheduler/ipp.c:2460
+#: scheduler/ipp.c:2410 scheduler/ipp.c:2460 scheduler/ipp.c:2499
 #, c-format
 msgid "No active jobs on %s!"
 msgstr "%s にはアクティブなジョブはありません!"
@@ -305,85 +333,88 @@ msgstr "%s にはアクティブなジョブはありません!"
 #: scheduler/ipp.c:2462 scheduler/ipp.c:2513
 #, c-format
 msgid "You are not authorized to delete job #%d owned by \"%s\"!"
-msgstr "あなたは \"%2$s\" の所有しているジョブ #%1$d を削除することを許可されていません!"
+msgstr ""
+"あなたは \"%2$s\" の所有しているジョブ #%1$d を削除することを許可されていませ"
+"ん!"
 
-#: scheduler/ipp.c:2476 scheduler/ipp.c:2527
+#: scheduler/ipp.c:2476 scheduler/ipp.c:2527 scheduler/ipp.c:2563
 #, c-format
 msgid "Job #%d is already %s - can't cancel."
 msgstr "ジョブ #%d はすでに %s です - キャンセルできません。"
 
-#: scheduler/ipp.c:3720 scheduler/ipp.c:3914
+#: scheduler/ipp.c:3720 scheduler/ipp.c:3914 scheduler/ipp.c:4006
 msgid "The printer or class is not shared!"
 msgstr "プリンタまたはクラスは共有できません!"
 
 #: scheduler/ipp.c:3746 scheduler/ipp.c:6647 scheduler/ipp.c:3940
-#: scheduler/ipp.c:6695
+#: scheduler/ipp.c:6695 scheduler/ipp.c:4032 scheduler/ipp.c:6954
 #, c-format
 msgid "Destination \"%s\" is not accepting jobs."
 msgstr "宛先 \"%s\" はジョブを受け付けていません。"
 
 #: scheduler/ipp.c:3759 scheduler/ipp.c:6443 scheduler/ipp.c:3954
-#: scheduler/ipp.c:6487
+#: scheduler/ipp.c:6487 scheduler/ipp.c:4046 scheduler/ipp.c:6739
 #, c-format
 msgid "Bad copies value %d."
 msgstr "%d は不正なコピー値です。"
 
 #: scheduler/ipp.c:3775 scheduler/ipp.c:6459 scheduler/ipp.c:3971
-#: scheduler/ipp.c:6504
+#: scheduler/ipp.c:6504 scheduler/ipp.c:4063 scheduler/ipp.c:6756
 #, c-format
 msgid "Bad page-ranges values %d-%d."
 msgstr "%d-%d は不正な page-ranges 値です。"
 
-#: scheduler/ipp.c:3795 scheduler/ipp.c:3991
+#: scheduler/ipp.c:3795 scheduler/ipp.c:3991 scheduler/ipp.c:4083
 msgid "Too many active jobs."
 msgstr "アクティブなジョブが多すぎます。"
 
 #: scheduler/ipp.c:3801 scheduler/ipp.c:6668 scheduler/ipp.c:3997
-#: scheduler/ipp.c:6716
+#: scheduler/ipp.c:6716 scheduler/ipp.c:4089 scheduler/ipp.c:6975
 msgid "Quota limit reached."
 msgstr "Quota の制限に達しました。"
 
 #: scheduler/ipp.c:3824 scheduler/ipp.c:6691 scheduler/ipp.c:4022
-#: scheduler/ipp.c:6741
+#: scheduler/ipp.c:6741 scheduler/ipp.c:4114 scheduler/ipp.c:7000
 #, c-format
 msgid "Unable to add job for destination \"%s\"!"
 msgstr "宛先 \"%s\" にジョブを追加できません!"
 
-#: scheduler/ipp.c:4469 scheduler/ipp.c:4673
+#: scheduler/ipp.c:4469 scheduler/ipp.c:4673 scheduler/ipp.c:4770
 msgid "No subscription attributes in request!"
 msgstr "リクエストにサブスクリプション属性がありません!"
 
-#: scheduler/ipp.c:4559 scheduler/ipp.c:4763
+#: scheduler/ipp.c:4559 scheduler/ipp.c:4763 scheduler/ipp.c:4869
 msgid "notify-events not specified!"
 msgstr "notify-events が指定されていません!"
 
-#: scheduler/ipp.c:4577 scheduler/ipp.c:4781
+#: scheduler/ipp.c:4577 scheduler/ipp.c:4781 scheduler/ipp.c:4887
 #, c-format
 msgid "Job %d not found!"
 msgstr "ジョブ %d は見つかりません!"
 
-#: scheduler/ipp.c:4827 scheduler/ipp.c:4957
+#: scheduler/ipp.c:4827 scheduler/ipp.c:4957 scheduler/ipp.c:5075
 msgid "No default printer"
 msgstr "デフォルトプリンタはありません"
 
-#: scheduler/ipp.c:4930 scheduler/ipp.c:5060
+#: scheduler/ipp.c:4930 scheduler/ipp.c:5060 scheduler/ipp.c:5178
 msgid "cups-deviced failed to execute."
 msgstr "cups-deviced の実行に失敗しました。"
 
-#: scheduler/ipp.c:5393 scheduler/ipp.c:5479
+#: scheduler/ipp.c:5393 scheduler/ipp.c:5479 scheduler/ipp.c:5722
 msgid "cups-driverd failed to execute."
 msgstr "cups-driverd の実行に失敗しました。"
 
-#: scheduler/ipp.c:5571 scheduler/ipp.c:5594
+#: scheduler/ipp.c:5571 scheduler/ipp.c:5594 scheduler/ipp.c:5837
 msgid "No destinations added."
 msgstr "追加された宛先はありません。"
 
-#: scheduler/ipp.c:5794 scheduler/ipp.c:5736
+#: scheduler/ipp.c:5794 scheduler/ipp.c:5736 scheduler/ipp.c:2615
+#: scheduler/ipp.c:5530 scheduler/ipp.c:5979 scheduler/ipp.c:7840
 #, c-format
 msgid "notify-subscription-id %d no good!"
 msgstr "notify-subscription-id %d は良くありません!"
 
-#: scheduler/ipp.c:5878 scheduler/ipp.c:5822
+#: scheduler/ipp.c:5878 scheduler/ipp.c:5822 scheduler/ipp.c:6065
 #, c-format
 msgid "Job #%s does not exist!"
 msgstr "ジョブ #%s は存在しません!"
@@ -395,21 +426,26 @@ msgstr "ジョブ #%s は存在しません!"
 #: scheduler/ipp.c:5143 scheduler/ipp.c:5844 scheduler/ipp.c:5996
 #: scheduler/ipp.c:6174 scheduler/ipp.c:6219 scheduler/ipp.c:7493
 #: scheduler/ipp.c:7640 scheduler/ipp.c:7880 scheduler/ipp.c:8375
+#: scheduler/ipp.c:2199 scheduler/ipp.c:2541 scheduler/ipp.c:5261
+#: scheduler/ipp.c:6087 scheduler/ipp.c:6251 scheduler/ipp.c:6429
+#: scheduler/ipp.c:6474 scheduler/ipp.c:7754 scheduler/ipp.c:7969
+#: scheduler/ipp.c:8208 scheduler/ipp.c:8713
 #, c-format
 msgid "Job #%d does not exist!"
 msgstr "ジョブ #%d は存在しません!"
 
-#: scheduler/ipp.c:5969 scheduler/ipp.c:5915
+#: scheduler/ipp.c:5969 scheduler/ipp.c:5915 scheduler/ipp.c:6150
 msgid "No subscriptions found."
 msgstr "サブスクリプションが見つかりません。"
 
 #: scheduler/ipp.c:6058 scheduler/ipp.c:6007
 #, c-format
 msgid "Not authorized to hold job #%d owned by \"%s\"!"
-msgstr "\"%2$s\" の所有しているジョブ #%1$d をホールドすることを許可されていません!"
+msgstr ""
+"\"%2$s\" の所有しているジョブ #%1$d をホールドすることを許可されていません!"
 
 #: scheduler/ipp.c:6203 scheduler/ipp.c:8315 scheduler/ipp.c:6250
-#: scheduler/ipp.c:8390
+#: scheduler/ipp.c:8390 scheduler/ipp.c:6505 scheduler/ipp.c:8728
 #, c-format
 msgid "Job #%d is finished and cannot be altered!"
 msgstr "ジョブ #%d は完了し、変更することはできません!"
@@ -417,44 +453,46 @@ msgstr "ジョブ #%d は完了し、変更することはできません!"
 #: scheduler/ipp.c:6215 scheduler/ipp.c:6262
 #, c-format
 msgid "You are not authorized to move job #%d owned by \"%s\"!"
-msgstr "あなたは \"%2$s\" の所有しているジョブ #%1$d を移動することを許可されていません!"
+msgstr ""
+"あなたは \"%2$s\" の所有しているジョブ #%1$d を移動することを許可されていませ"
+"ん!"
 
-#: scheduler/ipp.c:6228 scheduler/ipp.c:6098
+#: scheduler/ipp.c:6228 scheduler/ipp.c:6098 scheduler/ipp.c:6353
 msgid "job-printer-uri attribute missing!"
 msgstr "job-printer-uri 属性がありません!"
 
 #: scheduler/ipp.c:6485 scheduler/ipp.c:7847 scheduler/ipp.c:6531
-#: scheduler/ipp.c:7913
+#: scheduler/ipp.c:7913 scheduler/ipp.c:6783 scheduler/ipp.c:8238
 #, c-format
 msgid "Unsupported compression \"%s\"!"
 msgstr "\"%s\" はサポートされていない圧縮です!"
 
 #: scheduler/ipp.c:6504 scheduler/ipp.c:7866 scheduler/ipp.c:6550
-#: scheduler/ipp.c:7932
+#: scheduler/ipp.c:7932 scheduler/ipp.c:6802 scheduler/ipp.c:8257
 msgid "No file!?!"
 msgstr "ファイルがありません!?!"
 
-#: scheduler/ipp.c:6522 scheduler/ipp.c:6568
+#: scheduler/ipp.c:6522 scheduler/ipp.c:6568 scheduler/ipp.c:6820
 #, c-format
 msgid "Could not scan type \"%s\"!"
 msgstr "タイプ \"%s\" を検査できませんでした!"
 
 #: scheduler/ipp.c:6574 scheduler/ipp.c:7936 scheduler/ipp.c:6620
-#: scheduler/ipp.c:8001
+#: scheduler/ipp.c:8001 scheduler/ipp.c:6879 scheduler/ipp.c:8332
 #, c-format
 msgid "Unsupported format '%s/%s'!"
 msgstr "'%s/%s' はサポートされていない形式です!"
 
-#: scheduler/ipp.c:6621 scheduler/ipp.c:6669
+#: scheduler/ipp.c:6621 scheduler/ipp.c:6669 scheduler/ipp.c:6928
 msgid "Printer not shared!"
 msgstr "プリンタは共有されていません!"
 
-#: scheduler/ipp.c:6661 scheduler/ipp.c:6709
+#: scheduler/ipp.c:6661 scheduler/ipp.c:6709 scheduler/ipp.c:6968
 #, c-format
 msgid "Too many jobs - %d jobs, max jobs is %d."
 msgstr "ジョブが多すぎます - %d ジョブ。最大ジョブ数は %d です。"
 
-#: scheduler/ipp.c:7448 scheduler/ipp.c:7507
+#: scheduler/ipp.c:7448 scheduler/ipp.c:7507 scheduler/ipp.c:7768
 #, c-format
 msgid "Job #%d is not held!"
 msgstr "ジョブ #%d はホールドされていません!"
@@ -462,14 +500,16 @@ msgstr "ジョブ #%d はホールドされていません!"
 #: scheduler/ipp.c:7459 scheduler/ipp.c:7518
 #, c-format
 msgid "You are not authorized to release job id %d owned by \"%s\"!"
-msgstr "あなたは \"%2$s\" の所有しているジョブ ID %1$d を解放することを許可されていません!"
+msgstr ""
+"あなたは \"%2$s\" の所有しているジョブ ID %1$d を解放することを許可されていま"
+"せん!"
 
-#: scheduler/ipp.c:7592 scheduler/ipp.c:7654
+#: scheduler/ipp.c:7592 scheduler/ipp.c:7654 scheduler/ipp.c:7983
 #, c-format
 msgid "Job #%d is not complete!"
 msgstr "ジョブ #%d は完結していません!"
 
-#: scheduler/ipp.c:7608 scheduler/ipp.c:7670
+#: scheduler/ipp.c:7608 scheduler/ipp.c:7670 scheduler/ipp.c:8001
 #, c-format
 msgid "Job #%d cannot be restarted - no files!"
 msgstr "ジョブ #%d は再起動できません - ファイルがありません!"
@@ -477,15 +517,19 @@ msgstr "ジョブ #%d は再起動できません - ファイルがありませ
 #: scheduler/ipp.c:7619 scheduler/ipp.c:7681
 #, c-format
 msgid "You are not authorized to restart job id %d owned by \"%s\"!"
-msgstr "あなたは \"%2$s\" の所有しているジョブ ID %1$d を再開することを許可されていません!"
+msgstr ""
+"あなたは \"%2$s\" の所有しているジョブ ID %1$d を再開することを許可されていま"
+"せん!"
 
 #: scheduler/ipp.c:7826 scheduler/ipp.c:7891
 #, c-format
 msgid "You are not authorized to send document for job #%d owned by \"%s\"!"
-msgstr "あなたは \"%2$s\" の所有しているジョブ #%1$d にドキュメントを送信することを許可されていません!"
+msgstr ""
+"あなたは \"%2$s\" の所有しているジョブ #%1$d にドキュメントを送信することを許"
+"可されていません!"
 
 #: scheduler/ipp.c:7883 scheduler/ipp.c:8803 scheduler/ipp.c:7949
-#: scheduler/ipp.c:8883
+#: scheduler/ipp.c:8883 scheduler/ipp.c:8274 scheduler/ipp.c:9225
 #, c-format
 msgid "Bad document-format \"%s\"!"
 msgstr "\"%s\" は不正な document-format です!"
@@ -493,36 +537,39 @@ msgstr "\"%s\" は不正な document-format です!"
 #: scheduler/ipp.c:8326 scheduler/ipp.c:8401
 #, c-format
 msgid "You are not authorized to alter job id %d owned by \"%s\"!"
-msgstr "あなたは \"%2$s\" の所有しているジョブ ID %1$d を変更することを許可されていません!"
+msgstr ""
+"あなたは \"%2$s\" の所有しているジョブ ID %1$d を変更することを許可されていま"
+"せん!"
 
-#: scheduler/ipp.c:8371 scheduler/ipp.c:8446
+#: scheduler/ipp.c:8371 scheduler/ipp.c:8446 scheduler/ipp.c:8783
 #, c-format
 msgid "%s cannot be changed."
 msgstr "%s は変更できません。"
 
-#: scheduler/ipp.c:8387 scheduler/ipp.c:8462
+#: scheduler/ipp.c:8387 scheduler/ipp.c:8462 scheduler/ipp.c:8799
 msgid "Bad job-priority value!"
 msgstr "不正な job-priority 値です!"
 
-#: scheduler/ipp.c:8395 scheduler/ipp.c:8470
+#: scheduler/ipp.c:8395 scheduler/ipp.c:8470 scheduler/ipp.c:8807
 msgid "Job is completed and cannot be changed."
 msgstr "ジョブは完結し、変更できません。"
 
-#: scheduler/ipp.c:8409 scheduler/ipp.c:8484
+#: scheduler/ipp.c:8409 scheduler/ipp.c:8484 scheduler/ipp.c:8821
 msgid "Bad job-state value!"
 msgstr "不正な job-state 値です!"
 
 #: scheduler/ipp.c:8423 scheduler/ipp.c:8435 scheduler/ipp.c:8446
 #: scheduler/ipp.c:8498 scheduler/ipp.c:8510 scheduler/ipp.c:8521
+#: scheduler/ipp.c:8835 scheduler/ipp.c:8850 scheduler/ipp.c:8861
 msgid "Job state cannot be changed."
 msgstr "ジョブの状態を変更できません。"
 
-#: scheduler/ipp.c:8787 scheduler/ipp.c:8867
+#: scheduler/ipp.c:8787 scheduler/ipp.c:8867 scheduler/ipp.c:9209
 #, c-format
 msgid "Unsupported compression attribute %s!"
 msgstr "%s はサポートされていない圧縮属性です!"
 
-#: scheduler/ipp.c:8815 scheduler/ipp.c:8894
+#: scheduler/ipp.c:8815 scheduler/ipp.c:8894 scheduler/ipp.c:9236
 #, c-format
 msgid "Unsupported format \"%s\"!"
 msgstr "\"%s\" はサポートされていない形式です!"
@@ -555,36 +602,37 @@ msgid "?Invalid help command unknown\n"
 msgstr "?無効なヘルプコマンドです\n"
 
 #: berkeley/lpc.c:478 berkeley/lpc.c:490 berkeley/lpc.c:475 berkeley/lpc.c:487
+#: berkeley/lpc.c:476 berkeley/lpc.c:488
 #, c-format
 msgid "\tprinter is on device '%s' speed -1\n"
 msgstr "\tプリンタはデバイス '%s'上。速度 -1\n"
 
-#: berkeley/lpc.c:496 berkeley/lpc.c:493
+#: berkeley/lpc.c:496 berkeley/lpc.c:493 berkeley/lpc.c:494
 msgid "\tqueuing is enabled\n"
 msgstr "\tキューは有効です\n"
 
-#: berkeley/lpc.c:498 berkeley/lpc.c:495
+#: berkeley/lpc.c:498 berkeley/lpc.c:495 berkeley/lpc.c:496
 msgid "\tqueuing is disabled\n"
 msgstr "\tキューは無効です\n"
 
-#: berkeley/lpc.c:501 berkeley/lpc.c:498
+#: berkeley/lpc.c:501 berkeley/lpc.c:498 berkeley/lpc.c:499
 msgid "\tprinting is enabled\n"
 msgstr "\t印刷は有効です\n"
 
-#: berkeley/lpc.c:503 berkeley/lpc.c:500
+#: berkeley/lpc.c:503 berkeley/lpc.c:500 berkeley/lpc.c:501
 msgid "\tprinting is disabled\n"
 msgstr "\t印刷は無効です\n"
 
-#: berkeley/lpc.c:506 berkeley/lpc.c:503
+#: berkeley/lpc.c:506 berkeley/lpc.c:503 berkeley/lpc.c:504
 msgid "\tno entries\n"
 msgstr "\tエントリがありません\n"
 
-#: berkeley/lpc.c:508 berkeley/lpc.c:505
+#: berkeley/lpc.c:508 berkeley/lpc.c:505 berkeley/lpc.c:506
 #, c-format
 msgid "\t%d entries\n"
 msgstr "\t%d エントリ\n"
 
-#: berkeley/lpc.c:510 berkeley/lpc.c:507
+#: berkeley/lpc.c:510 berkeley/lpc.c:507 berkeley/lpc.c:508
 msgid "\tdaemon present\n"
 msgstr "\tデーモンは提供されています\n"
 
@@ -597,7 +645,7 @@ msgstr "lpq: サーバに連絡できません!\n"
 #: systemv/lpadmin.c:284 systemv/lp.c:135 systemv/lpinfo.c:80
 #: systemv/lpmove.c:84 systemv/accept.c:106 systemv/cancel.c:93
 #: systemv/lpmove.c:89 berkeley/lpq.c:124 systemv/lp.c:136
-#: systemv/lpstat.c:116
+#: systemv/lpstat.c:116 berkeley/lpr.c:116 systemv/lp.c:140
 #, c-format
 msgid "%s: Sorry, no encryption support compiled in!\n"
 msgstr "%s: すみません、暗号化サポートはコンパイル時に組み込まれていません!\n"
@@ -614,7 +662,8 @@ msgstr "lpq: \"%s\" は未知の宛先です!\n"
 
 #: berkeley/lpq.c:211 systemv/lp.c:564
 #, c-format
-msgid "lp: error - %s environment variable names non-existent destination \"%s\"!\n"
+msgid ""
+"lp: error - %s environment variable names non-existent destination \"%s\"!\n"
 msgstr "lp: エラー - 環境変数 %s が存在しない宛先 \"%s\" を指しています!\n"
 
 #: berkeley/lpq.c:216
@@ -627,8 +676,10 @@ msgid "lpq: get-jobs failed: %s\n"
 msgstr "lpq: get-jobs に失敗しました: %s\n"
 
 #: berkeley/lpq.c:457 berkeley/lpq.c:444 berkeley/lpq.c:488
-msgid "Rank   Owner      Pri  Job        Files                       Total Size\n"
-msgstr "ランク 所有者     優先 ジョブ     ファイル                    合計サイズ\n"
+msgid ""
+"Rank   Owner      Pri  Job        Files                       Total Size\n"
+msgstr ""
+"ランク 所有者     優先 ジョブ     ファイル                    合計サイズ\n"
 
 #: berkeley/lpq.c:461 berkeley/lpq.c:448 berkeley/lpq.c:492
 msgid "Rank    Owner   Job     File(s)                         Total Size\n"
@@ -691,8 +742,12 @@ msgstr "lpr: エラー - -%c オプションのあとには値が必要です!\n
 
 #: berkeley/lpr.c:146
 #, c-format
-msgid "lpr: warning - '%c' format modifier not supported - output may not be correct!\n"
-msgstr "lpr: 警告 - '%c' 形式修飾子はサポートされていません - 出力は正しくないものになるかもしれません!\n"
+msgid ""
+"lpr: warning - '%c' format modifier not supported - output may not be "
+"correct!\n"
+msgstr ""
+"lpr: 警告 - '%c' 形式修飾子はサポートされていません - 出力は正しくないものに"
+"なるかもしれません!\n"
 
 #: berkeley/lpr.c:159
 msgid "lpr: error - expected option=value after -o option!\n"
@@ -736,7 +791,8 @@ msgstr "lpr: エラー - ファイルが多すぎます - \"%s\"\n"
 
 #: berkeley/lpr.c:364
 #, c-format
-msgid "lpr: error - %s environment variable names non-existent destination \"%s\"!\n"
+msgid ""
+"lpr: error - %s environment variable names non-existent destination \"%s\"!\n"
 msgstr "lpr: エラー - 環境変数 %s が存在しない宛先 \"%s\" を指しています!\n"
 
 #: berkeley/lpr.c:369
@@ -827,7 +883,7 @@ msgid "%s: Unable to connect to server: %s\n"
 msgstr "%s: サーバに接続できません: %s\n"
 
 #: systemv/accept.c:217 systemv/accept.c:227 systemv/accept.c:268
-#: systemv/accept.c:278 systemv/accept.c:206
+#: systemv/accept.c:278 systemv/accept.c:206 systemv/accept.c:230
 #, c-format
 msgid "%s: Operation failed: %s\n"
 msgstr "%s: 操作に失敗しました: %s\n"
@@ -884,7 +940,8 @@ msgstr "cupsaddsmb: %1$s のサーバ \"%2$s\" に接続できません - %s\n"
 #: systemv/cupsaddsmb.c:509 systemv/cupsaddsmb.c:566
 #, c-format
 msgid "cupsaddsmb: No PPD file for printer \"%s\" - skipping!\n"
-msgstr "cupsaddsmb: プリンタ \"%s\" の PPD ファイルがありません - スキップします!\n"
+msgstr ""
+"cupsaddsmb: プリンタ \"%s\" の PPD ファイルがありません - スキップします!\n"
 
 #: systemv/cupsaddsmb.c:548 systemv/cupsaddsmb.c:562
 #, c-format
@@ -899,7 +956,8 @@ msgstr "cupsaddsmb: %s の PPD ファイルを変換できません - %s\n"
 #: systemv/cupsaddsmb.c:633 systemv/cupsaddsmb.c:677
 #, c-format
 msgid "cupsaddsmb: Unable to copy Windows 2000 printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Windows 2000 プリンタドライバファイルをコピーできません (%d)!\n"
+msgstr ""
+"cupsaddsmb: Windows 2000 プリンタドライバファイルをコピーできません (%d)!\n"
 
 #: systemv/cupsaddsmb.c:660 systemv/cupsaddsmb.c:704
 #, c-format
@@ -909,17 +967,22 @@ msgstr "cupsaddsmb: CUPS プリンタドライバファイルをコピーでき
 #: systemv/cupsaddsmb.c:697 systemv/cupsaddsmb.c:739
 #, c-format
 msgid "cupsaddsmb: Unable to install Windows 2000 printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Windows 2000 プリンタドライバファイルをインストールできません (%d)!\n"
+msgstr ""
+"cupsaddsmb: Windows 2000 プリンタドライバファイルをインストールできません (%"
+"d)!\n"
 
 #: systemv/cupsaddsmb.c:727 systemv/cupsaddsmb.c:771
 #, c-format
 msgid "cupsaddsmb: Unable to copy Windows 9x printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Windows 9x プリンタドライバファイルをコピーできません (%d)!\n"
+msgstr ""
+"cupsaddsmb: Windows 9x プリンタドライバファイルをコピーできません (%d)!\n"
 
 #: systemv/cupsaddsmb.c:750 systemv/cupsaddsmb.c:792
 #, c-format
 msgid "cupsaddsmb: Unable to install Windows 9x printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Windows 9x プリンタドライバファイルをインストールできません (%d)!\n"
+msgstr ""
+"cupsaddsmb: Windows 9x プリンタドライバファイルをインストールできません (%"
+"d)!\n"
 
 #: systemv/cupsaddsmb.c:771 systemv/cupsaddsmb.c:822
 #, c-format
@@ -948,15 +1011,15 @@ msgstr ""
 "  -h cupsサーバ    指定の CUPS サーバを使う\n"
 "  -v               冗長にする (コマンドを表示する)\n"
 
-#: systemv/cupstestppd.c:120
+#: systemv/cupstestppd.c:120 systemv/cupstestppd.c:137
 msgid "cupstestppd: The -q option is incompatible with the -v option.\n"
 msgstr "cupstestppd: -q オプションは -v オプションと両立できません。\n"
 
-#: systemv/cupstestppd.c:136
+#: systemv/cupstestppd.c:136 systemv/cupstestppd.c:153
 msgid "cupstestppd: The -v option is incompatible with the -q option.\n"
 msgstr "cupstestppd: -v オプションは -q オプションと両立できません。"
 
-#: systemv/cupstestppd.c:193
+#: systemv/cupstestppd.c:193 systemv/cupstestppd.c:210
 #, c-format
 msgid ""
 " FAIL\n"
@@ -965,7 +1028,7 @@ msgstr ""
 " 失敗\n"
 "      **失敗**  PPD ファイルを開くことができません - %s\n"
 
-#: systemv/cupstestppd.c:204
+#: systemv/cupstestppd.c:204 systemv/cupstestppd.c:221
 #, c-format
 msgid ""
 " FAIL\n"
@@ -974,57 +1037,60 @@ msgstr ""
 " 失敗\n"
 "      **失敗**  PPD ファイルを開くことができません - %2$d 行の %1$s。\n"
 
-#: systemv/cupstestppd.c:213
+#: systemv/cupstestppd.c:213 systemv/cupstestppd.c:230
 msgid "                REF: Page 42, section 5.2.\n"
 msgstr "                REF: 42 ページ、セクション 5.2。\n"
 
-#: systemv/cupstestppd.c:217
+#: systemv/cupstestppd.c:217 systemv/cupstestppd.c:234
 msgid "                REF: Page 20, section 3.4.\n"
 msgstr "                REF: 20 ページ、セクション 3.4。\n"
 
-#: systemv/cupstestppd.c:222
+#: systemv/cupstestppd.c:222 systemv/cupstestppd.c:239
 msgid "                REF: Pages 45-46, section 5.2.\n"
 msgstr "                REF: 45-46 ページ、セクション 5.2。\n"
 
-#: systemv/cupstestppd.c:227
+#: systemv/cupstestppd.c:227 systemv/cupstestppd.c:244
 msgid "                REF: Pages 42-45, section 5.2.\n"
 msgstr "                REF: 42-45 ページ、セクション 5.2。\n"
 
-#: systemv/cupstestppd.c:231
+#: systemv/cupstestppd.c:231 systemv/cupstestppd.c:248
 msgid "                REF: Pages 48-49, section 5.2.\n"
 msgstr "                REF: 48-49 ページ、セクション 5.2。\n"
 
-#: systemv/cupstestppd.c:235
+#: systemv/cupstestppd.c:235 systemv/cupstestppd.c:252
 msgid "                REF: Pages 52-54, section 5.2.\n"
 msgstr "                REF: 52-54 ページ、セクション 5.2。\n"
 
-#: systemv/cupstestppd.c:239
+#: systemv/cupstestppd.c:239 systemv/cupstestppd.c:256
 msgid "                REF: Page 15, section 3.2.\n"
 msgstr "                REF: 15 ページ、セクション 3.2。\n"
 
 #: systemv/cupstestppd.c:243 systemv/cupstestppd.c:247
+#: systemv/cupstestppd.c:260 systemv/cupstestppd.c:264
 msgid "                REF: Page 15, section 3.1.\n"
 msgstr "                REF: 15 ページ、セクション 3.1。\n"
 
-#: systemv/cupstestppd.c:251
+#: systemv/cupstestppd.c:251 systemv/cupstestppd.c:268
 msgid "                REF: Pages 16-17, section 3.2.\n"
 msgstr "                REF: 16-17 ページ、セクション 3.2。\n"
 
-#: systemv/cupstestppd.c:255
+#: systemv/cupstestppd.c:255 systemv/cupstestppd.c:272
 msgid "                REF: Page 19, section 3.3.\n"
 msgstr "                REF: 19 ページ、セクション 3.3。\n"
 
-#: systemv/cupstestppd.c:259
+#: systemv/cupstestppd.c:259 systemv/cupstestppd.c:276
 msgid "                REF: Page 27, section 3.5.\n"
 msgstr "                REF: 27 ページ、セクション 3.5。\n"
 
-#: systemv/cupstestppd.c:280
+#: systemv/cupstestppd.c:280 systemv/cupstestppd.c:299
 msgid ""
 "\n"
 "    DETAILED CONFORMANCE TEST RESULTS\n"
-msgstr "\n    適合テスト結果詳細\n"
+msgstr ""
+"\n"
+"    適合テスト結果詳細\n"
 
-#: systemv/cupstestppd.c:307
+#: systemv/cupstestppd.c:307 systemv/cupstestppd.c:326
 #, c-format
 msgid "        WARN    %s has no corresponding options!\n"
 msgstr "        警告    %s は相当するオプションがありません!\n"
@@ -1044,11 +1110,26 @@ msgstr "        警告    %s は相当するオプションがありません!\n
 #: systemv/cupstestppd.c:781 systemv/cupstestppd.c:801
 #: systemv/cupstestppd.c:832 systemv/cupstestppd.c:854
 #: systemv/cupstestppd.c:902 systemv/cupstestppd.c:931
-#: systemv/cupstestppd.c:952
+#: systemv/cupstestppd.c:952 systemv/cupstestppd.c:337
+#: systemv/cupstestppd.c:352 systemv/cupstestppd.c:373
+#: systemv/cupstestppd.c:388 systemv/cupstestppd.c:416
+#: systemv/cupstestppd.c:436 systemv/cupstestppd.c:458
+#: systemv/cupstestppd.c:478 systemv/cupstestppd.c:498
+#: systemv/cupstestppd.c:518 systemv/cupstestppd.c:536
+#: systemv/cupstestppd.c:554 systemv/cupstestppd.c:594
+#: systemv/cupstestppd.c:614 systemv/cupstestppd.c:634
+#: systemv/cupstestppd.c:654 systemv/cupstestppd.c:674
+#: systemv/cupstestppd.c:692 systemv/cupstestppd.c:709
+#: systemv/cupstestppd.c:731 systemv/cupstestppd.c:749
+#: systemv/cupstestppd.c:766 systemv/cupstestppd.c:784
+#: systemv/cupstestppd.c:800 systemv/cupstestppd.c:820
+#: systemv/cupstestppd.c:851 systemv/cupstestppd.c:873
+#: systemv/cupstestppd.c:921 systemv/cupstestppd.c:950
+#: systemv/cupstestppd.c:971
 msgid " FAIL\n"
 msgstr " 失敗\n"
 
-#: systemv/cupstestppd.c:321
+#: systemv/cupstestppd.c:321 systemv/cupstestppd.c:340
 msgid ""
 "      **FAIL**  REQUIRED DefaultImageableArea\n"
 "                REF: Page 102, section 5.15.\n"
@@ -1056,7 +1137,7 @@ msgstr ""
 "      **失敗**  DefaultImageableArea が必須\n"
 "                REF: 102 ページ、セクション 5.15。\n"
 
-#: systemv/cupstestppd.c:336
+#: systemv/cupstestppd.c:336 systemv/cupstestppd.c:355
 #, c-format
 msgid ""
 "      **FAIL**  BAD DefaultImageableArea %s!\n"
@@ -1065,11 +1146,11 @@ msgstr ""
 "      **失敗**  %s は不正な DefaultImageableArea です!\n"
 "                REF: 102 ページ、セクション 5.15。\n"
 
-#: systemv/cupstestppd.c:346
+#: systemv/cupstestppd.c:346 systemv/cupstestppd.c:365
 msgid "        PASS    DefaultImageableArea\n"
 msgstr "        合格    DefaultImageableArea\n"
 
-#: systemv/cupstestppd.c:357
+#: systemv/cupstestppd.c:357 systemv/cupstestppd.c:376
 msgid ""
 "      **FAIL**  REQUIRED DefaultPaperDimension\n"
 "                REF: Page 103, section 5.15.\n"
@@ -1077,7 +1158,7 @@ msgstr ""
 "      **失敗**  DefaultPaperDimension は必須\n"
 "                REF: 103 ページ、セクション 5.15。\n"
 
-#: systemv/cupstestppd.c:372
+#: systemv/cupstestppd.c:372 systemv/cupstestppd.c:391
 #, c-format
 msgid ""
 "      **FAIL**  BAD DefaultPaperDimension %s!\n"
@@ -1086,11 +1167,11 @@ msgstr ""
 "      **失敗**  %s は不正な DefaultPaperDimension です!\n"
 "                REF: 103 ページ、セクション 5.15。\n"
 
-#: systemv/cupstestppd.c:380
+#: systemv/cupstestppd.c:380 systemv/cupstestppd.c:399
 msgid "        PASS    DefaultPaperDimension\n"
 msgstr "        合格    DefaultPaperDimension\n"
 
-#: systemv/cupstestppd.c:400
+#: systemv/cupstestppd.c:400 systemv/cupstestppd.c:419
 #, c-format
 msgid ""
 "      **FAIL**  BAD Default%s %s\n"
@@ -1099,12 +1180,12 @@ msgstr ""
 "      **失敗**  %2$s は不正な Default%1$s\n"
 "                REF: 40 ページ、セクション 4.5。\n"
 
-#: systemv/cupstestppd.c:409
+#: systemv/cupstestppd.c:409 systemv/cupstestppd.c:428
 #, c-format
 msgid "        PASS    Default%s\n"
 msgstr "        合格    Default%s\n"
 
-#: systemv/cupstestppd.c:420
+#: systemv/cupstestppd.c:420 systemv/cupstestppd.c:439
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED Default%s\n"
@@ -1113,11 +1194,11 @@ msgstr ""
 "      **失敗**  Default%s は必須\n"
 "                REF: 40 ページ、セクション 4.5。\n"
 
-#: systemv/cupstestppd.c:432
+#: systemv/cupstestppd.c:432 systemv/cupstestppd.c:451
 msgid "        PASS    FileVersion\n"
 msgstr "        合格    FileVersion\n"
 
-#: systemv/cupstestppd.c:442
+#: systemv/cupstestppd.c:442 systemv/cupstestppd.c:461
 msgid ""
 "      **FAIL**  REQUIRED FileVersion\n"
 "                REF: Page 56, section 5.3.\n"
@@ -1125,11 +1206,11 @@ msgstr ""
 "      **失敗**  FileVersion は必須\n"
 "                REF: 56 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:452
+#: systemv/cupstestppd.c:452 systemv/cupstestppd.c:471
 msgid "        PASS    FormatVersion\n"
 msgstr "        合格    FormatVersion\n"
 
-#: systemv/cupstestppd.c:462
+#: systemv/cupstestppd.c:462 systemv/cupstestppd.c:481
 msgid ""
 "      **FAIL**  REQUIRED FormatVersion\n"
 "                REF: Page 56, section 5.3.\n"
@@ -1137,11 +1218,11 @@ msgstr ""
 "      **失敗**  FormatVersion は必須\n"
 "                REF: 56 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:472
+#: systemv/cupstestppd.c:472 systemv/cupstestppd.c:491
 msgid "        PASS    LanguageEncoding\n"
 msgstr "        合格    LanguageEncoding\n"
 
-#: systemv/cupstestppd.c:482
+#: systemv/cupstestppd.c:482 systemv/cupstestppd.c:501
 msgid ""
 "      **FAIL**  REQUIRED LanguageEncoding\n"
 "                REF: Pages 56-57, section 5.3.\n"
@@ -1149,11 +1230,11 @@ msgstr ""
 "      **失敗**  LanguageEncoding は必須\n"
 "                REF: 56-57 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:492
+#: systemv/cupstestppd.c:492 systemv/cupstestppd.c:511
 msgid "        PASS    LanguageVersion\n"
 msgstr "        合格    LanguageVersion\n"
 
-#: systemv/cupstestppd.c:502
+#: systemv/cupstestppd.c:502 systemv/cupstestppd.c:521
 msgid ""
 "      **FAIL**  REQUIRED LanguageVersion\n"
 "                REF: Pages 57-58, section 5.3.\n"
@@ -1161,7 +1242,7 @@ msgstr ""
 "      **失敗**  LanguageVersion は必須\n"
 "                REF: 57-58 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:520
+#: systemv/cupstestppd.c:520 systemv/cupstestppd.c:539
 msgid ""
 "      **FAIL**  BAD Manufacturer (should be \"HP\")\n"
 "                REF: Page 211, table D.1.\n"
@@ -1169,11 +1250,11 @@ msgstr ""
 "      **失敗**  不正な Manufacturer (\"HP\" でなければなりません)\n"
 "                REF: 211 ページ、表 D.1。\n"
 
-#: systemv/cupstestppd.c:528
+#: systemv/cupstestppd.c:528 systemv/cupstestppd.c:547
 msgid "        PASS    Manufacturer\n"
 msgstr "        合格    Manufacturer\n"
 
-#: systemv/cupstestppd.c:538
+#: systemv/cupstestppd.c:538 systemv/cupstestppd.c:557
 msgid ""
 "      **FAIL**  REQUIRED Manufacturer\n"
 "                REF: Pages 58-59, section 5.3.\n"
@@ -1181,7 +1262,7 @@ msgstr ""
 "      **失敗**  Manufacturer は必須\n"
 "                REF: 58-59 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:559
+#: systemv/cupstestppd.c:559 systemv/cupstestppd.c:578
 #, c-format
 msgid ""
 "      **FAIL**  BAD ModelName - \"%c\" not allowed in string.\n"
@@ -1190,11 +1271,11 @@ msgstr ""
 "      **失敗**  不正な ModelName - 文字列に \"%c\" は許可されていません。\n"
 "                REF: 59-60 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:568
+#: systemv/cupstestppd.c:568 systemv/cupstestppd.c:587
 msgid "        PASS    ModelName\n"
 msgstr "        合格    ModelName\n"
 
-#: systemv/cupstestppd.c:578
+#: systemv/cupstestppd.c:578 systemv/cupstestppd.c:597
 msgid ""
 "      **FAIL**  REQUIRED ModelName\n"
 "                REF: Pages 59-60, section 5.3.\n"
@@ -1202,11 +1283,11 @@ msgstr ""
 "      **失敗**  ModelName は必須\n"
 "                REF: 59-60 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:588
+#: systemv/cupstestppd.c:588 systemv/cupstestppd.c:607
 msgid "        PASS    NickName\n"
 msgstr "        合格    NickName\n"
 
-#: systemv/cupstestppd.c:598
+#: systemv/cupstestppd.c:598 systemv/cupstestppd.c:617
 msgid ""
 "      **FAIL**  REQUIRED NickName\n"
 "                REF: Page 60, section 5.3.\n"
@@ -1214,11 +1295,11 @@ msgstr ""
 "      **失敗**  NickName は必須\n"
 "                REF: 60 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:608
+#: systemv/cupstestppd.c:608 systemv/cupstestppd.c:627
 msgid "        PASS    PageSize\n"
 msgstr "        合格    PageSize\n"
 
-#: systemv/cupstestppd.c:618
+#: systemv/cupstestppd.c:618 systemv/cupstestppd.c:637
 msgid ""
 "      **FAIL**  REQUIRED PageSize\n"
 "                REF: Pages 99-100, section 5.14.\n"
@@ -1226,11 +1307,11 @@ msgstr ""
 "      **失敗**  PageSize は必須\n"
 "                REF: 99-100 ページ、セクション 5.14。\n"
 
-#: systemv/cupstestppd.c:628
+#: systemv/cupstestppd.c:628 systemv/cupstestppd.c:647
 msgid "        PASS    PageRegion\n"
 msgstr "        合格    PageRegion\n"
 
-#: systemv/cupstestppd.c:638
+#: systemv/cupstestppd.c:638 systemv/cupstestppd.c:657
 msgid ""
 "      **FAIL**  REQUIRED PageRegion\n"
 "                REF: Page 100, section 5.14.\n"
@@ -1238,11 +1319,11 @@ msgstr ""
 "      **失敗**  PageRegion は必須\n"
 "                REF: 100 ページ、セクション 5.14。\n"
 
-#: systemv/cupstestppd.c:648
+#: systemv/cupstestppd.c:648 systemv/cupstestppd.c:667
 msgid "        PASS    PCFileName\n"
 msgstr "        合格    PCFileName\n"
 
-#: systemv/cupstestppd.c:658
+#: systemv/cupstestppd.c:658 systemv/cupstestppd.c:677
 msgid ""
 "      **FAIL**  REQUIRED PCFileName\n"
 "                REF: Pages 61-62, section 5.3.\n"
@@ -1250,7 +1331,7 @@ msgstr ""
 "      **失敗**  PCFileName は必須\n"
 "                REF: 61-62 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:676
+#: systemv/cupstestppd.c:676 systemv/cupstestppd.c:695
 msgid ""
 "      **FAIL**  BAD Product - not \"(string)\".\n"
 "                REF: Page 62, section 5.3.\n"
@@ -1258,11 +1339,11 @@ msgstr ""
 "      **失敗**  不正な Product - \"(文字列)\" ではありません。\n"
 "                REF: 62 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:683
+#: systemv/cupstestppd.c:683 systemv/cupstestppd.c:702
 msgid "        PASS    Product\n"
 msgstr "        合格    Product\n"
 
-#: systemv/cupstestppd.c:693
+#: systemv/cupstestppd.c:693 systemv/cupstestppd.c:712
 msgid ""
 "      **FAIL**  REQUIRED Product\n"
 "                REF: Page 62, section 5.3.\n"
@@ -1270,7 +1351,7 @@ msgstr ""
 "      **失敗**  Product は必須\n"
 "                REF: 62 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:715
+#: systemv/cupstestppd.c:715 systemv/cupstestppd.c:734
 msgid ""
 "      **FAIL**  BAD PSVersion - not \"(string) int\".\n"
 "                REF: Pages 62-64, section 5.3.\n"
@@ -1278,11 +1359,11 @@ msgstr ""
 "      **失敗**  不正な PSVersion - \"(文字列) 整数\" ではありません。\n"
 "                REF: 62-64 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:723
+#: systemv/cupstestppd.c:723 systemv/cupstestppd.c:742
 msgid "        PASS    PSVersion\n"
 msgstr "        合格    PSVersion\n"
 
-#: systemv/cupstestppd.c:733
+#: systemv/cupstestppd.c:733 systemv/cupstestppd.c:752
 msgid ""
 "      **FAIL**  REQUIRED PSVersion\n"
 "                REF: Pages 62-64, section 5.3.\n"
@@ -1290,7 +1371,7 @@ msgstr ""
 "      **失敗**  PSVersion は必須\n"
 "                REF: 62-64 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:750
+#: systemv/cupstestppd.c:750 systemv/cupstestppd.c:769
 msgid ""
 "      **FAIL**  BAD ShortNickName - longer than 31 chars.\n"
 "                REF: Pages 64-65, section 5.3.\n"
@@ -1298,11 +1379,11 @@ msgstr ""
 "      **失敗**  不正な ShortNickName - 31 文字を超えています。\n"
 "                REF: 64-65 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:758
+#: systemv/cupstestppd.c:758 systemv/cupstestppd.c:777
 msgid "        PASS    ShortNickName\n"
 msgstr "        合格    ShortNickName\n"
 
-#: systemv/cupstestppd.c:768
+#: systemv/cupstestppd.c:768 systemv/cupstestppd.c:787
 msgid ""
 "      **FAIL**  REQUIRED ShortNickName\n"
 "                REF: Page 64-65, section 5.3.\n"
@@ -1310,7 +1391,7 @@ msgstr ""
 "      **失敗**  ShortNickName は必須\n"
 "                REF: 64-65 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:784
+#: systemv/cupstestppd.c:784 systemv/cupstestppd.c:803
 msgid ""
 "      **FAIL**  BAD JobPatchFile attribute in file\n"
 "                REF: Page 24, section 3.4.\n"
@@ -1318,7 +1399,7 @@ msgstr ""
 "      **失敗**  ファイルに不正な JobPatchFile 属性があります\n"
 "                REF: 24 ページ、セクション 3.4。\n"
 
-#: systemv/cupstestppd.c:804
+#: systemv/cupstestppd.c:804 systemv/cupstestppd.c:823
 msgid ""
 "      **FAIL**  REQUIRED PageSize\n"
 "                REF: Page 41, section 5.\n"
@@ -1328,7 +1409,7 @@ msgstr ""
 "                REF: 41 ページ、セクション 5。\n"
 "                REF: 99 ページ、セクション 5.14。\n"
 
-#: systemv/cupstestppd.c:835
+#: systemv/cupstestppd.c:835 systemv/cupstestppd.c:854
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED ImageableArea for PageSize %s\n"
@@ -1339,7 +1420,7 @@ msgstr ""
 "                REF: 41 ページ、セクション 5。\n"
 "                REF: 102 ページ、セクション 5.15。\n"
 
-#: systemv/cupstestppd.c:857
+#: systemv/cupstestppd.c:857 systemv/cupstestppd.c:876
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED PaperDimension for PageSize %s\n"
@@ -1350,7 +1431,7 @@ msgstr ""
 "                REF: 41 ページ、セクション 5。\n"
 "                REF: 103 ページ、セクション 5.15。\n"
 
-#: systemv/cupstestppd.c:905
+#: systemv/cupstestppd.c:905 systemv/cupstestppd.c:924
 #, c-format
 msgid ""
 "      **FAIL**  Bad %s choice %s!\n"
@@ -1359,7 +1440,7 @@ msgstr ""
 "      **失敗**  不正な %s が %s を選んでいます!\n"
 "                REF: 84 ページ、セクション 5.9\n"
 
-#: systemv/cupstestppd.c:934
+#: systemv/cupstestppd.c:934 systemv/cupstestppd.c:953
 #, c-format
 msgid ""
 "      **FAIL**  REQUIRED %s does not define choice None!\n"
@@ -1368,7 +1449,7 @@ msgstr ""
 "      **失敗**  必須の %s が選択肢 None を定義していません!\n"
 "                REF: 122 ページ、セクション 5.17\n"
 
-#: systemv/cupstestppd.c:955
+#: systemv/cupstestppd.c:955 systemv/cupstestppd.c:974
 #, c-format
 msgid ""
 "      **FAIL**  Bad %s choice %s!\n"
@@ -1377,24 +1458,26 @@ msgstr ""
 "      **FAIL**  不正な %s が %s を選んでいます!\n"
 "                REF: 122 ページ、セクション 5.17\n"
 
-#: systemv/cupstestppd.c:967
+#: systemv/cupstestppd.c:967 systemv/cupstestppd.c:986
 msgid " PASS\n"
 msgstr " 合格\n"
 
-#: systemv/cupstestppd.c:976
+#: systemv/cupstestppd.c:976 systemv/cupstestppd.c:997
 #, c-format
 msgid ""
-"        WARN    Duplex option keyword %s should be named Duplex or JCLDuplex!\n"
+"        WARN    Duplex option keyword %s should be named Duplex or "
+"JCLDuplex!\n"
 "                REF: Page 122, section 5.17\n"
 msgstr ""
-"        警告    複式オプションキーワード %s は Duplex あるいは JCLDuplex という名前であるべきです!\n"
+"        警告    複式オプションキーワード %s は Duplex あるいは JCLDuplex とい"
+"う名前であるべきです!\n"
 "                REF: 122 ページ、セクション 5.17\n"
 
-#: systemv/cupstestppd.c:986
+#: systemv/cupstestppd.c:986 systemv/cupstestppd.c:1007
 msgid "        WARN    Default choices conflicting!\n"
 msgstr "        警告    デフォルトの選択肢が衝突しています!\n"
 
-#: systemv/cupstestppd.c:994
+#: systemv/cupstestppd.c:994 systemv/cupstestppd.c:1015
 #, c-format
 msgid ""
 "        WARN    Obsolete PPD version %.1f!\n"
@@ -1403,7 +1486,7 @@ msgstr ""
 "        警告    PPD バージョン %.1f は時代遅れです!\n"
 "                REF: 42 ページ、セクション 5.2。\n"
 
-#: systemv/cupstestppd.c:1002
+#: systemv/cupstestppd.c:1002 systemv/cupstestppd.c:1023
 msgid ""
 "        WARN    LanguageEncoding required by PPD 4.3 spec.\n"
 "                REF: Pages 56-57, section 5.3.\n"
@@ -1411,7 +1494,7 @@ msgstr ""
 "        警告    LanguageEncoding は PPD 4.3 仕様で必須です。\n"
 "                REF: 56-57 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:1010
+#: systemv/cupstestppd.c:1010 systemv/cupstestppd.c:1031
 msgid ""
 "        WARN    Manufacturer required by PPD 4.3 spec.\n"
 "                REF: Pages 58-59, section 5.3.\n"
@@ -1419,7 +1502,7 @@ msgstr ""
 "        警告    Manufacturer は PPD 4.3 仕様で必須です。\n"
 "                REF: 58-59 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:1023
+#: systemv/cupstestppd.c:1023 systemv/cupstestppd.c:1044
 msgid ""
 "        WARN    PCFileName longer than 8.3 in violation of PPD spec.\n"
 "                REF: Pages 61-62, section 5.3.\n"
@@ -1427,7 +1510,7 @@ msgstr ""
 "        警告    8.3 文字より長い PCFileName は PPD 仕様違反です。\n"
 "                REF: 61-62 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:1031
+#: systemv/cupstestppd.c:1031 systemv/cupstestppd.c:1052
 msgid ""
 "        WARN    ShortNickName required by PPD 4.3 spec.\n"
 "                REF: Pages 64-65, section 5.3.\n"
@@ -1435,23 +1518,25 @@ msgstr ""
 "        警告    ShortNickName は PPD 4.3 仕様で必須です。\n"
 "                REF: 64-65 ページ、セクション 5.3。\n"
 
-#: systemv/cupstestppd.c:1048
+#: systemv/cupstestppd.c:1048 systemv/cupstestppd.c:1069
 msgid ""
 "        WARN    Protocols contains both PJL and BCP; expected TBCP.\n"
 "                REF: Pages 78-79, section 5.7.\n"
 msgstr ""
-"        警告    プロトコルが PJL と BCP の両方を含んでいます; TBCP を予測します。\n"
+"        警告    プロトコルが PJL と BCP の両方を含んでいます; TBCP を予測しま"
+"す。\n"
 "                REF: 78-79 ページ、セクション 5.7。\n"
 
-#: systemv/cupstestppd.c:1057
+#: systemv/cupstestppd.c:1057 systemv/cupstestppd.c:1078
 msgid ""
 "        WARN    Protocols contains PJL but JCL attributes are not set.\n"
 "                REF: Pages 78-79, section 5.7.\n"
 msgstr ""
-"        警告    プロトコルが PJL を含んでいますが JCL 属性が設定されていません。\n"
+"        警告    プロトコルが PJL を含んでいますが JCL 属性が設定されていませ"
+"ん。\n"
 "                REF: 78-79 ページ、セクション 5.7。\n"
 
-#: systemv/cupstestppd.c:1085
+#: systemv/cupstestppd.c:1085 systemv/cupstestppd.c:1106
 #, c-format
 msgid ""
 "        WARN    %s shares a common prefix with %s\n"
@@ -1460,16 +1545,16 @@ msgstr ""
 "        警告    %s は %s と一般プリフィクスを共有します。\n"
 "                REF: 15 ページ、セクション 3.2。\n"
 
-#: systemv/cupstestppd.c:1097
+#: systemv/cupstestppd.c:1097 systemv/cupstestppd.c:1118
 #, c-format
 msgid "    %d ERROR%s FOUND\n"
 msgstr "    %d 個のエラー%s が見つかりました\n"
 
-#: systemv/cupstestppd.c:1100
+#: systemv/cupstestppd.c:1100 systemv/cupstestppd.c:1121
 msgid "    NO ERRORS FOUND\n"
 msgstr "    エラーは見つかりませんでした\n"
 
-#: systemv/cupstestppd.c:1360
+#: systemv/cupstestppd.c:1360 systemv/cupstestppd.c:1465
 #, c-format
 msgid ""
 "        WARN    \"%s %s\" conflicts with \"%s %s\"\n"
@@ -1478,17 +1563,20 @@ msgstr ""
 "        警告    \"%s %s\" は \"%s %s\" と衝突します\n"
 "                (constraint=\"%s %s %s %s\")\n"
 
-#: systemv/cupstestppd.c:1376
+#: systemv/cupstestppd.c:1376 systemv/cupstestppd.c:1481
 msgid ""
-"Usage: cupstestppd [-q] [-r] [-v[v]] filename1.ppd[.gz] [... filenameN.ppd[.gz]]\n"
+"Usage: cupstestppd [-q] [-r] [-v[v]] filename1.ppd[.gz] [... filenameN.ppd[."
+"gz]]\n"
 "       program | cupstestppd [-q] [-r] [-v[v]] -\n"
 msgstr ""
-"使い方: cupstestppd [-q] [-r] [-v[v]] ファイル名1.ppd[.gz] [... ファイル名N.ppd[.gz]]\n"
+"使い方: cupstestppd [-q] [-r] [-v[v]] ファイル名1.ppd[.gz] [... ファイル名N."
+"ppd[.gz]]\n"
 "       プログラム | cupstestppd [-q] [-r] [-v[v]] -\n"
 
 #: systemv/lpstat.c:144 systemv/lpstat.c:155
 msgid "lpstat: Need \"completed\" or \"not-completed\" after -W!\n"
-msgstr "lpstat: -W のあとには \"completed\" または \"not-completed\" が必要です!\n"
+msgstr ""
+"lpstat: -W のあとには \"completed\" または \"not-completed\" が必要です!\n"
 
 #: systemv/lpstat.c:212 systemv/lpstat.c:213
 msgid "lpstat: The -b option requires a destination argument.\n"
@@ -1575,7 +1663,9 @@ msgstr "システムのデフォルトの宛先: %s\n"
 
 #: systemv/lpstat.c:1105 systemv/lpstat.c:1082 systemv/lpstat.c:1110
 #, c-format
-msgid "lpstat: error - %s environment variable names non-existent destination \"%s\"!\n"
+msgid ""
+"lpstat: error - %s environment variable names non-existent destination \"%s"
+"\"!\n"
 msgstr "lpstat: エラー - 環境変数 %s が存在しない宛先 \"%s\" を指しています!\n"
 
 #: systemv/lpstat.c:1109 systemv/lpstat.c:1086 systemv/lpstat.c:1114
@@ -1583,23 +1673,28 @@ msgid "no system default destination\n"
 msgstr "システムのデフォルトの宛先がありません\n"
 
 #: systemv/lpstat.c:1313 systemv/lpstat.c:1281 systemv/lpstat.c:1309
+#: systemv/lpstat.c:1311
 #, c-format
 msgid "Output for printer %s is sent to remote printer %s on %s\n"
 msgstr "プリンタ %1$s の出力は、%3$s のリモートプリンタ %2$s に送られます\n"
 
 #: systemv/lpstat.c:1319 systemv/lpstat.c:1323 systemv/lpstat.c:1287
-#: systemv/lpstat.c:1291 systemv/lpstat.c:1315
+#: systemv/lpstat.c:1291 systemv/lpstat.c:1315 systemv/lpstat.c:1317
+#: systemv/lpstat.c:1321
 #, c-format
 msgid "Output for printer %s is sent to %s\n"
 msgstr "プリンタ %s の出力は %s に送られます\n"
 
 #: systemv/lpstat.c:1331 systemv/lpstat.c:1299 systemv/lpstat.c:1327
+#: systemv/lpstat.c:1329
 #, c-format
 msgid "Output for printer %s/%s is sent to remote printer %s on %s\n"
-msgstr "プリンタ %1$s/%2$s の出力は、%4$s のリモートプリンタ %3$s に送られます\n"
+msgstr ""
+"プリンタ %1$s/%2$s の出力は、%4$s のリモートプリンタ %3$s に送られます\n"
 
 #: systemv/lpstat.c:1337 systemv/lpstat.c:1341 systemv/lpstat.c:1305
-#: systemv/lpstat.c:1309 systemv/lpstat.c:1333
+#: systemv/lpstat.c:1309 systemv/lpstat.c:1333 systemv/lpstat.c:1335
+#: systemv/lpstat.c:1339
 #, c-format
 msgid "Output for printer %s/%s is sent to %s\n"
 msgstr "プリンタ %s/%s の出力は %s に送られます\n"
@@ -1607,6 +1702,7 @@ msgstr "プリンタ %s/%s の出力は %s に送られます\n"
 #: systemv/lpstat.c:1346 systemv/lpstat.c:1349 systemv/lpstat.c:1352
 #: systemv/lpstat.c:1314 systemv/lpstat.c:1317 systemv/lpstat.c:1320
 #: systemv/lpstat.c:1342 systemv/lpstat.c:1345 systemv/lpstat.c:1348
+#: systemv/lpstat.c:1344 systemv/lpstat.c:1347 systemv/lpstat.c:1350
 #, c-format
 msgid "device for %s: %s\n"
 msgstr "%s のデバイス: %s\n"
@@ -1614,6 +1710,7 @@ msgstr "%s のデバイス: %s\n"
 #: systemv/lpstat.c:1359 systemv/lpstat.c:1362 systemv/lpstat.c:1365
 #: systemv/lpstat.c:1327 systemv/lpstat.c:1330 systemv/lpstat.c:1333
 #: systemv/lpstat.c:1355 systemv/lpstat.c:1358 systemv/lpstat.c:1361
+#: systemv/lpstat.c:1357 systemv/lpstat.c:1360 systemv/lpstat.c:1363
 #, c-format
 msgid "device for %s/%s: %s\n"
 msgstr "%s/%s のデバイス: %s\n"
@@ -1624,32 +1721,38 @@ msgid "lpstat: get-jobs failed: %s\n"
 msgstr "lpstat: get-jobs に失敗しました: %s\n"
 
 #: systemv/lpstat.c:1681 systemv/lpstat.c:1635 systemv/lpstat.c:1663
+#: systemv/lpstat.c:1665
 #, c-format
 msgid "\tqueued for %s\n"
 msgstr "\t%s にキューしました\n"
 
 #: systemv/lpstat.c:2037 systemv/lpstat.c:1971 systemv/lpstat.c:1999
+#: systemv/lpstat.c:2001
 #, c-format
 msgid "printer %s is idle.  enabled since %s\n"
 msgstr "プリンタ %s は待機中です。%s 以来有効です\n"
 
 #: systemv/lpstat.c:2042 systemv/lpstat.c:1976 systemv/lpstat.c:2004
+#: systemv/lpstat.c:2006
 #, c-format
 msgid "printer %s now printing %s-%d.  enabled since %s\n"
 msgstr "プリンタ %s は %s-%d を印刷しています。%s 以来有効です\n"
 
 #: systemv/lpstat.c:2048 systemv/lpstat.c:1982 systemv/lpstat.c:2010
+#: systemv/lpstat.c:2012
 #, c-format
 msgid "printer %s disabled since %s -\n"
 msgstr "プリンタ %s は %s 以来無効です -\n"
 
 #: systemv/lpstat.c:2056 systemv/lpstat.c:2169 systemv/lpstat.c:1990
 #: systemv/lpstat.c:2103 systemv/lpstat.c:2018 systemv/lpstat.c:2131
+#: systemv/lpstat.c:2020 systemv/lpstat.c:2133
 msgid "\treason unknown\n"
 msgstr "\t未知の理由\n"
 
 #: systemv/lpstat.c:2063 systemv/lpstat.c:2176 systemv/lpstat.c:1997
 #: systemv/lpstat.c:2110 systemv/lpstat.c:2025 systemv/lpstat.c:2138
+#: systemv/lpstat.c:2027 systemv/lpstat.c:2140
 msgid ""
 "\tForm mounted:\n"
 "\tContent types: any\n"
@@ -1661,56 +1764,66 @@ msgstr ""
 
 #: systemv/lpstat.c:2069 systemv/lpstat.c:2182 systemv/lpstat.c:2003
 #: systemv/lpstat.c:2116 systemv/lpstat.c:2031 systemv/lpstat.c:2144
+#: systemv/lpstat.c:2033 systemv/lpstat.c:2146
 #, c-format
 msgid "\tDescription: %s\n"
 msgstr "\t説明: %s\n"
 
 #: systemv/lpstat.c:2074 systemv/lpstat.c:2187 systemv/lpstat.c:2008
 #: systemv/lpstat.c:2121 systemv/lpstat.c:2036 systemv/lpstat.c:2149
+#: systemv/lpstat.c:2038 systemv/lpstat.c:2151
 msgid "\tAlerts:"
 msgstr "\t警報:"
 
 #: systemv/lpstat.c:2083 systemv/lpstat.c:2196 systemv/lpstat.c:2017
 #: systemv/lpstat.c:2130 systemv/lpstat.c:2045 systemv/lpstat.c:2158
+#: systemv/lpstat.c:2047 systemv/lpstat.c:2160
 #, c-format
 msgid "\tLocation: %s\n"
 msgstr "\t場所: %s\n"
 
 #: systemv/lpstat.c:2088 systemv/lpstat.c:2201 systemv/lpstat.c:2022
 #: systemv/lpstat.c:2135 systemv/lpstat.c:2050 systemv/lpstat.c:2163
+#: systemv/lpstat.c:2052 systemv/lpstat.c:2165
 msgid "\tConnection: remote\n"
 msgstr "\t接続: リモート\n"
 
 #: systemv/lpstat.c:2092 systemv/lpstat.c:2205 systemv/lpstat.c:2026
 #: systemv/lpstat.c:2139 systemv/lpstat.c:2054 systemv/lpstat.c:2167
+#: systemv/lpstat.c:2056 systemv/lpstat.c:2169
 #, c-format
 msgid "\tInterface: %s.ppd\n"
 msgstr "\tインターフェイス: %s.ppd\n"
 
 #: systemv/lpstat.c:2097 systemv/lpstat.c:2210 systemv/lpstat.c:2031
 #: systemv/lpstat.c:2144 systemv/lpstat.c:2059 systemv/lpstat.c:2172
+#: systemv/lpstat.c:2061 systemv/lpstat.c:2174
 msgid "\tConnection: direct\n"
 msgstr "\t接続: 直結\n"
 
 #: systemv/lpstat.c:2101 systemv/lpstat.c:2214 systemv/lpstat.c:2035
 #: systemv/lpstat.c:2148 systemv/lpstat.c:2063 systemv/lpstat.c:2176
+#: systemv/lpstat.c:2065 systemv/lpstat.c:2178
 #, c-format
 msgid "\tInterface: %s/interfaces/%s\n"
 msgstr "\tインターフェイス: %s/interfaces/%s\n"
 
 #: systemv/lpstat.c:2105 systemv/lpstat.c:2218 systemv/lpstat.c:2039
 #: systemv/lpstat.c:2152 systemv/lpstat.c:2067 systemv/lpstat.c:2180
+#: systemv/lpstat.c:2069 systemv/lpstat.c:2182
 #, c-format
 msgid "\tInterface: %s/ppd/%s.ppd\n"
 msgstr "\tインターフェイス: %s/ppd/%s.ppd\n"
 
 #: systemv/lpstat.c:2107 systemv/lpstat.c:2220 systemv/lpstat.c:2041
 #: systemv/lpstat.c:2154 systemv/lpstat.c:2069 systemv/lpstat.c:2182
+#: systemv/lpstat.c:2071 systemv/lpstat.c:2184
 msgid "\tOn fault: no alert\n"
 msgstr "\t失敗時: 警告なし\n"
 
 #: systemv/lpstat.c:2108 systemv/lpstat.c:2221 systemv/lpstat.c:2042
 #: systemv/lpstat.c:2155 systemv/lpstat.c:2070 systemv/lpstat.c:2183
+#: systemv/lpstat.c:2072 systemv/lpstat.c:2185
 msgid "\tAfter fault: continue\n"
 msgstr "\t失敗後: 継続\n"
 
@@ -1718,21 +1831,26 @@ msgstr "\t失敗後: 継続\n"
 #: systemv/lpstat.c:2239 systemv/lpstat.c:2046 systemv/lpstat.c:2060
 #: systemv/lpstat.c:2159 systemv/lpstat.c:2173 systemv/lpstat.c:2074
 #: systemv/lpstat.c:2088 systemv/lpstat.c:2187 systemv/lpstat.c:2201
+#: systemv/lpstat.c:2076 systemv/lpstat.c:2090 systemv/lpstat.c:2189
+#: systemv/lpstat.c:2203
 msgid "\tUsers allowed:\n"
 msgstr "\t許可されているユーザ:\n"
 
 #: systemv/lpstat.c:2119 systemv/lpstat.c:2232 systemv/lpstat.c:2053
 #: systemv/lpstat.c:2166 systemv/lpstat.c:2081 systemv/lpstat.c:2194
+#: systemv/lpstat.c:2083 systemv/lpstat.c:2196
 msgid "\tUsers denied:\n"
 msgstr "\t拒否されているユーザ:\n"
 
 #: systemv/lpstat.c:2127 systemv/lpstat.c:2240 systemv/lpstat.c:2061
 #: systemv/lpstat.c:2174 systemv/lpstat.c:2089 systemv/lpstat.c:2202
+#: systemv/lpstat.c:2091 systemv/lpstat.c:2204
 msgid "\t\t(all)\n"
 msgstr "\t\t(すべて)\n"
 
 #: systemv/lpstat.c:2129 systemv/lpstat.c:2242 systemv/lpstat.c:2063
 #: systemv/lpstat.c:2176 systemv/lpstat.c:2091 systemv/lpstat.c:2204
+#: systemv/lpstat.c:2093 systemv/lpstat.c:2206
 msgid "\tForms allowed:\n"
 msgstr "\t許可されている用紙:\n"
 
@@ -1740,54 +1858,66 @@ msgstr "\t許可されている用紙:\n"
 #: systemv/lpstat.c:2246 systemv/lpstat.c:2064 systemv/lpstat.c:2067
 #: systemv/lpstat.c:2177 systemv/lpstat.c:2180 systemv/lpstat.c:2092
 #: systemv/lpstat.c:2095 systemv/lpstat.c:2205 systemv/lpstat.c:2208
+#: systemv/lpstat.c:2094 systemv/lpstat.c:2097 systemv/lpstat.c:2207
+#: systemv/lpstat.c:2210
 msgid "\t\t(none)\n"
 msgstr "\t\t(なし)\n"
 
 #: systemv/lpstat.c:2131 systemv/lpstat.c:2244 systemv/lpstat.c:2065
 #: systemv/lpstat.c:2178 systemv/lpstat.c:2093 systemv/lpstat.c:2206
+#: systemv/lpstat.c:2095 systemv/lpstat.c:2208
 msgid "\tBanner required\n"
 msgstr "\tバナーが必要\n"
 
 #: systemv/lpstat.c:2132 systemv/lpstat.c:2245 systemv/lpstat.c:2066
 #: systemv/lpstat.c:2179 systemv/lpstat.c:2094 systemv/lpstat.c:2207
+#: systemv/lpstat.c:2096 systemv/lpstat.c:2209
 msgid "\tCharset sets:\n"
 msgstr "\t文字セット:\n"
 
 #: systemv/lpstat.c:2134 systemv/lpstat.c:2247 systemv/lpstat.c:2068
 #: systemv/lpstat.c:2181 systemv/lpstat.c:2096 systemv/lpstat.c:2209
+#: systemv/lpstat.c:2098 systemv/lpstat.c:2211
 msgid "\tDefault pitch:\n"
 msgstr "\tデフォルトピッチ:\n"
 
 #: systemv/lpstat.c:2135 systemv/lpstat.c:2248 systemv/lpstat.c:2069
 #: systemv/lpstat.c:2182 systemv/lpstat.c:2097 systemv/lpstat.c:2210
+#: systemv/lpstat.c:2099 systemv/lpstat.c:2212
 msgid "\tDefault page size:\n"
 msgstr "\tデフォルト用紙サイズ:\n"
 
 #: systemv/lpstat.c:2136 systemv/lpstat.c:2249 systemv/lpstat.c:2070
 #: systemv/lpstat.c:2183 systemv/lpstat.c:2098 systemv/lpstat.c:2211
+#: systemv/lpstat.c:2100 systemv/lpstat.c:2213
 msgid "\tDefault port settings:\n"
 msgstr "\tデフォルトポート設定:\n"
 
 #: systemv/lpstat.c:2146 systemv/lpstat.c:2080 systemv/lpstat.c:2108
+#: systemv/lpstat.c:2110
 #, c-format
 msgid "printer %s/%s is idle.  enabled since %s\n"
 msgstr "プリンタ %s/%s は待機中です。%s 以来有効です\n"
 
 #: systemv/lpstat.c:2153 systemv/lpstat.c:2087 systemv/lpstat.c:2115
+#: systemv/lpstat.c:2117
 #, c-format
 msgid "printer %s/%s now printing %s-%d.  enabled since %s\n"
 msgstr "プリンタ %s/%s は %s-%d を印刷しています。%s 以来有効です\n"
 
 #: systemv/lpstat.c:2160 systemv/lpstat.c:2094 systemv/lpstat.c:2122
+#: systemv/lpstat.c:2124
 #, c-format
 msgid "printer %s/%s disabled since %s -\n"
 msgstr "プリンタ %s/%s は %s 以来無効です -\n"
 
 #: systemv/lpstat.c:2279 systemv/lpstat.c:2212 systemv/lpstat.c:2240
+#: systemv/lpstat.c:2242
 msgid "scheduler is running\n"
 msgstr "スケジューラは動作中です\n"
 
 #: systemv/lpstat.c:2281 systemv/lpstat.c:2214 systemv/lpstat.c:2242
+#: systemv/lpstat.c:2244
 msgid "scheduler is not running\n"
 msgstr "スケジューラは動作していません\n"
 
@@ -1874,7 +2004,8 @@ msgstr "lpadmin: '-r' オプションのあとにはクラス名が必要です!
 
 #: systemv/lpadmin.c:479
 msgid "lpadmin: Expected allow/deny:userlist after '-u' option!\n"
-msgstr "lpadmin: '-u' オプションのあとには allow/deny:ユーザリスト が必要です!\n"
+msgstr ""
+"lpadmin: '-u' オプションのあとには allow/deny:ユーザリスト が必要です!\n"
 
 #: systemv/lpadmin.c:496
 #, c-format
@@ -1895,7 +2026,8 @@ msgstr "lpadmin: '-v' オプションのあとにはデバイス URI が必要
 
 #: systemv/lpadmin.c:572
 msgid "lpadmin: Expected printer or class after '-x' option!\n"
-msgstr "lpadmin: '-x' オプションのあとにはプリンタ名またはクラス名が必要です!\n"
+msgstr ""
+"lpadmin: '-x' オプションのあとにはプリンタ名またはクラス名が必要です!\n"
 
 #: systemv/lpadmin.c:612
 msgid ""
@@ -1975,7 +2107,8 @@ msgstr ""
 "\n"
 "    lpadmin [-h サーバ] -d 宛先\n"
 "    lpadmin [-h サーバ] -x 宛先\n"
-"    lpadmin [-h サーバ] -p プリンタ [-c 追加クラス] [-i インターフェイス] [-m モデル]\n"
+"    lpadmin [-h サーバ] -p プリンタ [-c 追加クラス] [-i インターフェイス] [-"
+"m モデル]\n"
 "                       [-r 削除クラス] [-v デバイス] [-D 説明]\n"
 "                       [-P PPDファイル] [-o 名前=値]\n"
 "                       [-u allow:ユーザ,ユーザ] [-u deny:ユーザ,ユーザ]\n"
@@ -2039,7 +2172,8 @@ msgstr "lp: -i オプションのあとにはジョブ ID が必要です!\n"
 
 #: systemv/lp.c:230
 msgid "lp: Error - cannot print files and alter jobs simultaneously!\n"
-msgstr "lp: エラー - ファイルを印刷できず、ジョブを同時に変えることができません!\n"
+msgstr ""
+"lp: エラー - ファイルを印刷できず、ジョブを同時に変えることができません!\n"
 
 #: systemv/lp.c:242
 msgid "lp: Error - bad job ID!\n"
@@ -2108,8 +2242,11 @@ msgid "lp: Unknown option '%c'!\n"
 msgstr "lp: '%c' は未知のオプションです!\n"
 
 #: systemv/lp.c:482
-msgid "lp: Error - cannot print from stdin if files or a job ID are provided!\n"
-msgstr "lp: エラー - ファイルまたはジョブ ID が提供されている場合、標準入力から印刷できません!\n"
+msgid ""
+"lp: Error - cannot print from stdin if files or a job ID are provided!\n"
+msgstr ""
+"lp: エラー - ファイルまたはジョブ ID が提供されている場合、標準入力から印刷で"
+"きません!\n"
 
 #: systemv/lp.c:497
 #, c-format
@@ -2148,7 +2285,7 @@ msgstr "lp: 標準入力が空なので、ジョブは送られていません
 msgid "lp: unable to print file: %s\n"
 msgstr "lp: ファイルを印刷できません: %s\n"
 
-#: systemv/lp.c:656 systemv/lp.c:653 systemv/lp.c:713
+#: systemv/lp.c:656 systemv/lp.c:653 systemv/lp.c:713 systemv/lp.c:729
 #, c-format
 msgid "request id is %s-%d (%d file(s))\n"
 msgstr "リクエスト ID は %s-%d です (%d 個のファイル)\n"
@@ -2336,7 +2473,8 @@ msgstr "lppasswd: パスワードファイルは更新されません!\n"
 #: systemv/lppasswd.c:469
 #, c-format
 msgid "lppasswd: failed to backup old password file: %s\n"
-msgstr "lppasswd: 古いパスワードファイルをバックアップするのに失敗しました: %s\n"
+msgstr ""
+"lppasswd: 古いパスワードファイルをバックアップするのに失敗しました: %s\n"
 
 #: systemv/lppasswd.c:482
 #, c-format
@@ -2357,274 +2495,297 @@ msgstr ""
 "       lppasswd [-g グループ名] -a [ユーザ名]\n"
 "       lppasswd [-g グループ名] -x [ユーザ名]\n"
 
-#: cgi-bin/admin.c:125
+#: cgi-bin/admin.c:125 cgi-bin/admin.c:142
 msgid "Start Printer"
 msgstr "プリンタの開始"
 
-#: cgi-bin/admin.c:127
+#: cgi-bin/admin.c:127 cgi-bin/admin.c:144
 msgid "Stop Printer"
 msgstr "プリンタの停止"
 
-#: cgi-bin/admin.c:129
+#: cgi-bin/admin.c:129 cgi-bin/admin.c:146
 msgid "Start Class"
 msgstr "クラスの開始"
 
-#: cgi-bin/admin.c:131
+#: cgi-bin/admin.c:131 cgi-bin/admin.c:148
 msgid "Stop Class"
 msgstr "クラスの停止"
 
-#: cgi-bin/admin.c:133
+#: cgi-bin/admin.c:133 cgi-bin/admin.c:150
 msgid "Accept Jobs"
 msgstr "ジョブの受け付け"
 
-#: cgi-bin/admin.c:135
+#: cgi-bin/admin.c:135 cgi-bin/admin.c:152
 msgid "Reject Jobs"
 msgstr "ジョブの拒否"
 
-#: cgi-bin/admin.c:137
+#: cgi-bin/admin.c:137 cgi-bin/admin.c:154
 msgid "Purge Jobs"
 msgstr "ジョブの削除"
 
-#: cgi-bin/admin.c:141
+#: cgi-bin/admin.c:141 cgi-bin/admin.c:158
 msgid "Set As Default"
 msgstr "デフォルトに設定"
 
 #: cgi-bin/admin.c:168 cgi-bin/admin.c:179 cgi-bin/admin.c:2690
+#: cgi-bin/admin.c:185 cgi-bin/admin.c:196 cgi-bin/admin.c:2734
 msgid "Administration"
 msgstr "管理"
 
-#: cgi-bin/admin.c:224
+#: cgi-bin/admin.c:224 cgi-bin/admin.c:241
 msgid "Modify Class"
 msgstr "クラスの変更"
 
-#: cgi-bin/admin.c:224
+#: cgi-bin/admin.c:224 cgi-bin/admin.c:241
 msgid "Add Class"
 msgstr "クラスの追加"
 
-#: cgi-bin/admin.c:385
-msgid "The class name may only contain up to 127 printable characters and may not contain spaces, slashes (/), or the pound sign (#)."
-msgstr "クラス名は 127 文字以内の表示可能文字から成り、空白、スラッシュ (/)、ポンド記号 (#) を含んではなりません。"
+#: cgi-bin/admin.c:385 cgi-bin/admin.c:402
+msgid ""
+"The class name may only contain up to 127 printable characters and may not "
+"contain spaces, slashes (/), or the pound sign (#)."
+msgstr ""
+"クラス名は 127 文字以内の表示可能文字から成り、空白、スラッシュ (/)、ポンド記"
+"号 (#) を含んではなりません。"
 
-#: cgi-bin/admin.c:444
+#: cgi-bin/admin.c:444 cgi-bin/admin.c:462
 msgid "Unable to modify class:"
 msgstr "クラスを変更できません:"
 
-#: cgi-bin/admin.c:445
+#: cgi-bin/admin.c:445 cgi-bin/admin.c:463
 msgid "Unable to add class:"
 msgstr "クラスを追加できません:"
 
-#: cgi-bin/admin.c:514
+#: cgi-bin/admin.c:514 cgi-bin/admin.c:532
 msgid "Modify Printer"
 msgstr "プリンタの変更"
 
-#: cgi-bin/admin.c:514
+#: cgi-bin/admin.c:514 cgi-bin/admin.c:532
 msgid "Add Printer"
 msgstr "プリンタの追加"
 
-#: cgi-bin/admin.c:583
-msgid "The printer name may only contain up to 127 printable characters and may not contain spaces, slashes (/), or the pound sign (#)."
-msgstr "プリンタ名は 127 文字以内の表示可能文字から成り、空白、スラッシュ (/)、ポンド記号 (#) を含んではなりません。"
+#: cgi-bin/admin.c:583 cgi-bin/admin.c:602
+msgid ""
+"The printer name may only contain up to 127 printable characters and may not "
+"contain spaces, slashes (/), or the pound sign (#)."
+msgstr ""
+"プリンタ名は 127 文字以内の表示可能文字から成り、空白、スラッシュ (/)、ポンド"
+"記号 (#) を含んではなりません。"
 
-#: cgi-bin/admin.c:900
+#: cgi-bin/admin.c:900 cgi-bin/admin.c:930
 msgid "Unable to get list of printer drivers:"
 msgstr "プリンタドライバのリストを取得できません:"
 
-#: cgi-bin/admin.c:983
+#: cgi-bin/admin.c:983 cgi-bin/admin.c:1014
 msgid "Unable to modify printer:"
 msgstr "プリンタを変更できません:"
 
-#: cgi-bin/admin.c:984
+#: cgi-bin/admin.c:984 cgi-bin/admin.c:1015
 msgid "Unable to add printer:"
 msgstr "プリンタを追加できません:"
 
-#: cgi-bin/admin.c:1051
+#: cgi-bin/admin.c:1051 cgi-bin/admin.c:1082
 msgid "Set Printer Options"
 msgstr "プリンタオプションの設定"
 
 #: cgi-bin/admin.c:1062 cgi-bin/admin.c:2330 cgi-bin/admin.c:2391
 #: cgi-bin/admin.c:3112 cgi-bin/admin.c:3213 cgi-bin/admin.c:3449
+#: cgi-bin/admin.c:1095 cgi-bin/admin.c:2374 cgi-bin/admin.c:2435
+#: cgi-bin/admin.c:3156 cgi-bin/admin.c:3258 cgi-bin/admin.c:3496
 msgid "Missing form variable!"
 msgstr "フォームの値がありません!"
 
-#: cgi-bin/admin.c:1076
+#: cgi-bin/admin.c:1076 cgi-bin/admin.c:1113
 msgid "Unable to get PPD file!"
 msgstr "PPD ファイルを取得できません!"
 
-#: cgi-bin/admin.c:1084
+#: cgi-bin/admin.c:1084 cgi-bin/admin.c:1123
 msgid "Unable to open PPD file:"
 msgstr "PPD ファイルを取得できません:"
 
-#: cgi-bin/admin.c:1241
+#: cgi-bin/admin.c:1241 cgi-bin/admin.c:1282
 msgid "Banners"
 msgstr "バナー"
 
-#: cgi-bin/admin.c:1255
+#: cgi-bin/admin.c:1255 cgi-bin/admin.c:1296
 msgid "Starting Banner"
 msgstr "開始バナー"
 
-#: cgi-bin/admin.c:1262
+#: cgi-bin/admin.c:1262 cgi-bin/admin.c:1303
 msgid "Ending Banner"
 msgstr "終了バナー"
 
-#: cgi-bin/admin.c:1280
+#: cgi-bin/admin.c:1280 cgi-bin/admin.c:1321
 msgid "Policies"
 msgstr "ポリシー"
 
-#: cgi-bin/admin.c:1304
+#: cgi-bin/admin.c:1304 cgi-bin/admin.c:1345
 msgid "Error Policy"
 msgstr "エラーポリシー"
 
-#: cgi-bin/admin.c:1331
+#: cgi-bin/admin.c:1331 cgi-bin/admin.c:1372
 msgid "Operation Policy"
 msgstr "操作ポリシー"
 
-#: cgi-bin/admin.c:1352 cgi-bin/admin.c:1372
+#: cgi-bin/admin.c:1352 cgi-bin/admin.c:1372 cgi-bin/admin.c:1393
+#: cgi-bin/admin.c:1413
 msgid "PS Binary Protocol"
 msgstr "PS バイナリプロトコル"
 
-#: cgi-bin/admin.c:1358
+#: cgi-bin/admin.c:1358 cgi-bin/admin.c:1399
 msgid "None"
 msgstr "なし"
 
-#: cgi-bin/admin.c:1490
+#: cgi-bin/admin.c:1490 cgi-bin/admin.c:1534
 msgid "Unable to set options:"
 msgstr "オプションを設定できません:"
 
 #: cgi-bin/admin.c:1591 cgi-bin/admin.c:1607 cgi-bin/admin.c:1620
-#: cgi-bin/admin.c:2099 cgi-bin/admin.c:2106
+#: cgi-bin/admin.c:2099 cgi-bin/admin.c:2106 cgi-bin/admin.c:1635
+#: cgi-bin/admin.c:1651 cgi-bin/admin.c:1664 cgi-bin/admin.c:2143
+#: cgi-bin/admin.c:2150
 msgid "Change Settings"
 msgstr "設定の変更"
 
 #: cgi-bin/admin.c:1592 cgi-bin/admin.c:1608 cgi-bin/admin.c:1621
+#: cgi-bin/admin.c:1636 cgi-bin/admin.c:1652 cgi-bin/admin.c:1665
 msgid "Unable to change server settings:"
 msgstr "サーバの設定を変更できません:"
 
-#: cgi-bin/admin.c:2097 cgi-bin/admin.c:2190
+#: cgi-bin/admin.c:2097 cgi-bin/admin.c:2190 cgi-bin/admin.c:2141
+#: cgi-bin/admin.c:2234
 msgid "Unable to upload cupsd.conf file:"
 msgstr "cupsd.conf ファイルをアップロードできません:"
 
 #: cgi-bin/admin.c:2134 cgi-bin/admin.c:2146 cgi-bin/admin.c:2193
 #: cgi-bin/admin.c:2200 cgi-bin/admin.c:2232 cgi-bin/admin.c:2244
-#: cgi-bin/admin.c:2267
+#: cgi-bin/admin.c:2267 cgi-bin/admin.c:2178 cgi-bin/admin.c:2190
+#: cgi-bin/admin.c:2237 cgi-bin/admin.c:2276 cgi-bin/admin.c:2288
+#: cgi-bin/admin.c:2311
 msgid "Edit Configuration File"
 msgstr "設定ファイルの編集"
 
-#: cgi-bin/admin.c:2135 cgi-bin/admin.c:2147
+#: cgi-bin/admin.c:2135 cgi-bin/admin.c:2147 cgi-bin/admin.c:2179
+#: cgi-bin/admin.c:2191
 msgid "Unable to create temporary file:"
 msgstr "テンポラリファイルを作成できません:"
 
 #: cgi-bin/admin.c:2233 cgi-bin/admin.c:2245 cgi-bin/admin.c:2268
+#: cgi-bin/admin.c:2277 cgi-bin/admin.c:2289 cgi-bin/admin.c:2312
 msgid "Unable to access cupsd.conf file:"
 msgstr "cupsd.conf ファイルにアクセスできません:"
 
-#: cgi-bin/admin.c:2247
+#: cgi-bin/admin.c:2247 cgi-bin/admin.c:2291
 msgid "Unable to edit cupsd.conf files larger than 1MB!"
 msgstr "1MB 以上の cupsd.conf ファイルは編集できません!"
 
-#: cgi-bin/admin.c:2316
+#: cgi-bin/admin.c:2316 cgi-bin/admin.c:2360
 msgid "Delete Class"
 msgstr "クラスの削除"
 
-#: cgi-bin/admin.c:2357
+#: cgi-bin/admin.c:2357 cgi-bin/admin.c:2401
 msgid "Unable to delete class:"
 msgstr "クラスを削除できません:"
 
-#: cgi-bin/admin.c:2377
+#: cgi-bin/admin.c:2377 cgi-bin/admin.c:2421
 msgid "Delete Printer"
 msgstr "プリンタの削除"
 
-#: cgi-bin/admin.c:2418
+#: cgi-bin/admin.c:2418 cgi-bin/admin.c:2462
 msgid "Unable to delete printer:"
 msgstr "プリンタを削除できません:"
 
-#: cgi-bin/admin.c:2447
+#: cgi-bin/admin.c:2447 cgi-bin/admin.c:2491
 msgid "Export Printers to Samba"
 msgstr "プリンタを Samba にエキスポート"
 
-#: cgi-bin/admin.c:2515
+#: cgi-bin/admin.c:2515 cgi-bin/admin.c:2559
 msgid "Unable to fork process!"
 msgstr "プロセスをフォークできません!"
 
-#: cgi-bin/admin.c:2534
+#: cgi-bin/admin.c:2534 cgi-bin/admin.c:2578
 msgid "Unable to connect to server!"
 msgstr "サーバに接続できません!"
 
-#: cgi-bin/admin.c:2538
+#: cgi-bin/admin.c:2538 cgi-bin/admin.c:2582
 msgid "Unable to get printer attributes!"
 msgstr "プリンタ属性を取得できません!"
 
-#: cgi-bin/admin.c:2543
+#: cgi-bin/admin.c:2543 cgi-bin/admin.c:2587
 msgid "Unable to convert PPD file!"
 msgstr "PPD ファイルを変換できません!"
 
-#: cgi-bin/admin.c:2547
+#: cgi-bin/admin.c:2547 cgi-bin/admin.c:2591
 msgid "Unable to copy Windows 2000 printer driver files!"
 msgstr "Windows 2000 プリンタドライバファイルをコピーできません!"
 
-#: cgi-bin/admin.c:2552
+#: cgi-bin/admin.c:2552 cgi-bin/admin.c:2596
 msgid "Unable to install Windows 2000 printer driver files!"
 msgstr "Windows 2000 プリンタドライバファイルをインストールできません!"
 
-#: cgi-bin/admin.c:2557
+#: cgi-bin/admin.c:2557 cgi-bin/admin.c:2601
 msgid "Unable to copy Windows 9x printer driver files!"
 msgstr "Windows 9x プリンタドライバファイルをコピーできません!"
 
-#: cgi-bin/admin.c:2562
+#: cgi-bin/admin.c:2562 cgi-bin/admin.c:2606
 msgid "Unable to install Windows 9x printer driver files!"
 msgstr "Windows 9x プリンタドライバファイルをインストールできません!"
 
-#: cgi-bin/admin.c:2567
+#: cgi-bin/admin.c:2567 cgi-bin/admin.c:2611
 msgid "Unable to set Windows printer driver!"
 msgstr "Windows プリンタドライバを設定できません!"
 
-#: cgi-bin/admin.c:2572
+#: cgi-bin/admin.c:2572 cgi-bin/admin.c:2616
 msgid "No printer drivers found!"
 msgstr "プリンタドライバが見つかりません!"
 
-#: cgi-bin/admin.c:2576
+#: cgi-bin/admin.c:2576 cgi-bin/admin.c:2620
 msgid "Unable to execute cupsaddsmb command!"
 msgstr "cupsaddsmb コマンドを実行できません!"
 
-#: cgi-bin/admin.c:2582
+#: cgi-bin/admin.c:2582 cgi-bin/admin.c:2626
 #, c-format
 msgid "cupsaddsmb failed with status %d"
 msgstr "cupsaddsmb は状態 %d で失敗しました"
 
-#: cgi-bin/admin.c:2592
+#: cgi-bin/admin.c:2592 cgi-bin/admin.c:2636
 #, c-format
 msgid "cupsaddsmb crashed on signal %d"
 msgstr "cupsaddsmb はシグナル %d でクラッシュしました"
 
-#: cgi-bin/admin.c:2608
+#: cgi-bin/admin.c:2608 cgi-bin/admin.c:2652
 msgid "A Samba username is required to export printer drivers!"
 msgstr "プリンタドライバをエキスポートするには、Samba のユーザ名が必要です!"
 
-#: cgi-bin/admin.c:2612
+#: cgi-bin/admin.c:2612 cgi-bin/admin.c:2656
 msgid "A Samba password is required to export printer drivers!"
 msgstr "プリンタドライバをエキスポートするには Samba のパスワードが必要です!"
 
-#: cgi-bin/admin.c:2704
+#: cgi-bin/admin.c:2704 cgi-bin/admin.c:2748
 msgid "Unable to open cupsd.conf file:"
 msgstr "cupsd.conf ファイルを開くことができません:"
 
-#: cgi-bin/admin.c:3144 cgi-bin/admin.c:3400
+#: cgi-bin/admin.c:3144 cgi-bin/admin.c:3400 cgi-bin/admin.c:3189
+#: cgi-bin/admin.c:3447
 msgid "Unable to change printer:"
 msgstr "プリンタを変更できません:"
 
 #: cgi-bin/admin.c:3214 cgi-bin/admin.c:3259 cgi-bin/admin.c:3399
-#: cgi-bin/admin.c:3417
+#: cgi-bin/admin.c:3417 cgi-bin/admin.c:3305 cgi-bin/admin.c:3446
+#: cgi-bin/admin.c:3464
 msgid "Set Allowed Users"
 msgstr "許可するユーザの設定"
 
-#: cgi-bin/admin.c:3262
+#: cgi-bin/admin.c:3262 cgi-bin/admin.c:3308
 msgid "Unable to get printer attributes:"
 msgstr "プリンタ属性を取得できません:"
 
 #: cgi-bin/admin.c:3450 cgi-bin/admin.c:3488 cgi-bin/admin.c:3506
+#: cgi-bin/admin.c:3497 cgi-bin/admin.c:3536 cgi-bin/admin.c:3554
 msgid "Set Publishing"
 msgstr "公開の設定"
 
-#: cgi-bin/admin.c:3489
+#: cgi-bin/admin.c:3489 cgi-bin/admin.c:3537
 msgid "Unable to change printer-is-shared attribute:"
 msgstr "printer-is-shared 属性を変更できません:"
 
@@ -2632,15 +2793,16 @@ msgstr "printer-is-shared 属性を変更できません:"
 msgid "Classes"
 msgstr "クラス"
 
-#: cgi-bin/classes.c:355
+#: cgi-bin/classes.c:355 cgi-bin/classes.c:356
 msgid "Unable to get class list:"
 msgstr "クラスリストを取得できません:"
 
-#: cgi-bin/classes.c:454
+#: cgi-bin/classes.c:454 cgi-bin/classes.c:455
 msgid "Unable to get class status:"
 msgstr "クラスの状態を取得できません:"
 
 #: cgi-bin/ipp-var.c:366 cgi-bin/ipp-var.c:419 cgi-bin/ipp-var.c:489
+#: cgi-bin/ipp-var.c:490
 msgid "Move Job"
 msgstr "ジョブの移動"
 
@@ -2648,23 +2810,23 @@ msgstr "ジョブの移動"
 msgid "Unable to find destination for job!"
 msgstr "ジョブの宛先が見つかりません!"
 
-#: cgi-bin/ipp-var.c:421 cgi-bin/ipp-var.c:491
+#: cgi-bin/ipp-var.c:421 cgi-bin/ipp-var.c:491 cgi-bin/ipp-var.c:492
 msgid "Move All Jobs"
 msgstr "すべてのジョブの移動"
 
-#: cgi-bin/ipp-var.c:496
+#: cgi-bin/ipp-var.c:496 cgi-bin/ipp-var.c:497
 msgid "Unable to move job"
 msgstr "ジョブを移動できません"
 
-#: cgi-bin/ipp-var.c:498
+#: cgi-bin/ipp-var.c:498 cgi-bin/ipp-var.c:499
 msgid "Unable to move jobs"
 msgstr "ジョブを移動できません"
 
-#: cgi-bin/ipp-var.c:603
+#: cgi-bin/ipp-var.c:603 cgi-bin/ipp-var.c:605
 msgid "Print Test Page"
 msgstr "テストページの印刷"
 
-#: cgi-bin/ipp-var.c:606
+#: cgi-bin/ipp-var.c:606 cgi-bin/ipp-var.c:608
 msgid "Unable to print test page:"
 msgstr "テストページを印刷できません:"
 
@@ -2676,15 +2838,15 @@ msgstr "ジョブ"
 msgid "Job operation failed:"
 msgstr "ジョブ操作に失敗しました:"
 
-#: cgi-bin/printers.c:161 cgi-bin/printers.c:208
+#: cgi-bin/printers.c:161 cgi-bin/printers.c:208 cgi-bin/printers.c:211
 msgid "Printers"
 msgstr "プリンタ"
 
-#: cgi-bin/printers.c:362
+#: cgi-bin/printers.c:362 cgi-bin/printers.c:366
 msgid "Unable to get printer list:"
 msgstr "プリンタリストを取得できません:"
 
-#: cgi-bin/printers.c:461
+#: cgi-bin/printers.c:461 cgi-bin/printers.c:468
 msgid "Unable to get printer status:"
 msgstr "プリンタの状態を取得できません:"
 
@@ -2784,7 +2946,7 @@ msgstr "カスタム"
 msgid "JCL"
 msgstr "JCL"
 
-#: scheduler/ipp.c:2184
+#: scheduler/ipp.c:2184 scheduler/ipp.c:2226
 msgid "No authentication information provided!"
 msgstr "認証情報が提供されていません!"
 
@@ -2809,7 +2971,9 @@ msgstr "cupsaddsmb: Windows プリンタドライバがインストールされ
 
 #: systemv/cupsaddsmb.c:810
 msgid "cupsaddsmb: Warning, no Windows 2000 printer drivers are installed!\n"
-msgstr "cupsaddsmb: 警告: Windows 2000 プリンタドライバがインストールされていません!\n"
+msgstr ""
+"cupsaddsmb: 警告: Windows 2000 プリンタドライバがインストールされていませ"
+"ん!\n"
 
 #: systemv/lpadmin.c:881
 #, c-format
@@ -2859,7 +3023,9 @@ msgstr "使い方: lpmove ジョブまたはソース 宛先\n"
 
 #: systemv/lpstat.c:144 systemv/lpstat.c:156
 msgid "lpstat: Need \"completed\", \"not-completed\", or \"all\" after -W!\n"
-msgstr "lpstat: -W のあとには \"completed\"、\"not-completed\"、\"all\" のいずれかが必要です!\n"
+msgstr ""
+"lpstat: -W のあとには \"completed\"、\"not-completed\"、\"all\" のいずれかが"
+"必要です!\n"
 
 #: systemv/lpstat.c:740 systemv/lpstat.c:768
 #, c-format
@@ -2894,13 +3060,14 @@ msgid "lpc> "
 msgstr "lpc> "
 
 #: berkeley/lpq.c:93 systemv/cancel.c:250 systemv/cancel.c:332
+#: systemv/cancel.c:331
 #, c-format
 msgid "%s: Unable to contact server!\n"
 msgstr "%s: サーバに連絡できません!\n"
 
 #: berkeley/lpq.c:138 berkeley/lpr.c:128 berkeley/lprm.c:144
 #: systemv/accept.c:120 systemv/cancel.c:107 systemv/lp.c:150
-#: systemv/lpstat.c:144
+#: systemv/lpstat.c:144 berkeley/lpr.c:130 systemv/lp.c:154
 #, c-format
 msgid "%s: Error - expected username after '-U' option!\n"
 msgstr "%s: エラー - '-U' オプションのあとにはユーザ名が必要です!\n"
@@ -2916,14 +3083,15 @@ msgid "%s: Unknown destination \"%s\"!\n"
 msgstr "%s: \"%s\" は未知の宛先です!\n"
 
 #: berkeley/lpq.c:201 berkeley/lprm.c:167 systemv/accept.c:146
-#: systemv/cancel.c:135 systemv/lp.c:227 systemv/lpstat.c:300
+#: systemv/cancel.c:135 systemv/lp.c:227 systemv/lpstat.c:300 systemv/lp.c:231
 #, c-format
 msgid "%s: Error - expected hostname after '-h' option!\n"
 msgstr "%s: エラー -  '-h' オプションのあとにはホスト名が必要です!\n"
 
 #: berkeley/lpq.c:253
 #, c-format
-msgid "%s: error - %s environment variable names non-existent destination \"%s\"!\n"
+msgid ""
+"%s: error - %s environment variable names non-existent destination \"%s\"!\n"
 msgstr "%s: エラー - 環境変数 %s が存在しない宛先 \"%s\" を指しています!\n"
 
 #: berkeley/lpq.c:258
@@ -2932,86 +3100,95 @@ msgid "%s: error - no default destination available.\n"
 msgstr "%s: エラー - 利用可能なデフォルトの宛先がありません。\n"
 
 #: berkeley/lpq.c:647
-msgid "Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]\n"
-msgstr "使い方: lpq [-P 宛先] [-U ユーザ名] [-h ホスト名[:ポート]] [-l] [+インターバル]\n"
+msgid ""
+"Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]\n"
+msgstr ""
+"使い方: lpq [-P 宛先] [-U ユーザ名] [-h ホスト名[:ポート]] [-l] [+インターバ"
+"ル]\n"
 
-#: berkeley/lpr.c:148
+#: berkeley/lpr.c:148 berkeley/lpr.c:150
 #, c-format
 msgid "%s: Error - expected hostname after '-H' option!\n"
 msgstr "%s: エラー - '-H' オプションのあとにはホスト名が必要です!\n"
 
-#: berkeley/lpr.c:171
+#: berkeley/lpr.c:171 berkeley/lpr.c:173
 #, c-format
 msgid "%s: Error - expected value after '-%c' option!\n"
 msgstr "%s: エラー -  '-%c' オプションのあとには値が必要です!\n"
 
-#: berkeley/lpr.c:185
+#: berkeley/lpr.c:185 berkeley/lpr.c:187
 #, c-format
-msgid "%s: Warning - '%c' format modifier not supported - output may not be correct!\n"
-msgstr "%s: 警告 - '%c' 形式修飾子はサポートされていません - 出力は正しくないものになるかもしれません!\n"
+msgid ""
+"%s: Warning - '%c' format modifier not supported - output may not be "
+"correct!\n"
+msgstr ""
+"%s: 警告 - '%c' 形式修飾子はサポートされていません - 出力は正しくないものにな"
+"るかもしれません!\n"
 
-#: berkeley/lpr.c:199
+#: berkeley/lpr.c:199 berkeley/lpr.c:201
 #, c-format
 msgid "%s: error - expected option=value after '-o' option!\n"
 msgstr "%s: '-o' オプションのあとには オプション=値 が必要です!\n"
 
-#: berkeley/lpr.c:250
+#: berkeley/lpr.c:250 berkeley/lpr.c:258
 #, c-format
 msgid "%s: Error - expected destination after '-P' option!\n"
 msgstr "%s: エラー - '-P' オプションのあとには宛先が必要です!\n"
 
-#: berkeley/lpr.c:285
+#: berkeley/lpr.c:285 berkeley/lpr.c:293
 #, c-format
 msgid "%s: Error - expected copy count after '-#' option!\n"
 msgstr "%s: エラー - '-#' オプションのあとにはコピー数が必要です!\n"
 
-#: berkeley/lpr.c:309
+#: berkeley/lpr.c:309 berkeley/lpr.c:317
 #, c-format
 msgid "%s: Error - expected name after '-%c' option!\n"
 msgstr "%s: エラー - '-%c' オプションのあとには名前が必要です!\n"
 
 #: berkeley/lpr.c:320 berkeley/lprm.c:179 systemv/accept.c:176
 #: systemv/cancel.c:169 systemv/lp.c:529 systemv/lpstat.c:461
+#: berkeley/lpr.c:328 systemv/lp.c:545
 #, c-format
 msgid "%s: Error - unknown option '%c'!\n"
 msgstr "%s: エラー - '%c' は未知のオプションです!\n"
 
-#: berkeley/lpr.c:333 systemv/lp.c:554
+#: berkeley/lpr.c:333 systemv/lp.c:554 berkeley/lpr.c:341 systemv/lp.c:570
 #, c-format
 msgid "%s: Error - unable to access \"%s\" - %s\n"
 msgstr "%s: エラー - \"%s\" にアクセスできません - %s\n"
 
-#: berkeley/lpr.c:351 systemv/lp.c:571
+#: berkeley/lpr.c:351 systemv/lp.c:571 berkeley/lpr.c:359 systemv/lp.c:587
 #, c-format
 msgid "%s: Error - too many files - \"%s\"\n"
 msgstr "%s: エラー - ファイルが多すぎます - \"%s\"\n"
 
-#: berkeley/lpr.c:393 systemv/lp.c:621
+#: berkeley/lpr.c:393 systemv/lp.c:621 berkeley/lpr.c:401 systemv/lp.c:637
 #, c-format
-msgid "%s: Error - %s environment variable names non-existent destination \"%s\"!\n"
+msgid ""
+"%s: Error - %s environment variable names non-existent destination \"%s\"!\n"
 msgstr "%s: エラー - 環境変数 %s が存在しない宛先 \"%s\" を指しています!\n"
 
-#: berkeley/lpr.c:398 systemv/lp.c:626
+#: berkeley/lpr.c:398 systemv/lp.c:626 berkeley/lpr.c:406 systemv/lp.c:642
 #, c-format
 msgid "%s: Error - no default destination available.\n"
 msgstr "%s: エラー - 利用可能なデフォルトの宛先がありません。\n"
 
-#: berkeley/lpr.c:402 systemv/lp.c:630
+#: berkeley/lpr.c:402 systemv/lp.c:630 berkeley/lpr.c:410 systemv/lp.c:646
 #, c-format
 msgid "%s: Error - scheduler not responding!\n"
 msgstr "%s: エラー - スケジューラが応答していません!\n"
 
-#: berkeley/lpr.c:452 systemv/lp.c:670
+#: berkeley/lpr.c:452 systemv/lp.c:670 berkeley/lpr.c:460 systemv/lp.c:686
 #, c-format
 msgid "%s: Error - unable to create temporary file \"%s\" - %s\n"
 msgstr "%s: エラー - テンポラリファイル \"%s\" を作成できません - %s\n"
 
-#: berkeley/lpr.c:462 systemv/lp.c:679
+#: berkeley/lpr.c:462 systemv/lp.c:679 berkeley/lpr.c:470 systemv/lp.c:695
 #, c-format
 msgid "%s: Error - unable to write to temporary file \"%s\" - %s\n"
 msgstr "%s: エラー - テンポラリファイル \"%s\" に書き込みできません - %s\n"
 
-#: berkeley/lpr.c:476 systemv/lp.c:693
+#: berkeley/lpr.c:476 systemv/lp.c:693 berkeley/lpr.c:484 systemv/lp.c:709
 #, c-format
 msgid "%s: Error - stdin is empty, so no job has been sent.\n"
 msgstr "%s: エラー - 標準入力が空なので、ジョブは送られていません。\n"
@@ -3031,120 +3208,128 @@ msgstr "%s: -r のあとには理由のテキストが必要です!\n"
 msgid "%s: Error - expected username after '-u' option!\n"
 msgstr "%s: エラー - '-u' オプションのあとにはユーザ名が必要です!\n"
 
-#: systemv/cancel.c:308 systemv/cancel.c:373
+#: systemv/cancel.c:308 systemv/cancel.c:373 systemv/cancel.c:372
 #, c-format
 msgid "%s: %s failed: %s\n"
 msgstr "%s: %s 失敗しました: %s\n"
 
-#: systemv/lp.c:173
+#: systemv/lp.c:173 systemv/lp.c:177
 #, c-format
 msgid "%s: Error - expected destination after '-d' option!\n"
 msgstr "%s: '-d' オプションのあとにはプリンタ名が必要です!\n"
 
-#: systemv/lp.c:206
+#: systemv/lp.c:206 systemv/lp.c:210
 #, c-format
 msgid "%s: Error - expected form after '-f' option!\n"
 msgstr "%s: エラー - '-f' オプションのあとには用紙名が必要です!\n"
 
-#: systemv/lp.c:213
+#: systemv/lp.c:213 systemv/lp.c:217
 #, c-format
 msgid "%s: Warning - form option ignored!\n"
 msgstr "%s: 警告 - 用紙オプションは無視されます!\n"
 
-#: systemv/lp.c:247
+#: systemv/lp.c:247 systemv/lp.c:251
 #, c-format
 msgid "%s: Expected job ID after '-i' option!\n"
 msgstr "%s: '-i' オプションのあとにはジョブ ID が必要です!\n"
 
-#: systemv/lp.c:258
+#: systemv/lp.c:258 systemv/lp.c:262
 #, c-format
 msgid "%s: Error - cannot print files and alter jobs simultaneously!\n"
-msgstr "%s: エラー - ファイルを印刷できず、ジョブを同時に変えることができません!\n"
+msgstr ""
+"%s: エラー - ファイルを印刷できず、ジョブを同時に変えることができません!\n"
 
-#: systemv/lp.c:271
+#: systemv/lp.c:271 systemv/lp.c:275
 #, c-format
 msgid "%s: Error - bad job ID!\n"
 msgstr "%s: エラー - 不正なジョブ ID です!\n"
 
-#: systemv/lp.c:296
+#: systemv/lp.c:296 systemv/lp.c:308
 #, c-format
 msgid "%s: Error - expected copies after '-n' option!\n"
 msgstr "%s: エラー - '-n' オプションのあとにはコピー数が必要です!\n"
 
-#: systemv/lp.c:319
+#: systemv/lp.c:319 systemv/lp.c:331
 #, c-format
 msgid "%s: Error - expected option string after '-o' option!\n"
 msgstr "%s: エラー - '-o' オプションのあとには文字列が必要です!\n"
 
-#: systemv/lp.c:340
+#: systemv/lp.c:340 systemv/lp.c:352
 #, c-format
 msgid "%s: Error - expected priority after '-%c' option!\n"
 msgstr "%s: エラー - '-%c' オプションのあとには優先度が必要です!\n"
 
-#: systemv/lp.c:363
+#: systemv/lp.c:363 systemv/lp.c:375
 #, c-format
 msgid "%s: Error - priority must be between 1 and 100.\n"
 msgstr "%s: エラー - 優先度は 1 から 100 の間である必要があります。\n"
 
-#: systemv/lp.c:387
+#: systemv/lp.c:387 systemv/lp.c:399
 #, c-format
 msgid "%s: Error - expected title after '-t' option!\n"
 msgstr "%s: エラー - '-t' オプションのあとにはタイトルが必要です!\n"
 
-#: systemv/lp.c:405
+#: systemv/lp.c:405 systemv/lp.c:417
 #, c-format
 msgid "%s: Error - expected mode list after '-y' option!\n"
 msgstr "%s: エラー - '-y' オプションのあとにはモードリストが必要です!\n"
 
-#: systemv/lp.c:413
+#: systemv/lp.c:413 systemv/lp.c:425
 #, c-format
 msgid "%s: Warning - mode option ignored!\n"
 msgstr "%s: 警告 - モードオプションは無視されます!\n"
 
-#: systemv/lp.c:427
+#: systemv/lp.c:427 systemv/lp.c:439
 #, c-format
 msgid "%s: Error - expected hold name after '-H' option!\n"
 msgstr "%s: エラー - '-H' オプションのあとにはホールド名が必要です!\n"
 
-#: systemv/lp.c:451
+#: systemv/lp.c:451 systemv/lp.c:463
 #, c-format
 msgid "%s: Need job ID ('-i jobid') before '-H restart'!\n"
 msgstr "%s: '-H restart' の前にはジョブ ID ('-i ジョブID') が必要です!\n"
 
-#: systemv/lp.c:475
+#: systemv/lp.c:475 systemv/lp.c:487
 #, c-format
 msgid "%s: Error - expected page list after '-P' option!\n"
 msgstr "%s: '-P' オプションのあとにはページリストが必要です!\n"
 
-#: systemv/lp.c:496
+#: systemv/lp.c:496 systemv/lp.c:508
 #, c-format
 msgid "%s: Error - expected character set after '-S' option!\n"
 msgstr "%s: エラー - '-S' オプションのあとには文字セットが必要です!\n"
 
-#: systemv/lp.c:504
+#: systemv/lp.c:504 systemv/lp.c:516
 #, c-format
 msgid "%s: Warning - character set option ignored!\n"
 msgstr "%s: 警告 - 文字セットオプションは無視されます!\n"
 
-#: systemv/lp.c:516
+#: systemv/lp.c:516 systemv/lp.c:528
 #, c-format
 msgid "%s: Error - expected content type after '-T' option!\n"
 msgstr "%s: エラー - '-T' オプションのあとにはコンテンツタイプが必要です!\n"
 
-#: systemv/lp.c:524
+#: systemv/lp.c:524 systemv/lp.c:536
 #, c-format
 msgid "%s: Warning - content type option ignored!\n"
 msgstr "%s: 警告 - コンテンツタイプオプションは無視されます!\n"
 
-#: systemv/lp.c:538
+#: systemv/lp.c:538 systemv/lp.c:554
 #, c-format
-msgid "%s: Error - cannot print from stdin if files or a job ID are provided!\n"
-msgstr "%s: エラー - ファイルまたはジョブ ID が提供されている場合、標準入力から印刷できません。 \n"
+msgid ""
+"%s: Error - cannot print from stdin if files or a job ID are provided!\n"
+msgstr ""
+"%s: エラー - ファイルまたはジョブ ID が提供されている場合、標準入力から印刷で"
+"きません。 \n"
 
 #: systemv/lpstat.c:164 systemv/lpstat.c:178
 #, c-format
-msgid "%s: Error - need \"completed\", \"not-completed\", or \"all\" after '-W' option!\n"
-msgstr "%s: エラー - '-W' オプションのあとには、\"completed\"、\"not-completed\"、\"all\" のいずれかが必要です!\n"
+msgid ""
+"%s: Error - need \"completed\", \"not-completed\", or \"all\" after '-W' "
+"option!\n"
+msgstr ""
+"%s: エラー - '-W' オプションのあとには、\"completed\"、\"not-completed\"、"
+"\"all\" のいずれかが必要です!\n"
 
 #: systemv/lpstat.c:237
 #, c-format
@@ -3161,7 +3346,110 @@ msgstr "%s: リスト \"%s\" に無効な宛先名があります!\n"
 msgid "%s: Unable to connect to server\n"
 msgstr "%s: サーバに接続できません\n"
 
+#: cups/notify.c:91
+msgid "Print Job:"
+msgstr "ジョブの印刷:"
 
-#
-# End of "$Id$".
-#
+#: cups/notify.c:96
+msgid "pending"
+msgstr "保留"
+
+#: cups/notify.c:99
+msgid "held"
+msgstr "ホールド"
+
+#: cups/notify.c:102 cups/notify.c:143
+msgid "processing"
+msgstr "処理中"
+
+#: cups/notify.c:105 cups/notify.c:146
+msgid "stopped"
+msgstr "停止"
+
+#: cups/notify.c:108
+msgid "canceled"
+msgstr "キャンセル"
+
+#: cups/notify.c:111
+msgid "aborted"
+msgstr "停止"
+
+#: cups/notify.c:114
+msgid "completed"
+msgstr "完了"
+
+#: cups/notify.c:117 cups/notify.c:149
+msgid "unknown"
+msgstr "未知"
+
+#: cups/notify.c:126
+msgid "untitled"
+msgstr "タイトルなし"
+
+#: cups/notify.c:135
+msgid "Printer:"
+msgstr "プリンタ:"
+
+#: cups/notify.c:140
+msgid "idle"
+msgstr "待機中"
+
+#: scheduler/ipp.c:5513
+msgid "Missing notify-subscription-ids attribute!"
+msgstr "notify-subscription-ids 属性がありません!"
+
+#: scheduler/ipp.c:7851
+msgid "Job subscriptions cannot be renewed!"
+msgstr "ジョブサブスクリプションが更新されていません!"
+
+#: scheduler/main.c:163
+msgid "cupsd: Expected config filename after \"-c\" option!\n"
+msgstr "cupsd: -c オプションのあとには設定ファイル名が必要です!\n"
+
+#: scheduler/main.c:218
+msgid "cupsd: launchd(8) support not compiled in, running in normal mode.\n"
+msgstr "cupsd: launchd(8) サポートがコンパイルされていないので、通常モードで動作します。\n"
+
+#: scheduler/main.c:225
+#, c-format
+msgid "cupsd: Unknown option \"%c\" - aborting!\n"
+msgstr "cupsd: \"%c\" は未知のオプションです - 停止します!\n"
+
+#: scheduler/main.c:232
+#, c-format
+msgid "cupsd: Unknown argument \"%s\" - aborting!\n"
+msgstr "cupsd: \"%s\" は未知の引数です - 停止します!\n"
+
+#: scheduler/main.c:2315
+msgid ""
+"Usage: cupsd [-c config-file] [-f] [-F] [-h] [-l]\n"
+"\n"
+"-c config-file      Load alternate configuration file\n"
+"-f                  Run in the foreground\n"
+"-F                  Run in the foreground but detach\n"
+"-h                  Show this usage message\n"
+"-l                  Run cupsd from launchd(8)\n"
+msgstr ""
+"使い方: cupsd [-c 設定ファイル] [-f] [-F] [-h] [-l]\n"
+"\n"
+"-c 設定ファイル     別の設定ファイルをロードする\n"
+"-f                  フォアグラウンドで実行する\n"
+"-F                  フォアグラウンドで実行するが detach する\n"
+"-h                  この使用例を表示する\n"
+"-l                  launchd(8) から cupsd を実行する\n"
+
+#: systemv/cupstestppd.c:1343
+#, c-format
+msgid "        WARN    Line %d only contains whitespace!\n"
+msgstr "        警告    %d 行が空白だけです!\n"
+
+#: systemv/cupstestppd.c:1361
+msgid ""
+"        WARN    File contains a mix of CR, LF, and CR LF line endings!\n"
+msgstr "        警告    ファイルが CR、LF、CR LF の行末を混在して含んでいます!\n"
+
+#: systemv/cupstestppd.c:1366
+msgid ""
+"        WARN    Non-Windows PPD files should use lines ending with only LF, "
+"not CR LF!\n"
+msgstr "        警告    非 Windows PPD ファイルは、CR LF でなく LF のみを行末に使うべきです!\n"
index fbd5715cba419cc8d448fb434b84ff39c0f375f5..c64f3b6660ece3ed79b9e5570a3767254daab432 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $"
+# "$Id: Makefile 5099 2006-02-13 02:46:10Z mike $"
 #
 #   Man page makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1993-2005 by Easy Software Products.
+#   Copyright 1993-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 #   property of Easy Software Products and are protected by Federal
@@ -29,10 +29,9 @@ include ../Makedefs
 # Man pages...
 #
 
-MAN1   =       backend.$(MAN1EXT) \
+MAN1   =       cancel.$(MAN1EXT) \
                cups-config.$(MAN1EXT) \
                cupstestppd.$(MAN1EXT) \
-               filter.$(MAN1EXT) \
                lp.$(MAN1EXT) \
                lpoptions.$(MAN1EXT) \
                lppasswd.$(MAN1EXT) \
@@ -45,8 +44,12 @@ MAN5 =       classes.conf.$(MAN5EXT) \
                mime.convs.$(MAN5EXT) \
                mime.types.$(MAN5EXT) \
                printers.conf.$(MAN5EXT)
+MAN7   =       backend.$(MAN7EXT) \
+               filter.$(MAN7EXT)
 MAN8   =       accept.$(MAN8EXT) \
                cupsaddsmb.$(MAN8EXT) \
+               cups-deviced.$(MAN8EXT) \
+               cups-driverd.$(MAN8EXT) \
                cups-lpd.$(MAN8EXT) \
                cups-polld.$(MAN8EXT) \
                cupsd.$(MAN8EXT) \
@@ -61,7 +64,7 @@ MAN8  =       accept.$(MAN8EXT) \
 # Make everything...
 #
 
-all:   $(MAN1) $(MAN5) $(MAN8) html
+all:   $(MAN1) $(MAN5) $(MAN7) $(MAN8) html
 
 
 #
@@ -70,10 +73,16 @@ all:        $(MAN1) $(MAN5) $(MAN8) html
 
 clean:
        $(RM) mantohtml mantohtml.o
-       $(RM) $(MAN1) $(MAN5) $(MAN8)
+       $(RM) $(MAN1) $(MAN5) $(MAN7) $(MAN8)
        for file in $(MAN1); do \
                $(RM) ../doc/help/man-`basename $$file .$(MAN1EXT)`.html; \
        done
+       for file in $(MAN5); do \
+               $(RM) ../doc/help/man-`basename $$file .$(MAN5EXT)`.html; \
+       done
+       for file in $(MAN7); do \
+               $(RM) ../doc/help/man-`basename $$file .$(MAN7EXT)`.html; \
+       done
        for file in $(MAN8); do \
                $(RM) ../doc/help/man-`basename $$file .$(MAN8EXT)`.html; \
        done
@@ -91,19 +100,22 @@ depend:
 #
 
 install:       all
-       $(INSTALL_DIR) $(MANDIR)/man1
+       $(INSTALL_DIR) -m 755 $(MANDIR)/man1
        for file in $(MAN1); do \
                echo Installing $$file in $(MANDIR)/man1...; \
                $(INSTALL_MAN) $$file $(MANDIR)/man1; \
        done
-       $(RM) $(MANDIR)/man1/cancel.$(MAN1EXT)
-       $(LN) lp.$(MAN1EXT) $(MANDIR)/man1/cancel.$(MAN1EXT)
-       $(INSTALL_DIR) $(MANDIR)/man5
+       $(INSTALL_DIR) -m 755 $(MANDIR)/man5
        for file in $(MAN5); do \
                echo Installing $$file in $(MANDIR)/man5...; \
                $(INSTALL_MAN) $$file $(MANDIR)/man5; \
        done
-       $(INSTALL_DIR) $(AMANDIR)/man$(MAN8DIR)
+       $(INSTALL_DIR) -m 755 $(MANDIR)/man7
+       for file in $(MAN7); do \
+               echo Installing $$file in $(MANDIR)/man7...; \
+               $(INSTALL_MAN) $$file $(MANDIR)/man7; \
+       done
+       $(INSTALL_DIR) -m 755 $(AMANDIR)/man$(MAN8DIR)
        for file in $(MAN8); do \
                echo Installing $$file in $(AMANDIR)/man$(MAN8DIR)...; \
                $(INSTALL_MAN) $$file $(AMANDIR)/man$(MAN8DIR); \
@@ -118,12 +130,20 @@ install:  all
 # Make html versions of man pages...
 #
 
-html:  $(MAN1) $(MAN8) mantohtml
+html:  $(MAN1) $(MAN5) $(MAN7) $(MAN8) mantohtml
        echo Converting man pages to HTML...
        for file in $(MAN1); do \
                echo "    $$file..."; \
                ./mantohtml `basename $$file .$(MAN1EXT)`.man >../doc/help/man-`basename $$file .$(MAN1EXT)`.html; \
        done
+       for file in $(MAN5); do \
+               echo "    $$file..."; \
+               ./mantohtml `basename $$file .$(MAN5EXT)`.man >../doc/help/man-`basename $$file .$(MAN5EXT)`.html; \
+       done
+       for file in $(MAN7); do \
+               echo "    $$file..."; \
+               ./mantohtml `basename $$file .$(MAN7EXT)`.man >../doc/help/man-`basename $$file .$(MAN7EXT)`.html; \
+       done
        for file in $(MAN8); do \
                echo "    $$file..."; \
                ./mantohtml `basename $$file .$(MAN8EXT)`.man >../doc/help/man-`basename $$file .$(MAN8EXT)`.html; \
@@ -134,5 +154,5 @@ mantohtml:  mantohtml.o
 
 
 #
-# End of "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $".
+# End of "$Id: Makefile 5099 2006-02-13 02:46:10Z mike $".
 #
index 999199dde4aee7bb89864f95491bea96b38f0597..331d41f5b9a96a97fb288989f643af90e2fcd8d3 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: accept.man 4948 2006-01-19 03:23:41Z mike $"
+.\" "$Id: accept.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   accept/reject man page for the Common UNIX Printing System (CUPS).
 .\"
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH accept 8 "Common UNIX Printing System" "18 January 2006" "Easy Software Products"
+.TH accept 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 accept/reject \- accept/reject jobs sent to a destination
 .SH SYNOPSIS
 .B accept
-destination(s)
+[ -E ] [ -U
+.I username
+] [ -h
+.I hostname[:port]
+] destination(s)
 .br
 .B reject
 [ -E ] [ -U
@@ -35,8 +39,7 @@ destination(s)
 .I hostname[:port]
 ] [ -r
 .I reason
-]
-destination(s)
+] destination(s)
 .SH DESCRIPTION
 \fIaccept\fR instructs the printing system to accept print jobs to the
 specified destinations.
@@ -44,19 +47,42 @@ specified destinations.
 \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".
-.LP
-The \fI-E\fR option forces encryption when connecting to the server.
+.SH OPTIONS
+The following options are supported by both \fIaccept\fR and
+\fIreject\fR:
+.TP 5
+-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
+-U username
+.br
+Sets the username that is sent when connecting to the server.
+.TP 5
+-h hostname[:port]
+.br
+Chooses an alternate server.
+.TP 5
+-r "reason"
+.br
+Sets the reason string that is shown for a printer that is
+rejecting jobs.
 .SH COMPATIBILITY
-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.
+Unlike the System V printing system, CUPS allows printer names to
+contain any printable character except SPACE, TAB, "/", or "#".
+Also, printer and class names are \fInot\fR case-sensitive.
+.LP
+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),
+\fIcancel(1)\fR, \fIcupsenable(8)\fR, \fIlp(1)\fR,
+\fIlpadmin(8)\fR, \fIlpstat(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: accept.man 4948 2006-01-19 03:23:41Z mike $".
+.\" End of "$Id: accept.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 41f338b298dceea42ae368b7c2afe798c69ec4b0..25a6e6f4658f0bca9177230518fc2178f9281a34 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: backend.man 4884 2005-12-16 01:02:42Z mike $"
+.\" "$Id: backend.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   Backend man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH backend 1 "Common UNIX Printing System" "15 December 2005" "Easy Software Products"
+.TH backend 7 "Common UNIX Printing System" "11 February 2006" "Easy Software Products"
 
 .SH NAME
 backend \- cups backend transmission interfaces
@@ -35,25 +35,28 @@ job user title num-copies options [
 ]
 
 .SH DESCRIPTION
-The CUPS backend interface provides a standard method for sending
-document files to different physical interfaces.
+Backends are a special type of \fIfilter(7)\fR which is used to
+send print data to and discover different devices on the system.
 
 .LP
-Backends must be capable of reading from a filename on the
-command-line or from the standard input, copying the standard
-input to a temporary file if required by the physical interface.
+Like filters, backends must be capable of reading from a filename
+on the command-line or from the standard input, copying the
+standard input to a temporary file as required by the physical
+interface.
 
 .LP
 The command name (argv[0]) is set to the device URI of the
 destination printer. Starting with CUPS 1.1.22, any
-authentication information in argv[0] will be removed, so
+authentication information in argv[0] is removed, so
 backend developers are urged to use the DEVICE_URI environment
-variable whenever authentication information is required.
+variable whenever authentication information is required. The
+CUPS API includes a \fIcupsBackendDeviceURI\fR function for
+retrieving the correct device URI.
 
 .LP
-Backchannel data from the device should be relayed to the job
+Back-channel data from the device should be relayed to the job
 filters by writing to file descriptor 3. The CUPS API includes
-the \fIcupsBackchannelWrite\fR function for this purpose.
+the \fIcupsBackChannelWrite\fR function for this purpose.
 
 .SH DEVICE DISCOVERY
 When run with no arguments, the backend should list the devices
@@ -62,9 +65,9 @@ consists of zero or more lines consisting of any of the following
 forms:
 
 .nf
-device-class scheme "Unknown" "device-info"
-device-class device-uri "device-make-and-model" "device-info"
-device-class device-uri "device-make-and-model" "device-info" "device-id"
+    device-class scheme "Unknown" "device-info"
+    device-class device-uri "device-make-and-model" "device-info"
+    device-class device-uri "device-make-and-model" "device-info" "device-id"
 .fi
 
 .LP
@@ -117,8 +120,15 @@ The optional \fIdevice-id\fR field specifies the IEEE-1284 device
 ID string for the device, which is used to select a matching
 driver.
 
+.SH PERMISSIONS
+Backends without world execute permissions are run as the root
+user. Otherwise, the backend is run using the unpriviledged user
+account, typically "lp".
+
 .SH EXIT CODES
-The following exit codes are defined for backends:
+The following exit codes are defined for backends; C API
+constants defined in the <cups/backend.h> header file are defined
+in parenthesis:
 
 .TP 5
 0 (CUPS_BACKEND_OK)
@@ -135,11 +145,12 @@ the job, retrying the job, or stopping the queue depending on the
 state of the error-policy attribute.
 
 .TP 5
-2 (CUPS_BACKEND_CANCEL)
+2 (CUPS_BACKEND_AUTH_REQUIRED)
 .br
-The print file was not successfully transmitted because one or
-more attributes are not supported. The scheduler will respond to
-this by canceling the job.
+The print file was not successfully transmitted because valid
+authentication information is required. The scheduler will
+respond to this by holding the job and adding the
+authentication-required job-reasons keyword.
 
 .TP 5
 3 (CUPS_BACKEND_HOLD)
@@ -156,193 +167,22 @@ be printed at this time. The scheduler will respond to this by
 stopping the queue.
 
 .TP 5
-5 (CUPS_BACKEND_AUTH_REQUIRED)
+5 (CUPS_BACKEND_CANCEL)
 .br
-The print file was not successfully transmitted because valid
-authentication information is required. The scheduler will
-respond to this by holding the job and adding the
-authentication-required job-reasons keyword.
+The print file was not successfully transmitted because one or
+more attributes are not supported. The scheduler will respond to
+this by canceling the job.
 
 .PP
 All other exit code values are reserved.
 
-.SH LOG MESSAGES
-Messages sent to stderr are generally logged to
-printer-state-message attribute and the current ErrorLog. Each
-line begins with a standard prefix:
-
-.TP 5
-ALERT: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "alert" log level.
-
-.TP 5
-ATTR: attribute=value [attribute=value]
-.br
-Sets the named job attribute(s). Typically this will be used to
-set the job-remote-id attribute.
-
-.TP 5
-CRIT: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "critical" log level.
-
-.TP 5
-DEBUG: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "debug" log level.
-
-.TP 5
-DEBUG2: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "debug2" log level.
-
-.TP 5
-EMERG: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "emergency" log level.
-
-.TP 5
-ERROR: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "error" log level.
-
-.TP 5
-INFO: message
-.br
-Sets the printer-state-message attribute. If the current LogLevel
-is set to "debug2", also adds the specified message to the
-current ErrorLog using the "info" log level.
-
-.TP 5
-NOTICE: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "notice" log level.
-
-.TP 5
-PAGE: page-number #-copies
-.TP 5
-PAGE: #-pages total
-.br
-Adds an entry to the current PageLog. The first form adds
-#-copies to the job-media-sheets-completed attribute. The second
-form sets the job-media-sheets-completed attribute to #-pages.
-
-.TP 5
-STATE: printer-state-reason [printer-state-reason ...]
-.TP 5
-STATE: + printer-state-reason [printer-state-reason ...]
-.TP 5
-STATE: - printer-state-reason [printer-state-reason ...]
-.br
-Sets, adds, or removes printer-state-reason keywords to the
-current queue. Typically this is used to indicate media, ink, and
-toner conditions on a printer.
-
-.TP 5
-WARNING: message
-.br
-Sets the printer-state-message attribute and adds the specified
-message to the current ErrorLog using the "warning" log level.
-
-.SH ENVIRONMENT VARIABLES
-The following environment variables are defined by the CUPS
-server when executing the backend:
-
-.TP 5
-CHARSET
-.br
-The default text character set, typically utf-8.
-
-.TP 5
-CLASS
-.br
-When a job is submitted to a printer class, contains the name of
-the destination printer class. Otherwise this environment
-variable will not be set.
-
-.TP 5
-CONTENT_TYPE
-.br
-The MIME type associated with the file (e.g.
-application/postscript).
-
-.TP 5
-CUPS_DATADIR
-.br
-The directory where data files can be found.
-
-.TP 5
-CUPS_SERVERROOT
-.br
-The root directory of the server.
-
-.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 and for backends that require any authentication
-information which is not included in argv[0].
-
-.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.
-
-.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).
-
-.TP 5
-SOFTWARE
-.br
-The name and version number of the server (typically CUPS/1.1).
-
-.TP 5
-TZ
-.br
-The timezone of the server.
-
-.TP 5
-USER
-.br
-The user executing the backend, typically root; consult the
-cupsd.conf file for the current setting.
-
 .SH SEE ALSO
-cupsd(8), filter(1)
+\fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fIfilter(7)\fR
 .br
 http://localhost:631/help
 
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: backend.man 4884 2005-12-16 01:02:42Z mike $".
+.\" End of "$Id: backend.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
diff --git a/man/cancel.man b/man/cancel.man
new file mode 100644 (file)
index 0000000..76cf353
--- /dev/null
@@ -0,0 +1,84 @@
+.\"
+.\" "$Id$"
+.\"
+.\"   cancel man page for the Common UNIX Printing System (CUPS).
+.\"
+.\"   Copyright 1997-2006 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 USA
+.\"
+.\"       Voice: (301) 373-9600
+.\"       EMail: cups-info@cups.org
+.\"         WWW: http://www.cups.org
+.\"
+.TH cancel 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
+.SH NAME
+cancel - cancel jobs
+.SH SYNOPSIS
+.B cancel
+[ -E ] [ -U
+.I username
+] [ -a ] [ -h
+.I hostname[:port]
+] [ -u 
+.I username
+] [
+.I id
+] [
+.I destination
+] [
+.I destination-id
+]
+.SH DESCRIPTION
+\fIcancel\fR cancels existing print jobs. The \fI-a\fR option will remove
+all jobs from the specified destination.
+.SH OPTIONS
+The following options are recognized by \fIlp\fR:
+.TP 5
+-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
+-U username
+.br
+Specifies the username to use when connecting to the server.
+.TP 5
+-a
+.br
+Cancel all jobs on the named destination, or all jobs on all
+destinations if none is provided.
+.TP 5
+-h hostname[:port]
+.br
+Chooses an alternate server.
+.TP 5
+-u username
+.br
+Cancels jobs owned by \fIusername\fR.
+.SH COMPATIBILITY
+Unlike the System V printing system, CUPS allows printer names to
+contain any printable character except SPACE, TAB, "/", or "#".
+Also, printer and class names are \fInot\fR case-sensitive.
+.SH NOTES
+Administrators wishing to prevent unauthorized cancellation of
+jobs via the \fI-u\fR option should require authentication for
+Cancel-Jobs operations in \fIcupsd.conf(5)\fR.
+.SH SEE ALSO
+\fIlp(1)\fR, \fIlpmove(8)\fR, \fIlpstat(1)\fR,
+.br
+http://localhost:631/help
+.SH COPYRIGHT
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
+.\"
+.\" End of "$Id$".
+.\"
index f56a5c856e68531bcd8ad98910c9c908d464663d..eb38be57c014197d0c7ff207b14598cecda11980 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: classes.conf.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: classes.conf.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   classes.conf man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH classes.conf 5 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
+.TH classes.conf 5 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 classes.conf \- class configuration file for cups
 .SH DESCRIPTION
@@ -38,35 +38,90 @@ or a comment. Comment lines start with the # character.
 .br
 Defines a specific printer class.
 .TP 5
-Accepting
+<DefaultClass name> ... </Class>
 .br
-Specifies whether or not the printer class is accepting new jobs.
+Defines a default printer class.
 .TP 5
-Info
+Accepting Yes
+.TP 5
+Accepting No
+.br
+Specifies whether the printer is accepting new jobs.
+.TP 5
+AllowUser [ user @group ... ]
+.br
+Allows specific users and groups to print to the printer.
+.TP 5
+DenyUser [ user @group ... ]
+.br
+Prevents specific users and groups from printing to the printer.
+.TP 5
+ErrorPolicy cancel-job
+.TP 5
+ErrorPolicy retry-job
+.TP 5
+ErrorPolicy stop-printer
+.br
+Specifies the error policy for the printer.
+.TP 5
+Info text
+.br
+Specifies human-readable text describing the printer.
+.TP 5
+JobSheets banner banner
+.br
+Specifies the banner pages to use for the printer.
+.TP 5
+KLimit number
+.br
+Specifies the job-k-limit value for the printer.
+.TP 5
+Location text
 .br
-Specifies human-readable text describing the printer class.
+Specifies human-readable text describing the location of the printer.
 .TP 5
-Location
+OpPolicy name
 .br
-Specifies human-readable text describing the location of the printer class.
+Specifies the operation policy for the printer.
+.TP 5
+PageLimit number
+.br
+Specifies the job-page-limit value for the printer.
 .TP 5
 Printer
 .br
 Specifies a printer that is a member of the printer class.
 .TP 5
-State
+QuotaPeriod seconds
+.br
+Specifies the job-quota-period value for the printer.
+.TP 5
+Shared Yes
+.TP 5
+Shared No
+.br
+Specifies whether the printer is shared.
+.TP 5
+State idle
+.TP 5
+State stopped
 .br
-Specifies the initial state of the printer class (Idle or Stopped)
+Specifies the initial state of the printer (Idle or Stopped)
 .TP 5
-StateMessage
+StateMessage text
 .br
 Specifies the message associated with the state.
+.TP 5
+StateTime seconds
+.br
+Specifies the date/time associated with the state.
 .SH SEE ALSO
-cupsd(8), cupsd.conf(5), mime.convs(5), mime.types(5), printers.conf(5),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fImime.convs(5)\fR,
+\fImime.types(5)\fR, \fIprinters.conf(5)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: classes.conf.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: classes.conf.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 5ff615cba2d4a6f596061f0e5de3be501130c47e..bf0840660299153e657ded012810502d11f6c2f2 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: cups-config.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: cups-config.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   cups-config man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cups-config 1 "Common UNIX Printing System" "27 May 2004" "Easy Software Products"
+.TH cups-config 1 "Common UNIX Printing System" "11 February 2006" "Easy Software Products"
 .SH NAME
 cups-config \- get cups api, compiler, directory, and link information.
 .SH SYNOPSIS
@@ -61,35 +61,59 @@ cups-config \- get cups api, compiler, directory, and link information.
 used by application developers to determine the necessary command-line
 options for the compiler and linker, as well as determining installation
 directories for filters, configuration files, and drivers.
-.LP
-The \fI--api-version\fR command displays the current API version (major.minor).
-.LP
-The \fI--cflags\fR command displays the necessary compiler options.
-.LP
-The \fI--datadir\fR command displays the default CUPS data directory.
-.LP
-The \fI--help\fR command displays the program usage message.
-.LP
-The \fI--ldflags\fR command displays the necessary linker options.
-.LP
-The \fI--libs\fR command displays the necessary librarys to link to.
-The \fI--image\fR option adds the CUPS imaging library to the list.
-The \fI--static\fR option shows the static libraries instead of the
-default (shared) libraries.
-.LP
-The \fI--serverbin\fR command displays the default CUPS binary directory,
+.SH OPTIONS
+.TP 5
+--api-version
+.br
+Displays the current API version (major.minor).
+.TP 5
+--cflags
+.br
+Displays the necessary compiler options.
+.TP 5
+--datadir
+.br
+Displays the default CUPS data directory.
+.TP 5
+--help
+.br
+Displays the program usage message.
+.TP 5
+--image
+.br
+When used with \fI--libs\fR, adds the CUPS imaging library to the
+list or displayed libraries.
+.TP 5
+--ldflags
+.br
+Displays the necessary linker options.
+.TP 5
+--libs
+.br
+Displays the necessary librarys to link to.
+.TP 5
+--serverbin
+.br
+Displays the default CUPS binary directory,
 where filters and backends are stored.
-.LP
-The \fI--serverroot\fR command displays the default CUPS configuration
-file directory.
-.LP
-The \fI--version\fR command displays the full version number of the
-CUPS installation (major.minor.patch).
+.TP 5
+--serverroot
+.br
+Displays the default CUPS configuration file directory.
+.TP 5
+--static
+.br
+When used with \fI--libs\fR, shows the static libraries instead
+of the default (shared) libraries.
+.TP 5
+--version
+.br
+Displays the full version number of the CUPS installation
+(major.minor.patch).
 .SH SEE ALSO
-CUPS Software Programmers Manual,
-http://localhost:631/documentation.html
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cups-config.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: cups-config.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
diff --git a/man/cups-deviced.man.in b/man/cups-deviced.man.in
new file mode 100644 (file)
index 0000000..859a397
--- /dev/null
@@ -0,0 +1,53 @@
+.\"
+.\" "$Id: cups-deviced.man.in 5099 2006-02-13 02:46:10Z mike $"
+.\"
+.\"   cups-deviced man page for the Common UNIX Printing System (CUPS).
+.\"
+.\"   Copyright 1997-2006 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 USA
+.\"
+.\"       Voice: (301) 373-9600
+.\"       EMail: cups-info@cups.org
+.\"         WWW: http://www.cups.org
+.\"
+.TH cups-deviced 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
+.SH NAME
+cups-deviced \- cups device daemon
+.SH SYNOPSIS
+.B cups-deviced
+.I request-id limit user-id options
+.SH DESCRIPTION
+\fIcups-deviced\fR polls the backends in
+\fI@CUPS_SERVERBIN@/backend\fR for a list of available devices.
+It is run by \fIcupsd(8)\fR in response to a
+\fICUPS-Get-Devices\fR request. The output format is an IPP
+response message. The \fIrequest-id\fR argument is the request ID
+from the original IPP request, typically 1. The \Ilimit\fR
+argument is the limit value from the original IPP request - 0
+means no limit. The \fIuser-id\fR argument is the
+requesting-user-name value from the original IPP request.
+Finally, the \fIoptions\fR argument is a space-delimited list of
+attributes ("name=value name=value \...") that were passed in
+with the request. Currently \fIcups-deviced\fR looks for the
+\fIrequested-attributes\fR attribute and tailors the output
+accordingly.
+.SH SEE ALSO
+backend(7), cupsd(8), cupsd.conf(5),
+.br
+http://localhost:631/help
+.SH COPYRIGHT
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
+.\"
+.\" End of "$Id: cups-deviced.man.in 5099 2006-02-13 02:46:10Z mike $".
+.\"
diff --git a/man/cups-driverd.man.in b/man/cups-driverd.man.in
new file mode 100644 (file)
index 0000000..e9f1862
--- /dev/null
@@ -0,0 +1,114 @@
+.\"
+.\" "$Id: cups-driverd.man.in 5099 2006-02-13 02:46:10Z mike $"
+.\"
+.\"   cups-driverd man page for the Common UNIX Printing System (CUPS).
+.\"
+.\"   Copyright 1997-2006 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 USA
+.\"
+.\"       Voice: (301) 373-9600
+.\"       EMail: cups-info@cups.org
+.\"         WWW: http://www.cups.org
+.\"
+.TH cups-driverd 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
+.SH NAME
+cups-driverd \- cups driver daemon
+.SH SYNOPSIS
+.B cups-driverd
+cat
+.I ppd-name
+.br
+.B cups-driverd
+list
+.I request_id limit options
+.SH DESCRIPTION
+\fIcups-driverd\fR shows or lists PPD files. It is run in
+response to CUPS-Add-Modify-Printer or CUPS-Get-Devices requests.
+The first form ("cups-driverd cat ppd-name") writes the named PPD
+file to stdout. The output format is an uncompressed PPD file.
+.LP
+The second form lists the available manufacturers or PPD files to
+stdout as indicated by the \fIoptions\fR argument. The output
+format is an IPP response message. The \fIrequest_id\fR argument
+is the request ID from the original IPP request, typically 1. The
+\Ilimit\fR argument is the limit value from the original IPP
+request - 0 means no limit. Finally, the \fIoptions\fR argument
+is a space-delimited list of attributes ("name=value name=value
+\...") that were passed in with the request. Currently
+\fIcups-driverd\fR looks for the \fIppd-make\fR and
+\fIrequested-attributes\fR attributes and tailors the output
+accordingly.
+.SH DRIVERS
+Drivers can be static PPD files under the
+\fI@CUPS_DATADIR@/model\fR directory or programs under the
+\fI@CUPS_SERVERBIN@/driver\fR directory. Static PPD files must
+conform to the Adobe PPD File Format Specification version 4.3
+and may be compressed using the \fIgzip(1)\fR program. Driver
+programs must implement the command-line interface shown in the
+next section.
+.Sh DRIVER PROGRAMS
+Driver programs provide an interface to dynamically-generated PPD
+files. The following arguments are currently defined:
+.TP 5
+drivername list
+.br
+Lists the supported PPD files to stdout.
+.TP 5
+drivername cat ppdname
+.br
+Writes the named PPD file to stdout.
+.Sh LISTING FILES (drivername list)
+When run with the single argument "list", the program must list
+the available PPD files it can generate to stdout using the
+following format:
+.nf
+    "drivername:ppdname" language "make" "make and model" "1284 device id"
+.fi
+.LP
+\fIDrivername\fR is the name of the driver program. \fIPpdname\fR
+is the name used to select the given driver. \fILanguage\fR is
+the locale associated with the default language of the PPD file,
+typically "en". \fIMake\fR is the Manufacturer name from the PPD
+file. \fIMake and model\fR is the NickName name from the PPD
+file. \fI1284 device id\fR is the 1284DeviceId from the PPD file,
+if any.
+.Sh WRITING FILES (drivername cat ppdname)
+When the driver program is run with the "cat ppdname" arguments,
+it must write the named PPD file to stdout, uncompressed. If the
+named PPD file does not exist, the driver program must not write
+any output to stdout and report the error to stderr instead.
+.Sh DRIVER ERROR MESSAGES
+Error messages can be relayed back to \fIcupsd\fR by writing them
+to stderr. The following prefixes are recognized:
+.TP 5
+DEBUG: [drivername]
+.br
+Debugging messages
+.TP 5
+ERROR: [drivername]
+.br
+Error messages
+.TP 5
+INFO: [drivername]
+.br
+Informational messages
+.SH SEE ALSO
+cupsd(8), cupsd.conf(5), cupstestppd(1),
+.br
+http://localhost:631/help
+.SH COPYRIGHT
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
+.\"
+.\" End of "$Id: cups-driverd.man.in 5099 2006-02-13 02:46:10Z mike $".
+.\"
similarity index 57%
rename from man/cups-lpd.man
rename to man/cups-lpd.man.in
index 37767c3fd6c07e8a16fa8e1b709cdb6675d78b20..e16e75eaa7ee73833a723b0d4070567fd423c296 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: cups-lpd.man 4867 2005-12-03 15:45:53Z mike $"
+.\" "$Id: cups-lpd.man.in 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   cups-lpd man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cups-lpd 8 "Common UNIX Printing System" "3 December 2005" "Easy Software Products"
+.TH cups-lpd 8 "Common UNIX Printing System" "12 Febrary 2006" "Easy Software Products"
 .SH NAME
 cups-lpd \- receive print jobs and report printer status to lpd clients
 .SH SYNOPSIS
@@ -30,21 +30,22 @@ cups-lpd \- receive print jobs and report printer status to lpd clients
 .I option=value
 ]
 .SH DESCRIPTION
-\fBcups-lpd\fR is the CUPS Line Printer Daemon ("LPD") mini-server that
-supports legacy client systems that use the LPD protocol.
-\fBcups-lpd\fR does not act as a standalone network daemon but instead
-operates using the Internet "super-server" \fBinetd(8)\fR. Add the
-following line to the \fBinetd.conf\fR file to enable the
-\fBcups-lpd\fR daemon:
+\fIcups-lpd\fR is the CUPS Line Printer Daemon ("LPD")
+mini-server that supports legacy client systems that use the LPD
+protocol. \fIcups-lpd\fR does not act as a standalone network
+daemon but instead operates using the Internet "super-server"
+\fIinetd(8)\fR or \fIxinetd(8)\fR. If you are using \fIinetd\fR,
+add the following line to the \fIinetd.conf\fR file to enable the
+\fIcups-lpd\fR mini-server:
 .br
 .nf
 
-    printer stream tcp nowait lp /path/to/cups/daemon/cups-lpd cups-lpd \\
+    printer stream tcp nowait lp @CUPS_SERVERBIN@/daemon/cups-lpd cups-lpd \\
         -o document-format=application/octet-stream
 .fi
 .LP
-If you are using the newer \fIxinetd(8)\fR daemon, add the following
-lines to the \fBxinetd.conf\fR file:
+If you are using the newer \fIxinetd(8)\fR daemon, create a file
+named \fI/etc/xinetd.d/cups\fR containing the following lines:
 .br
 .nf
 
@@ -56,33 +57,31 @@ lines to the \fBxinetd.conf\fR file:
         user = lp
        group = sys
        passenv =
-        server = /path/to/cups/daemon/cups-lpd
+        server = @CUPS_SERVERBIN@/daemon/cups-lpd
        server_args = -o document-format=application/octet-stream
     }
 .fi
-.LP
-The /path/to/cups/daemon is usually /usr/lib/cups/daemon or
-/usr/libexec/cups/daemon, depending on the operating system.
-Consult the cupsd.conf file for the local setting.
 .SH OPTIONS
-The \fI-o\fR option to \fBcups-lpd\fR inserts options for all
-print queues. Most often this is used to disable the "l" filter
-so that remote print jobs are filtered as needed for printing;
-the examples in the previous section set the "document-format"
-option to "application/octet-stream" which forces autodetection
-of the print file format.
+.TP 5
+-o name=value
+.br
+Inserts options for all print queues. Most often this is used to
+disable the "l" filter so that remote print jobs are filtered as
+needed for printing; the examples in the previous section set the
+"document-format" option to "application/octet-stream" which
+forces autodetection of the print file format.
 .SH PERFORMANCE
-\fBcups-lpd\fR performs well with small numbers of clients and
+\fIcups-lpd\fR performs well with small numbers of clients and
 printers. However, since a new process is created for each
 connection and since each process must query the printing system
 before each job submission, it does not scale to larger
 configurations. We highly recommend that large configurations
 use the native IPP support provided by CUPS instead.
 .SH SECURITY
-\fBcups-lpd\fR currently does not perform any access control
+\fIcups-lpd\fR currently does not perform any access control
 based on the settings in \fIcupsd.conf(5)\fR or in the
-\fIhosts.allow(5)\fR or \fIhosts.deny\fR files used by TCP
-wrappers. Therefore, running \fBcups-lpd\fR on your server will
+\fIhosts.allow(5)\fR or \fIhosts.deny(5)\fR files used by TCP
+wrappers. Therefore, running \fIcups-lpd\fR on your server will
 allow any computer on your network (and perhaps the entire
 Internet) to print to your server.
 .LP
@@ -91,11 +90,11 @@ should use the TCP wrappers package with \fIinetd\fR to limit
 access to only those computers that should be able to print
 through your server.
 .LP
-\fBcups-lpd\fR is not enabled by the standard CUPS distribution.
+\fIcups-lpd\fR is not enabled by the standard CUPS distribution.
 Please consult with your operating system vendor to determine
-whether it is enabled in their distribution.
+whether it is enabled on your system.
 .SH COMPATIBILITY
-\fBcups-lpd\fR does not enforce the restricted source port
+\fIcups-lpd\fR does not enforce the restricted source port
 number specified in RFC 1179, as using restricted ports does not
 prevent users from submitting print jobs. While this behavior is
 different than standard Berkeley LPD implementations, it should
@@ -106,9 +105,11 @@ between LPD and IPP Protocols. Since many LPD implementations
 stray from this definition, remote status reporting to LPD
 clients may be unreliable.
 .SH SEE ALSO
-cups(1), cupsd(8), inetd(8), xinetd(8)
+\fIcups(1)\fR, \fIcupsd(8)\fR, \fIinetd(8)\fR, \fIxinetd(8)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cups-lpd.man 4867 2005-12-03 15:45:53Z mike $".
+.\" End of "$Id: cups-lpd.man.in 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 495090ddde831ffdb14e0bcc2e9caff7bf922b32..f75dbbc40aed1f1b1863d09b07b6b91167b34903 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: cups-polld.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: cups-polld.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   cups-polld man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cups-polld 8 "Common UNIX Printing System" "10 May 2000" "Easy Software Products"
+.TH cups-polld 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 cups-polld \- cups printer polling daemon
 .SH SYNOPSIS
 .B cups-polld
 .I address ipp-port interval browse-port
 .SH DESCRIPTION
-\fBcups-polld\fR polls remote servers for a list of available printers
-and printer classes every \fIinterval\fR seconds. Printer and class
-information is then broadcast to the localhost interface (127.0.0.1)
-for reception by \fBcupsd(8)\fR.
+\fIcups-polld\fR polls remote servers for a list of available
+printers and printer classes every \fIinterval\fR seconds.
+Printer and class information is then broadcast to the localhost
+interface (127.0.0.1) on the specified browse port for reception
+by \fIcupsd(8)\fR.
 .PP
-This program is started automatically by \fBcupsd\fR for each
-BrowsePoll directive found in the \fBcupsd.conf\fR file.
+This program is started automatically by \fIcupsd\fR for every
+\fIBrowsePoll\fR directive found in the \fIcupsd.conf(5)\fR file.
 .SH SEE ALSO
-cupsd.conf(5),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIcupsd(8)\fR, \fIcupsd.conf(5)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cups-polld.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: cups-polld.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
similarity index 66%
rename from man/cupsaddsmb.man
rename to man/cupsaddsmb.man.in
index 38861900487b1a9fb857d7e0ed37aecd7d0b025d..b6cc165b65eb2c0d9e186bb054eec10790333d38 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: cupsaddsmb.man 4919 2006-01-12 14:13:01Z mike $"
+.\" "$Id: cupsaddsmb.man.in 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   cupsaddsmb man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cupsaddsmb 8 "Common UNIX Printing System" "12 January 2006" "Easy Software Products"
+.TH cupsaddsmb 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 cupsaddsmb \- export printers to samba for windows clients
 .SH SYNOPSIS
@@ -31,7 +31,7 @@ cupsaddsmb \- export printers to samba for windows clients
 ] [ -U
 .I samba-user[%samba-password]
 ] [ -h
-.I cups-server
+.I cups-server[:port]
 ] [ -v ] -a
 .br
 .B cupsaddsmb
@@ -40,7 +40,7 @@ cupsaddsmb \- export printers to samba for windows clients
 ] [ -U
 .I samba-user[%samba-password]
 ] [ -h
-.I cups-server
+.I cups-server[:port]
 ] [ -v ] printer [ ... printer ]
 .SH DESCRIPTION
 \fIcupsaddsmb\fR exports printers to the SAMBA software (version
@@ -48,27 +48,36 @@ cupsaddsmb \- export printers to samba for windows clients
 SAMBA configuration, you may need to provide a password to
 export the printers. This program requires the Windows printer
 driver files described below.
-.LP
-The \fI-H\fR option specifies the SAMBA server which defaults
-to the CUPS server.
-.LP
-The \fI-U\fR option specifies the SAMBA print admin username
-which defaults to your current username. If the username contains
-a percent (%) character, then the text following the percent is
-treated as the SAMBA password to use.
-.LP
-The \fI-a\fR option exports all known printers. Otherwise only
-the named printers are exported.
-.LP
-The \fI-h\fR option specifies a different CUPS server to use.
-.LP
-The \fI-v\fR option specifies that verbose information should be
-shown and is useful for debugging SAMBA configuration problems.
+.SH OPTIONS
+\fIcupsaddsmb\fR supports the following options:
+.TP 5
+-H samba-server
+.br
+Specifies the SAMBA server which defaults to the CUPS server.
+.TP 5
+-U samba-user[%samba-password]
+.br
+Specifies the SAMBA print admin username which defaults to your
+current username. If the username contains a percent (%)
+character, then the text following the percent is treated as the
+SAMBA password to use.
+.TP 5
+-a
+.br
+Exports all known printers. Otherwise only the named printers are
+exported.
+.TP 5
+-h cups-server[:port]
+Specifies a different CUPS server to use.
+.TP 5
+-v
+Specifies that verbose information should be shown. This is
+useful for debugging SAMBA configuration problems.
 .SH SAMBA CONFIGURATION
 \fIcupsaddsmb\fR uses the new RPC-based printing support in
 SAMBA 2.2.x to provide printer drivers and PPD files to Windows
 client machines. In order to use this functionality, you must
-first configure SAMBA (via the smb.conf file) to support
+first configure the SAMBA \fIsmb.conf(5)\fR file to support
 printing through CUPS and provide a printer driver download
 share, as follows:
 .nf
@@ -115,9 +124,8 @@ driver, so you will also need to get the Adobe driver to support
 Windows 95, 98, and Me clients. The Adobe and Microsoft drivers
 for Windows 2000 are identical.
 .LP
-Once you have extracted the driver files, create a "drivers"
-directory in the CUPS data directory (usually /usr/share/cups)
-and copy the files exactly as named below:
+Once you have extracted the driver files, copy them to the
+\fI@CUPS_DATADIR@/drivers\fR directory exactly as named below:
 .nf
 
     [Windows 2000 and higher]
@@ -139,9 +147,8 @@ currently only Windows 2000 and higher is supported by the CUPS
 driver, so you will also need to get the Adobe driver to support
 Windows 95, 98, and Me clients.
 .LP
-Once you have extracted the driver files, create a "drivers"
-directory in the CUPS data directory (usually /usr/share/cups)
-and copy the files exactly as named below:
+Once you have extracted the driver files, copy them to the
+\fI@CUPS_DATADIR@/drivers\fR directory exactly as named below:
 .nf
 
     [Windows 2000 and higher]
@@ -154,21 +161,16 @@ and copy the files exactly as named below:
     pscript5.dll
 .fi
 
-.SH ADOBE POSTSCRIPT DRIVERS FOR WINDOWS
+.SH ADOBE POSTSCRIPT DRIVERS FOR WINDOWS 95, 98, AND ME
 \fIcupsaddsmb\fR can use the Adobe PostScript printer driver for
-Windows, which are available for download from the Adobe web
-site (http://www.adobe.com).
+Windows 95, 98, and ME, which are available for download from the
+Adobe web site (http://www.adobe.com).
 .LP
-The CUPS printer driver is preferred over the Adobe drivers
-since they support the page-label, job-billing, and
-job-hold-until options fully on all printers. You can use the
-Adobe drivers for Windows 9x and the CUPS drivers for Windows
-2000 and higher. The Adobe and Microsoft drivers for Windows 2000
-are identical.
+The Adobe driver does not support the page-label, job-billing, or
+job-hold-until options.
 .LP
-Once you have extracted the driver files, create a "drivers"
-directory in the CUPS data directory (usually /usr/share/cups)
-and copy the files exactly as named below:
+Once you have extracted the driver files, copy them to the
+\fI@CUPS_DATADIR@/drivers\fR directory exactly as named below:
 .nf
 
     [Windows 95, 98, and Me]
@@ -179,11 +181,12 @@ and copy the files exactly as named below:
     PSMON.DLL
 .fi
 .SH SEE ALSO
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIsmbd(8)\fR, \fIsmb.conf(5)\fR,
+http://localhost:631/help
+.br
 http://www.cups.org/windows/
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cupsaddsmb.man 4919 2006-01-12 14:13:01Z mike $".
+.\" End of "$Id: cupsaddsmb.man.in 5099 2006-02-13 02:46:10Z mike $".
 .\"
similarity index 60%
rename from man/cupsd.conf.man
rename to man/cupsd.conf.man.in
index 53d0d65e8ad856b9508166984cc294cc83442edd..199f148ff5435d49653c246653308113d7d04c56 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: cupsd.conf.man 4819 2005-11-04 18:39:32Z mike $"
+.\" "$Id: cupsd.conf.man.in 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   cupsd.conf man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cupsd.conf 5 "Common UNIX Printing System" "4 November 2005" "Easy Software Products"
+.TH cupsd.conf 5 "Common UNIX Printing System" "12 February 2006" "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.  It
-is normally located in the \fI/etc/cups\fR directory.
+is normally located in the \fI@CUPS_SERVERROOT@\fR directory.
 .LP
 Each line in the file can be a configuration directive, a blank line,
 or a comment. Comment lines start with the # character. The
 configuration directives are intentionally similar to those used by the
 popular Apache web server software and are described below.
 .SH DIRECTIVES
-The following directives are understood by \fIcupsd\fR. Consult the CUPS
-Software Administrators Manual for a detailed description:
+The following directives are understood by \fIcupsd(8)\fR. Consult the
+on-line help for detailed descriptions:
 .TP 5
-AccessLog
+AccessLog filename
+.TP 5
+AccessLog syslog
 .br
 Defines the access log filename.
 .TP 5
-Allow
+Allow all
+.TP 5
+Allow none
+.TP 5
+Allow host.domain.com
+.TP 5
+Allow *.domain.com
+.TP 5
+Allow ip-address
+.TP 5
+Allow ip-address/netmask
+.TP 5
+Allow ip-address/mm
+.TP 5
+Allow @IF(name)
+.TP 5
+Allow @LOCAL
 .br
 Allows access from the named hosts or addresses.
 .TP 5
-AuthClass
+AuthClass User
+.TP 5
+AuthClass Group
+.TP 5
+AuthClass System
 .br
-Specifies the authentication class (User, Group, System)
+Specifies the authentication class (User, Group, System) -
+\fBthis directive is deprecated\fR.
 .TP 5
-AuthGroupName
+AuthGroupName group-name
 .br
-Specifies the authentication group.
+Specifies the authentication group - \fBthis directive is
+deprecated\fR.
 .TP 5
-AuthType
+AuthType None
+.TP 5
+AuthType Basic
+.TP 5
+AuthType BasicDigest
+.TP 5
+AuthType Digest
 .br
-Specifies the authentication type (None, Basic, Digest)
+Specifies the authentication type (None, Basic, BasicDigest, Digest)
 .TP 5
-AutoPurgeJobs
+AutoPurgeJobs Yes
+.TP 5
+AutoPurgeJobs No
 .br
 Specifies whether to purge job history data automatically when
 it is no longer required for quotas.
 .TP 5
-BrowseAddress
+BrowseAddress ip-address
+.TP 5
+BrowseAddress @IF(name)
+.TP 5
+BrowseAddress @LOCAL
 .br
 Specifies a broadcast address for outgoing printer information packets.
 .TP 5
-BrowseAllow
+BrowseAllow all
+.TP 5
+BrowseAllow none
+.TP 5
+BrowseAllow host.domain.com
+.TP 5
+BrowseAllow *.domain.com
+.TP 5
+BrowseAllow ip-address
+.TP 5
+BrowseAllow ip-address/netmask
+.TP 5
+BrowseAllow ip-address/mm
+.TP 5
+BrowseAllow @IF(name)
+.TP 5
+BrowseAllow @LOCAL
 .br
 Allows incoming printer information packets from the named host or address.
 .TP 5
-BrowseDeny
+BrowseDeny all
+.TP 5
+BrowseDeny none
+.TP 5
+BrowseDeny host.domain.com
+.TP 5
+BrowseDeny *.domain.com
+.TP 5
+BrowseDeny ip-address
+.TP 5
+BrowseDeny ip-address/netmask
+.TP 5
+BrowseDeny ip-address/mm
+.TP 5
+BrowseDeny @IF(name)
+.TP 5
+BrowseDeny @LOCAL
 .br
 Denies incoming printer information packets from the named host or address.
 .TP 5
-BrowseInterval
+BrowseInterval seconds
 .br
 Specifies the maximum interval between printer information broadcasts.
 .TP 5
-BrowseOrder
+BrowseOrder allow,deny
+.TP 5
+BrowseOrder deny,allow
 .br
 Specifies the order of printer information access control (allow,deny or deny,allow)
 .TP 5
-BrowsePoll
+BrowsePoll host-or-ip-address
 .br
 Specifies a server to poll for printer information.
 .TP 5
-BrowsePort
+BrowsePort port
 .br
 Specifies the port to listen to for printer information packets.
 .TP 5
-BrowseProtocols
+BrowseProtocols [All] [CUPS] [DNSSD] [LDAP] [SLP]
 .br
 Specifies the protocols to use for printer browsing.
 .TP 5
-BrowseLocalProtocols
+BrowseLocalProtocols [All] [CUPS] [DNSSD] [LDAP] [SLP]
 .br
 Specifies the protocols to use for local printer browsing.
 .TP 5
-BrowseRemoteProtocols
+BrowseRemoteProtocols [All] [CUPS] [DNSSD] [LDAP] [SLP]
 .br
 Specifies the protocols to use for remote printer browsing.
 .TP 5
-BrowseRelay
+BrowseRelay from-address to-address
 .br
 Specifies that printer information packets should be relayed from one host or
 network to another.
 .TP 5
-BrowseShortNames
+BrowseShortNames Yes
+.TP 5
+BrowseShortNames No
 .br
 Specifies whether remote printers will use short names ("printer") or not
 ("printer@server"). This option is ignored if more than one remote printer
 exists with the same name.
 .TP 5
-BrowseTimeout
+BrowseTimeout seconds
 .br
 Specifies the maximum interval between printer information updates before
 remote printers will be removed from the list of available printers.
 .TP 5
-Browsing
+Browsing Yes
+.TP 5
+Browsing No
 .br
 Specifies whether or not remote printer browsing should be enabled.
 .TP 5
-Classification
+Classification banner
 .br
 Specifies the security classification of the server.
 .TP 5
-ClassifyOverride
+ClassifyOverride Yes
+.TP 5
+ClassifyOverride No
 .br
 Specifies whether to allow users to override the classification
 of individual print jobs.
 .TP 5
-ConfigFilePerm
+ConfigFilePerm mode
 .br
 Specifies the permissions for all configuration files that the scheduler
 writes.
 .TP 5
-DataDir
+DataDir path
 .br
 Specified the directory where data files can be found.
 .TP 5
-DefaultAuthType
+DefaultAuthType Basic
+.TP 5
+DefaultAuthType BasicDigest
+.TP 5
+DefaultAuthType Digest
 .br
 Specifies the default type of authentication to use.
 .TP 5
-DefaultCharset
+DefaultCharset charset
 .br
 Specifies the default character set to use for text.
 .TP 5
-DefaultLanguage
+DefaultLanguage locale
 .br
 Specifies the default language to use for text and web content.
 .TP 5
-DefaultPolicy
+DefaultPolicy policy-name
 .br
 Specifies the default access policy to use.
 .TP 5
-Deny
+Deny all
+.TP 5
+Deny none
+.TP 5
+Deny host.domain.com
+.TP 5
+Deny *.domain.com
+.TP 5
+Deny ip-address
+.TP 5
+Deny ip-address/netmask
+.TP 5
+Deny ip-address/mm
+.TP 5
+Deny @IF(name)
+.TP 5
+Deny @LOCAL
 .br
 Denies access to the named host or address.
 .TP 5
-DocumentRoot
+DocumentRoot directory
 .br
 Specifies the root directory for the internal web server documents.
 .TP 5
-Encryption
+Encryption IfRequested
+.TP 5
+Encryption Never
+.TP 5
+Encryption Required
 .br
 Specifies the level of encryption that is required for a particular
 location.
 .TP 5
-ErrorLog
+ErrorLog filename
+.TP 5
+ErrorLog syslog
 .br
 Specifies the error log filename.
 .TP 5
-FileDevice
+FileDevice Yes
+.TP 5
+FileDevice No
 .br
 Specifies whether the file pseudo-device can be used for new
 printer queues.
 .TP 5
-FilterLimit
+FilterLimit limit
 .br
 Specifies the maximum cost of filters that are run concurrently.
 .TP 5
-FilterNice
+FilterNice nice-value
 .br
 Specifies the scheduling priority ("nice" value) of filters that
 are run to print a job.
 .TP 5
-FontPath
+FontPath directory[:directory:...]
 .br
 Specifies the search path for fonts.
 .TP 5
-Group
+Group group-name-or-number
 .br
 Specifies the group name or ID that will be used when executing
 external programs.
 .TP 5
-HideImplicitMembers
+HideImplicitMembers Yes
+.TP 5
+HideImplicitMembers No
 .br
 Specifies whether to hide members of implicit classes.
 .TP 5
-HostNameLookups
+HostNameLookups Yes
+.TP 5
+HostNameLookups No
+.TP 5
+HostNameLookups Double
 .br
 Specifies whether or not to do reverse lookups on client addresses.
 .TP 5
-ImplicitAnyClasses
+ImplicitAnyClasses Yes
+.TP 5
+ImplicitAnyClasses No
 .br
 Specifies whether or not to create implicit classes for local and
 remote printers, e.g. "AnyPrinter" from "Printer", "Printer@server1",
 and "Printer@server2".
 .TP 5
-ImplicitClasses
+ImplicitClasses Yes
+.TP 5
+ImplicitClasses No
 .br
 Specifies whether or not to create implicit classes from identical
 remote printers.
 .TP 5
-Include
+Include filename
 .br
 Includes the named file.
 .TP 5
-JobRetryInterval
+KeepAlive Yes
+.TP 5
+KeepAlive No
+.br
+Specifies whether to support HTTP keep-alive connections.
+.TP 5
+KeepAliveTimeout seconds
+.br
+Specifies the amount of time that connections are kept alive.
+.TP 5
+JobRetryInterval seconds
 .br
 Specifies the interval between retries of jobs in seconds.
 .TP 5
-JobRetryLimit
+JobRetryLimit count
 .br
 Specifies the number of retries that are done for jobs.
 .TP 5
@@ -248,7 +372,9 @@ LimitRequestBody
 .br
 Specifies the maximum size of any print job request.
 .TP 5
-Listen
+Listen ip-address:port
+.TP 5
+Listen *:port
 .br
 Listens to the specified address and port.
 .TP 5
@@ -256,53 +382,75 @@ Listens to the specified address and port.
 .br
 Specifies access control for the named location.
 .TP 5
-LogFilePerm
+LogFilePerm mode
 .br
 Specifies the permissions for all log files that the scheduler writes.
 .TP 5
-LogLevel
+LogLevel alert
+.TP 5
+LogLevel crit
+.TP 5
+LogLevel debug2
+.TP 5
+LogLevel debug
+.TP 5
+LogLevel emerg
+.TP 5
+LogLevel error
+.TP 5
+LogLevel info
+.TP 5
+LogLevel none
+.TP 5
+LogLevel notice
+.TP 5
+LogLevel warn
 .br
-Specifies the logging level (none, warn, error, info, debug, or debug2)
+Specifies the logging level for the ErrorLog file.
 .TP 5
-MaxClients
+MaxClients number
 .br
 Specifies the maximum number of simultaneous clients to support.
 .TP 5
-MaxClientsPerHost
+MaxClientsPerHost number
 .br
 Specifies the maximum number of simultaneous clients to support from a
 single address.
 .TP 5
-MaxCopies
+MaxCopies number
 .br
 Specifies the maximum number of copies that a user can print of each job.
 .TP 5
-MaxJobs
+MaxJobs number
 .br
 Specifies the maximum number of simultaneous jobs to support.
 .TP 5
-MaxJobsPerPrinter
+MaxJobsPerPrinter number
 .br
 Specifies the maximum number of simultaneous jobs per printer to support.
 .TP 5
-MaxJobsPerUser
+MaxJobsPerUser number
 .br
 Specifies the maximum number of simultaneous jobs per user to support.
 .TP 5
-MaxLogSize
+MaxLogSize number-bytes
 .br
 Specifies the maximum size of the log files before they are
 rotated (0 to disable rotation)
 .TP 5
-MaxRequestSize
+MaxRequestSize number-bytes
 .br
 Specifies the maximum request/file size in bytes (0 for no limit)
 .TP 5
-Order
+Order allow,deny
+.TP 5
+Order deny,allow
 .br
 Specifies the order of HTTP access control (allow,deny or deny,allow)
 .TP 5
-PageLog
+PageLog filename
+.TP 5
+PageLog syslog
 .br
 Specifies the page log filename.
 .TP 5
@@ -314,93 +462,119 @@ Passes the specified environment variable(s) to child processes.
 .br
 Specifies access control for the named policy.
 .TP 5
-Port
+Port number
 .br
 Specifies a port number to listen to for HTTP requests.
 .TP 5
-PreserveJobFiles
+PreserveJobFiles Yes
+.TP 5
+PreserveJobFiles No
 .br
 Specifies whether or not to preserve job files after they are printed.
 .TP 5
-PreserveJobHistory
+PreserveJobHistory Yes
+.TP 5
+PreserveJobHistory No
 .br
 Specifies whether or not to preserve the job history after they are
 printed.
 .TP 5
 Printcap
+.TP 5
+Printcap filename
 .br
-Specifies the filename for a printcap file that is updated automatically
-with a list of available printers (needed for legacy applications)
+Specifies the filename for a printcap file that is updated
+automatically with a list of available printers (needed for
+legacy applications); specifying Printcap with no filename
+disables printcap generation.
+.TP 5
+PrintcapFormat bsd
 .TP 5
-PrintcapFormat
+PrintcapFormat solaris
 .br
 Specifies the format of the printcap file.
 .TP 5
 PrintcapGUI
+.TP 5
+PrintcapGUI gui-program-filename
 .br
-Specifies whether to generate option panel definition files on some
-operating systems.
+Specifies whether to generate option panel definition files on
+some operating systems. When provided with no program filename,
+disables option panel definition files.
 .TP 5
-ReloadTimeout
+ReloadTimeout seconds
 .br
 Specifies the amount of time to wait for job completion before
 restarting the scheduler.
 .TP 5
-RemoteRoot
+RemoteRoot user-name
 .br
 Specifies the username that is associated with unauthenticated root
 accesses.
 .TP 5
-RequestRoot
+RequestRoot directory
 .br
 Specifies the directory to store print jobs and other HTTP request
 data.
 .TP 5
-Require
+Require group group-name-list
+.TP 5
+Require user user-name-list
+.TP 5
+Require valid-user
 .br
 Specifies that user or group authentication is required.
 .TP 5
-RIPCache
+RIPCache bytes
 .br
 Specifies the maximum amount of memory to use when converting images
 and PostScript files to bitmaps for a printer.
 .TP 5
-RunAsUser
-.br
-Specifies that the scheduler should run as the unpriviledged user
-set with the User directive.
+Satisfy all
 .TP 5
-Satisfy
+Satisfy any
 .br
 Specifies whether all or any limits set for a Location must be
 satisfied to allow access.
 .TP 5
-ServerAdmin
+ServerAdmin user@domain.com
 .br
 Specifies the email address of the server administrator.
 .TP 5
-ServerBin
+ServerBin directory
 .br
 Specifies the directory where backends, CGIs, daemons, and filters may
 be found.
 .TP 5
-ServerCertificate
+ServerCertificate filename
 .br
 Specifies the encryption certificate to use.
 .TP 5
-ServerKey
+ServerKey filename
 .br
 Specifies the encryption key to use.
 .TP 5
-ServerName
+ServerName hostname-or-ip-address
 .br
 Specifies the fully-qualified hostname of the server.
 .TP 5
-ServerRoot
+ServerRoot directory
 .br
 Specifies the directory where the server configuration files can be found.
 .TP 5
-ServerTokens
+ServerTokens Full
+.TP 5
+ServerTokens Major
+.TP 5
+ServerTokens Minimal
+.TP 5
+ServerTokens Minor
+.TP 5
+ServerTokens None
+.TP 5
+ServerTokens OS
+.TP 5
+ServerTokens ProductOnly
 .br
 Specifies what information is included in the Server header of HTTP
 responses.
@@ -417,27 +591,29 @@ SSLPort
 .br
 Listens on the specified port for encrypted connections.
 .TP 5
-SystemGroup
+SystemGroup group-name [group-name ...]
 .br
-Specifies the group to use for System class authentication.
+Specifies the group(s) to use for System class authentication.
 .TP 5
-TempDir
+TempDir directory
 .br
 Specifies the directory where temporary files are stored.
 .TP 5
-Timeout
+Timeout seconds
 .br
 Specifies the HTTP request timeout in seconds.
 .TP 5
-User
+User user-name
 .br
 Specifies the user name or ID that is used when running external programs.
 .SH SEE ALSO
-classes.conf(5), cupsd(8), mime.convs(5), mime.types(5), printers.conf(5),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fImime.convs(5)\fR,
+\fImime.types(5)\fR, \fIprinters.conf(5)\fR,
+\fIsubscriptions.conf(5)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cupsd.conf.man 4819 2005-11-04 18:39:32Z mike $".
+.\" End of "$Id: cupsd.conf.man.in 5099 2006-02-13 02:46:10Z mike $".
 .\"
similarity index 51%
rename from man/cupsd.man
rename to man/cupsd.man.in
index b503e23cb012ebbf6350718e677ae7111b793cfa..cbcc0ea91e887507d48124ad69d48dc121c8039e 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: cupsd.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: cupsd.man.in 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   cupsd man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cupsd 8 "Common UNIX Printing System" "18 July 2002" "Easy Software Products"
+.TH cupsd 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 cupsd \- common unix printing system daemon
 .SH SYNOPSIS
 .B cupsd
-[ \-c
+[ -c
 .I config-file
-] [ \-f ] [ \-F ]
+] [ -f ] [ -F ] [ -h ] [ -l ]
 .SH DESCRIPTION
 \fIcupsd\fR is the scheduler for the Common UNIX Printing System. It
 implements a printing system based upon the Internet Printing Protocol,
 version 1.1.  If no options are specified on the command-line then the
-default configuration file (usually \fI/etc/cups/cupsd.conf\fR) will be
+default configuration file \fI@CUPS_SERVERROOT@/cupsd.conf\fR will be
 used.
-.PP
-The \fI-f\fR option forces \fIcupsd\fR to run in the foreground; the
-default is to run in the background as a "daemon".
-.PP
-The \fI-F\fR option forces \fIcupsd\fR to run in the foreground
-but detaches the process from the controlling terminal and
-current directory. This is useful for running \fIcupsd\fR from
-\fIinit\fR.
+.SH OPTIONS
+.TP 5
+-c config-file
+.br
+Uses the named configuration file.
+.TP 5
+-f
+.br
+Run \fIcupsd\fR in the foreground; the default is to run in the
+background as a "daemon".
+.TP 5
+-F
+.br
+Run \fIcupsd\fR in the foreground but detach the process from the
+controlling terminal and current directory. This is useful for
+running \fIcupsd\fR from \fIinit(8)\fR.
+.TP 5
+-h
+.br
+Shows the program usage.
+.TP 5
+-l
+.br
+This option is passed to \fIcupsd\fR when it is run from
+\fIlaunchd(8)\fR.
 .SH COMPATIBILITY
 \fIcupsd\fR implements all of the required IPP/1.1 attributes and
 operations. It also implements several CUPS-specific administration
 operations.
 .SH SEE ALSO
-backend(1), classes.conf(5), cupsd.conf(5), filter(1), mime.convs(5),
-mime.types(5), printers.conf(5),
-CUPS Implementation of IPP,
-CUPS Interface Design Description,
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIbackend(7)\fR, \fIclasses.conf(5)\fR, \fIcups-deviced(8)\fR,
+\fIcups-driverd(8)\fR, \fIcups-lpd(8)\fR, \fIcups-polld(8)\fR,
+\fIcupsd.conf(5)\fR, \fIfilter(7)\fR, \fIlaunchd(8)\fR,
+\fImime.convs(5)\fR, \fImime.types(5)\fR, \fIprinters.conf(5)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cupsd.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: cupsd.man.in 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 9f65396808b57c872740ea0d4d163abae3d929ac..e446991fc8572385da1d85d21454cc7d9afb4ca5 100644 (file)
@@ -1,9 +1,10 @@
 .\"
-.\" "$Id: cupsenable.man 4833 2005-11-12 21:46:52Z mike $"
+.\" "$Id: cupsenable.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
-.\"   enable/disable man page for the Common UNIX Printing System (CUPS).
+.\"   cupsenable/cupsdisable man page for the Common UNIX Printing System
+.\"   (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH enable 8 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
+.TH cupsenable 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
-disable, enable \- stop/start printers and classes
+cupsdisable, cupsenable \- stop/start printers and classes
 .SH SYNOPSIS
-.B disable
-[ -E ] [ \-c ] [ -h
-.I server
-] [ \-r
+.B cupsdisable
+[ -E ] [-U
+.I username
+] [ -c ] [ -h
+.I server[:port]
+] [ -r
 .I reason
 ] destination(s)
 .br
-.B enable
-[ -E ] destination(s)
+.B cupsenable
+[ -E ] [-U
+.I username
+] [ -c ] [ -h
+.I server[:port]
+] destination(s)
 .SH DESCRIPTION
-\fIenable\fR starts the named printers or classes.
+\fIcupsenable\fR starts the named printers or classes.
 .LP
-\fIdisable\fR stops the named printers or classes.  The following options may
-be used:
+\fIcupsdisable\fR stops the named printers or classes.  The
+following options may be used:
+.TP 5
+-E
+.br
+Forces encryption of the connection to the server.
 .TP 5
-\-c
+-U username
+.br
+Uses the specified username when connecting to the server.
+.TP 5
+-c
 .br
 Cancels all jobs on the named destination.
 .TP 5
-\-r [ \fIreason\fR ]
+-h server[:port]
+.br
+Uses the specified server and port.
+.TP 5
+-r "reason"
 .br
 Sets the message associated with the stopped state. If no reason is specified
 then the message is set to "Reason Unknown".
-.LP
-The \fI-E\fR option forces encryption when connecting to the server.
 .SH COMPATIBILITY
-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.
+Unlike the System V printing system, CUPS allows printer names to
+contain any printable character except SPACE, TAB, "/", or "#".
+Also, printer and class names are \fInot\fR case-sensitive.
+.LP
+The System V versions of these commands are \fIdisable\fR and
+\fIenable\fR. They have been renamed to avoid conflicts with the
+\fIbash(1)\fR build-in command of the same name.
+.LP
+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 Administrators Manual,
-http://localhost:631/documentation.html
+\fIaccept(8)\fR, \fIcancel(1)\fR, \fIlp(1)\fR, \fIlpadmin(8)\fR,
+\fIlpstat(1)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 
 .\"
-.\" End of "$Id: cupsenable.man 4833 2005-11-12 21:46:52Z mike $".
+.\" End of "$Id: cupsenable.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index cda964c9cb068e65b769ccea122bed03d7ef1537..149ddbf94ab29030bc456669f3b2bb0272a57579 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: cupstestppd.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: cupstestppd.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   cupstestppd man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH cupstestppd 1 "Common UNIX Printing System" "1 August 2003" "Easy Software Products"
+.TH cupstestppd 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 cupstestppd \- test conformance of ppd files
 .SH SYNOPSIS
@@ -40,20 +40,29 @@ any other output are sent to the standard output.
 The first form of \fIcupstestppd\fR tests one or more PPD files
 on the command-line. The second form tests the PPD file provided
 on the standard input.
-.LP
-The \fI-q\fR option specifies that no information should be displayed.
-.LP
-The \fI-r\fR option relaxes the PPD conformance requirements so
-that common whitespace, control character, and formatting
-problems are not treated as hard errors.
-.LP
-The \fI-v\fR option specifies that detailed conformance testing
-results should be displayed rather than the concise PASS/FAIL/ERROR
-status.
-.LP
-The \fI-vv\fR option specifies that all information in the PPD
-file should be displayed in addition to the detailed conformance
-testing results.
+.SH OPTIONS
+\fIcupstestppd\fR supports the following options:
+.TP 5
+-q
+.br
+Specifies that no information should be displayed.
+.TP 5
+-r
+.br
+Relaxes the PPD conformance requirements so that common
+whitespace, control character, and formatting problems are not
+treated as hard errors.
+.TP 5
+-v
+.br
+Specifies that detailed conformance testing results should be
+displayed rather than the concise PASS/FAIL/ERROR status.
+.TP 5
+-vv
+.br
+Specifies that all information in the PPD file should be
+displayed in addition to the detailed conformance testing
+results.
 .LP
 The \fI-q\fR, \fI-v\fR, and \fI-vv\fR options are mutually exclusive.
 .SH EXIT STATUS
@@ -94,12 +103,13 @@ that do not conform:
 
 .fi
 .SH SEE ALSO
-CUPS Software Administrators Manual,
-CUPS Software Programmers Manual,
-http://localhost:631/documentation.html,
+\fIlpadmin(8)\fR,
+.br
+http://localhost:631/help
+.br
 Adobe PostScript Printer Description File Format Specification, Version 4.3.
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cupstestppd.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: cupstestppd.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 61e2afe7480a78cb18dbfc02ec9608443c80e710..6243bcd6c56fde2abc14385b5b43bebeebbb5bc5 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: filter.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: filter.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   filter man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,9 +21,9 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH filter 1 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
+.TH filter 7 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
-filter \- cups file conversion filter interfaces
+filter \- cups file conversion filter interface
 .SH SYNOPSIS
 .B filter
 job user title num-copies options [
@@ -35,89 +35,199 @@ new document types to CUPS. Each filter is capable of converting from one
 or more input formats to another format that can either be printed directly
 or piped into another filter to get it to a printable format.
 .LP
-Filters must be capable of reading from a filename on the command-line
+Filters \fBmust\fR be capable of reading from a filename on the command-line
 or from the standard input, copying the standard input to a temporary
-file as required by the file format. All output must be sent to the
+file as required by the file format. All output \fBmust\fR be sent to the
 standard output.
 .LP
 The command name (argv[0]) is set to the name of the destination printer.
+.SH LOG MESSAGES
+Messages sent to stderr are generally logged to
+printer-state-message attribute and the current \fIErrorLog\fR.
+Each line begins with a standard prefix:
+
+.TP 5
+ALERT: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "alert" log level.
+
+.TP 5
+ATTR: attribute=value [attribute=value]
+.br
+Sets the named job attribute(s). Typically this will be used to
+set the job-remote-id attribute.
+
+.TP 5
+CRIT: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "critical" log level.
+
+.TP 5
+DEBUG: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "debug" log level.
+
+.TP 5
+DEBUG2: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "debug2" log level.
+
+.TP 5
+EMERG: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "emergency" log level.
+
+.TP 5
+ERROR: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "error" log level.
+
+.TP 5
+INFO: message
+.br
+Sets the printer-state-message attribute. If the current \fILogLevel\fR
+is set to "debug2", also adds the specified message to the
+current \fIErrorLog\fR using the "info" log level.
+
+.TP 5
+NOTICE: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "notice" log level.
+
+.TP 5
+PAGE: page-number #-copies
+.TP 5
+PAGE: #-pages total
+.br
+Adds an entry to the current \fIPageLog\fR. The first form adds
+#-copies to the job-media-sheets-completed attribute. The second
+form sets the job-media-sheets-completed attribute to #-pages.
+
+.TP 5
+STATE: printer-state-reason [printer-state-reason ...]
+.TP 5
+STATE: + printer-state-reason [printer-state-reason ...]
+.TP 5
+STATE: - printer-state-reason [printer-state-reason ...]
+.br
+Sets, adds, or removes printer-state-reason keywords to the
+current queue. Typically this is used to indicate media, ink, and
+toner conditions on a printer.
+
+.TP 5
+WARNING: message
+.br
+Sets the printer-state-message attribute and adds the specified
+message to the current \fIErrorLog\fR using the "warning" log level.
+
 .SH ENVIRONMENT VARIABLES
-The following environment variables are defined by the CUPS server when
-executing each filter:
+The following environment variables are defined by the CUPS
+server when executing the backend:
+
 .TP 5
 CHARSET
 .br
-The default text character set (typically us-ascii or iso-8859-1).
+The default text character set, typically utf-8.
+
 .TP 5
 CLASS
 .br
 When a job is submitted to a printer class, contains the name of
 the destination printer class. Otherwise this environment
 variable will not be set.
+
 .TP 5
 CONTENT_TYPE
 .br
-The MIME type associated with the file (e.g. application/postscript).
+The MIME type associated with the file (e.g.
+application/postscript).
+
 .TP 5
 CUPS_DATADIR
 .br
 The directory where data files can be found.
+
 .TP 5
 CUPS_SERVERROOT
 .br
 The root directory of the server.
+
 .TP 5
 DEVICE_URI
 .br
-The device-uri associated with the printer.
+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 and for backends that require any authentication
+information which is not included in argv[0].
+
+.TP 5
+FINAL_CONTENT_TYPE
+.br
+The MIME type associated with the printer (e.g.
+application/vnd.cups-postscript).
+
 .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 filter.
+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.
+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.
+The name of the printer.
+
 .TP 5
 RIP_CACHE
 .br
-The recommended amount of memory to use for Raster Image Processors (RIPs).
+The recommended amount of memory to use for Raster Image
+Processors (RIPs).
+
 .TP 5
 SOFTWARE
 .br
-The name and version number of the server (typically CUPS/1.1).
+The name and version number of the server (typically CUPS/1.2).
+
 .TP 5
 TZ
 .br
 The timezone of the server.
+
 .TP 5
 USER
 .br
-The user executing the filter, typically lp; consult the cupsd.conf file for
-the current setting.
+The user executing the backend, typically root; consult the
+\fIcupsd.conf(5)\fR file for the current setting.
+
 .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
 only filter.  Typically the interface script will be provided via the
-\fBlpadmin(8)\fR command using the \fI-i\fR option.
+\fIlpadmin(8)\fR command using the \fI-i\fR option.
 .SH SEE ALSO
-backend(1), cupsd(8),
-CUPS Interface Design Description,
-CUPS Software Administrators Manual,
-CUPS Software Programmers Manual,
-http://localhost:631/documentation.html
+\fIbackend(1)\fR, \fIcupsd(8)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: filter.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: filter.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 2a823459befad4abbe4ac3807a8142abdaf80c9a..41662a1dd5503a1cff9b49b4572bb6dec66f09de 100644 (file)
@@ -1,7 +1,7 @@
 .\"
-.\" "$Id: lp.man 5010 2006-01-27 19:53:55Z mike $"
+.\" "$Id: lp.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
-.\"   lp/cancel man page for the Common UNIX Printing System (CUPS).
+.\"   lp man page for the Common UNIX Printing System (CUPS).
 .\"
 .\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lp 1 "Common UNIX Printing System" "18 January 2006" "Easy Software Products"
+.TH lp 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
-lp \- print files
-.br
-cancel \- cancel jobs
+lp - print files
 .SH SYNOPSIS
 .B lp
 [ -E ] [ -U
 .I username
-] [ \-c ] [ \-d
-.I destination
-] [ \-h
+] [ -c ] [ -d
+.I destination[/instance]
+] [ -h
 .I hostname[:port]
-] [ \-m ] [ \-n
+] [ -m ] [ -n
 .I num-copies
-[ \-o
-.I option
-] [ \-q
+[ -o
+.I option[=value]
+] [ -q
 .I priority
-] [ \-s ] [ \-t
+] [ -s ] [ -t
 .I title
-] [ \-H
+] [ -H
 .I handling
-] [ \-P
+] [ -P
 .I page-list
-] [
+] [ -- ] [
 .I file(s)
 ]
 .br
 .B lp
 [ -E ] [ -U
 .I username
-] [ \-c ] [ \-h
+] [ -c ] [ -h
 .I hostname[:port]
-] [ \-i
+] [ -i
 .I job-id
-] [ \-n
+] [ -n
 .I num-copies
-[ \-o
-.I option
-] [ \-q
+[ -o
+.I option[=value]
+] [ -q
 .I priority
-] [ \-t
+] [ -t
 .I title
-] [ \-H
+] [ -H
 .I handling
-] [ \-P
+] [ -P
 .I page-list
 ]
-.br
-.B cancel
-[ -E ] [ -U
-.I username
-] [ \-a ] [ -h
-.I hostname:port
-] [ -u 
-.I username
-] [
-.I id
-] [
-.I destination
-] [
-.I destination-id
-]
 .SH DESCRIPTION
-\fBlp\fR submits files for printing or alters a pending job. Use
+\fIlp\fR submits files for printing or alters a pending job. Use
 a filename of "-" to force printing from the standard input.
-.LP
-\fBcancel\fR cancels existing print jobs. The \fI-a\fR option will remove
-all jobs from the specified destination.
 .SH OPTIONS
-The following options are recognized by \fBlp\fR:
+The following options are recognized by \fIlp\fR:
 .TP 5
-\-E
+--
+.br
+Marks the end of options; use this to print a file whose name
+begins with a dash (-).
+.TP 5
+-E
 .br
 Forces encryption when connecting to the server.
 .TP 5
-\-U
+-U username
 .br
 Specifies the username to use when connecting to the server.
 .TP 5
-\-c
+-c
 .br
 This option is provided for backwards-compatibility only. On
 systems that support it, this option forces the print file to be
@@ -110,53 +95,56 @@ copied to the spool directory before printing. In CUPS, print
 files are always sent to the scheduler via IPP which has the
 same effect.
 .TP 5
-\-d \fIdestination\fR
+-d destination
 .br
 Prints files to the named printer.
 .TP 5
-\-h \fIhostname\fR
+-h hostname[:port]
 .br
-Specifies the print server hostname. The default is "localhost" or the value
-of the CUPS_SERVER environment variable.
+Chooses an alternate server.
 .TP 5
-\-i \fIjob-id\fR
+-i job-id
 .br
 Specifies an existing job to modify.
 .TP 5
-\-m
-.TP 5
-\-p
-.TP 5
-\-w
+-m
 .br
-Send email when the job is completed.
+Sends an email when the job is completed.
 .TP 5
-\-n \fIcopies\fR
+-n copies
 .br
 Sets the number of copies to print from 1 to 100.
 .TP 5
-\-o \fIoption\fR
+-o "name=value [name=value ...]"
 .br
-Sets a job option.
+Sets one or more job options.
 .TP 5
-\-q \fIpriority\fR
+-q priority
 .br
 Sets the job priority from 1 (lowest) to 100 (highest). The
 default priority is 50.
 .TP 5
-\-s
+-s
 .br
 Do not report the resulting job IDs (silent mode.)
 .TP 5
-\-t \fIname\fR
+-t "name"
 .br
 Sets the job name.
 .TP 5
-\-u \fIusername\fR
+-u username
 .br
-Cancels jobs owned by \fIusername\fR.
+Submits jobs as \fIusername\fR.
+.TP 5
+-H hh:mm
+.TP 5
+-H hold
+.TP 5
+-H immediate
+.TP 5
+-H restart
 .TP 5
-\-H \fIhandling\fR
+-H resume
 .br
 Specifies when the job should be printed. A value of
 \fIimmediate\fR will print the file immediately, a value of
@@ -166,29 +154,99 @@ of \fIresume\fR with the \fI-i\fR option to resume a held job.
 Use a value of \fIrestart\fR with the \fI-i\fR option to restart
 a completed job.
 .TP 5
-\-P \fIpage-list\fR
+-P page-list
+.br
+Specifies which pages to print in the document. The list can
+contain a list of numbers and ranges (#-#) separated by commas
+(e.g. 1,3-5,16).
+.SH COMMON JOB OPTIONS
+Aside from the printer-specific options reported by the
+\fIlpoptions(1)\fR command, the following generic options are
+available:
+.TP 5
+-o media=size
+.br
+Sets the page size to \fIsize\fR. Most printers support at least
+the size names "a4", "letter", and "legal".
+.TP 5
+-o landscape
+.TP 5
+-o orientation-requested=4
 .br
-Specifies which pages to print in the document. The list can contain a
-list of numbers and ranges (#-#) separated by commas (e.g. 1,3-5,16).
+Prints the job in landscape (rotated 90 degrees).
+.TP 5
+-o sides=one-sided
+.TP 5
+-o sides=two-sided-long-edge
+.TP 5
+-o sides=two-sided-short-edge
+.br
+Prints on one or two sides of the paper. The value
+"two-sided-long-edge" is normally used when printing portrait
+(unrotated) pages, while "two-sided-short-edge" is used for
+landscape pages.
+.TP 5
+-o fitplot
+.br
+Scales the print file to fit on the page.
+.TP 5
+-o scaling=number
+.br
+Scales image files to use up to \fInumber\fR percent of the page.
+Values greater than 100 cause the image file to be printed across
+multiple pages.
+.TP 5
+-o cpi=N
+.br
+Sets the number of characters per inch to use when printing a
+text file. The default is 10.
+.TP 5
+-o lpi=N
+.br
+Sets the number of lines per inch to use when printing a text
+file. The default is 6.
+.TP 5
+-o page-bottom=N
+.TP 5
+-o page-left=N
+.TP 5
+-o page-right=N
+.TP 5
+-o page-top=N
+.br
+Sets the page margins when printing text files. The values are in
+points - there are 72 points to the inch.
+.SH EXAMPLES
+Print a double-sided legal document to a printer called "foo":
+.nf
+    lp -d foo -o media=legal -o sides=two-sided-long-edge filename
+.fi
+.LP
+Print an image across 4 pages:
+.nf
+    lp -d bar -o scaling=200 filename
+.fi
+.LP
+Print a text file with 12 characters per inch, 8 lines per inch, and
+a 1 inch left margin:
+.nf
+    lp -d bar -o cpi=12 -o lpi=8 -o page-left=72 filename
+.fi
 .SH COMPATIBILITY
-Unlike the System V printing system, CUPS allows printer names to contain
-any printable character except SPACE and TAB. Also, printer and class names are
-\fBnot\fR case-sensitive. 
+Unlike the System V printing system, CUPS allows printer names to
+contain any printable character except SPACE, TAB, "/", or "#".
+Also, printer and class names are \fInot\fR case-sensitive.
 .LP
 The "q" option accepts a different range of values than the
-Solaris lp command, matching the IPP job priority values (1-100, 100 is
-highest priority) instead of the Solaris values (0-39, 0 is highest
-priority).
-.SH NOTES
-Administrators wishing to prevent unauthorized cancellation of
-jobs via the \fI-u\fR option should require authentication for
-Cancel-Jobs operations in \fIcupsd.conf(5)\fR.
+Solaris lp command, matching the IPP job priority values (1-100,
+100 is highest priority) instead of the Solaris values (0-39, 0
+is highest priority).
 .SH SEE ALSO
-lpstat(1),
+\fIcancel(1)\fR, \fIlpmove(8)\fR, \fIlpoptions(1)\fR, \fIlpstat(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lp.man 5010 2006-01-27 19:53:55Z mike $".
+.\" End of "$Id: lp.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 7c94b8ca086e80b8930e86493af131965fd74357..a446277367411c00422cade42158268b84b189a2 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: lpadmin.man 4841 2005-11-15 20:39:31Z mike $"
+.\" "$Id: lpadmin.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpadmin man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpadmin 8 "Common UNIX Printing System" "21 October 2002" "Easy Software Products"
+.TH lpadmin 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpadmin \- configure cups printers and classes
 .SH SYNOPSIS
 .B lpadmin
-[ -E ] [ -h
-.I server
-] \-d
+[ -E ] [-U
+.I username
+] [ -h
+.I server[:port]
+] -d
 .I destination
 .br
 .B lpadmin
-[ -E ] [ -h
-.I server
-] \-p
-.I printer
-.I option(s)
+[ -E ] [-U
+.I username
+] [ -h
+.I server[:port]
+] -p
+.I printer option(s)
 .br
 .B lpadmin
-[ -E ] [ -h
-.I server
-] \-x
+[ -E ] [-U
+.I username
+] [ -h
+.I server[:port]
+] -x
 .I destination
 .SH DESCRIPTION
 \fIlpadmin\fR configures printer and class queues provided by
 CUPS. It can also be used to set the server default printer or
 class.
 .LP
-When specified before the \fI-d\fR, \fI-p\fR, or \fI-x\fR options,
-the \fI-E\fR option forces encryption when connecting to the server.
+When specified before the \fI-d\fR, \fI-p\fR, or \fI-x\fR
+options, the \fI-E\fR option forces encryption when connecting to
+the server.
 .LP
-The first form of the command (\fI-d\fR) sets the default printer or class to
-\fIdestination\fR.  Subsequent print jobs submitted via the \fIlp(1)\fR or
-\fIlpr(1)\fR commands will use this destination unless the user specifies
-otherwise with the \fIlpoptions(1)\fR command.
+The first form of the command (\fI-d\fR) sets the default printer
+or class to \fIdestination\fR.  Subsequent print jobs submitted
+via the \fIlp(1)\fR or \fIlpr(1)\fR commands will use this
+destination unless the user specifies otherwise with the
+\fIlpoptions(1)\fR command.
 .LP
-The second form of the command (\fI-p\fR) configures the named printer.  The additional
-options are described below.
+The second form of the command (\fI-p\fR) configures the named
+printer.  The additional options are described below.
 .LP
-The third form of the command (\fI-x\fR) deletes the printer or class \fIdestination\fR.
-Any jobs that are pending for the destination will be removed and any job that
-is currently printed will be aborted.
+The third form of the command (\fI-x\fR) deletes the printer or
+class \fIdestination\fR. Any jobs that are pending for the
+destination will be removed and any job that is currently printed
+will be aborted.
 .SH CONFIGURATION OPTIONS
-The following options are recognized when configuring a printer queue:
+The following options are recognized when configuring a printer
+queue:
 .TP 5
-\-c \fIclass\fR
+-c class
 .br
-Adds the named \fIprinter\fR to \fIclass\fR.  If \fIclass\fR does not
-exist it is created automatically.
+Adds the named \fIprinter\fR to \fIclass\fR.  If \fIclass\fR does
+not exist it is created automatically.
 .TP 5
-\-i \fIinterface\fR
+-i interface
 .br
-Sets a System V style interface script for the printer.  This option cannot
-be specified with the \fI\-P\fR option (PPD file) and is intended for
-providing support for legacy printer drivers.
+Sets a System V style interface script for the printer. This
+option cannot be specified with the \fI-P\fR option (PPD file)
+and is intended for providing support for legacy printer drivers.
 .TP 5
-\-m \fImodel\fR
+-m model
 .br
-Sets a standard System V interface script or PPD file from the model
-directory.
+Sets a standard System V interface script or PPD file from the
+\fImodel\fR directory.
 .TP 5
-\-o \fIname=value\fR
+-o name=value
 .br
-Sets a PPD or server option for the printer. PPD options can be listed
-using the \fI-l\fR option with the \fIlpoptions(1)\fR command.
+Sets a PPD or server option for the printer. PPD options can be
+listed using the \fI-l\fR option with the \fIlpoptions(1)\fR
+command.
 .TP 5
-\-o \fIjob-k-limit=value\fR
+-o job-k-limit=value
 .br
-Sets the kilobyte limit for per-user quotas. The value is an integer number
-of kilobytes; one kilobyte is 1024 bytes.
+Sets the kilobyte limit for per-user quotas. The value is an
+integer number of kilobytes; one kilobyte is 1024 bytes.
 .TP 5
-\-o \fIjob-page-limit=value\fR
+-o job-page-limit=value
 .br
-Sets the page limit for per-user quotas. The value is the integer number of
-pages that can be printed; double-sided pages are counted as two pages.
+Sets the page limit for per-user quotas. The value is the integer
+number of pages that can be printed; double-sided pages are
+counted as two pages.
 .TP 5
-\-o \fIjob-quota-period=value\fR
+-o job-quota-period=value
 .br
-Sets the accounting period for per-user quotas. The value is an integer number
-of seconds; 86,400 seconds are in one day.
+Sets the accounting period for per-user quotas. The value is an
+integer number of seconds; 86,400 seconds are in one day.
 .TP 5
-\-o \fIprotocol=name\fR
+-o job-sheets-default=banner
+.TP 5
+-o job-sheets-default=banner,banner
+.br
+Sets the default banner page(s) to use for print jobs.
+.TP 5
+-o port-monitor=name
 .br
-Sets the binary communications protocol to use when printing,
-None, BCP, or TBCP. The default protocol is None.
+Sets the binary communications program to use when printing,
+"none", "bcp", or "tbcp". The default program is "none".
 .TP 5
-\-r \fIclass\fR
+-r class
 .br
-Removes the named \fIprinter\fR from \fIclass\fR.  If the resulting class
-becomes empty it is removed.
+Removes the named \fIprinter\fR from \fIclass\fR.  If the
+resulting class becomes empty it is removed.
 .TP 5
-\-u \fIallow:user,user,@group\fR
-\-u \fIdeny:user,user,@group\fR
-\-u \fIallow:all\fR
-\-u \fIdeny:none\fR
+-u allow:user,user,@group
+-u deny:user,user,@group
+-u allow:all
+-u deny:none
 .br
 Sets user-level access control on a printer. Names starting with
 "@" are interpreted as UNIX groups. The latter two forms turn
 user-level access control off.
 .TP 5
-\-v \fIdevice-uri\fR
+-v "device-uri"
 .br
-Sets the \fIdevice-uri\fR attribute of the printer queue.  If \fIdevice-uri\fR
-is a filename it is automatically converted to the form \fBfile:/file/name\fR.
+Sets the \fIdevice-uri\fR attribute of the printer queue.  If
+\fIdevice-uri\fR is a filename it is automatically converted to
+the form \fIfile:///file/name\fR.
 .TP 5
-\-D \fIinfo\fR
+-D "info"
 .br
 Provides a textual description of the printer.
 .TP 5
-\-E
+-E
 .br
 Enables the printer and accepts jobs; this is the same as running the
-\fIaccept(8)\fR and \fIenable(8)\fR programs on the printer.
+\fIaccept(8)\fR and \fIcupsenable(8)\fR programs on the printer.
 .TP 5
-\-L \fIlocation\fR
+-L "location"
 .br
 Provides a textual location of the printer.
 .TP 5
-\-P \fIppd-file\fR
+-P ppd-file
 .br
-Specifies a PostScript Printer Description file to use with the printer. If
-specified, this option overrides the \fI-i\fR option (interface script).
+Specifies a PostScript Printer Description file to use with the
+printer. If specified, this option overrides the \fI-i\fR option
+(interface script).
 .SH COMPATIBILITY
-Unlike the System V printing system, CUPS allows printer names to contain
-any printable character except SPACE and TAB. Also, printer and class names are
-\fBnot\fR case-sensitive. Finally, the CUPS version of \fIlpadmin\fR may ask the
-user for an access password depending on the printing system configuration.
-This differs from the System V version which requires the root user to execute
-this command.
+Unlike the System V printing system, CUPS allows printer names to
+contain any printable character except SPACE, TAB, "/", or "#".
+Also, printer and class names are \fInot\fR case-sensitive.
+Finally, the CUPS version of \fIlpadmin\fR may ask the user for
+an access password depending on the printing system
+configuration. This differs from the System V version which
+requires the root user to execute this command.
 .SH LIMITATIONS
-The CUPS version of \fIlpadmin\fR does not support all of the System V or
-Solaris printing system configuration options.
+The CUPS version of \fIlpadmin\fR does not support all of the
+System V or Solaris printing system configuration options.
 .SH SEE ALSO
-accept(8), cancel(1), disable(8), enable(8), lp(1), lpstat(1), reject(8),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIaccept(8)\fR, \fIcupsenable(8)\fR, \fIlpoptions(1)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpadmin.man 4841 2005-11-15 20:39:31Z mike $".
+.\" End of "$Id: lpadmin.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 56547a6ea39e0602a9d50d27fdeb14f0799ae016..f183f3de6692fc35c907f655f8008cf5b8427fc5 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: lpc.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: lpc.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpc man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpc 8 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
+.TH lpc 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpc \- line printer control program
 .SH SYNOPSIS
@@ -32,20 +32,23 @@ lpc \- line printer control program
 .I parameter(s)
 ] ]
 .SH DESCRIPTION
-\fIlpc\fR provides limited control over printer and class queues provided by
-CUPS. It can also be used to query the state of queues.
+\fIlpc\fR provides limited control over printer and class queues
+provided by CUPS. It can also be used to query the state of
+queues.
 .LP
-If no command is specified on the command-line, \fRlpc\fR will display a
-prompt and accept commands from the standard input.
+If no command is specified on the command-line, \fRlpc\fR will
+display a prompt and accept commands from the standard input.
 .SH COMMANDS
-The \fIlpc\fR program accepts a subset of commands accepted by the Berkeley
-\fIlpc\fR program of the same name:
+The \fIlpc\fR program accepts a subset of commands accepted by
+the Berkeley \fIlpc\fR program of the same name:
 .TP 5
-\fIexit
+exit
 .br
 Exits the command interpreter.
 .TP 5
-help \fI[command]\fR
+help [command]
+.TP 5
+? [command]
 .br
 Displays a short help message.
 .TP 5
@@ -53,28 +56,25 @@ quit
 .br
 Exits the command interpreter.
 .TP 5
-status \fI[queue]\fR
+status [queue]
 .br
 Displays the status of one or more printer or class queues.
-.TP 5
-? \fI[command]\fR
-.br
-Display a short help message.
 .SH LIMITATIONS
-Since \fIlpc\fR is geared towards the Berkeley printing system, it is impossible
-to use \fIlpc\fR to configure printer or class queues provided by CUPS.  To
-configure printer or class queues you must use the \fIlpadmin(8)\fR command
-or another CUPS-compatible client with that functionality.
+Since \fIlpc\fR is geared towards the Berkeley printing system,
+it is impossible to use \fIlpc\fR to configure printer or class
+queues provided by CUPS.  To configure printer or class queues
+you must use the \fIlpadmin(8)\fR command or another
+CUPS-compatible client with that functionality.
 .SH COMPATIBILITY
-The CUPS version of \fIlpc\fR does not implement all of the standard Berkeley
-commands.
+The CUPS version of \fIlpc\fR does not implement all of the
+standard Berkeley or LPRng commands.
 .SH SEE ALSO
-accept(8), cancel(1), disable(8), enable(8), lp(1), lpr(1), lprm(1),
-lpstat(1), reject(8),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIaccept(8)\fR, \fIcancel(1)\fR, \fIcupsenable(8)\fR,
+\fIlp(1)\fR, \fIlpr(1)\fR, \fIlprm(1)\fR, \fIlpstat(1)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpc.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: lpc.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index f52b29a30ffda6cbca555264fd879d5d323e1340..3d8fdfb99080d420511cbe2922571d142c30a7b1 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: lpinfo.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: lpinfo.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpinfo man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpinfo 8 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
+.TH lpinfo 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpinfo \- show available devices or drivers
 .SH SYNOPSIS
 .B lpinfo
-[ -E ] [ -l ] [ -m ] [ -v ]
+[ -E ] [ -U
+.I username
+] [ -h
+.I server[:port]
+] [ -l ] -m
+.br
+.B lpinfo
+[ -E ] [ -U
+.I username
+] [ -h
+.I server[:port]
+] [ -l ] -v
 .SH DESCRIPTION
-\fBlpinfo\fR lists the available devices or drivers known to the CUPS
-server. One of the \fI-m\fR or \fI-v\fR options must be specified to
-get any output:
+\fIlpinfo\fR lists the available devices or drivers known to the
+CUPS server. The first form (\fI-m\fR) lists the available
+drivers, while the second form (\fI-v\fR) lists the available
+devices.
+.SH OPTIONS
+\fIlpinfo\fR accepts the following options:
 .TP 5
-\-E
+-E
 .br
 Forces encryption when connecting to the server.
 .TP 5
-\-l
+-U username
 .br
-Shows a "long" listing of devices or drivers.
+Sets the username to use when connecting to the server.
 .TP 5
-\-m
+-h server[:port]
 .br
-Shows the available printer drivers on the system.
+Selects an alternate server.
 .TP 5
-\-v
+-l
 .br
-Shows the available printer devices on the system.
+Shows a "long" listing of devices or drivers.
 .SH COMPATIBILITY
-The \fBlpinfo\fR command is unique to CUPS.
+The \fIlpinfo\fR command is unique to CUPS.
 .SH SEE ALSO
-lpadmin(8),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIlpadmin(8)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpinfo.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: lpinfo.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 2c462c027abb9d2987474bad40be9e06770361bd..e2f05b99a0523434c208756f00681b09eeaa3026 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: lpmove.man 4948 2006-01-19 03:23:41Z mike $"
+.\" "$Id: lpmove.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpmove man page for the Common UNIX Printing System (CUPS).
 .\"
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpmove 8 "Common UNIX Printing System" "18 January 2006" "Easy Software Products"
+.TH lpmove 8 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpmove \- move a job or all jobs to a new destination
 .SH SYNOPSIS
 .B lpmove
 [ -E ] [ -h
-.I hostname[:port]
+.I server[:port]
 ] [ -U
 .I username
 ]
@@ -35,7 +35,7 @@ lpmove \- move a job or all jobs to a new destination
 .br
 .B lpmove
 [ -E ] [ -h
-.I hostname[:port]
+.I server[:port]
 ] [ -U
 .I username
 ]
@@ -51,17 +51,25 @@ number or the old destination and job ID:
      lpmove oldprinter-123 newprinter
 .fi
 .SH OPTIONS
-The \fI-E\fR option forces encryption when connecting to the server.
-.LP
-The \fI-U\fR option specifies an alternate username.
-.LP
-The \fI-h\fR option specifies an alternate server.
+The \fIlpmove\fR command supports the following options:
+.TP 5
+-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
+-U username
+.br
+Specifies an alternate username.
+.TP 5
+-h server[:port]
+.br
+Specifies an alternate server.
 .SH SEE ALSO
-cancel(1), lp(1)
+\fIcancel(1)\fR, \fIlp(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpmove.man 4948 2006-01-19 03:23:41Z mike $".
+.\" End of "$Id: lpmove.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index f1c2b783279370ac2bb25838080c6ac0925934f3..08e012bdd9adb2b0cd54a1e3a20d5ac66320caf1 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: lpoptions.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: lpoptions.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpoptions man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpoptions 1 "Common UNIX Printing System" "21 October 2002" "Easy Software Products"
+.TH lpoptions 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpoptions \- display or set printer options and defaults
 .SH SYNOPSIS
 .B lpoptions
-[ -h
-.I server
+[ -E ] [ -U
+.I username
+] [ -h
+.I server[:port]
 ] -d
-.I dest[/instance]
+.I destination[/instance]
 [ -o
-.I option=value
+.I option[=value]
 ] ... [ -o
-.I option=value
+.I option[=value]
 ]
 .br
 .B lpoptions
-[ -h
-.I server
-] [ -E ] [ -p
-.I dest[/instance]
+[ -E ] [ -U
+.I username
+] [ -h
+.I server[:port]
+] [ -p
+.I destination[/instance]
 ] -l
 .br
 .B lpoptions
-[ -h
-.I server
-] [ -E ] [ -o
-.I option=value
+[ -E ] [ -U
+.I username
+] [ -h
+.I server[:port]
+] [ -o
+.I option[=value]
 ] ... [ -o
-.I option=value
+.I option[=value]
 ] [ -p
-.I dest[/instance]
+.I destination[/instance]
 ] -r
 .I option
 .br
 .B lpoptions
-[ -h
-.I server
-] [ -E ] -x
-.I dest[/instance]
+[ -E ] [ -U
+.I username
+] [ -h
+.I server[:port]
+] -x
+.I destination[/instance]
 .SH DESCRIPTION
-\fBlpoptions\fR displays or sets printer options and defaults.
-\fBlpoptions\fR shows the default printer options when run with no
+\fIlpoptions\fR displays or sets printer options and defaults.
+\fIlpoptions\fR shows the default printer options when run with no
 arguments. Other options include:
 .TP 5
-\-E
+-E
 .br
 Enables encryption when communicating with the CUPS server.
 .TP 5
-\-d \fIdest[/instance]\fR
+-U username
+.br
+Uses an alternate username.
+.TP 5
+-d destination[/instance]
 .br
-Sets the default printer to \fIdest\fR. If \fIinstance\fR is supplied then
-that particular instance is used. This option overrides the system default
-printer for the current user.
+Sets the default printer to \fIdestination\fR. If \fIinstance\fR
+is supplied then that particular instance is used. This option
+overrides the system default printer for the current user.
 .TP 5
-\-h \fIserver\fR
+-h server[:port]
 .br
-Specifies the CUPS server to communicate with.
+Uses an alternate server.
 .TP 5
-\-l
+-l
 .br
 Lists the printer specific options and their current settings.
 .TP 5
-\-o \fIoption=value\fR
+-o option[=value]
 .br
 Specifies a new option for the named destination.
 .TP 5
-\-p \fIdest[/instance]\fR
+-p destination[/instance]
 .br
-Sets the destination and instance, if specified, for any options that follow.
-If the named instance does not exist then it is created.
+Sets the destination and instance, if specified, for any options
+that follow. If the named instance does not exist then it is
+created.
 .TP 5
-\-r \fIoption\fR
+-r option
 .br
 Removes the specified option for the named destination.
 .TP 5
-\-x \fIdest[/instance]\fR
+-x destination[/instance]
 .br
-Removes the options for the named destination and instance, if specified.
-If the named instance does not exist then this does nothing.
+Removes the options for the named destination and instance, if
+specified. If the named instance does not exist then this does
+nothing.
 .LP
-If no options are specified using the \fI-o\fR option then the current
-options for the named printer are reported on the standard output.
+If no options are specified using the \fI-o\fR option, then the
+current options for the named printer are reported on the
+standard output.
 .LP
-Options set with the \fBlpoptions\fR command are used by the \fBlp(1)\fR
-and \fBlpr(1)\fR commands when submitting jobs.
+Options set with the \fIlpoptions\fR command are used by the
+\fIlp(1)\fR and \fIlpr(1)\fR commands when submitting jobs.
 .SH ROOT ACCOUNT OPTIONS
-When run by the root user, \fBlpoptions\fR gets and sets default
+When run by the root user, \fIlpoptions\fR gets and sets default
 options and instances for \fIall users\fR in the
 /etc/cups/lpoptions file.
 .SH COMPATIBILITY
-The \fBlpoptions\fR command is unique to CUPS.
+The \fIlpoptions\fR command is unique to CUPS.
 .SH FILES
-~/.lpoptions - user defaults and instances created by non-root users.
+~/.lpoptions - user defaults and instances created by non-root
+users.
 .br
-/etc/cups/lpoptions - system-wide defaults and instances created by the root
-user.
+/etc/cups/lpoptions - system-wide defaults and instances created
+by the root user.
 .SH SEE ALSO
-cancel(1), lp(1),
-CUPS Software Users Manual,
-http://localhost:631/documentation.html
+\fIcancel(1)\fR, \fIlp(1)\fR, \fIlpr(1)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpoptions.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: lpoptions.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 88cefedf0c884e0ebcf46134998c49511bf2828e..319631ddd3634881a5e0762cecd33739828340cb 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: lppasswd.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: lppasswd.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpadmin man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lppasswd 1 "Common UNIX Printing System" "7 June 2001" "Easy Software Products"
+.TH lppasswd 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lppasswd \- add, change, or delete digest passwords.
 .SH SYNOPSIS
 .B lppasswd
-[ -a ] [ -g
-.I groupname
-] [ -x ] [
+[
 .I username
 ]
+.br
+.B lppasswd
+-a [ -g
+.I groupname
+]
+.I username
+.br
+.B lppasswd
+-x
+.I username
 .SH DESCRIPTION
-\fIlppasswd\fR adds, changes, or deletes passwords in the CUPS digest
-password file, \fIpasswd.md5\fR. When run by a normal user, \fIlppasswd\fR
-will prompt for the old and new passwords. When run by the super-user,
-\fIlppasswd\fR can add new accounts (\fI-a username\fR), change existing
-accounts (\fIusername\fR), or delete accounts (\fI-x username\fR) in the
-digest password file. Digest usernames do not have to match local UNIX
-usernames, but only UNIX usernames are supported by the CUPS client programs
-(\fIlp(1)\fR, \fIlpr(1)\fR, etc.)
-.LP
-The \fI-g\fR option specifies a group other than the system group - "sys",
-"system", or "root", depending on the operating system.
+\fIlppasswd\fR adds, changes, or deletes passwords in the CUPS
+digest password file, \fIpasswd.md5\fR. When run by a normal
+user, \fIlppasswd\fR will prompt for the old and new passwords.
+When run by the super-user, \fIlppasswd\fR can add new accounts
+(\fI-a username\fR), change existing accounts (\fIusername\fR),
+or delete accounts (\fI-x username\fR) in the digest password
+file. Digest usernames do not have to match local UNIX usernames.
+.SH OPTIONS
+\fIlppasswd\fR supports the following options:
+.TP 5
+-g groupname
+.br
+Specifies a group other than the default system group.
 .SH SECURITY ISSUES
-The \fIlppasswd\fR command is installed setuid to root. While every attempt
-has been made to make it secure against exploits that could grant super-user
-priviledges to unpriviledged users, paranoid system administrators may wish
-to disable or change the ownership of the program to an unpriviledged
-account.
+The \fIlppasswd\fR command is installed setuid to root. While
+every attempt has been made to make it secure against exploits
+that could grant super-user priviledges to unprivileged users,
+paranoid system administrators may wish to disable or change the
+ownership of the program to an unprivileged account.
 .SH SEE ALSO
-lp(1), lpr(1),
-CUPS Software Administrators Manual,
-CUPS Software Users Manual,
-http://localhost:631/documentation.html
+\fIlp(1)\fR, \fIlpr(1)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lppasswd.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: lppasswd.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 812faf4c569ee97609c31165479e54435a42f35a..c59bf0b8403e047741fef8ca4b8a40e2bbbf01ca 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: lpq.man 4948 2006-01-19 03:23:41Z mike $"
+.\" "$Id: lpq.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpq man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpq 1 "Common UNIX Printing System" "18 January 2006" "Easy Software Products"
+.TH lpq 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpq \- show printer queue status
 .SH SYNOPSIS
@@ -29,32 +29,53 @@ lpq \- show printer queue status
 [ -E ] [ -U
 .I username
 ] [ -h
-.I hostname[:port]
-] [ \-P
-.I dest
-] [ \-a ] [ \-l ] [
+.I server[:port]
+] [ -P
+.I destination[/instance]
+] [ -a ] [ -l ] [
 .I +interval
 ]
 .SH DESCRIPTION
-\fIlpq\fR shows the current print queue status on the named printer.
-Jobs queued on the default destination will be shown if no printer or
-class is specified on the command-line.
+\fIlpq\fR shows the current print queue status on the named
+printer. Jobs queued on the default destination will be shown if
+no printer or class is specified on the command-line.
 .LP
-The \fIinterval\fR option allows you to continuously report the jobs
-in the queue until the queue is empty; the list of jobs is show one
-every \fIinterval\fR seconds.
-.LP
-The \fI-E\fR option forces encryption when connecting to the server.
-.LP
-The \fI-a\fR option reports jobs on all printers.
-.LP
-The \fI-l\fR option requests a more verbose (long) reporting format.
+The \fI+interval\fR option allows you to continuously report the
+jobs in the queue until the queue is empty; the list of jobs is
+show one every \fIinterval\fR seconds.
+.SH OPTIONS
+\fIlpq\fR supports the following options:
+.TP 5
+-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
+-P destination[/instance]
+.br
+Specifies an alternate printer or class name.
+.TP 5
+-U username
+.br
+Specifies an alternate username.
+.TP 5
+-a
+.br
+Reports jobs on all printers.
+.TP 5
+-h server[:port]
+.br
+Specifies an alternate server.
+.TP 5
+-l
+.br
+Requests a more verbose (long) reporting format.
 .SH SEE ALSO
-cancel(1), lp(1), lpr(1), lprm(1), lpstat(1)
+\fIcancel(1)\fR, \fIlp(1)\fR, \fIlpr(1)\fR, \fIlprm(1)\fR,
+\fIlpstat(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpq.man 4948 2006-01-19 03:23:41Z mike $".
+.\" End of "$Id: lpq.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index e6c14ea0e7b402eb69a0b9114375bad121ea2d2e..6f6798b1480cfc99c45ab9255876a704b660ae10 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: lpr.man 4948 2006-01-19 03:23:41Z mike $"
+.\" "$Id: lpr.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpr man page for the Common UNIX Printing System (CUPS).
 .\"
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpr 1 "Common UNIX Printing System" "18 January 2006" "Easy Software Products"
+.TH lpr 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpr \- print files
 .SH SYNOPSIS
 .B lpr
 [ -E ] [ -H
-.I hostname[:port]
-] [ \-U
+.I server[:port]
+] [ -U
 .I username
-] [ \-P
-.I destination
-] [ \-#
+] [ -P
+.I destination[/instance]
+] [ -#
 .I num-copies
-[ \-l ] [ \-o
-.I option
-] [ \-p] [ \-r ] [ \-C/J/T
+[ -h ] [ -l ] [ -m ] [ -o
+.I option[=value]
+] [ -p] [ -q ] [ -r ] [ -C/J/T
 .I title
 ] [
 .I file(s)
 ]
 .SH DESCRIPTION
-\fBlpr\fR submits files for printing. Files named on the command line are sent
-to the named printer (or the system default destination if no destination is
-specified). If no files are listed on the command-line \fBlpr\fR reads the
-print file from the standard input.
+\fIlpr\fR submits files for printing. Files named on the command
+line are sent to the named printer (or the system default
+destination if no destination is specified). If no files are
+listed on the command-line, \fIlpr\fR reads the print file from
+the standard input.
 .SH OPTIONS
-The following options are recognized by \fBlpr\fR:
+The following options are recognized by \fIlpr\fR:
 .TP 5
-\-E
+-E
 .br
 Forces encryption when connecting to the server.
 .TP 5
-\-P \fIdestination\fR
+-H server[:port]
 .br
-Prints files to the named printer.
+Specifies an alternate server.
 .TP 5
-\-# \fIcopies\fR
-.br
-Sets the number of copies to print from 1 to 100.
+-C "name"
+.TP 5
+-J "name"
 .TP 5
-\-C \fIname\fR
+-T "name"
 .br
 Sets the job name.
 .TP 5
-\-J \fIname\fR
+-P destination[/instance]
 .br
-Sets the job name.
+Prints files to the named printer.
 .TP 5
-\-T \fIname\fR
+-U username
 .br
-Sets the job name.
+Specifies an alternate username.
 .TP 5
-\-U \fIusername\fR
+-# \fIcopies\fR
 .br
-Sets the user name.
+Sets the number of copies to print from 1 to 100.
+.TP 5
+-h
+.br
+Disables banner printing. This option is equivalent to "-o
+job-sheets=none".
 .TP 5
-\-l
+-l
 .br
-Specifies that the print file is already formatted for the destination and
-should be sent without filtering. This option is equivalent to "-oraw".
+Specifies that the print file is already formatted for the
+destination and should be sent without filtering. This option is
+equivalent to "-o raw".
 .TP 5
-\-o \fIoption\fR
+-m
+.br
+Send an email on job completion.
+.TP 5
+-o option[=value]
 .br
 Sets a job option.
 .TP 5
-\-p
+-p
+.br
+Specifies that the print file should be formatted with a shaded
+header with the date, time, job name, and page number. This
+option is equivalent to "-o prettyprint" and is only useful when
+printing text files.
+.TP 5
+-q
 .br
-Specifies that the print file should be formatted with a shaded header with
-the date, time, job name, and page number. This option is equivalent to
-"-oprettyprint" and is only useful when printing text files.
+Hold job for printing.
 .TP 5
-\-r
+-r
 .br
-Specifies that the named print files should be deleted after printing them.
+Specifies that the named print files should be deleted after
+printing them.
 .SH COMPATIBILITY
-The "c", "d", "f", "g", "i", "m", "n", "t", "v", and "w" options are not
-supported by CUPS and will produce a warning message if used.
+The "c", "d", "f", "g", "i", "n", "t", "v", and "w" options
+are not supported by CUPS and produce a warning message if used.
 .SH SEE ALSO
-cancel(1), lp(1), lpstat(1),
+\fIcancel(1)\fR, \fIlp(1)\fR, \fIlpq(1)\fR, \fIlprm(1)\fR,
+\fIlpstat(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpr.man 4948 2006-01-19 03:23:41Z mike $".
+.\" End of "$Id: lpr.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 0ca5fec10f1e9a18fb802c3d7fbc33d47dcd5353..723a00808247ebb21cfa227ba819792038ede5ec 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: lprm.man 5010 2006-01-27 19:53:55Z mike $"
+.\" "$Id: lprm.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lprm man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lprm 1 "Common UNIX Printing System" "27 January 2006" "Easy Software Products"
+.TH lprm 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lprm \- cancel print jobs
 .SH SYNOPSIS
@@ -29,34 +29,46 @@ lprm \- cancel print jobs
 [ -E ] [ -U
 .I username
 ] [ -h
-.I hostname[:port]
+.I server[:port]
 ] [ -P
-.I destination
+.I destination[/instance]
 ] [ - ] [
 .I job ID(s)
 ]
 .SH DESCRIPTION
-\fBlprm\fR cancels print jobs that have been queued for printing. The \fI-P\fR
-option specifies the destination printer or class.
-.LP
-If no arguments are supplied, the current job on the default destination is
-cancelled. You can specify one or more job ID numbers to cancel those jobs,
-or use the \fI\-\fR option to cancel all jobs.
-.LP
-The \fI-E\fR option forces encryption when connecting to the server.
-.LP
-The \fI-U\fR option specifies the username to use when connecting to the server.
-.LP
-The \fI-h\fR option an alternate server to use.
+\fIlprm\fR cancels print jobs that have been queued for printing.
+If no arguments are supplied, the current job on the default
+destination is cancelled. You can specify one or more job ID
+numbers to cancel those jobs or use the \fI-\fR option to cancel
+all jobs.
+.SH OPTIONS
+The \fIlprm\fR command supports the following options:
+.TP 5
+-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
+-P destination[/instance]
+.br
+Specifies the destination printer or class.
+.TP 5
+-U username
+.br
+Specifies an alternate username.
+.TP 5
+-h server[:port]
+.br
+Specifies and alternate server.
 .SH COMPATIBILITY
-The CUPS version of \fIlprm\fR is compatible with the standard Berkeley
-\fIlprm\fR command.
+The CUPS version of \fIlprm\fR is compatible with the standard
+Berkeley \fIlprm\fR command.
 .SH SEE ALSO
-cancel(1), lp(1), lpstat(1), lpr(1),
+\fIcancel(1)\fR, \fIlp(1)\fR, \fIlpq(1)\fR, \fIlpr(1)\fR,
+\fIlpstat(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lprm.man 5010 2006-01-27 19:53:55Z mike $".
+.\" End of "$Id: lprm.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 45934918e1ef505216126b937e5991b73b1612d4..d1981c3b937ff755f7b2f5849d322f15f0fd4be8 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: lpstat.man 4948 2006-01-19 03:23:41Z mike $"
+.\" "$Id: lpstat.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   lpstat man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH lpstat 1 "Common UNIX Printing System" "18 January 2006" "Easy Software Products"
+.TH lpstat 1 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 lpstat \- print cups status information
 .SH SYNOPSIS
@@ -46,97 +46,103 @@ lpstat \- print cups status information
 .I printer(s)
 ] ]
 .SH DESCRIPTION
-\fBlpstat\fR displays status information about the current classes, jobs, and
-printers. When run with no arguments, \fBlpstat\fR will list jobs queued by
-the user. Other options include:
+\fIlpstat\fR displays status information about the current
+classes, jobs, and printers. When run with no arguments,
+\fIlpstat\fR will list jobs queued by the current user.
+.SH OPTIONS
+The \fIlpstat\fR command supports the following options:
 .TP 5
-\-E
+-E
 .br
 Forces encryption when connecting to the server.
 .TP 5
-\-a [\fIprinter(s)\fR]
+-R
+.br
+Shows the ranking of print jobs.
+.TP 5
+-U username
+.br
+Specifies an alternate username.
+.TP 5
+-W which-jobs
+.br
+Specifies which jobs to show, \fIcompleted\fR or
+\fInot-completed\fR (the default). This option \fImust\fR appear
+before the \fI-o\fR option and/or any printer names, otherwise
+the default (not-completed) value will be used in the request to
+the scheduler.
+.TP 5
+-a [printer(s)]
 .br
 Shows the accepting state of printer queues. If no printers are
 specified then all printers are listed.
 .TP 5
-\-c [\fIclass(es)\fR]
+-c [class(es)]
 .br
-Shows the printer classes and the printers that belong to them. If no
-classes are specified then all classes are listed.
+Shows the printer classes and the printers that belong to them.
+If no classes are specified then all classes are listed.
 .TP 5
-\-d
+-d
 .br
 Shows the current default destination.
 .TP 5
-\-h \fIserver\fR
+-h server[:port]
 .br
-Specifies the CUPS server to communicate with.
+Specifies an alternate server.
 .TP 5
-\-l
+-l
 .br
 Shows a long listing of printers, classes, or jobs.
 .TP 5
-\-o [\fIdestination(s)\fR]
+-o [destination(s)]
 .br
 Shows the jobs queue on the specified destinations. If no destinations are
 specified all jobs are shown.
 .TP 5
-\-p [\fIprinter(s)\fR]
+-p [printer(s)]
 .br
 Shows the printers and whether or not they are enabled for printing. If
 no printers are specified then all printers are listed.
 .TP 5
-\-r
+-r
 .br
-Shows whether or not the CUPS server is running.
+Shows whether the CUPS server is running.
 .TP 5
-\-R
-.br
-Shows the ranking of print jobs.
-.TP 5
-\-s
+-s
 .br
 Shows a status summary, including the default destination, a
 list of classes and their member printers, and a list of printers and
 their associated devices. This is equivalent to using the "-d", "-c",
 and "-v" options.
 .TP 5
-\-t
+-t
 .br
 Shows all status information. This is equivalent to using the "-r",
 "-d", "-c", "-v", "-a", "-p", and "-o" options.
 .TP 5
-\-u [\fIuser(s)\fR]
+-u [user(s)]
 .br
 Shows a list of print jobs queued by the specified users. If no users
 are specified, lists the jobs queued by the current user.
 .TP 5
-\-v [\fIprinter(s)\fR]
+-v [printer(s)]
 .br
 Shows the printers and what device they are attached to. If no printers
 are specified then all printers are listed.
-.TP 5
-\-W [\fIwhich-jobs\fR]
-.br
-Specifies which jobs to show, \fIcompleted\fR or
-\fInot-completed\fR (the default). This option \fBmust\fR appear
-before the \fI-o\fR option and/or any printer names, otherwise
-the default (not-completed) value will be used in the request to
-the scheduler.
 .SH COMPATIBILITY
-Unlike the System V printing system, CUPS allows printer names
-to contain any printable character except SPACE and TAB. Also,
-printer and class names are \fBnot\fR case-sensitive.
+Unlike the System V printing system, CUPS allows printer names to
+contain any printable character except SPACE, TAB, "/", and "#".
+Also, printer and class names are \fInot\fR case-sensitive.
 .LP
-The "-h" and "-W" options are unique to CUPS.
+The "-h", "-E", "-U", and "-W" options are unique to CUPS.
 .LP
 The Solaris "-f", "-P", and "-S" options are silently ignored.
 .SH SEE ALSO
-cancel(1), lp(1),
+\fIcancel(1)\fR, \fIlp(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2006 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpstat.man 4948 2006-01-19 03:23:41Z mike $".
+.\" End of "$Id: lpstat.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index 27f073ffc68b7796095a77c6b6f88cd5c2915617..3b44813a65c9f4c8132fc06fa4150e8916cd21bd 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: mantohtml.c 4867 2005-12-03 15:45:53Z mike $"
+ * "$Id: mantohtml.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   Man page to HTML conversion program.
  *
- *   Copyright 2004-2005 by Easy Software Products.
+ *   Copyright 2004-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -56,6 +56,9 @@ main(int  argc,                               /* I - Number of command-line args */
                *outfile;               /* Output file */
   char         line[1024],             /* Line from file */
                *lineptr,               /* Pointer into line */
+               *endptr,                /* Pointer to end of current */
+               endchar,                /* End character */
+               *paren,                 /* Pointer to parenthesis */
                name[1024];             /* Man page name */
   int          section,                /* Man page section */
                pre,                    /* Preformatted */
@@ -155,12 +158,11 @@ main(int  argc,                           /* I - Number of command-line args */
         sscanf(line + 4, "%s%d", name, &section);
 
         fprintf(outfile,
-               "\t<title>%s</title>\n"
+               "\t<title>%s(%d)</title>\n"
                "</head>\n"
                "<body>\n"
-               "<h2 class='title'><a name=\'%s.%d\'>%s(%d)</a></h2>\n"
                "%s",
-               name, name, section, name, section, start_fonts[font]);
+               name, section, start_fonts[font]);
       }
       else if (section < 0)
         continue;
@@ -191,10 +193,22 @@ main(int  argc,                           /* I - Number of command-line args */
          list = 0;
        }
 
+        line[strlen(line) - 1] = '\0'; /* Strip LF */
+
         if (line[2] == 'H')
-         fputs("<h3>", outfile);
+         fputs("<h2><a name='", outfile);
        else
-         fputs("<h4>", outfile);
+         fputs("<h3><a name='", outfile);
+
+        for (lineptr = line + 4; *lineptr; lineptr ++)
+         if (*lineptr == '\"')
+           continue;
+         else if (*lineptr == ' ')
+           putc_entity('_', outfile);
+         else
+           putc_entity(*lineptr, outfile);
+
+       fputs("'>", outfile);
 
         for (lineptr = line + 4; *lineptr; lineptr ++)
          if (*lineptr == '\"')
@@ -205,10 +219,10 @@ main(int  argc,                           /* I - Number of command-line args */
 
             first = 1;
          }
-         else if (*lineptr != '\n')
+         else
          {
            if (first)
-             putc_entity(toupper(*lineptr), outfile);
+             putc_entity(*lineptr, outfile);
            else
              putc_entity(tolower(*lineptr), outfile);
 
@@ -216,9 +230,9 @@ main(int  argc,                             /* I - Number of command-line args */
           }
 
         if (line[2] == 'H')
-         fprintf(outfile, "</h3>\n%s", start_fonts[font]);
+         fprintf(outfile, "</a></h2>\n%s", start_fonts[font]);
        else
-         fprintf(outfile, "</h4>\n%s", start_fonts[font]);
+         fprintf(outfile, "</a></h3>\n%s", start_fonts[font]);
       }
       else if (!strncmp(line, ".LP", 3) || !strncmp(line, ".PP", 3))
       {
@@ -499,7 +513,79 @@ process_text:
 
       for (lineptr = line; *lineptr; lineptr ++)
       {
-        if (*lineptr == '\\')
+        if (!strncmp(lineptr, "http://", 7))
+       {
+        /*
+         * Embed URL...
+         */
+
+          for (endptr = lineptr + 7;
+              *endptr && !isspace(*endptr & 255);
+              endptr ++);
+
+          endchar = *endptr;
+         *endptr = '\0';
+
+          fprintf(outfile, "<a href='%s'>%s</a>", lineptr, lineptr);
+         *endptr = endchar;
+         lineptr = endptr - 1;
+       }
+       else if (!strncmp(lineptr, "\\fI", 3) &&
+                (endptr = strstr(lineptr, "\\fR")) != NULL &&
+                (paren = strchr(lineptr, '(')) != NULL &&
+                paren < endptr)
+        {
+        /*
+         * Link to man page?
+         */
+
+          char manfile[1024],          /* Man page filename */
+               manurl[1024];           /* Man page URL */
+
+
+         /*
+         * See if the man file is available locally...
+         */
+
+          lineptr += 3;
+         endchar = *paren;
+         *paren  = '\0';
+
+         snprintf(manfile, sizeof(manfile), "%s.man", lineptr);
+         snprintf(manurl, sizeof(manurl), "man-%s.html?TOPIC=Man+Pages",
+                  lineptr);
+
+         *paren  = endchar;
+         endchar = *endptr;
+         *endptr = '\0';
+
+         if (access(manfile, 0))
+         {
+          /*
+           * Not a local man page, just do it italic...
+           */
+
+           fputs("<i>", outfile);
+           while (*lineptr)
+             putc_entity(*lineptr++, outfile);
+           fputs("</i>", outfile);
+         }
+         else
+         {
+          /*
+           * Local man page, do a link...
+           */
+
+           fprintf(outfile, "<a href='%s'>", manurl);
+           while (*lineptr)
+             putc_entity(*lineptr++, outfile);
+           fputs("</a>", outfile);
+         }
+
+          *endptr = endchar;
+         lineptr = endptr + 2;
+       }
+        else if (*lineptr == '\\')
        {
          lineptr ++;
          if (!*lineptr)
@@ -638,5 +724,5 @@ strmove(char       *d,                      /* I - Destination */
 
 
 /*
- * End of "$Id: mantohtml.c 4867 2005-12-03 15:45:53Z mike $".
+ * End of "$Id: mantohtml.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 033a06e6f94a656e3140e12907eda52129b60644..e90071255c1d7d80e0ddab5f224f408ba9e2f03a 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: mime.convs.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: mime.convs.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   mime.convs man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH mime.convs 5 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
+.TH mime.convs 5 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 mime.convs \- mime type conversion file for cups
 .SH DESCRIPTION
-The \fImime.convs\fR file defines the filters that are available for
-converting files from one format to another. The standard filters
-support text, PDF, PostScript, HP-GL/2, and many types of image files.
+The \fImime.convs\fR file defines the filters that are available
+for converting files from one format to another. The standard
+filters support text, PDF, PostScript, HP-GL/2, and many types of
+image files.
 .LP
-Additional filters can be added to the \fImime.convs\fR file or to
-other files in the configuration directory (\fB/etc/cups\fR) with
-the extension ".convs".
+Additional filters can be added to the \fImime.convs\fR file or
+(preferably) to other files in the CUPS configuration directory.
 .LP
 Each line in the \fImime.types\fR file is a comment, blank, or filter
 line. Comment lines start with the # character. Filter lines specify
@@ -44,11 +44,12 @@ super/type super/type cost filter
 application/postscript application/vnd.cups-raster 50 pstoraster
 .fi
 .SH SEE ALSO
-classes.conf(5), cupsd(8), cupsd.conf(5), mime.types(5), printers.conf(5),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR,
+\fImime.types(5)\fR, \fIprinters.conf(5)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: mime.convs.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: mime.convs.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index cc97701a3e1f3d9b6f6f31f6e5f6eb144a043317..8b42b6c35ace51ea67d346ba6797ab7d2ddb59d5 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: mime.types.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: mime.types.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   mime.types man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH mime.types 5 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
+.TH mime.types 5 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 mime.types \- mime type description file for cups
 .SH DESCRIPTION
 The \fImime.types\fR file defines the recognized file types.
 .LP
-Additional file types can be added to \fImime.types\fR or in additional
-files in the configuration directory \fB/etc/cups\fR with the extension
-".types".
+Additional file types can be added to \fImime.types\fR or
+(preferably) in additional files in the CUPS configuration
+directory with the extension ".types".
 .LP
-Each line in the \fImime.types\fR file is a comment, blank, or rule
-line. Comment lines start with the # character. Rule lines start with
-the MIME type name and are optionally followed by a series of file
-recognition rules that are used to automatically identify print and web
-files:
+Each line in the \fImime.types\fR file is a comment, blank, or
+rule line. Comment lines start with the # character. Rule lines
+start with the MIME type name and are optionally followed by a
+series of file recognition rules that are used to automatically
+identify print and web files:
 .br
 .nf
 
@@ -92,11 +92,12 @@ String constants can be specified inside quotes ("") for strings
 containing whitespace and angle brackets (<>) for hexadecimal
 strings.
 .SH SEE ALSO
-classes.conf(5), cupsd(8), cupsd.conf(5), mime.convs(5), printers.conf(5),
-CUPS Software Administrators Manual,
-http://localhost:631/documentation.html
+\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR,
+\fImime.convs(5)\fR, \fIprinters.conf(5)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: mime.types.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: mime.types.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
index ff103d7f565c48f5ee48d55567aa5acc3338c799..45dedb85a7b9cd56f56bf6febaed8ac8d73752af 100644 (file)
@@ -1,9 +1,9 @@
 .\"
-.\" "$Id: printers.conf.man 4493 2005-02-18 02:09:53Z mike $"
+.\" "$Id: printers.conf.man 5099 2006-02-13 02:46:10Z mike $"
 .\"
 .\"   printers.conf man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 1997-2005 by Easy Software Products.
+.\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
 .\"   property of Easy Software Products and are protected by Federal
@@ -21,7 +21,7 @@
 .\"       EMail: cups-info@cups.org
 .\"         WWW: http://www.cups.org
 .\"
-.TH printers.conf 5 "Common UNIX Printing System" "22 June 2000" "Easy Software Products"
+.TH printers.conf 5 "Common UNIX Printing System" "12 February 2006" "Easy Software Products"
 .SH NAME
 printers.conf \- printer configuration file for cups
 .SH DESCRIPTION
@@ -34,40 +34,98 @@ Each line in the file can be a configuration directive, a blank line,
 or a comment. Comment lines start with the # character.
 .SH DIRECTIVES
 .TP 5
-Accepting
+<Printer name> ... </Printer>
+.br
+Defines a specific printer.
+.TP 5
+<DefaultPrinter name> ... </Printer>
+.br
+Defines a default printer.
+.TP 5
+Accepting Yes
+.TP 5
+Accepting No
+.br
+Specifies whether the printer is accepting new jobs.
+.TP 5
+AllowUser [ user @group ... ]
+.br
+Allows specific users and groups to print to the printer.
+.TP 5
+DenyUser [ user @group ... ]
+.br
+Prevents specific users and groups from printing to the printer.
+.TP 5
+DeviceURI uri
+.br
+Specifies the device URI for a printer.
+.TP 5
+ErrorPolicy cancel-job
+.TP 5
+ErrorPolicy retry-job
+.TP 5
+ErrorPolicy stop-printer
 .br
-Specifies whether or not the printer is accepting new jobs.
+Specifies the error policy for the printer.
 .TP 5
-Info
+Info text
 .br
 Specifies human-readable text describing the printer.
 .TP 5
-Location
+JobSheets banner banner
+.br
+Specifies the banner pages to use for the printer.
+.TP 5
+KLimit number
+.br
+Specifies the job-k-limit value for the printer.
+.TP 5
+Location text
 .br
 Specifies human-readable text describing the location of the printer.
 .TP 5
-DeviceURI
+OpPolicy name
 .br
-Specifies the device URI for a printer.
+Specifies the operation policy for the printer.
 .TP 5
-<Printer name> ... </Printer>
+PageLimit number
 .br
-Defines a specific printer.
+Specifies the job-page-limit value for the printer.
+.TP 5
+PortMonitor monitor
+.br
+Specifies the port monitor for a printer.
 .TP 5
-State
+QuotaPeriod seconds
+.br
+Specifies the job-quota-period value for the printer.
+.TP 5
+Shared Yes
+.TP 5
+Shared No
+.br
+Specifies whether the printer is shared.
+.TP 5
+State idle
+.TP 5
+State stopped
 .br
 Specifies the initial state of the printer (Idle or Stopped)
 .TP 5
-StateMessage
+StateMessage text
 .br
 Specifies the message associated with the state.
+.TP 5
+StateTime seconds
+.br
+Specifies the date/time associated with the state.
 .SH SEE ALSO
-classes.conf(5), cupsd(8), cupsd.conf(5), mime.convs(5), mime.types(5),
-CUPS Software Administrators Manual,
-CUPS Interface Design Description,
-http://localhost:631/documentation.html
+\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR,
+\fImime.convs(5)\fR, \fImime.types(5)\fR,
+.br
+http://localhost:631/help
 .SH COPYRIGHT
-Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
+Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: printers.conf.man 4493 2005-02-18 02:09:53Z mike $".
+.\" End of "$Id: printers.conf.man 5099 2006-02-13 02:46:10Z mike $".
 .\"
diff --git a/monitor/Dependencies b/monitor/Dependencies
new file mode 100644 (file)
index 0000000..52599cf
--- /dev/null
@@ -0,0 +1,8 @@
+# DO NOT DELETE
+
+bcp.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
+bcp.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+bcp.o: ../cups/file.h ../cups/language.h
+tbcp.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
+tbcp.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+tbcp.o: ../cups/file.h ../cups/language.h
diff --git a/monitor/Makefile b/monitor/Makefile
new file mode 100644 (file)
index 0000000..a689220
--- /dev/null
@@ -0,0 +1,95 @@
+#
+# "$Id: Makefile 5087 2006-02-07 03:43:29Z mike $"
+#
+#   Port monitor makefile for the Common UNIX Printing System (CUPS).
+#
+#   Copyright 2006 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 USA
+#
+#       Voice: (301) 373-9600
+#       EMail: cups-info@cups.org
+#         WWW: http://www.cups.org
+#
+#   This file is subject to the Apple OS-Developed Software exception.
+#
+
+include ../Makedefs
+
+TARGETS        =       bcp tbcp
+
+OBJS   =       bcp.o tbcp.o
+
+
+#
+# Make all targets...
+#
+
+all:   $(TARGETS)
+
+
+#
+# Clean all object files...
+#
+
+clean:
+       $(RM) $(OBJS) $(TARGETS)
+
+
+#
+# Update dependencies (without system header dependencies...)
+#
+
+depend:
+       makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
+
+
+#
+# Install all targets...
+#
+
+install:       all
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/monitor
+       for file in $(TARGETS); do \
+               $(INSTALL_BIN) $$file $(SERVERBIN)/monitor; \
+       done
+
+
+#
+# bcp
+#
+
+bcp:   bcp.o ../cups/$(LIBCUPS)
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o $@ bcp.o $(LIBS)
+
+
+#
+# tbcp
+#
+
+tbcp:  tbcp.o ../cups/$(LIBCUPS)
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o $@ tbcp.o $(LIBS)
+
+
+#
+# Dependencies...
+#
+  
+include Dependencies
+
+
+#
+# End of "$Id: Makefile 5087 2006-02-07 03:43:29Z mike $".
+#
diff --git a/monitor/bcp.c b/monitor/bcp.c
new file mode 100644 (file)
index 0000000..7b19e4b
--- /dev/null
@@ -0,0 +1,286 @@
+/*
+ * "$Id: bcp.c 5087 2006-02-07 03:43:29Z mike $"
+ *
+ *   TBCP port monitor for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 1993-2006 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 USA
+ *
+ *       Voice: (301) 373-9600
+ *       EMail: cups-info@cups.org
+ *         WWW: http://www.cups.org
+ *
+ *   This file is subject to the Apple OS-Developed Software exception.
+ *
+ * Contents:
+ *
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include <cups/string.h>
+#include <cups/cups.h>
+
+
+/*
+ * Local functions...
+ */
+
+static char            *psgets(char *buf, size_t *bytes, FILE *fp);
+static size_t          pswrite(const char *buf, size_t bytes, FILE *fp);
+
+
+/*
+ * 'main()' - Main entry...
+ */
+
+int                                    /* O - Exit status */
+main(int  argc,                                /* I - Number of command-line args */
+     char *argv[])                     /* I - Command-line arguments */
+{
+  FILE         *fp;                    /* File to print */
+  int          copies;                 /* Number of copies left */
+  char         line[1024];             /* Line/buffer from stream/file */
+  size_t       linelen;                /* Length of line */
+  ppd_file_t   *ppd;                   /* PPD file */
+
+
+ /*
+  * Check command-line...
+  */
+
+  if (argc < 6 || argc > 7)
+  {
+    fputs("ERROR: tbcp job-id user title copies options [file]\n", stderr);
+    return (1);
+  }
+
+  if (argc == 6)
+  {
+    copies = 1;
+    fp     = stdin;
+  }
+  else
+  {
+    copies = atoi(argv[4]);
+    fp     = fopen(argv[6], "rb");
+
+    if (!fp)
+    {
+      perror(argv[6]);
+      return (1);
+    }
+  }
+
+ /*
+  * Open the PPD file as needed...
+  */
+
+  ppd = ppdOpenFile(getenv("PPD"));
+
+ /*
+  * Copy the print file to stdout...
+  */
+
+  while (copies > 0)
+  {
+    copies --;
+
+    if (ppd && ppd->jcl_begin)
+      fputs(ppd->jcl_begin, stdout);
+    if (ppd && ppd->jcl_ps)
+      fputs(ppd->jcl_ps, stdout);
+
+    if (!ppd || ppd->language_level == 1)
+    {
+     /*
+      * Use setsoftwareiomode for BCP mode...
+      */
+
+      puts("%!PS-Adobe-3.0 ExitServer");
+      puts("%%Title: (BCP - Level 1)");
+      puts("%%EndComments");
+      puts("%%BeginExitServer: 0");
+      puts("serverdict begin 0 exitserver");
+      puts("%%EndExitServer");
+      puts("statusdict begin");
+      puts("/setsoftwareiomode known {100 setsoftwareiomode}");
+      puts("end");
+      puts("%EOF");
+    }
+    else
+    {
+     /*
+      * Use setdevparams for BCP mode...
+      */
+
+      puts("%!PS-Adobe-3.0");
+      puts("%%Title: (BCP - Level 2)");
+      puts("%%EndComments");
+      puts("currentsysparams");
+      puts("/CurInputDevice 2 copy known {");
+      puts("get");
+      puts("<</Protocol /Binary>> setdevparams");
+      puts("}{");
+      puts("pop pop");
+      puts("} ifelse");
+      puts("%EOF");
+    }
+
+    if (ppd && ppd->jcl_end)
+      fputs(ppd->jcl_end, stdout);
+    else if (!ppd || ppd->num_filters == 0)
+      putchar(0x04);
+
+   /*
+    * Loop until we see end-of-file...
+    */
+
+    do
+    {
+      linelen = sizeof(line);
+      if (psgets(line, &linelen, fp) == NULL)
+       break;
+    }
+    while (pswrite(line, linelen, stdout) > 0);
+
+    fflush(stdout);
+  }
+
+  return (0);
+}
+
+
+/*
+ * 'psgets()' - Get a line from a file.
+ *
+ * Note:
+ *
+ *   This function differs from the gets() function in that it
+ *   handles any combination of CR, LF, or CR LF to end input
+ *   lines.
+ */
+
+static char *                          /* O  - String or NULL if EOF */
+psgets(char   *buf,                    /* I  - Buffer to read into */
+       size_t *bytes,                  /* IO - Length of buffer */
+       FILE   *fp)                     /* I  - File to read from */
+{
+  char         *bufptr;                /* Pointer into buffer */
+  int          ch;                     /* Character from file */
+  size_t       len;                    /* Max length of string */
+
+
+  len    = *bytes - 1;
+  bufptr = buf;
+  ch     = EOF;
+
+  while ((bufptr - buf) < len)
+  {
+    if ((ch = getc(fp)) == EOF)
+      break;
+
+    if (ch == '\r')
+    {
+     /*
+      * Got a CR; see if there is a LF as well...
+      */
+
+      ch = getc(fp);
+
+      if (ch != EOF && ch != '\n')
+      {
+        ungetc(ch, fp);        /* Nope, save it for later... */
+        ch = '\r';
+      }
+      else
+        *bufptr++ = '\r';
+      break;
+    }
+    else if (ch == '\n')
+      break;
+    else
+      *bufptr++ = ch;
+  }
+
+ /*
+  * Add a trailing newline if it is there...
+  */
+
+  if (ch == '\n' || ch == '\r')
+  {
+    if ((bufptr - buf) < len)
+      *bufptr++ = ch;
+    else
+      ungetc(ch, fp);
+  }
+
+ /*
+  * Nul-terminate the string and return it (or NULL for EOF).
+  */
+
+  *bufptr = '\0';
+  *bytes  = bufptr - buf;
+
+  if (ch == EOF && bufptr == buf)
+    return (NULL);
+  else
+    return (buf);
+}
+
+
+/*
+ * 'pswrite()' - Write data from a file.
+ */
+
+static size_t                          /* O - Number of bytes written */
+pswrite(const char *buf,               /* I - Buffer to write */
+        size_t     bytes,              /* I - Bytes to write */
+       FILE       *fp)                 /* I - File to write to */
+{
+  size_t       count;                  /* Remaining bytes */
+
+
+  for (count = bytes; count > 0; count --, buf ++)
+    switch (*buf)
+    {
+      case 0x01 : /* CTRL-A */
+      case 0x03 : /* CTRL-C */
+      case 0x04 : /* CTRL-D */
+      case 0x05 : /* CTRL-E */
+      case 0x11 : /* CTRL-Q */
+      case 0x13 : /* CTRL-S */
+      case 0x14 : /* CTRL-T */
+      case 0x1c : /* CTRL-\ */
+         if (putchar(0x01) < 0)
+           return (-1);
+         if (putchar(*buf ^ 0x40) < 0)
+           return (-1);
+         break;
+
+      default :
+         if (putchar(*buf) < 0)
+           return (-1);
+         break;
+    }
+
+  return (bytes);
+}
+
+
+/*
+ * End of "$Id: bcp.c 5087 2006-02-07 03:43:29Z mike $".
+ */
diff --git a/monitor/tbcp.c b/monitor/tbcp.c
new file mode 100644 (file)
index 0000000..400e1ce
--- /dev/null
@@ -0,0 +1,283 @@
+/*
+ * "$Id: tbcp.c 5087 2006-02-07 03:43:29Z mike $"
+ *
+ *   TBCP port monitor for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 1993-2006 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 USA
+ *
+ *       Voice: (301) 373-9600
+ *       EMail: cups-info@cups.org
+ *         WWW: http://www.cups.org
+ *
+ *   This file is subject to the Apple OS-Developed Software exception.
+ *
+ * Contents:
+ *
+ *   main()    - Main entry...
+ *   psgets()  - Get a line from a file.
+ *   pswrite() - Write data from a file.
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include <cups/string.h>
+#include <cups/cups.h>
+
+
+/*
+ * Local functions...
+ */
+
+static char            *psgets(char *buf, size_t *bytes, FILE *fp);
+static size_t          pswrite(const char *buf, size_t bytes, FILE *fp);
+
+
+/*
+ * 'main()' - Main entry...
+ */
+
+int                                    /* O - Exit status */
+main(int  argc,                                /* I - Number of command-line args */
+     char *argv[])                     /* I - Command-line arguments */
+{
+  FILE         *fp;                    /* File to print */
+  int          copies;                 /* Number of copies left */
+  char         line[1024];             /* Line/buffer from stream/file */
+  size_t       linelen;                /* Length of line */
+
+
+ /*
+  * Check command-line...
+  */
+
+  if (argc < 6 || argc > 7)
+  {
+    fputs("ERROR: tbcp job-id user title copies options [file]\n", stderr);
+    return (1);
+  }
+
+  if (argc == 6)
+  {
+    copies = 1;
+    fp     = stdin;
+  }
+  else
+  {
+    copies = atoi(argv[4]);
+    fp     = fopen(argv[6], "rb");
+
+    if (!fp)
+    {
+      perror(argv[6]);
+      return (1);
+    }
+  }
+
+ /*
+  * Copy the print file to stdout...
+  */
+
+  while (copies > 0)
+  {
+    copies --;
+
+   /*
+    * Read the first line...
+    */
+
+    linelen = sizeof(line);
+    if (psgets(line, &linelen, fp) == NULL)
+    {
+      fputs("ERROR: Empty print file!\n", stderr);
+      return (1);
+    }
+
+   /*
+    * Handle leading PJL fun...
+    */
+
+    if (!strncmp(line, "\033%-12345X", 9) || !strncmp(line, "@PJL ", 5))
+    {
+     /*
+      * Yup, we have leading PJL fun, so copy it until we hit a line
+      * with "ENTER LANGUAGE"...
+      */
+
+      while (strstr(line, "ENTER LANGUAGE") == NULL)
+      {
+        fwrite(line, 1, linelen, stdout);
+
+       linelen = sizeof(line);
+       if (psgets(line, &linelen, fp) == NULL)
+          break;
+      }
+    }
+    else
+    {
+     /*
+      * No PJL stuff, add it...
+      */
+
+      puts("\033%-12345X@PJL");
+      puts("@PJL ENTER LANGUAGE = POSTSCRIPT");
+    }
+
+   /*
+    * Switch to TBCP mode...
+    */
+
+    fputs("\001M", stdout);
+
+   /*
+    * Loop until we see end-of-file...
+    */
+
+    while (pswrite(line, linelen, stdout) > 0)
+    {
+      linelen = sizeof(line);
+      if (psgets(line, &linelen, fp) == NULL)
+       break;
+    }
+
+    fflush(stdout);
+  }
+
+  return (0);
+}
+
+
+/*
+ * 'psgets()' - Get a line from a file.
+ *
+ * Note:
+ *
+ *   This function differs from the gets() function in that it
+ *   handles any combination of CR, LF, or CR LF to end input
+ *   lines.
+ */
+
+static char *                          /* O  - String or NULL if EOF */
+psgets(char   *buf,                    /* I  - Buffer to read into */
+       size_t *bytes,                  /* IO - Length of buffer */
+       FILE   *fp)                     /* I  - File to read from */
+{
+  char         *bufptr;                /* Pointer into buffer */
+  int          ch;                     /* Character from file */
+  size_t       len;                    /* Max length of string */
+
+
+  len    = *bytes - 1;
+  bufptr = buf;
+  ch     = EOF;
+
+  while ((bufptr - buf) < len)
+  {
+    if ((ch = getc(fp)) == EOF)
+      break;
+
+    if (ch == '\r')
+    {
+     /*
+      * Got a CR; see if there is a LF as well...
+      */
+
+      ch = getc(fp);
+
+      if (ch != EOF && ch != '\n')
+      {
+        ungetc(ch, fp);        /* Nope, save it for later... */
+        ch = '\r';
+      }
+      else
+        *bufptr++ = '\r';
+      break;
+    }
+    else if (ch == '\n')
+      break;
+    else
+      *bufptr++ = ch;
+  }
+
+ /*
+  * Add a trailing newline if it is there...
+  */
+
+  if (ch == '\n' || ch == '\r')
+  {
+    if ((bufptr - buf) < len)
+      *bufptr++ = ch;
+    else
+      ungetc(ch, fp);
+  }
+
+ /*
+  * Nul-terminate the string and return it (or NULL for EOF).
+  */
+
+  *bufptr = '\0';
+  *bytes  = bufptr - buf;
+
+  if (ch == EOF && bufptr == buf)
+    return (NULL);
+  else
+    return (buf);
+}
+
+
+/*
+ * 'pswrite()' - Write data from a file.
+ */
+
+static size_t                          /* O - Number of bytes written */
+pswrite(const char *buf,               /* I - Buffer to write */
+        size_t     bytes,              /* I - Bytes to write */
+       FILE       *fp)                 /* I - File to write to */
+{
+  size_t       count;                  /* Remaining bytes */
+
+
+  for (count = bytes; count > 0; count --, buf ++)
+    switch (*buf)
+    {
+      case 0x01 : /* CTRL-A */
+      case 0x03 : /* CTRL-C */
+      case 0x04 : /* CTRL-D */
+      case 0x05 : /* CTRL-E */
+      case 0x11 : /* CTRL-Q */
+      case 0x13 : /* CTRL-S */
+      case 0x14 : /* CTRL-T */
+      case 0x1b : /* CTRL-[ (aka ESC) */
+      case 0x1c : /* CTRL-\ */
+         if (putchar(0x01) < 0)
+           return (-1);
+         if (putchar(*buf ^ 0x40) < 0)
+           return (-1);
+         break;
+
+      default :
+         if (putchar(*buf) < 0)
+           return (-1);
+         break;
+    }
+
+  return (bytes);
+}
+
+
+/*
+ * End of "$Id: tbcp.c 5087 2006-02-07 03:43:29Z mike $".
+ */
index f13e6eb1ae2a20f2fd267b1f2472023cb84ad05a..6867d6207b8b92c32185c29effb2c4ddf3881cc7 100644 (file)
@@ -1,8 +1,8 @@
 # DO NOT DELETE
 
 mailto.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-mailto.o: ../cups/ppd.h ../cups/file.h ../cups/language.h ../cups/array.h
-mailto.o: ../cups/string.h ../config.h
+mailto.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+mailto.o: ../cups/i18n.h ../cups/string.h ../config.h
 testnotify.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-testnotify.o: ../cups/ppd.h ../cups/file.h ../cups/language.h ../cups/array.h
-testnotify.o: ../cups/string.h ../config.h
+testnotify.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testnotify.o: ../cups/language.h ../cups/string.h ../config.h
index 73c35680f71fa653df453359d8f0aa4cba3d0b0b..09fc0bc447f52f8801dfacf720fb5440a2fefe1c 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $"
+# "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $"
 #
 #   Notifier makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2006 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
@@ -49,7 +49,7 @@ clean:
 #
 
 install:       all
-       $(INSTALL_DIR) $(SERVERBIN)/notifier
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/notifier
        for file in $(TARGETS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/notifier; \
        done
@@ -87,5 +87,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $".
+# End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".
 #
diff --git a/packaging/cups-dbus.conf b/packaging/cups-dbus.conf
new file mode 100644 (file)
index 0000000..537ac77
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+  <!-- Only root can send this message -->
+  <policy user="root">
+    <allow send_interface="com.redhat.PrinterSpooler"/>
+  </policy>
+
+  <!-- Allow any connection to receive the message -->
+  <policy context="default">
+    <allow receive_interface="com.redhat.PrinterSpooler"/>
+  </policy>
+</busconfig>
index 5769b964a60938413d773421ee12f19fc66d18b4..c2721216f04f02a5088daf5543a685dd43e1a247 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: cups.list.in 4972 2006-01-24 14:48:12Z mike $"
+# "$Id: cups.list.in 5116 2006-02-16 12:52:32Z mike $"
 #
 #   ESP Package Manager (EPM) file list for the Common UNIX Printing
 #   System (CUPS).
@@ -97,6 +97,9 @@
 %provides cups-lpd 1:@CUPS_VERSION@
 %format all
 
+%subpackage ja
+%description Common UNIX Printing System - Japanese support
+
 %subpackage
 
 
@@ -147,6 +150,8 @@ $STATEDIR=@CUPS_STATEDIR@
 
 $CUPS_USER=@CUPS_USER@
 $CUPS_GROUP=@CUPS_GROUP@
+$CUPS_PRIMARY_SYSTEM_GROUP=@CUPS_PRIMARY_SYSTEM_GROUP@
+$CUPS_PERM=0@CUPS_CONFIG_FILE_PERM@
 
 $MAN1EXT=@MAN1EXT@
 $MAN5EXT=@MAN5EXT@
@@ -281,15 +286,19 @@ l 0755 root sys $LIBDIR/libcupsimage.so libcupsimage.so.2
 
 # Directories
 d 0755 root sys $LOGDIR -
-d 0750 root sys $REQUESTS -
-d 0750 root sys $REQUESTS/tmp -
-d 0755 root sys $CACHEDIR -
-d 0755 root sys $CACHEDIR/ppd -
-d 0755 root sys $STATEDIR -
-d 0750 root sys $STATEDIR/certs -
+d 0710 root $CUPS_GROUP $REQUESTS -
+d 1770 root $CUPS_GROUP $REQUESTS/tmp -
+d 0775 root $CUPS_GROUP $CACHEDIR -
+#d 0755 root $CUPS_GROUP $CACHEDIR/ppd -
+d 0755 root $CUPS_GROUP $STATEDIR -
+d 0511 root $CUPS_PRIMARY_SYSTEM_GROUP $STATEDIR/certs -
 
 # Data files
-f 0644 root sys $LOCALEDIR/ja/cups_ja locale/cups_ja.po
+f 0644 root sys $LOCALEDIR/fr/cups_fr.po locale/cups_fr.po
+
+%subpackage ja
+f 0644 root sys $LOCALEDIR/ja/cups_ja.po locale/cups_ja.po
+%subpackage
 
 d 0755 root sys $DATADIR -
 
@@ -302,6 +311,7 @@ f 0644 root sys $DATADIR/banners/topsecret data/topsecret
 f 0644 root sys $DATADIR/banners/unclassified data/unclassified
 
 d 0755 root sys $DATADIR/charsets -
+f 0644 root sys $DATADIR/charsets data/*.txt
 f 0644 root sys $DATADIR/charsets/windows-874 data/windows-874
 f 0644 root sys $DATADIR/charsets/windows-1250 data/windows-1250
 f 0644 root sys $DATADIR/charsets/windows-1251 data/windows-1251
@@ -342,13 +352,20 @@ f 0644 root sys $DATADIR/model ppd/*.ppd
 d 0755 root sys $DATADIR/templates -
 c 0644 root sys $DATADIR/templates templates/*.tmpl
 
+# Japanese template files
+%subpackage ja
+d 0755 root sys $DATADIR/templates/ja
+f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
+%subpackage
+
 # Config files
 d 0755 root sys $SERVERROOT -
-d 0755 root sys $SERVERROOT/interfaces -
-d 0755 root sys $SERVERROOT/ppd -
-c 0640 root sys $SERVERROOT conf/*.conf
-c 0640 root sys $SERVERROOT/mime.convs conf/mime.convs
-c 0640 root sys $SERVERROOT/mime.types conf/mime.types
+d 0755 root $CUPS_GROUP $SERVERROOT/interfaces -
+d 0755 root $CUPS_GROUP $SERVERROOT/ppd -
+c $CUPS_PERM root $CUPS_GROUP $SERVERROOT conf/*.conf
+f $CUPS_PERM root $CUPS_GROUP $SERVERROOT/cupsd.conf.default conf/cupsd.conf
+f $CUPS_PERM root $CUPS_GROUP $SERVERROOT/mime.convs conf/mime.convs
+f $CUPS_PERM root $CUPS_GROUP $SERVERROOT/mime.types conf/mime.types
 
 %if PAMDIR
 d 0755 root sys $PAMDIR -
@@ -385,16 +402,24 @@ d 0755 root sys $DOCDIR/images -
 f 0644 root sys $DOCDIR/images doc/images/*.gif
 f 0644 root sys $DOCDIR/robots.txt doc/robots.txt
 
+# Japanese documentation files
+%subpackage ja
+d 0755 root sys $DOCDIR/ja
+f 0644 root sys $DOCDIR/ja doc/ja/*.html
+d 0755 root sys $DOCDIR/ja/images -
+f 0644 root sys $DOCDIR/ja/images doc/ja/images/*.gif
+%subpackage
+
 # Man pages
 d 0755 root sys $AMANDIR -
 d 0755 root sys $AMANDIR/man$MAN8DIR -
 d 0755 root sys $MANDIR -
 d 0755 root sys $MANDIR/man1 -
 d 0755 root sys $MANDIR/man5 -
+d 0755 root sys $MANDIR/man7 -
 
-f 0644 root sys $MANDIR/man1/backend.$MAN1EXT man/backend.$MAN1EXT
+f 0644 root sys $MANDIR/man1/cancel.$MAN1EXT man/cancel.$MAN1EXT
 f 0644 root sys $MANDIR/man1/cupstestppd.$MAN1EXT man/cupstestppd.$MAN1EXT
-f 0644 root sys $MANDIR/man1/filter.$MAN1EXT man/filter.$MAN1EXT
 f 0644 root sys $MANDIR/man1/lpoptions.$MAN1EXT man/lpoptions.$MAN1EXT
 f 0644 root sys $MANDIR/man1/lppasswd.$MAN1EXT man/lppasswd.$MAN1EXT
 f 0644 root sys $MANDIR/man1/lpq.$MAN1EXT man/lpq.$MAN1EXT
@@ -402,7 +427,6 @@ f 0644 root sys $MANDIR/man1/lprm.$MAN1EXT man/lprm.$MAN1EXT
 f 0644 root sys $MANDIR/man1/lpr.$MAN1EXT man/lpr.$MAN1EXT
 f 0644 root sys $MANDIR/man1/lpstat.$MAN1EXT man/lpstat.$MAN1EXT
 f 0644 root sys $MANDIR/man1/lp.$MAN1EXT man/lp.$MAN1EXT
-l 0644 root sys $MANDIR/man1/cancel.$MAN1EXT lp.$MAN1EXT
 
 f 0644 root sys $MANDIR/man5/classes.conf.$MAN5EXT man/classes.conf.$MAN5EXT
 f 0644 root sys $MANDIR/man5/cupsd.conf.$MAN5EXT man/cupsd.conf.$MAN5EXT
@@ -410,6 +434,9 @@ f 0644 root sys $MANDIR/man5/mime.convs.$MAN5EXT man/mime.convs.$MAN5EXT
 f 0644 root sys $MANDIR/man5/mime.types.$MAN5EXT man/mime.types.$MAN5EXT
 f 0644 root sys $MANDIR/man5/printers.conf.$MAN5EXT man/printers.conf.$MAN5EXT
 
+f 0644 root sys $MANDIR/man7/backend.$MAN7EXT man/backend.$MAN7EXT
+f 0644 root sys $MANDIR/man7/filter.$MAN7EXT man/filter.$MAN7EXT
+
 f 0644 root sys $AMANDIR/man$MAN8DIR/accept.$MAN8EXT man/accept.$MAN8EXT
 l 0644 root sys $AMANDIR/man$MAN8DIR/reject.$MAN8EXT accept.$MAN8EXT
 f 0644 root sys $AMANDIR/man$MAN8DIR/cupsaddsmb.$MAN8EXT man/cupsaddsmb.$MAN8EXT
@@ -435,5 +462,5 @@ f 0644 root sys $AMANDIR/man$MAN8DIR/cups-lpd.$MAN8EXT man/cups-lpd.$MAN8EXT
 i 0755 root sys cups init/cups.sh
 
 #
-# End of "$Id: cups.list.in 4972 2006-01-24 14:48:12Z mike $".
+# End of "$Id: cups.list.in 5116 2006-02-16 12:52:32Z mike $".
 #
index 6a881dd8e96a4166cb7deca7e528b579ec35999f..7ca8bcbc28691b811f0a5c374ec2a155f3554914 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: cups.spec 4787 2005-10-13 20:13:21Z mike $"
+# "$Id: cups.spec.in 5136 2006-02-19 18:46:46Z mike $"
 #
 #   RPM "spec" file for the Common UNIX Printing System (CUPS).
 #
@@ -24,7 +24,7 @@
 #         WWW: http://www.cups.org
 #
 
-Summary: Common Unix Printing System
+Summary: Common UNIX Printing System
 Name: cups
 Version: @CUPS_VERSION@
 Release: 0
@@ -45,20 +45,25 @@ Obsoletes: lpd, lpr, LPRng
 Provides: lpd, lpr, LPRng
 
 %package devel
-Summary: Common Unix Printing System - development environment
+Summary: Common UNIX Printing System - development environment
 Group: Development/Libraries
 Requires: %{name}-libs = %{epoch}:%{version}
 
 %package libs
-Summary: Common Unix Printing System - shared libraries
+Summary: Common UNIX Printing System - shared libraries
 Group: System Environment/Libraries
 Provides: libcups1
 
 %package lpd
-Summary: Common Unix Printing System - LPD support
+Summary: Common UNIX Printing System - LPD support
 Group: System Environment/Daemons
 Requires: %{name} = %{epoch}:%{version} xinetd
 
+%package ja
+Summary: Common UNIX Printing System - Japanese support
+Group: System Environment/Daemons
+Requires: %{name} = %{epoch}:%{version}
+
 %description
 The Common UNIX Printing System provides a portable printing layer for 
 UNIX® operating systems. It has been developed by Easy Software Products 
@@ -78,6 +83,10 @@ UNIX
 The Common UNIX Printing System provides a portable printing layer for 
 UNIX® operating systems. This package provides LPD client support.
 
+%description ja
+The Common UNIX Printing System provides a portable printing layer for 
+UNIX® operating systems. This package provides Japanese support.
+
 %prep
 %setup
 
@@ -94,44 +103,38 @@ rm -rf $RPM_BUILD_ROOT
 make BUILDROOT=$RPM_BUILD_ROOT install
 
 %post
-ldconfig
+/sbin/chkconfig --add cups
+/sbin/chkconfig cups on
 
-if test -x /sbin/chkconfig; then
-       /sbin/chkconfig --add cups
-       /sbin/chkconfig cups on
+# Restart cupsd if we are upgrading...
+if test $1 -gt 1; then
+       /sbin/service cups stop
+       /sbin/service cups start
 fi
 
-# these lines automatically start cupsd after installation; commented out
-# by request...
-#if test -f /sbin/init.d/cups; then
-#      /sbin/init.d/cups start
-#fi
-#if test -f /etc/rc.d/init.d/cups; then
-#      /etc/rc.d/init.d/cups start
-#fi
-#if test -f /etc/init.d/cups; then
-#      /etc/init.d/cups start
-#fi
+%post libs
+/sbin/ldconfig
 
 %preun
-if test -f /sbin/init.d/cups; then
-       /sbin/init.d/cups stop
-fi
-if test -f /etc/rc.d/init.d/cups; then
-       /etc/rc.d/init.d/cups stop
-fi
-if test -f /etc/init.d/cups; then
-       /etc/init.d/cups stop
+if test $1 = 0; then
+       /sbin/service cups stop
+       /sbin/chkconfig --del cups
 fi
 
-if test -x /sbin/chkconfig; then
-       /sbin/chkconfig --del cups
+%postun
+if test $1 -ge 1; then
+       /sbin/service cups stop
+       /sbin/service cups start
 fi
 
+%postun libs
+/sbin/ldconfig
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
+%docdir /usr/share/doc/cups
 %defattr(-,root,root)
 %dir /etc/cups
 %config(noreplace) /etc/cups/*.conf
@@ -140,6 +143,11 @@ rm -rf $RPM_BUILD_ROOT
 /etc/cups/mime.types
 /etc/cups/mime.convs
 %dir /etc/cups/ppd
+
+# DBUS
+/etc/dbus-1/system.d/*
+
+# PAM
 %dir /etc/pam.d
 /etc/pam.d/*
 
@@ -187,6 +195,8 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/lib/cups/driver
 %dir /usr/lib/cups/filter
 /usr/lib/cups/filter/*
+%dir /usr/lib/cups/monitor
+/usr/lib/cups/monitor/*
 %dir /usr/lib/cups/notifier
 /usr/lib/cups/notifier/*
 
@@ -204,8 +214,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/doc/cups/help/whatsnew.html
 %dir /usr/share/doc/cups/images
 /usr/share/doc/cups/images/*
-%dir /usr/share/locale
-/usr/share/locale/*
+/usr/share/locale/fr/cups_fr.po
 
 %dir /usr/share/man/man1
 /usr/share/man/man1/cancel.1.gz
@@ -225,6 +234,8 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/man/man8/cupsd.8.gz
 /usr/share/man/man8/cupsdisable.8.gz
 /usr/share/man/man8/cupsenable.8.gz
+/usr/share/man/man8/cups-deviced.8.gz
+/usr/share/man/man8/cups-driverd.8.gz
 /usr/share/man/man8/cups-polld.8.gz
 /usr/share/man/man8/lpadmin.8.gz
 /usr/share/man/man8/lpc.8.gz
@@ -235,16 +246,16 @@ rm -rf $RPM_BUILD_ROOT
 %dir /var/cache/cups
 %dir /var/log/cups
 %dir /var/run/cups
-%attr(0711,lp,root) %dir /var/run/cups/certs
-%attr(0710,lp,root) %dir /var/spool/cups
-%attr(1770,lp,root) %dir /var/spool/cups/tmp
+%attr(0711,lp,sys) %dir /var/run/cups/certs
+%attr(0710,lp,sys) %dir /var/spool/cups
+%attr(1770,lp,sys) %dir /var/spool/cups/tmp
 
 %files devel
 %defattr(-,root,root)
 %dir /usr/share/man/man1
-/usr/share/man/man1/backend.1.gz
 /usr/share/man/man1/cups-config.1.gz
-/usr/share/man/man1/filter.1.gz
+%dir /usr/share/man/man7
+/usr/share/man/man7/*
 
 /usr/bin/cups-config
 %dir /usr/include/cups
@@ -269,6 +280,16 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/share/man/man8
 /usr/share/man/man8/cups-lpd.8.gz
 
+%files ja
+%defattr(-,root,root)
+%dir /usr/share/doc/cups/ja
+/usr/share/doc/cups/ja/index.html
+%dir /usr/share/doc/cups/ja/images
+/usr/share/doc/cups/ja/images/*
+%dir /usr/share/cups/templates/ja
+/usr/share/cups/templates/ja/*
+/usr/share/locale/ja/cups_ja.po
+
 #
-# End of "$Id: cups.spec 4787 2005-10-13 20:13:21Z mike $".
+# End of "$Id: cups.spec.in 5136 2006-02-19 18:46:46Z mike $".
 #
index 1f83e73dec5ea6c1723e110e2ec511918c853b1f..350408b56aff26d0dff41f66c868963d7be985cd 100644 (file)
@@ -4,7 +4,7 @@ pdftops.o: ../cups/string.h ../config.h parseargs.h gtypes.h GString.h gmem.h
 pdftops.o: Object.h Array.h Dict.h Stream.h XRef.h Catalog.h Page.h PDFDoc.h
 pdftops.o: PSOutputDev.h GlobalParams.h CharTypes.h OutputDev.h Error.h
 pdftops.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-pdftops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
+pdftops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 Annot.o: ../config.h gmem.h Object.h gtypes.h GString.h Array.h Dict.h
 Annot.o: Stream.h Catalog.h Gfx.h Lexer.h Annot.h
 Array.o: ../config.h gmem.h Object.h gtypes.h GString.h Array.h Dict.h
index e1e25f5408872db0ac25ffbfc9de52d31b5144fb..38cbb9ca194866f84f8b9a626fee9ba9c73a28be 100644 (file)
@@ -13,6 +13,7 @@
 #endif
 
 #include <stdlib.h>
+#include <limits.h>
 #include "GList.h"
 #include "Error.h"
 #include "JArithmeticDecoder.h"
@@ -681,6 +682,10 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, int wA, int hA):
   w = wA;
   h = hA;
   line = (wA + 7) >> 3;
+  if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+    data = NULL;
+    return;
+  }
   // need to allocate one extra guard byte for use in combine()
   data = (Guchar *)gmalloc(h * line + 1);
   data[h * line] = 0;
@@ -692,6 +697,10 @@ JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap):
   w = bitmap->w;
   h = bitmap->h;
   line = bitmap->line;
+  if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) {
+    data = NULL;
+    return;
+  }
   // need to allocate one extra guard byte for use in combine()
   data = (Guchar *)gmalloc(h * line + 1);
   memcpy(data, bitmap->data, h * line);
@@ -720,7 +729,7 @@ JBIG2Bitmap *JBIG2Bitmap::getSlice(Guint x, Guint y, Guint wA, Guint hA) {
 }
 
 void JBIG2Bitmap::expand(int newH, Guint pixel) {
-  if (newH <= h) {
+  if (newH <= h || line <= 0 || newH >= (INT_MAX - 1) / line) {
     return;
   }
   // need to allocate one extra guard byte for use in combine()
@@ -2294,6 +2303,14 @@ void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm,
       !readUWord(&stepX) || !readUWord(&stepY)) {
     goto eofError;
   }
+  if (w == 0 || h == 0 || w >= INT_MAX / h) {
+    error(getPos(), "Bad bitmap size in JBIG2 halftone segment");
+    return;
+  }
+  if (gridH == 0 || gridW >= INT_MAX / gridH) {
+    error(getPos(), "Bad grid size in JBIG2 halftone segment");
+    return;
+  }
 
   // get pattern dictionary
   if (nRefSegs != 1) {
index 0f1977ed30e719eb90d8905f7c2b61fe60208b24..2022462ad2ab11cffff5ed3d028131764d8d7148 100644 (file)
@@ -12,6 +12,7 @@
 #pragma implementation
 #endif
 
+#include <limits.h>
 #include "gmem.h"
 #include "Error.h"
 #include "JArithmeticDecoder.h"
@@ -783,7 +784,7 @@ GBool JPXStream::readCodestream(Guint len) {
   int segType;
   GBool haveSIZ, haveCOD, haveQCD, haveSOT;
   Guint precinctSize, style;
-  Guint segLen, capabilities, nTiles, comp, i, j, r;
+  Guint segLen, capabilities, comp, i, j, r;
 
   //----- main header
   haveSIZ = haveCOD = haveQCD = haveSOT = gFalse;
@@ -818,13 +819,14 @@ GBool JPXStream::readCodestream(Guint len) {
                    / img.xTileSize;
       img.nYTiles = (img.ySize - img.yTileOffset + img.yTileSize - 1)
                    / img.yTileSize;
-      nTiles = img.nXTiles * img.nYTiles;
       // check for overflow before allocating memory
-      if (nTiles == 0 || nTiles / img.nXTiles != img.nYTiles) {
+      if (img.nXTiles <= 0 || img.nYTiles <= 0 ||
+         img.nXTiles >= INT_MAX / img.nYTiles) {
        error(getPos(), "Bad tile count in JPX SIZ marker segment");
        return gFalse;
       }
-      img.tiles = (JPXTile *)gmallocn(nTiles, sizeof(JPXTile));
+      img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles,
+                                     sizeof(JPXTile));
       for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
        img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps,
                                                         sizeof(JPXTileComp));
index 352f895108ccfa97db0d8e0856066f82e43b2fd2..9be45f5afd30986e0053c903c36641a6fe4454cf 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4494 2005-02-18 02:18:11Z mike $"
+# "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $"
 #
 #   pdftops filter Makefile for the Common UNIX Printing System (CUPS).
 #
-#   CUPS filter changes Copyright 1997-2005 by Easy Software Products.
+#   CUPS filter changes Copyright 1997-2006 by Easy Software Products.
 #   Xpdf code Copyright 1996-1999 by Derek B. Noonburg
 #
 
@@ -122,7 +122,7 @@ depend:
 #
 
 install:       all
-       $(INSTALL_DIR) $(SERVERBIN)/filter
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
        $(INSTALL_BIN) pdftops $(SERVERBIN)/filter
 
 
@@ -154,5 +154,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4494 2005-02-18 02:18:11Z mike $".
+# End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".
 #
index ea2ad871d353d5df75dfaee1b90707f080330d41..d5b3048f688f63f077c17518556326696a3ebf38 100644 (file)
@@ -186,7 +186,7 @@ GBool SplashXPathScanner::getNextSpan(int y, int *x0, int *x1) {
 }
 
 void SplashXPathScanner::computeIntersections(int y) {
-  SplashCoord ySegMin, ySegMax, xx0, xx1;
+  SplashCoord xSegMin, xSegMax, ySegMin, ySegMax, xx0, xx1;
   SplashXPathSeg *seg;
   int i, j;
 
@@ -236,19 +236,27 @@ void SplashXPathScanner::computeIntersections(int y) {
     } else if (seg->flags & splashXPathVert) {
       xx0 = xx1 = seg->x0;
     } else {
-      if (ySegMin <= y) {
-       // intersection with top edge
-       xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
+      if (seg->x0 < seg->x1) {
+       xSegMin = seg->x0;
+       xSegMax = seg->x1;
       } else {
-       // x coord of segment endpoint with min y coord
-       xx0 = (seg->flags & splashXPathFlip) ? seg->x1 : seg->x0;
+       xSegMin = seg->x1;
+       xSegMax = seg->x0;
       }
-      if (ySegMax >= y + 1) {
-       // intersection with bottom edge
-       xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
-      } else {
-       // x coord of segment endpoint with max y coord
-       xx1 = (seg->flags & splashXPathFlip) ? seg->x0 : seg->x1;
+      // intersection with top edge
+      xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
+      // intersection with bottom edge
+      xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
+      // the segment may not actually extend to the top and/or bottom edges
+      if (xx0 < xSegMin) {
+       xx0 = xSegMin;
+      } else if (xx0 > xSegMax) {
+       xx0 = xSegMax;
+      }
+      if (xx1 < xSegMin) {
+       xx1 = xSegMin;
+      } else if (xx1 > xSegMax) {
+       xx1 = xSegMax;
       }
     }
     if (xx0 < xx1) {
index 2e9dfb7d15e9c26b8327397c5c4f327b05d0e025..e2c2cab11b70240cb002591206ca2d1fda646c60 100644 (file)
@@ -7,7 +7,6 @@
 //========================================================================
 
 #include <config.h>
-#include <limits.h>
 
 #ifdef USE_GCC_PRAGMAS
 #pragma implementation
@@ -16,6 +15,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>
+#include <limits.h>
 #ifndef WIN32
 #include <unistd.h>
 #endif
@@ -402,8 +402,6 @@ void ImageStream::skipLine() {
 
 StreamPredictor::StreamPredictor(Stream *strA, int predictorA,
                                 int widthA, int nCompsA, int nBitsA) {
-  int totalBits;
-
   str = strA;
   predictor = predictorA;
   width = widthA;
@@ -412,21 +410,16 @@ StreamPredictor::StreamPredictor(Stream *strA, int predictorA,
   predLine = NULL;
   ok = gFalse;
 
-  if (width <= 0 || nComps <= 0 || nBits <= 0 ||
-      nComps >= INT_MAX/nBits ||
-      width >= INT_MAX/nComps/nBits) {
-    return;
-  }
   nVals = width * nComps;
-  totalBits = nVals * nBits;
-  if (totalBits == 0 ||
-      (totalBits / nBits) / nComps != width ||
-      totalBits + 7 < 0) {
+  if (width <= 0 || nComps <= 0 || nBits <= 0 ||
+      nComps >= INT_MAX / nBits ||
+      width >= INT_MAX / nComps / nBits ||
+      nVals * nBits + 7 < 0) {
     return;
   }
   pixBytes = (nComps * nBits + 7) >> 3;
-  rowBytes = ((totalBits + 7) >> 3) + pixBytes;
-  if (rowBytes < 0) {
+  rowBytes = ((nVals * nBits + 7) >> 3) + pixBytes;
+  if (rowBytes <= 0) {
     return;
   }
   predLine = (Guchar *)gmalloc(rowBytes);
@@ -1281,9 +1274,11 @@ CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA,
   endOfLine = endOfLineA;
   byteAlign = byteAlignA;
   columns = columnsA;
-  if (columns < 1 || columns >= (INT_MAX / sizeof(short))) {
-    error(getPos(), "Bad number of columns: %d in CCITTFaxStream", columns);
-    exit(1);
+  if (columns < 1) {
+    columns = 1;
+  }
+  if (columns + 4 <= 0) {
+    columns = INT_MAX - 4;
   }
   rows = rowsA;
   endOfBlock = endOfBlockA;
@@ -2926,8 +2921,8 @@ GBool DCTStream::readBaselineSOF() {
   width = read16();
   numComps = str->getChar();
   if (numComps <= 0 || numComps > 4) {
+    error(getPos(), "Bad number of components in DCT stream");
     numComps = 0;
-    error(getPos(), "Bad number of components in DCT stream", prec);
     return gFalse;
   }
   if (prec != 8) {
@@ -2956,6 +2951,11 @@ GBool DCTStream::readProgressiveSOF() {
   height = read16();
   width = read16();
   numComps = str->getChar();
+  if (numComps <= 0 || numComps > 4) {
+    error(getPos(), "Bad number of components in DCT stream");
+    numComps = 0;
+    return gFalse;
+  }
   if (prec != 8) {
     error(getPos(), "Bad DCT precision %d", prec);
     return gFalse;
@@ -2978,6 +2978,11 @@ GBool DCTStream::readScanInfo() {
 
   length = read16() - 2;
   scanInfo.numComps = str->getChar();
+  if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) {
+    error(getPos(), "Bad number of components in DCT stream");
+    scanInfo.numComps = 0;
+    return gFalse;
+  }
   --length;
   if (length != 2 * scanInfo.numComps + 3) {
     error(getPos(), "Bad DCT scan info block");
@@ -3062,7 +3067,7 @@ GBool DCTStream::readHuffmanTables() {
   while (length > 0) {
     index = str->getChar();
     --length;
-    if ((index & 0x0f) >= 4 || (index & ~0x1f)) {
+    if ((index & 0x0f) >= 4) {
       error(getPos(), "Bad DCT Huffman table");
       return gFalse;
     }
@@ -3072,6 +3077,7 @@ GBool DCTStream::readHuffmanTables() {
        numACHuffTables = index+1;
       tbl = &acHuffTables[index];
     } else {
+      index &= 0x0f;
       if (index >= numDCHuffTables)
        numDCHuffTables = index+1;
       tbl = &dcHuffTables[index];
@@ -3188,7 +3194,6 @@ int DCTStream::readMarker() {
     } while (c != 0xff && c != EOF);
     do {
       c = str->getChar();
-      if (c == EOF) return EOF;
     } while (c == 0xff);
   } while (c == 0x00);
   return c;
index 1f22ee657d841931fea90c9b8022a284eb886ee4..e26e67cc118bac5faac6dcd361985ae094ca80c5 100644 (file)
@@ -530,7 +530,7 @@ private:
   short getWhiteCode();
   short getBlackCode();
   short lookBits(int n);
-  void eatBits(int n) { inputBits -= n; }
+  void eatBits(int n) { if ((inputBits -= n) < 0) inputBits = 0; }
 };
 
 //------------------------------------------------------------------------
index 9c4ea9f1e9964c11bc38277ea648a0c668d89aa5..b89604036395254ea2158d80290dfd3bd4a85431 100644 (file)
@@ -1,6 +1,6 @@
 //========================================================================
 //
-// UnicodeMapTables.cc
+// UnicodeTypeTable.cc
 //
 // Copyright 2004 Glyph & Cog, LLC
 //
index 8f65261003e8978356a9bf74e5b27cf720d8456c..f7f35dfe7aa4a5fa572767c8ef955cb460441f64 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
+#include <limits.h>
 #include "gmem.h"
 
 #ifdef DEBUG_MEM
@@ -63,7 +64,7 @@ void *gmalloc(int size) {
   int lst;
   unsigned long *trl, *p;
 
-  if (size == 0)
+  if (size <= 0)
     return NULL;
   size1 = gMemDataSize(size);
   if (!(mem = (char *)malloc(size1 + gMemHdrSize + gMemTrlSize))) {
@@ -86,7 +87,7 @@ void *gmalloc(int size) {
 #else
   void *p;
 
-  if (size == 0)
+  if (size <= 0)
     return NULL;
   if (!(p = malloc(size))) {
     fprintf(stderr, "Out of memory\n");
@@ -102,7 +103,7 @@ void *grealloc(void *p, int size) {
   void *q;
   int oldSize;
 
-  if (size == 0) {
+  if (size <= 0) {
     if (p)
       gfree(p);
     return NULL;
@@ -120,7 +121,7 @@ void *grealloc(void *p, int size) {
 #else
   void *q;
 
-  if (size == 0) {
+  if (size <= 0) {
     if (p)
       free(p);
     return NULL;
@@ -140,8 +141,11 @@ void *grealloc(void *p, int size) {
 void *gmallocn(int nObjs, int objSize) {
   int n;
 
+  if (nObjs == 0) {
+    return NULL;
+  }
   n = nObjs * objSize;
-  if (objSize == 0 || n / objSize != nObjs) {
+  if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
     fprintf(stderr, "Bogus memory allocation size\n");
     exit(1);
   }
@@ -151,8 +155,14 @@ void *gmallocn(int nObjs, int objSize) {
 void *greallocn(void *p, int nObjs, int objSize) {
   int n;
 
+  if (nObjs == 0) {
+    if (p) {
+      gfree(p);
+    }
+    return NULL;
+  }
   n = nObjs * objSize;
-  if (objSize == 0 || n / objSize != nObjs) {
+  if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
     fprintf(stderr, "Bogus memory allocation size\n");
     exit(1);
   }
index 051fc8c4517d39ecd90e55a115d7ffe0d177c233..4554e38432a42fd125ad85f3da0e614cfa2e8b16 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $"
+# "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $"
 #
 #   PPD file makefile for the Common UNIX Printing System (CUPS).
 #
@@ -53,12 +53,12 @@ clean:
 #
 
 install:       all
-       $(INSTALL_DIR) $(DATADIR)/model
+       $(INSTALL_DIR) -m 755 $(DATADIR)/model
        for file in $(FILES); do \
                $(INSTALL_DATA) $$file $(DATADIR)/model; \
        done
 
 
 #
-# End of "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $".
+# End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".
 #
index 656c8b444c27b1eb7a88f53f932e61fa7c5f2854..69426a938b2ce0cce72b3b61ef122824a73eb76b 100644 (file)
@@ -1,6 +1,6 @@
 *PPD-Adobe: "4.3"
 *%
-*% "$Id: dymo.ppd 4880 2005-12-15 16:19:46Z mike $"
+*% "$Id: dymo.ppd 5130 2006-02-17 20:25:33Z mike $"
 *%
 *%   Sample DYMO label printer driver PPD file for the Common UNIX Printing
 *%   System (CUPS).
@@ -33,7 +33,7 @@
 *Product:      "(ESP Ghostscript)"
 *cupsVersion:  1.2
 *cupsManualCopies: False
-*cupsFilter:   "application/vnd.cups-raster 0 rastertodymo"
+*cupsFilter:   "application/vnd.cups-raster 0 rastertolabel"
 *cupsModelNumber: 0
 *ModelName:     "DYMO Label Printer"
 *ShortNickName: "DYMO Label Printer"
 *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
 *Font ZapfDingbats: Special "(001.004S)" Standard ROM
 *%
-*% End of "$Id: dymo.ppd 4880 2005-12-15 16:19:46Z mike $".
+*% End of "$Id: dymo.ppd 5130 2006-02-17 20:25:33Z mike $".
 *%
index f70b7c47b4b49dd6e62ff8381254aca0c47a9aec..7d07230c1c83874af5c9c0f8c5c9a6d427afae84 100644 (file)
@@ -1,6 +1,6 @@
 *PPD-Adobe: "4.3"
 *%
-*% "$Id: zebra.ppd 4923 2006-01-13 01:28:40Z mike $"
+*% "$Id: zebra.ppd 5130 2006-02-17 20:25:33Z mike $"
 *%
 *%   Sample Zebra label printer driver PPD file for the Common UNIX Printing
 *%   System (CUPS).
@@ -33,7 +33,7 @@
 *Product:      "(ESP Ghostscript)"
 *cupsVersion:  1.2
 *cupsManualCopies: False
-*cupsFilter:   "application/vnd.cups-raster 0 rastertodymo"
+*cupsFilter:   "application/vnd.cups-raster 0 rastertolabel"
 *% cupsModelNumber is 16 for EPL1 line mode, 17 for EPL2 page mode,
 *% 18 for ZPL mode, and 19 for CPCL mode.
 *cupsModelNumber: 18
 *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
 *Font ZapfDingbats: Special "(001.004S)" Standard ROM
 *%
-*% End of "$Id: zebra.ppd 4923 2006-01-13 01:28:40Z mike $".
+*% End of "$Id: zebra.ppd 5130 2006-02-17 20:25:33Z mike $".
 *%
index 4a8d85b794b3734aecf8d62a5bfbdce3c018a4d0..6cebc50f9b3fdfccc19c482cb75d4d7774e59c9d 100644 (file)
@@ -33,7 +33,7 @@
 *Product:      "(ESP Ghostscript)"
 *cupsVersion:  1.2
 *cupsManualCopies: False
-*cupsFilter:   "application/vnd.cups-raster 0 rastertodymo"
+*cupsFilter:   "application/vnd.cups-raster 0 rastertolabel"
 *% cupsModelNumber is 16 for EPL1 line mode, 17 for EPL2 page mode,
 *% 18 for ZPL mode, and 19 for CPCL mode.
 *cupsModelNumber: 19
index 35053cb3158b938f13f2fc61f6dd139992090159..817e4e8a37779189185083e41f71db3eb605c14f 100644 (file)
@@ -33,7 +33,7 @@
 *Product:      "(ESP Ghostscript)"
 *cupsVersion:  1.2
 *cupsManualCopies: False
-*cupsFilter:   "application/vnd.cups-raster 0 rastertodymo"
+*cupsFilter:   "application/vnd.cups-raster 0 rastertolabel"
 *% cupsModelNumber is 16 for EPL1 line mode, 17 for EPL2 page mode,
 *% 18 for ZPL mode, and 19 for CPCL mode.
 *cupsModelNumber: 16
index 0f1f1940b94be0d8d6359cfeaceffa32f165c3d6..e4ad8ca1d53cf5df6b8401a1e0ec12fc98a96fdb 100644 (file)
@@ -33,7 +33,7 @@
 *Product:      "(ESP Ghostscript)"
 *cupsVersion:  1.2
 *cupsManualCopies: False
-*cupsFilter:   "application/vnd.cups-raster 0 rastertodymo"
+*cupsFilter:   "application/vnd.cups-raster 0 rastertolabel"
 *% cupsModelNumber is 16 for EPL1 line mode, 17 for EPL2 page mode,
 *% 18 for ZPL mode, and 19 for CPCL mode.
 *cupsModelNumber: 17
index 0faf79818322e7dc052f3a856fd54208aa73525a..7ca0a4300d76163fe38602abcf789ef78a612350 100644 (file)
 # DO NOT DELETE
 
 auth.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-auth.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-auth.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-auth.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-auth.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-auth.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-auth.o: network.h subscriptions.h
+auth.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+auth.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+auth.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+auth.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+auth.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+auth.o: banners.h dirsvc.h network.h subscriptions.h
 banners.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-banners.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-banners.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-banners.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-banners.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-banners.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-banners.o: network.h subscriptions.h ../cups/dir.h
+banners.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+banners.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+banners.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+banners.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+banners.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+banners.o: classes.h job.h conf.h banners.h dirsvc.h network.h
+banners.o: subscriptions.h ../cups/dir.h
 cert.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-cert.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-cert.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-cert.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-cert.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-cert.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-cert.o: network.h subscriptions.h
+cert.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+cert.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+cert.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+cert.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+cert.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+cert.o: banners.h dirsvc.h network.h subscriptions.h
 classes.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-classes.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-classes.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-classes.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-classes.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-classes.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-classes.o: network.h subscriptions.h
+classes.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+classes.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+classes.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+classes.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+classes.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+classes.o: classes.h job.h conf.h banners.h dirsvc.h network.h
+classes.o: subscriptions.h
 client.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
-client.o: cupsd.h ../cups/string.h ../cups/array.h ../cups/cups.h
-client.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-client.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-client.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-client.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-client.o: network.h subscriptions.h
+client.o: ../cups/ipp-private.h ../cups/ipp.h cupsd.h ../cups/string.h
+client.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+client.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+client.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+client.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+client.o: classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
 conf.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-conf.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-conf.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-conf.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-conf.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-conf.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-conf.o: network.h subscriptions.h ../cups/dir.h
+conf.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+conf.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+conf.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+conf.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+conf.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+conf.o: banners.h dirsvc.h network.h subscriptions.h ../cups/dir.h
 dirsvc.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-dirsvc.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-dirsvc.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-dirsvc.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-dirsvc.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-dirsvc.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-dirsvc.o: network.h subscriptions.h
+dirsvc.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+dirsvc.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+dirsvc.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+dirsvc.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+dirsvc.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+dirsvc.o: classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
 env.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-env.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-env.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-env.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-env.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-env.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-env.o: network.h subscriptions.h
+env.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+env.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+env.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+env.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+env.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+env.o: banners.h dirsvc.h network.h subscriptions.h
 main.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-main.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-main.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-main.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-main.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-main.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-main.o: network.h subscriptions.h
+main.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+main.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+main.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+main.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+main.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+main.o: banners.h dirsvc.h network.h subscriptions.h
 ipp.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-ipp.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-ipp.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-ipp.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-ipp.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-ipp.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-ipp.o: network.h subscriptions.h
+ipp.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+ipp.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+ipp.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+ipp.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+ipp.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+ipp.o: banners.h dirsvc.h network.h subscriptions.h
 listen.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-listen.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-listen.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-listen.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-listen.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-listen.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-listen.o: network.h subscriptions.h
+listen.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+listen.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+listen.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+listen.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+listen.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+listen.o: classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
 job.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-job.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-job.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-job.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-job.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-job.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-job.o: network.h subscriptions.h ../cups/backend.h ../cups/dir.h
+job.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+job.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+job.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+job.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+job.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+job.o: banners.h dirsvc.h network.h subscriptions.h ../cups/backend.h
+job.o: ../cups/dir.h
 log.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-log.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-log.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-log.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-log.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-log.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-log.o: network.h subscriptions.h
+log.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+log.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+log.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+log.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h statbuf.h
+log.o: cert.h auth.h client.h policy.h printers.h classes.h job.h conf.h
+log.o: banners.h dirsvc.h network.h subscriptions.h
 network.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-network.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-network.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-network.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-network.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-network.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-network.o: network.h subscriptions.h
+network.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+network.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+network.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+network.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+network.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+network.o: classes.h job.h conf.h banners.h dirsvc.h network.h
+network.o: subscriptions.h
 policy.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-policy.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-policy.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-policy.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-policy.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-policy.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-policy.o: network.h subscriptions.h
+policy.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+policy.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+policy.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+policy.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+policy.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+policy.o: classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
 printers.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-printers.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-printers.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-printers.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-printers.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
+printers.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
+printers.o: ../cups/string.h ../cups/array.h ../cups/cups.h ../cups/ppd.h
+printers.o: ../cups/array.h ../cups/file.h ../cups/language.h mime.h
+printers.o: ../cups/ipp.h ../cups/file.h ../cups/http.h ../cups/i18n.h
+printers.o: ../cups/debug.h sysman.h statbuf.h cert.h auth.h client.h
 printers.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-printers.o: network.h subscriptions.h
+printers.o: network.h subscriptions.h ../cups/transcode.h
 process.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-process.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-process.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-process.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-process.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-process.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-process.o: network.h subscriptions.h
+process.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+process.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+process.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+process.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+process.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+process.o: classes.h job.h conf.h banners.h dirsvc.h network.h
+process.o: subscriptions.h
 quotas.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-quotas.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-quotas.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-quotas.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-quotas.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-quotas.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-quotas.o: network.h subscriptions.h
+quotas.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+quotas.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+quotas.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+quotas.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+quotas.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+quotas.o: classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
 server.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
-server.o: cupsd.h ../cups/string.h ../cups/array.h ../cups/cups.h
-server.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-server.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-server.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-server.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-server.o: network.h subscriptions.h
+server.o: ../cups/ipp-private.h ../cups/ipp.h cupsd.h ../cups/string.h
+server.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+server.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+server.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+server.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+server.o: classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
 statbuf.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-statbuf.o: ../cups/md5.h ../cups/string.h ../cups/array.h ../cups/cups.h
-statbuf.o: ../cups/ipp.h ../cups/ppd.h ../cups/file.h mime.h ../cups/ipp.h
-statbuf.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/language.h
-statbuf.o: ../cups/array.h ../cups/debug.h statbuf.h cert.h auth.h client.h
-statbuf.o: policy.h printers.h classes.h job.h conf.h banners.h dirsvc.h
-statbuf.o: network.h subscriptions.h
+statbuf.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+statbuf.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+statbuf.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+statbuf.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+statbuf.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+statbuf.o: classes.h job.h conf.h banners.h dirsvc.h network.h
+statbuf.o: subscriptions.h
 subscriptions.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
-subscriptions.o: ../cups/md5.h ../cups/string.h ../cups/array.h
-subscriptions.o: ../cups/cups.h ../cups/ipp.h ../cups/ppd.h ../cups/file.h
-subscriptions.o: mime.h ../cups/ipp.h ../cups/file.h ../cups/http.h
-subscriptions.o: ../cups/i18n.h ../cups/language.h ../cups/array.h
-subscriptions.o: ../cups/debug.h statbuf.h cert.h auth.h client.h policy.h
-subscriptions.o: printers.h classes.h job.h conf.h banners.h dirsvc.h
-subscriptions.o: network.h subscriptions.h
-filter.o: ../cups/debug.h ../cups/string.h ../config.h mime.h ../cups/ipp.h
-filter.o: ../cups/file.h
-mime.o: ../cups/string.h ../config.h mime.h ../cups/ipp.h ../cups/file.h
-type.o: ../cups/string.h ../config.h mime.h ../cups/ipp.h ../cups/file.h
-type.o: ../cups/debug.h
+subscriptions.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h
+subscriptions.o: ../cups/string.h ../cups/array.h ../cups/cups.h
+subscriptions.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
+subscriptions.o: ../cups/language.h mime.h ../cups/ipp.h ../cups/file.h
+subscriptions.o: ../cups/http.h ../cups/i18n.h ../cups/debug.h sysman.h
+subscriptions.o: statbuf.h cert.h auth.h client.h policy.h printers.h
+subscriptions.o: classes.h job.h conf.h banners.h dirsvc.h network.h
+subscriptions.o: subscriptions.h
+sysman.o: cupsd.h ../cups/http-private.h ../config.h ../cups/http.h
+sysman.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h
+sysman.o: ../cups/array.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
+sysman.o: ../cups/file.h ../cups/language.h mime.h ../cups/ipp.h
+sysman.o: ../cups/file.h ../cups/http.h ../cups/i18n.h ../cups/debug.h
+sysman.o: sysman.h statbuf.h cert.h auth.h client.h policy.h printers.h
+sysman.o: classes.h job.h conf.h banners.h dirsvc.h network.h subscriptions.h
+filter.o: ../cups/debug.h ../cups/string.h ../config.h mime.h ../cups/array.h
+filter.o: ../cups/ipp.h ../cups/file.h
+mime.o: ../cups/dir.h ../cups/string.h ../config.h mime.h ../cups/array.h
+mime.o: ../cups/ipp.h ../cups/file.h
+type.o: ../cups/string.h ../config.h mime.h ../cups/array.h ../cups/ipp.h
+type.o: ../cups/file.h ../cups/debug.h
 cups-deviced.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cups-deviced.o: ../cups/md5.h ../cups/ppd.h ../cups/file.h ../cups/file.h
-cups-deviced.o: ../cups/string.h ../config.h ../cups/array.h ../cups/dir.h
+cups-deviced.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+cups-deviced.o: ../cups/language.h ../cups/file.h ../cups/string.h
+cups-deviced.o: ../config.h ../cups/array.h ../cups/dir.h
 cups-driverd.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-cups-driverd.o: ../cups/md5.h ../cups/ppd.h ../cups/file.h ../cups/file.h
-cups-driverd.o: ../cups/string.h ../config.h ../cups/dir.h
-cups-lpd.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-cups-lpd.o: ../cups/ppd.h ../cups/file.h ../cups/string.h ../config.h
-cups-lpd.o: ../cups/language.h ../cups/array.h
+cups-driverd.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+cups-driverd.o: ../cups/language.h ../cups/file.h ../cups/string.h
+cups-driverd.o: ../config.h ../cups/dir.h
+cups-lpd.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
+cups-lpd.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h ../cups/ppd.h
+cups-lpd.o: ../cups/array.h ../cups/file.h ../cups/language.h
+cups-lpd.o: ../cups/string.h ../cups/language.h
 cups-polld.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
-cups-polld.o: ../cups/cups.h ../cups/ipp.h ../cups/ppd.h ../cups/file.h
-cups-polld.o: ../cups/language.h ../cups/array.h ../cups/string.h
+cups-polld.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
+cups-polld.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+cups-polld.o: ../cups/language.h ../cups/string.h
 testdirsvc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-testdirsvc.o: ../cups/ppd.h ../cups/file.h ../cups/string.h ../config.h
-testmime.o: ../cups/string.h ../config.h mime.h ../cups/ipp.h ../cups/file.h
+testdirsvc.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testdirsvc.o: ../cups/string.h ../config.h
+testmime.o: ../cups/string.h ../config.h mime.h ../cups/array.h ../cups/ipp.h
+testmime.o: ../cups/file.h ../cups/dir.h
 testspeed.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-testspeed.o: ../cups/ppd.h ../cups/file.h ../cups/language.h ../cups/array.h
-testspeed.o: ../cups/debug.h
+testspeed.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testspeed.o: ../cups/language.h ../cups/debug.h
 util.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-util.o: ../cups/ppd.h ../cups/file.h ../cups/file.h ../cups/string.h
-util.o: ../config.h
+util.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+util.o: ../cups/file.h ../cups/string.h ../config.h
index e5f61fcd5a96e1b58496885c02f8ddc99870f2ef..adbebbf54aba0600edba8c4a1994f4db67d2e07a 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 5007 2006-01-27 18:25:42Z mike $"
+# "$Id: Makefile 5116 2006-02-16 12:52:32Z mike $"
 #
 #   Scheduler Makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2006 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
@@ -120,24 +120,32 @@ install:  all
        $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver
        echo Creating $(SERVERROOT)...
        $(INSTALL_DIR) -m 755 $(SERVERROOT)
+       -chgrp $(CUPS_GROUP) $(SERVERROOT)
        echo Creating $(SERVERROOT)/interfaces...
-       $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/interfaces
+       $(INSTALL_DIR) -m 755 $(SERVERROOT)/interfaces
+       -chgrp $(CUPS_GROUP) $(SERVERROOT)/interfaces
        echo Creating $(SERVERROOT)/ppd...
-       $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/ppd
+       $(INSTALL_DIR) -m 755 $(SERVERROOT)/ppd
+       -chgrp $(CUPS_GROUP) $(SERVERROOT)/ppd
        echo Creating $(STATEDIR)...
        $(INSTALL_DIR) -m 755 $(STATEDIR)
        echo Creating $(STATEDIR)/certs...
-       $(INSTALL_DIR) -m 711 $(STATEDIR)/certs
+       $(INSTALL_DIR) -m 511 $(STATEDIR)/certs
+       -chgrp $(CUPS_PRIMARY_SYSTEM_GROUP) $(STATEDIR)/certs
        echo Creating $(LOGDIR)...
        $(INSTALL_DIR) -m 755 $(LOGDIR)
        echo Creating $(REQUESTS)...
-       $(INSTALL_DIR) -m 710 -g $(CUPS_GROUP) $(REQUESTS)
+       $(INSTALL_DIR) -m 710 $(REQUESTS)
+       -chgrp $(CUPS_GROUP) $(REQUESTS)
        echo Creating $(REQUESTS)/tmp...
-       $(INSTALL_DIR) -m 1770 -g $(CUPS_GROUP) $(REQUESTS)/tmp
+       $(INSTALL_DIR) -m 1770 $(REQUESTS)/tmp
+       -chgrp $(CUPS_GROUP) $(REQUESTS)/tmp
        echo Creating $(CACHEDIR)...
-       $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)
+       $(INSTALL_DIR) -m 775 $(CACHEDIR)
+       -chgrp $(CUPS_GROUP) $(CACHEDIR)
 #      echo Creating $(CACHEDIR)/ppd...
 #      $(INSTALL_DIR) -m 755 $(CACHEDIR)/ppd
+#      -chgrp $(CUPS_GROUP) $(CACHEDIR)/ppd
 
 
 #
@@ -240,5 +248,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5007 2006-01-27 18:25:42Z mike $".
+# End of "$Id: Makefile 5116 2006-02-16 12:52:32Z mike $".
 #
index e71cfaa403173f57af6296d4347703c918fc18a9..89011f7db89ab0e2ef1cc58fd89f6190a6da9959 100644 (file)
@@ -1,5 +1,5 @@
 ;/*
- * "$Id: auth.c 5043 2006-02-01 18:55:16Z mike $"
+ * "$Id: auth.c 5083 2006-02-06 02:57:43Z mike $"
  *
  *   Authorization routines for the Common UNIX Printing System (CUPS).
  *
@@ -45,6 +45,7 @@
  *   cupsdIsAuthorized()       - Check to see if the user is authorized...
  *   add_allow()               - Add an allow mask to the location.
  *   add_deny()                - Add a deny mask to the location.
+ *   compare_locations()       - Compare two locations.
  *   cups_crypt()              - Encrypt the password using the DES or MD5
  *                               algorithms, as needed.
  *   pam_func()                - PAM conversation function.
@@ -73,6 +74,9 @@
 #ifdef HAVE_USERSEC_H
 #  include <usersec.h>
 #endif /* HAVE_USERSEC_H */
+#ifdef HAVE_MEMBERSHIP_H
+#  include <membership.h>
+#endif /* HAVE_MEMBERSHIP_H */
 
 
 /*
@@ -81,6 +85,8 @@
 
 static cupsd_authmask_t        *add_allow(cupsd_location_t *loc);
 static cupsd_authmask_t        *add_deny(cupsd_location_t *loc);
+static int             compare_locations(cupsd_location_t *a,
+                                         cupsd_location_t *b);
 #if !HAVE_LIBPAM
 static char            *cups_crypt(const char *pw, const char *salt);
 #endif /* !HAVE_LIBPAM */
@@ -125,30 +131,32 @@ cupsdAddLocation(const char *location)    /* I - Location path */
 
 
  /*
-  * Try to allocate memory for the new location.
+  * Make sure the locations array is created...
   */
 
-  if (NumLocations == 0)
-    temp = malloc(sizeof(cupsd_location_t));
-  else
-    temp = realloc(Locations, sizeof(cupsd_location_t) * (NumLocations + 1));
+  if (!Locations)
+    Locations = cupsArrayNew((cups_array_func_t)compare_locations, NULL);
 
-  if (temp == NULL)
+  if (!Locations)
     return (NULL);
 
-  Locations = temp;
-  temp      += NumLocations;
-  NumLocations ++;
+ /*
+  * Try to allocate memory for the new location.
+  */
+
+  if ((temp = calloc(1, sizeof(cupsd_location_t))) == NULL)
+    return (NULL);
 
  /*
   * Initialize the record and copy the name over...
   */
 
-  memset(temp, 0, sizeof(cupsd_location_t));
-  strlcpy(temp->location, location, sizeof(temp->location));
-  temp->length = strlen(temp->location);
+  temp->location = strdup(location);
+  temp->length   = strlen(temp->location);
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdAddLocation: added location \'%s\'",
+  cupsArrayAdd(Locations, temp);
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddLocation: added location \'%s\'",
                   location);
 
  /*
@@ -218,7 +226,7 @@ cupsdAllowHost(cupsd_location_t *loc,       /* I - Location to add to */
   if ((temp = add_allow(loc)) == NULL)
     return;
 
-  if (strcasecmp(name, "@LOCAL") == 0)
+  if (!strcasecmp(name, "@LOCAL"))
   {
    /*
     * Allow *interface*...
@@ -228,7 +236,7 @@ cupsdAllowHost(cupsd_location_t *loc,       /* I - Location to add to */
     temp->mask.name.name   = strdup("*");
     temp->mask.name.length = 1;
   }
-  else if (strncasecmp(name, "@IF(", 4) == 0)
+  else if (!strncasecmp(name, "@IF(", 4))
   {
    /*
     * Allow *interface*...
@@ -900,8 +908,8 @@ cupsdCheckAuth(
 
          if (name_len >= masks->mask.name.length &&
              masks->mask.name.name[0] == '.' &&
-             strcasecmp(name + name_len - masks->mask.name.length,
-                        masks->mask.name.name) == 0)
+             !strcasecmp(name + name_len - masks->mask.name.length,
+                         masks->mask.name.name))
            return (1);
           break;
 
@@ -941,6 +949,11 @@ cupsdCheckGroup(
   int                  i;              /* Looping var */
   struct group         *group;         /* System group info */
   char                 junk[33];       /* MD5 password (not used) */
+#ifdef HAVE_MBR_UID_TO_UUID
+  uuid_t               useruuid,       /* UUID for username */
+                       groupuuid;      /* UUID for groupname */
+  int                  is_member;      /* True if user is a member of group */
+#endif /* HAVE_MBR_UID_TO_UUID */
 
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -980,6 +993,19 @@ cupsdCheckGroup(
   if (user && group && group->gr_gid == user->pw_gid)
     return (1);
 
+#ifdef HAVE_MBR_UID_TO_UUID
+ /*
+  * Check group membership through MacOS X membership API...
+  */
+
+  if (user && group)
+    if (!mbr_uid_to_uuid(user->pw_uid, useruuid))
+      if (!mbr_gid_to_uuid(group->gr_gid, groupuuid))
+       if (!mbr_check_membership(useruuid, groupuuid, &is_member))
+         if (is_member)
+           return (1);
+#endif /* HAVE_MBR_UID_TO_UUID */
+
  /*
   * Username not found, group not found, or user is not part of the
   * system group...  Check for a user and group in the MD5 password
@@ -1006,19 +1032,11 @@ cupsdCopyLocation(
     cupsd_location_t **loc)            /* IO - Original location */
 {
   int                  i;              /* Looping var */
-  int                  locindex;       /* Index into Locations array */
   cupsd_location_t     *temp;          /* New location */
   char                 location[HTTP_MAX_URI];
                                        /* Location of resource */
 
 
- /*
-  * Add the new location, updating the original location
-  * pointer as needed...
-  */
-
-  locindex = *loc - Locations;
-
  /*
   * Use a local copy of location because cupsdAddLocation may cause
   * this memory to be moved...
@@ -1029,8 +1047,6 @@ cupsdCopyLocation(
   if ((temp = cupsdAddLocation(location)) == NULL)
     return (NULL);
 
-  *loc = Locations + locindex;
-
  /*
   * Copy the information from the original location to the new one.
   */
@@ -1053,7 +1069,8 @@ cupsdCopyLocation(
       cupsdLogMessage(CUPSD_LOG_ERROR,
                       "cupsdCopyLocation: Unable to allocate memory for %d names: %s",
                       temp->num_names, strerror(errno));
-      NumLocations --;
+
+      cupsdDeleteLocation(temp);
       return (NULL);
     }
 
@@ -1064,7 +1081,7 @@ cupsdCopyLocation(
                        "cupsdCopyLocation: Unable to copy name \"%s\": %s",
                         (*loc)->names[i], strerror(errno));
 
-       NumLocations --;
+        cupsdDeleteLocation(temp);
        return (NULL);
       }
   }
@@ -1080,7 +1097,7 @@ cupsdCopyLocation(
       cupsdLogMessage(CUPSD_LOG_ERROR,
                       "cupsdCopyLocation: Unable to allocate memory for %d allow rules: %s",
                       temp->num_allow, strerror(errno));
-      NumLocations --;
+      cupsdDeleteLocation(temp);
       return (NULL);
     }
 
@@ -1096,7 +1113,7 @@ cupsdCopyLocation(
              cupsdLogMessage(CUPSD_LOG_ERROR,
                              "cupsdCopyLocation: Unable to copy allow name \"%s\": %s",
                              (*loc)->allow[i].mask.name.name, strerror(errno));
-             NumLocations --;
+              cupsdDeleteLocation(temp);
              return (NULL);
            }
            break;
@@ -1118,7 +1135,7 @@ cupsdCopyLocation(
       cupsdLogMessage(CUPSD_LOG_ERROR,
                       "cupsdCopyLocation: Unable to allocate memory for %d deny rules: %s",
                       temp->num_deny, strerror(errno));
-      NumLocations --;
+      cupsdDeleteLocation(temp);
       return (NULL);
     }
 
@@ -1134,7 +1151,7 @@ cupsdCopyLocation(
              cupsdLogMessage(CUPSD_LOG_ERROR,
                              "cupsdCopyLocation: Unable to copy deny name \"%s\": %s",
                              (*loc)->deny[i].mask.name.name, strerror(errno));
-             NumLocations --;
+              cupsdDeleteLocation(temp);
              return (NULL);
            }
            break;
@@ -1156,7 +1173,6 @@ cupsdCopyLocation(
 void
 cupsdDeleteAllLocations(void)
 {
-  int                  i;              /* Looping var */
   cupsd_location_t     *loc;           /* Current location */
 
 
@@ -1164,18 +1180,17 @@ cupsdDeleteAllLocations(void)
   * Free all of the allow/deny records first...
   */
 
-  for (i = NumLocations, loc = Locations; i > 0; i --, loc ++)
+  for (loc = (cupsd_location_t *)cupsArrayFirst(Locations);
+       loc;
+       loc = (cupsd_location_t *)cupsArrayNext(Locations))
     cupsdDeleteLocation(loc);
 
  /*
   * Then free the location array...
   */
 
-  if (NumLocations > 0)
-    free(Locations);
-
-  Locations    = NULL;
-  NumLocations = 0;
+  cupsArrayDelete(Locations);
+  Locations = NULL;
 }
 
 
@@ -1191,6 +1206,8 @@ cupsdDeleteLocation(
   cupsd_authmask_t     *mask;          /* Current mask */
 
 
+  cupsArrayRemove(Locations, loc);
+
   for (i = loc->num_names - 1; i >= 0; i --)
     free(loc->names[i]);
 
@@ -1210,6 +1227,9 @@ cupsdDeleteLocation(
 
   if (loc->num_deny > 0)
     free(loc->deny);
+
+  free(loc->location);
+  free(loc);
 }
 
 
@@ -1233,7 +1253,7 @@ cupsdDenyHost(cupsd_location_t *loc,      /* I - Location to add to */
   if ((temp = add_deny(loc)) == NULL)
     return;
 
-  if (strcasecmp(name, "@LOCAL") == 0)
+  if (!strcasecmp(name, "@LOCAL"))
   {
    /*
     * Deny *interface*...
@@ -1243,7 +1263,7 @@ cupsdDenyHost(cupsd_location_t *loc,      /* I - Location to add to */
     temp->mask.name.name   = strdup("*");
     temp->mask.name.length = 1;
   }
-  else if (strncasecmp(name, "@IF(", 4) == 0)
+  else if (!strncasecmp(name, "@IF(", 4))
   {
    /*
     * Deny *interface*...
@@ -1312,7 +1332,6 @@ cupsd_location_t *                        /* O - Location that matches */
 cupsdFindBest(const char   *path,      /* I - Resource path */
               http_state_t state)      /* I - HTTP state/request */
 {
-  int                  i;              /* Looping var */
   char                 uri[HTTP_MAX_URI],
                                        /* URI in request... */
                        *uriptr;        /* Pointer into URI */
@@ -1370,7 +1389,9 @@ cupsdFindBest(const char   *path, /* I - Resource path */
   best    = NULL;
   bestlen = 0;
 
-  for (i = NumLocations, loc = Locations; i > 0; i --, loc ++)
+  for (loc = (cupsd_location_t *)cupsArrayFirst(Locations);
+       loc;
+       loc = (cupsd_location_t *)cupsArrayNext(Locations))
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFindBest: Location %s Limit %x",
                     loc->location, loc->limit);
@@ -1382,7 +1403,7 @@ cupsdFindBest(const char   *path, /* I - Resource path */
       */
 
       if (loc->length > bestlen &&
-          strncasecmp(uri, loc->location, loc->length) == 0 &&
+          !strncasecmp(uri, loc->location, loc->length) &&
          loc->location[0] == '/' &&
          (limit & loc->limit) != 0)
       {
@@ -1425,18 +1446,12 @@ cupsdFindBest(const char   *path,       /* I - Resource path */
 cupsd_location_t *                     /* O - Location that matches */
 cupsdFindLocation(const char *location)        /* I - Connection */
 {
-  int          i;                      /* Looping var */
+  cupsd_location_t     key;            /* Search key */
 
 
- /*
-  * Loop through the list of locations to find a match...
-  */
+  key.location = (char *)location;
 
-  for (i = 0; i < NumLocations; i ++)
-    if (!strcasecmp(Locations[i].location, location))
-      return (Locations + i);
-
-  return (NULL);
+  return ((cupsd_location_t *)cupsArrayFind(Locations, &key));
 }
 
 
@@ -1478,8 +1493,8 @@ cupsdGetMD5Passwd(const char *username,   /* I - Username */
       continue;
     }
 
-    if (strcmp(username, tempuser) == 0 &&
-        (group == NULL || strcmp(group, tempgroup) == 0))
+    if (!strcmp(username, tempuser) &&
+        (group == NULL || !strcmp(group, tempgroup)))
     {
      /*
       * Found the password entry!
@@ -1557,7 +1572,8 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
   best = con->best;
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdIsAuthorized: level=AUTH_%s, type=AUTH_%s, satisfy=AUTH_SATISFY_%s, num_names=%d",
+                  "cupsdIsAuthorized: level=AUTH_%s, type=AUTH_%s, "
+                 "satisfy=AUTH_SATISFY_%s, num_names=%d",
                   levels[best->level], types[best->type],
                  best->satisfy ? "ANY" : "ALL", best->num_names);
 
@@ -1656,7 +1672,8 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
   * See if encryption is required...
   */
 
-  if (best->encryption >= HTTP_ENCRYPT_REQUIRED && !con->http.tls)
+  if (best->encryption >= HTTP_ENCRYPT_REQUIRED && !con->http.tls &&
+      best->satisfy == AUTH_SATISFY_ALL)
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "cupsdIsAuthorized: Need upgrade to TLS...");
@@ -1889,6 +1906,18 @@ add_deny(cupsd_location_t *loc)          /* I - Location to add to */
 }
 
 
+/*
+ * 'compare_locations()' - Compare two locations.
+ */
+
+static int                             /* O - Result of comparison */
+compare_locations(cupsd_location_t *a, /* I - First location */
+                  cupsd_location_t *b) /* I - Second location */
+{
+  return (strcmp(b->location, a->location));
+}
+
+
 #if !HAVE_LIBPAM
 /*
  * 'cups_crypt()' - Encrypt the password using the DES or MD5 algorithms,
@@ -1899,7 +1928,7 @@ static char *                             /* O - Encrypted password */
 cups_crypt(const char *pw,             /* I - Password string */
            const char *salt)           /* I - Salt (key) string */
 {
-  if (strncmp(salt, "$1$", 3) == 0)
+  if (!strncmp(salt, "$1$", 3))
   {
    /*
     * Use MD5 passwords without the benefit of PAM; this is for
@@ -2127,5 +2156,5 @@ to64(char          *s,                    /* O - Output string */
 
 
 /*
- * End of "$Id: auth.c 5043 2006-02-01 18:55:16Z mike $".
+ * End of "$Id: auth.c 5083 2006-02-06 02:57:43Z mike $".
  */
index f78b587e5bd24b22e384465b61a25e103b905679..2d4dcb3268c64b1c31ec849597fb59819ec3d2d7 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * "$Id: auth.h 4812 2005-10-25 18:23:10Z mike $"
+ * "$Id: auth.h 5069 2006-02-04 05:24:35Z mike $"
  *
  *   Authorization definitions for the Common UNIX Printing System (CUPS)
  *   scheduler.
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -97,8 +97,7 @@ typedef struct
 
 typedef struct
 {
-  char                 location[HTTP_MAX_URI];
-                                       /* Location of resource */
+  char                 *location;      /* Location of resource */
   ipp_op_t             op;             /* IPP operation */
   int                  limit,          /* Limit for these types of requests */
                        length,         /* Length of location string */
@@ -122,9 +121,7 @@ typedef struct cupsd_client_s cupsd_client_t;
  * Globals...
  */
 
-VAR int                        NumLocations    VALUE(0);
-                                       /* Number of authorization locations */
-VAR cupsd_location_t   *Locations      VALUE(NULL);
+VAR cups_array_t       *Locations      VALUE(NULL);
                                        /* Authorization locations */
 VAR int                        DefaultAuthType VALUE(AUTH_BASIC);
                                        /* Default AuthType, if not specified */
@@ -159,5 +156,5 @@ extern http_status_t        cupsdIsAuthorized(cupsd_client_t *con, const char *owner);
 
 
 /*
- * End of "$Id: auth.h 4812 2005-10-25 18:23:10Z mike $".
+ * End of "$Id: auth.h 5069 2006-02-04 05:24:35Z mike $".
  */
index c95ea0d9ee54d903cd92c79d48ed5ee7f6b304c2..5ce485673efbd9c2965b7f0a91551039a39d4e85 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: banners.c 5051 2006-02-02 16:13:16Z mike $"
+ * "$Id: banners.c 5062 2006-02-03 16:36:24Z mike $"
  *
  *   Banner routines for the Common UNIX Printing System (CUPS).
  *
@@ -79,7 +79,7 @@ cupsdAddBanner(const char *name,      /* I - Name of banner */
   * Copy the new banner data over...
   */
 
-  strlcpy(temp->name, name, sizeof(temp->name));
+  temp->name     = strdup(name);
   temp->filetype = filetype;
 
   cupsArrayAdd(Banners, temp);
@@ -96,7 +96,7 @@ cupsdFindBanner(const char *name)     /* I - Name of banner */
   cupsd_banner_t       key;            /* Search key */
 
 
-  strlcpy(key.name, name, sizeof(key.name));
+  key.name = (char *)name;
 
   return ((cupsd_banner_t *)cupsArrayFind(Banners, &key));
 }
@@ -115,7 +115,10 @@ cupsdFreeBanners(void)
   for (temp = (cupsd_banner_t *)cupsArrayFirst(Banners);
        temp;
        temp = (cupsd_banner_t *)cupsArrayNext(Banners))
+  {
+    free(temp->name);
     free(temp);
+  }
 
   cupsArrayDelete(Banners);
   Banners = NULL;
@@ -170,7 +173,8 @@ cupsdLoadBanners(const char *d)             /* I - Directory to search */
     if (S_ISDIR(dent->fileinfo.st_mode))
       continue;
 
-    if (dent->filename[0] == '~')
+    if (dent->filename[0] == '~' ||
+        dent->filename[strlen(dent->filename) - 1] == '~')
       continue;
 
     if ((ext = strrchr(dent->filename, '.')) != NULL)
@@ -208,5 +212,5 @@ compare_banners(
 
 
 /*
- * End of "$Id: banners.c 5051 2006-02-02 16:13:16Z mike $".
+ * End of "$Id: banners.c 5062 2006-02-03 16:36:24Z mike $".
  */
index 668c5ade87f7c15ec65f67a2b2f5b91fe3cfc403..8c99774d89fdc0ba562853a90bb7a6498a1e4782 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: banners.h 4968 2006-01-24 03:56:31Z mike $"
+ * "$Id: banners.h 5062 2006-02-03 16:36:24Z mike $"
  *
  *   Banner definitions for the Common UNIX Printing System (CUPS).
  *
@@ -26,9 +26,9 @@
  * Banner information structure...
  */
 
-typedef struct
+typedef struct                         /**** Banner file information ****/
 {
-  char         name[256];              /* Name of banner */
+  char         *name;                  /* Name of banner */
   mime_type_t  *filetype;              /* Filetype for banner */
 } cupsd_banner_t;
 
@@ -52,5 +52,5 @@ extern void           cupsdLoadBanners(const char *d);
 
 
 /*
- * End of "$Id: banners.h 4968 2006-01-24 03:56:31Z mike $".
+ * End of "$Id: banners.h 5062 2006-02-03 16:36:24Z mike $".
  */
index aa8b6ca50f52c960f23ddc12f056cd846554f0c0..195db7842e62fb44feac9b781587a9fa3ee896a0 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * "$Id: cert.c 4966 2006-01-23 00:41:22Z mike $"
+ * "$Id: cert.c 5080 2006-02-05 18:28:27Z mike $"
  *
  *   Authentication certificate routines for the Common UNIX
  *   Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -39,7 +39,9 @@
 #include "cupsd.h"
 #ifdef HAVE_ACL_INIT
 #  include <sys/acl.h>
-#  include <membership.h>
+#  ifdef HAVE_MEMBERSHIP_H
+#    include <membership.h>
+#  endif /* HAVE_MEMBERSHIP_H */
 #endif /* HAVE_ACL_INIT */
 
 
@@ -102,7 +104,9 @@ cupsdAddCert(int        pid,                /* I - Process ID */
     acl_t              acl;            /* ACL information */
     acl_entry_t                entry;          /* ACL entry */
     acl_permset_t      permset;        /* Permissions */
+#  ifdef HAVE_MBR_UID_TO_UUID
     uuid_t             group;          /* Group ID */
+#  endif /* HAVE_MBR_UID_TO_UUID */
 #endif /* HAVE_ACL_INIT */
 
 
@@ -113,6 +117,9 @@ cupsdAddCert(int        pid,                /* I - Process ID */
     fchmod(fd, 0440);
     fchown(fd, RunUser, SystemGroupIDs[0]);
 
+    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAddCert: NumSystemGroups=%d",
+                    NumSystemGroups);
+
 #ifdef HAVE_ACL_INIT
     if (NumSystemGroups > 1)
     {
@@ -121,6 +128,11 @@ cupsdAddCert(int        pid,               /* I - Process ID */
       * groups can access it...
       */
 
+#  ifdef HAVE_MBR_UID_TO_UUID
+     /*
+      * On MacOS X, ACLs use UUIDs instead of GIDs...
+      */
+
       acl = acl_init(NumSystemGroups - 1);
 
       for (i = 1; i < NumSystemGroups; i ++)
@@ -137,6 +149,72 @@ cupsdAddCert(int        pid,               /* I - Process ID */
        acl_set_qualifier(entry, &group);
        acl_set_permset(entry, permset);
       }
+#  else
+     /*
+      * POSIX ACLs need permissions for owner, group, other, and mask
+      * in addition to the rest of the system groups...
+      */
+
+      acl = acl_init(NumSystemGroups + 3);
+
+      /* Owner */
+      acl_create_entry(&acl, &entry);
+      acl_get_permset(entry, &permset);
+      acl_add_perm(permset, ACL_READ);
+      acl_set_tag_type(entry, ACL_USER_OBJ);
+      acl_set_permset(entry, permset);
+
+      /* Group */
+      acl_create_entry(&acl, &entry);
+      acl_get_permset(entry, &permset);
+      acl_add_perm(permset, ACL_READ);
+      acl_set_tag_type(entry, ACL_GROUP_OBJ);
+      acl_set_permset(entry, permset);
+
+      /* Others */
+      acl_create_entry(&acl, &entry);
+      acl_get_permset(entry, &permset);
+      acl_add_perm(permset, ACL_READ);
+      acl_set_tag_type(entry, ACL_OTHER);
+      acl_set_permset(entry, permset);
+
+      /* Mask */
+      acl_create_entry(&acl, &entry);
+      acl_get_permset(entry, &permset);
+      acl_add_perm(permset, ACL_READ);
+      acl_set_tag_type(entry, ACL_MASK);
+      acl_set_permset(entry, permset);
+
+      for (i = 1; i < NumSystemGroups; i ++)
+      {
+       /*
+        * Add each group ID to the ACL...
+       */
+
+        acl_create_entry(&acl, &entry);
+       acl_get_permset(entry, &permset);
+       acl_add_perm(permset, ACL_READ);
+       acl_set_tag_type(entry, ACL_GROUP);
+       acl_set_qualifier(entry, SystemGroupIDs + i);
+       acl_set_permset(entry, permset);
+      }
+
+      if (acl_valid(acl))
+      {
+        char *text, *textptr;
+
+        cupsdLogMessage(CUPSD_LOG_ERROR, "ACL did not validate: %s",
+                       strerror(errno));
+        text = acl_to_text(acl, NULL);
+       for (textptr = strchr(text, '\n');
+            textptr;
+            textptr = strchr(textptr + 1, '\n'))
+         *textptr = ',';
+
+       cupsdLogMessage(CUPSD_LOG_ERROR, "ACL: %s", text);
+       free(text);
+      }
+#  endif /* HAVE_MBR_UID_TO_UUID */
 
       if (acl_set_fd(fd, acl))
        cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -337,5 +415,5 @@ cupsdInitCerts(void)
 
 
 /*
- * End of "$Id: cert.c 4966 2006-01-23 00:41:22Z mike $".
+ * End of "$Id: cert.c 5080 2006-02-05 18:28:27Z mike $".
  */
index 9c098f74f415d6466553a5d1b749dd7da76d7189..fe36555d81412cc3a2efd302b802dfd8eb75569e 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: classes.c 4988 2006-01-26 00:53:00Z mike $"
+ * "$Id: classes.c 5083 2006-02-06 02:57:43Z mike $"
  *
  *   Printer class routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -337,8 +337,7 @@ cupsdLoadAllClasses(void)
   if ((fp = cupsFileOpen(line, "r")) == NULL)
   {
     if (errno != ENOENT)
-      cupsdLogMessage(CUPSD_LOG_ERROR,
-                     "cupsdLoadAllClasses: Unable to open %s - %s", line,
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to open %s - %s", line,
                      strerror(errno));
     return;
   }
@@ -365,8 +364,7 @@ cupsdLoadAllClasses(void)
 
       if (p == NULL && value)
       {
-        cupsdLogMessage(CUPSD_LOG_DEBUG,
-                       "cupsdLoadAllClasses: Loading class %s...", value);
+        cupsdLogMessage(CUPSD_LOG_DEBUG, "Loading class %s...", value);
 
         p = cupsdAddClass(value);
        p->accepting = 1;
@@ -841,5 +839,5 @@ cupsdUpdateImplicitClasses(void)
 
 
 /*
- * End of "$Id: classes.c 4988 2006-01-26 00:53:00Z mike $".
+ * End of "$Id: classes.c 5083 2006-02-06 02:57:43Z mike $".
  */
index 7cf0cea3c6413abfe10b90a413daef56b172a936..b35ed9ba9c3599a0ad7e88b20b557d3426921219 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c 5051 2006-02-02 16:13:16Z mike $"
+ * "$Id: client.c 5083 2006-02-06 02:57:43Z mike $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -80,10 +80,10 @@ static int          pipe_command(cupsd_client_t *con, int infile, int *outfile,
 void
 cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
 {
-  int                  i;              /* Looping var */
   int                  count;          /* Count of connections on a host */
   int                  val;            /* Parameter value */
-  cupsd_client_t       *con;           /* New client pointer */
+  cupsd_client_t       *con,           /* New client pointer */
+                       *tempcon;       /* Temporary client pointer */
   http_addrlist_t      *addrlist,      /* List of adddresses for host */
                        *addr;          /* Current address */
   socklen_t            addrlen;        /* Length of address */
@@ -93,23 +93,28 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
 
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdAcceptClient(lis=%p) %d NumClients = %d",
-                  lis, lis->fd, NumClients);
+                  "cupsdAcceptClient(lis=%p) %d Clients = %d",
+                  lis, lis->fd, cupsArrayCount(Clients));
 
  /*
   * Make sure we don't have a full set of clients already...
   */
 
-  if (NumClients == MaxClients)
+  if (cupsArrayCount(Clients) == MaxClients)
     return;
 
  /*
   * Get a pointer to the next available client...
   */
 
-  con = Clients + NumClients;
+  if (!Clients)
+    Clients = cupsArrayNew(NULL, NULL);
+
+  if (!Clients)
+    return;
+
+  con = calloc(1, sizeof(cupsd_client_t));
 
-  memset(con, 0, sizeof(cupsd_client_t));
   con->http.activity = time(NULL);
   con->file          = -1;
   con->http.hostaddr = &(con->clientaddr);
@@ -125,6 +130,7 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
   {
     cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to accept client connection - %s.",
                     strerror(errno));
+    free(con);
     return;
   }
 
@@ -156,8 +162,10 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
   * Check the number of clients on the same address...
   */
 
-  for (i = 0, count = 0; i < NumClients; i ++)
-    if (httpAddrEqual(Clients[i].http.hostaddr, con->http.hostaddr))
+  for (count = 0, tempcon = (cupsd_client_t *)cupsArrayFirst(Clients);
+       tempcon;
+       tempcon = (cupsd_client_t *)cupsArrayNext(Clients))
+    if (httpAddrEqual(tempcon->http.hostaddr, con->http.hostaddr))
     {
       count ++;
       if (count >= MaxClientsPerHost)
@@ -170,8 +178,9 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
     {
       last_dos = time(NULL);
       cupsdLogMessage(CUPSD_LOG_WARN,
-                      "Possible DoS attack - more than %d clients connecting from %s!",
-                     MaxClientsPerHost, Clients[i].http.hostname);
+                      "Possible DoS attack - more than %d clients connecting "
+                     "from %s!",
+                     MaxClientsPerHost, tempcon->http.hostname);
     }
 
 #ifdef WIN32
@@ -180,6 +189,7 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
     close(con->http.fd);
 #endif /* WIN32 */
 
+    free(con);
     return;
   }
 
@@ -241,6 +251,8 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
     cupsdLogMessage(CUPSD_LOG_WARN,
                     "Name lookup failed - connection from %s closed!",
                     con->http.hostname);
+
+    free(con);
     return;
   }
 
@@ -285,6 +297,7 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
       cupsdLogMessage(CUPSD_LOG_WARN,
                       "IP lookup failed - connection from %s closed!",
                       con->http.hostname);
+      free(con);
       return;
     }
   }
@@ -341,6 +354,8 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
     }
   }
 
+  cupsArrayAdd(Clients, con);
+
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
                   "cupsdAcceptClient: %d connected to server on %s:%d",
                   con->http.fd, con->servername, con->serverport);
@@ -370,13 +385,11 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
                   con->http.fd);
   FD_SET(con->http.fd, InputSet);
 
-  NumClients ++;
-
  /*
   * Temporarily suspend accept()'s until we lose a client...
   */
 
-  if (NumClients == MaxClients)
+  if (cupsArrayCount(Clients) == MaxClients)
     cupsdPauseListening();
 
 #ifdef HAVE_SSL
@@ -407,8 +420,13 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
 void
 cupsdCloseAllClients(void)
 {
-  while (NumClients > 0)
-    cupsdCloseClient(Clients);
+  cupsd_client_t       *con;           /* Current client */
+
+
+  for (con = (cupsd_client_t *)cupsArrayFirst(Clients);
+       con;
+       con = (cupsd_client_t *)cupsArrayNext(Clients))
+    cupsdCloseClient(con);
 }
 
 
@@ -608,17 +626,16 @@ cupsdCloseClient(cupsd_client_t *con)     /* I - Client to close */
     * limit...
     */
 
-    if (NumClients == MaxClients)
+    if (cupsArrayCount(Clients) == MaxClients)
       cupsdResumeListening();
 
    /*
     * Compact the list of clients as necessary...
     */
 
-    NumClients --;
+    cupsArrayRemove(Clients, con);
 
-    if (con < (Clients + NumClients))
-      memmove(con, con + 1, (Clients + NumClients - con) * sizeof(cupsd_client_t));
+    free(con);
   }
 
   return (partial);
@@ -3205,7 +3222,7 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
   int          envc;                   /* Number of environment variables */
   char         argbuf[10240],          /* Argument buffer */
                *argv[100],             /* Argument strings */
-               *envp[MAX_ENV];         /* Environment variables */
+               *envp[MAX_ENV + 16];    /* Environment variables */
   char         content_length[1024],   /* CONTENT_LENGTH environment variable */
                content_type[1024],     /* CONTENT_TYPE environment variable */
                http_cookie[32768],     /* HTTP_COOKIE environment variable */
@@ -3486,5 +3503,5 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
 
 
 /*
- * End of "$Id: client.c 5051 2006-02-02 16:13:16Z mike $".
+ * End of "$Id: client.c 5083 2006-02-06 02:57:43Z mike $".
  */
index b2ecac49aa7890be6f8de5e2600ca92527cb8c73..8f932f00970e91810fdc389fd4c3d4c2f405f788 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: client.h 4757 2005-10-08 10:10:46Z mike $"
+ * "$Id: client.h 5069 2006-02-04 05:24:35Z mike $"
  *
  *   Client definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -82,13 +82,9 @@ VAR int                      ListenBackLog   VALUE(SOMAXCONN),
                                        /* Local port to use */
 VAR http_encryption_t  LocalEncryption VALUE(HTTP_ENCRYPT_IF_REQUESTED);
                                        /* Local port encryption to use */
-VAR int                        NumListeners    VALUE(0);
-                                       /* Number of listening sockets */
-VAR cupsd_listener_t   *Listeners      VALUE(NULL);
+VAR cups_array_t       *Listeners      VALUE(NULL);
                                        /* Listening sockets */
-VAR int                        NumClients      VALUE(0);
-                                       /* Number of HTTP clients */
-VAR cupsd_client_t     *Clients        VALUE(NULL);
+VAR cups_array_t       *Clients        VALUE(NULL);
                                        /* HTTP clients */
 VAR http_addrlist_t    *ServerAddrs    VALUE(NULL);
                                        /* Server address(es) */
@@ -107,6 +103,7 @@ VAR cupsd_statbuf_t *CGIStatusBuffer VALUE(NULL);
 extern void    cupsdAcceptClient(cupsd_listener_t *lis);
 extern void    cupsdCloseAllClients(void);
 extern int     cupsdCloseClient(cupsd_client_t *con);
+extern void    cupsdDeleteAllListeners(void);
 extern int     cupsdEncryptClient(cupsd_client_t *con);
 extern int     cupsdIsCGI(cupsd_client_t *con, const char *filename,
                           struct stat *filestats, mime_type_t *type);
@@ -130,5 +127,5 @@ extern int  cupsdWriteClient(cupsd_client_t *con);
 
 
 /*
- * End of "$Id: client.h 4757 2005-10-08 10:10:46Z mike $".
+ * End of "$Id: client.h 5069 2006-02-04 05:24:35Z mike $".
  */
index c7045656170f1097ce4ee9837cbb5d9a5781c5ce..f76d86c91571ea39091b6f07576e17a5a9499585 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: conf.c 5028 2006-01-31 01:16:43Z mike $"
+ * "$Id: conf.c 5116 2006-02-16 12:52:32Z mike $"
  *
  *   Configuration routines for the Common UNIX Printing System (CUPS).
  *
@@ -30,6 +30,8 @@
  *   get_addr_and_mask()      - Get an IP address and netmask.
  *   parse_aaa()              - Parse authentication, authorization, and
  *                              access control lines.
+ *   parse_groups()           - Parse system group names in a string.
+ *   parse_protocols()        - Parse browse protocols in a string.
  *   read_configuration()     - Read a configuration file.
  *   read_location()          - Read a <Location path> definition.
  *   read_policy()            - Read a <Policy name> definition.
@@ -190,6 +192,8 @@ static int          get_addr_and_mask(const char *value, unsigned *ip,
                                          unsigned *mask);
 static int             parse_aaa(cupsd_location_t *loc, char *line,
                                  char *value, int linenum);
+static int             parse_groups(const char *s);
+static int             parse_protocols(const char *s);
 static int             read_configuration(cups_file_t *fp);
 static int             read_location(cups_file_t *fp, char *name, int linenum);
 static int             read_policy(cups_file_t *fp, char *name, int linenum);
@@ -253,11 +257,7 @@ cupsdReadConfiguration(void)
     NumRelays = 0;
   }
 
-  if (NumListeners > 0)
-  {
-    free(Listeners);
-    NumListeners = 0;
-  }
+  cupsdDeleteAllListeners();
 
  /*
   * String options...
@@ -277,7 +277,7 @@ cupsdReadConfiguration(void)
   cupsdSetString(&PrintcapGUI, "/usr/bin/glpoptions");
   cupsdSetString(&FontPath, CUPS_FONTPATH);
   cupsdSetString(&RemoteRoot, "remroot");
-  cupsdSetString(&ServerHeader, "CUPS/1.1");
+  cupsdSetString(&ServerHeader, "CUPS/1.2");
   cupsdSetString(&StateDir, CUPS_STATEDIR);
 
   strlcpy(temp, ConfigurationFile, sizeof(temp));
@@ -314,42 +314,6 @@ cupsdReadConfiguration(void)
   else
     cupsdSetString(&TempDir, getenv("TMPDIR"));
 
- /*
-  * Find the default system group: "sys", "system", or "root"...
-  */
-
-  group = getgrnam(CUPS_DEFAULT_GROUP);
-  endgrent();
-
-  NumSystemGroups = 0;
-
-  if (group != NULL)
-  {
-   /*
-    * Found the group, use it!
-    */
-
-    cupsdSetString(&SystemGroups[0], CUPS_DEFAULT_GROUP);
-
-    SystemGroupIDs[0] = group->gr_gid;
-  }
-  else
-  {
-   /*
-    * Find the group associated with GID 0...
-    */
-
-    group = getgrgid(0);
-    endgrent();
-
-    if (group != NULL)
-      cupsdSetString(&SystemGroups[0], group->gr_name);
-    else
-      cupsdSetString(&SystemGroups[0], "unknown");
-
-    SystemGroupIDs[0] = 0;
-  }
-
  /*
   * Find the default user...
   */
@@ -391,37 +355,38 @@ cupsdReadConfiguration(void)
   * Numeric options...
   */
 
-  ConfigFilePerm      = CUPS_DEFAULT_CONFIG_FILE_PERM;
-  DefaultAuthType     = AUTH_BASIC;
-  JobRetryLimit       = 5;
-  JobRetryInterval    = 300;
-  FileDevice          = FALSE;
-  FilterLevel         = 0;
-  FilterLimit         = 0;
-  FilterNice          = 0;
-  HostNameLookups     = FALSE;
-  ImplicitClasses     = CUPS_DEFAULT_IMPLICIT_CLASSES;
-  ImplicitAnyClasses  = FALSE;
-  HideImplicitMembers = TRUE;
-  KeepAlive           = TRUE;
-  KeepAliveTimeout    = DEFAULT_KEEPALIVE;
-  ListenBackLog       = SOMAXCONN;
-  LogFilePerm         = CUPS_DEFAULT_LOG_FILE_PERM;
-  LogLevel            = CUPSD_LOG_ERROR;
-  MaxClients          = 100;
-  MaxClientsPerHost   = 0;
-  MaxLogSize          = 1024 * 1024;
-  MaxPrinterHistory   = 10;
-  MaxRequestSize      = 0;
-  ReloadTimeout              = 60;
-  RootCertDuration    = 300;
-  RunAsUser           = FALSE;
-  Timeout             = DEFAULT_TIMEOUT;
+  ConfigFilePerm        = CUPS_DEFAULT_CONFIG_FILE_PERM;
+  DefaultAuthType       = AUTH_BASIC;
+  JobRetryLimit         = 5;
+  JobRetryInterval      = 300;
+  FileDevice            = FALSE;
+  FilterLevel           = 0;
+  FilterLimit           = 0;
+  FilterNice            = 0;
+  HostNameLookups       = FALSE;
+  ImplicitClasses       = CUPS_DEFAULT_IMPLICIT_CLASSES;
+  ImplicitAnyClasses    = FALSE;
+  HideImplicitMembers   = TRUE;
+  KeepAlive             = TRUE;
+  KeepAliveTimeout      = DEFAULT_KEEPALIVE;
+  ListenBackLog         = SOMAXCONN;
+  LogFilePerm           = CUPS_DEFAULT_LOG_FILE_PERM;
+  LogLevel              = CUPSD_LOG_ERROR;
+  MaxClients            = 100;
+  MaxClientsPerHost     = 0;
+  MaxLogSize            = 1024 * 1024;
+  MaxPrinterHistory     = 10;
+  MaxRequestSize        = 0;
+  ReloadTimeout                = 60;
+  RootCertDuration      = 300;
+  RunAsUser             = FALSE;
+  Timeout               = DEFAULT_TIMEOUT;
+  NumSystemGroups       = 0;
 
   BrowseInterval        = DEFAULT_INTERVAL;
   BrowsePort            = ippPort();
-  BrowseLocalProtocols  = BROWSE_CUPS; /* TODO: Use configure option */
-  BrowseRemoteProtocols = BROWSE_CUPS; /* TODO: Use configure option */
+  BrowseLocalProtocols  = parse_protocols(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS);
+  BrowseRemoteProtocols = parse_protocols(CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS);
   BrowseShortNames      = CUPS_DEFAULT_BROWSE_SHORT_NAMES;
   BrowseTimeout         = DEFAULT_TIMEOUT;
   Browsing              = CUPS_DEFAULT_BROWSING;
@@ -478,7 +443,25 @@ cupsdReadConfiguration(void)
   */
 
   if (NumSystemGroups == 0)
-    NumSystemGroups ++;
+  {
+    if (!parse_groups(CUPS_DEFAULT_SYSTEM_GROUPS))
+    {
+     /*
+      * Find the group associated with GID 0...
+      */
+
+      group = getgrgid(0);
+      endgrent();
+
+      if (group != NULL)
+       cupsdSetString(&SystemGroups[0], group->gr_name);
+      else
+       cupsdSetString(&SystemGroups[0], "unknown");
+
+      SystemGroupIDs[0] = 0;
+      NumSystemGroups   = 1;
+    }
+  }
 
  /*
   * Get the access control list for browsing...
@@ -548,7 +531,7 @@ cupsdReadConfiguration(void)
   * as an error and exit!
   */
 
-  if (NumListeners == 0)
+  if (cupsArrayCount(Listeners) == 0)
   {
    /*
     * No listeners!
@@ -617,7 +600,7 @@ cupsdReadConfiguration(void)
   */
 
   check_permissions(CacheDir, NULL, 0775, RunUser, Group, 1, 1);
-  check_permissions(CacheDir, "ppd", 0755, RunUser, Group, 1, 1);
+/*  check_permissions(CacheDir, "ppd", 0755, RunUser, Group, 1, 1);*/
 
   check_permissions(StateDir, NULL, 0755, RunUser, Group, 1, 1);
   check_permissions(StateDir, "certs", RunUser ? 0711 : 0511, User,
@@ -706,16 +689,8 @@ cupsdReadConfiguration(void)
     MaxClients = MaxFDs / 3;
   }
 
-  if ((Clients = calloc(sizeof(cupsd_client_t), MaxClients)) == NULL)
-  {
-    cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "cupsdReadConfiguration: Unable to allocate memory for %d clients: %s",
-                    MaxClients, strerror(errno));
-    exit(1);
-  }
-  else
-    cupsdLogMessage(CUPSD_LOG_INFO, "Configured for up to %d clients.",
-                    MaxClients);
+  cupsdLogMessage(CUPSD_LOG_INFO, "Configured for up to %d clients.",
+                  MaxClients);
 
  /*
   * Check the MaxActiveJobs setting; limit to 1/3 the available
@@ -869,9 +844,11 @@ cupsdReadConfiguration(void)
     }
   }
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,"NumPolicies=%d", NumPolicies);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReadConfiguration: NumPolicies=%d",
+                  NumPolicies);
   for (i = 0; i < NumPolicies; i ++)
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "Policies[%d]=\"%s\"", i,
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdReadConfiguration: Policies[%d]=\"%s\"", i,
                     Policies[i]->name);
 
  /*
@@ -907,7 +884,7 @@ cupsdReadConfiguration(void)
     if (NumMimeTypes)
     {
       for (i = 0; i < NumMimeTypes; i ++)
-       free((void *)MimeTypes[i]);
+       _cups_sp_free(MimeTypes[i]);
 
       free(MimeTypes);
     }
@@ -949,11 +926,32 @@ cupsdReadConfiguration(void)
     {
       snprintf(mimetype, sizeof(mimetype), "%s/%s", type->super, type->type);
 
-      MimeTypes[i] = strdup(mimetype);
+      MimeTypes[i] = _cups_sp_alloc(mimetype);
     }
 
     if (i < NumMimeTypes)
-      MimeTypes[i] = strdup("application/octet-stream");
+      MimeTypes[i] = _cups_sp_alloc("application/octet-stream");
+
+    if (LogLevel == CUPSD_LOG_DEBUG2)
+    {
+      mime_filter_t    *filter;        /* Current filter */
+
+
+      for (type = mimeFirstType(MimeDatabase);
+           type;
+          type = mimeNextType(MimeDatabase))
+       cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReadConfiguration: type %s/%s",
+                       type->super, type->type);
+
+      for (filter = mimeFirstFilter(MimeDatabase);
+           filter;
+          filter = mimeNextFilter(MimeDatabase))
+       cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                       "cupsdReadConfiguration: filter %s/%s to %s/%s %d %s",
+                       filter->src->super, filter->src->type,
+                       filter->dst->super, filter->dst->type,
+                       filter->cost, filter->filter);
+    }
 
    /*
     * Load banners...
@@ -1104,7 +1102,7 @@ check_permissions(const char *filename,   /* I - File/directory name */
     }
   }
 
-  if (dir_created || (fileinfo.st_mode & 0777) != mode)
+  if (dir_created || (fileinfo.st_mode & 07777) != mode)
   {
     cupsdLogMessage(CUPSD_LOG_WARN, "Repairing access permissions of \"%s\"", filename);
 
@@ -1795,6 +1793,141 @@ parse_aaa(cupsd_location_t *loc,        /* I - Location */
 }
 
 
+/*
+ * 'parse_groups()' - Parse system group names in a string.
+ */
+
+static int                             /* O - 1 on success, 0 on failure */
+parse_groups(const char *s)            /* I - Space-delimited groups */
+{
+  int          status;                 /* Return status */
+  char         value[1024],            /* Value string */
+               *valstart,              /* Pointer into value */
+               *valend,                /* End of value */
+               quote;                  /* Quote character */
+  struct group *group;                 /* Group */
+
+
+ /*
+  * Make a copy of the string and parse out the groups...
+  */
+
+  strlcpy(value, s, sizeof(value));
+
+  status   = 1;
+  valstart = value;
+
+  while (*valstart && NumSystemGroups < MAX_SYSTEM_GROUPS)
+  {
+    if (*valstart == '\'' || *valstart == '\"')
+    {
+     /*
+      * Scan quoted name...
+      */
+
+      quote = *valstart++;
+
+      for (valend = valstart; *valend; valend ++)
+       if (*valend == quote)
+         break;
+    }
+    else
+    {
+     /*
+      * Scan space or comma-delimited name...
+      */
+
+      for (valend = valstart; *valend; valend ++)
+       if (isspace(*valend) || *valend == ',')
+         break;
+    }
+
+    if (*valend)
+      *valend++ = '\0';
+
+    group = getgrnam(valstart);
+    if (group)
+    {
+      cupsdSetString(SystemGroups + NumSystemGroups, valstart);
+      SystemGroupIDs[NumSystemGroups] = group->gr_gid;
+
+      NumSystemGroups ++;
+    }
+    else
+      status = 0;
+
+    endgrent();
+
+    valstart = valend;
+
+    while (*valstart == ',' || isspace(*valstart))
+      valstart ++;
+  }
+
+  return (status);
+}
+
+
+/*
+ * 'parse_protocols()' - Parse browse protocols in a string.
+ */
+
+static int                             /* O - Browse protocol bits */
+parse_protocols(const char *s)         /* I - Space-delimited protocols */
+{
+  int  protocols;                      /* Browse protocol bits */
+  char value[1024],                    /* Value string */
+       *valstart,                      /* Pointer into value */
+       *valend;                        /* End of value */
+
+
+ /*
+  * Loop through the value string,...
+  */
+
+  strlcpy(value, s, sizeof(value));
+
+  protocols = 0;
+
+  for (valstart = value; *valstart;)
+  {
+   /*
+    * Get the current space/comma-delimited protocol name...
+    */
+
+    for (valend = valstart; *valend; valend ++)
+      if (isspace(*valend & 255) || *valend == ',')
+       break;
+
+    if (*valend)
+      *valend++ = '\0';
+
+   /*
+    * Add the protocol to the bitmask...
+    */
+
+    if (!strcasecmp(valstart, "cups"))
+      protocols |= BROWSE_CUPS;
+    else if (!strcasecmp(valstart, "slp"))
+      protocols |= BROWSE_SLP;
+    else if (!strcasecmp(valstart, "ldap"))
+      protocols |= BROWSE_LDAP;
+    else if (!strcasecmp(valstart, "dnssd") || !strcasecmp(valstart, "bonjour"))
+      protocols |= BROWSE_DNSSD;
+    else if (!strcasecmp(valstart, "all"))
+      protocols |= BROWSE_ALL;
+    else
+      return (-1);
+
+    for (valstart = valend; *valstart; valstart ++)
+      if (!isspace(*valstart & 255) || *valstart != ',')
+       break;
+  }
+
+  return (protocols);
+}
+
+
 /*
  * 'read_configuration()' - Read a configuration file.
  */
@@ -1812,8 +1945,7 @@ read_configuration(cups_file_t *fp)       /* I - File to read from */
                                        /* Temporary buffer 2 for value */
                        *ptr,           /* Pointer into line/temp */
                        *value,         /* Pointer to value */
-                       *valueptr,      /* Pointer into value */
-                       quote;          /* Quote character */
+                       *valueptr;      /* Pointer into value */
   int                  valuelen;       /* Length of value */
   cupsd_var_t          *var;           /* Current variable */
   http_addrlist_t      *addrlist,      /* Address list */
@@ -1964,12 +2096,10 @@ read_configuration(cups_file_t *fp)     /* I - File to read from */
         * Allocate another listener...
        */
 
-       if (NumListeners == 0)
-          lis = malloc(sizeof(cupsd_listener_t));
-       else
-          lis = realloc(Listeners, (NumListeners + 1) * sizeof(cupsd_listener_t));
+        if (!Listeners)
+         Listeners = cupsArrayNew(NULL, NULL);
 
-       if (!lis)
+       if (!Listeners)
        {
           cupsdLogMessage(CUPSD_LOG_ERROR,
                          "Unable to allocate %s at line %d - %s.",
@@ -1977,14 +2107,20 @@ read_configuration(cups_file_t *fp)     /* I - File to read from */
           break;
        }
 
-       Listeners = lis;
-       lis      += NumListeners;
+        if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
+       {
+          cupsdLogMessage(CUPSD_LOG_ERROR,
+                         "Unable to allocate %s at line %d - %s.",
+                         line, linenum, strerror(errno));
+          break;
+       }
+
+        cupsArrayAdd(Listeners, lis);
 
        /*
         * Copy the current address and log it...
        */
 
-       memset(lis, 0, sizeof(cupsd_listener_t));
        memcpy(&(lis->address), &(addr->addr), sizeof(lis->address));
        lis->fd = -1;
 
@@ -1993,7 +2129,6 @@ read_configuration(cups_file_t *fp)       /* I - File to read from */
           lis->encryption = HTTP_ENCRYPT_ALWAYS;
 #endif /* HAVE_SSL */
 
-
        httpAddrString(&lis->address, temp, sizeof(temp));
 
 #ifdef AF_INET6
@@ -2009,8 +2144,6 @@ read_configuration(cups_file_t *fp)       /* I - File to read from */
 #endif /* AF_LOCAL */
        cupsdLogMessage(CUPSD_LOG_INFO, "Listening to %s:%d (IPv4)", temp,
                         ntohs(lis->address.ipv4.sin_port));
-
-       NumListeners ++;
       }
 
      /*
@@ -2126,66 +2259,25 @@ read_configuration(cups_file_t *fp)     /* I - File to read from */
              !strcasecmp(line, "BrowseRemoteProtocols"))
     {
      /*
-      * "BrowseProtocol name [... name]"
+      * "BrowseProtocols name [... name]"
+      * "BrowseLocalProtocols name [... name]"
+      * "BrowseRemoteProtocols name [... name]"
       */
 
-      if (strcasecmp(line, "BrowseLocalProtocols"))
-        BrowseRemoteProtocols = 0;
-      if (strcasecmp(line, "BrowseRemoteProtocols"))
-        BrowseLocalProtocols = 0;
+      int protocols = parse_protocols(value);
 
-      for (; *value;)
+      if (protocols < 0)
       {
-        for (valuelen = 0; value[valuelen]; valuelen ++)
-         if (isspace(value[valuelen]) || value[valuelen] == ',')
-           break;
-
-        if (value[valuelen])
-        {
-         value[valuelen] = '\0';
-         valuelen ++;
-       }
-
-        if (!strcasecmp(value, "cups"))
-       {
-         if (strcasecmp(line, "BrowseLocalProtocols"))
-           BrowseRemoteProtocols |= BROWSE_CUPS;
-         if (strcasecmp(line, "BrowseRemoteProtocols"))
-           BrowseLocalProtocols |= BROWSE_CUPS;
-       }
-        else if (!strcasecmp(value, "slp"))
-       {
-         if (strcasecmp(line, "BrowseLocalProtocols"))
-           BrowseRemoteProtocols |= BROWSE_SLP;
-         if (strcasecmp(line, "BrowseRemoteProtocols"))
-           BrowseLocalProtocols |= BROWSE_SLP;
-       }
-        else if (!strcasecmp(value, "ldap"))
-       {
-         if (strcasecmp(line, "BrowseLocalProtocols"))
-           BrowseRemoteProtocols |= BROWSE_LDAP;
-         if (strcasecmp(line, "BrowseRemoteProtocols"))
-           BrowseLocalProtocols |= BROWSE_LDAP;
-       }
-        else if (!strcasecmp(value, "all"))
-       {
-         if (strcasecmp(line, "BrowseLocalProtocols"))
-           BrowseRemoteProtocols |= BROWSE_ALL;
-         if (strcasecmp(line, "BrowseRemoteProtocols"))
-           BrowseLocalProtocols |= BROWSE_ALL;
-       }
-       else
-       {
-         cupsdLogMessage(CUPSD_LOG_ERROR,
-                         "Unknown browse protocol \"%s\" on line %d.",
-                         value, linenum);
-          break;
-       }
-
-        for (value += valuelen; *value; value ++)
-         if (!isspace(*value) || *value != ',')
-           break;
+       cupsdLogMessage(CUPSD_LOG_ERROR,
+                       "Unknown browse protocol \"%s\" on line %d.",
+                       value, linenum);
+        break;
       }
+
+      if (strcasecmp(line, "BrowseLocalProtocols"))
+        BrowseRemoteProtocols = protocols;
+      if (strcasecmp(line, "BrowseRemoteProtocols"))
+        BrowseLocalProtocols = protocols;
     }
     else if (!strcasecmp(line, "BrowseAllow") ||
              !strcasecmp(line, "BrowseDeny"))
@@ -2603,60 +2695,13 @@ read_configuration(cups_file_t *fp)     /* I - File to read from */
     else if (!strcasecmp(line, "SystemGroup"))
     {
      /*
-      * System (admin) group(s)...
+      * SystemGroup (admin) group(s)...
       */
 
-      for (i = NumSystemGroups; *value && i < MAX_SYSTEM_GROUPS;)
-      {
-        if (*value == '\'' || *value == '\"')
-       {
-        /*
-         * Scan quoted name...
-         */
-
-         quote = *value++;
-
-         for (valueptr = value; *valueptr; valueptr ++)
-           if (*valueptr == quote)
-             break;
-       }
-       else
-       {
-        /*
-         * Scan space or comma-delimited name...
-         */
-
-          for (valueptr = value; *valueptr; valueptr ++)
-           if (isspace(*valueptr) || *valueptr == ',')
-             break;
-        }
-
-        if (*valueptr)
-          *valueptr++ = '\0';
-
-        group = getgrnam(value);
-        if (group)
-       {
-          cupsdSetString(SystemGroups + i, value);
-         SystemGroupIDs[i] = group->gr_gid;
-
-         i ++;
-       }
-       else
-         cupsdLogMessage(CUPSD_LOG_ERROR,
-                         "Unknown SystemGroup \"%s\" on line %d, ignoring!",
-                         value, linenum);
-
-        endgrent();
-
-        value = valueptr;
-
-        while (*value == ',' || isspace(*value))
-         value ++;
-      }
-
-      if (i)
-        NumSystemGroups = i;
+      if (!parse_groups(value))
+       cupsdLogMessage(CUPSD_LOG_ERROR,
+                       "Unknown SystemGroup \"%s\" on line %d, ignoring!",
+                       value, linenum);
     }
     else if (!strcasecmp(line, "HostNameLookups"))
     {
@@ -2734,7 +2779,7 @@ read_configuration(cups_file_t *fp)       /* I - File to read from */
       else if (!strcasecmp(value, "Major"))
        cupsdSetString(&ServerHeader, "CUPS/1");
       else if (!strcasecmp(value, "Minor"))
-       cupsdSetString(&ServerHeader, "CUPS/1.1");
+       cupsdSetString(&ServerHeader, "CUPS/1.2");
       else if (!strcasecmp(value, "Minimal"))
        cupsdSetString(&ServerHeader, CUPS_MINIMAL);
       else if (!strcasecmp(value, "OS"))
@@ -3124,5 +3169,5 @@ read_policy(cups_file_t *fp,              /* I - Configuration file */
 
 
 /*
- * End of "$Id: conf.c 5028 2006-01-31 01:16:43Z mike $".
+ * End of "$Id: conf.c 5116 2006-02-16 12:52:32Z mike $".
  */
index 00e98bc63f04523dfce48df29c7cc6f95622d3b2..8e50f11351b070a23311ed45ce58c84f4f09505f 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * "$Id: conf.h 5020 2006-01-28 13:36:15Z mike $"
+ * "$Id: conf.h 5078 2006-02-05 03:36:35Z mike $"
  *
  *   Configuration file definitions for the Common UNIX Printing System (CUPS)
  *   scheduler.
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -78,7 +78,7 @@ VAR int                       NumSystemGroups         VALUE(0);
                                        /* Number of system group names */
 VAR char               *SystemGroups[MAX_SYSTEM_GROUPS];
                                        /* System group names */
-VAR int                        SystemGroupIDs[MAX_SYSTEM_GROUPS];
+VAR gid_t              SystemGroupIDs[MAX_SYSTEM_GROUPS];
                                        /* System group IDs */
 VAR char               *AccessLog              VALUE(NULL),
                                        /* Access log filename */
@@ -215,5 +215,5 @@ extern int  cupsdLogPage(cupsd_job_t *job, const char *page);
 
 
 /*
- * End of "$Id: conf.h 5020 2006-01-28 13:36:15Z mike $".
+ * End of "$Id: conf.h 5078 2006-02-05 03:36:35Z mike $".
  */
index fd0101acd48564f5d719d7ebd18dd4234b1de6c3..d3cd41b93a524d96999a332e6d386fce9b7e4f0f 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: cups-deviced.c 5044 2006-02-01 21:35:30Z mike $"
+ * "$Id: cups-deviced.c 5099 2006-02-13 02:46:10Z mike $"
  *
  *   Device scanning mini-daemon for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -130,15 +130,6 @@ main(int  argc,                            /* I - Number of command-line args */
   {
     fputs("Usage: cups-deviced request-id limit user-id options\n", stderr);
 
-    cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
-    cupsdSendIPPGroup(IPP_TAG_OPERATION);
-    cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
-    cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
-                       "en-US");
-    cupsdSendIPPString(IPP_TAG_TEXT, "status-message",
-                       "Bad command-line arguments passed to cups-deviced!");
-    cupsdSendIPPTrailer();
-
     return (1);
   }
 
@@ -146,15 +137,6 @@ main(int  argc,                            /* I - Number of command-line args */
   {
     fprintf(stderr, "cups-deviced: Bad request ID %d!\n", request_id);
 
-    cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
-    cupsdSendIPPGroup(IPP_TAG_OPERATION);
-    cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
-    cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
-                       "en-US");
-    cupsdSendIPPString(IPP_TAG_TEXT, "status-message",
-                       "Bad request ID argument passed to cups-deviced!");
-    cupsdSendIPPTrailer();
-
     return (1);
   }
 
@@ -163,15 +145,6 @@ main(int  argc,                            /* I - Number of command-line args */
   {
     fprintf(stderr, "cups-deviced: Bad user %d!\n", normal_user);
 
-    cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
-    cupsdSendIPPGroup(IPP_TAG_OPERATION);
-    cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
-    cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
-                       "en-US");
-    cupsdSendIPPString(IPP_TAG_TEXT, "status-message",
-                       "Bad user ID argument passed to cups-deviced!");
-    cupsdSendIPPTrailer();
-
     return (1);
   }
 
@@ -209,16 +182,6 @@ main(int  argc,                            /* I - Number of command-line args */
     fprintf(stderr, "ERROR: [cups-deviced] Unable to open backend directory "
                     "\"%s\": %s", backends, strerror(errno));
 
-    snprintf(line, sizeof(line), "Unable to open backend directory \"%s\": %s",
-             backends, strerror(errno));
-    cupsdSendIPPHeader(IPP_BAD_REQUEST, request_id);
-    cupsdSendIPPGroup(IPP_TAG_OPERATION);
-    cupsdSendIPPString(IPP_TAG_CHARSET, "attributes-charset", "utf-8");
-    cupsdSendIPPString(IPP_TAG_LANGUAGE, "attributes-natural-language",
-                       "en-US");
-    cupsdSendIPPString(IPP_TAG_TEXT, "status-message", line);
-    cupsdSendIPPTrailer();
-
     return (1);
   }
 
@@ -533,5 +496,5 @@ sigalrm_handler(int sig)            /* I - Signal number */
 
 
 /*
- * End of "$Id: cups-deviced.c 5044 2006-02-01 21:35:30Z mike $".
+ * End of "$Id: cups-deviced.c 5099 2006-02-13 02:46:10Z mike $".
  */
index 21dd86dab7ac1b1ee8ef2d5752c3cb0c5e2c3070..e44c6d1469262a0a88a52bc039e6b25bf4a8fd7c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups-driverd.c 4812 2005-10-25 18:23:10Z mike $"
+ * "$Id: cups-driverd.c 5130 2006-02-17 20:25:33Z mike $"
  *
  *   PPD/driver support for the Common UNIX Printing System (CUPS).
  *
@@ -7,7 +7,7 @@
  *   in CUPS_DATADIR/model and dynamically generated PPD files using
  *   the driver helper programs in CUPS_SERVERBIN/driver.
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -57,7 +57,8 @@ typedef struct                                /**** PPD record ****/
                                        /* PPD name */
                natural_language[128],  /* Natural language(s) */
                make[128],              /* Manufacturer */
-               make_and_model[256];    /* Make and model */
+               make_and_model[128],    /* Make and model */
+               device_id[128];         /* IEEE 1284 Device ID */
 } ppd_rec_t;
 
 typedef struct                         /**** In-memory record ****/
@@ -82,15 +83,17 @@ int         ChangedPPD;             /* Did we change the PPD database? */
  * Local functions...
  */
 
-ppd_info_t     *add_ppd(const char *name, const char *natural_language,
+static ppd_info_t      *add_ppd(const char *name, const char *natural_language,
                         const char *make, const char *make_and_model,
-                        time_t mtime, size_t size);
-int            cat_ppd(const char *name);
-int            compare_names(const ppd_info_t *p0, const ppd_info_t *p1);
-int            compare_ppds(const ppd_info_t *p0, const ppd_info_t *p1);
-int            list_ppds(int request_id, int limit, const char *opt);
-int            load_drivers(void);
-int            load_ppds(const char *d, const char *p);
+                        const char *device_id, time_t mtime, size_t size);
+static int             cat_ppd(const char *name);
+static int             compare_names(const ppd_info_t *p0,
+                                     const ppd_info_t *p1);
+static int             compare_ppds(const ppd_info_t *p0,
+                                    const ppd_info_t *p1);
+static int             list_ppds(int request_id, int limit, const char *opt);
+static int             load_drivers(void);
+static int             load_ppds(const char *d, const char *p);
 
 
 /*
@@ -126,11 +129,12 @@ main(int  argc,                           /* I - Number of command-line args */
  * 'add_ppd()' - Add a PPD file.
  */
 
-ppd_info_t *                           /* O - PPD */
+static ppd_info_t *                    /* O - PPD */
 add_ppd(const char *name,              /* I - PPD name */
         const char *natural_language,  /* I - Language(s) */
         const char *make,              /* I - Manufacturer */
        const char *make_and_model,     /* I - NickName */
+       const char *device_id,          /* I - 1284DeviceId */
         time_t     mtime,              /* I - Modification time */
        size_t     size)                /* I - File size */
 {
@@ -183,6 +187,7 @@ add_ppd(const char *name,           /* I - PPD name */
   strlcpy(ppd->record.make, make, sizeof(ppd->record.make));
   strlcpy(ppd->record.make_and_model, make_and_model,
           sizeof(ppd->record.make_and_model));
+  strlcpy(ppd->record.device_id, device_id, sizeof(ppd->record.device_id));
 
  /*
   * Return the new PPD pointer...
@@ -196,7 +201,7 @@ add_ppd(const char *name,           /* I - PPD name */
  * 'cat_ppd()' - Copy a PPD file to stdout.
  */
 
-int                                    /* O - Exit code */
+static int                             /* O - Exit code */
 cat_ppd(const char *name)              /* I - PPD name */
 {
   char         scheme[256],            /* Scheme from PPD name */
@@ -322,7 +327,7 @@ cat_ppd(const char *name)           /* I - PPD name */
  * 'compare_names()' - Compare PPD filenames for sorting.
  */
 
-int                                    /* O - Result of comparison */
+static int                             /* O - Result of comparison */
 compare_names(const ppd_info_t *p0,    /* I - First PPD file */
               const ppd_info_t *p1)    /* I - Second PPD file */
 {
@@ -334,12 +339,13 @@ compare_names(const ppd_info_t *p0,       /* I - First PPD file */
  * 'compare_ppds()' - Compare PPD file make and model names for sorting.
  */
 
-int                                    /* O - Result of comparison */
+static int                             /* O - Result of comparison */
 compare_ppds(const ppd_info_t *p0,     /* I - First PPD file */
              const ppd_info_t *p1)     /* I - Second PPD file */
 {
   int  diff;                           /* Difference between strings */
 
+
  /*
   * First compare manufacturers...
   */
@@ -359,7 +365,7 @@ compare_ppds(const ppd_info_t *p0,  /* I - First PPD file */
  * 'list_ppds()' - List PPD files.
  */
 
-int                                    /* O - Exit code */
+static int                             /* O - Exit code */
 list_ppds(int        request_id,       /* I - Request ID */
           int        limit,            /* I - Limit */
          const char *opt)              /* I - Option argument */
@@ -380,7 +386,8 @@ list_ppds(int        request_id,    /* I - Request ID */
   int          send_natural_language,  /* Send ppd-natural-language attribute? */
                send_make,              /* Send ppd-make attribute? */
                send_make_and_model,    /* Send ppd-make-and-model attribute? */
-               send_name;              /* Send ppd-name attribute? */
+               send_name,              /* Send ppd-name attribute? */
+               send_device_id;         /* Send ppd-device-id attribute? */
 
 
   fprintf(stderr, "DEBUG2: [cups-driverd] list_ppds(request_id=%d, limit=%d, opt=\"%s\"\n",
@@ -411,8 +418,9 @@ list_ppds(int        request_id,    /* I - Request ID */
 
     if ((PPDs = malloc(sizeof(ppd_info_t) * NumPPDs)) == NULL)
     {
-      fprintf(stderr, "ERROR: [cups-driverd] Unable to allocate memory for %d PPD files!\n",
-              NumPPDs);
+      fprintf(stderr,
+              "ERROR: [cups-driverd] Unable to allocate memory for %d "
+             "PPD files!\n", NumPPDs);
       NumPPDs   = 0;
       AllocPPDs = 0;
     }
@@ -508,7 +516,7 @@ list_ppds(int        request_id,    /* I - Request ID */
   * Add the raw driver...
   */
 
-  add_ppd("raw", "en", "Raw", "Raw Queue", 0, 0);
+  add_ppd("raw", "en", "Raw", "Raw Queue", "", 0, 0);
 
  /*
   * Sort the PPDs by make and model...
@@ -535,6 +543,7 @@ list_ppds(int        request_id,    /* I - Request ID */
     send_make             = 1;
     send_make_and_model   = 1;
     send_natural_language = 1;
+    send_device_id        = 1;
   }
   else
   {
@@ -544,6 +553,7 @@ list_ppds(int        request_id,    /* I - Request ID */
                             !strcmp(requested, "ppd-make");
     send_make_and_model   = strstr(requested, "ppd-make-and-model") != NULL;
     send_natural_language = strstr(requested, "ppd-natural-language") != NULL;
+    send_device_id        = strstr(requested, "ppd-device-id") != NULL;
   }
 
   puts("Content-Type: application/ipp\n");
@@ -586,6 +596,10 @@ list_ppds(int        request_id,   /* I - Request ID */
         cupsdSendIPPString(IPP_TAG_TEXT, "ppd-make-and-model",
                           ppd->record.make_and_model);
 
+      if (send_device_id)
+        cupsdSendIPPString(IPP_TAG_TEXT, "ppd-device-id",
+                          ppd->record.device_id);
+
      /*
       * If we have only requested the ppd-make attribute, then skip
       * the remaining PPDs with this make...
@@ -615,7 +629,7 @@ list_ppds(int        request_id,    /* I - Request ID */
  * 'load_ppds()' - Load PPD files recursively.
  */
 
-int                                    /* O - 1 on success, 0 on failure */
+static int                             /* O - 1 on success, 0 on failure */
 load_ppds(const char *d,               /* I - Actual directory */
           const char *p)               /* I - Virtual path in name */
 {
@@ -632,7 +646,8 @@ load_ppds(const char *d,            /* I - Actual directory */
                manufacturer[256],      /* Manufacturer */
                make_model[256],        /* Make and Model */
                model_name[256],        /* ModelName */
-               nick_name[256];         /* NickName */
+               nick_name[256],         /* NickName */
+               device_id[256];         /* 1284DeviceId */
   ppd_info_t   *ppd,                   /* New PPD file */
                key;                    /* Search key */
   int          new_ppd;                /* Is this a new PPD? */
@@ -672,6 +687,13 @@ load_ppds(const char *d,           /* I - Actual directory */
 
   while ((dent = cupsDirRead(dir)) != NULL)
   {
+   /*
+    * Skip files/directories starting with "."...
+    */
+
+    if (dent->filename[0] == '.')
+      continue;
+
    /*
     * See if this is a file...
     */
@@ -752,6 +774,7 @@ load_ppds(const char *d,            /* I - Actual directory */
     model_name[0]   = '\0';
     nick_name[0]    = '\0';
     manufacturer[0] = '\0';
+    device_id[0]    = '\0';
     strcpy(language, "en");
 
     while (cupsFileGets(fp, line, sizeof(line)) != NULL)
@@ -764,6 +787,8 @@ load_ppds(const char *d,            /* I - Actual directory */
        sscanf(line, "%*[^:]:%63s", language);
       else if (!strncmp(line, "*NickName:", 10))
        sscanf(line, "%*[^\"]\"%255[^\"]", nick_name);
+      else if (!strncmp(line, "*1284DeviceId:", 14))
+       sscanf(line, "%*[^\"]\"%255[^\"]", device_id);
       else if (!strncmp(line, "*OpenUI", 7))
       {
        /*
@@ -774,14 +799,6 @@ load_ppds(const char *d,           /* I - Actual directory */
         if (model_name[0] || nick_name[0])
          break;
       }
-
-     /*
-      * Stop early if we have both the Manufacturer and NickName
-      * attributes...
-      */
-
-      if (manufacturer[0] && nick_name[0])
-        break;
     }
 
    /*
@@ -928,7 +945,7 @@ load_ppds(const char *d,            /* I - Actual directory */
 
       fprintf(stderr, "DEBUG: [cups-driverd] Adding ppd \"%s\"...\n", name);
 
-      if (!add_ppd(name, language, manufacturer, make_model,
+      if (!add_ppd(name, language, manufacturer, make_model, device_id,
                    dent->fileinfo.st_mtime, dent->fileinfo.st_size))
       {
         cupsDirClose(dir);
@@ -955,6 +972,7 @@ load_ppds(const char *d,            /* I - Actual directory */
               sizeof(ppd->record.make_and_model));
       strlcpy(ppd->record.natural_language, language,
               sizeof(ppd->record.natural_language));
+      strlcpy(ppd->record.device_id, device_id, sizeof(ppd->record.device_id));
     }
 
     ChangedPPD = 1;
@@ -970,7 +988,7 @@ load_ppds(const char *d,            /* I - Actual directory */
  * 'load_drivers()' - Load driver-generated PPD files.
  */
 
-int                                    /* O - 1 on success, 0 on failure */
+static int                             /* O - 1 on success, 0 on failure */
 load_drivers(void)
 {
   const char   *server_bin;            /* CUPS_SERVERBIN environment variable */
@@ -983,7 +1001,8 @@ load_drivers(void)
                name[512],              /* ppd-name */
                natural_language[128],  /* ppd-natural-language */
                make[128],              /* ppd-make */
-               make_and_model[256];    /* ppd-make-and-model */
+               make_and_model[256],    /* ppd-make-and-model */
+               device_id[256];         /* ppd-device-id */
 
 
  /*
@@ -1020,7 +1039,7 @@ load_drivers(void)
     * Run the driver with no arguments and collect the output...
     */
 
-    snprintf(filename, sizeof(filename), "%s/%s", drivers, dent->filename);
+    snprintf(filename, sizeof(filename), "%s/%s list", drivers, dent->filename);
     if ((fp = popen(filename, "r")) != NULL)
     {
       while (fgets(line, sizeof(line), fp) != NULL)
@@ -1031,8 +1050,12 @@ load_drivers(void)
        *   \"ppd-name\" ppd-natural-language "ppd-make" "ppd-make-and-model"
        */
 
-        if (sscanf(line, "\"%511[^\"]\"%127s%*[ \t]\"%127[^\"]\"%*[ \t]\"%256[^\"]\"",
-                  name, natural_language, make, make_and_model) != 4)
+        device_id[0] = '\0';
+
+        if (sscanf(line, "\"%511[^\"]\"%127s%*[ \t]\"%127[^\"]\""
+                        "%*[ \t]\"%256[^\"]\"%*[ \t]\"%256[^\"]\"",
+                  name, natural_language, make, make_and_model,
+                  device_id) < 4)
         {
         /*
          * Bad format; strip trailing newline and write an error message.
@@ -1051,7 +1074,8 @@ load_drivers(void)
          * Add the device to the array of available devices...
          */
 
-          if (!add_ppd(name, natural_language, make, make_and_model, 0, 0))
+          if (!add_ppd(name, natural_language, make, make_and_model, device_id,
+                      0, 0))
          {
             cupsDirClose(dir);
            return (0);
@@ -1076,5 +1100,5 @@ load_drivers(void)
 
 
 /*
- * End of "$Id: cups-driverd.c 4812 2005-10-25 18:23:10Z mike $".
+ * End of "$Id: cups-driverd.c 5130 2006-02-17 20:25:33Z mike $".
  */
index 16cf24359711ec1b5c7ae02ce7440440f8cee54e..37e8974262943bad30bb2c9a8e7f4e97a10c7151 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: cups-lpd.c 5049 2006-02-02 14:50:57Z mike $"
+ * "$Id: cups-lpd.c 5137 2006-02-19 19:44:50Z mike $"
  *
  *   Line Printer Daemon interface for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
  *
  * Contents:
  *
- *   main()             - Process an incoming LPD request...
- *   print_file()       - Print a file to a printer or class.
- *   recv_print_job()   - Receive a print job from the client.
- *   remove_jobs()      - Cancel one or more jobs.
- *   send_state()       - Send the queue state.
- *   smart_gets()       - Get a line of text, removing the trailing CR
- *                        and/or LF.
+ *   main()           - Process an incoming LPD request...
+ *   create_job()     - Create a new print job.
+ *   get_printer()    - Get the named printer and its options.
+ *   print_file()     - Add a file to the current job.
+ *   recv_print_job() - Receive a print job from the client.
+ *   remove_jobs()    - Cancel one or more jobs.
+ *   send_state()     - Send the queue state.
+ *   smart_gets()     - Get a line of text, removing the trailing CR and/or LF.
  */
 
 /*
 #include <netinet/in.h>
 #include <netdb.h>
 
+#ifdef HAVE_INTTYPES_H
+#  include <inttypes.h>
+#endif /* HAVE_INTTYPES_H */
+
+#ifdef HAVE_COREFOUNDATION_H
+#  include <CoreFoundation/CoreFoundation.h>
+#endif /* HAVE_COREFOUNDATION_H */
+#ifdef HAVE_CFPRIV_H
+#  include <CoreFoundation/CFPriv.h>
+#endif /* HAVE_CFPRIV_H */
+
 
 /*
  * LPD "mini-daemon" for CUPS.  This program must be used in conjunction
  * Prototypes...
  */
 
-int    print_file(const char *name, const char *file,
-                  const char *title, const char *docname,
-                  const char *user, int num_options,
-                  cups_option_t *options);
-int    recv_print_job(const char *dest, int num_defaults, cups_option_t *defaults);
-int    remove_jobs(const char *dest, const char *agent, const char *list);
-int    send_state(const char *dest, const char *list, int longstatus);
-char   *smart_gets(char *s, int len, FILE *fp);
+static int     create_job(http_t *http, const char *dest, const char *title,
+                          const char *user, int num_options,
+                          cups_option_t *options);
+static int     get_printer(http_t *http, const char *name, char *dest,
+                           int destsize, cups_option_t **options,
+                           int *accepting, int *shared, ipp_pstate_t *state);
+static int     print_file(http_t *http, int id, const char *filename,
+                          const char *docname, const char *user, int last);
+static int     recv_print_job(const char *name, int num_defaults,
+                              cups_option_t *defaults);
+static int     remove_jobs(const char *name, const char *agent,
+                           const char *list);
+static int     send_state(const char *name, const char *list,
+                          int longstatus);
+static char    *smart_gets(char *s, int len, FILE *fp);
 
 
 /*
@@ -146,7 +165,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
 #endif /* AF_INET6 */
     hostfamily = "IPv4";
 
-    syslog(LOG_INFO, "Connection from %s (%s %s)", hostname, hostfamily, hostip);
+    syslog(LOG_INFO, "Connection from %s (%s %s)", hostname, hostfamily,
+           hostip);
   }
 
  /*
@@ -172,7 +192,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
            {
              i ++;
              if (i < argc)
-               num_defaults = cupsParseOptions(argv[i], num_defaults, &defaults);
+               num_defaults = cupsParseOptions(argv[i], num_defaults,
+                                               &defaults);
               else
                syslog(LOG_WARNING, "Expected option string after -o option!");
             }
@@ -183,7 +204,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
       }
     }
     else
-      syslog(LOG_WARNING, "Unknown command-line option \"%s\" ignored!", argv[i]);
+      syslog(LOG_WARNING, "Unknown command-line option \"%s\" ignored!",
+             argv[i]);
 
  /*
   * RFC1179 specifies that only 1 daemon command can be received for
@@ -209,10 +231,15 @@ main(int  argc,                           /* I - Number of command-line arguments */
   command = line[0];
   dest    = line + 1;
 
-  for (list = dest + 1; *list && !isspace(*list & 255); list ++);
+  if (command == 0x02)
+    list = NULL;
+  else
+  {
+    for (list = dest + 1; *list && !isspace(*list & 255); list ++);
 
-  while (isspace(*list & 255))
-    *list++ = '\0';
+    while (isspace(*list & 255))
+      *list++ = '\0';
+  }
 
  /*
   * Do the command...
@@ -283,220 +310,552 @@ main(int  argc,                         /* I - Number of command-line arguments */
 
 
 /*
- * 'check_printer()' - Check that a printer exists and is accepting jobs.
+ * 'create_job()' - Create a new print job.
  */
 
-int                                    /* O - Job ID */
-check_printer(const char *name)                /* I - Printer or class name */
+static int                             /* O - Job ID or -1 on error */
+create_job(http_t        *http,                /* I - HTTP connection */
+           const char    *dest,                /* I - Destination name */
+          const char    *title,        /* I - job-name */
+           const char    *user,                /* I - requesting-user-name */
+          int           num_options,   /* I - Number of options for job */
+          cups_option_t *options)      /* I - Options for job */
 {
-  http_t       *http;                  /* Connection to server */
   ipp_t                *request;               /* IPP request */
   ipp_t                *response;              /* IPP response */
-  ipp_attribute_t *attr;               /* IPP job-id attribute */
+  ipp_attribute_t *attr;               /* IPP attribute */
   char         uri[HTTP_MAX_URI];      /* Printer URI */
-  cups_lang_t  *language;              /* Language to use */
-  int          accepting;              /* printer-is-accepting-jobs value */
+  int          id;                     /* Job ID */
 
 
  /*
-  * Setup a connection and request data...
+  * Setup the Create-Job request...
   */
 
-  if ((http = httpConnectEncrypt(cupsServer(), ippPort(),
-                                 cupsEncryption())) == NULL)
-  {
-    syslog(LOG_ERR, "Unable to connect to server %s: %s", cupsServer(),
-           strerror(errno));
-    return (0);
-  }
-
- /*
-  * Build a standard CUPS URI for the printer and fill the standard IPP
-  * attributes...
-  */
-
-  if ((request = ippNew()) == NULL)
-  {
-    syslog(LOG_ERR, "Unable to create request: %s", strerror(errno));
-    httpClose(http);
-    return (0);
-  }
-
-  request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
-  request->request.op.request_id   = 1;
+  request = ippNewRequest(IPP_CREATE_JOB);
 
   httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
-                   "localhost", 0, "/printers/%s", name);
-
-  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 != NULL ? language->language : "C");
+                   "localhost", 0, "/printers/%s", dest);
 
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
                NULL, uri);
 
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requested-attributes",
-               NULL, "printer-is-accepting-jobs");
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+               "requesting-user-name", NULL, user);
+
+  if (title)
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name",
+                 NULL, title);
+
+  cupsEncodeOptions(request, num_options, options);
 
  /*
   * Do the request...
   */
 
-  response = cupsDoRequest(http, request, "/");
+  snprintf(uri, sizeof(uri), "/printers/%s", dest);
 
-  if (response == NULL)
-  {
-    syslog(LOG_ERR, "Unable to check printer status - %s",
-           ippErrorString(cupsLastError()));
-    accepting = 0;
-  }
-  else if (response->request.status.status_code > IPP_OK_CONFLICT)
+  response = cupsDoRequest(http, request, uri);
+
+  if (!response || cupsLastError() > IPP_OK_CONFLICT)
   {
-    syslog(LOG_ERR, "Unable to check printer status - %s",
-           ippErrorString(response->request.status.status_code));
-    accepting = 0;
+    syslog(LOG_ERR, "Unable to create job - %s", cupsLastErrorString());
+
+    ippDelete(response);
+
+    return (-1);
   }
-  else if ((attr = ippFindAttribute(response, "printer-is-accepting-jobs",
-                                    IPP_TAG_BOOLEAN)) == NULL)
+
+ /*
+  * Get the job-id value from the response and return it...
+  */
+
+  if ((attr = ippFindAttribute(response, "job-id", IPP_TAG_INTEGER)) == NULL)
   {
-    syslog(LOG_ERR, "No printer-is-accepting-jobs attribute found in response from server!");
-    accepting = 0;
+    id = -1;
+
+    syslog(LOG_ERR, "No job-id attribute found in response from server!");
   }
   else
-    accepting = attr->values[0].boolean;
+  {
+    id = attr->values[0].integer;
 
-  if (response != NULL)
-    ippDelete(response);
+    syslog(LOG_INFO, "Print file - job ID = %d", id);
+  }
 
-  httpClose(http);
-  cupsLangFree(language);
+  ippDelete(response);
 
-  return (accepting);
+  return (id);
 }
 
 
 /*
- * 'print_file()' - Print a file to a printer or class.
+ * 'get_printer()' - Get the named printer and its options.
  */
 
-int                                    /* O - Job ID */
-print_file(const char    *name,                /* I - Printer or class name */
-           const char    *file,                /* I - File to print */
-           const char    *title,       /* I - Title of job */
-           const char    *docname,     /* I - Name of job file */
-           const char    *user,                /* I - Owner of job */
-           int           num_options,  /* I - Number of options */
-          cups_option_t *options)      /* I - Options */
+static int                             /* O - Number of options or -1 on error */
+get_printer(http_t        *http,       /* I - HTTP connection */
+            const char    *name,       /* I - Printer name from request */
+           char          *dest,        /* I - Destination buffer */
+            int           destsize,    /* I - Size of destination buffer */
+           cups_option_t **options,    /* O - Printer options */
+           int           *accepting,   /* O - printer-is-accepting-jobs value */
+           int           *shared,      /* O - printer-is-shared value */
+           ipp_pstate_t  *state)       /* O - printer-state value */
 {
-  http_t       *http;                  /* Connection to server */
+  int          num_options;            /* Number of options */
+  cups_file_t  *fp;                    /* lpoptions file */
+  char         line[1024],             /* Line from lpoptions file */
+               *value,                 /* Pointer to value on line */
+               *optptr;                /* Pointer to options on line */
+  int          linenum;                /* Line number in file */
+  const char   *cups_serverroot;       /* CUPS_SERVERROOT env var */
   ipp_t                *request;               /* IPP request */
   ipp_t                *response;              /* IPP response */
-  ipp_attribute_t *attr;               /* IPP job-id attribute */
+  ipp_attribute_t *attr;               /* IPP attribute */
   char         uri[HTTP_MAX_URI];      /* Printer URI */
-  cups_lang_t  *language;              /* Language to use */
-  int          jobid;                  /* New job ID */
+  static const char * const requested[] =
+               {                       /* Requested attributes */
+                 "printer-info",
+                 "printer-is-accepting-jobs",
+                 "printer-is-shared",
+                 "printer-name",
+                 "printer-state"
+               };
 
 
  /*
-  * Setup a connection and request data...
+  * Initialize everything...
   */
 
-  if ((http = httpConnectEncrypt(cupsServer(), ippPort(),
-                                 cupsEncryption())) == NULL)
+  if (accepting)
+    *accepting = 0;
+  if (shared)
+    *shared = 0;
+  if (state)
+    *state = IPP_PRINTER_STOPPED;
+  if (options)
+    *options = NULL;
+
+ /*
+  * If the queue name contains a space, lookup the printer-name using
+  * the printer-info value...
+  */
+
+  if (strchr(name, ' '))
   {
-    syslog(LOG_ERR, "Unable to connect to server %s: %s", cupsServer(),
-           strerror(errno));
-    return (0);
+   /*
+    * Lookup the printer-info...
+    */
+
+    ipp_attribute_t    *accepting_attr,/* printer-is-accepting-jobs */
+                       *info_attr,     /* printer-info */
+                       *name_attr,     /* printer-name */
+                       *shared_attr,   /* printer-is-shared */
+                       *state_attr;    /* printer-state */
+
+
+   /*
+    * Setup the CUPS-Get-Printers request...
+    */
+
+    request = ippNewRequest(CUPS_GET_PRINTERS);
+
+    ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                  "requested-attributes",
+                 (int)(sizeof(requested) / sizeof(requested[0])),
+                  NULL, requested);
+
+   /*
+    * Do the request...
+    */
+
+    response = cupsDoRequest(http, request, "/");
+
+    if (!response || cupsLastError() > IPP_OK_CONFLICT)
+    {
+      syslog(LOG_ERR, "Unable to get list of printers - %s",
+             cupsLastErrorString());
+
+      ippDelete(response);
+
+      return (-1);
+    }
+
+   /*
+    * Scan the response for printers...
+    */
+
+    *dest = '\0';
+    attr  = response->attrs;
+
+    while (attr)
+    {
+     /*
+      * Skip to the next printer...
+      */
+
+      while (attr && attr->group_tag != IPP_TAG_PRINTER)
+        attr = attr->next;
+
+      if (!attr)
+        break;
+
+     /*
+      * Get all of the attributes for the current printer...
+      */
+
+      accepting_attr = NULL;
+      info_attr      = NULL;
+      name_attr      = NULL;
+      shared_attr    = NULL;
+      state_attr     = NULL;
+
+      while (attr && attr->group_tag == IPP_TAG_PRINTER)
+      {
+        if (!strcmp(attr->name, "printer-is-accepting-jobs") &&
+           attr->value_tag == IPP_TAG_BOOLEAN)
+         accepting_attr = attr;
+       else if (!strcmp(attr->name, "printer-info") &&
+                attr->value_tag == IPP_TAG_TEXT)
+         info_attr = attr;
+       else if (!strcmp(attr->name, "printer-name") &&
+                attr->value_tag == IPP_TAG_NAME)
+         name_attr = attr;
+       else if (!strcmp(attr->name, "printer-is-shared") &&
+                attr->value_tag == IPP_TAG_BOOLEAN)
+         shared_attr = attr;
+       else if (!strcmp(attr->name, "printer-state") &&
+                attr->value_tag == IPP_TAG_ENUM)
+         state_attr = attr;
+
+        attr = attr->next;
+      }
+
+      if (info_attr && name_attr &&
+          !strcasecmp(name, info_attr->values[0].string.text))
+      {
+       /*
+        * Found a match, use this one!
+       */
+
+       strlcpy(dest, name_attr->values[0].string.text, destsize);
+
+       if (accepting && accepting_attr)
+         *accepting = accepting_attr->values[0].boolean;
+
+       if (shared && shared_attr)
+         *shared = shared_attr->values[0].boolean;
+
+       if (state && state_attr)
+         *state = (ipp_pstate_t)state_attr->values[0].integer;
+
+        break;
+      }
+    }
+
+    ippDelete(response);
+
+    if (!*dest)
+    {
+      syslog(LOG_ERR, "Unable to find \"%s\" in list of printers!", name);
+
+      return (-1);
+    }
+
+    name = dest;
+  }
+  else
+  {
+   /*
+    * Otherwise treat it as a queue name optionally with an instance name.
+    */
+
+    strlcpy(dest, name, destsize);
+    if ((value = strchr(dest, '/')) != NULL)
+      *value = '\0';
+
+   /*
+    * Setup the Get-Printer-Attributes request...
+    */
+
+    request = ippNewRequest(IPP_GET_PRINTER_ATTRIBUTES);
+
+    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
+                     "localhost", 0, "/printers/%s", dest);
+
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+                NULL, uri);
+
+    ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                  "requested-attributes",
+                 (int)(sizeof(requested) / sizeof(requested[0])),
+                  NULL, requested);
+
+   /*
+    * Do the request...
+    */
+
+    response = cupsDoRequest(http, request, "/");
+
+    if (!response || cupsLastError() > IPP_OK_CONFLICT)
+    {
+      syslog(LOG_ERR, "Unable to check printer status - %s",
+             cupsLastErrorString());
+
+      ippDelete(response);
+
+      return (-1);
+    }
+
+   /*
+    * Get values from the response...
+    */
+
+    if (accepting)
+    {
+      if ((attr = ippFindAttribute(response, "printer-is-accepting-jobs",
+                                  IPP_TAG_BOOLEAN)) == NULL)
+       syslog(LOG_ERR, "No printer-is-accepting-jobs attribute found in "
+                       "response from server!");
+      else
+       *accepting = attr->values[0].boolean;
+    }
+
+    if (shared)
+    {
+      if ((attr = ippFindAttribute(response, "printer-is-shared",
+                                  IPP_TAG_BOOLEAN)) == NULL)
+      {
+       syslog(LOG_ERR, "No printer-is-shared attribute found in "
+                       "response from server!");
+       *shared = 1;
+      }
+      else
+       *shared = attr->values[0].boolean;
+    }
+
+    if (state)
+    {
+      if ((attr = ippFindAttribute(response, "printer-state",
+                                  IPP_TAG_INTEGER)) == NULL)
+       syslog(LOG_ERR, "No printer-state attribute found in "
+                       "response from server!");
+      else
+       *state = (ipp_pstate_t)attr->values[0].integer;
+    }
+
+    ippDelete(response);
   }
 
  /*
-  * Build a standard CUPS URI for the printer and fill the standard IPP
-  * attributes...
+  * Override shared value for LPD using system-specific APIs...
   */
 
-  if ((request = ippNew()) == NULL)
+#ifdef HAVE_CFPRIV_H /* MacOS X */
+  if (shared && *shared)
   {
-    syslog(LOG_ERR, "Unable to create request: %s", strerror(errno));
-    httpClose(http);
-    return (0);
+    CFURLRef           prefsurl;       /* */
+    CFDataRef          xmldata;        /* */
+    CFPropertyListRef  plist;          /* */
+    CFStringRef                queueid;        /* */
+    CFArrayRef         lprqarray;      /* */
+    CFBooleanRef       serverflag;     /* */
+    Boolean            prefsok;        /* */
+    static const char printerprefsfile[] =
+        "/Library/Preferences/com.apple.printservice.plist";
+                                       /* Preferences file */
+
+
+   /*
+    * See if we are running on MacOS X Server...
+    */
+
+    CFDictionaryRef versdict = _CFCopyServerVersionDictionary();
+
+    if (versdict)
+    {
+     /*
+      * Yes, use the LPR sharing preference...
+      */
+
+      CFRelease(versdict);
+
+      *shared = 0;
+
+      prefsurl = CFURLCreateFromFileSystemRepresentation(
+                     kCFAllocatorDefault, 
+                    (const UInt8 *)printerprefsfile, 
+                    (CFIndex)strlen(printerprefsfile), 
+                    false);
+      if (prefsurl)
+      {
+        prefsok = CFURLCreateDataAndPropertiesFromResource(
+                     kCFAllocatorDefault, prefsurl, &xmldata, 
+                     NULL, NULL, NULL);
+        if (prefsok)
+       {
+         plist = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, xmldata, 
+                                                 kCFPropertyListImmutable, NULL);
+         if (plist)
+         {
+           serverflag = (CFBooleanRef)CFDictionaryGetValue(
+                            (CFDictionaryRef)plist, CFSTR("serviceState"));
+
+            if (serverflag && CFBooleanGetValue(serverflag))
+           {
+             lprqarray = (CFArrayRef)CFDictionaryGetValue(
+                             (CFDictionaryRef)plist, CFSTR("lprSharedQueues"));
+
+             if (lprqarray)
+             {
+               queueid = CFStringCreateWithCString(CFAllocatorGetDefault(), 
+                                                   dest,
+                                                   kCFStringEncodingUTF8);
+
+                if (queueid)
+               {
+                 *shared = CFArrayContainsValue(
+                               lprqarray,
+                               CFRangeMake(0, CFArrayGetCount(lprqarray)),
+                               queueid);
+
+                  CFRelease(queueid);
+               }
+
+                CFRelease(lprqarray);
+             }
+           }
+
+            if (serverflag)
+             CFRelease(serverflag);
+
+           CFRelease(plist);
+         }
+
+         CFRelease(prefsok);
+       }
+
+       CFRelease(prefsurl);
+      }
+
+      if (!shared)
+       syslog(LOG_ERR, "Warning - Print Service sharing disabled for LPD "
+                       "on queue: %s", name);
+    }
   }
+#endif /* HAVE_CFPRIV_H */
 
-  request->request.op.operation_id = IPP_PRINT_JOB;
-  request->request.op.request_id   = 1;
+ /*
+  * Next look for the printer in the lpoptions file...
+  */
 
-  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
-                   "localhost", 0, "/printers/%s", name);
+  num_options = 0;
 
-  language = cupsLangDefault();
+  if (options && shared && accepting)
+  {
+    if ((cups_serverroot = getenv("CUPS_SERVERROOT")) == NULL)
+      cups_serverroot = CUPS_SERVERROOT;
 
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
-               "attributes-charset", NULL, cupsLangEncoding(language));
+    snprintf(line, sizeof(line), "%s/lpoptions", cups_serverroot);
+    if ((fp = cupsFileOpen(line, "r")) != NULL)
+    {
+      linenum = 0;
+      while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
+      {
+       /*
+       * Make sure we have "Dest name options" or "Default name options"...
+       */
 
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
-               "attributes-natural-language", NULL,
-               language != NULL ? language->language : "C");
+       if ((strcasecmp(line, "Dest") && strcasecmp(line, "Default")) || !value)
+          continue;
 
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
-               NULL, uri);
+       /*
+       * Separate destination name from options...
+       */
 
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
-               NULL, user);
+       for (optptr = value; *optptr && !isspace(*optptr & 255); optptr ++);
 
-  if (title)
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL, title);
-  if (docname)
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "document-name", NULL, docname);
+       while (*optptr == ' ')
+         *optptr++ = '\0';
+
+       /*
+       * If this is our destination, parse the options and break out of
+       * the loop - we're done!
+       */
+
+       if (!strcasecmp(value, name))
+       {
+          num_options = cupsParseOptions(optptr, num_options, options);
+         break;
+       }
+      }
+
+      cupsFileClose(fp);
+    }
+  }
+  else if (options)
+    *options = NULL;
 
  /*
-  * Then add all options on the command-line...
+  * Return the number of options for this destination...
   */
 
-  cupsEncodeOptions(request, num_options, options);
+  return (num_options);
+}
+
+
+/*
+ * 'print_file()' - Add a file to the current job.
+ */
+
+static int                             /* O - 0 on success, -1 on failure */
+print_file(http_t     *http,           /* I - HTTP connection */
+           int        id,              /* I - Job ID */
+          const char *filename,        /* I - File to print */
+           const char *docname,                /* I - document-name */
+          const char *user,            /* I - requesting-user-name */
+          int        last)             /* I - 1 = last file in job */
+{
+  ipp_t                *request;               /* IPP request */
+  char         uri[HTTP_MAX_URI];      /* Printer URI */
+
+
+ /*
+  * Setup the Send-Document request...
+  */
+
+  request = ippNewRequest(IPP_SEND_DOCUMENT);
+
+  snprintf(uri, sizeof(uri), "ipp://localhost/jobs/%d", id);
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri);
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+               "requesting-user-name", NULL, user);
+
+  if (docname)
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+                "document-name", NULL, docname);
+
+  if (last)
+    ippAddBoolean(request, IPP_TAG_OPERATION, "last-document", 1);
 
  /*
   * Do the request...
   */
 
-  snprintf(uri, sizeof(uri), "/printers/%s", name);
+  snprintf(uri, sizeof(uri), "/jobs/%d", id);
 
-  response = cupsDoFileRequest(http, request, uri, file);
+  ippDelete(cupsDoFileRequest(http, request, uri, filename));
 
-  if (response == NULL)
-  {
-    syslog(LOG_ERR, "Unable to print file - %s",
-           ippErrorString(cupsLastError()));
-    jobid = 0;
-  }
-  else if (response->request.status.status_code > IPP_OK_CONFLICT)
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    syslog(LOG_ERR, "Unable to print file - %s",
-           ippErrorString(response->request.status.status_code));
-    jobid = 0;
-  }
-  else if ((attr = ippFindAttribute(response, "job-id", IPP_TAG_INTEGER)) == NULL)
-  {
-    syslog(LOG_ERR, "No job-id attribute found in response from server!");
-    jobid = 0;
-  }
-  else
-  {
-    jobid = attr->values[0].integer;
+    syslog(LOG_ERR, "Unable to send document - %s", cupsLastErrorString());
 
-    syslog(LOG_INFO, "Print file - job ID = %d", jobid);
+    return (-1);
   }
 
-  if (response != NULL)
-    ippDelete(response);
-
-  httpClose(http);
-  cupsLangFree(language);
-
-  return (jobid);
+  return (0);
 }
 
 
@@ -504,12 +863,13 @@ print_file(const char    *name,           /* I - Printer or class name */
  * 'recv_print_job()' - Receive a print job from the client.
  */
 
-int                                    /* O - Command status */
-recv_print_job(const char    *dest,    /* I - Destination */
-               int           num_defaults,
-                                       /* I - Number of default options */
-              cups_option_t *defaults) /* I - Default options */
+static int                             /* O - Command status */
+recv_print_job(
+    const char    *queue,              /* I - Printer name */
+    int           num_defaults,                /* I - Number of default options */
+    cups_option_t *defaults)           /* I - Default options */
 {
+  http_t       *http;                  /* HTTP connection */
   int          i;                      /* Looping var */
   int          status;                 /* Command status */
   int          fd;                     /* Temporary file */
@@ -520,71 +880,71 @@ recv_print_job(const char    *dest,       /* I - Destination */
                command,                /* Command from line */
                *count,                 /* Number of bytes */
                *name;                  /* Name of file */
-  const char   *cupsd_job_sheets;              /* Job sheets */
+  const char   *job_sheets;            /* Job sheets */
   int          num_data;               /* Number of data files */
   char         control[1024],          /* Control filename */
-               data[32][256],          /* Data files */
-               temp[32][1024];         /* Temporary files */
+               data[100][256],         /* Data files */
+               temp[100][1024];        /* Temporary files */
   char         user[1024],             /* User name */
                title[1024],            /* Job title */
                docname[1024],          /* Document name */
-               queue[256],             /* Printer/class queue */
-               *instance;              /* Printer/class instance */
-  int          num_dests;              /* Number of destinations */
-  cups_dest_t  *dests,                 /* Destinations */
-               *destptr;               /* Current destination */
-  int          num_options;            /* Number of options */
+               dest[256];              /* Printer/class queue */
+  int          accepting,              /* printer-is-accepting */
+               shared,                 /* printer-is-shared */
+               num_options;            /* Number of options */
   cups_option_t        *options;               /* Options */
-  int          banner;                 /* Print banner? */
-
-
-  status   = 0;
-  num_data = 0;
-  fd       = -1;
-
-  control[0] = '\0';
+  int          id;                     /* Job ID */
+  int          docnumber,              /* Current document number */
+               doccount;               /* Count of documents */
 
-  strlcpy(queue, dest, sizeof(queue));
 
-  if ((instance = strrchr(queue, '/')) != NULL)
-    *instance++ = '\0';
+ /*
+  * Connect to the server...
+  */
 
-  num_dests = cupsGetDests(&dests);
-  if ((destptr = cupsGetDest(queue, instance, num_dests, dests)) == NULL)
+  http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption());
+  if (!http)
   {
-   /*
-    * If the queue name is blank or "lp" then use the default queue.
-    */
-
-    if (!queue[0] || !strcmp(queue, "lp"))
-      if ((destptr = cupsGetDest(NULL, NULL, num_dests, dests)) != NULL)
-       strlcpy(queue, destptr->name, sizeof(queue));
+    syslog(LOG_ERR, "Unable to connect to server: %s", strerror(errno));
 
-    if (destptr == NULL)
-    {
-      if (instance)
-       syslog(LOG_ERR, "Unknown destination %s/%s!", queue, instance);
-      else
-       syslog(LOG_ERR, "Unknown destination %s!", queue);
+    putchar(1);
 
-      cupsFreeDests(num_dests, dests);
+    return (1);
+  }
 
-      putchar(1);
+ /*
+  * See if the printer is available...
+  */
 
-      return (1);
-    }
-  }
+  num_options = get_printer(http, queue, dest, sizeof(dest), &options,
+                            &accepting, &shared, NULL);
 
-  if (!check_printer(queue))
+  if (num_options < 0 || !accepting || !shared)
   {
-    cupsFreeDests(num_dests, dests);
+    if (dest[0])
+      syslog(LOG_INFO, "Rejecting job because \"%s\" is not %s", dest,
+             !accepting ? "accepting jobs" : "shared");
+    else
+      syslog(LOG_ERR, "Unable to get printer information for \"%s\"", queue);
+
+    httpClose(http);
 
     putchar(1);
 
     return (1);
   }
 
-  putchar(0);
+  putchar(0);                          /* OK so far... */
+
+ /*
+  * Read the request...
+  */
+
+  status   = 0;
+  num_data = 0;
+  fd       = -1;
+
+  control[0] = '\0';
 
   while (smart_gets(line, sizeof(line), stdin) != NULL)
   {
@@ -661,7 +1021,7 @@ recv_print_job(const char    *dest,        /* I - Destination */
            break;
          }
 
-          if (num_data >= (sizeof(data) / sizeof(data[0])))
+          if (num_data >= (int)(sizeof(data) / sizeof(data[0])))
          {
           /*
            * Too many data files...
@@ -761,13 +1121,21 @@ recv_print_job(const char    *dest,      /* I - Destination */
     else
     {
      /*
-      * Grab the job information first...
+      * Copy the default options...
       */
 
-      title[0]   = '\0';
-      user[0]    = '\0';
-      docname[0] = '\0';
-      banner     = 0;
+      for (i = 0; i < num_defaults; i ++)
+       num_options = cupsAddOption(defaults[i].name,
+                                   defaults[i].value,
+                                   num_options, &options);
+
+     /*
+      * Grab the job information...
+      */
+
+      title[0] = '\0';
+      user[0]  = '\0';
+      doccount = 0;
 
       while (smart_gets(line, sizeof(line), fp) != NULL)
       {
@@ -781,37 +1149,27 @@ recv_print_job(const char    *dest,      /* I - Destination */
              strlcpy(title, line + 1, sizeof(title));
              break;
 
-         case 'N' : /* Document name */
-             strlcpy(docname, line + 1, sizeof(docname));
-             break;
-
          case 'P' : /* User identification */
              strlcpy(user, line + 1, sizeof(user));
              break;
 
          case 'L' : /* Print banner page */
-             banner = 1;
-             break;
-       }
-
-       if (status)
-         break;
-      }
-
-     /*
-      * Then print the jobs...
-      */
-
-      rewind(fp);
+            /*
+             * If a banner was requested and it's not overridden by a
+             * command line option and the destination's default is none
+             * then add the standard banner...
+             */
 
-      while (smart_gets(line, sizeof(line), fp) != NULL)
-      {
-       /*
-        * Process control lines...
-       */
+             if (cupsGetOption("job-sheets", num_defaults, defaults) == NULL &&
+                 ((job_sheets = cupsGetOption("job-sheets", num_options,
+                                              options)) == NULL ||
+                  !strcmp(job_sheets, "none,none")))
+             {
+               num_options = cupsAddOption("job-sheets", "standard",
+                                           num_options, &options);
+             }
+             break;
 
-       switch (line[0])
-       {
          case 'c' : /* Plot CIF file */
          case 'd' : /* Print DVI file */
          case 'f' : /* Print formatted file */
@@ -823,97 +1181,115 @@ recv_print_job(const char    *dest,     /* I - Destination */
          case 'r' : /* File to print with FORTRAN carriage control */
          case 't' : /* Print troff output file */
          case 'v' : /* Print raster file */
-            /*
-             * Check that we have a username...
-             */
+             doccount ++;
 
-             if (!user[0])
-             {
-               syslog(LOG_WARNING, "No username specified by client! "
-                                   "Using \"anonymous\"...");
-               strcpy(user, "anonymous");
-             }
+             if (line[0] == 'l' &&
+                 !cupsGetOption("document-format", num_options, options))
+               num_options = cupsAddOption("raw", "", num_options, &options);
 
-             /*
-             * Copy the default options...
-             */
+              if (line[0] == 'p')
+               num_options = cupsAddOption("prettyprint", "", num_options,
+                                           &options);
+              break;
+       }
 
-              num_options = 0;
-             options     = NULL;
+       if (status)
+         break;
+      }
 
-             for (i = 0; i < destptr->num_options; i ++)
-               num_options = cupsAddOption(destptr->options[i].name,
-                                           destptr->options[i].value,
-                                           num_options, &options);
-             for (i = 0; i < num_defaults; i ++)
-               num_options = cupsAddOption(defaults[i].name,
-                                           defaults[i].value,
-                                           num_options, &options);
+     /*
+      * Check that we have a username...
+      */
 
-             /*
-             * If a banner was requested and it's not overridden by a
-             * command line option and the destination's default is none
-             * then add the standard banner...
-             */
+      if (!user[0])
+      {
+       syslog(LOG_WARNING, "No username specified by client! "
+                           "Using \"anonymous\"...");
+       strcpy(user, "anonymous");
+      }
 
-              if (banner &&
-                 cupsGetOption("job-sheets", num_defaults, defaults) == NULL &&
-                  ((cupsd_job_sheets = cupsGetOption("job-sheets",
-                                              destptr->num_options,
-                                              destptr->options)) == NULL ||
-                   !strcmp(cupsd_job_sheets, "none,none")))
-             {
-               num_options = cupsAddOption("job-sheets", "standard",
-                                           num_options, &options);
-             }
+     /*
+      * Create the job...
+      */
 
-             /*
-             * Add additional options as needed...
-             */
+      if ((id = create_job(http, dest, title, user, num_options, options)) < 0)
+        status = 1;
+      else
+      {
+       /*
+       * Then print the job files...
+       */
 
-             if (line[0] == 'l')
-               num_options = cupsAddOption("raw", "", num_options, &options);
+       rewind(fp);
 
-              if (line[0] == 'p')
-               num_options = cupsAddOption("prettyprint", "", num_options,
-                                           &options);
+       docname[0] = '\0';
+       docnumber  = 0;
 
-             /*
-             * Figure out which file we are printing...
-             */
+       while (smart_gets(line, sizeof(line), fp) != NULL)
+       {
+        /*
+          * Process control lines...
+         */
+
+         switch (line[0])
+         {
+           case 'N' : /* Document name */
+               strlcpy(docname, line + 1, sizeof(docname));
+               break;
 
-             for (i = 0; i < num_data; i ++)
-               if (strcmp(data[i], line + 1) == 0)
+           case 'c' : /* Plot CIF file */
+           case 'd' : /* Print DVI file */
+           case 'f' : /* Print formatted file */
+           case 'g' : /* Plot file */
+           case 'l' : /* Print file leaving control characters (raw) */
+           case 'n' : /* Print ditroff output file */
+           case 'o' : /* Print PostScript output file */
+           case 'p' : /* Print file with 'pr' format (prettyprint) */
+           case 'r' : /* File to print with FORTRAN carriage control */
+           case 't' : /* Print troff output file */
+           case 'v' : /* Print raster file */
+               /*
+               * Figure out which file we are printing...
+               */
+
+               for (i = 0; i < num_data; i ++)
+                 if (!strcmp(data[i], line + 1))
+                   break;
+
+               if (i >= num_data)
+               {
+                 status = 1;
                  break;
+               }
 
-              if (i >= num_data)
-             {
-               status = 1;
-               break;
-             }
+               /*
+               * Send the print file...
+               */
 
-             /*
-             * Send the print request...
-             */
+               docnumber ++;
 
-              if (print_file(queue, temp[i], title, docname, user, num_options,
-                            options) == 0)
-                status = 1;
-             else
-               status = 0;
+               if (print_file(http, id, temp[i], docname, user,
+                              docnumber == doccount))
+                  status = 1;
+               else
+                 status = 0;
 
-              cupsFreeOptions(num_options, options);
-             break;
+               break;
+         }
+
+         if (status)
+           break;
        }
 
-       if (status)
-         break;
+       fclose(fp);
       }
-
-      fclose(fp);
     }
   }
 
+  cupsFreeOptions(num_options, options);
+
+  httpClose(http);
+
  /*
   * Clean up all temporary files and return...
   */
@@ -923,8 +1299,6 @@ recv_print_job(const char    *dest,        /* I - Destination */
   for (i = 0; i < num_data; i ++)
     unlink(temp[i]);
 
-  cupsFreeDests(num_dests, dests);
-
   return (status);
 }
 
@@ -940,9 +1314,7 @@ remove_jobs(const char *dest,              /* I - Destination */
 {
   int          id;                     /* Job ID */
   http_t       *http;                  /* HTTP server connection */
-  ipp_t                *request,               /* IPP Request */
-               *response;              /* IPP Response */
-  cups_lang_t  *language;              /* Default language */
+  ipp_t                *request;               /* IPP Request */
   char         uri[HTTP_MAX_URI];      /* Job URI */
 
 
@@ -960,8 +1332,6 @@ remove_jobs(const char *dest,              /* I - Destination */
     return (1);
   }
 
-  language = cupsLangDefault();
-
  /*
   * Loop for each job...
   */
@@ -987,16 +1357,7 @@ remove_jobs(const char *dest,             /* I - Destination */
     *    requesting-user-name
     */
 
-    request = ippNew();
-
-    request->request.op.operation_id = IPP_CANCEL_JOB;
-    request->request.op.request_id   = 1;
-
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
-                "attributes-charset", NULL, cupsLangEncoding(language));
-
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
-                "attributes-natural-language", NULL, language->language);
+    request = ippNewRequest(IPP_CANCEL_JOB);
 
     sprintf(uri, "ipp://localhost/jobs/%d", id);
     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "job-uri", NULL, uri);
@@ -1008,33 +1369,19 @@ remove_jobs(const char *dest,           /* I - Destination */
     * Do the request and get back a response...
     */
 
-    if ((response = cupsDoRequest(http, request, "/jobs")) != NULL)
-    {
-      if (response->request.status.status_code > IPP_OK_CONFLICT)
-      {
-       syslog(LOG_WARNING, "Cancel of job ID %d failed: %s\n", id,
-               ippErrorString(response->request.status.status_code));
-       ippDelete(response);
-       cupsLangFree(language);
-       httpClose(http);
-       return (1);
-      }
-      else
-        syslog(LOG_INFO, "Job ID %d cancelled", id);
+    ippDelete(cupsDoRequest(http, request, "/jobs"));
 
-      ippDelete(response);
-    }
-    else
+    if (cupsLastError() > IPP_OK_CONFLICT)
     {
       syslog(LOG_WARNING, "Cancel of job ID %d failed: %s\n", id,
-             ippErrorString(cupsLastError()));
-      cupsLangFree(language);
+             cupsLastErrorString());
       httpClose(http);
       return (1);
     }
+    else
+      syslog(LOG_INFO, "Job ID %d cancelled", id);
   }
 
-  cupsLangFree(language);
   httpClose(http);
 
   return (0);
@@ -1046,7 +1393,7 @@ remove_jobs(const char *dest,             /* I - Destination */
  */
 
 int                                    /* O - Command status */
-send_state(const char *dest,           /* I - Destination */
+send_state(const char *queue,          /* I - Destination */
            const char *list,           /* I - Job or user */
           int        longstatus)       /* I - List of jobs or users */
 {
@@ -1055,7 +1402,6 @@ send_state(const char *dest,              /* I - Destination */
   ipp_t                *request,               /* IPP Request */
                *response;              /* IPP Response */
   ipp_attribute_t *attr;               /* Current attribute */
-  cups_lang_t  *language;              /* Default language */
   ipp_pstate_t state;                  /* Printer state */
   const char   *jobdest,               /* Pointer into job-printer-uri */
                *jobuser,               /* Pointer to job-originating-user-name */
@@ -1069,8 +1415,7 @@ send_state(const char *dest,              /* I - Destination */
   char         rankstr[255];           /* Rank string */
   char         namestr[1024];          /* Job name string */
   char         uri[HTTP_MAX_URI];      /* Printer URI */
-  char         queue[256],             /* Printer/class queue */
-               *instance;              /* Printer/class instance */
+  char         dest[256];              /* Printer/class queue */
   static const char * const ranks[10] =        /* Ranking strings */
                {
                  "th",
@@ -1096,15 +1441,6 @@ send_state(const char *dest,             /* I - Destination */
                };
 
 
- /*
-  * Remove instance from destination, if any...
-  */
-
-  strlcpy(queue, dest, sizeof(queue));
-
-  if ((instance = strrchr(queue, '/')) != NULL)
-    *instance++ = '\0';
-
  /*
   * Try connecting to the local server...
   */
@@ -1119,78 +1455,32 @@ send_state(const char *dest,            /* I - Destination */
   }
 
  /*
-  * Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the following
-  * attributes:
-  *
-  *    attributes-charset
-  *    attributes-natural-language
-  *    printer-uri
+  * Get the actual destination name and printer state...
   */
 
-  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);
-
-  httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
-                   "localhost", 0, "/printers/%s", queue);
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
-               "printer-uri", NULL, uri);
-
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
-               "requested-attributes", NULL, "printer-state");
+  if (get_printer(http, queue, dest, sizeof(dest), NULL, NULL, NULL, &state))
+  {
+    syslog(LOG_ERR, "Unable to get printer %s: %s", queue,
+           cupsLastErrorString());
+    printf("Unable to get printer %s: %s", queue, cupsLastErrorString());
+    return (1);
+  }
 
  /*
-  * Do the request and get back a response...
+  * Show the queue state...
   */
 
-  if ((response = cupsDoRequest(http, request, "/")) != NULL)
-  {
-    if (response->request.status.status_code > IPP_OK_CONFLICT)
-    {
-      syslog(LOG_WARNING, "Unable to get printer list: %s\n",
-             ippErrorString(response->request.status.status_code));
-      printf("Unable to get printer list: %s\n",
-             ippErrorString(response->request.status.status_code));
-      ippDelete(response);
-      return (1);
-    }
-
-    if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL)
-      state = (ipp_pstate_t)attr->values[0].integer;
-    else
-      state = IPP_PRINTER_STOPPED;
-
-    switch (state)
-    {
-      case IPP_PRINTER_IDLE :
-          printf("%s is ready\n", dest);
-         break;
-      case IPP_PRINTER_PROCESSING :
-          printf("%s is ready and printing\n", dest);
-         break;
-      case IPP_PRINTER_STOPPED :
-          printf("%s is not ready\n", dest);
-         break;
-    }
-
-    ippDelete(response);
-  }
-  else
+  switch (state)
   {
-    syslog(LOG_WARNING, "Unable to get printer list: %s\n",
-           ippErrorString(cupsLastError()));
-    printf("Unable to get printer list: %s\n",
-           ippErrorString(cupsLastError()));
-    return (1);
+    case IPP_PRINTER_IDLE :
+        printf("%s is ready\n", dest);
+       break;
+    case IPP_PRINTER_PROCESSING :
+        printf("%s is ready and printing\n", dest);
+       break;
+    case IPP_PRINTER_STOPPED :
+        printf("%s is not ready\n", dest);
+       break;
   }
 
  /*
@@ -1204,19 +1494,10 @@ send_state(const char *dest,            /* I - Destination */
 
   id = atoi(list);
 
-  request = ippNew();
-
-  request->request.op.operation_id = id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS;
-  request->request.op.request_id   = 1;
-
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
-               "attributes-charset", NULL, cupsLangEncoding(language));
-
-  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
-               "attributes-natural-language", NULL, language->language);
+  request = ippNewRequest(id ? IPP_GET_JOB_ATTRIBUTES : IPP_GET_JOBS);
 
   httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
-                   "localhost", 0, "/printers/%s", queue);
+                   "localhost", 0, "/printers/%s", dest);
 
   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
                NULL, uri);
@@ -1231,7 +1512,8 @@ send_state(const char *dest,              /* I - Destination */
   }
 
   ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
-                "requested-attributes", sizeof(requested) / sizeof(requested[0]),
+                "requested-attributes",
+               sizeof(requested) / sizeof(requested[0]),
                NULL, requested);
 
  /*
@@ -1239,144 +1521,132 @@ send_state(const char *dest,          /* I - Destination */
   */
 
   jobcount = 0;
+  response = cupsDoRequest(http, request, "/");
 
-  if ((response = cupsDoRequest(http, request, "/")) != NULL)
+  if (cupsLastError() > IPP_OK_CONFLICT)
   {
-    if (response->request.status.status_code > IPP_OK_CONFLICT)
-    {
-      printf("get-jobs failed: %s\n",
-             ippErrorString(response->request.status.status_code));
-      ippDelete(response);
-      return (1);
-    }
+    printf("get-jobs failed: %s\n", cupsLastErrorString());
+    ippDelete(response);
+    return (1);
+  }
 
-    rank = 1;
+ /*
+  * Loop through the job list and display them...
+  */
 
+  for (attr = response->attrs, rank = 1; attr; attr = attr->next)
+  {
    /*
-    * Loop through the job list and display them...
+    * Skip leading attributes until we hit a job...
     */
 
-    for (attr = response->attrs; attr != NULL; attr = attr->next)
-    {
-     /*
-      * Skip leading attributes until we hit a job...
-      */
-
-      while (attr != NULL &&
-             (attr->group_tag != IPP_TAG_JOB || attr->name == NULL))
-        attr = attr->next;
+    while (attr && (attr->group_tag != IPP_TAG_JOB || !attr->name))
+      attr = attr->next;
 
-      if (attr == NULL)
-        break;
+    if (!attr)
+      break;
 
-     /*
-      * Pull the needed attributes from this job...
-      */
+   /*
+    * Pull the needed attributes from this job...
+    */
 
-      jobid       = 0;
-      jobsize     = 0;
-      jobstate    = IPP_JOB_PENDING;
-      jobname     = "untitled";
-      jobuser     = NULL;
-      jobdest     = NULL;
-      jobcopies   = 1;
+    jobid     = 0;
+    jobsize   = 0;
+    jobstate  = IPP_JOB_PENDING;
+    jobname   = "untitled";
+    jobuser   = NULL;
+    jobdest   = NULL;
+    jobcopies = 1;
 
-      while (attr != NULL && attr->group_tag == IPP_TAG_JOB)
-      {
-        if (strcmp(attr->name, "job-id") == 0 &&
-           attr->value_tag == IPP_TAG_INTEGER)
-         jobid = attr->values[0].integer;
+    while (attr && attr->group_tag == IPP_TAG_JOB)
+    {
+      if (!strcmp(attr->name, "job-id") &&
+         attr->value_tag == IPP_TAG_INTEGER)
+       jobid = attr->values[0].integer;
 
-        if (strcmp(attr->name, "job-k-octets") == 0 &&
-           attr->value_tag == IPP_TAG_INTEGER)
-         jobsize = attr->values[0].integer;
+      if (!strcmp(attr->name, "job-k-octets") &&
+         attr->value_tag == IPP_TAG_INTEGER)
+       jobsize = attr->values[0].integer;
 
-        if (strcmp(attr->name, "job-state") == 0 &&
-           attr->value_tag == IPP_TAG_ENUM)
-         jobstate = (ipp_jstate_t)attr->values[0].integer;
+      if (!strcmp(attr->name, "job-state") &&
+         attr->value_tag == IPP_TAG_ENUM)
+       jobstate = (ipp_jstate_t)attr->values[0].integer;
 
-        if (strcmp(attr->name, "job-printer-uri") == 0 &&
-           attr->value_tag == IPP_TAG_URI)
-         if ((jobdest = strrchr(attr->values[0].string.text, '/')) != NULL)
-           jobdest ++;
+      if (!strcmp(attr->name, "job-printer-uri") &&
+         attr->value_tag == IPP_TAG_URI)
+       if ((jobdest = strrchr(attr->values[0].string.text, '/')) != NULL)
+         jobdest ++;
 
-        if (strcmp(attr->name, "job-originating-user-name") == 0 &&
-           attr->value_tag == IPP_TAG_NAME)
-         jobuser = attr->values[0].string.text;
+      if (!strcmp(attr->name, "job-originating-user-name") &&
+         attr->value_tag == IPP_TAG_NAME)
+       jobuser = attr->values[0].string.text;
 
-        if (strcmp(attr->name, "job-name") == 0 &&
-           attr->value_tag == IPP_TAG_NAME)
-         jobname = attr->values[0].string.text;
+      if (!strcmp(attr->name, "job-name") &&
+         attr->value_tag == IPP_TAG_NAME)
+       jobname = attr->values[0].string.text;
 
-        if (strcmp(attr->name, "copies") == 0 &&
-           attr->value_tag == IPP_TAG_INTEGER)
-         jobcopies = attr->values[0].integer;
+      if (!strcmp(attr->name, "copies") &&
+         attr->value_tag == IPP_TAG_INTEGER)
+       jobcopies = attr->values[0].integer;
 
-        attr = attr->next;
-      }
-
-     /*
-      * See if we have everything needed...
-      */
+      attr = attr->next;
+    }
 
-      if (jobdest == NULL || jobid == 0)
-      {
-        if (attr == NULL)
-         break;
-       else
-          continue;
-      }
+   /*
+    * See if we have everything needed...
+    */
 
-      if (!longstatus && jobcount == 0)
-       puts("Rank    Owner   Job     File(s)                         Total Size");
+    if (!jobdest || !jobid)
+    {
+      if (!attr)
+       break;
+      else
+        continue;
+    }
 
-      jobcount ++;
+    if (!longstatus && jobcount == 0)
+      puts("Rank    Owner   Job     File(s)                         Total Size");
 
-     /*
-      * Display the job...
-      */
+    jobcount ++;
 
-      if (jobstate == IPP_JOB_PROCESSING)
-       strcpy(rankstr, "active");
-      else
-      {
-       snprintf(rankstr, sizeof(rankstr), "%d%s", rank, ranks[rank % 10]);
-       rank ++;
-      }
+   /*
+    * Display the job...
+    */
 
-      if (longstatus)
-      {
-        puts("");
+    if (jobstate == IPP_JOB_PROCESSING)
+      strcpy(rankstr, "active");
+    else
+    {
+      snprintf(rankstr, sizeof(rankstr), "%d%s", rank, ranks[rank % 10]);
+      rank ++;
+    }
 
-        if (jobcopies > 1)
-         snprintf(namestr, sizeof(namestr), "%d copies of %s", jobcopies,
-                  jobname);
-       else
-         strlcpy(namestr, jobname, sizeof(namestr));
+    if (longstatus)
+    {
+      puts("");
 
-        printf("%s: %-33.33s [job %d localhost]\n", jobuser, rankstr, jobid);
-        printf("        %-39.39s %.0f bytes\n", namestr, 1024.0 * jobsize);
-      }
+      if (jobcopies > 1)
+       snprintf(namestr, sizeof(namestr), "%d copies of %s", jobcopies,
+                jobname);
       else
-        printf("%-7s %-7.7s %-7d %-31.31s %.0f bytes\n", rankstr, jobuser,
-              jobid, jobname, 1024.0 * jobsize);
+       strlcpy(namestr, jobname, sizeof(namestr));
 
-      if (attr == NULL)
-        break;
+      printf("%s: %-33.33s [job %d localhost]\n", jobuser, rankstr, jobid);
+      printf("        %-39.39s %.0f bytes\n", namestr, 1024.0 * jobsize);
     }
+    else
+      printf("%-7s %-7.7s %-7d %-31.31s %.0f bytes\n", rankstr, jobuser,
+            jobid, jobname, 1024.0 * jobsize);
 
-    ippDelete(response);
-  }
-  else
-  {
-    printf("get-jobs failed: %s\n", ippErrorString(cupsLastError()));
-    return (1);
+    if (!attr)
+      break;
   }
 
+  ippDelete(response);
+
   if (jobcount == 0)
     puts("no entries");
 
-  cupsLangFree(language);
   httpClose(http);
 
   return (0);
@@ -1438,5 +1708,5 @@ smart_gets(char *s,                       /* I - Pointer to line buffer */
 
 
 /*
- * End of "$Id: cups-lpd.c 5049 2006-02-02 14:50:57Z mike $".
+ * End of "$Id: cups-lpd.c 5137 2006-02-19 19:44:50Z mike $".
  */
index f2a0b0f628a1ebc508d7de45bb32002eba114e26..8b59c68e2fac6930b0805efbdc631dc8ab2996d3 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: dirsvc.c 5059 2006-02-02 23:17:16Z mike $"
+ * "$Id: dirsvc.c 5117 2006-02-16 14:10:43Z mike $"
  *
  *   Directory services routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -124,7 +124,14 @@ cupsdLoadRemoteCache(void)
   int                  linenum;        /* Current line number */
   char                 line[1024],     /* Line from file */
                        *value,         /* Pointer to value */
-                       *valueptr;      /* Pointer into value */
+                       *valueptr,      /* Pointer into value */
+                       scheme[32],     /* Scheme portion of URI */
+                       username[64],   /* Username portion of URI */
+                       host[HTTP_MAX_HOST],
+                                       /* Hostname portion of URI */
+                       resource[HTTP_MAX_URI];
+                                       /* Resource portion of URI */
+  int                  port;           /* Port number */
   cupsd_printer_t      *p;             /* Current printer */
   time_t               now;            /* Current time */
 
@@ -167,7 +174,21 @@ cupsdLoadRemoteCache(void)
         cupsdLogMessage(CUPSD_LOG_DEBUG,
                        "cupsdLoadRemoteCache: Loading printer %s...", value);
 
-        p = cupsdAddPrinter(value);
+        if ((p = cupsdFindDest(value)) != NULL)
+       {
+         if (p->type & CUPS_PRINTER_CLASS)
+         {
+           cupsdLogMessage(CUPSD_LOG_WARN,
+                           "Cached remote printer \"%s\" conflicts with "
+                           "existing class!",
+                           value);
+           p = NULL;
+           continue;
+         }
+       }
+       else
+          p = cupsdAddPrinter(value);
+
        p->accepting   = 1;
        p->state       = IPP_PRINTER_IDLE;
        p->type        |= CUPS_PRINTER_REMOTE;
@@ -203,7 +224,11 @@ cupsdLoadRemoteCache(void)
         cupsdLogMessage(CUPSD_LOG_DEBUG,
                        "cupsdLoadRemoteCache: Loading class %s...", value);
 
-        p = cupsdAddClass(value);
+        if ((p = cupsdFindDest(value)) != NULL)
+         p->type = CUPS_PRINTER_CLASS;
+       else
+          p = cupsdAddClass(value);
+
        p->accepting   = 1;
        p->state       = IPP_PRINTER_IDLE;
        p->type        |= CUPS_PRINTER_REMOTE;
@@ -268,6 +293,11 @@ cupsdLoadRemoteCache(void)
     {
       if (value)
       {
+       httpSeparateURI(HTTP_URI_CODING_ALL, value, scheme, sizeof(scheme),
+                       username, sizeof(username), host, sizeof(host), &port,
+                       resource, sizeof(resource));
+
+       cupsdSetString(&p->hostname, host);
        cupsdSetString(&p->uri, value);
        cupsdSetString(&p->device_uri, value);
       }
@@ -2717,5 +2747,5 @@ slp_url_callback(
 
 
 /*
- * End of "$Id: dirsvc.c 5059 2006-02-02 23:17:16Z mike $".
+ * End of "$Id: dirsvc.c 5117 2006-02-16 14:10:43Z mike $".
  */
index ec3a8817ddc3770c198404daa3fdaa93300c7b45..d10694818a1c75a91e80cef31a90a779f13ce0f2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: env.c 5046 2006-02-01 22:11:58Z mike $"
+ * "$Id: env.c 5094 2006-02-09 01:00:26Z mike $"
  *
  *   Environment management routines for the Common UNIX Printing System (CUPS).
  *
@@ -76,15 +76,18 @@ cupsdInitEnv(void)
 
   cupsdClearEnv();
 
-#if defined(__APPLE__) && __GNUC__ > 3
+#if defined(__APPLE__)
  /*
   * Add special voodoo magic for MacOS X 10.4 and later - this allows MacOS
   * X programs to access their bundle resources properly...
+  *
+  * This string is replaced in cupsdStartProcess() when we are running on
+  * versions of MacOS X prior to 10.4...
   */
 
   cupsdSetString(common_env, "<CFProcessPath>");
   num_common_env = 1;
-#endif /* __APPLE__ && __GNUC__ > 3 */
+#endif /* __APPLE__ */
 
  /*
   * Set common variables...
@@ -185,7 +188,7 @@ cupsdSetEnv(const char *name,               /* I - Name of variable */
 
   cupsdSetStringf(common_env + num_common_env, "%s=%s", name, value);
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdSetEnv: %s\n",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSetEnv: %s\n",
                   common_env[num_common_env]);
 
   num_common_env ++;
@@ -222,5 +225,5 @@ cupsdSetEnvf(const char *name,              /* I - Name of variable */
 
 
 /*
- * End of "$Id: env.c 5046 2006-02-01 22:11:58Z mike $".
+ * End of "$Id: env.c 5094 2006-02-09 01:00:26Z mike $".
  */
index c783b5db74e4bc9876876b234482381c044f669e..f315910af1872cf1435d8cd9c042b27b26c50f2b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: filter.c 4970 2006-01-24 14:05:45Z mike $"
+ * "$Id: filter.c 5083 2006-02-06 02:57:43Z mike $"
  *
  *   File type conversion routines for the Common UNIX Printing System (CUPS).
  *
  * Contents:
  *
  *   mimeAddFilter()   - Add a filter to the current MIME database.
- *   mimeFilter()      - Find the fastest way to convert from one type to another.
+ *   mimeFilter()      - Find the fastest way to convert from one type to
+ *                       another.
  *   compare_filters() - Compare two filters...
+ *   find_filters()    - Find the filters to convert from one type to another.
  *   lookup()          - Lookup a filter...
  */
 
 #include "mime.h"
 
 
+/*
+ * Local types...
+ */
+
+typedef struct _mime_typelist_s                /**** List of source types ****/
+{
+  struct _mime_typelist_s *next;       /* Next source type */
+  mime_type_t          *src;           /* Source type */
+} _mime_typelist_t;
+
+
 /*
  * Local functions...
  */
 
 static int             compare_filters(mime_filter_t *, mime_filter_t *);
+static cups_array_t    *find_filters(mime_t *mime, mime_type_t *src,
+                                     mime_type_t *dst, int *cost,
+                                     _mime_typelist_t *visited);
 static mime_filter_t   *lookup(mime_t *, mime_type_t *, mime_type_t *);
 
 
@@ -132,32 +148,77 @@ cups_array_t *                            /* O - Array of filters to run */
 mimeFilter(mime_t      *mime,          /* I - MIME database */
            mime_type_t *src,           /* I - Source file type */
           mime_type_t *dst,            /* I - Destination file type */
-          int         *cost,           /* O - Cost of filters */
-          int         max_depth)       /* I - Maximum depth of search */
+          int         *cost)           /* O - Cost of filters */
 {
-  int          tempcost,               /* Temporary cost */
-               mincost;                /* Current minimum */
-  cups_array_t *temp,                  /* Temporary filter */
-               *mintemp;               /* Current minimum */
-  mime_filter_t        *current;               /* Current filter */
-
-
  /*
   * Range-check the input...
   */
 
   DEBUG_printf(("mimeFilter(mime=%p, src=%p(%s/%s), dst=%p(%s/%s), "
-                "cost=%p(%d), max_depth=%d)\n",
+                "cost=%p(%d))\n",
                mime, src, src ? src->super : "?", src ? src->type : "?",
                dst, dst ? dst->super : "?", dst ? dst->type : "?",
-               cost, cost ? *cost : 0, max_depth));
+               cost, cost ? *cost : 0));
+
 
   if (cost)
     *cost = 0;
 
-  if (!mime || !src || !dst || !cost || max_depth <= 0)
+  if (!mime || !src || !dst)
     return (NULL);
 
+ /*
+  * Find the filters...
+  */
+
+  return (find_filters(mime, src, dst, cost, NULL));
+}
+
+
+/*
+ * 'compare_filters()' - Compare two filters...
+ */
+
+static int                             /* O - Comparison result */
+compare_filters(mime_filter_t *f0,     /* I - First filter */
+                mime_filter_t *f1)     /* I - Second filter */
+{
+  int  i;                              /* Result of comparison */
+
+
+  if ((i = strcmp(f0->src->super, f1->src->super)) == 0)
+    if ((i = strcmp(f0->src->type, f1->src->type)) == 0)
+      if ((i = strcmp(f0->dst->super, f1->dst->super)) == 0)
+        i = strcmp(f0->dst->type, f1->dst->type);
+
+  return (i);
+}
+
+
+/*
+ * 'find_filters()' - Find the filters to convert from one type to another.
+ */
+
+cups_array_t *                         /* O - Array of filters to run */
+find_filters(mime_t           *mime,   /* I - MIME database */
+             mime_type_t      *src,    /* I - Source file type */
+            mime_type_t      *dst,     /* I - Destination file type */
+            int              *cost,    /* O - Cost of filters */
+            _mime_typelist_t *list)    /* I - Source types we've used */
+{
+  int                  tempcost,       /* Temporary cost */
+                       mincost;        /* Current minimum */
+  cups_array_t         *temp,          /* Temporary filter */
+                       *mintemp;       /* Current minimum */
+  mime_filter_t                *current;       /* Current filter */
+  _mime_typelist_t     listnode,       /* New list node */
+                       *listptr;       /* Pointer in list */
+
+
+  DEBUG_printf(("find_filters(mime=%p, src=%p(%s/%s), dst=%p(%s/%s), "
+                "cost=%p, list=%p)\n", mime, src, src->super, src->type,
+               dst, dst->super, dst->type, cost, list));
+
  /*
   * See if there is a filter that can convert the files directly...
   */
@@ -168,6 +229,8 @@ mimeFilter(mime_t      *mime,               /* I - MIME database */
     * Got a direct filter!
     */
 
+    DEBUG_puts("Direct filter found!");
+
     if ((mintemp = cupsArrayNew(NULL, NULL)) == NULL)
       return (NULL);
 
@@ -176,7 +239,7 @@ mimeFilter(mime_t      *mime,               /* I - MIME database */
     mincost = current->cost;
 
     DEBUG_puts("    Found direct filter:");
-    DEBUG_printf(("    %s (cost=%d)\n", mintemp->filter, mincost));
+    DEBUG_printf(("    %s (cost=%d)\n", current->filter, mincost));
   }
   else
   {
@@ -188,6 +251,12 @@ mimeFilter(mime_t      *mime,              /* I - MIME database */
     mincost = 9999999;
   }
 
+ /*
+  * Initialize this node in the type list...
+  */
+
+  listnode.next = list;
+
  /*
   * OK, now look for filters from the source type to any other type...
   */
@@ -197,13 +266,27 @@ mimeFilter(mime_t      *mime,             /* I - MIME database */
        current = (mime_filter_t *)cupsArrayNext(mime->filters))
     if (current->src == src)
     {
+     /*
+      * See if we have already tried the destination type as a source
+      * type (this avoids extra filter looping...)
+      */
+
+      for (listptr = list; listptr; listptr = listptr->next)
+        if (current->dst == listptr->src)
+         break;
+
+      if (listptr)
+        continue;
+
      /*
       * See if we have any filters that can convert from the destination type
       * of this filter to the final type...
       */
 
+      listnode.src = current->src;
+
       cupsArraySave(mime->filters);
-      temp = mimeFilter(mime, current->dst, dst, &tempcost, max_depth - 1);
+      temp = find_filters(mime, current->dst, dst, &tempcost, &listnode);
       cupsArrayRestore(mime->filters);
 
       if (!temp)
@@ -245,7 +328,8 @@ mimeFilter(mime_t      *mime,               /* I - MIME database */
       printf("    %s\n", current->filter);
 #endif /* DEBUG */
 
-    *cost = mincost;
+    if (cost)
+      *cost = mincost;
 
     return (mintemp);
   }
@@ -256,26 +340,6 @@ mimeFilter(mime_t      *mime,              /* I - MIME database */
 }
 
 
-/*
- * 'compare_filters()' - Compare two filters...
- */
-
-static int                             /* O - Comparison result */
-compare_filters(mime_filter_t *f0,     /* I - First filter */
-                mime_filter_t *f1)     /* I - Second filter */
-{
-  int  i;                              /* Result of comparison */
-
-
-  if ((i = strcmp(f0->src->super, f1->src->super)) == 0)
-    if ((i = strcmp(f0->src->type, f1->src->type)) == 0)
-      if ((i = strcmp(f0->dst->super, f1->dst->super)) == 0)
-        i = strcmp(f0->dst->type, f1->dst->type);
-
-  return (i);
-}
-
-
 /*
  * 'lookup()' - Lookup a filter...
  */
@@ -296,5 +360,5 @@ lookup(mime_t      *mime,           /* I - MIME database */
 
 
 /*
- * End of "$Id: filter.c 4970 2006-01-24 14:05:45Z mike $".
+ * End of "$Id: filter.c 5083 2006-02-06 02:57:43Z mike $".
  */
index 5c3b061af65300b95c5a3e02e984d163b186ac0e..7053ad0a8541a5a033815e5be98bb17ee0a5310e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 5051 2006-02-02 16:13:16Z mike $"
+ * "$Id: ipp.c 5131 2006-02-18 05:31:36Z mike $"
  *
  *   IPP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -30,6 +30,7 @@
  *   add_job_state_reasons()     - Add the "job-state-reasons" attribute based
  *                                 upon the job and printer state...
  *   add_job_subscriptions()     - Add any subcriptions for a job.
+ *   add_job_uuid()              - Add job-uuid attribute to a job.
  *   add_printer()               - Add a printer to the system.
  *   add_printer_state_reasons() - Add the "printer-state-reasons" attribute
  *                                 based upon the printer state...
@@ -123,6 +124,7 @@ static int  add_file(cupsd_client_t *con, cupsd_job_t *job, mime_type_t *filetype
                         int compression);
 static void    add_job_state_reasons(cupsd_client_t *con, cupsd_job_t *job);
 static void    add_job_subscriptions(cupsd_client_t *con, cupsd_job_t *job);
+static void    add_job_uuid(cupsd_client_t *con, cupsd_job_t *job);
 static void    add_printer(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    add_printer_state_reasons(cupsd_client_t *con, cupsd_printer_t *p);
 static void    add_queued_job_count(cupsd_client_t *con, cupsd_printer_t *p);
@@ -155,7 +157,7 @@ static void get_default(cupsd_client_t *con);
 static void    get_devices(cupsd_client_t *con);
 static void    get_jobs(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    get_job_attrs(cupsd_client_t *con, ipp_attribute_t *uri);
-static void    get_notifications(cupsd_client_t *con, int id);
+static void    get_notifications(cupsd_client_t *con);
 static void    get_ppds(cupsd_client_t *con);
 static void    get_printers(cupsd_client_t *con, int type);
 static void    get_printer_attrs(cupsd_client_t *con, ipp_attribute_t *uri);
@@ -428,9 +430,12 @@ cupsdProcessIPPRequest(
        */
 
         if (uri)
-          cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                         "cupsdProcessIPPRequest: URI=\"%s\"",
-                         uri->values[0].string.text);
+         cupsdLogMessage(CUPSD_LOG_DEBUG, "%s %s",
+                         ippOpString(con->request->request.op.operation_id),
+                         uri->values[0].string.text);
+        else
+         cupsdLogMessage(CUPSD_LOG_DEBUG, "%s",
+                         ippOpString(con->request->request.op.operation_id));
 
        switch (con->request->request.op.operation_id)
        {
@@ -574,7 +579,7 @@ cupsdProcessIPPRequest(
              break;
 
           case IPP_GET_NOTIFICATIONS :
-             get_notifications(con, sub_id);
+             get_notifications(con);
              break;
 
          default :
@@ -1117,7 +1122,9 @@ add_class(cupsd_client_t  *con,           /* I - Client connection */
     job = (cupsd_job_t *)pclass->job;
 
     cupsdStopJob(job, 1);
+
     job->state->values[0].integer = IPP_JOB_PENDING;
+    job->state_value              = IPP_JOB_PENDING;
   }
 
   if (need_restart_job)
@@ -1223,7 +1230,7 @@ add_job_state_reasons(
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job_state_reasons(%p[%d], %d)",
                   con, con->http.fd, job ? job->id : 0);
 
-  switch (job ? job->state->values[0].integer : IPP_JOB_CANCELLED)
+  switch (job ? job->state_value : IPP_JOB_CANCELLED)
   {
     case IPP_JOB_PENDING :
         if (job->dtype & CUPS_PRINTER_CLASS)
@@ -1448,6 +1455,59 @@ add_job_subscriptions(
 }
 
 
+/*
+ * 'add_job_uuid()' - Add job-uuid attribute to a job.
+ *
+ * See RFC 4122 for the definition of UUIDs and the format.
+ */
+
+static void
+add_job_uuid(cupsd_client_t *con,      /* I - Client connection */
+             cupsd_job_t    *job)      /* I - Job */
+{
+  char                 uuid[1024];     /* job-uuid string */
+  ipp_attribute_t      *attr;          /* job-uuid attribute */
+  _cups_md5_state_t    md5state;       /* MD5 state */
+  unsigned char                md5sum[16];     /* MD5 digest/sum */
+
+
+ /*
+  * First see if the job already has a job-uuid attribute; if so, return...
+  */
+
+  if ((attr = ippFindAttribute(job->attrs, "job-uuid", IPP_TAG_URI)) != NULL)
+    return;
+
+ /*
+  * No job-uuid attribute, so build a version 3 UUID with the local job
+  * ID at the end; see RFC 4122 for details.  Start with the MD5 sum of
+  * the ServerName, server name and port that the client connected to,
+  * and local job ID...
+  */
+
+  snprintf(uuid, sizeof(uuid), "%s:%s:%d:%d", ServerName, con->servername,
+          con->serverport, job->id);
+
+  _cups_md5_init(&md5state);
+  _cups_md5_append(&md5state, (unsigned char *)uuid, strlen(uuid));
+  _cups_md5_finish(&md5state, md5sum);
+
+ /*
+  * Format the UUID URI using the MD5 sum and job ID.
+  */
+
+  snprintf(uuid, sizeof(uuid),
+           "urn:uuid:%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-"
+          "%02x%02x%02x%02x%02x%02x",
+          md5sum[0], md5sum[1], md5sum[2], md5sum[3], md5sum[4], md5sum[5],
+          (md5sum[6] & 15) | 0x30, md5sum[7], (md5sum[8] & 0x3f) | 0x40,
+          md5sum[9], md5sum[10], md5sum[11], md5sum[12], md5sum[13],
+          md5sum[14], md5sum[15]);
+
+  ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-uuid", NULL, uuid);
+}
+
+
 /*
  * 'add_printer()' - Add a printer to the system.
  */
@@ -2022,7 +2082,9 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
     job = (cupsd_job_t *)printer->job;
 
     cupsdStopJob(job, 1);
+
     job->state->values[0].integer = IPP_JOB_PENDING;
+    job->state_value              = IPP_JOB_PENDING;
   }
 
   if (need_restart_job)
@@ -2197,7 +2259,7 @@ authenticate_job(cupsd_client_t  *con,    /* I - Client connection */
   * See if the job has been completed...
   */
 
-  if (job->state->values[0].integer != IPP_JOB_HELD)
+  if (job->state_value != IPP_JOB_HELD)
   {
    /*
     * Return a "not-possible" error...
@@ -2226,10 +2288,7 @@ authenticate_job(cupsd_client_t  *con,   /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_ipp_status(con, IPP_FORBIDDEN,
-                    _("You are not authorized to authenticate "
-                     "job #%d owned by \"%s\"!"),
-                    jobid, job->username);
+    send_http_error(con, HTTP_UNAUTHORIZED);
     return;
   }
 
@@ -2346,8 +2405,8 @@ cancel_all_jobs(cupsd_client_t  *con,     /* I - Client connection */
     * Bad URI?
     */
 
-    if (!strncmp(resource, "/printers/", 10) ||
-        !strncmp(resource, "/classes/", 9))
+    if ((!strncmp(resource, "/printers/", 10) && resource[10]) ||
+        (!strncmp(resource, "/classes/", 9) && resource[9]))
     {
       send_ipp_status(con, IPP_NOT_FOUND,
                       _("The printer or class was not found."));
@@ -2484,7 +2543,7 @@ cancel_job(cupsd_client_t  *con,  /* I - Client connection */
         for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
             job;
             job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-         if (job->state->values[0].integer <= IPP_JOB_PROCESSING &&
+         if (job->state_value <= IPP_JOB_PROCESSING &&
              !strcasecmp(job->dest, dest))
            break;
 
@@ -2544,10 +2603,7 @@ cancel_job(cupsd_client_t  *con, /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_ipp_status(con, IPP_FORBIDDEN,
-                    _("You are not authorized to delete job #%d "
-                     "owned by \"%s\"!"),
-                    jobid, job->username);
+    send_http_error(con, HTTP_UNAUTHORIZED);
     return;
   }
 
@@ -2556,12 +2612,12 @@ cancel_job(cupsd_client_t  *con,        /* I - Client connection */
   * we can't cancel...
   */
 
-  if (job->state->values[0].integer >= IPP_JOB_CANCELLED)
+  if (job->state_value >= IPP_JOB_CANCELLED)
   {
     send_ipp_status(con, IPP_NOT_POSSIBLE,
                     _("Job #%d is already %s - can\'t cancel."), jobid,
-                   job->state->values[0].integer == IPP_JOB_CANCELLED ? "cancelled" :
-                   job->state->values[0].integer == IPP_JOB_ABORTED ? "aborted" :
+                   job->state_value == IPP_JOB_CANCELLED ? "cancelled" :
+                   job->state_value == IPP_JOB_ABORTED ? "aborted" :
                    "completed");
     return;
   }
@@ -2592,6 +2648,48 @@ cancel_subscription(
     cupsd_client_t *con,               /* I - Client connection */
     int            sub_id)             /* I - Subscription ID */
 {
+  http_status_t                status;         /* Policy status */
+  cupsd_subscription_t *sub;           /* Subscription */
+
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cancel_subscription(con=%p[%d], sub_id=%d)",
+                  con, con->http.fd, sub_id);
+
+ /*
+  * Is the subscription ID valid?
+  */
+
+  if ((sub = cupsdFindSubscription(sub_id)) == NULL)
+  {
+   /*
+    * Bad subscription ID...
+    */
+
+    send_ipp_status(con, IPP_NOT_FOUND,
+                    _("notify-subscription-id %d no good!"), sub_id);
+    return;
+  }
+
+ /*
+  * Check policy...
+  */
+
+  if ((status = cupsdCheckPolicy(sub->dest ? sub->dest->op_policy_ptr :
+                                             DefaultPolicyPtr,
+                                 con, sub->owner)) != HTTP_OK)
+  {
+    send_http_error(con, status);
+    return;
+  }
+
+ /*
+  * Cancel the subscription...
+  */
+
+  cupsdDeleteSubscription(sub, 1);
+
+  con->response->request.status.status_code = IPP_OK;
 }
 
 
@@ -3647,17 +3745,10 @@ copy_job_attrs(cupsd_client_t *con,     /* I - Client connection */
     ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_URI,
                 "job-more-info", NULL, job_uri);
 
-  if (job->state->values[0].integer > IPP_JOB_PROCESSING &&
+  if (job->state_value > IPP_JOB_PROCESSING &&
       (!ra || cupsArrayFind(ra, "job-preserved")))
-  {
-    char       filename[1024];         /* Job data file */
-
-
-    snprintf(filename, sizeof(filename), "%s/d%05d-001", RequestRoot,
-             job->id);
     ippAddBoolean(con->response, IPP_TAG_JOB, "job-preserved",
-                  !access(filename, 0));
-  }
+                  job->num_files > 0);
 
   if (!ra || cupsArrayFind(ra, "job-printer-up-time"))
     ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER,
@@ -4038,7 +4129,7 @@ create_job(cupsd_client_t  *con,  /* I - Client connection */
   * Make sure we aren't over our limit...
   */
 
-  if (cupsArrayCount(Jobs) >= MaxJobs && MaxJobs)
+  if (MaxJobs && cupsArrayCount(Jobs) >= MaxJobs)
     cupsdCleanJobs();
 
   if (cupsArrayCount(Jobs) >= MaxJobs && MaxJobs)
@@ -4083,6 +4174,8 @@ create_job(cupsd_client_t  *con,  /* I - Client connection */
   job->attrs   = con->request;
   con->request = NULL;
 
+  add_job_uuid(con, job);
+
   attr = ippFindAttribute(job->attrs, "requesting-user-name", IPP_TAG_NAME);
 
   if (con->username[0])
@@ -4200,6 +4293,7 @@ create_job(cupsd_client_t  *con,  /* I - Client connection */
   ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job->id);
   job->state = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_ENUM,
                              "job-state", IPP_JOB_STOPPED);
+  job->state_value = job->state->values[0].integer;
   job->sheets = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER,
                               "job-media-sheets-completed", 0);
   ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri", NULL,
@@ -4233,6 +4327,7 @@ create_job(cupsd_client_t  *con,  /* I - Client connection */
     job->hold_until = time(NULL) + 60;
 
   job->state->values[0].integer = IPP_JOB_HELD;
+  job->state_value              = IPP_JOB_HELD;
 
   if (!(printer->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)) ||
       Classification)
@@ -4395,7 +4490,7 @@ create_job(cupsd_client_t  *con,  /* I - Client connection */
   ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job->id);
 
   ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_ENUM, "job-state",
-                job->state->values[0].integer);
+                job->state_value);
 
   con->response->request.status.status_code = IPP_OK;
 
@@ -4641,6 +4736,17 @@ create_subscription(
   unsigned             mask;           /* notify-events */
 
 
+#ifdef DEBUG
+  for (attr = con->request->attrs; attr; attr = attr->next)
+  {
+    if (attr->group_tag != IPP_TAG_ZERO)
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "g%04x v%04x %s", attr->group_tag,
+                      attr->value_tag, attr->name);
+    else
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "----SEP----");
+  }
+#endif /* DEBUG */
+
  /*
   * Is the destination valid?
   */
@@ -4798,8 +4904,12 @@ create_subscription(
       attr = attr->next;
     }
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "recipient=\"%s\"", recipient);
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "pullmethod=\"%s\"", pullmethod);
+    if (recipient)
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "recipient=\"%s\"", recipient);
+    if (pullmethod)
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "pullmethod=\"%s\"", pullmethod);
+    cupsdLogMessage(CUPSD_LOG_DEBUG, "notify-lease-duration=%d", lease);
+    cupsdLogMessage(CUPSD_LOG_DEBUG, "notify-time-interval=%d", interval);
 
     if (!recipient && !pullmethod)
       break;
@@ -4818,7 +4928,7 @@ create_subscription(
       }
     }
 
-    if (MaxLeaseDuration && lease > MaxLeaseDuration)
+    if (MaxLeaseDuration && (lease == 0 || lease > MaxLeaseDuration))
     {
       cupsdLogMessage(CUPSD_LOG_INFO,
                       "create_subscription: Limiting notify-lease-duration to "
@@ -4853,7 +4963,7 @@ create_subscription(
 
     sub->interval = interval;
     sub->lease    = lease;
-    sub->expire   = time(NULL) + lease;
+    sub->expire   = lease ? time(NULL) + lease : 0;
 
     cupsdSetString(&sub->owner, username);
 
@@ -5223,6 +5333,8 @@ get_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
   * Copy attributes...
   */
 
+  cupsdLoadJob(job);
+
   ra = create_requested_array(con->request);
   copy_job_attrs(con, job, ra);
   cupsArrayDelete(ra);
@@ -5397,12 +5509,17 @@ get_jobs(cupsd_client_t  *con,          /* I - Client connection */
     if (username[0] && strcasecmp(username, job->username))
       continue;
 
-    if (completed && job->state->values[0].integer <= IPP_JOB_STOPPED)
+    if (completed && job->state_value <= IPP_JOB_STOPPED)
       continue;
 
     if (job->id < first_job_id)
       continue;
 
+    cupsdLoadJob(job);
+
+    if (!job->attrs)
+      continue;
+
     if (count > 0)
       ippAddSeparator(con->response);
 
@@ -5424,9 +5541,135 @@ get_jobs(cupsd_client_t  *con,          /* I - Client connection */
  */
 
 static void
-get_notifications(cupsd_client_t *con, /* I - Client connection */
-                  int            id)   /* I - Subscription ID */
+get_notifications(cupsd_client_t *con) /* I - Client connection */
 {
+  int                  i, j;           /* Looping vars */
+  http_status_t                status;         /* Policy status */
+  cupsd_subscription_t *sub;           /* Subscription */
+  ipp_attribute_t      *ids,           /* notify-subscription-ids */
+                       *sequences;     /* notify-sequence-numbers */
+  int                  min_seq;        /* Minimum sequence number */
+  int                  interval;       /* Poll interval */
+
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_subscription_attrs(con=%p[%d])",
+                  con, con->http.fd);
+
+ /*
+  * Get subscription attributes...
+  */
+
+  ids       = ippFindAttribute(con->request, "notify-subscription-ids",
+                               IPP_TAG_INTEGER);
+  sequences = ippFindAttribute(con->request, "notify-sequence-numbers",
+                               IPP_TAG_INTEGER);
+
+  if (!ids)
+  {
+    send_ipp_status(con, IPP_BAD_REQUEST,
+                    _("Missing notify-subscription-ids attribute!"));
+    return;
+  }
+
+ /*
+  * Are the subscription IDs valid?
+  */
+
+  for (i = 0, interval = 60; i < ids->num_values; i ++)
+  {
+    if ((sub = cupsdFindSubscription(ids->values[i].integer)) == NULL)
+    {
+     /*
+      * Bad subscription ID...
+      */
+
+      send_ipp_status(con, IPP_NOT_FOUND,
+                      _("notify-subscription-id %d no good!"),
+                     ids->values[i].integer);
+      return;
+    }
+
+   /*
+    * Check policy...
+    */
+
+    if ((status = cupsdCheckPolicy(sub->dest ? sub->dest->op_policy_ptr :
+                                               DefaultPolicyPtr,
+                                   con, sub->owner)) != HTTP_OK)
+    {
+      send_http_error(con, status);
+      return;
+    }
+
+   /*
+    * Check the subscription type and update the interval accordingly.
+    */
+
+    if (sub->job && sub->job->state_value == IPP_JOB_PROCESSING &&
+        interval > 10)
+      interval = 10;
+    else if (sub->job && sub->job->state_value >= IPP_JOB_STOPPED)
+      interval = 0;
+    else if (sub->dest && sub->dest->state == IPP_PRINTER_PROCESSING &&
+             interval > 30)
+      interval = 30;
+  }
+
+ /*
+  * Tell the client to poll again in N seconds...
+  */
+
+  if (interval > 0)
+    ippAddInteger(con->response, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
+                  "notify-get-interval", interval);
+
+  ippAddInteger(con->response, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
+                "printer-up-time", time(NULL));
+
+ /*
+  * Copy the subscription event attributes to the response.
+  */
+
+  con->response->request.status.status_code =
+      interval ? IPP_OK : IPP_OK_EVENTS_COMPLETE;
+
+  for (i = 0; i < ids->num_values; i ++)
+  {
+   /*
+    * Get the subscription and sequence number...
+    */
+
+    sub = cupsdFindSubscription(ids->values[i].integer);
+
+    if (sequences && i < sequences->num_values)
+      min_seq = sequences->values[i].integer;
+    else
+      min_seq = 1;
+
+   /*
+    * If we don't have any new events, nothing to do here...
+    */
+
+    if (min_seq > (sub->first_event_id + sub->num_events))
+      continue;
+
+   /*
+    * Otherwise copy all of the new events...
+    */
+
+    if (sub->first_event_id > min_seq)
+      j = 0;
+    else
+      j = min_seq - sub->first_event_id;
+
+    for (; j < sub->num_events; j ++)
+    {
+      ippAddSeparator(con->response);
+
+      copy_attrs(con->response, sub->events[j]->attrs, NULL,
+                IPP_TAG_EVENT_NOTIFICATION, 0);
+    }
+  }
 }
 
 
@@ -6072,9 +6315,7 @@ hold_job(cupsd_client_t  *con,            /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_ipp_status(con, IPP_FORBIDDEN,
-                    _("Not authorized to hold job #%d owned by \"%s\"!"),
-                    jobid, job->username);
+    send_http_error(con, HTTP_UNAUTHORIZED);
     return;
   }
 
@@ -6311,7 +6552,7 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
     * See if the job has been completed...
     */
 
-    if (job->state->values[0].integer > IPP_JOB_STOPPED)
+    if (job->state_value > IPP_JOB_STOPPED)
     {
      /*
       * Return a "not-possible" error...
@@ -6329,10 +6570,7 @@ move_job(cupsd_client_t  *con,           /* I - Client connection */
 
     if (!validate_user(job, con, job->username, username, sizeof(username)))
     {
-      send_ipp_status(con, IPP_FORBIDDEN,
-                      _("You are not authorized to move job #%d owned "
-                       "by \"%s\"!"),
-                      job->id, job->username);
+      send_http_error(con, HTTP_UNAUTHORIZED);
       return;
     }
 
@@ -6358,7 +6596,7 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
       */
 
       if (strcasecmp(job->dest, src) ||
-          job->state->values[0].integer > IPP_JOB_STOPPED)
+          job->state_value > IPP_JOB_STOPPED)
        continue;
 
      /*
@@ -6657,9 +6895,15 @@ print_job(cupsd_client_t  *con,          /* I - Client connection */
     * Auto-type the file...
     */
 
+    ipp_attribute_t    *doc_name;      /* document-name attribute */
+
+
     cupsdLogMessage(CUPSD_LOG_DEBUG, "print_job: auto-typing file...");
 
-    filetype = mimeFileType(MimeDatabase, con->filename, NULL, &compression);
+    doc_name = ippFindAttribute(con->request, "document-name", IPP_TAG_NAME);
+    filetype = mimeFileType(MimeDatabase, con->filename,
+                            doc_name ? doc_name->values[0].string.text : NULL,
+                           &compression);
 
     if (filetype)
     {
@@ -6772,7 +7016,7 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
   * Make sure we aren't over our limit...
   */
 
-  if (cupsArrayCount(Jobs) >= MaxJobs && MaxJobs)
+  if (MaxJobs && cupsArrayCount(Jobs) >= MaxJobs)
     cupsdCleanJobs();
 
   if (cupsArrayCount(Jobs) >= MaxJobs && MaxJobs)
@@ -6818,6 +7062,8 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
   job->attrs   = con->request;
   con->request = NULL;
 
+  add_job_uuid(con, job);
+
  /*
   * Copy the rest of the job info...
   */
@@ -6929,6 +7175,7 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
   ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job->id);
   job->state = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_ENUM,
                              "job-state", IPP_JOB_PENDING);
+  job->state_value = job->state->values[0].integer;
   job->sheets = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER,
                               "job-media-sheets-completed", 0);
   ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri", NULL,
@@ -6973,6 +7220,7 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
     */
 
     job->state->values[0].integer = IPP_JOB_HELD;
+    job->state_value              = IPP_JOB_HELD;
     cupsdSetJobHoldUntil(job, attr->values[0].string.text);
   }
 
@@ -7172,7 +7420,7 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
   ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job->id);
 
   ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_ENUM, "job-state",
-                job->state->values[0].integer);
+                job->state_value);
   add_job_state_reasons(con, job);
 
   con->response->request.status.status_code = IPP_OK;
@@ -7570,7 +7818,7 @@ release_job(cupsd_client_t  *con, /* I - Client connection */
   * See if job is "held"...
   */
 
-  if (job->state->values[0].integer != IPP_JOB_HELD)
+  if (job->state_value != IPP_JOB_HELD)
   {
    /*
     * Nope - return a "not possible" error...
@@ -7586,10 +7834,7 @@ release_job(cupsd_client_t  *con,        /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_ipp_status(con, IPP_FORBIDDEN,
-                    _("You are not authorized to release job id "
-                     "%d owned by \"%s\"!"),
-                    jobid, job->username);
+    send_http_error(con, HTTP_UNAUTHORIZED);
     return;
   }
 
@@ -7631,6 +7876,76 @@ renew_subscription(
     cupsd_client_t *con,               /* I - Client connection */
     int            sub_id)             /* I - Subscription ID */
 {
+  http_status_t                status;         /* Policy status */
+  cupsd_subscription_t *sub;           /* Subscription */
+  ipp_attribute_t      *lease;         /* notify-lease-duration */
+
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "renew_subscription(con=%p[%d], sub_id=%d)",
+                  con, con->http.fd, sub_id);
+
+ /*
+  * Is the subscription ID valid?
+  */
+
+  if ((sub = cupsdFindSubscription(sub_id)) == NULL)
+  {
+   /*
+    * Bad subscription ID...
+    */
+
+    send_ipp_status(con, IPP_NOT_FOUND,
+                    _("notify-subscription-id %d no good!"), sub_id);
+    return;
+  }
+
+  if (sub->job)
+  {
+   /*
+    * Job subscriptions cannot be renewed...
+    */
+
+    send_ipp_status(con, IPP_NOT_POSSIBLE,
+                    _("Job subscriptions cannot be renewed!"));
+    return;
+  }
+
+ /*
+  * Check policy...
+  */
+
+  if ((status = cupsdCheckPolicy(sub->dest ? sub->dest->op_policy_ptr :
+                                             DefaultPolicyPtr,
+                                 con, sub->owner)) != HTTP_OK)
+  {
+    send_http_error(con, status);
+    return;
+  }
+
+ /*
+  * Renew the subscription...
+  */
+
+  lease = ippFindAttribute(con->request, "notify-lease-duration",
+                           IPP_TAG_INTEGER);
+
+  sub->lease = lease ? lease->values[0].integer : DefaultLeaseDuration;
+
+  if (MaxLeaseDuration && (sub->lease == 0 || sub->lease > MaxLeaseDuration))
+  {
+    cupsdLogMessage(CUPSD_LOG_INFO,
+                    "renew_subscription: Limiting notify-lease-duration to "
+                   "%d seconds.",
+                   MaxLeaseDuration);
+    sub->lease = MaxLeaseDuration;
+  }
+
+  sub->expire = sub->lease ? time(NULL) + sub->lease : 0;
+
+  cupsdSaveAllSubscriptions();
+
+  con->response->request.status.status_code = IPP_OK;
 }
 
 
@@ -7718,7 +8033,7 @@ restart_job(cupsd_client_t  *con, /* I - Client connection */
   * See if job is in any of the "completed" states...
   */
 
-  if (job->state->values[0].integer <= IPP_JOB_PROCESSING)
+  if (job->state_value <= IPP_JOB_PROCESSING)
   {
    /*
     * Nope - return a "not possible" error...
@@ -7733,7 +8048,9 @@ restart_job(cupsd_client_t  *con, /* I - Client connection */
   * See if we have retained the job files...
   */
 
-  if (!JobFiles && job->state->values[0].integer > IPP_JOB_STOPPED)
+  cupsdLoadJob(job);
+
+  if (!job->attrs ||job->num_files == 0)
   {
    /*
     * Nope - return a "not possible" error...
@@ -7750,10 +8067,7 @@ restart_job(cupsd_client_t  *con,        /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_ipp_status(con, IPP_FORBIDDEN,
-                    _("You are not authorized to restart job id "
-                     "%d owned by \"%s\"!"),
-                    jobid, job->username);
+    send_http_error(con, HTTP_UNAUTHORIZED);
     return;
   }
 
@@ -7960,10 +8274,7 @@ send_document(cupsd_client_t  *con,      /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_ipp_status(con, IPP_FORBIDDEN,
-                    _("You are not authorized to send document "
-                     "for job #%d owned by \"%s\"!"),
-                    jobid, job->username);
+    send_http_error(con, HTTP_UNAUTHORIZED);
     return;
   }
 
@@ -8040,9 +8351,15 @@ send_document(cupsd_client_t  *con,      /* I - Client connection */
     * Auto-type the file...
     */
 
+    ipp_attribute_t    *doc_name;      /* document-name attribute */
+
+
     cupsdLogMessage(CUPSD_LOG_DEBUG, "send_document: auto-typing file...");
 
-    filetype = mimeFileType(MimeDatabase, con->filename, NULL, &compression);
+    doc_name = ippFindAttribute(con->request, "document-name", IPP_TAG_NAME);
+    filetype = mimeFileType(MimeDatabase, con->filename,
+                            doc_name ? doc_name->values[0].string.text : NULL,
+                           &compression);
 
     if (filetype)
     {
@@ -8090,6 +8407,8 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
   * Add the file to the job...
   */
 
+  cupsdLoadJob(job);
+
   if (add_file(con, job, filetype, compression))
     return;
 
@@ -8150,16 +8469,22 @@ send_document(cupsd_client_t  *con,     /* I - Client connection */
       cupsdUpdateQuota(printer, job->username, 0, kbytes);
     }
 
-    if (job->state->values[0].integer == IPP_JOB_STOPPED)
+    if (job->state_value == IPP_JOB_STOPPED)
+    {
       job->state->values[0].integer = IPP_JOB_PENDING;
-    else if (job->state->values[0].integer == IPP_JOB_HELD)
+      job->state_value              = IPP_JOB_PENDING;
+    }
+    else if (job->state_value == IPP_JOB_HELD)
     {
       if ((attr = ippFindAttribute(job->attrs, "job-hold-until",
                                    IPP_TAG_KEYWORD)) == NULL)
        attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
 
       if (!attr || !strcmp(attr->values[0].string.text, "no-hold"))
+      {
        job->state->values[0].integer = IPP_JOB_PENDING;
+       job->state_value              = IPP_JOB_PENDING;
+      }
     }
 
     cupsdSaveJob(job);
@@ -8184,6 +8509,7 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
     if (!attr || !strcmp(attr->values[0].string.text, "no-hold"))
     {
       job->state->values[0].integer = IPP_JOB_HELD;
+      job->state_value              = IPP_JOB_HELD;
       job->hold_until               = time(NULL) + 60;
       cupsdSaveJob(job);
     }
@@ -8202,7 +8528,7 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
   ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", jobid);
 
   ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_ENUM, "job-state",
-                job ? job->state->values[0].integer : IPP_JOB_CANCELLED);
+                job ? job->state_value : IPP_JOB_CANCELLED);
   add_job_state_reasons(con, job);
 
   con->response->request.status.status_code = IPP_OK;
@@ -8453,7 +8779,7 @@ set_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
   * See if the job has been completed...
   */
 
-  if (job->state->values[0].integer > IPP_JOB_STOPPED)
+  if (job->state_value > IPP_JOB_STOPPED)
   {
    /*
     * Return a "not-possible" error...
@@ -8470,10 +8796,7 @@ set_job_attrs(cupsd_client_t  *con,      /* I - Client connection */
 
   if (!validate_user(job, con, job->username, username, sizeof(username)))
   {
-    send_ipp_status(con, IPP_FORBIDDEN,
-                    _("You are not authorized to alter job id "
-                     "%d owned by \"%s\"!"),
-                    jobid, job->username);
+    send_http_error(con, HTTP_UNAUTHORIZED);
     return;
   }
 
@@ -8481,6 +8804,8 @@ set_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
   * See what the user wants to change.
   */
 
+  cupsdLoadJob(job);
+
   for (attr = con->request->attrs; attr; attr = attr->next)
   {
     if (attr->group_tag != IPP_TAG_JOB || !attr->name)
@@ -8537,7 +8862,7 @@ set_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
        if ((attr2 = copy_attribute(con->response, attr, 0)) != NULL)
           attr2->group_tag = IPP_TAG_UNSUPPORTED_GROUP;
       }
-      else if (job->state->values[0].integer >= IPP_JOB_PROCESSING)
+      else if (job->state_value >= IPP_JOB_PROCESSING)
       {
        send_ipp_status(con, IPP_NOT_POSSIBLE,
                        _("Job is completed and cannot be changed."));
@@ -8565,19 +8890,22 @@ set_job_attrs(cupsd_client_t  *con,     /* I - Client connection */
        {
          case IPP_JOB_PENDING :
          case IPP_JOB_HELD :
-             if (job->state->values[0].integer > IPP_JOB_HELD)
+             if (job->state_value > IPP_JOB_HELD)
              {
                send_ipp_status(con, IPP_NOT_POSSIBLE,
                                _("Job state cannot be changed."));
                return;
              }
               else if (con->response->request.status.status_code == IPP_OK)
+             {
                job->state->values[0].integer = attr->values[0].integer;
+               job->state_value              = attr->values[0].integer;
+             }
              break;
 
          case IPP_JOB_PROCESSING :
          case IPP_JOB_STOPPED :
-             if (job->state->values[0].integer != attr->values[0].integer)
+             if (job->state_value != attr->values[0].integer)
              {
                send_ipp_status(con, IPP_NOT_POSSIBLE,
                                _("Job state cannot be changed."));
@@ -8588,7 +8916,7 @@ set_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
          case IPP_JOB_CANCELLED :
          case IPP_JOB_ABORTED :
          case IPP_JOB_COMPLETED :
-             if (job->state->values[0].integer > IPP_JOB_PROCESSING)
+             if (job->state_value > IPP_JOB_PROCESSING)
              {
                send_ipp_status(con, IPP_NOT_POSSIBLE,
                                _("Job state cannot be changed."));
@@ -8601,6 +8929,7 @@ set_job_attrs(cupsd_client_t  *con,       /* I - Client connection */
                if (JobHistory)
                {
                   job->state->values[0].integer = attr->values[0].integer;
+                  job->state_value              = attr->values[0].integer;
                  cupsdSaveJob(job);
                }
              }
@@ -9084,5 +9413,5 @@ validate_user(cupsd_job_t    *job,        /* I - Job */
 
 
 /*
- * End of "$Id: ipp.c 5051 2006-02-02 16:13:16Z mike $".
+ * End of "$Id: ipp.c 5131 2006-02-18 05:31:36Z mike $".
  */
index cdeaec6d689672a31965aba78154c551d07c2449..0c65f3e34b91bdbf3f717c43df0085f1823ebb3e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: job.c 5051 2006-02-02 16:13:16Z mike $"
+ * "$Id: job.c 5131 2006-02-18 05:31:36Z mike $"
  *
  *   Job management routines for the Common UNIX Printing System (CUPS).
  *
  *
  *   cupsdAddJob()              - Add a new job to the job queue...
  *   cupsdCancelJob()           - Cancel the specified print job.
- *   cupsdCancelJobs()          - Cancel all jobs for the given destination/user...
- *   cupsdCheckJobs()           - Check the pending jobs and start any if the
- *                                destination is available.
+ *   cupsdCancelJobs()          - Cancel all jobs for the given
+ *                                destination/user...
+ *   cupsdCheckJobs()           - Check the pending jobs and start any if
+ *                                the destination is available.
  *   cupsdCleanJobs()           - Clean out old jobs.
+ *   cupsdFinishJob()           - Finish a job.
  *   cupsdFreeAllJobs()         - Free all jobs from memory.
  *   cupsdFindJob()             - Find the specified job.
  *   cupsdGetPrinterJobCount()  - Get the number of pending, processing,
- *                                or held jobs in a printer or class.
  *   cupsdGetUserJobCount()     - Get the number of pending, processing,
- *                                or held jobs for a user.
  *   cupsdHoldJob()             - Hold the specified job.
  *   cupsdLoadAllJobs()         - Load all jobs from disk.
+ *   cupsdLoadJob()             - Load a single job...
  *   cupsdMoveJob()             - Move the specified job to a different
  *                                destination.
  *   cupsdReleaseJob()          - Release the specified job.
  *   cupsdRestartJob()          - Restart the specified job.
+ *   cupsdSaveAllJobs()         - Save a summary of all jobs to disk.
  *   cupsdSaveJob()             - Save a job to disk.
  *   cupsdSetJobHoldUntil()     - Set the hold time for a job...
- *   cupsdSetJobPriority()      - Set the priority of a job, moving it up/down
- *                                in the list as needed.
+ *   cupsdSetJobPriority()      - Set the priority of a job, moving it
+ *                                up/down in the list as needed.
  *   cupsdStartJob()            - Start a print job.
  *   cupsdStopAllJobs()         - Stop all print jobs.
  *   cupsdStopJob()             - Stop a print job.
- *   cupsdUpdateJob()           - Read a status update from a job's filters.
- *   compare_active_jobs()      - Compare the job IDs and priorities of two jobs.
+ *   cupsdUnloadCompletedJobs() - Flush completed job history from memory.
+ *   cupsdUnloadJob()           - Unload a job from memory.
+ *   cupsdUpdateJob()           - Read a status update from a jobs filters.
+ *   compare_active_jobs()      - Compare the job IDs and priorities of two
+ *                                jobs.
  *   compare_jobs()             - Compare the job IDs of two jobs.
- *   ipp_length()               - Compute the size of the buffer needed to hold 
- *                               the textual IPP attributes.
- *   set_hold_until()           - Set the hold time and update job-hold-until attribute.
+ *   free_job()                 - Free all memory used by a job.
+ *   ipp_length()               - Compute the size of the buffer needed to
+ *                                hold the textual IPP attributes.
+ *   load_job_cache()           - Load jobs from the job.cache file.
+ *   load_next_job_id()         - Load the NextJobId value from the
+ *                                job.cache file.
+ *   load_request_root()        - Load jobs from the RequestRoot directory.
+ *   set_time()                 - Set one of the "time-at-xyz" attributes...
+ *   set_hold_until()           - Set the hold time and update job-hold-until
+ *                                attribute...
  */
 
 /*
@@ -85,7 +97,11 @@ static mime_filter_t gziptoany_filter =
 
 static int     compare_active_jobs(void *first, void *second, void *data);
 static int     compare_jobs(void *first, void *second, void *data);
+static void    free_job(cupsd_job_t *job);
 static int     ipp_length(ipp_t *ipp);
+static void    load_job_cache(const char *filename);
+static void    load_next_job_id(const char *filename);
+static void    load_request_root(void);
 static void    set_time(cupsd_job_t *job, const char *name);
 static void    set_hold_until(cupsd_job_t *job, time_t holdtime);
 
@@ -135,35 +151,37 @@ cupsdCancelJob(cupsd_job_t *job,  /* I - Job to cancel */
   char         filename[1024];         /* Job filename */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdCancelJob: id = %d", job->id);
-
- /*
-  * Remove the job from the active list...
-  */
-
-  cupsArrayRemove(ActiveJobs, job);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdCancelJob: id = %d", job->id);
 
  /*
   * Stop any processes that are working on the current job...
   */
 
-  if (job->state->values[0].integer == IPP_JOB_PROCESSING)
+  if (job->state_value == IPP_JOB_PROCESSING)
     cupsdStopJob(job, 0);
 
-  cupsArrayRemove(ActiveJobs, job);
+  cupsdLoadJob(job);
+
+  if (job->attrs)
+    job->state->values[0].integer = IPP_JOB_CANCELLED;
 
-  job->state->values[0].integer = IPP_JOB_CANCELLED;
+  job->state_value = IPP_JOB_CANCELLED;
 
   set_time(job, "time-at-completed");
 
   cupsdExpireSubscriptions(NULL, job);
 
+ /*
+  * Remove the job from the active list...
+  */
+
+  cupsArrayRemove(ActiveJobs, job);
+
  /*
   * Remove any authentication data...
   */
 
-  snprintf(filename, sizeof(filename), "%s/a%05d", RequestRoot,
-          job->id);
+  snprintf(filename, sizeof(filename), "%s/a%05d", RequestRoot, job->id);
   unlink(filename);
 
  /*
@@ -173,8 +191,8 @@ cupsdCancelJob(cupsd_job_t *job,    /* I - Job to cancel */
 
   job->current_file = 0;
 
-  if (!JobHistory || !JobFiles || purge ||
-      (job->dtype & CUPS_PRINTER_REMOTE))
+  if (!JobHistory || !JobFiles || purge || (job->dtype & CUPS_PRINTER_REMOTE))
+  {
     for (i = 1; i <= job->num_files; i ++)
     {
       snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot,
@@ -182,6 +200,17 @@ cupsdCancelJob(cupsd_job_t *job,   /* I - Job to cancel */
       unlink(filename);
     }
 
+    if (job->num_files > 0)
+    {
+      free(job->filetypes);
+      free(job->compressions);
+
+      job->num_files    = 0;
+      job->filetypes    = NULL;
+      job->compressions = NULL;
+    }
+  }
+
   if (JobHistory && !purge && !(job->dtype & CUPS_PRINTER_REMOTE))
   {
    /*
@@ -210,19 +239,7 @@ cupsdCancelJob(cupsd_job_t *job,   /* I - Job to cancel */
     * Free all memory used...
     */
 
-    if (job->attrs != NULL)
-      ippDelete(job->attrs);
-
-    if (job->num_files > 0)
-    {
-      free(job->compressions);
-      free(job->filetypes);
-    }
-
-    cupsdClearString(&job->username);
-    cupsdClearString(&job->dest);
-
-    free(job);
+    free_job(job);
   }
 }
 
@@ -274,6 +291,10 @@ cupsdCheckJobs(void)
 
   DEBUG_puts("cupsdCheckJobs()");
 
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdCheckJobs: %d active jobs, sleeping=%d, reload=%d",
+                  cupsArrayCount(ActiveJobs), Sleeping, NeedReload);
+
   for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
        job;
        job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
@@ -282,17 +303,23 @@ cupsdCheckJobs(void)
     * Start held jobs if they are ready...
     */
 
-    if (job->state->values[0].integer == IPP_JOB_HELD &&
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdCheckJobs: Job %d: state_value=%d, loaded=%s",
+                    job->id, job->state_value, job->attrs ? "yes" : "no");
+
+    if (job->state_value == IPP_JOB_HELD &&
         job->hold_until &&
        job->hold_until < time(NULL))
+    {
       job->state->values[0].integer = IPP_JOB_PENDING;
+      job->state_value              = IPP_JOB_PENDING;
+    }
 
    /*
     * Start pending jobs if the destination is available...
     */
 
-    if (job->state->values[0].integer == IPP_JOB_PENDING && !NeedReload &&
-        !Sleeping)
+    if (job->state_value == IPP_JOB_PENDING && !NeedReload && !Sleeping)
     {
       printer = cupsdFindDest(job->dest);
       pclass  = NULL;
@@ -327,7 +354,8 @@ cupsdCheckJobs(void)
                        job->dest, job->id);
 
        cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                      "Job canceled because the destination printer/class has gone away.");
+                      "Job canceled because the destination printer/class has "
+                     "gone away.");
 
         cupsdCancelJob(job, 1);
       }
@@ -358,7 +386,7 @@ cupsdCheckJobs(void)
 
         if (printer->state == IPP_PRINTER_IDLE ||      /* Printer is idle */
            ((printer->type & CUPS_PRINTER_REMOTE) &&   /* Printer is remote */
-            !printer->job))                            /* and not printing a job */
+            !printer->job))                            /* and not printing */
          cupsdStartJob(job, printer);
       }
     }
@@ -376,13 +404,13 @@ cupsdCleanJobs(void)
   cupsd_job_t  *job;                   /* Current job */
 
 
-  if (!MaxJobs)
+  if (MaxJobs <= 0)
     return;
 
   for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
        job && cupsArrayCount(Jobs) >= MaxJobs;
        job = (cupsd_job_t *)cupsArrayNext(Jobs))
-    if (job->state->values[0].integer >= IPP_JOB_CANCELLED)
+    if (job->state_value >= IPP_JOB_CANCELLED)
       cupsdCancelJob(job, 1);
 }
 
@@ -398,8 +426,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
   cupsd_printer_t      *printer;       /* Current printer */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,
-                  "cupsdFinishJob: job %d, file %d is complete.",
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] File %d is complete.",
                   job->id, job->current_file - 1);
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdFinishJob: job->status is %d",
@@ -445,6 +472,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
 
          cupsdStopJob(job, 0);
          job->state->values[0].integer = IPP_JOB_PENDING;
+         job->state_value              = IPP_JOB_PENDING;
          cupsdSaveJob(job);
 
         /*
@@ -471,11 +499,13 @@ cupsdFinishJob(cupsd_job_t *job)  /* I - Job */
              */
 
              cupsdLogMessage(CUPSD_LOG_ERROR,
-                             "Canceling job %d since it could not be sent after %d tries.",
+                             "Canceling job %d since it could not be sent "
+                             "after %d tries.",
                              job->id, JobRetryLimit);
 
-             cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                           "Job canceled since it could not be sent after %d tries.",
+             cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
+                           "Job canceled since it could not be sent after %d "
+                           "tries.",
                            JobRetryLimit);
 
              cupsdCancelJob(job, 0);
@@ -545,7 +575,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
 
     cupsdStopJob(job, 1);
     cupsdSaveJob(job);
-    cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, job->printer, job,
+    cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, printer, job,
                   "Job stopped due to filter errors; please consult the "
                  "error_log file for details.");
     cupsdCheckJobs();
@@ -563,7 +593,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
       */
 
       FilterLevel -= job->cost;
-      cupsdStartJob(job, job->printer);
+      cupsdStartJob(job, printer);
     }
     else
     {
@@ -571,7 +601,7 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
       * Close out this job...
       */
 
-      cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
+      cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, printer, job,
                     "Job completed successfully.");
 
       job_history = JobHistory && !(job->dtype & CUPS_PRINTER_REMOTE);
@@ -581,15 +611,18 @@ cupsdFinishJob(cupsd_job_t *job)  /* I - Job */
       if (job_history)
       {
         job->state->values[0].integer = IPP_JOB_COMPLETED;
+        job->state_value              = IPP_JOB_COMPLETED;
        cupsdSaveJob(job);
       }
 
      /*
-      * Clear the printer's state_message and move on...
+      * Clear the printer's state_message and state_reasons and move on...
       */
 
       printer->state_message[0] = '\0';
 
+      cupsdSetPrinterReasons(printer, "");
+
       cupsdCheckJobs();
     }
   }
@@ -606,9 +639,13 @@ cupsdFreeAllJobs(void)
   cupsd_job_t  *job;                   /* Current job */
 
 
+  if (!Jobs)
+    return;
+
   cupsdHoldSignals();
 
   cupsdStopAllJobs();
+  cupsdSaveAllJobs();
 
   for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
        job;
@@ -617,15 +654,7 @@ cupsdFreeAllJobs(void)
     cupsArrayRemove(Jobs, job);
     cupsArrayRemove(ActiveJobs, job);
 
-    ippDelete(job->attrs);
-
-    if (job->num_files > 0)
-    {
-      free(job->compressions);
-      free(job->filetypes);
-    }
-
-    free(job);
+    free_job(job);
   }
 
   cupsdReleaseSignals();
@@ -664,7 +693,7 @@ cupsdGetPrinterJobCount(
   for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs), count = 0;
        job;
        job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-    if (!strcasecmp(job->dest, dest))
+    if (job->dest && !strcasecmp(job->dest, dest))
       count ++;
 
   return (count);
@@ -701,14 +730,17 @@ cupsdGetUserJobCount(
 void
 cupsdHoldJob(cupsd_job_t *job)         /* I - Job data */
 {
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdHoldJob: id = %d", job->id);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdHoldJob: id = %d", job->id);
 
-  if (job->state->values[0].integer == IPP_JOB_PROCESSING)
+  if (job->state_value == IPP_JOB_PROCESSING)
     cupsdStopJob(job, 0);
+  else
+    cupsdLoadJob(job);
 
   DEBUG_puts("cupsdHoldJob: setting state to held...");
 
   job->state->values[0].integer = IPP_JOB_HELD;
+  job->state_value              = IPP_JOB_HELD;
 
   cupsdSaveJob(job);
 
@@ -723,30 +755,14 @@ cupsdHoldJob(cupsd_job_t *job)            /* I - Job data */
 void
 cupsdLoadAllJobs(void)
 {
-  cups_dir_t           *dir;           /* Directory */
-  cups_dentry_t                *dent;          /* Directory entry */
-  char                 filename[1024]; /* Full filename of job file */
-  cups_file_t          *fp;            /* Job file */
-  cupsd_job_t          *job;           /* New job */
-  int                  jobid,          /* Current job ID */
-                       fileid;         /* Current file ID */
-  ipp_attribute_t      *attr;          /* Job attribute */
-  char                 method[HTTP_MAX_URI],
-                                       /* Method portion of URI */
-                       username[HTTP_MAX_URI],
-                                       /* Username portion of URI */
-                       host[HTTP_MAX_URI],
-                                       /* Host portion of URI */
-                       resource[HTTP_MAX_URI];
-                                       /* Resource portion of URI */
-  int                  port;           /* Port portion of URI */
-  const char           *dest;          /* Destination */
-  mime_type_t          **filetypes;    /* New filetypes array */
-  int                  *compressions;  /* New compressions array */
+  char         filename[1024];         /* Full filename of job.cache file */
+  struct stat  fileinfo,               /* Information on job.cache file */
+               dirinfo;                /* Information on RequestRoot dir */
+
 
 
  /*
-  * First create the job lists...
+  * Create the job arrays as needed...
   */
 
   if (!Jobs)
@@ -756,234 +772,251 @@ cupsdLoadAllJobs(void)
     ActiveJobs = cupsArrayNew(compare_active_jobs, NULL);
 
  /*
-  * Then open the requests directory...
+  * See whether the job.cache file is older than the RequestRoot directory...
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdLoadAllJobs: Scanning %s...",
-                  RequestRoot);
+  snprintf(filename, sizeof(filename), "%s/job.cache", CacheDir);
 
-  if ((dir = cupsDirOpen(RequestRoot)) == NULL)
+  if (stat(filename, &fileinfo))
   {
-    cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "cupsdLoadAllJobs: Unable to open spool directory %s: %s",
-                    RequestRoot, strerror(errno));
-    return;
+    fileinfo.st_mtime = 0;
+
+    if (errno != ENOENT)
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to get file information for \"%s\" - %s",
+                     filename, strerror(errno));
+  }
+
+  if (stat(RequestRoot, &dirinfo))
+  {
+    dirinfo.st_mtime = 0;
+
+    if (errno != ENOENT)
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to get directory information for \"%s\" - %s",
+                     RequestRoot, strerror(errno));
   }
 
  /*
-  * Read all the c##### files...
+  * Load the most recent source for job data...
   */
 
-  while ((dent = cupsDirRead(dir)) != NULL)
-    if (strlen(dent->filename) >= 6 && dent->filename[0] == 'c')
-    {
-     /*
-      * Allocate memory for the job...
-      */
+  if (dirinfo.st_mtime > fileinfo.st_mtime)
+  {
+    load_request_root();
 
-      if ((job = calloc(sizeof(cupsd_job_t), 1)) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Ran out of memory for jobs!");
-       cupsDirClose(dir);
-       return;
-      }
+    load_next_job_id(filename);
+  }
+  else
+    load_job_cache(filename);
 
-      if ((job->attrs = ippNew()) == NULL)
-      {
-        free(job);
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Ran out of memory for job attributes!");
-       cupsDirClose(dir);
-       return;
-      }
+ /*
+  * Clean out old jobs as needed...
+  */
 
-     /*
-      * Assign the job ID...
-      */
+  if (MaxJobs > 0 && cupsArrayCount(Jobs) >= MaxJobs)
+    cupsdCleanJobs();
+}
 
-      job->id             = atoi(dent->filename + 1);
-      job->back_pipes[0]  = -1;
-      job->back_pipes[1]  = -1;
-      job->print_pipes[0] = -1;
-      job->print_pipes[1] = -1;
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG,
-                      "cupsdLoadAllJobs: Loading attributes for job %d...",
-                      job->id);
+/*
+ * 'cupsdLoadJob()' - Load a single job...
+ */
 
-      if (job->id >= NextJobId)
-        NextJobId = job->id + 1;
+void
+cupsdLoadJob(cupsd_job_t *job)         /* I - Job */
+{
+  char                 jobfile[1024];  /* Job filename */
+  cups_file_t          *fp;            /* Job file */
+  int                  fileid;         /* Current file ID */
+  ipp_attribute_t      *attr;          /* Job attribute */
+  char                 scheme[32],     /* Scheme portion of URI */
+                       username[64],   /* Username portion of URI */
+                       host[HTTP_MAX_HOST],
+                                       /* Host portion of URI */
+                       resource[HTTP_MAX_URI];
+                                       /* Resource portion of URI */
+  int                  port;           /* Port portion of URI */
+  const char           *dest;          /* Destination */
+  mime_type_t          **filetypes;    /* New filetypes array */
+  int                  *compressions;  /* New compressions array */
 
-     /*
-      * Load the job control file...
-      */
 
-      snprintf(filename, sizeof(filename), "%s/%s", RequestRoot, dent->filename);
-      if ((fp = cupsFileOpen(filename, "r")) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Unable to open job control file "
-                       "\"%s\" - %s!",
-                       filename, strerror(errno));
-       ippDelete(job->attrs);
-       free(job);
-       unlink(filename);
-       continue;
-      }
-      else
-      {
-        if (ippReadIO(fp, (ipp_iocb_t)cupsFileRead, 1, NULL,
-                     job->attrs) != IPP_DATA)
-       {
-          cupsdLogMessage(CUPSD_LOG_ERROR,
-                         "cupsdLoadAllJobs: Unable to read job control file "
-                         "\"%s\"!",
-                         filename);
-         cupsFileClose(fp);
-         ippDelete(job->attrs);
-         free(job);
-         unlink(filename);
-         continue;
-       }
+  if (job->attrs)
+  {
+    if (job->state_value >= IPP_JOB_STOPPED)
+      job->access_time = time(NULL);
 
-       cupsFileClose(fp);
-      }
+    return;
+  }
 
-      if ((job->state = ippFindAttribute(job->attrs, "job-state", IPP_TAG_ENUM)) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Missing or bad job-state attribute "
-                       "in control file \"%s\"!",
-                       filename);
-       ippDelete(job->attrs);
-       free(job);
-       unlink(filename);
-       continue;
-      }
+  if ((job->attrs = ippNew()) == NULL)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR, "Ran out of memory for job attributes!");
+    return;
+  }
 
-      if ((attr = ippFindAttribute(job->attrs, "job-printer-uri", IPP_TAG_URI)) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: No job-printer-uri attribute in "
-                       "control file \"%s\"!",
-                       filename);
-       ippDelete(job->attrs);
-       free(job);
-       unlink(filename);
-       continue;
-      }
+ /*
+  * Load job attributes...
+  */
 
-      httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[0].string.text, method,
-                      sizeof(method), username, sizeof(username), host,
-                     sizeof(host), &port, resource, sizeof(resource));
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "Loading attributes for job %d...",
+                  job->id);
 
-      if ((dest = cupsdValidateDest(host, resource, &(job->dtype),
-                                    NULL)) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Unable to queue job for destination "
-                       "\"%s\"!",
-                       attr->values[0].string.text);
-       ippDelete(job->attrs);
-       free(job);
-       unlink(filename);
-       continue;
-      }
+  snprintf(jobfile, sizeof(jobfile), "%s/c%05d", RequestRoot, job->id);
+  if ((fp = cupsFileOpen(jobfile, "r")) == NULL)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR,
+                   "Unable to open job control file \"%s\" - %s!",
+                   jobfile, strerror(errno));
+    ippDelete(job->attrs);
+    job->attrs = NULL;
+    return;
+  }
 
-      cupsdSetString(&job->dest, dest);
+  if (ippReadIO(fp, (ipp_iocb_t)cupsFileRead, 1, NULL, job->attrs) != IPP_DATA)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to read job control file \"%s\"!",
+                   jobfile);
+    cupsFileClose(fp);
+    ippDelete(job->attrs);
+    job->attrs = NULL;
+    unlink(jobfile);
+    return;
+  }
 
-      job->sheets     = ippFindAttribute(job->attrs, "job-media-sheets-completed",
-                                         IPP_TAG_INTEGER);
-      job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
+  cupsFileClose(fp);
 
-      if ((attr = ippFindAttribute(job->attrs, "job-priority",
-                                   IPP_TAG_INTEGER)) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Missing or bad job-priority "
-                       "attribute in control file \"%s\"!",
-                       filename);
-       ippDelete(job->attrs);
-       free(job);
-       unlink(filename);
-       continue;
-      }
-      job->priority = attr->values[0].integer;
+ /*
+  * Copy attribute data to the job object...
+  */
 
-      if ((attr = ippFindAttribute(job->attrs, "job-originating-user-name",
-                                   IPP_TAG_NAME)) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Missing or bad "
-                       "job-originating-user-name attribute in control file "
-                       "\"%s\"!",
-                       filename);
-       ippDelete(job->attrs);
-       free(job);
-       unlink(filename);
-       continue;
-      }
-      cupsdSetString(&job->username, attr->values[0].string.text);
+  if ((job->state = ippFindAttribute(job->attrs, "job-state",
+                                     IPP_TAG_ENUM)) == NULL)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR,
+                   "Missing or bad job-state attribute in control "
+                   "file \"%s\"!",
+                   jobfile);
+    ippDelete(job->attrs);
+    job->attrs = NULL;
+    unlink(jobfile);
+    return;
+  }
 
-     /*
-      * Insert the job into the array, sorting by job priority and ID...
-      */
+  job->state_value = (ipp_jstate_t)job->state->values[0].integer;
 
-      cupsArrayAdd(Jobs, job);
-      if (job->state->values[0].integer < IPP_JOB_STOPPED)
-        cupsArrayAdd(ActiveJobs,job);
+  if (!job->dest)
+  {
+    if ((attr = ippFindAttribute(job->attrs, "job-printer-uri",
+                                 IPP_TAG_URI)) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "No job-printer-uri attribute in control file \"%s\"!",
+                     jobfile);
+      ippDelete(job->attrs);
+      job->attrs = NULL;
+      unlink(jobfile);
+      return;
+    }
 
-     /*
-      * Set the job hold-until time and state...
-      */
+    httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[0].string.text, scheme,
+                    sizeof(scheme), username, sizeof(username), host,
+                   sizeof(host), &port, resource, sizeof(resource));
 
-      if (job->state->values[0].integer == IPP_JOB_HELD)
-      {
-       if ((attr = ippFindAttribute(job->attrs, "job-hold-until",
-                                    IPP_TAG_KEYWORD)) == NULL)
-          attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
+    if ((dest = cupsdValidateDest(host, resource, &(job->dtype),
+                                  NULL)) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "Unable to queue job for destination \"%s\"!",
+                     attr->values[0].string.text);
+      ippDelete(job->attrs);
+      job->attrs = NULL;
+      unlink(jobfile);
+      return;
+    }
 
-        if (attr == NULL)
-          job->state->values[0].integer = IPP_JOB_PENDING;
-       else
-          cupsdSetJobHoldUntil(job, attr->values[0].string.text);
-      }
-      else if (job->state->values[0].integer == IPP_JOB_PROCESSING)
-        job->state->values[0].integer = IPP_JOB_PENDING;
+    cupsdSetString(&job->dest, dest);
+  }
+
+  job->sheets     = ippFindAttribute(job->attrs, "job-media-sheets-completed",
+                                     IPP_TAG_INTEGER);
+  job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
+
+  if (!job->priority)
+  {
+    if ((attr = ippFindAttribute(job->attrs, "job-priority",
+                                IPP_TAG_INTEGER)) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "Missing or bad job-priority attribute in control "
+                     "file \"%s\"!", jobfile);
+      ippDelete(job->attrs);
+      job->attrs = NULL;
+      unlink(jobfile);
+      return;
+    }
+
+    job->priority = attr->values[0].integer;
+  }
+
+  if (!job->username)
+  {
+    if ((attr = ippFindAttribute(job->attrs, "job-originating-user-name",
+                                IPP_TAG_NAME)) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "Missing or bad job-originating-user-name attribute "
+                     "in control file \"%s\"!", jobfile);
+      ippDelete(job->attrs);
+      job->attrs = NULL;
+      unlink(jobfile);
+      return;
     }
 
+    cupsdSetString(&job->username, attr->values[0].string.text);
+  }
+
  /*
-  * Read all the d##### files...
+  * Set the job hold-until time and state...
   */
 
-  cupsDirRewind(dir);
+  if (job->state_value == IPP_JOB_HELD)
+  {
+    if ((attr = ippFindAttribute(job->attrs, "job-hold-until",
+                                IPP_TAG_KEYWORD)) == NULL)
+      attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
 
-  while ((dent = cupsDirRead(dir)) != NULL)
-    if (strlen(dent->filename) > 7 && dent->filename[0] == 'd' &&
-        strchr(dent->filename, '-'))
+    if (attr)
+      cupsdSetJobHoldUntil(job, attr->values[0].string.text);
+    else
     {
-     /*
-      * Find the job...
-      */
+      job->state->values[0].integer = IPP_JOB_PENDING;
+      job->state_value              = IPP_JOB_PENDING;
+    }
+  }
+  else if (job->state_value == IPP_JOB_PROCESSING)
+  {
+    job->state->values[0].integer = IPP_JOB_PENDING;
+    job->state_value              = IPP_JOB_PENDING;
+  }
 
-      jobid  = atoi(dent->filename + 1);
-      fileid = atoi(strchr(dent->filename, '-') + 1);
+  if (!job->num_files)
+  {
+   /*
+    * Find all the d##### files...
+    */
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG,
-                      "cupsdLoadAllJobs: Auto-typing document file %s...",
-                      dent->filename);
+    for (fileid = 1; fileid < 10000; fileid ++)
+    {
+      snprintf(jobfile, sizeof(jobfile), "%s/d%05d-%03d", RequestRoot,
+               job->id, fileid);
 
-      snprintf(filename, sizeof(filename), "%s/%s", RequestRoot, dent->filename);
+      if (access(jobfile, 0))
+        break;
 
-      if ((job = cupsdFindJob(jobid)) == NULL)
-      {
-        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdLoadAllJobs: Orphaned print file \"%s\"!",
-                       filename);
-        unlink(filename);
-       continue;
-      }
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "Auto-typing document file \"%s\"...",
+                      jobfile);
 
       if (fileid > job->num_files)
       {
@@ -997,15 +1030,15 @@ cupsdLoadAllJobs(void)
          compressions = (int *)realloc(job->compressions,
                                        sizeof(int) * fileid);
          filetypes    = (mime_type_t **)realloc(job->filetypes,
-                                                sizeof(mime_type_t *) * fileid);
+                                                sizeof(mime_type_t *) *
+                                                fileid);
         }
 
-        if (compressions == NULL || filetypes == NULL)
+        if (!compressions || !filetypes)
        {
           cupsdLogMessage(CUPSD_LOG_ERROR,
-                         "cupsdLoadAllJobs: Ran out of memory for job file "
-                         "types!");
-         continue;
+                         "Ran out of memory for job file types!");
+         return;
        }
 
         job->compressions = compressions;
@@ -1013,21 +1046,16 @@ cupsdLoadAllJobs(void)
        job->num_files    = fileid;
       }
 
-      job->filetypes[fileid - 1] = mimeFileType(MimeDatabase, filename, NULL,
+      job->filetypes[fileid - 1] = mimeFileType(MimeDatabase, jobfile, NULL,
                                                 job->compressions + fileid - 1);
 
-      if (job->filetypes[fileid - 1] == NULL)
+      if (!job->filetypes[fileid - 1])
         job->filetypes[fileid - 1] = mimeType(MimeDatabase, "application",
                                              "vnd.cups-raw");
     }
+  }
 
-  cupsDirClose(dir);
-
- /*
-  * Clean out old jobs as needed...
-  */
-
-  cupsdCleanJobs();
+  job->access_time = time(NULL);
 }
 
 
@@ -1054,18 +1082,21 @@ cupsdMoveJob(cupsd_job_t *job,          /* I - Job */
   * Don't move completed jobs...
   */
 
-  if (job->state->values[0].integer >= IPP_JOB_PROCESSING)
+  if (job->state_value >= IPP_JOB_PROCESSING)
     return;
 
  /*
   * Change the destination information...
   */
 
+  cupsdLoadJob(job);
+
   cupsdSetString(&job->dest, dest);
   job->dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE |
                           CUPS_PRINTER_IMPLICIT);
 
-  if ((attr = ippFindAttribute(job->attrs, "job-printer-uri", IPP_TAG_URI)) != NULL)
+  if ((attr = ippFindAttribute(job->attrs, "job-printer-uri",
+                               IPP_TAG_URI)) != NULL)
     cupsdSetString(&(attr->values[0].string.text), p->uri);
 
   cupsdSaveJob(job);
@@ -1079,13 +1110,14 @@ cupsdMoveJob(cupsd_job_t *job,          /* I - Job */
 void
 cupsdReleaseJob(cupsd_job_t *job)      /* I - Job */
 {
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdReleaseJob: id = %d", job->id);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReleaseJob: id = %d", job->id);
 
-  if (job->state->values[0].integer == IPP_JOB_HELD)
+  if (job->state_value == IPP_JOB_HELD)
   {
     DEBUG_puts("cupsdReleaseJob: setting state to pending...");
 
     job->state->values[0].integer = IPP_JOB_PENDING;
+    job->state_value              = IPP_JOB_PENDING;
     cupsdSaveJob(job);
     cupsdCheckJobs();
   }
@@ -1099,12 +1131,15 @@ cupsdReleaseJob(cupsd_job_t *job)       /* I - Job */
 void
 cupsdRestartJob(cupsd_job_t *job)      /* I - Job */
 {
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdRestartJob: id = %d", job->id);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdRestartJob: id = %d", job->id);
 
-  if (job->state->values[0].integer == IPP_JOB_STOPPED || JobFiles)
+  if (job->state_value == IPP_JOB_STOPPED || job->num_files)
   {
+    cupsdLoadJob(job);
+
     job->tries = 0;
     job->state->values[0].integer = IPP_JOB_PENDING;
+    job->state_value              = IPP_JOB_PENDING;
     cupsdSaveJob(job);
     cupsdCheckJobs();
   }
@@ -1112,23 +1147,95 @@ cupsdRestartJob(cupsd_job_t *job)       /* I - Job */
 
 
 /*
- * 'cupsdSaveJob()' - Save a job to disk.
+ * 'cupsdSaveAllJobs()' - Save a summary of all jobs to disk.
  */
 
 void
-cupsdSaveJob(cupsd_job_t *job)         /* I - Job */
+cupsdSaveAllJobs(void)
+{
+  int          i;                      /* Looping var */
+  cups_file_t  *fp;                    /* Job cache file */
+  char         temp[1024];             /* Temporary string */
+  cupsd_job_t  *job;                   /* Current job */
+  time_t       curtime;                /* Current time */
+  struct tm    *curdate;               /* Current date */
+
+
+  snprintf(temp, sizeof(temp), "%s/job.cache", CacheDir);
+  if ((fp = cupsFileOpen(temp, "w")) == NULL)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR,
+                    "Unable to create job cache file \"%s\" - %s",
+                    temp, strerror(errno));
+    return;
+  }
+
+  cupsdLogMessage(CUPSD_LOG_INFO, "Saving job cache file \"%s\"...", temp);
+
+ /*
+  * Restrict access to the file...
+  */
+
+  fchown(cupsFileNumber(fp), getuid(), Group);
+  fchmod(cupsFileNumber(fp), ConfigFilePerm);
+
+ /*
+  * Write a small header to the file...
+  */
+
+  curtime = time(NULL);
+  curdate = localtime(&curtime);
+  strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", curdate);
+
+  cupsFilePuts(fp, "# Job cache file for " CUPS_SVERSION "\n");
+  cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
+  cupsFilePrintf(fp, "NextJobId %d\n", NextJobId);
+
+ /*
+  * Write each job known to the system...
+  */
+
+  for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
+       job;
+       job = (cupsd_job_t *)cupsArrayNext(Jobs))
+  {
+    cupsFilePrintf(fp, "<Job %d>\n", job->id);
+    cupsFilePrintf(fp, "State %d\n", job->state_value);
+    cupsFilePrintf(fp, "Priority %d\n", job->priority);
+    cupsFilePrintf(fp, "Username %s\n", job->username);
+    cupsFilePrintf(fp, "Destination %s\n", job->dest);
+    cupsFilePrintf(fp, "DestType %d\n", job->dtype);
+    cupsFilePrintf(fp, "NumFiles %d\n", job->num_files);
+    for (i = 0; i < job->num_files; i ++)
+      cupsFilePrintf(fp, "File %d %s/%s %d\n", i + 1, job->filetypes[i]->super,
+                     job->filetypes[i]->type, job->compressions[i]);
+    cupsFilePuts(fp, "</Job>\n");
+  }
+
+  cupsFileClose(fp);
+}
+
+
+/*
+ * 'cupsdSaveJob()' - Save a job to disk.
+ */
+
+void
+cupsdSaveJob(cupsd_job_t *job)         /* I - Job */
 {
   char         filename[1024];         /* Job control filename */
   cups_file_t  *fp;                    /* Job file */
 
 
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
+                  job, job->id, job->attrs);
+
   snprintf(filename, sizeof(filename), "%s/c%05d", RequestRoot, job->id);
 
   if ((fp = cupsFileOpen(filename, "w")) == NULL)
   {
     cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "cupsdSaveJob: Unable to create job control file "
-                   "\"%s\" - %s.",
+                    "Unable to create job control file \"%s\" - %s.",
                     filename, strerror(errno));
     return;
   }
@@ -1136,7 +1243,12 @@ cupsdSaveJob(cupsd_job_t *job)           /* I - Job */
   fchmod(cupsFileNumber(fp), 0600);
   fchown(cupsFileNumber(fp), RunUser, Group);
 
-  ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, job->attrs);
+  job->attrs->state = IPP_IDLE;
+
+  if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
+                 job->attrs) != IPP_DATA)
+    cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to write job control file \"%s\"!",
+                   filename);
 
   cupsFileClose(fp);
 }
@@ -1157,7 +1269,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job,    /* I - Job */
   int          second;                 /* Hold second */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdSetJobHoldUntil(%d, \"%s\")",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSetJobHoldUntil(%d, \"%s\")",
                   job->id, when);
 
   second = 0;
@@ -1272,7 +1384,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job,    /* I - Job */
       job->hold_until += 24 * 60 * 60 * 60;
   }
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdSetJobHoldUntil: hold_until = %d",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSetJobHoldUntil: hold_until = %d",
                   (int)job->hold_until);
 }
 
@@ -1294,7 +1406,7 @@ cupsdSetJobPriority(
   * Don't change completed jobs...
   */
 
-  if (job->state->values[0].integer >= IPP_JOB_PROCESSING)
+  if (job->state_value >= IPP_JOB_PROCESSING)
     return;
 
  /*
@@ -1305,7 +1417,8 @@ cupsdSetJobPriority(
 
   job->priority = priority;
 
-  if ((attr = ippFindAttribute(job->attrs, "job-priority", IPP_TAG_INTEGER)) != NULL)
+  if ((attr = ippFindAttribute(job->attrs, "job-priority",
+                               IPP_TAG_INTEGER)) != NULL)
     attr->values[0].integer = priority;
   else
     ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-priority",
@@ -1338,37 +1451,41 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
   int                  backroot;       /* Run backend as root? */
   int                  pid;            /* Process ID of new filter process */
   int                  banner_page;    /* 1 if banner page, 0 otherwise */
-  int                  statusfds[2],   /* Pipes used between the filters and scheduler */
-                       filterfds[2][2];/* Pipes used between the filters */
+  int                  statusfds[2],   /* Pipes used with the scheduler */
+                       filterfds[2][2];/* Pipes used between filters */
   int                  envc;           /* Number of environment variables */
-  char                 *argv[8],       /* Filter command-line arguments */
+  char                 **argv,         /* Filter command-line arguments */
                        sani_uri[1024], /* Sanitized DEVICE_URI env var */
                        filename[1024], /* Job filename */
-                       command[1024],  /* Full path to filter/backend command */
+                       command[1024],  /* Full path to command */
                        jobid[255],     /* Job ID string */
                        title[IPP_MAX_NAME],
                                        /* Job title string */
                        copies[255],    /* # copies string */
-                       *envp[MAX_ENV], /* Environment variables */
-                       charset[255],   /* CHARSET environment variable */
-                       class_name[255],/* CLASS environment variable */
+                       *envp[MAX_ENV + 11],
+                                       /* Environment variables */
+                       charset[255],   /* CHARSET env variable */
+                       class_name[255],/* CLASS env variable */
                        classification[1024],
-                                       /* CLASSIFICATION environment variable */
+                                       /* CLASSIFICATION env variable */
                        content_type[1024],
-                                       /* CONTENT_TYPE environment variable */
+                                       /* CONTENT_TYPE env variable */
                        device_uri[1024],
-                                       /* DEVICE_URI environment variable */
-                       lang[255],      /* LANG environment variable */
-                       ppd[1024],      /* PPD environment variable */
+                                       /* DEVICE_URI env variable */
+                       final_content_type[1024],
+                                       /* FINAL_CONTENT_TYPE env variable */
+                       lang[255],      /* LANG env variable */
+                       ppd[1024],      /* PPD env variable */
                        printer_name[255],
-                                       /* PRINTER environment variable */
+                                       /* PRINTER env variable */
                        rip_max_cache[255];
-                                       /* RIP_MAX_CACHE environment variable */
+                                       /* RIP_MAX_CACHE env variable */
+  int                  remote_job;     /* Remote print job? */
   static char          *options = NULL;/* Full list of options */
   static int           optlength = 0;  /* Length of option buffer */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartJob() id = %d, file = %d/%d",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartJob: id = %d, file = %d/%d",
                   job->id, job->current_file, job->num_files);
 
   if (job->num_files == 0)
@@ -1399,7 +1516,7 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
     */
 
     cupsdLogMessage(CUPSD_LOG_DEBUG,
-                    "cupsdStartJob: Sending job to queue tagged as raw...");
+                    "[Job %d] Sending job to queue tagged as raw...", job->id);
 
     filters = NULL;
   }
@@ -1410,12 +1527,13 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
     */
 
     filters = mimeFilter(MimeDatabase, job->filetypes[job->current_file],
-                         printer->filetype, &(job->cost), MAX_FILTERS - 1);
+                         printer->filetype, &(job->cost));
 
     if (!filters)
     {
       cupsdLogMessage(CUPSD_LOG_ERROR,
-                      "Unable to convert file %d to printable format for job %d!",
+                      "Unable to convert file %d to printable format for "
+                     "job %d!",
                      job->current_file, job->id);
       cupsdLogMessage(CUPSD_LOG_INFO,
                       "Hint: Do you have ESP Ghostscript installed?");
@@ -1429,7 +1547,8 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
       if (job->current_file == job->num_files)
       {
        cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                      "Job canceled because it has no files that can be printed.");
+                      "Job canceled because it has no files that can be "
+                     "printed.");
 
         cupsdCancelJob(job, 0);
       }
@@ -1470,8 +1589,9 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
     cupsdLogMessage(CUPSD_LOG_INFO,
                     "Holding job %d because filter limit has been reached.",
                     job->id);
-    cupsdLogMessage(CUPSD_LOG_DEBUG,
-                    "cupsdStartJob: id=%d, file=%d, cost=%d, level=%d, limit=%d",
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdStartJob: id=%d, file=%d, cost=%d, level=%d, "
+                   "limit=%d",
                     job->id, job->current_file, job->cost, FilterLevel,
                    FilterLimit);
     return;
@@ -1479,11 +1599,18 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
 
   FilterLevel += job->cost;
 
+ /*
+  * Determine if we are printing to a remote printer...
+  */
+
+  remote_job = printer->raw && job->num_files > 1 &&
+               !strncmp(printer->device_uri, "ipp://", 6);
+
  /*
   * Add decompression filters, if any...
   */
 
-  if (job->compressions[job->current_file])
+  if (!remote_job && job->compressions[job->current_file])
   {
    /*
     * Add gziptoany filter to the front of the list...
@@ -1491,11 +1618,11 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
 
     if (!cupsArrayInsert(filters, &gziptoany_filter))
     {
-      cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to add decompression filter - %s",
-                      strerror(errno));
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to add decompression filter - %s",
+                     strerror(errno));
 
-      if (filters != NULL)
-        free(filters);
+      cupsArrayDelete(filters);
 
       job->current_file ++;
 
@@ -1527,8 +1654,7 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
       cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to add port monitor - %s",
                       strerror(errno));
 
-      if (filters != NULL)
-        free(filters);
+      cupsArrayDelete(filters);
 
       job->current_file ++;
 
@@ -1553,6 +1679,7 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
   */
 
   job->state->values[0].integer = IPP_JOB_PROCESSING;
+  job->state_value              = IPP_JOB_PROCESSING;
   job->status  = 0;
   job->printer = printer;
   printer->job = job;
@@ -1620,11 +1747,10 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
     if (optptr == NULL)
     {
       cupsdLogMessage(CUPSD_LOG_CRIT,
-                      "cupsdStartJob: Unable to allocate %d bytes for option buffer for job %d!",
-                      i, job->id);
+                      "Unable to allocate %d bytes for option buffer for "
+                     "job %d!", i, job->id);
 
-      if (filters != NULL)
-        free(filters);
+      cupsArrayDelete(filters);
 
       FilterLevel -= job->cost;
 
@@ -1652,7 +1778,7 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
 
   for (attr = job->attrs->attrs; attr != NULL; attr = attr->next)
   {
-    if (strcmp(attr->name, "copies") == 0 &&
+    if (!strcmp(attr->name, "copies") &&
        attr->value_tag == IPP_TAG_INTEGER)
     {
      /*
@@ -1662,7 +1788,7 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
       if (!banner_page)
         sprintf(copies, "%d", attr->values[0].integer);
     }
-    else if (strcmp(attr->name, "job-name") == 0 &&
+    else if (!strcmp(attr->name, "job-name") &&
             (attr->value_tag == IPP_TAG_NAME ||
              attr->value_tag == IPP_TAG_NAMELANG))
       strlcpy(title, attr->values[0].string.text, sizeof(title));
@@ -1675,29 +1801,32 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
       if (attr->value_tag == IPP_TAG_MIMETYPE ||
          attr->value_tag == IPP_TAG_NAMELANG ||
          attr->value_tag == IPP_TAG_TEXTLANG ||
-         attr->value_tag == IPP_TAG_URI ||
+         (attr->value_tag == IPP_TAG_URI && strcmp(attr->name, "job-uuid")) ||
          attr->value_tag == IPP_TAG_URISCHEME ||
          attr->value_tag == IPP_TAG_BEGIN_COLLECTION) /* Not yet supported */
        continue;
 
-      if (strncmp(attr->name, "time-", 5) == 0)
+      if (!strncmp(attr->name, "time-", 5))
        continue;
 
-      if (strncmp(attr->name, "job-", 4) == 0 &&
+      if (!strncmp(attr->name, "job-", 4) && strcmp(attr->name, "job-uuid") &&
           !(printer->type & CUPS_PRINTER_REMOTE))
        continue;
 
-      if (strncmp(attr->name, "job-", 4) == 0 &&
-          strcmp(attr->name, "job-billing") != 0 &&
-          strcmp(attr->name, "job-sheets") != 0 &&
-          strcmp(attr->name, "job-hold-until") != 0 &&
-         strcmp(attr->name, "job-priority") != 0)
+      if (!strncmp(attr->name, "job-", 4) &&
+          strcmp(attr->name, "job-uuid") &&
+          strcmp(attr->name, "job-billing") &&
+          strcmp(attr->name, "job-sheets") &&
+          strcmp(attr->name, "job-hold-until") &&
+         strcmp(attr->name, "job-priority"))
        continue;
 
-      if ((strcmp(attr->name, "page-label") == 0 ||
-           strcmp(attr->name, "page-border") == 0 ||
-           strncmp(attr->name, "number-up", 9) == 0 ||
-          strcmp(attr->name, "page-set") == 0) &&
+      if ((!strcmp(attr->name, "page-label") ||
+           !strcmp(attr->name, "page-border") ||
+           !strncmp(attr->name, "number-up", 9) ||
+          !strcmp(attr->name, "page-set") ||
+          !strcasecmp(attr->name, "AP_FIRSTPAGE_InputSlot") ||
+          !strcasecmp(attr->name, "AP_FIRSTPAGE_ManualFeed")) &&
          banner_page)
         continue;
 
@@ -1762,6 +1891,7 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
          case IPP_TAG_KEYWORD :
          case IPP_TAG_CHARSET :
          case IPP_TAG_LANGUAGE :
+         case IPP_TAG_URI :
              for (valptr = attr->values[i].string.text; *valptr;)
              {
                if (strchr(" \t\n\\\'\"", *valptr))
@@ -1795,11 +1925,16 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
   *
   * This allows legacy printer drivers that use the old System V
   * printing interface to be used by CUPS.
+  *
+  * For remote jobs, we send all of the files in the argument list.
   */
 
+  if (remote_job)
+    argv = calloc(7 + job->num_files, sizeof(char *));
+  else
+    argv = calloc(8, sizeof(char *));
+
   sprintf(jobid, "%d", job->id);
-  snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot,
-           job->id, job->current_file + 1);
 
   argv[0] = printer->name;
   argv[1] = jobid;
@@ -1807,12 +1942,26 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
   argv[3] = title;
   argv[4] = copies;
   argv[5] = options;
-  argv[6] = filename;
-  argv[7] = NULL;
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,
-                  "cupsdStartJob: argv = \"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"",
-                  argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
+  if (remote_job)
+  {
+    for (i = 0; i < job->num_files; i ++)
+    {
+      snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot,
+               job->id, i + 1);
+      argv[6 + i] = strdup(filename);
+    }
+  }
+  else
+  {
+    snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot,
+             job->id, job->current_file + 1);
+    argv[6] = filename;
+  }
+
+  for (i = 0; argv[i]; i ++)
+    cupsdLogMessage(CUPSD_LOG_DEBUG,
+                    "[Job %d] argv[%d]=\"%s\"", job->id, i, argv[i]);
 
  /*
   * Create environment variable strings for the filters...
@@ -1870,7 +2019,8 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
   snprintf(content_type, sizeof(content_type), "CONTENT_TYPE=%s/%s",
            job->filetypes[job->current_file]->super,
            job->filetypes[job->current_file]->type);
-  snprintf(device_uri, sizeof(device_uri), "DEVICE_URI=%s", printer->device_uri);
+  snprintf(device_uri, sizeof(device_uri), "DEVICE_URI=%s",
+           printer->device_uri);
   cupsdSanitizeURI(printer->device_uri, sani_uri, sizeof(sani_uri));
   snprintf(ppd, sizeof(ppd), "PPD=%s/ppd/%s.ppd", ServerRoot, printer->name);
   snprintf(printer_name, sizeof(printer_name), "PRINTER=%s", printer->name);
@@ -1886,6 +2036,14 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
   envp[envc ++] = device_uri;
   envp[envc ++] = printer_name;
 
+  if ((filter = (mime_filter_t *)cupsArrayLast(filters)) != NULL)
+  {
+    snprintf(final_content_type, sizeof(final_content_type),
+             "FINAL_CONTENT_TYPE=%s/%s",
+            filter->dst->super, filter->dst->type);
+    envp[envc ++] = final_content_type;
+  }
+
   if (Classification && !banner_page)
   {
     if ((attr = ippFindAttribute(job->attrs, "job-sheets",
@@ -1913,13 +2071,16 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
 
   for (i = 0; i < envc; i ++)
     if (strncmp(envp[i], "DEVICE_URI=", 11))
-      cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartJob: envp[%d]=\"%s\"",
-                      i, envp[i]);
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] envp[%d]=\"%s\"",
+                      job->id, i, envp[i]);
     else
-      cupsdLogMessage(CUPSD_LOG_DEBUG,
-                      "cupsdStartJob: envp[%d]=\"DEVICE_URI=%s\"", i, sani_uri);
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] envp[%d]=\"DEVICE_URI=%s\"",
+                      job->id, i, sani_uri);
 
-  job->current_file ++;
+  if (remote_job)
+    job->current_file = job->num_files;
+  else
+    job->current_file ++;
 
  /*
   * Now create processes for all of the filters...
@@ -1934,17 +2095,25 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
 
     cupsdAddPrinterHistory(printer);
 
-    if (filters != NULL)
-      free(filters);
+    cupsArrayDelete(filters);
 
     cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                  "Job canceled because the server could not create the job status pipes.");
+                  "Job canceled because the server could not create the job "
+                 "status pipes.");
+
+    if (remote_job)
+    {
+      for (i = 0; i < job->num_files; i ++)
+        free(argv[i + 6]);
+    }
+
+    free(argv);
 
     cupsdCancelJob(job, 0);
     return;
   }
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartJob: statusfds = [ %d %d ]",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartJob: statusfds = [ %d %d ]",
                   statusfds[0], statusfds[1]);
 
 #ifdef FD_CLOEXEC
@@ -1969,17 +2138,25 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
 
     cupsdAddPrinterHistory(printer);
 
-    if (filters != NULL)
-      free(filters);
+    cupsArrayDelete(filters);
 
     cupsdClosePipe(statusfds);
+
+    if (remote_job)
+    {
+      for (i = 0; i < job->num_files; i ++)
+        free(argv[i + 6]);
+    }
+
+    free(argv);
+
     cupsdCancelJob(job, 0);
     return;
   }
 
   fcntl(filterfds[1][0], F_SETFD, fcntl(filterfds[1][0], F_GETFD) | FD_CLOEXEC);
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartJob: filterfds[%d] = [ %d %d ]",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartJob: filterfds[%d] = [ %d %d ]",
                   1, filterfds[1][0], filterfds[1][1]);
 
   for (i = 0, slot = 0, filter = (mime_filter_t *)cupsArrayFirst(filters);
@@ -2009,7 +2186,16 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
        cupsdClosePipe(filterfds[!slot]);
 
        cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                      "Job canceled because the server could not create the filter pipes.");
+                      "Job canceled because the server could not create the "
+                     "filter pipes.");
+
+        if (remote_job)
+       {
+         for (i = 0; i < job->num_files; i ++)
+            free(argv[i + 6]);
+       }
+
+       free(argv);
 
        cupsdCancelJob(job, 0);
        return;
@@ -2036,7 +2222,16 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
            cupsdClosePipe(filterfds[!slot]);
 
            cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                         "Job canceled because the server could not create the backend pipes.");
+                         "Job canceled because the server could not create "
+                         "the backend pipes.");
+
+            if (remote_job)
+           {
+             for (i = 0; i < job->num_files; i ++)
+               free(argv[i + 6]);
+           }
+
+           free(argv);
 
            cupsdCancelJob(job, 0);
            return;
@@ -2074,7 +2269,16 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
            cupsdClosePipe(filterfds[!slot]);
 
            cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                         "Job canceled because the server could not open the output file.");
+                         "Job canceled because the server could not open the "
+                         "output file.");
+
+            if (remote_job)
+           {
+             for (i = 0; i < job->num_files; i ++)
+               free(argv[i + 6]);
+           }
+
+           free(argv);
 
            cupsdCancelJob(job, 0);
            return;
@@ -2084,16 +2288,19 @@ cupsdStartJob(cupsd_job_t     *job,     /* I - Job ID */
                fcntl(job->print_pipes[1], F_GETFD) | FD_CLOEXEC);
        }
 
-       cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartJob: print_pipes = [ %d %d ]",
-                   job->print_pipes[0], job->print_pipes[1]);
+       cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                       "cupsdStartJob: print_pipes = [ %d %d ]",
+                        job->print_pipes[0], job->print_pipes[1]);
       }
 
       filterfds[slot][0] = job->print_pipes[0];
       filterfds[slot][1] = job->print_pipes[1];
     }
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartJob: filter = \"%s\"", command);
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartJob: filterfds[%d] = [ %d %d ]",
+    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartJob: filter=\"%s\"",
+                    command);
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdStartJob: filterfds[%d]=[ %d %d ]",
                     slot, filterfds[slot][0], filterfds[slot][1]);
 
     pid = cupsdStartProcess(command, argv, envp, filterfds[!slot][0],
@@ -2101,7 +2308,8 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
                            job->back_pipes[0], 0, job->filters + i);
 
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdStartJob: Closing filter pipes for slot %d [ %d %d ]...",
+                    "cupsdStartJob: Closing filter pipes for slot %d "
+                   "[ %d %d ]...",
                     !slot, filterfds[!slot][0], filterfds[!slot][1]);
 
     cupsdClosePipe(filterfds[!slot]);
@@ -2121,7 +2329,16 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
       cupsdAddPrinterHistory(printer);
 
       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                    "Job canceled because the server could not execute a filter.");
+                    "Job canceled because the server could not execute a "
+                   "filter.");
+
+      if (remote_job)
+      {
+       for (i = 0; i < job->num_files; i ++)
+          free(argv[i + 6]);
+      }
+
+      free(argv);
 
       cupsdCancelJob(job, 0);
       return;
@@ -2177,6 +2394,14 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
        cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
                       "Job canceled because the server could not open a file.");
 
+        if (remote_job)
+       {
+         for (i = 0; i < job->num_files; i ++)
+            free(argv[i + 6]);
+       }
+
+       free(argv);
+
        cupsdCancelJob(job, 0);
        return;
       }
@@ -2184,9 +2409,9 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
       fcntl(filterfds[slot][1], F_SETFD,
             fcntl(filterfds[slot][1], F_GETFD) | FD_CLOEXEC);
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartJob: backend = \"%s\"",
+      cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartJob: backend=\"%s\"",
                       command);
-      cupsdLogMessage(CUPSD_LOG_DEBUG,
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
                       "cupsdStartJob: filterfds[%d] = [ %d %d ]",
                      slot, filterfds[slot][0], filterfds[slot][1]);
 
@@ -2200,7 +2425,8 @@ cupsdStartJob(cupsd_job_t     *job,       /* I - Job ID */
        cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to start backend \"%s\" - %s.",
                         method, strerror(errno));
        snprintf(printer->state_message, sizeof(printer->state_message),
-                "Unable to start backend \"%s\" - %s.", method, strerror(errno));
+                "Unable to start backend \"%s\" - %s.", method,
+                strerror(errno));
 
        cupsdLogMessage(CUPSD_LOG_DEBUG2,
                        "cupsdStartJob: Closing print pipes [ %d %d ]...",
@@ -2215,7 +2441,16 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
         cupsdClosePipe(job->back_pipes);
 
        cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
-                      "Job canceled because the server could not execute the backend.");
+                      "Job canceled because the server could not execute "
+                     "the backend.");
+
+        if (remote_job)
+       {
+         for (i = 0; i < job->num_files; i ++)
+            free(argv[i + 6]);
+       }
+
+       free(argv);
 
         cupsdCancelJob(job, 0);
        return;
@@ -2258,8 +2493,17 @@ cupsdStartJob(cupsd_job_t     *job,      /* I - Job ID */
     }
   }
 
+  if (remote_job)
+  {
+    for (i = 0; i < job->num_files; i ++)
+      free(argv[i + 6]);
+  }
+
+  free(argv);
+
   cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdStartJob: Closing filter pipes for slot %d [ %d %d ]...",
+                  "cupsdStartJob: Closing filter pipes for slot %d "
+                 "[ %d %d ]...",
                   slot, filterfds[slot][0], filterfds[slot][1]);
 
   cupsdClosePipe(filterfds[slot]);
@@ -2296,10 +2540,11 @@ cupsdStopAllJobs(void)
   for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
        job;
        job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-    if (job->state->values[0].integer == IPP_JOB_PROCESSING)
+    if (job->state_value == IPP_JOB_PROCESSING)
     {
       cupsdStopJob(job, 1);
       job->state->values[0].integer = IPP_JOB_PENDING;
+      job->state_value              = IPP_JOB_PENDING;
     }
 }
 
@@ -2315,10 +2560,10 @@ cupsdStopJob(cupsd_job_t *job,          /* I - Job */
   int  i;                              /* Looping var */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStopJob: id = %d, force = %d",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStopJob: id = %d, force = %d",
                   job->id, force);
 
-  if (job->state->values[0].integer != IPP_JOB_PROCESSING)
+  if (job->state_value != IPP_JOB_PROCESSING)
     return;
 
   FilterLevel -= job->cost;
@@ -2331,10 +2576,11 @@ cupsdStopJob(cupsd_job_t *job,          /* I - Job */
   else if (job->printer->state != IPP_PRINTER_STOPPED)
     cupsdSetPrinterState(job->printer, IPP_PRINTER_IDLE, 0);
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStopJob: printer state is %d",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStopJob: printer state is %d",
                   job->printer->state);
 
   job->state->values[0].integer = IPP_JOB_STOPPED;
+  job->state_value              = IPP_JOB_STOPPED;
   job->printer->job = NULL;
   job->printer      = NULL;
 
@@ -2388,6 +2634,49 @@ cupsdStopJob(cupsd_job_t *job,           /* I - Job */
 }
 
 
+/*
+ * 'cupsdUnloadCompletedJobs()' - Flush completed job history from memory.
+ */
+
+void
+cupsdUnloadCompletedJobs(void)
+{
+  cupsd_job_t  *job;                   /* Current job */
+  time_t       expire;                 /* Expiration time */
+
+
+  expire = time(NULL) - 60;
+
+  for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
+       job;
+       job = (cupsd_job_t *)cupsArrayNext(Jobs))
+    if (job->attrs && job->state_value >= IPP_JOB_STOPPED &&
+        job->access_time < expire)
+      cupsdUnloadJob(job);
+}
+
+
+/*
+ * 'cupsdUnloadJob()' - Unload a job from memory.
+ */
+
+void
+cupsdUnloadJob(cupsd_job_t *job)       /* I - Job */
+{
+  if (!job->attrs)
+    return;
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "Unloading job %d...", job->id);
+
+  ippDelete(job->attrs);
+
+  job->attrs      = NULL;
+  job->state      = NULL;
+  job->sheets     = NULL;
+  job->job_sheets = NULL;
+}
+
+
 /*
  * 'cupsdUpdateJob()' - Read a status update from a job's filters.
  */
@@ -2480,7 +2769,7 @@ cupsdUpdateJob(cupsd_job_t *job)  /* I - Job to check */
       cupsdAddPrinterHistory(job->printer);
     }
 #endif /* __APPLE__ */
-    else
+    else if (loglevel <= CUPSD_LOG_INFO)
     {
      /*
       * Some message to show in the printer-state-message attribute...
@@ -2531,7 +2820,8 @@ compare_active_jobs(void *first,  /* I - First job */
   int  diff;                           /* Difference */
 
 
-  if ((diff = ((cupsd_job_t *)first)->priority - ((cupsd_job_t *)second)->priority) != 0)
+  if ((diff = ((cupsd_job_t *)first)->priority -
+              ((cupsd_job_t *)second)->priority) != 0)
     return (diff);
   else
     return (((cupsd_job_t *)first)->id - ((cupsd_job_t *)second)->id);
@@ -2551,12 +2841,34 @@ compare_jobs(void *first,               /* I - First job */
 }
 
 
+/*
+ * 'free_job()' - Free all memory used by a job.
+ */
+
+static void
+free_job(cupsd_job_t *job)             /* I - Job */
+{
+  cupsdClearString(&job->username);
+  cupsdClearString(&job->dest);
+
+  if (job->num_files > 0)
+  {
+    free(job->compressions);
+    free(job->filetypes);
+  }
+
+  ippDelete(job->attrs);
+
+  free(job);
+}
+
+
 /*
  * 'ipp_length()' - Compute the size of the buffer needed to hold 
  *                 the textual IPP attributes.
  */
 
-int                                    /* O - Size of buffer to hold IPP attributes */
+int                                    /* O - Size of attribute buffer */
 ipp_length(ipp_t *ipp)                 /* I - IPP request */
 {
   int                  bytes;          /* Number of bytes */
@@ -2654,6 +2966,7 @@ ipp_length(ipp_t *ipp)                    /* I - IPP request */
       case IPP_TAG_KEYWORD :
       case IPP_TAG_CHARSET :
       case IPP_TAG_LANGUAGE :
+      case IPP_TAG_URI :
          /*
          * Strings can contain characters that need quoting.  We need
          * at least 2 * len + 2 characters to cover the quotes and
@@ -2673,6 +2986,373 @@ ipp_length(ipp_t *ipp)                  /* I - IPP request */
 }
 
 
+/*
+ * 'load_job_cache()' - Load jobs from the job.cache file.
+ */
+
+static void
+load_job_cache(const char *filename)   /* I - job.cache filename */
+{
+  cups_file_t  *fp;                    /* job.cache file */
+  char         line[1024],             /* Line buffer */
+               *value;                 /* Value on line */
+  int          linenum;                /* Line number in file */
+  cupsd_job_t  *job;                   /* Current job */
+  int          jobid;                  /* Job ID */
+  char         jobfile[1024];          /* Job filename */
+
+
+ /*
+  * Open the job.cache file...
+  */
+
+  if ((fp = cupsFileOpen(filename, "r")) == NULL)
+  {
+    if (errno != ENOENT)
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to open job cache file \"%s\": %s",
+                      filename, strerror(errno));
+
+    load_request_root();
+
+    return;
+  }
+
+ /*
+  * Read entries from the job cache file and create jobs as needed.
+  */
+
+  cupsdLogMessage(CUPSD_LOG_INFO, "Loading job cache file \"%s\"...",
+                  filename);
+
+  linenum = 0;
+  job     = NULL;
+
+  while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
+  {
+    if (!strcasecmp(line, "NextJobId"))
+    {
+      if (value)
+        NextJobId = atoi(value);
+    }
+    else if (!strcasecmp(line, "<Job"))
+    {
+      if (job)
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Missing </Job> directive on line %d!",
+                       linenum);
+        continue;
+      }
+
+      if (!value)
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Missing job ID on line %d!", linenum);
+       continue;
+      }
+
+      jobid = atoi(value);
+
+      if (jobid < 1)
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Bad job ID %d on line %d!", jobid,
+                       linenum);
+        continue;
+      }
+
+      snprintf(jobfile, sizeof(jobfile), "%s/c%05d", RequestRoot, jobid);
+      if (access(jobfile, 0))
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Job %d files have gone away!", jobid);
+        continue;
+      }
+
+      job = calloc(1, sizeof(cupsd_job_t));
+      if (!job)
+      {
+        cupsdLogMessage(CUPSD_LOG_EMERG,
+                       "Unable to allocate memory for job %d!", jobid);
+        break;
+      }
+
+      job->id             = jobid;
+      job->back_pipes[0]  = -1;
+      job->back_pipes[1]  = -1;
+      job->print_pipes[0] = -1;
+      job->print_pipes[1] = -1;
+
+      cupsdLogMessage(CUPSD_LOG_DEBUG, "Loading job %d from cache...", job->id);
+    }
+    else if (!job)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "Missing <Job #> directive on line %d!", linenum);
+      continue;
+    }
+    else if (!strcasecmp(line, "</Job>"))
+    {
+      cupsArrayAdd(Jobs, job);
+
+      if (job->state_value < IPP_JOB_STOPPED)
+      {
+        cupsArrayAdd(ActiveJobs, job);
+       cupsdLoadJob(job);
+      }
+
+      job = NULL;
+    }
+    else if (!value)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d!", linenum);
+      continue;
+    }
+    else if (!strcasecmp(line, "State"))
+    {
+      job->state_value = atoi(value);
+
+      if (job->state_value < IPP_JOB_PENDING)
+        job->state_value = IPP_JOB_PENDING;
+      else if (job->state_value > IPP_JOB_COMPLETED)
+        job->state_value = IPP_JOB_COMPLETED;
+    }
+    else if (!strcasecmp(line, "Priority"))
+    {
+      job->priority = atoi(value);
+    }
+    else if (!strcasecmp(line, "Username"))
+    {
+      cupsdSetString(&job->username, value);
+    }
+    else if (!strcasecmp(line, "Destination"))
+    {
+      cupsdSetString(&job->dest, value);
+    }
+    else if (!strcasecmp(line, "DestType"))
+    {
+      job->dtype = (cups_ptype_t)atoi(value);
+    }
+    else if (!strcasecmp(line, "NumFiles"))
+    {
+      job->num_files = atoi(value);
+
+      if (job->num_files < 0)
+      {
+       cupsdLogMessage(CUPSD_LOG_ERROR, "Bad NumFiles value %d on line %d!",
+                       job->num_files, linenum);
+        job->num_files = 0;
+       continue;
+      }
+
+      if (job->num_files > 0)
+      {
+        snprintf(jobfile, sizeof(jobfile), "%s/d%05d-001", RequestRoot,
+                job->id);
+        if (access(jobfile, 0))
+       {
+         cupsdLogMessage(CUPSD_LOG_INFO,
+                         "Data files for job %d have gone away!", job->id);
+          job->num_files = 0;
+         continue;
+       }
+
+        job->filetypes    = calloc(job->num_files, sizeof(mime_type_t *));
+       job->compressions = calloc(job->num_files, sizeof(int));
+
+        if (!job->filetypes || !job->compressions)
+       {
+         cupsdLogMessage(CUPSD_LOG_EMERG,
+                         "Unable to allocate memory for %d files!",
+                         job->num_files);
+          break;
+       }
+      }
+    }
+    else if (!strcasecmp(line, "File"))
+    {
+      int      number,                 /* File number */
+               compression;            /* Compression value */
+      char     super[MIME_MAX_SUPER],  /* MIME super type */
+               type[MIME_MAX_TYPE];    /* MIME type */
+
+
+      if (sscanf(value, "%d%*[ \t]%15[^/]/%255s%d", &number, super, type,
+                 &compression) != 4)
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File on line %d!", linenum);
+       continue;
+      }
+
+      if (number < 1 || number > job->num_files)
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Bad File number %d on line %d!",
+                       number, linenum);
+        continue;
+      }
+
+      number --;
+
+      job->compressions[number] = compression;
+      job->filetypes[number]    = mimeType(MimeDatabase, super, type);
+
+      if (!job->filetypes[number])
+      {
+       /*
+        * If the original MIME type is unknown, auto-type it!
+       */
+
+        cupsdLogMessage(CUPSD_LOG_ERROR,
+                       "Unknown MIME type %s/%s for file %d of job %d!",
+                       super, type, number + 1, job->id);
+
+        snprintf(jobfile, sizeof(jobfile), "%s/d%05d-%03d", RequestRoot,
+                job->id, number + 1);
+        job->filetypes[number] = mimeFileType(MimeDatabase, jobfile, NULL,
+                                             job->compressions + number);
+
+       /*
+        * If that didn't work, assume it is raw...
+       */
+
+        if (!job->filetypes[number])
+         job->filetypes[number] = mimeType(MimeDatabase, "application",
+                                           "vnd.cups-raw");
+      }
+    }
+    else
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown %s directive on line %d!",
+                      line, linenum);
+  }
+
+  cupsFileClose(fp);
+}
+
+
+/*
+ * 'load_next_job_id()' - Load the NextJobId value from the job.cache file.
+ */
+
+static void
+load_next_job_id(const char *filename) /* I - job.cache filename */
+{
+  cups_file_t  *fp;                    /* job.cache file */
+  char         line[1024],             /* Line buffer */
+               *value;                 /* Value on line */
+  int          linenum;                /* Line number in file */
+
+
+ /*
+  * Read the NextJobId directive from the job.cache file and use
+  * the value (if any).
+  */
+
+  if ((fp = cupsFileOpen(filename, "r")) == NULL)
+  {
+    if (errno != ENOENT)
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to open job cache file \"%s\": %s",
+                      filename, strerror(errno));
+
+    return;
+  }
+
+  cupsdLogMessage(CUPSD_LOG_INFO,
+                  "Loading NextJobId from job cache file \"%s\"...", filename);
+
+  linenum = 0;
+
+  while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
+  {
+    if (!strcasecmp(line, "NextJobId"))
+    {
+      if (value)
+        NextJobId = atoi(value);
+
+      break;
+    }
+  }
+
+  cupsFileClose(fp);
+}
+
+
+/*
+ * 'load_request_root()' - Load jobs from the RequestRoot directory.
+ */
+
+static void
+load_request_root(void)
+{
+  cups_dir_t           *dir;           /* Directory */
+  cups_dentry_t                *dent;          /* Directory entry */
+  cupsd_job_t          *job;           /* New job */
+
+
+ /*
+  * Open the requests directory...
+  */
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "Scanning %s for jobs...", RequestRoot);
+
+  if ((dir = cupsDirOpen(RequestRoot)) == NULL)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR,
+                    "Unable to open spool directory \"%s\": %s",
+                    RequestRoot, strerror(errno));
+    return;
+  }
+
+ /*
+  * Read all the c##### files...
+  */
+
+  while ((dent = cupsDirRead(dir)) != NULL)
+    if (strlen(dent->filename) >= 6 && dent->filename[0] == 'c')
+    {
+     /*
+      * Allocate memory for the job...
+      */
+
+      if ((job = calloc(sizeof(cupsd_job_t), 1)) == NULL)
+      {
+        cupsdLogMessage(CUPSD_LOG_ERROR, "Ran out of memory for jobs!");
+       cupsDirClose(dir);
+       return;
+      }
+
+     /*
+      * Assign the job ID...
+      */
+
+      job->id             = atoi(dent->filename + 1);
+      job->back_pipes[0]  = -1;
+      job->back_pipes[1]  = -1;
+      job->print_pipes[0] = -1;
+      job->print_pipes[1] = -1;
+
+      if (job->id >= NextJobId)
+        NextJobId = job->id + 1;
+
+     /*
+      * Load the job...
+      */
+
+      cupsdLoadJob(job);
+
+     /*
+      * Insert the job into the array, sorting by job priority and ID...
+      */
+
+      cupsArrayAdd(Jobs, job);
+
+      if (job->state_value < IPP_JOB_STOPPED)
+        cupsArrayAdd(ActiveJobs,job);
+      else
+        cupsdUnloadJob(job);
+    }
+
+  cupsDirClose(dir);
+}
+
+
 /*
  * 'set_time()' - Set one of the "time-at-xyz" attributes...
  */
@@ -2709,9 +3389,11 @@ set_hold_until(cupsd_job_t *job,         /* I - Job to update */
   * Set the hold_until value and hold the job...
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "set_hold_until: hold_until = %d", (int)holdtime);
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "set_hold_until: hold_until = %d",
+                  (int)holdtime);
 
   job->state->values[0].integer = IPP_JOB_HELD;
+  job->state_value              = IPP_JOB_HELD;
   job->hold_until               = holdtime;
 
  /*
@@ -2723,7 +3405,8 @@ set_hold_until(cupsd_job_t *job,  /* I - Job to update */
   snprintf(holdstr, sizeof(holdstr), "%d:%d:%d", holddate->tm_hour, 
           holddate->tm_min, holddate->tm_sec);
 
-  if ((attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_KEYWORD)) == NULL)
+  if ((attr = ippFindAttribute(job->attrs, "job-hold-until",
+                               IPP_TAG_KEYWORD)) == NULL)
     attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
 
  /*
@@ -2741,5 +3424,5 @@ set_hold_until(cupsd_job_t *job,  /* I - Job to update */
 
 
 /*
- * End of "$Id: job.c 5051 2006-02-02 16:13:16Z mike $".
+ * End of "$Id: job.c 5131 2006-02-18 05:31:36Z mike $".
  */
index 99799bcec212ff8951ff726563299debb2593f63..d6c7aa5d186f3137cd09654b82837d2db97b09c5 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: job.h 4819 2005-11-04 18:39:32Z mike $"
+ * "$Id: job.h 5095 2006-02-09 16:22:48Z mike $"
  *
  *   Print job definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -30,17 +30,19 @@ typedef struct cupsd_job_s
 {
   int                  id,             /* Job ID */
                        priority;       /* Job priority */
-  ipp_attribute_t      *state;         /* Job state */
-  ipp_attribute_t      *sheets;        /* job-media-sheets-completed */
-  time_t               hold_until;     /* Hold expiration date/time */
+  ipp_jstate_t         state_value;    /* Cached job-state */
   char                 *username;      /* Printing user */
   char                 *dest;          /* Destination printer or class */
   cups_ptype_t         dtype;          /* Destination type (class/remote bits) */
-  ipp_attribute_t      *job_sheets;    /* Job sheets (NULL if none) */
   int                  num_files;      /* Number of files in job */
-  int                  current_file;   /* Current file in job */
   mime_type_t          **filetypes;    /* File types */
   int                  *compressions;  /* Compression status of each file */
+  time_t               access_time;    /* Last access time */
+  ipp_attribute_t      *sheets;        /* job-media-sheets-completed */
+  time_t               hold_until;     /* Hold expiration date/time */
+  ipp_attribute_t      *state;         /* Job state */
+  ipp_attribute_t      *job_sheets;    /* Job sheets (NULL if none) */
+  int                  current_file;   /* Current file in job */
   ipp_t                        *attrs;         /* Job attributes */
   cupsd_statbuf_t      *status_buffer; /* Status buffer for this job */
   int                  print_pipes[2], /* Print data pipes */
@@ -98,23 +100,27 @@ extern void                cupsdCleanJobs(void);
 extern void            cupsdDeleteJob(cupsd_job_t *job);
 extern cupsd_job_t     *cupsdFindJob(int id);
 extern void            cupsdFinishJob(cupsd_job_t *job);
+extern void            cupsdUnloadCompletedJobs(void);
 extern void            cupsdFreeAllJobs(void);
 extern int             cupsdGetPrinterJobCount(const char *dest);
 extern int             cupsdGetUserJobCount(const char *username);
 extern void            cupsdHoldJob(cupsd_job_t *job);
 extern void            cupsdLoadAllJobs(void);
+extern void            cupsdLoadJob(cupsd_job_t *job);
 extern void            cupsdMoveJob(cupsd_job_t *job, const char *dest);
 extern void            cupsdReleaseJob(cupsd_job_t *job);
 extern void            cupsdRestartJob(cupsd_job_t *job);
+extern void            cupsdSaveAllJobs(void);
 extern void            cupsdSaveJob(cupsd_job_t *job);
 extern void            cupsdSetJobHoldUntil(cupsd_job_t *job, const char *when);
 extern void            cupsdSetJobPriority(cupsd_job_t *job, int priority);
 extern void            cupsdStartJob(cupsd_job_t *job, cupsd_printer_t *printer);
 extern void            cupsdStopAllJobs(void);
 extern void            cupsdStopJob(cupsd_job_t *job, int force);
+extern void            cupsdUnloadJob(cupsd_job_t *job);
 extern void            cupsdUpdateJob(cupsd_job_t *job);
 
 
 /*
- * End of "$Id: job.h 4819 2005-11-04 18:39:32Z mike $".
+ * End of "$Id: job.h 5095 2006-02-09 16:22:48Z mike $".
  */
index 42e1d3e0aa1275c6c1fb54a992ff227f86ff38d1..467dcfdc81dbce4f8bd523a1b71d72a37a8cc49e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: listen.c 5053 2006-02-02 18:14:38Z mike $"
+ * "$Id: listen.c 5083 2006-02-06 02:57:43Z mike $"
  *
  *   Server listening routines for the Common UNIX Printing System (CUPS)
  *   scheduler.
  *
  * Contents:
  *
- *   cupsdPauseListening()  - Clear input polling on all listening sockets...
- *   cupsdResumeListening() - Set input polling on all listening sockets...
- *   cupsdStartListening()  - Create all listening sockets...
- *   cupsdStopListening()   - Close all listening sockets...
+ *   cupsdDeleteAllListeners() - Delete all listeners.
+ *   cupsdPauseListening()     - Clear input polling on all listening sockets...
+ *   cupsdResumeListening()    - Set input polling on all listening sockets...
+ *   cupsdStartListening()     - Create all listening sockets...
+ *   cupsdStopListening()      - Close all listening sockets...
  */
 
 /*
 #endif /* __linux && !IPV6_V6ONLY */
 
 
+/*
+ * 'cupsdDeleteAllListeners()' - Delete all listeners.
+ */
+
+void
+cupsdDeleteAllListeners(void)
+{
+  cupsd_listener_t     *lis;           /* Current listening socket */
+
+
+  for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+       lis;
+       lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
+    free(lis);
+
+  cupsArrayDelete(Listeners);
+  Listeners = NULL;
+}
+
+
 /*
  * 'cupsdPauseListening()' - Clear input polling on all listening sockets...
  */
 void
 cupsdPauseListening(void)
 {
-  int                  i;              /* Looping var */
   cupsd_listener_t     *lis;           /* Current listening socket */
 
 
-  if (NumListeners < 1)
+  if (cupsArrayCount(Listeners) < 1)
     return;
 
-  if (NumClients == MaxClients)
+  if (cupsArrayCount(Clients) == MaxClients)
     cupsdLogMessage(CUPSD_LOG_WARN,
                     "Max clients reached, holding new connections...");
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdPauseListening: Clearing input bits...");
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdPauseListening: Clearing input bits...");
 
-  for (i = NumListeners, lis = Listeners; i > 0; i --, lis ++)
+  for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+       lis;
+       lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
     if (lis->fd >= 0)
     {
       cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -86,19 +108,21 @@ cupsdPauseListening(void)
 void
 cupsdResumeListening(void)
 {
-  int                  i;              /* Looping var */
   cupsd_listener_t     *lis;           /* Current listening socket */
 
 
-  if (NumListeners < 1)
+  if (cupsArrayCount(Listeners) < 1)
     return;
 
-  if (NumClients >= (MaxClients - 1))
+  if (cupsArrayCount(Clients) >= (MaxClients - 1))
     cupsdLogMessage(CUPSD_LOG_WARN, "Resuming new connection processing...");
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdResumeListening: Setting input bits...");
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdResumeListening: Setting input bits...");
 
-  for (i = NumListeners, lis = Listeners; i > 0; i --, lis ++)
+  for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+       lis;
+       lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
     if (lis->fd >= 0)
     {
       cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -117,8 +141,7 @@ void
 cupsdStartListening(void)
 {
   int                  status;         /* Bind result */
-  int                  i,              /* Looping var */
-                       p,              /* Port number */
+  int                  p,              /* Port number */
                        val;            /* Parameter value */
   cupsd_listener_t     *lis;           /* Current listening socket */
   char                 s[256];         /* String addresss */
@@ -132,8 +155,8 @@ cupsdStartListening(void)
                };
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdStartListening: NumListeners=%d",
-                  NumListeners);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdStartListening: %d Listeners",
+                  cupsArrayCount(Listeners));
 
  /*
   * Get the server's IP address...
@@ -144,15 +167,17 @@ cupsdStartListening(void)
 
   if ((ServerAddrs = httpAddrGetList(ServerName, AF_UNSPEC, NULL)) == NULL)
     cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "cupsdStartListening: Unable to find IP address for "
-                   "server name \"%s\"!\n", ServerName);
+                    "Unable to find IP address for server name \"%s\"!\n",
+                   ServerName);
 
  /*
   * Setup socket listeners...
   */
 
-  for (i = NumListeners, lis = Listeners, LocalPort = 0, have_domain = NULL;
-       i > 0; i --, lis ++)
+  for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners), LocalPort = 0,
+           have_domain = NULL;
+       lis;
+       lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
   {
     httpAddrString(&(lis->address), s, sizeof(s));
 
@@ -177,32 +202,32 @@ cupsdStartListening(void)
      /*
       * Create a socket for listening...
       */
-  
+
       lis->fd = socket(lis->address.addr.sa_family, SOCK_STREAM, 0);
-  
+
       if (lis->fd == -1)
       {
        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdStartListening: Unable to open listen socket for address %s:%d - %s.",
+                       "Unable to open listen socket for address %s:%d - %s.",
                        s, p, strerror(errno));
        continue;
       }
-  
+
      /*
       * Set things up to reuse the local address for this port.
       */
-  
+
       val = 1;
 #ifdef __sun
       setsockopt(lis->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&val, sizeof(val));
 #else
       setsockopt(lis->fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
 #endif /* __sun */
-  
+
      /*
       * Bind to the port we found...
       */
-  
+
 #ifdef AF_INET6
       if (lis->address.addr.sa_family == AF_INET6)
       {
@@ -212,7 +237,7 @@ cupsdStartListening(void)
        * potential security issues and to make all platforms behave
        * the same.
        */
-  
+
        val = 1;
 #    ifdef __sun
        setsockopt(lis->fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&val, sizeof(val));
@@ -220,7 +245,7 @@ cupsdStartListening(void)
        setsockopt(lis->fd, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val));
 #    endif /* __sun */
 #  endif /* IPV6_V6ONLY */
-  
+
        status = bind(lis->fd, (struct sockaddr *)&(lis->address),
                      httpAddrLength(&(lis->address)));
       }
@@ -230,78 +255,75 @@ cupsdStartListening(void)
       if (lis->address.addr.sa_family == AF_LOCAL)
       {
        mode_t  mask;                   /* Umask setting */
-  
-  
+
+
        /*
        * Remove any existing domain socket file...
        */
-  
+
        unlink(lis->address.un.sun_path);
-  
+
        /*
        * Save the curent umask and set it to 0...
        */
-  
+
        mask = umask(0);
-  
+
        /*
        * Bind the domain socket...
        */
-  
+
        status = bind(lis->fd, (struct sockaddr *)&(lis->address),
                      httpAddrLength(&(lis->address)));
-  
+
        /*
        * Restore the umask...
        */
-  
+
        umask(mask);
       }
       else
 #endif /* AF_LOCAL */
       status = bind(lis->fd, (struct sockaddr *)&(lis->address),
                    sizeof(lis->address.ipv4));
-  
+
       if (status < 0)
       {
        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdStartListening: Unable to bind socket for address %s:%d - %s.",
+                       "Unable to bind socket for address %s:%d - %s.",
                        s, p, strerror(errno));
        close(lis->fd);
        lis->fd = -1;
        continue;
       }
-  
+
      /*
       * Listen for new clients.
       */
-  
+
       if (listen(lis->fd, ListenBackLog) < 0)
       {
        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdStartListening: Unable to listen for clients on address %s:%d - %s.",
+                       "Unable to listen for clients on address %s:%d - %s.",
                        s, p, strerror(errno));
        exit(errno);
       }
     }
 
     fcntl(lis->fd, F_SETFD, fcntl(lis->fd, F_GETFD) | FD_CLOEXEC);
-  
 
     if (p)
-      cupsdLogMessage(CUPSD_LOG_INFO,
-                      "cupsdStartListening: Listening to %s:%d on fd %d...",
+      cupsdLogMessage(CUPSD_LOG_INFO, "Listening to %s:%d on fd %d...",
                      s, p, lis->fd);
     else
     {
-      cupsdLogMessage(CUPSD_LOG_INFO,
-                      "cupsdStartListening: Listening to %s on fd %d...",
+      cupsdLogMessage(CUPSD_LOG_INFO, "Listening to %s on fd %d...",
                      s, lis->fd);
 
       if (chmod(s, 0140777))
        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "cupsdStartListening: Unable to change permisssions on "
-                       "domain socket \"%s\" - %s", s, strerror(errno));
+                       "Unable to change permisssions on domain socket "
+                       "\"%s\" - %s", s, strerror(errno));
     }
 
    /*
@@ -379,16 +401,17 @@ cupsdStartListening(void)
 void
 cupsdStopListening(void)
 {
-  int                  i;              /* Looping var */
   cupsd_listener_t     *lis;           /* Current listening socket */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
                   "cupsdStopListening: closing all listen sockets.");
 
   cupsdPauseListening();
 
-  for (i = NumListeners, lis = Listeners; i > 0; i --, lis ++)
+  for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+       lis;
+       lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
   {
     if (lis->fd != -1)
     {
@@ -416,5 +439,5 @@ cupsdStopListening(void)
 
 
 /*
- * End of "$Id: listen.c 5053 2006-02-02 18:14:38Z mike $".
+ * End of "$Id: listen.c 5083 2006-02-06 02:57:43Z mike $".
  */
index 0e9e808dcad00fdc0123d990fbe5586b5e10a89f..d0371248b20af499f1c566a39b1c345c59c3f0ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: main.c 5056 2006-02-02 19:46:32Z mike $"
+ * "$Id: main.c 5108 2006-02-15 19:33:09Z mike $"
  *
  *   Scheduler main loop for the Common UNIX Printing System (CUPS).
  *
@@ -36,7 +36,7 @@
  *                               listening fds.
  *   launchd_reload()          - Tell launchd to reload the configuration
  *                               file to pick up the new listening directives.
- *   launchd_sync_conf()       - Re-write the launchd(8) config file 
+ *   launchd_sync_conf()       - Re-write the launchd(8) config file
  *                              org.cups.cupsd.plist based on cupsd.conf.
  *   parent_handler()          - Catch USR1/CHLD signals...
  *   process_children()        - Process all dead children...
@@ -109,13 +109,13 @@ static int        stop_scheduler = 0;     /* Should the scheduler stop? */
  */
 
 int                                    /* O - Exit status */
-main(int  argc,                                /* I - Number of command-line arguments */
+main(int  argc,                                /* I - Number of command-line args */
      char *argv[])                     /* I - Command-line arguments */
 {
   int                  i;              /* Looping var */
   char                 *opt;           /* Option character */
   int                  fg;             /* Run in the foreground */
-  int                  fds;            /* Number of ready descriptors select returns */
+  int                  fds;            /* Number of ready descriptors */
   fd_set               *input,         /* Input set for select() */
                        *output;        /* Output set for select() */
   cupsd_client_t       *con;           /* Current client */
@@ -202,7 +202,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
              fg = 1;
              break;
 
-          case 'F' : /* Run in foreground, but still disconnect from terminal... */
+          case 'F' : /* Run in foreground, but disconnect from terminal... */
              fg = -1;
              break;
 
@@ -291,7 +291,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
       }
       else if (WIFEXITED(i))
       {
-        fprintf(stderr, "cupsd: Child exited with status %d!\n", WEXITSTATUS(i));
+        fprintf(stderr, "cupsd: Child exited with status %d!\n",
+               WEXITSTATUS(i));
        return (2);
       }
       else
@@ -578,14 +579,13 @@ main(int  argc,                           /* I - Number of command-line arguments */
       * Close any idle clients...
       */
 
-      if (NumClients > 0)
+      if (cupsArrayCount(Clients) > 0)
       {
-        for (i = NumClients, con = Clients; i > 0; i --, con ++)
+       for (con = (cupsd_client_t *)cupsArrayFirst(Clients);
+            con;
+            con = (cupsd_client_t *)cupsArrayNext(Clients))
          if (con->http.state == HTTP_WAITING)
-         {
            cupsdCloseClient(con);
-           con --;
-         }
          else
            con->http.keep_alive = HTTP_KEEPALIVE_OFF;
 
@@ -599,7 +599,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
           job;
           job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-        if (job->state->values[0].integer == IPP_JOB_PROCESSING)
+        if (job->state_value == IPP_JOB_PROCESSING)
          break;
 
      /*
@@ -607,7 +607,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
       * if the reload timeout has elapsed...
       */
 
-      if ((NumClients == 0 && (!job || NeedReload != RELOAD_ALL)) ||
+      if ((cupsArrayCount(Clients) == 0 &&
+           (!job || NeedReload != RELOAD_ALL)) ||
           (time(NULL) - ReloadTime) >= ReloadTimeout)
       {
        /*
@@ -676,7 +677,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * inactivity...
     */
 
-    if (timeout.tv_sec == 86400 && Launchd && LaunchdTimeout && 
+    if (timeout.tv_sec == 86400 && Launchd && LaunchdTimeout &&
        (!Browsing || !(BrowseLocalProtocols & BROWSE_DNSSD) ||
         cupsArrayCount(Printers) == 0))
     {
@@ -741,12 +742,16 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
       cupsdLogMessage(CUPSD_LOG_EMERG, s);
 
-      for (i = 0, con = Clients; i < NumClients; i ++, con ++)
+      for (i = 0, con = (cupsd_client_t *)cupsArrayFirst(Clients);
+          con;
+          i ++, con = (cupsd_client_t *)cupsArrayNext(Clients))
         cupsdLogMessage(CUPSD_LOG_EMERG,
                        "Clients[%d] = %d, file = %d, state = %d",
                        i, con->http.fd, con->file, con->http.state);
 
-      for (i = 0, lis = Listeners; i < NumListeners; i ++, lis ++)
+      for (i = 0, lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+           lis;
+          i ++, lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
         cupsdLogMessage(CUPSD_LOG_EMERG, "Listeners[%d] = %d", i, lis->fd);
 
       cupsdLogMessage(CUPSD_LOG_EMERG, "BrowseSocket = %d", BrowseSocket);
@@ -834,12 +839,15 @@ main(int  argc,                           /* I - Number of command-line arguments */
       cupsdUpdateNotifierStatus();
 
    /*
-    * Expire subscriptions as needed...
+    * Expire subscriptions and unload completed jobs as needed...
     */
 
-    if (cupsArrayCount(Subscriptions) > 0 && current_time > expire_time)
+    if (current_time > expire_time)
     {
-      cupsdExpireSubscriptions(NULL, NULL);
+      if (cupsArrayCount(Subscriptions) > 0)
+        cupsdExpireSubscriptions(NULL, NULL);
+
+      cupsdUnloadCompletedJobs();
 
       expire_time = current_time;
     }
@@ -873,7 +881,9 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * Check for new connections on the "listen" sockets...
     */
 
-    for (i = NumListeners, lis = Listeners; i > 0; i --, lis ++)
+    for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+         lis;
+        lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
       if (lis->fd >= 0 && FD_ISSET(lis->fd, input))
       {
         FD_CLR(lis->fd, input);
@@ -884,7 +894,9 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * Check for new data on the client sockets...
     */
 
-    for (i = NumClients, con = Clients; i > 0; i --, con ++)
+    for (con = (cupsd_client_t *)cupsArrayFirst(Clients);
+        con;
+        con = (cupsd_client_t *)cupsArrayNext(Clients))
     {
      /*
       * Process the input buffer...
@@ -892,14 +904,16 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
       if (FD_ISSET(con->http.fd, input) || con->http.used)
       {
+        int fd = con->file;
+
+
         FD_CLR(con->http.fd, input);
 
         if (!cupsdReadClient(con))
        {
-         if (con->pipe_pid)
-           FD_CLR(con->file, input);
+         if (fd >= 0)
+           FD_CLR(fd, input);
 
-         con --;
          continue;
        }
       }
@@ -939,10 +953,7 @@ main(int  argc,                            /* I - Number of command-line arguments */
 
        if (!con->pipe_pid || con->file_ready)
           if (!cupsdWriteClient(con))
-         {
-           con --;
            continue;
-         }
       }
 
      /*
@@ -957,7 +968,6 @@ main(int  argc,                             /* I - Number of command-line arguments */
                        con->http.fd, Timeout);
 
         cupsdCloseClient(con);
-        con --;
         continue;
       }
     }
@@ -976,21 +986,21 @@ main(int  argc,                           /* I - Number of command-line arguments */
     * Log memory usage every minute...
     */
 
-    if ((current_time - mallinfo_time) >= 60 && LogLevel >= CUPSD_LOG_DEBUG)
+    if ((current_time - mallinfo_time) >= 60 && LogLevel >= CUPSD_LOG_DEBUG2)
     {
 #ifdef HAVE_MALLINFO
       struct mallinfo mem;             /* Malloc information */
 
 
       mem = mallinfo();
-      cupsdLogMessage(CUPSD_LOG_DEBUG,
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
                       "mallinfo: arena = %d, used = %d, free = %d\n",
                       mem.arena, mem.usmblks + mem.uordblks,
                      mem.fsmblks + mem.fordblks);
 #endif /* HAVE_MALLINFO */
 
       string_count = _cups_sp_statistics(&alloc_bytes, &total_bytes);
-      cupsdLogMessage(CUPSD_LOG_DEBUG,
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
                       "stringpool: " CUPS_LLFMT " strings, "
                      CUPS_LLFMT " allocated, " CUPS_LLFMT " total bytes",
                      CUPS_LLCAST string_count, CUPS_LLCAST alloc_bytes,
@@ -1071,7 +1081,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
   cupsdStopServer();
 
-  cupsdStopAllJobs();
+  cupsdFreeAllJobs();
 
   cupsdStopSystemMonitor();
 
@@ -1359,6 +1369,7 @@ static void
 launchd_checkin(void)
 {
   int                  i,              /* Looping var */
+                       count,          /* Numebr of listeners */
                        portnum;        /* Port number */
   launch_data_t                ld_msg,         /* Launch data message */
                        ld_resp,        /* Launch data response */
@@ -1381,12 +1392,12 @@ launchd_checkin(void)
   ld_msg = launch_data_new_string(LAUNCH_KEY_CHECKIN);
   if ((ld_resp = launch_msg(ld_msg)) == NULL)
   {
-    cupsdLogMessage(CUPSD_LOG_ERROR, 
+    cupsdLogMessage(CUPSD_LOG_ERROR,
                    "launchd_checkin: launch_msg(\"" LAUNCH_KEY_CHECKIN
                    "\") IPC failure");
     exit(EXIT_FAILURE);
   }
-  
+
   if (launch_data_get_type(ld_resp) == LAUNCH_DATA_ERRNO)
   {
     errno = launch_data_get_errno(ld_resp);
@@ -1399,8 +1410,8 @@ launchd_checkin(void)
   * Get the "run-at-load" setting...
   */
 
-  if ((ld_runatload = launch_data_dict_lookup(ld_resp,
-                                              LAUNCH_JOBKEY_RUNATLOAD)) != NULL &&
+  if ((ld_runatload =
+           launch_data_dict_lookup(ld_resp, LAUNCH_JOBKEY_RUNATLOAD)) != NULL &&
       launch_data_get_type(ld_runatload) == LAUNCH_DATA_BOOL)
     runatload = launch_data_get_bool(ld_runatload);
   else
@@ -1425,7 +1436,7 @@ launchd_checkin(void)
                     "launchd_checkin: No sockets found to answer requests on!");
     exit(EXIT_FAILURE);
   }
-  
+
  /*
   * Get the array of listener sockets...
   */
@@ -1446,32 +1457,32 @@ launchd_checkin(void)
    /*
     * Free the listeners array built from cupsd.conf...
     */
-  
-    if (NumListeners > 0)
-      free(Listeners);
-  
-    NumListeners = launch_data_array_get_count(ld_array);
-    Listeners    = calloc(NumListeners, sizeof(cupsd_listener_t));
-
-    if (!Listeners)
-    {
-      cupsdLogMessage(CUPSD_LOG_ERROR,
-                      "launchd_checkin: Unable to allocate new Listeners - %s.",
-                      strerror(errno));
-      exit(EXIT_FAILURE);
-    }
+
+    cupsdDeleteAllListeners();
 
    /*
-    * Note: launchd wants us to access the array in ascending order,
-    * thus "i" counts up and not down as we normally do elsewhere...
+    * Create a new array of listeners from the launchd data...
     */
 
-    for (i = 0, lis = Listeners; i < NumListeners; i ++, lis ++)
+    Listeners = cupsArrayNew(NULL, NULL);
+    count     = launch_data_array_get_count(ld_array);
+
+    for (i = 0; i < count; i ++)
     {
      /*
       * Copy the current address and log it...
       */
-  
+
+      if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
+      {
+       cupsdLogMessage(CUPSD_LOG_ERROR,
+                       "launchd_checkin: Unable to allocate listener - %s.",
+                       strerror(errno));
+       exit(EXIT_FAILURE);
+      }
+
+      cupsArrayAdd(Listeners, lis);
+
       tmp     = launch_data_array_get_index(ld_array, i);
       lis->fd = launch_data_get_fd(tmp);
       addrlen = sizeof(lis->address);
@@ -1482,10 +1493,10 @@ launchd_checkin(void)
                        "launchd_checkin: Unable to get local address - %s",
                        strerror(errno));
       }
-    
+
 #  ifdef HAVE_SSL
       portnum = 0;
-  
+
 #    ifdef AF_INET6
       if (addr.addr.sa_family == AF_INET6)
        portnum = ntohs(addr.ipv6.sin6_port);
@@ -1588,17 +1599,17 @@ launchd_reload(void)
 
     if (WIFSIGNALED(child_status))
       cupsdLogMessage(CUPSD_LOG_DEBUG,
-                      "launchd_reload: %s pid %d crashed on signal %d!", 
+                      "launchd_reload: %s pid %d crashed on signal %d!",
                      basename(argv[0]), child_pid, WTERMSIG(child_status));
     else
       cupsdLogMessage(CUPSD_LOG_DEBUG,
-                      "launchd_reload: %s pid %d stopped with status %d!", 
+                      "launchd_reload: %s pid %d stopped with status %d!",
                      basename(argv[0]), child_pid, WEXITSTATUS(child_status));
 
    /*
     * Do it again with the load command...
     */
-  
+
     argv[1] = "load";
 
     if (cupsdStartProcess(argv[0], argv, NULL, -1, -1, -1, -1, 1,
@@ -1634,19 +1645,18 @@ launchd_reload(void)
 
 
 /*
- * 'launchd_sync_conf()' - Re-write the launchd(8) config file 
+ * 'launchd_sync_conf()' - Re-write the launchd(8) config file
  *                        org.cups.cupsd.plist based on cupsd.conf.
  */
 
 static int                             /* O - 1 if the file was updated */
 launchd_sync_conf(void)
 {
-  int                    i,            /* Looping var */
-                         portnum;      /* Port number */
+  int                    portnum;      /* Port number */
   CFMutableDictionaryRef  cupsd_dict,  /* org.cups.cupsd.plist dictionary */
                          sockets,      /* Sockets dictionary */
                          listener;     /* Listener dictionary */
-  CFDataRef              resourceData; /* XML representation of the property list */
+  CFDataRef              resourceData; /* XML property list */
   CFMutableArrayRef      array;        /* Array */
   CFNumberRef            socket_mode;  /* Domain socket mode bits */
   CFStringRef            socket_path;  /* Domain socket path */
@@ -1665,12 +1675,12 @@ launchd_sync_conf(void)
   * time then there's nothing to do...
   */
 
-  if (!stat(ConfigurationFile, &cupsd_sb) && 
-      !stat(LaunchdConf, &launchd_sb) && 
+  if (!stat(ConfigurationFile, &cupsd_sb) &&
+      !stat(LaunchdConf, &launchd_sb) &&
       launchd_sb.st_mtimespec.tv_sec >= cupsd_sb.st_mtimespec.tv_sec)
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG,
-                    "launchd_sync_conf: Nothing to do, pid=%d.", 
+                    "launchd_sync_conf: Nothing to do, pid=%d.",
                    (int)getpid());
     return (0);
   }
@@ -1686,7 +1696,6 @@ launchd_sync_conf(void)
   {
     CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_LABEL),
                          CFSTR("org.cups.cupsd"));
-    CFDictionaryAddValue(cupsd_dict, CFSTR("Enabled"), kCFBooleanTrue);
     CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_ONDEMAND),
                          kCFBooleanTrue);
 
@@ -1716,7 +1725,7 @@ launchd_sync_conf(void)
    /*
     * Add a sockets dictionary...
     */
-  
+
     if ((sockets = (CFMutableDictionaryRef)CFDictionaryCreateMutable(
                                kCFAllocatorDefault, 0,
                                &kCFTypeDictionaryKeyCallBacks,
@@ -1727,7 +1736,7 @@ launchd_sync_conf(void)
      /*
       * Add a Listeners array to the sockets dictionary...
       */
-    
+
       if ((array = CFArrayCreateMutable(kCFAllocatorDefault, 0,
                                         &kCFTypeArrayCallBacks)) != NULL)
       {
@@ -1736,8 +1745,10 @@ launchd_sync_conf(void)
        /*
        * For each listener add a dictionary to the listeners array...
        */
-      
-        for (i = NumListeners, lis = Listeners; i > 0; i --, lis ++)
+
+       for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+            lis;
+            lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
        {
          if ((listener = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
                                &kCFTypeDictionaryKeyCallBacks,
@@ -1748,8 +1759,8 @@ launchd_sync_conf(void)
 #  ifdef AF_LOCAL
            if (lis->address.addr.sa_family == AF_LOCAL)
            {
-             if ((socket_path = CFStringCreateWithCString(kCFAllocatorDefault, 
-                                       lis->address.un.sun_path, 
+             if ((socket_path = CFStringCreateWithCString(kCFAllocatorDefault,
+                                       lis->address.un.sun_path,
                                        kCFStringEncodingUTF8)))
              {
                CFDictionaryAddValue(listener,
@@ -1788,11 +1799,11 @@ launchd_sync_conf(void)
              }
 
              if ((service = getservbyport(portnum, NULL)))
-               value = CFStringCreateWithCString(kCFAllocatorDefault, 
-                                                 service->s_name, 
+               value = CFStringCreateWithCString(kCFAllocatorDefault,
+                                                 service->s_name,
                                                  kCFStringEncodingUTF8);
              else
-               value = CFNumberCreate(kCFAllocatorDefault, 
+               value = CFNumberCreate(kCFAllocatorDefault,
                                       kCFNumberIntType, &portnum);
 
              if (value)
@@ -1804,7 +1815,7 @@ launchd_sync_conf(void)
              } 
 
              httpAddrString(&lis->address, temp, sizeof(temp));
-             if ((value = CFStringCreateWithCString(kCFAllocatorDefault, temp, 
+             if ((value = CFStringCreateWithCString(kCFAllocatorDefault, temp,
                                                     kCFStringEncodingUTF8)))
              {
                CFDictionaryAddValue(listener,
@@ -1824,10 +1835,10 @@ launchd_sync_conf(void)
      /*
       * Add the BrowseSocket to the sockets dictionary...
       */
-      
+
       if (Browsing && (BrowseRemoteProtocols & BROWSE_CUPS))
       {
-       if ((array = CFArrayCreateMutable(kCFAllocatorDefault, 0, 
+       if ((array = CFArrayCreateMutable(kCFAllocatorDefault, 0,
                                          &kCFTypeArrayCallBacks)) != NULL)
        {
          CFDictionaryAddValue(sockets, CFSTR("BrowseSockets"), array);
@@ -1844,11 +1855,11 @@ launchd_sync_conf(void)
                                 CFSTR("dgram"));
 
            if ((service = getservbyport(BrowsePort, NULL)))
-             value = CFStringCreateWithCString(kCFAllocatorDefault, 
-                                               service->s_name, 
+             value = CFStringCreateWithCString(kCFAllocatorDefault,
+                                               service->s_name,
                                                kCFStringEncodingUTF8);
            else
-             value = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, 
+             value = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType,
                                     &BrowsePort);
 
            CFDictionaryAddValue(listener,
@@ -1866,11 +1877,11 @@ launchd_sync_conf(void)
     }
 
     cupsdLogMessage(CUPSD_LOG_DEBUG,
-                    "launchd_sync_conf: Updating \"%s\", pid=%d\n", 
+                    "launchd_sync_conf: Updating \"%s\", pid=%d\n",
                    LaunchdConf, (int)getpid());
-  
-    if ((fileURL = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault, 
-                               (const unsigned char *)LaunchdConf, 
+
+    if ((fileURL = CFURLCreateFromFileSystemRepresentation(kCFAllocatorDefault,
+                               (const unsigned char *)LaunchdConf,
                                strlen(LaunchdConf), false)))
     {
       if ((resourceData = CFPropertyListCreateXMLData(kCFAllocatorDefault,
@@ -1882,7 +1893,7 @@ launchd_sync_conf(void)
          cupsdLogMessage(CUPSD_LOG_WARN,
                          "launchd_sync_conf: "
                          "CFURLWriteDataAndPropertiesToResource(\"%s\") "
-                         "failed: %d\n", 
+                         "failed: %d\n",
                          LaunchdConf, (int)errorCode);
         }
 
@@ -1973,7 +1984,8 @@ process_children(void)
 
       if (LogLevel < CUPSD_LOG_DEBUG)
         cupsdLogMessage(CUPSD_LOG_INFO,
-                       "Hint: Try setting the LogLevel to \"debug\" to find out more.");
+                       "Hint: Try setting the LogLevel to \"debug\" to find "
+                       "out more.");
     }
     else
       cupsdLogMessage(CUPSD_LOG_DEBUG, "PID %d (%s) exited with no errors.",
@@ -1993,8 +2005,7 @@ process_children(void)
     for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
         job;
         job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-      if (job->state != NULL &&
-          job->state->values[0].integer == IPP_JOB_PROCESSING)
+      if (job->state_value == IPP_JOB_PROCESSING)
       {
        for (i = 0; job->filters[i]; i ++)
           if (job->filters[i] == pid)
@@ -2125,9 +2136,8 @@ sigterm_handler(int sig)          /* I - Signal */
  */
 
 static long                            /* O - Number of seconds */
-select_timeout(int fds)                        /* I - Number of ready descriptors select returned */
+select_timeout(int fds)                        /* I - Number of descriptors returned */
 {
-  int                  i;              /* Looping var */
   long                 timeout;        /* Timeout for select */
   time_t               now;            /* Current time */
   cupsd_client_t       *con;           /* Client information */
@@ -2142,7 +2152,9 @@ select_timeout(int fds)                   /* I - Number of ready descriptors select returned */
   * processed; if so, the timeout should be 0...
   */
 
-  for (i = NumClients, con = Clients; i > 0; i --, con ++)
+  for (con = (cupsd_client_t *)cupsArrayFirst(Clients);
+       con;
+       con = (cupsd_client_t *)cupsArrayNext(Clients))
     if (con->http.used > 0)
       return (0);
 
@@ -2152,7 +2164,7 @@ select_timeout(int fds)                   /* I - Number of ready descriptors select returned */
   * timeout, just make it 1 second.
   */
 
-  if (fds || NumClients > 50)
+  if (fds || cupsArrayCount(Clients) > 50)
     return (1);
 
  /*
@@ -2174,7 +2186,9 @@ select_timeout(int fds)                   /* I - Number of ready descriptors select returned */
   * Check the activity and close old clients...
   */
 
-  for (i = NumClients, con = Clients; i > 0; i --, con ++)
+  for (con = (cupsd_client_t *)cupsArrayFirst(Clients);
+       con;
+       con = (cupsd_client_t *)cupsArrayNext(Clients))
     if ((con->http.activity + Timeout) < timeout)
     {
       timeout = con->http.activity + Timeout;
@@ -2230,7 +2244,7 @@ select_timeout(int fds)                   /* I - Number of ready descriptors select returned */
     for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
         job;
         job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-      if (job->state->values[0].integer <= IPP_JOB_PROCESSING)
+      if (job->state_value <= IPP_JOB_PROCESSING)
       {
        timeout = now + 10;
        why     = "process active jobs";
@@ -2257,7 +2271,7 @@ select_timeout(int fds)                   /* I - Number of ready descriptors select returned */
   for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
        sub;
        sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
-    if (!sub->job && sub->expire < timeout)
+    if (!sub->job && sub->expire && sub->expire < timeout)
     {
       timeout = sub->expire;
       why     = "expire subscription";
@@ -2310,5 +2324,5 @@ usage(int status)                 /* O - Exit status */
 
 
 /*
- * End of "$Id: main.c 5056 2006-02-02 19:46:32Z mike $".
+ * End of "$Id: main.c 5108 2006-02-15 19:33:09Z mike $".
  */
index 76883d7612da23d26bf1e30d050bfbdee83d9c54..7ccaa70e13e795eb9c0f1c17df894de4eb19861d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: mime.h 5058 2006-02-02 21:58:45Z mike $"
+ * "$Id: mime.h 5061 2006-02-03 16:32:18Z mike $"
  *
  *   MIME type/conversion database definitions for the Common UNIX Printing System (CUPS).
  *
@@ -72,7 +72,7 @@ typedef enum
 
 typedef struct _mime_magic_s           /**** MIME Magic Data ****/
 {
-  struct mime_magic_str        *prev,          /* Previous rule */
+  struct _mime_magic_s *prev,          /* Previous rule */
                        *next,          /* Next rule */
                        *parent,        /* Parent rules */
                        *child;         /* Child rules */
@@ -141,7 +141,7 @@ extern mime_filter_t        *mimeAddFilter(mime_t *mime, mime_type_t *src,
                                       const char *filter);
 extern void            mimeDeleteFilter(mime_t *mime, mime_filter_t *filter);
 extern cups_array_t    *mimeFilter(mime_t *mime, mime_type_t *src,
-                                   mime_type_t *dst, int *cost, int max_depth);
+                                   mime_type_t *dst, int *cost);
 extern mime_filter_t   *mimeFirstFilter(mime_t *mime);
 extern mime_filter_t   *mimeNextFilter(mime_t *mime);
 extern int             mimeNumFilters(mime_t *mime);
@@ -152,5 +152,5 @@ extern int          mimeNumFilters(mime_t *mime);
 #endif /* !_CUPS_MIME_H_ */
 
 /*
- * End of "$Id: mime.h 5058 2006-02-02 21:58:45Z mike $".
+ * End of "$Id: mime.h 5061 2006-02-03 16:32:18Z mike $".
  */
index 1c2875f4fb9079de305ab2e4a44c9ce438cb5d72..46f3f26550943d462c0da569a78b1e25f3a34931 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: network.c 5043 2006-02-01 18:55:16Z mike $"
+ * "$Id: network.c 5069 2006-02-04 05:24:35Z mike $"
  *
  *   Network interface functions for the Common UNIX Printing System
  *   (CUPS) scheduler.
@@ -144,8 +144,7 @@ cupsdNetIFFree(void)
 void
 cupsdNetIFUpdate(void)
 {
-  int                  i,              /* Looping var */
-                       match;          /* Matching address? */
+  int                  match;          /* Matching address? */
   cupsd_listener_t     *lis;           /* Listen address */
   cupsd_netif_t                *temp;          /* New interface */
   struct ifaddrs       *addrs,         /* Interface address list */
@@ -285,7 +284,9 @@ cupsdNetIFUpdate(void)
     * Determine which port to use when advertising printers...
     */
 
-    for (i = NumListeners, lis = Listeners; i > 0; i --, lis ++)
+    for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+         lis;
+        lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
     {
       match = 0;
 
@@ -589,5 +590,5 @@ freeifaddrs(struct ifaddrs *addrs)  /* I - Interface list to free */
 
 
 /*
- * End of "$Id: network.c 5043 2006-02-01 18:55:16Z mike $".
+ * End of "$Id: network.c 5069 2006-02-04 05:24:35Z mike $".
  */
index 6f9371b21fe32de0e0b76f16fc15e39ce650e321..dee4355f35e003f2b8bde3a0ea9e440bc77b672f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: policy.c 4871 2005-12-07 00:41:11Z mike $"
+ * "$Id: policy.c 5122 2006-02-17 15:41:40Z mike $"
  *
  *   Policy routines for the Common UNIX Printing System (CUPS).
  *
@@ -236,10 +236,7 @@ cupsdDeleteAllPolicies(void)
   for (i = NumPolicies, p = Policies; i > 0; i --, p ++)
   {
     for (j = (*p)->num_ops, po = (*p)->ops; j > 0; j --, po ++)
-    {
       cupsdDeleteLocation(*po);
-      free(*po);
-    }
 
     if ((*p)->num_ops > 0)
       free((*p)->ops);
@@ -333,5 +330,5 @@ cupsdFindPolicyOp(cupsd_policy_t *p,        /* I - Policy */
 
 
 /*
- * End of "$Id: policy.c 4871 2005-12-07 00:41:11Z mike $".
+ * End of "$Id: policy.c 5122 2006-02-17 15:41:40Z mike $".
  */
index f8ea136a40d7b8cceb2d3aa62b0cc23423bee57a..e04a4875c0e5af25c5904069c0b48d56871b1bbf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: printers.c 5047 2006-02-02 05:14:15Z mike $"
+ * "$Id: printers.c 5132 2006-02-19 14:57:11Z mike $"
  *
  *   Printer routines for the Common UNIX Printing System (CUPS).
  *
@@ -24,7 +24,6 @@
  * Contents:
  *
  *   cupsdAddPrinter()           - Add a printer to the system.
- *   cupsdAddPrinterFilter()     - Add a MIME filter for a printer.
  *   cupsdAddPrinterHistory()    - Add the current printer state to the history.
  *   cupsdAddPrinterUser()       - Add a user to the ACL.
  *   cupsdDeleteAllPrinters()    - Delete all printers from the system.
  *   cupsdWritePrintcap()        - Write a pseudo-printcap file for older
  *                                 applications that need it...
  *   cupsdSanitizeURI()          - Sanitize a device URI...
+ *   add_printer_filter()        - Add a MIME filter for a printer.
+ *   add_printer_formats()       - Add document-format-supported values for
+ *                                 a printer.
  *   compare_printers()          - Compare two printers.
+ *   transcode_nickname()        - Convert the PPD NickName to UTF-8...
  *   write_irix_config()         - Update the config files used by the IRIX
  *                                 desktop tools.
  *   write_irix_state()          - Update the status files used by IRIX
  */
 
 #include "cupsd.h"
+#include <cups/transcode.h>
 
 
 /*
  * Local functions...
  */
 
+static void    add_printer_filter(cupsd_printer_t *p, const char *filter);
+static void    add_printer_formats(cupsd_printer_t *p);
 static int     compare_printers(void *first, void *second, void *data);
+static void    transcode_nickname(cupsd_printer_t *p, ppd_file_t *ppd);
 #ifdef __sgi
 static void    write_irix_config(cupsd_printer_t *p);
 static void    write_irix_state(cupsd_printer_t *p);
@@ -141,63 +148,6 @@ cupsdAddPrinter(const char *name)  /* I - Name of printer */
 }
 
 
-/*
- * 'cupsdAddPrinterFilter()' - Add a MIME filter for a printer.
- */
-
-void
-cupsdAddPrinterFilter(
-    cupsd_printer_t  *p,               /* I - Printer to add to */
-    const char       *filter)          /* I - Filter to add */
-{
-  char         super[MIME_MAX_SUPER],  /* Super-type for filter */
-               type[MIME_MAX_TYPE],    /* Type for filter */
-               program[1024];          /* Program/filter name */
-  int          cost;                   /* Cost of filter */
-  mime_type_t  *temptype;              /* MIME type looping var */
-
-
- /*
-  * Range check input...
-  */
-
-  if (p == NULL || p->filetype == NULL || filter == NULL)
-    return;
-
- /*
-  * Parse the filter string; it should be in the following format:
-  *
-  *     super/type cost program
-  */
-
-  if (sscanf(filter, "%15[^/]/%31s%d%1023s", super, type, &cost, program) != 4)
-  {
-    cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "cupsdAddPrinterFilter: Invalid filter string \"%s\"!",
-                    filter);
-    return;
-  }
-
- /*
-  * Add the filter to the MIME database, supporting wildcards as needed...
-  */
-
-  for (temptype = mimeFirstType(MimeDatabase);
-       temptype;
-       temptype = mimeNextType(MimeDatabase))
-    if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) ||
-         !strcasecmp(temptype->super, super)) &&
-        (type[0] == '*' || !strcasecmp(temptype->type, type)))
-    {
-      cupsdLogMessage(CUPSD_LOG_DEBUG2, "Adding filter %s/%s %s/%s %d %s",
-                      temptype->super, temptype->type,
-                     p->filetype->super, p->filetype->type,
-                      cost, program);
-      mimeAddFilter(MimeDatabase, temptype, p->filetype, cost, program);
-    }
-}
-
-
 /*
  * 'cupsdAddPrinterHistory()' - Add the current printer state to the history.
  */
@@ -464,11 +414,6 @@ cupsdCreateCommonData(void)
   ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
                "document-format-default", NULL, "application/octet-stream");
 
-  /* document-format-supported */
-  ippAddStrings(CommonData, IPP_TAG_PRINTER,
-                (ipp_tag_t)(IPP_TAG_MIMETYPE | IPP_TAG_COPY),
-                "document-format-supported", NumMimeTypes, NULL, MimeTypes);
-
   /* generated-natural-language-supported */
   ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_LANGUAGE,
                "generated-natural-language-supported", NULL, DefaultLanguage);
@@ -514,7 +459,7 @@ cupsdCreateCommonData(void)
 
     if (attr == NULL)
       cupsdLogMessage(CUPSD_LOG_EMERG,
-                      "cupsdSetPrinterAttrs: Unable to allocate memory for "
+                      "Unable to allocate memory for "
                       "job-sheets-supported attribute: %s!", strerror(errno));
     else if (!Classification || ClassifyOverride)
     {
@@ -931,8 +876,7 @@ cupsdLoadAllPrinters(void)
   if ((fp = cupsFileOpen(line, "r")) == NULL)
   {
     if (errno != ENOENT)
-      cupsdLogMessage(CUPSD_LOG_ERROR,
-                     "cupsdLoadAllPrinters: Unable to open %s - %s", line,
+      cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to open %s - %s", line,
                      strerror(errno));
     return;
   }
@@ -963,8 +907,7 @@ cupsdLoadAllPrinters(void)
         * Add the printer and a base file type...
        */
 
-        cupsdLogMessage(CUPSD_LOG_DEBUG,
-                       "cupsdLoadAllPrinters: Loading printer %s...", value);
+        cupsdLogMessage(CUPSD_LOG_DEBUG, "Loading printer %s...", value);
 
         p = cupsdAddPrinter(value);
        p->accepting = 1;
@@ -1718,15 +1661,22 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
                        "pages-per-minute", ppd->throughput);
 
         if (ppd->nickname)
-          cupsdSetString(&p->make_model, ppd->nickname);
+       {
+        /*
+         * The NickName can be localized in the character set specified
+         * by the LanugageEncoding attribute.  Convert as needed to
+         * UTF-8...
+         */
+
+          transcode_nickname(p, ppd);
+       }
        else if (ppd->modelname)
           cupsdSetString(&p->make_model, ppd->modelname);
        else
          cupsdSetString(&p->make_model, "Bad PPD File");
 
-        if (p->make_model)
-         ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT,
-                       "printer-make-and-model", NULL, p->make_model);
+       ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT,
+                     "printer-make-and-model", NULL, p->make_model);
 
        /*
        * Add media options from the PPD file...
@@ -1748,9 +1698,10 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
 
         if (num_media == 0)
        {
-         cupsdLogMessage(CUPSD_LOG_CRIT, "cupsdSetPrinterAttrs: The PPD file for printer %s "
-                            "contains no media options and is therefore "
-                            "invalid!", p->name);
+         cupsdLogMessage(CUPSD_LOG_CRIT,
+                         "The PPD file for printer %s "
+                         "contains no media options and is therefore "
+                         "invalid!", p->name);
        }
        else
        {
@@ -1856,7 +1807,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
        * handle "raw" printing by users.
        */
 
-        cupsdAddPrinterFilter(p, "application/vnd.cups-raw 0 -");
+        add_printer_filter(p, "application/vnd.cups-raw 0 -");
 
        /*
        * Add any filters in the PPD file...
@@ -1866,7 +1817,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
        for (i = 0; i < ppd->num_filters; i ++)
        {
           DEBUG_printf(("ppd->filters[%d] = \"%s\"\n", i, ppd->filters[i]));
-          cupsdAddPrinterFilter(p, ppd->filters[i]);
+          add_printer_filter(p, ppd->filters[i]);
        }
 
        if (ppd->num_filters == 0)
@@ -1875,7 +1826,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
          * If there are no filters, add a PostScript printing filter.
          */
 
-          cupsdAddPrinterFilter(p, "application/vnd.cups-postscript 0 -");
+          add_printer_filter(p, "application/vnd.cups-postscript 0 -");
         }
 
        /*
@@ -1948,13 +1899,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
        * handle "raw" printing by users.
        */
 
-        cupsdAddPrinterFilter(p, "application/vnd.cups-raw 0 -");
+        add_printer_filter(p, "application/vnd.cups-raw 0 -");
 
        /*
         * Add a PostScript filter, since this is still possibly PS printer.
        */
 
-       cupsdAddPrinterFilter(p, "application/vnd.cups-postscript 0 -");
+       add_printer_filter(p, "application/vnd.cups-postscript 0 -");
       }
       else
       {
@@ -1975,7 +1926,7 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
 
          snprintf(filename, sizeof(filename), "*/* 0 %s/interfaces/%s",
                   ServerRoot, p->name);
-         cupsdAddPrinterFilter(p, filename);
+         add_printer_filter(p, filename);
        }
        else if (p->device_uri &&
                 !strncmp(p->device_uri, "ipp://", 6) &&
@@ -2030,6 +1981,12 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
     }
   }
 
+ /*
+  * Populate the document-format-supported attribute...
+  */
+
+  add_printer_formats(p);
+
   DEBUG_printf(("cupsdSetPrinterAttrs: leaving name = %s, type = %x\n", p->name,
                 p->type));
 
@@ -2246,6 +2203,7 @@ cupsdStopPrinter(cupsd_printer_t *p,      /* I - Printer to stop */
     */
 
     job->state->values[0].integer = IPP_JOB_PENDING;
+    job->state_value              = IPP_JOB_PENDING;
 
     cupsdSaveJob(job);
   }
@@ -2628,6 +2586,174 @@ cupsdSanitizeURI(const char *uri,       /* I - Original device URI */
 }
 
 
+/*
+ * 'add_printer_filter()' - Add a MIME filter for a printer.
+ */
+
+static void
+add_printer_filter(
+    cupsd_printer_t  *p,               /* I - Printer to add to */
+    const char       *filter)          /* I - Filter to add */
+{
+  char         super[MIME_MAX_SUPER],  /* Super-type for filter */
+               type[MIME_MAX_TYPE],    /* Type for filter */
+               program[1024];          /* Program/filter name */
+  int          cost;                   /* Cost of filter */
+  mime_type_t  *temptype;              /* MIME type looping var */
+  char         filename[1024];         /* Full filter filename */
+
+
+ /*
+  * Parse the filter string; it should be in the following format:
+  *
+  *     super/type cost program
+  */
+
+  if (sscanf(filter, "%15[^/]/%31s%d%1023s", super, type, &cost, program) != 4)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR, "%s: invalid filter string \"%s\"!",
+                    p->name, filter);
+    return;
+  }
+
+ /*
+  * See if the filter program exists; if not, stop the printer and flag
+  * the error!
+  */
+
+  if (program[0] == '/')
+    strlcpy(filename, program, sizeof(filename));
+  else
+    snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin, program);
+
+  if (access(filename, X_OK))
+  {
+    snprintf(p->state_message, sizeof(p->state_message),
+             "Filter \"%s\" for printer \"%s\" not available: %s",
+            program, p->name, strerror(errno));
+    cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 0);
+    cupsdSetPrinterReasons(p, "+cups-missing-filter-error");
+    cupsdAddPrinterHistory(p);
+
+    cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message);
+  }
+
+ /*
+  * Add the filter to the MIME database, supporting wildcards as needed...
+  */
+
+  for (temptype = mimeFirstType(MimeDatabase);
+       temptype;
+       temptype = mimeNextType(MimeDatabase))
+    if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) ||
+         !strcasecmp(temptype->super, super)) &&
+        (type[0] == '*' || !strcasecmp(temptype->type, type)))
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                      "add_printer_filter: %s: adding filter %s/%s %s/%s %d %s",
+                      p->name, temptype->super, temptype->type,
+                     p->filetype->super, p->filetype->type,
+                      cost, program);
+      mimeAddFilter(MimeDatabase, temptype, p->filetype, cost, program);
+    }
+}
+
+
+/*
+ * 'add_printer_formats()' - Add document-format-supported values for a printer.
+ */
+
+static void
+add_printer_formats(cupsd_printer_t *p)        /* I - Printer */
+{
+  int          i;                      /* Looping var */
+  mime_type_t  *type;                  /* Current MIME type */
+  cups_array_t *filters;               /* Filters */
+  int          num_types;              /* Number of supported types */
+  const char   **types;                /* Array of supported type names */
+  char         mimetype[MIME_MAX_SUPER + MIME_MAX_TYPE + 2];
+                                       /* MIME type name */
+
+
+ /*
+  * Raw (and remote) queues advertise all of the supported MIME
+  * types...
+  */
+
+  if (p->raw)
+  {
+    ippAddStrings(p->attrs, IPP_TAG_PRINTER,
+                  (ipp_tag_t)(IPP_TAG_MIMETYPE | IPP_TAG_COPY),
+                  "document-format-supported", NumMimeTypes, NULL, MimeTypes);
+    return;
+  }
+
+ /*
+  * Otherwise, loop through the supported MIME types and see if there
+  * are filters for them...
+  */
+
+  if ((types = calloc(NumMimeTypes, sizeof(char *))) == NULL)
+  {
+    cupsdLogMessage(CUPSD_LOG_EMERG,
+                    "Unable to allocate memory for \"%s\" MIME type list!",
+                   p->name);
+    return;
+  }
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_printer_formats: %d types, %d filters",
+                  mimeNumTypes(MimeDatabase), mimeNumFilters(MimeDatabase));
+
+  types[0] = _cups_sp_alloc("application/octet-stream");
+
+  for (num_types = 1, type = mimeFirstType(MimeDatabase);
+       type;
+       type = mimeNextType(MimeDatabase))
+  {
+    if (!strcasecmp(type->super, "application") &&
+       !strcasecmp(type->type, "octet-stream"))
+      continue;
+
+    snprintf(mimetype, sizeof(mimetype), "%s/%s", type->super, type->type);
+
+    if ((filters = mimeFilter(MimeDatabase, type, p->filetype, NULL)) != NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                      "add_printer_formats: %s: %s needs %d filters",
+                      p->name, mimetype, cupsArrayCount(filters));
+
+      cupsArrayDelete(filters);
+      types[num_types] = _cups_sp_alloc(mimetype);
+      num_types ++;
+    }
+    else
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                      "add_printer_formats: %s: %s not supported",
+                      p->name, mimetype);
+  }
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "add_printer_formats: %s: %d supported types",
+                 p->name, num_types);
+
+ /*
+  * Add the file formats that can be filtered...
+  */
+
+  ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
+                "document-format-supported", num_types, NULL, types);
+
+ /*
+  * Free the temporary data...
+  */
+
+  for (i = 0; i < num_types; i ++)
+    _cups_sp_free(types[i]);
+
+  free(types);
+}
+
+
 /*
  * 'compare_printers()' - Compare two printers.
  */
@@ -2642,6 +2768,88 @@ compare_printers(void *first,            /* I - First printer */
 }
 
 
+/*
+ * 'transcode_nickname()' - Convert the PPD NickName to UTF-8...
+ */
+
+static void
+transcode_nickname(cupsd_printer_t *p, /* I - Printer */
+                   ppd_file_t      *ppd)/* I - PPD file */
+{
+  cups_utf8_t          utf8[256];      /* UTF-8 version of nickname */
+  cups_encoding_t      encoding;       /* Encoding of PPD file */
+  const char           *nickptr;       /* Pointer into nickname */
+
+
+ /*
+  * See if we need to convert to UTF-8...
+  */
+
+  if (!ppd->lang_encoding || !strcasecmp(ppd->lang_encoding, "UTF-8"))
+  {
+   /*
+    * No language encoding, or encoding uses the non-standard UTF-8
+    * value, so no transcoding is required...
+    */
+
+    goto no_transcode;
+  }
+
+  for (nickptr = ppd->nickname; *nickptr; nickptr ++)
+    if (*nickptr & 0x80)
+      break;
+
+  if (!*nickptr)
+  {
+   /*
+    * No non-ASCII characters, so no transcoding is required...
+    */
+
+    goto no_transcode;
+  }
+
+ /*
+  * OK, we need to transcode...
+  */
+
+  if (!strcasecmp(ppd->lang_encoding, "ISOLatin1"))
+    encoding = CUPS_ISO8859_1;
+  else if (!strcasecmp(ppd->lang_encoding, "ISOLatin2"))
+    encoding = CUPS_ISO8859_2;
+  else if (!strcasecmp(ppd->lang_encoding, "ISOLatin5"))
+    encoding = CUPS_ISO8859_5;
+  else if (!strcasecmp(ppd->lang_encoding, "JIS83-RKSJ"))
+    encoding = CUPS_WINDOWS_932;
+  else if (!strcasecmp(ppd->lang_encoding, "MacStandard"))
+    encoding = CUPS_MAC_ROMAN;
+  else if (!strcasecmp(ppd->lang_encoding, "WindowsANSI"))
+    encoding = CUPS_WINDOWS_1252;
+  else
+  {
+   /*
+    * Unknown encoding, treat as UTF-8...
+    */
+
+    goto no_transcode;
+  }
+
+  cupsCharsetToUTF8(utf8, ppd->nickname, sizeof(utf8), encoding);
+
+  cupsdSetString(&p->make_model, (char *)utf8);
+
+  return;
+
+ /*
+  * Yeah, yeah, gotos are evil, but code bloat is more evil...
+  */
+
+  no_transcode:
+
+  cupsdSetString(&p->make_model, ppd->nickname);
+  return;
+}
+
+
 #ifdef __sgi
 /*
  * 'write_irix_config()' - Update the config files used by the IRIX
@@ -2898,5 +3106,5 @@ write_irix_state(cupsd_printer_t *p)      /* I - Printer to update */
 
 
 /*
- * End of "$Id: printers.c 5047 2006-02-02 05:14:15Z mike $".
+ * End of "$Id: printers.c 5132 2006-02-19 14:57:11Z mike $".
  */
index b11b96068aa6933854c7251fc926b0516ec346ba..79872ecddaf3b18bae74a5fb7f14b6d066922c79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: printers.h 5039 2006-02-01 16:29:57Z mike $"
+ * "$Id: printers.h 5083 2006-02-06 02:57:43Z mike $"
  *
  *   Printer definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -110,7 +110,6 @@ VAR cupsd_policy_t  *DefaultPolicyPtr
  */
 
 extern cupsd_printer_t *cupsdAddPrinter(const char *name);
-extern void            cupsdAddPrinterFilter(cupsd_printer_t *p, const char *filter);
 extern void            cupsdAddPrinterHistory(cupsd_printer_t *p);
 extern void            cupsdAddPrinterUser(cupsd_printer_t *p, const char *username);
 extern cupsd_quota_t   *cupsdAddQuota(cupsd_printer_t *p, const char *username);
@@ -144,5 +143,5 @@ extern char         *cupsdSanitizeURI(const char *uri, char *buffer,
 
 
 /*
- * End of "$Id: printers.h 5039 2006-02-01 16:29:57Z mike $".
+ * End of "$Id: printers.h 5083 2006-02-06 02:57:43Z mike $".
  */
index 0938f7394ad16e3d6e3851422c3fcbff2a3f8dc6..d891adf170890945c6ffbb16c98ebc481d360e8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: process.c 5049 2006-02-02 14:50:57Z mike $"
+ * "$Id: process.c 5094 2006-02-09 01:00:26Z mike $"
  *
  *   Process management routines for the Common UNIX Printing System (CUPS).
  *
@@ -146,37 +146,26 @@ cupsdStartProcess(
   * MacOS X programs to access their bundle resources properly...
   */
 
-  for (envc = 0; envc < MAX_ENV && envp[envc]; envc ++);
-    /* All callers pass in a MAX_ENV element array of environment strings */
-
-  if (envc < (MAX_ENV - 1))
+  if ((linkbytes = readlink(command, linkpath, sizeof(linkpath) - 1)) > 0)
   {
    /*
-    * We have room, try to read the symlink path for this command...
+    * Yes, this is a symlink to the actual program, nul-terminate and
+    * use it...
     */
 
-    if ((linkbytes = readlink(command, linkpath, sizeof(linkpath) - 1)) > 0)
-    {
-     /*
-      * Yes, this is a symlink to the actual program, nul-terminate and
-      * use it...
-      */
-
-      linkpath[linkbytes] = '\0';
+    linkpath[linkbytes] = '\0';
 
-      if (linkpath[0] == '/')
-        snprintf(processPath, sizeof(processPath), "CFProcessPath=%s",
-                linkpath);
-      else
-        snprintf(processPath, sizeof(processPath), "CFProcessPath=%s/%s",
-                dirname(command), linkpath);
-    }
+    if (linkpath[0] == '/')
+      snprintf(processPath, sizeof(processPath), "CFProcessPath=%s",
+              linkpath);
     else
-      snprintf(processPath, sizeof(processPath), "CFProcessPath=%s", command);
-
-    envp[envc++] = processPath;
-    envp[envc]   = NULL;
+      snprintf(processPath, sizeof(processPath), "CFProcessPath=%s/%s",
+              dirname(command), linkpath);
   }
+  else
+    snprintf(processPath, sizeof(processPath), "CFProcessPath=%s", command);
+
+  envp[0] = processPath;               /* Replace <CFProcessPath> string */
 #endif /* __APPLE__ && __GNUC__ > 3 */
 
  /*
@@ -353,5 +342,5 @@ compare_procs(cupsd_proc_t *a,              /* I - First process */
 
 
 /*
- * End of "$Id: process.c 5049 2006-02-02 14:50:57Z mike $".
+ * End of "$Id: process.c 5094 2006-02-09 01:00:26Z mike $".
  */
index b5b71f78806d390082ea430b5d7e49f1b842a4a9..74c2fc0712ad5dbff6d0a29eb7535c17bd3157dc 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: server.c 4993 2006-01-26 19:27:40Z mike $"
+ * "$Id: server.c 5095 2006-02-09 16:22:48Z mike $"
  *
  *   Server start/stop routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2006 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
@@ -223,5 +223,5 @@ cupsdStopServer(void)
 
 
 /*
- * End of "$Id: server.c 4993 2006-01-26 19:27:40Z mike $".
+ * End of "$Id: server.c 5095 2006-02-09 16:22:48Z mike $".
  */
index 3161de5f8ffb38ab7e406879b579a84649f38888..a4875b1c227207182810d04ced9274c92687dd7a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: statbuf.c 5038 2006-02-01 16:03:02Z mike $"
+ * "$Id: statbuf.c 5073 2006-02-04 17:39:51Z mike $"
  *
  *   Status buffer routines for the Common UNIX Printing System (CUPS)
  *   scheduler.
@@ -277,7 +277,7 @@ cupsdStatBufUpdate(cupsd_statbuf_t *sb,     /* I - Status buffer */
   }
   else
   {
-    *loglevel = CUPSD_LOG_DEBUG;
+    *loglevel = CUPSD_LOG_ERROR;
     message   = sb->buffer;
   }
 
@@ -328,5 +328,5 @@ cupsdStatBufUpdate(cupsd_statbuf_t *sb,     /* I - Status buffer */
 
 
 /*
- * End of "$Id: statbuf.c 5038 2006-02-01 16:03:02Z mike $".
+ * End of "$Id: statbuf.c 5073 2006-02-04 17:39:51Z mike $".
  */
index d77b33f78c8d5b57b35a798dd29680e0a3bfee66..c109bb72a23970f54052c6496299a9caef956503 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: subscriptions.c 5046 2006-02-01 22:11:58Z mike $"
+ * "$Id: subscriptions.c 5108 2006-02-15 19:33:09Z mike $"
  *
  *   Subscription routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -233,7 +233,7 @@ cupsdAddEvent(
            ippAddString(temp->attrs, IPP_TAG_EVENT_NOTIFICATION, IPP_TAG_NAME,
                         "job-name", NULL, attr->values[0].string.text);
 
-         switch (job->state->values[0].integer)
+         switch (job->state_value)
          {
            case IPP_JOB_PENDING :
                if (dest && dest->state == IPP_PRINTER_STOPPED)
@@ -668,10 +668,12 @@ cupsdExpireSubscriptions(
   for (sub = (cupsd_subscription_t *)cupsArrayFirst(Subscriptions);
        sub;
        sub = (cupsd_subscription_t *)cupsArrayNext(Subscriptions))
-    if ((sub->expire <= curtime && dest && sub->dest == dest) ||
+    if ((!sub->job && !dest && sub->expire && sub->expire <= curtime) ||
+        (dest && sub->dest == dest) ||
        (job && sub->job == job))
     {
-      cupsdLogMessage(CUPSD_LOG_INFO, "Subscription %d has expired...", sub->id);
+      cupsdLogMessage(CUPSD_LOG_INFO, "Subscription %d has expired...",
+                      sub->id);
 
       cupsdDeleteSubscription(sub, 0);
 
@@ -973,7 +975,10 @@ cupsdLoadAllSubscriptions(void)
       */
 
       if (value && isdigit(*value & 255))
-        sub->lease = atoi(value);
+      {
+        sub->lease  = atoi(value);
+        sub->expire = sub->lease ? time(NULL) + sub->lease : 0;
+      }
       else
       {
        cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -1454,7 +1459,7 @@ cupsd_send_dbus(cupsd_eventmask_t event,/* I - Event to send */
   else if (event & CUPSD_EVENT_JOB_CREATED)
     what = "JobQueuedLocal";
   else if ((event & CUPSD_EVENT_JOB_STATE) && job &&
-           job->state->values[0].integer == IPP_JOB_PROCESSING)
+           job->state_value == IPP_JOB_PROCESSING)
     what = "JobStartedLocal";
   else
     return;
@@ -1632,5 +1637,5 @@ cupsd_start_notifier(
 
 
 /*
- * End of "$Id: subscriptions.c 5046 2006-02-01 22:11:58Z mike $".
+ * End of "$Id: subscriptions.c 5108 2006-02-15 19:33:09Z mike $".
  */
index dc6643b7e7ab7c62ceb3556a2a32a7e7107d4088..e32b13dcb6814b8cba908959509886f5c0c43d23 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: sysman.c 5049 2006-02-02 14:50:57Z mike $"
+ * "$Id: sysman.c 5095 2006-02-09 16:22:48Z mike $"
  *
  *   System management definitions for the Common UNIX Printing System (CUPS).
  *
@@ -310,6 +310,7 @@ cupsdUpdateSystemMonitor(void)
       Sleeping = 1;
 
       cupsdStopAllJobs();
+      cupsdSaveAllJobs();
 
       for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
            p;
@@ -746,5 +747,5 @@ sysEventTimerNotifier(
 
 
 /*
- * End of "$Id: sysman.c 5049 2006-02-02 14:50:57Z mike $".
+ * End of "$Id: sysman.c 5095 2006-02-09 16:22:48Z mike $".
  */
index bd65fc77056634dd9e8a8a8dcee0a221f17b6079..7efb1c6a8882225fb4124877b4307c84023164c0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testmime.c 5051 2006-02-02 16:13:16Z mike $"
+ * "$Id: testmime.c 5061 2006-02-03 16:32:18Z mike $"
  *
  *   MIME test program for the Common UNIX Printing System (CUPS).
  *
@@ -111,7 +111,7 @@ main(int  argc,                             /* I - Number of command-line args */
       sscanf(argv[i], "%15[^/]/%31s", super, type);
       dst = mimeType(mime, super, type);
 
-      filters = mimeFilter(mime, src, dst, &cost, 10);
+      filters = mimeFilter(mime, src, dst, &cost);
 
       if (!filters)
       {
@@ -295,7 +295,7 @@ type_dir(mime_t     *mime,          /* I - MIME database */
       printf("%s: %s/%s%s\n", filename, filetype->super, filetype->type,
              compression ? " (compressed)" : "");
 
-      filters = mimeFilter(mime, filetype, pstype, &cost, 10);
+      filters = mimeFilter(mime, filetype, pstype, &cost);
 
       if (!filters)
        puts("    No filters to convert application/vnd.cups-postscript.");
@@ -325,5 +325,5 @@ type_dir(mime_t     *mime,          /* I - MIME database */
 
 
 /*
- * End of "$Id: testmime.c 5051 2006-02-02 16:13:16Z mike $".
+ * End of "$Id: testmime.c 5061 2006-02-03 16:32:18Z mike $".
  */
index 0d7585b86db100a1c1aab44f7bb269ac26c1ed9d..d24772b5c3b8c7468899dc373985100e13aba14a 100644 (file)
@@ -1,36 +1,36 @@
 # DO NOT DELETE
 
 accept.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-accept.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-accept.o: ../cups/i18n.h ../cups/language.h ../cups/array.h
+accept.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+accept.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
 cancel.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-cancel.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-cancel.o: ../cups/i18n.h ../cups/language.h ../cups/array.h
+cancel.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+cancel.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
 cupsaddsmb.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-cupsaddsmb.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-cupsaddsmb.o: ../cups/i18n.h ../cups/language.h ../cups/array.h
+cupsaddsmb.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+cupsaddsmb.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
 cupsaddsmb.o: ../cups/debug.h
 cupstestppd.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-cupstestppd.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-cupstestppd.o: ../cups/i18n.h ../cups/language.h ../cups/array.h
+cupstestppd.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+cupstestppd.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
 lp.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lp.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-lp.o: ../cups/i18n.h ../cups/language.h ../cups/array.h
+lp.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+lp.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
 lpadmin.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpadmin.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-lpadmin.o: ../cups/i18n.h ../cups/language.h ../cups/array.h ../cups/debug.h
+lpadmin.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+lpadmin.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/debug.h
 lpinfo.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpinfo.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-lpinfo.o: ../cups/i18n.h ../cups/language.h ../cups/array.h ../cups/debug.h
+lpinfo.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+lpinfo.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/debug.h
 lpmove.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpmove.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-lpmove.o: ../cups/i18n.h ../cups/language.h ../cups/array.h ../cups/debug.h
+lpmove.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+lpmove.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/debug.h
 lpoptions.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpoptions.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-lpoptions.o: ../cups/i18n.h ../cups/language.h ../cups/array.h
+lpoptions.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+lpoptions.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
 lppasswd.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lppasswd.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-lppasswd.o: ../cups/i18n.h ../cups/language.h ../cups/array.h ../cups/md5.h
+lppasswd.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+lppasswd.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/md5.h
 lpstat.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpstat.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/file.h
-lpstat.o: ../cups/i18n.h ../cups/language.h ../cups/array.h ../cups/debug.h
+lpstat.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+lpstat.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/debug.h
index 0e22d8faefe357ce453d033efe2da582a4607357..6a88179782872d22c323ff5fd740bc05db8113dc 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 4999 2006-01-26 23:36:22Z mike $"
+# "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $"
 #
 #   System V commands makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2006 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
@@ -59,7 +59,7 @@ depend:
 #
 
 install:       all
-       $(INSTALL_DIR) $(SBINDIR)
+       $(INSTALL_DIR) -m 755 $(SBINDIR)
        $(INSTALL_BIN) accept $(SBINDIR)
        $(RM) $(SBINDIR)/reject
        $(LN) accept $(SBINDIR)/reject
@@ -67,7 +67,7 @@ install:      all
        $(INSTALL_BIN) lpadmin $(SBINDIR)
        $(INSTALL_BIN) lpinfo $(SBINDIR)
        $(INSTALL_BIN) lpmove $(SBINDIR)
-       $(INSTALL_DIR) $(BINDIR)
+       $(INSTALL_DIR) -m 755 $(BINDIR)
        $(INSTALL_BIN) cancel $(BINDIR)
        $(INSTALL_BIN) cupstestppd $(BINDIR)
        $(RM) $(SBINDIR)/cupsdisable
@@ -191,5 +191,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4999 2006-01-26 23:36:22Z mike $".
+# End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".
 #
index 6ffbfb167ec28fda559db4e5a67b995c4d8eba46..14f7201d45376cb81046f358ac2891db2deb91b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: accept.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: accept.c 5104 2006-02-15 03:21:04Z mike $"
  *
  *   "accept", "disable", "enable", and "reject" commands for the Common
  *   UNIX Printing System (CUPS).
@@ -73,9 +73,9 @@ main(int  argc,                               /* I - Number of command-line arguments */
     op = CUPS_ACCEPT_JOBS;
   else if (!strcmp(command, "reject"))
     op = CUPS_REJECT_JOBS;
-  else if (!strcmp(command, "disable"))
+  else if (!strcmp(command, "cupsdisable") || !strcmp(command, "disable"))
     op = IPP_PAUSE_PRINTER;
-  else if (!strcmp(command, "enable"))
+  else if (!strcmp(command, "cupsenable") || !strcmp(command, "enable"))
     op = IPP_RESUME_PRINTER;
   else
   {
@@ -286,5 +286,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: accept.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: accept.c 5104 2006-02-15 03:21:04Z mike $".
  */
index f0539d9734d9723095d0933948fec0b797c015b2..63c92fcfacbec27e1bf6ce4128f41ea0ce6e6fdd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cancel.c 5023 2006-01-29 14:39:44Z mike $"
+ * "$Id: cancel.c 5091 2006-02-08 18:39:56Z mike $"
  *
  *   "cancel" command for the Common UNIX Printing System (CUPS).
  *
@@ -179,7 +179,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       if (num_dests == 0)
         num_dests = cupsGetDests(&dests);
 
-      if (strcmp(argv[i], "-") == 0)
+      if (!strcmp(argv[i], "-"))
       {
        /*
         * Delete the current job...
@@ -307,8 +307,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       {
        _cupsLangPrintf(stderr, _("%s: %s failed: %s\n"), argv[0],
                        op == IPP_PURGE_JOBS ? "purge-jobs" : "cancel-job",
-                       response ? ippErrorString(response->request.status.status_code) :
-                                  ippErrorString(cupsLastError()));
+                       cupsLastErrorString());
 
        if (response)
          ippDelete(response);
@@ -388,5 +387,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: cancel.c 5023 2006-01-29 14:39:44Z mike $".
+ * End of "$Id: cancel.c 5091 2006-02-08 18:39:56Z mike $".
  */
index 4572248ccc73f20524adea415ca6f005ea18da07..182023329b556a184f67226871abee9f32194bce 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 5055 2006-02-02 18:25:38Z mike $"
+# "$Id: Makefile 5110 2006-02-15 21:42:46Z mike $"
 #
 #   Template makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1993-2005 by Easy Software Products.
+#   Copyright 1993-2006 by Easy Software Products.
 #
 #   These coded instructions, statements, and computer programs are the
 #   property of Easy Software Products and are protected by Federal
@@ -28,6 +28,7 @@ include ../Makedefs
 # Template files...
 #
 
+LANGUAGES =    ja
 FILES  =       \
                add-class.tmpl \
                add-printer.tmpl \
@@ -110,12 +111,20 @@ clean:
 #
 
 install: all
-       $(INSTALL_DIR) $(DATADIR)/templates
+       $(INSTALL_DIR) -m 755 $(DATADIR)/templates
        for file in $(FILES); do \
                $(INSTALL_DATA) $$file $(DATADIR)/templates; \
        done
+       for lang in $(LANGUAGES); do \
+               $(INSTALL_DIR) -m 755 $(DATADIR)/templates/$$lang; \
+               for file in $(FILES); do \
+                       if test -e $$lang/$$file; then \
+                               $(INSTALL_DATA) $$lang/$$file $(DATADIR)/templates/$$lang; \
+                       fi \
+               done \
+       done
 
 
 #
-# End of "$Id: Makefile 5055 2006-02-02 18:25:38Z mike $".
+# End of "$Id: Makefile 5110 2006-02-15 21:42:46Z mike $".
 #
index 64f0b9431249b992fde2c03136889fdc7e2c3e3d..a69dd7b53395b36583ed9b2775299ffb984a9395 100644 (file)
@@ -3,7 +3,7 @@
 <H2 CLASS="title"><A HREF="{printer_uri_supported}">{printer_name}</A>{default_name={printer_name}? (Default Printer):}
 {?printer_state_message=?:<SPAN CLASS="message">"{printer_state_message}"</SPAN>}</H2>
 
-<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0">
+<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
 <TR>
 <TD VALIGN=TOP><A HREF="{printer_uri_supported}">
 <IMG SRC="/images/classes.gif" CLASS="button" ALT=""></A></TD>
index 2aeaec0d66965f0d1b8a728287247fe549aef3c4..7ca5da79515b8f4d566413be637e612615107822 100644 (file)
@@ -8,7 +8,7 @@ function reset_config()
 "\\n" +
 "\\n" +
 "# Administrator user group...\\n" +
-"SystemGroup @CUPS_GROUP@\\n" +
+"SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
index bba6e90c20104f77c6623d00b6390fe346b6355d..8ffd7de802458a83598dcb1c6dd7d78ffffc41b2 100644 (file)
@@ -2,12 +2,13 @@
 <HTML>
 <HEAD>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-       <TITLE>{title} - @CUPS_VERSION@</TITLE>
+       <TITLE>{title} - CUPS @CUPS_VERSION@</TITLE>
        <!-- Prevent caching of CGI content -->
        <META HTTP-EQUIV="Expires" CONTENT="now">
        <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
        {refresh_page?<META HTTP-EQUIV="Refresh" CONTENT="{refresh_page}">:}
        <LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
+       <LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
 </HEAD>
 <BODY>
 <TABLE WIDTH="100%" STYLE="height: 100%;" BORDER="0" CELLSPACING="0" CELLPADDING="0" SUMMARY="{title}">
diff --git a/templates/ja/add-class.tmpl b/templates/ja/add-class.tmpl
new file mode 100644 (file)
index 0000000..8db1395
--- /dev/null
@@ -0,0 +1,33 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+
+<H2 CLASS="title">クラスの追加</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">名前:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"></TD>
+</TR>
+<TR>
+<TH CLASS="label">場所:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"></TD>
+</TR>
+<TR>
+<TH CLASS="label">説明:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"></TD>
+</TR>
+<TR>
+<TH CLASS="label">メンバー:</TH>
+<TD>
+<SELECT NAME="MEMBER_URIS" SIZE="10" MULTIPLE>
+{[member_uris]<OPTION VALUE="{member_uris}" {?member_selected}>{member_names}}
+</SELECT>
+</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/add-class.gif" ALT="クラスの追加"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/add-printer.tmpl b/templates/ja/add-printer.tmpl
new file mode 100644 (file)
index 0000000..65c09d6
--- /dev/null
@@ -0,0 +1,28 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+
+<H2 CLASS="title">新しいプリンタの追加</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">名前:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<SMALL>("/"、"#"、空白を除く適当な表示可能文字を含めることができます)</SMALL></TD>
+</TR>
+<TR>
+<TH CLASS="label">場所:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<SMALL>("Lab 1" のように人間が読みやすい場所)</SMALL></TD>
+</TR>
+<TR>
+<TH CLASS="label">説明:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<SMALL>("HP LaserJet with Duplexer" のように人間が読みやすい説明)</SMALL></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/continue.gif" ALT="続ける"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/admin.tmpl b/templates/ja/admin.tmpl
new file mode 100644 (file)
index 0000000..8edfde6
--- /dev/null
@@ -0,0 +1,72 @@
+<TABLE CELLPADDING="0" CELLSPACING="0" CLASS="button" WIDTH="100%">
+<TR><TD VALIGN="TOP" NOWRAP>
+
+<H2 CLASS="title">プリンタ</H2>
+
+<P>
+<A HREF="/admin?op=add-printer"><IMG
+SRC="/images/add-printer.gif" ALT="プリンタの追加" CLASS="button"></A>
+<A HREF="/printers/"><IMG SRC="/images/manage-printers.gif"
+ALT="プリンタの管理" CLASS="button"></A>
+{have_samba?<A HREF="/admin/?op=export-samba"><IMG
+SRC="/images/export-samba.gif" ALT="プリンタをSambaにエキスポート"
+CLASS="button"></A>:}
+</P>
+
+{#device_uri=0?:<P><B>新しいプリンタが見つかりました:</B></P><UL>{[device_uri]
+<LI>{device_make_and_model} ({device_info})
+<A HREF="/admin?op=add-printer&amp;{device_options}"><IMG
+SRC="/images/add-this-printer.gif" ALT="このプリンタを追加" CLASS="button"
+ALIGN="MIDDLE"></A></LI>
+}</UL>}
+
+<H2 CLASS="title">クラス</H2>
+
+<P>
+<A HREF="/admin?op=add-class"><IMG SRC="/images/add-class.gif"
+ALT="クラスの追加" CLASS="button"></A>
+<A HREF="/classes/"><IMG SRC="/images/manage-classes.gif"
+ALT="クラスの管理" CLASS="button"></A>
+</P>
+
+<H2 CLASS="title">ジョブ</H2>
+
+<P>
+<A HREF="/jobs/"><IMG SRC="/images/manage-jobs.gif" ALT="ジョブの管理" CLASS="button"></A>
+</P>
+
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+
+<H2 CLASS="title">サーバ</H2>
+
+<P>
+<A HREF="/admin?op=config-server"><IMG
+SRC="/images/edit-configuration-file.gif" ALT="設定ファイルの編集" CLASS="button"></A>
+<A HREF="/admin/log/access_log" TARGET="_blank"><IMG
+SRC="/images/view-access-log.gif" ALT="アクセスログの表示"
+CLASS="button"></A>
+<A HREF="/admin/log/error_log" TARGET="_blank"><IMG
+SRC="/images/view-error-log.gif" ALT="エラーログの表示"
+CLASS="button"></A>
+<A HREF="/admin/log/page_log" TARGET="_blank"><IMG
+SRC="/images/view-page-log.gif" ALT="ページログの表示"
+CLASS="button"></A>
+</P>
+
+<FORM METHOD="POST" ACTION="/admin">
+
+<P><B>基本サーバ設定:</B></P>
+
+<P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
+<INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> ほかのシステムで共有されているプリンタを表示<BR>
+<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> このシステムに接続されている公開済みプリンタを共有<BR>
+<INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> リモート管理を許可<BR>
+<INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> どのジョブであってもキャンセルすることを (たとえ所有者でなくても) ユーザに許可<BR>
+<INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> トラブルシューティングのためにデバッグ情報を保存</P>
+
+<P><INPUT TYPE="IMAGE" SRC="/images/change-settings.gif" ALT="設定の変更"></P>
+
+</FORM>
+
+</TD></TR>
+</TABLE>
diff --git a/templates/ja/choose-device.tmpl b/templates/ja/choose-device.tmpl
new file mode 100644 (file)
index 0000000..022ce5f
--- /dev/null
@@ -0,0 +1,26 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
+<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{?current_make_and_model}">
+
+<H2 CLASS="title">{printer_name} のデバイス</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">デバイス:</TH>
+<TD>
+<SELECT NAME="DEVICE_URI">
+{[device_uri]<OPTION VALUE="{device_uri}{?device_make_and_model!不明?|{device_make_and_model}:}" {?current_device_uri={device_uri}?SELECTED:{current_device_scheme={device_uri}?SELECTED:}}>
+{device_info} {?device_make_and_model!不明?({device_make_and_model}):}</OPTION>
+}</SELECT>
+</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/continue.gif" ALT="続ける"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/choose-make.tmpl b/templates/ja/choose-make.tmpl
new file mode 100644 (file)
index 0000000..4e60161
--- /dev/null
@@ -0,0 +1,42 @@
+<FORM METHOD="POST" ACTION="/admin" ENCTYPE="multipart/form-data">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
+<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">
+<INPUT TYPE="HIDDEN" NAME="BAUDRATE" VALUE="{?baudrate}">
+<INPUT TYPE="HIDDEN" NAME="BITS" VALUE="{?bits}">
+<INPUT TYPE="HIDDEN" NAME="PARITY" VALUE="{?parity}">
+<INPUT TYPE="HIDDEN" NAME="FLOW" VALUE="{?flow}">
+
+<H2 CLASS="title">{printer_name} のメーカ/製造元</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">メーカ:</TH>
+<TD>
+<SELECT NAME="PPD_MAKE" SIZE="10">
+{[ppd_make]<OPTION VALUE="{ppd_make}" {?current_make={ppd_make}?SELECTED:}>{ppd_make}}
+</SELECT>
+</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/continue.gif" ALT="続ける"></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD>&nbsp;</TD>
+</TR>
+<TR>
+<TH CLASS="label">または PPD ファイルを提供してください:</TH>
+<TD><INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="262144"><INPUT
+TYPE="FILE" NAME="PPD_FILE"></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/{op}.gif" ALT="{op=add-printer?プリンタの追加:プリンタの変更}"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/choose-model.tmpl b/templates/ja/choose-model.tmpl
new file mode 100644 (file)
index 0000000..6bc2234
--- /dev/null
@@ -0,0 +1,34 @@
+<FORM METHOD="POST" ACTION="/admin" ENCTYPE="multipart/form-data">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
+<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">
+<INPUT TYPE="HIDDEN" NAME="BAUDRATE" VALUE="{?baudrate}">
+<INPUT TYPE="HIDDEN" NAME="BITS" VALUE="{?bits}">
+<INPUT TYPE="HIDDEN" NAME="PARITY" VALUE="{?parity}">
+<INPUT TYPE="HIDDEN" NAME="FLOW" VALUE="{?flow}">
+
+<H2 CLASS="title">{printer_name} のモデル/ドライバ</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">モデル:</TH>
+<TD>
+<SELECT NAME="PPD_NAME" SIZE="10">
+{[ppd_name]<OPTION VALUE="{ppd_name}" {?current_make_and_model={ppd_make_and_model}?SELECTED:}>{ppd_make_and_model} ({ppd_natural_language})
+}</SELECT>
+</TD>
+</TR>
+<TR>
+<TH CLASS="label">または PPD ファイルを提供してください:</TH>
+<TD><INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="262144"><INPUT
+TYPE="FILE" NAME="PPD_FILE"></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/{op}.gif" ALT="{op=add-printer?プリンタの追加:プリンタの変更}"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/choose-serial.tmpl b/templates/ja/choose-serial.tmpl
new file mode 100644 (file)
index 0000000..7917540
--- /dev/null
@@ -0,0 +1,47 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
+<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">
+
+<H2 CLASS="title">{printer_name} のシリアルポートの設定</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">ボーレート:</TH>
+<TD><SELECT NAME="BAUDRATE">
+{[baudrates]<OPTION {?baudrate={baudrates}?SELECTED:}>{baudrates}}
+</SELECT></TD>
+</TR>
+<TR>
+<TH CLASS="label">パリティ:</TH>
+<TD><SELECT NAME="PARITY">
+<OPTION VALUE="none" {?parity=none?SELECTED:}>なし
+<OPTION VALUE="even" {?parity=even?SELECTED:}>偶数
+<OPTION VALUE="odd" {?parity=odd?SELECTED:}>奇数
+</SELECT></TD>
+</TR>
+<TR>
+<TH CLASS="label">データビット:</TH>
+<TD><SELECT NAME="BITS">
+<OPTION {?bits=8?SELECTED:}>8
+<OPTION {?bits=7?SELECTED:}>7
+</SELECT></TD>
+</TR>
+<TR>
+<TH CLASS="label">フロー制御:</TH>
+<TD><SELECT NAME="FLOW">
+<OPTION VALUE="none" {?flow=none?SELECTED:}>なし
+<OPTION VALUE="soft" {?flow=soft?SELECTED:}>XON/XOFF (ソフトウェア)
+<OPTION VALUE="hard" {?flow=hard?SELECTED:}>RTS/CTS (ハードウェア)
+<OPTION VALUE="dtrdsr" {?flow=dtrdsr?SELECTED:}>DTR/DSR (ハードウェア)
+</SELECT></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/continue.gif" ALT="続ける"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/choose-uri.tmpl b/templates/ja/choose-uri.tmpl
new file mode 100644 (file)
index 0000000..ca7fa04
--- /dev/null
@@ -0,0 +1,41 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
+<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{?current_make_and_model}">
+
+<H2 CLASS="title">{printer_name} のデバイス URI</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">デバイス URI:</TH>
+<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{device_uri}"></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD>例:
+<PRE>
+    file:/path/to/filename.prn
+    http://hostname:631/ipp/
+    http://hostname:631/ipp/port1
+    ipp://hostname/ipp/
+    ipp://hostname/ipp/port1
+    lpd://hostname/queue
+    socket://hostname
+    socket://hostname:9100
+</PRE>
+
+<P>あなたのプリンタにふさわしい URI については、
+<A HREF="/help/network.html" TARGET="_blank">"ネットワーク
+プリンタ"</A> を参照してください。</P>
+
+</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/continue.gif" ALT="続ける"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/class-added.tmpl b/templates/ja/class-added.tmpl
new file mode 100644 (file)
index 0000000..ccda96d
--- /dev/null
@@ -0,0 +1 @@
+<P>クラス <A HREF="/classes/{printer_name}">{printer_name}</A> は正しく追加されました。
diff --git a/templates/ja/class-confirm.tmpl b/templates/ja/class-confirm.tmpl
new file mode 100644 (file)
index 0000000..f8eb454
--- /dev/null
@@ -0,0 +1,7 @@
+<P><B>警告:</B> 本当にクラス
+{printer_name} を削除してもよいですか?</P>
+
+<P ALIGN="CENTER"><A
+HREF="/admin?op=delete-class&printer_name={printer_name}&confirm=yes"><IMG
+SRC="/images/delete-class.gif" ALT="クラスの削除"
+CLASS="button"></A></P>
diff --git a/templates/ja/class-deleted.tmpl b/templates/ja/class-deleted.tmpl
new file mode 100644 (file)
index 0000000..7c76490
--- /dev/null
@@ -0,0 +1 @@
+<P>クラス {printer_name} は正しく削除されました。
diff --git a/templates/ja/class-jobs-header.tmpl b/templates/ja/class-jobs-header.tmpl
new file mode 100644 (file)
index 0000000..d12840e
--- /dev/null
@@ -0,0 +1 @@
+<H3 CLASS="title">ジョブ</H3>
diff --git a/templates/ja/class-modified.tmpl b/templates/ja/class-modified.tmpl
new file mode 100644 (file)
index 0000000..54e1f60
--- /dev/null
@@ -0,0 +1 @@
+<P>クラス <A HREF="/classes/{printer_name}">{printer_name}</A> は正しく変更されました。
diff --git a/templates/ja/classes-header.tmpl b/templates/ja/classes-header.tmpl
new file mode 100644 (file)
index 0000000..3dad28c
--- /dev/null
@@ -0,0 +1 @@
+<P ALIGN="CENTER">{total=0?クラスがありません:{total} 個のクラスのうち {#printer_name} 個を表示中}。</P>
diff --git a/templates/ja/classes.tmpl b/templates/ja/classes.tmpl
new file mode 100644 (file)
index 0000000..aeaef99
--- /dev/null
@@ -0,0 +1,56 @@
+{#printer_name=0?:
+{[printer_name]
+<H2 CLASS="title"><A HREF="{printer_uri_supported}">{printer_name}</A>{default_name={printer_name}? (デフォルトプリンタ):}
+{?printer_state_message=?:<SPAN CLASS="message">"{printer_state_message}"</SPAN
+>}</H2>
+
+<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
+<TR>
+<TD VALIGN=TOP><A HREF="{printer_uri_supported}">
+<IMG SRC="/images/classes.gif" CLASS="button" ALT=""></A></TD>
+<TD VALIGN=TOP><B>説明:</B> {printer_info}<BR>
+<B>場所:</B> {printer_location}<BR>
+<B>クラスの状態:</B> {printer_state=3?待機中:{printer_state=4?処理中:停止}},
+{printer_is_accepting_jobs=0?ジョブを拒否中:ジョブを受け付け中}, {printer_is_shared=0?not:} 公開。
+{?printer_state_message=?:<BR><I>"{printer_state_message}"</I>}
+{?member_uris=?:<BR>メンバー: {member_uris}}
+
+<P>
+<A HREF="{printer_uri_supported}?op=print-test-page">
+<IMG SRC="/images/print-test-page.gif" ALT="テストページの印刷" CLASS="button"></A>
+{printer_state=5?
+<A HREF="{admin_uri}?op=start-class&amp;printer_name={printer_name}&amp;is_class=Y">
+<IMG SRC="/images/start-class.gif" ALT="クラスを開始" CLASS="button"></A>
+:
+<A HREF="{admin_uri}?op=stop-class&amp;printer_name={printer_name}&amp;is_class=Y">
+<IMG SRC="/images/stop-class.gif" ALT="クラスを停止" CLASS="button"></A>
+}
+{printer_is_accepting_jobs=0?
+<A HREF="{admin_uri}?op=accept-jobs&amp;printer_name={printer_name}&amp;is_class=Y">
+<IMG SRC="/images/accept-jobs.gif" ALT="ジョブを受け付け" CLASS="button"></A>
+:
+<A HREF="{admin_uri}?op=reject-jobs&amp;printer_name={printer_name}&amp;is_class=Y">
+<IMG SRC="/images/reject-jobs.gif" ALT="ジョブを拒否" CLASS="button"></A>
+}
+<A HREF="{admin_uri}?op=purge-jobs&amp;printer_name={printer_name}&amp;is_class=Y">
+<IMG SRC="/images/cancel-all-jobs.gif" ALT="すべてのジョブをキャンセル" CLASS="button"></A>
+{printer_is_shared=0?
+<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={printer_name}&amp;shared=1&amp;is_class=Y">
+<IMG SRC="/images/publish-printer.gif" ALT="プリンタを公開" CLASS="button"></A>
+:
+<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={printer_name}&amp;shared=0&amp;is_class=Y">
+<IMG SRC="/images/unpublish-printer.gif" ALT="プリンタを非公開" CLASS="button"></A>
+}
+<A HREF="{admin_uri}?op=modify-class&amp;printer_name={printer_name}">
+<IMG SRC="/images/modify-class.gif" ALT="クラスの変更" CLASS="button"></A>
+<A HREF="{admin_uri}?op=delete-class&amp;printer_name={printer_name}">
+<IMG SRC="/images/delete-class.gif" ALT="クラスの削除" CLASS="button"></A>
+<A HREF="{admin_uri}?op=set-as-default&amp;printer_name={printer_name}&amp;is_class=Y">
+<IMG SRC="/images/set-as-default.gif" ALT="デフォルトに設定" CLASS="button"></A>
+<A HREF="{admin_uri}?op=set-allowed-users&amp;printer_name={printer_name}&amp;is_class=Y">
+<IMG SRC="/images/set-allowed-users.gif" ALT="許可するユーザの設定" CLASS="button"></A>
+</P>
+</TD>
+</TR>
+</TABLE>
+}}
diff --git a/templates/ja/error-op.tmpl b/templates/ja/error-op.tmpl
new file mode 100644 (file)
index 0000000..08657ef
--- /dev/null
@@ -0,0 +1,3 @@
+<P>エラー:</P>
+
+<BLOCKQUOTE>"{op}" は未知の操作です!</BLOCKQUOTE>
diff --git a/templates/ja/error.tmpl b/templates/ja/error.tmpl
new file mode 100644 (file)
index 0000000..c4ae91e
--- /dev/null
@@ -0,0 +1,3 @@
+<P>{?message?{message}:エラー:}</P>
+
+<BLOCKQUOTE>{error}</BLOCKQUOTE>
diff --git a/templates/ja/header.tmpl.in b/templates/ja/header.tmpl.in
new file mode 100644 (file)
index 0000000..03653ed
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+       <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
+       <TITLE>{title} - CUPS @CUPS_VERSION@</TITLE>
+       <!-- Prevent caching of CGI content -->
+       <META HTTP-EQUIV="Expires" CONTENT="now">
+       <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
+       {refresh_page?<META HTTP-EQUIV="Refresh" CONTENT="{refresh_page}">:}
+       <LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
+       <LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
+</HEAD>
+<BODY>
+<TABLE WIDTH="100%" STYLE="height: 100%;" BORDER="0" CELLSPACING="0" CELLPADDING="0" SUMMARY="{title}">
+<TR CLASS="HEADER">
+<TD VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG SRC="/images/top-left.gif" WIDTH="15" HEIGHT="80" ALT=""></TD>
+<TD VALIGN="TOP" WIDTH="55" ROWSPAN="2"><IMG SRC="/images/top-middle.gif" WIDTH="55" HEIGHT="80" ALT=""></TD>
+<TD WIDTH="100%" HEIGHT="60"><H1>{title}</H1></TD>
+<TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG
+SRC="/images/top-right.gif" WIDTH="15" HEIGHT="15" ALT=""></TD>
+</TR>
+<TR CLASS="HEADER"><TD WIDTH="100%" VALIGN="BOTTOM" NOWRAP>
+
+<A CLASS="unsel" HREF="/"><IMG SRC="/images/tab-left.gif"
+WIDTH="4" HEIGHT="4" ALIGN="TOP" BORDER="0"
+ALT="">&nbsp;&nbsp;ホーム&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="{SECTION=admin?:un}sel" HREF="/admin"><IMG
+SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT="">&nbsp;&nbsp;管理&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="{SECTION=classes?:un}sel" HREF="/classes/"><IMG
+SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT="">&nbsp;&nbsp;クラス&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="{SECTION=help?:un}sel" HREF="/help/"><IMG
+SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT="">&nbsp;&nbsp;ドキュメント/ヘルプ&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="{SECTION=jobs?:un}sel" HREF="/jobs/"><IMG
+SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT="">&nbsp;&nbsp;ジョブ&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+&nbsp;<A CLASS="{SECTION=printers?:un}sel" HREF="/printers/"><IMG
+SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT="">&nbsp;&nbsp;プリンタ&nbsp;&nbsp;<IMG
+SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
+BORDER="0" ALT=""></A>
+
+</TD></TR>
+<TR CLASS="page">
+<TD WIDTH="15">&nbsp;</TD>
+<TD COLSPAN="2" WIDTH="100%" STYLE="height: 100%;" VALIGN="TOP" CLASS="page">
diff --git a/templates/ja/help-header.tmpl b/templates/ja/help-header.tmpl
new file mode 100644 (file)
index 0000000..24d67e2
--- /dev/null
@@ -0,0 +1,28 @@
+<FORM ACTION="/help/{?HELPFILE}" METHOD="GET">
+{TOPIC?<INPUT TYPE="HIDDEN" NAME="TOPIC" VALUE="{TOPIC}">:}
+
+<P ALIGN="CENTER"><B>
+{HELPTITLE?{HELPTITLE}:{TOPIC?{TOPIC}:すべてのドキュメント}} 内を検索:</B> <INPUT
+TYPE="TEXT" NAME="QUERY" VALUE="{?QUERY}" SIZE="60"> <INPUT
+TYPE="IMAGE" SRC="/images/search.gif" ALT="検索"></P>
+
+</FORM>
+
+<!-- Bookmarks -->
+<DIV CLASS="sidebar">
+<H3 CLASS="title">オンラインヘルプドキュメント</H3>
+
+<P CLASS="l0"><A HREF="/help{QUERY??QUERY={QUERY}:}">すべてのドキュメント</A></P>
+<HR>
+
+{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
+}
+</DIV>
+
+{QUERY?<P>{HELPFILE?{HELPTITLE}:{TOPIC?{TOPIC}:すべてのドキュメント}} の検索結果\:</P>
+{QTEXT?<UL>
+{[QTEXT]<LI><A HREF="{QLINK}">{QTEXT}</A>{QPTEXT? (<I><A HREF="{QPLINK}">{QPTEXT}</A></I>内):}</LI>}
+{QTEXT?</UL>:}
+:<P>マッチするものはありませんでした。</P>}
+{HELPTITLE?<HR NOSHADE>:}:}
+{HELPTITLE?<H1>{HELPTITLE}</H1>:}
diff --git a/templates/ja/job-cancel.tmpl b/templates/ja/job-cancel.tmpl
new file mode 100644 (file)
index 0000000..4ee7d1f
--- /dev/null
@@ -0,0 +1,2 @@
+<P><A HREF="{job_printer_uri}">ジョブ {job_id}</A> はキャンセルされました。
+
diff --git a/templates/ja/job-hold.tmpl b/templates/ja/job-hold.tmpl
new file mode 100644 (file)
index 0000000..792c538
--- /dev/null
@@ -0,0 +1,2 @@
+<P><A HREF="{job_printer_uri}">ジョブ {job_id}</A> は印刷をホールドされました。
+
diff --git a/templates/ja/job-move.tmpl b/templates/ja/job-move.tmpl
new file mode 100644 (file)
index 0000000..601e3f9
--- /dev/null
@@ -0,0 +1,22 @@
+<FORM METHOD="POST" ACTION="/{SECTION}/{job_id?:{printer_name}}">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{job_id?<INPUT TYPE="HIDDEN" NAME="JOB_ID" VALUE="{job_id}">:}
+
+<H2 CLASS="title">{job_id?ジョブ {job_id} の移動:すべてのジョブの移動}</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">新しい宛先:</TH>
+<TD>
+<SELECT NAME="JOB_PRINTER_URI" SIZE="10">
+{[job_printer_uri]<OPTION VALUE="{job_printer_uri}">{job_printer_name}}
+</SELECT>
+</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/move-job{job_id?:s}.gif" ALT="ジョブの移動"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/job-moved.tmpl b/templates/ja/job-moved.tmpl
new file mode 100644 (file)
index 0000000..e76a804
--- /dev/null
@@ -0,0 +1,2 @@
+<P>{job_id?<A HREF="/jobs/{job_id}">ジョブ {job_id}</A>:すべてのジョブ} は
+<A HREF="{job_printer_uri}">{job_printer_name}</A> に移動しました。</P>
diff --git a/templates/ja/job-release.tmpl b/templates/ja/job-release.tmpl
new file mode 100644 (file)
index 0000000..132f02b
--- /dev/null
@@ -0,0 +1,2 @@
+<P><A HREF="{job_printer_uri}">ジョブ {job_id}</A> は印刷から解放されました。
+
diff --git a/templates/ja/job-restart.tmpl b/templates/ja/job-restart.tmpl
new file mode 100644 (file)
index 0000000..b066827
--- /dev/null
@@ -0,0 +1 @@
+<P><A HREF="{job_printer_uri}">ジョブ {job_id}</A> は再印刷されました。
diff --git a/templates/ja/jobs-header.tmpl b/templates/ja/jobs-header.tmpl
new file mode 100644 (file)
index 0000000..1ed1049
--- /dev/null
@@ -0,0 +1,15 @@
+<P>{?which_jobs=?<A
+HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
+SRC="/images/show-completed.gif" CLASS="button" ALT="完了したジョブを表示"></A>
+<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
+SRC="/images/show-all.gif" CLASS="button" ALT="すべてのジョブを表示">:{which_jobs=all?<A
+HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
+SRC="/images/show-completed.gif" CLASS="button" ALT="完了したジョブを表示"></A>
+<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}"><IMG
+SRC="/images/show-active.gif" CLASS="button" ALT="アクティブなジョブを表示">:<A
+HREF="{?printer_name=?/jobs:{printer_uri_supported}}"><IMG
+SRC="/images/show-active.gif" CLASS="button" ALT="アクティブなジョブを表示"></A>
+<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
+SRC="/images/show-all.gif" CLASS="button" ALT="すべてのジョブを表示">}}</A></P>
+
+<P ALIGN="CENTER">{total=0?ジョブはありません:{total} 個の{?which_jobs=?アクティブな:{which_jobs=all?:完了した}}ジョブのうち {#job_id} 個を表示中}。</P>
diff --git a/templates/ja/jobs.tmpl b/templates/ja/jobs.tmpl
new file mode 100644 (file)
index 0000000..492a9c9
--- /dev/null
@@ -0,0 +1,42 @@
+{#job_id=0?:
+<TABLE CELLPADDING="0" CELLSPACING="0" CLASS="button" WIDTH="100%" SUMMARY="Job List">
+<TR CLASS="data">
+<TH>ID&nbsp;</TH>
+<TH>名前&nbsp;</TH>
+<TH>ユーザ&nbsp;</TH>
+<TH>サイズ&nbsp;</TH>
+<TH>ページ&nbsp;</TH>
+<TH>状態&nbsp;</TH>
+<TH>制御&nbsp;</TH>
+</TR>
+
+{[job_id]
+<TR CLASS="data" VALIGN="TOP">
+<TD><A HREF="{job_printer_uri}">{job_printer_name}</A>-{job_id}&nbsp;</TD>
+<TD>{?job_name=?未知:{job_name}}&nbsp;</TD>
+<TD>{job_originating_user_name}&nbsp;</TD>
+<TD>{job_k_octets}k&nbsp;</TD>
+<TD>{job_media_sheets_completed=0?不明:{?job_media_sheets_completed}}</TD>
+<TD>{job_state=3?{time_at_creation}<BR>から保留中:{job_state=4?{time_at_creation}<BR>からホールド中:
+{job_state=5?{time_at_processing}<BR>から処理中:{job_state=6?{time_at_completed}<BR>に停止:
+{job_state=7?{time_at_completed}<BR>にキャンセル:{time_at_completed}<BR>{job_state=8?に中断:に完了}}}}}}&nbsp;</TD>
+<TD>
+{job_preserved>0?
+<A HREF="/jobs/?op=restart-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
+<IMG SRC="/images/restart-job.gif" ALT="ジョブの再印刷" CLASS="button"></A>:}
+{job_state=4?
+<A HREF="/jobs/?op=release-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
+<IMG SRC="/images/release-job.gif" ALT="ジョブを解放" CLASS="button"></A>:}
+{job_state=3?
+<A HREF="/jobs/?op=hold-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
+<IMG SRC="/images/hold-job.gif" ALT="ジョブをホールド" CLASS="button"></A>:}
+{job_state<7?
+<A HREF="/jobs/?op=cancel-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
+<IMG SRC="/images/cancel-job.gif" ALT="ジョブをキャンセル" CLASS="button"></A>
+<A HREF="/jobs/?op=move-job&amp;job_id={job_id}"><IMG
+SRC="/images/move-job.gif" ALT="ジョブを移動" CLASS="button"></A>:}
+&nbsp;</TD>
+</TR>
+}
+</TABLE>
+}
diff --git a/templates/ja/modify-class.tmpl b/templates/ja/modify-class.tmpl
new file mode 100644 (file)
index 0000000..e3ff08d
--- /dev/null
@@ -0,0 +1,34 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+
+<H2 CLASS="title">クラス {printer_name} の変更</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">名前:</TH>
+<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
+{printer_name}</TD>
+</TR>
+<TR>
+<TH CLASS="label">場所:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" VALUE="{?printer_location}" SIZE="40" MAXLENGTH="127"></TD>
+</TR>
+<TR>
+<TH CLASS="label">説明:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" VALUE="{?printer_info}" SIZE="40" MAXLENGTH="127"></TD>
+</TR>
+<TR>
+<TH CLASS="label">メンバー:</TH>
+<TD>
+<SELECT NAME="MEMBER_URIS" SIZE="10" MULTIPLE>
+{[member_uris]<OPTION VALUE="{member_uris}" {?member_selected}>{member_names}}
+</SELECT>
+</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/modify-class.gif" ALT="クラスの変更"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/modify-printer.tmpl b/templates/ja/modify-printer.tmpl
new file mode 100644 (file)
index 0000000..14bab68
--- /dev/null
@@ -0,0 +1,29 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{?device_uri=?:<INPUT TYPE="HIDDEN" NAME="CURRENT_DEVICE_URI" VALUE="{device_uri}">}
+{?printer_make_and_model=?:<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{printer_make_and_model}">}
+
+<H2 CLASS="title">プリンタ {printer_name} の変更</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">名前:</TH>
+<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">{printer_name}</TD>
+</TR>
+<TR>
+<TH CLASS="label">場所:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" VALUE="{?printer_location}" SIZE="40" MAXLENGTH="127"><BR>
+<SMALL>("Lab 1" のように人間が読みやすい場所)</SMALL></TD>
+</TR>
+<TR>
+<TH CLASS="label">説明:</TH>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" VALUE="{?printer_info}" SIZE="40" MAXLENGTH="127"><BR>
+<SMALL>("HP LaserJet with Duplexer" のように人間が読みやすい説明)</SMALL></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/continue.gif" ALT="続ける"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/option-conflict.tmpl b/templates/ja/option-conflict.tmpl
new file mode 100644 (file)
index 0000000..c7d586b
--- /dev/null
@@ -0,0 +1,7 @@
+<P><B>エラー:</B> 以下のオプションは競合します:</P>
+
+<UL>
+{[ckeyword]<LI><A HREF="#{ckeyword}">{ckeytext}</A></LI>
+}</UL>
+
+<P>競合を解決するために、1つ以上のオプションを変更してください。</P>
diff --git a/templates/ja/option-trailer.tmpl b/templates/ja/option-trailer.tmpl
new file mode 100644 (file)
index 0000000..8256653
--- /dev/null
@@ -0,0 +1,5 @@
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/set-printer-options.gif" ALT="プリンタオプションの設定"></TD>
+</TR>
+</TABLE>
diff --git a/templates/ja/pager.tmpl b/templates/ja/pager.tmpl
new file mode 100644 (file)
index 0000000..914d1d6
--- /dev/null
@@ -0,0 +1,7 @@
+<TABLE WIDTH="100%" CLASS="pager" SUMMARY="Paging Bar">
+<TR>
+       <TD WIDTH="33%">{PREVURL?<A HREF="{PREVURL}"><IMG SRC="/images/show-previous.gif" ALT="前を表示" CLASS="button"></A>:&nbsp;}</TD>
+       <TD WIDTH="34%" ALIGN="CENTER">{ORDER=dec?<A HREF="{THISURL}&amp;ORDER=asc"><IMG SRC="/images/sort-ascending.gif" ALT="昇順にソート" CLASS="button"></A>:<A HREF="{THISURL}&amp;ORDER=dec"><IMG SRC="/images/sort-descending.gif" ALT="降順にソート" CLASS="button"></A>}</TD>
+       <TD WIDTH="33%" ALIGN="RIGHT">{NEXTURL?<A HREF="{NEXTURL}"><IMG SRC="/images/show-next.gif" ALT="次を表示" CLASS="button"></A>:&nbsp;}</TD>
+</TR>
+</TABLE>
diff --git a/templates/ja/printer-accept.tmpl b/templates/ja/printer-accept.tmpl
new file mode 100644 (file)
index 0000000..073d126
--- /dev/null
@@ -0,0 +1,3 @@
+<P>{is_class?クラス:プリンタ} <A
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
+はジョブを受け付けるようになりました。</P>
diff --git a/templates/ja/printer-added.tmpl b/templates/ja/printer-added.tmpl
new file mode 100644 (file)
index 0000000..e01b437
--- /dev/null
@@ -0,0 +1 @@
+<P>プリンタ <A HREF="/printers/{printer_name}">{printer_name}</A> は正しく追加されました。
diff --git a/templates/ja/printer-configured.tmpl b/templates/ja/printer-configured.tmpl
new file mode 100644 (file)
index 0000000..1861afb
--- /dev/null
@@ -0,0 +1 @@
+<P>プリンタ <A HREF="/printers/{printer_name}">{printer_name}</A> は正しく設定されました。
diff --git a/templates/ja/printer-confirm.tmpl b/templates/ja/printer-confirm.tmpl
new file mode 100644 (file)
index 0000000..a4eb0e7
--- /dev/null
@@ -0,0 +1,7 @@
+<P><B>警告:</B> 本当にプリンタ
+{printer_name} を削除してもよいですか?</P>
+
+<P ALIGN="CENTER"><A
+HREF="/admin?op=delete-printer&printer_name={printer_name}&confirm=yes"><IMG
+SRC="/images/delete-printer.gif" ALT="プリンタの削除"
+CLASS="button"></A></P>
diff --git a/templates/ja/printer-default.tmpl b/templates/ja/printer-default.tmpl
new file mode 100644 (file)
index 0000000..c6290c9
--- /dev/null
@@ -0,0 +1,6 @@
+<P>{is_class?クラス:プリンタ} <A
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
+はサーバのデフォルトプリンタとなりました。</P>
+
+<BLOCKQUOTE><B>注意:</B> <TT>lpoptions</TT> コマンドで設定されたユーザのデフォルトは、このサーバのデフォルト設定を上書きします。
+</BLOCKQUOTE>
diff --git a/templates/ja/printer-deleted.tmpl b/templates/ja/printer-deleted.tmpl
new file mode 100644 (file)
index 0000000..7d48b8a
--- /dev/null
@@ -0,0 +1 @@
+<P>プリンタ {printer_name} は正しく削除されました。
diff --git a/templates/ja/printer-jobs-header.tmpl b/templates/ja/printer-jobs-header.tmpl
new file mode 100644 (file)
index 0000000..d12840e
--- /dev/null
@@ -0,0 +1 @@
+<H3 CLASS="title">ジョブ</H3>
diff --git a/templates/ja/printer-modified.tmpl b/templates/ja/printer-modified.tmpl
new file mode 100644 (file)
index 0000000..55d8aca
--- /dev/null
@@ -0,0 +1 @@
+<P>プリンタ <A HREF="/printers/{printer_name}">{printer_name}</A> は正しく変更されました。
diff --git a/templates/ja/printer-purge.tmpl b/templates/ja/printer-purge.tmpl
new file mode 100644 (file)
index 0000000..8057fef
--- /dev/null
@@ -0,0 +1,3 @@
+<P>{is_class?クラス:プリンタ} <A
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
+はすべてのジョブを削除しました。</P>
diff --git a/templates/ja/printer-reject.tmpl b/templates/ja/printer-reject.tmpl
new file mode 100644 (file)
index 0000000..bb2c4a8
--- /dev/null
@@ -0,0 +1,3 @@
+<P>{is_class?クラス:プリンタ} <A
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
+はもうジョブを受け付けません。</P>
diff --git a/templates/ja/printer-start.tmpl b/templates/ja/printer-start.tmpl
new file mode 100644 (file)
index 0000000..daa27e1
--- /dev/null
@@ -0,0 +1,3 @@
+<P>{is_class?クラス:プリンタ} <A
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
+は開始しました。</P>
diff --git a/templates/ja/printer-stop.tmpl b/templates/ja/printer-stop.tmpl
new file mode 100644 (file)
index 0000000..494aae7
--- /dev/null
@@ -0,0 +1,3 @@
+<P>{is_class?クラス:プリンタ} <A
+HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
+は停止しました。</P>
diff --git a/templates/ja/printers-header.tmpl b/templates/ja/printers-header.tmpl
new file mode 100644 (file)
index 0000000..f9c78f0
--- /dev/null
@@ -0,0 +1 @@
+<P ALIGN="CENTER">{total=0?プリンタがありません:{total} 個のプリンタのうち {#printer_name} 個を表示中}。</P>
diff --git a/templates/ja/printers.tmpl b/templates/ja/printers.tmpl
new file mode 100644 (file)
index 0000000..a23959c
--- /dev/null
@@ -0,0 +1,60 @@
+{#printer_name=0?:
+{[printer_name]
+<H2 CLASS="title"><A HREF="{printer_uri_supported}">{printer_name}</A>{default_name={printer_name}? (デフォルトプリンタ):}
+{?printer_state_message=?:<SPAN CLASS="message">"{printer_state_message}"</SPAN>}</H2>
+
+<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
+<TR>
+<TD VALIGN="TOP"><A HREF="{printer_uri_supported}">
+<IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?processing:stopped}}.gif" CLASS="button" ALT=""></A>
+</TD>
+<TD VALIGN="TOP"><B>説明:</B> {printer_info}<BR>
+<B>場所:</B> {printer_location}<BR>
+<B>メーカとモデル:</B> {printer_make_and_model}<BR>
+<B>プリンタの状態:</B> {printer_state=3?待機中:{printer_state=4?処理中:停止}},
+{printer_is_accepting_jobs=0?ジョブを拒否中:ジョブを受け付け中}, {printer_is_shared=0?not:} 公開。
+{?device_uri=?:<BR><B>デバイス URI:</B> {device_uri}}
+
+<P>
+<A HREF="{printer_uri_supported}?op=print-test-page">
+<IMG SRC="/images/print-test-page.gif" ALT="テストページの印刷" CLASS="button"></A>
+{printer_state=5?
+<A HREF="{admin_uri}?op=start-printer&amp;printer_name={printer_name}">
+<IMG SRC="/images/start-printer.gif" ALT="プリタを開始" CLASS="button"></A>
+:
+<A HREF="{admin_uri}?op=stop-printer&amp;printer_name={printer_name}">
+<IMG SRC="/images/stop-printer.gif" ALT="プリンタを停止" CLASS="button"></A>
+}
+{printer_is_accepting_jobs=0?
+<A HREF="{admin_uri}?op=accept-jobs&amp;printer_name={printer_name}">
+<IMG SRC="/images/accept-jobs.gif" ALT="ジョブを受け付け" CLASS="button"></A>
+:
+<A HREF="{admin_uri}?op=reject-jobs&amp;printer_name={printer_name}">
+<IMG SRC="/images/reject-jobs.gif" ALT="ジョブを拒否" CLASS="button"></A>
+}
+<A HREF="{printer_uri_supported}?op=move-jobs&amp;printer_name={printer_name}">
+<IMG SRC="/images/move-jobs.gif" ALT="すべてのジョブの移動" CLASS="button"></A>
+<A HREF="{admin_uri}?op=purge-jobs&amp;printer_name={printer_name}">
+<IMG SRC="/images/cancel-all-jobs.gif" ALT="すべてのジョブをキャンセル" CLASS="button"></A>
+{printer_is_shared=0?
+<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={printer_name}&amp;shared=1">
+<IMG SRC="/images/publish-printer.gif" ALT="プリンタを公開" CLASS="button"></A>
+:
+<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={printer_name}&amp;shared=0">
+<IMG SRC="/images/unpublish-printer.gif" ALT="プリンタを非公開" CLASS="button"></A>
+}
+<A HREF="{admin_uri}?op=modify-printer&amp;printer_name={printer_name}">
+<IMG SRC="/images/modify-printer.gif" ALT="プリンタの変更" CLASS="button"></A>
+<A HREF="{admin_uri}?op=set-printer-options&amp;printer_name={printer_name}">
+<IMG SRC="/images/set-printer-options.gif" ALT="プリンタオプションの設定" CLASS="button"></A>
+<A HREF="{admin_uri}?op=delete-printer&amp;printer_name={printer_name}">
+<IMG SRC="/images/delete-printer.gif" ALT="プリンタの削除" CLASS="button"></A>
+<A HREF="{admin_uri}?op=set-as-default&amp;printer_name={printer_name}">
+<IMG SRC="/images/set-as-default.gif" ALT="デフォルトに設定" CLASS="button"></A>
+<A HREF="{admin_uri}?op=set-allowed-users&amp;printer_name={printer_name}">
+<IMG SRC="/images/set-allowed-users.gif" ALT="許可するユーザの設定" CLASS="button"></A>
+</P>
+</TD>
+</TR>
+</TABLE>
+}}
diff --git a/templates/ja/restart.tmpl b/templates/ja/restart.tmpl
new file mode 100644 (file)
index 0000000..9801f51
--- /dev/null
@@ -0,0 +1 @@
+<p>サーバが再起動するあいだ、しばらくお待ちください...</p>
diff --git a/templates/ja/samba-export.tmpl b/templates/ja/samba-export.tmpl
new file mode 100644 (file)
index 0000000..46587f6
--- /dev/null
@@ -0,0 +1,56 @@
+<SCRIPT TYPE="text/javascript"><!--
+function select_printers() {
+  var list = document.export_samba.EXPORT_NAME;
+  var sel = document.export_samba.EXPORT_ALL.checked;
+
+  for (i = 0; i < list.length; i ++) {
+    list.options[i].selected = sel;
+  }
+}
+--></SCRIPT>
+
+<FORM METHOD="POST" ACTION="/admin/" NAME="export_samba">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="export-samba">
+
+<H2 CLASS="title">プリンタを Samba にエキスポート</H2>
+
+{error?<P>プリンタを Samba にエキスポートできません\:</P>
+<BLOCKQUOTE>{error}</BLOCKQUOTE>
+<P>より詳細な情報については <A HREF="/admin/log/error_log"
+TARGET="_blank">error_log</A> ファイルを参照してください。</P>:
+<P>このページは、Windows クライアントがデスクトップ上の
+<VAR>マイネットワーク</VAR> や <VAR>ネットワークの場所</VAR>
+アイコン経由でアクセスできるよう、プリンタの Samba
+へのエキスポートを許可します。<A
+HREF="/help/man-cupsaddsmb.html"
+TARGET="_blank">cupsaddsmb(8)</A> man ページに書かれているように、
+事前に Windows PostScript ドライバをインストールしておく必要があります。
+</P>}
+
+<TABLE>
+<TR>
+<TH CLASS="label">プリンタ:</TH>
+<TD>
+<SELECT NAME="EXPORT_NAME" SIZE="10" MULTIPLE>
+{[printer_name]<OPTION VALUE="{printer_name}"{export_all? SELECTED:{printer_export? SELECTED:}}>{printer_name}}
+</SELECT><BR>
+<INPUT TYPE="CHECKBOX" NAME="EXPORT_ALL"{export_all? CHECKED:}
+onChange="select_printers()"> すべてのプリンタをエキスポート
+</TD>
+</TR>
+<TR>
+<TH CLASS="label">Samba のユーザ名:</TH>
+<TD><INPUT TYPE="TEXT" NAME="USERNAME" VALUE="{?USERNAME}"> (必須)</TD>
+</TR>
+<TR>
+<TH CLASS="label">Samba のパスワード:</TH>
+<TD><INPUT TYPE="PASSWORD" NAME="PASSWORD" VALUE=""> (必須)</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD><INPUT TYPE="IMAGE" SRC="/images/export-samba.gif"
+ALT="プリンタをSambaにエキスポート"></TD>
+</TR>
+</TABLE>
+
+</FORM>
diff --git a/templates/ja/samba-exported.tmpl b/templates/ja/samba-exported.tmpl
new file mode 100644 (file)
index 0000000..854834a
--- /dev/null
@@ -0,0 +1 @@
+<P>プリンタは Samba に正しくエキスポートされました。</P>
diff --git a/templates/ja/search.tmpl b/templates/ja/search.tmpl
new file mode 100644 (file)
index 0000000..04c8e17
--- /dev/null
@@ -0,0 +1,10 @@
+<FORM ACTION="/{SECTION}/{?SEARCH_DEST}" METHOD="GET">
+{WHICH_JOBS?<INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{WHICH_JOBS}">:}
+{ORDER?<INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{ORDER}">:}
+
+<P ALIGN="CENTER"><B>
+{SEARCH_DEST?{SEARCH_DEST}:{SECTION=classes?クラス:{SECTION=jobs?ジョブ:プリンタ}}} 内を検索:</B>
+<INPUT TYPE="TEXT" NAME="QUERY" VALUE="{?QUERY}" SIZE="60"> <INPUT
+TYPE="IMAGE" SRC="/images/search.gif" ALT="検索"></P>
+
+</FORM>
diff --git a/templates/ja/test-page.tmpl b/templates/ja/test-page.tmpl
new file mode 100644 (file)
index 0000000..a4f42fa
--- /dev/null
@@ -0,0 +1,2 @@
+<P>テストページを送信しました; ジョブ ID は <A HREF="/{SECTION}/{printer_name}">
+{printer_name}-{job_id}</A> です。
diff --git a/templates/ja/users.tmpl b/templates/ja/users.tmpl
new file mode 100644 (file)
index 0000000..fb4e3dd
--- /dev/null
@@ -0,0 +1,26 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{OP}">
+<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
+{IS_CLASS?<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="{IS_CLASS}">:}
+
+<H2 CLASS="title">{printer_name}に許可するユーザ</H2>
+
+<TABLE>
+<TR>
+<TH CLASS="label">ユーザ:</TH>
+<TD>
+<INPUT TYPE='TEXT' NAME='users' SIZE='60' VALUE='{?requesting_user_name_allowed}{?requesting_user_name_denied}'>
+<BR>
+<INPUT TYPE='RADIO' NAME='type' VALUE='requesting-user-name-allowed' {requesting_user_name_allowed?checked:}>これらのユーザの印刷を許可
+<INPUT TYPE='RADIO' NAME='type' VALUE='requesting-user-name-denied' {requesting_user_name_denied?checked:}>これらのユーザの印刷を禁止
+</TD>
+</TR>
+<TR>
+<TD></TD>
+<TD>
+<INPUT TYPE="IMAGE" SRC="/images/set-allowed-users.gif" ALT="許可するユーザの設定">
+</TD>
+</TR>
+</TABLE>
+
+</FORM>
index 76d8ac877378fb0753172c1f82071838be646bb5..b18604edc7be6ac2286269c6ea64005abf36cd32 100644 (file)
@@ -1,5 +1,5 @@
 {#job_id=0?:
-<TABLE CELLPADDING="0" CELLSPACING="0" CLASS="button" WIDTH="100%">
+<TABLE CELLPADDING="0" CELLSPACING="0" CLASS="button" WIDTH="100%" SUMMARY="Job List">
 <TR CLASS="data">
 <TH>ID&nbsp;</TH>
 <TH>Name&nbsp;</TH>
index c95f0c5592c95cf2fcad8c0f17c50ee1cbd162c8..4f017c280c3ee6ad0451736086bfa8f8b9f2159f 100644 (file)
@@ -1,4 +1,4 @@
-<TABLE WIDTH="100%" CLASS="pager">
+<TABLE WIDTH="100%" CLASS="pager" SUMMARY="Paging Bar">
 <TR>
        <TD WIDTH="33%">{PREVURL?<A HREF="{PREVURL}"><IMG SRC="/images/show-previous.gif" ALT="Show Previous" CLASS="button"></A>:&nbsp;}</TD>
        <TD WIDTH="34%" ALIGN="CENTER">{ORDER=dec?<A HREF="{THISURL}&amp;ORDER=asc"><IMG SRC="/images/sort-ascending.gif" ALT="Sort Ascending" CLASS="button"></A>:<A HREF="{THISURL}&amp;ORDER=dec"><IMG SRC="/images/sort-descending.gif" ALT="Sort Descending" CLASS="button"></A>}</TD>
index 0520b5afc9c57a1530d8abb3ae1c28d44f95b3b6..e3ee1aa87f073dcd78ed04c08f58a21cafe2fc4a 100644 (file)
@@ -3,7 +3,7 @@
 <H2 CLASS="title"><A HREF="{printer_uri_supported}">{printer_name}</A>{default_name={printer_name}? (Default Printer):}
 {?printer_state_message=?:<SPAN CLASS="message">"{printer_state_message}"</SPAN>}</H2>
 
-<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0">
+<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
 <TR>
 <TD VALIGN="TOP"><A HREF="{printer_uri_supported}">
 <IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?processing:stopped}}.gif" CLASS="button" ALT=""></A>
index 38565cdf4e8e20a854bf971bed82a06d0ec2b44b..107123888636b56f2de834ea69c5b3ecdb4e3967 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: 4.2-cups-printer-ops.test 4837 2005-11-14 04:13:13Z mike $"
+# "$Id: 4.2-cups-printer-ops.test 5091 2006-02-08 18:39:56Z mike $"
 #
 #   Verify that the CUPS printer operations work.
 #
        EXPECT attributes-charset
        EXPECT attributes-natural-language
 }
+{
+       # The name of the test...
+       NAME "Set Default Printer to Test1"
+
+       # The operation to use
+       OPERATION cups-set-default
+       RESOURCE /admin/
+
+       # The attributes to send
+       GROUP operation
+       ATTR charset attributes-charset utf-8
+       ATTR language attributes-natural-language en
+       ATTR uri printer-uri $method://$hostname:$port/printers/Test1
+
+       # What statuses are OK?
+       STATUS successful-ok
+
+       # What attributes do we expect?
+       EXPECT attributes-charset
+       EXPECT attributes-natural-language
+}
 
 #
-# End of "$Id: 4.2-cups-printer-ops.test 4837 2005-11-14 04:13:13Z mike $"
+# End of "$Id: 4.2-cups-printer-ops.test 5091 2006-02-08 18:39:56Z mike $"
 #
index 34be1712f37f21c9ce0c9d2235f32227bbab821f..926bc9eb635f742c107de0c18c0bbb1e5d4dd60a 100644 (file)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# "$Id: 5.8-cancel.sh 4494 2005-02-18 02:18:11Z mike $"
+# "$Id: 5.8-cancel.sh 5091 2006-02-08 18:39:56Z mike $"
 #
 #   Test the cancel command.
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2006 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
@@ -37,8 +37,8 @@ echo ""
 
 echo "Cancel All Test"
 echo ""
-echo "    cancel -a -"
-../systemv/cancel -a 2>&1
+echo "    cancel -a"
+../systemv/cancel -a 2>&1
 if test $? != 0; then
        echo "    FAILED"
        exit 1
@@ -48,5 +48,5 @@ fi
 echo ""
 
 #
-# End of "$Id: 5.8-cancel.sh 4494 2005-02-18 02:18:11Z mike $".
+# End of "$Id: 5.8-cancel.sh 5091 2006-02-08 18:39:56Z mike $".
 #
index cb014d95defbc9ad695e8a10b55116193e634fa5..15b3056c8d62db6e1674bf11f4bb706bf08ee30c 100644 (file)
@@ -1,4 +1,5 @@
 # DO NOT DELETE
 
 ipptest.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-ipptest.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/language.h
+ipptest.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
+ipptest.o: ../cups/file.h ../cups/language.h ../cups/language.h
diff --git a/test/get-printers.test b/test/get-printers.test
new file mode 100644 (file)
index 0000000..54f8df4
--- /dev/null
@@ -0,0 +1,19 @@
+# Get printer attributes using get-printer-attributes
+{
+       # The name of the test...
+       NAME "CUPS-Get-Printers"
+
+       # The resource to use for the POST
+       # RESOURCE /admin
+
+       # The operation to use
+       OPERATION CUPS-Get-Printers
+
+       # Attributes, starting in the operation group...
+       GROUP operation
+       ATTR charset attributes-charset utf-8
+       ATTR language attributes-natural-language en
+
+       # What statuses are OK?
+       STATUS successful-ok
+}
index 199ebe44f618304ae5c014b59b9d618bc35228f2..c075cf4129b22cb1f5947dcb762c513a829aee75 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipptest.c 5037 2006-02-01 15:19:59Z mike $"
+ * "$Id: ipptest.c 5090 2006-02-08 17:08:01Z mike $"
  *
  *   IPP test command for the Common UNIX Printing System (CUPS).
  *
@@ -510,10 +510,13 @@ do_tests(const char *uri,         /* I - URI to connect on */
     request->request.op.operation_id = op;
     request->request.op.request_id   = 1;
 
-#ifdef DEBUG
-    for (attrptr = request->attrs; attrptr; attrptr = attrptr->next)
-      print_attr(attrptr);
-#endif /* DEBUG */
+    if (Verbosity)
+    {
+      printf("%s:\n", ippOpString(op));
+
+      for (attrptr = request->attrs; attrptr; attrptr = attrptr->next)
+       print_attr(attrptr);
+    }
 
     printf("    %-60.60s [", name);
     fflush(stdout);
@@ -531,7 +534,7 @@ do_tests(const char *uri,           /* I - URI to connect on */
 
       puts("FAIL]");
       printf("        ERROR %04x (%s) @ %s\n", cupsLastError(),
-            ippErrorString(cupsLastError()), ctime(&curtime));
+            cupsLastErrorString(), ctime(&curtime));
       pass = 0;
     }
     else
@@ -599,8 +602,7 @@ do_tests(const char *uri,           /* I - URI to connect on */
          puts("        BAD STATUS");
 
        printf("        status-code = %04x (%s)\n",
-              response->request.status.status_code,
-              ippErrorString(response->request.status.status_code));
+              cupsLastError(), cupsLastErrorString());
 
         for (i = 0; i < num_expects; i ++)
          if (ippFindAttribute(response, expects[i], IPP_TAG_ZERO) == NULL)
@@ -637,18 +639,45 @@ get_tag(const char *name)         /* I - Name of value/group tag */
   int                  i;              /* Looping var */
   static const char    * const names[] =
                {                       /* Value/group tag names */
-                 "zero", "operation", "job", "end", "printer",
-                 "unsupported-group", "subscription", "event-notification",
-                 "", "", "", "", "",
-                 "", "", "", "unsupported-value", "default",
-                 "unknown", "novalue", "", "notsettable",
-                 "deleteattr", "anyvalue", "", "", "", "", "", "",
-                 "", "", "", "integer", "boolean", "enum", "", "",
-                 "", "", "", "", "", "", "", "", "", "", "string",
-                 "date", "resolution", "range", "collection",
-                 "textlang", "namelang", "", "", "", "", "", "", "",
-                 "", "", "", "text", "name", "", "keyword", "uri",
-                 "urischeme", "charset", "language", "mimetype"
+                 "zero",               /* 0x00 */
+                 "operation",          /* 0x01 */
+                 "job",                /* 0x02 */
+                 "end",                /* 0x03 */
+                 "printer",            /* 0x04 */
+                 "unsupported-group",  /* 0x05 */
+                 "subscription",       /* 0x06 */
+                 "event-notification", /* 0x07 */
+                 "", "", "", "", "", "", "", "",
+                 "unsupported-value",  /* 0x10 */
+                 "default",            /* 0x11 */
+                 "unknown",            /* 0x12 */
+                 "novalue",            /* 0x13 */
+                 "",
+                 "notsettable",        /* 0x15 */
+                 "deleteattr",         /* 0x16 */
+                 "anyvalue",           /* 0x17 */
+                 "", "", "", "", "", "", "", "", "",
+                 "integer",            /* 0x21 */
+                 "boolean",            /* 0x22 */
+                 "enum",               /* 0x23 */
+                 "", "", "", "", "", "", "", "", "", "", "", "",
+                 "string",             /* 0x30 */
+                 "date",               /* 0x31 */
+                 "resolution",         /* 0x32 */
+                 "range",              /* 0x33 */
+                 "collection",         /* 0x34 */
+                 "textlang",           /* 0x35 */
+                 "namelang",           /* 0x36 */
+                 "", "", "", "", "", "", "", "", "", "",
+                 "text",               /* 0x41 */
+                 "name",               /* 0x42 */
+                 "",
+                 "keyword",            /* 0x44 */
+                 "uri",                /* 0x45 */
+                 "urischeme",          /* 0x46 */
+                 "charset",            /* 0x47 */
+                 "language",           /* 0x48 */
+                 "mimetype"            /* 0x49 */
                };
 
 
@@ -851,5 +880,5 @@ usage(const char *option)           /* I - Option string or NULL */
 
 
 /*
- * End of "$Id: ipptest.c 5037 2006-02-01 15:19:59Z mike $".
+ * End of "$Id: ipptest.c 5090 2006-02-08 17:08:01Z mike $".
  */
index 8f506093d76e8fd523817ebb150417dfd28a97e8..87f648b99e8864cc7ae8e643cef7e932735365ce 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
-# "$Id: run-stp-tests.sh 4891 2006-01-07 04:50:14Z mike $"
+# "$Id: run-stp-tests.sh 5091 2006-02-08 18:39:56Z mike $"
 #
 #   Perform the complete set of IPP compliance tests specified in the
 #   CUPS Software Test Plan.
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2006 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
 
 make
 
+#
+# Figure out the proper echo options...
+#
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+        ac_n=-n
+        ac_c=
+else
+        ac_n=
+        ac_c='\c'
+fi
+
 #
 # Greet the tester...
 #
@@ -53,9 +65,10 @@ echo "2 - Basic conformance test, some load testing (minimum 256MB VM, 50MB disk
 echo "3 - Basic conformance test, extreme load testing (minimum 1GB VM, 500MB disk)"
 echo "4 - Basic conformance test, torture load testing (minimum 2GB VM, 1GB disk)"
 echo ""
-echo "Please enter the number of the test you wish to perform:"
+echo $ac_n "Enter the number of the test you wish to perform: [1] $ac_c"
 
 read testtype
+echo ""
 
 case "$testtype" in
        0)
@@ -103,8 +116,10 @@ echo "0 - Do not do SSL/TLS encryption tests"
 echo "1 - Create a SSL/TLS certificate and key, but do not require encryption"
 echo "2 - Create a SSL/TLS certificate and key and require encryption"
 echo ""
+echo $ac_n "Enter the number of the SSL/TLS tests to perform: [0] $ac_c"
 
 read ssltype
+echo ""
 
 case "$ssltype" in
        1 | 2)
@@ -125,7 +140,7 @@ EOF
                ;;
 
        *)
-               echo "Not using SSL/TLS ($ssltype)..."
+               echo "Not using SSL/TLS..."
                ssltype=0
                ;;
 esac
@@ -157,9 +172,10 @@ echo "This test script can use the Valgrind software from:"
 echo ""
 echo "    http://developer.kde.org/~sewardj/"
 echo ""
-echo "Please enter Y to use Valgrind or N to not use Valgrind:"
+echo $ac_n "Enter Y to use Valgrind or N to not use Valgrind: [N] $ac_c"
 
 read usevalgrind
+echo ""
 
 case "$usevalgrind" in
        Y* | y*)
@@ -200,6 +216,7 @@ ln -s $root/backend/serial /tmp/cups-$user/bin/backend
 ln -s $root/backend/socket /tmp/cups-$user/bin/backend
 ln -s $root/backend/usb /tmp/cups-$user/bin/backend
 ln -s $root/cgi-bin /tmp/cups-$user/bin
+ln -s $root/monitor /tmp/cups-$user/bin
 ln -s $root/notifier /tmp/cups-$user/bin
 ln -s $root/scheduler /tmp/cups-$user/bin/daemon
 ln -s $root/filter/hpgltops /tmp/cups-$user/bin/filter
@@ -385,7 +402,7 @@ fi
 
 echo "Scheduler is PID $cupsd; run debugger now if you need to."
 echo ""
-echo "Press ENTER to continue..."
+echo $ac_n "Press ENTER to continue... $ac_c"
 read junk
 
 IPP_PORT=$port; export IPP_PORT
@@ -404,7 +421,7 @@ done
 # Create the test report source file...
 #
 
-strfile=cups-str-1.2-`date +%Y-%m-%d`-`whoami`.shtml
+strfile=cups-str-1.2-`date +%Y-%m-%d`-`whoami`.html
 
 rm -f $strfile
 cat str-header.html >$strfile
@@ -415,7 +432,7 @@ cat str-header.html >$strfile
 
 echo "Running IPP compliance tests..."
 
-echo "<H1>IPP Compliance Tests</H1>" >>$strfile
+echo "<H1>1 - IPP Compliance Tests</H1>" >>$strfile
 echo "<P>This section provides the results to the IPP compliance tests" >>$strfile
 echo "outlined in the CUPS Software Test Plan. These tests were run on" >>$strfile
 echo `date "+%Y-%m-%d"` by `whoami` on `hostname`. >>$strfile
@@ -443,7 +460,7 @@ echo "</PRE>" >>$strfile
 
 echo "Running command tests..."
 
-echo "<H1>Command Tests</H1>" >>$strfile
+echo "<H1>2 - Command Tests</H1>" >>$strfile
 echo "<P>This section provides the results to the command tests" >>$strfile
 echo "outlined in the CUPS Software Test Plan. These tests were run on" >>$strfile
 echo `date "+%Y-%m-%d"` by `whoami` on `hostname`. >>$strfile
@@ -489,7 +506,7 @@ kill $cupsd
 # Append the log files for post-mortim...
 #
 
-echo "<H1>Log Files</H1>" >>$strfile
+echo "<H1>3 - Log Files</H1>" >>$strfile
 
 echo "<H2>access_log</H2>" >>$strfile
 echo "<PRE>" >>$strfile
@@ -521,14 +538,6 @@ echo "Formatting reports..."
 
 cat str-trailer.html >>$strfile
 
-htmlfile=`basename $strfile .shtml`.html
-pdffile=`basename $strfile .shtml`.pdf
-
-htmldoc --numbered --verbose --titleimage ../doc/images/cups-large.gif \
-       -f $htmlfile $strfile
-htmldoc --numbered --verbose --titleimage ../doc/images/cups-large.gif \
-       -f $pdffile $strfile
-
 echo ""
 
 if test $fail != 0; then
@@ -542,12 +551,11 @@ if test "x$valgrind" != x; then
 fi
 
 echo ""
-echo "See the following files for details:"
+echo "See the following file for details:"
 echo ""
-echo "    $htmlfile"
-echo "    $pdffile"
+echo "    $strfile"
 echo ""
 
 #
-# End of "$Id: run-stp-tests.sh 4891 2006-01-07 04:50:14Z mike $"
+# End of "$Id: run-stp-tests.sh 5091 2006-02-08 18:39:56Z mike $"
 #
index 60656b6a62815d0ddcc1a10de39df311384ee0c7..dce337f4b749b651532c01cfa63aa88a4328f71c 100644 (file)
@@ -1,35 +1,25 @@
 <HTML>
 <HEAD>
        <META NAME="Description" CONTENT="Common UNIX Printing System Software Test Report">
-       <META NAME="COPYRIGHT" CONTENT="Copyright 1997-2002, All Rights Reserved">
-       <META NAME="DOCNUMBER" CONTENT="CUPS-STR-1.1">
+       <META NAME="COPYRIGHT" CONTENT="Copyright 1997-2006, All Rights Reserved">
+       <META NAME="DOCNUMBER" CONTENT="CUPS-STR-1.2">
        <META NAME="Author" CONTENT="Easy Software Products">
-       <TITLE>CUPS Software Test Report</TITLE>
+       <TITLE>CUPS 1.2 Software Test Report</TITLE>
 </HEAD>
 <BODY>
 
-<H1>Scope</H1>
-
-<H2>Identification</H2>
+<H1>CUPS 1.2 Software Test Report</H1>
 
 <P>This software test report provides detailed test results that
 are used to evaluate the stability and compliance of the Common
-UNIX Printing System ("CUPS") Version 1.1.
-
-<EMBED SRC="../doc/system-overview.shtml">
+UNIX Printing System ("CUPS") Version 1.2.
 
 <H2>Document Overview</H2>
 
 <P>This software test plan is organized into the following sections:
 
 <UL>
-       <LI>1 - Scope</LI>
-       <LI>2 - References</LI>
-       <LI>3 - IPP Compliance Tests</LI>
-       <LI>4 - Command Tests</LI>
-       <LI>5 - Log Files</LI>
-       <LI>A - Glossary</LI>
+       <LI>1 - IPP Compliance Tests</LI>
+       <LI>2 - Command Tests</LI>
+       <LI>3 - Log Files</LI>
 </UL>
-
-<EMBED SRC="../doc/references.shtml">
-
index 4c8ddd526d8399ada4dbf26f1e9c7ae8bed920be..e04310fdd2d58c69a390aef96e25821cf20ae5ee 100644 (file)
@@ -1,5 +1,2 @@
-<EMBED SRC="../doc/glossary.shtml">
-
-
 </BODY>
 </HTML>
diff --git a/tools/checkglobals b/tools/checkglobals
new file mode 100755 (executable)
index 0000000..c20d94f
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Check for global symbols that don't need to be made global...
+#
+
+for file in *.o; do
+       echo -n "$file: "
+
+       functions=""
+
+       for function in `nm -g $file | grep "T " | awk '{print $3}'`; do
+               found=""
+               for file2 in *.o; do
+                       if test "$file" = "$file2"; then
+                               continue;
+                       fi
+
+                       found=`nm -g $file2 | grep $function`
+                       if test "$found" != ""; then
+                               break;
+                       fi
+               done
+
+               if test -z "$found"; then
+                       functions="$functions $function"
+               fi
+       done
+
+       if test -z "$functions"; then
+               echo "OK"
+       else
+               echo $functions
+       fi
+done
index de93554722e66ee0140a5a8a666225930fc96b0f..50858a921b477d770b589679abf4596042ea3286 100755 (executable)
@@ -59,11 +59,14 @@ rm -rf tools
 cd ..
 
 echo -n Archiving...gz
-tar czf cups-$version-r$rev-source.tar.gz cups-$version
+tar czf cups-$fileversion-source.tar.gz cups-$version
 echo -n ...bz2
-tar cjf cups-$version-r$rev-source.tar.bz2 cups-$version
+tar cjf cups-$fileversion-source.tar.bz2 cups-$version
 echo "..."
 
+echo Removing temporary files...
+rm -rf cups-$version
+
 echo "Done!"
 
 #