From bd7854cb4d663bb0e561eaf5b01bbd47baa71d22 Mon Sep 17 00:00:00 2001 From: jlovell Date: Mon, 20 Feb 2006 18:43:55 +0000 Subject: [PATCH] Load cups into easysw/current. git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@60 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES.txt | 7 +- CREDITS.txt | 5 +- Makedefs.in | 16 +- Makefile | 18 +- backend/Makefile | 10 +- backend/ipp.c | 258 +++- backend/parallel.c | 6 +- backend/serial.c | 6 +- backend/socket.c | 8 +- backend/usb-unix.c | 8 +- berkeley/Makefile | 10 +- cgi-bin/Dependencies | 3 + cgi-bin/Makefile | 21 +- cgi-bin/admin.c | 26 +- cgi-bin/classes.c | 5 +- cgi-bin/ipp-var.c | 5 +- cgi-bin/jobs.c | 8 +- cgi-bin/printers.c | 11 +- cgi-bin/template.c | 137 +- cgi-bin/testtemplate.c | 112 ++ conf/Makefile | 12 +- conf/cupsd.conf.in | 6 +- config-scripts/cups-common.m4 | 42 +- config-scripts/cups-defaults.m4 | 94 ++ config-scripts/cups-launchd.m4 | 2 +- config-scripts/cups-manpages.m4 | 10 +- config-scripts/cups-opsys.m4 | 63 +- config-scripts/cups-sharedlibs.m4 | 6 +- config.h.in | 5 +- configure.in | 13 +- cups-config.in | 13 +- cups/Dependencies | 3 +- cups/Makefile | 8 +- cups/array.c | 420 +++--- cups/attr.c | 89 +- cups/backchannel.c | 8 +- cups/cups.h | 8 +- cups/dir.c | 2 +- cups/emit.c | 6 +- cups/encode.c | 5 +- cups/getputfile.c | 32 +- cups/http-addrlist.c | 8 +- cups/http.c | 8 +- cups/ipp-support.c | 9 +- cups/ipp.h | 5 +- cups/language.c | 125 +- cups/language.h | 5 +- cups/mark.c | 51 +- cups/ppd.c | 124 +- cups/ppd.h | 17 +- cups/util.c | 17 +- data/Makefile | 17 +- data/mac-roman.txt | 223 ++++ doc/Makefile | 59 +- doc/cups.css | 58 +- doc/help/cupsd-conf-reference.html | 16 + doc/index.html.in | 3 +- doc/ja/images/accept-jobs.gif | Bin 0 -> 703 bytes doc/ja/images/add-class.gif | Bin 0 -> 590 bytes doc/ja/images/add-printer.gif | Bin 0 -> 634 bytes doc/ja/images/add-this-printer.gif | Bin 0 -> 726 bytes doc/ja/images/cancel-all-jobs.gif | Bin 0 -> 877 bytes doc/ja/images/cancel-job.gif | Bin 0 -> 672 bytes doc/ja/images/cancel.gif | Bin 0 -> 496 bytes doc/ja/images/change-settings.gif | Bin 0 -> 603 bytes doc/ja/images/continue.gif | Bin 0 -> 469 bytes doc/ja/images/delete-class.gif | Bin 0 -> 579 bytes doc/ja/images/delete-printer.gif | Bin 0 -> 611 bytes doc/ja/images/edit-configuration-file.gif | Bin 0 -> 773 bytes doc/ja/images/export-samba.gif | Bin 0 -> 939 bytes doc/ja/images/help.gif | Bin 0 -> 386 bytes doc/ja/images/hold-job.gif | Bin 0 -> 633 bytes doc/ja/images/manage-classes.gif | Bin 0 -> 583 bytes doc/ja/images/manage-jobs.gif | Bin 0 -> 578 bytes doc/ja/images/manage-printers.gif | Bin 0 -> 631 bytes doc/ja/images/manage-server.gif | Bin 0 -> 569 bytes doc/ja/images/modify-class.gif | Bin 0 -> 617 bytes doc/ja/images/modify-printer.gif | Bin 0 -> 655 bytes doc/ja/images/move-job.gif | Bin 0 -> 638 bytes doc/ja/images/move-jobs.gif | Bin 0 -> 861 bytes doc/ja/images/print-test-page.gif | Bin 0 -> 688 bytes doc/ja/images/publish-printer.gif | Bin 0 -> 646 bytes doc/ja/images/reject-jobs.gif | Bin 0 -> 578 bytes doc/ja/images/release-job.gif | Bin 0 -> 625 bytes doc/ja/images/restart-job.gif | Bin 0 -> 604 bytes doc/ja/images/save-changes.gif | Bin 0 -> 592 bytes doc/ja/images/search.gif | Bin 0 -> 394 bytes doc/ja/images/set-allowed-users.gif | Bin 0 -> 782 bytes doc/ja/images/set-as-default.gif | Bin 0 -> 653 bytes doc/ja/images/set-printer-options.gif | Bin 0 -> 854 bytes doc/ja/images/show-active.gif | Bin 0 -> 858 bytes doc/ja/images/show-all-jobs.gif | Bin 0 -> 812 bytes doc/ja/images/show-all.gif | Bin 0 -> 812 bytes doc/ja/images/show-completed.gif | Bin 0 -> 771 bytes doc/ja/images/show-next.gif | Bin 0 -> 529 bytes doc/ja/images/show-previous.gif | Bin 0 -> 509 bytes doc/ja/images/sort-ascending.gif | Bin 0 -> 604 bytes doc/ja/images/sort-descending.gif | Bin 0 -> 620 bytes doc/ja/images/start-class.gif | Bin 0 -> 603 bytes doc/ja/images/start-printer.gif | Bin 0 -> 656 bytes doc/ja/images/stop-class.gif | Bin 0 -> 570 bytes doc/ja/images/stop-printer.gif | Bin 0 -> 606 bytes doc/ja/images/unpublish-printer.gif | Bin 0 -> 698 bytes doc/ja/images/use-default-config.gif | Bin 0 -> 1017 bytes doc/ja/images/view-access-log.gif | Bin 0 -> 743 bytes doc/ja/images/view-error-log.gif | Bin 0 -> 606 bytes doc/ja/images/view-page-log.gif | Bin 0 -> 658 bytes doc/ja/index.html.in | 141 ++ filter/Dependencies | 3 +- filter/Makefile | 12 +- filter/image-zoom.c | 32 +- filter/imagetops.c | 91 +- filter/imagetoraster.c | 174 +-- filter/pstops.c | 808 ++++++----- fonts/Makefile | 8 +- init/cups.sh.in | 22 +- init/org.cups.cupsd.plist | 2 - locale/Makefile | 17 +- locale/cups.pot | 742 +++++++---- locale/cups_fr.po | 748 +++++++---- locale/cups_ja.po | 982 +++++++++----- man/Makefile | 46 +- man/accept.man | 54 +- man/backend.man | 236 +--- man/cancel.man | 84 ++ man/classes.conf.man | 89 +- man/cups-config.man | 84 +- man/cups-deviced.man.in | 53 + man/cups-driverd.man.in | 114 ++ man/{cups-lpd.man => cups-lpd.man.in} | 67 +- man/cups-polld.man | 29 +- man/{cupsaddsmb.man => cupsaddsmb.man.in} | 89 +- man/{cupsd.conf.man => cupsd.conf.man.in} | 380 ++++-- man/{cupsd.man => cupsd.man.in} | 61 +- man/cupsenable.man | 80 +- man/cupstestppd.man | 54 +- man/filter.man | 166 ++- man/lp.man | 228 ++-- man/lpadmin.man | 182 +-- man/lpc.man | 56 +- man/lpinfo.man | 54 +- man/lpmove.man | 32 +- man/lpoptions.man | 124 +- man/lppasswd.man | 65 +- man/lpq.man | 63 +- man/lpr.man | 104 +- man/lprm.man | 54 +- man/lpstat.man | 88 +- man/mantohtml.c | 112 +- man/mime.convs.man | 29 +- man/mime.types.man | 33 +- man/printers.conf.man | 96 +- monitor/Dependencies | 8 + monitor/Makefile | 95 ++ monitor/bcp.c | 286 ++++ monitor/tbcp.c | 283 ++++ notifier/Dependencies | 8 +- notifier/Makefile | 8 +- packaging/cups-dbus.conf | 13 + packaging/cups.list.in | 61 +- packaging/cups.spec.in | 97 +- pdftops/Dependencies | 2 +- pdftops/JBIG2Stream.cxx | 19 +- pdftops/JPXStream.cxx | 10 +- pdftops/Makefile | 8 +- pdftops/SplashXPathScanner.cxx | 32 +- pdftops/Stream.cxx | 45 +- pdftops/Stream.h | 2 +- pdftops/UnicodeTypeTable.cxx | 2 +- pdftops/gmem.c | 22 +- ppd/Makefile | 6 +- ppd/dymo.ppd | 6 +- ppd/zebra.ppd | 6 +- ppd/zebracpl.ppd | 2 +- ppd/zebraep1.ppd | 2 +- ppd/zebraep2.ppd | 2 +- scheduler/Dependencies | 314 +++-- scheduler/Makefile | 26 +- scheduler/auth.c | 151 ++- scheduler/auth.h | 13 +- scheduler/banners.c | 14 +- scheduler/banners.h | 8 +- scheduler/cert.c | 86 +- scheduler/classes.c | 12 +- scheduler/client.c | 63 +- scheduler/client.h | 15 +- scheduler/conf.c | 469 ++++--- scheduler/conf.h | 8 +- scheduler/cups-deviced.c | 43 +- scheduler/cups-driverd.c | 100 +- scheduler/cups-lpd.c | 1344 +++++++++++-------- scheduler/dirsvc.c | 42 +- scheduler/env.c | 13 +- scheduler/filter.c | 140 +- scheduler/ipp.c | 491 +++++-- scheduler/job.c | 1471 +++++++++++++++------ scheduler/job.h | 22 +- scheduler/listen.c | 137 +- scheduler/main.c | 212 +-- scheduler/mime.h | 8 +- scheduler/network.c | 11 +- scheduler/policy.c | 7 +- scheduler/printers.c | 374 ++++-- scheduler/printers.h | 5 +- scheduler/process.c | 41 +- scheduler/server.c | 6 +- scheduler/statbuf.c | 6 +- scheduler/subscriptions.c | 19 +- scheduler/sysman.c | 5 +- scheduler/testmime.c | 8 +- systemv/Dependencies | 44 +- systemv/Makefile | 10 +- systemv/accept.c | 8 +- systemv/cancel.c | 9 +- templates/Makefile | 17 +- templates/classes.tmpl | 2 +- templates/edit-config.tmpl.in | 2 +- templates/header.tmpl.in | 3 +- templates/ja/add-class.tmpl | 33 + templates/ja/add-printer.tmpl | 28 + templates/ja/admin.tmpl | 72 + templates/ja/choose-device.tmpl | 26 + templates/ja/choose-make.tmpl | 42 + templates/ja/choose-model.tmpl | 34 + templates/ja/choose-serial.tmpl | 47 + templates/ja/choose-uri.tmpl | 41 + templates/ja/class-added.tmpl | 1 + templates/ja/class-confirm.tmpl | 7 + templates/ja/class-deleted.tmpl | 1 + templates/ja/class-jobs-header.tmpl | 1 + templates/ja/class-modified.tmpl | 1 + templates/ja/classes-header.tmpl | 1 + templates/ja/classes.tmpl | 56 + templates/ja/error-op.tmpl | 3 + templates/ja/error.tmpl | 3 + templates/ja/header.tmpl.in | 63 + templates/ja/help-header.tmpl | 28 + templates/ja/job-cancel.tmpl | 2 + templates/ja/job-hold.tmpl | 2 + templates/ja/job-move.tmpl | 22 + templates/ja/job-moved.tmpl | 2 + templates/ja/job-release.tmpl | 2 + templates/ja/job-restart.tmpl | 1 + templates/ja/jobs-header.tmpl | 15 + templates/ja/jobs.tmpl | 42 + templates/ja/modify-class.tmpl | 34 + templates/ja/modify-printer.tmpl | 29 + templates/ja/option-conflict.tmpl | 7 + templates/ja/option-trailer.tmpl | 5 + templates/ja/pager.tmpl | 7 + templates/ja/printer-accept.tmpl | 3 + templates/ja/printer-added.tmpl | 1 + templates/ja/printer-configured.tmpl | 1 + templates/ja/printer-confirm.tmpl | 7 + templates/ja/printer-default.tmpl | 6 + templates/ja/printer-deleted.tmpl | 1 + templates/ja/printer-jobs-header.tmpl | 1 + templates/ja/printer-modified.tmpl | 1 + templates/ja/printer-purge.tmpl | 3 + templates/ja/printer-reject.tmpl | 3 + templates/ja/printer-start.tmpl | 3 + templates/ja/printer-stop.tmpl | 3 + templates/ja/printers-header.tmpl | 1 + templates/ja/printers.tmpl | 60 + templates/ja/restart.tmpl | 1 + templates/ja/samba-export.tmpl | 56 + templates/ja/samba-exported.tmpl | 1 + templates/ja/search.tmpl | 10 + templates/ja/test-page.tmpl | 2 + templates/ja/users.tmpl | 26 + templates/jobs.tmpl | 2 +- templates/pager.tmpl | 2 +- templates/printers.tmpl | 2 +- test/4.2-cups-printer-ops.test | 25 +- test/5.8-cancel.sh | 10 +- test/Dependencies | 3 +- test/get-printers.test | 19 + test/ipptest.c | 71 +- test/run-stp-tests.sh | 52 +- test/str-header.html | 26 +- test/str-trailer.html | 3 - tools/checkglobals | 34 + tools/makesrcdist | 7 +- 283 files changed, 11644 insertions(+), 5324 deletions(-) create mode 100644 cgi-bin/testtemplate.c create mode 100644 data/mac-roman.txt create mode 100644 doc/ja/images/accept-jobs.gif create mode 100644 doc/ja/images/add-class.gif create mode 100644 doc/ja/images/add-printer.gif create mode 100644 doc/ja/images/add-this-printer.gif create mode 100644 doc/ja/images/cancel-all-jobs.gif create mode 100644 doc/ja/images/cancel-job.gif create mode 100644 doc/ja/images/cancel.gif create mode 100644 doc/ja/images/change-settings.gif create mode 100644 doc/ja/images/continue.gif create mode 100644 doc/ja/images/delete-class.gif create mode 100644 doc/ja/images/delete-printer.gif create mode 100644 doc/ja/images/edit-configuration-file.gif create mode 100644 doc/ja/images/export-samba.gif create mode 100644 doc/ja/images/help.gif create mode 100644 doc/ja/images/hold-job.gif create mode 100644 doc/ja/images/manage-classes.gif create mode 100644 doc/ja/images/manage-jobs.gif create mode 100644 doc/ja/images/manage-printers.gif create mode 100644 doc/ja/images/manage-server.gif create mode 100644 doc/ja/images/modify-class.gif create mode 100644 doc/ja/images/modify-printer.gif create mode 100644 doc/ja/images/move-job.gif create mode 100644 doc/ja/images/move-jobs.gif create mode 100644 doc/ja/images/print-test-page.gif create mode 100644 doc/ja/images/publish-printer.gif create mode 100644 doc/ja/images/reject-jobs.gif create mode 100644 doc/ja/images/release-job.gif create mode 100644 doc/ja/images/restart-job.gif create mode 100644 doc/ja/images/save-changes.gif create mode 100644 doc/ja/images/search.gif create mode 100644 doc/ja/images/set-allowed-users.gif create mode 100644 doc/ja/images/set-as-default.gif create mode 100644 doc/ja/images/set-printer-options.gif create mode 100644 doc/ja/images/show-active.gif create mode 100644 doc/ja/images/show-all-jobs.gif create mode 100644 doc/ja/images/show-all.gif create mode 100644 doc/ja/images/show-completed.gif create mode 100644 doc/ja/images/show-next.gif create mode 100644 doc/ja/images/show-previous.gif create mode 100644 doc/ja/images/sort-ascending.gif create mode 100644 doc/ja/images/sort-descending.gif create mode 100644 doc/ja/images/start-class.gif create mode 100644 doc/ja/images/start-printer.gif create mode 100644 doc/ja/images/stop-class.gif create mode 100644 doc/ja/images/stop-printer.gif create mode 100644 doc/ja/images/unpublish-printer.gif create mode 100644 doc/ja/images/use-default-config.gif create mode 100644 doc/ja/images/view-access-log.gif create mode 100644 doc/ja/images/view-error-log.gif create mode 100644 doc/ja/images/view-page-log.gif create mode 100644 doc/ja/index.html.in create mode 100644 man/cancel.man create mode 100644 man/cups-deviced.man.in create mode 100644 man/cups-driverd.man.in rename man/{cups-lpd.man => cups-lpd.man.in} (57%) rename man/{cupsaddsmb.man => cupsaddsmb.man.in} (66%) rename man/{cupsd.conf.man => cupsd.conf.man.in} (60%) rename man/{cupsd.man => cupsd.man.in} (51%) create mode 100644 monitor/Dependencies create mode 100644 monitor/Makefile create mode 100644 monitor/bcp.c create mode 100644 monitor/tbcp.c create mode 100644 packaging/cups-dbus.conf create mode 100644 templates/ja/add-class.tmpl create mode 100644 templates/ja/add-printer.tmpl create mode 100644 templates/ja/admin.tmpl create mode 100644 templates/ja/choose-device.tmpl create mode 100644 templates/ja/choose-make.tmpl create mode 100644 templates/ja/choose-model.tmpl create mode 100644 templates/ja/choose-serial.tmpl create mode 100644 templates/ja/choose-uri.tmpl create mode 100644 templates/ja/class-added.tmpl create mode 100644 templates/ja/class-confirm.tmpl create mode 100644 templates/ja/class-deleted.tmpl create mode 100644 templates/ja/class-jobs-header.tmpl create mode 100644 templates/ja/class-modified.tmpl create mode 100644 templates/ja/classes-header.tmpl create mode 100644 templates/ja/classes.tmpl create mode 100644 templates/ja/error-op.tmpl create mode 100644 templates/ja/error.tmpl create mode 100644 templates/ja/header.tmpl.in create mode 100644 templates/ja/help-header.tmpl create mode 100644 templates/ja/job-cancel.tmpl create mode 100644 templates/ja/job-hold.tmpl create mode 100644 templates/ja/job-move.tmpl create mode 100644 templates/ja/job-moved.tmpl create mode 100644 templates/ja/job-release.tmpl create mode 100644 templates/ja/job-restart.tmpl create mode 100644 templates/ja/jobs-header.tmpl create mode 100644 templates/ja/jobs.tmpl create mode 100644 templates/ja/modify-class.tmpl create mode 100644 templates/ja/modify-printer.tmpl create mode 100644 templates/ja/option-conflict.tmpl create mode 100644 templates/ja/option-trailer.tmpl create mode 100644 templates/ja/pager.tmpl create mode 100644 templates/ja/printer-accept.tmpl create mode 100644 templates/ja/printer-added.tmpl create mode 100644 templates/ja/printer-configured.tmpl create mode 100644 templates/ja/printer-confirm.tmpl create mode 100644 templates/ja/printer-default.tmpl create mode 100644 templates/ja/printer-deleted.tmpl create mode 100644 templates/ja/printer-jobs-header.tmpl create mode 100644 templates/ja/printer-modified.tmpl create mode 100644 templates/ja/printer-purge.tmpl create mode 100644 templates/ja/printer-reject.tmpl create mode 100644 templates/ja/printer-start.tmpl create mode 100644 templates/ja/printer-stop.tmpl create mode 100644 templates/ja/printers-header.tmpl create mode 100644 templates/ja/printers.tmpl create mode 100644 templates/ja/restart.tmpl create mode 100644 templates/ja/samba-export.tmpl create mode 100644 templates/ja/samba-exported.tmpl create mode 100644 templates/ja/search.tmpl create mode 100644 templates/ja/test-page.tmpl create mode 100644 templates/ja/users.tmpl create mode 100644 test/get-printers.test create mode 100755 tools/checkglobals diff --git a/CHANGES.txt b/CHANGES.txt index e820b917e..fc1ac357e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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. diff --git a/CREDITS.txt b/CREDITS.txt index 522774972..585072bb3 100644 --- a/CREDITS.txt +++ b/CREDITS.txt @@ -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". diff --git a/Makedefs.in b/Makedefs.in index c3cdf4bb7..06a2ceb9b 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -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 $" # diff --git a/Makefile b/Makefile index eb98a5dc6..428bf20fe 100644 --- 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 $". # diff --git a/backend/Makefile b/backend/Makefile index 8ec13cf7c..bebaa471d 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -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 $". # diff --git a/backend/ipp.c b/backend/ipp.c index 9db806cb6..9feb672b0 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -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 $". */ diff --git a/backend/parallel.c b/backend/parallel.c index d1a85a0bb..1f559ffaf 100644 --- a/backend/parallel.c +++ b/backend/parallel.c @@ -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 $". */ diff --git a/backend/serial.c b/backend/serial.c index 32aa2f4b8..66a0354cf 100644 --- a/backend/serial.c +++ b/backend/serial.c @@ -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 $". */ diff --git a/backend/socket.c b/backend/socket.c index 713b21337..ab541be60 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -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 $". */ diff --git a/backend/usb-unix.c b/backend/usb-unix.c index 4470e9c65..b5aeb4548 100644 --- a/backend/usb-unix.c +++ b/backend/usb-unix.c @@ -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 $". */ diff --git a/berkeley/Makefile b/berkeley/Makefile index 454f6d657..6f438cda3 100644 --- a/berkeley/Makefile +++ b/berkeley/Makefile @@ -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 $". # diff --git a/cgi-bin/Dependencies b/cgi-bin/Dependencies index 71c7c3869..a1e09d398 100644 --- a/cgi-bin/Dependencies +++ b/cgi-bin/Dependencies @@ -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 diff --git a/cgi-bin/Makefile b/cgi-bin/Makefile index fd218a306..4962215bc 100644 --- a/cgi-bin/Makefile +++ b/cgi-bin/Makefile @@ -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 @@ -25,10 +25,10 @@ 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 $". # diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c index 254c32097..3547ee5fd 100644 --- a/cgi-bin/admin.c +++ b/cgi-bin/admin.c @@ -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 $". */ diff --git a/cgi-bin/classes.c b/cgi-bin/classes.c index fbea24199..abf19ffff 100644 --- a/cgi-bin/classes.c +++ b/cgi-bin/classes.c @@ -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 $". */ diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c index 6a59d5c8b..dbc2ea2a5 100644 --- a/cgi-bin/ipp-var.c +++ b/cgi-bin/ipp-var.c @@ -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 $". */ diff --git a/cgi-bin/jobs.c b/cgi-bin/jobs.c index a73c34f90..ed379b001 100644 --- a/cgi-bin/jobs.c +++ b/cgi-bin/jobs.c @@ -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 $". */ diff --git a/cgi-bin/printers.c b/cgi-bin/printers.c index fc0b65a9e..b745e2336 100644 --- a/cgi-bin/printers.c +++ b/cgi-bin/printers.c @@ -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 $". */ diff --git a/cgi-bin/template.c b/cgi-bin/template.c index dfcd1b85e..774d7fe8f 100644 --- a/cgi-bin/template.c +++ b/cgi-bin/template.c @@ -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. * @@ -34,13 +34,15 @@ */ #include "cgi-private.h" +#include /* * 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 index 000000000..fa4714a8a --- /dev/null +++ b/cgi-bin/testtemplate.c @@ -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 $". + */ diff --git a/conf/Makefile b/conf/Makefile index cf2f88a8a..6949cb3db 100644 --- a/conf/Makefile +++ b/conf/Makefile @@ -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 $". # diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in index e3b73ea7a..426077b1b 100644 --- a/conf/cupsd.conf.in +++ b/conf/cupsd.conf.in @@ -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 # -# 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 $". # diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index 95ba2d9c5..442cd5325 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -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 ],[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 diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4 index 4da730c2a..9a5351779 100644 --- a/config-scripts/cups-defaults.m4 +++ b/config-scripts/cups-defaults.m4 @@ -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$". diff --git a/config-scripts/cups-launchd.m4 b/config-scripts/cups-launchd.m4 index 8e075e9bf..1da73934f 100644 --- a/config-scripts/cups-launchd.m4 +++ b/config-scripts/cups-launchd.m4 @@ -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="" diff --git a/config-scripts/cups-manpages.m4 b/config-scripts/cups-manpages.m4 index 6a887d13d..0c2c25161 100644 --- a/config-scripts/cups-manpages.m4 +++ b/config-scripts/cups-manpages.m4 @@ -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 diff --git a/config-scripts/cups-opsys.m4 b/config-scripts/cups-opsys.m4 index b2b53126d..c5ce0335c 100644 --- a/config-scripts/cups-opsys.m4 +++ b/config-scripts/cups-opsys.m4 @@ -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 diff --git a/config-scripts/cups-sharedlibs.m4 b/config-scripts/cups-sharedlibs.m4 index afaab9cf5..2e52b2436 100644 --- a/config-scripts/cups-sharedlibs.m4 +++ b/config-scripts/cups-sharedlibs.m4 @@ -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 diff --git a/config.h.in b/config.h.in index 032146ea6..b0b5798f7 100644 --- a/config.h.in +++ b/config.h.in @@ -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). * @@ -398,7 +398,6 @@ */ #undef HAVE_MEMBERSHIP_H -#undef HAVE_MEMBERSHIPPRIV_H #undef HAVE_MBR_UID_TO_UUID @@ -420,5 +419,5 @@ #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 $". */ diff --git a/configure.in b/configure.in index 811d48b5f..636edc724 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/cups-config.in b/cups-config.in index fdea47ea2..2f5ea715c 100755 --- a/cups-config.in +++ b/cups-config.in @@ -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 $". # diff --git a/cups/Dependencies b/cups/Dependencies index f4b6f6787..d77ea16ab 100644 --- a/cups/Dependencies +++ b/cups/Dependencies @@ -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 diff --git a/cups/Makefile b/cups/Makefile index e23017bf3..63caff9f0 100644 --- a/cups/Makefile +++ b/cups/Makefile @@ -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 $". # diff --git a/cups/array.c b/cups/array.c index 71d649847..65003b8aa 100644 --- a/cups/array.c +++ b/cups/array.c @@ -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 $". */ diff --git a/cups/attr.c b/cups/attr.c index 36f911d0b..96b89ea05 100644 --- a/cups/attr.c +++ b/cups/attr.c @@ -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 @@ -38,13 +38,6 @@ #include -/* - * 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 $". */ diff --git a/cups/backchannel.c b/cups/backchannel.c index 3cb3a0def..bdc18edba 100644 --- a/cups/backchannel.c +++ b/cups/backchannel.c @@ -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 $". */ diff --git a/cups/cups.h b/cups/cups.h index 6263b82e6..30ddcb17d 100644 --- a/cups/cups.h +++ b/cups/cups.h @@ -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 $". */ diff --git a/cups/dir.c b/cups/dir.c index ac684afee..e06edea91 100644 --- a/cups/dir.c +++ b/cups/dir.c @@ -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))); diff --git a/cups/emit.c b/cups/emit.c index 7fa67dd0f..f914f14d0 100644 --- a/cups/emit.c +++ b/cups/emit.c @@ -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 $". */ diff --git a/cups/encode.c b/cups/encode.c index af16f5481..071b29ea1 100644 --- a/cups/encode.c +++ b/cups/encode.c @@ -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 $". */ diff --git a/cups/getputfile.c b/cups/getputfile.c index da1579fa8..e14094a52 100644 --- a/cups/getputfile.c +++ b/cups/getputfile.c @@ -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 $". */ diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c index 0a77b7ea6..a6f06133e 100644 --- a/cups/http-addrlist.c +++ b/cups/http-addrlist.c @@ -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 $". */ diff --git a/cups/http.c b/cups/http.c index fc6a20d07..251fc3481 100644 --- a/cups/http.c +++ b/cups/http.c @@ -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 $". */ diff --git a/cups/ipp-support.c b/cups/ipp-support.c index 8c1a82daa..9a08e6266 100644 --- a/cups/ipp-support.c +++ b/cups/ipp-support.c @@ -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 $". */ diff --git a/cups/ipp.h b/cups/ipp.h index 4a337a84e..ae8dd61c1 100644 --- a/cups/ipp.h +++ b/cups/ipp.h @@ -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 $". */ diff --git a/cups/language.c b/cups/language.c index 3f8f2a8f9..169c38af9 100644 --- a/cups/language.c +++ b/cups/language.c @@ -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 +#include #ifdef HAVE_LANGINFO_H # include #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 $". */ diff --git a/cups/language.h b/cups/language.h index 1f697cc1d..94f7bf81a 100644 --- a/cups/language.h +++ b/cups/language.h @@ -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 $". */ diff --git a/cups/mark.c b/cups/mark.c index 33202bda9..c901781db 100644 --- a/cups/mark.c +++ b/cups/mark.c @@ -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 $". */ diff --git a/cups/ppd.c b/cups/ppd.c index 672ee27d3..1b0ed6471 100644 --- a/cups/ppd.c +++ b/cups/ppd.c @@ -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). * @@ -34,17 +34,18 @@ * * 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 $". */ diff --git a/cups/ppd.h b/cups/ppd.h index 0ac53fa28..5d944af96 100644 --- a/cups/ppd.h +++ b/cups/ppd.h @@ -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 $". */ diff --git a/cups/util.c b/cups/util.c index b1108effb..2ab772910 100644 --- a/cups/util.c +++ b/cups/util.c @@ -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 $". */ diff --git a/data/Makefile b/data/Makefile index 60383a958..88c344f25 100644 --- a/data/Makefile +++ b/data/Makefile @@ -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 index 000000000..6e68beac5 --- /dev/null +++ b/data/mac-roman.txt @@ -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 diff --git a/doc/Makefile b/doc/Makefile index 3482b78a8..373f5b09c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 # diff --git a/doc/cups.css b/doc/cups.css index fe76ae633..8ffb8e7d1 100644 --- a/doc/cups.css +++ b/doc/cups.css @@ -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; } diff --git a/doc/help/cupsd-conf-reference.html b/doc/help/cupsd-conf-reference.html index 348afa573..a36626aff 100644 --- a/doc/help/cupsd-conf-reference.html +++ b/doc/help/cupsd-conf-reference.html @@ -5,6 +5,22 @@ + +

The /etc/cups/cupsd.conf file contains configuration directives that control how the server functions. Each directive is listed on a line by itself followed diff --git a/doc/index.html.in b/doc/index.html.in index 8864d1a0b..1c32e7ad3 100644 --- a/doc/index.html.in +++ b/doc/index.html.in @@ -3,7 +3,8 @@ Home - CUPS @CUPS_VERSION@ - + + diff --git a/doc/ja/images/accept-jobs.gif b/doc/ja/images/accept-jobs.gif new file mode 100644 index 0000000000000000000000000000000000000000..7ee4db66b3b035b62937d30ddef5a5c396caf1d1 GIT binary patch literal 703 zc-nLKbhEHbtYHvgXc1swn90B}mq&DogvKf@yNz~XTikdhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~Vh~`^ zVE_VXg@J{Khnt&+ zlY@&xo83>VQ#W3lUuTl`)EpHfW*&Y&7T#7<{*|j%@@Vs|;_KvQp2Nk!$!9xPvqw8Y zhmoHpVrInNjC2DVLoar($~vP93>>`L%uH7=YqE2j7qRnJ@`luLamQ+L%v`-n>xuXC zm-?;(XLva;+??@trV;nHFoB8-2_alLn!mONPs~o(9n%)Xs9-ixv9C@beoBIxtBeSH z#DbsRNdZS2**X7hGF|bFL8xJ(c0kV_r3Vg-OboS}C$_v-<(_3$$kvmX)Yf2ECuXsL zm3djWgQDb@o6VOT7Eb%S=4{Hs1dRq^8~HDVuePkdm}|gdFyqix`HPbx1=ij+n{diu zy4Jb^uW9D4O<^gYWs=*rxi*yY&Nx=ED`jrD*Mv25x>_zBRPpI*j(x|S&>*~N=0mla zIXBK|v)p#sW^nh@(J6=Gm)aCGB+OWSTHSMUYU0f&%$IZv&KziEsBqe@b4@K^Pn71G zqU|o8yb0~1GjD0KSUfnrbMq0=8~gK?Pkij@BX&pqkltE}gN-NMKc;!UOjTTK_&)k0O6B1LI3~& literal 0 Hc-jL100001 diff --git a/doc/ja/images/add-class.gif b/doc/ja/images/add-class.gif new file mode 100644 index 0000000000000000000000000000000000000000..aa046eb0e180c0ff209f5f9855688c2968132734 GIT binary patch literal 590 zc-nLKbhEHbOkxmWXc1t@NHxgGwk|DpsjCa>Xpidc&zL?ndHT$X70WudZJ&Se(3*4S z_dmFQ?e(jNA3uNi`~S~>5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6`cY!vq;4{ssVLKDg&jz0f2@cHjEE>;E zs$iR_Rbv`oP~)g3+{45z_rYc2rTa&0z0Ql;G?}V*ZF(!f=I}xPWy6fgOEy(LJd@*Y z;B}m5R+h>7t~j1g^MV}O9OqjVNiBOh`I#7xv{6J;iD1H}v+mJR5+|D;aGY4F=hCpx yXP1dk>~5dcac7&4h+Nx{yu85p(bhM&muB9V=-s`Y=Zcfdj1Rss>m~>=SOWm}GYjhg literal 0 Hc-jL100001 diff --git a/doc/ja/images/add-printer.gif b/doc/ja/images/add-printer.gif new file mode 100644 index 0000000000000000000000000000000000000000..19869c62b5351f8b03193187d14a759cd2aee2eb GIT binary patch literal 634 zc-nLKbhEHb%x4f`Xc1t@NHxgGwk|1hs;voZZH?~k44*J5cly-i1pDc`A3<3-~ z3_t*K3vCT2E6_Q=B4EOgic2-`|JytImAnw-;9n4Asjx+a;}&Ch z32PLa)1%Y~)-pq;$FGD`r25&FXK|^_S<$xWYs2|v$`Muj@2`^3_SE9yjWy)v)lAS} z;p5}xW@O{x&gJA|s>#e{n4wvtZ)K38mEO2qizOpRgK-H1^DMq4O#O@=Yq{4jurW4i z?4MQIv|q(Cs2wwW6b7^vFq+s$zFjnT$p z4K6-rj&R<(!Zxm{Ymdx+8}dWy`+_;U#nozJs!Au^)L@&(U}BVTfN@{b{dFt_2eKNN zMK}ah7^gFxY>1e7|IFS9lfws^OL-Z8G$|%H$~Kyc*mOudZ}AS|{54ZMjOU=cie|Fj zL`@?(9_BkelBEp2NB6KfF{*eNFvN3BFS|3*CGhOigALjd+Y}7mJMI&go7)s}K;di? zV^~RF^piJ^Dsg6!k{eF?Co`~AR9;>AUGT~&CL;wck3B|>Qf;?O0@E0$uIgdnk#JbO z^Z<{GUBjcYDuZ^39_jg#+diC#`o_Z;Vcu_a?U1Ns^@gAqWr|L^lOK9d)($V^x%uh& rg~gLs2<_eVRj$G|_vOXc1t@NHxgGwk|DpsjUraZHw*h44*hTZ~D~amCHM~ZJW3Mz^ZfS z_uspB<;C-RA3nYP^Y8b65`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6_P_qAQYOH?Q>l{{spE3xs7`4lzD#bm5a>oVjVK z!v(&bkF{4lTE)_N?D4@3Wzj57k5VI8D-4+qzZPqdWou!Q^AHH)<Z_r#2Sk1sK(^Ic2))E`^-bcAXxdG(|9= zxS?^wAvqVOf+(fM{`_|PDi%q!%CRMf?c}&nrW$5*Jzz^-gfRnC*c#5*eDXpBR^&lT}qy+1}YUW!mHgi{`Igzh=+A z-6u{Rzjov5qbCo3{QCZ%M4HJanW&8|P&xI4flASLSil zFyi7n==Gt2RpOFCj(gH6k+zu!0&7`WS~L_2GHm2}ww=0QV9rtN!otH`#aP0}%*s)u z!N?!w)T_s9l4h8qq|d~}JdY=Xor6n{k&ktWMl0LmvU2{aY(B0f%-o#O+#49OCmXIm zP@%=Qo{xu{YoazETLIg?;7+61JZ|+XMt1t;e7rn&xi}wraG%-38_3DGor9m_RNv-3 zH@K=azq!?DF){wqeMGwB4b8uP1`IYLt1Ax`F6Q`D7=!Io%ETD zc}k!FlL3R_C5?O$Sq|+F>>G z5=)fY0^E2UqGs1`3Y#yIb4bByVYS+-7mIqF44oEFaMOCZB-JPD<|_vOXc1swU}TVz64%w&_4aX%Pl(IT&8n=fXzOU5GHvprB@5SWSi5K6 z?h~huU%z?n>GLPQ|Ni<RgnXSdyBeP@Y+mp%9Xhs^ISF8^ECWlZBCsL4ZMr z0SG{jVPO5Ipwf3ifFWbmx}4Yh3Utn!$nvDv%`1KX|A2zQ0%6`PjwXYn8Wt?t2bskZ zbk;k{y!>HgvV-@~cdrDVDJvWvJdh9(unB#@D0(cBSIT^u=usAKelI4za%29E&WoUN$Bcwl*V5M%Km|5t?yYOpI&vIJtTIxu<9*>oIL%HC$lM zR;|JBzSPh~z>tr#EnBOr(};^xo0-3FFT*-b4mOq?1CA>U%m_)A^Ip|LnVdcBFA6mznXNLHC=vKqe9Qr+`8a`gZHd{H8G`i01r50e%!9PH0Wy59{AeNtTXqPy$uvZbF7 z9Qc0i>d(iIf4zP8@9(ewBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9f(#j}*5$n3SHQ!@N z?HAJ)YbF&qaMX0RnSN_v6}!KQk3CpNqQ4@UG1ic8J)_LRQ!B49v2s+@hh-T#2pDp5 zvL_mFav8I7*3@z(YjB1z#&Ga+^YItBwKB9DsaiAhTh7&D;^Zsf*=oqd&&e=<0e|#v zzIaVW|K*1b)m-LrF6LRZR)co|U(K4CdfdF~>yI(8^0#QN$<*Z9rC+DFsF;g~o1K-Z zu5=;;_jA2;{_7f9-*x(T89sjQJVQ-OpUZ+lL0_JUosXj|Tkycao$A~N6dx5b+~Q_` z7$TD)&feS29v^BYYapTJF2h!OM&N;?jtV#HqzHwC1qZm7q!)73p4xI?Qje6akcZDh zjZxRw0%`sO9T5p;T$Y}quIO?hNni&zL?ndHT$X6-(Q9?OJ^75`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E8yW^$?RXg=6y{+m-)nl&#eTaJHj4pO_9tweC^T4 z1O~P%$5($8QjrRAGrH=MdGgsBtJhV1ajy?DEwI(O{^QDlhXEQ)tUO$r7183R+V2EqKi9Q>XMyyZNtyEQm@ zyg6btn8U((cp{dw^Vhdb>r|g_plZ#0ZdHnJI%6vDqPm$HbxhpcTNzmSl1tVYs%;F3 zNeJQ7V&vs4$w>2Ne64Br*W*EhBa^qc*u}q`G)Cn&oqXu5+WHw z3^UiZr!2G3HfX)uXvZ{zF?-|j#(lCTUDHZFENEcTVq(%Mm|)6tQ;UmV@$k>Z2N+r7 zq$OM&rY~nUsOHwG4RqF-8ns9$V_|0IvGvzAvK4=%m*+&eos+TbD3-sOnjZY{r=k>kbLuWhg>}i(&n5(?)!(-hzR!K(wou3;_ J^I8}ftO3p{2}=L~ literal 0 Hc-jL100001 diff --git a/doc/ja/images/continue.gif b/doc/ja/images/continue.gif new file mode 100644 index 0000000000000000000000000000000000000000..540aabf3b067e9c782928ffd067ed276e3cac13c GIT binary patch literal 469 zc-nLKbhEHbv}O=tXc1t@NHxgKwk|DksjCfYYme{l4DX+qHGOLG^jVcFmbP!-Ht)c} z)o0J`ef049hfi<+{QLc%M4&yjgx{kTRu9QEr>m6_?v6RW3~eh7FvulDohI!gcur2 zBN!fSd%&nAZe&$-AZbB@S91(E`)F57TuFA(Uum2Cg@cj78UXML#`ORI literal 0 Hc-jL100001 diff --git a/doc/ja/images/delete-class.gif b/doc/ja/images/delete-class.gif new file mode 100644 index 0000000000000000000000000000000000000000..a9307dbb447ffa44df7054891c72a9660ae33f59 GIT binary patch literal 579 zc-nLKbhEHbOkxmWXc1swU}TV#64TSy_3?E{Oiswn&#A7h>g?{AK6Bc#6-zg4TEBPy zo|C6fT)T1g(UXV2|Ni<RgnXSdyBeP@Y+mp%9Xhs^ISF8^ECWlZBCsL4ZMr z0SG{jVPO5Ipwf3ifFWbmx}4Yh3Un49bh!7}@_o(w!;Et>K4?pYvrX$$RoIuK^1SW%-yWP!^g3=KT_ zUP?whsT$1u2a*;xp(nQTWKUS^E?q>9knb9y&^CokKfy9SHpBK!SDZ-bu_92^>(013;SN3pND2uv_ zu}s+LaG}@R!Ifc!(<+02Gk5n*kLGxIE2ULxv4rB}6&qB9Cd?LL=i6{`W>CsD6S0dL zH?s z5*8WeGsPPpTt8e>pRc-L^9w0Q4kMliQzx!T<1Xi(rQ5ZgkD+*ls nmiw#3_44xag*_X(ca;iWH8FVj6I(^EbB@5TCU$cAf z&XcE4T)lqf@zaOD|Ni<RgnXSdyBeP@Y+mp%9Xhs^ISF8^ECWlZBCsL4ZMr z0SG{jVPO5Ipwf3ifFWbmx}4Yh3UtnA7)m$Krmp%r0h@T4+>T+SCOdPpTBBfzBW5wm_8@3roRSL zDHkULGk3oR4<92xE4Kz;wuUDsHzPMYbBlqM&z#29noP;81|Bu5O!@LWG`Z3zr1LWe zc^2gGbMbL>^YN7XDcN)7t(m9G*~;E9zuqv&7VF+7^uu2|_(VdQ2h( z4_+T_oXNs3v*0oNfwR_X?o~ksml@P6bCNWQCbni?74P|1>wKW$3{#(W$}EY~r9mn_ z)}`M*sZ7>hqr$sxr_Ph4M#CL`CR}ccYL1LYG}(F-V`exiHqR*4y1)`7BezgX!q$RK z#etbMx%!H6%wtCLs3~H*1tvzF6uhvbc(=^L-P`l;hSqV**RisvK047Ed@|5_XYmE6 Swvfz!dv@_iJ3BEjSOWmPV+bJt literal 0 Hc-jL100001 diff --git a/doc/ja/images/edit-configuration-file.gif b/doc/ja/images/edit-configuration-file.gif new file mode 100644 index 0000000000000000000000000000000000000000..8b8a879153688187e0a2219b27a3528d2700930d GIT binary patch literal 773 zc-nLKbhEHb>|_vOXc1t@NHxgLvMMchZfcI~?hNnk&zL?ndHT$X6-(Qia}A3nYR`~S~>5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6_P_qAQSMH?Q>l{{spE3xp+GRxuZyjNxTyZ1C#h zvSDm`eR_iRHi>?AW&;lUI9~D6tzt?7>kfHO$Y_x)5LN0mn7xvNFNljXG*>G|S-*~- znVTVumChp04%zS*@+>ER|{TkeSeT-8XW=-cW(zDjjX5{GSXX>5M z9-1DiQyQ!jsK01g@RkX>OiRKJGje+|H1c}!SDxocn11(yk^y%jZ*4&tZ&1?ogr}=C z9`q#ZvR=|TcUYT~C#X7zXG8ni5J|UbhmLAECO0r?PlNu$e{ zG3MGV&IbpYO*unkUo3XGHq$^Pw5R2_vu*=R^@Cq`r!88v&NrLWYUc@kSCb9B2V#6C zI5;qGsGZ9g;4q`H+2Gl^iaB2wsPi1tZhQFl@B#)GwuD)2Qok5VyIFH%OX8k39N)R* zs+@s#!a8Z@{fpA%Tbh_eXRz+wd0vs>Fu!)xM%Id~cj0HU4P|1rJ$4-S?r-!L_EC?s8$m7Hsm__)`RMS@xI$%7Y<`yDPhG>JQkWj^We>~VN9 g(Z}qk^CZh7FP=;Z{uFV9!#r?h>SS{fK_&)k06W7~`v3p{ literal 0 Hc-jL100001 diff --git a/doc/ja/images/export-samba.gif b/doc/ja/images/export-samba.gif new file mode 100644 index 0000000000000000000000000000000000000000..a839670d03a03016258caae94460002ed257be48 GIT binary patch literal 939 zc-nLKbhEHbyvQKJ&?3N)k!p~WZCzU8Qdbw$+8*EC8Q#~QIelvKw3!tvmv`;lx#+@$ z19$ISe);15hfnYR{QLc%M4E~t{#mnUW6|^>xn)z0b_adzFDdtbMx? zR~!TPGp#v4wYYg2X7TbQEp%9*(5TPKFYw^>^8QJ^ssaUjK7DI-ZD7q0(qIrhJM~zw zR!OU~p~4BK45@$e79JlO92c;Ckux~W!SK*aq{Cy{nrUgXxLCP3)^#f$VDw_Rq9x?~ zE9r)DqmkDgjtLW#y0Ue|9D^Sy%$>^S9_bY{{duEB!G<871ce227#VjfsJa{|%#HTo zU2y8aueXj97+7>>ttxxbD`I9VS;V!qi&0lnEw7+7YpW{*+j9nMJrGX`Hv&!Zh{^n0;Oi!^4sDa@_H_~zSP?klN^%#1OT;)m1R1)l^dymf89ka@1~7+=g5l>>8_ zSzZ)93}w5pG;wl;=8{Ocb0?PGP}6;3#KSb7lZ9`xwo`Ctx?@@qGrv)S8fPHK)rCz~ z9ZNVH7|%r9WMbq_S^3DJfn^Gl_g@>%19|mK4le?PBd1*KaSu~HqrI|W@| zZBIn|I*g z>Wdc+JbZBd!>4zD{{8+>B2fG%>RgnXSdyBeP@Y+mp%9Xhs^ISF8^ECWlZBCsL4ZMr z0SG{jVPJixpwbth$dIvWUC!%uPLAgu|GZbRj%!QBivtfDJ|xJd?SF9g0oN8D7T4Dn zLEBh*f;WDBQMLP0xbE}j|QbTFq!2?qZxcGUPdHA_=HJSKX zDm589bh^sS)y!MlH5z%%G+d%IdARkt_$Gu~a3*SU@bmf1DKKtBFe7KXdDPOfL<;asM{%g24*!RVgWD@&%Q rbpmJJek%<9{wqn@^Y?#^6939U`y5Eb4cvO)8qPy$e(xspF z@B4oB>dz-ne!YG7@89qLBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9iYyMR*5$n3SDSb2CSZupXD^I_kftiOrG+D)n znVa9AIW)?If9kZUJlcHIczL+F;!C4i7TE{cE~(RE=c(1VG1Oq>@Sf~rRG`f{Q;WHr zXPf5q!&8^>C#}?7c~HkyU?VTrI!$Iy?IS1k=IgNX^YU?Asolx2Waks@Cyd9R8uD{4 zG*;cn!N(hw{XKB>sC`^q8P}s)?EL-V>XEf`llhvUNbA153iA6O*;;AHKQy s>G_4}lMRIT?kZJCSr&i)TD=(>^8KTUDl81v09X_o;s5{u literal 0 Hc-jL100001 diff --git a/doc/ja/images/manage-classes.gif b/doc/ja/images/manage-classes.gif new file mode 100644 index 0000000000000000000000000000000000000000..06436731ebca76b8dbc2eb3658342e3650472f74 GIT binary patch literal 583 zc-nLKbhEHbOkxmWXc1t@NHxgLvMMchsjCZWYm4jd44*zVdGgf46-(Q5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6`c&;$fYB4a>_%u z7FnsIR}D`KsYvy+GcS~~IFwZKgCSt|;dL)Pwk4QFzCZ4DF~i~LqjOs$L)e7RFtc-*)aGBY-5 z&8gIP6fk7$(q!jnK2XVLrM+>nrnfssL{C{|mgd3P_vf*?a-Y|%iPGWVTfU_94Fm6b zu5RBsQx8pLXyCawS6?km%3$%s2jVcTKH{#O zp{Ey_bID7Vc>?bmKMm`t4fov4c>^1(MO}}ocIr=&T;kZrz~Ce%tdfxuF!Ow#a;QR; zgI|QZ z{o}0`#}?=XwQeY5v^d(imP^_wN-b3|p-|*-uEnFmS57SVX3a>KNq9a(_epoLQMcUR pW*5;*D}pyqFn+Y<)%C@Z_jmB@Hseona%0$XR=R^%Mv;NR8UXUP`)L3G literal 0 Hc-jL100001 diff --git a/doc/ja/images/manage-jobs.gif b/doc/ja/images/manage-jobs.gif new file mode 100644 index 0000000000000000000000000000000000000000..80545288ed07ed53ac519b369dd4ec838fb8ec17 GIT binary patch literal 578 zc-nLKbhEHbOkxmWXc1t@NHxgGvMMchsjCZWYme*h44*zVdGgeP6-(Q;Y?-zHz^b$7 z_TIaD<>ia}A3nYN`~S~>5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6`c&O(oUp7`o_~4Pg9dx4vK^M^+jnnMHe}}EPh;U_wyP}& z(PZJ{6V&%4o=_rjJ(n_D$g zHMpjS?p}CuAwy~5<9GUMDI6Jxvm2XT^vfy>1ztB!WZ;{UaH*Y3k%5uxaA+}OZaV{8 zK$y-8=H|&RBCnS-$P`4ZmeZP~Rpxu!)xf(eiBI6m|nQ<-gAJJ?Zla9XGQDs*ByO*NYnJVw#yMypUPv5QRQn-J(5_l>G^qkj}k`T kT_)TP%5Jmc{z`uBJ-H_NbA(!oi^I(wjW-SmGBH>K04c2dHvj+t literal 0 Hc-jL100001 diff --git a/doc/ja/images/manage-printers.gif b/doc/ja/images/manage-printers.gif new file mode 100644 index 0000000000000000000000000000000000000000..65e824a58bfff1506b9c6e68cfbf33b0fed8d7e2 GIT binary patch literal 631 zc-nLKbhEHb%x4f`Xc1t@NHxgGvMMQduB#1dZHw#f44*hDZ~D~a6-(Q1pDc`A3<3-~ z3_t*K3vCT2E6_Q=B4EOgic2-`|JytImAv5P;9oFldcp!G?xRAb z2Sj5V#S$k}NQO1W_8d5|i>33}*!sRY>(ouIit8N5<|j^Wlp;%%3$*W$%2z$S9h|qEXQh=-Mo75UVQD!6l_AvYjh) z_M_e__WI8vI2;5rUvjbXNeQq{P-tA1W{_{?d~(sHX4b+Ux5}n>uV+lXOlQJ&j~a<9azM%7KlU{bbUD#LW_oVJsEl5*ZH;WOe8B9uYe9 z+yA+Hcvs?`2@}29=CE^#UH(uqy)Ea^tB57l><6DtVw^cs%W#4Aj_sQ+{^E!~w`V7p pQ1~40`S+U7cf7c=IXgU2w*CFv2d&=HModXRK0D;_a56Gj0|1@I8T0@E literal 0 Hc-jL100001 diff --git a/doc/ja/images/manage-server.gif b/doc/ja/images/manage-server.gif new file mode 100644 index 0000000000000000000000000000000000000000..2b2d235f846aeecd691fd0b2f428e6da445b8896 GIT binary patch literal 569 zc-nLKbhEHbOkxmWXc1t@NHxgGwk|DpsjCZWYm4pf4DanrpFTBt`pohb%Q|-KSa9at z-g|eiynK28!>4zD|Nr?RgnXSdyBeP@Y+mp%9Xhs^ISF8^ECWlZBCsL4ZMr z0SG{jVPO5Ipwbth$dIvWUC!%$1v-nJ9Pd50d|&haFw>kD8@T_(FuE>Up0I$4`)FY4 z4#D`Aqn{Vfwv*;8@LG^zBiECf^}xdZ%)53*f%WrauLkm5yur6elQD*ZaFMSp+bzyrbUs`arF6SdN>c zM@$We$CgFYceAO_6R??4<{v#LLE{R?Vs;PLneu#w%MuP~zl4Ftsz(}K z)hYkhXlZ|#!NbUX=UNY=cQ}+|MBS=sS|cg+PV3;jj~0x coUOzc-eXIGKO3l}9C5h1A@+)Z5EFwn0NgbGH~;_u literal 0 Hc-jL100001 diff --git a/doc/ja/images/modify-class.gif b/doc/ja/images/modify-class.gif new file mode 100644 index 0000000000000000000000000000000000000000..38d40a7aeca62285615c665a1ce43f34470093bd GIT binary patch literal 617 zc-nLKbhEHbOkxmWXc1t@NHxgGwk|DpZfc6??hNni&zwFrdHT$X6-(Q1pDc`A3<3-~ z3_t*K3vCT2E6`cYvw?Z{uf`ai^`r9>oN4+8>T76+x~cV1n(DaZbnufZq1S`4Syzn zD~3pIOGD-ouCxhmTI`%09JBe^wV3#tSX2AC7xpu5Q9-S_QB{mfjw9;h0}qB8O}C2y4-PC?uY70&Hn zrH-ypFYs|H<~i45YT@|Sv#Fd>L}o?%vj;jZo-qNZmw$HL*uf)nlaKKa2c(#7aUJd~v?QSOSnspWr6cUcuFfq5pa(r{N+r-5Z5PZDpg}WAMnRB8d@{;HCIb9Jfu?-Jc zRCan>C}hECnC21pDc`A3<3-~ z3_t*K3vCT2E6_Q=B4EOgic2-`|JytImAv5P;9nrrk--}0e~mG` z#5KId@lk37YndU_<5NN^QvK|UXDX@RUa_TSUYW1E!LFLsNo($Da`Cblar0^>Xt40{ zadR`W@o;Nam1u-B@h7BcTN%t@NUvY4#gdUTJ%zc1Z$>Yp$8_!-#tDr4+nHj+rgfJ$V`DscsIwHlR-t9%C>)p;bCBpw_%pj6F&B(O^80Haoy zsfb0wf`$viy@g+nOx*l!Ll1xc>l<4$S28_db}BfgS@A$2uvz%tI+X|F4vmbBMGsaQ z>^L&RVW|O6NVFmYt`jZZ?9~`tT z=X>PmJv)ujOW&H8!=vQQL1hLuF&l?eh4p%-3)UF!l0Mwl)4}y`n*nnr>(< zEa~>RQqu5Y*~=6OfqzfM<=#9v++FUt=+uwTFBSw zeB|z(%P(Kt|M2PUpZ~xAlL!?5i8>dhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~Vh~`^ zVE_Vg@$kK1c)$61c0MH3h}IW)F*=sOBH@N!ydGT+eLcG`e@H3yGdwk8XY z#>&$yq31NVvGXi@p{u%Qp2>pGYGE5h|Fxxh9b|KD3T3=-Rms4E(IV`;9pepih3nkH zMl4S_Hym(O7w3E&>9P3p0S^ZDA6APb8ctkfbm8mSvPZ0NG1JUDH8D+_oMs;rXOnxt zoM50StCc6gWA(uGrCaj0HHr#bQ)V2PtRHl4_sj%VCYJT57(Jw(PG#^ETk4tZEF9v_ zJUgkQc%s%pMV2E5vyvS@>UT424OqK(`lA*V#tF;hDk~mD`B^(GI`W}ALI2Pi?H`tt zE-qmIWaI;0|06~89e|1 literal 0 Hc-jL100001 diff --git a/doc/ja/images/move-jobs.gif b/doc/ja/images/move-jobs.gif new file mode 100644 index 0000000000000000000000000000000000000000..e381fe47553c2da7aaac60e376db6a430da91029 GIT binary patch literal 861 zc-nLKbhEHboW>x+&?3N)k!p~WZCzU8Qdb+)-X7c6pE-SM^7L61E0=X_-8%Qc!PRHZ z?zwmO%F7q`KYV)o=il%DBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3MzdQ6d5vBt;>16uR!N~i7q$W%KqhV{~uUTutMmK3)@U5$Jc_l7aDj4VB-ZthgpZP|Pa zsu)=K__%koZqa6rpUT2pZ?@oai`J22Cr)Vuu43lpt>IJWzQVtZ&(LOFGaoO{+vDD@ z+?9tPXntAB^^9c#1Jkj%m0ls*u97UNe{#DQ2KX?0Gjj6q1PC1162;kN>BQ>LD9iA~ z;cezuCZVJKr~k3=-g>&ehk-4c$FSp&1}h`mZ7Gd{rX&Wh?x!#I2pS7J_==cs7nSg6 zm}9WuvWKMfi$yIxvzuqEv0&h7WGK22rLp45BF3B1x7E@z6DBc6H*2q0r_6mohigmc zib>iV@_8p4IeI>fJbL-)A_i8uRT3W*bhucW=PfF@AaJx>>uf>VoUc3@r^J@4a4g6=^T5_vMudZ5=FxXkS}N=`<~+LBcv<7vj)Y~Yt|u}L zrrDYH#qi7w;ulzOGB2bsp#R7`nIGSJ-5N~JiH7)1I3RuMvEkA+ynmCnIG%_K-cUZD zX`f`lsx=b>-8wdy@yfB=92RCS)bmi8$zNeI!GUqPgv&WS29XC-L~0m~r9}!iIy5lJ zZE_Hl2+TMk%cZ_Ti9zf49}`zyxxi^WJQimTh_*TNI6PAL;(73Ziq3=?49(M6w;r-y zcA|iFqN0*RKXb|3&kf8=IVLTbvfAOn6QQY$f(ID-b||$t{gf0@>(Fg!Y+%~IwBZ1w zZNL_3gOaTZOq2Y-ynH^t;gONkf)=r?7s5p{t6nVX*>r$QsMk$Pb3y;41J9StNITUe T=zgMb<+25OU55n~85pbqcA9I2 literal 0 Hc-jL100001 diff --git a/doc/ja/images/print-test-page.gif b/doc/ja/images/print-test-page.gif new file mode 100644 index 0000000000000000000000000000000000000000..88995e50579dad3d72c3c0e5a99c3a0944dbf50a GIT binary patch literal 688 zc-nLKbhEHb>|_vOXc1t@NHxgGwk|DksjmxeYme*h44*zVdGgf46-(Q1pDc`A3<3-~ z3_t*K3vCT2E6_P_qAQYOH?Q>l{{spE3xp+GwlZ!K3t$!LxaUw1 zpi}2HO|iVjbnZs|*B8BQgzQ-!GjNz(c{4@fVug*w#VfTF6K?<4V5)D>NYRZ}Hf(Ou zVd0(0z%r4Wn~|L-yj8o6p^b6P+Kn5utrNAAG&ndpIM~w) zR~vEg<)lsV*%`lsiEk;(I_}ENYu0tAT-SFIFksw~pmXN#yxDKoeSaGogjT{tZ_j3JHZ>EUCR$97AY+b_0w z@Ictcqj2RlfdD-pQBTf2nn!LvaX4C1k?hG*v3aTjLtxCR9fpr%b}iv{;g^tnvz~{Q zPpBjAc!T4s%iZeA3nYN^Y8b65`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6_Q=B4EOgic2-`|JytImAv5P;9u}bJYpT+jzz0a zD)9*EAJ*E?Ehuqin!?2j8wrl-H`n;CJ=;*eiB1aj$yyxz%o-egJ7#ov zw(iw)60q-CoTtOc-Ne9Ivtq)60~+UiIWEU*dStS!$ViK{c2yDt4mG@Q`NDbE=t8*JX%*euJyt1_$H`)IQoqs$zp3Vxr> z>5Oa(Iv2m>o!_MWn(wSZL*Ig~VgnYP3Wo=&ysZ3kt1=3jQfILIWJtKekGORqd_xXH!JC&iLGE#bf(5uNN+1`7l_7qIJm)acc0X1K=wC5EA9mNz4_ zF?WUP;Y^1EimCikj0OhAvf^$mJTbu@LI<=M>jGA7P&~YlY40JSIX_t*+)_ECy(ny| zU;`ub##`4c8m0uCcRjE2*UPW4+2pwxgS^HLTjz$b3;GqzA9gQ_)@S|5up?P>YAeT7 zZ#IT>uf4wttgmg(Uhn60>f8GV=~pBl+V1)Jnc>*uhQ57!Cnq|)$&~otZ|_x9WMHrc E0NZ>U0ssI2 literal 0 Hc-jL100001 diff --git a/doc/ja/images/reject-jobs.gif b/doc/ja/images/reject-jobs.gif new file mode 100644 index 0000000000000000000000000000000000000000..ed1ac6b6a68db5e143c9087816526a21b5aa3899 GIT binary patch literal 578 zc-nLKbhEHbOkxmWXc1sI%fN7+k>jG2d(iIe!qMF@Bg3wBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9iYyMR*5$n3SDt+&;^)}(^IO6x!!}ec8Ekk2Vy?&yy5i>Wx z4|7ngacez~HeUlT4>wn^CM!Sl{5X&J`PF&4R)!jk>`VNNRxqS$Gc%=5tZOu4oz7fk zC3}34zN8I-lM`KX7J!zs^E(3mTSC8J6A23T*M=FsA5Oo?4}rQ2fm7e zp8olw`pj0nS3|rRS^4(0CLdRFXk?jwVCN3y>{o~N_&c|4Fm!fgPT;Fl`*>{S((U$< z!At@Q8Itll_47%7oD{pz%(x0mgH zvgh3EbN4>oefIUm?|;AklL!?5i8>dhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~Vh~`^ zVE_VHmSBx`m>F6IJ_Mev=xZ(bZcg`Y>8uaS?3o10mii!HW@pNXTHF_u4;X{lz8ww0kfoBM_hIvY56wV9dN zd3Uf)>6yzP%{aAwih+~BW?s&mWi3-%jkvjVSonGQ*){huFwH!9oQtVGj)8?+ldF}5 z&q#H1z(EflzObC@ZhhK(9KWt6T;DEoM}UE;V1b{W1Fwurq4MD)Jd7PoIt3p%+w66J zPtb{&e)N*+^@iD{wH5+|7R8F+CYH_c9 z^GvQ5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6_Q=B4EOgic2-`|JytIrBtwnFtRdrq$tR++`4Eg z%fZ)mH2;FpgRb>1j~O^j1RmcDDNPVKVfyj$!;rJ@e^_?y3z+cPw31)5IabAxnTJ1x zg*V2wshCHLg^!P$n=v;^Bb%XhZngG;R>lSMS1i}IG6?1fp0{wVPLd|mbVin?+}_m_ zmn?3X+q6>ONnkB6m$fD{XW0?M8Je6t?irdalNa4tao7F8ohYuO`l@UFd9xXLUTJPz zrL(MnA(J8U{lj~|8y+sZ+x%#yf#Ty+yIJ|mOI_yOK|9$_M`OxHZPd$dFf zvjp?cnu+lFZ5Q|`zWMd_4Y4xLV!OBH-cUJk=ib@sw&{2FHgku6w03{}@Py%cIi;qA NPtWagcsLmutO0MI6=eVb literal 0 Hc-jL100001 diff --git a/doc/ja/images/save-changes.gif b/doc/ja/images/save-changes.gif new file mode 100644 index 0000000000000000000000000000000000000000..2637b495fad31481cafe7b0a6e8dc64d3ec953db GIT binary patch literal 592 zc-nLKbhEHb3}p~uXc1t@NHxgGwk|DpsjUra??~+K4DX+qHGOLGw3+407PqWhJ8{pR zWoORre*Ea>hmUXn{{QozM4dzP5!vGe1kMW__LpH+M=fGcy6Ev3knA(n|inHXW^GHi8|ykU%~z4 zCJ(L+42;M0xVMHKS@eQgfQz|>k2Pe$tE=P#Ygo)(F=b}TK5>Uy_^ ysZqjmLH!fKv%5^Qg~DS_&#OJo_4fAmk9RzJcboG>IlA5X>{}DoE3L@DU=09oX8zp( literal 0 Hc-jL100001 diff --git a/doc/ja/images/search.gif b/doc/ja/images/search.gif new file mode 100644 index 0000000000000000000000000000000000000000..c03e1f55fe0a79049c86e1bd1031de1c781ec3a9 GIT binary patch literal 394 zc-nLKbhEHb)MF4~Xc1t@NHxgGvMMQduCDfPYm4jd4DX+qGkt3Eie(*Jx6V0maP^7P zyKY=L`t0fL4LV0FMhC)b2s)DX3feW_6@un|sznj%7@ZQ-oO8 zO1f`bVYDEDL#k6F;iJavv)s4OxYb$6^t{;4xnj|>(v99F#tL#=oay|Wj?L}nsxD3S z9SmN~%siaTj%JVtaHG%kkxmOx$+-jF*_0&Gk>!^EzK_V3>Zl{~_P%ZQ2Igm$7M2WK2j3 zX5u`NC9rb)_8Y$}Ykn~>PI3_1kkGBI%pn!iVc@o}b^D)}5(_z#dd01r7#OSpBF?Rr literal 0 Hc-jL100001 diff --git a/doc/ja/images/set-allowed-users.gif b/doc/ja/images/set-allowed-users.gif new file mode 100644 index 0000000000000000000000000000000000000000..891c1239e5a5c2f17d2473c27a541c7cf117819b GIT binary patch literal 782 zc-nLKbhEHboW>x+&?3N)k!p~WZCzU8Qdbw$-X7iCmp*-J^0XP{E0(oy-8%Qc!PV!^ z?Ynp9(#se3KYV)o_y6zzBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9iVPX6*5$n3SDPHCwO+HbbqWc2P+7B=n~{Ze0Xq*j2WO@hGY4x)m`@D*gc@e9#vVRCZf-`_#hQ7n zS^Ny_-g(FLZS;M;xp-?BXXzfAn##w^b8Tm!4l5t4-m$e246G9v_?a&>?bv;pk-O2K zvF6ko)K_y|rQJF?# z2C*rb4G9T~>CgX(>{Mi4%+ecqlv$70Z1G64|2rX*hXmu9p zdMC2VY-^)P%g->DP^Vzw>&qGToOR|opy(cw96p8TQyD{mD6ij&+DQ()!s*MpYAB1JIKI=XLVz?7*mPjhP2fAcD|dJvMFv+a%^I>4PNng+td~B&uCq#Vyt04wq+N-x0(TnDF$m0%?t1C&*)i4Sm6H0VywJpMNs)+S4L(gT^a?EA{}a8lNR<7?UW=5- z1l?7FH$McHp4#F*CxBn4B!Jx@b;;rd3|TV^IhhOBPG~OHsA!udtji+cnxJ_kti7sY zi$HX%%({ce$~E?|H!$#SDUvn2%CoJB!%QsjQJ)P{;C1uDry0)n|Gs2Andrgf*d*a; n_VUT(1f8Exri8qcc*^G#w({w;kFpDy!(!Sb)%e_77#OSp!Ua+6 literal 0 Hc-jL100001 diff --git a/doc/ja/images/set-as-default.gif b/doc/ja/images/set-as-default.gif new file mode 100644 index 0000000000000000000000000000000000000000..14834a7450d4040794dcb9144c16e9a5dc9977be GIT binary patch literal 653 zc-nLKbhEHbtYHvgXc1t@NHxgGvMMccsjUrcZHw#f44*V5fBMwqmCL(!?p%26#MWz< zkKDg^<>ia}A3nYN`~S~>5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6_P_q9BrDH?Q>l{{sr%3xs8>7+VTBB@AlWZYq}7 zu!gm@DmCufw8w$z%|{`fDeI3uKFA<&EhRkJO!nx5AFfJV2Oi(nWvS6lQ!mtO*J0!L zYhvTzh|#EH;jU$13$L54Z*7mytiPQ)jIf=QM__0zS~p4!E+ z>or{j3>fz>%-pqIa|Od<{-lGN{G5I|XPKFq7H{F@;P>L?=bgnfJLi&yYVz}fu+@j& zZrgrgdhB_=9F7IN*NmCD_B0roy^P}#J{qDk;prP!CU$1eM(4Iiy$eO6!)!Pb4#+I< zJT9_srgGldJ$k&KcF1sPu5o8hH4s}E*?8b!ljDYG6FCVEJqxBLySqyTo zeEzI*?@Y-3Ny{oc92^5hm}ESXQuxvxUDTOwm|~V}qAwJ; zDsszo1PX||#%+Gwl2voD;d}!N&!@FNcYT&__KB64@jLACv7Y=%Q7Y@Ebr~NByx+oR zA#8N_P>9n^+7{Q{89s4x-t?)-E0=d}+cx*W!PV!^ z@4tWV%F7q`KYV)k=il%DBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd8iVPX6*5$n3SDYK3WXRT**jX=F2$6l&&AnKDg-xxLzA&bnkiK5lMCHXd%x6)d~_ z*&M!TE=>Kvx?h`Dq=P9y?ed0t#!w!YXUn8D zTxW=JWHmf+T3C5J3c)VdkDj$GhWIL38dLM=~ah1q1uK(-W3D+33G%%%#RCM6F8kz+TK znZ7Yx(R`T`Rkc_~LiPc}Q7`vK7Ev?NLb>hY!l@@xH=fZ-naFa0QDDJ?#^z2{?u%1( zKC^1G&kXHwVRdGBCc^8-Qfpl0=cV~WE+vh3>D}hp>2}W?c71a_$L1V6y)1o=%7=On z=@Z?B`XYsmoNPZ>R?WVtl2Yly`gGCCI6g_1BD)_qn?4k?aE0m3uv@;FkujS|!J?iqcFLhd48I>ecj|%TIWH=+rBl9VY*Xl&WG$x*HAC4;= zf3nc8LrdaW(!AR;HsC) M+}~Vq=3uY}06IW#DgXcg literal 0 Hc-jL100001 diff --git a/doc/ja/images/show-active.gif b/doc/ja/images/show-active.gif new file mode 100644 index 0000000000000000000000000000000000000000..156f79db3a63b4ad8d44d627f952ed7bdd9e90df GIT binary patch literal 858 zc-nLKbhEHb+`u5h&?3N)k!p~WZCzU8Qdbw$(H_&+pD}%E^7L61tCn|d+d6mufmP?u z?YnpP%8M8GK7M-l_y6zzBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9iVPX6*5$n3SD@v^%pGT)8XbR)?PNxuxQ=9)f!BUDUFOA968K9 z{Pirnv&}Z~Z_(hJ&&Shvgn{E2KbKZcrIuZ$Ci83-zAIWR>mICms=H68XtHK7A0Ibo z3_l;|nmySsH|V^+%{=)!cZy=R&~qsU6@d(s7oYk3H;b^Ec_-gk?~krt<0tHo8*SSk(#HO^w-mWc^UP;WgOprW4^ z!<=*G3?r|e?W{`&e5R~=#-QMPdCJ`_j4f)mE4E*L);Yt}P_QO3sjVTiD}?X1)B0Il zY)@{;1Z)#=Z8Fjl;i*yBI&HDLlSIJ77hG&PVmp`GObBjx%DIO(SZ2XmQ3sc+ zE=>30HrkkdSa)@f>3N~E$_%0BBDK23+gBxt_pC0>|0sDNXC+IWs)N?K$G_fwHas+A zUDCd<7N0A(H)Z}=`jm;0tLMPIvLo%Pxl(+FWHj+K}WF2-K!f(2z9g3u`k6 zt6k#rxfRbWS)4duzI;Bvf$bC%X8}jni-jGJ3{G*hs=a!#xL@y-^V|txSt|u<)D)ef Qrx+&?3N)k!p~WZCzU8Qdbw$-X7E2pD}%E^0b-dE0=X_-8yIA{*`CX z?zwmO%8TdsK74xn=il%DBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9iVPX6*5$n3SD9yj<7>fa#!!bw z1vUu|_C(VHm&DfV=B8ztP3GZElTG)>iD=V4{nU}R$A zley-Q(@b%@=ya?+K4LKNo8%)9!`* zUCXaAaKzuZalQJKCNuM!H_RInqU4Nz8*CI}O!jFo)n&VL@bjuO;*9N4DhUFt0bEQx zBBmWjT79{iv;Kvx)cEk=+-yc$wc3?SGL|{|8hD*x=v+Rli+QU6hepJj)+QHSDTPqi zw0lc+cx5gX?KrejB2jCJrUb)@bIfLpd0AG9!bfdpG6&9>@KN1?kv%5L?QpSntGGD- zA{LGB{CQlA9{LlFuN_*&?an8uVszwPgUZ3iJv;#cZg*_h)DkTkKWa3Xh`rl!Cvn5i zgU?dc`JVVrbWr8)i3$^OVSDBnD+Cp;`%|AOvS*lnP*--)x;e#E zZNiMmtqPg}oR3+TZe>klVD?$9@a?K5V_D=y=7L!d4r-q@Id}it#ifo-Ow2N3HSr4) zVz+Z$ndIOUy3xU*A%5qi3z8yEYsDGD-|}`iX-#gK&cxKXwc#+2!(Q_vDQ7a=*_azQ z2qZ8qPc`D@zL)criSbFsrw*>QrkfcU9gcnr_cncU;f_$|&kqku12`Nz{5ftu5K9b^ zafncMJf+~&6>7@r7*Dd_IR; S*6~nO$+Ma2eC{m_4AuY~pi+VW literal 0 Hc-jL100001 diff --git a/doc/ja/images/show-all.gif b/doc/ja/images/show-all.gif new file mode 100644 index 0000000000000000000000000000000000000000..4178a97582ed5c2c481e3385cb4bcd8aeccc7579 GIT binary patch literal 812 zc-nLKbhEHboW>x+&?3N)k!p~WZCzU8Qdbw$-X7E2pD}%E^0b-dE0=X_-8yIA{*`CX z?zwmO%8TdsK74xn=il%DBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9iVPX6*5$n3SD9yj<7>fa#!!bw z1vUu|_C(VHm&DfV=B8ztP3GZElTG)>iD=V4{nU}R$A zley-Q(@b%@=ya?+K4LKNo8%)9!`* zUCXaAaKzuZalQJKCNuM!H_RInqU4Nz8*CI}O!jFo)n&VL@bjuO;*9N4DhUFt0bEQx zBBmWjT79{iv;Kvx)cEk=+-yc$wc3?SGL|{|8hD*x=v+Rli+QU6hepJj)+QHSDTPqi zw0lc+cx5gX?KrejB2jCJrUb)@bIfLpd0AG9!bfdpG6&9>@KN1?kv%5L?QpSntGGD- zA{LGB{CQlA9{LlFuN_*&?an8uVszwPgUZ3iJv;#cZg*_h)DkTkKWa3Xh`rl!Cvn5i zgU?dc`JVVrbWr8)i3$^OVSDBnD+Cp;`%|AOvS*lnP*--)x;e#E zZNiMmtqPg}oR3+TZe>klVD?$9@a?K5V_D=y=7L!d4r-q@Id}it#ifo-Ow2N3HSr4) zVz+Z$ndIOUy3xU*A%5qi3z8yEYsDGD-|}`iX-#gK&cxKXwc#+2!(Q_vDQ7a=*_azQ z2qZ8qPc`D@zL)criSbFsrw*>QrkfcU9gcnr_cncU;f_$|&kqku12`Nz{5ftu5K9b^ zafncMJf+~&6>7@r7*Dd_IR; S*6~nO$+Ma2eC{m_4AuY~pi+VW literal 0 Hc-jL100001 diff --git a/doc/ja/images/show-completed.gif b/doc/ja/images/show-completed.gif new file mode 100644 index 0000000000000000000000000000000000000000..c5778421af2d6c4ce7d2b679ff3cfb6255421793 GIT binary patch literal 771 zc-nLKbhEHboW>x+&?3N)k!p~WWmQt_R8tes+8Wc{89s4x-t?)-E0=d}+d6mufmP?v z@4I*J%8TdsK74xj_y3>&Bm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd8iVPX6*5$n3SD6ueIU?PW5Jk(Z<1EQ^hYEuE>m zj*WxMHX?{WF;J_d*dRw)f5tq`a7J#vbWNr*17?0^mMjex9)52YUS_*_MLb%3#e6*6 z+}kubb`)_1WE$GcjW}7U&B4QSD1ft;o3}XeBm;+k*18kgbxF*154m^j(qLN0I8nz< zAb)=0JzbWiI{iHLwoEMlOdGZwy0f&(pkb}T2L)Q~hYZpwyBJTq6P z>j(uDA3QLtF|g?0IhG%n9K5EpO+3|5qU6nL$jZ$2vogV#!Oc=#Wl@8&p$wO>LESl- zUrmjHI;OlCiUtq58iE!bQ0bl6z@y>9z-Jqfpr9s}!*YTrpuqK@p@nMxk%~zU*Ejdi zJ$2wPv;Hv#wy4l0hfPxbZ8DGWq*@pg>=H~$R^^$mVEA{$u}$8gc^*wSPwGI`0Sed;ARf* zMz5z+58Ulq$|Cc*#PO7DlQ91jdf+0E4sIBo45bK zstXtPKY4uX!^gLO|Ns6^B2fG%>RgnXSdyBeP@Y+mp%9Xhs^ISF8^ECWlZBCsL4ZMr z0SG{jVPO5Ipwbth$dIvWUC!%$>jNfysW?=z?zNMy+>XY_&xF_t+O7v~&5_MGFwL>h z$7F_PW7tCj6|o}@pA8*4L;JVtt8H5MjSgqy5&!1cOr=g=JaX5pDWr1}tpc zye$0cJgpkc%wfLTJk8~iGc*}pbZiAIIrv%n8Q4;^R#$OOX-M*3!;sD}JKI3jl8J+1 z851v;Rw4Ja!=)RTc4nz>*2vjBPg~96kS7;E7qf54evVRZj>K&|yli}o%-l1$TXPQY z_24UJc?F#KN+OE!->4&uM1y-4(ET>VqTAr5sxV9TzURYc)x={-{QSv+xXmZoj1p z2ORuo>1l~%R0Z@iFtPJ-e0aPi*-fC!J6U4E3I#@{E~YZG6h)<{x3(8l@9p&7p2sZ| k_~upb>ok{pdmD5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2TOTmtOU0pzb+4Ut<@BADrb=vM>ti_gA!yZ{wamOX zg81ZE91a*>SjO_e<#0p5oh<=6S`4f<_dc-uSXCW;|9%Sdy96DvSPhPf0xo~;TwOE6 zP7Rg-X6B?`4el16_$iF(I<^89g&H%8v{?9g`8hNuX6I;RWvp*0Fi>5ve#ep~elBJX z-Xwl!rp*QFIetYarf8}y*phcKo5zQZXAfJt7b7<>izhQzE>~L-kDI|9y(Moh#q;nq z_p+@}=i%bx)?(xLDf;uGYzv2|@AMUl;TD1pQyZpeI%~2ys$4B#G!}Uku|<2wp+-hu z4nG@?2dfjA)H#!mOuW+C;Mv2peO-+qN5g?8+kBf<0SPZ1?U>kPEKV40Zag4qA;XZ6 zAkx~jOpir?;6juBa*|sKfo&C90rrzl+Q@0kBZdv-!blu&J Pb}km1rNi6$1sJRWMd;k| literal 0 Hc-jL100001 diff --git a/doc/ja/images/sort-ascending.gif b/doc/ja/images/sort-ascending.gif new file mode 100644 index 0000000000000000000000000000000000000000..075c46010f17b294ae668e73ad68b6cdb5ed66c0 GIT binary patch literal 604 zc-nLKbhEHbtYHvgXc1t@NHxgGvMMchsi_HUZHw#f4DXweIelvKw3+3rR&?*!vGC%> zgZJ-UefjeKhfnYR{{QozM4QCuARF3_z%orHEND$b7tvgICZ2ZO@sHQey3)0 ztHz;aiG2J#oaY|KJvLO^U}7Mw+qznhSMF-i@^>to?Cix%0s?tiXR|Z@dlD^}@L+n= zt`r%Q#X1KVn3xW7T-Ip7RMiAN#?=HG$!R24f$KNyFB#G?kje8rLEN3XeI7 z#+;4GDs=W_VCGu(Hgk#EDJFK_V>_j`H@uouufg)*HusZv!VDG*3|hAqot)AW%%&n} zaGAB~(scdq3$u1@eSKZO>|>MfZnGSr@SNB8-a4P_xU;93JN}_H`|F1%5>M+XDJ6V* MK0RNAlaaw10LH@&EdT%j literal 0 Hc-jL100001 diff --git a/doc/ja/images/sort-descending.gif b/doc/ja/images/sort-descending.gif new file mode 100644 index 0000000000000000000000000000000000000000..79fcb4d94fdb9166a6acdbc3ccf5b8248c77c323 GIT binary patch literal 620 zc-nLKbhEHbtYHvgXc1t@NHxgGwkj!huB!`bZHwvd4DXweHGOLG^qJ+$7Ps!&wfNG7 zgZJ)UdG+$a$ItKo{{QozM48b%f~ zR`Kmj{%|mqLE?_yD@G57Lm5*N62E!Yret$jS7~0Tc>l9Iz(R_Jjn5{f)r*72Q-h5^ zl!b$Xle0>Li(8wk)4ou*ydrUmjc%m3l4$hMdcD(`%WT*mzfPhi=}i&Rm$|eLi1CK2q)L0oPuNprb2GhJn7<2-YgJNSGnr{v8G0yPN=0p zR8Z`mvvAE6r=!Z#E*M5kfALFvL!b~lH_sf7fKb*Z_H7LXLT*#tA|+1U>-~7+-EwEo zPA<+3DhnL-_j?=hM$dk7u4#%1$L@~T+Z=jVBv09+`1y%kgBJI{13_%3le-xduFhzZ z$zjXvJ~2UqZNcl=A~S;6Gz1H-w0c c!b0=&2d#H~y>q;)XGg_e>q*kCP7Dmz0L}IiO#lD@ literal 0 Hc-jL100001 diff --git a/doc/ja/images/start-class.gif b/doc/ja/images/start-class.gif new file mode 100644 index 0000000000000000000000000000000000000000..bd9c61973623ef1d8c292eb685abc2f0e09da30d GIT binary patch literal 603 zc-nLKbhEHbOkxmWXc1swn90B}mq%oYxaKM?`;E5YTikeg5_3pZ~xAlL!?5i8>dhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~Vh~`^ zVE_VQSoP&Y9*Ma>@ejPuM!o|ofapdzS_TEYEnoLR`QgiQkh<{uX`;mQ<%nrtuAf^Nd z_fGH76J0wwCp?(n#9*3T_H(Dx^gT`7`_>seP*}*t*nDJZLBfWk@;MQOdOiml4(jZD zeC5yrcadZJS*ygqeQFBRZ!F5XVaMgr|9tC?Ls5%f{5*85XRcl}OF-8WZN}ETT?;#c zA22qHu+8}4b@4+h$GW-6r~71CZoIj@BYEdhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~Vh~`^ zVE_V(GQDPo*6KL^jhh*EA1R+(%D@!B&&0!-&wpJ{ z)t-@`?aC43mz>>v%LwTJBHa6{h}1W3K(W9vggn)=T7^GWgTl<)|0^ zfy2V#heNPb0OMCVyMP3RJ|QQ5u>zk74G!zof&*e}CaT=wYWo_X+u+{q-^9-M=!4*f z21du;+4Fpaw=o=)^RudCQCN|X&c%E%0uMTaEZGvKg$NzEduqYY zO^cKccq|Mrs7+p>ov|Q) N|9)<1mlg&FYXJW-A~OI0 literal 0 Hc-jL100001 diff --git a/doc/ja/images/stop-class.gif b/doc/ja/images/stop-class.gif new file mode 100644 index 0000000000000000000000000000000000000000..ee44b7c7a34e208a64633b5d4526bb8577f9f42c GIT binary patch literal 570 zc-nLKbhEHbOkxmWXc1sI%fN7+k>jG25>}ijY1HB3;pOEkj@0fb z=H=n$X4dB6O4IhJu(2{?ZY<`So*d53$-%yapIwKUiGwGFfr)?8yqQ`vw{6gJ5-?)y z*J9nQy|vg^kBP5K=TJL`cM#VOR?SU1JDLnt-MD%4xOkHiIgTgQCO^sL;N>hjKljGX z?V3A{)C^g9CxxBbH%0G~SWjYs!U0B0E`#RffSkYP3t zV=+jWAQ*5&n{mE^*PFs4#~azt@3Dyp%WY)NV&-`p>}cemKH5XCEfV&l{KxWhi64>lZe}rTOxjvmODIi!cS%M zKR>d=khzg*LFyVc)1U*Z*0$B@?LG0!i6udGg0gqs!PVEFoSvaP`NgE2o6{w#+zS5r b+$zqH>GxjEXT;LZ8M`|9|3*U<76xkox%c*( literal 0 Hc-jL100001 diff --git a/doc/ja/images/stop-printer.gif b/doc/ja/images/stop-printer.gif new file mode 100644 index 0000000000000000000000000000000000000000..7912e9df53c1b9c312e370dd40e5d13a181ffa07 GIT binary patch literal 606 zc-nLKbhEHb%x4f`Xc1sI%fN7+iSweAAe^glTqO0r8f(7q4 zZTxor{I4g^e!YGB@89qLBm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3Mzd9iYyMR*5$n3SDnwy+0oKLdxslR?8 zu|%MIO3Bn2l10bE6J~4i>{`#1?IUe)V%0{4iy8_-Hlc?OR{Z!MsmpH?uWVS~!Iz=M zqthHyYRuIerNdXx%frnb*27g0?bmN?ZJ0BmZ>4q~KZo{mP38{%z}3b1dYi&FFV^f| zT%heD;K*pz?JaBMy*;aExAz=Z-!FVy&A4#Qw2?tf}J^h(11kXL5FJUpOCswqqxMx;&{j7;+ zCI&gIpXa(K)#$+nOSKKPJj!Cbx4pf+#I5Dv+1=%DoOac6%lob1Xt{c1^5=QEdyaTK Oy^whOz(Qpf25SI}r4g0@ literal 0 Hc-jL100001 diff --git a/doc/ja/images/unpublish-printer.gif b/doc/ja/images/unpublish-printer.gif new file mode 100644 index 0000000000000000000000000000000000000000..8ea47aa7b32583c16bd0abce10ed5a58fe41155e GIT binary patch literal 698 zc-nLKbhEHbtYHvgXc1t@NHxgGvMMQZs;v!dYme{l44*J5cly-imCL)fZJW3Mz^b$7 z_T9U8^~LjhA3nYN`~UZU5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6_P_q9BrDH?Q>l{{sr%3xs8>m=8IhVBwKroWX2R z>pFXd^Sc+j)^Ri+IlY1FLlR3{xoU>G6kE%qH?eww*;kVPD=hy}&CpP;6Qyj>T$7~5 zqurvx#mi#E&8wNN!B@k_!_CcH-_W#3laZT4gQvS{QM10aK_x?e-&QRaUj7wJvzeO% zw3wMWcsDVWHZ9fS;9tPN!FTQ?gBQcJDt#9L`+3{yb(Ym>aQ0Tr)!Y)#zjODYQzy%_ zy;iU=GV=1CTeogKs~zL6J&D~9y&bt&FABJ1Zs1}yW<4yiiCeTo#FU+T4ol4=hO5er zIzB%<7<`T%?|<-5!s5ZlBMgk}JhNAF9BAlaWaAf+IPgXHo}=mJb*vHx4m{Ry=nYu) zK=ZJJLnA{XN5qGOOV*5Ba%*G`EqKvv<1833x6CK9p^rgK;?J_<;?X*ca%OwYSY|O7 z>Ij&f*s*AZn~(psP%9~qR>lOcBVRqQ_`D2~WD&5-c=71uEs>%EyB}9nU;8a9@4acU z@PLA%ewvM7$K?f2WaF7QEZqv7+q^mqSyU<*N^ZunT#As$=>2}0$+!Al+^(AsT7pzh zT2GAmGBx6uYHk|y0mZ}fdJb^8JijMxV?INqT{vdp>9%y+94-+igBMe5xdnZicN{*n zzn(w$_7C+34J_*%n8aDt6jme%wDmMRXcBOH;nZyTMEzka3sXc3hf?B;#CmfPK_&)k E09aHmS^xk5 literal 0 Hc-jL100001 diff --git a/doc/ja/images/use-default-config.gif b/doc/ja/images/use-default-config.gif new file mode 100644 index 0000000000000000000000000000000000000000..ac7c16c8a0f86123dc44d8894e7347b89c123967 GIT binary patch literal 1017 zc-nLKbhEHbyv`uP&?3N)k!p~WZCzUIQdbw$-X7cApD}%E^7NVItCn|e+cx*W!POVe z@4t8V^2-&Bm%{MqRvIBi6yBi3gww4844j8sS56%z5xu1KUo;L7z7w} z7=Qre7zWmV3MzdQ6d5vBt;>16uR!N~N$&lMdt7WU`_<!t-Mozjbg5^&W2)^fmm#!@yEis>iEWsM%@B zQL9s|%g9vD%gVv!sKFVd*_z+7phYi5$#7v+PB_Ez20fMu+DzQ)t$JH^S@`&}8CiL_ z=PqD5P|6;=X2HSbjn2(nTAQ}$@wM>n=T6Yz;W{z*-hEvM!_Fr<6?)u#T8#X~+jZVw z*v;6i!N|QTKi~)xe+Yl~ohwl#euCW$j9bq{U(cJ`tzW^!_u>0VxgF6TgLE1hm=%>I zvac=mNDp*9+%xx|P)hK`21jw0_5gu|Z4Um-Ec}a}WEQ+RZ!|^2=~v>>Hy00ys>h2| zOjv%tLBTX|j!`F%MuSkvDyG!sTn_eOd=f$h8TuEQvuYlh1T1BkvA2R*WI^ZSi8-+@ z{JVC&RC>V0#IF5T^}^{Rb=*kMMn;3a4PtyD9(jU7S#7^HSWh#))HezM`rXe-Qg2A9C+QLS7f!oFR z1xDfz6*qY&oO)Xr!9CmO-?DqmA1aSB$bVH#Js*{5dB`u+{fn}kOqb#d2FC7<3JuJ; zKR&m|O|D!P#GK3EAYc7ol_5CoOYFtlj$&D< zjZLZ6rh!*fYpVk`yPNS?oVv@TclLwd(r-(IFBmMFcU7}w>K#Yk*&Az(8LSPy7#voW zRo&vmymsk_48iV(rpa2zI4>|rFehwDS;ai_&QnR|z-I=6$Fh~3 zN2z4?(cLCr43B%gJCvQzd+g8#LHF<9UccYZ@H)Wl0E>9ehy6=T3O^j;G1qZ9q;lo; aha)25d-R2UJz_o{lTkj%EUd`DU=08u>b3v? literal 0 Hc-jL100001 diff --git a/doc/ja/images/view-access-log.gif b/doc/ja/images/view-access-log.gif new file mode 100644 index 0000000000000000000000000000000000000000..d6e06a9744c5dea4ac3ef23690b1942f5733ead3 GIT binary patch literal 743 zc-nLKbhEHb>|_vOXc1t@NHxgGvMMQZs;LQVYmJ;VIe+@pan@tFK-@`1tAF-~WI9lL!?5i8>dhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~Vh~`^ zVE_Vl10bE!cEykqzp^e##k>G<2uHuxMwQ{BS8CpjLEMwu@ti>{K zuhtZ1R*pzbc1{jlj&%^7G8%<$tHk#5ZTz#tGNh<+v)>J+i%F&VGQQs*Zv4m+)$V9wB2Uotgy;yc<~g zendFAbsTJFX8FgYz@eFTa9iW#9StHY)mWMOn77=mG;nn|>ZCp;#!_X9G?%b(jaq}) zdPfB-hTuCtia*TcX8m(Ypy%3`%pEIYBvLdJf*cv`yzL%sG+MBji*+-fAqU4|nQ4=a z=iFR+>#dad8g0oNcTa6^jVtDnxT912>>wu_*R7Qkrazrvv&(1C+f>HYif8OnSsKo4 zI^7t~U>{qOxA4Zo zn7O?mAVH={n4gKq5`p4BQRkx6#FEq$h4Rdj426)4R0VfW-v9>1pDc`A3<3-~ z3_t*K3vCT2E6_P_q9BrDH?Q>l{{sr%3xs7`JQ5TpNC^n7X>8_H z-m^ke=k)|@rL7DFMX4D}#JJd)L?)3Ev=LztrYfe6Fw3GKbi8j%tb3<(VfnOWIh86;kBI535g zYm3H*FYSyj5~YXJTB*`g&E?tT9>cw`(`)Aq zm)zD_S;n&?d^T{+a%A{?DY15g!c^X%=Me%MOusBu6k}Ww7y9r3!$JlQzdKW0O&O=M zC^GY8v?eI6XKL;_S$*KZDT!&9W_9I;pVaSS*(UcvCE-9L^I;7Zm(`7r3nZq`i&i+{ zqRhZ}f%8{W-Q&=!`~OxnHuy+otihkw3vDn7_;=+^GPyZQu2 OaoOD=%N%|M2PE-~WI9lL!?5i8>dhCYGe8D3oWGWGIAWq$;?3`UWs4{$yd~Vh~`^ zVE_Vr0+#2|@ zan{)m164yV{zYfF+P=2$xsf$tsf?qqZVPL~1BMAqmRjpH9j-N;Z`NXDkh5Y`jZ?_f z_c`!Fd?^pJ!>R9kRtRi3%6-`9(V@AArzkZr$HqzIXgYX0GES)wTXE3nz!{WdvWd+cN35UXYfyUoEzrTMFZpP)m?@zH%@|o4~{>>LVzPx#S+Wn!O`}dze<_BvV QIi>vj?{O! + + + + ホーム - CUPS @CUPS_VERSION@ + + + + +
+ + + + + + + + + + + + + + + + + + +

Common UNIX Printing System @CUPS_VERSION@

+ +  ãƒ›ãƒ¼ãƒ    + +   ç®¡ç†   + +   ã‚¯ãƒ©ã‚¹   + +   ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ/ヘルプ   + +   ã‚¸ãƒ§ãƒ–   + +   ãƒ—リンタ   + +
  + +

ようこそ!

+ +

この Web ページでは、システム管理作業はもちろん、プリンタやジョブ +の監視ができます。作業を行うには、上にあるタブをクリックするか、下の +ボタンをクリックしてください。

+ +

+Help +クラスの追加 +プリンタの追加 +クラスの管理 +ジョブの管理 +プリンタの管理 +サーバの管理 +

+ +

ユーザ名とパスワードを尋ねられたら、あなたのユーザ名とパスワード、 +あるいは、ユーザ名 "root" とそのパスワードを入力してください。

+ +

CUPS について

+ +

+ご機嫌なコンピュータとプリンタ + + + +CUPS は、UNIX® ベースのオペレーティングシステムのための、 +ポータブルな印刷レイヤを提供します。標準印刷ソリューションを促進する +ために、Easy Software +Products によって開発および保守されています。CUPS は +MacOS® X および多くの Linux® +ディストリビューションで採用されている標準印刷システムです。

+ +

CUPS は +印刷ジョブとキューの管理に Internet Printing Protocol ("IPP") +を基礎として使い、ネットワークプリンタのブラウズ、 +実世界の印刷をサポートするための印刷オプションに基づく +PostScript Printer Description ("PPD") の機能を追加しています。

+ +

プリンタドライバと支援

+ +

プリンタドライバと支援については、公式 CUPS サイトを訪れてください:

+ +
+    www.cups.org
+
+ +

CUPS の商用サポート、および ESP Print Pro と呼ばれる +拡張バージョンは、以下の場所で入手可能です:

+ +
+    www.easysw.com
+
+ +
 
+ +

The Common UNIX Printing System, CUPS, and the CUPS logo are the +trademark property of Easy Software +Products. CUPS is copyright 1997-2006 by Easy Software Products, +All Rights Reserved.

+ +
+ + diff --git a/filter/Dependencies b/filter/Dependencies index 243dc3e9b..b79095563 100644 --- a/filter/Dependencies +++ b/filter/Dependencies @@ -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 diff --git a/filter/Makefile b/filter/Makefile index aff050503..c181b3f3e 100644 --- a/filter/Makefile +++ b/filter/Makefile @@ -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 $". # diff --git a/filter/image-zoom.c b/filter/image-zoom.c index f449826bc..42cc478ad 100644 --- a/filter/image-zoom.c +++ b/filter/image-zoom.c @@ -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 $". */ diff --git a/filter/imagetops.c b/filter/imagetops.c index 23e33a0da..d417c9b54 100644 --- a/filter/imagetops.c +++ b/filter/imagetops.c @@ -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 $". */ diff --git a/filter/imagetoraster.c b/filter/imagetoraster.c index 6fdea1038..f0dce921c 100644 --- a/filter/imagetoraster.c +++ b/filter/imagetoraster.c @@ -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 $". */ diff --git a/filter/pstops.c b/filter/pstops.c index f6fe0b8a7..0a2de3196 100644 --- a/filter/pstops.c +++ b/filter/pstops.c @@ -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 @@ -26,15 +26,14 @@ * 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... */ @@ -43,14 +42,15 @@ */ #include "common.h" +#include +#include +#include /* * 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 */ @@ -76,86 +76,112 @@ #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("<> 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 $". */ diff --git a/fonts/Makefile b/fonts/Makefile index 9f4afb8f3..e22041de1 100644 --- a/fonts/Makefile +++ b/fonts/Makefile @@ -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 $". # diff --git a/init/cups.sh.in b/init/cups.sh.in index 06f3c924b..975af256c 100755 --- a/init/cups.sh.in +++ b/init/cups.sh.in @@ -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 $". # diff --git a/init/org.cups.cupsd.plist b/init/org.cups.cupsd.plist index 67f19cbd2..c4341fc15 100644 --- a/init/org.cups.cupsd.plist +++ b/init/org.cups.cupsd.plist @@ -2,8 +2,6 @@ - Enabled - Label org.cups.cupsd OnDemand diff --git a/locale/Makefile b/locale/Makefile index bad408908..de9d14e7d 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -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 $". # diff --git a/locale/cups.pot b/locale/cups.pot index 0f443a783..d1a0aeb8f 100644 --- a/locale/cups.pot +++ b/locale/cups.pot @@ -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 \n" "Language-Team: LANGUAGE \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$". diff --git a/locale/cups_fr.po b/locale/cups_fr.po index e7f9a29dc..c5a5e6c86 100644 --- a/locale/cups_fr.po +++ b/locale/cups_fr.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" diff --git a/locale/cups_ja.po b/locale/cups_ja.po index d7d78e5c4..b05ac2966 100644 --- a/locale/cups_ja.po +++ b/locale/cups_ja.po @@ -21,22 +21,19 @@ # 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 \n" "Language-Team: Japanese \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" diff --git a/man/Makefile b/man/Makefile index fbd5715cb..c64f3b666 100644 --- a/man/Makefile +++ b/man/Makefile @@ -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 $". # diff --git a/man/accept.man b/man/accept.man index 999199dde..331d41f5b 100644 --- a/man/accept.man +++ b/man/accept.man @@ -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). .\" @@ -21,12 +21,16 @@ .\" 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 $". .\" diff --git a/man/backend.man b/man/backend.man index 41f338b29..25a6e6f46 100644 --- a/man/backend.man +++ b/man/backend.man @@ -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 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 index 000000000..76cf353b6 --- /dev/null +++ b/man/cancel.man @@ -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$". +.\" diff --git a/man/classes.conf.man b/man/classes.conf.man index f56a5c856..eb38be57c 100644 --- a/man/classes.conf.man +++ b/man/classes.conf.man @@ -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 + ... .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 $". .\" diff --git a/man/cups-config.man b/man/cups-config.man index 5ff615cba..bf0840660 100644 --- a/man/cups-config.man +++ b/man/cups-config.man @@ -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 index 000000000..859a3970e --- /dev/null +++ b/man/cups-deviced.man.in @@ -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 index 000000000..e9f1862bd --- /dev/null +++ b/man/cups-driverd.man.in @@ -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 $". +.\" diff --git a/man/cups-lpd.man b/man/cups-lpd.man.in similarity index 57% rename from man/cups-lpd.man rename to man/cups-lpd.man.in index 37767c3fd..e16e75eaa 100644 --- a/man/cups-lpd.man +++ b/man/cups-lpd.man.in @@ -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 $". .\" diff --git a/man/cups-polld.man b/man/cups-polld.man index 495090ddd..f75dbbc40 100644 --- a/man/cups-polld.man +++ b/man/cups-polld.man @@ -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 @@ -21,26 +21,27 @@ .\" 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 $". .\" diff --git a/man/cupsaddsmb.man b/man/cupsaddsmb.man.in similarity index 66% rename from man/cupsaddsmb.man rename to man/cupsaddsmb.man.in index 388619004..b6cc165b6 100644 --- a/man/cupsaddsmb.man +++ b/man/cupsaddsmb.man.in @@ -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 $". .\" diff --git a/man/cupsd.conf.man b/man/cupsd.conf.man.in similarity index 60% rename from man/cupsd.conf.man rename to man/cupsd.conf.man.in index 53d0d65e8..199f148ff 100644 --- a/man/cupsd.conf.man +++ b/man/cupsd.conf.man.in @@ -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 @@ -21,208 +21,332 @@ .\" 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 $". .\" diff --git a/man/cupsd.man b/man/cupsd.man.in similarity index 51% rename from man/cupsd.man rename to man/cupsd.man.in index b503e23cb..cbcc0ea91 100644 --- a/man/cupsd.man +++ b/man/cupsd.man.in @@ -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 @@ -21,41 +21,58 @@ .\" 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 $". .\" diff --git a/man/cupsenable.man b/man/cupsenable.man index 9f6539680..e446991fc 100644 --- a/man/cupsenable.man +++ b/man/cupsenable.man @@ -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 @@ -21,47 +22,72 @@ .\" 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 $". .\" diff --git a/man/cupstestppd.man b/man/cupstestppd.man index cda964c9c..149ddbf94 100644 --- a/man/cupstestppd.man +++ b/man/cupstestppd.man @@ -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 $". .\" diff --git a/man/filter.man b/man/filter.man index 61e2afe74..6243bcd6c 100644 --- a/man/filter.man +++ b/man/filter.man @@ -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 $". .\" diff --git a/man/lp.man b/man/lp.man index 2a823459b..41662a1dd 100644 --- a/man/lp.man +++ b/man/lp.man @@ -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. .\" @@ -21,88 +21,73 @@ .\" 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 $". .\" diff --git a/man/lpadmin.man b/man/lpadmin.man index 7c94b8ca0..a44627736 100644 --- a/man/lpadmin.man +++ b/man/lpadmin.man @@ -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 @@ -21,143 +21,163 @@ .\" 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 $". .\" diff --git a/man/lpc.man b/man/lpc.man index 56547a6ea..f183f3de6 100644 --- a/man/lpc.man +++ b/man/lpc.man @@ -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 $". .\" diff --git a/man/lpinfo.man b/man/lpinfo.man index f52b29a30..3d8fdfb99 100644 --- a/man/lpinfo.man +++ b/man/lpinfo.man @@ -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 @@ -21,40 +21,54 @@ .\" 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 $". .\" diff --git a/man/lpmove.man b/man/lpmove.man index 2c462c027..e2f05b99a 100644 --- a/man/lpmove.man +++ b/man/lpmove.man @@ -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). .\" @@ -21,13 +21,13 @@ .\" 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 $". .\" diff --git a/man/lpoptions.man b/man/lpoptions.man index f1c2b7832..08e012bdd 100644 --- a/man/lpoptions.man +++ b/man/lpoptions.man @@ -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 @@ -21,108 +21,124 @@ .\" 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 $". .\" diff --git a/man/lppasswd.man b/man/lppasswd.man index 88cefedf0..319631ddd 100644 --- a/man/lppasswd.man +++ b/man/lppasswd.man @@ -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 @@ -21,41 +21,50 @@ .\" 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 $". .\" diff --git a/man/lpq.man b/man/lpq.man index 812faf4c5..c59bf0b84 100644 --- a/man/lpq.man +++ b/man/lpq.man @@ -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 $". .\" diff --git a/man/lpr.man b/man/lpr.man index e6c14ea0e..6f6798b14 100644 --- a/man/lpr.man +++ b/man/lpr.man @@ -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). .\" @@ -21,89 +21,107 @@ .\" 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 $". .\" diff --git a/man/lprm.man b/man/lprm.man index 0ca5fec10..723a00808 100644 --- a/man/lprm.man +++ b/man/lprm.man @@ -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 $". .\" diff --git a/man/lpstat.man b/man/lpstat.man index 45934918e..d1981c3b9 100644 --- a/man/lpstat.man +++ b/man/lpstat.man @@ -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 $". .\" diff --git a/man/mantohtml.c b/man/mantohtml.c index 27f073ffc..3b44813a6 100644 --- a/man/mantohtml.c +++ b/man/mantohtml.c @@ -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, §ion); fprintf(outfile, - "\t%s\n" + "\t%s(%d)\n" "\n" "\n" - "

%s(%d)

\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("

", 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, "

\n%s", start_fonts[font]); + fprintf(outfile, "\n%s", start_fonts[font]); else - fprintf(outfile, "\n%s", start_fonts[font]); + fprintf(outfile, "\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, "%s", 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("", outfile); + while (*lineptr) + putc_entity(*lineptr++, outfile); + fputs("", outfile); + } + else + { + /* + * Local man page, do a link... + */ + + fprintf(outfile, "", manurl); + while (*lineptr) + putc_entity(*lineptr++, outfile); + fputs("", 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 $". */ diff --git a/man/mime.convs.man b/man/mime.convs.man index 033a06e6f..e90071255 100644 --- a/man/mime.convs.man +++ b/man/mime.convs.man @@ -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 @@ -21,17 +21,17 @@ .\" 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 $". .\" diff --git a/man/mime.types.man b/man/mime.types.man index cc97701a3..8b42b6c35 100644 --- a/man/mime.types.man +++ b/man/mime.types.man @@ -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 @@ -21,21 +21,21 @@ .\" 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 $". .\" diff --git a/man/printers.conf.man b/man/printers.conf.man index ff103d7f5..45dedb85a 100644 --- a/man/printers.conf.man +++ b/man/printers.conf.man @@ -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 + ... +.br +Defines a specific printer. +.TP 5 + ... +.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 - ... +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 index 000000000..52599cfa1 --- /dev/null +++ b/monitor/Dependencies @@ -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 index 000000000..a689220c9 --- /dev/null +++ b/monitor/Makefile @@ -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 index 000000000..7b19e4b84 --- /dev/null +++ b/monitor/bcp.c @@ -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 +#include + + +/* + * 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("<> 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 index 000000000..400e1ce0b --- /dev/null +++ b/monitor/tbcp.c @@ -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 +#include + + +/* + * 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 $". + */ diff --git a/notifier/Dependencies b/notifier/Dependencies index f13e6eb1a..6867d6207 100644 --- a/notifier/Dependencies +++ b/notifier/Dependencies @@ -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 diff --git a/notifier/Makefile b/notifier/Makefile index 73c35680f..09fc0bc44 100644 --- a/notifier/Makefile +++ b/notifier/Makefile @@ -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 index 000000000..537ac7765 --- /dev/null +++ b/packaging/cups-dbus.conf @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/packaging/cups.list.in b/packaging/cups.list.in index 5769b964a..c2721216f 100644 --- a/packaging/cups.list.in +++ b/packaging/cups.list.in @@ -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 $". # diff --git a/packaging/cups.spec.in b/packaging/cups.spec.in index 6a881dd8e..7ca8bcbc2 100644 --- a/packaging/cups.spec.in +++ b/packaging/cups.spec.in @@ -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 $". # diff --git a/pdftops/Dependencies b/pdftops/Dependencies index 1f83e73de..350408b56 100644 --- a/pdftops/Dependencies +++ b/pdftops/Dependencies @@ -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 diff --git a/pdftops/JBIG2Stream.cxx b/pdftops/JBIG2Stream.cxx index e1e25f540..38cbb9ca1 100644 --- a/pdftops/JBIG2Stream.cxx +++ b/pdftops/JBIG2Stream.cxx @@ -13,6 +13,7 @@ #endif #include +#include #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) { diff --git a/pdftops/JPXStream.cxx b/pdftops/JPXStream.cxx index 0f1977ed3..2022462ad 100644 --- a/pdftops/JPXStream.cxx +++ b/pdftops/JPXStream.cxx @@ -12,6 +12,7 @@ #pragma implementation #endif +#include #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)); diff --git a/pdftops/Makefile b/pdftops/Makefile index 352f89510..9be45f5af 100644 --- a/pdftops/Makefile +++ b/pdftops/Makefile @@ -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 $". # diff --git a/pdftops/SplashXPathScanner.cxx b/pdftops/SplashXPathScanner.cxx index ea2ad871d..d5b3048f6 100644 --- a/pdftops/SplashXPathScanner.cxx +++ b/pdftops/SplashXPathScanner.cxx @@ -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) { diff --git a/pdftops/Stream.cxx b/pdftops/Stream.cxx index 2e9dfb7d1..e2c2cab11 100644 --- a/pdftops/Stream.cxx +++ b/pdftops/Stream.cxx @@ -7,7 +7,6 @@ //======================================================================== #include -#include #ifdef USE_GCC_PRAGMAS #pragma implementation @@ -16,6 +15,7 @@ #include #include #include +#include #ifndef WIN32 #include #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; diff --git a/pdftops/Stream.h b/pdftops/Stream.h index 1f22ee657..e26e67cc1 100644 --- a/pdftops/Stream.h +++ b/pdftops/Stream.h @@ -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; } }; //------------------------------------------------------------------------ diff --git a/pdftops/UnicodeTypeTable.cxx b/pdftops/UnicodeTypeTable.cxx index 9c4ea9f1e..b89604036 100644 --- a/pdftops/UnicodeTypeTable.cxx +++ b/pdftops/UnicodeTypeTable.cxx @@ -1,6 +1,6 @@ //======================================================================== // -// UnicodeMapTables.cc +// UnicodeTypeTable.cc // // Copyright 2004 Glyph & Cog, LLC // diff --git a/pdftops/gmem.c b/pdftops/gmem.c index 8f6526100..f7f35dfe7 100644 --- a/pdftops/gmem.c +++ b/pdftops/gmem.c @@ -11,6 +11,7 @@ #include #include #include +#include #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); } diff --git a/ppd/Makefile b/ppd/Makefile index 051fc8c45..4554e3843 100644 --- a/ppd/Makefile +++ b/ppd/Makefile @@ -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 $". # diff --git a/ppd/dymo.ppd b/ppd/dymo.ppd index 656c8b444..69426a938 100644 --- a/ppd/dymo.ppd +++ b/ppd/dymo.ppd @@ -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" @@ -152,5 +152,5 @@ *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 $". *% diff --git a/ppd/zebra.ppd b/ppd/zebra.ppd index f70b7c47b..7d07230c1 100644 --- a/ppd/zebra.ppd +++ b/ppd/zebra.ppd @@ -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 @@ -479,5 +479,5 @@ *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 $". *% diff --git a/ppd/zebracpl.ppd b/ppd/zebracpl.ppd index 4a8d85b79..6cebc50f9 100644 --- a/ppd/zebracpl.ppd +++ b/ppd/zebracpl.ppd @@ -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 diff --git a/ppd/zebraep1.ppd b/ppd/zebraep1.ppd index 35053cb31..817e4e8a3 100644 --- a/ppd/zebraep1.ppd +++ b/ppd/zebraep1.ppd @@ -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 diff --git a/ppd/zebraep2.ppd b/ppd/zebraep2.ppd index 0f1f1940b..e4ad8ca1d 100644 --- a/ppd/zebraep2.ppd +++ b/ppd/zebraep2.ppd @@ -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 diff --git a/scheduler/Dependencies b/scheduler/Dependencies index 0faf79818..7ca0a4300 100644 --- a/scheduler/Dependencies +++ b/scheduler/Dependencies @@ -1,176 +1,198 @@ # 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 diff --git a/scheduler/Makefile b/scheduler/Makefile index e5f61fcd5..adbebbf54 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -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 $". # diff --git a/scheduler/auth.c b/scheduler/auth.c index e71cfaa40..89011f7db 100644 --- a/scheduler/auth.c +++ b/scheduler/auth.c @@ -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 #endif /* HAVE_USERSEC_H */ +#ifdef HAVE_MEMBERSHIP_H +# include +#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 $". */ diff --git a/scheduler/auth.h b/scheduler/auth.h index f78b587e5..2d4dcb326 100644 --- a/scheduler/auth.h +++ b/scheduler/auth.h @@ -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 $". */ diff --git a/scheduler/banners.c b/scheduler/banners.c index c95ea0d9e..5ce485673 100644 --- a/scheduler/banners.c +++ b/scheduler/banners.c @@ -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 $". */ diff --git a/scheduler/banners.h b/scheduler/banners.h index 668c5ade8..8c99774d8 100644 --- a/scheduler/banners.h +++ b/scheduler/banners.h @@ -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 $". */ diff --git a/scheduler/cert.c b/scheduler/cert.c index aa8b6ca50..195db7842 100644 --- a/scheduler/cert.c +++ b/scheduler/cert.c @@ -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 -# include +# ifdef HAVE_MEMBERSHIP_H +# include +# 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 $". */ diff --git a/scheduler/classes.c b/scheduler/classes.c index 9c098f74f..fe36555d8 100644 --- a/scheduler/classes.c +++ b/scheduler/classes.c @@ -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 $". */ diff --git a/scheduler/client.c b/scheduler/client.c index 7cf0cea3c..b35ed9ba9 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -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 $". */ diff --git a/scheduler/client.h b/scheduler/client.h index b2ecac49a..8f932f009 100644 --- a/scheduler/client.h +++ b/scheduler/client.h @@ -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 $". */ diff --git a/scheduler/conf.c b/scheduler/conf.c index c70456561..f76d86c91 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -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 definition. * read_policy() - Read a 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 $". */ diff --git a/scheduler/conf.h b/scheduler/conf.h index 00e98bc63..8e50f1135 100644 --- a/scheduler/conf.h +++ b/scheduler/conf.h @@ -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 $". */ diff --git a/scheduler/cups-deviced.c b/scheduler/cups-deviced.c index fd0101acd..d3cd41b93 100644 --- a/scheduler/cups-deviced.c +++ b/scheduler/cups-deviced.c @@ -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 $". */ diff --git a/scheduler/cups-driverd.c b/scheduler/cups-driverd.c index 21dd86dab..e44c6d146 100644 --- a/scheduler/cups-driverd.c +++ b/scheduler/cups-driverd.c @@ -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 $". */ diff --git a/scheduler/cups-lpd.c b/scheduler/cups-lpd.c index 16cf24359..37e897426 100644 --- a/scheduler/cups-lpd.c +++ b/scheduler/cups-lpd.c @@ -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 @@ -23,13 +23,14 @@ * * 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. */ /* @@ -52,6 +53,17 @@ #include #include +#ifdef HAVE_INTTYPES_H +# include +#endif /* HAVE_INTTYPES_H */ + +#ifdef HAVE_COREFOUNDATION_H +# include +#endif /* HAVE_COREFOUNDATION_H */ +#ifdef HAVE_CFPRIV_H +# include +#endif /* HAVE_CFPRIV_H */ + /* * LPD "mini-daemon" for CUPS. This program must be used in conjunction @@ -77,14 +89,21 @@ * 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 $". */ diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c index f2a0b0f62..8b59c68e2 100644 --- a/scheduler/dirsvc.c +++ b/scheduler/dirsvc.c @@ -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 $". */ diff --git a/scheduler/env.c b/scheduler/env.c index ec3a8817d..d10694818 100644 --- a/scheduler/env.c +++ b/scheduler/env.c @@ -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, ""); 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 $". */ diff --git a/scheduler/filter.c b/scheduler/filter.c index c783b5db7..f315910af 100644 --- a/scheduler/filter.c +++ b/scheduler/filter.c @@ -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). * @@ -24,8 +24,10 @@ * 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... */ @@ -42,11 +44,25 @@ #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 $". */ diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 5c3b061af..7053ad0a8 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -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 $". */ diff --git a/scheduler/job.c b/scheduler/job.c index cdeaec6d6..0c65f3e34 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -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). * @@ -25,35 +25,47 @@ * * 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, "\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, "\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, " 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 directive on line %d!", linenum); + continue; + } + else if (!strcasecmp(line, "")) + { + 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 $". */ diff --git a/scheduler/job.h b/scheduler/job.h index 99799bcec..d6c7aa5d1 100644 --- a/scheduler/job.h +++ b/scheduler/job.h @@ -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 $". */ diff --git a/scheduler/listen.c b/scheduler/listen.c index 42e1d3e0a..467dcfdc8 100644 --- a/scheduler/listen.c +++ b/scheduler/listen.c @@ -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. @@ -24,10 +24,11 @@ * * 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... */ /* @@ -47,6 +48,26 @@ #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... */ @@ -54,20 +75,21 @@ 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 $". */ diff --git a/scheduler/main.c b/scheduler/main.c index 0e9e808dc..d0371248b 100644 --- a/scheduler/main.c +++ b/scheduler/main.c @@ -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 $". */ diff --git a/scheduler/mime.h b/scheduler/mime.h index 76883d761..7ccaa70e1 100644 --- a/scheduler/mime.h +++ b/scheduler/mime.h @@ -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 $". */ diff --git a/scheduler/network.c b/scheduler/network.c index 1c2875f4f..46f3f2655 100644 --- a/scheduler/network.c +++ b/scheduler/network.c @@ -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 $". */ diff --git a/scheduler/policy.c b/scheduler/policy.c index 6f9371b21..dee4355f3 100644 --- a/scheduler/policy.c +++ b/scheduler/policy.c @@ -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 $". */ diff --git a/scheduler/printers.c b/scheduler/printers.c index f8ea136a4..e04a4875c 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -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. @@ -45,7 +44,11 @@ * 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 @@ -57,13 +60,17 @@ */ #include "cupsd.h" +#include /* * 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 $". */ diff --git a/scheduler/printers.h b/scheduler/printers.h index b11b96068..79872ecdd 100644 --- a/scheduler/printers.h +++ b/scheduler/printers.h @@ -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 $". */ diff --git a/scheduler/process.c b/scheduler/process.c index 0938f7394..d891adf17 100644 --- a/scheduler/process.c +++ b/scheduler/process.c @@ -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 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 $". */ diff --git a/scheduler/server.c b/scheduler/server.c index b5b71f788..74c2fc071 100644 --- a/scheduler/server.c +++ b/scheduler/server.c @@ -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 $". */ diff --git a/scheduler/statbuf.c b/scheduler/statbuf.c index 3161de5f8..a4875b1c2 100644 --- a/scheduler/statbuf.c +++ b/scheduler/statbuf.c @@ -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 $". */ diff --git a/scheduler/subscriptions.c b/scheduler/subscriptions.c index d77b33f78..c109bb72a 100644 --- a/scheduler/subscriptions.c +++ b/scheduler/subscriptions.c @@ -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 $". */ diff --git a/scheduler/sysman.c b/scheduler/sysman.c index dc6643b7e..e32b13dcb 100644 --- a/scheduler/sysman.c +++ b/scheduler/sysman.c @@ -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 $". */ diff --git a/scheduler/testmime.c b/scheduler/testmime.c index bd65fc770..7efb1c6a8 100644 --- a/scheduler/testmime.c +++ b/scheduler/testmime.c @@ -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 $". */ diff --git a/systemv/Dependencies b/systemv/Dependencies index 0d7585b86..d24772b5c 100644 --- a/systemv/Dependencies +++ b/systemv/Dependencies @@ -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 diff --git a/systemv/Makefile b/systemv/Makefile index 0e22d8fae..6a8817978 100644 --- a/systemv/Makefile +++ b/systemv/Makefile @@ -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 $". # diff --git a/systemv/accept.c b/systemv/accept.c index 6ffbfb167..14f7201d4 100644 --- a/systemv/accept.c +++ b/systemv/accept.c @@ -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 $". */ diff --git a/systemv/cancel.c b/systemv/cancel.c index f0539d973..63c92fcfa 100644 --- a/systemv/cancel.c +++ b/systemv/cancel.c @@ -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 $". */ diff --git a/templates/Makefile b/templates/Makefile index 4572248cc..182023329 100644 --- a/templates/Makefile +++ b/templates/Makefile @@ -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 $". # diff --git a/templates/classes.tmpl b/templates/classes.tmpl index 64f0b9431..a69dd7b53 100644 --- a/templates/classes.tmpl +++ b/templates/classes.tmpl @@ -3,7 +3,7 @@

{printer_name}{default_name={printer_name}? (Default Printer):} {?printer_state_message=?:"{printer_state_message}"}

- +
diff --git a/templates/edit-config.tmpl.in b/templates/edit-config.tmpl.in index 2aeaec0d6..7ca5da795 100644 --- a/templates/edit-config.tmpl.in +++ b/templates/edit-config.tmpl.in @@ -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" + diff --git a/templates/header.tmpl.in b/templates/header.tmpl.in index bba6e90c2..8ffd7de80 100644 --- a/templates/header.tmpl.in +++ b/templates/header.tmpl.in @@ -2,12 +2,13 @@ - {title} - @CUPS_VERSION@ + {title} - CUPS @CUPS_VERSION@ {refresh_page?:} +
diff --git a/templates/ja/add-class.tmpl b/templates/ja/add-class.tmpl new file mode 100644 index 000000000..8db1395d2 --- /dev/null +++ b/templates/ja/add-class.tmpl @@ -0,0 +1,33 @@ + + + +

クラスの追加

+ +
+ + + + + + + + + + + + + + + + + + + + +
名前:
場所:
説明:
メンバー: + +
+ + diff --git a/templates/ja/add-printer.tmpl b/templates/ja/add-printer.tmpl new file mode 100644 index 000000000..65c09d6c2 --- /dev/null +++ b/templates/ja/add-printer.tmpl @@ -0,0 +1,28 @@ +
+ + +

新しいプリンタの追加

+ + + + + + + + + + + + + + + + + + +
名前:
+("/"、"#"、空白を除く適当な表示可能文字を含めることができます)
場所:
+("Lab 1" のように人間が読みやすい場所)
説明:
+("HP LaserJet with Duplexer" のように人間が読みやすい説明)
+ +
diff --git a/templates/ja/admin.tmpl b/templates/ja/admin.tmpl new file mode 100644 index 000000000..8edfde698 --- /dev/null +++ b/templates/ja/admin.tmpl @@ -0,0 +1,72 @@ + + +
+ +

プリンタ

+ +

+プリンタの追加 + +{have_samba?プリンタをSambaにエキスポート:} +

+ +{#device_uri=0?:

新しいプリンタが見つかりました:

    {[device_uri] +
  • {device_make_and_model} ({device_info}) +このプリンタを追加
  • +}
} + +

クラス

+ +

+ + +

+ +

ジョブ

+ +

+ジョブの管理 +

+ +
      + +

サーバ

+ +

+設定ファイルの編集 +アクセスログの表示 +エラーログの表示 +ページログの表示 +

+ +
+ +

基本サーバ設定:

+ +

+ ほかのシステムで共有されているプリンタを表示
+ このシステムに接続されている公開済みプリンタを共有
+ リモート管理を許可
+ どのジョブであってもキャンセルすることを (たとえ所有者でなくても) ユーザに許可
+ トラブルシューティングのためにデバッグ情報を保存

+ +

+ +
+ +
diff --git a/templates/ja/choose-device.tmpl b/templates/ja/choose-device.tmpl new file mode 100644 index 000000000..022ce5f62 --- /dev/null +++ b/templates/ja/choose-device.tmpl @@ -0,0 +1,26 @@ +
+ + + + + + +

{printer_name} のデバイス

+ + + + + + + + + + +
デバイス: + +
+ +
diff --git a/templates/ja/choose-make.tmpl b/templates/ja/choose-make.tmpl new file mode 100644 index 000000000..4e60161bb --- /dev/null +++ b/templates/ja/choose-make.tmpl @@ -0,0 +1,42 @@ +
+ + + + + + + + + + +

{printer_name} のメーカ/製造元

+ + + + + + + + + + + + + + + + + + + + + + +
メーカ: + +
 
または PPD ファイルを提供してください:
+ +
diff --git a/templates/ja/choose-model.tmpl b/templates/ja/choose-model.tmpl new file mode 100644 index 000000000..6bc223408 --- /dev/null +++ b/templates/ja/choose-model.tmpl @@ -0,0 +1,34 @@ +
+ + + + + + + + + + +

{printer_name} のモデル/ドライバ

+ + + + + + + + + + + + + + +
モデル: + +
または PPD ファイルを提供してください:
+ +
diff --git a/templates/ja/choose-serial.tmpl b/templates/ja/choose-serial.tmpl new file mode 100644 index 000000000..7917540da --- /dev/null +++ b/templates/ja/choose-serial.tmpl @@ -0,0 +1,47 @@ +
+ + + + + + +

{printer_name} のシリアルポートの設定

+ + + + + + + + + + + + + + + + + + + + + + +
ボーレート:
パリティ:
データビット:
フロー制御:
+ +
diff --git a/templates/ja/choose-uri.tmpl b/templates/ja/choose-uri.tmpl new file mode 100644 index 000000000..ca7fa0443 --- /dev/null +++ b/templates/ja/choose-uri.tmpl @@ -0,0 +1,41 @@ +
+ + + + + + +

{printer_name} のデバイス URI

+ + + + + + + + + + + + + + +
デバイス URI:
例: +
+    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
+
+ +

あなたのプリンタにふさわしい URI については、 +"ネットワーク +プリンタ" を参照してください。

+ +
+ +
diff --git a/templates/ja/class-added.tmpl b/templates/ja/class-added.tmpl new file mode 100644 index 000000000..ccda96d83 --- /dev/null +++ b/templates/ja/class-added.tmpl @@ -0,0 +1 @@ +

クラス {printer_name} は正しく追加されました。 diff --git a/templates/ja/class-confirm.tmpl b/templates/ja/class-confirm.tmpl new file mode 100644 index 000000000..f8eb454d6 --- /dev/null +++ b/templates/ja/class-confirm.tmpl @@ -0,0 +1,7 @@ +

警告: 本当にクラス +{printer_name} を削除してもよいですか?

+ +

クラスの削除

diff --git a/templates/ja/class-deleted.tmpl b/templates/ja/class-deleted.tmpl new file mode 100644 index 000000000..7c76490b1 --- /dev/null +++ b/templates/ja/class-deleted.tmpl @@ -0,0 +1 @@ +

クラス {printer_name} は正しく削除されました。 diff --git a/templates/ja/class-jobs-header.tmpl b/templates/ja/class-jobs-header.tmpl new file mode 100644 index 000000000..d12840e47 --- /dev/null +++ b/templates/ja/class-jobs-header.tmpl @@ -0,0 +1 @@ +

ジョブ

diff --git a/templates/ja/class-modified.tmpl b/templates/ja/class-modified.tmpl new file mode 100644 index 000000000..54e1f60ff --- /dev/null +++ b/templates/ja/class-modified.tmpl @@ -0,0 +1 @@ +

クラス {printer_name} は正しく変更されました。 diff --git a/templates/ja/classes-header.tmpl b/templates/ja/classes-header.tmpl new file mode 100644 index 000000000..3dad28ca3 --- /dev/null +++ b/templates/ja/classes-header.tmpl @@ -0,0 +1 @@ +

{total=0?クラスがありません:{total} 個のクラスのうち {#printer_name} 個を表示中}。

diff --git a/templates/ja/classes.tmpl b/templates/ja/classes.tmpl new file mode 100644 index 000000000..aeaef9925 --- /dev/null +++ b/templates/ja/classes.tmpl @@ -0,0 +1,56 @@ +{#printer_name=0?: +{[printer_name] +

{printer_name}{default_name={printer_name}? (デフォルトプリンタ):} +{?printer_state_message=?:"{printer_state_message}"}

+ + + + + + +
+説明: {printer_info}
+場所: {printer_location}
+クラスの状態: {printer_state=3?待機中:{printer_state=4?処理中:停止}}, +{printer_is_accepting_jobs=0?ジョブを拒否中:ジョブを受け付け中}, {printer_is_shared=0?not:} 公開。 +{?printer_state_message=?:
"{printer_state_message}"} +{?member_uris=?:
メンバー: {member_uris}} + +

+ +テストページの印刷 +{printer_state=5? + +クラスを開始 +: + +クラスを停止 +} +{printer_is_accepting_jobs=0? + +ジョブを受け付け +: + +ジョブを拒否 +} + +すべてのジョブをキャンセル +{printer_is_shared=0? + +プリンタを公開 +: + +プリンタを非公開 +} + +クラスの変更 + +クラスの削除 + +デフォルトに設定 + +許可するユーザの設定 +

+
+}} diff --git a/templates/ja/error-op.tmpl b/templates/ja/error-op.tmpl new file mode 100644 index 000000000..08657ef1e --- /dev/null +++ b/templates/ja/error-op.tmpl @@ -0,0 +1,3 @@ +

エラー:

+ +
"{op}" は未知の操作です!
diff --git a/templates/ja/error.tmpl b/templates/ja/error.tmpl new file mode 100644 index 000000000..c4ae91ef5 --- /dev/null +++ b/templates/ja/error.tmpl @@ -0,0 +1,3 @@ +

{?message?{message}:エラー:}

+ +
{error}
diff --git a/templates/ja/header.tmpl.in b/templates/ja/header.tmpl.in new file mode 100644 index 000000000..03653ed98 --- /dev/null +++ b/templates/ja/header.tmpl.in @@ -0,0 +1,63 @@ + + + + + {title} - CUPS @CUPS_VERSION@ + + + + {refresh_page?:} + + + + + + + + + + + + + + + + + + +

{title}

+ +  ãƒ›ãƒ¼ãƒ    + +   ç®¡ç†   + +   ã‚¯ãƒ©ã‚¹   + +   ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆ/ヘルプ   + +   ã‚¸ãƒ§ãƒ–   + +   ãƒ—リンタ   + +
  diff --git a/templates/ja/help-header.tmpl b/templates/ja/help-header.tmpl new file mode 100644 index 000000000..24d67e267 --- /dev/null +++ b/templates/ja/help-header.tmpl @@ -0,0 +1,28 @@ +
+{TOPIC?:} + +

+{HELPTITLE?{HELPTITLE}:{TOPIC?{TOPIC}:すべてのドキュメント}} 内を検索:

+ +
+ + + + +{QUERY?

{HELPFILE?{HELPTITLE}:{TOPIC?{TOPIC}:すべてのドキュメント}} の検索結果\:

+{QTEXT?:} +:

マッチするものはありませんでした。

} +{HELPTITLE?
:}:} +{HELPTITLE?

{HELPTITLE}

:} diff --git a/templates/ja/job-cancel.tmpl b/templates/ja/job-cancel.tmpl new file mode 100644 index 000000000..4ee7d1f01 --- /dev/null +++ b/templates/ja/job-cancel.tmpl @@ -0,0 +1,2 @@ +

ジョブ {job_id} はキャンセルされました。 + diff --git a/templates/ja/job-hold.tmpl b/templates/ja/job-hold.tmpl new file mode 100644 index 000000000..792c538f9 --- /dev/null +++ b/templates/ja/job-hold.tmpl @@ -0,0 +1,2 @@ +

ジョブ {job_id} は印刷をホールドされました。 + diff --git a/templates/ja/job-move.tmpl b/templates/ja/job-move.tmpl new file mode 100644 index 000000000..601e3f9bf --- /dev/null +++ b/templates/ja/job-move.tmpl @@ -0,0 +1,22 @@ +

+ +{job_id?:} + +

{job_id?ジョブ {job_id} の移動:すべてのジョブの移動}

+ + + + + + + + + + +
新しい宛先: + +
+ +
diff --git a/templates/ja/job-moved.tmpl b/templates/ja/job-moved.tmpl new file mode 100644 index 000000000..e76a80434 --- /dev/null +++ b/templates/ja/job-moved.tmpl @@ -0,0 +1,2 @@ +

{job_id?ジョブ {job_id}:すべてのジョブ} は +{job_printer_name} に移動しました。

diff --git a/templates/ja/job-release.tmpl b/templates/ja/job-release.tmpl new file mode 100644 index 000000000..132f02bba --- /dev/null +++ b/templates/ja/job-release.tmpl @@ -0,0 +1,2 @@ +

ジョブ {job_id} は印刷から解放されました。 + diff --git a/templates/ja/job-restart.tmpl b/templates/ja/job-restart.tmpl new file mode 100644 index 000000000..b066827bb --- /dev/null +++ b/templates/ja/job-restart.tmpl @@ -0,0 +1 @@ +

ジョブ {job_id} は再印刷されました。 diff --git a/templates/ja/jobs-header.tmpl b/templates/ja/jobs-header.tmpl new file mode 100644 index 000000000..1ed1049ef --- /dev/null +++ b/templates/ja/jobs-header.tmpl @@ -0,0 +1,15 @@ +

{?which_jobs=?完了したジョブを表示 +すべてのジョブを表示:{which_jobs=all?完了したジョブを表示 +アクティブなジョブを表示:アクティブなジョブを表示 +すべてのジョブを表示}}

+ +

{total=0?ジョブはありません:{total} 個の{?which_jobs=?アクティブな:{which_jobs=all?:完了した}}ジョブのうち {#job_id} 個を表示中}。

diff --git a/templates/ja/jobs.tmpl b/templates/ja/jobs.tmpl new file mode 100644 index 000000000..492a9c98c --- /dev/null +++ b/templates/ja/jobs.tmpl @@ -0,0 +1,42 @@ +{#job_id=0?: + + + + + + + + + + + +{[job_id] + + + + + + + + + +} +
ID åå‰ ãƒ¦ãƒ¼ã‚¶ ã‚µã‚¤ã‚º ãƒšãƒ¼ã‚¸ çŠ¶æ…‹ åˆ¶å¾¡ 
{job_printer_name}-{job_id} {?job_name=?未知:{job_name}} {job_originating_user_name} {job_k_octets}k {job_media_sheets_completed=0?不明:{?job_media_sheets_completed}}{job_state=3?{time_at_creation}
から保留中:{job_state=4?{time_at_creation}
からホールド中: +{job_state=5?{time_at_processing}
から処理中:{job_state=6?{time_at_completed}
に停止: +{job_state=7?{time_at_completed}
にキャンセル:{time_at_completed}
{job_state=8?に中断:に完了}}}}}} 
+{job_preserved>0? + +ジョブの再印刷:} +{job_state=4? + +ジョブを解放:} +{job_state=3? + +ジョブをホールド:} +{job_state<7? + +ジョブをキャンセル +ジョブを移動:} + 
+} diff --git a/templates/ja/modify-class.tmpl b/templates/ja/modify-class.tmpl new file mode 100644 index 000000000..e3ff08d8c --- /dev/null +++ b/templates/ja/modify-class.tmpl @@ -0,0 +1,34 @@ +
+ + +

クラス {printer_name} の変更

+ + + + + + + + + + + + + + + + + + + + + + +
名前: +{printer_name}
場所:
説明:
メンバー: + +
+ +
diff --git a/templates/ja/modify-printer.tmpl b/templates/ja/modify-printer.tmpl new file mode 100644 index 000000000..14bab6831 --- /dev/null +++ b/templates/ja/modify-printer.tmpl @@ -0,0 +1,29 @@ +
+ +{?device_uri=?:} +{?printer_make_and_model=?:} + +

プリンタ {printer_name} の変更

+ + + + + + + + + + + + + + + + + + +
名前:{printer_name}
場所:
+("Lab 1" のように人間が読みやすい場所)
説明:
+("HP LaserJet with Duplexer" のように人間が読みやすい説明)
+ +
diff --git a/templates/ja/option-conflict.tmpl b/templates/ja/option-conflict.tmpl new file mode 100644 index 000000000..c7d586b9d --- /dev/null +++ b/templates/ja/option-conflict.tmpl @@ -0,0 +1,7 @@ +

エラー: 以下のオプションは競合します:

+ + + +

競合を解決するために、1つ以上のオプションを変更してください。

diff --git a/templates/ja/option-trailer.tmpl b/templates/ja/option-trailer.tmpl new file mode 100644 index 000000000..82566538f --- /dev/null +++ b/templates/ja/option-trailer.tmpl @@ -0,0 +1,5 @@ +
diff --git a/templates/ja/pager.tmpl b/templates/ja/pager.tmpl new file mode 100644 index 000000000..914d1d646 --- /dev/null +++ b/templates/ja/pager.tmpl @@ -0,0 +1,7 @@ + + + + + + +
{PREVURL?前を表示: }{ORDER=dec?昇順にソート:降順にソート}{NEXTURL?次を表示: }
diff --git a/templates/ja/printer-accept.tmpl b/templates/ja/printer-accept.tmpl new file mode 100644 index 000000000..073d1264e --- /dev/null +++ b/templates/ja/printer-accept.tmpl @@ -0,0 +1,3 @@ +

{is_class?クラス:プリンタ} {printer_name} +はジョブを受け付けるようになりました。

diff --git a/templates/ja/printer-added.tmpl b/templates/ja/printer-added.tmpl new file mode 100644 index 000000000..e01b4378f --- /dev/null +++ b/templates/ja/printer-added.tmpl @@ -0,0 +1 @@ +

プリンタ {printer_name} は正しく追加されました。 diff --git a/templates/ja/printer-configured.tmpl b/templates/ja/printer-configured.tmpl new file mode 100644 index 000000000..1861afb6d --- /dev/null +++ b/templates/ja/printer-configured.tmpl @@ -0,0 +1 @@ +

プリンタ {printer_name} は正しく設定されました。 diff --git a/templates/ja/printer-confirm.tmpl b/templates/ja/printer-confirm.tmpl new file mode 100644 index 000000000..a4eb0e77f --- /dev/null +++ b/templates/ja/printer-confirm.tmpl @@ -0,0 +1,7 @@ +

警告: 本当にプリンタ +{printer_name} を削除してもよいですか?

+ +

プリンタの削除

diff --git a/templates/ja/printer-default.tmpl b/templates/ja/printer-default.tmpl new file mode 100644 index 000000000..c6290c92c --- /dev/null +++ b/templates/ja/printer-default.tmpl @@ -0,0 +1,6 @@ +

{is_class?クラス:プリンタ} {printer_name} +はサーバのデフォルトプリンタとなりました。

+ +
注意: lpoptions コマンドで設定されたユーザのデフォルトは、このサーバのデフォルト設定を上書きします。 +
diff --git a/templates/ja/printer-deleted.tmpl b/templates/ja/printer-deleted.tmpl new file mode 100644 index 000000000..7d48b8a35 --- /dev/null +++ b/templates/ja/printer-deleted.tmpl @@ -0,0 +1 @@ +

プリンタ {printer_name} は正しく削除されました。 diff --git a/templates/ja/printer-jobs-header.tmpl b/templates/ja/printer-jobs-header.tmpl new file mode 100644 index 000000000..d12840e47 --- /dev/null +++ b/templates/ja/printer-jobs-header.tmpl @@ -0,0 +1 @@ +

ジョブ

diff --git a/templates/ja/printer-modified.tmpl b/templates/ja/printer-modified.tmpl new file mode 100644 index 000000000..55d8aca79 --- /dev/null +++ b/templates/ja/printer-modified.tmpl @@ -0,0 +1 @@ +

プリンタ {printer_name} は正しく変更されました。 diff --git a/templates/ja/printer-purge.tmpl b/templates/ja/printer-purge.tmpl new file mode 100644 index 000000000..8057fef7f --- /dev/null +++ b/templates/ja/printer-purge.tmpl @@ -0,0 +1,3 @@ +

{is_class?クラス:プリンタ} {printer_name} +はすべてのジョブを削除しました。

diff --git a/templates/ja/printer-reject.tmpl b/templates/ja/printer-reject.tmpl new file mode 100644 index 000000000..bb2c4a887 --- /dev/null +++ b/templates/ja/printer-reject.tmpl @@ -0,0 +1,3 @@ +

{is_class?クラス:プリンタ} {printer_name} +はもうジョブを受け付けません。

diff --git a/templates/ja/printer-start.tmpl b/templates/ja/printer-start.tmpl new file mode 100644 index 000000000..daa27e193 --- /dev/null +++ b/templates/ja/printer-start.tmpl @@ -0,0 +1,3 @@ +

{is_class?クラス:プリンタ} {printer_name} +は開始しました。

diff --git a/templates/ja/printer-stop.tmpl b/templates/ja/printer-stop.tmpl new file mode 100644 index 000000000..494aae708 --- /dev/null +++ b/templates/ja/printer-stop.tmpl @@ -0,0 +1,3 @@ +

{is_class?クラス:プリンタ} {printer_name} +は停止しました。

diff --git a/templates/ja/printers-header.tmpl b/templates/ja/printers-header.tmpl new file mode 100644 index 000000000..f9c78f0df --- /dev/null +++ b/templates/ja/printers-header.tmpl @@ -0,0 +1 @@ +

{total=0?プリンタがありません:{total} 個のプリンタのうち {#printer_name} 個を表示中}。

diff --git a/templates/ja/printers.tmpl b/templates/ja/printers.tmpl new file mode 100644 index 000000000..a23959cb5 --- /dev/null +++ b/templates/ja/printers.tmpl @@ -0,0 +1,60 @@ +{#printer_name=0?: +{[printer_name] +

{printer_name}{default_name={printer_name}? (デフォルトプリンタ):} +{?printer_state_message=?:"{printer_state_message}"}

+ + + + + + +
+ +説明: {printer_info}
+場所: {printer_location}
+メーカとモデル: {printer_make_and_model}
+プリンタの状態: {printer_state=3?待機中:{printer_state=4?処理中:停止}}, +{printer_is_accepting_jobs=0?ジョブを拒否中:ジョブを受け付け中}, {printer_is_shared=0?not:} 公開。 +{?device_uri=?:
デバイス URI: {device_uri}} + +

+ +テストページの印刷 +{printer_state=5? + +プリタを開始 +: + +プリンタを停止 +} +{printer_is_accepting_jobs=0? + +ジョブを受け付け +: + +ジョブを拒否 +} + +すべてのジョブの移動 + +すべてのジョブをキャンセル +{printer_is_shared=0? + +プリンタを公開 +: + +プリンタを非公開 +} + +プリンタの変更 + +プリンタオプションの設定 + +プリンタの削除 + +デフォルトに設定 + +許可するユーザの設定 +

+
+}} diff --git a/templates/ja/restart.tmpl b/templates/ja/restart.tmpl new file mode 100644 index 000000000..9801f512b --- /dev/null +++ b/templates/ja/restart.tmpl @@ -0,0 +1 @@ +

サーバが再起動するあいだ、しばらくお待ちください...

diff --git a/templates/ja/samba-export.tmpl b/templates/ja/samba-export.tmpl new file mode 100644 index 000000000..46587f623 --- /dev/null +++ b/templates/ja/samba-export.tmpl @@ -0,0 +1,56 @@ + + +
+ + +

プリンタを Samba にエキスポート

+ +{error?

プリンタを Samba にエキスポートできません\:

+
{error}
+

より詳細な情報については error_log ファイルを参照してください。

: +

このページは、Windows クライアントがデスクトップ上の +マイネットワーク や ネットワークの場所 +アイコン経由でアクセスできるよう、プリンタの Samba +へのエキスポートを許可します。cupsaddsmb(8) man ページに書かれているように、 +事前に Windows PostScript ドライバをインストールしておく必要があります。 +

} + + + + + + + + + + + + + + + + + + +
プリンタ: +
+ すべてのプリンタをエキスポート +
Samba のユーザ名: (必須)
Samba のパスワード: (必須)
+ +
diff --git a/templates/ja/samba-exported.tmpl b/templates/ja/samba-exported.tmpl new file mode 100644 index 000000000..854834a0f --- /dev/null +++ b/templates/ja/samba-exported.tmpl @@ -0,0 +1 @@ +

プリンタは Samba に正しくエキスポートされました。

diff --git a/templates/ja/search.tmpl b/templates/ja/search.tmpl new file mode 100644 index 000000000..04c8e17a5 --- /dev/null +++ b/templates/ja/search.tmpl @@ -0,0 +1,10 @@ +
+{WHICH_JOBS?:} +{ORDER?:} + +

+{SEARCH_DEST?{SEARCH_DEST}:{SECTION=classes?クラス:{SECTION=jobs?ジョブ:プリンタ}}} 内を検索: +

+ +
diff --git a/templates/ja/test-page.tmpl b/templates/ja/test-page.tmpl new file mode 100644 index 000000000..a4f42fa88 --- /dev/null +++ b/templates/ja/test-page.tmpl @@ -0,0 +1,2 @@ +

テストページを送信しました; ジョブ ID は +{printer_name}-{job_id} です。 diff --git a/templates/ja/users.tmpl b/templates/ja/users.tmpl new file mode 100644 index 000000000..fb4e3dde4 --- /dev/null +++ b/templates/ja/users.tmpl @@ -0,0 +1,26 @@ +

+ + +{IS_CLASS?:} + +

{printer_name}に許可するユーザ

+ + + + + + + + + + +
ユーザ: + +
+これらのユーザの印刷を許可 +これらのユーザの印刷を禁止 +
+ +
+ +
diff --git a/templates/jobs.tmpl b/templates/jobs.tmpl index 76d8ac877..b18604edc 100644 --- a/templates/jobs.tmpl +++ b/templates/jobs.tmpl @@ -1,5 +1,5 @@ {#job_id=0?: - +
diff --git a/templates/pager.tmpl b/templates/pager.tmpl index c95f0c559..4f017c280 100644 --- a/templates/pager.tmpl +++ b/templates/pager.tmpl @@ -1,4 +1,4 @@ -
ID  Name 
+
diff --git a/templates/printers.tmpl b/templates/printers.tmpl index 0520b5afc..e3ee1aa87 100644 --- a/templates/printers.tmpl +++ b/templates/printers.tmpl @@ -3,7 +3,7 @@

{printer_name}{default_name={printer_name}? (Default Printer):} {?printer_state_message=?:"{printer_state_message}"}

-
{PREVURL?Show Previous: } {ORDER=dec?Sort Ascending:Sort Descending}
+
diff --git a/test/4.2-cups-printer-ops.test b/test/4.2-cups-printer-ops.test index 38565cdf4..107123888 100644 --- a/test/4.2-cups-printer-ops.test +++ b/test/4.2-cups-printer-ops.test @@ -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. # @@ -235,7 +235,28 @@ 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 $" # diff --git a/test/5.8-cancel.sh b/test/5.8-cancel.sh index 34be1712f..926bc9eb6 100644 --- a/test/5.8-cancel.sh +++ b/test/5.8-cancel.sh @@ -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 $". # diff --git a/test/Dependencies b/test/Dependencies index cb014d95d..15b3056c8 100644 --- a/test/Dependencies +++ b/test/Dependencies @@ -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 index 000000000..54f8df4c8 --- /dev/null +++ b/test/get-printers.test @@ -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 +} diff --git a/test/ipptest.c b/test/ipptest.c index 199ebe44f..c075cf412 100644 --- a/test/ipptest.c +++ b/test/ipptest.c @@ -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 $". */ diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index 8f506093d..87f648b99 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -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 @@ -30,6 +30,18 @@ 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 "

IPP Compliance Tests

" >>$strfile +echo "

1 - IPP Compliance Tests

" >>$strfile echo "

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 "" >>$strfile echo "Running command tests..." -echo "

Command Tests

" >>$strfile +echo "

2 - Command Tests

" >>$strfile echo "

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 "

Log Files

" >>$strfile +echo "

3 - Log Files

" >>$strfile echo "

access_log

" >>$strfile echo "
" >>$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 $"
 #
diff --git a/test/str-header.html b/test/str-header.html
index 60656b6a6..dce337f4b 100644
--- a/test/str-header.html
+++ b/test/str-header.html
@@ -1,35 +1,25 @@
 
 
 	
-	
-	
+	
+	
 	
-	CUPS Software Test Report
+	CUPS 1.2 Software Test Report
 
 
 
-

Scope

- -

Identification

+

CUPS 1.2 Software Test Report

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. - - +UNIX Printing System ("CUPS") Version 1.2.

Document Overview

This software test plan is organized into the following sections:

    -
  • 1 - Scope
  • -
  • 2 - References
  • -
  • 3 - IPP Compliance Tests
  • -
  • 4 - Command Tests
  • -
  • 5 - Log Files
  • -
  • A - Glossary
  • +
  • 1 - IPP Compliance Tests
  • +
  • 2 - Command Tests
  • +
  • 3 - Log Files
- - - diff --git a/test/str-trailer.html b/test/str-trailer.html index 4c8ddd526..e04310fdd 100644 --- a/test/str-trailer.html +++ b/test/str-trailer.html @@ -1,5 +1,2 @@ - - - diff --git a/tools/checkglobals b/tools/checkglobals new file mode 100755 index 000000000..c20d94f15 --- /dev/null +++ b/tools/checkglobals @@ -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 diff --git a/tools/makesrcdist b/tools/makesrcdist index de9355472..50858a921 100755 --- a/tools/makesrcdist +++ b/tools/makesrcdist @@ -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!" # -- 2.39.2