]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Load cups into easysw/current.
authorjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 14 Mar 2007 16:55:44 +0000 (16:55 +0000)
committerjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 14 Mar 2007 16:55:44 +0000 (16:55 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@279 a1ca3aef-8c08-0410-bb20-df032aa958be

417 files changed:
CHANGES-1.2.txt [new file with mode: 0644]
CHANGES.txt
INSTALL.txt
LICENSE.txt
Makedefs.in
Makefile
README.txt
backend/Dependencies
backend/Makefile
backend/backend-private.h
backend/easysw-firewire-design.txt [new file with mode: 0644]
backend/easysw-firewire-linux.txt [new file with mode: 0644]
backend/ieee1284.c
backend/ieee1394-linux.c [new file with mode: 0644]
backend/ieee1394.c [new file with mode: 0644]
backend/ieee1394.h [new file with mode: 0644]
backend/ipp.c
backend/lpd.c
backend/pap.c
backend/parallel.c
backend/runloop.c
backend/scsi.c
backend/serial.c
backend/snmp.c
backend/socket.c
backend/test1284.c
backend/usb-darwin.c
backend/usb-unix.c
backend/usb.c
berkeley/Dependencies
berkeley/lpc.c
berkeley/lpq.c
berkeley/lpr.c
berkeley/lprm.c
cgi-bin/Dependencies
cgi-bin/Makefile
cgi-bin/admin.c
cgi-bin/classes.c
cgi-bin/help-index.c
cgi-bin/help-index.h
cgi-bin/html.c
cgi-bin/ipp-var.c
cgi-bin/jobs.c
cgi-bin/printers.c
cgi-bin/search.c
cgi-bin/template.c
cgi-bin/testhi.c
cgi-bin/testhi.html
cgi-bin/var.c
conf/cupsd.conf.in
conf/mime.types
config-scripts/cups-common.m4
config-scripts/cups-compiler.m4
config-scripts/cups-defaults.m4
config-scripts/cups-directories.m4
config-scripts/cups-dnssd.m4 [new file with mode: 0644]
config-scripts/cups-gssapi.m4 [new file with mode: 0644]
config-scripts/cups-image.m4
config-scripts/cups-largefile.m4
config-scripts/cups-ldap.m4
config-scripts/cups-manpages.m4
config-scripts/cups-network.m4
config-scripts/cups-opsys.m4
config-scripts/cups-poll.m4 [new file with mode: 0644]
config-scripts/cups-sharedlibs.m4
config-scripts/cups-ssl.m4
config-scripts/cups-threads.m4
config.h.in
configure.in
cups-config.in
cups/Dependencies
cups/Makefile
cups/adminutil.c
cups/adminutil.h
cups/api-filter.shtml
cups/array.c
cups/array.h
cups/attr.c
cups/auth.c
cups/backchannel.c
cups/cups.h
cups/dest.c
cups/emit.c
cups/encode.c
cups/file.c
cups/file.h
cups/getifaddrs.c
cups/getputfile.c
cups/globals.c
cups/globals.h
cups/http-addrlist.c
cups/http-private.h
cups/http-support.c
cups/http.c
cups/http.h
cups/i18n.h
cups/ipp-private.h
cups/ipp-support.c
cups/ipp.c
cups/ipp.h
cups/langprintf.c
cups/language.c
cups/localize.c
cups/mark.c
cups/md5passwd.c
cups/notify.c
cups/options.c
cups/page.c
cups/ppd.c
cups/request.c
cups/sidechannel.c [new file with mode: 0644]
cups/sidechannel.h [new file with mode: 0644]
cups/snprintf.c
cups/string.c
cups/tempfile.c
cups/testfile.c
cups/testhttp.c
cups/testi18n.c
cups/testipp.c
cups/testppd.c
cups/transcode.c
cups/usersys.c
cups/util.c
data/testprint.ps
doc/Makefile
doc/cups.css
doc/fr/index.html.in
doc/help/api-array.html
doc/help/api-cups.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-raster.html
doc/help/license.html
doc/help/ref-client-conf.html
doc/help/ref-cupsd-conf.html
doc/help/spec-ipp.html
doc/help/spec-pdf.html [new file with mode: 0644]
doc/help/spec-postscript.html [new file with mode: 0644]
doc/help/spec-ppd.html
doc/help/standard.html.in
doc/help/translation.html
doc/help/whatsnew.html
doc/images/button-add-rss-subscription.gif [new file with mode: 0644]
doc/images/button-cancel-subscription.gif [new file with mode: 0644]
doc/pl/images/button-accept-jobs.gif
doc/pl/images/button-add-class.gif
doc/pl/images/button-add-printer.gif
doc/pl/images/button-add-this-printer.gif
doc/pl/images/button-cancel-all-jobs.gif
doc/pl/images/button-cancel-job.gif
doc/pl/images/button-change-settings.gif
doc/pl/images/button-clean-print-heads.gif
doc/pl/images/button-clear.gif
doc/pl/images/button-continue.gif
doc/pl/images/button-delete-class.gif
doc/pl/images/button-delete-printer.gif
doc/pl/images/button-edit-configuration-file.gif
doc/pl/images/button-export-samba.gif
doc/pl/images/button-help.gif
doc/pl/images/button-hold-job.gif
doc/pl/images/button-manage-classes.gif
doc/pl/images/button-manage-jobs.gif
doc/pl/images/button-manage-printers.gif
doc/pl/images/button-manage-server.gif
doc/pl/images/button-modify-class.gif
doc/pl/images/button-modify-printer.gif
doc/pl/images/button-move-job.gif
doc/pl/images/button-move-jobs.gif
doc/pl/images/button-print-self-test-page.gif
doc/pl/images/button-print-test-page.gif
doc/pl/images/button-publish-printer.gif
doc/pl/images/button-reject-jobs.gif
doc/pl/images/button-release-job.gif
doc/pl/images/button-restart-job.gif
doc/pl/images/button-save-changes.gif
doc/pl/images/button-search.gif
doc/pl/images/button-set-allowed-users.gif
doc/pl/images/button-set-as-default.gif
doc/pl/images/button-set-printer-options.gif
doc/pl/images/button-show-active.gif
doc/pl/images/button-show-all.gif
doc/pl/images/button-show-completed.gif
doc/pl/images/button-show-next.gif
doc/pl/images/button-show-previous.gif
doc/pl/images/button-sort-ascending.gif
doc/pl/images/button-sort-descending.gif
doc/pl/images/button-start-class.gif
doc/pl/images/button-start-printer.gif
doc/pl/images/button-stop-class.gif
doc/pl/images/button-stop-printer.gif
doc/pl/images/button-unpublish-printer.gif
doc/pl/images/button-use-default-config.gif
doc/pl/images/button-view-access-log.gif
doc/pl/images/button-view-error-log.gif
doc/pl/images/button-view-page-log.gif
doc/pl/images/button-view-printable-version.gif
filter/Dependencies
filter/Makefile
filter/common.c
filter/common.h
filter/error.c [new file with mode: 0644]
filter/hpgl-prolog.c
filter/image-bmp.c
filter/image-colorspace.c
filter/image-gif.c
filter/image-jpeg.c
filter/image-photocd.c
filter/image-pix.c
filter/image-png.c
filter/image-pnm.c
filter/image-private.h
filter/image-sgi.c
filter/image-sun.c
filter/image-tiff.c
filter/imagetops.c
filter/imagetoraster.c
filter/interpret.c
filter/pstops.c
filter/raster.c
filter/raster.h
filter/rasterbench.c
filter/rastertolabel.c
filter/testraster.c
filter/texttops.c
init/cups.sh.in
init/org.cups.cupsd.plist
locale/Makefile
locale/cups.pot
locale/cups_de.po
locale/cups_es.po
locale/cups_et.po
locale/cups_fr.po
locale/cups_it.po
locale/cups_pl.po
locale/cups_sv.po
man/Makefile
man/classes.conf.man
man/cupsaddsmb.man.in
man/cupsd.conf.man.in
man/lpadmin.man
man/printers.conf.man
monitor/Dependencies
notifier/Dependencies
notifier/Makefile
notifier/rss.c [new file with mode: 0644]
notifier/testnotify.c
packaging/WELCOME.rtf
packaging/cups.list.in
packaging/cups.readme
packaging/cups.spec.in
pdftops/Dependencies
pdftops/pdftops.cxx
ppd/intelbar.ppd [new file with mode: 0644]
ppd/zebra.ppd
scheduler/Dependencies
scheduler/Makefile
scheduler/auth.c
scheduler/auth.h
scheduler/banners.c
scheduler/classes.c
scheduler/client.c
scheduler/client.h
scheduler/conf.c
scheduler/conf.h
scheduler/cups-driverd.c
scheduler/cups-lpd.c
scheduler/cups-polld.c
scheduler/cupsd.h
scheduler/dirsvc.c
scheduler/dirsvc.h
scheduler/filter.c
scheduler/ipp.c
scheduler/job.c
scheduler/job.h
scheduler/listen.c
scheduler/log.c
scheduler/main.c
scheduler/mime.c
scheduler/mime.h
scheduler/network.c
scheduler/network.h
scheduler/policy.c
scheduler/printers.c
scheduler/printers.h
scheduler/process.c
scheduler/quotas.c
scheduler/select.c [new file with mode: 0644]
scheduler/server.c
scheduler/statbuf.c
scheduler/subscriptions.c
scheduler/subscriptions.h
scheduler/sysman.c
scheduler/testlpd.c
scheduler/testmime.c
scheduler/testsub.c
scripting/java/src/com/easysw/cups/IPPBase64Encoder.java [deleted file]
scripting/php/Dependencies
standards/papi-1.0.pdf [new file with mode: 0644]
systemv/Dependencies
systemv/Makefile
systemv/accept.c
systemv/cancel.c
systemv/cupsaddsmb.c
systemv/cupstestdsc.c
systemv/cupstestppd.c
systemv/lp.c
systemv/lpadmin.c
systemv/lpinfo.c
systemv/lpmove.c
systemv/lpoptions.c
systemv/lppasswd.c
systemv/lpstat.c
templates/Makefile
templates/add-printer.tmpl
templates/add-rss-subscription.tmpl [new file with mode: 0644]
templates/admin.tmpl
templates/classes.tmpl
templates/de/add-printer.tmpl
templates/de/admin.tmpl
templates/de/edit-config.tmpl.in
templates/edit-config.tmpl.in
templates/es/add-printer.tmpl
templates/es/admin.tmpl
templates/es/edit-config.tmpl.in
templates/et/add-printer.tmpl
templates/et/admin.tmpl
templates/et/edit-config.tmpl.in
templates/fr/add-class.tmpl
templates/fr/add-printer.tmpl
templates/fr/admin.tmpl
templates/fr/choose-device.tmpl
templates/fr/choose-make.tmpl
templates/fr/choose-model.tmpl
templates/fr/choose-serial.tmpl
templates/fr/choose-uri.tmpl
templates/fr/class-added.tmpl
templates/fr/class-confirm.tmpl
templates/fr/class-deleted.tmpl
templates/fr/class-jobs-header.tmpl
templates/fr/class-modified.tmpl
templates/fr/classes-header.tmpl
templates/fr/classes.tmpl
templates/fr/edit-config.tmpl.in
templates/fr/error-op.tmpl
templates/fr/error.tmpl
templates/fr/header.tmpl.in
templates/fr/help-header.tmpl
templates/fr/help-printable.tmpl
templates/fr/job-cancel.tmpl
templates/fr/job-hold.tmpl
templates/fr/job-move.tmpl
templates/fr/job-moved.tmpl
templates/fr/job-release.tmpl
templates/fr/job-restart.tmpl
templates/fr/jobs-header.tmpl
templates/fr/jobs.tmpl
templates/fr/maintenance.tmpl
templates/fr/modify-class.tmpl
templates/fr/modify-printer.tmpl
templates/fr/norestart.tmpl
templates/fr/option-boolean.tmpl
templates/fr/option-conflict.tmpl
templates/fr/option-header.tmpl
templates/fr/option-pickmany.tmpl
templates/fr/option-pickone.tmpl
templates/fr/option-trailer.tmpl
templates/fr/pager.tmpl
templates/fr/printer-accept.tmpl
templates/fr/printer-added.tmpl
templates/fr/printer-configured.tmpl
templates/fr/printer-confirm.tmpl
templates/fr/printer-default.tmpl
templates/fr/printer-deleted.tmpl
templates/fr/printer-jobs-header.tmpl
templates/fr/printer-modified.tmpl
templates/fr/printer-purge.tmpl
templates/fr/printer-reject.tmpl
templates/fr/printer-start.tmpl
templates/fr/printer-stop.tmpl
templates/fr/printers-header.tmpl
templates/fr/printers.tmpl
templates/fr/restart.tmpl
templates/fr/samba-export.tmpl
templates/fr/samba-exported.tmpl
templates/fr/search.tmpl
templates/fr/set-printer-options-header.tmpl
templates/fr/set-printer-options-trailer.tmpl
templates/fr/test-page.tmpl
templates/fr/trailer.tmpl
templates/fr/users.tmpl
templates/it/add-printer.tmpl
templates/it/admin.tmpl
templates/it/edit-config.tmpl.in
templates/ja/add-printer.tmpl
templates/ja/admin.tmpl
templates/ja/edit-config.tmpl.in
templates/pl/add-printer.tmpl
templates/pl/admin.tmpl
templates/pl/edit-config.tmpl.in
templates/printers.tmpl
templates/subscription-added.tmpl [new file with mode: 0644]
templates/subscription-canceled.tmpl [new file with mode: 0644]
templates/sv/add-printer.tmpl
templates/sv/admin.tmpl
templates/sv/edit-config.tmpl.in
test/4.2-cups-printer-ops.test
test/4.4-subscription-ops.test
test/Dependencies
test/Makefile
test/get-job-attributes.test
test/get-jobs.test [new file with mode: 0644]
test/ipptest.c
test/run-stp-tests.sh
tools/makesrcdist
tools/testosx
vcnet/config.h
vcnet/testhttp.vcproj [changed mode: 0644->0755]

diff --git a/CHANGES-1.2.txt b/CHANGES-1.2.txt
new file mode 100644 (file)
index 0000000..8c0c5f1
--- /dev/null
@@ -0,0 +1,1088 @@
+CHANGES-1.2.txt
+---------------
+
+CHANGES IN CUPS V1.2.8
+
+       - Documentation fixes (STR #2141, STR #2157)
+       - The HTTP upgrade redirection used by the scheduler did
+         not work with Internet Explorer (STR #2235)
+       - Members of a class with Unicode names did not appear
+         correctly in the web interface (STR #2154)
+       - Changing the "Save debugging information" setting in
+         the web interface no longer affects the other server
+         settings (STR #1993)
+       - The scheduler did not choose SSL certificates correctly
+         on Mac OS X (STR #2225)
+       - The scheduler could get in an infinite loop when
+         printing to a remote class (STR #2228)
+       - The jobs web page did not have separating space after
+         the number of pages column (STR #2230)
+       - Added French localization (STR #2221)
+       - Updated Spanish localization (STR #2223)
+       - Updated Japanese localization (STR #2216)
+       - cupsBorderlessScalingFacter was limited to a range of
+         0.9 to 1.1, but some printers need larger values (STR
+         #2222)
+       - Landscape printing of PDF files did not always work
+         (STR #2149)
+       - Fixed slow USB printing on Minolta printers (STR #2104,
+         STR #2219)
+       - The ZPL label printer driver could produce stretched
+         output (PR #6448)
+       - The IPP backend now clears the printer-state-message
+         when there are no outstanding errors or warnings (STR
+         #2126)
+       - The CUPS Java scripting support did not work with
+         recent versions of Java due to the use of Sun's private
+         Base64 class (STR #2152)
+       - The scheduler did not pass HTTP GET form variables to
+         custom CGI programs (STR #2173)
+       - The lpoptions command now displays the reason why a PPD
+         file cannot be found (STR #2184)
+       - The scheduler did not accept "none" as a browse
+         protocol name (STR #2200)
+       - The scheduler still loaded the remote printer cache,
+         even when browsing was disabled (STR #2198)
+       - The SNMP backend now shows OfficeJet printers with the
+         "HP" manufacturer prefix (STR #2151)
+       - Web interface HTML cleanup (STR #2153)
+       - The parallel backend consumed 100% CPU on FreeBSD due
+         to an apparently common parallel port driver bug (STR
+         #2161)
+       - ippReadIO() incorrectly returned IPP_IDLE when the
+         initial IPP message header could not be read (STR
+         #2179)
+       - cupsRasterInterpretPPD() did not support custom options
+         (STR #1960)
+       - Collated output produced by the PostScript filter could
+         lose some options (STR #2137)
+       - job-hold-until with time values for the next day would
+         be held for 60 days (STR #2144)
+       - Some types of Sun raster files did not print correctly
+         (STR #2107)
+       - Raw PBM files did not print correctly (STR #2106)
+       - The SNMP backend no longer uses IPP with HP printers,
+         as some recent firmware versions appear to not work
+         (STR #2055)
+       - cupsMarkOptions() did not handle the
+         multiple-document-handling option (STR #2135)
+       - lpstat did not show the local job ID of active printers
+         (STR #2125)
+       - The backends incorrectly used STATUS:
+         media-tray-empty-error messages for out-of-paper
+         conditions (STR #2123, STR #2124)
+       - cupsGetPPD2() returned the wrong error when the PPD
+         file did not exist (STR #2122)
+       - cupsDoAuthentication() did not translate the password
+         prompt (STR #2121)
+       - httpGetLength2() did not handle error messages without
+         content correctly (STR #2133)
+       - Added support for 32/64-bit libraries on HP-UX Itanium
+         systems (STR #2115)
+       - Fixed a configure script problem with the 32/64-bit
+         library support (STR #2114)
+       - The PostScript filter did not properly output document
+         setup commands for reversed output (STR #2111)
+       - The scheduler did not parse IPv6 netmasks properly (STR
+         #2117)
+
+
+CHANGES IN CUPS V1.2.7
+
+       - Documentation updates (STR #2089)
+       - Added an Italian translation (STR #2105)
+       - The PostScript filter now rotates the bounding box
+         values as needed (STR #2079)
+       - The scheduler no longer loads the remote printer cache
+         when browsing is disabled (STR #2084)
+       - The scheduler no longer writes a new launchd
+         configuration file if it doesn't have to (STR #2083)
+       - Updated the USB and PAP backends for Mac OS X (STR
+         #2086)
+       - The scheduler now picks up on changes to IPv6 and DNS
+         configuration on Mac OS X (STR #2085)
+       - The lpstat program could still hang (STR #2098)
+       - Fixed an inefficiency in the SNMP IPP detection code
+         (STR #2100)
+       - The SSL negotiation code did not implement short
+         timeouts (STR #2091)
+
+
+CHANGES IN CUPS V1.2.6
+
+       - The web interface was not localized on Mac OS X (STR
+         #2075)
+       - "lpc status" did not show the number of queued jobs for
+         disabled queues (STR #2069)
+       - The lpstat program could hang (STR #2073)
+       - The serial backend did not support the new USB serial
+         filenames on Linux (STR #2061)
+       - The parallel backend did not support bidirectional I/O
+         properly (STR #2056)
+       - The network backends now log the numeric address that
+         is being used (STR #2046)
+       - Fixed a compile error when using libpaper.
+       - Fixed a compile error when compiling on Solaris with
+         threading enabled (STR #2049, STR #2050)
+       - Missing printer-state-changed event for
+         printer-state-message updates (STR #2047)
+
+
+CHANGES IN CUPS V1.2.5
+
+       - Documentation updates (STR #2038)
+       - The SNMP backend no longer uses IPP for Epson printers
+         (STR #2028)
+       - Updated the configure script for Tru64 UNIX 5.1 (STR
+         #2033)
+       - Tru64 5.1B's getaddrinfo() and getnameinfo() functions
+         leak file descriptors (STR #2034)
+       - cupsAddDest() didn't add the parent destination's
+         options and attributes.
+       - ppdConflicts() did not handle custom option
+         constraints.
+       - Raw printing of gzip'd files did not work (STR #2009)
+       - The scheduler no longer preserves default option
+         choices when the new PPD no longer provides the old
+         default choice (STR #1929)
+       - The Linux SCSI backend is now only built if the SCSI
+         development headers are installed.
+       - USB printing to Minolta printers did not work (STR
+         #2019)
+       - Windows clients could not monitor the queue status (STR
+         #2006)
+       - The scheduler didn't log the operation name in the
+         access_log file for Create-Job and Print-Job requests.
+       - The PostScript filter now separates collated copies
+         with any required JCL commands so that JCL-based
+         finishing options act on the individual copies and not
+         all of the copies as a single document.
+       - The PostScript filter now disables duplex printing when
+         printing a 1-page document.
+       - cups-lpd didn't pass the correct
+         job-originating-host-name value (STR #2023)
+       - Fixed some speling errors in the German message catalog
+         (STR #2012)
+       - cupstestppd did not catch PPD files with bad
+         UIConstraints values (STR #2016)
+       - The USB backend did not work with the current udev-
+         created printers if the first printer was disconnected
+         (STR #2017)
+       - Mirrored and rotated printing did not work with some
+         documents (STR #2004)
+       - 2-sided printing with banners did not work properly on
+         some printers (STR #2018)
+       - Updated the raw type rule to handle PJL within the
+         first 4k of a print job (STR #1969)
+       - Added an Estonian translation (STR #1957)
+       - Clarified the documentation for the cupsd.conf @LOCAL
+         and @IF(name) allow/deny functionality (STR #1992)
+       - The PostScript filters did not escape the Title and For
+         comments in the print job header (STR #1988)
+       - The scheduler would use 100% CPU if browsing was
+         disabled and the cupsd.conf file contained BrowsePoll
+         lines (STR #1994)
+       - The cupsDirRead() function did not work properly on
+         non-POSIX-compliant systems (STR #2001)
+       - The cupsFile functions didn't handle read/write errors
+         properly (STR #1996)
+       - The DBUS support now works with older versions of the
+         DBUS library.
+
+
+CHANGES IN CUPS V1.2.4
+
+       - The --with-printcap configure option did not work (STR
+         #1984)
+       - The character set reported by cupsLangGet() did not
+         always reflect the default character set of a given
+         locale (STR #1983)
+       - Older Lexmark and Tektronix printers did not work with
+         IPP (STR #1980)
+       - Failsafe printing did not work (PR #6328)
+       - Some web interface redirects did not work (STR #1978)
+       - The web interface change settings button could
+         introduce a "Port 0" line in cupsd.conf if there was no
+         loopback connection available (STR #1979)
+       - The web interface change settings and edit
+         configuration file buttons would truncate the
+         cupsd.conf file (STR #1976)
+       - The German web interface used the wrong printer icon
+         images (STR #1973)
+       - The "All Documents" link in the on-line help was
+         missing a trailing slash (STR #1971)
+       - The Polish web interface translation used the wrong
+         URLs for the job history (STR #1963)
+       - The "reprint job" button did not work (STR #1956)
+       - The scheduler did not always report printer or job
+         events properly (STR #1955)
+       - The scheduler always stopped the queue on error,
+         regardless of the exit code, if the error policy was
+         set to "stop-printer" (STR #1959)
+       - ppdEmitJCL() included UTF-8 characters in the JCL job
+         name, which caused problems on some printers (STR
+         #1959)
+       - Fixed a buffering problem that cause high CPU usage
+         (STR #1968)
+       - The command-line applications did not convert
+         command-line strings to UTF-8 as needed (STR #1958)
+       - cupsDirRead() incorrectly aborted when reading a
+         symbolic link that pointed to a file/directory that did
+         not exist (STR #1953)
+       - The cupsInterpretRasterPPD() function did not handle
+         custom page sizes properly.
+
+
+CHANGES IN CUPS V1.2.3
+
+       - The scheduler did not send job-state or
+         job-config-changed events when a job was held,
+         released, or changed (STR #1947)
+       - The scheduler now aborts if the configuration file and
+         directory checks fail (STR #1941)
+       - Fixed a problem with ippPort() not using the port
+         number that was set via the client.conf file or
+         CUPS_SERVER environment variable (STR #1945)
+       - HTTP headers were not buffered (STR #1899)
+       - Some IPP printers (HP) did not like UTF-8 job names
+         (STR #1837)
+       - The CUPS desktop icon is now localized for Polish (STR
+         #1920)
+       - Printer options were not always honored when printing
+         from Windows clients (STR #1839)
+       - The openssl command would lock up the scheduler when
+         generating an encryption certificate on some platforms
+         due to a lack of entropy for the random number
+         generator (STR #1876)
+       - The web admin page did not recognize that "Listen 631"
+         enabled remote access (STR #1908)
+       - The web admin page did not check whether changes were
+         made to the Basic Server Settings check boxes (STR
+         #1908)
+       - The IPP backend could generate N*N copies in certain
+         edge cases.
+       - The scheduler did not restore remote printers properly
+         when BrowseShortNames was enabled (STR #1893)
+       - Polling did not handle changes to the network
+         environment on Mac OS X (STR #1896)
+       - The "make test" subscription tests used invalid
+         notify-recipient-uri values (STR #1910)
+       - Printers could be left in an undefined state on system
+         sleep (STR #1905)
+       - The Berkeley and System V commands did not always use
+         the expected character set (STR #1915)
+       - Remote printing fixes (STR #1881)
+       - The cupstestppd utility did not validate translation
+         strings for custom options properly.
+       - Multi-language PPD files were not properly localized in
+         the web interface (STR #1913)
+       - The admin page's simple settings options did not check
+         for local domain socket or IPv6 addresses and did not
+         use "localhost" as the listen address.
+       - An empty BrowseProtocols, BrowseLocalProtocols, or
+         BrowseRemoteProtocols line would crash the scheduler
+         instead of disabling the corresponding browsing options.
+       - The scheduler now logs IPP operation status as debug
+         messages instead of info or error.
+       - cupsFileRewind() didn't clear the end-of-file state.
+       - cupstestppd didn't report the actual misspelling of the
+         1284DeviceID attribute (STR #1849) 
+       - BrowseRelay didn't work on Debian (STR #1887)
+       - configure --without-languages didn't work (STR #1879)
+       - Manually added remote printers did not work (STR #1881)
+       - The <cups/backend.h> header was not installed.
+       - Updated the build files for Autoconf 2.60 (STR #1853)
+       - The scheduler incorrectly terminated the polling
+         processes after receiving a partial log line.
+       - The cups-lpd mini-daemon reported "No printer-state
+         attribute found" errors when reporting the queue status
+         (PR #6250, STR #1821)
+       - SNMP backend improvements (STR #1737, STR #1742, STR
+         #1790, STR #1835, STR #1880)
+       - The scheduler erroneously reported an error with the
+         CGI pipe (STR #1860)
+       - Fixed HP-UX compile problems (STR #1858, STR #1859)
+       - cupstestppd crashed with some PPD files (STR #1864)
+       - The <cups/dir.h> and <cups/file.h> header files did not
+         work with C++.
+
+
+CHANGES IN CUPS V1.2.2
+
+       - Documentation updates (STR #1765, STR #1780)
+       - CUPS didn't know about alternate character set names
+         for Asian text (STR #1819)
+       - The lpoptions -o and -r options did not work unless you
+         specified a printer.
+       - The lpoptions command incorrectly allowed users to set
+         printer attributes like printer-type (STR #1791)
+       - httpWait() did not flush the write buffer, causing "bad
+         request" errors when communicating with CUPS 1.1.x
+         servers (STR #1717)
+       - Polling did not sanitize the printer description,
+         location, or make and model strings like broadcasts
+         did.
+       - Polled printers did not show the server's default
+         job-sheets option value.
+       - The Samba password prompt was not properly localized
+         (STR #1814)
+       - Added a German translation (STR #1842)
+       - The scheduler now creates self-signed SSL certficates
+         automatically when using OpenSSL and CDSA for
+         encryption, just as for GNU TLS.
+       - The SNMP backend sporatically reported some printers as
+         "unknown" (STR #1774)
+       - The scheduler now forces BrowseTimeout to be at least
+         twice the BrowseInterval value and non-zero to avoid
+         common configuration errors.
+       - The scheduler incorrectly returned printer URIs of the
+         form "ipp://server/printers/classname" for classes (STR
+         #1813)
+       - Updated Japanese localization (STR #1805)
+       - The scheduler's SSL certificate/key directory was not
+         created on installation (STR #1788)
+       - Added a mailto.conf man page and help page (STR #1754)
+       - The parallel and USB backends no longer wait for the
+         printer to go on-line - this caused problems with
+         certain printers that don't follow with the IEEE-1284
+         standard (STR #1738)
+       - The scheduler could crash on a reload when implicit
+         classes were present (STR #1828)
+       - The IPP backend incorrectly used the CUPS_ENCRYPTION
+         environment variable to determine the default
+         encryption mode when printing (STR #1820)
+       - USB printing did not work on Solaris (STR #1756)
+       - The scheduler sorted job priorities in the wrong order
+         (STR #1811)
+       - The scheduler did not automatically restart notifiers
+         that exited or crashed (STR #1793)
+       - IPv6 support did not work on NetBSD (STR #1834)
+       - The EPM packaging file did not work (STR #1804)
+       - The scheduler used up the CPU if BrowseRemoteProtocols
+         was empty (STR #1792)
+       - Custom page sizes did not work (STR #1787)
+       - The SNMP backend could crash on some systems when SNMP
+         logging was enabled (STR #1789)
+       - Browsing could produce some funny printer names when
+         ServerName was set to an IP address (STR #1799)
+       - Fixed the log message for BrowseRelay (STR #1798)
+       - Fixes to allow CUPS to compile on MirBSD (STR #1796)
+       - The scheduler incorrectly set the FINAL_CONTENT_TYPE
+         environment variable (STR #1795)
+       - The pdftops filter incorrectly embedded a "produced by"
+         comment, causing PDF printing not to work on some
+         operating systems (STR #1801)
+       - Sending raw jobs from a client system could cause the
+         client's scheduler to eventually crash (STR #1786)
+       - The scheduler now checks that the notifier exists prior
+         to accepting a new subscription request.
+       - The scheduler now reports the supported
+         notify-recipient schemes based on the contents of the
+         ServerBin/notifier directory.
+       - Event notifications did not include the
+         notify-sequence-number or other required attributes
+         (STR #1747)
+       - Allow/Deny addresses of the form "11.22.33.*" did not
+         work on Linux (STR #1769)
+       - cupsGetPPD() did not work if the scheduler was only
+         listening on a domain socket (STR #1766)
+       - The scheduler could crash advertising a class (STR
+         #1768)
+       - The scheduler could crash if the default printer was
+         deleted (STR #1776)
+       - Added a new default CUPS raster format (v3) which does
+         not compress the raster stream in order to provide the
+         same cupsRasterReadPixels() and cupsRasterWritePixels()
+         performance as CUPS 1.1.x.
+       - The cupsaddsmb man page listed the wrong files for the
+         CUPS driver.
+       - Some configure --with options did not work (STR #1746)
+       - "Allow @IF(name)" didn't work if "name" wasn't the
+         first network interface (STR #1758)
+       - The lpstat command did not use the correct character
+         set when reporting the date and time (STR #1751)
+       - The cupsaddsmb command and web interface did not update
+         the Windows PPD files properly, resulting in corrupt
+         PPD files for the Windows client to use (STR #1750)
+       - The cupsd.conf man page didn't describe the Listen
+         domain socket syntax (STR #1753)
+       - The scheduler no longer tries to support more than
+         FD_SETSIZE file descriptors.
+       - CDSA (encryption) support fixes for MacOS X.
+       - The lppasswd program needs to be setuid to root to
+         create and update the /etc/cups/passwd.md5 file (STR
+         #1735)
+       - 32/64-bit library installation was broken (STR #1741)
+       - The USB backend now reports a "no such device" error
+         when using the old filename-based USB URIs instead of
+         the "success" error.
+       - Increased the HTTP and IPP read timeouts to 10 seconds,
+         as 1 second was too short on congested networks (STR
+         #1719)
+       - The SNMP backend now uses the device description over
+         the printer-make-and-model attribute when the attribute
+         contains a generic name (STR #1728)
+       - Fixed another file descriptor leak when printing raw
+         files (STR #1736)
+       - Raw queues were not shared via LDAP (STR #1739)
+       - The pstops filter didn't always embed PageSetup
+         commands from the PPD file (STR #1740)
+       - "make install" didn't work if you disabled all of the
+         localizations.
+       - The scheduler didn't always choose the least costly
+         filter.
+       - Fixed parsing of IPv6 addresses in Allow, Deny,
+         BrowseAllow, BrowseDeny, and BrowseRelay directives
+         (STR #1713)
+       - Printers that were shared via LDAP did not get added to
+         the LDAP server properly (STR #1733)
+       - LDAP browsing would crash the scheduler if a required
+         value was missing (STR #1731)
+       - Special cases for the "localhost" hostname did not
+         work, causing printing to not work when the /etc/hosts
+         file did not contain a localhost entry (STR #1723)
+       - Updated the Spanish translation (STR #1720, STR #1770)
+       - Reverse-order page output was broken when N-up or
+         landscape orientations were used (STR #1725)
+       - The parallel, serial, socket, and USB backends needed
+         print data before they would report back-channel data,
+         causing problems with several new drivers (STR #1724)
+
+
+CHANGES IN CUPS V1.2.1
+
+       - "lprm -h hostname" did not work (STR #1800)
+       - The web interface did not handle reloads properly for
+         MSIE (STR #1716)
+       - The configure script no longer adds linker rpath
+         options when they are unnecessary.
+       - The scheduler could crash printing a debug message on
+         Solaris (STR #1714)
+       - The --enable-32bit and --enable-64bit configure options
+         did not always work.
+       - The password prompt showed the domain socket address
+         instead of "localhost" for local authentication (STR
+         #1706)
+       - The web interface filtered the list of printers even if
+         the user wasn't logged in (STR #1700)
+       - The IPP backend did not work reliably with some Xerox
+         printers (STR #1704)
+       - Trailing banners were not added when printing a single
+         file (STR #1698)
+       - The web interface support programs crashed on Solaris
+         (STR #1699)
+       - cupstestppd incorrectly reported problems with
+         *1284DeviceID attributes (STR #1710)
+       - Browsing could get disabled after a restart (STR #1670)
+       - Custom page sizes were not parsed properly (STR #1709)
+       - The -U option wasn't supported by lpadmin (STR #1702)
+       - The -u option didn't work with lpadmin (STR #1703)
+       - The scheduler did not create non-blocking back-channel
+         pipes, which caused problems when the printer driver
+         did not read the back-channel data (STR #1705)
+       - The scheduler no longer uses chunking in responses to
+         clients - this caused problems with older versions of
+         CUPS like 1.1.17 (PR #6143)
+       - Automatic raw printing was broken (STR #1667)
+       - 6-up printing was broken (STR #1697)
+       - The pstops filter did not disable CTRL-D processing on
+         the printer/RIP.
+       - ppdOpen*() did not load custom options properly (STR
+         #1680)
+       - "Set Printer Options" in the web interface did not
+         update the DefaultImageableArea or
+         DefaultPaperDimension attributes in the PPD file (STR
+         #1689)
+       - Fixed compile errors (STR #1682, STR #1684, STR #1685,
+         STR #1690)
+       - The lpstat command displayed the wrong error message
+         for a missing destination (STR #1683)
+       - Revised and completed the Polish translation (STR
+         #1669)
+       - Stopped jobs did not show up in the list of active jobs
+         (STR #1676)
+       - The configure script did not use the GNU TLS
+         "libgnutls-config" script to find the proper compiler
+         and linker options.
+       - The imagetoraster filter did not correctly generate
+         several 1, 2, and 4-bit color modes.
+       - cupsRasterWritePixels() could lose track of the current
+         output row.
+       - cupsRasterReadPixels() did not automatically swap
+         12/16-bit chunked pixel data.
+       - Moved the private _cups_raster_s structure out of the
+         public header.
+       - Updated the CUPS raster format specification to include
+         encoding rules and colorspace definitions.
+       - The Zebra PPD files had the wrong PostScript code for
+         the "default" option choices.
+       - The imagetoraster filter did not generate correct CIE
+         XYZ or Lab color data.
+       - The cups-config script did not work when invoked from a
+         source directory (STR #1673)
+       - The SNMP backend did not compile on systems that used
+         the getifaddrs emulation functions (STR #1668)
+
+
+CHANGES IN CUPS V1.2.0
+
+       - Documentation updates (STR #1618, STR #1620, STR #1622,
+         STR #1637)
+       - Static file copy buffers reduced from 64k to 32k to
+         work around bogus MallocDebug library assumptions (STR
+         #1660)
+       - The scheduler did not decode the backend exit code
+         properly (STR #1648)
+       - The MacOS X USB backend did not report the 1284 device ID,
+         nor did it fix device IDs returned by HP printers.
+       - The scheduler started more slowly than 1.1.x with large
+         numbers of printers (STR #1653)
+       - cupsRasterInterpretPPD() didn't support the
+         cupsPreferredBitsPerColor attribute, and imagetoraster
+         didn't use the new API.
+       - The "make test" script did not create all of the necessary
+         subdirectories for testing (STR #1638)
+       - The scheduler did not prevent rotation of logs
+         redirected to /dev/null (STR #1651)
+       - "make test" did not include the SNMP backend in the
+         test environment (STR #1625)
+       - The EPM packaging files did not work (STR #1621)
+       - "Use Default Configuration" inserted a broken
+         configuration file (STR #1624)
+       - Redirects in the web interface did not always preserve
+         the encrypted status of a connection (STR #1603)
+       - Added the Apple "pap" backend.
+       - Added CUPS library to CUPS Image shared library
+         linkage to support Linux --as-needed linker option
+         (STR #1606)
+       - Fixed support for --enable-pie (STR #1609)
+       - The pdftops filter did not validate the length of the
+         encryption key (STR #1608)
+       - Updated the Polish localization.
+       - "Encryption Required" in the cupsd.conf file now only
+         requires encryption when the connection is not over the
+         loopback interface or domain socket.
+       - Printer names containing "+" were not quoted properly in
+         the web interface (STR #1600)
+       - The SNMP backend now reports the make and model in the
+         information string so that the auto-generated printer
+         name is more useful than just an IP address.
+
+
+CHANGES IN CUPS V1.2rc3
+
+       - The cups-lpd program always did reverse lookups on the
+         client address, which could be a performance problem.
+         Added a "-n" option to disable lookups.
+       - When configured with SSL support, require encryption by
+         default when displaying the /admin location (STR #1592)
+       - The next job ID was not computed correctly if the job
+         cache file got out of sync with the spool directory
+         (STR #1582)
+       - The PNG image handling code used deprecated functions
+         from libpng (STR #1587)
+       - Added a Polish translation (STR #1584, STR #1586)
+       - More changes to the scheduler to improve battery life
+         on portable devices (STR #1583)
+       - Changed the default log level for status messages back
+         to "DEBUG" to be consistent with CUPS 1.1.x (STR #1579)
+       - The error string was not set properly when
+         cupsDoFileRequest() was given the name of a directory
+         (STR #1578)
+       - Fixed handling of job-hold-until (STR #1581)
+       - Added explicit notes to the cupsaddsmb man page
+         explaining that the driver filenames are case-sensitive
+         under UNIX and that they must be all lowercase (Windows
+         2000) or all UPPERCASE (Windows 95/98/Me) to work (STR
+         #1568)
+       - The USB backend incorrectly split the manufacturer name
+         if it contained spaces (STR #1566)
+       - The scheduler would hang when listing PPD files for a
+         manufacturer whose name contained spaces (STR #1567)
+       - Added the SNMP backend for network printer discovery
+         (STR #1555)
+       - cupstestppd now fails PPD files with 1284DeviceId
+         instead of 1284DeviceID, and cups-driverd uses a
+         case-insensitive comparison when looking for it (STR
+         #1573)
+       - cupsDoFileRequest() and cupsDoRequest() now work
+         properly with non-blocking HTTP connections.
+       - Added Swedish translation (STR #1569)
+       - "make install" now installs the MIME files with world
+         read permissions (STR #1565)
+       - More CDSA encryption support fixes (STR #1563)
+       - Updated the default mime.types file to support printing
+         of files that do not have a locally-recognized MIME
+         media type to raw or System V queues.
+       - Updated the serial port detection code on Linux (STR
+         #1562)
+       - Added some more error checking to httpGetHostname()
+         (STR #1561)
+       - The title of some administration pages was not
+         localized (STR #1548)
+       - The edit-config.tmpl file was not generated or
+         installed for the Spanish or Japanese localizations
+         (STR #1547)
+       - The mimeDelete() function freed the types before the
+         filters, but the filters needed the type data (STR #1558)
+       - The scheduler didn't keep track of the status pipes
+         properly, leading to a bad select() for multi-file jobs
+         (STR #1559)
+       - The cupstestdsc program didn't validate the ordinal
+         page number value for %%Page: comments.
+
+
+CHANGES IN CUPS V1.2rc2
+
+       - The scheduler was not always using the string pool,
+         causing random crashes.
+       - The lpmove and the web interface's Move Job button did
+         not work with stopped jobs (STR #1534)
+       - The PostScript filter did not handle the page-set
+         option properly with number-up printing (STR #1543)
+       - The scheduler now only warns about unsupported ACLs
+         once (STR #1532)
+       - The "fitplot" option did not work with output from
+         Mozilla (STR #1542)
+       - The imagetops filter did not work with Level 2 or 3
+         printers (STR #1533)
+       - The scheduler now recognizes PostScript files with PJL
+         commands that do not include an ENTER LANGUAGE command.
+       - Added --with-printcap configure option.
+       - 64-bit SSL fixes for MacOS X.
+       - The scheduler didn't send some printer state change
+         events.
+       - The scheduler didn't send jobs to busy remote printers.
+       - Fixed some problems with the launchd support.
+       - Added new USB printer backend for MacOS X.
+       - The PostScript filter now handles files that start with
+         an incomplete PJL header (PR #6076)
+       - The web interface language selection code did not try
+         the generic language localization (STR #1531)
+       - The language cache, string pool, and transcoding caches
+         are now process global instead of per-thread to avoid
+         problems with GNOME and to allow for data sharing
+         between threads (STR #1530)
+       - Fixed a CUPS 1.1.x compatibility bug (STR #1528)
+       - The web interface redirection after certain printer
+         administration tasks was broken (STR #1516)
+       - Web interface authorization could get stuck (STR #1512)
+       - Localization updates (STR #1513, STR #1518, STR #1520)
+       - The pstops filter didn't work with some files (STR
+         #1523)
+       - "./configure --enable-static" didn't work (STR #1522)
+       - The scheduler was not using the configured default
+         Group (STR #1521)
+       - The web interface still did not show the localized time
+         and date for some locales and systems (STR #1509)
+       - httpAddrGetList() would crash on systems without
+         getaddrinfo().
+       - Socket URIs without a trailing slash would cause the
+         port number to not be accepted (STR #1519)
+       - Local raw and System V printers were not advertised as
+         such for printer browsing (STR #1502)
+       - The RPM spec file incorrectly put duplicate copies of
+         the Japanese and Spanish web interface templates in the
+         main cups package (STR #1517)
+       - cupsSetDests() did not explicitly set the permissions
+         of the /etc/cups/lpoptions file (STR #1508)
+       - The lpq command crashed with the -h option (STR #1515)
+
+
+CHANGES IN CUPS V1.2rc1
+
+       - Documentation updates (STR #1497, STR #1498)
+       - The scheduler now redirects browsers to https: URLs
+         when encryption is required.
+       - The scheduler would crash when printing with a banner
+         (STR #1500)
+       - cups-driverd did not use the LanguageEncoding attribute
+         in PPD files to convert the NickName to UTF-8 (STR
+         #1503)
+       - The lpadmin command could not set the
+         printer-error-policy attribute (STR #1504)
+       - The web interface did not show the time and date in the
+         correct format for the locale (STR #1505)
+       - CUPS no longer accepts print jobs if a printer does not
+         support the file format (STR #1501)
+       - Cleaned up the PostScript filter (pstops) so that it
+         properly supports %%IncludeFeature and page scaling
+         (STR #1453)
+       - Fixed the cupsFileRewind() and cupsFileSeek() functions
+         to work properly with uncompressed files.
+       - Added cupsFileGetLine(), cupsFileStderr(),
+         cupsFileStdin(), and cupsFileStdout() functions to the
+         CUPS library.
+       - Added a new cupstestdsc program to test the DSC
+         conformance of PostScript files.
+       - Added KDE/GNOME icons and a Manage Printers menu item.
+       - Added --enable-image and --enable-pdftops configure
+         options to control whether the image and PDF filters
+         are built and installed (default = yes for all
+         platforms but MacOS X)
+       - Fixed a minor memory leak in the PPD API.
+       - Fixed transcoding issues (STR #1493)
+       - The scheduler now enforces a minimum job cost of 100
+         when doing FilterLimit checks.
+       - The scheduler would leak file descriptors when printing
+         to raw queues (STR #1491)
+       - The IPv6 support did not compile on Tru64 UNIX (STR
+         #1488)
+       - ppdOpen2() now converts the NickName and all UI text to
+         UTF-8 (STR #1475)
+       - The Set Allowed Users web page did not work (STR #1486)
+       - When the default policy was not set or set to a non-
+         existing policy, the scheduler did not set the default
+         policy name to "default" (STR #1484)
+       - The Zebra CPCL driver did not use the correct righthand
+         margin for the 4" wide label sizes.
+       - Fixed a problem with the parsing of fractional real
+         numbers in PPD files.
+       - Added Spanish localization files (STR #1480)
+       - Fixed localization of a few scheduler messages (STR
+         #1478)
+       - Fixed support for HEAD requests in the scheduler (STR
+         #1481)
+
+
+CHANGES IN CUPS V1.2b2
+
+       - Updated the CUPS design description.
+       - Added --enable-32bit and --enable-64bit configure
+         options to allow building of separate 32/64-bit
+         libraries on systems that support both environments
+         (STR #1472)
+       - Various compiler warning fixes.
+       - Fixes for Solaris 10 builds against old GNU TLS and
+         LDAP libraries.
+       - Added a cupsArrayUserData() function to retrieve the
+         user data pointer for an array (useful for typing
+         arrays)
+       - The ppdEmitString() function did not compute the
+         required buffer size properly, leading to dropped
+         characters on the end of the printer commands in pstops
+         and imagetops (STR #1470)
+
+
+CHANGES IN CUPS V1.2b1
+
+       - The serial backend now supports Equinox 8-port serial
+         hubs (STR #526)
+       - The IPP backend now supports a compression option to
+         compress print files as they are sent to the remote
+         server (STR #956)
+       - The CUPS browse protocol now supports passing of
+         default options and browse timeout values from the
+         server to the clients (STR #800)
+       - Implicit classes that timed out could cause the
+         scheduler to crash (STR #1439)
+       - Added DragonFly support in local device backends (STR
+         #1362)
+       - Added LDAP printer browsing support (STR #338)
+       - Added official support for printer maintenance commands
+         via the CUPS Command file format and hooks in the
+         printer-type and web interfaces (STR #932)
+       - The HP-GL/2 filter could get in an infinite loop trying
+         to convert HP-PCL files (STR #1415)
+       - CUPS now implements the HTTP/1.1 Expect header (STR
+         #1407)
+       - Options in PPD files are no longer automatically put in
+         an "Extra" group; rather, all options that are not
+         inside an Open/CloseGroup will be placed in the
+         "General" group (STR #1385)
+       - 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.
+       - All of the Berkeley (except for lpc) and System V
+         commands now support specification of user, host, and
+         port (STR #1028, STR #1029, STR #1087)
+       - The lpmove command now allows you to move all jobs for
+         a given queue (STR #56)
+       - The web interface now supports moving of a job or jobs
+         to another queue (STR #56)
+       - The web interface now provides searching, paging, and
+         changing of the sort/display order of classes, jobs,
+         and printers.
+       - cupsaddsmb now accepts a password on the command-line
+         and supports passwords with special characters (STR
+         #822, STR #1236)
+       - ppdLoad*() no longer tries to "fix" bad characters in
+         UI text (STR #1101)
+       - Printer names can now (reliably) contain Unicode
+         characters (STR #896)
+       - The lpstat command now shows the time and date of the
+         last printer state change instead of the hardcoded "Jan
+         01 00:00" (STR #659)
+       - The scheduler now adds a job-actual-printer-uri
+         attribute to job objects when printing to a class (STR
+         #116)
+       - The scheduler now logs log file open errors to the
+         system log (STR #1289)
+       - The scheduler now sets the job-originating-user-name to
+         the authenticated username, if available (STR #1318)
+       - The scheduler now only updates the permissions of SSL
+         keys and certificates when they are under the
+         ServerRoot directory (STR #1324)
+       - The rastertodymo driver has been renamed to
+         rastertolabel (a symlink is installed so that existing
+         queues continue to work) and now also supports Zebra's
+         CPCL language.
+       - The lpstat command could show the wrong active job for
+         a printer (STR #1301)
+       - Fixed a potential crash problem in the scheduler when
+         aborting a CGI program (STR #1290)
+       - Added a "cancel all jobs" button to the class and
+         printer web interfaces (STR #1140)
+       - The add-printer web page now shows the
+         set-printer-options page after the printer has been
+         added (STR #690)
+       - The classes web page now provides links to each of the
+         member printers (STR #307)
+       - CUPS now handles HTTP request/response lines up to 32k
+         in length; this is mainly for better cookie support
+         (STR #1274)
+       - Added support for the Apache PassEnv and SetEnv
+         directives to cupsd.conf (STR #853)
+       - Added large file (64-bit) support (STR #541)
+       - Fixed a performance issue with the ippReadIO()
+         implementation (STR #1284)
+       - Fixed a performance issue with the scheduler's implicit
+         class implementation (STR #1283)
+       - The pdftops filter now adds the Title and Creator
+         fields from the PDF file to the PostScript document
+         comments section (STR #539, STR #830)
+       - Added a new cups_array_t and cupsArray*() functions to
+         the CUPS API to support sorted lists of data.
+       - Made the CUPS API library thread-safe (STR #1276)
+       - Added "media" option support for EFI EFMediaType option
+         (STR #902)
+       - Added write buffering to the HTTP code to improve
+         performance (STR #547)
+       - The scheduler now uses the attributes-natural-language
+         attribute to localize banner pages (STR #386)
+       - The scheduler now returns the address that was used to
+         connect to it (STR #1076)
+       - Fixed a problem with N-up printing and OpenOffice (STR
+         #576)
+       - Added support for the GCC position independent
+         executable options (STR #1209)
+       - Added new BrowseLocalProtocols and
+         BrowseRemoteProtocols directives to cupsd.conf,
+         allowing for different browse protocols for local and
+         remote printers (STR #877)
+       - PPD files can now contain strings up to 256k in length
+         (STR #1215)
+       - The pstops filter now supports the IncludeFeature DSC
+         comment (STR #1212)
+       - The pstops filter now disables the setpagedevice
+         procedure when doing N-up printing (STR #1161)
+       - The serial backend now supports "stop=1", "stop=2",
+         "parity=space", and "parity=mark" options (STR #1155)
+       - "make install" no longer overwrites an existing PAM
+         configuration file (STR #1064)
+       - The scheduler now closes all files on startup when run
+         in daemon mode (STR #1009)
+       - Added a new RGBW colorspace to the CUPS raster format
+         (STR #1071)
+       - The pdftops filter now sets the page size based on the
+         media box when not scaling the output (STR #912)
+       - The pdftops filter now supports masked images (STR
+         #281)
+       - The pdftops filter produced large output when rendering
+         PDF files containing lot of repeated images (STR #327)
+       - The pdftops filter now minimizes print processing of
+         PDF files when using the page-ranges option (STR #273)
+       - Updated pdftops filter to Xpdf 3.01.
+       - Added new cupsBackchannelRead() and
+         cupsBackchannelWrite() functions, as well as
+         backchannel support to the parallel, serial, socket,
+         and USB backends (STR #1252)
+       - The parallel and USB backends now treat a "no space
+         available" error as an out-of-paper condition (STR
+         #1225)
+       - The "lpc" command now supports the "status all" command
+         (STR #1004)
+       - ippReadIO() did not read collections properly (STR
+         #1249)
+       - The "make test" script now creates the test files in
+         "/tmp/cups-$USER" instead of "/tmp/$USER" (STR #981)
+       - All backends now abort on error when printing a job to
+         a class - this allows the next printer in the class to
+         print the job (STR #1084)
+       - The scheduler now verifies that a printer supports
+         Letter or A4 media sizes before setting them as the
+         initial default (STR #1250)
+       - The cupstestppd program now flags bad Resolution
+         options (STR #1269)
+       - The USB backend now retries printing when the printer
+         is disconnected or turned off (STR #1267)
+       - Added new httpGetHostname() function to CUPS API, and
+         use it instead of gethostname() so that the web
+         interface will work correctly on systems whose hostname
+         is not the FQDN (STR #1266)
+       - The scheduler now stops printers if the backend for the
+         queue is missing on startup (STR #1265)
+       - The configure script now supports "--disable-library"
+         to disable particular image file format support
+         libraries, even if they are available on the build
+         system (STR #1248)
+       - The IPP backend did not always report on the total
+         number of pages that were printed (STR #1251)
+       - The lpstat program could display garbage date and time
+         values for locales whose date format exceeded 31
+         characters (STR #1263)
+       - The cupstestppd program would segfault when testing
+         certain broken PPD files (STR #1268)
+       - Dramatically reduced the overhead of implicit classes.
+       - Added new cupsDir*() functions to CUPS API.
+       - Printers can now be published individually for sharing.
+       - Fixed a bug in the scheduler's startup signalling code
+         which caused cupsd to send the SIGUSR1 signal to the
+         init process instead of the original parent process
+         (STR #1258)
+       - Added new on-line help CGI to web interface to provide
+         searchable help.
+       - Devices are now tracked dynamically, with each query
+         doing a new device scan.  This eliminates a previous
+         startup delay caused by slow backends and allows new
+         printers to be seen without restarting the server,
+         however it limits the amount of device URI checking
+         that can be done (basically now the scheduler only
+         requires a URI with a method that is a listed backend)
+       - Added new printer auto-detection, server configuration,
+         and log file viewing to the administration web page.
+       - Added new "set allowed users" web interface to set the
+         list of allowed users for a printer or class.
+       - The scheduler, command-line, and web interfaces now
+         limit the list of printers and classes to those
+         accessible by a user.
+       - cupsMarkOptions() now handles more non-standard
+         duplexing options and choices (STR #915)
+       - cups-lpd now honors remote banner requests with the
+         "standard" banner whenever a printer does not have one
+         defined (STR #1220)
+       - The scheduler's denial-of-service checks did not work
+         properly with IPv6 addresses (STR #1134)
+       - The lp and lpr commands did not error out properly when
+         they were unable to write to a temporary file (STR
+         #1129)
+       - The pstops filter did not handle Adobe-specific
+         comments in Windows NT driver output (STR #1085)
+       - "lpstat -l -p" incorrectly reported the printer
+         interface (STR #936)
+       - The web interface now operates exclusively with the
+         UTF-8 encoding, and sends the appropriate character set
+         and header information to the web browser (STR #919,
+         STR #1007)
+       - Added a "set allowed users" interface to the web
+         interface so that you can set the list of allowed or
+         denied users/groups for a printer or class.
+       - Disallow the "#" character in printer names, since it
+         has special meaning in the shell, config files, and in
+         URIs (STR #917, STR #1202)
+       - Added a new application/x-csource MIME type, and
+         support for it to the texttops filter so that you can
+         pretty print plain text files without the C/C++
+         keywords being highlighted.
+       - The pdftops filter did not compile with GCC 4.0 (STR
+         #1226)
+       - The texttops filter did not highlight preprocessor
+         directives followed by a tab properly.
+       - HP PJL output now uses both JOB DISPLAY and RDYMSG
+         commands to show the current job on the printer's
+         display (STR #1218)
+       - Local authentication certificates are now stored in
+         /var/run/cups/certs by default instead of
+         /etc/cups/certs (STR #1211)
+       - Backends now use "&" to separate options in device
+         URIs; "+" is still recognized but is deprecated (STR
+         #842)
+       - The USB backend no longer supports the usb:/dev/foo
+         format on systems that support device ID queries.
+       - Forced classification markings did not work when the
+         job-sheets parameters were "none,none".
+       - "lpstat -l -p" incorrectly showed all users as allowed,
+         even if the queue was restricted to certain users (STR
+         #801)
+       - The scheduler now automatically detects SSL/TLS clients
+         without using the SSLPort/SSLListen directives.
+       - The CUPS API and scheduler no longer support SSLv2-
+         encrypted connections.
+       - Updated the cupsaddsmb utility to correctly export the
+         CUPS driver for Windows.
+       - Fixed a signal-handling bug in httpRead() which
+         ultimately caused the server to print multiple copies
+         when it was busy (STR #1184)
+       - The cupsFile API now uses the O_APPEND option when
+         opening files in append mode (STR #990)
+       - The md5.h header and md5_* functions are now officially
+         private and have been renamed to avoid conflicts with
+         other implementations with the same name.
+       - The pdftops filter incorrectly embedded some Type1
+         fonts (STR #1093)
+       - The scheduler didn't detect a closed connection in the
+         middle of an IPP request (STR #1153)
+       - The scheduler could block trying to read the job status
+         if there was input pending and the job was cancelled in
+         the same input cycle (STR #1157)
+       - The scheduler could crash when deleting a class due to
+         infinite recursion.
+       - Updated the Zebra ZPL label printer driver to use the
+         run-length encoding and support more options.
+       - Updated serial backend to scan for /dev/ttyC* as well
+         as /dev/ttyc* for Cyclades serial ports (STR #1049)
+       - The scheduler could hang reading the job status under
+         certain circumstances (STR #1068)
+       - The USB backend termination signal code was inverted
+         (STR #1046)
+       - Moved enable and disable commands to sbindir to be
+         consistent.
+       - Added new cupsRasterInterpretPPD() function for RIP
+         filters to setup the raster page header from
+         PostScript commands in a PPD file.
+       - The CUPS browsing protocol now offers a "delete" bit
+         to remove printers as soon as they are deleted on the
+         server or as soon as the server shuts down gracefully
+         (STR #793)
+       - The CUPS_SERVER and ServerName directives (client.conf
+         and ~/.cupsrc) may now contain names of the form
+         "server:port" and "/path/to/domain/socket".
+       - The "cancel -u user" command now works for ordinary
+         users (STR #751)
+       - Added test run support to "make test" target (STR #64)
+       - Added domain socket support (STR #656)
+       - Added BrowseLocalOptions directive to allow the
+         administrator to add printer URI options to the browse
+         URI, e.g. "encryption=required" (STR #732)
+       - Added BrowseRemoteOptions directive to allow the
+         administrator to add standard URI options to the
+         remote printer URI, e.g. "encryption=required" (STR
+         #732)
+       - Now put "-I.." compiler option in front of all others
+         to ensure that local CUPS headers are used before
+         installed headers (STR #437)
+       - New cupsLangPrintf() and cupsLangPuts() for localized
+         interfaces.
+       - Now support custom attributes and extended options in
+         PPD files.
+       - Now provide functions to save PPD files.
+       - New policy mechanism allows per-operation and
+         per-printer control over what users and groups are
+         allowed to do various IPP operations.
+       - New error policy mechanism to control how aborted
+         backend errors are handled by the scheduler
+         (abort-job, retry-job, requeue-job, stop-printer)
+       - Updated the printer test page with a better color
+         wheel and a separate grayscale ramp.
+       - A single backend process is now run to send all print
+         data for a job.
+       - Backends and filters can now send and receive
+         backchannel data over file descriptor 3.
+       - Updated the raster stream format to support more
+         user-defined attributes and to do compression of the
+         page data.
index 4dd18bf0c0b4585c9d7410d59b1fa103dad7ea39..f5e4af6d3a621cc01c764e1bc9f90c75391bc70b 100644 (file)
-CHANGES.txt - 2007-02-06
+CHANGES.txt - 2007-02-19
 ------------------------
 
-CHANGES IN CUPS V1.2.8
-
-       - Documentation fixes (STR #2141, STR #2157)
-       - The HTTP upgrade redirection used by the scheduler did
-         not work with Internet Explorer (STR #2235)
-       - Members of a class with Unicode names did not appear
-         correctly in the web interface (STR #2154)
-       - Changing the "Save debugging information" setting in
-         the web interface no longer affects the other server
-         settings (STR #1993)
-       - The scheduler did not choose SSL certificates correctly
-         on Mac OS X (STR #2225)
-       - The scheduler could get in an infinite loop when
-         printing to a remote class (STR #2228)
-       - The jobs web page did not have separating space after
-         the number of pages column (STR #2230)
-       - Added French localization (STR #2221)
-       - Updated Spanish localization (STR #2223)
-       - Updated Japanese localization (STR #2216)
-       - cupsBorderlessScalingFacter was limited to a range of
-         0.9 to 1.1, but some printers need larger values (STR
-         #2222)
-       - Landscape printing of PDF files did not always work
-         (STR #2149)
-       - Fixed slow USB printing on Minolta printers (STR #2104,
-         STR #2219)
-       - The ZPL label printer driver could produce stretched
-         output (PR #6448)
-       - The IPP backend now clears the printer-state-message
-         when there are no outstanding errors or warnings (STR
-         #2126)
-       - The CUPS Java scripting support did not work with
-         recent versions of Java due to the use of Sun's private
-         Base64 class (STR #2152)
-       - The scheduler did not pass HTTP GET form variables to
-         custom CGI programs (STR #2173)
-       - The lpoptions command now displays the reason why a PPD
-         file cannot be found (STR #2184)
-       - The scheduler did not accept "none" as a browse
-         protocol name (STR #2200)
-       - The scheduler still loaded the remote printer cache,
-         even when browsing was disabled (STR #2198)
-       - The SNMP backend now shows OfficeJet printers with the
-         "HP" manufacturer prefix (STR #2151)
-       - Web interface HTML cleanup (STR #2153)
-       - The parallel backend consumed 100% CPU on FreeBSD due
-         to an apparently common parallel port driver bug (STR
-         #2161)
-       - ippReadIO() incorrectly returned IPP_IDLE when the
-         initial IPP message header could not be read (STR
-         #2179)
-       - cupsRasterInterpretPPD() did not support custom options
-         (STR #1960)
-       - Collated output produced by the PostScript filter could
-         lose some options (STR #2137)
-       - job-hold-until with time values for the next day would
-         be held for 60 days (STR #2144)
-       - Some types of Sun raster files did not print correctly
-         (STR #2107)
-       - Raw PBM files did not print correctly (STR #2106)
-       - The SNMP backend no longer uses IPP with HP printers,
-         as some recent firmware versions appear to not work
-         (STR #2055)
-       - cupsMarkOptions() did not handle the
-         multiple-document-handling option (STR #2135)
-       - lpstat did not show the local job ID of active printers
-         (STR #2125)
-       - The backends incorrectly used STATUS:
-         media-tray-empty-error messages for out-of-paper
-         conditions (STR #2123, STR #2124)
-       - cupsGetPPD2() returned the wrong error when the PPD
-         file did not exist (STR #2122)
-       - cupsDoAuthentication() did not translate the password
-         prompt (STR #2121)
-       - httpGetLength2() did not handle error messages without
-         content correctly (STR #2133)
-       - Added support for 32/64-bit libraries on HP-UX Itanium
-         systems (STR #2115)
-       - Fixed a configure script problem with the 32/64-bit
-         library support (STR #2114)
-       - The PostScript filter did not properly output document
-         setup commands for reversed output (STR #2111)
-       - The scheduler did not parse IPv6 netmasks properly (STR
-         #2117)
-
-
-CHANGES IN CUPS V1.2.7
-
-       - Documentation updates (STR #2089)
-       - Added an Italian translation (STR #2105)
-       - The PostScript filter now rotates the bounding box
-         values as needed (STR #2079)
-       - The scheduler no longer loads the remote printer cache
-         when browsing is disabled (STR #2084)
-       - The scheduler no longer writes a new launchd
-         configuration file if it doesn't have to (STR #2083)
-       - Updated the USB and PAP backends for Mac OS X (STR
-         #2086)
-       - The scheduler now picks up on changes to IPv6 and DNS
-         configuration on Mac OS X (STR #2085)
-       - The lpstat program could still hang (STR #2098)
-       - Fixed an inefficiency in the SNMP IPP detection code
-         (STR #2100)
-       - The SSL negotiation code did not implement short
-         timeouts (STR #2091)
-
-
-CHANGES IN CUPS V1.2.6
-
-       - The web interface was not localized on Mac OS X (STR
-         #2075)
-       - "lpc status" did not show the number of queued jobs for
-         disabled queues (STR #2069)
-       - The lpstat program could hang (STR #2073)
-       - The serial backend did not support the new USB serial
-         filenames on Linux (STR #2061)
-       - The parallel backend did not support bidirectional I/O
-         properly (STR #2056)
-       - The network backends now log the numeric address that
-         is being used (STR #2046)
-       - Fixed a compile error when using libpaper.
-       - Fixed a compile error when compiling on Solaris with
-         threading enabled (STR #2049, STR #2050)
-       - Missing printer-state-changed event for
-         printer-state-message updates (STR #2047)
-
-
-CHANGES IN CUPS V1.2.5
-
-       - Documentation updates (STR #2038)
-       - The SNMP backend no longer uses IPP for Epson printers
-         (STR #2028)
-       - Updated the configure script for Tru64 UNIX 5.1 (STR
-         #2033)
-       - Tru64 5.1B's getaddrinfo() and getnameinfo() functions
-         leak file descriptors (STR #2034)
-       - cupsAddDest() didn't add the parent destination's
-         options and attributes.
-       - ppdConflicts() did not handle custom option
-         constraints.
-       - Raw printing of gzip'd files did not work (STR #2009)
-       - The scheduler no longer preserves default option
-         choices when the new PPD no longer provides the old
-         default choice (STR #1929)
-       - The Linux SCSI backend is now only built if the SCSI
-         development headers are installed.
-       - USB printing to Minolta printers did not work (STR
-         #2019)
-       - Windows clients could not monitor the queue status (STR
-         #2006)
-       - The scheduler didn't log the operation name in the
-         access_log file for Create-Job and Print-Job requests.
-       - The PostScript filter now separates collated copies
-         with any required JCL commands so that JCL-based
-         finishing options act on the individual copies and not
-         all of the copies as a single document.
-       - The PostScript filter now disables duplex printing when
-         printing a 1-page document.
-       - cups-lpd didn't pass the correct
-         job-originating-host-name value (STR #2023)
-       - Fixed some speling errors in the German message catalog
-         (STR #2012)
-       - cupstestppd did not catch PPD files with bad
-         UIConstraints values (STR #2016)
-       - The USB backend did not work with the current udev-
-         created printers if the first printer was disconnected
-         (STR #2017)
-       - Mirrored and rotated printing did not work with some
-         documents (STR #2004)
-       - 2-sided printing with banners did not work properly on
-         some printers (STR #2018)
-       - Updated the raw type rule to handle PJL within the
-         first 4k of a print job (STR #1969)
-       - Added an Estonian translation (STR #1957)
-       - Clarified the documentation for the cupsd.conf @LOCAL
-         and @IF(name) allow/deny functionality (STR #1992)
-       - The PostScript filters did not escape the Title and For
-         comments in the print job header (STR #1988)
-       - The scheduler would use 100% CPU if browsing was
-         disabled and the cupsd.conf file contained BrowsePoll
-         lines (STR #1994)
-       - The cupsDirRead() function did not work properly on
-         non-POSIX-compliant systems (STR #2001)
-       - The cupsFile functions didn't handle read/write errors
-         properly (STR #1996)
-       - The DBUS support now works with older versions of the
-         DBUS library.
-
-
-CHANGES IN CUPS V1.2.4
-
-       - The --with-printcap configure option did not work (STR
-         #1984)
-       - The character set reported by cupsLangGet() did not
-         always reflect the default character set of a given
-         locale (STR #1983)
-       - Older Lexmark and Tektronix printers did not work with
-         IPP (STR #1980)
-       - Failsafe printing did not work (PR #6328)
-       - Some web interface redirects did not work (STR #1978)
-       - The web interface change settings button could
-         introduce a "Port 0" line in cupsd.conf if there was no
-         loopback connection available (STR #1979)
-       - The web interface change settings and edit
-         configuration file buttons would truncate the
-         cupsd.conf file (STR #1976)
-       - The German web interface used the wrong printer icon
-         images (STR #1973)
-       - The "All Documents" link in the on-line help was
-         missing a trailing slash (STR #1971)
-       - The Polish web interface translation used the wrong
-         URLs for the job history (STR #1963)
-       - The "reprint job" button did not work (STR #1956)
-       - The scheduler did not always report printer or job
-         events properly (STR #1955)
-       - The scheduler always stopped the queue on error,
-         regardless of the exit code, if the error policy was
-         set to "stop-printer" (STR #1959)
-       - ppdEmitJCL() included UTF-8 characters in the JCL job
-         name, which caused problems on some printers (STR
-         #1959)
-       - Fixed a buffering problem that cause high CPU usage
-         (STR #1968)
-       - The command-line applications did not convert
-         command-line strings to UTF-8 as needed (STR #1958)
-       - cupsDirRead() incorrectly aborted when reading a
-         symbolic link that pointed to a file/directory that did
-         not exist (STR #1953)
-       - The cupsInterpretRasterPPD() function did not handle
-         custom page sizes properly.
-
-
-CHANGES IN CUPS V1.2.3
-
-       - The scheduler did not send job-state or
-         job-config-changed events when a job was held,
-         released, or changed (STR #1947)
-       - The scheduler now aborts if the configuration file and
-         directory checks fail (STR #1941)
-       - Fixed a problem with ippPort() not using the port
-         number that was set via the client.conf file or
-         CUPS_SERVER environment variable (STR #1945)
-       - HTTP headers were not buffered (STR #1899)
-       - Some IPP printers (HP) did not like UTF-8 job names
-         (STR #1837)
-       - The CUPS desktop icon is now localized for Polish (STR
-         #1920)
-       - Printer options were not always honored when printing
-         from Windows clients (STR #1839)
-       - The openssl command would lock up the scheduler when
-         generating an encryption certificate on some platforms
-         due to a lack of entropy for the random number
-         generator (STR #1876)
-       - The web admin page did not recognize that "Listen 631"
-         enabled remote access (STR #1908)
-       - The web admin page did not check whether changes were
-         made to the Basic Server Settings check boxes (STR
-         #1908)
-       - The IPP backend could generate N*N copies in certain
-         edge cases.
-       - The scheduler did not restore remote printers properly
-         when BrowseShortNames was enabled (STR #1893)
-       - Polling did not handle changes to the network
-         environment on Mac OS X (STR #1896)
-       - The "make test" subscription tests used invalid
-         notify-recipient-uri values (STR #1910)
-       - Printers could be left in an undefined state on system
-         sleep (STR #1905)
-       - The Berkeley and System V commands did not always use
-         the expected character set (STR #1915)
-       - Remote printing fixes (STR #1881)
-       - The cupstestppd utility did not validate translation
-         strings for custom options properly.
-       - Multi-language PPD files were not properly localized in
-         the web interface (STR #1913)
-       - The admin page's simple settings options did not check
-         for local domain socket or IPv6 addresses and did not
-         use "localhost" as the listen address.
-       - An empty BrowseProtocols, BrowseLocalProtocols, or
-         BrowseRemoteProtocols line would crash the scheduler
-         instead of disabling the corresponding browsing options.
-       - The scheduler now logs IPP operation status as debug
-         messages instead of info or error.
-       - cupsFileRewind() didn't clear the end-of-file state.
-       - cupstestppd didn't report the actual misspelling of the
-         1284DeviceID attribute (STR #1849) 
-       - BrowseRelay didn't work on Debian (STR #1887)
-       - configure --without-languages didn't work (STR #1879)
-       - Manually added remote printers did not work (STR #1881)
-       - The <cups/backend.h> header was not installed.
-       - Updated the build files for Autoconf 2.60 (STR #1853)
-       - The scheduler incorrectly terminated the polling
-         processes after receiving a partial log line.
-       - The cups-lpd mini-daemon reported "No printer-state
-         attribute found" errors when reporting the queue status
-         (PR #6250, STR #1821)
-       - SNMP backend improvements (STR #1737, STR #1742, STR
-         #1790, STR #1835, STR #1880)
-       - The scheduler erroneously reported an error with the
-         CGI pipe (STR #1860)
-       - Fixed HP-UX compile problems (STR #1858, STR #1859)
-       - cupstestppd crashed with some PPD files (STR #1864)
-       - The <cups/dir.h> and <cups/file.h> header files did not
-         work with C++.
-
-
-CHANGES IN CUPS V1.2.2
-
-       - Documentation updates (STR #1765, STR #1780)
-       - CUPS didn't know about alternate character set names
-         for Asian text (STR #1819)
-       - The lpoptions -o and -r options did not work unless you
-         specified a printer.
-       - The lpoptions command incorrectly allowed users to set
-         printer attributes like printer-type (STR #1791)
-       - httpWait() did not flush the write buffer, causing "bad
-         request" errors when communicating with CUPS 1.1.x
-         servers (STR #1717)
-       - Polling did not sanitize the printer description,
-         location, or make and model strings like broadcasts
-         did.
-       - Polled printers did not show the server's default
-         job-sheets option value.
-       - The Samba password prompt was not properly localized
-         (STR #1814)
-       - Added a German translation (STR #1842)
-       - The scheduler now creates self-signed SSL certficates
-         automatically when using OpenSSL and CDSA for
-         encryption, just as for GNU TLS.
-       - The SNMP backend sporatically reported some printers as
-         "unknown" (STR #1774)
-       - The scheduler now forces BrowseTimeout to be at least
-         twice the BrowseInterval value and non-zero to avoid
-         common configuration errors.
-       - The scheduler incorrectly returned printer URIs of the
-         form "ipp://server/printers/classname" for classes (STR
-         #1813)
-       - Updated Japanese localization (STR #1805)
-       - The scheduler's SSL certificate/key directory was not
-         created on installation (STR #1788)
-       - Added a mailto.conf man page and help page (STR #1754)
-       - The parallel and USB backends no longer wait for the
-         printer to go on-line - this caused problems with
-         certain printers that don't follow with the IEEE-1284
-         standard (STR #1738)
-       - The scheduler could crash on a reload when implicit
-         classes were present (STR #1828)
-       - The IPP backend incorrectly used the CUPS_ENCRYPTION
-         environment variable to determine the default
-         encryption mode when printing (STR #1820)
-       - USB printing did not work on Solaris (STR #1756)
-       - The scheduler sorted job priorities in the wrong order
-         (STR #1811)
-       - The scheduler did not automatically restart notifiers
-         that exited or crashed (STR #1793)
-       - IPv6 support did not work on NetBSD (STR #1834)
-       - The EPM packaging file did not work (STR #1804)
-       - The scheduler used up the CPU if BrowseRemoteProtocols
-         was empty (STR #1792)
-       - Custom page sizes did not work (STR #1787)
-       - The SNMP backend could crash on some systems when SNMP
-         logging was enabled (STR #1789)
-       - Browsing could produce some funny printer names when
-         ServerName was set to an IP address (STR #1799)
-       - Fixed the log message for BrowseRelay (STR #1798)
-       - Fixes to allow CUPS to compile on MirBSD (STR #1796)
-       - The scheduler incorrectly set the FINAL_CONTENT_TYPE
-         environment variable (STR #1795)
-       - The pdftops filter incorrectly embedded a "produced by"
-         comment, causing PDF printing not to work on some
-         operating systems (STR #1801)
-       - Sending raw jobs from a client system could cause the
-         client's scheduler to eventually crash (STR #1786)
-       - The scheduler now checks that the notifier exists prior
-         to accepting a new subscription request.
-       - The scheduler now reports the supported
-         notify-recipient schemes based on the contents of the
-         ServerBin/notifier directory.
-       - Event notifications did not include the
-         notify-sequence-number or other required attributes
-         (STR #1747)
-       - Allow/Deny addresses of the form "11.22.33.*" did not
-         work on Linux (STR #1769)
-       - cupsGetPPD() did not work if the scheduler was only
-         listening on a domain socket (STR #1766)
-       - The scheduler could crash advertising a class (STR
-         #1768)
-       - The scheduler could crash if the default printer was
-         deleted (STR #1776)
-       - Added a new default CUPS raster format (v3) which does
-         not compress the raster stream in order to provide the
-         same cupsRasterReadPixels() and cupsRasterWritePixels()
-         performance as CUPS 1.1.x.
-       - The cupsaddsmb man page listed the wrong files for the
-         CUPS driver.
-       - Some configure --with options did not work (STR #1746)
-       - "Allow @IF(name)" didn't work if "name" wasn't the
-         first network interface (STR #1758)
-       - The lpstat command did not use the correct character
-         set when reporting the date and time (STR #1751)
-       - The cupsaddsmb command and web interface did not update
-         the Windows PPD files properly, resulting in corrupt
-         PPD files for the Windows client to use (STR #1750)
-       - The cupsd.conf man page didn't describe the Listen
-         domain socket syntax (STR #1753)
-       - The scheduler no longer tries to support more than
-         FD_SETSIZE file descriptors.
-       - CDSA (encryption) support fixes for MacOS X.
-       - The lppasswd program needs to be setuid to root to
-         create and update the /etc/cups/passwd.md5 file (STR
-         #1735)
-       - 32/64-bit library installation was broken (STR #1741)
-       - The USB backend now reports a "no such device" error
-         when using the old filename-based USB URIs instead of
-         the "success" error.
-       - Increased the HTTP and IPP read timeouts to 10 seconds,
-         as 1 second was too short on congested networks (STR
-         #1719)
-       - The SNMP backend now uses the device description over
-         the printer-make-and-model attribute when the attribute
-         contains a generic name (STR #1728)
-       - Fixed another file descriptor leak when printing raw
-         files (STR #1736)
-       - Raw queues were not shared via LDAP (STR #1739)
-       - The pstops filter didn't always embed PageSetup
-         commands from the PPD file (STR #1740)
-       - "make install" didn't work if you disabled all of the
-         localizations.
-       - The scheduler didn't always choose the least costly
-         filter.
-       - Fixed parsing of IPv6 addresses in Allow, Deny,
-         BrowseAllow, BrowseDeny, and BrowseRelay directives
-         (STR #1713)
-       - Printers that were shared via LDAP did not get added to
-         the LDAP server properly (STR #1733)
-       - LDAP browsing would crash the scheduler if a required
-         value was missing (STR #1731)
-       - Special cases for the "localhost" hostname did not
-         work, causing printing to not work when the /etc/hosts
-         file did not contain a localhost entry (STR #1723)
-       - Updated the Spanish translation (STR #1720, STR #1770)
-       - Reverse-order page output was broken when N-up or
-         landscape orientations were used (STR #1725)
-       - The parallel, serial, socket, and USB backends needed
-         print data before they would report back-channel data,
-         causing problems with several new drivers (STR #1724)
-
-
-CHANGES IN CUPS V1.2.1
-
-       - "lprm -h hostname" did not work (STR #1800)
-       - The web interface did not handle reloads properly for
-         MSIE (STR #1716)
-       - The configure script no longer adds linker rpath
-         options when they are unnecessary.
-       - The scheduler could crash printing a debug message on
-         Solaris (STR #1714)
-       - The --enable-32bit and --enable-64bit configure options
-         did not always work.
-       - The password prompt showed the domain socket address
-         instead of "localhost" for local authentication (STR
-         #1706)
-       - The web interface filtered the list of printers even if
-         the user wasn't logged in (STR #1700)
-       - The IPP backend did not work reliably with some Xerox
-         printers (STR #1704)
-       - Trailing banners were not added when printing a single
-         file (STR #1698)
-       - The web interface support programs crashed on Solaris
-         (STR #1699)
-       - cupstestppd incorrectly reported problems with
-         *1284DeviceID attributes (STR #1710)
-       - Browsing could get disabled after a restart (STR #1670)
-       - Custom page sizes were not parsed properly (STR #1709)
-       - The -U option wasn't supported by lpadmin (STR #1702)
-       - The -u option didn't work with lpadmin (STR #1703)
-       - The scheduler did not create non-blocking back-channel
-         pipes, which caused problems when the printer driver
-         did not read the back-channel data (STR #1705)
-       - The scheduler no longer uses chunking in responses to
-         clients - this caused problems with older versions of
-         CUPS like 1.1.17 (PR #6143)
-       - Automatic raw printing was broken (STR #1667)
-       - 6-up printing was broken (STR #1697)
-       - The pstops filter did not disable CTRL-D processing on
-         the printer/RIP.
-       - ppdOpen*() did not load custom options properly (STR
-         #1680)
-       - "Set Printer Options" in the web interface did not
-         update the DefaultImageableArea or
-         DefaultPaperDimension attributes in the PPD file (STR
-         #1689)
-       - Fixed compile errors (STR #1682, STR #1684, STR #1685,
-         STR #1690)
-       - The lpstat command displayed the wrong error message
-         for a missing destination (STR #1683)
-       - Revised and completed the Polish translation (STR
-         #1669)
-       - Stopped jobs did not show up in the list of active jobs
-         (STR #1676)
-       - The configure script did not use the GNU TLS
-         "libgnutls-config" script to find the proper compiler
-         and linker options.
-       - The imagetoraster filter did not correctly generate
-         several 1, 2, and 4-bit color modes.
-       - cupsRasterWritePixels() could lose track of the current
-         output row.
-       - cupsRasterReadPixels() did not automatically swap
-         12/16-bit chunked pixel data.
-       - Moved the private _cups_raster_s structure out of the
-         public header.
-       - Updated the CUPS raster format specification to include
-         encoding rules and colorspace definitions.
-       - The Zebra PPD files had the wrong PostScript code for
-         the "default" option choices.
-       - The imagetoraster filter did not generate correct CIE
-         XYZ or Lab color data.
-       - The cups-config script did not work when invoked from a
-         source directory (STR #1673)
-       - The SNMP backend did not compile on systems that used
-         the getifaddrs emulation functions (STR #1668)
-
-
-CHANGES IN CUPS V1.2.0
-
-       - Documentation updates (STR #1618, STR #1620, STR #1622,
-         STR #1637)
-       - Static file copy buffers reduced from 64k to 32k to
-         work around bogus MallocDebug library assumptions (STR
-         #1660)
-       - The scheduler did not decode the backend exit code
-         properly (STR #1648)
-       - The MacOS X USB backend did not report the 1284 device ID,
-         nor did it fix device IDs returned by HP printers.
-       - The scheduler started more slowly than 1.1.x with large
-         numbers of printers (STR #1653)
-       - cupsRasterInterpretPPD() didn't support the
-         cupsPreferredBitsPerColor attribute, and imagetoraster
-         didn't use the new API.
-       - The "make test" script did not create all of the necessary
-         subdirectories for testing (STR #1638)
-       - The scheduler did not prevent rotation of logs
-         redirected to /dev/null (STR #1651)
-       - "make test" did not include the SNMP backend in the
-         test environment (STR #1625)
-       - The EPM packaging files did not work (STR #1621)
-       - "Use Default Configuration" inserted a broken
-         configuration file (STR #1624)
-       - Redirects in the web interface did not always preserve
-         the encrypted status of a connection (STR #1603)
-       - Added the Apple "pap" backend.
-       - Added CUPS library to CUPS Image shared library
-         linkage to support Linux --as-needed linker option
-         (STR #1606)
-       - Fixed support for --enable-pie (STR #1609)
-       - The pdftops filter did not validate the length of the
-         encryption key (STR #1608)
-       - Updated the Polish localization.
-       - "Encryption Required" in the cupsd.conf file now only
-         requires encryption when the connection is not over the
-         loopback interface or domain socket.
-       - Printer names containing "+" were not quoted properly in
-         the web interface (STR #1600)
-       - The SNMP backend now reports the make and model in the
-         information string so that the auto-generated printer
-         name is more useful than just an IP address.
-
-
-CHANGES IN CUPS V1.2rc3
-
-       - The cups-lpd program always did reverse lookups on the
-         client address, which could be a performance problem.
-         Added a "-n" option to disable lookups.
-       - When configured with SSL support, require encryption by
-         default when displaying the /admin location (STR #1592)
-       - The next job ID was not computed correctly if the job
-         cache file got out of sync with the spool directory
-         (STR #1582)
-       - The PNG image handling code used deprecated functions
-         from libpng (STR #1587)
-       - Added a Polish translation (STR #1584, STR #1586)
-       - More changes to the scheduler to improve battery life
-         on portable devices (STR #1583)
-       - Changed the default log level for status messages back
-         to "DEBUG" to be consistent with CUPS 1.1.x (STR #1579)
-       - The error string was not set properly when
-         cupsDoFileRequest() was given the name of a directory
-         (STR #1578)
-       - Fixed handling of job-hold-until (STR #1581)
-       - Added explicit notes to the cupsaddsmb man page
-         explaining that the driver filenames are case-sensitive
-         under UNIX and that they must be all lowercase (Windows
-         2000) or all UPPERCASE (Windows 95/98/Me) to work (STR
-         #1568)
-       - The USB backend incorrectly split the manufacturer name
-         if it contained spaces (STR #1566)
-       - The scheduler would hang when listing PPD files for a
-         manufacturer whose name contained spaces (STR #1567)
-       - Added the SNMP backend for network printer discovery
-         (STR #1555)
-       - cupstestppd now fails PPD files with 1284DeviceId
-         instead of 1284DeviceID, and cups-driverd uses a
-         case-insensitive comparison when looking for it (STR
-         #1573)
-       - cupsDoFileRequest() and cupsDoRequest() now work
-         properly with non-blocking HTTP connections.
-       - Added Swedish translation (STR #1569)
-       - "make install" now installs the MIME files with world
-         read permissions (STR #1565)
-       - More CDSA encryption support fixes (STR #1563)
-       - Updated the default mime.types file to support printing
-         of files that do not have a locally-recognized MIME
-         media type to raw or System V queues.
-       - Updated the serial port detection code on Linux (STR
-         #1562)
-       - Added some more error checking to httpGetHostname()
-         (STR #1561)
-       - The title of some administration pages was not
-         localized (STR #1548)
-       - The edit-config.tmpl file was not generated or
-         installed for the Spanish or Japanese localizations
-         (STR #1547)
-       - The mimeDelete() function freed the types before the
-         filters, but the filters needed the type data (STR #1558)
-       - The scheduler didn't keep track of the status pipes
-         properly, leading to a bad select() for multi-file jobs
-         (STR #1559)
-       - The cupstestdsc program didn't validate the ordinal
-         page number value for %%Page: comments.
-
-
-CHANGES IN CUPS V1.2rc2
-
-       - The scheduler was not always using the string pool,
-         causing random crashes.
-       - The lpmove and the web interface's Move Job button did
-         not work with stopped jobs (STR #1534)
-       - The PostScript filter did not handle the page-set
-         option properly with number-up printing (STR #1543)
-       - The scheduler now only warns about unsupported ACLs
-         once (STR #1532)
-       - The "fitplot" option did not work with output from
-         Mozilla (STR #1542)
-       - The imagetops filter did not work with Level 2 or 3
-         printers (STR #1533)
-       - The scheduler now recognizes PostScript files with PJL
-         commands that do not include an ENTER LANGUAGE command.
-       - Added --with-printcap configure option.
-       - 64-bit SSL fixes for MacOS X.
-       - The scheduler didn't send some printer state change
-         events.
-       - The scheduler didn't send jobs to busy remote printers.
-       - Fixed some problems with the launchd support.
-       - Added new USB printer backend for MacOS X.
-       - The PostScript filter now handles files that start with
-         an incomplete PJL header (PR #6076)
-       - The web interface language selection code did not try
-         the generic language localization (STR #1531)
-       - The language cache, string pool, and transcoding caches
-         are now process global instead of per-thread to avoid
-         problems with GNOME and to allow for data sharing
-         between threads (STR #1530)
-       - Fixed a CUPS 1.1.x compatibility bug (STR #1528)
-       - The web interface redirection after certain printer
-         administration tasks was broken (STR #1516)
-       - Web interface authorization could get stuck (STR #1512)
-       - Localization updates (STR #1513, STR #1518, STR #1520)
-       - The pstops filter didn't work with some files (STR
-         #1523)
-       - "./configure --enable-static" didn't work (STR #1522)
-       - The scheduler was not using the configured default
-         Group (STR #1521)
-       - The web interface still did not show the localized time
-         and date for some locales and systems (STR #1509)
-       - httpAddrGetList() would crash on systems without
-         getaddrinfo().
-       - Socket URIs without a trailing slash would cause the
-         port number to not be accepted (STR #1519)
-       - Local raw and System V printers were not advertised as
-         such for printer browsing (STR #1502)
-       - The RPM spec file incorrectly put duplicate copies of
-         the Japanese and Spanish web interface templates in the
-         main cups package (STR #1517)
-       - cupsSetDests() did not explicitly set the permissions
-         of the /etc/cups/lpoptions file (STR #1508)
-       - The lpq command crashed with the -h option (STR #1515)
-
-
-CHANGES IN CUPS V1.2rc1
-
-       - Documentation updates (STR #1497, STR #1498)
-       - The scheduler now redirects browsers to https: URLs
-         when encryption is required.
-       - The scheduler would crash when printing with a banner
-         (STR #1500)
-       - cups-driverd did not use the LanguageEncoding attribute
-         in PPD files to convert the NickName to UTF-8 (STR
-         #1503)
-       - The lpadmin command could not set the
-         printer-error-policy attribute (STR #1504)
-       - The web interface did not show the time and date in the
-         correct format for the locale (STR #1505)
-       - CUPS no longer accepts print jobs if a printer does not
-         support the file format (STR #1501)
-       - Cleaned up the PostScript filter (pstops) so that it
-         properly supports %%IncludeFeature and page scaling
-         (STR #1453)
-       - Fixed the cupsFileRewind() and cupsFileSeek() functions
-         to work properly with uncompressed files.
-       - Added cupsFileGetLine(), cupsFileStderr(),
-         cupsFileStdin(), and cupsFileStdout() functions to the
-         CUPS library.
-       - Added a new cupstestdsc program to test the DSC
-         conformance of PostScript files.
-       - Added KDE/GNOME icons and a Manage Printers menu item.
-       - Added --enable-image and --enable-pdftops configure
-         options to control whether the image and PDF filters
-         are built and installed (default = yes for all
-         platforms but MacOS X)
-       - Fixed a minor memory leak in the PPD API.
-       - Fixed transcoding issues (STR #1493)
-       - The scheduler now enforces a minimum job cost of 100
-         when doing FilterLimit checks.
-       - The scheduler would leak file descriptors when printing
-         to raw queues (STR #1491)
-       - The IPv6 support did not compile on Tru64 UNIX (STR
-         #1488)
-       - ppdOpen2() now converts the NickName and all UI text to
-         UTF-8 (STR #1475)
-       - The Set Allowed Users web page did not work (STR #1486)
-       - When the default policy was not set or set to a non-
-         existing policy, the scheduler did not set the default
-         policy name to "default" (STR #1484)
-       - The Zebra CPCL driver did not use the correct righthand
-         margin for the 4" wide label sizes.
-       - Fixed a problem with the parsing of fractional real
-         numbers in PPD files.
-       - Added Spanish localization files (STR #1480)
-       - Fixed localization of a few scheduler messages (STR
-         #1478)
-       - Fixed support for HEAD requests in the scheduler (STR
-         #1481)
-
-
-CHANGES IN CUPS V1.2b2
-
-       - Updated the CUPS design description.
-       - Added --enable-32bit and --enable-64bit configure
-         options to allow building of separate 32/64-bit
-         libraries on systems that support both environments
-         (STR #1472)
-       - Various compiler warning fixes.
-       - Fixes for Solaris 10 builds against old GNU TLS and
-         LDAP libraries.
-       - Added a cupsArrayUserData() function to retrieve the
-         user data pointer for an array (useful for typing
-         arrays)
-       - The ppdEmitString() function did not compute the
-         required buffer size properly, leading to dropped
-         characters on the end of the printer commands in pstops
-         and imagetops (STR #1470)
-
-
-CHANGES IN CUPS V1.2b1
-
-       - The serial backend now supports Equinox 8-port serial
-         hubs (STR #526)
-       - The IPP backend now supports a compression option to
-         compress print files as they are sent to the remote
-         server (STR #956)
-       - The CUPS browse protocol now supports passing of
-         default options and browse timeout values from the
-         server to the clients (STR #800)
-       - Implicit classes that timed out could cause the
-         scheduler to crash (STR #1439)
-       - Added DragonFly support in local device backends (STR
-         #1362)
-       - Added LDAP printer browsing support (STR #338)
-       - Added official support for printer maintenance commands
-         via the CUPS Command file format and hooks in the
-         printer-type and web interfaces (STR #932)
-       - The HP-GL/2 filter could get in an infinite loop trying
-         to convert HP-PCL files (STR #1415)
-       - CUPS now implements the HTTP/1.1 Expect header (STR
-         #1407)
-       - Options in PPD files are no longer automatically put in
-         an "Extra" group; rather, all options that are not
-         inside an Open/CloseGroup will be placed in the
-         "General" group (STR #1385)
-       - 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.
-       - All of the Berkeley (except for lpc) and System V
-         commands now support specification of user, host, and
-         port (STR #1028, STR #1029, STR #1087)
-       - The lpmove command now allows you to move all jobs for
-         a given queue (STR #56)
-       - The web interface now supports moving of a job or jobs
-         to another queue (STR #56)
-       - The web interface now provides searching, paging, and
-         changing of the sort/display order of classes, jobs,
-         and printers.
-       - cupsaddsmb now accepts a password on the command-line
-         and supports passwords with special characters (STR
-         #822, STR #1236)
-       - ppdLoad*() no longer tries to "fix" bad characters in
-         UI text (STR #1101)
-       - Printer names can now (reliably) contain Unicode
-         characters (STR #896)
-       - The lpstat command now shows the time and date of the
-         last printer state change instead of the hardcoded "Jan
-         01 00:00" (STR #659)
-       - The scheduler now adds a job-actual-printer-uri
-         attribute to job objects when printing to a class (STR
-         #116)
-       - The scheduler now logs log file open errors to the
-         system log (STR #1289)
-       - The scheduler now sets the job-originating-user-name to
-         the authenticated username, if available (STR #1318)
-       - The scheduler now only updates the permissions of SSL
-         keys and certificates when they are under the
-         ServerRoot directory (STR #1324)
-       - The rastertodymo driver has been renamed to
-         rastertolabel (a symlink is installed so that existing
-         queues continue to work) and now also supports Zebra's
-         CPCL language.
-       - The lpstat command could show the wrong active job for
-         a printer (STR #1301)
-       - Fixed a potential crash problem in the scheduler when
-         aborting a CGI program (STR #1290)
-       - Added a "cancel all jobs" button to the class and
-         printer web interfaces (STR #1140)
-       - The add-printer web page now shows the
-         set-printer-options page after the printer has been
-         added (STR #690)
-       - The classes web page now provides links to each of the
-         member printers (STR #307)
-       - CUPS now handles HTTP request/response lines up to 32k
-         in length; this is mainly for better cookie support
-         (STR #1274)
-       - Added support for the Apache PassEnv and SetEnv
-         directives to cupsd.conf (STR #853)
-       - Added large file (64-bit) support (STR #541)
-       - Fixed a performance issue with the ippReadIO()
-         implementation (STR #1284)
-       - Fixed a performance issue with the scheduler's implicit
-         class implementation (STR #1283)
-       - The pdftops filter now adds the Title and Creator
-         fields from the PDF file to the PostScript document
-         comments section (STR #539, STR #830)
-       - Added a new cups_array_t and cupsArray*() functions to
-         the CUPS API to support sorted lists of data.
-       - Made the CUPS API library thread-safe (STR #1276)
-       - Added "media" option support for EFI EFMediaType option
-         (STR #902)
-       - Added write buffering to the HTTP code to improve
-         performance (STR #547)
-       - The scheduler now uses the attributes-natural-language
-         attribute to localize banner pages (STR #386)
-       - The scheduler now returns the address that was used to
-         connect to it (STR #1076)
-       - Fixed a problem with N-up printing and OpenOffice (STR
-         #576)
-       - Added support for the GCC position independent
-         executable options (STR #1209)
-       - Added new BrowseLocalProtocols and
-         BrowseRemoteProtocols directives to cupsd.conf,
-         allowing for different browse protocols for local and
-         remote printers (STR #877)
-       - PPD files can now contain strings up to 256k in length
-         (STR #1215)
-       - The pstops filter now supports the IncludeFeature DSC
-         comment (STR #1212)
-       - The pstops filter now disables the setpagedevice
-         procedure when doing N-up printing (STR #1161)
-       - The serial backend now supports "stop=1", "stop=2",
-         "parity=space", and "parity=mark" options (STR #1155)
-       - "make install" no longer overwrites an existing PAM
-         configuration file (STR #1064)
-       - The scheduler now closes all files on startup when run
-         in daemon mode (STR #1009)
-       - Added a new RGBW colorspace to the CUPS raster format
-         (STR #1071)
-       - The pdftops filter now sets the page size based on the
-         media box when not scaling the output (STR #912)
-       - The pdftops filter now supports masked images (STR
-         #281)
-       - The pdftops filter produced large output when rendering
-         PDF files containing lot of repeated images (STR #327)
-       - The pdftops filter now minimizes print processing of
-         PDF files when using the page-ranges option (STR #273)
-       - Updated pdftops filter to Xpdf 3.01.
-       - Added new cupsBackchannelRead() and
-         cupsBackchannelWrite() functions, as well as
-         backchannel support to the parallel, serial, socket,
-         and USB backends (STR #1252)
-       - The parallel and USB backends now treat a "no space
-         available" error as an out-of-paper condition (STR
-         #1225)
-       - The "lpc" command now supports the "status all" command
-         (STR #1004)
-       - ippReadIO() did not read collections properly (STR
-         #1249)
-       - The "make test" script now creates the test files in
-         "/tmp/cups-$USER" instead of "/tmp/$USER" (STR #981)
-       - All backends now abort on error when printing a job to
-         a class - this allows the next printer in the class to
-         print the job (STR #1084)
-       - The scheduler now verifies that a printer supports
-         Letter or A4 media sizes before setting them as the
-         initial default (STR #1250)
-       - The cupstestppd program now flags bad Resolution
-         options (STR #1269)
-       - The USB backend now retries printing when the printer
-         is disconnected or turned off (STR #1267)
-       - Added new httpGetHostname() function to CUPS API, and
-         use it instead of gethostname() so that the web
-         interface will work correctly on systems whose hostname
-         is not the FQDN (STR #1266)
-       - The scheduler now stops printers if the backend for the
-         queue is missing on startup (STR #1265)
-       - The configure script now supports "--disable-library"
-         to disable particular image file format support
-         libraries, even if they are available on the build
-         system (STR #1248)
-       - The IPP backend did not always report on the total
-         number of pages that were printed (STR #1251)
-       - The lpstat program could display garbage date and time
-         values for locales whose date format exceeded 31
-         characters (STR #1263)
-       - The cupstestppd program would segfault when testing
-         certain broken PPD files (STR #1268)
-       - Dramatically reduced the overhead of implicit classes.
-       - Added new cupsDir*() functions to CUPS API.
-       - Printers can now be published individually for sharing.
-       - Fixed a bug in the scheduler's startup signalling code
-         which caused cupsd to send the SIGUSR1 signal to the
-         init process instead of the original parent process
-         (STR #1258)
-       - Added new on-line help CGI to web interface to provide
-         searchable help.
-       - Devices are now tracked dynamically, with each query
-         doing a new device scan.  This eliminates a previous
-         startup delay caused by slow backends and allows new
-         printers to be seen without restarting the server,
-         however it limits the amount of device URI checking
-         that can be done (basically now the scheduler only
-         requires a URI with a method that is a listed backend)
-       - Added new printer auto-detection, server configuration,
-         and log file viewing to the administration web page.
-       - Added new "set allowed users" web interface to set the
-         list of allowed users for a printer or class.
-       - The scheduler, command-line, and web interfaces now
-         limit the list of printers and classes to those
-         accessible by a user.
-       - cupsMarkOptions() now handles more non-standard
-         duplexing options and choices (STR #915)
-       - cups-lpd now honors remote banner requests with the
-         "standard" banner whenever a printer does not have one
-         defined (STR #1220)
-       - The scheduler's denial-of-service checks did not work
-         properly with IPv6 addresses (STR #1134)
-       - The lp and lpr commands did not error out properly when
-         they were unable to write to a temporary file (STR
-         #1129)
-       - The pstops filter did not handle Adobe-specific
-         comments in Windows NT driver output (STR #1085)
-       - "lpstat -l -p" incorrectly reported the printer
-         interface (STR #936)
-       - The web interface now operates exclusively with the
-         UTF-8 encoding, and sends the appropriate character set
-         and header information to the web browser (STR #919,
-         STR #1007)
-       - Added a "set allowed users" interface to the web
-         interface so that you can set the list of allowed or
-         denied users/groups for a printer or class.
-       - Disallow the "#" character in printer names, since it
-         has special meaning in the shell, config files, and in
-         URIs (STR #917, STR #1202)
-       - Added a new application/x-csource MIME type, and
-         support for it to the texttops filter so that you can
-         pretty print plain text files without the C/C++
-         keywords being highlighted.
-       - The pdftops filter did not compile with GCC 4.0 (STR
-         #1226)
-       - The texttops filter did not highlight preprocessor
-         directives followed by a tab properly.
-       - HP PJL output now uses both JOB DISPLAY and RDYMSG
-         commands to show the current job on the printer's
-         display (STR #1218)
-       - Local authentication certificates are now stored in
-         /var/run/cups/certs by default instead of
-         /etc/cups/certs (STR #1211)
-       - Backends now use "&" to separate options in device
-         URIs; "+" is still recognized but is deprecated (STR
-         #842)
-       - The USB backend no longer supports the usb:/dev/foo
-         format on systems that support device ID queries.
-       - Forced classification markings did not work when the
-         job-sheets parameters were "none,none".
-       - "lpstat -l -p" incorrectly showed all users as allowed,
-         even if the queue was restricted to certain users (STR
-         #801)
-       - The scheduler now automatically detects SSL/TLS clients
-         without using the SSLPort/SSLListen directives.
-       - The CUPS API and scheduler no longer support SSLv2-
-         encrypted connections.
-       - Updated the cupsaddsmb utility to correctly export the
-         CUPS driver for Windows.
-       - Fixed a signal-handling bug in httpRead() which
-         ultimately caused the server to print multiple copies
-         when it was busy (STR #1184)
-       - The cupsFile API now uses the O_APPEND option when
-         opening files in append mode (STR #990)
-       - The md5.h header and md5_* functions are now officially
-         private and have been renamed to avoid conflicts with
-         other implementations with the same name.
-       - The pdftops filter incorrectly embedded some Type1
-         fonts (STR #1093)
-       - The scheduler didn't detect a closed connection in the
-         middle of an IPP request (STR #1153)
-       - The scheduler could block trying to read the job status
-         if there was input pending and the job was cancelled in
-         the same input cycle (STR #1157)
-       - The scheduler could crash when deleting a class due to
-         infinite recursion.
-       - Updated the Zebra ZPL label printer driver to use the
-         run-length encoding and support more options.
-       - Updated serial backend to scan for /dev/ttyC* as well
-         as /dev/ttyc* for Cyclades serial ports (STR #1049)
-       - The scheduler could hang reading the job status under
-         certain circumstances (STR #1068)
-       - The USB backend termination signal code was inverted
-         (STR #1046)
-       - Moved enable and disable commands to sbindir to be
-         consistent.
-       - Added new cupsRasterInterpretPPD() function for RIP
-         filters to setup the raster page header from
-         PostScript commands in a PPD file.
-       - The CUPS browsing protocol now offers a "delete" bit
-         to remove printers as soon as they are deleted on the
-         server or as soon as the server shuts down gracefully
-         (STR #793)
-       - The CUPS_SERVER and ServerName directives (client.conf
-         and ~/.cupsrc) may now contain names of the form
-         "server:port" and "/path/to/domain/socket".
-       - The "cancel -u user" command now works for ordinary
-         users (STR #751)
-       - Added test run support to "make test" target (STR #64)
-       - Added domain socket support (STR #656)
-       - Added BrowseLocalOptions directive to allow the
-         administrator to add printer URI options to the browse
-         URI, e.g. "encryption=required" (STR #732)
-       - Added BrowseRemoteOptions directive to allow the
-         administrator to add standard URI options to the
-         remote printer URI, e.g. "encryption=required" (STR
-         #732)
-       - Now put "-I.." compiler option in front of all others
-         to ensure that local CUPS headers are used before
-         installed headers (STR #437)
-       - New cupsLangPrintf() and cupsLangPuts() for localized
-         interfaces.
-       - Now support custom attributes and extended options in
-         PPD files.
-       - Now provide functions to save PPD files.
-       - New policy mechanism allows per-operation and
-         per-printer control over what users and groups are
-         allowed to do various IPP operations.
-       - New error policy mechanism to control how aborted
-         backend errors are handled by the scheduler
-         (abort-job, retry-job, requeue-job, stop-printer)
-       - Updated the printer test page with a better color
-         wheel and a separate grayscale ramp.
-       - A single backend process is now run to send all print
-         data for a job.
-       - Backends and filters can now send and receive
-         backchannel data over file descriptor 3.
-       - Updated the raster stream format to support more
-         user-defined attributes and to do compression of the
-         page data.
+CHANGES IN CUPS V1.3
+
+       - Documentation updates (STR #2130, STR #2131)
+       - Added support for DNS-SD (aka "Bonjour") printer sharing
+         (STR #1171)
+       - Job operations (cancel, hold, release, etc.) from the
+         web interface now return back to the original page (STR
+         #2239)
+       - The classes or printers list is now shown after a
+         successful deletion from the web interface (STR #1999)
+       - The default configuration now allows browse packets from
+         any address (STR #2008)
+       - The web interface now provides an "allow printing from the
+         Internet" check box (STR #1897)
+       - The notify-events-default and
+         notify-lease-duration-default attributes can now be set
+         (STR #1671)
+       - Server-side default options are now sent to clients when
+         the "printer-defaults" attribute group is requested (STR
+         #1923)
+       - Added support for Linux "relro" linker option (STR #1614)
+       - CUPS now validates the number-up option value (STR #1329)
+       - The on-line help now provides better search capabilities
+         (STR #1701)
+       - The web interface "Add This Printer" button now allows you
+         to change the printer name, description,  and location
+         (STR #1646)
+       - Added support for Mac OS X authorization services
+         (STR #2206)
+       - Added support for driver-specific pre-filters (STR #2108)
+       - Added a new side-channel API for drivers and backends
+         for basic device control and information queries (STR
+         #1898)
+       - The scheduler now uses poll(), epoll(), or /dev/kqueue
+         instead of select() when possible (STR #1261)
+       - Added new cupsArrayGetIndex() and cupsArrayGetInsert()
+         functions to get the current index and insertion
+         positions of an array.
+       - Added a new --with-max-copies configure option (STR
+         #2090)
+       - Added new cupsRemoveDest() and cupsSetDefaultDest()
+         functions.
+       - Added support for cupsPJLCharset attribute in PPD files
+         which specifies the character set that is used in PJL
+         strings (STR #1969)
+       - Moved the definition of the (private) _http_s structure
+         to http-private.h; code that directly accesses the
+         http_t members will no longer compile!
+       - Added support for setting the document-format-default
+         attribute on a per-printer basis.
+       - Added support for IntelliBar label printers.
index b9636837c3fb16b528c4d70cbdb945f11ca1359c..329409b374ef25a32f1a1aa4ae22786d8dfbe7e7 100644 (file)
@@ -1,5 +1,5 @@
-INSTALL - CUPS v1.2.8 - 2007-02-14
-----------------------------------
+INSTALL - CUPS v1.2rc1 - 2006-03-24
+-----------------------------------
 
 This file describes how to compile and install CUPS from source
 code. For more information on CUPS see the file called
index 4a3e913c3524e4a4b6cbbdcaf46491e7e02600a1..aee2abed0b569675d1afb9bff60b624d52df7d55 100644 (file)
@@ -101,6 +101,42 @@ No developer is required to provide these exceptions in a
 derived work.
 
 
+KERBEROS SUPPORT CODE
+
+The Kerberos support code ("KSC") is copyright 2006 by Jelmer
+Vernooij and is provided 'as-is', without any express or implied
+warranty.  In no event will the author or Easy Software Products
+be held liable for any damages arising from the use of the KSC.
+
+Sources files containing KSC have the following text at the top
+of each source file:
+
+     This file contains Kerberos support code, copyright 2006 by
+     Jelmer Vernooij.
+
+The KSC copyright and license apply only to Kerberos-related
+feature code in CUPS.  Such code is typically conditionally
+compiled based on the present of the HAVE_GSSAPI preprocessor
+definition.
+
+Permission is granted to anyone to use the KSC for any purpose,
+including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+     1. The origin of the KSC must not be misrepresented; you
+       must not claim that you wrote the original software. If
+       you use the KSC in a product, an acknowledgment in the
+       product documentation would be appreciated but is not
+       required.
+
+     2. Altered source versions must be plainly marked as such,
+       and must not be misrepresented as being the original
+       software.
+
+     3. This notice may not be removed or altered from any source
+       distribution. 
+
+
 TRADEMARKS
 
 Easy Software Products has trademarked the Common UNIX Printing
index 97c55e09c6e6bc0c8797b32fd576a9bab8eecbfd..9e49bdb314c5ebb50b4af1507b632f1a9972f40d 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makedefs.in 5799 2006-08-03 00:54:38Z mike $"
+# "$Id: Makedefs.in 6332 2007-03-12 16:08:51Z mike $"
 #
 #   Common makefile definitions for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2007 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
@@ -93,6 +93,7 @@ LIBMALLOC     =       @LIBMALLOC@
 LIBPAPER       =       @LIBPAPER@
 LIBPNG         =       @LIBPNG@
 LIBSLP         =       @LIBSLP@
+LIBGSSAPI      =       @LIBGSSAPI@
 LIBTIFF                =       @LIBTIFF@
 LIBZ           =       @LIBZ@
 
@@ -129,10 +130,12 @@ CXXFLAGS  =       -I.. $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
 CXXLIBS                =       @CXXLIBS@
 DSOFLAGS       =       @DSOFLAGS@
 DSOLIBS                =       @DSOLIBS@ $(COMMONLIBS)
+DNSSDLIBS      =       @DNSSDLIBS@
 IMGLIBS                =       @IMGLIBS@
 IMGFILTERS     =       @IMGFILTERS@
+LAUNCHDLIBS    =       @LAUNCHDLIBS@
 LDFLAGS                =       -L../cups -L../filter $(ARCHFLAGS) \
-                       @LDFLAGS@ @PIEFLAGS@ $(OPTIM)
+                       @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
 LINKCUPS       =       @LINKCUPS@ $(SSLLIBS)
 LINKCUPSIMAGE  =       @LINKCUPSIMAGE@
 LIBS           =       $(LINKCUPS) $(COMMONLIBS)
@@ -144,7 +147,6 @@ PDFTOPS             =       @PDFTOPS@
 PHPDIR         =       @PHPDIR@
 SSLFLAGS       =       @SSLFLAGS@
 SSLLIBS                =       @SSLLIBS@
-LAUNCHDLIBS    =       @LAUNCHDLIBS@
 
 #
 # Separate 32/64-bit library support...
@@ -206,6 +208,7 @@ BINDIR              =       $(BUILDROOT)@bindir@
 CACHEDIR       =       $(BUILDROOT)@CUPS_CACHEDIR@
 DATADIR                =       $(BUILDROOT)@CUPS_DATADIR@
 DOCDIR         =       $(BUILDROOT)@CUPS_DOCROOT@
+ICONDIR                =       @ICONDIR@
 INCLUDEDIR     =       $(BUILDROOT)$(includedir)
 INITDIR                =       @INITDIR@
 INITDDIR       =       @INITDDIR@
@@ -213,7 +216,11 @@ LIBDIR             =       $(BUILDROOT)$(libdir)
 LOCALEDIR      =       $(BUILDROOT)@CUPS_LOCALEDIR@
 LOGDIR         =       $(BUILDROOT)@CUPS_LOGDIR@
 MANDIR         =       $(BUILDROOT)@mandir@
+MENUDIR                =       @MENUDIR@
 PMANDIR                =       $(BUILDROOT)@PMANDIR@
+RCLEVELS       =       @RCLEVELS@
+RCSTART                =       @RCSTART@
+RCSTOP         =       @RCSTOP@
 REQUESTS       =       $(BUILDROOT)@CUPS_REQUESTS@
 SBINDIR                =       $(BUILDROOT)@sbindir@
 SERVERBIN      =       $(BUILDROOT)@CUPS_SERVERBIN@
@@ -269,5 +276,5 @@ DBUSDIR             =       @DBUSDIR@
 
 
 #
-# End of "$Id: Makedefs.in 5799 2006-08-03 00:54:38Z mike $"
+# End of "$Id: Makedefs.in 6332 2007-03-12 16:08:51Z mike $"
 #
index 3d96ec143053894bdda84d91f2b6b604d9284c28..c24ccdb2d98e4415e1e3c6b2b185ea94640d03ef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 6128 2006-12-05 16:07:23Z mike $"
+# "$Id: Makefile 6332 2007-03-12 16:08:51Z mike $"
 #
 #   Top-level Makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2007 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
@@ -69,7 +69,8 @@ distclean:    clean
        $(RM) man/cups-deviced.man man/cups-driverd.man
        $(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
        $(RM) man/cupsd.conf.man man/lpoptions.man
-       $(RM) packaging/cups templates/edit-config.tmpl templates/header.tmpl
+       $(RM) packaging/cups.list
+       $(RM) templates/edit-config.tmpl templates/header.tmpl
        -$(RM) doc/*/index.html
        -$(RM) templates/*/edit-config.tmpl
        -$(RM) templates/*/header.tmpl
@@ -103,14 +104,17 @@ install:  installhdrs
                echo Installing init scripts...; \
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
                $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
+               for level in $(RCLEVELS); do \
+                       $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
+                       $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/S$(RCSTART)cups; \
+                       if test `uname` = HP-UX; then \
+                               level=`expr $$level - 1`; \
+                               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
+                       fi; \
+                       $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/K$(RCSTOP)cups; \
+               done; \
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
-               $(INSTALL_SCRIPT) init/cups.sh  $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc2.d; \
-               $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc3.d; \
-               $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc5.d; \
-               $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
+               $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc0.d/K$(RCSTOP)cups; \
        fi
        if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
                $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
@@ -131,26 +135,29 @@ install:  installhdrs
        fi
        if test "x$(DBUSDIR)" != x; then \
                echo Installing cups.conf in $(DBUSDIR)...;\
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR); \
-               $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \
+               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR)/system.d; \
+               $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/system.d/cups.conf; \
        fi
        if test "x$(XINETD)" != x; then \
                echo Installing xinetd configuration file for cups-lpd...; \
                $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
                $(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \
        fi
-       if test -d /usr/share/applications; then \
+       if test "x$(MENUDIR)" != x; then \
+               echo Installing desktop menu...; \
+               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(MENUDIR); \
+               $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)$(MENUDIR); \
+       fi
+       if test "x$(ICONDIR)" != x; then \
                echo Installing desktop icons...; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/applications; \
-               $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)/usr/share/applications; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps; \
-               $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps; \
-               $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps; \
-               $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png; \
-               $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps; \
-               $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png; \
+               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps; \
+               $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
+               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps; \
+               $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
+               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps; \
+               $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
+               $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps; \
+               $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
        fi
 
 
@@ -263,5 +270,5 @@ dist:       all
 
 
 #
-# End of "$Id: Makefile 6128 2006-12-05 16:07:23Z mike $".
+# End of "$Id: Makefile 6332 2007-03-12 16:08:51Z mike $".
 #
index 8d555a2f33b381d9f1e4eee243597d0e15294727..26f52b8e1a00a836112882a2c6dd07aa28e0b843 100644 (file)
@@ -1,5 +1,5 @@
-README - CUPS v1.2.8 - 2007-02-14
----------------------------------
+README - CUPS v1.3svn - 2007-01-03
+----------------------------------
 
 Looking for compile instructions?  Read the file "INSTALL.txt"
 instead...
index 0683438215fa3c6d726017c3911864132fce4f32..48771748a1481abfa45070c8f5d2297e8793668e 100644 (file)
@@ -9,31 +9,33 @@ lpd.o: ../cups/backend.h ../cups/http-private.h ../config.h ../cups/http.h
 lpd.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/cups.h
 lpd.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
 lpd.o: ../cups/string.h
-pap.o: ../cups/http.h ../cups/md5.h
-parallel.o: backend-private.h ../cups/backend.h ../cups/cups.h ../cups/ipp.h
-parallel.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
-parallel.o: ../cups/file.h ../cups/language.h ../cups/debug.h
+pap.o: ../config.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+pap.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/backend.h
+parallel.o: backend-private.h ../cups/backend.h ../cups/sidechannel.h
+parallel.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+parallel.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
 parallel.o: ../cups/string.h ../config.h
 scsi.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-scsi.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-scsi.o: ../cups/language.h ../cups/string.h ../config.h
-serial.o: backend-private.h ../cups/backend.h ../cups/cups.h ../cups/ipp.h
-serial.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
-serial.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/string.h
-serial.o: ../config.h
+scsi.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+scsi.o: ../cups/string.h ../config.h
+serial.o: backend-private.h ../cups/backend.h ../cups/sidechannel.h
+serial.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+serial.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
+serial.o: ../cups/string.h ../config.h
 snmp.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
 snmp.o: ../cups/ipp-private.h ../cups/ipp.h backend-private.h
-snmp.o: ../cups/backend.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
-snmp.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/string.h
-snmp.o: ../cups/array.h ../cups/file.h
+snmp.o: ../cups/backend.h ../cups/sidechannel.h ../cups/cups.h ../cups/ppd.h
+snmp.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
+snmp.o: ../cups/string.h ../cups/array.h ../cups/file.h
 socket.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
 socket.o: ../cups/ipp-private.h ../cups/ipp.h backend-private.h
-socket.o: ../cups/backend.h ../cups/cups.h ../cups/ppd.h ../cups/array.h
-socket.o: ../cups/file.h ../cups/language.h ../cups/debug.h ../cups/string.h
+socket.o: ../cups/backend.h ../cups/sidechannel.h ../cups/cups.h
+socket.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+socket.o: ../cups/debug.h ../cups/string.h
 test1284.o: ../cups/string.h ../config.h ieee1284.c backend-private.h
-test1284.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-test1284.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-test1284.o: ../cups/language.h ../cups/debug.h
+test1284.o: ../cups/backend.h ../cups/sidechannel.h ../cups/cups.h
+test1284.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
+test1284.o: ../cups/file.h ../cups/language.h ../cups/debug.h
 usb.o: ../cups/backend.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-usb.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-usb.o: ../cups/language.h ../cups/string.h ../config.h
+usb.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+usb.o: ../cups/string.h ../config.h
index 2ea79f15c8233f7ff5a4fc1c300c24327eec16a3..ae8f30bbfb4649c47f2efc5fe34f4bf8bcf80bc4 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 6061 2006-10-23 00:26:52Z mike $"
+# "$Id: Makefile 6058 2006-10-23 00:20:09Z mike $"
 #
 #   Backend makefile for the Common UNIX Printing System (CUPS).
 #
@@ -222,5 +222,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 6061 2006-10-23 00:26:52Z mike $".
+# End of "$Id: Makefile 6058 2006-10-23 00:20:09Z mike $".
 #
index 14b93cc87626e46de03da593f707aca1abb146f5..91a9926dfe022837694918d4b499d2d36e94d80b 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: backend-private.h 5771 2006-07-20 18:06:20Z mike $"
+ * "$Id: backend-private.h 6170 2007-01-02 17:26:41Z mike $"
  *
  *   Backend support definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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 @@
  */
 
 #  include <cups/backend.h>
+#  include <cups/sidechannel.h>
 #  include <cups/cups.h>
 #  include <cups/debug.h>
 #  include <stdlib.h>
@@ -59,7 +60,9 @@ extern int    backendGetDeviceID(int fd, char *device_id, int device_id_size,
                                   const char *scheme, char *uri, int uri_size);
 extern int     backendGetMakeModel(const char *device_id, char *make_model,
                                    int make_model_size);
-extern ssize_t backendRunLoop(int print_fd, int device_fd, int use_bc);
+extern ssize_t backendRunLoop(int print_fd, int device_fd, int use_bc,
+                              void (*side_cb)(int print_fd, int device_fd,
+                                              int use_bc));
 
 
 #  ifdef __cplusplus
@@ -69,5 +72,5 @@ extern ssize_t        backendRunLoop(int print_fd, int device_fd, int use_bc);
 
 
 /*
- * End of "$Id: backend-private.h 5771 2006-07-20 18:06:20Z mike $".
+ * End of "$Id: backend-private.h 6170 2007-01-02 17:26:41Z mike $".
  */
diff --git a/backend/easysw-firewire-design.txt b/backend/easysw-firewire-design.txt
new file mode 100644 (file)
index 0000000..194c487
--- /dev/null
@@ -0,0 +1,71 @@
+Preliminary Design for CUPS Firewire Printer Backend - 03/19/2002
+-----------------------------------------------------------------
+
+OVERVIEW
+
+    Easy Software Products will develop an IEEE-1394, a.k.a.
+    Firewire, printing interface for its Common UNIX Printing
+    System ("CUPS") for initial use under the Linux operating
+    system.  A follow-on implementation for MacOS X is
+    anticipated as well.
+
+    The operating system interfaces for IEEE-1394 ports vary
+    widely; the CUPS printing interface will abstract the OS
+    layer to a simpler interface geared towards discovering,
+    opening, reading from, writing to, and closing IEEE-1394
+    printers.
+
+    The initial development of the CUPS backend will be targeted
+    at the EPSON Stylus Pro 10000 large format printer, which
+    requires the bandwidth provided by Firewire in order to
+    print at full speed.  This printer supports printing via
+    Serial Bus Protocol 2 (SBP-2) using the SCSI and PWG command
+    sets. The CUPS backend will implement the PWG command set on
+    LUN 0 only.
+
+
+OS ABSTRACTION LAYER
+
+    The OS abstraction layer will be a thin client library that
+    implements the following functions:
+
+        ieee1394_list
+       ieee1394_open
+       ieee1394_close
+       ieee1394_read
+       ieee1394_write
+       ieee1394_error
+
+    The "ieee1394_list" function will list all of the available
+    printer devices on the bus.  The device information will
+    consist of the device URI (ieee1394:/something) used to
+    access the device and the make and model information, if
+    available, for the device ("EPSON Stylus Printer").
+
+    The "ieee1394_open" and "ieee1394_close" functions will open
+    and close a connection to the printer, respectively.
+
+    The "ieee1394_read" and "ieee1394_write" functions will read
+    and write data to and from the printer, respectively.  The
+    read function will be non-blocking, returning data only if
+    there is data coming back from the printer.
+
+    The "ieee1394_error" function will return a string
+    describing the last error or NULL if no error occurred.
+
+    The library will be responsible for creating any background
+    threads that are needed to monitor the connection to the
+    printer.
+
+
+CUPS BACKEND
+
+    The CUPS backend will use the OS abstraction layer to list
+    and access the Firewire printers.  The "main" function will
+    read and write printer data, while the "list_devices"
+    function will be called as necessary to identify the
+    available devices.
+
+    The CUPS 1.1 backend will record any status information in
+    the error log file, while the 1.2 backend will supply it to
+    the printer driver process.
diff --git a/backend/easysw-firewire-linux.txt b/backend/easysw-firewire-linux.txt
new file mode 100644 (file)
index 0000000..a8e4611
--- /dev/null
@@ -0,0 +1,35 @@
+Easy Software Products
+44141 Airport View Drive
+Suite 204
+Hollywood, Maryland 20636
++1.301.373.9600
+March 8, 2002
+
+
+Subject: EPSON Firewire Printer Driver for Linux
+
+Currently, no Firewire printer support exists for Linux.  Since
+the latest EPSON printer products depend on the Firewire
+interface to print at full speed, a solution is needed to
+support customers using Linux as their server platform.
+
+The Linux Firewire subsystem provides a user-mode driver
+interface that allows driver programs to access Firewire
+devices.  Easy Software Products will utilize this interface to
+develop a "backend" program for the Common UNIX Printing System
+that will allow users to print to EPSON printers using the
+Firewire interface.
+
+After examining the Linux interface, we estimate that it will
+require approximately 30 hours of development time to write,
+test, and document the Firewire backend, for a total cost of
+$3,000. The new backend will become a standard part of the CUPS
+software distribution and will be included with at least the
+following Linux distributions:
+
+    - Caldera Linux
+    - Mandrake Linux
+    - Red Hat Linux
+    - SuSE Linux
+
+ESP will provide EPSON with binaries for Red Hat Linux 7.2.
index f5414936742c0b9ca0feee7bd345c749ff9eb7c6..94b01843fe83a86321d522773330998fe444430b 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: ieee1284.c 5866 2006-08-23 03:03:49Z mike $"
+ * "$Id: ieee1284.c 6293 2007-02-20 13:40:55Z mike $"
  *
  *   IEEE-1284 support functions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -93,84 +93,87 @@ backendGetDeviceID(
   * Range check input...
   */
 
-  if (fd < 0 ||
-      !device_id || device_id_size < 32 ||
-      !make_model || make_model_size < 32)
+  if (!device_id || device_id_size < 32)
   {
     DEBUG_puts("backendGetDeviceID: Bad args!");
     return (-1);
   }
 
-  *device_id  = '\0';
-  *make_model = '\0';
+  if (make_model)
+    *make_model = '\0';
 
   if (uri)
     *uri = '\0';
 
- /*
-  * Get the device ID string...
-  */
-
-#ifdef __linux
-  if (!ioctl(fd, LPIOC_GET_DEVICE_ID(device_id_size), device_id))
+  if (fd >= 0)
   {
    /*
-    * Extract the length of the device ID string from the first two
-    * bytes.  The 1284 spec says the length is stored MSB first...
+    * Get the device ID string...
     */
 
-    length = (((unsigned)device_id[0] & 255) << 8) +
-            ((unsigned)device_id[1] & 255);
+    *device_id = '\0';
 
-   /*
-    * Check to see if the length is larger than our buffer; first
-    * assume that the vendor incorrectly implemented the 1284 spec,
-    * and then limit the length to the size of our buffer...
-    */
+#ifdef __linux
+    if (!ioctl(fd, LPIOC_GET_DEVICE_ID(device_id_size), device_id))
+    {
+     /*
+      * Extract the length of the device ID string from the first two
+      * bytes.  The 1284 spec says the length is stored MSB first...
+      */
 
-    if (length > (device_id_size - 2))
-      length = (((unsigned)device_id[1] & 255) << 8) +
-              ((unsigned)device_id[0] & 255);
+      length = (((unsigned)device_id[0] & 255) << 8) +
+              ((unsigned)device_id[1] & 255);
 
-    if (length > (device_id_size - 2))
-      length = device_id_size - 2;
+     /*
+      * Check to see if the length is larger than our buffer; first
+      * assume that the vendor incorrectly implemented the 1284 spec,
+      * and then limit the length to the size of our buffer...
+      */
 
-   /*
-    * Copy the device ID text to the beginning of the buffer and
-    * nul-terminate.
-    */
+      if (length > (device_id_size - 2))
+       length = (((unsigned)device_id[1] & 255) << 8) +
+                ((unsigned)device_id[0] & 255);
 
-    memmove(device_id, device_id + 2, length);
-    device_id[length] = '\0';
-  }
+      if (length > (device_id_size - 2))
+       length = device_id_size - 2;
+
+     /*
+      * Copy the device ID text to the beginning of the buffer and
+      * nul-terminate.
+      */
+
+      memmove(device_id, device_id + 2, length);
+      device_id[length] = '\0';
+    }
 #  ifdef DEBUG
-  else
-    printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
+    else
+      printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
 #  endif /* DEBUG */
 #endif /* __linux */
 
 #if defined(__sun) && defined(ECPPIOC_GETDEVID)
-  did.mode = ECPP_CENTRONICS;
-  did.len  = device_id_size - 1;
-  did.rlen = 0;
-  did.addr = device_id;
+    did.mode = ECPP_CENTRONICS;
+    did.len  = device_id_size - 1;
+    did.rlen = 0;
+    did.addr = device_id;
 
-  if (!ioctl(fd, ECPPIOC_GETDEVID, &did))
-  {
-   /*
-    * Nul-terminate the device ID text.
-    */
+    if (!ioctl(fd, ECPPIOC_GETDEVID, &did))
+    {
+     /*
+      * Nul-terminate the device ID text.
+      */
 
-    if (did.rlen < (device_id_size - 1))
-      device_id[did.rlen] = '\0';
-    else
-      device_id[device_id_size - 1] = '\0';
-  }
+      if (did.rlen < (device_id_size - 1))
+       device_id[did.rlen] = '\0';
+      else
+       device_id[device_id_size - 1] = '\0';
+    }
 #  ifdef DEBUG
-  else
-    printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
+    else
+      printf("backendGetDeviceID: ioctl failed - %s\n", strerror(errno));
 #  endif /* DEBUG */
 #endif /* __sun && ECPPIOC_GETDEVID */
+  }
 
   DEBUG_printf(("backendGetDeviceID: device_id=\"%s\"\n", device_id));
 
@@ -181,7 +184,8 @@ backendGetDeviceID(
   * Get the make and model...
   */
 
-  backendGetMakeModel(device_id, make_model, make_model_size);
+  if (make_model)
+    backendGetMakeModel(device_id, make_model, make_model_size);
 
  /*
   * Then generate a device URI...
@@ -499,5 +503,5 @@ backendGetMakeModel(
 
 
 /*
- * End of "$Id: ieee1284.c 5866 2006-08-23 03:03:49Z mike $".
+ * End of "$Id: ieee1284.c 6293 2007-02-20 13:40:55Z mike $".
  */
diff --git a/backend/ieee1394-linux.c b/backend/ieee1394-linux.c
new file mode 100644 (file)
index 0000000..b95e820
--- /dev/null
@@ -0,0 +1,877 @@
+/*
+ * "$Id: ieee1394-linux.c 4703 2005-09-26 19:33:58Z mike $"
+ *
+ *   Linux IEEE-1394 glue for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2002 by Easy Software Products, all rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or
+ *   without modification, are permitted provided that the
+ *   following conditions are met:
+ *
+ *     1. Redistributions of source code must retain the above
+ *       copyright notice, this list of conditions and the
+ *       following disclaimer.
+ *
+ *     2. Redistributions in binary form must reproduce the
+ *       above copyright notice, this list of conditions and
+ *       the following disclaimer in the documentation and/or
+ *       other materials provided with the distribution.
+ *
+ *     3. All advertising materials mentioning features or use
+ *       of this software must display the following
+ *       acknowledgement:
+ *
+ *         This product includes software developed by Easy
+ *         Software Products.
+ *
+ *     4. The name of Easy Software Products may not be used to
+ *       endorse or promote products derived from this software
+ *       without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS
+ *   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ *   BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *   DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
+ *   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ *   DAMAGE.
+ *
+ * Contents:
+ *
+ *   get_device_id()  - Get the IEEE-1284 device ID for a node...
+ *   get_unit_type()  - Get the unit type for a node...
+ *   show_data()      - Show a data node...
+ *   show_dir()       - Show a directory list...
+ *   ieee1394_list()  - List the available printer devices.
+ *   ieee1394_open()  - Open a printer device.
+ *   ieee1394_close() - Close a printer device.
+ *   ieee1394_read()  - Read from a printer device.
+ *   ieee1394_write() - Write data to a printer device.
+ *   ieee1394_error() - Return the last error.
+ */
+
+/*
+ * Include necessary headers.
+ */
+
+#include "ieee1394.h"
+#include <cups/debug.h>
+#include <libraw1394/raw1394.h>
+#include <libraw1394/csr.h>
+
+
+/*
+ * Limits...
+ */
+
+#define MAX_NODES      100
+
+
+/*
+ * Structures...
+ */
+
+typedef struct
+{
+  char                 uri[HTTP_MAX_URI],/* URI for this node... */
+                       description[128],/* Description of port */
+                       make_model[128];/* Make and model */
+  int                  port,           /* Port where this node is found */
+                       node;           /* Node number */
+  unsigned long long   addr;           /* Management address */
+} linux1394_node_t;
+
+typedef struct
+{
+  raw1394handle_t      handle;         /* Handle for printer device */
+  int                  node;           /* Node number for printer device */
+  unsigned long long   addr;           /* Management address */
+} linux1394_dev_t;
+
+
+/*
+ * ORB messages for communication with the device...
+ */
+
+typedef struct         /**** Login ORB Message */
+{
+  unsigned char                passwd_addr[8]; /* Password address */
+  unsigned char                resp_addr[8];   /* Login response address */
+  unsigned char                notify_excl;    /* Notify and exclusive bits */
+  unsigned char                recon_func;     /* Reconnect time and function */
+  unsigned char                lun[2];         /* Logical unit number */
+  unsigned char                passwd_len[2];  /* Length of password */
+  unsigned char                resp_len[2];    /* Length of login response */
+  unsigned char                fifo_addr[8];   /* Local status FIFO address */
+} login_orb_t;
+
+typedef struct         /**** Login Response Message ****/
+{
+  unsigned char                length[2];      /* Length of response */
+  unsigned char                login_id[2];    /* Login ID */
+  unsigned char                cmd_addr[8];    /* Command block agent address */
+  unsigned char                reserved[2];    /* Reserved (0) */
+  unsigned char                recon_hold[2];  /* Number of seconds to hold login */
+} login_resp_t;
+
+
+/*
+ * Local globals...
+ */
+
+static char            error_string[1024] = "";
+static int             num_nodes;
+static linux1394_node_t        nodes[MAX_NODES];
+
+
+/*
+ * 'get_device_id()' - Get the IEEE-1284 device ID for a node...
+ */
+
+static char *                          /* O - Device ID */
+get_device_id(raw1394handle_t    handle,/* I - Handle for device */
+              int                node, /* I - Node number */
+             unsigned long long offset,/* I - Offset to directory */
+             char               *id,   /* O - ID string */
+             int                idlen) /* I - Size of ID string */
+{
+  unsigned char                data[1024],     /* Data from ROM */
+                       *dataptr;       /* Pointer into data */
+  int                  length;         /* Length of directory */
+  int                  datalen;        /* Length of data */
+  unsigned long long   dataoff;        /* Offset of data */
+
+
+  DEBUG_printf(("get_device_id(handle = %p, node = %d, offset = %llx, id = %p, idlen = %d)\n",
+                handle, node, offset, id, idlen));
+
+  *id = '\0';
+
+ /*
+  * Read the directory length from the first quadlet...
+  */
+
+  if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+    return (NULL);
+
+  offset += 4;
+
+ /*
+  * The length is in the upper 16 bits...
+  */
+
+  length = (data[0] << 8) | data[1];
+
+  DEBUG_printf(("    length = %d\n", length));
+
+ /*
+  * Then read the directory, looking for unit directory or device tags...
+  */
+
+  while (length > 0)
+  {
+    if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+      return (NULL);
+
+    DEBUG_printf(("    data = %02X %02X %02X %02X\n", data[0], data[1],
+                  data[2], data[3]));
+
+    if (data[0] == 0xd1)
+    {
+     /*
+      * Found the unit directory...
+      */
+
+      offset += ((((data[1] << 8) | data[2]) << 8) | data[3]) << 2;
+
+      return (get_device_id(handle, node, offset, id, idlen));
+    }
+    else if (data[0] == 0x81)
+    {
+     /*
+      * Found potential IEEE-1284 device ID...
+      */
+
+      dataoff = offset + (((((data[1] << 8) | data[2]) << 8) | data[3]) << 2);
+
+      if (raw1394_read(handle, 0xffc0 | node, dataoff, 4, (quadlet_t *)data) < 0)
+       return (NULL);
+
+      dataoff += 4;
+
+     /*
+      * Read the leaf value...
+      */
+
+      datalen = (data[0] << 8) | data[1];
+
+      if (datalen > (sizeof(data) / 4))
+        datalen = sizeof(data) / 4;
+
+      for (dataptr = data; datalen > 0; datalen --, dataptr += 4, dataoff += 4)
+       if (raw1394_read(handle, 0xffc0 | node, dataoff, 4,
+                        (quadlet_t *)dataptr) < 0)
+         return (NULL);
+
+      if (data[0] == 0 && memcmp(data + 8, "MFG:", 4) == 0)
+      {
+       /*
+        * Found the device ID...
+       */
+
+        datalen = dataptr - data - 8;
+       if (datalen >= idlen)
+         datalen --;
+
+       memcpy(id, data + 8, datalen);
+       id[datalen] = '\0';
+
+        return (id);
+      }
+    }
+
+    offset += 4;
+    length --;
+  }
+
+  return (NULL);
+}
+
+
+/*
+ * 'get_man_addr()' - Get the management address for a node...
+ */
+
+static int                             /* O - Unit type */
+get_man_addr(raw1394handle_t    handle,        /* I - Handle for device */
+             int                node,  /* I - Node number */
+            unsigned long long offset) /* I - Offset to directory */
+{
+  unsigned char        data[4];                /* Data from ROM */
+  int          length;                 /* Length of directory */
+
+
+  DEBUG_printf(("get_man_addr(handle = %p, node = %d, offset = %llx)\n",
+                handle, node, offset));
+
+ /*
+  * Read the directory length from the first quadlet...
+  */
+
+  if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+    return (-1);
+
+  offset += 4;
+
+ /*
+  * The length is in the upper 16 bits...
+  */
+
+  length = (data[0] << 8) | data[1];
+
+  DEBUG_printf(("    length = %d\n", length));
+
+ /*
+  * Then read the directory, looking for unit directory or type tags...
+  */
+
+  while (length > 0)
+  {
+    if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+      return (-1);
+
+    DEBUG_printf(("    data = %02X %02X %02X %02X\n", data[0], data[1],
+                  data[2], data[3]));
+
+    if (data[0] == 0xd1)
+    {
+     /*
+      * Found the unit directory...
+      */
+
+      offset += ((((data[1] << 8) | data[2]) << 8) | data[3]) << 2;
+
+      return (get_man_addr(handle, node, offset));
+    }
+    else if (data[0] == 0x54)
+    {
+     /*
+      * Found the management address...
+      */
+
+      return (((((data[1] << 8) | data[2]) << 8) | data[3]) << 2);
+    }
+
+    offset += 4;
+    length --;
+  }
+
+  return (-1);
+}
+
+
+/*
+ * 'get_unit_type()' - Get the unit type for a node...
+ */
+
+static int                             /* O - Unit type */
+get_unit_type(raw1394handle_t    handle,/* I - Handle for device */
+              int                node, /* I - Node number */
+             unsigned long long offset)/* I - Offset to directory */
+{
+  unsigned char        data[4];                /* Data from ROM */
+  int          length;                 /* Length of directory */
+
+
+  DEBUG_printf(("get_unit_type(handle = %p, node = %d, offset = %llx)\n",
+                handle, node, offset));
+
+ /*
+  * Read the directory length from the first quadlet...
+  */
+
+  if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+    return (-1);
+
+  offset += 4;
+
+ /*
+  * The length is in the upper 16 bits...
+  */
+
+  length = (data[0] << 8) | data[1];
+
+  DEBUG_printf(("    length = %d\n", length));
+
+ /*
+  * Then read the directory, looking for unit directory or type tags...
+  */
+
+  while (length > 0)
+  {
+    if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+      return (-1);
+
+    DEBUG_printf(("    data = %02X %02X %02X %02X\n", data[0], data[1],
+                  data[2], data[3]));
+
+    if (data[0] == 0xd1)
+    {
+     /*
+      * Found the unit directory...
+      */
+
+      offset += ((((data[1] << 8) | data[2]) << 8) | data[3]) << 2;
+
+      return (get_unit_type(handle, node, offset));
+    }
+    else if (data[0] == 0x14)
+    {
+     /*
+      * Found the unit type...
+      */
+
+      return (data[1] & 0x1f);
+    }
+
+    offset += 4;
+    length --;
+  }
+
+  return (-1);
+}
+
+
+#ifdef DEBUG
+/*
+ * 'show_data()' - Show a data node...
+ */
+
+static void
+show_data(raw1394handle_t    handle,   /* I - Handle for device */
+          int                node,     /* I - Node number */
+         unsigned long long offset,    /* I - Offset to directory */
+         int                indent)    /* Amount to indent */
+{
+  int          i;                      /* Looping var */
+  unsigned char        data[4];                /* Data from ROM */
+  int          length;                 /* Length of data */
+
+
+ /*
+  * Read the data length from the first quadlet...
+  */
+
+  if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+    return;
+
+  offset += 4;
+
+ /*
+  * The length is in the upper 16 bits...
+  */
+
+  length = (data[0] << 8) | data[1];
+
+ /*
+  * Then read the data...
+  */
+
+  for (i = 0; i < indent; i ++)
+    putchar(' ');
+
+  printf("LEAF (%d quadlets)\n", length);
+
+  while (length > 0)
+  {
+    if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+      return;
+
+    for (i = 0; i < indent; i ++)
+      putchar(' ');
+
+    printf("%02X %02X %02X %02X    '%c%c%c%c'\n",
+           data[0], data[1], data[2], data[3],
+           (data[0] < ' ' || data[0] >= 0x7f) ? '.' : data[0],
+           (data[1] < ' ' || data[1] >= 0x7f) ? '.' : data[1],
+           (data[2] < ' ' || data[2] >= 0x7f) ? '.' : data[2],
+           (data[3] < ' ' || data[3] >= 0x7f) ? '.' : data[3]);
+
+    offset += 4;
+    length --;
+  }
+}
+
+
+/*
+ * 'show_dir()' - Show a directory list...
+ */
+
+static void
+show_dir(raw1394handle_t    handle,    /* I - Handle for device */
+         int                node,      /* I - Node number */
+        unsigned long long offset,     /* I - Offset to directory */
+        int                indent)     /* Amount to indent */
+{
+  int                  i;              /* Looping var */
+  unsigned char                data[4];        /* Data from ROM */
+  int                  length;         /* Length of directory */
+  int                  value;          /* Value in directory */
+
+
+ /*
+  * Read the directory length from the first quadlet...
+  */
+
+  if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+    return;
+
+  offset += 4;
+
+ /*
+  * The length is in the upper 16 bits...
+  */
+
+  length = (data[0] << 8) | data[1];
+
+ /*
+  * Then read the directory...
+  */
+
+  while (length > 0)
+  {
+    if (raw1394_read(handle, 0xffc0 | node, offset, 4, (quadlet_t *)data) < 0)
+      return;
+
+    for (i = 0; i < indent; i ++)
+      putchar(' ');
+
+    printf("%02X %02X %02X %02X\n", data[0], data[1], data[2], data[3]);
+
+    value = (((data[1] << 8) | data[2]) << 8) | data[3];
+
+    switch (data[0] & 0xc0)
+    {
+      case 0x00 :
+         for (i = -4; i < indent; i ++)
+           putchar(' ');
+
+          printf("IMMEDIATE %d\n", value);
+         break;
+
+      case 0x40 :
+         for (i = -4; i < indent; i ++)
+           putchar(' ');
+
+          printf("CSR OFFSET +%06X\n", value);
+         break;
+
+      case 0x80 :
+          show_data(handle, node, offset + value * 4, indent + 4);
+         break;
+
+      case 0xc0 :
+          show_dir(handle, node, offset + value * 4, indent + 4);
+         break;
+    }
+
+    offset += 4;
+    length --;
+  }
+}
+#endif /* DEBUG */
+
+
+/*
+ * 'ieee1394_list()' - List the available printer devices.
+ */
+
+ieee1394_info_t        *                       /* O - Printer information */
+ieee1394_list(int *num_devices)                /* O - Number of printers */
+{
+  int                  i, j;           /* Looping vars */
+  raw1394handle_t      handle;         /* 1394 handle */
+  int                  num_ports;      /* Number of ports */
+  struct raw1394_portinfo ports[100];  /* Port data... */
+  unsigned char                guid[8];        /* Global unique ID */
+  int                  vendor;         /* Vendor portion of GUID */
+  int                  unit_type;      /* Unit type */
+  int                  addr;           /* Management address offset */
+  char                 id[1024],       /* Device ID string */
+                       *idptr,         /* Pointer into ID string */
+                       *idsep;         /* Pointer to separator */
+  ieee1394_info_t      *devices;       /* Device list */
+
+
+ /*
+  * Connect to the user-mode driver interface...
+  */
+
+  handle    = raw1394_new_handle();
+  num_ports = raw1394_get_port_info(handle, ports,
+                                    sizeof(ports) / sizeof(ports[0]));
+
+  DEBUG_printf(("num_ports = %d\n", num_ports));
+
+ /*
+  * Loop through the ports to discover what nodes are available.
+  */
+
+  num_nodes = 0;
+
+  for (i = 0; i < num_ports; i ++)
+  {
+    DEBUG_printf(("ports[%d] = { nodes = %d, name = \"%s\" }\n", i,
+                  ports[i].nodes, ports[i].name));
+
+    raw1394_set_port(handle, i);
+
+    for (j = 0; j < ports[i].nodes; j ++)
+    {
+      if (raw1394_read(handle, 0xffc0 | j,
+                       CSR_REGISTER_BASE + CSR_CONFIG_ROM + 12, 4,
+                      (quadlet_t *)guid) < 0)
+      {
+        DEBUG_printf(("    Node #%d: Unable to contact (%s)!\n", j,
+                     strerror(errno)));
+        continue;
+      }
+      else
+      {
+        raw1394_read(handle, 0xffc0 | j,
+                     CSR_REGISTER_BASE + CSR_CONFIG_ROM + 16, 4,
+                    (quadlet_t *)(guid + 4));
+
+        DEBUG_printf(("    Node #%d: GUID = %02X%02X%02X%02X%02X%02X%02X%02X\n",
+                     j, guid[0], guid[1], guid[2], guid[3], guid[4],
+                     guid[5], guid[6], guid[7]));
+
+        vendor    = (((guid[0] << 8) | guid[1]) << 8) | guid[2];
+        unit_type = get_unit_type(handle, j,
+                                 CSR_REGISTER_BASE + CSR_CONFIG_ROM + 20);
+
+        DEBUG_printf(("vendor = %x, unit_type = %d\n", vendor, unit_type));
+
+        if (unit_type == 2 && num_nodes < MAX_NODES)
+       {
+        /*
+         * Found a printer device; add it to the nodes list...
+         */
+
+#ifdef DEBUG
+          show_dir(handle, j, CSR_REGISTER_BASE + CSR_CONFIG_ROM + 20, 0);
+#endif /* DEBUG */
+
+          memset(nodes + num_nodes, 0, sizeof(linux1394_node_t));
+
+          sprintf(nodes[num_nodes].uri, "ieee1394://%02X%02X%02X%02X%02X%02X%02X%02X",
+                 guid[0], guid[1], guid[2], guid[3], guid[4],
+                 guid[5], guid[6], guid[7]);
+
+          nodes[num_nodes].port = i;
+         nodes[num_nodes].node = j;
+
+          addr = get_man_addr(handle, j, CSR_REGISTER_BASE + CSR_CONFIG_ROM + 20);
+
+          if (addr < 0)
+           continue;
+
+          nodes[num_nodes].addr = CSR_REGISTER_BASE + addr;
+
+          DEBUG_printf(("Node address = %llx\n", nodes[num_nodes].addr));
+
+          get_device_id(handle, j, CSR_REGISTER_BASE + CSR_CONFIG_ROM + 20,
+                       id, sizeof(id));
+
+          if (id[0])
+         {
+          /*
+           * Grab the manufacturer and model name from the device ID
+           * string...
+           */
+
+            idptr = id + 4;
+            idsep = strchr(id, ';');
+           if (idsep)
+             *idsep++ = '\0';
+           else
+             idsep = idptr;
+
+           snprintf(nodes[num_nodes].description,
+                    sizeof(nodes[num_nodes].description),
+                    "%s Firewire Printer", idptr);
+
+            if ((idptr = strstr(idsep, "DES:")) == NULL)
+             idptr = strstr(idsep, "MDL:");
+
+            if (idptr == NULL)
+              strcpy(nodes[num_nodes].make_model, "Unknown");
+           else
+           {
+            /*
+             * Grab the DES or MDL code...
+             */
+
+             idptr += 4;
+             idsep = strchr(idptr, ';');
+             if (idsep)
+               *idsep = '\0';
+
+              if (strncmp(id + 4, idptr, strlen(id + 4)) == 0)
+             {
+              /*
+               * Use the description directly...
+               */
+
+               strlcpy(nodes[num_nodes].make_model, idptr,
+                       sizeof(nodes[num_nodes].make_model));
+              }
+             else
+             {
+              /*
+               * Add the manufacturer to the front of the name...
+               */
+
+               snprintf(nodes[num_nodes].make_model,
+                        sizeof(nodes[num_nodes].make_model),
+                        "%s %s", id + 4, idptr);
+              }
+            }
+         }
+         else
+         {
+          /*
+           * Flag it as an unknown printer...
+           */
+
+           sprintf(nodes[num_nodes].description,
+                   "Unknown%06X Firewire Printer", vendor);
+            strcpy(nodes[num_nodes].make_model, "Unknown");
+         }
+
+         num_nodes ++;
+       }
+      }
+    }
+  }
+
+ /*
+  * Done querying the Firewire bus...
+  */
+
+  raw1394_destroy_handle(handle);
+
+ /*
+  * Build an array of device info structures as needed...
+  */
+
+  if (num_devices == NULL)
+    return (NULL);
+
+  *num_devices = num_nodes;
+
+  if (num_nodes)
+  {
+    if ((devices = calloc(sizeof(ieee1394_info_t), num_nodes)) != NULL)
+    {
+      for (i = 0; i < num_nodes; i ++)
+      {
+        strcpy(devices[i].uri, nodes[i].uri);
+       strcpy(devices[i].description, nodes[i].description);
+       strcpy(devices[i].make_model, nodes[i].make_model);
+      }
+    }
+
+    return (devices);
+  }
+  else
+    return (NULL);
+}
+
+
+/*
+ * 'ieee1394_open()' - Open a printer device.
+ */
+
+ieee1394_dev_t                         /* O - Printer device or NULL */
+ieee1394_open(const char *uri)         /* I - Device URI */
+{
+  int                  i;              /* Looping var */
+  linux1394_dev_t      *ldev;          /* Linux device */
+
+
+ /*
+  * Return early if we can't see any printers...
+  */
+
+  if (num_nodes == 0)
+    ieee1394_list(NULL);
+
+  if (num_nodes == 0)
+  {
+    strcpy(error_string, "No IEEE-1394 printers found!");
+    return (NULL);
+  }
+
+ /*
+  * Look for the URI...
+  */
+
+  for (i = 0; i < num_nodes; i ++)
+    if (strcmp(nodes[i].uri, uri) == 0)
+      break;
+
+  if (i >= num_nodes)
+  {
+    snprintf(error_string, sizeof(error_string), "Device %s not found!", uri);
+    return (NULL);
+  }
+
+ /*
+  * Now create a new device structure...
+  */
+
+  if ((ldev = calloc(sizeof(linux1394_dev_t), 1)) == NULL)
+  {
+    strcpy(error_string, "Out of memory!");
+    return (NULL);
+  }
+
+  ldev->handle = raw1394_new_handle();
+  ldev->node   = nodes[i].node;
+  ldev->addr   = nodes[i].addr;
+
+  raw1394_set_port(ldev->handle, nodes[i].port);
+
+  error_string[0] = '\0';
+
+  return ((ieee1394_dev_t)ldev);
+}
+
+
+/*
+ * 'ieee1394_close()' - Close a printer device.
+ */
+
+int                                    /* O - 0 on success, -1 on failure */
+ieee1394_close(ieee1394_dev_t dev)     /* I - Printer device */
+{
+  linux1394_dev_t      *ldev;          /* Linux device */
+
+
+  ldev = (linux1394_dev_t *)dev;
+
+  raw1394_destroy_handle(ldev->handle);
+
+  free(ldev);
+
+  return (0);
+}
+
+
+/*
+ * 'ieee1394_read()' - Read from a printer device.
+ */
+
+int                                    /* O - Number of bytes read or -1 */
+ieee1394_read(ieee1394_dev_t dev,      /* I - Printer device */
+              char           *buffer,  /* I - Read buffer */
+             int            len)       /* I - Max bytes to read */
+{
+  linux1394_dev_t      *ldev;          /* Linux device */
+
+
+  ldev = (linux1394_dev_t *)dev;
+
+
+  return (0);
+}
+
+
+/*
+ * 'ieee1394_write()' - Write data to a printer device.
+ */
+
+int                                    /* O - Number of bytes written or -1 */
+ieee1394_write(ieee1394_dev_t dev,     /* I - Printer device */
+               char           *buffer, /* I - Buffer to write */
+              int            len)      /* I - Number of bytes to write */
+{
+  linux1394_dev_t      *ldev;          /* Linux device */
+
+
+  ldev = (linux1394_dev_t *)dev;
+
+
+/*  if (raw1394_write(handle, 0xffc0 | j, 0, ,
+                      (quadlet_t *)guid) < 0)*/
+
+  return (len);
+}
+
+
+/*
+ * 'ieee1394_error()' - Return the last error.
+ */
+
+const char *                           /* O - Error string or NULL */
+ieee1394_error(void)
+{
+  if (error_string[0])
+    return (error_string);
+  else
+    return (NULL);
+}
+
+
+/*
+ * End of "$Id: ieee1394-linux.c 4703 2005-09-26 19:33:58Z mike $".
+ */
diff --git a/backend/ieee1394.c b/backend/ieee1394.c
new file mode 100644 (file)
index 0000000..3d88c7a
--- /dev/null
@@ -0,0 +1,267 @@
+/*
+ * "$Id: ieee1394.c 5241 2006-03-07 22:07:44Z mike $"
+ *
+ *   IEEE-1394 backend for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2002 by Easy Software Products, all rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or
+ *   without modification, are permitted provided that the
+ *   following conditions are met:
+ *
+ *     1. Redistributions of source code must retain the above
+ *       copyright notice, this list of conditions and the
+ *       following disclaimer.
+ *
+ *     2. Redistributions in binary form must reproduce the
+ *       above copyright notice, this list of conditions and
+ *       the following disclaimer in the documentation and/or
+ *       other materials provided with the distribution.
+ *
+ *     3. All advertising materials mentioning features or use
+ *       of this software must display the following
+ *       acknowledgement:
+ *
+ *         This product includes software developed by Easy
+ *         Software Products.
+ *
+ *     4. The name of Easy Software Products may not be used to
+ *       endorse or promote products derived from this software
+ *       without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS
+ *   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ *   BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *   DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
+ *   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ *   DAMAGE.
+ *
+ * Contents:
+ *
+ *   main()         - Send a file to the printer.
+ *   list_devices() - List all known printer devices...
+ */
+
+/*
+ * Include necessary headers.
+ */
+
+#include "ieee1394.h"
+
+
+/*
+ * Local functions...
+ */
+
+void   list_devices(void);
+
+
+/*
+ * 'main()' - Send a file to the printer.
+ *
+ * Usage:
+ *
+ *    printer-uri job-id user title copies options [file]
+ */
+
+int                    /* O - Exit status */
+main(int  argc,                /* I - Number of command-line arguments (6 or 7) */
+     char *argv[])     /* I - Command-line arguments */
+{
+  ieee1394_dev_t dev;          /* Printer device */
+  int          fp;             /* Print file */
+  int          copies;         /* Number of copies to print */
+  int          rbytes;         /* Number of bytes read from device */
+  size_t       nbytes,         /* Number of bytes read from file */
+               tbytes;         /* Total number of bytes written */
+  char         buffer[8192];   /* Input/output buffer */
+#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+  struct sigaction action;     /* Actions for POSIX signals */
+#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+
+
+ /*
+  * Make sure status messages are not buffered...
+  */
+
+  setbuf(stderr, NULL);
+
+ /*
+  * Check command-line...
+  */
+
+  if (argc == 1)
+  {
+    list_devices();
+
+    return (0);
+  }
+  else if (argc < 6 || argc > 7)
+  {
+    fprintf(stderr, "Usage: %s job-id user title copies options [file]\n",
+            argv[0]);
+    return (1);
+  }
+
+ /*
+  * If we have 7 arguments, print the file named on the command-line.
+  * Otherwise, send stdin instead...
+  */
+
+  if (argc == 6)
+  {
+    fp     = 0;
+    copies = 1;
+  }
+  else
+  {
+   /*
+    * Try to open the print file...
+    */
+
+    if ((fp = open(argv[6], O_RDONLY)) < 0)
+    {
+      perror("ERROR: unable to open print file");
+      return (1);
+    }
+
+    copies = atoi(argv[4]);
+  }
+
+ /*
+  * Try to open the printer device...
+  */
+
+  fputs("STATE: +connecting-to-device\n", stderr);
+
+  do
+  {
+    if ((dev = ieee1394_open(argv[0])) == NULL)
+    {
+      fputs("INFO: Firewire printer busy; will retry in 30 seconds...\n", stderr);
+      sleep(30);
+    }
+  }
+  while (dev == NULL);
+
+  fputs("STATE: -connecting-to-device\n", stderr);
+
+ /*
+  * Now that we are "connected" to the port, ignore SIGTERM so that we
+  * can finish out any page data the driver sends (e.g. to eject the
+  * current page...  Only ignore SIGTERM if we are printing data from
+  * stdin (otherwise you can't cancel raw jobs...)
+  */
+
+  if (argc < 7)
+  {
+#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
+    sigset(SIGTERM, SIG_IGN);
+#elif defined(HAVE_SIGACTION)
+    memset(&action, 0, sizeof(action));
+
+    sigemptyset(&action.sa_mask);
+    action.sa_handler = SIG_IGN;
+    sigaction(SIGTERM, &action, NULL);
+#else
+    signal(SIGTERM, SIG_IGN);
+#endif /* HAVE_SIGSET */
+  }
+
+ /*
+  * Finally, send the print file...
+  */
+
+  while (copies > 0)
+  {
+    copies --;
+
+    if (fp != 0)
+    {
+      fputs("PAGE: 1 1\n", stderr);
+      lseek(fp, 0, SEEK_SET);
+    }
+
+    tbytes = 0;
+    while ((nbytes = read(fp, buffer, sizeof(buffer))) > 0)
+    {
+     /*
+      * Write the print data to the printer...
+      */
+
+      tbytes += nbytes;
+
+      if (ieee1394_write(dev, buffer, nbytes) < 0)
+      {
+       perror("ERROR: Unable to send print file to printer");
+       break;
+      }
+
+      if ((rbytes = ieee1394_read(dev, buffer, sizeof(buffer))) > 0)
+        fprintf(stderr, "INFO: Read %d bytes from printer...\n", rbytes);
+
+      if (argc > 6)
+       fprintf(stderr, "INFO: Sending print file, %lu bytes...\n",
+               (unsigned long)tbytes);
+    }
+  }
+
+ /*
+  * Close the printer device and input file and return...
+  */
+
+  ieee1394_close(dev);
+
+  if (fp != 0)
+    close(fp);
+
+  fputs("INFO: Ready to print.\n", stderr);
+
+  return (0);
+}
+
+
+/*
+ * 'list_devices()' - List all known devices...
+ */
+
+void
+list_devices(void)
+{
+  int                  i,              /* Looping var */
+                       num_info;       /* Number of devices */
+  ieee1394_info_t      *info;          /* Devices... */
+
+
+ /*
+  * Get the available devices...
+  */
+
+  info = ieee1394_list(&num_info);
+
+ /*
+  * List them as needed...
+  */
+
+  if (num_info > 0)
+  {
+    for (i = 0; i < num_info; i ++)
+      printf("direct %s \"%s\" \"%s\"\n", info[i].uri,
+             info[i].make_model, info[i].description);
+
+    free(info);
+  }
+}
+
+
+/*
+ * End of "$Id: ieee1394.c 5241 2006-03-07 22:07:44Z mike $".
+ */
diff --git a/backend/ieee1394.h b/backend/ieee1394.h
new file mode 100644 (file)
index 0000000..19181c5
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * "$Id: ieee1394.h 4494 2005-02-18 02:18:11Z mike $"
+ *
+ *   IEEE-1394 header for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2002 by Easy Software Products, all rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or
+ *   without modification, are permitted provided that the
+ *   following conditions are met:
+ *
+ *     1. Redistributions of source code must retain the above
+ *       copyright notice, this list of conditions and the
+ *       following disclaimer.
+ *
+ *     2. Redistributions in binary form must reproduce the
+ *       above copyright notice, this list of conditions and
+ *       the following disclaimer in the documentation and/or
+ *       other materials provided with the distribution.
+ *
+ *     3. All advertising materials mentioning features or use
+ *       of this software must display the following
+ *       acknowledgement:
+ *
+ *         This product includes software developed by Easy
+ *         Software Products.
+ *
+ *     4. The name of Easy Software Products may not be used to
+ *       endorse or promote products derived from this software
+ *       without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS
+ *   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ *   BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ *   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *   DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
+ *   BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ *   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *   OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ *   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ *   DAMAGE.
+ */
+
+/*
+ * Include necessary headers.
+ */
+
+#include <cups/cups.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <cups/string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <signal.h>
+
+#ifdef WIN32
+#  include <io.h>
+#else
+#  include <unistd.h>
+#  include <fcntl.h>
+#endif /* WIN32 */
+
+
+/*
+ * Device information structure...
+ */
+
+typedef struct
+{
+  char uri[HTTP_MAX_URI],      /* Device URI */
+       description[128],       /* Description of port */
+       make_model[128];        /* Make and model */
+} ieee1394_info_t;
+
+
+/*
+ * Private device connection information...
+ */
+
+typedef void   *ieee1394_dev_t;
+
+
+/*
+ * Prototypes for standard IEEE-1394 interface...
+ */
+
+extern ieee1394_info_t *ieee1394_list(int *num_devices);
+extern ieee1394_dev_t  ieee1394_open(const char *uri);
+extern int             ieee1394_close(ieee1394_dev_t dev);
+extern int             ieee1394_read(ieee1394_dev_t dev, char *buffer, int len);
+extern int             ieee1394_write(ieee1394_dev_t dev, char *buffer, int len);
+extern const char      *ieee1394_error(void);
+
+
+/*
+ * End of "$Id: ieee1394.h 4494 2005-02-18 02:18:11Z mike $".
+ */
index 693911c658c7f93ccc84ab0c9d1c53fd1219bf7c..c7d647d141450f46bdc96445821b58670143987d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 6214 2007-01-23 17:01:48Z mike $"
+ * "$Id: ipp.c 6318 2007-03-06 04:36:55Z mike $"
  *
  *   IPP backend for the Common UNIX Printing System (CUPS).
  *
@@ -54,7 +54,6 @@
 #include <signal.h>
 #include <sys/wait.h>
 
-
 /*
  * Globals...
  */
@@ -459,7 +458,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
     const char *request_root;          /* CUPS_REQUESTROOT env var */
     char       afilename[1024],        /* a##### filename */
-               aline[1024];            /* Line from file */
+               aline[2048];            /* Line from file */
     FILE       *fp;                    /* File pointer */
 
 
@@ -1341,6 +1340,8 @@ password_cb(const char *prompt)           /* I - Prompt (not used) */
       unlink(pstmpname);
 #endif /* __APPLE__ */
 
+    fputs("ATTR: auth-info-required=username,password\n", stderr);
+
     exit(CUPS_BACKEND_AUTH_REQUIRED);
 
     return (NULL);                     /* Eliminate compiler warning */
@@ -1666,5 +1667,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: ipp.c 6214 2007-01-23 17:01:48Z mike $".
+ * End of "$Id: ipp.c 6318 2007-03-06 04:36:55Z mike $".
  */
index 1e2b9405f0e76790d165e7da346af20cd64fd91b..6366a7fcc398fdebb332de44358db4feed65799f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpd.c 6061 2006-10-23 00:26:52Z mike $"
+ * "$Id: lpd.c 6058 2006-10-23 00:20:09Z mike $"
  *
  *   Line Printer Daemon backend for the Common UNIX Printing System (CUPS).
  *
@@ -1242,5 +1242,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: lpd.c 6061 2006-10-23 00:26:52Z mike $".
+ * End of "$Id: lpd.c 6058 2006-10-23 00:20:09Z mike $".
  */
index dd599f83fcfa2b81e3adc7f241a283e9d82d9e0f..b24ed3617ab7fbe297f26e66969204f5f02af2bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* "$Id: pap.c 6090 2006-11-14 16:35:27Z mike $"
+* "$Id: pap.c 6087 2006-11-14 15:48:34Z mike $"
 *
 * © Copyright 2004 Apple Computer, Inc. All rights reserved.
 * 
index c33fc10d2c70c7a0fbc8cccea10c2520601f65a9..4164e789596b2f7c43e3b419b3908147f770f8e8 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: parallel.c 6181 2007-01-03 18:51:27Z mike $"
+ * "$Id: parallel.c 6178 2007-01-03 18:09:17Z mike $"
  *
  *   Parallel port backend for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -27,6 +27,7 @@
  *
  *   main()         - Send a file to the specified parallel port.
  *   list_devices() - List all parallel devices.
+ *   side_cb()      - Handle side-channel requests...
  */
 
 /*
@@ -66,7 +67,8 @@
  * Local functions...
  */
 
-void   list_devices(void);
+static void    list_devices(void);
+static void    side_cb(int print_fd, int device_fd, int use_bc);
 
 
 /*
@@ -284,7 +286,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       lseek(print_fd, 0, SEEK_SET);
     }
 
-    tbytes = backendRunLoop(print_fd, device_fd, use_bc);
+    tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
 
     if (print_fd != 0 && tbytes >= 0)
       fprintf(stderr, "INFO: Sent print file, " CUPS_LLFMT " bytes...\n",
@@ -308,7 +310,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
  * 'list_devices()' - List all parallel devices.
  */
 
-void
+static void
 list_devices(void)
 {
 #if defined(__hpux) || defined(__sgi) || defined(__sun)
@@ -598,5 +600,70 @@ list_devices(void)
 
 
 /*
- * End of "$Id: parallel.c 6181 2007-01-03 18:51:27Z mike $".
+ * 'side_cb()' - Handle side-channel requests...
+ */
+
+static void
+side_cb(int print_fd,                  /* I - Print file */
+        int device_fd,                 /* I - Device file */
+       int use_bc)                     /* I - Using back-channel? */
+{
+  cups_sc_command_t    command;        /* Request command */
+  cups_sc_status_t     status;         /* Request/response status */
+  char                 data[2048];     /* Request/response data */
+  int                  datalen;        /* Request/response data size */
+
+
+  datalen = sizeof(data);
+
+  if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
+  {
+    fputs("WARNING: Failed to read side-channel request!\n", stderr);
+    return;
+  }
+
+  switch (command)
+  {
+    case CUPS_SC_CMD_DRAIN_OUTPUT :
+        if (tcdrain(device_fd))
+         status = CUPS_SC_STATUS_IO_ERROR;
+       else
+         status = CUPS_SC_STATUS_OK;
+
+       datalen = 0;
+        break;
+
+    case CUPS_SC_CMD_GET_BIDI :
+        data[0] = use_bc;
+        datalen = 1;
+        break;
+
+    case CUPS_SC_CMD_GET_DEVICE_ID :
+        memset(data, 0, sizeof(data));
+
+        if (backendGetDeviceID(device_fd, data, sizeof(data) - 1,
+                              NULL, 0, NULL, NULL, 0))
+        {
+         status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+         datalen = 0;
+       }
+       else
+        {
+         status  = CUPS_SC_STATUS_OK;
+         datalen = strlen(data);
+       }
+        break;
+
+    default :
+        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+       datalen = 0;
+       break;
+  }
+
+  cupsSideChannelWrite(command, status, data, datalen, 1.0);
+}
+
+
+/*
+ * End of "$Id: parallel.c 6178 2007-01-03 18:09:17Z mike $".
  */
index f613c054021a05f869375a1b3506e098eb855b9e..461bbb4e7248f1efc570aef77ae49695716a3b60 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: runloop.c 6145 2006-12-06 20:10:16Z mike $"
+ * "$Id: runloop.c 6170 2007-01-02 17:26:41Z mike $"
  *
  *   Common run loop API for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2006 by Easy Software Products, all rights reserved.
+ *   Copyright 2006-2007 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
  */
 
 ssize_t                                        /* O - Total bytes on success, -1 on error */
-backendRunLoop(int print_fd,           /* I - Print file descriptor */
-               int device_fd,          /* I - Device file descriptor */
-              int use_bc)              /* I - Use back-channel? */
+backendRunLoop(
+    int  print_fd,                     /* I - Print file descriptor */
+    int  device_fd,                    /* I - Device file descriptor */
+    int  use_bc,                       /* I - Use back-channel? */
+    void (*side_cb)(int, int, int))    /* I - Side-channel callback */
 {
   int          nfds;                   /* Maximum file descriptor value + 1 */
   fd_set       input,                  /* Input set for reading */
@@ -112,12 +114,14 @@ backendRunLoop(int print_fd,              /* I - Print file descriptor */
       FD_SET(print_fd, &input);
     if (use_bc)
       FD_SET(device_fd, &input);
+    if (side_cb)
+      FD_SET(CUPS_SC_FD, &input);
 
     FD_ZERO(&output);
     if (print_bytes || !use_bc)
       FD_SET(device_fd, &output);
 
-    if (use_bc)
+    if (use_bc || side_cb)
     {
       if (select(nfds, &input, &output, NULL, NULL) < 0)
       {
@@ -137,6 +141,13 @@ backendRunLoop(int print_fd,               /* I - Print file descriptor */
       }
     }
 
+   /*
+    * Check if we have a side-channel request ready...
+    */
+
+    if (side_cb && FD_ISSET(CUPS_SC_FD, &input))
+      (*side_cb)(print_fd, device_fd, use_bc);
+
    /*
     * Check if we have back-channel data ready...
     */
@@ -258,5 +269,5 @@ backendRunLoop(int print_fd,                /* I - Print file descriptor */
 
 
 /*
- * End of "$Id: runloop.c 6145 2006-12-06 20:10:16Z mike $".
+ * End of "$Id: runloop.c 6170 2007-01-02 17:26:41Z mike $".
  */
index fd06127d74833440e71a26af78c4ed305e4853de..df4f1fc511f78a431896559ae8d869258586de06 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: scsi.c 6032 2006-10-12 19:19:47Z mike $"
+ * "$Id: scsi.c 6029 2006-10-12 17:55:17Z mike $"
  *
  *   SCSI printer backend for the Common UNIX Printing System (CUPS).
  *
@@ -220,5 +220,5 @@ main(int  argc,             /* I - Number of command-line arguments (6 or 7) */
 
 
 /*
- * End of "$Id: scsi.c 6032 2006-10-12 19:19:47Z mike $".
+ * End of "$Id: scsi.c 6029 2006-10-12 17:55:17Z mike $".
  */
index ec1b0e6a640c82a0e35990e19db9b229750e654e..a931389f846981f2821e3160534cd460d58cf175 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: serial.c 6068 2006-10-27 17:10:34Z mike $"
+ * "$Id: serial.c 6170 2007-01-02 17:26:41Z mike $"
  *
  *   Serial port backend for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -27,6 +27,7 @@
  *
  *   main()         - Send a file to the printer or server.
  *   list_devices() - List all serial devices.
+ *   side_cb()      - Handle side-channel requests...
  */
 
 /*
@@ -91,7 +92,8 @@
  * Local functions...
  */
 
-void   list_devices(void);
+static void    list_devices(void);
+static void    side_cb(int print_fd, int device_fd, int use_bc);
 
 
 /*
@@ -556,6 +558,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       if (!print_bytes)
        FD_SET(print_fd, &input);
       FD_SET(device_fd, &input);
+      FD_SET(CUPS_SC_FD, &input);
 
       FD_ZERO(&output);
       if (print_bytes)
@@ -564,6 +567,13 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
       if (select(nfds, &input, &output, NULL, NULL) < 0)
        continue;                       /* Ignore errors here */
 
+     /*
+      * Check if we have a side-channel request ready...
+      */
+
+      if (FD_ISSET(CUPS_SC_FD, &input))
+        side_cb(print_fd, device_fd, 1);
+
      /*
       * Check if we have back-channel data ready...
       */
@@ -712,7 +722,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
  * 'list_devices()' - List all serial devices.
  */
 
-void
+static void
 list_devices(void)
 {
 #if defined(__hpux) || defined(__sgi) || defined(__sun) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
@@ -1226,5 +1236,54 @@ list_devices(void)
 
 
 /*
- * End of "$Id: serial.c 6068 2006-10-27 17:10:34Z mike $".
+ * 'side_cb()' - Handle side-channel requests...
+ */
+
+static void
+side_cb(int print_fd,                  /* I - Print file */
+        int device_fd,                 /* I - Device file */
+       int use_bc)                     /* I - Using back-channel? */
+{
+  cups_sc_command_t    command;        /* Request command */
+  cups_sc_status_t     status;         /* Request/response status */
+  char                 data[2048];     /* Request/response data */
+  int                  datalen;        /* Request/response data size */
+
+
+  datalen = sizeof(data);
+
+  if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
+  {
+    fputs("WARNING: Failed to read side-channel request!\n", stderr);
+    return;
+  }
+
+  switch (command)
+  {
+    case CUPS_SC_CMD_DRAIN_OUTPUT :
+        if (tcdrain(device_fd))
+         status = CUPS_SC_STATUS_IO_ERROR;
+       else
+         status = CUPS_SC_STATUS_OK;
+
+       datalen = 0;
+        break;
+
+    case CUPS_SC_CMD_GET_BIDI :
+        data[0] = use_bc;
+        datalen = 1;
+        break;
+
+    default :
+        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+       datalen = 0;
+       break;
+  }
+
+  cupsSideChannelWrite(command, status, data, datalen, 1.0);
+}
+
+
+/*
+ * End of "$Id: serial.c 6170 2007-01-02 17:26:41Z mike $".
  */
index fd7d3922ee111fa80b6a35e377a32a9683ae4888..a269ddaba5edbdb0d447b0d38e36194c54040000 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: snmp.c 6181 2007-01-03 18:51:27Z mike $"
+ * "$Id: snmp.c 6180 2007-01-03 18:19:32Z mike $"
  *
  *   SNMP discovery backend for the Common UNIX Printing System (CUPS).
  *
@@ -2459,5 +2459,5 @@ update_cache(snmp_cache_t *device,        /* I - Device */
 
 
 /*
- * End of "$Id: snmp.c 6181 2007-01-03 18:51:27Z mike $".
+ * End of "$Id: snmp.c 6180 2007-01-03 18:19:32Z mike $".
  */
index e6889cf8f7b58943de04cd81cc516fb6275fd59f..20fb7e31dfabadcffba0174356a22cb858ce03ab 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: socket.c 6061 2006-10-23 00:26:52Z mike $"
+ * "$Id: socket.c 6170 2007-01-02 17:26:41Z mike $"
  *
  *   AppSocket backend for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -25,7 +25,8 @@
  *
  * Contents:
  *
- *   main() - Send a file to the printer or server.
+ *   main()    - Send a file to the printer or server.
+ *   side_cb() - Handle side-channel requests...
  */
 
 /*
 #endif /* WIN32 */
 
 
+/*
+ * Local functions...
+ */
+
+static void    side_cb(int print_fd, int device_fd, int use_bc);
+
+
 /*
  * 'main()' - Send a file to the printer or server.
  *
@@ -325,7 +333,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       lseek(print_fd, 0, SEEK_SET);
     }
 
-    tbytes = backendRunLoop(print_fd, device_fd, 1);
+    tbytes = backendRunLoop(print_fd, device_fd, 1, side_cb);
 
     if (print_fd != 0 && tbytes >= 0)
       fprintf(stderr, "INFO: Sent print file, " CUPS_LLFMT " bytes...\n",
@@ -398,5 +406,54 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
 
 
 /*
- * End of "$Id: socket.c 6061 2006-10-23 00:26:52Z mike $".
+ * 'side_cb()' - Handle side-channel requests...
+ */
+
+static void
+side_cb(int print_fd,                  /* I - Print file */
+        int device_fd,                 /* I - Device file */
+       int use_bc)                     /* I - Using back-channel? */
+{
+  cups_sc_command_t    command;        /* Request command */
+  cups_sc_status_t     status;         /* Request/response status */
+  char                 data[2048];     /* Request/response data */
+  int                  datalen;        /* Request/response data size */
+
+
+  datalen = sizeof(data);
+
+  if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
+  {
+    fputs("WARNING: Failed to read side-channel request!\n", stderr);
+    return;
+  }
+
+  switch (command)
+  {
+    case CUPS_SC_CMD_DRAIN_OUTPUT :
+       /*
+        * Our sockets disable the Nagle algorithm and data is sent immediately.
+       */
+
+        status  = CUPS_SC_STATUS_OK;
+       datalen = 0;
+        break;
+
+    case CUPS_SC_CMD_GET_BIDI :
+        data[0] = use_bc;
+        datalen = 1;
+        break;
+
+    default :
+        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+       datalen = 0;
+       break;
+  }
+
+  cupsSideChannelWrite(command, status, data, datalen, 1.0);
+}
+
+
+/*
+ * End of "$Id: socket.c 6170 2007-01-02 17:26:41Z mike $".
  */
index dc1845e9096798199e4aeebe65f41afa2d217636..4622e5d21d1031898b1b92767b8f67eb7939c74a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: test1284.c 5591 2006-05-26 19:51:59Z mike $"
+ * "$Id: test1284.c 5590 2006-05-26 19:48:26Z mike $"
  *
  *   IEEE-1284 support functions test program for the Common UNIX Printing
  *   System (CUPS).
@@ -92,5 +92,5 @@ main(int  argc,                               /* I - Number of command-line args */
 
 
 /*
- * End of "$Id: test1284.c 5591 2006-05-26 19:51:59Z mike $".
+ * End of "$Id: test1284.c 5590 2006-05-26 19:48:26Z mike $".
  */
index d1da59b9be42de268718657143cdd14da66378c9..4e0697752118122609678696d010f5d725abb10d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: usb-darwin.c 6090 2006-11-14 16:35:27Z mike $"
+ * "$Id: usb-darwin.c 6302 2007-02-22 19:36:36Z mike $"
  *
  * © Copyright 2005-2006 Apple Computer, Inc. All rights reserved.
  *
@@ -58,6 +58,7 @@
 #include <mach/mach_error.h>
 #include <mach/mach_time.h>
 #include <cups/debug.h>
+#include <cups/sidechannel.h>
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <IOKit/usb/IOUSBLib.h>
@@ -65,6 +66,7 @@
 
 #include <pthread.h>
 
+
 /* 
  * WAITEOF_DELAY is number of seconds we'll wait for responses from
  * the printer after we've finished sending all the data 
@@ -86,6 +88,7 @@
 
 #define kUSBGenericTOPrinterClassDriver        CFSTR("/System/Library/Printers/Libraries/USBGenericTOPrintingClass.plugin")
 #define kUSBPrinterClassDeviceNotOpen  -9664   /*kPMInvalidIOMContext*/
+#define kWriteBufferSize               2048
 
 
 #pragma mark -
@@ -183,6 +186,17 @@ typedef struct printer_data_s {                    /**** Printer context data ****/
   UInt32               location;
   Boolean              waitEOF;
 
+  pthread_cond_t       reqWaitCompCond;
+  pthread_mutex_t      reqWaitMutex;
+  pthread_mutex_t      waitCloseMutex;
+  pthread_mutex_t      writeCompMutex;
+  int                  writeDone;
+  int                  reqWaitDone;
+  int                  reqWqitFlag;
+  int                  directionalFlag;        /* 0=uni, 1=bidi */
+  ssize_t              dataSize;
+  ssize_t              dataOffset;
+  char                 dataBuffer[kWriteBufferSize];
 } printer_data_t;
 
 
@@ -208,6 +222,12 @@ static CFStringRef cfstr_create_and_trim(const char *cstr);
 static void parse_options(const char *options, char *serial, UInt32 *location, Boolean *waitEOF);
 static void setup_cfLanguage(void);
 static void *read_thread(void *reference);
+static void *reqestWait_thread(void *reference);
+static void usbSoftReset(printer_data_t *userData, cups_sc_status_t *status);
+static void usbDrainOutput(printer_data_t *userData, cups_sc_status_t *status);
+static void usbGetBidirectional(printer_data_t *userData, cups_sc_status_t *status, char *data, int *datalen);
+static void usbGetDeviceID(printer_data_t *userData, cups_sc_status_t *status, char *data, int *datalen);
+static void usbGetDevState(printer_data_t *userData, cups_sc_status_t *status, char *data, int *datalen);
 
 
 #if defined(__i386__)
@@ -257,6 +277,12 @@ print_device(const char *uri,              /* I - Device URI */
   pthread_cond_t  *readCompleteConditionPtr = NULL;    /* Read complete condition */
   pthread_mutex_t *readMutexPtr = NULL;                        /* Read mutex */
   CFStringRef    driverBundlePath;                     /* Class driver path */
+  int             reqWait_create = 0;                  /* RequestWait thread created? */
+  pthread_t       reqWaitThread;                       /* RequestWait thread */
+  pthread_cond_t  *reqWaitCompCondPtr = NULL;          /* RequestWait complete condition */
+  pthread_mutex_t *reqWaitMutexPtr = NULL;             /* RequestWait mutex */
+  pthread_mutex_t *waitCloseMutexPtr = NULL;           /* wait close mutex */
+  pthread_mutex_t *writeCompMutexPtr = NULL;           /* write complete mutex */
 
   setup_cfLanguage();
   parse_options(options, serial, &printer_data.location, &printer_data.waitEOF);
@@ -358,17 +384,45 @@ print_device(const char *uri,             /* I - Device URI */
     if (pthread_mutex_init(&printer_data.readMutex, NULL) == 0)
       readMutexPtr = &printer_data.readMutex;
 
+    printer_data.done = 0;
+
     if (pthread_create(&thr, NULL, read_thread, &printer_data) == 0)
       thread_created = 1;
 
     if (thread_created == 0) 
       fprintf(stderr, "WARNING: Couldn't create read channel\n");
+
+    if (pthread_cond_init(&printer_data.reqWaitCompCond, NULL) == 0)   
+      reqWaitCompCondPtr = &printer_data.reqWaitCompCond;
+
+    if (pthread_mutex_init(&printer_data.reqWaitMutex, NULL) == 0)
+      reqWaitMutexPtr = &printer_data.reqWaitMutex;
+
+    printer_data.reqWaitDone = 0;
+    printer_data.reqWqitFlag = 0;
+
+    if (pthread_create(&reqWaitThread, NULL, reqestWait_thread, &printer_data) == 0)
+      reqWait_create = 1;
+
+    if (reqWait_create == 0) 
+      fprintf(stderr, "WARNING: Couldn't create sidechannel thread!\n");
+
+    if (pthread_mutex_init(&printer_data.waitCloseMutex, NULL) == 0)
+      waitCloseMutexPtr = &printer_data.waitCloseMutex;
+
+    if (pthread_mutex_init(&printer_data.writeCompMutex, NULL) == 0)
+      writeCompMutexPtr = &printer_data.writeCompMutex;
   }
 
   /*
    * The main thread sends the print file...
    */
 
+  printer_data.writeDone = 0;
+  printer_data.dataSize = 0;
+  printer_data.dataOffset = 0;
+  pthread_mutex_lock(writeCompMutexPtr);
+
   while (status == noErr && copies-- > 0) {
     UInt32             wbytes;                 /* Number of bytes written */
     ssize_t            nbytes;                 /* Number of bytes read */
@@ -386,6 +440,15 @@ print_device(const char *uri,              /* I - Device URI */
       tbytes += nbytes;
 
       while (nbytes > 0 && status == noErr) {
+       if (printer_data.writeDone) {
+         printer_data.dataSize = nbytes;
+         printer_data.dataOffset = bufptr - buffer;
+         memcpy(printer_data.dataBuffer, buffer, nbytes);
+
+         status = -1;
+         break;
+       }
+
        wbytes = nbytes;
        status = (*(printer_data.printerDriver))->WritePipe( printer_data.printerDriver, (UInt8*)bufptr, &wbytes, 0 /* nbytes > wbytes? 0: feof(fp) */ );
        if (wbytes < 0 || noErr != status) {
@@ -403,6 +466,9 @@ print_device(const char *uri,               /* I - Device URI */
     }
   }
 
+  printer_data.writeDone = 1;
+  pthread_mutex_unlock(writeCompMutexPtr);
+
   if (thread_created) {
     /* Signal the read thread that we are done... */
     printer_data.done = 1;
@@ -420,6 +486,35 @@ print_device(const char *uri,              /* I - Device URI */
     pthread_join( thr,NULL);                           /* wait for the child thread to return */
   }
 
+  if (reqWait_create) {
+    /* Signal the cupsSideChannelDoRequest wait thread that we are done... */
+    printer_data.reqWaitDone = 1;
+
+    /* 
+     * Give the cupsSideChannelDoRequest wait thread WAITEOF_DELAY seconds to complete
+     * all the data. If we are not signaled in that time then force the thread to exit
+     * by setting the waiteof to be false. Plese note that this relies on us using the
+     * timeout class driver.
+     */
+    struct timespec reqWaitSleepUntil = { time(NULL) + WAITEOF_DELAY, 0 };
+    pthread_mutex_lock(&printer_data.reqWaitMutex);
+
+    while (!printer_data.reqWqitFlag) {
+      if (pthread_cond_timedwait(&printer_data.reqWaitCompCond,
+                                 &printer_data.reqWaitMutex,
+                                (const struct timespec *)&reqWaitSleepUntil) != 0) {
+       printer_data.waitEOF = false;
+       printer_data.reqWqitFlag = 1;
+      }
+    }
+    pthread_mutex_unlock(&printer_data.reqWaitMutex);
+    pthread_join(reqWaitThread,NULL);                  /* wait for the child thread to return */
+  }
+
+  /* interface close wait mutex(for softreset) */
+  pthread_mutex_lock(waitCloseMutexPtr);
+  pthread_mutex_unlock(waitCloseMutexPtr);
+
   /*
    * Close the connection and input file and general clean up...
    */
@@ -434,6 +529,18 @@ print_device(const char *uri,              /* I - Device URI */
   if (readMutexPtr != NULL)
     pthread_mutex_destroy(&printer_data.readMutex);
 
+  if (waitCloseMutexPtr != NULL)
+    pthread_mutex_destroy(&printer_data.waitCloseMutex);
+
+  if (writeCompMutexPtr != NULL)
+    pthread_mutex_destroy(&printer_data.writeCompMutex);
+
+  if (reqWaitCompCondPtr != NULL)
+    pthread_cond_destroy(&printer_data.reqWaitCompCond);
+
+  if (reqWaitMutexPtr != NULL)
+    pthread_mutex_destroy(&printer_data.reqWaitMutex);
+
   if (printer_data.make != NULL)
     CFRelease(printer_data.make);
 
@@ -465,16 +572,27 @@ static Boolean list_device_callback(void *refcon, io_service_t obj)
     copy_devicestring(obj, &deviceIDString, &deviceLocation);
     if (deviceIDString != NULL) {
       CFStringRef make = NULL,  model = NULL, serial = NULL;
-      char uristr[1024], makestr[1024], modelstr[1024], serialstr[1024], optionsstr[1024];
-      char idstr[1024];
+      char uristr[1024], makestr[1024], modelstr[1024], serialstr[1024];
+      char optionsstr[1024], idstr[1024];
 
       copy_deviceinfo(deviceIDString, &make, &model, &serial);
 
       modelstr[0] = '/';
 
-      CFStringGetCString(deviceIDString, idstr, sizeof(idstr),    kCFStringEncodingUTF8);
-      CFStringGetCString(make, makestr, sizeof(makestr),    kCFStringEncodingUTF8);
-      CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1, kCFStringEncodingUTF8);
+      CFStringGetCString(deviceIDString, idstr, sizeof(idstr),
+                         kCFStringEncodingUTF8);
+
+      if (make)
+        CFStringGetCString(make, makestr, sizeof(makestr),
+                          kCFStringEncodingUTF8);
+      else
+        strcpy(makestr, "Unknown");
+
+      if (model)
+       CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1,
+                          kCFStringEncodingUTF8);
+      else
+        strcpy(modelstr + 1, "Printer");
 
      /*
       * Fix common HP 1284 bug...
@@ -792,6 +910,8 @@ static kern_return_t load_printerdriver(printer_data_t *printer, CFStringRef *dr
 
 static kern_return_t registry_open(printer_data_t *printer, CFStringRef *driverBundlePath)
 {
+  printer->directionalFlag = 0;
+
   kern_return_t kr = load_printerdriver(printer, driverBundlePath);
   if (kr != kIOReturnSuccess) {
     kr = -2;
@@ -807,6 +927,8 @@ static kern_return_t registry_open(printer_data_t *printer, CFStringRef *driverB
          kr = -1;
        }
       }
+    } else {
+      printer->directionalFlag = 1;
     }
   }
 
@@ -1392,5 +1514,201 @@ static void *read_thread(void *reference)
 }
 
 /*
- * End of "$Id: usb-darwin.c 6090 2006-11-14 16:35:27Z mike $".
+ * 'reqestWait_thread()' - A thread cupsSideChannelDoRequest wait.
+ */
+static void *reqestWait_thread(void *reference) {
+  printer_data_t *userData = (printer_data_t *)reference;
+  int datalen;
+  cups_sc_command_t command;
+  cups_sc_status_t status;
+  uint64_t start, delay;
+  struct mach_timebase_info timeBaseInfo;
+  char data[2048];
+
+  /*
+   * Calculate what 100 milliSeconds are in mach absolute time...
+   */
+  mach_timebase_info(&timeBaseInfo);
+  delay = ((uint64_t)100000000 * (uint64_t)timeBaseInfo.denom) / (uint64_t)timeBaseInfo.numer;
+
+  /* interface close wait mutex lock. */
+  pthread_mutex_lock(&(userData->waitCloseMutex));
+
+  do {
+    /* 
+     * Remember when we started so we can throttle the loop after the cupsSideChannelDoRequest call...
+     */
+    start = mach_absolute_time();
+
+    /* Poll for a command... */
+    command=0;
+    datalen = sizeof(data);
+    bzero(data, sizeof(data));
+
+    if (!cupsSideChannelRead(&command, &status, data, &datalen, 0.0)) {
+      datalen = sizeof(data);
+
+      switch (command) {
+       case CUPS_SC_CMD_SOFT_RESET:
+           /* do a soft reset */
+           usbSoftReset(userData, &status);
+           datalen = 0;
+           userData->reqWaitDone = 1;
+           break;
+       case CUPS_SC_CMD_DRAIN_OUTPUT:
+           /* drain all pending output */
+           usbDrainOutput(userData, &status);
+           datalen = 0;
+           break;
+       case CUPS_SC_CMD_GET_BIDI:
+           /* return whether the connection is bidirectional */
+           usbGetBidirectional(userData, &status, data, &datalen);
+           break;
+       case CUPS_SC_CMD_GET_DEVICE_ID:
+           /* return the IEEE-1284 device ID */
+           usbGetDeviceID(userData, &status, data, &datalen);
+           break;
+       case CUPS_SC_CMD_GET_STATE:
+           /* return the device state */
+           usbGetDevState(userData, &status, data, &datalen);
+           break;
+       default:
+           status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+           datalen = 0;
+           break;
+      }
+
+      if (userData->writeDone) {
+        status = CUPS_SC_STATUS_NONE;
+      }
+
+      /* Send a response... */
+      cupsSideChannelWrite(command, status, data, datalen, 1.0);
+    }
+
+    /*
+     * Make sure this loop executes no more than once every 500 miliseconds...
+     */
+    if ((userData->waitEOF) || (!userData->reqWaitDone)) {
+      mach_wait_until(start + delay);
+    }
+  } while(!userData->reqWaitDone);
+
+  sleep(1);
+  pthread_mutex_lock(&userData->reqWaitMutex);
+  userData->reqWqitFlag = 1;
+  pthread_cond_signal(&userData->reqWaitCompCond);
+  pthread_mutex_unlock(&userData->reqWaitMutex);
+
+  /* interface close wait mutex unlock. */
+  pthread_mutex_unlock(&(userData->waitCloseMutex));
+
+  return NULL;
+}
+
+#pragma mark -
+/*
+ * 'usbSoftReset'
+ */
+static void usbSoftReset(printer_data_t *userData, cups_sc_status_t *status) {
+  OSStatus err;
+
+  /* write stop. */
+  userData->writeDone = 1;
+
+  /* Abort (print_device()-WritePipe kIOReturnAborted return) */
+  if (userData->printerDriver != NULL)
+    err = (*(userData->printerDriver))->Abort(userData->printerDriver);
+
+  /* print_device() WritePipe_Loop break wait. */
+  pthread_mutex_lock(&(userData->writeCompMutex));
+  pthread_mutex_unlock(&(userData->writeCompMutex));
+
+  /* SoftReset */
+  if (userData->printerDriver != NULL)
+    (*(userData->printerDriver))->SoftReset(userData->printerDriver, 0);
+
+  if (status != NULL)
+    *status  = CUPS_SC_STATUS_OK;
+}
+
+/*
+ * 'usbDrainOutput'
+ */
+static void usbDrainOutput(printer_data_t *userData, cups_sc_status_t *status) {
+  OSStatus osSts = noErr;      /* Function results */
+  OSStatus err = noErr;
+  UInt32  wbytes;                      /* Number of bytes written */
+  ssize_t nbytes;                      /* Number of bytes read */
+  char *bufptr;
+
+  bufptr = userData->dataBuffer+userData->dataOffset;
+  nbytes = userData->dataSize;
+
+  while((nbytes > 0) && (osSts == noErr)) {
+    wbytes = nbytes;
+    osSts = (*(userData->printerDriver))->WritePipe(userData->printerDriver, (UInt8*)bufptr, &wbytes, 0);
+
+    if (wbytes < 0 || noErr != osSts) {
+      if (osSts != kIOReturnAborted) {
+       err = (*(userData->printerDriver))->Abort(userData->printerDriver);
+       break;
+      }
+    }
+
+    nbytes -= wbytes;
+    bufptr += wbytes;
+  }
+
+  if (status != NULL) {
+    if ((osSts != noErr) || (err != noErr)) {
+      *status  = CUPS_SC_STATUS_IO_ERROR;
+    } else {
+      *status  = CUPS_SC_STATUS_OK;
+    }
+  }
+}
+
+/*
+ * 'usbGetBidirectional'
+ */
+static void usbGetBidirectional(printer_data_t *userData, cups_sc_status_t *status, char *data, int *datalen) {
+  *data = userData->directionalFlag;
+  *datalen = 1;
+
+  if (status != NULL)
+    *status = CUPS_SC_STATUS_OK;
+}
+
+/*
+ * 'usbGetDeviceID'
+ */
+static void usbGetDeviceID(printer_data_t *userData, cups_sc_status_t *status, char *data, int *datalen) {
+  UInt32 deviceLocation = 0;
+  CFStringRef deviceIDString = NULL;
+
+  /* GetDeviceID */
+  copy_devicestring(userData->printerObj, &deviceIDString, &deviceLocation);
+  CFStringGetCString(deviceIDString, data, *datalen, kCFStringEncodingUTF8);
+  *datalen = strlen(data);
+
+  if (status != NULL) {
+    *status  = CUPS_SC_STATUS_OK;
+  }
+}
+
+/*
+ * 'usbGetDevState'
+ */
+static void usbGetDevState(printer_data_t *userData, cups_sc_status_t *status, char *data, int *datalen) {
+  *data = CUPS_SC_STATE_ONLINE;
+  *datalen = 1;
+
+  if (status != NULL) {
+    *status = CUPS_SC_STATUS_OK;
+  }
+}
+
+/*
+ * End of "$Id: usb-darwin.c 6302 2007-02-22 19:36:36Z mike $".
  */
index 7e78a3f271297604877f7591ffd16fff608a8a05..5efa30ff9bb04e59a7a8876234282b6aa61188bf 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * "$Id: usb-unix.c 6234 2007-02-05 20:25:50Z mike $"
+ * "$Id: usb-unix.c 6293 2007-02-20 13:40:55Z 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-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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,7 @@
  *   print_device() - Print a file to a USB device.
  *   list_devices() - List all USB devices.
  *   open_device()  - Open a USB device...
+ *   side_cb()      - Handle side-channel requests...
  */
 
 /*
@@ -44,7 +45,8 @@
  * Local functions...
  */
 
-int    open_device(const char *uri, int *use_bc);
+static int     open_device(const char *uri, int *use_bc);
+static void    side_cb(int print_fd, int device_fd, int use_bc);
 
 
 /*
@@ -79,12 +81,14 @@ print_device(const char *uri,               /* I - Device URI */
   do
   {
    /*
-    * Disable backchannel data when printing to Canon or Minolta USB
-    * printers - apparently these printers will return the IEEE-1284
-    * device ID over and over and over when they get a read request...
+    * Disable backchannel data when printing to Brother, Canon, or
+    * Minolta USB printers - apparently these printers will return
+    * the IEEE-1284 device ID over and over and over when they get
+    * a read request...
     */
 
-    use_bc = strcasecmp(hostname, "Canon") &&
+    use_bc = strcasecmp(hostname, "Brother") &&
+             strcasecmp(hostname, "Canon") &&
              strcasecmp(hostname, "Konica Minolta") &&
              strcasecmp(hostname, "Minolta");
 
@@ -162,7 +166,7 @@ print_device(const char *uri,               /* I - Device URI */
       lseek(print_fd, 0, SEEK_SET);
     }
 
-    tbytes = backendRunLoop(print_fd, device_fd, use_bc);
+    tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
 
     if (print_fd != 0 && tbytes >= 0)
       fprintf(stderr, "INFO: Sent print file, " CUPS_LLFMT " bytes...\n",
@@ -288,7 +292,7 @@ list_devices(void)
  * 'open_device()' - Open a USB device...
  */
 
-int                                    /* O - File descriptor or -1 on error */
+static int                             /* O - File descriptor or -1 on error */
 open_device(const char *uri,           /* I - Device URI */
             int        *use_bc)                /* O - Set to 0 for unidirectional */
 {
@@ -526,5 +530,70 @@ open_device(const char *uri,               /* I - Device URI */
 
 
 /*
- * End of "$Id: usb-unix.c 6234 2007-02-05 20:25:50Z mike $".
+ * 'side_cb()' - Handle side-channel requests...
+ */
+
+static void
+side_cb(int print_fd,                  /* I - Print file */
+        int device_fd,                 /* I - Device file */
+       int use_bc)                     /* I - Using back-channel? */
+{
+  cups_sc_command_t    command;        /* Request command */
+  cups_sc_status_t     status;         /* Request/response status */
+  char                 data[2048];     /* Request/response data */
+  int                  datalen;        /* Request/response data size */
+
+
+  datalen = sizeof(data);
+
+  if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
+  {
+    fputs("WARNING: Failed to read side-channel request!\n", stderr);
+    return;
+  }
+
+  switch (command)
+  {
+    case CUPS_SC_CMD_DRAIN_OUTPUT :
+        if (tcdrain(device_fd))
+         status = CUPS_SC_STATUS_IO_ERROR;
+       else
+         status = CUPS_SC_STATUS_OK;
+
+       datalen = 0;
+        break;
+
+    case CUPS_SC_CMD_GET_BIDI :
+        data[0] = use_bc;
+        datalen = 1;
+        break;
+
+    case CUPS_SC_CMD_GET_DEVICE_ID :
+        memset(data, 0, sizeof(data));
+
+        if (backendGetDeviceID(device_fd, data, sizeof(data) - 1,
+                              NULL, 0, NULL, NULL, 0))
+        {
+         status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+         datalen = 0;
+       }
+       else
+        {
+         status  = CUPS_SC_STATUS_OK;
+         datalen = strlen(data);
+       }
+        break;
+
+    default :
+        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+       datalen = 0;
+       break;
+  }
+
+  cupsSideChannelWrite(command, status, data, datalen, 1.0);
+}
+
+
+/*
+ * End of "$Id: usb-unix.c 6293 2007-02-20 13:40:55Z mike $".
  */
index cee5d86ca21eb176c1257a8e138a155cf2f366ff..ad6d95d07acff40493aac40f58d56a2570d6fdf9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: usb.c 5591 2006-05-26 19:51:59Z mike $"
+ * "$Id: usb.c 5590 2006-05-26 19:48:26Z mike $"
  *
  *   USB port backend for the Common UNIX Printing System (CUPS).
  *
@@ -270,5 +270,5 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
 
 /*
- * End of "$Id: usb.c 5591 2006-05-26 19:51:59Z mike $".
+ * End of "$Id: usb.c 5590 2006-05-26 19:48:26Z mike $".
  */
index 767d33e1c4b8af7ca7165ccbabd92463af23ed04..2c5dd988d7d669018a621574291973ecaa169ddd 100644 (file)
@@ -1,16 +1,14 @@
 # DO NOT DELETE
 
-lpc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-lpc.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-lpc.o: ../cups/i18n.h ../cups/transcode.h ../cups/debug.h ../cups/string.h
-lpc.o: ../config.h
+lpc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+lpc.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/i18n.h
+lpc.o: ../cups/transcode.h ../cups/debug.h ../cups/string.h ../config.h
 lpq.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpq.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
-lpq.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
-lpq.o: ../cups/debug.h
+lpq.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lpq.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
 lpr.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-lpr.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
-lpr.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
-lprm.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-lprm.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-lprm.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+lpr.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lpr.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+lprm.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+lprm.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/i18n.h
+lprm.o: ../cups/transcode.h ../cups/string.h ../config.h
index 3c51c6a54d8ebebc7bd2a4ce427e363156ce7c34..808ed674ddc907f9d98f87281b6efd57fb5345fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpc.c 6073 2006-11-02 20:01:54Z mike $"
+ * "$Id: lpc.c 6070 2006-11-02 16:20:46Z mike $"
  *
  *   "lpc" command for the Common UNIX Printing System (CUPS).
  *
@@ -471,5 +471,5 @@ show_status(http_t     *http,               /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpc.c 6073 2006-11-02 20:01:54Z mike $".
+ * End of "$Id: lpc.c 6070 2006-11-02 16:20:46Z mike $".
  */
index 1feacaaf4364c70c22b6ef7de4ff484f2c25166f..719e3b24933927c451addebb73a6e2be79b17995 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpq.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lpq.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "lpq" command for the Common UNIX Printing System (CUPS).
  *
@@ -676,5 +676,5 @@ usage(void)
 
 
 /*
- * End of "$Id: lpq.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lpq.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 1597aef2fcc880ae30876726d2de06a0a8b7404a..893c62bf327d719737ba96ac9fde39514e0027cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpr.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lpr.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "lpr" command for the Common UNIX Printing System (CUPS).
  *
@@ -529,5 +529,5 @@ sighandler(int s)                   /* I - Signal number */
 
 
 /*
- * End of "$Id: lpr.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lpr.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 0551dbbd45a27c9acf05438214235eac2321140b..23fbbb37d1f74830e8cff3bafe0c25c19702121e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lprm.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lprm.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "lprm" command for the Common UNIX Printing System (CUPS).
  *
@@ -294,5 +294,5 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: lprm.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lprm.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 7e976859d166872c8eaf3ff9e0100f7a38c797df..e87f276b8e7730286f6d30644398c2a8f0f3bfdc 100644 (file)
@@ -1,57 +1,56 @@
 # DO NOT DELETE
 
 help-index.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-help-index.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-help-index.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-help-index.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
-help-index.o: ../cups/dir.h
+help-index.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+help-index.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+help-index.o: ../cups/transcode.h ../cups/string.h ../config.h ../cups/dir.h
 html.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-html.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-html.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-html.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+html.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+html.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+html.o: ../cups/transcode.h ../cups/string.h ../config.h
 ipp-var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-ipp-var.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-ipp-var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-ipp-var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+ipp-var.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+ipp-var.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+ipp-var.o: ../cups/transcode.h ../cups/string.h ../config.h
 search.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-search.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-search.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-search.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+search.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+search.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+search.o: ../cups/transcode.h ../cups/string.h ../config.h
 template.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-template.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-template.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-template.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+template.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+template.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+template.o: ../cups/transcode.h ../cups/string.h ../config.h
 var.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-var.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-var.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-var.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+var.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+var.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+var.o: ../cups/transcode.h ../cups/string.h ../config.h
 admin.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-admin.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-admin.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-admin.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
-admin.o: ../cups/adminutil.h ../cups/cups.h ../cups/file.h
+admin.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+admin.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+admin.o: ../cups/transcode.h ../cups/string.h ../config.h ../cups/adminutil.h
+admin.o: ../cups/cups.h ../cups/file.h
 classes.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-classes.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-classes.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-classes.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+classes.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+classes.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+classes.o: ../cups/transcode.h ../cups/string.h ../config.h
 help.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-help.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-help.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-help.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+help.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+help.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+help.o: ../cups/transcode.h ../cups/string.h ../config.h
 jobs.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-jobs.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-jobs.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-jobs.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
+jobs.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+jobs.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+jobs.o: ../cups/transcode.h ../cups/string.h ../config.h
 printers.o: cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
-printers.o: ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h
-printers.o: ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h
-printers.o: ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h
-testcgi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-testcgi.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-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
+printers.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+printers.o: ../cups/array.h help-index.h ../cups/debug.h ../cups/i18n.h
+printers.o: ../cups/transcode.h ../cups/string.h ../config.h
+testcgi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+testcgi.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/array.h
+testcgi.o: help-index.h
+testhi.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+testhi.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/array.h
+testhi.o: 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/ppd.h ../cups/array.h ../cups/file.h
 testtemplate.o: ../cups/language.h ../cups/array.h help-index.h
index 9497bb59fbdc42dd9e65988db4f90a9d69565ef9..bf884689c063a55cd95669f76f9551d1b2213336 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $"
+# "$Id: Makefile 6055 2006-10-23 00:11:55Z mike $"
 #
 #   CGI makefile for the Common UNIX Printing System (CUPS).
 #
@@ -139,7 +139,7 @@ printers.cgi:       printers.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a
 testcgi:       testcgi.o ../Makedefs libcgi.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testcgi.o libcgi.a ../cups/libcups.a \
-               $(COMMONLIBS) $(SSLLIBS) $(LIBZ)
+               $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
 
 
 #
@@ -149,7 +149,7 @@ testcgi:    testcgi.o ../Makedefs libcgi.a ../cups/libcups.a
 testhi:        testhi.o ../Makedefs libcgi.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testhi.o libcgi.a ../cups/libcups.a \
-               $(COMMONLIBS) $(SSLLIBS) $(LIBZ)
+               $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
 
 
 #
@@ -159,7 +159,7 @@ testhi:     testhi.o ../Makedefs libcgi.a ../cups/libcups.a
 testtemplate:  testtemplate.o ../Makedefs libcgi.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testtemplate.o libcgi.a ../cups/libcups.a \
-               $(COMMONLIBS) $(SSLLIBS) $(LIBZ)
+               $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
 
 
 #
@@ -170,5 +170,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $".
+# End of "$Id: Makefile 6055 2006-10-23 00:11:55Z mike $".
 #
index 6536c86f7ca006a9da8304f463a078a337ee84a2..de4bcd1123850a669e0cbabe68d035f65885f666 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: admin.c 5878 2006-08-24 15:55:42Z mike $"
+ * "$Id: admin.c 6304 2007-02-22 22:06:23Z mike $"
  *
  *   Administration CGI for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  * Contents:
  *
  *   main()                    - Main entry for CGI.
+ *   do_add_rss_subscription() - Add a RSS subscription.
  *   do_am_class()             - Add or modify a class.
  *   do_am_printer()           - Add or modify a printer.
+ *   do_cancel_subscription()  - Cancel a subscription.
  *   do_config_printer()       - Configure the default options for a printer.
  *   do_config_server()        - Configure server settings.
  *   do_delete_class()         - Delete a class...
  * Local functions...
  */
 
+static void    do_add_rss_subscription(http_t *http);
 static void    do_am_class(http_t *http, int modify);
 static void    do_am_printer(http_t *http, int modify);
+static void    do_cancel_subscription(http_t *http);
 static void    do_config_printer(http_t *http);
 static void    do_config_server(http_t *http);
 static void    do_delete_class(http_t *http);
@@ -186,6 +190,10 @@ main(int  argc,                            /* I - Number of command-line arguments */
       do_config_server(http);
     else if (!strcmp(op, "export-samba"))
       do_export(http);
+    else if (!strcmp(op, "add-rss-subscription"))
+      do_add_rss_subscription(http);
+    else if (!strcmp(op, "cancel-subscription"))
+      do_cancel_subscription(http);
     else
     {
      /*
@@ -222,6 +230,165 @@ main(int  argc,                           /* I - Number of command-line arguments */
 }
 
 
+/*
+ * 'do_add_rss_subscription()' - Add a RSS subscription.
+ */
+
+static void
+do_add_rss_subscription(http_t *http)  /* I - HTTP connection */
+{
+  ipp_t                *request,               /* IPP request data */
+               *response;              /* IPP response data */
+  char         rss_uri[1024];          /* RSS notify-recipient URI */
+  int          num_events;             /* Number of events */
+  const char   *events[12],            /* Subscribed events */
+               *subscription_name,     /* Subscription name */
+               *printer_uri,           /* Printer URI */
+               *ptr,                   /* Pointer into name */
+               *user;                  /* Username */
+  int          max_events;             /* Maximum number of events */
+
+
+ /*
+  * See if we have all of the required information...
+  */
+
+  subscription_name = cgiGetVariable("SUBSCRIPTION_NAME");
+  printer_uri       = cgiGetVariable("PRINTER_URI");
+  num_events        = 0;
+
+  if (cgiGetVariable("EVENT_JOB_CREATED"))
+    events[num_events ++] = "job-created";
+  if (cgiGetVariable("EVENT_JOB_COMPLETED"))
+    events[num_events ++] = "job-completed";
+  if (cgiGetVariable("EVENT_JOB_STOPPED"))
+    events[num_events ++] = "job-stopped";
+  if (cgiGetVariable("EVENT_JOB_CONFIG_CHANGED"))
+    events[num_events ++] = "job-config-changed";
+  if (cgiGetVariable("EVENT_PRINTER_STOPPED"))
+    events[num_events ++] = "printer-stopped";
+  if (cgiGetVariable("EVENT_PRINTER_ADDED"))
+    events[num_events ++] = "printer-added";
+  if (cgiGetVariable("EVENT_PRINTER_MODIFIED"))
+    events[num_events ++] = "printer-modified";
+  if (cgiGetVariable("EVENT_PRINTER_DELETED"))
+    events[num_events ++] = "printer-deleted";
+  if (cgiGetVariable("EVENT_SERVER_STARTED"))
+    events[num_events ++] = "server-started";
+  if (cgiGetVariable("EVENT_SERVER_STOPPED"))
+    events[num_events ++] = "server-stopped";
+  if (cgiGetVariable("EVENT_SERVER_RESTARTED"))
+    events[num_events ++] = "server-restarted";
+  if (cgiGetVariable("EVENT_SERVER_AUDIT"))
+    events[num_events ++] = "server-audit";
+
+  if ((ptr = cgiGetVariable("MAX_EVENTS")) != NULL)
+    max_events = atoi(ptr);
+  else
+    max_events = 0;
+
+  if (!subscription_name || !printer_uri || !num_events ||
+      max_events <= 0 || max_events > 9999)
+  {
+   /*
+    * Don't have everything we need, so get the available printers
+    * and classes and (re)show the add page...
+    */
+
+    request  = ippNewRequest(CUPS_GET_PRINTERS);
+    response = cupsDoRequest(http, request, "/");
+
+    cgiSetIPPVars(response, NULL, NULL, NULL, 0);
+
+    ippDelete(response);
+
+    cgiStartHTML(cgiText(_("Add RSS Subscription")));
+
+    cgiCopyTemplateLang("add-rss-subscription.tmpl");
+
+    cgiEndHTML();
+    return;
+  }
+
+ /*
+  * Validate the subscription name...
+  */
+
+  for (ptr = subscription_name; *ptr; ptr ++)
+    if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' ||
+        *ptr == '?' || *ptr == '#')
+      break;
+
+  if (*ptr)
+  {
+    cgiSetVariable("ERROR",
+                   cgiText(_("The subscription name may not "
+                            "contain spaces, slashes (/), question marks (?), "
+                            "or the pound sign (#).")));
+    cgiStartHTML(_("Add RSS Subscription"));
+    cgiCopyTemplateLang("error.tmpl");
+    cgiEndHTML();
+    return;
+  }
+
+ /*
+  * Add the subscription...
+  */
+
+  ptr = subscription_name + strlen(subscription_name) - 4;
+  if (ptr < subscription_name || strcmp(ptr, ".rss"))
+    httpAssembleURIf(HTTP_URI_CODING_ALL, rss_uri, sizeof(rss_uri), "rss",
+                     NULL, NULL, 0, "/%s.rss?max_events=%d", subscription_name,
+                    max_events);
+  else
+    httpAssembleURIf(HTTP_URI_CODING_ALL, rss_uri, sizeof(rss_uri), "rss",
+                     NULL, NULL, 0, "/%s?max_events=%d", subscription_name,
+                    max_events);
+
+  request = ippNewRequest(IPP_CREATE_PRINTER_SUBSCRIPTION);
+
+  if (!strcasecmp(printer_uri, "#ALL#"))
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+                 NULL, "ipp://localhost/");
+  else
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+                 NULL, printer_uri);
+
+  if ((user = getenv("REMOTE_USER")) == NULL)
+    user = "guest";
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, user);
+
+  ippAddString(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI, "notify-recipient",
+               NULL, rss_uri);
+  ippAddStrings(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_KEYWORD, "notify-events",
+                num_events, NULL, events);
+  ippAddInteger(request, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
+                "notify-lease-duration", 0);
+
+  ippDelete(cupsDoRequest(http, request, "/"));
+
+  if (cupsLastError() > IPP_OK_CONFLICT)
+  {
+    cgiStartHTML(_("Add RSS Subscription"));
+    cgiShowIPPError(_("Unable to add RSS subscription:"));
+  }
+  else
+  {
+   /*
+    * Redirect successful updates back to the admin page...
+    */
+
+    cgiSetVariable("refresh_page", "5;URL=/admin");
+    cgiStartHTML(_("Add RSS Subscription"));
+    cgiCopyTemplateLang("subscription-added.tmpl");
+  }
+
+  cgiEndHTML();
+}
+
+
 /*
  * 'do_am_class()' - Add or modify a class.
  */
@@ -259,14 +426,10 @@ do_am_class(http_t *http,         /* I - HTTP connection */
     *
     *    attributes-charset
     *    attributes-natural-language
-    *    printer-uri
     */
 
     request = ippNewRequest(CUPS_GET_PRINTERS);
 
-    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
-                 NULL, "ipp://localhost/printers");
-
    /*
     * Do the request and get back a response...
     */
@@ -651,8 +814,6 @@ do_am_printer(http_t *http,         /* I - HTTP connection */
     * Do the request and get back a response...
     */
 
-    fprintf(stderr, "DEBUG: http=%p (%s)\n", http, http->hostname);
-
     if ((response = cupsDoRequest(http, request, "/")) != NULL)
     {
       fputs("DEBUG: Got device list!\n", stderr);
@@ -1063,6 +1224,76 @@ do_am_printer(http_t *http,              /* I - HTTP connection */
 }
 
 
+/*
+ * 'do_cancel_subscription()' - Cancel a subscription.
+ */
+
+static void
+do_cancel_subscription(http_t *http)/* I - HTTP connection */
+{
+  ipp_t                *request;               /* IPP request data */
+  const char   *var,                   /* Form variable */
+               *user;                  /* Username */
+  int          id;                     /* Subscription ID */
+
+
+ /*
+  * See if we have all of the required information...
+  */
+
+  if ((var = cgiGetVariable("NOTIFY_SUBSCRIPTION_ID")) != NULL)
+    id = atoi(var);
+  else
+    id = 0;
+
+  if (id <= 0)
+  {
+    cgiSetVariable("ERROR", cgiText(_("Bad subscription ID!")));
+    cgiStartHTML(_("Cancel RSS Subscription"));
+    cgiCopyTemplateLang("error.tmpl");
+    cgiEndHTML();
+    return;
+  }
+
+ /*
+  * Cancel the subscription...
+  */
+
+  request = ippNewRequest(IPP_CANCEL_SUBSCRIPTION);
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+               NULL, "ipp://localhost/");
+  ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
+                "notify-subscription-id", id);
+
+  if ((user = getenv("REMOTE_USER")) == NULL)
+    user = "guest";
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
+               NULL, user);
+
+  ippDelete(cupsDoRequest(http, request, "/"));
+
+  if (cupsLastError() > IPP_OK_CONFLICT)
+  {
+    cgiStartHTML(_("Cancel RSS Subscription"));
+    cgiShowIPPError(_("Unable to cancel RSS subscription:"));
+  }
+  else
+  {
+   /*
+    * Redirect successful updates back to the admin page...
+    */
+
+    cgiSetVariable("refresh_page", "5;URL=/admin");
+    cgiStartHTML(_("Cancel RSS Subscription"));
+    cgiCopyTemplateLang("subscription-canceled.tmpl");
+  }
+
+  cgiEndHTML();
+}
+
+
 /*
  * 'do_config_printer()' - Configure the default options for a printer.
  */
@@ -1599,6 +1830,7 @@ do_config_server(http_t *http)            /* I - HTTP connection */
     cups_option_t      *settings;      /* Server settings */
     const char         *debug_logging, /* DEBUG_LOGGING value */
                        *remote_admin,  /* REMOTE_ADMIN value */
+                       *remote_any,    /* REMOTE_ANY value */
                        *remote_printers,
                                        /* REMOTE_PRINTERS value */
                        *share_printers,/* SHARE_PRINTERS value */
@@ -1612,6 +1844,7 @@ do_config_server(http_t *http)            /* I - HTTP connection */
 
     debug_logging   = cgiGetVariable("DEBUG_LOGGING") ? "1" : "0";
     remote_admin    = cgiGetVariable("REMOTE_ADMIN") ? "1" : "0";
+    remote_any      = cgiGetVariable("REMOTE_ANY") ? "1" : "0";
     remote_printers = cgiGetVariable("REMOTE_PRINTERS") ? "1" : "0";
     share_printers  = cgiGetVariable("SHARE_PRINTERS") ? "1" : "0";
     user_cancel_any = cgiGetVariable("USER_CANCEL_ANY") ? "1" : "0";
@@ -1639,6 +1872,8 @@ do_config_server(http_t *http)            /* I - HTTP connection */
                                             num_settings, settings)) ||
         strcmp(remote_admin, cupsGetOption(CUPS_SERVER_REMOTE_ADMIN,
                                            num_settings, settings)) ||
+        strcmp(remote_any, cupsGetOption(CUPS_SERVER_REMOTE_ANY,
+                                         num_settings, settings)) ||
         strcmp(remote_printers, cupsGetOption(CUPS_SERVER_REMOTE_PRINTERS,
                                               num_settings, settings)) ||
         strcmp(share_printers, cupsGetOption(CUPS_SERVER_SHARE_PRINTERS,
@@ -1657,6 +1892,8 @@ do_config_server(http_t *http)            /* I - HTTP connection */
                                    debug_logging, num_settings, &settings);
       num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ADMIN,
                                    remote_admin, num_settings, &settings);
+      num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
+                                   remote_any, num_settings, &settings);
       num_settings = cupsAddOption(CUPS_SERVER_REMOTE_PRINTERS,
                                    remote_printers, num_settings, &settings);
       num_settings = cupsAddOption(CUPS_SERVER_SHARE_PRINTERS,
@@ -1948,6 +2185,15 @@ do_delete_class(http_t *http)            /* I - HTTP connection */
   * Show the results...
   */
 
+  if (cupsLastError() <= IPP_OK_CONFLICT)
+  {
+   /*
+    * Redirect successful updates back to the classes page...
+    */
+
+    cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect&URL=/classes");
+  }
+
   cgiStartHTML(cgiText(_("Delete Class")));
 
   if (cupsLastError() > IPP_OK_CONFLICT)
@@ -2019,6 +2265,15 @@ do_delete_printer(http_t *http)          /* I - HTTP connection */
   * Show the results...
   */
 
+  if (cupsLastError() <= IPP_OK_CONFLICT)
+  {
+   /*
+    * Redirect successful updates back to the printers page...
+    */
+
+    cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect&URL=/printers");
+  }
+
   cgiStartHTML(cgiText(_("Delete Printer")));
 
   if (cupsLastError() > IPP_OK_CONFLICT)
@@ -2202,6 +2457,10 @@ do_menu(http_t *http)                    /* I - HTTP connection */
                            settings)) != NULL && atoi(val))
     cgiSetVariable("REMOTE_ADMIN", "CHECKED");
 
+  if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings,
+                           settings)) != NULL && atoi(val))
+    cgiSetVariable("REMOTE_ANY", "CHECKED");
+
   if ((val = cupsGetOption(CUPS_SERVER_REMOTE_PRINTERS, num_settings,
                            settings)) != NULL && atoi(val))
     cgiSetVariable("REMOTE_PRINTERS", "CHECKED");
@@ -2342,7 +2601,7 @@ do_menu(http_t *http)                     /* I - HTTP connection */
            * suitable name.
            */
 
-           strcpy(options, "PRINTER_NAME=");
+           strcpy(options, "TEMPLATE_NAME=");
            options_ptr = options + strlen(options);
 
             if (strncasecmp(device_info, "unknown", 7))
@@ -2461,6 +2720,21 @@ do_menu(http_t *http)                    /* I - HTTP connection */
   else
     perror(filename);
 
+ /*
+  * Subscriptions...
+  */
+
+  request = ippNewRequest(IPP_GET_SUBSCRIPTIONS);
+
+  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+               NULL, "ipp://localhost/");
+
+  if ((response = cupsDoRequest(http, request, "/")) != NULL)
+  {
+    cgiSetIPPVars(response, NULL, NULL, NULL, 0);
+    ippDelete(response);
+  }
+
  /*
   * Finally, show the main menu template...
   */
@@ -2951,5 +3225,5 @@ match_string(const char *a,               /* I - First string */
 
     
 /*
- * End of "$Id: admin.c 5878 2006-08-24 15:55:42Z mike $".
+ * End of "$Id: admin.c 6304 2007-02-22 22:06:23Z mike $".
  */
index f639525cc3983a6bc05436d87069fe4a92fba6ab..1c22d513e2d2277a6142f617603aeb7fb414b45d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: classes.c 5572 2006-05-22 18:47:09Z mike $"
+ * "$Id: classes.c 5571 2006-05-22 18:46:55Z mike $"
  *
  *   Class status CGI for the Common UNIX Printing System (CUPS).
  *
@@ -463,5 +463,5 @@ show_class(http_t     *http,                /* I - Connection to server */
 
 
 /*
- * End of "$Id: classes.c 5572 2006-05-22 18:47:09Z mike $".
+ * End of "$Id: classes.c 5571 2006-05-22 18:46:55Z mike $".
  */
index 8daf9904992e5ab7526da37ef95b0f9126a1b10d..df909a40615e39e59a3eac45e9f585695f945c80 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: help-index.c 5665 2006-06-16 00:59:10Z mike $"
+ * "$Id: help-index.c 6258 2007-02-11 01:16:31Z mike $"
  *
  *   On-line help index routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  *   helpLoadIndex()            - Load a help index from disk.
  *   helpSaveIndex()            - Save a help index to disk.
  *   helpSearchIndex()          - Search an index.
+ *   help_add_word()            - Add a word to a node.
  *   help_compile_search()      - Convert a search string into a regular expression.
  *   help_delete_node()         - Free all memory used by a node.
+ *   help_delete_word()         - Free all memory used by a word.
  *   help_load_directory()      - Load a directory of files into an index.
  *   help_load_file()           - Load a HTML files into an index.
  *   help_new_node()            - Create a new node and add it to an index.
  *   help_sort_nodes_by_name()  - Sort nodes by section, filename, and anchor.
  *   help_sort_nodes_by_score() - Sort nodes by score and text.
+ *   help_sort_words()          - Sort words alphabetically.
  */
 
 /*
 #include <cups/dir.h>
 
 
+/*
+ * List of common English words that should not be indexed...
+ */
+
+static char            help_common_words[][6] =
+                       {
+                         "about",
+                         "all",
+                         "an",
+                         "and",
+                         "are",
+                         "as",
+                         "at",
+                         "be",
+                         "been",
+                         "but",
+                         "by",
+                         "call",
+                         "can",
+                         "come",
+                         "could",
+                         "day",
+                         "did",
+                         "do",
+                         "down",
+                         "each",
+                         "find",
+                         "first",
+                         "for",
+                         "from",
+                         "go",
+                         "had",
+                         "has",
+                         "have",
+                         "he",
+                         "her",
+                         "him",
+                         "his",
+                         "hot",
+                         "how",
+                         "if",
+                         "in",
+                         "is",
+                         "it",
+                         "know",
+                         "like",
+                         "long",
+                         "look",
+                         "make",
+                         "many",
+                         "may",
+                         "more",
+                         "most",
+                         "my",
+                         "no",
+                         "now",
+                         "of",
+                         "on",
+                         "one",
+                         "or",
+                         "other",
+                         "out",
+                         "over",
+                         "said",
+                         "see",
+                         "she",
+                         "side",
+                         "so",
+                         "some",
+                         "sound",
+                         "than",
+                         "that",
+                         "the",
+                         "their",
+                         "them",
+                         "then",
+                         "there",
+                         "these",
+                         "they",
+                         "thing",
+                         "this",
+                         "time",
+                         "to",
+                         "two",
+                         "up",
+                         "use",
+                         "was",
+                         "water",
+                         "way",
+                         "we",
+                         "were",
+                         "what",
+                         "when",
+                         "which",
+                         "who",
+                         "will",
+                         "with",
+                         "word",
+                         "would",
+                         "write",
+                         "you",
+                         "your"
+                       };
+
+
 /*
  * Local functions...
  */
 
+static help_word_t     *help_add_word(help_node_t *n, const char *text);
 static void            help_delete_node(help_node_t *n);
+static void            help_delete_word(help_word_t *w);
 static int             help_load_directory(help_index_t *hi,
                                            const char *directory,
                                            const char *relative);
@@ -63,6 +173,7 @@ static help_node_t   *help_new_node(const char *filename, const char *anchor,
                                       size_t length);
 static int             help_sort_by_name(help_node_t *p1, help_node_t *p2);
 static int             help_sort_by_score(help_node_t *p1, help_node_t *p2);
+static int             help_sort_words(help_word_t *w1, help_word_t *w2);
 
 
 /*
@@ -84,9 +195,6 @@ helpDeleteIndex(help_index_t *hi)    /* I - Help index */
        node;
        node = (help_node_t *)cupsArrayNext(hi->nodes))
   {
-    cupsArrayRemove(hi->nodes, node);
-    cupsArrayRemove(hi->sorted, node);
-
     if (!hi->search)
       help_delete_node(node);
   }
@@ -157,6 +265,7 @@ helpLoadIndex(const char *hifile,   /* I - Index filename */
   size_t       length;                 /* Length in bytes */
   int          update;                 /* Update? */
   help_node_t  *node;                  /* Current node */
+  help_word_t  *word;                  /* Current word */
 
 
   DEBUG_printf(("helpLoadIndex(hifile=\"%s\", directory=\"%s\")\n",
@@ -192,12 +301,14 @@ helpLoadIndex(const char *hifile, /* I - Index filename */
 
     cupsFileLock(fp, 1);
 
-    if (cupsFileGets(fp, line, sizeof(line)) && !strcmp(line, "HELPV1"))
+    if (cupsFileGets(fp, line, sizeof(line)) && !strcmp(line, "HELPV2"))
     {
      /*
       * Got a valid header line, now read the data lines...
       */
 
+      node = NULL;
+
       while (cupsFileGets(fp, line, sizeof(line)))
       {
        /*
@@ -205,77 +316,97 @@ helpLoadIndex(const char *hifile, /* I - Index filename */
        *
        *     filename mtime offset length "section" "text"
        *     filename#anchor offset length "text"
+       *     SP count word
        */
 
-       filename = line;
-
-       if ((ptr = strchr(line, ' ')) == NULL)
-          break;
-
-       while (isspace(*ptr & 255))
-          *ptr++ = '\0';
-
-       if ((anchor = strrchr(filename, '#')) != NULL)
+        if (line[0] == ' ')
        {
-          *anchor++ = '\0';
-         mtime = 0;
-       }
-       else
-         mtime = strtol(ptr, &ptr, 10);
-
-       offset = strtoll(ptr, &ptr, 10);
-       length = strtoll(ptr, &ptr, 10);
+        /*
+         * Read a word in the current node...
+         */
 
-       while (isspace(*ptr & 255))
-          ptr ++;
+          if (!node || (ptr = strrchr(line, ' ')) == NULL)
+           continue;
 
-        if (!anchor)
+          if ((word = help_add_word(node, ptr + 1)) != NULL)
+           word->count = atoi(line + 1);
+        }
+       else
        {
         /*
-         * Get section...
+         * Add a node...
          */
 
-          if (*ptr != '\"')
-           break;
+         filename = line;
 
-          ptr ++;
-         sectptr = ptr;
+         if ((ptr = strchr(line, ' ')) == NULL)
+            break;
 
-          while (*ptr && *ptr != '\"')
-           ptr ++;
-
-          if (*ptr != '\"')
-           break;
+         while (isspace(*ptr & 255))
+            *ptr++ = '\0';
 
-          *ptr++ = '\0';
+         if ((anchor = strrchr(filename, '#')) != NULL)
+         {
+            *anchor++ = '\0';
+           mtime = 0;
+         }
+         else
+           mtime = strtol(ptr, &ptr, 10);
 
-          strlcpy(section, sectptr, sizeof(section));
+         offset = strtoll(ptr, &ptr, 10);
+         length = strtoll(ptr, &ptr, 10);
 
          while (isspace(*ptr & 255))
             ptr ++;
-        }
 
-        if (*ptr != '\"')
-         break;
+          if (!anchor)
+         {
+          /*
+           * Get section...
+           */
 
-        ptr ++;
-       text = ptr;
+            if (*ptr != '\"')
+             break;
 
-        while (*ptr && *ptr != '\"')
-         ptr ++;
+            ptr ++;
+           sectptr = ptr;
 
-        if (*ptr != '\"')
-         break;
+            while (*ptr && *ptr != '\"')
+             ptr ++;
+
+            if (*ptr != '\"')
+             break;
 
-        *ptr++ = '\0';
+            *ptr++ = '\0';
 
-       if ((node = help_new_node(filename, anchor, section, text,
-                                 mtime, offset, length)) == NULL)
-          break;
+            strlcpy(section, sectptr, sizeof(section));
 
-       node->score = -1;
+           while (isspace(*ptr & 255))
+              ptr ++;
+          }
 
-       cupsArrayAdd(hi->nodes, node);
+          if (*ptr != '\"')
+           break;
+
+          ptr ++;
+         text = ptr;
+
+          while (*ptr && *ptr != '\"')
+           ptr ++;
+
+          if (*ptr != '\"')
+           break;
+
+          *ptr++ = '\0';
+
+         if ((node = help_new_node(filename, anchor, section, text,
+                                   mtime, offset, length)) == NULL)
+            break;
+
+         node->score = -1;
+
+         cupsArrayAdd(hi->nodes, node);
+        }
       }
     }
 
@@ -339,6 +470,7 @@ helpSaveIndex(help_index_t *hi,             /* I - Index */
 {
   cups_file_t  *fp;                    /* Index file */
   help_node_t  *node;                  /* Current node */
+  help_word_t  *word;                  /* Current word */
 
 
   DEBUG_printf(("helpSaveIndex(hi=%p, hifile=\"%s\")\n", hi, hifile));
@@ -356,7 +488,7 @@ helpSaveIndex(help_index_t *hi,             /* I - Index */
 
   cupsFileLock(fp, 1);
 
-  cupsFilePuts(fp, "HELPV1\n");
+  cupsFilePuts(fp, "HELPV2\n");
 
   for (node = (help_node_t *)cupsArrayFirst(hi->nodes);
        node;
@@ -382,6 +514,16 @@ helpSaveIndex(help_index_t *hi,            /* I - Index */
                         node->section ? node->section : "", node->text) < 0)
         break;
     }
+
+   /*
+    * Then write the words associated with the node...
+    */
+
+    for (word = (help_word_t *)cupsArrayFirst(node->words);
+         word;
+        word = (help_word_t *)cupsArrayNext(node->words))
+      if (cupsFilePrintf(fp, " %d %s\n", word->count, word->text) < 0)
+        break;
   }
 
   cupsFileFlush(fp);
@@ -407,6 +549,7 @@ helpSearchIndex(help_index_t *hi,   /* I - Index */
 {
   help_index_t *search;                /* Search index */
   help_node_t  *node;                  /* Current node */
+  help_word_t  *word;                  /* Current word */
   void         *sc;                    /* Search context */
   int          matches;                /* Number of matches */
 
@@ -487,16 +630,27 @@ helpSearchIndex(help_index_t *hi, /* I - Index */
       continue;
     else if (filename && strcmp(node->filename, filename))
       continue;
-    else if ((matches = cgiDoSearch(sc, node->text)) > 0)
+    else
     {
-     /*
-      * Found a match, add the node to the search index...
-      */
+      matches = cgiDoSearch(sc, node->text);
+
+      for (word = (help_word_t *)cupsArrayFirst(node->words);
+           word;
+          word = (help_word_t *)cupsArrayNext(node->words))
+        if (cgiDoSearch(sc, word->text) > 0)
+          matches += word->count;
 
-      node->score = matches;
+      if (matches > 0)
+      {
+       /*
+       * Found a match, add the node to the search index...
+       */
 
-      cupsArrayAdd(search->nodes, node);      
-      cupsArrayAdd(search->sorted, node);      
+       node->score = matches;
+
+       cupsArrayAdd(search->nodes, node);      
+       cupsArrayAdd(search->sorted, node);      
+      }
     }
 
  /*
@@ -513,6 +667,61 @@ helpSearchIndex(help_index_t *hi,  /* I - Index */
 }
 
 
+/*
+ * 'help_add_word()' - Add a word to a node.
+ */
+
+static help_word_t *                   /* O - New word */
+help_add_word(help_node_t *n,          /* I - Node */
+              const char  *text)       /* I - Word text */
+{
+  help_word_t  *w,                     /* New word */
+               key;                    /* Search key */
+
+
+  DEBUG_printf(("help_add_word(n=%p, text=\"%s\")\n", n, text));
+
+ /*
+  * Create the words array as needed...
+  */
+
+  if (!n->words)
+    n->words = cupsArrayNew((cups_array_func_t)help_sort_words, NULL);
+
+ /*
+  * See if the word is already added...
+  */
+
+  key.text = (char *)text;
+
+  if ((w = (help_word_t *)cupsArrayFind(n->words, &key)) == NULL)
+  {
+   /*
+    * Create a new word...
+    */
+
+    if ((w = calloc(1, sizeof(help_word_t))) == NULL)
+      return (NULL);
+
+    if ((w->text = strdup(text)) == NULL)
+    {
+      free(w);
+      return (NULL);
+    }
+
+    cupsArrayAdd(n->words, w);
+  }
+
+ /*
+  * Bump the counter for this word and return it...
+  */
+
+  w->count ++;
+
+  return (w);
+}
+
+
 /*
  * 'help_delete_node()' - Free all memory used by a node.
  */
@@ -520,6 +729,9 @@ helpSearchIndex(help_index_t *hi,   /* I - Index */
 static void
 help_delete_node(help_node_t *n)       /* I - Node */
 {
+  help_word_t  *w;                     /* Current word */
+
+
   DEBUG_printf(("help_delete_node(n=%p)\n", n));
 
   if (!n)
@@ -537,10 +749,36 @@ help_delete_node(help_node_t *n)  /* I - Node */
   if (n->text)
     free(n->text);
 
+  for (w = (help_word_t *)cupsArrayFirst(n->words);
+       w;
+       w = (help_word_t *)cupsArrayNext(n->words))
+    help_delete_word(w);
+
+  cupsArrayDelete(n->words);
+
   free(n);
 }
 
 
+/*
+ * 'help_delete_word()' - Free all memory used by a word.
+ */
+
+static void
+help_delete_word(help_word_t *w)       /* I - Word */
+{
+  DEBUG_printf(("help_delete_word(w=%p)\n", w));
+
+  if (!w)
+    return;
+
+  if (w->text)
+    free(w->text);
+
+  free(w);
+}
+
+
 /*
  * 'help_load_directory()' - Load a directory of files into an index.
  */
@@ -667,6 +905,8 @@ help_load_file(
                *text;                  /* Text for anchor */
   off_t                offset;                 /* File offset */
   char         quote;                  /* Quote character */
+  help_word_t  *word;                  /* Current word */
+  int          wordlen;                /* Length of word */
 
 
   DEBUG_printf(("help_load_file(hi=%p, filename=\"%s\", relative=\"%s\", mtime=%ld)\n",
@@ -818,6 +1058,17 @@ help_load_file(
        if (node->text)
          free(node->text);
 
+        if (node->words)
+       {
+         for (word = (help_word_t *)cupsArrayFirst(node->words);
+              word;
+              word = (help_word_t *)cupsArrayNext(node->words))
+           help_delete_word(word);
+
+         cupsArrayDelete(node->words);
+         node->words = NULL;
+       }
+
        node->section = section[0] ? strdup(section) : NULL;
        node->text    = strdup(text);
        node->mtime   = mtime;
@@ -861,9 +1112,97 @@ help_load_file(
       */
 
       cupsArrayAdd(hi->nodes, node);
+
+      if (!anchor)
+        node = NULL;
       break;
     }
 
+    if (node)
+    {
+     /*
+      * Scan this line for words...
+      */
+
+      for (ptr = line; *ptr; ptr ++)
+      {
+       /*
+       * Skip HTML stuff...
+       */
+
+       if (*ptr == '<')
+       {
+          if (!strncmp(ptr, "<!--", 4))
+         {
+          /*
+           * Skip HTML comment...
+           */
+
+            if ((text = strstr(ptr + 4, "-->")) == NULL)
+             ptr += strlen(ptr) - 1;
+           else
+             ptr = text + 2;
+         }
+         else
+         {
+          /*
+            * Skip HTML element...
+           */
+
+            for (ptr ++; *ptr && *ptr != '>'; ptr ++)
+             if (*ptr == '\"' || *ptr == '\'')
+             {
+               for (quote = *ptr++; *ptr && *ptr != quote; ptr ++);
+
+               if (!*ptr)
+                 ptr --;
+             }
+
+           if (!*ptr)
+             ptr --;
+          }
+
+          continue;
+       }
+       else if (*ptr == '&')
+       {
+        /*
+         * Skip HTML entity...
+         */
+
+         for (ptr ++; *ptr && *ptr != ';'; ptr ++);
+
+         if (!*ptr)
+           ptr --;
+
+         continue;
+       }
+       else if (!isalnum(*ptr & 255))
+          continue;
+
+       /*
+       * Found the start of a word, search until we find the end...
+       */
+
+       for (text = ptr, ptr ++; *ptr && isalnum(*ptr & 255); ptr ++);
+
+       wordlen = ptr - text;
+
+       if (*ptr)
+          *ptr = '\0';
+       else
+          ptr --;
+
+       if (wordlen > 1 && !bsearch(text, help_common_words,
+                                   (sizeof(help_common_words) /
+                                    sizeof(help_common_words[0])),
+                                   sizeof(help_common_words[0]),
+                                   (int (*)(const void *, const void *))
+                                       strcasecmp))
+          help_add_word(node, text);
+      }
+    }
+
    /*
     * Get the offset of the next line...
     */
@@ -979,5 +1318,20 @@ help_sort_by_score(help_node_t *n1,       /* I - First node */
 
 
 /*
- * End of "$Id: help-index.c 5665 2006-06-16 00:59:10Z mike $".
+ * 'help_sort_words()' - Sort words alphabetically.
+ */
+
+static int                             /* O - Difference */
+help_sort_words(help_word_t *w1,       /* I - Second word */
+                help_word_t *w2)       /* I - Second word */
+{
+  DEBUG_printf(("help_sort_words(w1=%p(\"%s\"), w2=%p(\"%s\"))\n",
+                w1, w1->text, w2, w2->text));
+
+  return (strcasecmp(w1->text, w2->text));
+}
+
+
+/*
+ * End of "$Id: help-index.c 6258 2007-02-11 01:16:31Z mike $".
  */
index d564663a098bd4357f72aaefa00a5ab6dabb5e2f..c7cbe2b54db57099819215d3b75b1f76e4b48e88 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: help-index.h 5143 2006-02-21 19:13:01Z mike $"
+ * "$Id: help-index.h 6257 2007-02-11 01:11:57Z mike $"
  *
  *   On-line help index definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  * Data structures...
  */
 
-typedef struct                         /**** Help node structure... ****/
+typedef struct help_word_s             /**** Help word structure... ****/
+{
+  int          count;                  /* Number of occurrences */
+  char         *text;                  /* Word text */
+} help_word_t;
+
+typedef struct help_node_s             /**** Help node structure... ****/
 {
   char         *filename;              /* Filename, relative to help dir */
   char         *section;               /* Section name (NULL if none) */
   char         *anchor;                /* Anchor name (NULL if none) */
   char         *text;                  /* Text in anchor */
+  cups_array_t *words;                 /* Words after this node */
   time_t       mtime;                  /* Last modification time */
   off_t                offset;                 /* Offset in file */
   size_t       length;                 /* Length in bytes */
   int          score;                  /* Search score */
 } help_node_t;
 
-typedef struct                         /**** Help index structure ****/
+typedef struct help_index_s            /**** Help index structure ****/
 {
   int          search;                 /* 1 = search index, 0 = normal */
   cups_array_t *nodes;                 /* Nodes sorted by filename */
@@ -73,5 +80,5 @@ extern help_index_t   *helpSearchIndex(help_index_t *hi, const char *query,
 #endif /* !_CUPS_HELP_INDEX_H_ */
 
 /*
- * End of "$Id: help-index.h 5143 2006-02-21 19:13:01Z mike $".
+ * End of "$Id: help-index.h 6257 2007-02-11 01:11:57Z mike $".
  */
index da5f7cd2036df764a106f9b84be678a2d98b4bff..62e0cc517bca7cf60769a5a9d0ed10cd5b6b877e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: html.c 5549 2006-05-19 19:39:28Z mike $"
+ * "$Id: html.c 5548 2006-05-19 19:38:31Z mike $"
  *
  *   HTML support functions for the Common UNIX Printing System (CUPS).
  *
@@ -183,5 +183,5 @@ cgi_null_passwd(const char *prompt) /* I - Prompt string (unused) */
 
 
 /*
- * End of "$Id: html.c 5549 2006-05-19 19:39:28Z mike $".
+ * End of "$Id: html.c 5548 2006-05-19 19:38:31Z mike $".
  */
index 4639643de475c4f9c393427dd70262600e196821..f9dc54ca7b1280955a137f0060cb1badec84107d 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: ipp-var.c 6244 2007-02-06 21:08:59Z mike $"
+ * "$Id: ipp-var.c 6304 2007-02-22 22:06:23Z mike $"
  *
  *   CGI <-> IPP variable routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -828,6 +828,144 @@ cgiSetIPPObjectVars(
       cgiSetArray("job_printer_name", element, valptr);
     }
 
+   /*
+    * Localize event names in "notify_events" variable...
+    */
+
+    if (!strcmp(name, "notify_events"))
+    {
+      size_t   remaining;              /* Remaining bytes in buffer */
+
+
+      value[0] = '\0';
+      valptr   = value;
+
+      for (i = 0; i < attr->num_values; i ++)
+      {
+        if (valptr >= (value + sizeof(value) - 3))
+         break;
+
+        if (i)
+       {
+         *valptr++ = ',';
+         *valptr++ = ' ';
+        }
+
+        remaining = sizeof(value) - (valptr - value);
+
+        if (!strcmp(attr->values[i].string.text, "printer-stopped"))
+         strlcpy(valptr, _("Printer Stopped"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "printer-added"))
+         strlcpy(valptr, _("Printer Added"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "printer-modified"))
+         strlcpy(valptr, _("Printer Modified"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "printer-deleted"))
+         strlcpy(valptr, _("Printer Deleted"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "job-created"))
+         strlcpy(valptr, _("Job Created"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "job-completed"))
+         strlcpy(valptr, _("Job Completed"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "job-stopped"))
+         strlcpy(valptr, _("Job Stopped"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "job-config-changed"))
+         strlcpy(valptr, _("Job Options Changed"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "server-restarted"))
+         strlcpy(valptr, _("Server Restarted"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "server-started"))
+         strlcpy(valptr, _("Server Started"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "server-stopped"))
+         strlcpy(valptr, _("Server Stopped"), remaining);
+       else if (!strcmp(attr->values[i].string.text, "server-audit"))
+         strlcpy(valptr, _("Server Security Auditing"), remaining);
+       else
+          strlcpy(valptr, attr->values[i].string.text, remaining);
+
+        valptr += strlen(valptr);
+      }
+
+      cgiSetArray("notify_events", element, value);
+      continue;
+    }
+
+   /*
+    * Add "notify_printer_name" variable if we have a "notify_printer_uri"
+    * attribute...
+    */
+
+    if (!strcmp(name, "notify_printer_uri"))
+    {
+      if ((valptr = strrchr(attr->values[0].string.text, '/')) == NULL)
+       valptr = "unknown";
+      else
+       valptr ++;
+
+      cgiSetArray("notify_printer_name", element, valptr);
+    }
+
+   /*
+    * Add "notify_recipient_name" variable if we have a "notify_recipient_uri"
+    * attribute, and rewrite recipient URI...
+    */
+
+    if (!strcmp(name, "notify_recipient_uri"))
+    {
+      char     uri[1024],              /* New URI */
+               scheme[32],             /* Scheme portion of URI */
+               userpass[256],          /* Username/password portion of URI */
+               host[1024],             /* Hostname portion of URI */
+               resource[1024],         /* Resource portion of URI */
+               *options;               /* Options in URI */
+      int      port;                   /* Port number */
+
+
+      httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[0].string.text,
+                      scheme, sizeof(scheme), userpass, sizeof(userpass),
+                     host, sizeof(host), &port, resource, sizeof(resource));
+
+      if (!strcmp(scheme, "rss"))
+      {
+       /*
+        * RSS notification...
+       */
+
+        if ((options = strchr(resource, '?')) != NULL)
+         *options = '\0';
+
+        if (host[0])
+       {
+        /*
+         * Link to remote feed...
+         */
+
+         httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), "http",
+                         userpass, host, port, resource);
+          strlcpy(name, uri, sizeof(name));
+       }
+       else
+       {
+        /*
+         * Link to local feed...
+         */
+
+         snprintf(uri, sizeof(uri), "/rss%s", resource);
+          strlcpy(name, resource + 1, sizeof(name));
+       }
+      }
+      else
+      {
+       /*
+        * Other...
+       */
+
+        strlcpy(uri, attr->values[0].string.text, sizeof(uri));
+       strlcpy(name, resource, sizeof(name));
+      }
+
+      cgiSetArray("notify_recipient_uri", element, uri);
+      cgiSetArray("notify_recipient_name", element, name);
+      continue;
+    }
+
    /*
     * Add "admin_uri" variable if we have a "printer_uri_supported"
     * attribute...
@@ -1280,5 +1418,5 @@ cgiText(const char *message)              /* I - Message */
 
 
 /*
- * End of "$Id: ipp-var.c 6244 2007-02-06 21:08:59Z mike $".
+ * End of "$Id: ipp-var.c 6304 2007-02-22 22:06:23Z mike $".
  */
index ed379b001341167109b72c51d2a1569038939619..f86aa9bb91fc166a3f5ab60a5ac46ad189637821 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: jobs.c 5104 2006-02-15 03:21:04Z mike $"
+ * "$Id: jobs.c 6277 2007-02-14 16:07:28Z mike $"
  *
  *   Job status CGI for the Common UNIX Printing System (CUPS).
  *
@@ -181,6 +181,20 @@ do_job_op(http_t      *http,               /* I - HTTP connection */
 
   ippDelete(cupsDoRequest(http, request, "/jobs"));
 
+  if (cupsLastError() <= IPP_OK_CONFLICT && getenv("HTTP_REFERER"))
+  {
+   /*
+    * Redirect successful updates back to the parent page...
+    */
+
+    char       url[1024];              /* Encoded URL */
+
+
+    strcpy(url, "5;URL=");
+    cgiFormEncode(url + 6, getenv("HTTP_REFERER"), sizeof(url) - 6);
+    cgiSetVariable("refresh_page", url);
+  }
+
   cgiStartHTML(cgiText(_("Jobs")));
 
   if (cupsLastError() > IPP_OK_CONFLICT)
@@ -199,5 +213,5 @@ do_job_op(http_t      *http,                /* I - HTTP connection */
 
 
 /*
- * End of "$Id: jobs.c 5104 2006-02-15 03:21:04Z mike $".
+ * End of "$Id: jobs.c 6277 2007-02-14 16:07:28Z mike $".
  */
index e8ec0d2b3ac4da31870f803712e0678adf8c4e7a..50dc2b32231afa278d0834c098cfb3c53dcdb0ae 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: printers.c 5572 2006-05-22 18:47:09Z mike $"
+ * "$Id: printers.c 5571 2006-05-22 18:46:55Z mike $"
  *
  *   Printer status CGI for the Common UNIX Printing System (CUPS).
  *
@@ -638,5 +638,5 @@ show_printer(http_t     *http,              /* I - Connection to server */
 
 
 /*
- * End of "$Id: printers.c 5572 2006-05-22 18:47:09Z mike $".
+ * End of "$Id: printers.c 5571 2006-05-22 18:46:55Z mike $".
  */
index 205a40cff9b9e2cea83de9959d900011f4ae77b6..25a410f7d1f2b51c87e810e7e982748b590b3095 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: search.c 5963 2006-09-17 19:01:47Z mike $"
+ * "$Id: search.c 5962 2006-09-17 19:01:26Z mike $"
  *
  *   Search routines for the Common UNIX Printing System (CUPS).
  *
@@ -366,5 +366,5 @@ cgiFreeSearch(void *search)         /* I - Search context */
 
 
 /*
- * End of "$Id: search.c 5963 2006-09-17 19:01:47Z mike $".
+ * End of "$Id: search.c 5962 2006-09-17 19:01:26Z mike $".
  */
index 82cf0e45df604dd7349a35bb2cabad471561ae5e..d2fd9b8e3c09de431b237dabedd789a86c61965d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: template.c 5549 2006-05-19 19:39:28Z mike $"
+ * "$Id: template.c 5548 2006-05-19 19:38:31Z mike $"
  *
  *   CGI template function.
  *
@@ -670,5 +670,5 @@ cgi_puturi(const char *s,           /* I - String to output */
 
 
 /*
- * End of "$Id: template.c 5549 2006-05-19 19:39:28Z mike $".
+ * End of "$Id: template.c 5548 2006-05-19 19:38:31Z mike $".
  */
index dad5d70b7053563dfaa56f04e4c3098945f3f595..1d6e23f046f3e383b5ba1121a8a9e2dd283589c4 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: testhi.c 5143 2006-02-21 19:13:01Z mike $"
+ * "$Id: testhi.c 6257 2007-02-11 01:11:57Z mike $"
  *
  *   Help index test program for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -105,14 +105,18 @@ list_nodes(const char   *title,           /* I - Title string */
   for (i = 1, node = (help_node_t *)cupsArrayFirst(nodes);
        node;
        i ++, node = (help_node_t *)cupsArrayNext(nodes))
+  {
     if (node->anchor)
-      printf("    %d: %s#%s \"%s\"\n", i, node->filename, node->anchor,
+      printf("    %d: %s#%s \"%s\"", i, node->filename, node->anchor,
              node->text);
     else
-      printf("    %d: %s \"%s\"\n", i, node->filename, node->text);
+      printf("    %d: %s \"%s\"", i, node->filename, node->text);
+
+    printf(" (%d words)\n", cupsArrayCount(node->words));
+  }
 }
 
 
 /*
- * End of "$Id: testhi.c 5143 2006-02-21 19:13:01Z mike $".
+ * End of "$Id: testhi.c 6257 2007-02-11 01:11:57Z mike $".
  */
index 747b5ea315c8e50b46fcfd1d873a579fd22401d3..b45399fdb9c9511ccee40742c0a51dc0357a4cee 100644 (file)
@@ -19,6 +19,8 @@ up to 1024 bytes in length.</P>
 
 <P>This is some text for the first anchor.</P>
 
+<P>John asked Mary to the dance.</P>
+
 
 <H1><A NAME="THIRD">This is the Third Anchor</A></H1>
 
index 17d507756d8928723f9c7dfc5076d2876db3c3fa..113b8d026ed33de582c3f4015d55ee18744613fc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: var.c 5549 2006-05-19 19:39:28Z mike $"
+ * "$Id: var.c 5548 2006-05-19 19:38:31Z mike $"
  *
  *   CGI form variable and array functions.
  *
@@ -1027,5 +1027,5 @@ cgi_unlink_file(void)
 
 
 /*
- * End of "$Id: var.c 5549 2006-05-19 19:39:28Z mike $".
+ * End of "$Id: var.c 5548 2006-05-19 19:38:31Z mike $".
  */
index 21f43b2cc13e0da92113a61f6834abd0b172ef64..ee0b28fb403383e384592dfd362b8ebd13b7a962 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $"
+# "$Id: cupsd.conf.in 6268 2007-02-12 02:46:11Z mike $"
 #
 #   Sample configuration file for the Common UNIX Printing System (CUPS)
 #   scheduler.  See "man cupsd.conf" for a complete description of this
@@ -12,6 +12,7 @@ LogLevel info
 
 # Administrator user group...
 SystemGroup @CUPS_SYSTEM_GROUPS@
+@CUPS_SYSTEM_AUTHKEY@
 
 # Only listen for connections from the local machine.
 Listen localhost:@DEFAULT_IPP_PORT@
@@ -20,7 +21,7 @@ Listen localhost:@DEFAULT_IPP_PORT@
 # Show shared printers on the local network.
 Browsing On
 BrowseOrder allow,deny
-BrowseAllow @LOCAL
+BrowseAllow all
 
 # Default authentication type, when authentication is required...
 DefaultAuthType Basic
@@ -73,5 +74,5 @@ DefaultAuthType Basic
 </Policy>
 
 #
-# End of "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $".
+# End of "$Id: cupsd.conf.in 6268 2007-02-12 02:46:11Z mike $".
 #
index e5a522df516515f53b518212846113a4dd6a411d..c36dbb95d7590fc338829303577d9c990ce320e6 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: mime.types 6003 2006-10-02 16:26:04Z mike $"
+# "$Id: mime.types 6301 2007-02-22 13:45:17Z mike $"
 #
 #   MIME types file for the Common UNIX Printing System (CUPS).
 #
@@ -140,6 +140,15 @@ text/html                  html htm printable(0,1024) +\
 text/plain                     txt printable(0,1024)
 text/css                       css
 
+
+########################################################################
+#
+# RSS feed type...
+#
+
+application/rss+xml            rss
+
+
 ########################################################################
 #
 # CUPS-specific types...
@@ -167,5 +176,5 @@ application/vnd.cups-raw    (string(0,<1B>E) + !string(2,<1B>%0B)) \
 application/octet-stream
 
 #
-# End of "$Id: mime.types 6003 2006-10-02 16:26:04Z mike $".
+# End of "$Id: mime.types 6301 2007-02-22 13:45:17Z mike $".
 #
index 8610523ba16d0e81d9c1be6b36734032e3034f88..03a348031ada76603bb3e3ba5df3de98ad95dedb 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-common.m4 6145 2006-12-06 20:10:16Z mike $"
+dnl "$Id: cups-common.m4 6304 2007-02-22 22:06:23Z mike $"
 dnl
 dnl   Common configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+dnl   Copyright 1997-2007 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
@@ -28,9 +28,12 @@ AC_PREREQ(2.50)
 dnl Set the name of the config header file...
 AC_CONFIG_HEADER(config.h)
 
-dnl Version number information...
-CUPS_VERSION="1.2.8"
+dnl Versio number information...
+CUPS_VERSION="1.3svn"
 CUPS_REVISION=""
+if test -z "$CUPS_REVISION" -a -d .svn; then
+       CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
+fi
 
 AC_SUBST(CUPS_VERSION)
 AC_SUBST(CUPS_REVISION)
@@ -189,6 +192,7 @@ dnl Extra platform-specific libraries...
 BACKLIBS=""
 CUPSDLIBS=""
 DBUSDIR=""
+CUPS_SYSTEM_AUTHKEY=""
 
 AC_ARG_ENABLE(dbus, [  --enable-dbus           enable DBUS support, default=auto])
 
@@ -219,6 +223,12 @@ case $uname in
                dnl Check for notify_post support
                AC_CHECK_HEADER(notify.h,AC_DEFINE(HAVE_NOTIFY_H))
                AC_CHECK_FUNCS(notify_post)
+
+               dnl Check for Authorization Services support
+               AC_CHECK_HEADER(Security/Authorization.h, [
+                       AC_DEFINE(HAVE_AUTHORIZATION_H)
+                       CUPS_SYSTEM_AUTHKEY="SystemGroupAuthKey system.preferences"])
+               AC_CHECK_HEADER(Security/SecBasePriv.h,AC_DEFINE(HAVE_SECBASEPRIV_H))
                 ;;
 
        Linux*)
@@ -232,7 +242,8 @@ case $uname in
                                        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"
+                                       AC_ARG_WITH(dbusdir, [  --with-dbusdir          set DBUS configuration directory ], dbusdir="$withval", dbusdir="/etc/dbus-1")
+                                       DBUSDIR="$dbusdir"
                                        AC_CHECK_LIB(dbus-1,
                                            dbus_message_iter_init_append,
                                            AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
@@ -244,6 +255,8 @@ case $uname in
                ;;
 esac
 
+AC_SUBST(CUPS_SYSTEM_AUTHKEY)
+
 dnl See if we have POSIX ACL support...
 SAVELIBS="$LIBS"
 LIBS=""
@@ -264,5 +277,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
 
 dnl
-dnl End of "$Id: cups-common.m4 6145 2006-12-06 20:10:16Z mike $".
+dnl End of "$Id: cups-common.m4 6304 2007-02-22 22:06:23Z mike $".
 dnl
index 9a15cb535bea0d9a366d4f1bf17e283dfaeb86a4..1af623a1634e0aaed535f9b030d4c34195185253 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-compiler.m4 6145 2006-12-06 20:10:16Z mike $"
+dnl "$Id: cups-compiler.m4 6264 2007-02-11 17:11:15Z mike $"
 dnl
 dnl   Compiler stuff for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+dnl   Copyright 1997-2007 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
@@ -56,9 +56,12 @@ AC_ARG_WITH(arch64flags, [  --with-arch64flags="flags"
 ARCH64FLAGS=""
 AC_SUBST(ARCH64FLAGS)
 
-dnl Position-Independent Executable support on Linux and *BSD...
+dnl Position-Independent Executable support on Linux...
 AC_ARG_ENABLE(pie, [  --enable-pie            use GCC -fPIE option, default=no])
 
+dnl Read-only data/program support on Linux...
+AC_ARG_ENABLE(relro, [  --enable-relro          use GCC relro option, default=no])
+
 dnl Update compiler options...
 CXXLIBS=""
 AC_SUBST(CXXLIBS)
@@ -66,6 +69,9 @@ AC_SUBST(CXXLIBS)
 PIEFLAGS=""
 AC_SUBST(PIEFLAGS)
 
+RELROFLAGS=""
+AC_SUBST(RELROFLAGS)
+
 if test -n "$GCC"; then
        # Add GCC-specific compiler options...
        if test -z "$OPTIM"; then
@@ -86,6 +92,10 @@ if test -n "$GCC"; then
                        if test x$enable_pie = xyes; then
                                PIEFLAGS="-pie -fPIE"
                        fi
+
+                       if test x$enable_relro = xyes; then
+                               RELROFLAGS="-Wl,-z,relro"
+                       fi
                        ;;
 
                *)
@@ -435,5 +445,5 @@ case $uname in
 esac
 
 dnl
-dnl End of "$Id: cups-compiler.m4 6145 2006-12-06 20:10:16Z mike $".
+dnl End of "$Id: cups-compiler.m4 6264 2007-02-11 17:11:15Z mike $".
 dnl
index 48b3aea5f4c85c99b373646fab3e17a2fe3793a0..393204563bcf9fdc04591b099d3bc3c9e5f78a49 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-defaults.m4 6234 2007-02-05 20:25:50Z mike $"
+dnl "$Id: cups-defaults.m4 6309 2007-02-24 03:11:56Z mike $"
 dnl
 dnl   Default cupsd configuration settings for the Common UNIX Printing System
 dnl   (CUPS).
@@ -62,16 +62,46 @@ AC_SUBST(CUPS_BROWSING)
 
 dnl Default BrowseLocalProtocols
 AC_ARG_WITH(local_protocols, [  --with-local-protocols  set default BrowseLocalProtocols, default="CUPS"],
-       CUPS_BROWSE_LOCAL_PROTOCOLS="$withval",
-       CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS")
+       default_local_protocols="$withval",
+       default_local_protocols="default")
+
+if test x$with_local_protocols != xno; then
+       if test "x$default_local_protocols" = "xdefault"; then
+               if test "x$DNSSDLIBS" != "x"; then
+               CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS dnssd"
+       else
+               CUPS_BROWSE_LOCAL_PROTOCOLS="CUPS"
+               fi
+       else
+               CUPS_BROWSE_LOCAL_PROTOCOLS="$default_local_protocols"
+       fi
+else
+       CUPS_BROWSE_LOCAL_PROTOCOLS=""
+fi
+
 AC_SUBST(CUPS_BROWSE_LOCAL_PROTOCOLS)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS,
        "$CUPS_BROWSE_LOCAL_PROTOCOLS")
 
 dnl Default BrowseRemoteProtocols
 AC_ARG_WITH(remote_protocols, [  --with-remote-protocols set default BrowseRemoteProtocols, default="CUPS"],
-       CUPS_BROWSE_REMOTE_PROTOCOLS="$withval",
-       CUPS_BROWSE_REMOTE_PROTOCOLS="CUPS")
+       default_remote_protocols="$withval",
+       default_remote_protocols="default")
+
+if test x$with_remote_protocols != xno; then
+       if test "x$default_remote_protocols" = "xdefault"; then
+               if test "$uname" = "Darwin" -a $uversion -ge 90; then
+                       CUPS_BROWSE_REMOTE_PROTOCOLS=""
+               else
+                       CUPS_BROWSE_REMOTE_PROTOCOLS="CUPS"
+               fi
+       else
+               CUPS_BROWSE_REMOTE_PROTOCOLS="$default_remote_protocols"
+       fi
+else
+       CUPS_BROWSE_REMOTE_PROTOCOLS=""
+fi
+
 AC_SUBST(CUPS_BROWSE_REMOTE_PROTOCOLS)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS,
        "$CUPS_BROWSE_REMOTE_PROTOCOLS")
@@ -251,6 +281,18 @@ fi
 
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
 
+dnl Default MaxCopies value...
+AC_ARG_WITH(max-copies, [  --with-max-copies       set max copies value, default=100 ],
+       CUPS_MAX_COPIES="$withval",
+       if test "x$uname" = xDarwin; then
+               CUPS_MAX_COPIES="999"
+       else
+               CUPS_MAX_COPIES="100"
+       fi)
+
+AC_SUBST(CUPS_MAX_COPIES)
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_MAX_COPIES, $CUPS_MAX_COPIES)
+
 dnl
-dnl End of "$Id: cups-defaults.m4 6234 2007-02-05 20:25:50Z mike $".
+dnl End of "$Id: cups-defaults.m4 6309 2007-02-24 03:11:56Z mike $".
 dnl
index 595512b4396d40a43288157c1439f18bc1d622c4..09f3d969703410b78b5c0c678678a3ca3b358dd1 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: cups-directories.m4 5905 2006-08-29 20:48:59Z mike $"
+dnl "$Id: cups-directories.m4 6332 2007-03-12 16:08:51Z mike $"
 dnl
 dnl   Directory stuff for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+dnl   Copyright 1997-2007 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
@@ -123,24 +123,24 @@ fi
 
 dnl Setup init.d locations...
 AC_ARG_WITH(rcdir, [  --with-rcdir            set path for rc scripts],rcdir="$withval",rcdir="")
+AC_ARG_WITH(rclevels, [  --with-rclevels         set run levels for rc scripts],rclevels="$withval",rclevels="2 3 5")
+AC_ARG_WITH(rcstart, [  --with-rcstart          set start number for rc scripts],rcstart="$withval",rcstart="99")
+AC_ARG_WITH(rcstop, [  --with-rcstop           set stop number for rc scripts],rcstop="$withval",rcstop="00")
+
+INITDIR=""
+INITDDIR=""
+RCLEVELS="$rclevels"
+RCSTART="$rcstart"
+RCSTOP="$rcstop"
 
 if test x$rcdir = x; then
        case "$uname" in
-               FreeBSD* | OpenBSD* | MirBsD* | ekkoBSD*)
-                       # FreeBSD and OpenBSD
-                       INITDIR=""
-                       INITDDIR=""
-                       ;;
-
-               NetBSD*)
-                       # NetBSD
-                       INITDIR=""
-                       INITDDIR="/etc/rc.d"
+               AIX*)
+                       INITDIR="/etc/rc.d"
                        ;;
 
                Darwin*)
                        # Darwin and MacOS X...
-                       INITDIR=""
                        if test -x /sbin/launchd; then
                                INITDDIR="/System/Library/LaunchDaemons"
                        else 
@@ -148,53 +148,80 @@ if test x$rcdir = x; then
                        fi
                        ;;
 
+               FreeBSD* | OpenBSD* | MirBsD* | ekkoBSD*)
+                       # FreeBSD and OpenBSD
+                       ;;
+
+               HP-UX*)
+                       INITDIR="/sbin"
+                       RCLEVELS="2"
+                       RCSTART="620"
+                       RCSTOP="380"
+                       ;;
+
+               IRIX*)
+                       # IRIX
+                       INITDIR="/etc"
+                       RCSTART="60"
+                       RCSTOP="25"
+                       ;;
+
                Linux | GNU)
                        # Linux/HURD seems to choose an init.d directory at random...
                        if test -d /sbin/init.d; then
                                # SuSE
                                INITDIR="/sbin/init.d"
-                               INITDDIR=".."
                        else
                                if test -d /etc/init.d; then
                                        # Others
                                        INITDIR="/etc"
-                                       INITDDIR="../init.d"
                                else
                                        # RedHat
                                        INITDIR="/etc/rc.d"
-                                       INITDDIR="../init.d"
                                fi
                        fi
+                       RCSTART="81"
+                       RCSTOP="36"
                        ;;
 
-               OSF1* | HP-UX*)
+               NetBSD*)
+                       # NetBSD
+                       INITDDIR="/etc/rc.d"
+                       ;;
+
+               OSF1*)
                        INITDIR="/sbin"
-                       INITDDIR="../init.d"
                        ;;
 
-               AIX*)
-                       INITDIR="/etc/rc.d"
-                       INITDDIR=".."
+               SunOS*)
+                       # Solaris
+                       INITDIR="/etc"
+                       RCSTART="81"
                        ;;
 
                *)
                        INITDIR="/etc"
-                       INITDDIR="../init.d"
                        ;;
 
        esac
 else
-       INITDIR=""
-       INITDDIR="$rcdir"
+       if test "x$rclevels" = x; then
+               INITDDIR="$rcdir"
+       else
+               INITDIR="$rcdir"
+       fi
 fi
 
 AC_SUBST(INITDIR)
 AC_SUBST(INITDDIR)
+AC_SUBST(RCLEVELS)
+AC_SUBST(RCSTART)
+AC_SUBST(RCSTOP)
 
 dnl Xinetd support...
-XINETD=""
+AC_ARG_WITH(xinetd, [  --with-xinetd           set path for xinetd config files],XINETD="$withval",XINETD="")
 
-if test ! -x /sbin/launchd; then
+if test "x$XINETD" = x -a ! -x /sbin/launchd; then
        for dir in /private/etc/xinetd.d /etc/xinetd.d /usr/local/etc/xinetd.d; do
                if test -d $dir; then
                        XINETD="$dir"
@@ -226,6 +253,28 @@ CUPS_DATADIR="$datadir/cups"
 AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$datadir/cups")
 AC_SUBST(CUPS_DATADIR)
 
+# Icon directory
+AC_ARG_WITH(icondir, [  --with-icondir          set path for application icons],icondir="$withval",icondir="")
+
+if test "x$icondir" = x -a -d /usr/share/icons; then
+       ICONDIR="/usr/share/icons"
+else
+       ICONDIR="$icondir"
+fi
+
+AC_SUBST(ICONDIR)
+
+# Menu directory
+AC_ARG_WITH(menudir, [  --with-menudir          set path for application menus],menudir="$withval",menudir="")
+
+if test "x$menudir" = x -a -d /usr/share/applications; then
+       MENUDIR="/usr/share/applications"
+else
+       MENUDIR="$menudir"
+fi
+
+AC_SUBST(MENUDIR)
+
 # Documentation files
 AC_ARG_WITH(docdir, [  --with-docdir           set path for documentation],docdir="$withval",docdir="")
 
@@ -316,5 +365,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
 AC_SUBST(CUPS_STATEDIR)
 
 dnl
-dnl End of "$Id: cups-directories.m4 5905 2006-08-29 20:48:59Z mike $".
+dnl End of "$Id: cups-directories.m4 6332 2007-03-12 16:08:51Z mike $".
 dnl
diff --git a/config-scripts/cups-dnssd.m4 b/config-scripts/cups-dnssd.m4
new file mode 100644 (file)
index 0000000..360910a
--- /dev/null
@@ -0,0 +1,47 @@
+dnl
+dnl "$Id$"
+dnl
+dnl   DNS Service Discovery (aka Bonjour) stuff for the Common UNIX Printing System (CUPS).
+dnl
+dnl   http://www.dns-sd.org
+dnl   http://www.multicastdns.org/
+dnl   http://developer.apple.com/networking/bonjour/
+dnl
+dnl   Copyright ...
+dnl
+dnl
+
+AC_ARG_ENABLE(dnssd, [  --enable-dnssd            turn on DNS Service Discovery support, default=yes])
+AC_ARG_WITH(dnssd-libs, [  --with-dnssd-libs        set directory for DNS Service Discovery library],
+       LDFLAGS="-L$withval $LDFLAGS"
+       DSOFLAGS="-L$withval $DSOFLAGS",)
+AC_ARG_WITH(dnssd-includes, [  --with-dnssd-includes    set directory for DNS Service Discovery includes],
+       CFLAGS="-I$withval $CFLAGS"
+       CXXFLAGS="-I$withval $CXXFLAGS"
+       CPPFLAGS="-I$withval $CPPFLAGS",)
+
+DNSSDLIBS=""
+
+if test x$enable_dnssd != xno; then
+       AC_CHECK_HEADER(dns_sd.h, [
+               AC_DEFINE(HAVE_DNSSD)
+               case "$uname" in
+                       Darwin*)
+                               # Darwin and MacOS X...
+                               DNSSDLIBS="-framework CoreFoundation -framework SystemConfiguration"
+                               AC_DEFINE(HAVE_COREFOUNDATION)
+                               AC_DEFINE(HAVE_SYSTEMCONFIGURATION)
+                               ;;
+                       *)
+                               # All others...
+                               DNSSDLIBS="???"
+                               ;;
+               esac
+       ])
+fi
+
+AC_SUBST(DNSSDLIBS)
+
+dnl
+dnl End of "$Id$".
+dnl
diff --git a/config-scripts/cups-gssapi.m4 b/config-scripts/cups-gssapi.m4
new file mode 100644 (file)
index 0000000..ebb8c12
--- /dev/null
@@ -0,0 +1,105 @@
+dnl
+dnl   "$Id$"
+dnl
+dnl   GSSAPI/Kerberos library detection.
+dnl
+dnl   Copyright 2006-2007 by Easy Software Products.
+dnl
+dnl   This file contains Kerberos support code, copyright 2006 by
+dnl   Jelmer Vernooij.
+dnl
+dnl   These coded instructions, statements, and computer programs are the
+dnl   property of Easy Software Products and are protected by Federal
+dnl   copyright law.  Distribution and use rights are outlined in the file
+dnl   "LICENSE.txt" which should have been included with this file.  If this
+dnl   file is missing or damaged please contact Easy Software Products
+dnl   at:
+dnl
+dnl       Attn: CUPS Licensing Information
+dnl       Easy Software Products
+dnl       44141 Airport View Drive, Suite 204
+dnl       Hollywood, Maryland 20636 USA
+dnl
+dnl       Voice: (301) 373-9600
+dnl       EMail: cups-info@cups.org
+dnl         WWW: http://www.cups.org
+dnl
+
+AC_ARG_ENABLE(gssapi, [  --enable-gssapi         turn on GSSAPI support, default=yes])
+
+LIBGSSAPI=""
+
+if test x$enable_gssapi != xno; then
+       AC_PATH_PROG(KRB5CONFIG, krb5-config)
+       if test "x$KRB5CONFIG" != x; then
+               CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"          
+               CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"              
+               LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
+               AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
+       else
+               # Solaris provides its own GSSAPI implementation...
+               AC_CHECK_LIB(gss, gss_display_status,
+                       AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
+                       LIBGSSAPI="-lgss")
+       fi
+
+       if test "x$LIBGSSAPI" != x; then
+               AC_CHECK_HEADER(krb5.h, AC_DEFINE(HAVE_KRB5_H))
+               AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
+               AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
+               AC_CHECK_HEADER(gssapi/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_GENERIC_H))
+               AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_KRB5_H))
+
+               SAVELIBS="$LIBS"
+               LIBS="$LIBS $LIBGSSAPI"
+
+               AC_CHECK_FUNC(gsskrb5_register_acceptor_identity, 
+                             AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY))
+
+               AC_MSG_CHECKING(for GSS_C_NT_HOSTBASED_SERVICE)
+               if test $ac_cv_header_gssapi_gssapi_h = yes; then
+                       AC_TRY_COMPILE([ #include <gssapi/gssapi.h> ],
+                                      [ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
+                                      AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
+                                      AC_MSG_RESULT(yes),
+                                      AC_MSG_RESULT(no))
+               else
+                       AC_TRY_COMPILE([ #include <gssapi.h> ],
+                                      [ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
+                                      AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
+                                      AC_MSG_RESULT(yes),
+                                      AC_MSG_RESULT(no))
+               fi
+
+               LIBS="$SAVELIBS"
+
+               AC_MSG_CHECKING(for Heimdal Kerberos)
+               AC_TRY_COMPILE([ #include <krb5.h> ],
+                              [ char *tmp = heimdal_version; ],
+                              AC_DEFINE(HAVE_HEIMDAL)
+                              AC_MSG_RESULT(yes),
+                              AC_MSG_RESULT(no))
+       fi
+fi
+
+dnl Default GSS service name...
+AC_ARG_WITH(gssservicename, [  --with-gssservicename   set default gss service name],
+       default_gssservicename="$withval",
+       default_gssservicename="default")
+
+if test x$default_gssservicename != xno; then
+       if test "x$default_gssservicename" = "xdefault"; then
+               CUPS_DEFAULT_GSSSERVICENAME="IPP"
+       else
+               CUPS_DEFAULT_GSSSERVICENAME="$default_gssservicename"
+       fi
+else
+       CUPS_DEFAULT_GSSSERVICENAME=""
+fi
+
+AC_SUBST(LIBGSSAPI)
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_GSSSERVICENAME, "$CUPS_DEFAULT_GSSSERVICENAME")
+
+dnl
+dnl End of "$Id$".
+dnl
index 22cb798f49f2c0ce6d91e1d8f184fa9892cea18c..8c63cc9a5dd658dbbd562e6e48d3bdec7bf0617f 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-image.m4 5580 2006-05-23 19:30:23Z mike $"
+dnl "$Id: cups-image.m4 5579 2006-05-23 19:27:28Z mike $"
 dnl
 dnl   Image library/filter stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -114,5 +114,5 @@ AC_SUBST(EXPORT_LIBZ)
 AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
 
 dnl
-dnl End of "$Id: cups-image.m4 5580 2006-05-23 19:30:23Z mike $".
+dnl End of "$Id: cups-image.m4 5579 2006-05-23 19:27:28Z mike $".
 dnl
index 25400ce2da639e7c898563c4a184b585147957d2..f5f6bf1ad540fb3ec23ca0d22b5e7075d2e7d026 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-largefile.m4 4732 2005-09-30 23:23:25Z mike $"
+dnl "$Id: cups-largefile.m4 6330 2007-03-12 14:50:45Z mike $"
 dnl
 dnl   Large file support stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -30,11 +30,11 @@ LARGEFILE=""
 if test x$enable_largefile != xno; then
        LARGEFILE="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"
 
-       if test $ac_cv_sys_large_files = 1; then
+       if test x$ac_cv_sys_large_files = x1; then
                LARGEFILE="$LARGEFILE -D_LARGE_FILES"
        fi
 
-       if test $ac_cv_sys_file_offset_bits = 64; then
+       if test x$ac_cv_sys_file_offset_bits = x64; then
                LARGEFILE="$LARGEFILE -D_FILE_OFFSET_BITS=64"
        fi
 fi
@@ -57,5 +57,5 @@ fi
 AC_CHECK_FUNC(strtoll, AC_DEFINE(HAVE_STRTOLL))
 
 dnl
-dnl End of "$Id: cups-largefile.m4 4732 2005-09-30 23:23:25Z mike $".
+dnl End of "$Id: cups-largefile.m4 6330 2007-03-12 14:50:45Z mike $".
 dnl
index c78e175098bd314216fad1e91a6a42488572b0cc..d2171eb302f5b30c927f49f9ccff4bd2240ad827 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-ldap.m4 5564 2006-05-22 00:59:11Z mike $"
+dnl "$Id: cups-ldap.m4 5563 2006-05-21 17:18:40Z mike $"
 dnl
 dnl   LDAP configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -46,5 +46,5 @@ AC_SUBST(LIBLDAP)
 
 
 dnl
-dnl End of "$Id: cups-ldap.m4 5564 2006-05-22 00:59:11Z mike $".
+dnl End of "$Id: cups-ldap.m4 5563 2006-05-21 17:18:40Z mike $".
 dnl
index 41e8190cba1b5dfe6004e2025b275f514a7d461c..71f1e60bad134a61807b38d8b70287058b515057 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-manpages.m4 5799 2006-08-03 00:54:38Z mike $"
+dnl "$Id: cups-manpages.m4 5798 2006-08-03 00:53:58Z mike $"
 dnl
 dnl   Manpage stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -109,5 +109,5 @@ AC_SUBST(MAN8EXT)
 AC_SUBST(MAN8DIR)
 
 dnl
-dnl End of "$Id: cups-manpages.m4 5799 2006-08-03 00:54:38Z mike $".
+dnl End of "$Id: cups-manpages.m4 5798 2006-08-03 00:53:58Z mike $".
 dnl
index abe2ebcf0b1e304e7bfdf9993d64b2a5d837fb13..10cf682812ba8ca18f8e1f81319eeb50ed3da2f3 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $"
+dnl "$Id: cups-network.m4 6046 2006-10-20 14:43:30Z mike $"
 dnl
 dnl   Networking stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -51,7 +51,7 @@ else
        maxfiles=4096
 fi
 
-AC_ARG_WITH(maxfiles, [  --with-maxfiles=N       set maximum number of file descriptors for scheduler (deprecated) ],
+AC_ARG_WITH(maxfiles, [  --with-maxfiles=N       set maximum number of file descriptors for scheduler ],
        maxfiles=$withval)
 
 AC_DEFINE_UNQUOTED(CUPS_MAX_FDS, $maxfiles)
@@ -90,5 +90,5 @@ AC_SUBST(CUPS_DEFAULT_DOMAINSOCKET)
 AC_SUBST(CUPS_LISTEN_DOMAINSOCKET)
 
 dnl
-dnl End of "$Id: cups-network.m4 6049 2006-10-20 15:07:21Z mike $".
+dnl End of "$Id: cups-network.m4 6046 2006-10-20 14:43:30Z mike $".
 dnl
index 8d510da91a250e90c8280eb5eb991455982cd3e9..964fe74bf529e81f8cf5d29323db2563f739aa19 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-opsys.m4 6145 2006-12-06 20:10:16Z mike $"
+dnl "$Id: cups-opsys.m4 6135 2006-12-06 18:22:38Z mike $"
 dnl
 dnl   Operating system stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -40,5 +40,5 @@ case "$uname" in
 esac
 
 dnl
-dnl "$Id: cups-opsys.m4 6145 2006-12-06 20:10:16Z mike $"
+dnl "$Id: cups-opsys.m4 6135 2006-12-06 18:22:38Z mike $"
 dnl
diff --git a/config-scripts/cups-poll.m4 b/config-scripts/cups-poll.m4
new file mode 100644 (file)
index 0000000..d0b6e97
--- /dev/null
@@ -0,0 +1,31 @@
+dnl
+dnl "$Id$"
+dnl
+dnl   Select/poll stuff for the Common UNIX Printing System (CUPS).
+dnl
+dnl   Copyright 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
+dnl   copyright law.  Distribution and use rights are outlined in the file
+dnl   "LICENSE.txt" which should have been included with this file.  If this
+dnl   file is missing or damaged please contact Easy Software Products
+dnl   at:
+dnl
+dnl       Attn: CUPS Licensing Information
+dnl       Easy Software Products
+dnl       44141 Airport View Drive, Suite 204
+dnl       Hollywood, Maryland 20636 USA
+dnl
+dnl       Voice: (301) 373-9600
+dnl       EMail: cups-info@cups.org
+dnl         WWW: http://www.cups.org
+dnl
+
+AC_CHECK_FUNC(poll, AC_DEFINE(HAVE_POLL))
+AC_CHECK_FUNC(epoll_create, AC_DEFINE(HAVE_EPOLL))
+AC_CHECK_FUNC(kqueue, AC_DEFINE(HAVE_KQUEUE))
+
+dnl
+dnl End of "$Id$".
+dnl
index ca695aa13440f1bd9d7b73c2f2e69c50df3e31ae..940fdac280eec44c7824a0fa505f536942eec517 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-sharedlibs.m4 6145 2006-12-06 20:10:16Z mike $"
+dnl "$Id: cups-sharedlibs.m4 6135 2006-12-06 18:22:38Z mike $"
 dnl
 dnl   Shared library support for the Common UNIX Printing System (CUPS).
 dnl
@@ -192,5 +192,5 @@ AC_SUBST(IMGLIBS)
 AC_SUBST(EXPORT_LDFLAGS)
 
 dnl
-dnl End of "$Id: cups-sharedlibs.m4 6145 2006-12-06 20:10:16Z mike $".
+dnl End of "$Id: cups-sharedlibs.m4 6135 2006-12-06 18:22:38Z mike $".
 dnl
index 2522e9b161c9b7f35c4678056b4ce363c877a4cd..a208b712f160eb70068f5723d262c57def1aa945 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-ssl.m4 6238 2007-02-06 16:04:25Z mike $"
+dnl "$Id: cups-ssl.m4 6237 2007-02-06 15:56:14Z mike $"
 dnl
 dnl   OpenSSL/GNUTLS stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -133,5 +133,5 @@ AC_SUBST(EXPORT_SSLLIBS)
 
 
 dnl
-dnl End of "$Id: cups-ssl.m4 6238 2007-02-06 16:04:25Z mike $".
+dnl End of "$Id: cups-ssl.m4 6237 2007-02-06 15:56:14Z mike $".
 dnl
index dbf5afaf2f7ad7f5dc3d192e49bfb4429e5cabc7..a779aad841765f3e016fdbee0c85e1d9a1d2522c 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-threads.m4 6061 2006-10-23 00:26:52Z mike $"
+dnl "$Id: cups-threads.m4 6057 2006-10-23 00:17:26Z mike $"
 dnl
 dnl   Threading stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -59,5 +59,5 @@ fi
 AC_SUBST(PTHREAD_FLAGS)
 
 dnl
-dnl End of "$Id: cups-threads.m4 6061 2006-10-23 00:26:52Z mike $".
+dnl End of "$Id: cups-threads.m4 6057 2006-10-23 00:17:26Z mike $".
 dnl
index bad25cb09682d7df75916a3c085f2bcaf7cebe86..e2a76addd88337cbe7cb75687e51911dfb628446 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: config.h.in 6238 2007-02-06 16:04:25Z mike $"
+ * "$Id: config.h.in 6304 2007-02-22 22:06:23Z mike $"
  *
  *   Configuration file for the Common UNIX Printing System (CUPS).
  *
 #define CUPS_DEFAULT_PRINTCAP  "/etc/printcap"
 
 
+/*
+ * Default MaxCopies value...
+ */
+
+#define CUPS_DEFAULT_MAX_COPIES        100
+
+
 /*
  * Maximum number of file descriptors to support.
  */
  * What Security framework headers do we have?
  */
 
+#undef HAVE_AUTHORIZATION_H
 #undef HAVE_SECPOLICY_H
 #undef HAVE_SECPOLICYPRIV_H
 #undef HAVE_SECBASEPRIV_H
 #undef HAVE_LIBPAPER
 
 
+/*
+ * Do we have DNS Service Discovery (aka Bonjour)?
+ */
+
+#undef HAVE_DNSSD
+
+
+/*
+ * Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
+ */
+
+#undef HAVE_COREFOUNDATION
+#undef HAVE_SYSTEMCONFIGURATION
+
+
 /*
  * Do we have <sys/ioctl.h>?
  */
 #undef HAVE_APPLETALK_AT_PROTO_H
 
 
+/*
+ * Do we have the GSSAPI support library (for Kerberos support)?
+ */
+
+#undef HAVE_GSSAPI
+#undef HAVE_GSSAPI_H
+#undef HAVE_GSSAPI_GSSAPI_H
+#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
+#undef HAVE_GSSAPI_GSSAPI_KRB5_H
+#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
+#undef HAVE_KRB5_H
+#undef HAVE_HEIMDAL
+
+
+/*
+ * Default GSS service name...
+ */
+
+#define CUPS_DEFAULT_GSSSERVICENAME    ""
+
+
+/*
+ * Select/poll interfaces...
+ */
+
+#undef HAVE_POLL
+#undef HAVE_EPOLL
+#undef HAVE_KQUEUE
+
+
 #endif /* !_CUPS_CONFIG_H_ */
 
 /*
- * End of "$Id: config.h.in 6238 2007-02-06 16:04:25Z mike $".
+ * End of "$Id: config.h.in 6304 2007-02-22 22:06:23Z mike $".
  */
index b96b42272fe8b1a85cae3f0a9139f96bdf3613c2..2472ce6fc83f3f7c0a958886f6cf456836fc9769 100644 (file)
@@ -1,9 +1,9 @@
 dnl
-dnl "$Id: configure.in 6145 2006-12-06 20:10:16Z mike $"
+dnl "$Id: configure.in 6291 2007-02-19 21:54:27Z mike $"
 dnl
 dnl   Configuration script for the Common UNIX Printing System (CUPS).
 dnl
-dnl   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+dnl   Copyright 1997-2007 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
@@ -36,12 +36,15 @@ sinclude(config-scripts/cups-compiler.m4)
 
 sinclude(config-scripts/cups-image.m4)
 sinclude(config-scripts/cups-network.m4)
+sinclude(config-scripts/cups-poll.m4)
 sinclude(config-scripts/cups-slp.m4)
+sinclude(config-scripts/cups-gssapi.m4)
 sinclude(config-scripts/cups-ldap.m4)
 sinclude(config-scripts/cups-ssl.m4)
 sinclude(config-scripts/cups-pam.m4)
 sinclude(config-scripts/cups-threads.m4)
 sinclude(config-scripts/cups-largefile.m4)
+sinclude(config-scripts/cups-dnssd.m4)
 sinclude(config-scripts/cups-launchd.m4)
 sinclude(config-scripts/cups-defaults.m4)
 sinclude(config-scripts/cups-pap.m4)
@@ -84,5 +87,5 @@ AC_OUTPUT(Makedefs packaging/cups.list init/cups.sh init/cups-lpd cups-config
 chmod +x cups-config
 
 dnl
-dnl End of "$Id: configure.in 6145 2006-12-06 20:10:16Z mike $".
+dnl End of "$Id: configure.in 6291 2007-02-19 21:54:27Z mike $".
 dnl
index 81a982b4743386e0e5f3471267beddf83654ff58..98e80a88fdb4d5437e283ed3a4371508ace597a8 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# "$Id: cups-config.in 5799 2006-08-03 00:54:38Z mike $"
+# "$Id: cups-config.in 5919 2006-08-31 04:20:45Z mike $"
 # 
 #   CUPS configuration utility.
 #
@@ -24,7 +24,7 @@
 #
 
 VERSION="@CUPS_VERSION@"
-APIVERSION="1.2"
+APIVERSION="1.3"
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
@@ -43,7 +43,7 @@ INSTALLSTATIC=@INSTALLSTATIC@
 # flags for C++ compiler:
 CFLAGS=""
 LDFLAGS="@EXPORT_LDFLAGS@"
-LIBS="@EXPORT_SSLLIBS@ @EXPORT_LIBZ@ @LIBS@"
+LIBS="@LIBGSSAPI@ @EXPORT_SSLLIBS@ @EXPORT_LIBZ@ @LIBS@"
 IMGLIBS="@EXPORT_LIBTIFF@ @EXPORT_LIBJPEG@ @EXPORT_LIBPNG@"
 
 # Check for local invocation...
@@ -151,5 +151,5 @@ while test $# -gt 0; do
 done
 
 #
-# End of "$Id: cups-config.in 5799 2006-08-03 00:54:38Z mike $".
+# End of "$Id: cups-config.in 5919 2006-08-31 04:20:45Z mike $".
 #
index cedd9bdedba50274f3acd7bdf80885d60d4f3d1e..0efee6e4a61c716bac7a09088000f215e69560a3 100644 (file)
@@ -1,14 +1,14 @@
 # DO NOT DELETE
 
-adminutil.o: adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
-adminutil.o: language.h globals.h string.h ../config.h http-private.h
+adminutil.o: adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
+adminutil.o: globals.h string.h ../config.h http-private.h md5.h
 adminutil.o: ipp-private.h i18n.h transcode.h debug.h
 array.o: array.h string.h ../config.h debug.h
 attr.o: ppd.h array.h file.h debug.h string.h ../config.h
 auth.o: globals.h string.h ../config.h http-private.h http.h md5.h
 auth.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 auth.o: transcode.h debug.h
-backchannel.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
+backchannel.o: cups.h ipp.h http.h ppd.h array.h file.h language.h
 backend.o: backend.h string.h ../config.h
 custom.o: globals.h string.h ../config.h http-private.h http.h md5.h
 custom.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
@@ -18,14 +18,14 @@ dest.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 dest.o: transcode.h
 dir.o: dir.h string.h ../config.h debug.h
 emit.o: ppd.h array.h file.h string.h ../config.h debug.h
-encode.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
-encode.o: ipp-private.h string.h ../config.h debug.h
+encode.o: cups.h ipp.h http.h ppd.h array.h file.h language.h ipp-private.h
+encode.o: string.h ../config.h debug.h
 file.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
 file.o: string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
 file.o: debug.h
 getifaddrs.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
-getputfile.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
-getputfile.o: string.h ../config.h debug.h
+getputfile.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
+getputfile.o: cups.h ppd.h array.h file.h language.h string.h debug.h
 globals.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
 globals.o: globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
 globals.o: transcode.h debug.h
@@ -56,14 +56,15 @@ language.o: transcode.h debug.h
 localize.o: globals.h string.h ../config.h http-private.h http.h md5.h
 localize.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 localize.o: transcode.h debug.h
-mark.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
+mark.o: cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
 mark.o: ../config.h debug.h
 md5.o: md5.h string.h ../config.h
-md5passwd.o: http.h md5.h string.h ../config.h
+md5passwd.o: http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
+md5passwd.o: string.h
 notify.o: globals.h string.h ../config.h http-private.h http.h md5.h
 notify.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 notify.o: transcode.h
-options.o: cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
+options.o: cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
 options.o: ../config.h debug.h
 page.o: ppd.h array.h file.h string.h ../config.h
 ppd.o: globals.h string.h ../config.h http-private.h http.h md5.h
@@ -72,6 +73,7 @@ ppd.o: transcode.h debug.h
 request.o: globals.h string.h ../config.h http-private.h http.h md5.h
 request.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 request.o: transcode.h debug.h
+sidechannel.o: sidechannel.h string.h ../config.h
 snprintf.o: string.h ../config.h
 string.o: array.h debug.h string.h ../config.h
 tempfile.o: globals.h string.h ../config.h http-private.h http.h md5.h
@@ -86,27 +88,26 @@ usersys.o: transcode.h debug.h
 util.o: globals.h string.h ../config.h http-private.h http.h md5.h
 util.o: ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 util.o: transcode.h debug.h
-testadmin.o: adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
-testadmin.o: language.h string.h ../config.h
+testadmin.o: adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
+testadmin.o: string.h ../config.h
 testarray.o: ../cups/string.h ../config.h string.h array.h dir.h debug.h
 testfile.o: string.h ../config.h file.h debug.h
-testhttp.o: http.h md5.h string.h ../config.h
+testhttp.o: http.h string.h ../config.h
 testi18n.o: i18n.h transcode.h language.h array.h string.h ../config.h
 testipp.o: ../cups/string.h ../config.h string.h ipp-private.h ipp.h http.h
-testipp.o: md5.h
 testlang.o: i18n.h transcode.h language.h array.h
 testppd.o: ../cups/string.h ../config.h string.h ppd.h array.h file.h
 # DO NOT DELETE
 
-adminutil.32.o: adminutil.c  adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
-adminutil.32.o: adminutil.c  language.h globals.h string.h ../config.h http-private.h
+adminutil.32.o: adminutil.c  adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
+adminutil.32.o: adminutil.c  globals.h string.h ../config.h http-private.h md5.h
 adminutil.32.o: adminutil.c  ipp-private.h i18n.h transcode.h debug.h
 array.32.o: array.c  array.h string.h ../config.h debug.h
 attr.32.o: attr.c  ppd.h array.h file.h debug.h string.h ../config.h
 auth.32.o: auth.c  globals.h string.h ../config.h http-private.h http.h md5.h
 auth.32.o: auth.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 auth.32.o: auth.c  transcode.h debug.h
-backchannel.32.o: backchannel.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
+backchannel.32.o: backchannel.c  cups.h ipp.h http.h ppd.h array.h file.h language.h
 backend.32.o: backend.c  backend.h string.h ../config.h
 custom.32.o: custom.c  globals.h string.h ../config.h http-private.h http.h md5.h
 custom.32.o: custom.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
@@ -116,14 +117,14 @@ dest.32.o: dest.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i1
 dest.32.o: dest.c  transcode.h
 dir.32.o: dir.c  dir.h string.h ../config.h debug.h
 emit.32.o: emit.c  ppd.h array.h file.h string.h ../config.h debug.h
-encode.32.o: encode.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
-encode.32.o: encode.c  ipp-private.h string.h ../config.h debug.h
+encode.32.o: encode.c  cups.h ipp.h http.h ppd.h array.h file.h language.h ipp-private.h
+encode.32.o: encode.c  string.h ../config.h debug.h
 file.32.o: file.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
 file.32.o: file.c  string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
 file.32.o: file.c  debug.h
 getifaddrs.32.o: getifaddrs.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
-getputfile.32.o: getputfile.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
-getputfile.32.o: getputfile.c  string.h ../config.h debug.h
+getputfile.32.o: getputfile.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
+getputfile.32.o: getputfile.c  cups.h ppd.h array.h file.h language.h string.h debug.h
 globals.32.o: globals.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
 globals.32.o: globals.c  globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
 globals.32.o: globals.c  transcode.h debug.h
@@ -154,14 +155,15 @@ language.32.o: language.c  transcode.h debug.h
 localize.32.o: localize.c  globals.h string.h ../config.h http-private.h http.h md5.h
 localize.32.o: localize.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 localize.32.o: localize.c  transcode.h debug.h
-mark.32.o: mark.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
+mark.32.o: mark.c  cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
 mark.32.o: mark.c  ../config.h debug.h
 md5.32.o: md5.c  md5.h string.h ../config.h
-md5passwd.32.o: md5passwd.c  http.h md5.h string.h ../config.h
+md5passwd.32.o: md5passwd.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
+md5passwd.32.o: md5passwd.c  string.h
 notify.32.o: notify.c  globals.h string.h ../config.h http-private.h http.h md5.h
 notify.32.o: notify.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 notify.32.o: notify.c  transcode.h
-options.32.o: options.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
+options.32.o: options.c  cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
 options.32.o: options.c  ../config.h debug.h
 page.32.o: page.c  ppd.h array.h file.h string.h ../config.h
 ppd.32.o: ppd.c  globals.h string.h ../config.h http-private.h http.h md5.h
@@ -170,6 +172,7 @@ ppd.32.o: ppd.c  transcode.h debug.h
 request.32.o: request.c  globals.h string.h ../config.h http-private.h http.h md5.h
 request.32.o: request.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 request.32.o: request.c  transcode.h debug.h
+sidechannel.32.o: sidechannel.c  sidechannel.h string.h ../config.h
 snprintf.32.o: snprintf.c  string.h ../config.h
 string.32.o: string.c  array.h debug.h string.h ../config.h
 tempfile.32.o: tempfile.c  globals.h string.h ../config.h http-private.h http.h md5.h
@@ -184,27 +187,26 @@ usersys.32.o: usersys.c  transcode.h debug.h
 util.32.o: util.c  globals.h string.h ../config.h http-private.h http.h md5.h
 util.32.o: util.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 util.32.o: util.c  transcode.h debug.h
-testadmin.32.o: testadmin.c  adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
-testadmin.32.o: testadmin.c  language.h string.h ../config.h
+testadmin.32.o: testadmin.c  adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
+testadmin.32.o: testadmin.c  string.h ../config.h
 testarray.32.o: testarray.c  ../cups/string.h ../config.h string.h array.h dir.h debug.h
 testfile.32.o: testfile.c  string.h ../config.h file.h debug.h
-testhttp.32.o: testhttp.c  http.h md5.h string.h ../config.h
+testhttp.32.o: testhttp.c  http.h string.h ../config.h
 testi18n.32.o: testi18n.c  i18n.h transcode.h language.h array.h string.h ../config.h
 testipp.32.o: testipp.c  ../cups/string.h ../config.h string.h ipp-private.h ipp.h http.h
-testipp.32.o: testipp.c  md5.h
 testlang.32.o: testlang.c  i18n.h transcode.h language.h array.h
 testppd.32.o: testppd.c  ../cups/string.h ../config.h string.h ppd.h array.h file.h
 # DO NOT DELETE
 
-adminutil.64.o: adminutil.c  adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
-adminutil.64.o: adminutil.c  language.h globals.h string.h ../config.h http-private.h
+adminutil.64.o: adminutil.c  adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
+adminutil.64.o: adminutil.c  globals.h string.h ../config.h http-private.h md5.h
 adminutil.64.o: adminutil.c  ipp-private.h i18n.h transcode.h debug.h
 array.64.o: array.c  array.h string.h ../config.h debug.h
 attr.64.o: attr.c  ppd.h array.h file.h debug.h string.h ../config.h
 auth.64.o: auth.c  globals.h string.h ../config.h http-private.h http.h md5.h
 auth.64.o: auth.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 auth.64.o: auth.c  transcode.h debug.h
-backchannel.64.o: backchannel.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
+backchannel.64.o: backchannel.c  cups.h ipp.h http.h ppd.h array.h file.h language.h
 backend.64.o: backend.c  backend.h string.h ../config.h
 custom.64.o: custom.c  globals.h string.h ../config.h http-private.h http.h md5.h
 custom.64.o: custom.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
@@ -214,14 +216,14 @@ dest.64.o: dest.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i1
 dest.64.o: dest.c  transcode.h
 dir.64.o: dir.c  dir.h string.h ../config.h debug.h
 emit.64.o: emit.c  ppd.h array.h file.h string.h ../config.h debug.h
-encode.64.o: encode.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
-encode.64.o: encode.c  ipp-private.h string.h ../config.h debug.h
+encode.64.o: encode.c  cups.h ipp.h http.h ppd.h array.h file.h language.h ipp-private.h
+encode.64.o: encode.c  string.h ../config.h debug.h
 file.64.o: file.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h globals.h
 file.64.o: file.c  string.h cups.h ppd.h array.h file.h language.h i18n.h transcode.h
 file.64.o: file.c  debug.h
 getifaddrs.64.o: getifaddrs.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
-getputfile.64.o: getputfile.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h
-getputfile.64.o: getputfile.c  string.h ../config.h debug.h
+getputfile.64.o: getputfile.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
+getputfile.64.o: getputfile.c  cups.h ppd.h array.h file.h language.h string.h debug.h
 globals.64.o: globals.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
 globals.64.o: globals.c  globals.h string.h cups.h ppd.h array.h file.h language.h i18n.h
 globals.64.o: globals.c  transcode.h debug.h
@@ -252,14 +254,15 @@ language.64.o: language.c  transcode.h debug.h
 localize.64.o: localize.c  globals.h string.h ../config.h http-private.h http.h md5.h
 localize.64.o: localize.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 localize.64.o: localize.c  transcode.h debug.h
-mark.64.o: mark.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
+mark.64.o: mark.c  cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
 mark.64.o: mark.c  ../config.h debug.h
 md5.64.o: md5.c  md5.h string.h ../config.h
-md5passwd.64.o: md5passwd.c  http.h md5.h string.h ../config.h
+md5passwd.64.o: md5passwd.c  http-private.h ../config.h http.h md5.h ipp-private.h ipp.h
+md5passwd.64.o: md5passwd.c  string.h
 notify.64.o: notify.c  globals.h string.h ../config.h http-private.h http.h md5.h
 notify.64.o: notify.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 notify.64.o: notify.c  transcode.h
-options.64.o: options.c  cups.h ipp.h http.h md5.h ppd.h array.h file.h language.h string.h
+options.64.o: options.c  cups.h ipp.h http.h ppd.h array.h file.h language.h string.h
 options.64.o: options.c  ../config.h debug.h
 page.64.o: page.c  ppd.h array.h file.h string.h ../config.h
 ppd.64.o: ppd.c  globals.h string.h ../config.h http-private.h http.h md5.h
@@ -268,6 +271,7 @@ ppd.64.o: ppd.c  transcode.h debug.h
 request.64.o: request.c  globals.h string.h ../config.h http-private.h http.h md5.h
 request.64.o: request.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 request.64.o: request.c  transcode.h debug.h
+sidechannel.64.o: sidechannel.c  sidechannel.h string.h ../config.h
 snprintf.64.o: snprintf.c  string.h ../config.h
 string.64.o: string.c  array.h debug.h string.h ../config.h
 tempfile.64.o: tempfile.c  globals.h string.h ../config.h http-private.h http.h md5.h
@@ -282,13 +286,12 @@ usersys.64.o: usersys.c  transcode.h debug.h
 util.64.o: util.c  globals.h string.h ../config.h http-private.h http.h md5.h
 util.64.o: util.c  ipp-private.h ipp.h cups.h ppd.h array.h file.h language.h i18n.h
 util.64.o: util.c  transcode.h debug.h
-testadmin.64.o: testadmin.c  adminutil.h cups.h ipp.h http.h md5.h ppd.h array.h file.h
-testadmin.64.o: testadmin.c  language.h string.h ../config.h
+testadmin.64.o: testadmin.c  adminutil.h cups.h ipp.h http.h ppd.h array.h file.h language.h
+testadmin.64.o: testadmin.c  string.h ../config.h
 testarray.64.o: testarray.c  ../cups/string.h ../config.h string.h array.h dir.h debug.h
 testfile.64.o: testfile.c  string.h ../config.h file.h debug.h
-testhttp.64.o: testhttp.c  http.h md5.h string.h ../config.h
+testhttp.64.o: testhttp.c  http.h string.h ../config.h
 testi18n.64.o: testi18n.c  i18n.h transcode.h language.h array.h string.h ../config.h
 testipp.64.o: testipp.c  ../cups/string.h ../config.h string.h ipp-private.h ipp.h http.h
-testipp.64.o: testipp.c  md5.h
 testlang.64.o: testlang.c  i18n.h transcode.h language.h array.h
 testppd.64.o: testppd.c  ../cups/string.h ../config.h string.h ppd.h array.h file.h
index e0064b42e69dd073d368b188c72a6498982c14d1..36c170baa1b4a3bded6cc4e018179179ed415126 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5801 2006-08-03 02:20:57Z mike $"
+# "$Id: Makefile 6304 2007-02-22 22:06:23Z mike $"
 #
 #   API library Makefile for the Common UNIX Printing System (CUPS).
 #
@@ -63,6 +63,7 @@ LIBOBJS       =       \
                page.o \
                ppd.o \
                request.o \
+               sidechannel.o \
                snprintf.o \
                string.o \
                tempfile.o \
@@ -101,8 +102,8 @@ HEADERS     =       \
                i18n.h \
                ipp.h \
                language.h \
-               md5.h \
                ppd.h \
+               sidechannel.h \
                transcode.h
 
 
@@ -231,7 +232,7 @@ uninstall64bit:
 
 libcups.so.2 libcups.sl.2:     $(LIBOBJS)
        echo Linking $@...
-       $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+       $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
        $(RM) `basename $@ .2`
        $(LN) $@ `basename $@ .2`
 
@@ -243,7 +244,7 @@ libcups.so.2 libcups.sl.2:  $(LIBOBJS)
 32bit/libcups.so.2:    $(LIB32OBJS)
        echo Linking 32-bit $@...
        -mkdir 32bit
-       $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+       $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
        $(RM) 32bit/libcups.so
        $(LN) libcups.so.2 32bit/libcups.so
 
@@ -255,7 +256,7 @@ libcups.so.2 libcups.sl.2:  $(LIBOBJS)
 64bit/libcups.so.2:    $(LIB64OBJS)
        echo Linking 64-bit $@...
        -mkdir 64bit
-       $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+       $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
        $(RM) 64bit/libcups.so
        $(LN) libcups.so.2 64bit/libcups.so
 
@@ -268,9 +269,9 @@ libcups.2.dylib:    $(LIBOBJS)
        echo Linking $@...
        $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
                -install_name $(libdir)/$@ \
-               -current_version 2.7.0 \
+               -current_version 2.8.0 \
                -compatibility_version 2.0.0 \
-               $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
        $(RM) libcups.dylib
        $(LN) $@ libcups.dylib
 
@@ -281,7 +282,7 @@ libcups.2.dylib:    $(LIBOBJS)
 
 libcups_s.a:   $(LIBOBJS) libcups_s.exp
        echo Creating $@...
-       $(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o $(LIBOBJS) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) -lm
+       $(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ) -lm
        $(RM) $@
        $(AR) $(ARFLAGS) $@ libcups_s.o
 
@@ -293,7 +294,7 @@ libcups_s.a:        $(LIBOBJS) libcups_s.exp
 libcups.la:    $(LIBOBJS)
        echo Linking $@...
        $(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) -rpath $(LIBDIR) \
-               -version-info 2:7 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               -version-info 2:8 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -338,7 +339,7 @@ php_cups_wrap.c:    cups.h
 testadmin:     testadmin.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testadmin.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -348,7 +349,7 @@ testadmin:  testadmin.o libcups.a
 testarray:     testarray.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testarray.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -358,7 +359,7 @@ testarray:  testarray.o libcups.a
 testfile:      testfile.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testfile.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -368,7 +369,7 @@ testfile:   testfile.o libcups.a
 testhttp:      testhttp.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testhttp.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -378,7 +379,7 @@ testhttp:   testhttp.o libcups.a
 testipp:       testipp.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testipp.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -388,7 +389,7 @@ testipp:    testipp.o libcups.a
 testi18n:      testi18n.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testi18n.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -398,7 +399,7 @@ testi18n:   testi18n.o libcups.a
 testlang:      testlang.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testlang.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -408,7 +409,7 @@ testlang:   testlang.o libcups.a
 testppd:       testppd.o libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testppd.o libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -422,7 +423,7 @@ apihelp:
                array.h array.c >../doc/help/api-array.html
        mxmldoc --section "Programming" --title "CUPS API" \
                --intro api-cups.shtml \
-               cups.h dest.c getputfile.c language.c \
+               cups.h dest.c getputfile.c language.c notify.c \
                options.c tempfile.c usersys.c \
                util.c >../doc/help/api-cups.html
        mxmldoc --section "Programming" --title "File and Directory APIs" \
@@ -439,7 +440,7 @@ apihelp:
                request.c >../doc/help/api-httpipp.html
        mxmldoc --section "Programming" --title "Filter and Backend APIs" \
                --intro api-filter.shtml \
-               backchannel.c >../doc/help/api-filter.html
+               backchannel.c sidechannel.c sidechannel.h >../doc/help/api-filter.html
 
 
 #
@@ -450,5 +451,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5801 2006-08-03 02:20:57Z mike $".
+# End of "$Id: Makefile 6304 2007-02-22 22:06:23Z mike $".
 #
index e697e6a1d163029111461c33c049066e968b39ff..8b96fcb6c1de0bcf61911f5222684d7c3cfef868 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: adminutil.c 6262 2007-02-11 16:59:33Z mike $"
+ * "$Id: adminutil.c 6270 2007-02-12 14:27:47Z mike $"
  *
  *   Administration utility API definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -768,6 +768,7 @@ _cupsAdminGetServerSettings(
 
     int                remote_access = 0,      /* Remote access allowed? */
                remote_admin = 0,       /* Remote administration allowed? */
+               remote_any = 0,         /* Remote access from anywhere allowed? */
                browsing = 1,           /* Browsing enabled? */
                browse_allow = 1,       /* Browse address set? */
                browse_address = 0,     /* Browse address set? */
@@ -900,6 +901,9 @@ _cupsAdminGetServerSettings(
               )
       {
        remote_admin = 1;
+
+       if (!strcasecmp(value, "all"))
+         remote_any = 1;
       }
       else if (line[0] != '<' && !in_location && !in_policy)
         cg->cupsd_num_settings = cupsAddOption(line, value,
@@ -920,6 +924,11 @@ _cupsAdminGetServerSettings(
                                           cg->cupsd_num_settings,
                                           &(cg->cupsd_settings));
 
+    cg->cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
+                                           remote_any ? "1" : "0",
+                                          cg->cupsd_num_settings,
+                                          &(cg->cupsd_settings));
+
     cg->cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_PRINTERS,
                                            (browsing && browse_allow) ?
                                               "1" : "0",
@@ -992,6 +1001,7 @@ _cupsAdminSetServerSettings(
   int          remote_printers,        /* Show remote printers */
                share_printers,         /* Share local printers */
                remote_admin,           /* Remote administration allowed? */
+               remote_any,             /* Remote access from anywhere? */
                user_cancel_any,        /* Cancel-job policy set? */
                debug_logging;          /* LogLevel debug set? */
   int          wrote_port_listen,      /* Wrote the port/listen lines? */
@@ -1060,6 +1070,12 @@ _cupsAdminSetServerSettings(
   else
     old_remote_admin = 0;
 
+  if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, cupsd_num_settings,
+                           cupsd_settings)) != NULL)
+    remote_any = atoi(val);
+  else
+    remote_any = 0;
+
   if ((val = cupsGetOption(CUPS_SERVER_REMOTE_PRINTERS, cupsd_num_settings,
                            cupsd_settings)) != NULL)
     old_remote_printers = atoi(val);
@@ -1101,12 +1117,16 @@ _cupsAdminSetServerSettings(
   else
     debug_logging = -1;
 
+  if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ANY, num_settings,
+                           settings)) != NULL)
+    remote_any = atoi(val);
+
   if ((val = cupsGetOption(CUPS_SERVER_REMOTE_ADMIN, num_settings,
                            settings)) != NULL)
   {
     remote_admin = atoi(val);
 
-    if (remote_admin == old_remote_admin)
+    if (remote_admin == old_remote_admin && remote_any < 0)
     {
      /*
       * No change to this setting...
@@ -1140,7 +1160,7 @@ _cupsAdminSetServerSettings(
   {
     share_printers = atoi(val);
 
-    if (share_printers == old_share_printers)
+    if (share_printers == old_share_printers && remote_any < 0)
     {
      /*
       * No change to this setting...
@@ -1278,7 +1298,7 @@ _cupsAdminSetServerSettings(
          cupsFilePuts(temp, "BrowseOrder allow,deny\n");
 
          if (remote_printers > 0)
-           cupsFilePuts(temp, "BrowseAllow @LOCAL\n");
+           cupsFilePuts(temp, "BrowseAllow all\n");
 
          if (share_printers > 0)
            cupsFilePuts(temp, "BrowseAddress @LOCAL\n");
@@ -1366,7 +1386,8 @@ _cupsAdminSetServerSettings(
         cupsFilePuts(temp, "  Order allow,deny\n");
 
        if (remote_admin)
-         cupsFilePuts(temp, "  Allow @LOCAL\n");
+         cupsFilePrintf(temp, "  Allow %s\n",
+                        remote_any > 0 ? "all" : "@LOCAL");
        else
          cupsFilePuts(temp, "  Allow localhost\n");
       }
@@ -1384,7 +1405,8 @@ _cupsAdminSetServerSettings(
         cupsFilePuts(temp, "  Order allow,deny\n");
 
        if (remote_admin)
-         cupsFilePuts(temp, "  Allow @LOCAL\n");
+         cupsFilePrintf(temp, "  Allow %s\n",
+                        remote_any > 0 ? "all" : "@LOCAL");
        else
          cupsFilePuts(temp, "  Allow localhost\n");
       }
@@ -1405,7 +1427,8 @@ _cupsAdminSetServerSettings(
         cupsFilePuts(temp, "  Order allow,deny\n");
 
        if (remote_admin > 0 || share_printers > 0)
-         cupsFilePuts(temp, "  Allow @LOCAL\n");
+         cupsFilePrintf(temp, "  Allow %s\n",
+                        remote_any > 0 ? "all" : "@LOCAL");
        else
          cupsFilePuts(temp, "  Allow localhost\n");
       }
@@ -1564,7 +1587,7 @@ _cupsAdminSetServerSettings(
       cupsFilePuts(temp, "BrowseOrder allow,deny\n");
 
       if (remote_printers > 0)
-       cupsFilePuts(temp, "BrowseAllow @LOCAL\n");
+       cupsFilePuts(temp, "BrowseAllow all\n");
 
       if (share_printers > 0)
        cupsFilePuts(temp, "BrowseAddress @LOCAL\n");
@@ -1626,7 +1649,7 @@ _cupsAdminSetServerSettings(
                        "  Order allow,deny\n");
 
     if (remote_admin > 0 || share_printers > 0)
-      cupsFilePuts(temp, "  Allow @LOCAL\n");
+      cupsFilePrintf(temp, "  Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
     else
       cupsFilePuts(temp, "  Allow localhost\n");
 
@@ -1644,7 +1667,7 @@ _cupsAdminSetServerSettings(
                        "  Order allow,deny\n");
 
     if (remote_admin)
-      cupsFilePuts(temp, "  Allow @LOCAL\n");
+      cupsFilePrintf(temp, "  Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
     else
       cupsFilePuts(temp, "  Allow localhost\n");
 
@@ -1665,7 +1688,7 @@ _cupsAdminSetServerSettings(
                        "  Order allow,deny\n");
 
     if (remote_admin)
-      cupsFilePuts(temp, "  Allow @LOCAL\n");
+      cupsFilePrintf(temp, "  Allow %s\n", remote_any > 0 ? "all" : "@LOCAL");
     else
       cupsFilePuts(temp, "  Allow localhost\n");
 
@@ -1769,6 +1792,10 @@ _cupsAdminSetServerSettings(
                                         old_remote_admin ? "1" : "0",
                                         cupsd_num_settings, &cupsd_settings);
 
+    cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_ANY,
+                                       remote_any ? "1" : "0",
+                                      cupsd_num_settings, &cupsd_settings);
+
     if (remote_printers >= 0)
       cupsd_num_settings = cupsAddOption(CUPS_SERVER_REMOTE_PRINTERS,
                                         remote_printers ? "1" : "0",
@@ -2128,5 +2155,5 @@ write_option(cups_file_t     *dstfp,      /* I - PPD file */
 
 
 /*
- * End of "$Id: adminutil.c 6262 2007-02-11 16:59:33Z mike $".
+ * End of "$Id: adminutil.c 6270 2007-02-12 14:27:47Z mike $".
  */
index 8b66d1b8d39bdec5fb3a2de32261fc98749adf76..2a0392d00c2621e3fcdb4116c790fd2bf073e22b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: adminutil.h 5235 2006-03-06 13:02:23Z mike $"
+ * "$Id: adminutil.h 6268 2007-02-12 02:46:11Z mike $"
  *
  *   Administration utility API definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -7,7 +7,7 @@
  *   MANY OF THE FUNCTIONS IN THIS HEADER ARE PRIVATE AND SUBJECT TO
  *   CHANGE AT ANY TIME.  USE AT YOUR OWN RISK.
  *
- *   Copyright 2001-2006 by Easy Software Products.
+ *   Copyright 2001-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -53,6 +53,7 @@ extern "C" {
 
 #  define CUPS_SERVER_DEBUG_LOGGING    "_debug_logging"
 #  define CUPS_SERVER_REMOTE_ADMIN     "_remote_admin"
+#  define CUPS_SERVER_REMOTE_ANY       "_remote_any"
 #  define CUPS_SERVER_REMOTE_PRINTERS  "_remote_printers"
 #  define CUPS_SERVER_SHARE_PRINTERS   "_share_printers"
 #  define CUPS_SERVER_USER_CANCEL_ANY  "_user_cancel_any"
@@ -85,5 +86,5 @@ extern int    _cupsAdminSetServerSettings(http_t *http,
 #endif /* !_CUPS_ADMINUTIL_H_ */
 
 /*
- * End of "$Id: adminutil.h 5235 2006-03-06 13:02:23Z mike $".
+ * End of "$Id: adminutil.h 6268 2007-02-12 02:46:11Z mike $".
  */
index 66f5e0a099a69dbc8ee2224d21ae828a27edf9c6..66b65267e329c770474a146b94e1d7ebbcf7f34e 100644 (file)
@@ -1,5 +1,5 @@
 <!--
-  "$Id: api-filter.shtml 5138 2006-02-21 10:49:06Z mike $"
+  "$Id: api-filter.shtml 6170 2007-01-02 17:26:41Z mike $"
 
   Filter and backend API introduction for the Common UNIX Printing System (CUPS).
 
@@ -35,6 +35,9 @@ used when writing backends, filters, and port monitors.</p>
 use the <tt>CUPS_BACKEND_</tt> constants and
 <tt>cupsBackChannel</tt> functions, respectively.</p>
 
+<p>The <var>&lt;cups/sidechannel.h&gt;</var> header file must be
+included to use the <tt>CUPS_SC_</tt> constants and <tt>cupsSideChannel</tt> functions.</p>
+
 <p>Programs using these functions must be linked to the CUPS
 library: <var>libcups.a</var>, <var>libcups.so.2</var>,
 <var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or
@@ -46,6 +49,174 @@ library:</p>
 <kbd>gcc -o myprogram myprogram.c -lcups</kbd>
 </pre>
 
+
 <h2 class='title'>Compatibility</h2>
 
-<p>All of these functions require CUPS 1.2 or higher.</p>
+<p>The <tt>cupsBackChannel</tt> functions require CUPS 1.2 or higher. The <tt>cupsSideChannel</tt> functions require CUPS 1.3 or higher.</p>
+
+
+<h2 class='title'>Using the cupsBackChannel APIs</h2>
+
+<p>The <tt>cupsBackChannel</tt> APIs allow your filters, drivers, and port monitors to read data back from a printer and your backends to send data from a printer to the filters, drivers, and port monitors associated with the current job. Back-channel data is normally sent by the printer in response to a command sent from your program to the printer via <tt>stdout</tt>.</p>
+
+<p>The <tt>cupsBackChannelRead()</tt> function reads data from the printer via the backend. You provide a timeout in seconds along with a buffer pointer and the size of that buffer. It returns the number of bytes or -1 if there was an error. The following code example shows how to poll for back-channel data in your program:</p>
+
+<pre class='command'>
+#include &lt;cups/cups.h&gt;
+
+char buffer[8192];
+ssize_t bytes;
+
+/* Use a timeout of 0.0 seconds to poll for back-channel data */
+bytes = cupsBackChannelRead(buffer, sizeof(buffer), 0.0);
+</pre>
+
+<p>If you are writing a backend, the <tt>cupsBackChannelWrite()</tt> function sends any back-channel data you have received from the printer to upstream filters in the print filter chain. We recommend using a timeout of 1.0 seconds:</p>
+
+<pre class='command'>
+#include &lt;cups/cups.h&gt;
+
+char buffer[8192];
+ssize_t bytes;
+
+/* Use a timeout of 1.0 seconds to give filters a chance to read */
+cupsBackChannelWrite(buffer, bytes, 1.0);
+</pre>
+
+
+<h2 class='title'>Using the cupsSideChannel APIs</h2>
+
+<p>The <tt>cupsSideChannel</tt> APIs allow your filters, drivers, port monitors, and backend to send and receive the following out-of-band commands:</p>
+
+<ul>
+
+       <li><tt>CUPS_SC_CMD_SOFT_RESET</tt> -  Do a soft reset</li>
+       <li><tt>CUPS_SC_CMD_DRAIN_OUTPUT</tt> -  Drain all pending output</li>
+       <li><tt>CUPS_SC_CMD_GET_BIDI</tt> -  Return bidirectional capabilities</li>
+       <li><tt>CUPS_SC_CMD_GET_DEVICE_ID</tt> -  Return the IEEE-1284 device ID</li>
+       <li><tt>CUPS_SC_CMD_GET_STATE</tt> - Return the device state</li>
+
+</ul>
+
+
+<h3>Sending Commands from a Filter, Driver, or Port Monitor</h3>
+
+<p>The <tt>cupsSideChannelDoRequest()</tt> function is used by filters, drivers, and port monitors to send a command to the backend and read back a response:</p>
+
+<pre class='command'>
+cups_sc_status_t cupsSideChannelDoRequest(cups_sc_command_t command,
+                                          char *data, int *datalen,
+                                          double timeout);
+</pre>
+
+<p>The <tt>CUPS_SC_CMD_SOFT_RESET</tt> and <tt>CUPS_SC_CMD_DRAIN_OUTPUT</tt> commands do not return any data values, while the others return one or more bytes. The <tt>timeout</tt> parameter allows your program to poll or wait for the command to complete - use a timeout of 30 seconds for <tt>CUPS_SC_CMD_SOFT_RESET</tt> and <tt>CUPS_SC_CMD_DRAIN_OUTPUT</tt> and a timeout of 1 second for all other commands.</p>
+
+<p><tt>CUPS_SC_CMD_GET_BIDI</tt> returns a single <tt>char</tt> value that tells you whether the backend supports bidirectional communications:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+char data;
+int datalen;
+cups_sc_bidi_t bidi;
+cups_sc_status_t status;
+
+/* Tell cupsSideChannelDoRequest() how big our buffer is... */
+datalen = 1;
+
+/* Get the bidirectional capabilities, waiting for up to 1 second */
+status  = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_BIDI, &amp;data, &amp;datalen, 1.0);
+
+/* Use the returned value if OK was returned and the length is still 1 */
+if (status == CUPS_SC_STATUS_OK && datalen == 1)
+  bidi = (cups_sc_bidi_t)data;
+else
+  bidi = CUPS_SC_BIDI_NOT_SUPPORTED;
+</pre>
+
+<p><tt>CUPS_SC_CMD_GET_DEVICE_ID</tt> returns a string of characters containing the IEEE-1284 device ID for the connected printer:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+char data[2049];
+int datalen;
+cups_sc_status_t status;
+
+/* Tell cupsSideChannelDoRequest() how big our buffer is, less 1 byte for nul-termination... */
+datalen = sizeof(data) - 1;
+
+/* Get the IEEE-1284 device ID, waiting for up to 1 second */
+status  = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_DEVICE_ID, data, &amp;datalen, 1.0);
+
+/* Use the returned value if OK was returned and the length is non-zero */
+if (status == CUPS_SC_STATUS_OK && datalen > 0)
+  data[datalen] = '\0';
+else
+  data[0] = '\0';
+</pre>
+
+<p><tt>CUPS_SC_CMD_GET_STATE</tt> returns a single <tt>char</tt> value that tells you the current device state:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+char data;
+int datalen;
+cups_sc_state_t state;
+cups_sc_status_t status;
+
+/* Tell cupsSideChannelDoRequest() how big our buffer is... */
+datalen = 1;
+
+/* Get the bidirectional capabilities, waiting for up to 1 second */
+status  = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_STATE, &amp;data, &amp;datalen, 1.0);
+
+/* Use the returned value if OK was returned and the length is still 1 */
+if (status == CUPS_SC_STATUS_OK && datalen == 1)
+  state = (cups_sc_state_t)data;
+else
+  state = CUPS_SC_STATE_OFFLINE;
+</pre>
+
+
+<h3>Handling Commands in your Backend</h3>
+
+<p>The <tt>cupsSideChannelRead()</tt> function is used by backends to read a command from a filter, driver, or port monitor:</p>
+
+<pre class='command'>
+int cupsSideChannelRead(cups_sc_command_t &amp;command,
+                        cups_sc_status_t  &amp;status,
+                        char *data, int *datalen, double timeout);
+</pre>
+
+<p>Backends can either poll for commands using a <tt>timeout</tt> of 0.0, wait indefinitely for commands using a <tt>timeout</tt> of -1.0 (probably in a separate thread for that purpose), or use <tt>select()</tt> or <tt>poll()</tt> on the <tt>CUPS_SC_FD</tt> file descriptor (4) to handle input and output on several file descriptors at the same time. Backends can pass <tt>NULL</tt> for the <tt>data</tt> and <tt>datalen</tt> parameters, since none of the commands sent by upstream filters contain any data at this time.</p>
+
+<p>Once a command is processed, the backend uses the <tt>cupsSideChannelWrite()</tt> function to send its response:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+cups_sc_command_t command;
+cups_sc_status_t status;
+
+/* Poll for a command... */
+if (!cupsSideChannelRead(&amp;command, &amp;status, NULL, NULL, 0.0))
+{
+  char data[2048];
+  int datalen;
+
+  switch (command)
+  {
+    ... handle supported commands, file data/datalen/status with values as needed ...
+
+    default :
+        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+       datalen = 0;
+       break;
+  }
+
+  /* Send a response... */
+  cupsSideChannelWrite(command, status, data, datalen, 1.0);
+}
+</pre>
index b051680312ae456eb8efa1fe06f9fec96216089b..b792c465c5c9d8a14cd66a4885d3537197756e60 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: array.c 5493 2006-05-05 16:33:57Z mike $"
+ * "$Id: array.c 6123 2006-11-21 15:36:04Z mike $"
  *
  *   Sorted array routines for the Common UNIX Printing System (CUPS).
  *
  *
  * Contents:
  *
- *   cupsArrayAdd()      - Add an element to the array.
- *   cupsArrayClear()    - Clear the array.
- *   cupsArrayCount()    - Get the number of elements in the array.
- *   cupsArrayCurrent()  - Return the current element in the array.
- *   cupsArrayDelete()   - Free all memory used by the array.
- *   cupsArrayDup()      - Duplicate the array.
- *   cupsArrayFind()     - Find an element in the array.
- *   cupsArrayFirst()    - Get the first element in the array.
- *   cupsArrayIndex()    - Get the N-th element in the array.
- *   cupsArrayInsert()   - Insert an element in the array.
- *   cupsArrayLast()     - Get the last element in the array.
- *   cupsArrayNew()      - Create a new array.
- *   cupsArrayNext()     - Get the next element in the array.
- *   cupsArrayPrev()     - Get the previous element in the array.
- *   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.
- *   cupsArrayUserData() - Return the user data for an array.
- *   cups_array_add()    - Insert or append an element to the array...
- *   cups_array_find()   - Find an element in the array...
+ *   cupsArrayAdd()       - Add an element to the array.
+ *   cupsArrayClear()     - Clear the array.
+ *   cupsArrayCount()     - Get the number of elements in the array.
+ *   cupsArrayCurrent()   - Return the current element in the array.
+ *   cupsArrayDelete()    - Free all memory used by the array.
+ *   cupsArrayDup()       - Duplicate the array.
+ *   cupsArrayFind()      - Find an element in the array.
+ *   cupsArrayFirst()     - Get the first element in the array.
+ *   cupsArrayGetIndex()  - Get the index of the current element.
+ *   cupsArrayGetInsert() - Get the index of the last inserted element.
+ *   cupsArrayIndex()     - Get the N-th element in the array.
+ *   cupsArrayInsert()    - Insert an element in the array.
+ *   cupsArrayLast()      - Get the last element in the array.
+ *   cupsArrayNew()       - Create a new array.
+ *   cupsArrayNext()      - Get the next element in the array.
+ *   cupsArrayPrev()      - Get the previous element in the array.
+ *   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.
+ *   cupsArrayUserData()  - Return the user data for an array.
+ *   cups_array_add()     - Insert or append an element to the array...
+ *   cups_array_find()    - Find an element in the array...
  */
 
 /*
@@ -385,6 +387,38 @@ cupsArrayFirst(cups_array_t *a)            /* I - Array */
 }
 
 
+/*
+ * 'cupsArrayGetIndex()' - Get the index of the current element.
+ *
+ * @since CUPS 1.3@
+ */
+
+int                                    /* O - Index of the current element */
+cupsArrayGetIndex(cups_array_t *a)     /* I - Array */
+{
+  if (!a)
+    return (-1);
+  else
+    return (a->current);
+}
+
+
+/*
+ * 'cupsArrayGetInsert()' - Get the index of the last inserted element.
+ *
+ * @since CUPS 1.3@
+ */
+
+int                                    /* O - Index of the last inserted element */
+cupsArrayGetInsert(cups_array_t *a)    /* I - Array */
+{
+  if (!a)
+    return (-1);
+  else
+    return (a->insert);
+}
+
+
 /*
  * 'cupsArrayIndex()' - Get the N-th element in the array.
  */
@@ -582,8 +616,10 @@ cupsArrayRemove(cups_array_t *a,   /* I - Array */
   if (current <= a->current)
     a->current --;
 
-  if (current <= a->insert)
+  if (current < a->insert)
     a->insert --;
+  else if (current == a->insert)
+    a->insert = -1;
 
   for (i = 0; i < a->num_saved; i ++)
     if (current <= a->saved[i])
@@ -962,5 +998,5 @@ cups_array_find(cups_array_t *a,    /* I - Array */
 
 
 /*
- * End of "$Id: array.c 5493 2006-05-05 16:33:57Z mike $".
+ * End of "$Id: array.c 6123 2006-11-21 15:36:04Z mike $".
  */
index 137dd87a22cee09bf1a0db0f3e93f05f56551a79..6756a100a349b3aff3e5c0919941dcfff906f8b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: array.h 5258 2006-03-09 15:40:56Z mike $"
+ * "$Id: array.h 6123 2006-11-21 15:36:04Z mike $"
  *
  *   Sorted array definitions for the Common UNIX Printing System (CUPS).
  *
@@ -64,6 +64,8 @@ extern void           cupsArrayDelete(cups_array_t *a);
 extern cups_array_t    *cupsArrayDup(cups_array_t *a);
 extern void            *cupsArrayFind(cups_array_t *a, void *e);
 extern void            *cupsArrayFirst(cups_array_t *a);
+extern int             cupsArrayGetIndex(cups_array_t *a);
+extern int             cupsArrayGetInsert(cups_array_t *a);
 extern void            *cupsArrayIndex(cups_array_t *a, int n);
 extern int             cupsArrayInsert(cups_array_t *a, void *e);
 extern void            *cupsArrayLast(cups_array_t *a);
@@ -81,5 +83,5 @@ extern void           *cupsArrayUserData(cups_array_t *a);
 #endif /* !_CUPS_ARRAY_H_ */
 
 /*
- * End of "$Id: array.h 5258 2006-03-09 15:40:56Z mike $".
+ * End of "$Id: array.h 6123 2006-11-21 15:36:04Z mike $".
  */
index 56deac727e1ced02f892c7d435bcc3f384693d74..84b1041c599fce152451dad57ca3712e66b3c743 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: attr.c 5826 2006-08-15 19:04:11Z mike $"
+ * "$Id: attr.c 5825 2006-08-15 19:03:49Z mike $"
  *
  *   PPD model-specific attribute routines for the Common UNIX Printing System
  *   (CUPS).
@@ -163,5 +163,5 @@ ppdFindNextAttr(ppd_file_t *ppd,    /* I - PPD file data */
 
 
 /*
- * End of "$Id: attr.c 5826 2006-08-15 19:04:11Z mike $".
+ * End of "$Id: attr.c 5825 2006-08-15 19:03:49Z mike $".
  */
index fc87d2ba5b547b495bbd2019e2ac6a439cd01284..9b67b0ee290742e841bc866d1315a31ff2838c7d 100644 (file)
@@ -1,10 +1,13 @@
 /*
- * "$Id: auth.c 6191 2007-01-10 16:48:37Z mike $"
+ * "$Id: auth.c 6253 2007-02-10 18:48:40Z mike $"
  *
  *   Authentication functions for the Common UNIX Printing System (CUPS).
  *
  *   Copyright 1997-2007 by Easy Software Products.
  *
+ *   This file contains Kerberos support code, copyright 2006 by
+ *   Jelmer Vernooij.
+ *
  *   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
@@ -26,6 +29,8 @@
  * Contents:
  *
  *   cupsDoAuthentication() - Authenticate a request.
+ *   DEBUG_gss_printf()     - Show debug error messages from GSSAPI...
+ *   cups_get_gss_creds()   - Get CUPS service credentials for authentication.
  *   cups_local_auth()      - Get the local authorization certificate if
  *                            available/applicable...
  */
 #  include <unistd.h>
 #endif /* WIN32 || __EMX__ */
 
+#if HAVE_AUTHORIZATION_H
+#  include <Security/Authorization.h>
+#  ifdef HAVE_SECBASEPRIV_H
+#    include <Security/SecBasePriv.h>
+#  else
+extern const char *cssmErrorString(int error);
+#  endif /* HAVE_SECBASEPRIV_H */
+#endif /* HAVE_AUTHORIZATION_H */
+
 
 /*
  * Local functions...
  */
 
+#ifdef HAVE_GSSAPI
+#  ifdef DEBUG
+static void    DEBUG_gss_printf(OM_uint32 major_status, OM_uint32 minor_status,
+                                const char *message);
+#  endif /* DEBUG  */
+static gss_name_t cups_get_gss_creds(http_t *http, const char *service_name);
+#endif /* HAVE_GSSAPI */
 static int     cups_local_auth(http_t *http);
 
 
@@ -74,7 +95,8 @@ cupsDoAuthentication(http_t     *http,        /* I - HTTP connection to server */
   char         prompt[1024],           /* Prompt for user */
                realm[HTTP_MAX_VALUE],  /* realm="xyz" string */
                nonce[HTTP_MAX_VALUE],  /* nonce="xyz" string */
-               encode[512];            /* Encoded username:password */
+               encode[2048];           /* Encoded username:password */
+  int          localauth;              /* Local authentication result */
   _cups_globals_t *cg;                 /* Global data */
 
 
@@ -89,27 +111,39 @@ cupsDoAuthentication(http_t     *http,     /* I - HTTP connection to server */
   * Clear the current authentication string...
   */
 
-  http->authstring[0] = '\0';
+  http->_authstring[0] = '\0';
+
+  if (http->authstring && http->authstring != http->_authstring)
+    free(http->authstring);
+
+  http->authstring = http->_authstring;
 
  /*
   * See if we can do local authentication...
   */
 
-  if (http->digest_tries < 3 && !cups_local_auth(http))
+  if (http->digest_tries < 3)
   {
-    DEBUG_printf(("cupsDoAuthentication: authstring=\"%s\"\n", http->authstring));
-
-    if (http->status == HTTP_UNAUTHORIZED)
-      http->digest_tries ++;
-
-    return (0);
+    if ((localauth = cups_local_auth(http)) == 0)
+    {
+      DEBUG_printf(("cupsDoAuthentication: authstring=\"%s\"\n",
+                    http->authstring));
+  
+      if (http->status == HTTP_UNAUTHORIZED)
+       http->digest_tries ++;
+  
+      return (0);
+    }
+    else if (localauth == -1)
+      return (-1);                     /* Error or canceled */
   }
 
  /*
   * Nope, see if we should retry the current username:password...
   */
 
-  if (http->digest_tries > 1 || !http->userpass[0])
+  if ((http->digest_tries > 1 || !http->userpass[0]) &&
+      strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
   {
    /*
     * Nope - get a new password from the user...
@@ -145,7 +179,106 @@ cupsDoAuthentication(http_t     *http,    /* I - HTTP connection to server */
   * Got a password; encode it for the server...
   */
 
-  if (strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Digest", 6))
+  if (!strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Negotiate", 9))
+  {
+#ifdef HAVE_GSSAPI
+   /*
+    * Kerberos authentication...
+    */
+
+    OM_uint32          minor_status,   /* Minor status code */
+                       major_status;   /* Major status code */
+    gss_buffer_desc    output_token = GSS_C_EMPTY_BUFFER,
+                                       /* Output token */
+                       input_token = GSS_C_EMPTY_BUFFER;
+                                       /* Input token */
+    char               *gss_service_name;
+                                       /* GSS service name */
+    const char         *authorization;
+                                       /* Pointer into Authorization string */
+
+
+    if (http->gssname == GSS_C_NO_NAME)
+    {
+      if ((gss_service_name = getenv("CUPS_GSSSERVICENAME")) == NULL)
+       gss_service_name = CUPS_DEFAULT_GSSSERVICENAME;
+      else
+       DEBUG_puts("cupsDoAuthentication: GSS service name set via environment");
+
+      http->gssname = cups_get_gss_creds(http, gss_service_name);
+    }
+
+   /*
+    * Find the start of the Kerberos input token...
+    */
+
+    authorization = httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE);
+
+    authorization += 9;
+    while (*authorization && isspace(*authorization & 255))
+      authorization ++;
+
+    if (*authorization)
+    {
+     /*
+      * For SPNEGO, this is where we'll feed the server's authorization data
+      * back into gss via input_token...
+      */
+    }
+    else
+    {
+      if (http->gssctx != GSS_C_NO_CONTEXT)
+      {
+       major_status = gss_delete_sec_context(&minor_status, &http->gssctx,
+                                             GSS_C_NO_BUFFER);
+       http->gssctx = GSS_C_NO_CONTEXT;
+      }
+    }
+
+    major_status  = gss_init_sec_context(&minor_status, GSS_C_NO_CREDENTIAL,
+                                        &http->gssctx,
+                                        http->gssname, http->gssmech,
+                                        GSS_C_MUTUAL_FLAG, GSS_C_INDEFINITE,
+                                        GSS_C_NO_CHANNEL_BINDINGS,
+                                        &input_token, &http->gssmech,
+                                        &output_token, NULL, NULL);
+
+    if (input_token.value)
+      free(input_token.value);
+
+    if (GSS_ERROR(major_status))
+    {
+#  ifdef DEBUG
+      DEBUG_gss_printf(major_status, minor_status,
+                      "Unable to initialise security context");
+#  endif /* DEBUG */
+      return (-1);
+    }
+
+#  ifdef DEBUG
+    if (major_status == GSS_S_CONTINUE_NEEDED)
+      DEBUG_gss_printf(major_status, minor_status, "Continuation needed!");
+#  endif /* DEBUG */
+
+    if (output_token.length)
+    {
+      httpEncode64_2(encode, sizeof(encode), output_token.value,
+                    output_token.length);
+
+      http->authstring = malloc(strlen(encode) + 11);
+      sprintf(http->authstring, "Negotiate %s", encode); /* Safe because allocated */
+      major_status = gss_release_buffer(&minor_status, &output_token);
+    }
+
+   /*
+    * Copy back what we can to _authstring for backwards compatibility...
+    */
+
+    strlcpy(http->_authstring, http->authstring, sizeof(http->_authstring));
+#endif /* HAVE_GSSAPI */
+  }
+  else if (strncmp(http->fields[HTTP_FIELD_WWW_AUTHENTICATE], "Digest", 6))
   {
    /*
     * Basic authentication...
@@ -153,7 +286,7 @@ cupsDoAuthentication(http_t     *http,      /* I - HTTP connection to server */
 
     httpEncode64_2(encode, sizeof(encode), http->userpass,
                    (int)strlen(http->userpass));
-    snprintf(http->authstring, sizeof(http->authstring), "Basic %s", encode);
+    snprintf(http->_authstring, sizeof(http->_authstring), "Basic %s", encode);
   }
   else
   {
@@ -166,7 +299,7 @@ cupsDoAuthentication(http_t     *http,      /* I - HTTP connection to server */
 
     httpMD5(cupsUser(), realm, strchr(http->userpass, ':') + 1, encode);
     httpMD5Final(nonce, method, resource, encode);
-    snprintf(http->authstring, sizeof(http->authstring),
+    snprintf(http->_authstring, sizeof(http->_authstring),
             "Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", "
             "uri=\"%s\", response=\"%s\"", cupsUser(), realm, nonce,
             resource, encode);
@@ -178,12 +311,105 @@ cupsDoAuthentication(http_t     *http,   /* I - HTTP connection to server */
 }
 
 
+#ifdef HAVE_GSSAPI
+#  ifdef DEBUG
+/*
+ * 'DEBUG_gss_printf()' - Show debug error messages from GSSAPI...
+ */
+
+static void
+DEBUG_gss_printf(OM_uint32 major_status,/* I - Major status code */
+                 OM_uint32 minor_status,/* I - Minor status code */
+                const char *message)   /* I - Prefix for error message */
+{
+  OM_uint32    err_major_status,       /* Major status code for display */
+               err_minor_status;       /* Minor status code for display */
+  OM_uint32    msg_ctx;                /* Message context */
+  gss_buffer_desc major_status_string = GSS_C_EMPTY_BUFFER,
+                                       /* Major status message */
+               minor_status_string = GSS_C_EMPTY_BUFFER;
+                                       /* Minor status message */
+
+
+  msg_ctx          = 0;
+  err_major_status = gss_display_status(&err_minor_status,
+                                       major_status,
+                                       GSS_C_GSS_CODE,
+                                       GSS_C_NO_OID,
+                                       &msg_ctx,
+                                       &major_status_string);
+
+  if (!GSS_ERROR(err_major_status))
+    err_major_status = gss_display_status(&err_minor_status,
+                                         minor_status,
+                                         GSS_C_MECH_CODE,
+                                         GSS_C_NULL_OID,
+                                         &msg_ctx,
+                                         &minor_status_string);
+
+  printf("%s: %s, %s\n", message, (char *)major_status_string.value,
+        (char *)minor_status_string.value);
+
+  gss_release_buffer(&err_minor_status, &major_status_string);
+  gss_release_buffer(&err_minor_status, &minor_status_string);
+}
+#  endif /* DEBUG */
+
+
+/*
+ * 'cups_get_gss_creds()' - Get CUPS service credentials for authentication.
+ */
+
+static gss_name_t                      /* O - Server name */
+cups_get_gss_creds(
+    http_t     *http,                  /* I - Connection to server */
+    const char *service_name)          /* I - Service name */
+{
+  gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
+                                       /* Service token */
+  OM_uint32    major_status,           /* Major status code */
+               minor_status;           /* Minor status code */
+  gss_name_t   server_name;            /* Server name */
+  char         buf[1024],              /* Name buffer */
+               fqdn[HTTP_MAX_URI];     /* Server name buffer */
+
+
+ /*
+  * Get a server name we can use for authentication purposes...
+  */
+
+  snprintf(buf, sizeof(buf), "%s@%s", service_name,
+          httpGetHostname(http, fqdn, sizeof(fqdn)));
+
+  token.value  = buf;
+  token.length = strlen(buf);
+  server_name  = GSS_C_NO_NAME;
+  major_status = gss_import_name(&minor_status, &token,
+                                GSS_C_NT_HOSTBASED_SERVICE,
+                                &server_name);
+
+  if (GSS_ERROR(major_status))
+  {
+#  ifdef DEBUG
+    DEBUG_gss_printf(major_status, minor_status, "gss_import_name() failed");
+#  endif /* DEBUG */
+
+    return (NULL);
+  }
+
+  return (server_name);
+}
+#endif /* HAVE_GSSAPI */
+
+
 /*
  * 'cups_local_auth()' - Get the local authorization certificate if
  *                       available/applicable...
  */
 
-static int                             /* O - 0 if available, -1 if not */
+static int                             /* O - 0 if available */
+                                       /*     1 if not  available */
+                                       /*    -1 error */
 cups_local_auth(http_t *http)          /* I - HTTP connection to server */
 {
 #if defined(WIN32) || defined(__EMX__)
@@ -193,11 +419,20 @@ cups_local_auth(http_t *http)             /* I - HTTP connection to server */
 
   return (-1);
 #else
-  int          pid;                    /* Current process ID */
-  FILE         *fp;                    /* Certificate file */
-  char         filename[1024],         /* Certificate filename */
-               certificate[33];        /* Certificate string */
+  int                  pid;            /* Current process ID */
+  FILE                 *fp;            /* Certificate file */
+  char                 filename[1024], /* Certificate filename */
+                       certificate[33];/* Certificate string */
   _cups_globals_t *cg = _cupsGlobals();        /* Global data */
+#if defined(HAVE_AUTHORIZATION_H)
+  OSStatus             status;         /* Status */
+  AuthorizationItem    auth_right;     /* Authorization right */
+  AuthorizationRights  auth_rights;    /* Authorization rights */
+  AuthorizationFlags   auth_flags;     /* Authorization flags */
+  AuthorizationExternalForm auth_extrn;        /* Authorization ref external */
+  char                 auth_key[1024]; /* Buffer */
+  char                 buffer[1024];   /* Buffer */
+#endif /* HAVE_AUTHORIZATION_H */
 
 
   DEBUG_printf(("cups_local_auth(http=%p) hostaddr=%s, hostname=\"%s\"\n",
@@ -214,6 +449,79 @@ cups_local_auth(http_t *http)              /* I - HTTP connection to server */
     return (-1);
   }
 
+#if defined(HAVE_AUTHORIZATION_H)
+ /*
+  * Delete any previous authorization reference...
+  */
+  
+  if (cg->auth_ref)
+  {
+    AuthorizationFree(cg->auth_ref, kAuthorizationFlagDefaults);
+    cg->auth_ref = NULL;
+  }
+
+  if (httpGetSubField2(http, HTTP_FIELD_WWW_AUTHENTICATE, "authkey", 
+                      auth_key, sizeof(auth_key)))
+  {
+    status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, 
+                                kAuthorizationFlagDefaults, &cg->auth_ref);
+    if (status != errAuthorizationSuccess)
+    {
+      DEBUG_printf(("cups_local_auth: AuthorizationCreate() returned %d (%s)\n",
+                   (int)status, cssmErrorString(status)));
+      return (-1);
+    }
+
+    auth_right.name        = auth_key;
+    auth_right.valueLength = 0;
+    auth_right.value       = NULL;
+    auth_right.flags       = 0;
+
+    auth_rights.count = 1;
+    auth_rights.items = &auth_right;
+
+    auth_flags = kAuthorizationFlagDefaults | 
+                kAuthorizationFlagPreAuthorize |
+                kAuthorizationFlagInteractionAllowed | 
+                kAuthorizationFlagExtendRights;
+
+    status = AuthorizationCopyRights(cg->auth_ref, &auth_rights, 
+                                    kAuthorizationEmptyEnvironment, 
+                                    auth_flags, NULL);
+    if (status == errAuthorizationSuccess)
+      status = AuthorizationMakeExternalForm(cg->auth_ref, &auth_extrn);
+
+    if (status == errAuthorizationSuccess)
+    {
+     /*
+      * Set the authorization string and return...
+      */
+
+      httpEncode64_2(buffer, sizeof(buffer), (void *)&auth_extrn, 
+                    sizeof(auth_extrn));
+
+      http->authstring = malloc(strlen(buffer) + 9);
+      sprintf(http->authstring, "AuthRef %s", buffer);
+
+      /* Copy back to _authstring for backwards compatibility */
+      strlcpy(http->_authstring, http->authstring, sizeof(http->_authstring));
+
+      DEBUG_printf(("cups_local_auth: Returning authstring = \"%s\"\n",
+                   http->authstring));
+      return (0);
+    }
+    else if (status == errAuthorizationCanceled)
+      return (-1);
+
+    DEBUG_printf(("cups_local_auth: AuthorizationCopyRights() returned %d (%s)\n",
+                 (int)status, cssmErrorString(status)));
+
+  /*
+   * Fall through to try certificates...
+   */
+  }
+#endif /* HAVE_AUTHORIZATION_H */
+
  /*
   * Try opening a certificate file for this PID.  If that fails,
   * try the root certificate...
@@ -230,34 +538,36 @@ cups_local_auth(http_t *http)             /* I - HTTP connection to server */
     fp = fopen(filename, "r");
   }
 
-  if (fp == NULL)
+  if (fp)
   {
-    DEBUG_printf(("cups_local_auth: Unable to open file %s: %s\n",
-                  filename, strerror(errno)));
-    return (-1);
-  }
+   /*
+    * Read the certificate from the file...
+    */
 
- /*
-  * Read the certificate from the file...
-  */
+    fgets(certificate, sizeof(certificate), fp);
+    fclose(fp);
 
-  fgets(certificate, sizeof(certificate), fp);
-  fclose(fp);
+   /*
+    * Set the authorization string and return...
+    */
 
- /*
-  * Set the authorization string and return...
-  */
+    http->authstring = malloc(strlen(certificate) + 10);
+    sprintf(http->authstring, "Local %s", certificate);
 
-  snprintf(http->authstring, sizeof(http->authstring), "Local %s", certificate);
+    /* Copy back to _authstring for backwards compatibility */
+    strlcpy(http->_authstring, http->authstring, sizeof(http->_authstring));
 
-  DEBUG_printf(("cups_local_auth: Returning authstring = \"%s\"\n",
-                http->authstring));
+    DEBUG_printf(("cups_local_auth: Returning authstring = \"%s\"\n",
+                 http->authstring));
 
-  return (0);
+    return (0);
+  }
+
+  return (1);
 #endif /* WIN32 || __EMX__ */
 }
 
 
 /*
- * End of "$Id: auth.c 6191 2007-01-10 16:48:37Z mike $".
+ * End of "$Id: auth.c 6253 2007-02-10 18:48:40Z mike $".
  */
index 2164ed7503ba431b51e83f32a3e60cac573d7d6f..cfb22aa5cbb1c8126bfca4137ad34c39d75a9ca1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: backchannel.c 6191 2007-01-10 16:48:37Z mike $"
+ * "$Id: backchannel.c 6190 2007-01-10 16:48:27Z mike $"
  *
  *   Backchannel functions for the Common UNIX Printing System (CUPS).
  *
@@ -205,5 +205,5 @@ cups_setup(fd_set         *set,             /* I - Set for select() */
 
 
 /*
- * End of "$Id: backchannel.c 6191 2007-01-10 16:48:37Z mike $".
+ * End of "$Id: backchannel.c 6190 2007-01-10 16:48:27Z mike $".
  */
index 96fe9afba25575b83a7089e0907b35d3b6468bc7..54103fffab70694ca736d307cd181e77748779fe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups.h 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: cups.h 6187 2007-01-10 16:20:42Z mike $"
  *
  *   API definitions for the Common UNIX Printing System (CUPS).
  *
@@ -68,10 +68,10 @@ extern "C" {
  * Constants...
  */
 
-#  define CUPS_VERSION         1.0208
+#  define CUPS_VERSION         1.0300
 #  define CUPS_VERSION_MAJOR   1
-#  define CUPS_VERSION_MINOR   2
-#  define CUPS_VERSION_PATCH   8
+#  define CUPS_VERSION_MINOR   3
+#  define CUPS_VERSION_PATCH   0
 #  define CUPS_DATE_ANY                -1
 
 
@@ -243,6 +243,15 @@ extern int         cupsRemoveOption(const char *name, int num_options,
                                         cups_option_t **options);
 extern cups_file_t     *cupsTempFile2(char *filename, int len);
 
+/**** New in CUPS 1.3 ****/
+extern int             cupsRemoveDest(const char *name,
+                                      const char *instance,
+                                      int num_dests, cups_dest_t **dests);
+extern void            cupsSetDefaultDest(const char *name,
+                                          const char *instance,
+                                          int num_dests,
+                                          cups_dest_t *dests);
+
 
 #  ifdef __cplusplus
 }
@@ -251,5 +260,5 @@ extern cups_file_t  *cupsTempFile2(char *filename, int len);
 #endif /* !_CUPS_CUPS_H_ */
 
 /*
- * End of "$Id: cups.h 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: cups.h 6187 2007-01-10 16:20:42Z mike $".
  */
index f94aaaff54c32689f3c6ee210479e6ae1b226e84..240ebae8f8a44441c92d5599f452bdc2ed614489 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: dest.c 6191 2007-01-10 16:48:37Z mike $"
+ * "$Id: dest.c 6265 2007-02-11 19:42:42Z mike $"
  *
  *   User-defined destination (and option) support for the Common UNIX
  *   Printing System (CUPS).
  *
  * Contents:
  *
- *   cupsAddDest()     - Add a destination to the list of destinations.
- *   cupsFreeDests()   - Free the memory used by the list of destinations.
- *   cupsGetDest()     - Get the named destination from the list.
- *   cupsGetDests()    - Get the list of destinations from the default server.
- *   cupsGetDests2()   - Get the list of destinations from the specified server.
- *   cupsSetDests()    - Set the list of destinations for the default server.
- *   cupsSetDests2()   - Set the list of destinations for the specified server.
- *   cups_get_dests()  - Get destinations from a file.
- *   cups_get_sdests() - Get destinations from a server.
+ *   cupsAddDest()            - Add a destination to the list of destinations.
+ *   cupsFreeDests()          - Free the memory used by the list of
+ *                              destinations.
+ *   cupsGetDest()            - Get the named destination from the list.
+ *   cupsGetDests()           - Get the list of destinations from the default
+ *                              server.
+ *   cupsGetDests2()          - Get the list of destinations from the
+ *                              specified server.
+ *   cupsRemoveDest()         - Remove a destination from the destination list.
+ *   cupsDestSetDefaultDest() - Set the default destination.
+ *   cupsSetDests()           - Set the list of destinations for the default
+ *                              server.
+ *   cupsSetDests2()          - Set the list of destinations for the specified
+ *                              server.
+ *   cups_get_dests()         - Get destinations from a file.
+ *   cups_get_sdests()        - Get destinations from a server.
  */
 
 /*
@@ -453,6 +460,92 @@ cupsGetDests2(http_t      *http,   /* I - HTTP connection */
 }
 
 
+/*
+ * 'cupsRemoveDest()' - Remove a destination from the destination list.
+ *
+ * Removing a destination/instance does not delete the class or printer
+ * queue, merely the lpoptions for that destination/instance.  Use the
+ * cupsSetDests() or cupsSetDests2() functions to save the new options
+ * for the user.
+ *
+ * @since CUPS 1.3@
+ */
+
+int                                    /* O  - New number of destinations */
+cupsRemoveDest(const char  *name,      /* I  - Destination name */
+               const char  *instance,  /* I  - Instance name or NULL */
+              int         num_dests,   /* I  - Number of destinations */
+              cups_dest_t **dests)     /* IO - Destinations */
+{
+  int          i;                      /* Index into destinations */
+  cups_dest_t  *dest;                  /* Pointer to destination */
+
+
+ /*
+  * Find the destination...
+  */
+
+  if ((dest = cupsGetDest(name, instance, num_dests, *dests)) == NULL)
+    return (num_dests);
+
+ /*
+  * Free memory...
+  */
+
+  cupsFreeOptions(dest->num_options, dest->options);
+
+ /*
+  * Remove the destination from the array...
+  */
+
+  num_dests --;
+
+  i = dest - *dests;
+
+  if (i < num_dests)
+    memmove(dest, dest + 1, (num_dests - i) * sizeof(cups_dest_t));
+
+  return (num_dests);
+}
+
+
+/*
+ * 'cupsDestSetDefaultDest()' - Set the default destination.
+ *
+ * @since CUPS 1.3@
+ */
+
+void
+cupsSetDefaultDest(
+    const char  *name,                 /* I - Destination name */
+    const char  *instance,             /* I - Instance name or NULL */
+    int         num_dests,             /* I - Number of destinations */
+    cups_dest_t *dests)                        /* I - Destinations */
+{
+  int          i;                      /* Looping var */
+  cups_dest_t  *dest;                  /* Current destination */
+
+
+ /*
+  * Range check input...
+  */
+
+  if (!name || num_dests <= 0 || !dests)
+    return;
+
+ /*
+  * Loop through the array and set the "is_default" flag for the matching
+  * destination...
+  */
+
+  for (i = num_dests, dest = dests; i > 0; i --, dest ++)
+    dest->is_default = !strcasecmp(name, dest->name) &&
+                       ((!instance && !dest->instance) ||
+                       (instance && dest->instance &&
+                        !strcasecmp(instance, dest->instance)));
+}
+
+
 /*
  * 'cupsSetDests()' - Save the list of destinations for the default server.
  *
@@ -879,10 +972,13 @@ cups_get_sdests(http_t      *http,        /* I - HTTP connection */
   const char   *info,                  /* printer-info attribute */
                *make_model,            /* printer-make-and-model attribute */
                *name;                  /* printer-name attribute */
-  char         job_sheets[1024],       /* job-sheets option */
-               reasons[1024],          /* printer-state-reasons attribute */
-               *rptr,                  /* Pointer into reasons string */
-               temp[255];              /* Temporary string for numbers */
+  char         job_sheets[1024],       /* job-sheets-default attribute */
+               reasons[1024];          /* printer-state-reasons attribute */
+  int          num_options;            /* Number of options */
+  cups_option_t        *options;               /* Options */
+  char         optname[1024],          /* Option name */
+               value[2048],            /* Option value */
+               *ptr;                   /* Pointer into name/value */
   static const char * const pattrs[] = /* Attributes we're interested in */
                {
                  "job-sheets-default",
@@ -894,7 +990,8 @@ cups_get_sdests(http_t      *http,  /* I - HTTP connection */
                  "printer-state",
                  "printer-state-change-time",
                  "printer-state-reasons",
-                 "printer-type"
+                 "printer-type",
+                 "printer-defaults"
                };
 
 
@@ -935,7 +1032,7 @@ cups_get_sdests(http_t      *http, /* I - HTTP connection */
         break;
 
      /*
-      * Pull the needed attributes from this job...
+      * Pull the needed attributes from this printer...
       */
 
       accepting   = 0;
@@ -943,6 +1040,8 @@ cups_get_sdests(http_t      *http, /* I - HTTP connection */
       info        = NULL;
       make_model  = NULL;
       name        = NULL;
+      num_options = 0;
+      options     = NULL;
       shared      = 1;
       state       = IPP_PRINTER_IDLE;
       type        = CUPS_PRINTER_LOCAL;
@@ -988,18 +1087,92 @@ cups_get_sdests(http_t      *http,       /* I - HTTP connection */
                 attr->value_tag == IPP_TAG_KEYWORD)
        {
          strlcpy(reasons, attr->values[0].string.text, sizeof(reasons));
-         for (i = 1, rptr = reasons + strlen(reasons);
+         for (i = 1, ptr = reasons + strlen(reasons);
               i < attr->num_values;
               i ++)
          {
-           snprintf(rptr, sizeof(reasons) - (rptr - reasons), ",%s",
+           snprintf(ptr, sizeof(reasons) - (ptr - reasons), ",%s",
                     attr->values[i].string.text);
-           rptr += strlen(rptr);
+           ptr += strlen(ptr);
          }
        }
        else if (!strcmp(attr->name, "printer-type") &&
                 attr->value_tag == IPP_TAG_ENUM)
           type = attr->values[0].integer;
+        else if (strncmp(attr->name, "notify-", 7) &&
+                (attr->value_tag == IPP_TAG_BOOLEAN ||
+                 attr->value_tag == IPP_TAG_ENUM ||
+                 attr->value_tag == IPP_TAG_INTEGER ||
+                 attr->value_tag == IPP_TAG_KEYWORD ||
+                 attr->value_tag == IPP_TAG_NAME ||
+                 attr->value_tag == IPP_TAG_RANGE) &&
+                strstr(attr->name, "-default"))
+       {
+         char  *valptr;                /* Pointer into attribute value */
+
+
+        /*
+         * Add a default option...
+         */
+
+          strlcpy(optname, attr->name, sizeof(optname));
+         if ((ptr = strstr(optname, "-default")) != NULL)
+           *ptr = '\0';
+
+          value[0] = '\0';
+         for (i = 0, ptr = value; i < attr->num_values; i ++)
+         {
+           if (ptr >= (value + sizeof(value) - 1))
+             break;
+
+            if (i)
+             *ptr++ = ',';
+
+            switch (attr->value_tag)
+           {
+             case IPP_TAG_INTEGER :
+             case IPP_TAG_ENUM :
+                 snprintf(ptr, sizeof(value) - (ptr - value), "%d",
+                          attr->values[i].integer);
+                 break;
+
+             case IPP_TAG_BOOLEAN :
+                 if (attr->values[i].boolean)
+                   strlcpy(ptr, "true", sizeof(value) - (ptr - value));
+                 else
+                   strlcpy(ptr, "false", sizeof(value) - (ptr - value));
+                 break;
+
+             case IPP_TAG_RANGE :
+                 if (attr->values[i].range.lower ==
+                         attr->values[i].range.upper)
+                   snprintf(ptr, sizeof(value) - (ptr - value), "%d",
+                            attr->values[i].range.lower);
+                 else
+                   snprintf(ptr, sizeof(value) - (ptr - value), "%d-%d",
+                            attr->values[i].range.lower,
+                            attr->values[i].range.upper);
+                 break;
+
+             default :
+                 for (valptr = attr->values[i].string.text;
+                      *valptr && ptr < (value + sizeof(value) - 2);)
+                 {
+                   if (strchr(" \t\n\\\'\"", *valptr))
+                     *ptr++ = '\\';
+
+                   *ptr++ = *valptr++;
+                 }
+
+                 *ptr = '\0';
+                 break;
+           }
+
+           ptr += strlen(ptr);
+          }
+
+         num_options = cupsAddOption(optname, value, num_options, &options);
+       }
 
         attr = attr->next;
       }
@@ -1010,6 +1183,8 @@ cups_get_sdests(http_t      *http,        /* I - HTTP connection */
 
       if (!name)
       {
+        cupsFreeOptions(num_options, options);
+
         if (attr == NULL)
          break;
        else
@@ -1020,6 +1195,12 @@ cups_get_sdests(http_t      *http,       /* I - HTTP connection */
 
       if ((dest = cupsGetDest(name, NULL, num_dests, *dests)) != NULL)
       {
+        dest->num_options = num_options;
+       dest->options     = options;
+
+        num_options = 0;
+       options     = NULL;
+
         if (job_sheets[0])
           dest->num_options = cupsAddOption("job-sheets", job_sheets,
                                            dest->num_options,
@@ -1030,13 +1211,13 @@ cups_get_sdests(http_t      *http,      /* I - HTTP connection */
                                            dest->num_options,
                                            &(dest->options));
 
-        sprintf(temp, "%d", accepting);
-       dest->num_options = cupsAddOption("printer-is-accepting-jobs", temp,
+        sprintf(value, "%d", accepting);
+       dest->num_options = cupsAddOption("printer-is-accepting-jobs", value,
                                          dest->num_options,
                                          &(dest->options));
 
-        sprintf(temp, "%d", shared);
-       dest->num_options = cupsAddOption("printer-is-shared", temp,
+        sprintf(value, "%d", shared);
+       dest->num_options = cupsAddOption("printer-is-shared", value,
                                          dest->num_options,
                                          &(dest->options));
 
@@ -1045,15 +1226,15 @@ cups_get_sdests(http_t      *http,      /* I - HTTP connection */
                                            make_model, dest->num_options,
                                            &(dest->options));
 
-        sprintf(temp, "%d", state);
-       dest->num_options = cupsAddOption("printer-state", temp,
+        sprintf(value, "%d", state);
+       dest->num_options = cupsAddOption("printer-state", value,
                                          dest->num_options,
                                          &(dest->options));
 
         if (change_time)
        {
-         sprintf(temp, "%d", change_time);
-         dest->num_options = cupsAddOption("printer-state-change-time", temp,
+         sprintf(value, "%d", change_time);
+         dest->num_options = cupsAddOption("printer-state-change-time", value,
                                            dest->num_options,
                                            &(dest->options));
         }
@@ -1063,12 +1244,14 @@ cups_get_sdests(http_t      *http,      /* I - HTTP connection */
                                            dest->num_options,
                                            &(dest->options));
 
-        sprintf(temp, "%d", type);
-       dest->num_options = cupsAddOption("printer-type", temp,
+        sprintf(value, "%d", type);
+       dest->num_options = cupsAddOption("printer-type", value,
                                          dest->num_options,
                                          &(dest->options));
       }
 
+      cupsFreeOptions(num_options, options);
+
       if (attr == NULL)
        break;
     }
@@ -1085,5 +1268,5 @@ cups_get_sdests(http_t      *http,        /* I - HTTP connection */
 
 
 /*
- * End of "$Id: dest.c 6191 2007-01-10 16:48:37Z mike $".
+ * End of "$Id: dest.c 6265 2007-02-11 19:42:42Z mike $".
  */
index 08ad831787f0338e11e2c2a39ea2faa3fb2b9119..8eea05dfd0db7332141e25cbf7d89aba1da1d565 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: emit.c 6191 2007-01-10 16:48:37Z mike $"
+ * "$Id: emit.c 6190 2007-01-10 16:48:27Z mike $"
  *
  *   PPD code emission routines for the Common UNIX Printing System (CUPS).
  *
@@ -355,6 +355,15 @@ ppdEmitJCL(ppd_file_t *ppd,                /* I - PPD file record */
     * of the PJL commands to initialize PJL processing.
     */
 
+    ppd_attr_t *charset;               /* PJL charset */
+
+
+    if ((charset = ppdFindAttr(ppd, "cupsPJLCharset", NULL)) != NULL)
+    {
+      if (!charset->value || strcasecmp(charset->value, "UTF-8"))
+        charset = NULL;
+    }
+
     fputs("\033%-12345X@PJL\n", fp);
     for (ptr = ppd->jcl_begin + 9; *ptr;)
       if (!strncmp(ptr, "@PJL JOB", 8))
@@ -404,7 +413,7 @@ ppdEmitJCL(ppd_file_t *ppd,         /* I - PPD file record */
     for (ptr = temp; *ptr; ptr ++)
       if (*ptr == '\"')
         *ptr = '\'';
-      else if (*ptr & 128)
+      else if (charset && (*ptr & 128))
         *ptr = '?';
 
    /*
@@ -946,5 +955,5 @@ ppd_sort(ppd_choice_t **c1, /* I - First choice */
 
 
 /*
- * End of "$Id: emit.c 6191 2007-01-10 16:48:37Z mike $".
+ * End of "$Id: emit.c 6190 2007-01-10 16:48:27Z mike $".
  */
index b691e8656b84aac046ae34ed8035683b22a4124d..530800d5ef8537b3f59af536e3eeea4f61dc1ad2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: encode.c 6266 2007-02-11 21:20:48Z mike $"
+ * "$Id: encode.c 6267 2007-02-11 23:24:22Z mike $"
  *
  *   Option encoding routines for the Common UNIX Printing System (CUPS).
  *
@@ -61,6 +61,7 @@ static const _ipp_option_t ipp_options[] =
   { "copies",                  IPP_TAG_INTEGER,        IPP_TAG_JOB },
   { "copies-default",          IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
   { "document-format",         IPP_TAG_MIMETYPE,       IPP_TAG_OPERATION },
+  { "document-format-default", IPP_TAG_MIMETYPE,       IPP_TAG_PRINTER },
   { "finishings",              IPP_TAG_ENUM,           IPP_TAG_JOB },
   { "finishings-default",      IPP_TAG_ENUM,           IPP_TAG_PRINTER },
   { "fitplot",                 IPP_TAG_BOOLEAN,        IPP_TAG_JOB },
@@ -82,7 +83,9 @@ static const _ipp_option_t ipp_options[] =
   { "natural-scaling-default", IPP_TAG_INTEGER,        IPP_TAG_PRINTER },
   { "notify-charset",          IPP_TAG_CHARSET,        IPP_TAG_SUBSCRIPTION },
   { "notify-events",           IPP_TAG_KEYWORD,        IPP_TAG_SUBSCRIPTION },
+  { "notify-events-default",   IPP_TAG_KEYWORD,        IPP_TAG_PRINTER },
   { "notify-lease-duration",   IPP_TAG_INTEGER,        IPP_TAG_SUBSCRIPTION },
+  { "notify-lease-duration-default", IPP_TAG_INTEGER,  IPP_TAG_PRINTER },
   { "notify-natural-language", IPP_TAG_LANGUAGE,       IPP_TAG_SUBSCRIPTION },
   { "notify-pull-method",      IPP_TAG_KEYWORD,        IPP_TAG_SUBSCRIPTION },
   { "notify-recipient",                IPP_TAG_URI,            IPP_TAG_SUBSCRIPTION },
@@ -567,5 +570,5 @@ compare_ipp_options(_ipp_option_t *a,       /* I - First option */
 
 
 /*
- * End of "$Id: encode.c 6266 2007-02-11 21:20:48Z mike $".
+ * End of "$Id: encode.c 6267 2007-02-11 23:24:22Z mike $".
  */
index b2a831157ab68dfe5eab478978b25921597a9a51..2eac3a3cd7846f016df435b0474a9a33667a8b82 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: file.c 6193 2007-01-10 19:27:04Z mike $"
+ * "$Id: file.c 6311 2007-02-27 14:43:39Z mike $"
  *
  *   File functions for the Common UNIX Printing System (CUPS).
  *
@@ -508,7 +508,7 @@ cupsFileGetConf(cups_file_t *fp,    /* I  - CUPS file */
   */
 
   *value = NULL;
-  
+
   while (cupsFileGets(fp, buf, buflen))
   {
     (*linenum) ++;
@@ -519,15 +519,24 @@ cupsFileGetConf(cups_file_t *fp,  /* I  - CUPS file */
 
     if ((ptr = strchr(buf, '#')) != NULL)
     {
-      while (ptr > buf)
+      if (ptr > buf && ptr[-1] == '\\')
       {
-       if (!isspace(ptr[-1] & 255))
-         break;
-
-        ptr --;
+        // Unquote the #...
+       _cups_strcpy(ptr - 1, ptr);
       }
+      else
+      {
+        // Strip the comment and any trailing whitespace...
+       while (ptr > buf)
+       {
+         if (!isspace(ptr[-1] & 255))
+           break;
+
+         ptr --;
+       }
 
-      *ptr = '\0';
+       *ptr = '\0';
+      }
     }
 
    /*
@@ -2126,5 +2135,5 @@ cups_write(cups_file_t *fp,               /* I - CUPS file */
 
 
 /*
- * End of "$Id: file.c 6193 2007-01-10 19:27:04Z mike $".
+ * End of "$Id: file.c 6311 2007-02-27 14:43:39Z mike $".
  */
index fd9eca7318c2a7a3f9a51905282dfb4d81123cc9..a0ffd918ecbfeabcae8ec101822a08dbdc8834df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: file.h 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: file.h 6187 2007-01-10 16:20:42Z mike $"
  *
  *   Public file definitions for the Common UNIX Printing System (CUPS).
  *
@@ -109,5 +109,5 @@ extern ssize_t              cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes);
 #endif /* !_CUPS_FILE_H_ */
 
 /*
- * End of "$Id: file.h 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: file.h 6187 2007-01-10 16:20:42Z mike $".
  */
index abfd0fac6b6dae1436cf3be9ec1fa9d011617a5b..7653cfde9481adc79b77ba9382a94ff4bbb89df6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: getifaddrs.c 5504 2006-05-10 18:57:46Z mike $"
+ * "$Id: getifaddrs.c 5503 2006-05-10 18:55:39Z mike $"
  *
  *   Network interface functions for the Common UNIX Printing System
  *   (CUPS) scheduler.
@@ -272,5 +272,5 @@ _cups_freeifaddrs(struct ifaddrs *addrs)/* I - Interface list to free */
 
 
 /*
- * End of "$Id: getifaddrs.c 5504 2006-05-10 18:57:46Z mike $".
+ * End of "$Id: getifaddrs.c 5503 2006-05-10 18:55:39Z mike $".
  */
index 9dc7f7a9cd15b898db89c84a089d62294ee1ce6f..dc8fedcc9980ea707c8ba52a403685171a5db9de 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: getputfile.c 5235 2006-03-06 13:02:23Z mike $"
+ * "$Id: getputfile.c 5633 2006-06-06 14:47:42Z mike $"
  *
  *   Get/put file functions for the Common UNIX Printing System (CUPS).
  *
@@ -35,8 +35,8 @@
  * Include necessary headers...
  */
 
+#include "http-private.h"
 #include "cups.h"
-#include "ipp.h"
 #include "language.h"
 #include "string.h"
 #include "debug.h"
@@ -488,5 +488,5 @@ cupsPutFile(http_t     *http,               /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: getputfile.c 5235 2006-03-06 13:02:23Z mike $".
+ * End of "$Id: getputfile.c 5633 2006-06-06 14:47:42Z mike $".
  */
index b7dbbf3480b1310b114303c5721d8e253059bfd2..a0f323b167a8fe7a47240782dd30f8c28974bf4f 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: globals.c 5373 2006-04-06 20:03:32Z mike $"
+ * "$Id: globals.c 6253 2007-02-10 18:48:40Z mike $"
  *
  *   Global variable access routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -180,6 +180,11 @@ globals_destructor(void *value)            /* I - Data to free */
 
   cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings);
 
+#ifdef HAVE_AUTHORIZATION_H
+  if (cg->auth_ref)
+    AuthorizationFree(cg->auth_ref, kAuthorizationFlagDefaults);
+#endif /* HAVE_AUTHORIZATION_H */
+
   free(value);
 }
 
@@ -226,5 +231,5 @@ _cupsGlobals(void)
 
 
 /*
- * End of "$Id: globals.c 5373 2006-04-06 20:03:32Z mike $".
+ * End of "$Id: globals.c 6253 2007-02-10 18:48:40Z mike $".
  */
index d3bb3ad9c2739e6f005e79c06a37c91017dc0bd9..0db1dac2ffa02b916d31d5b29a4f0aa35ccd3996 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: globals.h 6073 2006-11-02 20:01:54Z mike $"
+ * "$Id: globals.h 6253 2007-02-10 18:48:40Z mike $"
  *
  *   Global variable definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
 #    include <pthread.h>
 #  endif /* HAVE_PTHREAD_H */
 
+#  ifdef HAVE_AUTHORIZATION_H
+#    include <Security/Authorization.h>
+#  endif /* HAVE_AUTHORIZATION_H */
+
 
 /*
  * C++ magic...
@@ -126,6 +130,11 @@ typedef struct _cups_globals_s             /**** CUPS global state data ****/
                                        /* Default printer */
   char                 ppd_filename[HTTP_MAX_URI];
                                        /* PPD filename */
+
+#ifdef HAVE_AUTHORIZATION_H
+  /* auth.c */
+  AuthorizationRef     auth_ref;       /* Authorization ref */
+#endif /* HAVE_AUTHORIZATION_H */
 } _cups_globals_t;
 
 
@@ -148,5 +157,5 @@ extern void         _cupsSetError(ipp_status_t status, const char *message);
 #endif /* !_CUPS_GLOBALS_H_ */
 
 /*
- * End of "$Id: globals.h 6073 2006-11-02 20:01:54Z mike $".
+ * End of "$Id: globals.h 6253 2007-02-10 18:48:40Z mike $".
  */
index 4e369d30c320c830904c333f788b96e7d3ece1e6..07b1b6739403d575354c3cd069d0e6a0094a53c2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http-addrlist.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: http-addrlist.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   HTTP address list routines for the Common UNIX Printing System (CUPS).
  *
@@ -605,5 +605,5 @@ httpAddrGetList(const char *hostname,       /* I - Hostname, IP address, or NULL for p
 
 
 /*
- * End of "$Id: http-addrlist.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: http-addrlist.c 6187 2007-01-10 16:20:42Z mike $".
  */
index 3e405d58594a960bf25f1f9e69805a885e260aab..60dede364c9b79dfffcdda344d05d4db18192e4c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http-private.h 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: http-private.h 6187 2007-01-10 16:20:42Z mike $"
  *
  *   Private HTTP definitions for the Common UNIX Printing System (CUPS).
  *
 #    define closesocket(f) close(f)
 #  endif /* WIN32 */
 
+#  ifdef HAVE_GSSAPI
+#    ifdef HAVE_GSSAPI_GSSAPI_H
+#      include <gssapi/gssapi.h>
+#    endif /* HAVE_GSSAPI_GSSAPI_H */
+#    ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
+#      include <gssapi/gssapi_generic.h>
+#    endif /* HAVE_GSSAPI_GSSAPI_GENERIC_H */
+#    ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
+#      include <gssapi/gssapi_krb5.h>
+#    endif /* HAVE_GSSAPI_GSSAPI_KRB5_H */
+#    ifdef HAVE_GSSAPI_H
+#      include <gssapi.h>
+#    endif /* HAVE_GSSAPI_H */
+#    ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
+#      define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
+#    endif /* !HAVE_GSS_C_NT_HOSTBASED_SERVICE */
+#  endif /* HAVE_GSSAPI */
+
 #  if defined(__sgi) || (defined(__APPLE__) && !defined(_SOCKLEN_T))
 /*
  * IRIX and MacOS X 10.2.x do not define socklen_t, and in fact use an int instead of
@@ -65,6 +83,7 @@ typedef int socklen_t;
 #  endif /* __sgi || (__APPLE__ && !_SOCKLEN_T) */
 
 #  include "http.h"
+#  include "md5.h"
 #  include "ipp-private.h"
 
 #  if defined HAVE_LIBSSL
@@ -119,6 +138,64 @@ extern OSStatus    _httpWriteCDSA(SSLConnectionRef connection, const void *data,
                               size_t *dataLength);
 #  endif /* HAVE_LIBSSL */
 
+
+struct _http_s                         /**** HTTP connection structure. ****/
+{
+  int                  fd;             /* File descriptor for this socket */
+  int                  blocking;       /* To block or not to block */
+  int                  error;          /* Last error on read */
+  time_t               activity;       /* Time since last read/write */
+  http_state_t         state;          /* State of client */
+  http_status_t                status;         /* Status of last request */
+  http_version_t       version;        /* Protocol version */
+  http_keepalive_t     keep_alive;     /* Keep-alive supported? */
+  struct sockaddr_in   _hostaddr;      /* Address of connected host @deprecated@ */
+  char                 hostname[HTTP_MAX_HOST],
+                                       /* Name of connected host */
+                       fields[HTTP_FIELD_MAX][HTTP_MAX_VALUE];
+                                       /* Field values */
+  char                 *data;          /* Pointer to data buffer */
+  http_encoding_t      data_encoding;  /* Chunked or not */
+  int                  _data_remaining;/* Number of bytes left @deprecated@ */
+  int                  used;           /* Number of bytes used in buffer */
+  char                 buffer[HTTP_MAX_BUFFER];
+                                       /* Buffer for incoming data */
+  int                  auth_type;      /* Authentication in use */
+  _cups_md5_state_t    md5_state;      /* MD5 state */
+  char                 nonce[HTTP_MAX_VALUE];
+                                       /* Nonce value */
+  int                  nonce_count;    /* Nonce count */
+  void                 *tls;           /* TLS state information */
+  http_encryption_t    encryption;     /* Encryption requirements */
+  /**** New in CUPS 1.1.19 ****/
+  fd_set               *input_set;     /* select() set for httpWait() @deprecated@ */
+  http_status_t                expect;         /* Expect: header @since CUPS 1.1.19@ */
+  char                 *cookie;        /* Cookie value(s) @since CUPS 1.1.19@ */
+  /**** New in CUPS 1.1.20 ****/
+  char                 _authstring[HTTP_MAX_VALUE],
+                                       /* Current Authentication value. @deprecated@ */
+                       userpass[HTTP_MAX_VALUE];
+                                       /* Username:password string @since CUPS 1.1.20@ */
+  int                  digest_tries;   /* Number of tries for digest auth @since CUPS 1.1.20@ */
+  /**** New in CUPS 1.2 ****/
+  off_t                        data_remaining; /* Number of bytes left @since CUPS 1.2@ */
+  http_addr_t          *hostaddr;      /* Current host address and port @since CUPS 1.2@ */
+  http_addrlist_t      *addrlist;      /* List of valid addresses @since CUPS 1.2@ */
+  char                 wbuffer[HTTP_MAX_BUFFER];
+                                       /* Buffer for outgoing data */
+  int                  wused;          /* Write buffer bytes used @since CUPS 1.2@ */
+  /**** New in CUPS 1.3 ****/
+  char                 *field_authorization;
+                                       /* Authorization field @since CUPS 1.3@ */
+  char                 *authstring;    /* Current authorization field @since CUPS 1.3 */
+#  ifdef HAVE_GSSAPI
+  gss_OID              gssmech;        /* Authentication mechanism @since CUPS 1.3@ */
+  gss_ctx_id_t         gssctx;         /* Authentication context @since CUPS 1.3@ */
+  gss_name_t           gssname;        /* Authentication server name @since CUPS 1.3@ */
+#  endif /* HAVE_GSSAPI */
+};
+
+
 /*
  * Some OS's don't have hstrerror(), most notably Solaris...
  */
@@ -188,5 +265,5 @@ extern void _cups_freeifaddrs(struct ifaddrs *addrs);
 #endif /* !_CUPS_HTTP_PRIVATE_H_ */
 
 /*
- * End of "$Id: http-private.h 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: http-private.h 6187 2007-01-10 16:20:42Z mike $".
  */
index 7214d08cd7a67f3a8f24d9f47077fc9c58615e9e..7750b208eb4a889f06ef796e7de8d66bc17acb79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http-support.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: http-support.c 6304 2007-02-22 22:06:23Z mike $"
  *
  *   HTTP support routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -149,7 +149,7 @@ httpAssembleURI(
   if (!ptr)
     goto assemble_overflow;
 
-  if (!strcmp(scheme, "mailto:"))
+  if (!strcmp(scheme, "mailto"))
   {
    /*
     * mailto: only has :, no //...
@@ -1327,5 +1327,5 @@ http_copy_encode(char       *dst, /* O - Destination buffer */
 
 
 /*
- * End of "$Id: http-support.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: http-support.c 6304 2007-02-22 22:06:23Z mike $".
  */
index 7449596df71f1341d5aa9fcc55ca065852869359..7a6f6840851f8baad1c4a9ad97ecd1cdfe02b21a 100644 (file)
@@ -1,10 +1,13 @@
 /*
- * "$Id: http.c 6191 2007-01-10 16:48:37Z mike $"
+ * "$Id: http.c 6285 2007-02-16 01:10:55Z mike $"
  *
  *   HTTP routines for the Common UNIX Printing System (CUPS).
  *
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
+ *   This file contains Kerberos support code, copyright 2006 by
+ *   Jelmer Vernooij.
+ *
  *   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
 #  include <sys/time.h>
 #  include <sys/resource.h>
 #endif /* !WIN32 */
+#ifdef HAVE_POLL
+#  include <sys/poll.h>
+#endif /* HAVE_POLL */
 
 
 /*
@@ -275,6 +281,12 @@ httpClearFields(http_t *http)              /* I - HTTP connection */
     else
       httpSetField(http, HTTP_FIELD_HOST, http->hostname);
 
+    if (http->field_authorization)
+    {
+      free(http->field_authorization);
+      http->field_authorization = NULL;
+    }
+
     http->expect = (http_status_t)0;
   }
 }
@@ -287,6 +299,12 @@ httpClearFields(http_t *http)              /* I - HTTP connection */
 void
 httpClose(http_t *http)                        /* I - HTTP connection */
 {
+#ifdef HAVE_GSSAPI
+  OM_uint32    minor_status,           /* Minor status code */
+               major_status;           /* Major status code */
+#endif /* HAVE_GSSAPI */
+
+
   DEBUG_printf(("httpClose(http=%p)\n", http));
 
   if (!http)
@@ -294,9 +312,6 @@ httpClose(http_t *http)                     /* I - HTTP connection */
 
   httpAddrFreeList(http->addrlist);
 
-  if (http->input_set)
-    free(http->input_set);
-
   if (http->cookie)
     free(http->cookie);
 
@@ -311,6 +326,20 @@ httpClose(http_t *http)                    /* I - HTTP connection */
   close(http->fd);
 #endif /* WIN32 */
 
+#ifdef HAVE_GSSAPI
+  if (http->gssctx != GSS_C_NO_CONTEXT)
+    major_status = gss_delete_sec_context(&minor_status, &http->gssctx,
+                                          GSS_C_NO_BUFFER);
+
+  if (http->gssname != GSS_C_NO_NAME)
+    major_status = gss_release_name(&minor_status, &http->gssname);
+#endif /* HAVE_GSSAPI */
+
+  httpClearFields(http);
+
+  if (http->authstring && http->authstring != http->_authstring)
+    free(http->authstring);
+
   free(http);
 }
 
@@ -384,6 +413,11 @@ httpConnectEncrypt(
   http->activity = time(NULL);
   http->fd       = -1;
 
+#ifdef HAVE_GSSAPI
+  http->gssctx  = GSS_C_NO_CONTEXT;
+  http->gssname = GSS_C_NO_NAME;
+#endif /* HAVE_GSSAPI */
+
  /*
   * Set the encryption status...
   */
@@ -624,6 +658,16 @@ httpGetField(http_t       *http,   /* I - HTTP connection */
 {
   if (!http || field <= HTTP_FIELD_UNKNOWN || field >= HTTP_FIELD_MAX)
     return (NULL);
+  else if (field == HTTP_FIELD_AUTHORIZATION && 
+          http->field_authorization)
+  {
+   /*
+    * Special case for WWW-Authenticate: as its contents can be
+    * longer than HTTP_MAX_VALUE...
+    */
+
+    return (http->field_authorization);
+  }
   else
     return (http->fields[field]);
 }
@@ -1620,11 +1664,11 @@ httpReconnect(http_t *http)             /* I - HTTP connection */
 
     if (http_setup_ssl(http) != 0)
     {
-#ifdef WIN32
+#  ifdef WIN32
       closesocket(http->fd);
-#else
+#  else
       close(http->fd);
-#endif /* WIN32 */
+#  endif /* WIN32 */
 
       return (-1);
     }
@@ -1693,6 +1737,19 @@ httpSetField(http_t       *http, /* I - HTTP connection */
     return;
 
   strlcpy(http->fields[field], value, HTTP_MAX_VALUE);
+
+ /*
+  * Special case for Authorization: as its contents can be
+  * longer than HTTP_MAX_VALUE
+  */
+
+  if (field == HTTP_FIELD_AUTHORIZATION)
+  {
+    if (http->field_authorization)
+      free(http->field_authorization);
+
+    http->field_authorization = strdup(value);
+  }
 }
 
 
@@ -2481,9 +2538,10 @@ http_send(http_t       *http,    /* I - HTTP connection */
   for (i = 0; i < HTTP_FIELD_MAX; i ++)
     if (http->fields[i][0] != '\0')
     {
-      DEBUG_printf(("%s: %s\n", http_fields[i], http->fields[i]));
+      DEBUG_printf(("%s: %s\n", http_fields[i], httpGetField(http, i)));
 
-      if (httpPrintf(http, "%s: %s\r\n", http_fields[i], http->fields[i]) < 1)
+      if (httpPrintf(http, "%s: %s\r\n", http_fields[i], 
+                    httpGetField(http, i)) < 1)
       {
        http->status = HTTP_ERROR;
        return (-1);
@@ -2515,6 +2573,20 @@ http_send(http_t       *http,    /* I - HTTP connection */
   httpGetLength2(http);
   httpClearFields(http);
 
+ /*
+  * The Kerberos authentication string can only be used once...
+  */
+
+  if (http->authstring && !strncmp(http->authstring, "Negotiate", 9))
+  {
+    http->_authstring[0] = '\0';
+
+    if (http->authstring != http->_authstring)
+      free(http->authstring);
+  
+    http->authstring = http->_authstring;
+  }
+
   return (0);
 }
 
@@ -2757,6 +2829,8 @@ http_upgrade(http_t *http)                /* I - HTTP connection */
   * encryption on the link...
   */
 
+  http->field_authorization = NULL;    /* Don't free the auth string */
+
   httpClearFields(http);
   httpSetField(http, HTTP_FIELD_CONNECTION, "upgrade");
   httpSetField(http, HTTP_FIELD_UPGRADE, "TLS/1.0, SSL/2.0, SSL/3.0");
@@ -2777,10 +2851,11 @@ http_upgrade(http_t *http)              /* I - HTTP connection */
   */
 
   memcpy(http->fields, myhttp.fields, sizeof(http->fields));
-  http->data_encoding   = myhttp.data_encoding;
-  http->data_remaining  = myhttp.data_remaining;
-  http->_data_remaining = myhttp._data_remaining;
-  http->expect          = myhttp.expect;
+  http->data_encoding       = myhttp.data_encoding;
+  http->data_remaining      = myhttp.data_remaining;
+  http->_data_remaining     = myhttp._data_remaining;
+  http->expect              = myhttp.expect;
+  http->field_authorization = myhttp.field_authorization;
 
  /*
   * See if we actually went secure...
@@ -2819,12 +2894,13 @@ http_wait(http_t *http,                 /* I - HTTP connection */
           int    msec,                 /* I - Milliseconds to wait */
          int    usessl)                /* I - Use SSL context? */
 {
-#ifndef WIN32
-  struct rlimit                limit;          /* Runtime limit */
-  int                  set_size;       /* Size of select set */
-#endif /* !WIN32 */
+#ifdef HAVE_POLL
+  struct pollfd                pfd;            /* Polled file descriptor */
+#else
+  fd_set               input_set;      /* select() input set */
   struct timeval       timeout;        /* Timeout */
-  int                  nfds;           /* Result from select() */
+#endif /* HAVE_POLL */
+  int                  nfds;           /* Result from select()/poll() */
 
 
   DEBUG_printf(("http_wait(http=%p, msec=%d)\n", http, msec));
@@ -2855,41 +2931,20 @@ http_wait(http_t *http,                 /* I - HTTP connection */
 #endif /* HAVE_SSL */
 
  /*
-  * Then try doing a select() to poll the socket...
+  * Then try doing a select() or poll() to poll the socket...
   */
 
-  if (!http->input_set)
-  {
-#ifdef WIN32
-   /*
-    * Windows has a fixed-size select() structure, different (surprise,
-    * surprise!) from all UNIX implementations.  Just allocate this
-    * fixed structure...
-    */
-
-    http->input_set = calloc(1, sizeof(fd_set));
-#else
-   /*
-    * Allocate the select() input set based upon the max number of file
-    * descriptors available for this process...
-    */
-
-    getrlimit(RLIMIT_NOFILE, &limit);
-
-    set_size = (limit.rlim_cur + 31) / 8 + 4;
-    if (set_size < sizeof(fd_set))
-      set_size = sizeof(fd_set);
+#ifdef HAVE_POLL
+  pfd.fd     = http->fd;
+  pfd.events = POLLIN;
 
-    http->input_set = calloc(1, set_size);
-#endif /* WIN32 */
-
-    if (!http->input_set)
-      return (0);
-  }
+  while ((nfds = poll(&pfd, 1, msec)) < 0 && errno == EINTR);
 
+#else
   do
   {
-    FD_SET(http->fd, http->input_set);
+    FD_ZERO(&input_set);
+    FD_SET(http->fd, &input_set);
 
     DEBUG_printf(("http_wait: msec=%d, http->fd=%d\n", msec, http->fd));
 
@@ -2898,20 +2953,19 @@ http_wait(http_t *http,                 /* I - HTTP connection */
       timeout.tv_sec  = msec / 1000;
       timeout.tv_usec = (msec % 1000) * 1000;
 
-      nfds = select(http->fd + 1, http->input_set, NULL, NULL, &timeout);
+      nfds = select(http->fd + 1, &input_set, NULL, NULL, &timeout);
     }
     else
-      nfds = select(http->fd + 1, http->input_set, NULL, NULL, NULL);
+      nfds = select(http->fd + 1, &input_set, NULL, NULL, NULL);
 
     DEBUG_printf(("http_wait: select() returned %d...\n", nfds));
   }
-#ifdef WIN32
+#  ifdef WIN32
   while (nfds < 0 && WSAGetLastError() == WSAEINTR);
-#else
+#  else
   while (nfds < 0 && errno == EINTR);
-#endif /* WIN32 */
-
-  FD_CLR(http->fd, http->input_set);
+#  endif /* WIN32 */
+#endif /* HAVE_POLL */
 
   DEBUG_printf(("http_wait: returning with nfds=%d...\n", nfds));
 
@@ -3102,5 +3156,5 @@ http_write_ssl(http_t     *http,  /* I - HTTP connection */
 
 
 /*
- * End of "$Id: http.c 6191 2007-01-10 16:48:37Z mike $".
+ * End of "$Id: http.c 6285 2007-02-16 01:10:55Z mike $".
  */
index 1971bc3ed61164d143014696de392622963bd7cd..babe4240bb91a53f5a5b0d7bbe2b87514cb912e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.h 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: http.h 6187 2007-01-10 16:20:42Z mike $"
  *
  *   Hyper-Text Transport Protocol definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -66,8 +66,6 @@ typedef off_t ssize_t;                        /* @private@ */
 #    endif /* AF_LOCAL */
 #  endif /* WIN32 */
 
-#  include "md5.h"
-
 /*
  * With GCC 3.0 and higher, we can mark old APIs "deprecated" so you get
  * a warning at compile-time.
@@ -141,7 +139,8 @@ typedef enum http_auth_e            /**** HTTP authentication types ****/
   HTTP_AUTH_MD5,                       /* Digest authentication in use */
   HTTP_AUTH_MD5_SESS,                  /* MD5-session authentication in use */
   HTTP_AUTH_MD5_INT,                   /* Digest authentication in use for body */
-  HTTP_AUTH_MD5_SESS_INT               /* MD5-session authentication in use for body */
+  HTTP_AUTH_MD5_SESS_INT,              /* MD5-session authentication in use for body */
+  HTTP_AUTH_NEGOTIATE                  /* GSSAPI authentication in use @since CUPS 1.3@ */
 } http_auth_t;
 
 typedef enum http_encoding_e           /**** HTTP transfer encoding values ****/
@@ -329,60 +328,7 @@ typedef struct http_addrlist_s             /**** Socket address list, which is
   http_addr_t          addr;           /* Address */
 } http_addrlist_t;
 
-typedef struct _http_s                 /**** HTTP connection structure. ****/
-{
- /*
-  * DO NOT ACCESS MEMBERS OF THIS STRUCTURE DIRECTLY; INSTEAD, USE THE
-  * PROVIDED APIS FOR ACCESSING THE VALUES INSTEAD.
-  *
-  * This structure definition will be removed from the public headers in
-  * CUPS 1.3.
-  */
-
-  int                  fd;             /* File descriptor for this socket */
-  int                  blocking;       /* To block or not to block */
-  int                  error;          /* Last error on read */
-  time_t               activity;       /* Time since last read/write */
-  http_state_t         state;          /* State of client */
-  http_status_t                status;         /* Status of last request */
-  http_version_t       version;        /* Protocol version */
-  http_keepalive_t     keep_alive;     /* Keep-alive supported? */
-  struct sockaddr_in   _hostaddr;      /* Address of connected host @deprecated@ */
-  char                 hostname[HTTP_MAX_HOST],
-                                       /* Name of connected host */
-                       fields[HTTP_FIELD_MAX][HTTP_MAX_VALUE];
-                                       /* Field values */
-  char                 *data;          /* Pointer to data buffer */
-  http_encoding_t      data_encoding;  /* Chunked or not */
-  int                  _data_remaining;/* Number of bytes left @deprecated@ */
-  int                  used;           /* Number of bytes used in buffer */
-  char                 buffer[HTTP_MAX_BUFFER];
-                                       /* Buffer for incoming data */
-  int                  auth_type;      /* Authentication in use */
-  _cups_md5_state_t    md5_state;      /* MD5 state */
-  char                 nonce[HTTP_MAX_VALUE];
-                                       /* Nonce value */
-  int                  nonce_count;    /* Nonce count */
-  void                 *tls;           /* TLS state information */
-  http_encryption_t    encryption;     /* Encryption requirements */
-  /**** New in CUPS 1.1.19 ****/
-  fd_set               *input_set;     /* select() set for httpWait() @since CUPS 1.1.19@ */
-  http_status_t                expect;         /* Expect: header @since CUPS 1.1.19@ */
-  char                 *cookie;        /* Cookie value(s) @since CUPS 1.1.19@ */
-  /**** New in CUPS 1.1.20 ****/
-  char                 authstring[HTTP_MAX_VALUE],
-                                       /* Current Authentication value @since CUPS 1.1.20@ */
-                       userpass[HTTP_MAX_VALUE];
-                                       /* Username:password string @since CUPS 1.1.20@ */
-  int                  digest_tries;   /* Number of tries for digest auth @since CUPS 1.1.20@ */
-  /**** New in CUPS 1.2 ****/
-  off_t                        data_remaining; /* Number of bytes left @since CUPS 1.2@ */
-  http_addr_t          *hostaddr;      /* Current host address and port @since CUPS 1.2@ */
-  http_addrlist_t      *addrlist;      /* List of valid addresses @since CUPS 1.2@ */
-  char                 wbuffer[HTTP_MAX_BUFFER];
-                                       /* Buffer for outgoing data */
-  int                  wused;          /* Write buffer bytes used @since CUPS 1.2@ */
-} http_t;
+typedef struct _http_s http_t;         /**** HTTP connection type ****/
 
 
 /*
@@ -513,5 +459,5 @@ extern ssize_t              httpWrite2(http_t *http, const char *buffer,
 #endif /* !_CUPS_HTTP_H_ */
 
 /*
- * End of "$Id: http.h 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: http.h 6187 2007-01-10 16:20:42Z mike $".
  */
index 720ff0cd5d950aba460f40a462ca6e7a1a054766..ea7c0e2312a07ee85b41908ecf6b5a51df99370a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: i18n.h 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: i18n.h 5925 2006-09-05 19:43:11Z mike $"
  *
  *   (Private) localization support for the Common UNIX Printing System (CUPS).
  *
@@ -114,5 +114,5 @@ extern void         _cupsSetLocale(char *argv[]);
 #endif /* !_CUPS_I18N_H_ */
 
 /*
- * End of "$Id: i18n.h 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: i18n.h 5925 2006-09-05 19:43:11Z mike $".
  */
index 3b3455fe7949c4473a0d1b6f6e5a4cc423b5bb79..b315d8b379b405b064cc3ea540c1b94aef8faf83 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp-private.h 5753 2006-07-18 19:53:24Z mike $"
+ * "$Id: ipp-private.h 5749 2006-07-18 18:36:09Z mike $"
  *
  *   Private IPP definitions for the Common UNIX Printing System (CUPS).
  *
@@ -74,5 +74,5 @@ extern void           _ippFreeAttr(ipp_attribute_t *);
 #endif /* !_CUPS_IPP_H_ */
 
 /*
- * End of "$Id: ipp-private.h 5753 2006-07-18 19:53:24Z mike $".
+ * End of "$Id: ipp-private.h 5749 2006-07-18 18:36:09Z mike $".
  */
index d4911d60c086c8b6716331c1558a87f0e35b4c6e..f868e399665e1f0da7f6cb403e6148d91656838d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp-support.c 5905 2006-08-29 20:48:59Z mike $"
+ * "$Id: ipp-support.c 5903 2006-08-29 20:45:15Z mike $"
  *
  *   Internet Printing Protocol support functions for the Common UNIX
  *   Printing System (CUPS).
@@ -364,5 +364,5 @@ ippSetPort(int p)                   /* I - Port number to use */
 
 
 /*
- * End of "$Id: ipp-support.c 5905 2006-08-29 20:48:59Z mike $".
+ * End of "$Id: ipp-support.c 5903 2006-08-29 20:45:15Z mike $".
  */
index dcd4b651da03ed325ea4efe8dc40fc7b04bb8ff9..8dea50d144ae57705496722b5bae3deb04d04755 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c 6234 2007-02-05 20:25:50Z mike $"
+ * "$Id: ipp.c 6230 2007-02-05 20:08:47Z mike $"
  *
  *   Internet Printing Protocol support functions for the Common UNIX
  *   Printing System (CUPS).
@@ -2835,5 +2835,5 @@ _ipp_free_attr(ipp_attribute_t *attr)     /* I - Attribute to free */
 
 
 /*
- * End of "$Id: ipp.c 6234 2007-02-05 20:25:50Z mike $".
+ * End of "$Id: ipp.c 6230 2007-02-05 20:08:47Z mike $".
  */
index 32b578fc767702db3665a0bb4ac8e7bde6132896..d4ae704ea0a46c718d135f57f52cb8203cc79203 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.h 5878 2006-08-24 15:55:42Z mike $"
+ * "$Id: ipp.h 5873 2006-08-24 14:37:24Z mike $"
  *
  *   Internet Printing Protocol definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -499,5 +499,5 @@ extern ipp_state_t  ippWriteIO(void *dst, ipp_iocb_t cb, int blocking,
 #endif /* !_CUPS_IPP_H_ */
 
 /*
- * End of "$Id: ipp.h 5878 2006-08-24 15:55:42Z mike $".
+ * End of "$Id: ipp.h 5873 2006-08-24 14:37:24Z mike $".
  */
index ebdccf244742e362e82319ae0bde3f119c31e8a2..e675d270d8436e4b6fc2eae31e26be9271f7a855 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: langprintf.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: langprintf.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   Localized printf/puts functions for the Common UNIX Printing
  *   System (CUPS).
@@ -224,5 +224,5 @@ _cupsSetLocale(char *argv[])                /* IO - Command-line arguments */
 
 
 /*
- * End of "$Id: langprintf.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: langprintf.c 6187 2007-01-10 16:20:42Z mike $".
  */
index e8cf5bed6085eacb32d72b73e6a318625348d788..76d0d0bb4a9d43614b900c0e6b917d580c70c636 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: language.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: language.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   I18N/language support for the Common UNIX Printing System (CUPS).
  *
@@ -1326,5 +1326,5 @@ cups_unquote(char       *d,               /* O - Unquoted string */
 
 
 /*
- * End of "$Id: language.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: language.c 6187 2007-01-10 16:20:42Z mike $".
  */
index c2be099b4385e0d2ccf7937a29fc4d5bf93c0d81..bb9024f9ca50a1c30aee473d5773c35029e862bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: localize.c 5826 2006-08-15 19:04:11Z mike $"
+ * "$Id: localize.c 5824 2006-08-15 18:19:45Z mike $"
  *
  *   PPD custom option routines for the Common UNIX Printing System (CUPS).
  *
@@ -202,5 +202,5 @@ ppd_text(ppd_file_t *ppd,           /* I - PPD file */
 
 
 /*
- * End of "$Id: localize.c 5826 2006-08-15 19:04:11Z mike $".
+ * End of "$Id: localize.c 5824 2006-08-15 18:19:45Z mike $".
  */
index c3013999d7c68665825bee664a75595f2f8cb6f1..20a94fd4a0282a589dd06eb57bfb95c8d959bb0c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: mark.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: mark.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   Option marking routines for the Common UNIX Printing System (CUPS).
  *
@@ -679,5 +679,5 @@ ppd_defaults(ppd_file_t  *ppd,      /* I - PPD file */
 
 
 /*
- * End of "$Id: mark.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: mark.c 6187 2007-01-10 16:20:42Z mike $".
  */
index df8a75881088345e0e1a53098489d209c2ae4fb1..d28b5ea687326f170bc3a4a529be9251fc0d228c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: md5passwd.c 5232 2006-03-05 17:59:19Z mike $"
+ * "$Id: md5passwd.c 5966 2006-09-19 16:33:00Z mike $"
  *
  *   MD5 password support for the Common UNIX Printing System (CUPS).
  *
@@ -35,7 +35,7 @@
  * Include necessary headers...
  */
 
-#include "http.h"
+#include "http-private.h"
 #include "string.h"
 
 
@@ -147,5 +147,5 @@ httpMD5String(const unsigned char *sum,     /* I - MD5 sum data */
 
 
 /*
- * End of "$Id: md5passwd.c 5232 2006-03-05 17:59:19Z mike $".
+ * End of "$Id: md5passwd.c 5966 2006-09-19 16:33:00Z mike $".
  */
index 752056636f67fba1e3180ab75a30df4ae703b185..117796a3d7433447ce23871eae1843fe1170ade7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: notify.c 5878 2006-08-24 15:55:42Z mike $"
+ * "$Id: notify.c 5873 2006-08-24 14:37:24Z mike $"
  *
  *   Notification routines for the Common UNIX Printing System (CUPS).
  *
@@ -207,5 +207,5 @@ cupsNotifyText(cups_lang_t *lang,   /* I - Language data */
 
 
 /*
- * End of "$Id: notify.c 5878 2006-08-24 15:55:42Z mike $".
+ * End of "$Id: notify.c 5873 2006-08-24 14:37:24Z mike $".
  */
index e232caaad0b7c8fb7df150c892909510aa07017a..12305b1b66858f90cb7aa406e9c1a2c166aefbdd 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: options.c 5151 2006-02-22 22:43:17Z mike $"
+ * "$Id: options.c 6310 2007-02-27 14:20:39Z mike $"
  *
  *   Option routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -366,10 +366,27 @@ cupsMarkOptions(
     }
     else if (!strcasecmp(optptr->name, "output-bin"))
     {
-      if (cupsGetOption("OutputBin", num_options, options) == NULL)
+      if (!cupsGetOption("OutputBin", num_options, options))
         if (ppdMarkOption(ppd, "OutputBin", optptr->value))
           conflict = 1;
     }
+    else if (!strcasecmp(optptr->name, "multiple-document-handling"))
+    {
+      if (!cupsGetOption("Collate", num_options, options) &&
+          ppdFindOption(ppd, "Collate"))
+      {
+        if (strcasecmp(optptr->value, "separate-documents-uncollated-copies"))
+       {
+         if (ppdMarkOption(ppd, "Collate", "True"))
+            conflict = 1;
+        }
+       else
+       {
+         if (ppdMarkOption(ppd, "Collate", "False"))
+            conflict = 1;
+        }
+      }
+    }
     else if (ppdMarkOption(ppd, optptr->name, optptr->value))
       conflict = 1;
 
@@ -578,7 +595,7 @@ cupsParseOptions(
 
 
 /*
- * 'cupsRemoveOptions()' - Remove an option from an option array.
+ * 'cupsRemoveOption()' - Remove an option from an option array.
  *
  * @since CUPS 1.2@
  */
@@ -622,7 +639,7 @@ cupsRemoveOption(
       free(option->value);
 
     if (i > 0)
-      memmove(option, option + 1, i * sizeof(cups_option_t *));
+      memmove(option, option + 1, i * sizeof(cups_option_t));
   }
 
  /*
@@ -634,5 +651,5 @@ cupsRemoveOption(
 
 
 /*
- * End of "$Id: options.c 5151 2006-02-22 22:43:17Z mike $".
+ * End of "$Id: options.c 6310 2007-02-27 14:20:39Z mike $".
  */
index 66b64eeae11303714ada0c01a59e91207d8555bf..b408b5242069f00fd1f3fbd6767f7d261ab7666f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: page.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: page.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   Page size functions for the Common UNIX Printing System (CUPS).
  *
@@ -209,5 +209,5 @@ ppdPageLength(ppd_file_t *ppd,      /* I - PPD file */
 
 
 /*
- * End of "$Id: page.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: page.c 6187 2007-01-10 16:20:42Z mike $".
  */
index 37d0f8d6b5fa0bbd0c982d577efa5a27c43778c0..6a6c665ab67712f4d76471e5a038ef5e9cb48eea 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ppd.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: ppd.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   PPD file routines for the Common UNIX Printing System (CUPS).
  *
@@ -3046,5 +3046,5 @@ ppd_read(cups_file_t    *fp,              /* I - File to read from */
 
 
 /*
- * End of "$Id: ppd.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: ppd.c 6187 2007-01-10 16:20:42Z mike $".
  */
index 6c2924385bdd79e55bb6f02f0075c2ab99bbca9a..0e89634ba6d264cfb59cf9798fa2d1a5731df08d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: request.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: request.c 6253 2007-02-10 18:48:40Z mike $"
  *
  *   IPP utilities for the Common UNIX Printing System (CUPS).
  *
@@ -71,6 +71,9 @@ cupsDoFileRequest(http_t     *http,   /* I - HTTP connection to server */
   int          bytes;                  /* Number of bytes read/written */
   char         buffer[32768];          /* Output buffer */
   http_status_t        expect;                 /* Expect: header to use */
+#ifdef HAVE_AUTHORIZATION_H
+  _cups_globals_t *cg = _cupsGlobals();        /* Global data */
+#endif /* HAVE_AUTHORIZATION_H */
 
 
   DEBUG_printf(("cupsDoFileRequest(%p, %p, \'%s\', \'%s\')\n",
@@ -431,6 +434,18 @@ cupsDoFileRequest(http_t     *http,        /* I - HTTP connection to server */
     }
   }
 
+#ifdef HAVE_AUTHORIZATION_H
+ /*
+  * Delete any authorization reference created for this request...
+  */
+  
+  if (cg->auth_ref)
+  {
+    AuthorizationFree(cg->auth_ref, kAuthorizationFlagDefaults);
+    cg->auth_ref = NULL;
+  }
+#endif /* HAVE_AUTHORIZATION_H */
+
   return (response);
 }
 
@@ -479,5 +494,5 @@ _cupsSetError(ipp_status_t status,  /* I - IPP status code */
 
 
 /*
- * End of "$Id: request.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: request.c 6253 2007-02-10 18:48:40Z mike $".
  */
diff --git a/cups/sidechannel.c b/cups/sidechannel.c
new file mode 100644 (file)
index 0000000..b140338
--- /dev/null
@@ -0,0 +1,340 @@
+/*
+ * "$Id: sidechannel.c 6319 2007-03-06 18:51:40Z mike $"
+ *
+ *   Side-channel API code 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.
+ *
+ * Contents:
+ *
+ *   cupsSideChannelDoRequest() - Send a side-channel command to a backend
+ *                                and wait for a response.
+ *   cupsSideChannelRead()      - Read a side-channel message.
+ *   cupsSideChannelWrite()     - Write a side-channel message.
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include "sidechannel.h"
+#include "string.h"
+#include <unistd.h>
+#include <errno.h>
+#ifdef __hpux
+#  include <sys/time.h>
+#else
+#  include <sys/select.h>
+#endif /* __hpux */
+#ifndef WIN32
+#  include <sys/time.h>
+#endif /* !WIN32 */
+#ifdef HAVE_POLL
+#  include <sys/poll.h>
+#endif /* HAVE_POLL */
+
+
+/*
+ * 'cupsSideChannelDoRequest()' - Send a side-channel command to a backend and wait for a response.
+ *
+ * This function is normally only called by filters, drivers, or port
+ * monitors in order to communicate with the backend used by the current
+ * printer.  Programs must be prepared to handle timeout or "not
+ * implemented" status codes, which indicate that the backend or device
+ * do not support the specified side-channel command.
+ *
+ * The "datalen" parameter must be initialized to the size of the buffer
+ * pointed to by the "data" parameter.  cupsSideChannelDoRequest() will
+ * update the value to contain the number of data bytes in the buffer.
+ *
+ * @since CUPS 1.3@
+ */
+
+cups_sc_status_t                       /* O  - Status of command */
+cupsSideChannelDoRequest(
+    cups_sc_command_t command,         /* I  - Command to send */
+    char              *data,           /* O  - Response data buffer pointer */
+    int               *datalen,                /* IO - Size of data buffer on entry, number of bytes in buffer on return */
+    double            timeout)         /* I  - Timeout in seconds */
+{
+  cups_sc_status_t     status;         /* Status of command */
+  cups_sc_command_t    rcommand;       /* Response command */
+
+
+  if (cupsSideChannelWrite(command, CUPS_SC_STATUS_NONE, NULL, 0, timeout))
+    return (CUPS_SC_STATUS_TIMEOUT);
+
+  if (cupsSideChannelRead(&rcommand, &status, data, datalen, timeout))
+    return (CUPS_SC_STATUS_TIMEOUT);
+
+  if (rcommand != command)
+    return (CUPS_SC_STATUS_BAD_MESSAGE);
+
+  return (status);
+}
+
+
+/*
+ * 'cupsSideChannelRead()' - Read a side-channel message.
+ *
+ * This function is normally only called by backend programs to read
+ * commands from a filter, driver, or port monitor program.  The
+ * caller must be prepared to handle incomplete or invalid messages
+ * and return the corresponding status codes.
+ *
+ * The "datalen" parameter must be initialized to the size of the buffer
+ * pointed to by the "data" parameter.  cupsSideChannelDoRequest() will
+ * update the value to contain the number of data bytes in the buffer.
+ *
+ * @since CUPS 1.3@
+ */
+
+int                                    /* O - 0 on success, -1 on error */
+cupsSideChannelRead(
+    cups_sc_command_t *command,                /* O - Command code */
+    cups_sc_status_t  *status,         /* O - Status code */
+    char              *data,           /* O - Data buffer pointer */
+    int               *datalen,                /* IO - Size of data buffer on entry, number of bytes in buffer on return */
+    double            timeout)         /* I  - Timeout in seconds */
+{
+  char         buffer[16388];          /* Message buffer */
+  int          bytes;                  /* Bytes read */
+  int          templen;                /* Data length from message */
+#ifdef HAVE_POLL
+  struct pollfd        pfd;                    /* Poll structure for poll() */
+#else /* select() */
+  fd_set       input_set;              /* Input set for select() */
+  struct timeval stimeout;             /* Timeout value for select() */
+#endif /* HAVE_POLL */
+
+
+ /*
+  * Range check input...
+  */
+
+  if (!command || !status)
+    return (-1);
+
+ /*
+  * See if we have pending data on the side-channel socket...
+  */
+
+#ifdef HAVE_POLL
+  pfd.fd     = CUPS_SC_FD;
+  pfd.events = POLLIN;
+
+  if (timeout < 0.0)
+  {
+    if (poll(&pfd, 1, -1) < 1)
+      return (-1);
+  }
+  else if (poll(&pfd, 1, (long)(timeout * 1000)) < 1)
+    return (-1);
+
+#else /* select() */
+  FD_ZERO(&input_set);
+  FD_SET(CUPS_SC_FD, &input_set);
+
+  if (timeout < 0.0)
+  {
+    if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, NULL) < 1)
+      return (-1);
+  }
+  else
+  {
+    stimeout.tv_sec  = (int)timeout;
+    stimeout.tv_usec = (int)(timeout * 1000000) % 1000000;
+
+    if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, &stimeout) < 1)
+      return (-1);
+  }
+#endif /* HAVE_POLL */
+
+ /*
+  * Read a side-channel message for the format:
+  *
+  * Byte(s)  Description
+  * -------  -------------------------------------------
+  * 0        Command code
+  * 1        Status code
+  * 2-3      Data length (network byte order) <= 16384
+  * 4-N      Data
+  */
+
+  while ((bytes = read(CUPS_SC_FD, buffer, sizeof(buffer))) < 0)
+    if (errno != EINTR && errno != EAGAIN)
+      return (-1);
+
+ /*
+  * Validate the command code in the message...
+  */
+
+  if (buffer[0] < CUPS_SC_CMD_SOFT_RESET || buffer[0] > CUPS_SC_CMD_GET_STATE)
+    return (-1);
+
+  *command = (cups_sc_command_t)buffer[0];
+
+ /*
+  * Validate the data length in the message...
+  */
+
+  templen = ((buffer[2] & 255) << 8) | (buffer[3] & 255);
+
+  if (templen > 0 && (!data || !datalen))
+  {
+   /*
+    * Either the response is bigger than the provided buffer or the
+    * response is bigger than we've read...
+    */
+
+    *status = CUPS_SC_STATUS_TOO_BIG;
+  }
+  else if (templen > *datalen || templen > (bytes - 4))
+  {
+   /*
+    * Either the response is bigger than the provided buffer or the
+    * response is bigger than we've read...
+    */
+
+    *status = CUPS_SC_STATUS_TOO_BIG;
+  }
+  else
+  {
+   /*
+    * The response data will fit, copy it over and provide the actual
+    * length...
+    */
+
+    *status  = (cups_sc_status_t)buffer[1];
+    *datalen = templen;
+
+    memcpy(data, buffer + 4, templen);
+  }
+
+  return (0);
+}
+
+
+/*
+ * 'cupsSideChannelWrite()' - Write a side-channel message.
+ *
+ * This function is normally only called by backend programs to send
+ * responses to a filter, driver, or port monitor program.
+ *
+ * @since CUPS 1.3@
+ */
+
+int                                    /* O - 0 on success, -1 on error */
+cupsSideChannelWrite(
+    cups_sc_command_t command,         /* I - Command code */
+    cups_sc_status_t  status,          /* I - Status code */
+    const char        *data,           /* I - Data buffer pointer */
+    int               datalen,         /* I - Number of bytes of data */
+    double            timeout)         /* I - Timeout in seconds */
+{
+  char         buffer[16388];          /* Message buffer */
+  int          bytes;                  /* Bytes written */
+#ifdef HAVE_POLL
+  struct pollfd        pfd;                    /* Poll structure for poll() */
+#else /* select() */
+  fd_set       output_set;             /* Output set for select() */
+  struct timeval stimeout;             /* Timeout value for select() */
+#endif /* HAVE_POLL */
+
+
+ /*
+  * Range check input...
+  */
+
+  if (command < CUPS_SC_CMD_SOFT_RESET || command > CUPS_SC_CMD_GET_STATE ||
+      datalen < 0 || datalen > 16384 || (datalen > 0 && !data))
+    return (-1);
+
+ /*
+  * See if we can safely write to the side-channel socket...
+  */
+
+#ifdef HAVE_POLL
+  pfd.fd     = CUPS_SC_FD;
+  pfd.events = POLLOUT;
+
+  if (timeout < 0.0)
+  {
+    if (poll(&pfd, 1, -1) < 1)
+      return (-1);
+  }
+  else if (poll(&pfd, 1, (long)(timeout * 1000)) < 1)
+    return (-1);
+
+#else /* select() */
+  FD_ZERO(&output_set);
+  FD_SET(CUPS_SC_FD, &output_set);
+
+  if (timeout < 0.0)
+  {
+    if (select(CUPS_SC_FD + 1, NULL, &output_set, NULL, NULL) < 1)
+      return (-1);
+  }
+  else
+  {
+    stimeout.tv_sec  = (int)timeout;
+    stimeout.tv_usec = (int)(timeout * 1000000) % 1000000;
+
+    if (select(CUPS_SC_FD + 1, NULL, &output_set, NULL, &stimeout) < 1)
+      return (-1);
+  }
+#endif /* HAVE_POLL */
+
+ /*
+  * Write a side-channel message in the format:
+  *
+  * Byte(s)  Description
+  * -------  -------------------------------------------
+  * 0        Command code
+  * 1        Status code
+  * 2-3      Data length (network byte order) <= 16384
+  * 4-N      Data
+  */
+
+  buffer[0] = command;
+  buffer[1] = status;
+  buffer[2] = datalen >> 8;
+  buffer[3] = datalen & 255;
+
+  bytes = 4;
+
+  if (datalen > 0)
+  {
+    memcpy(buffer + 4, data, datalen);
+    bytes += datalen;
+  }
+
+  while (write(CUPS_SC_FD, buffer, bytes) < 0)
+    if (errno != EINTR && errno != EAGAIN)
+      return (-1);
+
+  return (0);
+}
+
+
+/*
+ * End of "$Id: sidechannel.c 6319 2007-03-06 18:51:40Z mike $".
+ */
diff --git a/cups/sidechannel.h b/cups/sidechannel.h
new file mode 100644 (file)
index 0000000..9bdf49b
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * "$Id: sidechannel.h 6170 2007-01-02 17:26:41Z mike $"
+ *
+ *   Side-channel API definitions 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.
+ */
+
+#ifndef _CUPS_SIDECHANNEL_H_
+#  define _CUPS_SIDECHANNEL_H_
+
+/*
+ * C++ magic...
+ */
+
+#  ifdef __cplusplus
+extern "C" {
+#  endif /* __cplusplus */
+
+
+/*
+ * Constants...
+ */
+
+#define CUPS_SC_FD     4               /* File descriptor for select/poll */
+
+
+/*
+ * Enumerations...
+ */
+
+typedef enum                           /**** Bidirectional capabilities ****/
+{
+  CUPS_SC_BIDI_NOT_SUPPORTED = 0,      /* Bidirectional I/O is not supported */
+  CUPS_SC_BIDI_SUPPORTED = 1           /* Bidirectional I/O is supported */
+} cups_sc_bidi_t;
+
+typedef enum                           /**** Request command codes ****/
+{
+  CUPS_SC_CMD_SOFT_RESET = 1,          /* Do a soft reset */
+  CUPS_SC_CMD_DRAIN_OUTPUT = 2,                /* Drain all pending output */
+  CUPS_SC_CMD_GET_BIDI = 3,            /* Return bidirectional capabilities */
+  CUPS_SC_CMD_GET_DEVICE_ID = 4,       /* Return the IEEE-1284 device ID */
+  CUPS_SC_CMD_GET_STATE = 5            /* Return the device state */
+} cups_sc_command_t;
+
+typedef enum                           /**** Printer state bits ****/
+{
+  CUPS_SC_STATE_OFFLINE = 0,           /* Device is off-line */
+  CUPS_SC_STATE_ONLINE = 1,            /* Device is on-line */
+  CUPS_SC_STATE_BUSY = 2,              /* Device is busy */
+  CUPS_SC_STATE_ERROR = 4,             /* Other error condition */
+  CUPS_SC_STATE_MEDIA_LOW = 16,                /* Paper low condition */
+  CUPS_SC_STATE_MEDIA_EMPTY = 32,      /* Paper out condition */
+  CUPS_SC_STATE_MARKER_LOW = 64,       /* Toner/ink low condition */
+  CUPS_SC_STATE_MARKER_EMPTY = 128     /* Toner/ink out condition */
+} cups_sc_state_t;
+
+typedef enum                           /**** Response status codes ****/
+{
+  CUPS_SC_STATUS_NONE,                 /* No status */
+  CUPS_SC_STATUS_OK,                   /* Operation succeeded */
+  CUPS_SC_STATUS_IO_ERROR,             /* An I/O error occurred */
+  CUPS_SC_STATUS_TIMEOUT,              /* The backend did not respond */
+  CUPS_SC_STATUS_NO_RESPONSE,          /* The device did not respond */
+  CUPS_SC_STATUS_BAD_MESSAGE,          /* The command/response message was invalid */
+  CUPS_SC_STATUS_TOO_BIG,              /* Response too big */
+  CUPS_SC_STATUS_NOT_IMPLEMENTED       /* Command not implemented */
+} cups_sc_status_t;
+
+
+/*
+ * Prototypes...
+ */
+
+extern cups_sc_status_t        cupsSideChannelDoRequest(cups_sc_command_t command,
+                                                char *data, int *datalen,
+                                                double timeout);
+extern int             cupsSideChannelRead(cups_sc_command_t *command,
+                                           cups_sc_status_t *status,
+                                           char *data, int *datalen,
+                                           double timeout);
+extern int             cupsSideChannelWrite(cups_sc_command_t command,
+                                            cups_sc_status_t status,
+                                            const char *data, int datalen,
+                                            double timeout);
+
+
+#  ifdef __cplusplus
+}
+#  endif /* __cplusplus */
+
+#endif /* !_CUPS_SIDECHANNEL_H_ */
+
+/*
+ * End of "$Id: sidechannel.h 6170 2007-01-02 17:26:41Z mike $".
+ */
index 313102b86c67e461523cd3a04b41f318ecfbf760..50cd64da4d309733f6043469eeb64c5b7f9de6f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: snprintf.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: snprintf.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   snprintf functions for the Common UNIX Printing System (CUPS).
  *
@@ -368,6 +368,6 @@ _cups_snprintf(char       *buffer,  /* O - Output buffer */
 
 
 /*
- * End of "$Id: snprintf.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: snprintf.c 6187 2007-01-10 16:20:42Z mike $".
  */
 
index 98cd344dc6d90bc0c2731aff56e69187b6ef3a37..5b2cea2a55e6f565cc04bc934399be7caf5bd688 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: string.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: string.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   String functions for the Common UNIX Printing System (CUPS).
  *
@@ -743,5 +743,5 @@ compare_sp_items(_cups_sp_item_t *a,        /* I - First item */
 
 
 /*
- * End of "$Id: string.c 6188 2007-01-10 16:23:06Z mike $".
+ * End of "$Id: string.c 6187 2007-01-10 16:20:42Z mike $".
  */
index 60dfc81ff9c776bfa7d000fad3673c57418b5a85..f7fd876dc746d061164b0098d58e5368bd03a758 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: tempfile.c 6040 2006-10-17 02:24:49Z mike $"
+ * "$Id: tempfile.c 6039 2006-10-17 02:24:34Z mike $"
  *
  *   Temp file utilities for the Common UNIX Printing System (CUPS).
  *
@@ -238,5 +238,5 @@ cupsTempFile2(char *filename,               /* I - Pointer to buffer */
 
 
 /*
- * End of "$Id: tempfile.c 6040 2006-10-17 02:24:49Z mike $".
+ * End of "$Id: tempfile.c 6039 2006-10-17 02:24:34Z mike $".
  */
index c4d6d90f5049ad52e9254b516831e19c991f68ea..18b0ad4a791e9ae1531ec5b94ef3fbf23e552264 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testfile.c 6193 2007-01-10 19:27:04Z mike $"
+ * "$Id: testfile.c 6192 2007-01-10 19:26:48Z mike $"
  *
  *   File test program for the Common UNIX Printing System (CUPS).
  *
@@ -468,5 +468,5 @@ read_write_tests(int compression)   /* I - Use compression? */
 
 
 /*
- * End of "$Id: testfile.c 6193 2007-01-10 19:27:04Z mike $".
+ * End of "$Id: testfile.c 6192 2007-01-10 19:26:48Z mike $".
  */
index 2d0af275ef5b364ae2fdda29caf0983ab2799223..585ca6eef891cd0332a2208f49256179d2f8c408 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testhttp.c 6003 2006-10-02 16:26:04Z mike $"
+ * "$Id: testhttp.c 5996 2006-10-02 15:05:58Z mike $"
  *
  *   HTTP test program for the Common UNIX Printing System (CUPS).
  *
@@ -533,5 +533,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: testhttp.c 6003 2006-10-02 16:26:04Z mike $".
+ * End of "$Id: testhttp.c 5996 2006-10-02 15:05:58Z mike $".
  */
index 32e2e50b9cc3f8164c6ee3eac513e4d0314b2d18..80fc9f6a5c91bb7f6d64b5a94a1d4834ee6d002e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testi18n.c 5838 2006-08-17 14:41:42Z mike $"
+ * "$Id: testi18n.c 5837 2006-08-17 14:37:40Z mike $"
  *
  *   Internationalization test for Common UNIX Printing System (CUPS).
  *
@@ -555,5 +555,5 @@ print_utf8(const char            *msg,      /* I - Message String */
 
 
 /*
- * End of "$Id: testi18n.c 5838 2006-08-17 14:41:42Z mike $"
+ * End of "$Id: testi18n.c 5837 2006-08-17 14:37:40Z mike $"
  */
index 6975cb054e5735ca4b1d52a17d15fec22828af94..2231be273e0e767a6433da8984f6c239c14bcf0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testipp.c 5753 2006-07-18 19:53:24Z mike $"
+ * "$Id: testipp.c 5749 2006-07-18 18:36:09Z mike $"
  *
  *   IPP test program for the Common UNIX Printing System (CUPS).
  *
@@ -658,5 +658,5 @@ write_cb(void        *data,         /* I - Data */
 
 
 /*
- * End of "$Id: testipp.c 5753 2006-07-18 19:53:24Z mike $".
+ * End of "$Id: testipp.c 5749 2006-07-18 18:36:09Z mike $".
  */
index a587acedf35bf5199d78c942f112b97dda3e530d..3315d94c15d5d2179213816a9b5e82e8294c58e6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testppd.c 6161 2006-12-19 20:10:22Z mike $"
+ * "$Id: testppd.c 6159 2006-12-19 20:08:42Z mike $"
  *
  *   PPD test program for the Common UNIX Printing System (CUPS).
  *
@@ -308,5 +308,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: testppd.c 6161 2006-12-19 20:10:22Z mike $".
+ * End of "$Id: testppd.c 6159 2006-12-19 20:08:42Z mike $".
  */
index 9955d2e3548c6882298412f49a21532f8c01a1ba..70bf40f1d81e4224fff4040198f46acc298e9765 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: transcode.c 6188 2007-01-10 16:23:06Z mike $"
+ * "$Id: transcode.c 6187 2007-01-10 16:20:42Z mike $"
  *
  *   Transcoding support for the Common UNIX Printing System (CUPS).
  *
@@ -1655,5 +1655,5 @@ get_vbcs_charmap(
 
 
 /*
- * End of "$Id: transcode.c 6188 2007-01-10 16:23:06Z mike $"
+ * End of "$Id: transcode.c 6187 2007-01-10 16:20:42Z mike $"
  */
index 7c9a8a848982fd2e0f902ff5bc18bf04ff6a11f6..8eeb28554074ec614e962a19dbdf68196cb070a2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: usersys.c 5902 2006-08-29 15:51:19Z mike $"
+ * "$Id: usersys.c 5901 2006-08-29 15:49:34Z mike $"
  *
  *   User, system, and password routines for the Common UNIX Printing
  *   System (CUPS).
@@ -500,5 +500,5 @@ cups_open_client_conf(void)
 
 
 /*
- * End of "$Id: usersys.c 5902 2006-08-29 15:51:19Z mike $".
+ * End of "$Id: usersys.c 5901 2006-08-29 15:49:34Z mike $".
  */
index 623c22057a128a145dd3595f1e90587489ee9b51..0e321ce0c00e0b842183615d81ea9187df0dee55 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: util.c 6145 2006-12-06 20:10:16Z mike $"
+ * "$Id: util.c 6138 2006-12-06 18:52:39Z mike $"
  *
  *   Printing utilities for the Common UNIX Printing System (CUPS).
  *
@@ -1660,5 +1660,5 @@ cups_get_printer_uri(
 
 
 /*
- * End of "$Id: util.c 6145 2006-12-06 20:10:16Z mike $".
+ * End of "$Id: util.c 6138 2006-12-06 18:52:39Z mike $".
  */
index c437ae2125e1675e58a9b8a107dfbade290e2749..eca6cee912bcc5273b6486c401ea04f22cf612a5 100644 (file)
@@ -3,18 +3,18 @@
 %%Pages: 1
 %%LanguageLevel: 1
 %%DocumentData: Clean7Bit
-%%DocumentSuppliedResources: procset testprint/1.2
+%%DocumentSuppliedResources: procset testprint/1.3
 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
 %%Creator: Michael Sweet, Easy Software Products
-%%CreationDate: D:20060114093000+0500
+%%CreationDate: D:20070220113000+0500
 %%Title: Test Page
 %%EndComments
 %%BeginProlog
-%%BeginResource procset testprint 1.2 0
+%%BeginResource procset testprint 1.3 0
 %
 %   PostScript test page for the Common UNIX Printing System ("CUPS").
 %
-%   Copyright 1993-2006 Easy Software Products
+%   Copyright 1993-2007 Easy Software Products
 %
 %   These coded instructions, statements, and computer programs are the
 %   property of Easy Software Products and are protected by Federal
@@ -198,7 +198,8 @@ gsave
   /CENTIMETER 72 2.54 div def
   /MILLIMETER 72 25.4 div def
 
-  smallFont setfont                    % Font
+  /Times-Roman findfont                        % Font for ruler numbers
+  11 scalefont setfont                 % 11 points
 
   gsave                                        % Left side inches
     pageLeft 72 mul 0 translate                % Offset left edge
@@ -594,7 +595,7 @@ gsave
   pageWidth 36 mul                     % Center of page
   pageHeight 12 mul                    % Bottom of page
   moveto                               % Position text
-  (Printed Using CUPS v1.2.x) CENTER   % Show text centered
+  (Printed Using CUPS v1.3.x) CENTER   % Show text centered
 
   pageWidth 34 mul                     % Left-center of page
   pageHeight 8 mul                     % Move down...
@@ -631,6 +632,6 @@ gsave
 grestore
 showpage
 %
-% End of "$Id: testprint.ps 4930 2006-01-14 16:54:03Z mike $".
+% End of "$Id: testprint.ps 6295 2007-02-20 16:31:58Z mike $".
 %
 %%EOF
index 784173e313239793e112caf83af61258423b91d5..e0e03f1f31b524c69d7b835f9a9680d4106134e9 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5736 2006-07-13 19:59:36Z mike $"
+# "$Id: Makefile 5735 2006-07-13 19:58:43Z mike $"
 #
 #   Documentation makefile for the Common UNIX Printing System (CUPS).
 #
@@ -169,6 +169,7 @@ HELPFILES   =       \
                        help/spec-command.html \
                        help/spec-design.html \
                        help/spec-ipp.html \
+                       help/spec-postscript.html \
                        help/spec-ppd.html \
                        help/spec-raster.html \
                        help/spec-stp.html \
index 0e37f456f63eb548b9466ba183e7fd8d507de7c7..292e170f7b0dcaf9320f87fe72c2f84460057a72 100644 (file)
@@ -199,6 +199,10 @@ DIV.sidebar {
   margin-left: 10pt;
   padding: 5pt;
   width: 25%;
+  /* These are not implemented by all browsers, but that's OK */
+  border-radius: 10pt;
+  -moz-border-radius: 10pt;
+  box-shadow: 5pt 5pt 5pt #cccccc;
 }
 
 DIV.sidebar P.l0 {
@@ -230,6 +234,10 @@ TABLE.pager {
   border: solid thin #999966;
   margin-top: 10pt;
   padding: 2pt;
+  /* These are not implemented by all browsers, but that's OK */
+  border-radius: 10pt;
+  -moz-border-radius: 10pt;
+  box-shadow: 5pt 5pt 5pt #cccccc;
 }
 
 DT {
index 255facd8884ef7280704067d7f2d2ce6a4cf6a6d..e9d3382683c77f12bcf59fdfa7b6dc0a6b4a882e 100644 (file)
@@ -137,142 +137,3 @@ WIDTH="15" HEIGHT="15" ALT=""></TD>
 </TABLE>
 </BODY>
 </HTML>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<HTML>
-<HEAD>
-       <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-       <TITLE>Accueil - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
-       <LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
-       <LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
-</HEAD>
-<BODY>
-<TABLE WIDTH="100%" STYLE="height: 100%;" BORDER="0" CELLSPACING="0" CELLPADDING="0" SUMMARY="Common UNIX Printing System @CUPS_VERSION@">
-<TR CLASS="header">
-<TD VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG SRC="/images/top-left.gif" WIDTH="15" HEIGHT="80" ALT=""></TD>
-<TD VALIGN="TOP" WIDTH="55" ROWSPAN="2"><IMG SRC="/images/top-middle.gif" WIDTH="55" HEIGHT="80" ALT=""></TD>
-<TD WIDTH="100%" HEIGHT="60"><H1>Common UNIX Printing System @CUPS_VERSION@@CUPS_REVISION@</H1></TD>
-<TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG
-SRC="/images/top-right.gif" WIDTH="15" HEIGHT="15" ALT=""></TD>
-</TR>
-<TR CLASS="header"><TD WIDTH="100%" VALIGN="BOTTOM" NOWRAP>
-
-<A CLASS="sel" HREF="/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
-HEIGHT="4" ALIGN="TOP" BORDER="0"
-ALT="">&nbsp;&nbsp;Accueil&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="unsel" HREF="/admin/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
-HEIGHT="4" ALIGN="TOP" BORDER="0"
-ALT="">&nbsp;&nbsp;Administration&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="unsel" HREF="/classes/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
-HEIGHT="4" ALIGN="TOP" BORDER="0"
-ALT="">&nbsp;&nbsp;Classes&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="unsel" HREF="/help/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
-HEIGHT="4" ALIGN="TOP" BORDER="0"
-ALT="">&nbsp;&nbsp;Documentation/Aide&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="unsel" HREF="/jobs/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
-HEIGHT="4" ALIGN="TOP" BORDER="0"
-ALT="">&nbsp;&nbsp;Tâches&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="unsel" HREF="/printers/"><IMG SRC="/images/tab-left.gif" WIDTH="4"
-HEIGHT="4" ALIGN="TOP" BORDER="0"
-ALT="">&nbsp;&nbsp;Imprimantes&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-</TD></TR>
-<TR CLASS="page">
-<TD WIDTH="15">&nbsp;</TD>
-<TD COLSPAN="2" WIDTH="100%" VALIGN="TOP" CLASS="page">
-
-<H2 CLASS="title">Bienvenue !</H2>
-
-<P>Ces pages Web vous permettent de gérer vos imprimantes et vos tâches
-d'impression comme d'administrer le système. Cliquez sur les onglets ci-dessus ou
-sur les boutons ci-dessous pour effectuer une action.</P>
-
-<P>
-<A HREF="/help/"><IMG SRC="/images/button-help.gif" CLASS="button" ALT="Aide"></A>
-<A HREF="/admin?OP=add-class"><IMG SRC="/images/button-add-class.gif" CLASS="button" ALT="Ajouter une classe"></A>
-<A HREF="/admin?OP=add-printer"><IMG SRC="/images/button-add-printer.gif" CLASS="button" ALT="Ajouter une imprimante"></A>
-<A HREF="/classes"><IMG SRC="/images/button-manage-classes.gif" CLASS="button" ALT="Administrer les classes"></A>
-<A HREF="/jobs"><IMG SRC="/images/button-manage-jobs.gif" CLASS="button" ALT="Administrer les tâches"></A>
-<A HREF="/printers"><IMG SRC="/images/button-manage-printers.gif" CLASS="button" ALT="Administrer les imprimantes"></A>
-<A HREF="/admin"><IMG SRC="/images/button-manage-server.gif" CLASS="button" ALT="Administrer le serveur"></A>
-</P>
-
-<P><I>Si l'on vous demande de vous identifier, utilisez votre nom d'utilisateur et
-votre mot de passe UNIX ou bien identifiez-vous en tant que "root".</I></P>
-
-<H2 CLASS="title">À propos de CUPS</H2>
-
-<P>
-<IMG SRC="/images/happy.gif" ALIGN="LEFT" WIDTH="196" HEIGHT="144"
-STYLE="padding-right: 10px;" ALT="Ordinateur content et imprimante">
-
-<A HREF="http://www.easysw.com/"><IMG SRC="/images/esp-logo.gif"
-ALIGN="RIGHT" WIDTH="110" HEIGHT="68" BORDER="0"
-STYLE="padding-left: 10px; padding-bottom: 10px;"
-ALT="Easy Software Products"></A>
-
-CUPS propose une interface portable pour l'impression sur les systèmes
-UNIX<SUP>&reg;</SUP>. Ce logiciel est développé et maintenu par <A HREF="http://www.easysw.com">Easy Software
-Products</a> afin de promouvoir une solution standard pour l'impression. CUPS
-est le système d'impression standard de MacOS<SUP>&reg;</SUP> X et de la
-plupart des distributions Linux<SUP>&reg;</SUP>.</P>
-
-<P>CUPS repose sur le protocole <A HREF="http://www.pwg.org/ipp/"
-TARGET="_blank">IPP ( Internet Printing Protocol )</A> pour la gestion des tâches
-d'impression et, pour être utilisable en pratique, y ajoute la détection
-d'imprimantes en réseau et des options d'impression fondées sur le format PPD (
-PostScript Printer Description ).<BR CLEAR="ALL"></P>
-
-<H2 CLASS="title">Pilotes d'imprimante et Assistance</H2>
-
-<P>Visitez le site officiel de CUPS pour avoir des pilotes d'imprimante ou toute
-autre assistance:</P>
-
-<PRE>
-    <A HREF="http://www.cups.org/" TARGET="_blank">www.cups.org</A>
-</PRE>
-
-<P>Vous pouvez obtenir un suivi commercial et une version améliorée de CUPS, <A
-HREF="http://www.easysw.com/printpro/">ESP Print Pro</A>, à l'adresse suivante:</P>
-
-<PRE>
-    <A HREF="http://www.easysw.com/" TARGET="_blank">www.easysw.com</A>
-</PRE>
-
-</TD>
-<TD WIDTH="15">&nbsp;</TD>
-</TR>
-<TR CLASS="header">
-<TD VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-left.gif"
-WIDTH="15" HEIGHT="15" ALT=""></TD>
-<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
-
-<P><SMALL>Le logiciel CUPS ( Common UNIX Printing System ) et son logo sont
-propriété commerciale de <A HREF="http://www.easysw.com">Easy Software
-Products</A>. CUPS est sous copyright 1997-2006 par Easy Software Products, Tous
-Droits Réservés.</SMALL></P>
-
-</TD>
-
-<TD ALIGN="RIGHT" VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-right.gif"
-WIDTH="15" HEIGHT="15" ALT=""></TD>
-</TR>
-</TABLE>
-</BODY>
-</HTML>
index 6fbd8a3a1d252d31dae3e4d51f43fcdfe5b8ce38..160b3ff4703a915264396ba9f5641d506af05fbf 100644 (file)
@@ -85,6 +85,8 @@ library:</p>
        <li><a href='#cupsArrayDup'><tt>cupsArrayDup()</tt></a> </li>
        <li><a href='#cupsArrayFind'><tt>cupsArrayFind()</tt></a> </li>
        <li><a href='#cupsArrayFirst'><tt>cupsArrayFirst()</tt></a> </li>
+       <li><a href='#cupsArrayGetIndex'><tt>cupsArrayGetIndex()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
+       <li><a href='#cupsArrayGetInsert'><tt>cupsArrayGetInsert()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
        <li><a href='#cupsArrayIndex'><tt>cupsArrayIndex()</tt></a> </li>
        <li><a href='#cupsArrayInsert'><tt>cupsArrayInsert()</tt></a> </li>
        <li><a href='#cupsArrayLast'><tt>cupsArrayLast()</tt></a> </li>
@@ -249,6 +251,46 @@ cupsArrayFirst(
 <h4>Returns</h4>
 <p>First element or NULL</p>
 <!-- NEW PAGE -->
+<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsArrayGetIndex'>cupsArrayGetIndex()</a></h3>
+<h4>Description</h4>
+<p>Get the index of the current element.
+
+</p>
+<h4>Syntax</h4>
+<pre>
+int
+cupsArrayGetIndex(
+    <a href='#cups_array_t'>cups_array_t</a> * a);
+</pre>
+<h4>Arguments</h4>
+<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>a</tt></td><td>Array</td></tr>
+</tbody></table></div>
+<h4>Returns</h4>
+<p>Index of the current element</p>
+<!-- NEW PAGE -->
+<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsArrayGetInsert'>cupsArrayGetInsert()</a></h3>
+<h4>Description</h4>
+<p>Get the index of the last inserted element.
+
+</p>
+<h4>Syntax</h4>
+<pre>
+int
+cupsArrayGetInsert(
+    <a href='#cups_array_t'>cups_array_t</a> * a);
+</pre>
+<h4>Arguments</h4>
+<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>a</tt></td><td>Array</td></tr>
+</tbody></table></div>
+<h4>Returns</h4>
+<p>Index of the last inserted element</p>
+<!-- NEW PAGE -->
 <h3 class='title'><a name='cupsArrayIndex'>cupsArrayIndex()</a></h3>
 <h4>Description</h4>
 <p>Get the N-th element in the array.</p>
index 7466fa32221a0473e16579066e5a1025ab1e690c..fafea61490bd4d604dcb198bc31d4bbad11a58d5 100644 (file)
@@ -158,8 +158,10 @@ CUPS 1.1 or higher.</p>
        <li><a href='#cupsPrintFiles2'><tt>cupsPrintFiles2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
        <li><a href='#cupsPutFd'><tt>cupsPutFd()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
        <li><a href='#cupsPutFile'><tt>cupsPutFile()</tt></a> <span class='info'>&nbsp;CUPS 1.1.20&nbsp;</span></li>
+       <li><a href='#cupsRemoveDest'><tt>cupsRemoveDest()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
        <li><a href='#cupsRemoveOption'><tt>cupsRemoveOption()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
        <li><a href='#cupsServer'><tt>cupsServer()</tt></a> </li>
+       <li><a href='#cupsSetDefaultDest'><tt>cupsSetDefaultDest()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
        <li><a href='#cupsSetDests'><tt>cupsSetDests()</tt></a> </li>
        <li><a href='#cupsSetDests2'><tt>cupsSetDests2()</tt></a> <span class='info'>&nbsp;CUPS 1.1.21&nbsp;</span></li>
        <li><a href='#cupsSetEncryption'><tt>cupsSetEncryption()</tt></a> </li>
@@ -1034,6 +1036,37 @@ cupsPutFile(
 <h4>Returns</h4>
 <p>HTTP status</p>
 <!-- NEW PAGE -->
+<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsRemoveDest'>cupsRemoveDest()</a></h3>
+<h4>Description</h4>
+<p>Remove a destination from the destination list.
+
+Removing a destination/instance does not delete the class or printer
+queue, merely the lpoptions for that destination/instance.  Use the
+cupsSetDests() or cupsSetDests2() functions to save the new options
+for the user.
+
+</p>
+<h4>Syntax</h4>
+<pre>
+int
+cupsRemoveDest(
+    const char * name,
+    const char * instance,
+    int num_dests,
+    <a href='#cups_dest_t'>cups_dest_t</a> ** dests);
+</pre>
+<h4>Arguments</h4>
+<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>name</tt></td><td>Destination name</td></tr>
+<tr><td><tt>instance</tt></td><td>Instance name or NULL</td></tr>
+<tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
+<tr><td><tt>dests</tt></td><td>Destinations</td></tr>
+</tbody></table></div>
+<h4>Returns</h4>
+<p>New number of destinations</p>
+<!-- NEW PAGE -->
 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsRemoveOption'>cupsRemoveOption()</a></h3>
 <h4>Description</h4>
 <p>Remove an option from an option array.
@@ -1074,6 +1107,32 @@ cupsServer(void);
 <h4>Returns</h4>
 <p>Server name</p>
 <!-- NEW PAGE -->
+<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsSetDefaultDest'>cupsSetDefaultDest()</a></h3>
+<h4>Description</h4>
+<p>Set the default destination.
+
+</p>
+<h4>Syntax</h4>
+<pre>
+void
+cupsSetDefaultDest(
+    const char * name,
+    const char * instance,
+    int num_dests,
+    <a href='#cups_dest_t'>cups_dest_t</a> * dests);
+</pre>
+<h4>Arguments</h4>
+<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>name</tt></td><td>Destination name</td></tr>
+<tr><td><tt>instance</tt></td><td>Instance name or NULL</td></tr>
+<tr><td><tt>num_dests</tt></td><td>Number of destinations</td></tr>
+<tr><td><tt>dests</tt></td><td>Destinations</td></tr>
+</tbody></table></div>
+<h4>Returns</h4>
+<p>Nothing.</p>
+<!-- NEW PAGE -->
 <h3 class='title'><a name='cupsSetDests'>cupsSetDests()</a></h3>
 <h4>Description</h4>
 <p>Save the list of destinations for the default server.
index 63607f38b2dcf222467f14123b66049f915692e8..dcf032034e5ed48636ae25ba5c7419aaf1245148 100644 (file)
@@ -52,6 +52,9 @@ used when writing backends, filters, and port monitors.</p>
 use the <tt>CUPS_BACKEND_</tt> constants and
 <tt>cupsBackChannel</tt> functions, respectively.</p>
 
+<p>The <var>&lt;cups/sidechannel.h&gt;</var> header file must be
+included to use the <tt>CUPS_SC_</tt> constants and <tt>cupsSideChannel</tt> functions.</p>
+
 <p>Programs using these functions must be linked to the CUPS
 library: <var>libcups.a</var>, <var>libcups.so.2</var>,
 <var>libcups.2.dylib</var>, <var>libcups_s.a</var>, or
@@ -63,9 +66,177 @@ library:</p>
 <kbd>gcc -o myprogram myprogram.c -lcups</kbd>
 </pre>
 
+
 <h2 class='title'>Compatibility</h2>
 
-<p>All of these functions require CUPS 1.2 or higher.</p>
+<p>The <tt>cupsBackChannel</tt> functions require CUPS 1.2 or higher. The <tt>cupsSideChannel</tt> functions require CUPS 1.3 or higher.</p>
+
+
+<h2 class='title'>Using the cupsBackChannel APIs</h2>
+
+<p>The <tt>cupsBackChannel</tt> APIs allow your filters, drivers, and port monitors to read data back from a printer and your backends to send data from a printer to the filters, drivers, and port monitors associated with the current job. Back-channel data is normally sent by the printer in response to a command sent from your program to the printer via <tt>stdout</tt>.</p>
+
+<p>The <tt>cupsBackChannelRead()</tt> function reads data from the printer via the backend. You provide a timeout in seconds along with a buffer pointer and the size of that buffer. It returns the number of bytes or -1 if there was an error. The following code example shows how to poll for back-channel data in your program:</p>
+
+<pre class='command'>
+#include &lt;cups/cups.h&gt;
+
+char buffer[8192];
+ssize_t bytes;
+
+/* Use a timeout of 0.0 seconds to poll for back-channel data */
+bytes = cupsBackChannelRead(buffer, sizeof(buffer), 0.0);
+</pre>
+
+<p>If you are writing a backend, the <tt>cupsBackChannelWrite()</tt> function sends any back-channel data you have received from the printer to upstream filters in the print filter chain. We recommend using a timeout of 1.0 seconds:</p>
+
+<pre class='command'>
+#include &lt;cups/cups.h&gt;
+
+char buffer[8192];
+ssize_t bytes;
+
+/* Use a timeout of 1.0 seconds to give filters a chance to read */
+cupsBackChannelWrite(buffer, bytes, 1.0);
+</pre>
+
+
+<h2 class='title'>Using the cupsSideChannel APIs</h2>
+
+<p>The <tt>cupsSideChannel</tt> APIs allow your filters, drivers, port monitors, and backend to send and receive the following out-of-band commands:</p>
+
+<ul>
+
+       <li><tt>CUPS_SC_CMD_SOFT_RESET</tt> -  Do a soft reset</li>
+       <li><tt>CUPS_SC_CMD_DRAIN_OUTPUT</tt> -  Drain all pending output</li>
+       <li><tt>CUPS_SC_CMD_GET_BIDI</tt> -  Return bidirectional capabilities</li>
+       <li><tt>CUPS_SC_CMD_GET_DEVICE_ID</tt> -  Return the IEEE-1284 device ID</li>
+       <li><tt>CUPS_SC_CMD_GET_STATE</tt> - Return the device state</li>
+
+</ul>
+
+
+<h3>Sending Commands from a Filter, Driver, or Port Monitor</h3>
+
+<p>The <tt>cupsSideChannelDoRequest()</tt> function is used by filters, drivers, and port monitors to send a command to the backend and read back a response:</p>
+
+<pre class='command'>
+cups_sc_status_t cupsSideChannelDoRequest(cups_sc_command_t command,
+                                          char *data, int *datalen,
+                                          double timeout);
+</pre>
+
+<p>The <tt>CUPS_SC_CMD_SOFT_RESET</tt> and <tt>CUPS_SC_CMD_DRAIN_OUTPUT</tt> commands do not return any data values, while the others return one or more bytes. The <tt>timeout</tt> parameter allows your program to poll or wait for the command to complete - use a timeout of 30 seconds for <tt>CUPS_SC_CMD_SOFT_RESET</tt> and <tt>CUPS_SC_CMD_DRAIN_OUTPUT</tt> and a timeout of 1 second for all other commands.</p>
+
+<p><tt>CUPS_SC_CMD_GET_BIDI</tt> returns a single <tt>char</tt> value that tells you whether the backend supports bidirectional communications:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+char data;
+int datalen;
+cups_sc_bidi_t bidi;
+cups_sc_status_t status;
+
+/* Tell cupsSideChannelDoRequest() how big our buffer is... */
+datalen = 1;
+
+/* Get the bidirectional capabilities, waiting for up to 1 second */
+status  = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_BIDI, &amp;data, &amp;datalen, 1.0);
+
+/* Use the returned value if OK was returned and the length is still 1 */
+if (status == CUPS_SC_STATUS_OK && datalen == 1)
+  bidi = (cups_sc_bidi_t)data;
+else
+  bidi = CUPS_SC_BIDI_NOT_SUPPORTED;
+</pre>
+
+<p><tt>CUPS_SC_CMD_GET_DEVICE_ID</tt> returns a string of characters containing the IEEE-1284 device ID for the connected printer:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+char data[2049];
+int datalen;
+cups_sc_status_t status;
+
+/* Tell cupsSideChannelDoRequest() how big our buffer is, less 1 byte for nul-termination... */
+datalen = sizeof(data) - 1;
+
+/* Get the IEEE-1284 device ID, waiting for up to 1 second */
+status  = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_DEVICE_ID, data, &amp;datalen, 1.0);
+
+/* Use the returned value if OK was returned and the length is non-zero */
+if (status == CUPS_SC_STATUS_OK && datalen > 0)
+  data[datalen] = '\0';
+else
+  data[0] = '\0';
+</pre>
+
+<p><tt>CUPS_SC_CMD_GET_STATE</tt> returns a single <tt>char</tt> value that tells you the current device state:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+char data;
+int datalen;
+cups_sc_state_t state;
+cups_sc_status_t status;
+
+/* Tell cupsSideChannelDoRequest() how big our buffer is... */
+datalen = 1;
+
+/* Get the bidirectional capabilities, waiting for up to 1 second */
+status  = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_STATE, &amp;data, &amp;datalen, 1.0);
+
+/* Use the returned value if OK was returned and the length is still 1 */
+if (status == CUPS_SC_STATUS_OK && datalen == 1)
+  state = (cups_sc_state_t)data;
+else
+  state = CUPS_SC_STATE_OFFLINE;
+</pre>
+
+
+<h3>Handling Commands in your Backend</h3>
+
+<p>The <tt>cupsSideChannelRead()</tt> function is used by backends to read a command from a filter, driver, or port monitor:</p>
+
+<pre class='command'>
+int cupsSideChannelRead(cups_sc_command_t &amp;command,
+                        cups_sc_status_t  &amp;status,
+                        char *data, int *datalen, double timeout);
+</pre>
+
+<p>Backends can either poll for commands using a <tt>timeout</tt> of 0.0, wait indefinitely for commands using a <tt>timeout</tt> of -1.0 (probably in a separate thread for that purpose), or use <tt>select()</tt> or <tt>poll()</tt> on the <tt>CUPS_SC_FD</tt> file descriptor (4) to handle input and output on several file descriptors at the same time. Backends can pass <tt>NULL</tt> for the <tt>data</tt> and <tt>datalen</tt> parameters, since none of the commands sent by upstream filters contain any data at this time.</p>
+
+<p>Once a command is processed, the backend uses the <tt>cupsSideChannelWrite()</tt> function to send its response:</p>
+
+<pre class='command'>
+#include &lt;cups/sidechannel.h&gt;
+
+cups_sc_command_t command;
+cups_sc_status_t status;
+
+/* Poll for a command... */
+if (!cupsSideChannelRead(&amp;command, &amp;status, NULL, NULL, 0.0))
+{
+  char data[2048];
+  int datalen;
+
+  switch (command)
+  {
+    ... handle supported commands, file data/datalen/status with values as needed ...
+
+    default :
+        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+       datalen = 0;
+       break;
+  }
+
+  /* Send a response... */
+  cupsSideChannelWrite(command, status, data, datalen, 1.0);
+}
+</pre>
 <h2 class='title'>Contents</h2>
 <ul>
        <li><a href='#FUNCTIONS'>Functions</a></li>
@@ -75,6 +246,9 @@ library:</p>
 <ul>
        <li><a href='#cupsBackChannelRead'><tt>cupsBackChannelRead()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
        <li><a href='#cupsBackChannelWrite'><tt>cupsBackChannelWrite()</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
+       <li><a href='#cupsSideChannelDoRequest'><tt>cupsSideChannelDoRequest()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
+       <li><a href='#cupsSideChannelRead'><tt>cupsSideChannelRead()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
+       <li><a href='#cupsSideChannelWrite'><tt>cupsSideChannelWrite()</tt></a> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></li>
 </ul>
 <!-- NEW PAGE -->
 <h3 class='title'><span class='info'>&nbsp;CUPS 1.2&nbsp;</span><a name='cupsBackChannelRead'>cupsBackChannelRead()</a></h3>
@@ -134,5 +308,109 @@ cupsBackChannelWrite(
 </tbody></table></div>
 <h4>Returns</h4>
 <p>Bytes written or -1 on error</p>
+<!-- NEW PAGE -->
+<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsSideChannelDoRequest'>cupsSideChannelDoRequest()</a></h3>
+<h4>Description</h4>
+<p>Send a side-channel command to a backend and wait for a response.
+
+This function is normally only called by filters, drivers, or port
+monitors in order to communicate with the backend used by the current
+printer.  Programs must be prepared to handle timeout or &quot;not
+implemented&quot; status codes, which indicate that the backend or device
+do not support the specified side-channel command.
+
+The &quot;datalen&quot; parameter must be initialized to the size of the buffer
+pointed to by the &quot;data&quot; parameter.  cupsSideChannelDoRequest() will
+update the value to contain the number of data bytes in the buffer.
+
+</p>
+<h4>Syntax</h4>
+<pre>
+<a href='#cups_sc_status_t'>cups_sc_status_t</a>
+cupsSideChannelDoRequest(
+    cups_sc_command_t command,
+    char * data,
+    int * datalen,
+    double timeout);
+</pre>
+<h4>Arguments</h4>
+<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>command</tt></td><td>Command to send</td></tr>
+<tr><td><tt>data</tt></td><td>Response data buffer pointer</td></tr>
+<tr><td><tt>datalen</tt></td><td>Size of data buffer on entry, number of bytes in buffer on return</td></tr>
+<tr><td><tt>timeout</tt></td><td>Timeout in seconds</td></tr>
+</tbody></table></div>
+<h4>Returns</h4>
+<p>Status of command</p>
+<!-- NEW PAGE -->
+<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsSideChannelRead'>cupsSideChannelRead()</a></h3>
+<h4>Description</h4>
+<p>Read a side-channel message.
+
+This function is normally only called by backend programs to read
+commands from a filter, driver, or port monitor program.  The
+caller must be prepared to handle incomplete or invalid messages
+and return the corresponding status codes.
+
+The &quot;datalen&quot; parameter must be initialized to the size of the buffer
+pointed to by the &quot;data&quot; parameter.  cupsSideChannelDoRequest() will
+update the value to contain the number of data bytes in the buffer.
+
+</p>
+<h4>Syntax</h4>
+<pre>
+int
+cupsSideChannelRead(
+    cups_sc_command_t * command,
+    <a href='#cups_sc_status_t'>cups_sc_status_t</a> * status,
+    char * data,
+    int * datalen,
+    double timeout);
+</pre>
+<h4>Arguments</h4>
+<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>command</tt></td><td>Command code</td></tr>
+<tr><td><tt>status</tt></td><td>Status code</td></tr>
+<tr><td><tt>data</tt></td><td>Data buffer pointer</td></tr>
+<tr><td><tt>datalen</tt></td><td>Size of data buffer on entry, number of bytes in buffer on return</td></tr>
+<tr><td><tt>timeout</tt></td><td>Timeout in seconds</td></tr>
+</tbody></table></div>
+<h4>Returns</h4>
+<p>0 on success, -1 on error</p>
+<!-- NEW PAGE -->
+<h3 class='title'><span class='info'>&nbsp;CUPS 1.3&nbsp;</span><a name='cupsSideChannelWrite'>cupsSideChannelWrite()</a></h3>
+<h4>Description</h4>
+<p>Write a side-channel message.
+
+This function is normally only called by backend programs to send
+responses to a filter, driver, or port monitor program.
+
+</p>
+<h4>Syntax</h4>
+<pre>
+int
+cupsSideChannelWrite(
+    cups_sc_command_t command,
+    <a href='#cups_sc_status_t'>cups_sc_status_t</a> status,
+    const char * data,
+    int datalen,
+    double timeout);
+</pre>
+<h4>Arguments</h4>
+<div class='table'><table align='center' border='1' width='80%' cellpadding='5' cellspacing='0'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>command</tt></td><td>Command code</td></tr>
+<tr><td><tt>status</tt></td><td>Status code</td></tr>
+<tr><td><tt>data</tt></td><td>Data buffer pointer</td></tr>
+<tr><td><tt>datalen</tt></td><td>Number of bytes of data</td></tr>
+<tr><td><tt>timeout</tt></td><td>Timeout in seconds</td></tr>
+</tbody></table></div>
+<h4>Returns</h4>
+<p>0 on success, -1 on error</p>
 </body>
 </html>
index 43c538560c1a8a1b99912fdc1cf9ee872bc86d3b..3d756b672333073a5940c5e1ce9aaf9b9fe47ac7 100644 (file)
@@ -101,6 +101,7 @@ require CUPS 1.1 or higher.</p>
 <tr><td><tt>HTTP_AUTH_MD5_INT</tt> </td><td>Digest authentication in use for body</td></tr>
 <tr><td><tt>HTTP_AUTH_MD5_SESS</tt> </td><td>MD5-session authentication in use</td></tr>
 <tr><td><tt>HTTP_AUTH_MD5_SESS_INT</tt> </td><td>MD5-session authentication in use for body</td></tr>
+<tr><td><tt>HTTP_AUTH_NEGOTIATE</tt> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></td><td>GSSAPI authentication in use </td></tr>
 <tr><td><tt>HTTP_AUTH_NONE</tt> </td><td>No authentication in use</td></tr>
 </tbody></table></div>
 <!-- NEW PAGE -->
@@ -3011,7 +3012,7 @@ typedef enum <a href='#http_encryption_e'>http_encryption_e</a> http_encryption_
 <!-- NEW PAGE -->
 <h3 class='title'><a name='http_t'>http_t</a></h3>
 <h4>Description</h4>
-<p>HTTP connection structure.</p>
+<p>HTTP connection type</p>
 <h4>Definition</h4>
 <pre>
 typedef struct _http_s http_t;
index 26ea439f4a228eb00920322173866411bf2cd419..19262f39b64046072c574c18adf29f727abb0604 100644 (file)
@@ -87,11 +87,18 @@ information.</p>
 <ul>
        <li><a href='#cups_adv_e'><tt>cups_adv_e</tt></a> </li>
        <li><a href='#cups_bool_e'><tt>cups_bool_e</tt></a> </li>
+       <li><a href='#cups_cspace_e'><tt>cups_cspace_e</tt></a> </li>
+       <li><a href='#cups_cut_e'><tt>cups_cut_e</tt></a> </li>
+       <li><a href='#cups_edge_e'><tt>cups_edge_e</tt></a> </li>
+       <li><a href='#cups_jog_e'><tt>cups_jog_e</tt></a> </li>
+       <li><a href='#cups_mode_e'><tt>cups_mode_e</tt></a> </li>
+       <li><a href='#cups_order_e'><tt>cups_order_e</tt></a> </li>
+       <li><a href='#cups_orient_e'><tt>cups_orient_e</tt></a> </li>
 </ul>
 <!-- NEW PAGE -->
 <h3 class='title'><a name='cups_adv_e'>cups_adv_e</a></h3>
 <h4>Description</h4>
-<p>AdvanceMedia attribute values</p>
+<p></p>
 <h4>Values</h4>
 <div class='table'><table align='center' border='1' width='80%'>
 <thead><tr><th>Name</th><th>Description</th></tr></thead>
@@ -114,6 +121,126 @@ information.</p>
 <tr><td><tt>CUPS_TRUE</tt> </td><td>Logical true</td></tr>
 </tbody></table></div>
 <!-- NEW PAGE -->
+<h3 class='title'><a name='cups_cspace_e'>cups_cspace_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_CSPACE_CIELab</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>CIE Lab </td></tr>
+<tr><td><tt>CUPS_CSPACE_CIEXYZ</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>CIE XYZ </td></tr>
+<tr><td><tt>CUPS_CSPACE_CMY</tt> </td><td>Cyan, magenta, yellow</td></tr>
+<tr><td><tt>CUPS_CSPACE_CMYK</tt> </td><td>Cyan, magenta, yellow, black</td></tr>
+<tr><td><tt>CUPS_CSPACE_GMCK</tt> </td><td>Gold, magenta, yellow, black</td></tr>
+<tr><td><tt>CUPS_CSPACE_GMCS</tt> </td><td>Gold, magenta, yellow, silver</td></tr>
+<tr><td><tt>CUPS_CSPACE_GOLD</tt> </td><td>Gold foil</td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC1</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 1 color </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC2</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 2 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC3</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 3 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC4</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 4 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC5</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 5 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC6</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 6 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC7</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 7 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC8</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 8 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICC9</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 9 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCA</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 10 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCB</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 11 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCC</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 12 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCD</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 13 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCE</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 14 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_ICCF</tt> <span class='info'>&nbsp;CUPS 1.1.19&nbsp;</span></td><td>ICC-based, 15 colors </td></tr>
+<tr><td><tt>CUPS_CSPACE_K</tt> </td><td>Black</td></tr>
+<tr><td><tt>CUPS_CSPACE_KCMY</tt> </td><td>Black, cyan, magenta, yellow</td></tr>
+<tr><td><tt>CUPS_CSPACE_KCMYcm</tt> </td><td>Black, cyan, magenta, yellow, *
+light-cyan, light-magenta</td></tr>
+<tr><td><tt>CUPS_CSPACE_RGB</tt> </td><td>Red, green, blue</td></tr>
+<tr><td><tt>CUPS_CSPACE_RGBA</tt> </td><td>Red, green, blue, alpha</td></tr>
+<tr><td><tt>CUPS_CSPACE_RGBW</tt> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></td><td>Red, green, blue, white </td></tr>
+<tr><td><tt>CUPS_CSPACE_SILVER</tt> </td><td>Silver foil</td></tr>
+<tr><td><tt>CUPS_CSPACE_W</tt> </td><td>Luminance</td></tr>
+<tr><td><tt>CUPS_CSPACE_WHITE</tt> </td><td>White ink (as black)</td></tr>
+<tr><td><tt>CUPS_CSPACE_YMC</tt> </td><td>Yellow, magenta, cyan</td></tr>
+<tr><td><tt>CUPS_CSPACE_YMCK</tt> </td><td>Yellow, magenta, cyan, black</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_cut_e'>cups_cut_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_CUT_FILE</tt> </td><td>Cut the roll after this file</td></tr>
+<tr><td><tt>CUPS_CUT_JOB</tt> </td><td>Cut the roll after this job</td></tr>
+<tr><td><tt>CUPS_CUT_NONE</tt> </td><td>Never cut the roll</td></tr>
+<tr><td><tt>CUPS_CUT_PAGE</tt> </td><td>Cut the roll after this page</td></tr>
+<tr><td><tt>CUPS_CUT_SET</tt> </td><td>Cut the roll after this set</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_edge_e'>cups_edge_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_EDGE_BOTTOM</tt> </td><td>Leading edge is the bottom of the page</td></tr>
+<tr><td><tt>CUPS_EDGE_LEFT</tt> </td><td>Leading edge is the left of the page</td></tr>
+<tr><td><tt>CUPS_EDGE_RIGHT</tt> </td><td>Leading edge is the right of the page</td></tr>
+<tr><td><tt>CUPS_EDGE_TOP</tt> </td><td>Leading edge is the top of the page</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_jog_e'>cups_jog_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_JOG_FILE</tt> </td><td>Move pages after this file</td></tr>
+<tr><td><tt>CUPS_JOG_JOB</tt> </td><td>Move pages after this job</td></tr>
+<tr><td><tt>CUPS_JOG_NONE</tt> </td><td>Never move pages</td></tr>
+<tr><td><tt>CUPS_JOG_SET</tt> </td><td>Move pages after this set</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_mode_e'>cups_mode_e</a></h3>
+<h4>Description</h4>
+<p>Raster modes</p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_RASTER_READ</tt> </td><td>Open stream for reading</td></tr>
+<tr><td><tt>CUPS_RASTER_WRITE</tt> </td><td>Open stream for writing</td></tr>
+<tr><td><tt>CUPS_RASTER_WRITE_COMPRESSED</tt> <span class='info'>&nbsp;CUPS 1.3&nbsp;</span></td><td>Open stream for compressed writing </td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_order_e'>cups_order_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_ORDER_BANDED</tt> </td><td>CCC MMM YYY KKK ...</td></tr>
+<tr><td><tt>CUPS_ORDER_CHUNKED</tt> </td><td>CMYK CMYK CMYK ...</td></tr>
+<tr><td><tt>CUPS_ORDER_PLANAR</tt> </td><td>CCC ... MMM ... YYY ... KKK ...</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
+<h3 class='title'><a name='cups_orient_e'>cups_orient_e</a></h3>
+<h4>Description</h4>
+<p></p>
+<h4>Values</h4>
+<div class='table'><table align='center' border='1' width='80%'>
+<thead><tr><th>Name</th><th>Description</th></tr></thead>
+<tbody>
+<tr><td><tt>CUPS_ORIENT_0</tt> </td><td>Don't rotate the page</td></tr>
+<tr><td><tt>CUPS_ORIENT_180</tt> </td><td>Turn the page upside down</td></tr>
+<tr><td><tt>CUPS_ORIENT_270</tt> </td><td>Rotate the page clockwise</td></tr>
+<tr><td><tt>CUPS_ORIENT_90</tt> </td><td>Rotate the page counter-clockwise</td></tr>
+</tbody></table></div>
+<!-- NEW PAGE -->
 <h2 class='title'><a name='FUNCTIONS'>Functions</a></h2>
 <ul>
        <li><a href='#cupsRasterClose'><tt>cupsRasterClose()</tt></a> </li>
@@ -160,10 +287,6 @@ can make changes to the cups_page_header2_t data as needed to use a
 supported raster format and then returns 0 on success and -1 if the
 requested attributes cannot be supported.
 
-cupsRasterInterpretPPD() supports a subset of the PostScript language.
-Currently only the [, ], &lt;&lt;, &gt;&gt;, {, }, cleartomark, copy, dup, index,
-pop, roll, setpagedevice, and stopped operators are supported.
-
 </p>
 <h4>Syntax</h4>
 <pre>
@@ -463,7 +586,7 @@ factor not applied) </td></tr>
 <!-- NEW PAGE -->
 <h3 class='title'><a name='cups_page_header_s'>cups_page_header_s</a></h3>
 <h4>Description</h4>
-<p>Version 1 Page Header</p>
+<p></p>
 <h4>Definition</h4>
 <pre>
 struct cups_page_header_s
@@ -558,7 +681,6 @@ struct cups_page_header_s
 <ul>
        <li><a href='#cups_interpret_cb_t'><tt>cups_interpret_cb_t</tt></a> </li>
        <li><a href='#cups_page_header2_t'><tt>cups_page_header2_t</tt></a> <span class='info'>&nbsp;CUPS 1.2&nbsp;</span></li>
-       <li><a href='#cups_page_header_t'><tt>cups_page_header_t</tt></a> </li>
        <li><a href='#cups_raster_t'><tt>cups_raster_t</tt></a> </li>
 </ul>
 <!-- NEW PAGE -->
@@ -578,14 +700,6 @@ typedef int (*cups_interpret_cb_t)(<a href='#cups_page_header2_t'>cups_page_head
 typedef struct <a href='#cups_page_header2_s'>cups_page_header2_s</a> cups_page_header2_t;
 </pre>
 <!-- NEW PAGE -->
-<h3 class='title'><a name='cups_page_header_t'>cups_page_header_t</a></h3>
-<h4>Description</h4>
-<p>Version 1 Page Header</p>
-<h4>Definition</h4>
-<pre>
-typedef struct <a href='#cups_page_header_s'>cups_page_header_s</a> cups_page_header_t;
-</pre>
-<!-- NEW PAGE -->
 <h3 class='title'><a name='cups_raster_t'>cups_raster_t</a></h3>
 <h4>Description</h4>
 <p>Raster stream data</p>
index 224a3938614743499857e45b8ab598f8f545b9e6..96881559d08ac86a4ea4d8314631351e9acb0384 100644 (file)
@@ -131,6 +131,48 @@ Products grants the following special exceptions:</P>
 derived work.</P>
 
 
+<H2 CLASS="title"><A NAME="KERBEROS">Kerberos Support Code</A></H2>
+
+<P>The Kerberos support code ("KSC") is copyright 2006 by Jelmer
+Vernooij and is provided 'as-is', without any express or implied
+warranty. In no event will the author or Easy Software Products
+be held liable for any damages arising from the use of the
+KSC.</P>
+
+<P>Sources files containing KSC have the following text at the top
+of each source file:</P>
+
+<BLOCKQUOTE>This file contains Kerberos support code, copyright
+2006 by Jelmer Vernooij.</BLOCKQUOTE>
+
+<P>The KSC copyright and license apply <EM>only</EM> to
+Kerberos-related feature code in CUPS. Such code is typically
+conditionally compiled based on the present of the
+<TT>HAVE_GSSAPI</TT> preprocessor definition.</P>
+
+<P>Permission is granted to anyone to use the KSC for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following
+restrictions:</P>
+
+<OL>
+
+       <LI>The origin of the KSC must not be misrepresented; you
+       must not claim that you wrote the original software. If
+       you use the KSC in a product, an acknowledgment in the
+       product documentation would be appreciated but is not
+       required.</LI>
+
+       <LI>Altered source versions must be plainly marked as
+       such, and must not be misrepresented as being the
+       original software.</LI>
+
+       <LI>This notice may not be removed or altered from any
+       source distribution.</LI>
+
+</OL>
+
+
 <H2 CLASS="title"><A NAME="TRADEMARKS">Trademarks</A></H2>
 
 <P>Easy Software Products has trademarked the Common UNIX
index 20eac96294d361606bc088faacf9a371c59cc007..90207ba72f915b4a2f92549d0042c8c48d9cdc04 100644 (file)
@@ -38,16 +38,16 @@ encryption settings for the client.</P>
 <PRE CLASS="command">
 ServerName foo.bar.com
 ServerName 11.22.33.44
+ServerName foo.bar.com:8631
 </PRE>
 
 <H3>Description</H3>
 
-<P>The <CODE>ServerName</CODE> directive specifies sets the
-remote server that is to be used for all client operations.  That
-is, it redirects all client requests to the remote server.</P>
+<P>The <CODE>ServerName</CODE> directive specifies sets the remote server that is to be used for all client operations. That is, it redirects all client requests to the remote server.</P>
 
-<P>The default is to use the local server
-("<VAR>localhost</VAR>") or domain socket, if so configured.</P>
+<P>The default port number is 631 but can be overridden by adding a colon followed by the desired port number to the value.</P>
+
+<P>The default is to use the local server ("<VAR>localhost</VAR>") or domain socket, if so configured.</P>
 
 </BODY>
 </HTML>
index ff8058cd552ff3730b5be7c640535e9104669e7f..8e07d06200eb3b810414111742de3434eb89e7da 100644 (file)
@@ -236,6 +236,7 @@ HREF="#Require"><CODE>Require</CODE></A> directive instead.</P>
   AuthType Basic
   AuthType Digest
   AuthType BasicDigest
+  AuthType Negotiate
 &lt;/Location&gt;
 </PRE>
 
@@ -260,12 +261,15 @@ authentication to perform:</P>
        should be performed using the
        <VAR>/etc/cups/passwd.md5</VAR> file</LI>
 
+       <LI><CODE>Negotiate</CODE> - Kerberos authentication
+       should be performed</LI>
+
 </UL>
 
-<P>When using <CODE>Basic</CODE>, <CODE>Digest</CODE>, or
-<CODE>BasicDigest</CODE> authentication, clients connecting
-through the <CODE>localhost</CODE> interface can also
-authenticate using certificates.</P>
+<P>When using <CODE>Basic</CODE>, <CODE>Digest</CODE>,
+<CODE>BasicDigest</CODE>, or <CODE>Negotiate</CODE> authentication,
+clients connecting through the <CODE>localhost</CODE> interface can
+also authenticate using certificates.</P>
 
 <P>The <CODE>AuthType</CODE> directive must appear inside a <A
 HREF="#Location"><CODE>Location</CODE></A> or <A
@@ -856,6 +860,7 @@ for data files.</P>
 DefaultAuthType Basic
 DefaultAuthType BasicDigest
 DefaultAuthType Digest
+DefaultAuthType Negotiate
 </PRE>
 
 <H3>Description</H3>
@@ -1184,6 +1189,20 @@ system-specific but is usually <CODE>lp</CODE> or
 <CODE>nobody</CODE>.</P>
 
 
+<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3</SPAN><A NAME="GSSServiceName">GSSServiceName</A></H2>
+
+<H3>Examples</H3>
+
+<PRE CLASS="command">
+GSSServiceName IPP
+GSSServiceName HTTP
+</PRE>
+
+<H3>Description</H3>
+
+<P>The <CODE>GSSServiceName</CODE> directive specifies the Kerberos service name that is used when passing authorization tickets. The default name is <CODE>IPP</CODE>.</P>
+
+
 <H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.10</SPAN><A NAME="HideImplicitMembers">HideImplicitMembers</A></H2>
 
 <H3>Examples</H3>
index 47a2a5ac50b34a4242f4094c49f3e27f41e629d9..fb5b1ebc26d86827b4c6e228990596af87708d66 100644 (file)
@@ -11,7 +11,7 @@
 
   CUPS IPP specification for the Common UNIX Printing System (CUPS).
 
-  Copyright 1997-2006 by Easy Software Products.
+  Copyright 1997-2007 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
   property of Easy Software Products and are protected by Federal
@@ -359,6 +359,10 @@ Print-Job request:
 
 <dl>
 
+       <dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3</span>
+
+       <dd>The client OPTIONALLY supplies one or more authentication values as specified by the "auth-info-required" attribute.
+
        <dt>"job-billing" (text(MAX)):<span class='info'>CUPS 1.1</span>
 
        <dd>The client OPTIONALLY supplies a billing string that is logged
@@ -423,6 +427,16 @@ Response:
 
 </dl>
 
+<p>Group 3: Unsupported Attributes (status=client-eror-attributes-or-values-not-supported)
+
+<dl>
+
+       <dt>auth-info-required (1setOf Type2 keyword)
+
+       <dd>The required authentication information.
+
+</dl
+
 <h3 class='title'><span class='info'>CUPS 1.1</span><a name='CREATE_JOB'>Create-Job Operation</a></h3>
 
 <p>The Create-Job operation (0x0005) creates a new, empty print job.
@@ -452,6 +466,10 @@ Create-Job request:
 
 <dl>
 
+       <dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3</span>
+
+       <dd>The client OPTIONALLY supplies one or more authentication values as specified by the "auth-info-required" attribute.
+
        <dt>"job-billing" (text(MAX)):<span class='info'>CUPS 1.1</span>
 
        <dd>The client OPTIONALLY supplies a billing string that is logged
@@ -514,6 +532,16 @@ Create-Job Response:
 
 </dl>
 
+<p>Group 3: Unsupported Attributes (status=client-eror-attributes-or-values-not-supported)
+
+<dl>
+
+       <dt>auth-info-required (1setOf Type2 keyword)
+
+       <dd>The required authentication information.
+
+</dl
+
 <h3 class='title'><span class='info'>CUPS 1.1</span><a name='SET_JOB_ATTRIBUTES'>Set-Job-Attributes Operation</a></h3>
 
 <p>The Set-Job-Attributes operation (0x0014) changes the attributes of
@@ -604,7 +632,7 @@ subscription for printer or server event notifications. CUPS
 provides several additional events in addition to the standard
 events in the IPP notifications specification.</p>
 
-<h4> Request</h4>
+<h4>Create-Printer-Subscription Request</h4>
 
 <p>The following groups of attributes are supplied as part of the
 request:</p>
@@ -657,7 +685,7 @@ request:</p>
 
 </dl>
 
-<h4> Response</h4>
+<h4>Create-Printer-Subscription Response</h4>
 
 <p>The following groups of attributes are send as part of the
 response:</p>
@@ -864,6 +892,10 @@ CUPS-Add-Modify-Printer request:
 
 <dl>
 
+       <dt>"auth-info-required" (1setOf type2 keyword):<span class='info'>CUPS 1.3</span>
+
+       <dd>The client OPTIONALLY supplies one or more authentication keywords that are required to communicate with the printer/remote queue.
+
        <dt>"job-sheets-default" (1setOf name(127)): <span
        class='info'>CUPS 1.1.7</span>
 
@@ -1109,6 +1141,10 @@ CUPS-Add-Modify-Class request:
 
 <dl>
 
+       <dt>"auth-info-required" (1setOf type2 keyword):<span class='info'>CUPS 1.3</span>
+
+       <dd>The client OPTIONALLY supplies one or more authentication keywords that are required to communicate with the printer/remote queue.
+
        <dt>"member-uris" (1setof uri):
 
        <dd>The client OPTIONALLY supplies the "member-uris" set
@@ -1608,6 +1644,16 @@ CUPS-Authenticate-Job request:
 
 </dl>
 
+<p>Group 2: Job Attributes
+
+<dl>
+
+       <dt>"auth-info" (1setOf text(MAX)):<span class='info'>CUPS 1.3</span>
+
+       <dd>The client OPTIONALLY supplies one or more authentication values as specified by the "auth-info-required" attribute.
+
+</dl>
+
 <h4>CUPS-Authenticate-Job Response</h4>
 
 <p>The following groups of attributes are send as part of the
@@ -1629,6 +1675,16 @@ CUPS-Authenticate-Job Response:
 
 </dl>
 
+<p>Group 2: Unsupported Attributes (status=client-eror-attributes-or-values-not-supported)
+
+<dl>
+
+       <dt>auth-info-required (1setOf Type2 keyword)
+
+       <dd>The required authentication information.
+
+</dl
+
 <h2 class='title'><a name='ATTRIBUTES'>Attributes</a></h2>
 
 <p>CUPS provides many extension attributes to support multiple
@@ -1641,7 +1697,7 @@ classes.</p>
 operation and enumerate all of the available hardware devices and
 network protocols that are supported by the server.</p>
 
-<h4>device-class (type2 keyword)</h4>
+<h4><a name="device-class">device-class (type2 keyword)</a></h4>
 
 <p>The device-class attribute specifies the class of device and can be
 one of the following:
@@ -1661,24 +1717,24 @@ one of the following:
 
 </ul>
 
-<h4>device-id (text(127))</h4>
+<h4><a name="device-id">device-id (text(127))</a><span class="info">CUPS 1.2</span></h4>
 
 <p>The device-id attribute specifies the IEEE-1284 device ID
 string for the device.</p>
 
-<h4>device-info (text(127))</h4>
+<h4><a name="device-info">device-info (text(127))</a></h4>
 
 <p>The device-info attribute specifies a human-readable string describing
 the device, e.g. "Parallel Port #1".
 
-<h4>device-make-and-model (text(127))</h4>
+<h4><a name="device-make-and-model">device-make-and-model (text(127))</a></h4>
 
 <p>The device-makr-and-model attribute specifies a device
 identification string provided by the printer connected to the device.
 If the device or printer does not support identification then this
 attribute contains the string "unknown".
 
-<h4>device-uri (uri)</h4>
+<h4><a name="device-uri">device-uri (uri)</a></h4>
 
 <p>The device-uri attribute specifies a unique identifier for the
 device. The actual format of the device-uri string depends on the value
@@ -1726,13 +1782,17 @@ of the device-class attribute:
 
 <h3 class='title'><a name='JOB_TEMPLATE_ATTRIBUTES'>Job Template Attributes</a></h3>
 
-<h4>blackplot (boolean)</h4>
+<h4><a name="auth-info">auth-info (1setOf text(MAX))</a><span class="info">CUPS 1.3</span></h4>
+
+<p>The auth-info attribute specifies the authentication information to use when printing to a remote device. The order and content of each text value is specifed by the <a href="#auth-info-required">auth-info-required</a> printer attribute.
+
+<h4><a name="blackplot">blackplot (boolean)</a></h4>
 
 <p>The blackplot attribute specifies whether HP-GL/2 plot files should be
 rendered entirely in black ink (blackplot=true) or using the colors and shades
 specified in the file (blackplot=false). The default value is false.
 
-<h4>brightness (integer(0:200))</h4>
+<h4><a name="brightness">brightness (integer(0:200))</a></h4>
 
 <p>The brightness attribute specifies the overall brightness of the printed
 output in percent. A brightness of 100 is normal, while 200 is twice as
@@ -1741,24 +1801,24 @@ bright and 50 is half as bright. The default value is 100.
 <p>Brightness is applied to the Cyan, Magenta, Yellow, and Black values using
 the function "f(x) = brightness / 100 * x".
 
-<h4>columns (integer(1:4))</h4>
+<h4><a name="columns">columns (integer(1:4))</a></h4>
 
 <p>The columns attribute specifies the number of columns to generate when
 printing text files. The default value is 1.
 
-<h4>cpi (type2 enum)</h4>
+<h4><a name="cpi">cpi (type2 enum)</a></h4>
 
 <p>The cpi attribute specifies the number of characters per inch when
 printing text files. Only the values 10, 12, and 17 are currently
 supported. The default value is 10.
 
-<h4>fitplot (boolean)</h4>
+<h4><a name="fitplot">fitplot (boolean)</a></h4>
 
 <p>The fitplot attribute specifies whether to scale HP-GL/2 plot files to
 fit on the selected media (fitplot=true) or use the physical scale specified
 in the plot file (fitplot=false). The default value is false.
 
-<h4>gamma (integer(1:10000))</h4>
+<h4><a name="gamma">gamma (integer(1:10000))</a></h4>
 
 <p>The gamma attribute specifies the luminance correction for the output.
 A value of 1000 specifies no correction, while values of 2000 and 500 will
@@ -1768,17 +1828,17 @@ generate lighter and darker output, respectively. The default value is
 <p>Gamma is applied to the Red, Green, and Blue values (or luminance for
 grayscale output) using the function "f(x) = x<SUp>(1000/gamma)</SUp>".
 
-<h4>hue (integer(-180:180))</h4>
+<h4><a name="hue">hue (integer(-180:180))</a></h4>
 
 <p>The hue attribute specifies a color hue rotation when printing image
 files. The default value is 0.
 
-<h4>job-billing (text(MAX))<span class='info'>CUPS 1.1</span></h4>
+<h4><a name="job-billing">job-billing (text(MAX))</a><span class='info'>CUPS 1.1</span></h4>
 
 <p>The job-billing attribute provides a text value to associate with a job
 for billing purposes.
 
-<h4>job-hold-until (keyword | name(MAX))<span class='info'>CUPS 1.1</span></h4>
+<h4><a name="job-hold-until">job-hold-until (keyword | name(MAX))</a><span class='info'>CUPS 1.1</span></h4>
 
 <p>The job-hold-until attribute specifies a hold time. In addition to the
 standard IPP/1.1 keyword names, CUPS supports name values of the form
@@ -1787,7 +1847,7 @@ Greenwich Mean Time (GMT) and <i>not</i> in the local time zone. If the
 specified time is less than the current time, the job is held until the
 next day.
 
-<h4>job-sheets (1setof type3 keyword | name(MAX))<span class='info'>CUPS 1.1</span></h4>
+<h4><a name="job-sheets">job-sheets (1setof type3 keyword | name(MAX))</a><span class='info'>CUPS 1.1</span></h4>
 
 <p>The job-sheets attribute specifies one or two banner files that are printed
 before and after a job. The reserved value of "none" disables banner printing.
@@ -1797,7 +1857,7 @@ The default value is stored in the job-sheets-default attribute.
 If two values are supplied, the first value is used as the starting banner
 file and the second as the ending banner file.
 
-<h4>job-originating-host-name (name(MAX))</h4>
+<h4><a name="job-originating-host-name">job-originating-host-name (name(MAX))</a></h4>
 
 <p><i>(CUPS 1.1.5 and higher)</i>
 
@@ -1809,19 +1869,19 @@ resolution is enabled.  The localhost address (127.0.0.1) is
 
 <p>This attribute is read-only.
 
-<h4>lpi (type2 enum)</h4>
+<h4><a name="lpi">lpi (type2 enum)</a></h4>
 
 <p>The lpi attribute specifies the number of lines per inch when
 printing text files. Only the values 6 and 8 are currently supported.
 The default value is 6.
 
-<h4>mirror (boolean)</h4>
+<h4><a name="mirror">mirror (boolean)</a></h4>
 
 <p>The mirror attribute specifies whether pages are mirrored on
 their X axis, which is useful for printing transfer images on
 special media. The default value is false.
 
-<h4>natural-scaling (integer(1:1000))<span class='info'>CUPS 1.1.9</span></h4>
+<h4><a name="natural-scaling">natural-scaling (integer(1:1000))</a><span class='info'>CUPS 1.1.9</span></h4>
 <p>The natural-scaling attribute specifies the scaling of image files with
 respect to the natural image size. A value of 100 specifies that the image
 file should exactly the natural size, while 50 is half the natural size
@@ -1830,7 +1890,7 @@ and 200 is twice the natural size. The default value is 100.
 <p>The ppi option can be used to override the natural resolution of the
 image, which controls the natural size.
 
-<h4>number-up-layout (type2 keyword)<span class='info'>CUPS 1.1.15</span></h4>
+<h4><a name="number-up-layout">number-up-layout (type2 keyword)</a><span class='info'>CUPS 1.1.15</span></h4>
 <p>The number-up-layout attribute specifies the order each input
 page is placed on each output page. The following keywords are
 presently defined:
@@ -1855,7 +1915,7 @@ presently defined:
 
 </ul>
 
-<h4>page-border (type2 keyword)<span class='info'>CUPS 1.1.15</span></h4>
+<h4><a name="page-border">page-border (type2 keyword)</a><span class='info'>CUPS 1.1.15</span></h4>
 <p>The page-border attribute specifies whether a border is
 draw around each page. The following keywords are presently
 defined:
@@ -1874,44 +1934,44 @@ defined:
 
 </ul>
 
-<h4>page-bottom (integer(0:MAX))</h4>
+<h4><a name="page-bottom">page-bottom (integer(0:MAX))</a></h4>
 
 <p>The page-bottom attribute specifies the bottom margin in points (72 points
 equals 1 inch). The default value is the device physical margin.
 
-<h4>page-label (text(MAX))<span class='info'>CUPS 1.1.7</span></h4>
+<h4><a name="page-label">page-label (text(MAX))</a><span class='info'>CUPS 1.1.7</span></h4>
 <p>The page-label attribute provides a text value to place in
 the header and footer on each page. If a classification level is
 set on the server, then this classification is printed before
 the page label.
 
-<h4>page-left (integer(0:MAX))</h4>
+<h4><a name="page-left">page-left (integer(0:MAX))</a></h4>
 
 <p>The page-left attribute specifies the left margin in points (72 points
 equals 1 inch). The default value is the device physical margin.
 
-<h4>page-right (integer(0:MAX))</h4>
+<h4><a name="page-right">page-right (integer(0:MAX))</a></h4>
 
 <p>The page-right attribute specifies the right margin in points (72 points
 equals 1 inch). The default value is the device physical margin.
 
-<h4>page-set (type2 keyword)</h4>
+<h4><a name="page-set">page-set (type2 keyword)</a></h4>
 
 <p>The page-set attribute specifies which pages to print in a file. The
 supported keywords are "all", "even", and "odd". The default value is
 "all".
 
-<h4>page-top (integer(0:MAX))</h4>
+<h4><a name="page-top">page-top (integer(0:MAX))</a></h4>
 
 <p>The page-top attribute specifies the top margin in points (72 points
 equals 1 inch). The default value is the device physical margin.
 
-<h4>penwidth (integer(0:MAX))</h4>
+<h4><a name="penwidth">penwidth (integer(0:MAX))</a></h4>
 
 <p>The penwidth attribute specifies the default pen width in micrometers
 when printing HP-GL/2 plot files. The default value is 1000 (1 millimeter).
 
-<h4>position (type2 keyword)</h4>
+<h4><a name="position">position (type2 keyword)</a></h4>
 
 <p>The position attribute specifies the location of image files on the
 media. The following keyword values are recognized:
@@ -1943,26 +2003,26 @@ media. The following keyword values are recognized:
 
 </ul>
 
-<h4>ppi (integer(1:MAX))</h4>
+<h4><a name="ppi">ppi (integer(1:MAX))</a></h4>
 
 <p>The ppi attribute specifies the resolution of an image file in pixels
 per inch. The default value is the resolution included with the file or
 128 if no resolution information is available.
 
-<h4>prettyprint (boolean)</h4>
+<h4><a name="prettyprint">prettyprint (boolean)</a></h4>
 
 <p>The prettyprint attribute specifies whether text files should be printed
 with a shaded header and keyword highlighting (prettyprint=true) or without
 additional formatting (prettyprint=false). The default value is false.
 
-<h4>saturation (integer(0:200))</h4>
+<h4><a name="saturation">saturation (integer(0:200))</a></h4>
 
 <p>The saturation attribute specifies the color saturation when
 printing image files. A saturation of 100 is normal, while values of 50
 and 200 will be half and twice as colorful, respectively. The default
 value is 100.
 
-<h4>scaling (integer(1:1000))</h4>
+<h4><a name="scaling">scaling (integer(1:1000))</a></h4>
 
 <p>The scaling attribute specifies the scaling of image files with
 respect to the selected media. A value of 100 specifies that the image
@@ -1971,7 +2031,7 @@ image dimensions. The default value is unspecified.
 
 <p>The scaling attribute overrides the ppi attribute if specified.
 
-<h4>wrap (boolean)</h4>
+<h4><a name="wrap">wrap (boolean)</a></h4>
 
 <p>The wrap attribute specifies whether long lines should be wrapped
 (wrap=true) or not (wrap=false) when printing text files. The default
@@ -1979,32 +2039,32 @@ value is true.
 
 <h3 class='title'><a name='PPD_ATTRIBUTES'>PPD Attributes</a></h3>
 
-<h4>ppd-device-id (text(127))</h4>
+<h4><a name="ppd-device-id">ppd-device-id (text(127))</a></h4>
 
 <p>The ppd-device-id attribute specifies the IEEE-1284 device ID
 string for the device described by the PPD file.</p>
 
-<h4>ppd-natural-language (naturalLanguage)</h4>
+<h4><a name="ppd-natural-scaling">ppd-natural-language (naturalLanguage)</a></h4>
 
 <p>The ppd-natural-language attribute specifies the language encoding
 of the PPD file (the LanguageVersion attribute in the PPD file). If the
 language is unknown or undefined then "en" (English) is assumed.
 
-<h4>ppd-make (text(127))</h4>
+<h4><a name="ppd-make">ppd-make (text(127))</a></h4>
 
 <p>The ppd-make attribute specifies the manufacturer of the printer
 (the Manufacturer attribute in the PPD file). If the manufacturer
 is not specified in the PPD file then an educated guess is made using
 the NickName attribute in the PPD file.
 
-<h4>ppd-make-and-model (text(127))</h4>
+<h4><a name="ppd-make-and-model">ppd-make-and-model (text(127))</a></h4>
 
 <p>The ppd-make-and-model attribute specifies the manufacturer and model
 name of the PPD file (the NickName attribute in the PPD file). If the
 make and model is not specified in the PPD file then the ModelName or
 ShortNickName attributes are used instead.
 
-<h4>ppd-name (name(255))</h4>
+<h4><a name="ppd-name">ppd-name (name(255))</a></h4>
 
 <p>The ppd-name attribute specifies the PPD filename on the server
 relative to the model directory. The forward slash (/) is used to
@@ -2012,31 +2072,47 @@ delineate directories.
 
 <h3 class='title'><a name='PRINTER_ATTRIBUTES'>Printer Attributes</a></h3>
 
-<h4>job-k-limit (integer)<span class='info'>CUPS 1.1</span></h4>
+<h4><a name="auth-info-required">auth-info-required (1setOf type2 keyword)</a><span class="info">CUPS 1.3</span></h4>
+
+<p>The auth-info-required attribute specifies the authentication information that is required for printing a job. The following keywords are recognized:</p>
+
+<ul>
+
+       <li><tt>domain</tt> - A domain name is required.</li>
+
+       <li><tt>none</tt> - No authentication is required - this keyword can only appear by itself.</li>
+
+       <li><tt>password</tt> - A password is required.</li>
+
+       <li><tt>username</tt> - A username is required.</li>
+
+</ul>
+
+<h4><a name="job-k-limit">job-k-limit (integer)</a><span class='info'>CUPS 1.1</span></h4>
 
 <p>The job-k-limit attribute specifies the maximum number of kilobytes that
 may be printed by a user, including banner files. The default value of 0
 specifies that there is no limit.
 
-<h4>job-page-limit (integer)<span class='info'>CUPS 1.1</span></h4>
+<h4><a name="job-page-limit">job-page-limit (integer)</a><span class='info'>CUPS 1.1</span></h4>
 
 <p>The job-page-limit attribute specifies the maximum number of pages that
 may be printed by a user, including banner files. The default value of 0
 specifies that there is no limit.
 
-<h4>job-quota-period (integer)<span class='info'>CUPS 1.1</span></h4>
+<h4><a name="job-quota-period">job-quota-period (integer)</a><span class='info'>CUPS 1.1</span></h4>
 
 <p>The job-quota-period attribute specifies the time period used for quota
 calculations, in seconds. The default value of 0 specifies that the limits
 apply to all jobs that have been printed by a user that are still known to
 the system.
 
-<h4>job-sheets-supported (1setof type3 keyword | name(MAX))<span class='info'>CUPS 1.1</span></h4>
+<h4><a name="job-sheets-completed">job-sheets-supported (1setof type3 keyword | name(MAX))</a><span class='info'>CUPS 1.1</span></h4>
 
 <p>The job-sheets-supported attribute specifies the available banner files.
 There will always be at least one banner file available called "none".
 
-<h4>printer-type (type2 enum)</h4>
+<h4><a name="printer-type">printer-type (type2 enum)</a></h4>
 
 <p>The printer-type attribute specifies printer type and
 capability bits for the printer or class. The default value is
diff --git a/doc/help/spec-pdf.html b/doc/help/spec-pdf.html
new file mode 100644 (file)
index 0000000..862eb0c
--- /dev/null
@@ -0,0 +1,21 @@
+<HTML>
+<!-- SECTION: Specifications -->
+<HEAD>
+       <TITLE>CUPS PDF Format</TITLE>
+       <LINK REL="STYLESHEET" TYPE="test/css" HREF="../cups.css">
+</HEAD>
+<BODY>
+
+<P>CUPS PDF files (application/vnd.cups-pdf) are device-dependent
+PDF/A files that contain a job ticket information. These files
+are typically produced by the CUPS <CODE>pdftopdf</CODE> filter
+which handles job ticket generation, imposition, page labeling,
+scaling, and other formatting options requested by the user. CUPS
+PDF files are intended for direct consumption by a PDF-capable
+printer, PDF RIP, or the <CODE>pdftops</CODE> filter.</P>
+
+<P>More information will be posted here as the PDF workflow
+filters are added to CUPS.</P>
+
+</BODY>
+</HTML>
diff --git a/doc/help/spec-postscript.html b/doc/help/spec-postscript.html
new file mode 100644 (file)
index 0000000..7e9f9a8
--- /dev/null
@@ -0,0 +1,120 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<!-- SECTION: Specifications -->
+<head>
+       <title>Generating PostScript for CUPS</title>
+       <meta name='keywords' content='Programming, PostScript, Document Structuring Conventions'>
+       <link rel='stylesheet' type='text/css' href='../cups.css'>
+</head>
+<body>
+<!--
+  "$Id$"
+
+  CUPS PostScript file specification 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
+-->
+
+<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
+
+<p>This document describes how to generate PostScript output for
+CUPS and is largely based on the <a
+href="http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf">
+Adobe TechNote #5001: PostScript Language Document Structuring
+Conventions Specification Version 3.0</a>. While CUPS can
+generally print any PostScript file, following the rules in the
+Adobe TechNote and this document will ensure that your PostScript
+output will work reliably.</p>
+
+<blockquote><b>Note:</b> While PostScript is currently the
+defacto-standard print job file format/language for UNIX-based
+applications, it is slowly being phased out in favor of Adobe's
+Portable Document Format ("PDF") which offers many advantages
+over PostScript. MacOS X uses PDF as the primary print job file
+format, and we expect Linux to soon follow. Both PostScript and
+PDF are complex formats, and we highly recommend using high-level
+toolkits whenever possible.</blockquote>
+
+<h3>Anatomy of a PostScript File</h3>
+
+<p>PostScript files are ASCII text files starting with a header
+line (<tt>%!PS-Adobe-3.0</tt>) followed by a combination of
+comment lines starting with two percent signs (<tt>%%</tt>) and
+PostScript code lines. The lines themselves should not exceed 255
+characters to conform to the DSC. The following short PostScript
+file produces a box with a smiley face in it:</p>
+
+<pre class="command">
+%!PS-Adobe-3.0
+%%BoundingBox: 36 36 576 756
+%%Pages: 1
+%%LanguageLevel: 2
+%%EndComments
+%%Page: (1) 1
+% Draw a black box around the page
+0 setgray
+1 setlinewidth
+36 36 540 720 rectstroke
+
+% Draw a two inch blue circle in the middle of the page
+0 0 1 setrgbcolor
+306 396 144 0 360 arc closepath fill
+
+% Draw two half inch yellow circles for eyes
+1 1 0 setrgbcolor
+252 432 36 0 360 arc closepath fill
+360 432 36 0 360 arc closepath fill
+
+% Draw the smile
+1 setlinecap
+18 setlinewidth
+306 396 99 200 340 arc stroke
+
+% Print it!
+showpage
+%%EOF
+</pre>
+
+<div class="figure"><table summary="Sample PostScript File Output">
+<caption>Figure 1: <a name="FIGURE_1">Sample PostScript File Output</a></caption>
+<tr><td align="center"><img src="../images/smiley.jpg"
+width="445" height="570" alt="Sample PostScript File Output"></td></tr>
+</table></div>
+
+
+<h2>Embedding Printer Options</h2>
+
+
+<h2>Embedding Fonts and Text</h2>
+
+
+<h2>Embedding Images</h2>
+
+
+<blockquote><b>Note:</b> While some printers support arbitrary
+binary data in PostScript files, we do not recommend this
+practice because it does not work with all printers or
+interfaces. In most cases, the Base-85 encoding and compression
+filters can be used to embed images with very little, if any,
+increase in data size.</blockquote>
+
+
+
+</body>
+</html>
index 4e5569a04f59e022c294c702a73a86af35ce2112..16c054544a116be07c0753355711978539996273 100644 (file)
@@ -8,11 +8,11 @@
 </head>
 <body>
 <!--
-  "$Id: spec-ppd.html 6158 2006-12-17 01:44:21Z mike $"
+  "$Id: spec-ppd.html 6252 2007-02-10 15:34:18Z mike $"
 
   CUPS PPD extensions specification for the Common UNIX Printing System (CUPS).
 
-  Copyright 1997-2006 by Easy Software Products.
+  Copyright 1997-2007 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
   property of Easy Software Products and are protected by Federal
@@ -243,6 +243,23 @@ the output for a specific model of printer.</p>
 *cupsModelNumber: 1234
 </pre>
 
+
+<h3>cupsPJLCharset</h3>
+
+<p class='summary'>*cupsPJLCharset: "ISO character set name"</p>
+
+<p>This string attribute specifies the character set that is used
+for strings in PJL commands. If not specified, US-ASCII is
+assumed.</p>
+
+<p>Example:</p>
+
+<pre class='command'>
+<em>*% Specify UTF-8 is used in PJL strings</em>
+*cupsPJLCharset: "UTF-8"
+</pre>
+
+
 <h3>cupsPortMonitor</h3>
 
 <p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p>
@@ -275,6 +292,24 @@ to disable the port monitor for the given URI scheme.</p>
 *cupsPortMonitor usb/USB Status Monitor: "epson-usb"
 </pre>
 
+<h3>cupsPreFilter</h3>
+
+<p class='summary'>*cupsPreFilter: "source/type cost program"</p>
+
+<p>This string attribute provides a pre-filter rule. The pre-filter
+program will be inserted in the conversion chain immediately 
+before the filter that accepts the given MIME type.</p>
+
+<p>Examples:</p>
+
+<pre class='command'>
+<em>*% PDF pre-filter</em>
+*cupsPreFilter: "application/pdf 100 mypdfprefilter"
+
+<em>*% PNG pre-filter</em>
+*cupsPreFilter: "image/png 0 mypngprefilter"
+</pre>
+
 <h3>cupsVersion</h3>
 
 <p class='summary'>*cupsVersion: major.minor</p>
@@ -934,6 +969,14 @@ in the PPD file for a given locale.</blockquote>
 
 <h2 class='title'><a name='HISTORY'>Change History</a></h2>
 
+<h3>Changes in CUPS 1.3</h3>
+
+<ul>
+
+       <li>Added <tt>cupsPreFilter</tt> attribute.</li>
+
+</ul>
+
 <h3>Changes in CUPS 1.2.8</h3>
 
 <ul>
index 302d8cbcac7570708bd9d3906c48e3f4a7f61349..9005c62816b3a17694db1dc17ad79119eaa93392 100644 (file)
@@ -71,6 +71,10 @@ Basic authentication with membership in the group
        <TD><CODE><A HREF="ref-cupsd-conf.html#LogFilePerm">LogFilePerm</A></CODE></TD>
        <TD><CODE>@CUPS_LOG_FILE_PERM@</CODE></TD>
 </TR>
+<TR>
+       <TD><CODE><A HREF="ref-cupsd-conf.html#MaxCopies">MaxCopies</A></CODE></TD>
+       <TD><CODE>@CUPS_MAX_COPIES@</CODE></TD>
+</TR>
 <TR>
        <TD><CODE><A HREF="ref-cupsd-conf.html#UseNetworkDefault">UseNetworkDefault</A></CODE></TD>
        <TD><CODE>@CUPS_USE_NETWORK_DEFAULT@</CODE></TD>
index f820c02766644749de2b6fb1e84550ac345c6daf..52efe31a22d23abcef0988130d764497bc3a8b5f 100644 (file)
@@ -130,6 +130,10 @@ translated buttons.</P>
        <TD>button-add-printer.gif</TD>
        <TD>Add Printer</TD>
 </TR>
+<TR>
+       <TD>button-add-rss-subscription.gif</TD>
+       <TD>Add RSS Subscription</TD>
+</TR>
 <TR>
        <TD>button-add-this-printer.gif</TD>
        <TD>Add This Printer</TD>
@@ -142,6 +146,10 @@ translated buttons.</P>
        <TD>button-cancel-job.gif</TD>
        <TD>Cancel Job</TD>
 </TR>
+<TR>
+       <TD>button-cancel-subscription.gif</TD>
+       <TD>Cancel Subscription</TD>
+</TR>
 <TR>
        <TD>button-change-settings.gif</TD>
        <TD>Change Settings</TD>
@@ -419,6 +427,10 @@ translated all of the templates, add the locale to the
        <TD>This is the initial form that is shown to add a new
        printer.</TD>
 </TR>
+<TR>
+       <TD>add-rss-subscription.tmpl</TD>
+       <TD>This is the form that is shown to add a new RSS subscription.</TD>
+</TR>
 <TR>
        <TD>admin.tmpl</TD>
        <TD>This is the main administration page.</TD>
@@ -672,6 +684,14 @@ translated all of the templates, add the locale to the
        <TD>This template shows the last part of the set printer options
        form.</TD>
 </TR>
+<TR>
+       <TD>subscription-added.tmpl</TD>
+       <TD>This template shows "subscription xyz added".</TD>
+</TR>
+<TR>
+       <TD>subscription-canceled.tmpl</TD>
+       <TD>This template shows "subscription #NNN canceled".</TD>
+</TR>
 <TR>
        <TD>test-page.tmpl</TD>
        <TD>This template shows "test page printed".</TD>
index d61308f14636cf351c7a709fbee1ca824f3b53a8..052c8041653028967b5c951aa52ba4407105f49f 100644 (file)
@@ -1,38 +1,31 @@
 <HTML>
 <!-- SECTION: Getting Started -->
 <HEAD>
-       <TITLE>What's New in CUPS 1.2</TITLE>
+       <TITLE>What's New in CUPS 1.3</TITLE>
 </HEAD>
 <BODY>
 
-<P>CUPS 1.2 adds over 90 changes and new features to CUPS 1.1.x.
+<P>CUPS 1.3 adds over ??? changes and new features to CUPS 1.2.x.
 This page provides a high-level outline of these changes. If you
 have never used CUPS before, read the <A
 HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
 
-<H2 CLASS="title"><A NAME="CHANGES">Changes in CUPS 1.2</A></H2>
+<H2 CLASS="title"><A NAME="CHANGES">Changes in CUPS 1.3</A></H2>
 
 <DL CLASS="category">
 
        <DT>Networking</DT>
        <DD><OL START="1">
 
-               <LI><EM>IPv6;</EM> CUPS now supports IPv6
-               connectivity when the host operating system
-               provides it</LI>
+               <LI><EM>Kerberos;</EM> CUPS now supports Kerberos authentication</LI>
 
-               <LI><EM>Domain Sockets;</EM> CUPS now supports
-               the much faster UNIX domain sockets for local
-               printing</LI>
+               <LI><EM>Mac OS X Improvements;</EM> CUPS now supports the Authorization Services framework, providing role-based access control in addition to the tradition UNIX model</LI>
 
-               <LI><EM>Auto-SSL;</EM> CUPS now automatically
-               detects when a client is connecting with SSL
-               encryption, so it can support both unencrypted,
-               SSL-encrypted, and TLS-encrypted connections over
-               a single port</LI>
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Network Printer Discovery;</EM> CUPS can
-               now find printers on the LAN using SNMP</LI>
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -40,40 +33,13 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>Browsing</DT>
        <DD><OL START="5">
 
-               <LI><EM>LDAP Support;</EM> CUPS now supports
-               printer sharing via the Lightweight Directory
-               Access Protocol, version 3</LI>
-
-               <LI><EM>Printer Lease Times;</EM> The server's
-               BrowseTimeout value is now included</LI>
-
-               <LI><EM>Network Default Options;</EM> The server
-               now advertises a printer's default options such
-               as job-sheets, media, and so forth</LI>
-
-               <LI><EM>Network Default Printer;</EM> CUPS now
-               advertises server-default printers so that
-               clients can choose the correct default network
-               printer</LI>
-
-               <LI><EM>"Delete Printer" Message;</EM> CUPS now
-               sends a final "delete printer" message to all
-               clients when a printer is deleted, allowing for
-               extremely long BrowseTimeout values without
-               side-effects</LI>
-
-               <LI><EM>BrowseLocalOptions and
-               BrowseRemoteOptions Support;</EM> You can
-               configure CUPS to use specific IPP options for
-               local and remote printers, for example to
-               compress print jobs that are sent over a slow WAN
-               link</LI>
-
-               <LI><EM>BrowseLocalProtocols and
-               BrowseRemoteProtocols Support;</EM> You can
-               configure CUPS to use different protocols for
-               advertising local shared printers and discovering
-               remote shared printers</LI>
+               <LI><EM>CUPS Browsing;</EM> The default configuration now shows shared printers from any address (not just <tt>@LOCAL</tt>)</LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -81,92 +47,19 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>Web Interface</DT>
        <DD><OL START="12">
 
-               <LI><EM>Improved Look and Feel;</EM> The web
-               interface has improved readability and a more
-               consistent design</LI>
-
-               <LI><EM>New Searchable On-Line Help;</EM> The
-               on-line help has been reorganized into
-               categorized articles and references and can be
-               searched</LI>
-
-               <LI><EM>Add This Printer;</EM> The administration
-               page offers a new <VAR>Add This Printer</VAR>
-               button for automatically-discovered printers,
-               making printer configuration even easier than
-               before</LI>
-
-               <LI><EM>Export Printers to Samba;</EM> The
-               administration page now offers an <VAR>Export
-               Printers to Samba</VAR> button and function which
-               allows administrators to export printer drivers
-               to Windows clients via Samba</LI>
-
-               <LI><EM>Change Settings;</EM> The administration
-               page offers a new simple server settings form for
-               controlling common configuration settings such as
-               printer sharing and remote administration</LI>
-
-               <LI><EM>Edit Configuration File;</EM> The
-               administration page now provides a form for
-               editing the <VAR>cupsd.conf</VAR> file from your
-               web browser</LI>
-
-               <LI><EM>View Log Files;</EM> The administration
-               page now provides access to the
-               <VAR>access_log</VAR>, <VAR>error_log</VAR>, and
-               <VAR>page_log</VAR> log files</LI>
-
-               <LI><EM>Searchable Classes, Jobs, and
-               Printers;</EM> the class, job, and printer pages
-               can now be searched and shown in ascending or
-               descending order, with the results displayed in
-               groups of 10</LI>
-
-               <LI><EM>Links for Class Members;</EM> When
-               viewing a printer class, we now provide
-               hyperlinks to each of the class members -
-               previously only the names were shown</LI>
-
-               <LI><EM>Print Self-Test Page;</EM> When the
-               printer driver supports the CUPS command file
-               format, you can now print the printer's self-test
-               page</LI>
-
-               <LI><EM>Clean Print Heads;</EM> When the printer
-               driver supports the CUPS command file format, you
-               can now clean the printer's heads</LI>
-
-               <LI><EM>Set Default Options;</EM> You can now set
-               the default options for a printer, including the
-               new operation and error policies (the previous
-               incarnation of this was confusingly called
-               "Configure Printer")</LI>
-
-               <LI><EM>Set Default Printer;</EM> You can now
-               make a printer the default printer on the
-               network</LI>
-
-               <LI><EM>Set Allowed Users;</EM> You can now set
-               the list of users and/or groups that are allowed
-               or not allowed to access a printer or class</LI>
-
-               <LI><EM>Cancel All Jobs;</EM> You can now cancel
-               all jobs on a printer or class</LI>
-
-               <LI><EM>Move Job;</EM> You can now move an active
-               job to a different printer or class</LI>
-
-               <LI><EM>Move All Jobs;</EM> You can now move all
-               active jobs to a different printer or class</LI>
-
-               <LI><EM>Per-Printer Sharing;</EM> You can now
-               share (Publish) or hide (Unpublish) printers
-               individually</LI>
-
-               <LI><EM>Show All Jobs;</EM> You can now view all
-               jobs in addition to just the active or completed
-               jobs</LI>
+               <LI><EM>Internet Printer Sharing;</EM> You can now share printers over the Internet via the basic server settings</LI>
+
+               <LI><EM>Improved On-Line Help;</EM> Searching the on-line help now shows results for all text, not just headings and links</LI>
+
+               <LI><EM>Printer Setup;</EM> The <VAR>Add This Printer</VAR> button now allows you to change the default name, location, and description</LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -174,99 +67,17 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>IPP Support</DT>
        <DD><OL START="31"></EM></LI>
 
-               <LI><EM>IPP Notifications;</EM> CUPS now supports
-               the complete IPP notification specification to
-               provide asynchronous event notification to
-               clients and users</LI>
-
-               <LI><EM>ippget Notification Scheme;</EM> CUPS now
-               supports the required <CODE>ippget</CODE> pull
-               method for event notification, allowing
-               applications to receive events asychronously</LI>
-
-               <LI><EM>mailto Notification Scheme;</EM> CUPS now
-               supports <CODE>mailto</CODE> recipients as
-               proposed by the Printer Working Group, allowing
-               users to receive event notifications via
-               email</LI>
-
-               <LI><EM>CUPS Extensions to IPP
-               Notifications;</EM> CUPS adds several server
-               events (start, stop, restart, and audit) that can
-               be monitored via the IPP notification
-               operations</LI>
-
-               <LI><EM>CUPS-Get-Printers Improvements;</EM> The
-               CUPS-Get-Printers operation now returns all
-               queues by default and filters the results based
-               on the <CODE>requesting-user-name</CODE>
-               attribute</LI>
-
-               <LI><EM>Proxy Authentication;</EM> CUPS provides
-               the new CUPS-Authenticate-Job operation to
-               support proxy authentication of print jobs</LI>
-
-               <LI><EM>Unique Job IDs;</EM> CUPS maintains a new
-               <CODE>job-uuid</CODE> attribute which provides a
-               unique identifier that can be used to track a job
-               on your network or anywhere in the world</LI>
-
-               <LI><EM>port-monitor;</EM> CUPS now supports the
-               per-printer <CODE>port-monitor</CODE> and
-               <CODE>port-monitor-supported</CODE> attributes
-               for device-specific data/transport encoding</LI>
-
-               <LI><EM>printer-op-policy;</EM> CUPS supports new
-               <CODE>printer-op-policy</CODE> and
-               <CODE>printer-op-policy-supported</CODE>
-               attributes which provide per-printer fine-grained
-               access control policies</LI>
-
-               <LI><EM>printer-error-policy;</EM> CUPS supports
-               new <CODE>printer-error-policy</CODE> and
-               <CODE>printer-error-policy-supported</CODE>
-               attributes which provide per-printer control over
-               job error handling</LI>
-
-               <LI><EM>printer-is-shared;</EM> CUPS supports a
-               new <CODE>printer-is-shared</CODE> attribute
-               which provides per-printer sharing</LI>
-
-               <LI><EM>printer-state-change-time;</EM> CUPS now
-               tracks the last time and date of a change to the
-               printer configuration, enabled/disabled state, or
-               accepting/rejecting state</LI>
-
-               <LI><EM>printer-uri-supported;</EM> CUPS now
-               reports the IP address or hostname used by the
-               client in the <CODE>printer-uri-supported</CODE>
-               attribute - this prevents hostname resolution
-               issues on complex networks</LI>
-
-               <LI><EM>requested-attributes;</EM> CUPS now fully
-               supports limiting of attributes by name or group
-               - previously CUPS would only limit common
-               attributes and did not support attribute group
-               names</LI>
-
-               <LI><EM>Default Job Template Attributes;</EM>
-               CUPS now supports arbitrary default job template
-               attributes and applies them to print jobs as
-               needed</LI>
-
-               <LI><EM>which-jobs;</EM> The Get-Jobs operation
-               now supports a <CODE>which-jobs</CODE> value of
-               "all" to return all jobs regardless of state</LI>
-
-               <LI><EM>document-format-supported;</EM> The
-               <CODE>document-format-supported</CODE> attribute
-               now reflects the formats that are actually
-               supported by the printer</LI>
-
-               <LI><EM>printer-type;</EM> The
-               <CODE>printer-type</CODE> attribute now provides
-               bits for "not shared", "authenticated", and
-               "supports commands"</LI>
+               <LI><EM>Printer Defaults;</EM> The <tt>document-forma-default</tt>, <tt>notify-events-default</tt>, and <tt>notify-lease-duration-default</tt> attributes can be set for each printer and class</LI>
+
+               <LI><EM>Server-Side Options;</EM> Server-side default options can now be retrieved using the "printer-defaults" group keyword</LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -274,106 +85,13 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>Scheduler</DT>
        <DD><OL START="49">
 
-               <LI><EM>Remote Printer Caching;</EM> The scheduler
-               now maintains a remote printer cache so that
-               remote printers are not lost when the scheduler
-               or system is restarted</LI>
-
-               <LI><EM>Job Caching;</EM> The scheduler now
-               maintains a job cache so that completed jobs do
-               not need to be loaded into memory all of the time
-               - jobs are loaded and unloaded automatically for
-               optimum performance and memory usage</LI>
-
-               <LI><EM>Other Performance Improvements;</EM>
-               Thanks to new CUPS API interfaces, the schedule
-               now uses less memory, less CPU, and scales to
-               even larger installations</LI>
-
-               <LI><EM>Improved Logging;</EM> CUPS now logs the
-               IPP operation and status in in the
-               <VAR>access_log</VAR> file</LI>
-
-               <LI><EM>Policies;</EM> CUPS now provides
-               per-printer and server access control policies
-               based on IPP operations in addition to the
-               traditional location-based access control
-               available in previous releases</LI>
-
-               <LI><EM>DefaultAuthType;</EM> In conjunction with
-               the new policy support, CUPS now supports a
-               default authentication type that is used for IPP
-               operations requiring a username</LI>
-
-               <LI><EM>DefaultEncryption;</EM> When
-               authenticating a request, CUPS now uses the
-               <CODE>DefaultEncryption</CODE> setting in
-               addition to any location or policy encryption
-               setting in effect</LI>
-
-               <LI><EM>Per-Printer
-               document-format-supported;</EM> CUPS now
-               maintains per-printer
-               <CODE>document-format-supported</CODE> attributes
-               that reflect the formats that can be printed by a
-               particular printer</LI>
-
-               <LI><EM>Server-side Default Options;</EM> CUPS
-               now supports server-side default options for each
-               printer or class that are applied to new
-               jobs</LI>
-
-               <LI><EM>POSIX ACL Support;</EM> CUPS now uses
-               POSIX ACLs, when available, to allows multiple
-               system groups to be used for local certificate
-               authentication</LI>
-
-               <LI><EM>RunAsUser Removed;</EM> The insecure
-               RunAsUser mode has been removed in favor of OS
-               mechanisms such as SELinux</LI>
-
-               <LI><EM>Launchd Support;</EM> The schedule now
-               supports running via the MacOS X launchd program,
-               delaying cupsd startup until needed</LI>
-
-               <LI><EM>Dynamic Device Lookup;</EM> The scheduler
-               now queries the backends for devices as
-               needed - no more restarting to get new devices!</LI>
-
-               <LI><EM>Dynamic PPD/Printer Driver Lookup;</EM>
-               The scheduler now scans for PPD files and/or
-               printer drivers as needed - no more restarting
-               after installing drivers, and PPD files can be
-               generated dynamically!</LI>
-
-               <LI><EM>Port Monitor Support;</EM> CUPS now
-               supports "port monitor" filters between the
-               printer driver filters and backend to do printer-
-               and device-specific encoding and transport
-               functions.</LI>
-
-               <LI><EM>Multi-File Job Improvements;</EM> CUPS
-               now sends multi-file jobs in a single connection
-               to the printer or remote server, preserving the
-               order of jobs</LI>
-
-               <LI><EM>Environment Variable Support;</EM> The
-               scheduler now supports setting environment
-               variables for filters and CGI programs via the
-               Apache <CODE>PassEnv</CODE> and
-               <CODE>SetEnv</CODE> directives</LI>
-
-               <LI><EM>Improved CGI Support;</EM> The scheduler
-               now supports more of the CGI/1.1
-               specification</LI>
-
-               <LI><EM>Log Files;</EM> Log files are now
-               accessible via HTTP requests using the
-               <VAR>/conf/log/filename</VAR> resource</LI>
-
-               <LI><EM>Power Management;</EM> The scheduler now
-               responds to power management events from the
-               operating system (currently MacOS X only)</LI>
+               <LI><EM>Client Support;</EM> The scheduler now uses <tt>poll()</tt>, <tt>epoll()</tt>, or <var>/dev/kqueue</var> on platforms that provide them to support large numbers of clients</LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -381,16 +99,13 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>LPD Client Support</DT>
        <DD><OL START="69">
 
-               <LI><EM>Performance Improvements;</EM> CUPS no
-               longer loads every available printer before
-               accepting a print job</LI>
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Banner Support;</EM> Banner pages can now
-               be requested by an LPD client, with server-side
-               overrides as desired</LI>
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Multi-File Support;</EM> CUPS now creates
-               a single IPP job for multi-file LPD jobs</LI>
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -398,17 +113,13 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>Localization and Internationalization</DT>
        <DD><OL START="72">
 
-               <LI><EM>Command-Line Programs;</EM> All
-               command-line programs are now fully
-               localized</LI>
+               <LI><EM>;</EM> </LI>
+
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Character Set Support;</EM> CUPS now
-               supports a wider range of character sets
-               including Big5 and Shift-JIS</LI>
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Globalized PPD Support;</EM> PPD files
-               can now contain multiple language
-               localizations</LI>
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -416,34 +127,19 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>Printer Drivers</DT>
        <DD><OL START="75">
 
-               <LI><EM>New Drivers;</EM> CUPS 1.2 adds Zebra
-               CPCL and EPL label printer drivers</LI>
+               <LI><EM>Side-Channel API;</EM> This new API provides out-of-band control of devices</LI>
 
-               <LI><EM>Driver Interfaces;</EM> CUPS now supports
-               driver interfaces which allow a driver to
-               advertise the printers it supports and
-               automatically generate the PPD file as
-               needed</LI>
+               <LI><EM>PJL Support;</EM> New <tt>cupsPJLCharset</tt> attribute controls character set for PJL strings</LI>
 
-               <LI><EM>High-Definition Range Color;</EM> CUPS
-               1.2 adds 16-bit per channel color support</LI>
+               <LI><EM>HTTP API;</EM> The <tt>http_t</tt> structure is now completely private</LI>
 
-               <LI><EM>Raster Compression;</EM> The CUPS raster
-               format has been updated to use data
-               compression for faster printing</LI>
+               <LI><EM>Label Printer Driver;</EM> Added support for the Intellibar label printers</LI>
 
-               <LI><EM>Extended Printer Attributes;</EM> The
-               CUPS raster format has been extended to support
-               additional per-page printer-specific
-               attributes</LI>
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Back-Channel Data Support;</EM> Printer
-               drivers can now read data back from the printer
-               device</LI>
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Custom PPD Options;</EM> PPD files can
-               now contain options that accept custom
-               values</LI>
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
@@ -451,86 +147,16 @@ HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
        <DT>CUPS API</DT>
        <DD><OL START="82">
 
-               <LI><EM>Thread Safety;</EM> All of the CUPS API
-               is now thread-safe on systems that support POSIX
-               threads</LI>
-
-               <LI><EM>Performance Improvements;</EM> Many of
-               the existing APIs have been optimized for
-               speed</LI>
-
-               <LI><EM>Array API;</EM> The new array API
-               provides a generic array container and is used to
-               implement many of the new CUPS 1.2 features and
-               performance improvements</LI>
-
-               <LI><EM>Directory API;</EM> The new directory API
-               allows applications to portably list the contents
-               of a directory</LI>
-
-               <LI><EM>File API;</EM> The new file API supports
-               optionally-compressed file IO and simple socket
-               communications without the limitations of
-               stdio</LI>
-
-               <LI><EM>HTTP API;</EM> The HTTP API now provides
-               many new URI and address handling functions,
-               accessor functions to key <CODE>http_t</CODE>
-               information, write-buffering functions, and large
-               file APIs</LI>
-
-               <LI><EM>IPP API;</EM> The IPP API now provides
-               functions to encode arbitrary options, add
-               <CODE>octetString</CODE> attributes, create
-               common IPP requests, convert IPP status and
-               operation code values to/from strings, and read
-               and write IPP messages via callbacks.</LI>
-
-               <LI><EM>PPD API;</EM> The PPD API has been
-               updated with new functions to support reading
-               from CUPS files, localization of globalized PPD
-               files, emission of arbitrary ranges of options,
-               custom option support, enhanced JCL support, and
-               access to all options in the PPD file</LI>
-
-               <LI><EM>Error Handling;</EM> The CUPS API now
-               provides a convenience function to get the full
-               error message of the last request</LI>
-
-               <LI><EM>Back-Channel API;</EM> The new
-               back-channel API provides backends and filters
-               with access to information sent back from a
-               printer</LI>
+               <LI><EM>Array API;</EM> New <tt>cupsArrayGetIndex()</tt> and <tt>cupsArrayGetInsert()</tt> functions</LI>
 
-       </OL></DD>
-
-
-       <DT>CUPS Imaging API</DT>
-       <DD><OL START="92">
+               <LI><EM>Destination API;</EM> New <tt>cupsRemoveDest()</tt> and <tt>cupsSetDefaultDest()</tt> functions</LI>
 
-               <LI><EM>Image API;</EM> The new image API
-               provides access to image files of arbitrary size
-               and is based on the CUPS 1.1.x private image
-               filter APIs</LI>
+               <LI><EM>;</EM> </LI>
 
-               <LI><EM>Raster API;</EM> The raster API provides
-               new functions to read and write the version 2
-               raster page headers, and a new function to
-               generate a page header from marked PPD
-               options</LI>
+               <LI><EM>;</EM> </LI>
 
        </OL></DD>
 
-       <DT>Scripting Support</DT>
-       <DD><OL START="94">
-
-               <LI><EM>PHP Bindings;</EM> The PHP language
-               bindings have been revamped to be more consistent
-               with the CUPS API and are now officially
-               supported and installed by default if you have
-               PHP installed on your system</LI>
-
-       </OL></DD>
 
 </DL>
 
diff --git a/doc/images/button-add-rss-subscription.gif b/doc/images/button-add-rss-subscription.gif
new file mode 100644 (file)
index 0000000..07fff27
Binary files /dev/null and b/doc/images/button-add-rss-subscription.gif differ
diff --git a/doc/images/button-cancel-subscription.gif b/doc/images/button-cancel-subscription.gif
new file mode 100644 (file)
index 0000000..aebdb2a
Binary files /dev/null and b/doc/images/button-cancel-subscription.gif differ
index 5b8cd5b217b72db7ac0113641d84564d17fa70ea..8013e5de5cd0f6e5b6a6a863fcdf546dcd98f4f1 100644 (file)
Binary files a/doc/pl/images/button-accept-jobs.gif and b/doc/pl/images/button-accept-jobs.gif differ
index ce7ea6ccf4c2d6a095df4ad448d17a13805d66b3..ca9b8c616f085e7bdde577ff8eb1e9b71b078ef0 100644 (file)
Binary files a/doc/pl/images/button-add-class.gif and b/doc/pl/images/button-add-class.gif differ
index 0f284487f7a42cd2397f2ccf8fe0bca294ac3a5e..1e099e647ae049ce64d0d697b77fd750b78acb5b 100644 (file)
Binary files a/doc/pl/images/button-add-printer.gif and b/doc/pl/images/button-add-printer.gif differ
index dc00856bd5ec775d88874a9831f743fe70274565..4fa4e4d4ba77682d7b7d2a6c17c7185c1fc88faa 100644 (file)
Binary files a/doc/pl/images/button-add-this-printer.gif and b/doc/pl/images/button-add-this-printer.gif differ
index 84e724b258420db708c42248ab002418fbe5dc5b..093b3e7fdbc7f3b0cfb98f8870ef0c96112060e9 100644 (file)
Binary files a/doc/pl/images/button-cancel-all-jobs.gif and b/doc/pl/images/button-cancel-all-jobs.gif differ
index 2d122bac5a2493f0056932e388fd41d57539f5e0..1cc3be3af2398d36578903bc1341dc62b6d830df 100644 (file)
Binary files a/doc/pl/images/button-cancel-job.gif and b/doc/pl/images/button-cancel-job.gif differ
index 73de99527d7687050eee99b40815191d6ceb6452..8abeb0774aeb7e0870a6999a202c3000d2f1716d 100644 (file)
Binary files a/doc/pl/images/button-change-settings.gif and b/doc/pl/images/button-change-settings.gif differ
index 2f45608d8ebb47781af49a95f59a286a0b6a8a1c..0daf9a9ac2c66b59b5f12818924d33af253e6ef3 100644 (file)
Binary files a/doc/pl/images/button-clean-print-heads.gif and b/doc/pl/images/button-clean-print-heads.gif differ
index e15a4bb3ddd3b399131d94750fdd62ef23aad5bb..9e1c36d36fec58c7adb8e81b7f91c39658b7fd92 100644 (file)
Binary files a/doc/pl/images/button-clear.gif and b/doc/pl/images/button-clear.gif differ
index 93f849041d2623ec1ac6b7d83a61c2b83ebb9ff7..d0d291666dab4076311c7a2c57244cb6b6238ece 100644 (file)
Binary files a/doc/pl/images/button-continue.gif and b/doc/pl/images/button-continue.gif differ
index 934b8d66b5416a52d47b736acd2d9f04d1fd0379..38f69eca1315cc0b0f1cda6236e523d2d78fcfef 100644 (file)
Binary files a/doc/pl/images/button-delete-class.gif and b/doc/pl/images/button-delete-class.gif differ
index f7c6984186825ae6669814888c6557d0d884a8ab..7e5bf74ea00b04d9e70fc801062abe71e1e28af0 100644 (file)
Binary files a/doc/pl/images/button-delete-printer.gif and b/doc/pl/images/button-delete-printer.gif differ
index 89fd8a7d65c32d33d8d58c41bbab4c1cd7db2f3d..e892aa1d96743d4509d354b85ca1db0b2a538978 100644 (file)
Binary files a/doc/pl/images/button-edit-configuration-file.gif and b/doc/pl/images/button-edit-configuration-file.gif differ
index c6c333619f0a63822bb55f558224bed57e8a1d9c..1fdbf67f09737a6a1b508f4c87a08af4449a9c1b 100644 (file)
Binary files a/doc/pl/images/button-export-samba.gif and b/doc/pl/images/button-export-samba.gif differ
index d2d4f85307814ff2a5dc8f1053e9183333f333ef..f5e239e0ece00f1da4e6636ab7c777b63fef1178 100644 (file)
Binary files a/doc/pl/images/button-help.gif and b/doc/pl/images/button-help.gif differ
index 2ab556492963ccaf8028641cb9f77a858da0ee59..5219e686845c7edad00817d227fae787bd023eda 100644 (file)
Binary files a/doc/pl/images/button-hold-job.gif and b/doc/pl/images/button-hold-job.gif differ
index c758f98029d1bd9a283328fc90973432f39b067d..63a8f660d6d365f32cc53619da40a7186856fc00 100644 (file)
Binary files a/doc/pl/images/button-manage-classes.gif and b/doc/pl/images/button-manage-classes.gif differ
index 7aefeddaf30070dba892829e05df8d4a89c46337..f8f6f0d8bca56c717b8e27f68e1f8a8221a425ba 100644 (file)
Binary files a/doc/pl/images/button-manage-jobs.gif and b/doc/pl/images/button-manage-jobs.gif differ
index f884f7f6068bc69d41e459f06b576d67e2f8db6d..041efc2159eb1745c89e330e5c4ee2a0f4f42b92 100644 (file)
Binary files a/doc/pl/images/button-manage-printers.gif and b/doc/pl/images/button-manage-printers.gif differ
index ba6e31cdc83fe2645602a2a2c3aeb9f2a89111f0..cb6d760478cadf100e87ad8fe82b3a9f5556ced4 100644 (file)
Binary files a/doc/pl/images/button-manage-server.gif and b/doc/pl/images/button-manage-server.gif differ
index fcf5f6d3eeb48059a7a9e4a914af3a38aac43961..38cce158f37ba23431691ab4c6c11371b70d0d0c 100644 (file)
Binary files a/doc/pl/images/button-modify-class.gif and b/doc/pl/images/button-modify-class.gif differ
index e3d5346630b20235f2014a9b91b194fd3f708bbc..acbb6daac0920e9e49d1c9619da33875b447f9f5 100644 (file)
Binary files a/doc/pl/images/button-modify-printer.gif and b/doc/pl/images/button-modify-printer.gif differ
index 02ce3300d1800a639daaf95efee8ac449186bfdb..585f48e8bc0977e69c7246c83fc12f972d28def8 100644 (file)
Binary files a/doc/pl/images/button-move-job.gif and b/doc/pl/images/button-move-job.gif differ
index 36029ac30866cd37479cbed72319027f08da6abf..4600b780fa4690ca6e08cf687df65f9edef7eb4b 100644 (file)
Binary files a/doc/pl/images/button-move-jobs.gif and b/doc/pl/images/button-move-jobs.gif differ
index bcea1ba01aa6288f82651a3c78fb25110aff8389..1aa3349f10a5544aabc67d62a2d60dc40db136b1 100644 (file)
Binary files a/doc/pl/images/button-print-self-test-page.gif and b/doc/pl/images/button-print-self-test-page.gif differ
index 57ac13be7778b697bc175e8f748769754a4e9392..8eb7ec39848e3f1c0f5c95cf9e45c269dff08b75 100644 (file)
Binary files a/doc/pl/images/button-print-test-page.gif and b/doc/pl/images/button-print-test-page.gif differ
index c12abe87e6d1bc8ffe9fea6393a8e11384ef64bd..909702fb496c325876a3208094373eb88fc56a1b 100644 (file)
Binary files a/doc/pl/images/button-publish-printer.gif and b/doc/pl/images/button-publish-printer.gif differ
index a81848bdee5cf3f704a304bd7844cdc16f867010..bcff455807c99e6f26f145a6d10bd587a04ba0a0 100644 (file)
Binary files a/doc/pl/images/button-reject-jobs.gif and b/doc/pl/images/button-reject-jobs.gif differ
index d8a82f0925e0a567b89a2f42c223154d007bfb74..a3d95ad3762722539f9fffa961675383c42ca9bd 100644 (file)
Binary files a/doc/pl/images/button-release-job.gif and b/doc/pl/images/button-release-job.gif differ
index 42b7568ecf8b4bea868f7845ed1cce07eab75965..5d5a7c0313339648474e7d695ae7980b4928890d 100644 (file)
Binary files a/doc/pl/images/button-restart-job.gif and b/doc/pl/images/button-restart-job.gif differ
index 2f1fee1704193adc9582f3d1f8d369e915a9b1ae..5056b80beffe421794309faa251eb6b737b03a73 100644 (file)
Binary files a/doc/pl/images/button-save-changes.gif and b/doc/pl/images/button-save-changes.gif differ
index 1bc194527128e4f7d8adc04b79575083993dde12..5f99760e6f1ef8063ed86d80d88364a1a59d1585 100644 (file)
Binary files a/doc/pl/images/button-search.gif and b/doc/pl/images/button-search.gif differ
index cd7709ef593ad8693246a6fc6c6ed9475027b219..728ced1eebb8d76f208cd59168608fa19a918b08 100644 (file)
Binary files a/doc/pl/images/button-set-allowed-users.gif and b/doc/pl/images/button-set-allowed-users.gif differ
index 203d097347ef33dfd28e729f0812bea3c538b9ec..b01c19122eff17f6f5fdfa5b7d9fd9ab3f8feffd 100644 (file)
Binary files a/doc/pl/images/button-set-as-default.gif and b/doc/pl/images/button-set-as-default.gif differ
index 6610735e41d8c0d3be6bf564e8a6f0f111bcbea4..ed026d57ecd0a696fd11f5081dff3d5df7025657 100644 (file)
Binary files a/doc/pl/images/button-set-printer-options.gif and b/doc/pl/images/button-set-printer-options.gif differ
index 82751977db94cfa4a2431fb6d9ba3212575d5165..ac9d4e05f446d3b64929884a0c20ecbe722b2705 100644 (file)
Binary files a/doc/pl/images/button-show-active.gif and b/doc/pl/images/button-show-active.gif differ
index 0473ee62638671fecb3a840bc9de6167c8f0a551..0bd0388225c1d2d1bccf716023c6da51b23ad176 100644 (file)
Binary files a/doc/pl/images/button-show-all.gif and b/doc/pl/images/button-show-all.gif differ
index 5481f4d9a7101bb8e0e948153f9a0da0991e7af1..d27b3074c54f6122418b0e41d9620ade9e908ff5 100644 (file)
Binary files a/doc/pl/images/button-show-completed.gif and b/doc/pl/images/button-show-completed.gif differ
index 3fdf85798153637310627d54bbb2710d110fdd5f..a584f885ad3c99b4299ece98f39f06605e495f54 100644 (file)
Binary files a/doc/pl/images/button-show-next.gif and b/doc/pl/images/button-show-next.gif differ
index 8a6f8c4cf484cddd6c0771b161dd26df616b1aa2..64613b9ec0845505709e56044eb4f402a4c7cc05 100644 (file)
Binary files a/doc/pl/images/button-show-previous.gif and b/doc/pl/images/button-show-previous.gif differ
index 5a88283f334ef865cfbf6e24ca1f232cfd7939f4..993cf6a93aee0df7aa31ea9636166b7e70a71e1d 100644 (file)
Binary files a/doc/pl/images/button-sort-ascending.gif and b/doc/pl/images/button-sort-ascending.gif differ
index 61c85de29e5f18df35e7a837b823327065ccba1d..fbc5e966dd052c37317b90b7b865d756389ea0da 100644 (file)
Binary files a/doc/pl/images/button-sort-descending.gif and b/doc/pl/images/button-sort-descending.gif differ
index 85c098a38a3bffe13fee42003896a6701606d323..834f8a1254ff8e708c26601e745803a61b9f05e3 100644 (file)
Binary files a/doc/pl/images/button-start-class.gif and b/doc/pl/images/button-start-class.gif differ
index cd1734cce7bcf8107c18ea34ac9fecb1119d6b34..7d86be593c0121a339cad5b59fefbda15b169040 100644 (file)
Binary files a/doc/pl/images/button-start-printer.gif and b/doc/pl/images/button-start-printer.gif differ
index 8031731a4599854d145b198dffd905d053e451f3..c1f96cc85bd5223e81abded6cb55c3279d760b86 100644 (file)
Binary files a/doc/pl/images/button-stop-class.gif and b/doc/pl/images/button-stop-class.gif differ
index ce485f3a16ba177971f378394a751743aa556b69..34bf39da66a5c98c8fb5400ca23f2dc5fc9c54b0 100644 (file)
Binary files a/doc/pl/images/button-stop-printer.gif and b/doc/pl/images/button-stop-printer.gif differ
index 2842a3e1806fcf40b2d28af24d42f4863783f3dc..fdb48f32de5030ea1c496aae3f532ea25b503bd8 100644 (file)
Binary files a/doc/pl/images/button-unpublish-printer.gif and b/doc/pl/images/button-unpublish-printer.gif differ
index 47697cde896ccc4088762ce12db7f196911563d2..578cd05ac94dd82aa9f0988b0b5119f20cd5adee 100644 (file)
Binary files a/doc/pl/images/button-use-default-config.gif and b/doc/pl/images/button-use-default-config.gif differ
index 5d89af521454b3ce89ebf558d88a8baed7eb372f..b6ffd0ab49f4341c4418aa2e3d270e6fd67bc714 100644 (file)
Binary files a/doc/pl/images/button-view-access-log.gif and b/doc/pl/images/button-view-access-log.gif differ
index c99078ad81bec964609dc5feed96ed4b2b7e592a..bbdd548f4183a08f0925135ca6bdbd7cb324e3c1 100644 (file)
Binary files a/doc/pl/images/button-view-error-log.gif and b/doc/pl/images/button-view-error-log.gif differ
index ad49a2f4fc8aaaaefd3d838e7c7046554b372e29..30b3a7e0cb9f354f3df4a59d7a149ff91419164b 100644 (file)
Binary files a/doc/pl/images/button-view-page-log.gif and b/doc/pl/images/button-view-page-log.gif differ
index 27ae97c763e3a512c98bb9506cbc1b0f9f8680a8..726cd3a744f67ba6dbabe6aae31ee809d47f57a6 100644 (file)
Binary files a/doc/pl/images/button-view-printable-version.gif and b/doc/pl/images/button-view-printable-version.gif differ
index 867919f09e92d5fd7e28935199dfd53fd537990a..7e7b6a9b1b6fde67ea620e654d9c0479f0097fa4 100644 (file)
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-hpgl-attr.o: hpgl-attr.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-config.o: hpgl-config.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-main.o: hpgl-main.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-prolog.o: hpgl-prolog.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-char.o: hpgl-char.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-input.o: hpgl-input.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-polygon.o: hpgl-polygon.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-vector.o: hpgl-vector.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-image-bmp.o: image-bmp.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-colorspace.o: image-colorspace.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-gif.o: image-gif.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-jpeg.o: image-jpeg.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-photocd.o: image-photocd.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-pix.o: image-pix.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-png.o: image-png.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-pnm.o: image-pnm.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-sgi.o: image-sgi.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h image-sgi.h
-image-sgilib.o: image-sgilib.c image-sgi.h
-image-sun.o: image-sun.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-tiff.o: image-tiff.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-zoom.o: image-zoom.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image.o: image.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-interpret.o: interpret.c ../cups/string.h ../config.h image-private.h \
-  image.h raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/debug.h
-raster.o: raster.c raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
-form-main.o: form-main.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-form-ps.o: form-ps.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-form-tree.o: form-tree.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-gziptoany.o: gziptoany.c ../cups/string.h ../config.h
-imagetops.o: imagetops.c common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h image.h raster.h
-imagetoraster.o: imagetoraster.c common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h image-private.h image.h raster.h ../cups/debug.h
-common.o: common.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/language.h ../cups/string.h ../config.h
-pstops.o: pstops.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/language.h ../cups/string.h ../config.h \
-  ../cups/file.h ../cups/array.h
-rasterbench.o: rasterbench.c raster.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h
-rastertoepson.o: rastertoepson.c ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/ppd.h ../cups/string.h \
-  ../config.h raster.h
-rastertohp.o: rastertohp.c ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/string.h ../config.h raster.h
-rastertolabel.o: rastertolabel.c ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/string.h ../config.h raster.h
-testimage.o: testimage.c image.h raster.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h
-testraster.o: testraster.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-textcommon.o: textcommon.c textcommon.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-texttops.o: texttops.c textcommon.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-hpgl-attr.32.o: hpgl-attr.c  hpgl-attr.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-config.32.o: hpgl-config.c  hpgl-config.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-main.32.o: hpgl-main.c  hpgl-main.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-prolog.32.o: hpgl-prolog.c  hpgl-prolog.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-char.32.o: hpgl-char.c  hpgl-char.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-input.32.o: hpgl-input.c  hpgl-input.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-polygon.32.o: hpgl-polygon.c  hpgl-polygon.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-vector.32.o: hpgl-vector.c  hpgl-vector.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-image-bmp.32.o: image-bmp.c  image-bmp.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-colorspace.32.o: image-colorspace.c  image-colorspace.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-gif.32.o: image-gif.c  image-gif.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-jpeg.32.o: image-jpeg.c  image-jpeg.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-photocd.32.o: image-photocd.c  image-photocd.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-pix.32.o: image-pix.c  image-pix.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-png.32.o: image-png.c  image-png.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-pnm.32.o: image-pnm.c  image-pnm.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-sgi.32.o: image-sgi.c  image-sgi.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h image-sgi.h
-image-sgilib.32.o: image-sgilib.c  image-sgilib.c image-sgi.h
-image-sun.32.o: image-sun.c  image-sun.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-tiff.32.o: image-tiff.c  image-tiff.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-zoom.32.o: image-zoom.c  image-zoom.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image.32.o: image.c  image.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-interpret.32.o: interpret.c  interpret.c ../cups/string.h ../config.h image-private.h \
-  image.h raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/debug.h
-raster.32.o: raster.c  raster.c raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
-form-main.32.o: form-main.c  form-main.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-form-ps.32.o: form-ps.c  form-ps.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-form-tree.32.o: form-tree.c  form-tree.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-gziptoany.32.o: gziptoany.c  gziptoany.c ../cups/string.h ../config.h
-imagetops.32.o: imagetops.c  imagetops.c common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h image.h raster.h
-imagetoraster.32.o: imagetoraster.c  imagetoraster.c common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h image-private.h image.h raster.h ../cups/debug.h
-common.32.o: common.c  common.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/language.h ../cups/string.h ../config.h
-pstops.32.o: pstops.c  pstops.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/language.h ../cups/string.h ../config.h \
-  ../cups/file.h ../cups/array.h
-rasterbench.32.o: rasterbench.c  rasterbench.c raster.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h
-rastertoepson.32.o: rastertoepson.c  rastertoepson.c ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/ppd.h ../cups/string.h \
-  ../config.h raster.h
-rastertohp.32.o: rastertohp.c  rastertohp.c ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/string.h ../config.h raster.h
-rastertolabel.32.o: rastertolabel.c  rastertolabel.c ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/string.h ../config.h raster.h
-testimage.32.o: testimage.c  testimage.c image.h raster.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h
-testraster.32.o: testraster.c  testraster.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-textcommon.32.o: textcommon.c  textcommon.c textcommon.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-texttops.32.o: texttops.c  texttops.c textcommon.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-hpgl-attr.64.o: hpgl-attr.c  hpgl-attr.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-config.64.o: hpgl-config.c  hpgl-config.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-main.64.o: hpgl-main.c  hpgl-main.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-prolog.64.o: hpgl-prolog.c  hpgl-prolog.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-char.64.o: hpgl-char.c  hpgl-char.c hpgltops.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-hpgl-input.64.o: hpgl-input.c  hpgl-input.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-polygon.64.o: hpgl-polygon.c  hpgl-polygon.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-hpgl-vector.64.o: hpgl-vector.c  hpgl-vector.c hpgltops.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-image-bmp.64.o: image-bmp.c  image-bmp.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-colorspace.64.o: image-colorspace.c  image-colorspace.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-gif.64.o: image-gif.c  image-gif.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-jpeg.64.o: image-jpeg.c  image-jpeg.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-photocd.64.o: image-photocd.c  image-photocd.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-pix.64.o: image-pix.c  image-pix.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-png.64.o: image-png.c  image-png.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-pnm.64.o: image-pnm.c  image-pnm.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-sgi.64.o: image-sgi.c  image-sgi.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h image-sgi.h
-image-sgilib.64.o: image-sgilib.c  image-sgilib.c image-sgi.h
-image-sun.64.o: image-sun.c  image-sun.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-tiff.64.o: image-tiff.c  image-tiff.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image-zoom.64.o: image-zoom.c  image-zoom.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-image.64.o: image.c  image.c image-private.h image.h raster.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-interpret.64.o: interpret.c  interpret.c ../cups/string.h ../config.h image-private.h \
-  image.h raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/debug.h
-raster.64.o: raster.c  raster.c raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
-form-main.64.o: form-main.c  form-main.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-form-ps.64.o: form-ps.c  form-ps.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-form-tree.64.o: form-tree.c  form-tree.c form.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
-gziptoany.64.o: gziptoany.c  gziptoany.c ../cups/string.h ../config.h
-imagetops.64.o: imagetops.c  imagetops.c common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h image.h raster.h
-imagetoraster.64.o: imagetoraster.c  imagetoraster.c common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h image-private.h image.h raster.h ../cups/debug.h
-common.64.o: common.c  common.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/language.h ../cups/string.h ../config.h
-pstops.64.o: pstops.c  pstops.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/language.h ../cups/string.h ../config.h \
-  ../cups/file.h ../cups/array.h
-rasterbench.64.o: rasterbench.c  rasterbench.c raster.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h
-rastertoepson.64.o: rastertoepson.c  rastertoepson.c ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/ppd.h ../cups/string.h \
-  ../config.h raster.h
-rastertohp.64.o: rastertohp.c  rastertohp.c ../cups/cups.h ../cups/ipp.h ../cups/http.h \
-  ../cups/md5.h ../cups/ppd.h ../cups/array.h ../cups/file.h \
-  ../cups/language.h ../cups/string.h ../config.h raster.h
-rastertolabel.64.o: rastertolabel.c  rastertolabel.c ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/string.h ../config.h raster.h
-testimage.64.o: testimage.c  testimage.c image.h raster.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h
-testraster.64.o: testraster.c  testraster.c image-private.h image.h raster.h \
-  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h \
-  ../cups/string.h ../config.h
-textcommon.64.o: textcommon.c  textcommon.c textcommon.h common.h ../cups/cups.h \
-  ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h \
-  ../cups/array.h ../cups/file.h ../cups/language.h ../cups/language.h \
-  ../cups/string.h ../config.h
-texttops.64.o: texttops.c  texttops.c textcommon.h common.h ../cups/cups.h ../cups/ipp.h \
-  ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h \
-  ../cups/file.h ../cups/language.h ../cups/language.h ../cups/string.h \
-  ../config.h
+# DO NOT DELETE
+
+hpgl-attr.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-attr.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-attr.o: ../cups/language.h ../cups/string.h ../config.h
+hpgl-config.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-config.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-config.o: ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-config.o: ../config.h
+hpgl-main.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-main.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-main.o: ../cups/language.h ../cups/string.h ../config.h
+hpgl-prolog.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-prolog.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-prolog.o: ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-prolog.o: ../config.h
+hpgl-char.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-char.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-char.o: ../cups/language.h ../cups/string.h ../config.h
+hpgl-input.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-input.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-input.o: ../cups/language.h ../cups/string.h ../config.h
+hpgl-polygon.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-polygon.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-polygon.o: ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-polygon.o: ../config.h
+hpgl-vector.o: hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-vector.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-vector.o: ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-vector.o: ../config.h
+image-bmp.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-bmp.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-bmp.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-colorspace.o: image-private.h image.h raster.h ../cups/cups.h
+image-colorspace.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+image-colorspace.o: ../cups/array.h ../cups/file.h ../cups/language.h
+image-colorspace.o: ../cups/debug.h ../cups/string.h ../config.h
+image-gif.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-gif.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-gif.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-jpeg.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-jpeg.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-jpeg.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-photocd.o: image-private.h image.h raster.h ../cups/cups.h
+image-photocd.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
+image-photocd.o: ../cups/file.h ../cups/language.h ../cups/debug.h
+image-photocd.o: ../cups/string.h ../config.h
+image-pix.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-pix.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-pix.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-png.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-png.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-png.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-pnm.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-pnm.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-pnm.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-sgi.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-sgi.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-sgi.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-sgi.o: image-sgi.h
+image-sgilib.o: image-sgi.h
+image-sun.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-sun.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-sun.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-tiff.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-tiff.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-tiff.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-zoom.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-zoom.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-zoom.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+error.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+error.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+error.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+interpret.o: ../cups/string.h ../config.h image-private.h image.h raster.h
+interpret.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+interpret.o: ../cups/array.h ../cups/file.h ../cups/language.h
+interpret.o: ../cups/debug.h
+raster.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+raster.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+raster.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+form-main.o: form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-main.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-main.o: ../cups/language.h ../cups/string.h ../config.h
+form-ps.o: form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-ps.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-ps.o: ../cups/language.h ../cups/string.h ../config.h
+form-tree.o: form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-tree.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-tree.o: ../cups/language.h ../cups/string.h ../config.h
+gziptoany.o: ../cups/string.h ../config.h
+imagetops.o: common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+imagetops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+imagetops.o: ../cups/language.h ../cups/string.h ../config.h image.h raster.h
+imagetoraster.o: common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+imagetoraster.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
+imagetoraster.o: ../cups/language.h ../cups/language.h ../cups/string.h
+imagetoraster.o: ../config.h image-private.h image.h raster.h ../cups/debug.h
+common.o: common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+common.o: ../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/ppd.h
+pstops.o: ../cups/array.h ../cups/file.h ../cups/language.h
+pstops.o: ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
+pstops.o: ../cups/array.h
+rasterbench.o: raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+rasterbench.o: ../cups/ppd.h ../cups/array.h ../cups/file.h
+rasterbench.o: ../cups/language.h
+rastertoepson.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertoepson.o: ../cups/array.h ../cups/file.h ../cups/language.h
+rastertoepson.o: ../cups/ppd.h ../cups/string.h ../config.h raster.h
+rastertohp.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertohp.o: ../cups/array.h ../cups/file.h ../cups/language.h
+rastertohp.o: ../cups/string.h ../config.h raster.h
+rastertolabel.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertolabel.o: ../cups/array.h ../cups/file.h ../cups/language.h
+rastertolabel.o: ../cups/string.h ../config.h raster.h
+testimage.o: image.h raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+testimage.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testraster.o: image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+testraster.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+testraster.o: ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+textcommon.o: textcommon.h common.h ../cups/cups.h ../cups/ipp.h
+textcommon.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+textcommon.o: ../cups/language.h ../cups/language.h ../cups/string.h
+textcommon.o: ../config.h
+texttops.o: textcommon.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+texttops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+texttops.o: ../cups/language.h ../cups/string.h ../config.h
+# DO NOT DELETE
+
+hpgl-attr.32.o: hpgl-attr.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-attr.32.o: hpgl-attr.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-attr.32.o: hpgl-attr.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-config.32.o: hpgl-config.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-config.32.o: hpgl-config.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-config.32.o: hpgl-config.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-config.32.o: hpgl-config.c  ../config.h
+hpgl-main.32.o: hpgl-main.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-main.32.o: hpgl-main.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-main.32.o: hpgl-main.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-prolog.32.o: hpgl-prolog.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-prolog.32.o: hpgl-prolog.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-prolog.32.o: hpgl-prolog.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-prolog.32.o: hpgl-prolog.c  ../config.h
+hpgl-char.32.o: hpgl-char.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-char.32.o: hpgl-char.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-char.32.o: hpgl-char.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-input.32.o: hpgl-input.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-input.32.o: hpgl-input.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-input.32.o: hpgl-input.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-polygon.32.o: hpgl-polygon.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-polygon.32.o: hpgl-polygon.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-polygon.32.o: hpgl-polygon.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-polygon.32.o: hpgl-polygon.c  ../config.h
+hpgl-vector.32.o: hpgl-vector.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-vector.32.o: hpgl-vector.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-vector.32.o: hpgl-vector.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-vector.32.o: hpgl-vector.c  ../config.h
+image-bmp.32.o: image-bmp.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-bmp.32.o: image-bmp.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-bmp.32.o: image-bmp.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-colorspace.32.o: image-colorspace.c  image-private.h image.h raster.h ../cups/cups.h
+image-colorspace.32.o: image-colorspace.c  ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+image-colorspace.32.o: image-colorspace.c  ../cups/array.h ../cups/file.h ../cups/language.h
+image-colorspace.32.o: image-colorspace.c  ../cups/debug.h ../cups/string.h ../config.h
+image-gif.32.o: image-gif.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-gif.32.o: image-gif.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-gif.32.o: image-gif.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-jpeg.32.o: image-jpeg.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-jpeg.32.o: image-jpeg.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-jpeg.32.o: image-jpeg.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-photocd.32.o: image-photocd.c  image-private.h image.h raster.h ../cups/cups.h
+image-photocd.32.o: image-photocd.c  ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
+image-photocd.32.o: image-photocd.c  ../cups/file.h ../cups/language.h ../cups/debug.h
+image-photocd.32.o: image-photocd.c  ../cups/string.h ../config.h
+image-pix.32.o: image-pix.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-pix.32.o: image-pix.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-pix.32.o: image-pix.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-png.32.o: image-png.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-png.32.o: image-png.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-png.32.o: image-png.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-pnm.32.o: image-pnm.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-pnm.32.o: image-pnm.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-pnm.32.o: image-pnm.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-sgi.32.o: image-sgi.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-sgi.32.o: image-sgi.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-sgi.32.o: image-sgi.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-sgi.32.o: image-sgi.c  image-sgi.h
+image-sgilib.32.o: image-sgilib.c  image-sgi.h
+image-sun.32.o: image-sun.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-sun.32.o: image-sun.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-sun.32.o: image-sun.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-tiff.32.o: image-tiff.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-tiff.32.o: image-tiff.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-tiff.32.o: image-tiff.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-zoom.32.o: image-zoom.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-zoom.32.o: image-zoom.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-zoom.32.o: image-zoom.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image.32.o: image.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image.32.o: image.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image.32.o: image.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+error.32.o: error.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+error.32.o: error.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+error.32.o: error.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+interpret.32.o: interpret.c  ../cups/string.h ../config.h image-private.h image.h raster.h
+interpret.32.o: interpret.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+interpret.32.o: interpret.c  ../cups/array.h ../cups/file.h ../cups/language.h
+interpret.32.o: interpret.c  ../cups/debug.h
+raster.32.o: raster.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+raster.32.o: raster.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+raster.32.o: raster.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+form-main.32.o: form-main.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-main.32.o: form-main.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-main.32.o: form-main.c  ../cups/language.h ../cups/string.h ../config.h
+form-ps.32.o: form-ps.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-ps.32.o: form-ps.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-ps.32.o: form-ps.c  ../cups/language.h ../cups/string.h ../config.h
+form-tree.32.o: form-tree.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-tree.32.o: form-tree.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-tree.32.o: form-tree.c  ../cups/language.h ../cups/string.h ../config.h
+gziptoany.32.o: gziptoany.c  ../cups/string.h ../config.h
+imagetops.32.o: imagetops.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+imagetops.32.o: imagetops.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+imagetops.32.o: imagetops.c  ../cups/language.h ../cups/string.h ../config.h image.h raster.h
+imagetoraster.32.o: imagetoraster.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+imagetoraster.32.o: imagetoraster.c  ../cups/ppd.h ../cups/array.h ../cups/file.h
+imagetoraster.32.o: imagetoraster.c  ../cups/language.h ../cups/language.h ../cups/string.h
+imagetoraster.32.o: imagetoraster.c  ../config.h image-private.h image.h raster.h ../cups/debug.h
+common.32.o: common.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+common.32.o: common.c  ../cups/array.h ../cups/file.h ../cups/language.h
+common.32.o: common.c  ../cups/language.h ../cups/string.h ../config.h
+pstops.32.o: pstops.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+pstops.32.o: pstops.c  ../cups/array.h ../cups/file.h ../cups/language.h
+pstops.32.o: pstops.c  ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
+pstops.32.o: pstops.c  ../cups/array.h
+rasterbench.32.o: rasterbench.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+rasterbench.32.o: rasterbench.c  ../cups/ppd.h ../cups/array.h ../cups/file.h
+rasterbench.32.o: rasterbench.c  ../cups/language.h
+rastertoepson.32.o: rastertoepson.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertoepson.32.o: rastertoepson.c  ../cups/array.h ../cups/file.h ../cups/language.h
+rastertoepson.32.o: rastertoepson.c  ../cups/ppd.h ../cups/string.h ../config.h raster.h
+rastertohp.32.o: rastertohp.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertohp.32.o: rastertohp.c  ../cups/array.h ../cups/file.h ../cups/language.h
+rastertohp.32.o: rastertohp.c  ../cups/string.h ../config.h raster.h
+rastertolabel.32.o: rastertolabel.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertolabel.32.o: rastertolabel.c  ../cups/array.h ../cups/file.h ../cups/language.h
+rastertolabel.32.o: rastertolabel.c  ../cups/string.h ../config.h raster.h
+testimage.32.o: testimage.c  image.h raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+testimage.32.o: testimage.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testraster.32.o: testraster.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+testraster.32.o: testraster.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+testraster.32.o: testraster.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+textcommon.32.o: textcommon.c  textcommon.h common.h ../cups/cups.h ../cups/ipp.h
+textcommon.32.o: textcommon.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+textcommon.32.o: textcommon.c  ../cups/language.h ../cups/language.h ../cups/string.h
+textcommon.32.o: textcommon.c  ../config.h
+texttops.32.o: texttops.c  textcommon.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+texttops.32.o: texttops.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+texttops.32.o: texttops.c  ../cups/language.h ../cups/string.h ../config.h
+# DO NOT DELETE
+
+hpgl-attr.64.o: hpgl-attr.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-attr.64.o: hpgl-attr.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-attr.64.o: hpgl-attr.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-config.64.o: hpgl-config.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-config.64.o: hpgl-config.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-config.64.o: hpgl-config.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-config.64.o: hpgl-config.c  ../config.h
+hpgl-main.64.o: hpgl-main.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-main.64.o: hpgl-main.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-main.64.o: hpgl-main.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-prolog.64.o: hpgl-prolog.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-prolog.64.o: hpgl-prolog.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-prolog.64.o: hpgl-prolog.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-prolog.64.o: hpgl-prolog.c  ../config.h
+hpgl-char.64.o: hpgl-char.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-char.64.o: hpgl-char.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-char.64.o: hpgl-char.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-input.64.o: hpgl-input.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+hpgl-input.64.o: hpgl-input.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+hpgl-input.64.o: hpgl-input.c  ../cups/language.h ../cups/string.h ../config.h
+hpgl-polygon.64.o: hpgl-polygon.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-polygon.64.o: hpgl-polygon.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-polygon.64.o: hpgl-polygon.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-polygon.64.o: hpgl-polygon.c  ../config.h
+hpgl-vector.64.o: hpgl-vector.c  hpgltops.h common.h ../cups/cups.h ../cups/ipp.h
+hpgl-vector.64.o: hpgl-vector.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+hpgl-vector.64.o: hpgl-vector.c  ../cups/language.h ../cups/language.h ../cups/string.h
+hpgl-vector.64.o: hpgl-vector.c  ../config.h
+image-bmp.64.o: image-bmp.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-bmp.64.o: image-bmp.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-bmp.64.o: image-bmp.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-colorspace.64.o: image-colorspace.c  image-private.h image.h raster.h ../cups/cups.h
+image-colorspace.64.o: image-colorspace.c  ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+image-colorspace.64.o: image-colorspace.c  ../cups/array.h ../cups/file.h ../cups/language.h
+image-colorspace.64.o: image-colorspace.c  ../cups/debug.h ../cups/string.h ../config.h
+image-gif.64.o: image-gif.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-gif.64.o: image-gif.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-gif.64.o: image-gif.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-jpeg.64.o: image-jpeg.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-jpeg.64.o: image-jpeg.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-jpeg.64.o: image-jpeg.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-photocd.64.o: image-photocd.c  image-private.h image.h raster.h ../cups/cups.h
+image-photocd.64.o: image-photocd.c  ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
+image-photocd.64.o: image-photocd.c  ../cups/file.h ../cups/language.h ../cups/debug.h
+image-photocd.64.o: image-photocd.c  ../cups/string.h ../config.h
+image-pix.64.o: image-pix.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-pix.64.o: image-pix.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-pix.64.o: image-pix.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-png.64.o: image-png.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-png.64.o: image-png.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-png.64.o: image-png.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-pnm.64.o: image-pnm.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-pnm.64.o: image-pnm.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-pnm.64.o: image-pnm.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-sgi.64.o: image-sgi.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-sgi.64.o: image-sgi.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-sgi.64.o: image-sgi.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-sgi.64.o: image-sgi.c  image-sgi.h
+image-sgilib.64.o: image-sgilib.c  image-sgi.h
+image-sun.64.o: image-sun.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-sun.64.o: image-sun.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-sun.64.o: image-sun.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-tiff.64.o: image-tiff.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-tiff.64.o: image-tiff.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-tiff.64.o: image-tiff.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image-zoom.64.o: image-zoom.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image-zoom.64.o: image-zoom.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image-zoom.64.o: image-zoom.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+image.64.o: image.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+image.64.o: image.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+image.64.o: image.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+error.64.o: error.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+error.64.o: error.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+error.64.o: error.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+interpret.64.o: interpret.c  ../cups/string.h ../config.h image-private.h image.h raster.h
+interpret.64.o: interpret.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+interpret.64.o: interpret.c  ../cups/array.h ../cups/file.h ../cups/language.h
+interpret.64.o: interpret.c  ../cups/debug.h
+raster.64.o: raster.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+raster.64.o: raster.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+raster.64.o: raster.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+form-main.64.o: form-main.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-main.64.o: form-main.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-main.64.o: form-main.c  ../cups/language.h ../cups/string.h ../config.h
+form-ps.64.o: form-ps.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-ps.64.o: form-ps.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-ps.64.o: form-ps.c  ../cups/language.h ../cups/string.h ../config.h
+form-tree.64.o: form-tree.c  form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+form-tree.64.o: form-tree.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+form-tree.64.o: form-tree.c  ../cups/language.h ../cups/string.h ../config.h
+gziptoany.64.o: gziptoany.c  ../cups/string.h ../config.h
+imagetops.64.o: imagetops.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+imagetops.64.o: imagetops.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+imagetops.64.o: imagetops.c  ../cups/language.h ../cups/string.h ../config.h image.h raster.h
+imagetoraster.64.o: imagetoraster.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+imagetoraster.64.o: imagetoraster.c  ../cups/ppd.h ../cups/array.h ../cups/file.h
+imagetoraster.64.o: imagetoraster.c  ../cups/language.h ../cups/language.h ../cups/string.h
+imagetoraster.64.o: imagetoraster.c  ../config.h image-private.h image.h raster.h ../cups/debug.h
+common.64.o: common.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+common.64.o: common.c  ../cups/array.h ../cups/file.h ../cups/language.h
+common.64.o: common.c  ../cups/language.h ../cups/string.h ../config.h
+pstops.64.o: pstops.c  common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+pstops.64.o: pstops.c  ../cups/array.h ../cups/file.h ../cups/language.h
+pstops.64.o: pstops.c  ../cups/language.h ../cups/string.h ../config.h ../cups/file.h
+pstops.64.o: pstops.c  ../cups/array.h
+rasterbench.64.o: rasterbench.c  raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+rasterbench.64.o: rasterbench.c  ../cups/ppd.h ../cups/array.h ../cups/file.h
+rasterbench.64.o: rasterbench.c  ../cups/language.h
+rastertoepson.64.o: rastertoepson.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertoepson.64.o: rastertoepson.c  ../cups/array.h ../cups/file.h ../cups/language.h
+rastertoepson.64.o: rastertoepson.c  ../cups/ppd.h ../cups/string.h ../config.h raster.h
+rastertohp.64.o: rastertohp.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertohp.64.o: rastertohp.c  ../cups/array.h ../cups/file.h ../cups/language.h
+rastertohp.64.o: rastertohp.c  ../cups/string.h ../config.h raster.h
+rastertolabel.64.o: rastertolabel.c  ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+rastertolabel.64.o: rastertolabel.c  ../cups/array.h ../cups/file.h ../cups/language.h
+rastertolabel.64.o: rastertolabel.c  ../cups/string.h ../config.h raster.h
+testimage.64.o: testimage.c  image.h raster.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+testimage.64.o: testimage.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+testraster.64.o: testraster.c  image-private.h image.h raster.h ../cups/cups.h ../cups/ipp.h
+testraster.64.o: testraster.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+testraster.64.o: testraster.c  ../cups/language.h ../cups/debug.h ../cups/string.h ../config.h
+textcommon.64.o: textcommon.c  textcommon.h common.h ../cups/cups.h ../cups/ipp.h
+textcommon.64.o: textcommon.c  ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+textcommon.64.o: textcommon.c  ../cups/language.h ../cups/language.h ../cups/string.h
+textcommon.64.o: textcommon.c  ../config.h
+texttops.64.o: texttops.c  textcommon.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h
+texttops.64.o: texttops.c  ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+texttops.64.o: texttops.c  ../cups/language.h ../cups/string.h ../config.h
index ae7b7322f404b87eb2626dc265683b89ec6881d4..f657bd1853073aba2e8e5a35a7cde68cc949afbe 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 6158 2006-12-17 01:44:21Z mike $"
+# "$Id: Makefile 6315 2007-03-03 00:12:26Z mike $"
 #
 #   Filter makefile for the Common UNIX Printing System (CUPS).
 #
@@ -43,7 +43,7 @@ HPGLOBJS =    hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
 IMAGEOBJS =    image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
                image-photocd.o image-pix.o image-png.o image-pnm.o \
                image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
-               image-zoom.o image.o interpret.o raster.o
+               image-zoom.o image.o error.o interpret.o raster.o
 IMAGE32OBJS =  $(IMAGEOBJS:.o=.32.o)
 IMAGE64OBJS =  $(IMAGEOBJS:.o=.64.o)
 FORMOBJS =     form-attr.o form-main.o form-ps.o form-text.o form-tree.o
@@ -243,7 +243,7 @@ libcupsimage.2.dylib:       $(IMAGEOBJS)
        echo Linking $@...
        $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
                -install_name $(libdir)/$@ \
-               -current_version 2.2.0 \
+               -current_version 2.3.0 \
                -compatibility_version 2.0.0 \
                $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
        $(RM) libcupsimage.dylib
@@ -270,7 +270,7 @@ libcupsimage.la:       $(IMAGEOBJS)
        echo Linking $@...
        $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
                -L../cups $(LINKCUPS) \
-               -rpath $(LIBDIR) -version-info 2:2
+               -rpath $(LIBDIR) -version-info 2:3
 
 
 #
@@ -359,16 +359,16 @@ rastertohp:       rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
 testraster:    testraster.o ../cups/libcups.a libcupsimage.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \
-               $(IMGLIBS) $(DSOLIBS) $(LIBS)
+               $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) $(SSLLIBS) $(LIBGSSAPI)
 
 
 #
 # rasterbench
 #
 
-rasterbench:   rasterbench.o raster.o
+rasterbench:   rasterbench.o libcupsimage.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o $@ rasterbench.o raster.o
+       $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
 
 
 #
@@ -389,5 +389,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 6158 2006-12-17 01:44:21Z mike $".
+# End of "$Id: Makefile 6315 2007-03-03 00:12:26Z mike $".
 #
index c60e0a5175148632b092c3fb43a97dea803d1894..5ec13118ca55b248ae5cf2ce654a150996537772 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: common.c 6003 2006-10-02 16:26:04Z mike $"
+ * "$Id: common.c 5997 2006-10-02 15:33:05Z mike $"
  *
  *   Common filter routines for the Common UNIX Printing System (CUPS).
  *
@@ -540,5 +540,5 @@ WriteTextComment(const char *name,  /* I - Comment name ("Title", etc.) */
 
 
 /*
- * End of "$Id: common.c 6003 2006-10-02 16:26:04Z mike $".
+ * End of "$Id: common.c 5997 2006-10-02 15:33:05Z mike $".
  */
index 4ccf6b3a47bf6ddc30c7845a107876e633b155d4..9e8bb5925548014e2752e0d19c6387649e5283a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: common.h 6003 2006-10-02 16:26:04Z mike $"
+ * "$Id: common.h 5997 2006-10-02 15:33:05Z mike $"
  *
  *   Common filter definitions for the Common UNIX Printing System (CUPS).
  *
@@ -89,5 +89,5 @@ extern void   WriteTextComment(const char *name, const char *value);
 
 
 /*
- * End of "$Id: common.h 6003 2006-10-02 16:26:04Z mike $".
+ * End of "$Id: common.h 5997 2006-10-02 15:33:05Z mike $".
  */
diff --git a/filter/error.c b/filter/error.c
new file mode 100644 (file)
index 0000000..6d68a6e
--- /dev/null
@@ -0,0 +1,297 @@
+/*
+ * "$Id: error.c 6274 2007-02-13 21:05:28Z mike $"
+ *
+ *   Raster error handling for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2007 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:
+ *
+ *   _cupsRasterAddError()   - Add an error message to the error buffer.
+ *   _cupsRasterClearError() - Clear the error buffer.
+ *   cupsRasterErrorString() - Return the last error from a raster function.
+ *   get_error_buffer()      - Return a pointer to thread local storage.
+ *   raster_init()           - Initialize error buffer once.
+ *   raster_destructor()     - Free memory allocated by get_error_buffer().
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include "image-private.h"
+#include <stdarg.h>
+
+
+/*
+ * Local structures...
+ */
+
+typedef struct _cups_raster_error_s    /**** Error buffer structure ****/
+{
+  char *start,                         /* Start of buffer */
+       *current,                       /* Current position in buffer */
+       *end;                           /* End of buffer */
+} _cups_raster_error_t;
+
+
+/*
+ * Local functions...
+ */
+
+static _cups_raster_error_t    *get_error_buffer(void);
+
+
+/*
+ * '_cupsRasterAddError()' - Add an error message to the error buffer.
+ */
+
+void
+_cupsRasterAddError(const char *f,     /* I - Printf-style error message */
+                    ...)               /* I - Additional arguments as needed */
+{
+  _cups_raster_error_t *buf = get_error_buffer();
+                                       /* Error buffer */
+  va_list      ap;                     /* Pointer to additional arguments */
+  char         s[2048];                /* Message string */
+  size_t       bytes;                  /* Bytes in message string */
+
+
+  va_start(ap, f);
+  bytes = vsnprintf(s, sizeof(s), f, ap);
+  va_end(ap);
+
+  if (bytes <= 0)
+    return;
+
+  bytes ++;
+
+  if (bytes >= sizeof(s))
+    return;
+
+  if (bytes > (buf->end - buf->current))
+  {
+   /*
+    * Allocate more memory...
+    */
+
+    char       *temp;                  /* New buffer */
+    size_t     size;                   /* Size of buffer */
+
+
+    size = buf->end - buf->start + 2 * bytes + 1024;
+
+    if (buf->start)
+      temp = realloc(buf->start, size);
+    else
+      temp = malloc(size);
+
+    if (!temp)
+      return;
+
+   /*
+    * Update pointers...
+    */
+
+    buf->end     = temp + size;
+    buf->current = temp + (buf->current - buf->start);
+    buf->start   = temp;
+  }
+
+ /*
+  * Append the message to the end of the current string...
+  */
+
+  memcpy(buf->current, s, bytes);
+  buf->current += bytes - 1;
+}
+
+
+/*
+ * '_cupsRasterClearError()' - Clear the error buffer.
+ */
+
+void
+_cupsRasterClearError(void)
+{
+  _cups_raster_error_t *buf = get_error_buffer();
+                                       /* Error buffer */
+
+
+  buf->current = buf->start;
+
+  if (buf->start)
+    *(buf->start) = '\0';
+}
+
+
+/*
+ * 'cupsRasterErrorString()' - Return the last error from a raster function.
+ *
+ * If there are no recent errors, NULL is returned.
+ *
+ * @since CUPS 1.3@
+ */
+
+const char *                           /* O - Last error */
+cupsRasterErrorString(void)
+{
+  _cups_raster_error_t *buf = get_error_buffer();
+                                       /* Error buffer */
+
+
+  if (buf->current == buf->start)
+    return (NULL);
+  else
+    return (buf->start);
+}
+
+
+#ifdef HAVE_PTHREAD_H
+/*
+ * Implement per-thread globals...
+ */
+
+#  include <pthread.h>
+
+
+/*
+ * Local globals...
+ */
+
+static pthread_key_t   raster_key = -1;
+                                       /* Thread local storage key */
+static pthread_once_t  raster_key_once = PTHREAD_ONCE_INIT;
+                                       /* One-time initialization object */
+
+
+/*
+ * Local functions...
+ */
+
+static void    raster_init(void);
+static void    raster_destructor(void *value);
+
+
+/*
+ * 'get_error_buffer()' - Return a pointer to thread local storage.
+ */
+
+_cups_raster_error_t *                 /* O - Pointer to error buffer */
+get_error_buffer(void)
+{
+  _cups_raster_error_t *buf;           /* Pointer to error buffer */
+
+
+ /* 
+  * Initialize the global data exactly once...
+  */
+
+  DEBUG_printf(("get_error_buffer(): raster_key_once=%d\n",
+                raster_key_once));
+
+  pthread_once(&raster_key_once, raster_init);
+
+ /*
+  * See if we have allocated the data yet...
+  */
+
+  if ((buf = (_cups_raster_error_t *)pthread_getspecific(raster_key))
+          == NULL)
+  {
+    DEBUG_puts("get_error_buffer: allocating memory for thread...");
+
+   /*
+    * No, allocate memory as set the pointer for the key...
+    */
+
+    buf = calloc(1, sizeof(_cups_raster_error_t));
+    pthread_setspecific(raster_key, buf);
+
+    DEBUG_printf(("    buf=%p\n", buf));
+  }
+
+ /*
+  * Return the pointer to the data...
+  */
+
+  return (buf);
+}
+
+
+/*
+ * 'raster_init()' - Initialize error buffer once.
+ */
+
+static void
+raster_init(void)
+{
+  pthread_key_create(&raster_key, raster_destructor);
+
+  DEBUG_printf(("raster_init(): raster_key=%x(%u)\n", raster_key,
+                raster_key));
+}
+
+
+/*
+ * 'raster_destructor()' - Free memory allocated by get_error_buffer().
+ */
+
+static void
+raster_destructor(void *value)         /* I - Data to free */
+{
+  _cups_raster_error_t *buf = (_cups_raster_error_t *)value;
+                                       /* Error buffer */
+
+
+  DEBUG_printf(("raster_destructor(value=%p)\n", value));
+
+  if (buf->start)
+    free(buf->start);
+
+  free(value);
+}
+
+
+#else
+/*
+ * Implement static globals...
+ */
+
+/*
+ * 'get_error_buffer()' - Return a pointer to thread local storage.
+ */
+
+_cups_raster_error_t *                 /* O - Pointer to error buffer */
+get_error_buffer(void)
+{
+  static _cups_raster_error_t buf = { 0, 0, 0 };
+                                       /* Error buffer */
+
+
+  return (&buf);
+}
+#endif /* HAVE_PTHREAD_H */
+
+
+/*
+ * End of "$Id: error.c 6274 2007-02-13 21:05:28Z mike $".
+ */
index bfd079f87e09f2b7ead6eeba9b7adf4cb38f9ee1..20b1a1d01256162d70818a0307b9421ca7861ec0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: hpgl-prolog.c 6003 2006-10-02 16:26:04Z mike $"
+ * "$Id: hpgl-prolog.c 5997 2006-10-02 15:33:05Z mike $"
  *
  *   HP-GL/2 prolog routines for for the Common UNIX Printing System (CUPS).
  *
@@ -373,5 +373,5 @@ Outputf(const char *format, /* I - Printf-style string */
 
 
 /*
- * End of "$Id: hpgl-prolog.c 6003 2006-10-02 16:26:04Z mike $".
+ * End of "$Id: hpgl-prolog.c 5997 2006-10-02 15:33:05Z mike $".
  */
index dab979a659f9ccc5df990fe1b69c72997c86c89e..1dc5247632590c7c8c52a87495fd350dc53ecef2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-bmp.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-bmp.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   BMP image routines for the Common UNIX Printing System (CUPS).
  *
@@ -535,5 +535,5 @@ read_long(FILE *fp)               /* I - File to read from */
 
 
 /*
- * End of "$Id: image-bmp.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-bmp.c 5508 2006-05-11 11:41:16Z mike $".
  */
index 2cb4ced018af2e1c31a4ad51b21976dcb39281fa..cc442944ea9bbc6db76439e12b412503e6b469a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-colorspace.c 5519 2006-05-12 15:06:42Z mike $"
+ * "$Id: image-colorspace.c 5520 2006-05-12 16:37:36Z mike $"
  *
  *   Colorspace conversions for the Common UNIX Printing System (CUPS).
  *
@@ -1573,5 +1573,5 @@ zshear(float mat[3][3],                   /* I - Matrix */
 
 
 /*
- * End of "$Id: image-colorspace.c 5519 2006-05-12 15:06:42Z mike $".
+ * End of "$Id: image-colorspace.c 5520 2006-05-12 16:37:36Z mike $".
  */
index b56dd0c88f88071b9980b7406062ee4b9c959796..09784a60ebdc22bf02326767dbf22707014d447f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-gif.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-gif.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   GIF image routines for the Common UNIX Printing System (CUPS).
  *
@@ -695,5 +695,5 @@ gif_read_lzw(FILE *fp,                      /* I - File to read from */
 
 
 /*
- * End of "$Id: image-gif.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-gif.c 5508 2006-05-11 11:41:16Z mike $".
  */
index 7db80ae1f8b3636dfcc939c2c18a357481105fcd..5a07a7bbd1d07f91cef9786249a4a107dd3f57e1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-jpeg.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-jpeg.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   JPEG image routines for the Common UNIX Printing System (CUPS).
  *
@@ -320,5 +320,5 @@ _cupsImageReadJPEG(
 
 
 /*
- * End of "$Id: image-jpeg.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-jpeg.c 5508 2006-05-11 11:41:16Z mike $".
  */
index 195f0da3944f14b81578e42f2075c3cb59878a61..00171ecc1fd03775dde8fe194b56e0909b4fb620 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-photocd.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-photocd.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   PhotoCD routines for the Common UNIX Printing System (CUPS).
  *
@@ -313,5 +313,5 @@ _cupsImageReadPhotoCD(
 
 
 /*
- * End of "$Id: image-photocd.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-photocd.c 5508 2006-05-11 11:41:16Z mike $".
  */
index 64e5956230de53050c1f9c241b4206a6ac85da8e..ac471669dda942689003bef9fba0e3413abe672f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-pix.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-pix.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   Alias PIX image routines for the Common UNIX Printing System (CUPS).
  *
@@ -232,5 +232,5 @@ read_short(FILE *fp)                        /* I - File to read from */
 
 
 /*
- * End of "$Id: image-pix.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-pix.c 5508 2006-05-11 11:41:16Z mike $".
  */
index 97cbfc13f09aab23f03dbc3db87798d4f2773e70..3b4469bc98204552787ef59827829ed397c66835 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-png.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-png.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   PNG image routines for the Common UNIX Printing System (CUPS).
  *
@@ -280,5 +280,5 @@ _cupsImageReadPNG(
 
 
 /*
- * End of "$Id: image-png.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-png.c 5508 2006-05-11 11:41:16Z mike $".
  */
index b418f68e3a7d2797b16d4eaf509afb8c8ae1f1a5..12c294c1ce6137d68f3e57a920f9c2eb1195b000 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-pnm.c 6149 2006-12-06 20:25:42Z mike $"
+ * "$Id: image-pnm.c 6146 2006-12-06 20:19:52Z mike $"
  *
  *   Portable Any Map file routines for the Common UNIX Printing System (CUPS).
  *
@@ -301,5 +301,5 @@ _cupsImageReadPNM(
 
 
 /*
- * End of "$Id: image-pnm.c 6149 2006-12-06 20:25:42Z mike $".
+ * End of "$Id: image-pnm.c 6146 2006-12-06 20:19:52Z mike $".
  */
index f84ace850f34620e28b78ba6c38f7ac56d8e2277..c91b1834c787a14fee1127f5045458ba332b0879 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-private.h 6158 2006-12-17 01:44:21Z mike $"
+ * "$Id: image-private.h 6274 2007-02-13 21:05:28Z mike $"
  *
  *   Private image library definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -217,10 +217,11 @@ extern cups_izoom_t       *_cupsImageZoomNew(cups_image_t *img, int xc0, int yc0,
 extern int             _cupsRasterExecPS(cups_page_header2_t *h,
                                          int *preferred_bits,
                                          const char *code);
-
+extern void            _cupsRasterAddError(const char *f, ...);
+extern void            _cupsRasterClearError(void);
 
 #endif /* !_CUPS_IMAGE_PRIVATE_H_ */
 
 /*
- * End of "$Id: image-private.h 6158 2006-12-17 01:44:21Z mike $".
+ * End of "$Id: image-private.h 6274 2007-02-13 21:05:28Z mike $".
  */
index 234868512bfc748003840015455aba574ebfca80..288af2618763c04ee87b9cbcfa9a02f685f00fbb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-sgi.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-sgi.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   SGI image file routines for the Common UNIX Printing System (CUPS).
  *
@@ -279,5 +279,5 @@ _cupsImageReadSGI(
 
 
 /*
- * End of "$Id: image-sgi.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-sgi.c 5508 2006-05-11 11:41:16Z mike $".
  */
index bcc354a8fb8de63d485c7295d18d88ec61853115..c8ee702780e44f7c8a7a1b4b5903fbef89f8ee38 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-sun.c 6149 2006-12-06 20:25:42Z mike $"
+ * "$Id: image-sun.c 6147 2006-12-06 20:21:46Z mike $"
  *
  *   Sun Raster image file routines for the Common UNIX Printing System (CUPS).
  *
@@ -389,5 +389,5 @@ read_unsigned(FILE *fp)                     /* I - File to read from */
 
 
 /*
- * End of "$Id: image-sun.c 6149 2006-12-06 20:25:42Z mike $".
+ * End of "$Id: image-sun.c 6147 2006-12-06 20:21:46Z mike $".
  */
index 223324bbf781a9e9885a292e303b8014c0b03513..184cf96217dec18947379a35329c75cadbdcd2da 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: image-tiff.c 5509 2006-05-11 11:41:36Z mike $"
+ * "$Id: image-tiff.c 5508 2006-05-11 11:41:16Z mike $"
  *
  *   TIFF file routines for the Common UNIX Printing System (CUPS).
  *
@@ -1720,5 +1720,5 @@ _cupsImageReadTIFF(
 
 
 /*
- * End of "$Id: image-tiff.c 5509 2006-05-11 11:41:36Z mike $".
+ * End of "$Id: image-tiff.c 5508 2006-05-11 11:41:16Z mike $".
  */
index 666a91453d088ca8caddd4c93d7def0639e2fbf9..ed8761064fe55049647a229f7726101d83755654 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: imagetops.c 6003 2006-10-02 16:26:04Z mike $"
+ * "$Id: imagetops.c 5997 2006-10-02 15:33:05Z mike $"
  *
  *   Image file to PostScript filter for the Common UNIX Printing System (CUPS).
  *
@@ -1063,5 +1063,5 @@ ps_ascii85(cups_ib_t *data,               /* I - Data to print */
 
 
 /*
- * End of "$Id: imagetops.c 6003 2006-10-02 16:26:04Z mike $".
+ * End of "$Id: imagetops.c 5997 2006-10-02 15:33:05Z mike $".
  */
index 32bc9a7c79edd19717d14d3ba62e0bc91198fe3c..db92982314ebe5b26c43822d1968ec06225f9e9d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: imagetoraster.c 5522 2006-05-15 05:02:15Z mike $"
+ * "$Id: imagetoraster.c 5523 2006-05-15 05:02:43Z mike $"
  *
  *   Image file to raster filter for the Common UNIX Printing System (CUPS).
  *
@@ -4310,5 +4310,5 @@ raster_cb(
 
 
 /*
- * End of "$Id: imagetoraster.c 5522 2006-05-15 05:02:15Z mike $".
+ * End of "$Id: imagetoraster.c 5523 2006-05-15 05:02:43Z mike $".
  */
index 6f9c9f855512b7e9243b4614f1923bc2935476ad..f3c092d92b39cc44908b58341de2c997e69b050a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: interpret.c 6282 2007-02-14 16:33:54Z mike $"
+ * "$Id: interpret.c 6281 2007-02-14 16:32:42Z mike $"
  *
  *   PPD command interpreter for the Common UNIX Printing System (CUPS).
  *
@@ -31,6 +31,9 @@
  *   cleartomark_stack()      - Clear to the last mark ([) on the stack.
  *   copy_stack()             - Copy the top N stack objects.
  *   delete_stack()           - Free memory used by a stack.
+ *   error_object()           - Add an object's value to the current error
+ *                              message.
+ *   error_stack()            - Add a stack to the current error message.
  *   index_stack()            - Copy the Nth value on the stack.
  *   new_stack()              - Create a new stack.
  *   pop_stock()              - Pop the top object off the stack.
@@ -107,6 +110,8 @@ typedef struct
 static int             cleartomark_stack(_cups_ps_stack_t *st);
 static int             copy_stack(_cups_ps_stack_t *st, int count);
 static void            delete_stack(_cups_ps_stack_t *st);
+static void            error_object(_cups_ps_obj_t *obj);
+static void            error_stack(_cups_ps_stack_t *st, const char *title);
 static _cups_ps_obj_t  *index_stack(_cups_ps_stack_t *st, int n);
 static _cups_ps_stack_t        *new_stack(void);
 static _cups_ps_obj_t  *pop_stack(_cups_ps_stack_t *st);
@@ -167,8 +172,13 @@ cupsRasterInterpretPPD(
   * Range check input...
   */
 
+  _cupsRasterClearError();
+
   if (!h)
+  {
+    _cupsRasterAddError("Page header cannot be NULL!\n");
     return (-1);
+  }
 
  /*
   * Reset the page header to the defaults...
@@ -304,7 +314,10 @@ cupsRasterInterpretPPD(
   */
 
   if (func && (*func)(h, preferred_bits))
+  {
+    _cupsRasterAddError("Page header callback returned error.\n");
     return (-1);
+  }
 
  /*
   * Check parameters...
@@ -317,7 +330,10 @@ cupsRasterInterpretPPD(
        h->cupsBitsPerColor != 16) ||
       h->cupsBorderlessScalingFactor < 0.5 ||
       h->cupsBorderlessScalingFactor > 2.0)
+  {
+    _cupsRasterAddError("Page header uses unsupported values.\n");
     return (-1);
+  }
 
  /*
   * Compute the bitmap parameters...
@@ -431,10 +447,14 @@ _cupsRasterExecPS(
   */
 
   if ((codecopy = strdup(code)) == NULL)
+  {
+    _cupsRasterAddError("Unable to duplicate code string.\n");
     return (-1);
+  }
 
   if ((st = new_stack()) == NULL)
   {
+    _cupsRasterAddError("Unable to create stack.\n");
     free(codecopy);
     return (-1);
   }
@@ -462,7 +482,8 @@ _cupsRasterExecPS(
       case CUPS_PS_CLEARTOMARK :
           pop_stack(st);
 
-         cleartomark_stack(st);
+         if (cleartomark_stack(st))
+           _cupsRasterAddError("cleartomark: Stack underflow!\n");
 
 #ifdef DEBUG
           fputs("    dup: ", stdout);
@@ -554,6 +575,7 @@ _cupsRasterExecPS(
          break;
 
       case CUPS_PS_OTHER :
+          _cupsRasterAddError("Unknown operator \"%s\"!\n", obj->value.other);
           DEBUG_printf(("    Unknown operator \"%s\"!\n", obj->value.other));
           break;
     }
@@ -570,6 +592,8 @@ _cupsRasterExecPS(
 
   if (st->num_objs > 0)
   {
+    error_stack(st, "Stack not empty:");
+
 #ifdef DEBUG
     fputs("    Stack not empty:", stdout);
     DEBUG_stack(st);
@@ -652,6 +676,122 @@ delete_stack(_cups_ps_stack_t *st)        /* I - Stack */
 }
 
 
+/*
+ * 'error_object()' - Add an object's value to the current error message.
+ */
+
+static void
+error_object(_cups_ps_obj_t *obj)      /* I - Object to add */
+{
+  switch (obj->type)
+  {
+    case CUPS_PS_NAME :
+       _cupsRasterAddError(" /%s", obj->value.name);
+       break;
+
+    case CUPS_PS_NUMBER :
+       _cupsRasterAddError(" %g", obj->value.number);
+       break;
+
+    case CUPS_PS_STRING :
+       _cupsRasterAddError(" (%s)", obj->value.string);
+       break;
+
+    case CUPS_PS_BOOLEAN :
+       if (obj->value.boolean)
+         _cupsRasterAddError(" true");
+       else
+         _cupsRasterAddError(" false");
+       break;
+
+    case CUPS_PS_NULL :
+       _cupsRasterAddError(" null");
+       break;
+
+    case CUPS_PS_START_ARRAY :
+       _cupsRasterAddError(" [");
+       break;
+
+    case CUPS_PS_END_ARRAY :
+       _cupsRasterAddError(" ]");
+       break;
+
+    case CUPS_PS_START_DICT :
+       _cupsRasterAddError(" <<");
+       break;
+
+    case CUPS_PS_END_DICT :
+       _cupsRasterAddError(" >>");
+       break;
+
+    case CUPS_PS_START_PROC :
+       _cupsRasterAddError(" {");
+       break;
+
+    case CUPS_PS_END_PROC :
+       _cupsRasterAddError(" }");
+       break;
+
+    case CUPS_PS_COPY :
+       _cupsRasterAddError(" --copy--");
+        break;
+
+    case CUPS_PS_CLEARTOMARK :
+       _cupsRasterAddError(" --cleartomark--");
+        break;
+
+    case CUPS_PS_DUP :
+       _cupsRasterAddError(" --dup--");
+        break;
+
+    case CUPS_PS_INDEX :
+       _cupsRasterAddError(" --index--");
+        break;
+
+    case CUPS_PS_POP :
+       _cupsRasterAddError(" --pop--");
+        break;
+
+    case CUPS_PS_ROLL :
+       _cupsRasterAddError(" --roll--");
+        break;
+
+    case CUPS_PS_SETPAGEDEVICE :
+       _cupsRasterAddError(" --setpagedevice--");
+        break;
+
+    case CUPS_PS_STOPPED :
+       _cupsRasterAddError(" --stopped--");
+        break;
+
+    case CUPS_PS_OTHER :
+       _cupsRasterAddError(" --%s--", obj->value.other);
+       break;
+  }
+}
+
+
+/*
+ * 'error_stack()' - Add a stack to the current error message...
+ */
+
+static void
+error_stack(_cups_ps_stack_t *st,      /* I - Stack */
+            const char       *title)   /* I - Title string */
+{
+  int                  c;              /* Looping var */
+  _cups_ps_obj_t       *obj;           /* Current object on stack */
+
+
+  _cupsRasterAddError(title);
+
+  for (obj = st->objs, c = st->num_objs; c > 0; c --, obj ++)
+    error_object(obj);
+
+  _cupsRasterAddError("\n");
+}
+
+
 /*
  * 'index_stack()' - Copy the Nth value on the stack.
  */
@@ -1500,5 +1640,5 @@ DEBUG_stack(_cups_ps_stack_t *st) /* I - Stack */
 
 
 /*
- * End of "$Id: interpret.c 6282 2007-02-14 16:33:54Z mike $".
+ * End of "$Id: interpret.c 6281 2007-02-14 16:32:42Z mike $".
  */
index f81fcdda3576709a7698e8371e62f2fc0e3afcd8..c7ee6fcafaebd000e206239f22f291b0d555d20f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: pstops.c 6247 2007-02-07 20:54:37Z mike $"
+ * "$Id: pstops.c 6320 2007-03-08 13:36:56Z mike $"
  *
  *   PostScript filter for the Common UNIX Printing System (CUPS).
  *
@@ -937,13 +937,20 @@ copy_dsc(cups_file_t  *fp,                /* I - File to read from */
         ppdEmitJCL(ppd, stdout, doc->job_id, doc->user, doc->title);
 
        puts("%!PS-Adobe-3.0");
-       
-        pageinfo = (pstops_page_t *)cupsArrayFirst(doc->pages);
-       copy_bytes(doc->temp, 0, pageinfo->offset);
 
        number = 0;
       }
 
+     /*
+      * Copy the prolog as needed...
+      */
+
+      if (!number)
+      {
+        pageinfo = (pstops_page_t *)cupsArrayFirst(doc->pages);
+       copy_bytes(doc->temp, 0, pageinfo->offset);
+      }
+
      /*
       * Then copy all of the pages...
       */
@@ -3281,5 +3288,5 @@ write_labels(pstops_doc_t *doc,           /* I - Document information */
 
 
 /*
- * End of "$Id: pstops.c 6247 2007-02-07 20:54:37Z mike $".
+ * End of "$Id: pstops.c 6320 2007-03-08 13:36:56Z mike $".
  */
index 1118e7e1ecb01fbe8d520c4e9c04d1dc2688855c..32155073bfdd49a45babe4be201820f10f914891 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: raster.c 6061 2006-10-23 00:26:52Z mike $"
+ * "$Id: raster.c 6274 2007-02-13 21:05:28Z mike $"
  *
  *   Raster file routines for the Common UNIX Printing System (CUPS).
  *
@@ -43,6 +43,7 @@
  *   cups_raster_read_header() - Read a raster page header.
  *   cups_raster_update()      - Update the raster header and row count for the
  *                               current page.
+ *   cups_raster_write()       - Write a row of raster data...
  *   cups_read()               - Read bytes from a file.
  *   cups_swap()               - Swap bytes in raster data...
  *   cups_write()              - Write bytes to a file.
@@ -52,7 +53,7 @@
  * Include necessary headers...
  */
 
-#include "raster.h"
+#include "image-private.h"
 #include <cups/debug.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -98,6 +99,7 @@ static unsigned       cups_raster_read_header(cups_raster_t *r);
 static int     cups_raster_read(cups_raster_t *r, unsigned char *buf,
                                 int bytes);
 static void    cups_raster_update(cups_raster_t *r);
+static int     cups_raster_write(cups_raster_t *r, const unsigned char *pixels);
 static int     cups_read(int fd, unsigned char *buf, int bytes);
 static void    cups_swap(unsigned char *buf, int bytes);
 static int     cups_write(int fd, const unsigned char *buf, int bytes);
@@ -134,11 +136,17 @@ cupsRasterOpen(int         fd,            /* I - File descriptor */
   cups_raster_t        *r;                     /* New stream */
 
 
+  _cupsRasterClearError();
+
   if ((r = calloc(sizeof(cups_raster_t), 1)) == NULL)
+  {
+    _cupsRasterAddError("Unable to allocate memory for raster stream: %s\n",
+                        strerror(errno));
     return (NULL);
+  }
 
   r->fd   = fd;
-  r->mode = mode;
+  r->mode = mode == CUPS_RASTER_WRITE_COMPRESSED ? CUPS_RASTER_WRITE : mode;
 
   if (mode == CUPS_RASTER_READ)
   {
@@ -148,6 +156,8 @@ cupsRasterOpen(int         fd,              /* I - File descriptor */
 
     if (!cups_read(r->fd, (unsigned char *)&(r->sync), sizeof(r->sync)))
     {
+      _cupsRasterAddError("Unable to read header from raster stream: %s\n",
+                          strerror(errno));
       free(r);
       return (NULL);
     }
@@ -159,6 +169,7 @@ cupsRasterOpen(int         fd,              /* I - File descriptor */
         r->sync != CUPS_RASTER_SYNCv2 &&
         r->sync != CUPS_RASTER_REVSYNCv2)
     {
+      _cupsRasterAddError("Unknown raster format %08x!\n", r->sync);
       free(r);
       return (NULL);
     }
@@ -178,11 +189,19 @@ cupsRasterOpen(int         fd,            /* I - File descriptor */
     * Open for write - put sync word...
     */
 
-    r->sync = CUPS_RASTER_SYNC;
+    if (mode == CUPS_RASTER_WRITE_COMPRESSED)
+    {
+      r->compressed = 1;
+      r->sync       = CUPS_RASTER_SYNCv2;
+    }
+    else
+      r->sync = CUPS_RASTER_SYNC;
 
     if (cups_write(r->fd, (unsigned char *)&(r->sync), sizeof(r->sync))
             < sizeof(r->sync))
     {
+      _cupsRasterAddError("Unable to write raster stream header: %s\n",
+                          strerror(errno));
       free(r);
       return (NULL);
     }
@@ -524,6 +543,10 @@ cupsRasterWritePixels(cups_raster_t *r,    /* I - Raster stream */
                       unsigned char *p,        /* I - Bytes to write */
                      unsigned      len)/* I - Number of bytes to write */
 {
+  int          bytes;                  /* Bytes read */
+  unsigned     remaining;              /* Bytes remaining */
+
+
 #ifdef DEBUG
   fprintf(stderr, "cupsRasterWritePixels(r=%p, p=%p, len=%u), remaining=%u\n",
           r, p, len, r->remaining);
@@ -532,13 +555,113 @@ cupsRasterWritePixels(cups_raster_t *r,  /* I - Raster stream */
   if (r == NULL || r->mode != CUPS_RASTER_WRITE || r->remaining == 0)
     return (0);
 
+  if (!r->compressed)
+  {
+   /*
+    * Without compression, just write the raster data raw...
+    */
+
+    r->remaining -= len / r->header.cupsBytesPerLine;
+
+    return (cups_write(r->fd, p, len));
+  }
+
  /*
-  * No write compression, just write the raster data raw...
+  * Otherwise, compress each line...
   */
 
-  r->remaining -= len / r->header.cupsBytesPerLine;
+  for (remaining = len; remaining > 0; remaining -= bytes, p += bytes)
+  {
+   /*
+    * Figure out the number of remaining bytes on the current line...
+    */
+
+    if ((bytes = remaining) > (r->pend - r->pcurrent))
+      bytes = r->pend - r->pcurrent;
+
+    if (r->count > 0)
+    {
+     /*
+      * Check to see if this line is the same as the previous line...
+      */
+
+      if (memcmp(p, r->pcurrent, bytes))
+      {
+        if (!cups_raster_write(r, r->pixels))
+         return (0);
+
+       r->count = 0;
+      }
+      else
+      {
+       /*
+        * Mark more bytes as the same...
+       */
+
+        r->pcurrent += bytes;
+
+       if (r->pcurrent >= r->pend)
+       {
+        /*
+          * Increase the repeat count...
+         */
+
+         r->count ++;
+         r->pcurrent = r->pixels;
+
+        /*
+          * Flush out this line if it is the last one...
+         */
+
+         r->remaining --;
+
+         if (r->remaining == 0)
+           return (cups_raster_write(r, r->pixels));
+         else if (r->count == 256)
+         {
+           if (cups_raster_write(r, r->pixels) == 0)
+             return (0);
 
-  return (cups_write(r->fd, p, len));
+           r->count = 0;
+         }
+       }
+
+       continue;
+      }
+    }
+
+    if (r->count == 0)
+    {
+     /*
+      * Copy the raster data to the buffer...
+      */
+
+      memcpy(r->pcurrent, p, bytes);
+
+      r->pcurrent += bytes;
+
+      if (r->pcurrent >= r->pend)
+      {
+       /*
+        * Increase the repeat count...
+       */
+
+       r->count ++;
+       r->pcurrent = r->pixels;
+
+       /*
+        * Flush out this line if it is the last one...
+       */
+
+       r->remaining --;
+
+       if (r->remaining == 0)
+         return (cups_raster_write(r, r->pixels));
+      }
+    }
+  }
+
+  return (len);
 }
 
 
@@ -839,6 +962,120 @@ cups_raster_update(cups_raster_t *r)      /* I - Raster stream */
 }
 
 
+/*
+ * 'cups_raster_write()' - Write a row of compressed raster data...
+ */
+
+static int                             /* O - Number of bytes written */
+cups_raster_write(
+    cups_raster_t       *r,            /* I - Raster stream */
+    const unsigned char *pixels)       /* I - Pixel data to write */
+{
+  const unsigned char  *start,         /* Start of sequence */
+                       *ptr,           /* Current pointer in sequence */
+                       *pend,          /* End of raster buffer */
+                       *plast;         /* Pointer to last pixel */
+  unsigned char                *wptr;          /* Pointer into write buffer */
+  int                  bpp,            /* Bytes per pixel */
+                       count,          /* Count */
+                       maxrun;         /* Maximum run of 128 * bpp */
+
+
+#ifdef DEBUG
+  fprintf(stderr, "cups_raster_write(r=%p, pixels=%p)\n", r, pixels);
+#endif /* DEBUG */
+
+ /*
+  * Allocate a write buffer as needed...
+  */
+
+  count = r->header.cupsBytesPerLine * 2;
+  if (count > r->bufsize)
+  {
+    if (r->buffer)
+      wptr = realloc(r->buffer, count);
+    else
+      wptr = malloc(count);
+
+    if (!wptr)
+      return (-1);
+
+    r->buffer  = wptr;
+    r->bufsize = count;
+  }
+
+ /*
+  * Write the row repeat count...
+  */
+
+  bpp     = r->bpp;
+  pend    = pixels + r->header.cupsBytesPerLine;
+  plast   = pend - bpp;
+  wptr    = r->buffer;
+  *wptr++ = r->count - 1;
+  maxrun  = 128 * bpp;
+
+ /*
+  * Write using a modified TIFF "packbits" compression...
+  */
+
+  for (ptr = pixels; ptr < pend;)
+  {
+    start = ptr;
+    ptr += bpp;
+
+    if (ptr == pend)
+    {
+     /*
+      * Encode a single pixel at the end...
+      */
+
+      *wptr++ = 0;
+      for (count = bpp; count > 0; count --)
+        *wptr++ = *start++;
+    }
+    else if (!memcmp(start, ptr, bpp))
+    {
+     /*
+      * Encode a sequence of repeating pixels...
+      */
+
+      for (count = 2; count < 128 && ptr < plast; count ++, ptr += bpp)
+        if (memcmp(ptr, ptr + bpp, bpp))
+         break;
+
+      *wptr++ = count - 1;
+      for (count = bpp; count > 0; count --)
+        *wptr++ = *ptr++;
+    }
+    else
+    {
+     /*
+      * Encode a sequence of non-repeating pixels...
+      */
+
+      for (count = 1; count < 127 && ptr < plast; count ++, ptr += bpp)
+        if (!memcmp(ptr, ptr + bpp, bpp))
+         break;
+
+      if (ptr >= plast && count < 128)
+      {
+        count ++;
+       ptr += bpp;
+      }
+      *wptr++ = 257 - count;
+
+      count *= bpp;
+      memcpy(wptr, start, count);
+      wptr += count;
+    }
+  }
+
+  return (cups_write(r->fd, r->buffer, wptr - r->buffer));
+}
+
+
 /*
  * 'cups_read()' - Read bytes from a file.
  */
@@ -928,5 +1165,5 @@ cups_write(int                 fd, /* I - File descriptor */
 
 
 /*
- * End of "$Id: raster.c 6061 2006-10-23 00:26:52Z mike $".
+ * End of "$Id: raster.c 6274 2007-02-13 21:05:28Z mike $".
  */
index 27e276a156b84a0efc55fb403845e13fcc17ab5e..e76bf46c2f74ba718dd2d579d48763797cdd8cde 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: raster.h 6158 2006-12-17 01:44:21Z mike $"
+ * "$Id: raster.h 6274 2007-02-13 21:05:28Z mike $"
  *
  *   Raster file definitions for the Common UNIX Printing System (CUPS).
  *
@@ -159,7 +159,8 @@ typedef enum cups_jog_e                     /**** Jog attribute values ****/
 typedef enum cups_mode_e               /**** Raster modes ****/
 {
   CUPS_RASTER_READ = 0,                        /* Open stream for reading */
-  CUPS_RASTER_WRITE = 1                        /* Open stream for writing */
+  CUPS_RASTER_WRITE = 1,               /* Open stream for writing */
+  CUPS_RASTER_WRITE_COMPRESSED = 2     /* Open stream for compressed writing @since CUPS 1.3@ */
 } cups_mode_t;
 
 typedef enum cups_order_e              /**** cupsColorOrder attribute values ****/
@@ -331,6 +332,9 @@ extern unsigned             cupsRasterReadHeader2(cups_raster_t *r,
 extern unsigned                cupsRasterWriteHeader2(cups_raster_t *r,
                                               cups_page_header2_t *h);
 
+/**** New in CUPS 1.3 ****/
+extern const char      *cupsRasterErrorString(void);
+
 #  ifdef __cplusplus
 }
 #  endif /* __cplusplus */
@@ -338,5 +342,5 @@ extern unsigned             cupsRasterWriteHeader2(cups_raster_t *r,
 #endif /* !_CUPS_RASTER_H_ */
 
 /*
- * End of "$Id: raster.h 6158 2006-12-17 01:44:21Z mike $".
+ * End of "$Id: raster.h 6274 2007-02-13 21:05:28Z mike $".
  */
index b26836b4e4d7b05985a348fef3f2a78003c76af9..f954f63e04222164388b55de4a403e0b1a8ec333 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: rasterbench.c 5671 2006-06-16 11:17:39Z mike $"
+ * "$Id: rasterbench.c 5667 2006-06-16 10:21:49Z mike $"
  *
  *   Raster benchmark program for the Common UNIX Printing System (CUPS).
  *
@@ -351,5 +351,5 @@ write_test(int fd)                  /* I - File descriptor to write to */
 
 
 /*
- * End of "$Id: rasterbench.c 5671 2006-06-16 11:17:39Z mike $".
+ * End of "$Id: rasterbench.c 5667 2006-06-16 10:21:49Z mike $".
  */
index bc4ca7c979ff3148498a877250e2eb9e629e8bb6..0154472246a5932a2e1bcd153e4bf3d2fb494c94 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: rastertolabel.c 6236 2007-02-05 21:04:04Z mike $"
+ * "$Id: rastertolabel.c 6235 2007-02-05 21:03:49Z mike $"
  *
  *   Label printer filter for the Common UNIX Printing System (CUPS).
  *
@@ -30,6 +30,7 @@
  *   EndPage()      - Finish a page of graphics.
  *   CancelJob()    - Cancel the current job...
  *   OutputLine()   - Output a line of graphics.
+ *   PCLCompress()  - Output a PCL (mode 3) compressed line.
  *   ZPLCompress()  - Output a run-length compression sequence.
  *   main()         - Main entry and processing of driver.
  */
 
 
 /*
- * This driver filter currently supports Dymo and Zebra label printers.
+ * This driver filter currently supports Dymo, Intellitech, and Zebra
+ * label printers.
  *
  * The Dymo portion of the driver has been tested with the 300, 330,
- * and 330 Turbo label printers; it may also work with older models.
+ * and 330 Turbo label printers; it may also work with other models.
  * The Dymo printers support printing at 136, 203, and 300 DPI.
  *
- * The Zebra portion of the driver has been tested with the LP-2844Z label
- * printer; it may also work with other models.  The driver supports EPL
- * line mode, EPL page mode, ZPL, and CPCL as defined in Zebra's on-line
- * developer documentation.
+ * The Intellitech portion of the driver has been tested with the
+ * Intellibar 408, 412, and 808 and supports their PCL variant.
+ *
+ * The Zebra portion of the driver has been tested with the LP-2844,
+ * LP-2844Z, QL-320, and QL-420 label printers; it may also work with
+ * other models.  The driver supports EPL line mode, EPL page mode,
+ * ZPL, and CPCL as defined in Zebra's on-line developer documentation.
  */
 
 /*
@@ -71,6 +76,8 @@
 #define ZEBRA_ZPL      0x12            /* Zebra ZPL-based printers */
 #define ZEBRA_CPCL     0x13            /* Zebra CPCL-based printers */
 
+#define INTELLITECH_PCL        0x20            /* Intellitech PCL-based printers */
+
 
 /*
  * Globals...
@@ -95,6 +102,7 @@ void StartPage(ppd_file_t *ppd, cups_page_header_t *header);
 void   EndPage(ppd_file_t *ppd, cups_page_header_t *header);
 void   CancelJob(int sig);
 void   OutputLine(ppd_file_t *ppd, cups_page_header_t *header, int y);
+void   PCLCompress(unsigned char *line, int length);
 void   ZPLCompress(char repeat_char, int repeat_count);
 
 
@@ -147,6 +155,15 @@ Setup(ppd_file_t *ppd)                     /* I - PPD file */
 
     case ZEBRA_CPCL :
         break;
+
+    case INTELLITECH_PCL :
+       /*
+       * Send a PCL reset sequence.
+       */
+
+       putchar(0x1b);
+       putchar('E');
+        break;
   }
 }
 
@@ -213,6 +230,9 @@ StartPage(ppd_file_t         *ppd,  /* I - PPD file */
   fprintf(stderr, "DEBUG: cupsColorOrder = %d\n", header->cupsColorOrder);
   fprintf(stderr, "DEBUG: cupsColorSpace = %d\n", header->cupsColorSpace);
   fprintf(stderr, "DEBUG: cupsCompression = %d\n", header->cupsCompression);
+  fprintf(stderr, "DEBUG: cupsRowCount = %d\n", header->cupsRowCount);
+  fprintf(stderr, "DEBUG: cupsRowFeed = %d\n", header->cupsRowFeed);
+  fprintf(stderr, "DEBUG: cupsRowStep = %d\n", header->cupsRowStep);
 
  /*
   * Register a signal handler to eject the current page if the
@@ -355,6 +375,120 @@ StartPage(ppd_file_t         *ppd,        /* I - PPD file */
        printf("PAGE-WIDTH %d\r\n", header->cupsWidth);
        printf("PAGE-HEIGHT %d\r\n", header->cupsWidth);
         break;
+
+    case INTELLITECH_PCL :
+       /*
+        * Set the media size...
+       */
+
+       printf("\033&l6D\033&k12H");    /* Set 6 LPI, 10 CPI */
+       printf("\033&l0O");             /* Set portrait orientation */
+
+       switch (header->PageSize[1])
+       {
+         case 540 : /* Monarch Envelope */
+              printf("\033&l80A");     /* Set page size */
+             break;
+
+         case 624 : /* DL Envelope */
+              printf("\033&l90A");     /* Set page size */
+             break;
+
+         case 649 : /* C5 Envelope */
+              printf("\033&l91A");     /* Set page size */
+             break;
+
+         case 684 : /* COM-10 Envelope */
+              printf("\033&l81A");     /* Set page size */
+             break;
+
+         case 756 : /* Executive */
+              printf("\033&l1A");      /* Set page size */
+             break;
+
+         case 792 : /* Letter */
+              printf("\033&l2A");      /* Set page size */
+             break;
+
+         case 842 : /* A4 */
+              printf("\033&l26A");     /* Set page size */
+             break;
+
+         case 1008 : /* Legal */
+              printf("\033&l3A");      /* Set page size */
+             break;
+
+          default : /* Custom size */
+             printf("\033!f%dZ", header->PageSize[1] * 300 / 72);
+             break;
+       }
+
+       printf("\033&l%dP",             /* Set page length */
+               header->PageSize[1] / 12);
+       printf("\033&l0E");             /* Set top margin to 0 */
+        printf("\033&l%dX", header->NumCopies);
+                                       /* Set number copies */
+        printf("\033&l0L");            /* Turn off perforation skip */
+
+       /*
+        * Print settings...
+       */
+
+       if (Page == 1)
+       {
+          if (header->cupsRowFeed)     /* inPrintRate */
+           printf("\033!p%dS", header->cupsRowFeed);
+
+          if (header->cupsCompression != ~0)
+                                       /* inPrintDensity */
+           printf("\033&d%dA", 30 * header->cupsCompression / 100 - 15);
+
+         if ((choice = ppdFindMarkedChoice(ppd, "inPrintMode")) != NULL)
+         {
+           if (!strcmp(choice->choice, "Standard"))
+             fputs("\033!p0M", stdout);
+           else if (!strcmp(choice->choice, "Tear"))
+           {
+             fputs("\033!p1M", stdout);
+
+              if (header->cupsRowCount)        /* inTearInterval */
+               printf("\033!n%dT", header->cupsRowCount);
+            }
+           else
+           {
+             fputs("\033!p2M", stdout);
+
+              if (header->cupsRowStep) /* inCutInterval */
+               printf("\033!n%dC", header->cupsRowStep);
+            }
+         }
+        }
+
+       /*
+       * Setup graphics...
+       */
+
+       printf("\033*t%dR", header->HWResolution[0]);
+                                       /* Set resolution */
+
+       printf("\033*r%dS", header->cupsWidth);
+                                       /* Set width */
+       printf("\033*r%dT", header->cupsHeight);
+                                       /* Set height */
+
+       printf("\033&a0H");             /* Set horizontal position */
+       printf("\033&a0V");             /* Set vertical position */
+        printf("\033*r1A");            /* Start graphics */
+        printf("\033*b3M");            /* Set compression */
+
+       /*
+        * Allocate compression buffers...
+       */
+
+       CompBuffer = malloc(2 * header->cupsBytesPerLine + 1);
+       LastBuffer = malloc(header->cupsBytesPerLine);
+       LastSet    = 0;
+        break;
   }
 
  /*
@@ -596,6 +730,11 @@ EndPage(ppd_file_t *ppd,           /* I - PPD file */
 
        puts("PRINT\r");
        break;
+
+    case INTELLITECH_PCL :
+        printf("\033*rB");             /* End GFX */
+        printf("\014");                        /* Eject current page */
+        break;
   }
 
   fflush(stdout);
@@ -799,7 +938,160 @@ OutputLine(ppd_file_t         *ppd,       /* I - PPD file */
          fflush(stdout);
        }
        break;
+
+    case INTELLITECH_PCL :
+       if (Buffer[0] ||
+            memcmp(Buffer, Buffer + 1, header->cupsBytesPerLine - 1))
+        {
+         if (Feed)
+         {
+           printf("\033*b%dY", Feed);
+           Feed    = 0;
+           LastSet = 0;
+         }
+
+          PCLCompress(Buffer, header->cupsBytesPerLine);
+       }
+       else
+         Feed ++;
+        break;
+  }
+}
+
+
+/*
+ * 'PCLCompress()' - Output a PCL (mode 3) compressed line.
+ */
+
+void
+PCLCompress(unsigned char *line,       /* I - Line to compress */
+            int           length)      /* I - Length of line */
+{
+  unsigned char        *line_ptr,              /* Current byte pointer */
+               *line_end,              /* End-of-line byte pointer */
+               *comp_ptr,              /* Pointer into compression buffer */
+               *start,                 /* Start of compression sequence */
+               *seed;                  /* Seed buffer pointer */
+  int           count,                 /* Count of bytes for output */
+               offset;                 /* Offset of bytes for output */
+
+
+ /*
+  * Do delta-row compression...
+  */
+
+  line_ptr = line;
+  line_end = line + length;
+
+  comp_ptr = CompBuffer;
+  seed     = LastBuffer;
+
+  while (line_ptr < line_end)
+  {
+   /*
+    * Find the next non-matching sequence...
+    */
+
+    start = line_ptr;
+
+    if (!LastSet)
+    {
+     /*
+      * The seed buffer is invalid, so do the next 8 bytes, max...
+      */
+
+      offset = 0;
+
+      if ((count = line_end - line_ptr) > 8)
+       count = 8;
+
+      line_ptr += count;
+    }
+    else
+    {
+     /*
+      * The seed buffer is valid, so compare against it...
+      */
+
+      while (*line_ptr == *seed &&
+             line_ptr < line_end)
+      {
+        line_ptr ++;
+        seed ++;
+      }
+
+      if (line_ptr == line_end)
+        break;
+
+      offset = line_ptr - start;
+
+     /*
+      * Find up to 8 non-matching bytes...
+      */
+
+      start = line_ptr;
+      count = 0;
+      while (*line_ptr != *seed &&
+             line_ptr < line_end &&
+             count < 8)
+      {
+        line_ptr ++;
+        seed ++;
+        count ++;
+      }
+    }
+
+   /*
+    * Place mode 3 compression data in the buffer; see HP manuals
+    * for details...
+    */
+
+    if (offset >= 31)
+    {
+     /*
+      * Output multi-byte offset...
+      */
+
+      *comp_ptr++ = ((count - 1) << 5) | 31;
+
+      offset -= 31;
+      while (offset >= 255)
+      {
+        *comp_ptr++ = 255;
+        offset    -= 255;
+      }
+
+      *comp_ptr++ = offset;
+    }
+    else
+    {
+     /*
+      * Output single-byte offset...
+      */
+
+      *comp_ptr++ = ((count - 1) << 5) | offset;
+    }
+
+    memcpy(comp_ptr, start, count);
+    comp_ptr += count;
   }
+
+  line_ptr = CompBuffer;
+  line_end = comp_ptr;
+
+ /*
+  * Set the length of the data and write it...
+  */
+
+  printf("\033*b%dW", comp_ptr - CompBuffer);
+  fwrite(CompBuffer, comp_ptr - CompBuffer, 1, stdout);
+
+ /*
+  * Save this line as a "seed" buffer for the next...
+  */
+
+  memcpy(LastBuffer, line, length);
+  LastSet = 1;
 }
 
 
@@ -1014,5 +1306,5 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: rastertolabel.c 6236 2007-02-05 21:04:04Z mike $".
+ * End of "$Id: rastertolabel.c 6235 2007-02-05 21:03:49Z mike $".
  */
index dd1c76ae8ed0b32ed61356dd650ad39be24762dc..f6d9db8a44eb2639c1cec2886688106c2c3e5af8 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: testraster.c 6158 2006-12-17 01:44:21Z mike $"
+ * "$Id: testraster.c 6331 2007-03-12 16:07:31Z mike $"
  *
  *   Raster test program routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  * Test PS commands and header...
  */
 
-static const char *test_code =
+static const char *dsc_code =
+"[{\n"
+"%%BeginFeature: *PageSize Tabloid\n"
+"<</PageSize[792 1224]>>setpagedevice\n"
+"%%EndFeature\n"
+"} stopped cleartomark\n";
+static const char *setpagedevice_code =
 "<<"
 "/MediaClass(Media Class)"
 "/MediaColor((Media Color))"
@@ -138,7 +144,7 @@ static const char *test_code =
 "/cupsPreferredBitsPerColor 17"
 ">> setpagedevice";
 
-static cups_page_header2_t test_header =
+static cups_page_header2_t setpagedevice_header =
 {
   "Media Class",                       /* MediaClass */
   "(Media Color)",                     /* MediaColor */
@@ -199,6 +205,10 @@ static cups_page_header2_t test_header =
  * Local functions...
  */
 
+static int     do_ppd_tests(const char *filename, int num_options,
+                            cups_option_t *options);
+static int     do_ps_tests(void);
+static int     do_raster_tests(void);
 static void    print_changes(cups_page_header2_t *header,
                              cups_page_header2_t *expected);
 
@@ -208,19 +218,121 @@ static void      print_changes(cups_page_header2_t *header,
  */
 
 int                                    /* O - Exit status */
-main(void)
+main(int  argc,                                /* I - Number of command-line args */
+     char *argv[])                     /* I - Command-line arguments */
 {
-  int                  page, x, y;     /* Looping vars */
-  FILE                 *fp;            /* Raster file */
-  cups_raster_t                *r;             /* Raster stream */
-  cups_page_header2_t  header,         /* Page header */
-                       expected;       /* Expected page header */
-  unsigned char                data[2048];     /* Raster data */
-  int                  preferred_bits; /* Preferred bits */
-  int                  errors;         /* Number of errors */
+  int          errors;                 /* Number of errors */
+
+
+  if (argc == 1)
+  {
+    errors = do_ps_tests();
+    errors += do_raster_tests();
+  }
+  else
+  {
+    int                        i;              /* Looping var */
+    int                        num_options;    /* Number of options */
+    cups_option_t      *options;       /* Options */
+
+
+    for (errors = 0, num_options = 0, options = NULL, i = 1; i < argc; i ++)
+    {
+      if (argv[i][0] == '-')
+      {
+        if (argv[i][1] == 'o')
+        {
+          if (argv[i][2])
+            num_options = cupsParseOptions(argv[i] + 2, num_options, &options);
+          else
+          {
+            i ++;
+            if (i < argc)
+              num_options = cupsParseOptions(argv[i], num_options, &options);
+            else
+            {
+              puts("Usage: testraster [-o name=value ...] [filename.ppd ...]");
+              return (1);
+            }
+          }
+        }
+        else
+        {
+          puts("Usage: testraster [-o name=value ...] [filename.ppd ...]");
+          return (1);
+        }
+      }
+      else
+        errors += do_ppd_tests(argv[i], num_options, options);
+    }
+
+    cupsFreeOptions(num_options, options);
+  }
+
+  return (errors);
+}
+
+
+/*
+ * 'do_ppd_tests()' - Test the default option commands in a PPD file.
+ */
+
+static int                             /* O - Number of errors */
+do_ppd_tests(const char    *filename,  /* I - PPD file */
+             int           num_options,        /* I - Number of options */
+             cups_option_t *options)   /* I - Options */
+{
+  ppd_file_t           *ppd;           /* PPD file data */
+  cups_page_header2_t  header;         /* Page header */
+
+
+  printf("\"%s\": ", filename);
+  fflush(stdout);
+
+  if ((ppd = ppdOpenFile(filename)) == NULL)
+  {
+    ppd_status_t       status;         /* Status from PPD loader */
+    int                        line;           /* Line number containing error */
+
+
+    status = ppdLastError(&line);
+
+    puts("FAIL (bad PPD file)");
+    printf("    %s on line %d\n", ppdErrorString(status), line);
+
+    return (1);
+  }
+
+  ppdMarkDefaults(ppd);
+  cupsMarkOptions(ppd, num_options, options);
 
+  if (cupsRasterInterpretPPD(&header, ppd, 0, NULL, NULL))
+  {
+    puts("FAIL (error from function)");
+    puts(cupsRasterErrorString());
+
+    return (1);
+  }
+  else
+  {
+    puts("PASS");
+
+    return (0);
+  }
+}
+
+
+/*
+ * 'do_ps_tests()' - Test standard PostScript commands.
+ */
+
+static int
+do_ps_tests(void)
+{
+  cups_page_header2_t  header;         /* Page header */
+  int                  preferred_bits; /* Preferred bits */
+  int                  errors = 0;     /* Number of errors */
 
-  errors = 0;
 
  /*
   * Test PS exec code...
@@ -233,12 +345,14 @@ main(void)
   header.Collate = CUPS_TRUE;
   preferred_bits = 0;
 
-  if (_cupsRasterExecPS(&header, &preferred_bits, test_code))
+  if (_cupsRasterExecPS(&header, &preferred_bits, setpagedevice_code))
   {
     puts("FAIL (error from function)");
+    puts(cupsRasterErrorString());
     errors ++;
   }
-  else if (preferred_bits != 17 || memcmp(&header, &test_header, sizeof(header)))
+  else if (preferred_bits != 17 ||
+           memcmp(&header, &setpagedevice_header, sizeof(header)))
   {
     puts("FAIL (bad header)");
 
@@ -246,7 +360,7 @@ main(void)
       printf("    cupsPreferredBitsPerColor %d, expected 17\n",
              preferred_bits);
 
-    print_changes(&test_header, &header);
+    print_changes(&setpagedevice_header, &header);
     errors ++;
   }
   else
@@ -262,6 +376,7 @@ main(void)
                        "setpagedevice\n"))
   {
     puts("FAIL (error from function)");
+    puts(cupsRasterErrorString());
     errors ++;
   }
   else if (header.PageSize[0] != 792 || header.PageSize[1] != 612)
@@ -284,6 +399,7 @@ main(void)
                        "pop pop pop"))
   {
     puts("FAIL (error from function)");
+    puts(cupsRasterErrorString());
     errors ++;
   }
   else
@@ -310,6 +426,24 @@ main(void)
       puts("PASS");
   }
 
+  fputs("_cupsRasterExecPS(\"%%Begin/EndFeature code\"): ", stdout);
+  fflush(stdout);
+
+  if (_cupsRasterExecPS(&header, &preferred_bits, dsc_code))
+  {
+    puts("FAIL (error from function)");
+    puts(cupsRasterErrorString());
+    errors ++;
+  }
+  else if (header.PageSize[0] != 792 || header.PageSize[1] != 1224)
+  {
+    printf("FAIL (bad PageSize [%d %d], expected [792 1224])\n",
+           header.PageSize[0], header.PageSize[1]);
+    errors ++;
+  }
+  else
+    puts("PASS");
+
 #if 0
   fputs("_cupsRasterExecPS(\"\"): ", stdout);
   fflush(stdout);
@@ -397,6 +531,26 @@ main(void)
     puts("PASS");
 #endif /* 0 */
 
+  return (errors);
+}
+
+
+/*
+ * 'do_raster_tests()' - Test reading and writing of raster data.
+ */
+
+static int                             /* O - Number of errors */
+do_raster_tests(void)
+{
+  int                  page, x, y;     /* Looping vars */
+  FILE                 *fp;            /* Raster file */
+  cups_raster_t                *r;             /* Raster stream */
+  cups_page_header2_t  header,         /* Page header */
+                       expected;       /* Expected page header */
+  unsigned char                data[2048];     /* Raster data */
+  int                  errors = 0;     /* Number of errors */
+
+
  /*
   * Test writing...
   */
@@ -690,11 +844,10 @@ main(void)
   cupsRasterClose(r);
   fclose(fp);
 
-  return (errors > 0);
+  return (errors);
 }
 
 
-
 /*
  * 'print_changes()' - Print differences in the page header.
  */
@@ -935,5 +1088,5 @@ print_changes(
 
 
 /*
- * End of "$Id: testraster.c 6158 2006-12-17 01:44:21Z mike $".
+ * End of "$Id: testraster.c 6331 2007-03-12 16:07:31Z mike $".
  */
index 80c58014d83684b4720a3f511ed7de8c08a08e84..33fc4116bd17bd5bb4c9d2c6a445c4efdb58d8c3 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: texttops.c 6003 2006-10-02 16:26:04Z mike $"
+ * "$Id: texttops.c 6288 2007-02-19 12:59:55Z mike $"
  *
  *   Text to PostScript filter for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1993-2005 by Easy Software Products.
+ *   Copyright 1993-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -812,7 +812,7 @@ WriteProlog(const char *title,              /* I - Title of job */
 
     puts("% Reencode base fonts");
 
-    for (i = 1 + PrettyPrint; i >= 0; i --)
+    for (i = PrettyPrint ? 2 : 1; i >= 0; i --)
       for (j = 0; j < NumFonts; j ++)
       {
        printf("/%s findfont\n", Fonts[j][i]);
@@ -831,7 +831,7 @@ WriteProlog(const char *title,              /* I - Title of job */
 
     puts("% Create composite fonts...");
 
-    for (i = 1 + PrettyPrint; i >= 0; i --)
+    for (i = PrettyPrint ? 2 : 1; i >= 0; i --)
     {
       puts("8 dict begin");
       puts("/FontType 0 def/FontMatrix[1.0 0 0 1.0 0 0]def/FMapType 2 def/Encoding[");
@@ -1307,5 +1307,5 @@ write_text(const char *s) /* I - String to write */
 
 
 /*
- * End of "$Id: texttops.c 6003 2006-10-02 16:26:04Z mike $".
+ * End of "$Id: texttops.c 6288 2007-02-19 12:59:55Z mike $".
  */
index 975af256c97b6012d048933551998deca9bda466..cef5ad2d05cde77a66a3beb6b0fef23284c525e4 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #
-# "$Id: cups.sh.in 5118 2006-02-16 14:29:53Z mike $"
+# "$Id: cups.sh.in 6332 2007-03-12 16:08:51Z mike $"
 #
 #   Startup/shutdown script for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2007 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
@@ -135,6 +135,20 @@ fi
 unset TMPDIR
 
 
+#
+# Make sure we have the standard program directories in the path
+# since some operating systems (this means YOU HP-UX!) don't
+# provide a standard path on boot-up...
+#
+
+if "x$PATH" = x; then
+       PATH="/bin:/usr/bin:/sbin:/usr/sbin"
+else
+       PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"
+fi
+
+export PATH
+
 #
 # See if the CUPS server (cupsd) is running...
 #
@@ -201,6 +215,16 @@ case $1 in
                fi
                ;;
 
+       start_msg)
+               # HP-UX non-standard...
+               echo "Starting CUPS Server"
+               ;;
+
+       stop_msg)
+               # HP-UX non-standard...
+               echo "Starting CUPS Server"
+               ;;
+
        *)
                echo "Usage: cups {reload|restart|start|status|stop}"
                exit 1
@@ -215,5 +239,5 @@ exit 0
 
 
 #
-# End of "$Id: cups.sh.in 5118 2006-02-16 14:29:53Z mike $".
+# End of "$Id: cups.sh.in 6332 2007-03-12 16:08:51Z mike $".
 #
index c4341fc15a3b54f9d3d4e00874271669cae4ac18..856ee96e589d8e0537e66f4a860b71d9911a151b 100644 (file)
@@ -6,13 +6,21 @@
        <string>org.cups.cupsd</string>
        <key>OnDemand</key>
        <true/>
+       <key>KeepAlive</key>
+       <dict>
+               <key>PathState</key>
+               <dict>
+                       <key>/private/var/run/cups/cupsd</key>
+                       <true/>
+               </dict>
+       </dict>
+       <key>RunAtLoad</key>
+       <false/>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/sbin/cupsd</string>
                <string>-l</string>
        </array>
-       <key>RunAtLoad</key>
-       <true/>
        <key>ServiceIPC</key>
        <true/>
        <key>Sockets</key>
index 0d3a6f66349014f9513c5ad926b805e6aa7052ea..87d56d55abd3b8f3afbcb9a117cd2491146acd74 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5609 2006-05-30 20:31:10Z mike $"
+# "$Id: Makefile 6209 2007-01-23 15:38:01Z mike $"
 #
 #   Locale file makefile for the Common UNIX Printing System (CUPS).
 #
@@ -87,7 +87,7 @@ pot:
                --msgid-bugs-address="http://www.cups.org/str.php" \
                */*.c
        (cat cups.header; \
-        tail +6 cups.pot | sed -e '1,$$s/PACKAGE VERSION/CUPS 1.2/' \
+        tail +6 cups.pot | sed -e '1,$$s/PACKAGE VERSION/CUPS 1.3/' \
             -e '1,$$s/charset=CHARSET/charset=utf-8/'; \
         cat cups.footer) > cups.pot.N
        mv cups.pot.N cups.pot
@@ -112,5 +112,5 @@ translate.o:        ../cups/http.h ../cups/i18n.h ../cups/language.h ../cups/string.h
 
 
 #
-# End of "$Id: Makefile 5609 2006-05-30 20:31:10Z mike $".
+# End of "$Id: Makefile 6209 2007-01-23 15:38:01Z mike $".
 #
index c8459bd8166cc81c1499d2d22567dc652f438435..fc90515cd31832e8023446665f235bdb8439fa59 100644 (file)
@@ -29,7 +29,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2007-01-23 09:19-0500\n"
+"POT-Creation-Date: 2007-01-23 09:44-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -2631,6 +2631,9 @@ msgstr ""
 msgid "Unable to run \"%s\": %s\n"
 msgstr ""
 
+msgid "Enter your username and password or the root username and password to access this page. If you are using Kerberos authentication, make sure you have a valid Kerberos ticket."
+msgstr ""
+
 #, c-format
 msgid "Job #%d is already canceled - can't cancel."
 msgstr ""
@@ -2653,6 +2656,10 @@ msgid ""
 "                REF: Page 72, section 5.5\n"
 msgstr ""
 
+#, c-format
+msgid "    %d ERRORS FOUND\n"
+msgstr ""
+
 #, c-format
 msgid "lpoptions: Unable to get PPD file for %s: %s\n"
 msgstr ""
index 0b9237974f35f49887a25c79e949509b098dd89d..dd14f004aa94688879df6f90bc6a0b113794744d 100644 (file)
@@ -25,7 +25,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2007-01-23 09:19-0500\n"
+"POT-Creation-Date: 2007-01-23 09:44-0500\n"
 "PO-Revision-Date: 2006-07-17 19:55+0200\n"
 "Last-Translator: Bernd Krumböck <b.krumboeck@rewe-group.at>\n"
 "Language-Team: Deutsch\n"
@@ -2973,6 +2973,15 @@ msgstr "Kann Windows Druckertreiber nicht setzen (%d)!\n"
 msgid "Unable to run \"%s\": %s\n"
 msgstr "cupsaddsmb: Kann \"%s\" nicht ausführen: %s\n"
 
+#, fuzzy
+msgid ""
+"Enter your username and password or the root username and password to access "
+"this page. If you are using Kerberos authentication, make sure you have a "
+"valid Kerberos ticket."
+msgstr ""
+"Für Zugang Benutzername und Passwort (oder Benutzername und Passwort für "
+"root) eingeben."
+
 #, fuzzy, c-format
 msgid "Job #%d is already canceled - can't cancel."
 msgstr "Auftrag #%d wurde bereits abgebrochen - abbrechen nicht möglich."
@@ -2997,6 +3006,10 @@ msgstr ""
 "      **FEHLGESCHLAGEN**  1284DeviceId muss 1284DeviceID sein!\n"
 "                REF: Seite 72, Kapitel 5.5\n"
 
+#, fuzzy, c-format
+msgid "    %d ERRORS FOUND\n"
+msgstr "    %d FEHLER%s GEFUNDEN\n"
+
 #, fuzzy, c-format
 msgid "lpoptions: Unable to get PPD file for %s: %s\n"
 msgstr "lpoptions: Kann PPD für %s nicht öffnen!\n"
index 1c88e6ab4b24a7e7d507602ae3c78d450da3f818..a66c2ef7fc2e0a44c41338356a154c5f9053fca6 100644 (file)
@@ -25,14 +25,13 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2007-01-23 09:19-0500\n"
-"PO-Revision-Date: 2007-01-29 22:15+0100\n"
+"POT-Creation-Date: 2007-01-23 09:44-0500\n"
+"PO-Revision-Date: 2007-01-29 22:21+0100\n"
 "Last-Translator: Juan Pablo González Riopedre <riopedre@tiscali.es>\n"
 "Language-Team: Spanish\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,693,-1,-1,-1,-1\n"
 
 msgid "Options Installed"
 msgstr "Opciones instaladas"
@@ -2842,6 +2841,9 @@ msgstr "No se ha podido configurar el controlador de impresora de Windows (%d)."
 msgid "Unable to run \"%s\": %s\n"
 msgstr "No se ha podido ejecutar \"%s\": %s\n"
 
+msgid "Enter your username and password or the root username and password to access this page. If you are using Kerberos authentication, make sure you have a valid Kerberos ticket."
+msgstr "Introduzca su nombre de usuario y contraseña o el nombre de usuario y contraseña de root para poder acceder a esta página. Si está usando autentificación Kerberos, asegúrese de que tiene un ticket Kerberos válido."
+
 #, c-format
 msgid "Job #%d is already canceled - can't cancel."
 msgstr "El trabajo #%d ya está cancelado - no se puede cancelar."
@@ -2866,6 +2868,10 @@ msgstr ""
 "      **FALLO**  %s debe ser 1284DeviceID.\n"
 "                REF: Página 72, sección 5.5\n"
 
+#, c-format
+msgid "    %d ERRORS FOUND\n"
+msgstr "    %d ERRORES ENCONTRADOS\n"
+
 #, c-format
 msgid "lpoptions: Unable to get PPD file for %s: %s\n"
 msgstr "lpoptions: No se ha podido obtener el archivo PPD para %s: %s\n"
index f9a972bd78dec9633edcc0a4a1abf2a4ac8cd188..69296a24bb8d79bbcdb5c9a5cea2341ef3c7dfb2 100644 (file)
@@ -25,7 +25,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2007-01-23 09:19-0500\n"
+"POT-Creation-Date: 2007-01-23 09:44-0500\n"
 "PO-Revision-Date: 2006-09-93 01:41+0200\n"
 "Last-Translator: Marek Laane <bald@starman.ee>\n"
 "Language-Team: Estonian <et@li.org>\n"
@@ -2930,6 +2930,15 @@ msgstr "Ei õnnestu määrata Windowsi printeridraiverit (%d)!\n"
 msgid "Unable to run \"%s\": %s\n"
 msgstr "cupsaddsmb: \"%s\" käivitamine ebaõnnestus: %s\n"
 
+#, fuzzy
+msgid ""
+"Enter your username and password or the root username and password to access "
+"this page. If you are using Kerberos authentication, make sure you have a "
+"valid Kerberos ticket."
+msgstr ""
+"Selle lehekülje avamiseks andke enda või administraatori (root) kasutajanimi "
+"ja parool."
+
 #, fuzzy, c-format
 msgid "Job #%d is already canceled - can't cancel."
 msgstr "Töö nr %d on juba katkestatud - enam ei saa katkestada."
@@ -2954,6 +2963,10 @@ msgstr ""
 "      **EBAÕNN**  1284DeviceId peab olema 1284DeviceID!\n"
 "                  Viide: lk 72, sektsioon 5.5\n"
 
+#, fuzzy, c-format
+msgid "    %d ERRORS FOUND\n"
+msgstr "    %d VIGA%s LEITUD\n"
+
 #, fuzzy, c-format
 msgid "lpoptions: Unable to get PPD file for %s: %s\n"
 msgstr "lpoptions: ei õnnestu avada PPD-faili %s jaoks!\n"
index cb1e3e3d4133327a850a8b1586ae8455fd3b1e62..1859f5ffa03e87286ad31285f4fe9025e5d9c473 100644 (file)
@@ -2840,2851 +2840,6 @@ msgstr ""
 "                REF: Page 72, section 5.5\n"
 
 
-#
-# End of "$Id$".
-#
-#
-# "$Id$"
-#
-#   Message catalog template for the Common UNIX Printing System (CUPS).
-#
-#   Copyright 2005-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
-#
-#
-# NDT: I did not translate the messages used in conformance, DSC and PPD tests,
-#      because they are destined to developers only, as far as I understand.
-#
-
-msgid ""
-msgstr ""
-"Project-Id-Version: CUPS 1.2\n"
-"Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2006-05-21 10:08-0400\n"
-"PO-Revision-Date: 2007-01-25 19:55+0200\n"
-"Last-Translator: Philippe Combes <Philippe.Combes@ens-lyon.fr>\n"
-"Language-Team: Français\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-msgid "Options Installed"
-msgstr "Options Installées"
-
-msgid "Class"
-msgstr "Classe"
-
-msgid "Printer"
-msgstr "Imprimante"
-
-msgid "Extra"
-msgstr "Supplémentaire"
-
-msgid "General"
-msgstr "Généralités"
-
-msgid "Media Size"
-msgstr "Taille du support"
-
-msgid "Media Type"
-msgstr "Type de support"
-
-msgid "Media Source"
-msgstr "Source du support"
-
-msgid "Output Mode"
-msgstr "Mode de sortie"
-
-msgid "Resolution"
-msgstr "Résolution"
-
-msgid "Variable"
-msgstr "Variable"
-
-msgid "Yes"
-msgstr "Oui"
-
-msgid "No"
-msgstr "Non"
-
-msgid "Auto"
-msgstr "Auto"
-
-msgid "Enter your username and password or the root username and password to access this page."
-msgstr "Entrez votre nom d'utilisateur et votre mot de passe UNIX ou bien identifiez-vous en tant que « root » pour accéder à cette page."
-
-msgid "You must use a https: URL to access this page."
-msgstr "Vous devez utiliser une URL https: pour accéder à cette page."
-
-#, c-format
-msgid "Bad request version number %d.%d!"
-msgstr "La requête a un numéro de version erroné : %d.%d !"
-
-msgid "No attributes in request!"
-msgstr "Aucun attribut dans la requête !"
-
-#, c-format
-msgid "Attribute groups are out of order (%x < %x)!"
-msgstr "Les groupes d'attributs ne sont pas dans le bon ordre (%x < %x) !"
-
-msgid "Missing required attributes!"
-msgstr "Il manque des attributs indispensables !"
-
-#, c-format
-msgid "%s not supported!"
-msgstr "%s: opération non gérée !"
-
-msgid "The printer or class was not found."
-msgstr "L'imprimante ou la classe n'a pas été trouvée."
-
-msgid "The printer-uri must be of the form \"ipp://HOSTNAME/classes/CLASSNAME\"."
-msgstr "L'URI de l'imprimante doit suivre le format « ipp://NOM_MACHINE/classes/NOM_CLASSE »."
-
-#, c-format
-msgid "The printer-uri \"%s\" contains invalid characters."
-msgstr "L'URI de l'imprimante « %s » contient des caractères ."
-
-#, c-format
-msgid "A printer named \"%s\" already exists!"
-msgstr "Il existe déjà une imprimante appelée « %s » !"
-
-#, c-format
-msgid "Attempt to set %s printer-state to bad value %d!"
-msgstr "Tentative de donner une valeur erronée au paramètre « printer-state » : %d !"
-
-#, c-format
-msgid "add_class: Unknown printer-op-policy \"%s\"."
-msgstr "add_class: L'attribut « printer-op-policy » a une valeur non comprise : « %s »."
-
-#, c-format
-msgid "add_class: Unknown printer-error-policy \"%s\"."
-msgstr "add_class: L'attribut « printer-error-policy » a une valeur non comprise : « %s »."
-
-msgid "Unable to allocate memory for file types!"
-msgstr "Impossible d'allouer de la mémoire pour les types de fichiers !"
-
-#, c-format
-msgid "Character set \"%s\" not supported!"
-msgstr "Jeu de caractères « %s » non géré !"
-
-#, c-format
-msgid "Language \"%s\" not supported!"
-msgstr "Langue « %s » non gérée !"
-
-#, c-format
-msgid "The notify-user-data value is too large (%d > 63 octets)!"
-msgstr "La valeur de l'attribut « notify-user-data » est trop grande ( %d > 63 octets ) !"
-
-msgid "The notify-lease-duration attribute cannot be used with job subscriptions."
-msgstr "L'attribut « notify-lease-duration » ne peut pas être utilisé dans une souscription de tâche."
-
-msgid "The printer-uri must be of the form \"ipp://HOSTNAME/printers/PRINTERNAME\"."
-msgstr "L'URI de l'imprimante doit suivre le format « ipp://NOM_MACHINE/printers/NOM_CLASSE »."
-
-#, c-format
-msgid "A class named \"%s\" already exists!"
-msgstr ""Il existe déjà une classe appelée « %s » !"
-
-#, c-format
-msgid "File device URIs have been disabled! To enable, see the FileDevice directive in \"%s/cupsd.conf\"."
-msgstr "L'impression dans un fichier a été désactivée ! Pour l'activer, cf. la directive « FileDevice » dans « %s/cupsd.conf »."
-
-#, c-format
-msgid "Bad device-uri \"%s\"!"
-msgstr "Valeur erronée pour le paramètre « device-uri » : « %s » !"
-
-#, c-format
-msgid "Bad port-monitor \"%s\"!"
-msgstr "Valeur erronée pour le paramètre « port-monitor » : « %s » !"
-
-#, c-format
-msgid "Bad printer-state value %d!"
-msgstr "Valeur erronée pour le paramètre « printer-state » : « %s » !"
-
-#, c-format
-msgid "Unknown printer-op-policy \"%s\"."
-msgstr "L'attribut « printer-op-policy » a une valeur non comprise : « %s »."
-
-#, c-format
-msgid "Unknown printer-error-policy \"%s\"."
-msgstr "L'attribut « printer-error-policy » a une valeur non comprise : « %s »."
-
-#, c-format
-msgid "Unable to copy interface script - %s!"
-msgstr "Impossible de copier le « script » d'interface - « %s » !"
-
-#, c-format
-msgid "Unable to copy PPD file - %s!"
-msgstr "Impossible de copier le fichier PPD - « %s » !"
-
-msgid "Unable to copy PPD file!"
-msgstr "Impossible de copier le fichier PPD !"
-
-msgid "Got a printer-uri attribute but no job-id!"
-msgstr "Attribut « printer-uri » trouvé mais pas de « job-id »"
-
-#, c-format
-msgid "Bad job-uri attribute \"%s\"!"
-msgstr "Valeur erronée pour l'attribut « job-uri » : « %s » !"
-
-#, c-format
-msgid "Job #%d doesn't exist!"
-msgstr "La tâche n°%d n'existe pas !"
-
-#, c-format
-msgid "Job #%d is not held for authentication!"
-msgstr "La tâche n°%d n'est pas en attente d'authentification !"
-
-#, c-format
-msgid "You are not authorized to authenticate job #%d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation d'authentifier la tâche n°%d appartenant à « %s » !"
-
-msgid "The printer-uri attribute is required!"
-msgstr "L'attribut « printer-uri » est indispensable !"
-
-msgid "Missing requesting-user-name attribute!"
-msgstr "Il manque l'attribut « requesting-user-name » !"
-
-#, c-format
-msgid "The printer-uri \"%s\" is not valid."
-msgstr "L'attribut « printer-uri » est incorrect : « %s »."
-
-#, c-format
-msgid "No active jobs on %s!"
-msgstr "Il n'y a pas de tâche en cours sur « %s » !"
-
-#, c-format
-msgid "You are not authorized to delete job #%d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation de supprimer la tâche n°%d appartenant à « %s » !"
-
-#, c-format
-msgid "Job #%d is already %s - can't cancel."
-msgstr "La tâche n°%d est déjà « %s » - impossible de l'annuler."
-
-msgid "The printer or class is not shared!"
-msgstr "L'imprimante ou la classe n'est pas partagée !"
-
-#, c-format
-msgid "Destination \"%s\" is not accepting jobs."
-msgstr "La destination « %s » n'accepte aucune tâche."
-
-#, c-format
-msgid "Bad copies value %d."
-msgstr "Nombre de copies erroné : %d."
-
-#, c-format
-msgid "Bad page-ranges values %d-%d."
-msgstr "Intervalle de pages erroné : %d-%d."
-
-msgid "Too many active jobs."
-msgstr "Trop de tâches en cours."
-
-msgid "Quota limit reached."
-msgstr "Quota atteint."
-
-#, c-format
-msgid "Unable to add job for destination \"%s\"!"
-msgstr "Impossible d'ajouter une tâche pour la destination « %s » !"
-
-msgid "No subscription attributes in request!"
-msgstr "Pas d'attribut de souscription dans la requête !"
-
-msgid "notify-events not specified!"
-msgstr "Attribut « notify-events » non renseigné !"
-
-#, c-format
-msgid "Job %d not found!"
-msgstr "La tâche n°%d n'a pas été trouvée !"
-
-msgid "No default printer"
-msgstr "Pas d'imprimante par défaut"
-
-msgid "cups-deviced failed to execute."
-msgstr "L'exécution de « cups-deviced » a échouée."
-
-msgid "cups-driverd failed to execute."
-msgstr "L'exécution de « cups-driverd » a échouée."
-
-msgid "No destinations added."
-msgstr "Aucune destination ajoutée."
-
-#, c-format
-msgid "notify-subscription-id %d no good!"
-msgstr "Valeur erronée pour l'attribut « notify-subscription-id » : %d !"
-
-#, c-format
-msgid "Job #%s does not exist!"
-msgstr "La tâche n°%s n'existe pas !"
-
-#, c-format
-msgid "Job #%d does not exist!"
-msgstr "La tâche n°%d n'existe pas !"
-
-msgid "No subscriptions found."
-msgstr "Aucune souscription trouvée."
-
-#, c-format
-msgid "Not authorized to hold job #%d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation de retenir la tâche n°%d appartenant à « %s » !"
-
-#, c-format
-msgid "Job #%d is finished and cannot be altered!"
-msgstr "La tâche n°%d est terminée et ne peut plus être modifiée !"
-
-#, c-format
-msgid "You are not authorized to move job #%d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation de transférer la tâche n°%d appartenant à « %s » !"
-
-msgid "job-printer-uri attribute missing!"
-msgstr "Il manque l'attribut « job-printer-uri » !"
-
-#, c-format
-msgid "Unsupported compression \"%s\"!"
-msgstr "La compression « %s » n'est pas gérée !"
-
-msgid "No file!?!"
-msgstr "Pas de fichier !?!"
-
-#, c-format
-msgid "Could not scan type \"%s\"!"
-msgstr "Impossible de comprendre le format « %s » !"
-
-#, c-format
-msgid "Unsupported format '%s/%s'!"
-msgstr "Le format « %s » n'est pas géré !"
-
-msgid "Printer not shared!"
-msgstr "L'imprimante n'est pas partagée !"
-
-#, c-format
-msgid "Too many jobs - %d jobs, max jobs is %d."
-msgstr "Trop de tâches - %d tâches pour un maximum de %d."
-
-#, c-format
-msgid "Job #%d is not held!"
-msgstr "La tâche n°%d n'est pas retenue !"
-
-#, c-format
-msgid "You are not authorized to release job id %d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation de libérer la tâche n°%d appartenant à « %s » !"
-
-#, c-format
-msgid "Job #%d is not complete!"
-msgstr "La tâche n°%d n'est pas terminée !"
-
-#, c-format
-msgid "Job #%d cannot be restarted - no files!"
-msgstr "La tâche n°%d ne peut être redémarrée - aucun fichier !"
-
-#, c-format
-msgid "You are not authorized to restart job id %d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation de redémarrer la tâche n°%d appartenant à « %s » !"
-
-#, c-format
-msgid "You are not authorized to send document for job #%d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation d'envoyer un document pour la tâche n°%d appartenant à « %s » !"
-
-#, c-format
-msgid "Bad document-format \"%s\"!"
-msgstr "Format de document erroné : « %s » !"
-
-#, c-format
-msgid "You are not authorized to alter job id %d owned by \"%s\"!"
-msgstr "Vous n'avez pas l'autorisation de modifier la tâche n°%d appartenant à « %s » !"
-
-#, c-format
-msgid "%s cannot be changed."
-msgstr "Impossible de modifier « %s »"
-
-msgid "Bad job-priority value!"
-msgstr "Valeur erronée pour l'attribut « job-priority » !"
-
-msgid "Job is completed and cannot be changed."
-msgstr "La tâche est terminée et ne peut être modifiée."
-
-msgid "Bad job-state value!"
-msgstr "Valeur erronée pour l'attribut « job-state » !"
-
-msgid "Job state cannot be changed."
-msgstr "L'état de la tâche ne peut être modifié."
-
-#, c-format
-msgid "Unsupported compression attribute %s!"
-msgstr "L'attribute de compression %s n'est pas géré !"
-
-#, c-format
-msgid "Unsupported format \"%s\"!"
-msgstr "Le format « %s » n'est pas géré !"
-
-#, c-format
-msgid "%s is not implemented by the CUPS version of lpc.\n"
-msgstr "« %s » n'est pas implanté dans la version CUPS de lpc.\n"
-
-msgid ""
-"Commands may be abbreviated.  Commands are:\n"
-"\n"
-"exit    help    quit    status  ?\n"
-msgstr ""
-"Les commandes peuvent être abrégée. Elles sont:\n"
-"\n"
-"exit    help    quit    status  ?\n"
-
-msgid "help\t\tget help on commands\n"
-msgstr "help\t\tobtenir de l'aide sur les commandes\n"
-
-msgid "status\t\tshow status of daemon and queue\n"
-msgstr "status\t\taffiche l'état du démon et de la file\n"
-
-msgid "?Invalid help command unknown\n"
-msgstr "?Commande d'aide inconnue\n"
-
-#, c-format
-msgid "\tprinter is on device '%s' speed -1\n"
-msgstr "\tl'imprimante est sur le périphérique '%s', vitesse -1\n"
-
-msgid "\tqueuing is enabled\n"
-msgstr "\tla mise en file d'attente est permise\n"
-
-msgid "\tqueuing is disabled\n"
-msgstr "\tla mise en file d'attente est refusée\n"
-
-msgid "\tprinting is enabled\n"
-msgstr "\tl'impression est permise\n"
-
-msgid "\tprinting is disabled\n"
-msgstr "\tl'impression est refusée\n"
-
-msgid "\tno entries\n"
-msgstr "\taucune entrée\n"
-
-#, c-format
-msgid "\t%d entries\n"
-msgstr "\t%d entrées\n"
-
-msgid "\tdaemon present\n"
-msgstr "\tdémon présent\n"
-
-msgid "lpq: Unable to contact server!\n"
-msgstr "lpq: Impossible de contacter le serveur !\n"
-
-#, c-format
-msgid "%s: Sorry, no encryption support compiled in!\n"
-msgstr "%s: Désolé, la gestion du cryptage n'a pas été compilée !\n"
-
-#, c-format
-msgid "lpq: Unknown destination \"%s/%s\"!\n"
-msgstr lpq: Destination « %s/%s » inconnue !\n""
-
-#, c-format
-msgid "lpq: Unknown destination \"%s\"!\n"
-msgstr "lpq: Destination « %s » inconnue !\n"
-
-#, c-format
-msgid "lp: error - %s environment variable names non-existent destination \"%s\"!\n"
-msgstr "lp: erreur - la variable d'environnement %s désigne une destination inexistente « %s » !\n"
-
-msgid "lpq: error - no default destination available.\n"
-msgstr "lpq: erreur - aucune destination par défaut n'est disponible.\n"
-
-#, c-format
-msgid "lpq: get-jobs failed: %s\n"
-msgstr "lpq: « get-jobs » a échoué: %s\n"
-
-msgid "Rank   Owner      Pri  Job        Files                       Total Size\n"
-msgstr "Rang   Propr.     Prio Tâche      Fichiers                    Taille totale\n"
-
-msgid "Rank    Owner   Job     File(s)                         Total Size\n"
-msgstr "Rang    Propr.  Tâche  Fichiers                       Taille totale\n"
-
-#, c-format
-msgid "%s: %-33.33s [job %d localhost]\n"
-msgstr "%s: %-33.33s [tâche %d localhost]\n"
-
-#, c-format
-msgid "        %-39.39s %.0f bytes\n"
-msgstr "        %-39.39s %.0f octets\n"
-
-#, c-format
-msgid "%-6s %-10.10s %-4d %-10d %-27.27s %.0f bytes\n"
-msgstr "%-6s %-10.10s %-4d %-10d %-27.27s %.0f octets\n"
-
-#, c-format
-msgid "%-7s %-7.7s %-7d %-31.31s %.0f bytes\n"
-msgstr "%-7s %-7.7s %-7d %-31.31s %.0f octets\n"
-
-msgid "no entries\n"
-msgstr "aucune entrée\n"
-
-#, c-format
-msgid "lpq: get-printer-attributes failed: %s\n"
-msgstr "lpq: get-printer-attributes a échoué : %s\n"
-
-#, c-format
-msgid "%s is ready\n"
-msgstr "%s est prête\n"
-
-#, c-format
-msgid "%s is ready and printing\n"
-msgstr "%s est prête et en cours d'impression\n"
-
-#, c-format
-msgid "%s is not ready\n"
-msgstr "%s n'est pas prête\n"
-
-msgid "Usage: lpq [-P dest] [-l] [+interval]\n"
-msgstr "Utilisation : lpq [-P dest] [-l] [+intervalle]\n"
-
-#, c-format
-msgid "lpr: error - expected value after -%c option!\n"
-msgstr "lpr: erreur - il faut une valeur après l'option '-%c' !\n"
-
-#, c-format
-msgid "lpr: warning - '%c' format modifier not supported - output may not be correct!\n"
-msgstr "lpr: attention - le modificateur de format '%c' n'est pas géré - l'affichage pourrait être incorrect !\n"
-
-msgid "lpr: error - expected option=value after -o option!\n"
-msgstr "lpr: erreur - il faut un argument du type option=valeur après l'option '-o' !\n"
-
-msgid "lpr: warning - email notification is not currently supported!\n"
-msgstr "lpr: attention - la notification par courriel n'est pas encore gérée !\n"
-
-msgid "lpr: error - expected destination after -P option!\n"
-msgstr "lpr: erreur - il faut une destination après l'option '-P' !\n"
-
-msgid "lpr: error - expected copy count after -# option!\n"
-msgstr "lpr: erreur - il faut un nombre de copies après l'option '-#' !\n"
-
-#, c-format
-msgid "lpr: error - expected name after -%c option!\n"
-msgstr "lpr: erreur - il faut un nom après l'option '-%c' !\n"
-
-msgid "lpr: error - expected username after -U option!\n"
-msgstr "lpr: erreur - il faut un nom d'utilisateur après l'option '-U' !\n"
-
-#, c-format
-msgid "lpr: error - unknown option '%c'!\n"
-msgstr "lpr: erreur - option '%c' inconnue !\n"
-
-#, c-format
-msgid "lpr: error - unable to access \"%s\" - %s\n"
-msgstr "lpr: erreur - impossible d'accéder à « %s » - %s\n"
-
-#, c-format
-msgid "lpr: error - too many files - \"%s\"\n"
-msgstr "lpr: erreur - trop de fichiers - « %s »\n"
-
-#, c-format
-msgid "lpr: error - %s environment variable names non-existent destination \"%s\"!\n"
-msgstr "lpr: erreur - la variable d'environnement %s désigne une destination inexistente « %s » !\n"
-
-msgid "lpr: error - no default destination available.\n"
-msgstr "lpr: erreur - aucune destination par défaut n'est disponible.\n"
-
-msgid "lpr: error - scheduler not responding!\n"
-msgstr "lpr: erreur - l'ordonnanceur ne répond pas !\n"
-
-#, c-format
-msgid "lpr: error - unable to create temporary file \"%s\" - %s\n"
-msgstr "lpr: erreur - impossible de créer le fichier temporaire « %s » - %s\n"
-
-#, c-format
-msgid "lpr: error - unable to write to temporary file \"%s\" - %s\n"
-msgstr "lpr: erreur - impossible d'écrire dans le fichier temporaire « %s » - %s\n"
-
-msgid "lpr: error - stdin is empty, so no job has been sent.\n"
-msgstr "lpr: erreur - stdin est vide, donc aucune tâche n'a été envoyée.\n"
-
-#, c-format
-msgid "lpr: error - unable to print file: %s\n"
-msgstr "lpr: erreur - impossible d'imprimer le fichier : %s\n"
-
-msgid "lprm: Unable to contact server!\n"
-msgstr "lprm: Impossible de contacter le serveur !\n"
-
-#, c-format
-msgid "lprm: Unknown destination \"%s\"!\n"
-msgstr "lprm: Destination « %s » inconnue !\n"
-
-#, c-format
-msgid "lprm: Unknown option '%c'!\n"
-msgstr "lprm: Option '%c' inconnue !\n"
-
-msgid "lprm: Job or printer not found!\n"
-msgstr "lprm: La tâche ou l'imprimante n'a pas été trouvée !\n"
-
-msgid "lprm: Not authorized to lprm job(s)!\n"
-msgstr "lprm: Vous n'avez pas l'autorisation de supprimer cette(ces) tâche(s) !\n"
-
-#, c-format
-msgid "lprm: You don't own job ID %d!\n"
-msgstr lprm: La tâche n°%d ne vous appartient pas !\n""
-
-msgid "lprm: Unable to lprm job(s)!\n"
-msgstr "lprm: Impossible de supprimer cette(ces) tâche(s) !\n"
-
-msgid "lprm: Unable to cancel job(s)!\n"
-msgstr "lprm: Impossible d'annuler cette(ces) tâche(s) !\n"
-
-#, c-format
-msgid "%s: Don't know what to do!\n"
-msgstr "%s: Je ne sais que faire !"
-
-#, c-format
-msgid "%s: Expected server name after -h!\n"
-msgstr "%s: Il faut un nom de serveur après l'option '-h' !\n"
-
-#, c-format
-msgid "%s: Expected reason text after -r!\n"
-msgstr "%s: Il faut le texte de la raison après l'option '-r' !\n"
-
-#, c-format
-msgid "%s: Unknown option '%c'!\n"
-msgstr "%s: Option '%c' inconnue !\n"
-
-#, c-format
-msgid "%s: Unable to connect to server: %s\n"
-msgstr "%s: Impossible de se connecter au serveur : %s\n"
-
-#, c-format
-msgid "%s: Operation failed: %s\n"
-msgstr "%s: L'opération a échoué : %s\n"
-
-msgid "cancel: Error - expected hostname after '-h' option!\n"
-msgstr "annulation: erreur - il faut un nom de machine après l'option '-h' !\n"
-
-msgid "cancel: Error - expected username after '-u' option!\n"
-msgstr "annulation: erreur - il faut un nom d'utilisateur après l'option '-u' !\n"
-
-#, c-format
-msgid "cancel: Unknown option '%c'!\n"
-msgstr "annulation: Option '%c' inconnue !"
-
-#, c-format
-msgid "cancel: Unknown destination \"%s\"!\n"
-msgstr "annulation: Destination inconnue « %s » !"
-
-msgid "cancel: Unable to contact server!\n"
-msgstr "annulation: Impossible de contacter le serveur !\n"
-
-#, c-format
-msgid "cancel: %s failed: %s\n"
-msgstr "annulation: %s a échoué :%s\n"
-
-#, c-format
-msgid "cupsaddsmb: Missing value on line %d!\n"
-msgstr "cupsaddsmb: Il manque une valeur à la ligne n°%d !\n"
-
-#, c-format
-msgid "cupsaddsmb: Missing double quote on line %d!\n"
-msgstr "cupsaddsmb: Il manque un \" à la ligne n°%d !\n"
-
-#, c-format
-msgid "cupsaddsmb: Bad option + choice on line %d!\n"
-msgstr "cupsaddsmb: Option et choix erronés à la ligne n°%d !\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to connect to server \"%s\" for %s - %s\n"
-msgstr "cupsaddsmb: Impossible de se connecter au serveur « %s » pour %s - %s\n"
-
-#, c-format
-msgid "cupsaddsmb: No PPD file for printer \"%s\" - skipping!\n"
-msgstr "cupsaddsmb: Aucun fichier PPD pour l'imprimante « %s » - ignorée !\n"
-
-#, c-format
-msgid "cupsaddsmb: get-printer-attributes failed for \"%s\": %s\n"
-msgstr "cupsaddsmb: get-printer-attributes a échoué pour « %s » : %s\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to convert PPD file for %s - %s\n"
-msgstr "cupsaddsmb: Impossible de convertir le fichier PPD pour %s - %s\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to copy Windows 2000 printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Impossible de copier les fichiers du pilote d'impression pour Windows 2000 (%d) !\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to copy CUPS printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Impossible de copier les fichiers du pilote d'impression pour CUPS (%d) !\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to install Windows 2000 printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Impossible d'installer les fichiers du pilote d'impression pour Windows 2000 (%d) !\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to copy Windows 9x printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Impossible de copier les fichiers du pilote d'impression pour Windows 9x (%d) !\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to install Windows 9x printer driver files (%d)!\n"
-msgstr "cupsaddsmb: Impossible d'installer les fichiers du pilote d'impression pour Windows 9x (%d) !\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to set Windows printer driver (%d)!\n"
-msgstr "cupsaddsmb: Impossible de paramétrer le pilote d'impression pour Windows (%d) !\n"
-
-msgid ""
-"Usage: cupsaddsmb [options] printer1 ... printerN\n"
-"       cupsaddsmb [options] -a\n"
-"\n"
-"Options:\n"
-"  -H samba-server  Use the named SAMBA server\n"
-"  -U samba-user    Authenticate using the named SAMBA user\n"
-"  -a               Export all printers\n"
-"  -h cups-server   Use the named CUPS server\n"
-"  -v               Be verbose (show commands)\n"
-msgstr ""
-"Utilisation : cupsaddsmb [options] imprimante1 ... imprimanteN\n"
-"              cupsaddsmb [options] -a\n"
-"\n"
-"Options:\n"
-"  -H serveur-samba      Utiliser le serveur SAMBA désigné\n"
-"  -U utilisateur-samba  S'authentifier avec l'utilisateur SAMBA désigné\n"
-"  -a                    Exporter toutes les imprimantes\n"
-"  -h serveur-CUPS       Utiliser le serveur CUPS désigné\n"
-"  -v                    Être locace ( afficher les commandes )\n"
-
-msgid "cupstestppd: The -q option is incompatible with the -v option.\n"
-msgstr "cupstestppd: L'option est -q incomptaible avec l'option -v.\n"
-
-msgid "cupstestppd: The -v option is incompatible with the -q option.\n"
-msgstr "cupstestppd: L'option est -v incomptaible avec l'option -q.\n"
-
-#, c-format
-msgid ""
-" FAIL\n"
-"      **FAIL**  Unable to open PPD file - %s\n"
-msgstr ""
-" FAIL\n"
-"      **FAIL**  Unable to open PPD file - %s\n"
-
-#, c-format
-msgid ""
-" FAIL\n"
-"      **FAIL**  Unable to open PPD file - %s on line %d.\n"
-msgstr ""
-" FAIL\n"
-"      **FAIL**  Unable to open PPD file - %s on line %d.\n"
-
-msgid "                REF: Page 42, section 5.2.\n"
-msgstr "                REF: Page 42, section 5.2.\n"
-
-msgid "                REF: Page 20, section 3.4.\n"
-msgstr "                REF: Page 20, section 3.4.\n"
-
-msgid "                REF: Pages 45-46, section 5.2.\n"
-msgstr "                REF: Pages 45-46, section 5.2.\n"
-
-msgid "                REF: Pages 42-45, section 5.2.\n"
-msgstr "                REF: Pages 42-45, section 5.2.\n"
-
-msgid "                REF: Pages 48-49, section 5.2.\n"
-msgstr "                REF: Pages 48-49, section 5.2.\n"
-
-msgid "                REF: Pages 52-54, section 5.2.\n"
-msgstr "                REF: Pages 52-54, section 5.2.\n"
-
-msgid "                REF: Page 15, section 3.2.\n"
-msgstr "                REF: Page 15, section 3.2.\n"
-
-msgid "                REF: Page 15, section 3.1.\n"
-msgstr "                REF: Page 15, section 3.1.\n"
-
-msgid "                REF: Pages 16-17, section 3.2.\n"
-msgstr "                REF: Pages 16-17, section 3.2.\n"
-
-msgid "                REF: Page 19, section 3.3.\n"
-msgstr "                REF: Page 19, section 3.3.\n"
-
-msgid "                REF: Page 27, section 3.5.\n"
-msgstr "                REF: Page 27, section 3.5.\n"
-
-msgid ""
-"\n"
-"    DETAILED CONFORMANCE TEST RESULTS\n"
-msgstr ""
-"\n"
-"    DETAILED CONFORMANCE TEST RESULTS\n"
-
-#, c-format
-msgid "        WARN    %s has no corresponding options!\n"
-msgstr "        WARN    %s has no corresponding options!\n"
-
-msgid " FAIL\n"
-msgstr " FAIL\n"
-
-msgid ""
-"      **FAIL**  REQUIRED DefaultImageableArea\n"
-"                REF: Page 102, section 5.15.\n"
-msgstr ""
-"      **FAIL**  REQUIRED DefaultImageableArea\n"
-"                REF: Page 102, section 5.15.\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  BAD DefaultImageableArea %s!\n"
-"                REF: Page 102, section 5.15.\n"
-msgstr ""
-"      **FAIL**  BAD DefaultImageableArea %s!\n"
-"                REF: Page 102, section 5.15.\n"
-
-msgid "        PASS    DefaultImageableArea\n"
-msgstr "        PASS    DefaultImageableArea\n"
-
-msgid ""
-"      **FAIL**  REQUIRED DefaultPaperDimension\n"
-"                REF: Page 103, section 5.15.\n"
-msgstr ""
-"      **FAIL**  REQUIRED DefaultPaperDimension\n"
-"                REF: Page 103, section 5.15.\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  BAD DefaultPaperDimension %s!\n"
-"                REF: Page 103, section 5.15.\n"
-msgstr ""
-"      **FAIL**  BAD DefaultPaperDimension %s!\n"
-"                REF: Page 103, section 5.15.\n"
-
-msgid "        PASS    DefaultPaperDimension\n"
-msgstr "        PASS    DefaultPaperDimension\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  BAD Default%s %s\n"
-"                REF: Page 40, section 4.5.\n"
-msgstr ""
-"      **FAIL**  BAD Default%s %s\n"
-"                REF: Page 40, section 4.5.\n"
-
-#, c-format
-msgid "        PASS    Default%s\n"
-msgstr "        PASS    Default%s\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  REQUIRED Default%s\n"
-"                REF: Page 40, section 4.5.\n"
-msgstr ""
-"      **FAIL**  REQUIRED Default%s\n"
-"                REF: Page 40, section 4.5.\n"
-
-msgid "        PASS    FileVersion\n"
-msgstr "        PASS    FileVersion\n"
-
-msgid ""
-"      **FAIL**  REQUIRED FileVersion\n"
-"                REF: Page 56, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED FileVersion\n"
-"                REF: Page 56, section 5.3.\n"
-
-msgid "        PASS    FormatVersion\n"
-msgstr "        PASS    FormatVersion\n"
-
-msgid ""
-"      **FAIL**  REQUIRED FormatVersion\n"
-"                REF: Page 56, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED FormatVersion\n"
-"                REF: Page 56, section 5.3.\n"
-
-msgid "        PASS    LanguageEncoding\n"
-msgstr "        PASS    LanguageEncoding\n"
-
-msgid ""
-"      **FAIL**  REQUIRED LanguageEncoding\n"
-"                REF: Pages 56-57, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED LanguageEncoding\n"
-"                REF: Pages 56-57, section 5.3.\n"
-
-msgid "        PASS    LanguageVersion\n"
-msgstr "        PASS    LanguageVersion\n"
-
-msgid ""
-"      **FAIL**  REQUIRED LanguageVersion\n"
-"                REF: Pages 57-58, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED LanguageVersion\n"
-"                REF: Pages 57-58, section 5.3.\n"
-
-msgid ""
-"      **FAIL**  BAD Manufacturer (should be \"HP\")\n"
-"                REF: Page 211, table D.1.\n"
-msgstr ""
-"      **FAIL**  BAD Manufacturer (should be \"HP\")\n"
-"                REF: Page 211, table D.1.\n"
-
-msgid "        PASS    Manufacturer\n"
-msgstr "        PASS    Manufacturer\n"
-
-msgid ""
-"      **FAIL**  REQUIRED Manufacturer\n"
-"                REF: Pages 58-59, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED Manufacturer\n"
-"                REF: Pages 58-59, section 5.3.\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  BAD ModelName - \"%c\" not allowed in string.\n"
-"                REF: Pages 59-60, section 5.3.\n"
-msgstr ""
-"      **FAIL**  BAD ModelName - \"%c\" not allowed in string.\n"
-"                REF: Pages 59-60, section 5.3.\n"
-
-msgid "        PASS    ModelName\n"
-msgstr "        PASS    ModelName\n"
-
-msgid ""
-"      **FAIL**  REQUIRED ModelName\n"
-"                REF: Pages 59-60, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED ModelName\n"
-"                REF: Pages 59-60, section 5.3.\n"
-
-msgid "        PASS    NickName\n"
-msgstr "        PASS    NickName\n"
-
-msgid ""
-"      **FAIL**  REQUIRED NickName\n"
-"                REF: Page 60, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED NickName\n"
-"                REF: Page 60, section 5.3.\n"
-
-msgid "        PASS    PageSize\n"
-msgstr "        PASS    PageSize\n"
-
-msgid ""
-"      **FAIL**  REQUIRED PageSize\n"
-"                REF: Pages 99-100, section 5.14.\n"
-msgstr ""
-"      **FAIL**  REQUIRED PageSize\n"
-"                REF: Pages 99-100, section 5.14.\n"
-
-msgid "        PASS    PageRegion\n"
-msgstr "        PASS    PageRegion\n"
-
-msgid ""
-"      **FAIL**  REQUIRED PageRegion\n"
-"                REF: Page 100, section 5.14.\n"
-msgstr ""
-"      **FAIL**  REQUIRED PageRegion\n"
-"                REF: Page 100, section 5.14.\n"
-
-msgid "        PASS    PCFileName\n"
-msgstr "        PASS    PCFileName\n"
-
-msgid ""
-"      **FAIL**  REQUIRED PCFileName\n"
-"                REF: Pages 61-62, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED PCFileName\n"
-"                REF: Pages 61-62, section 5.3.\n"
-
-msgid ""
-"      **FAIL**  BAD Product - not \"(string)\".\n"
-"                REF: Page 62, section 5.3.\n"
-msgstr ""
-"      **FAIL**  BAD Product - not \"(string)\".\n"
-"                REF: Page 62, section 5.3.\n"
-
-msgid "        PASS    Product\n"
-msgstr "        PASS    Product\n"
-
-msgid ""
-"      **FAIL**  REQUIRED Product\n"
-"                REF: Page 62, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED Product\n"
-"                REF: Page 62, section 5.3.\n"
-
-msgid ""
-"      **FAIL**  BAD PSVersion - not \"(string) int\".\n"
-"                REF: Pages 62-64, section 5.3.\n"
-msgstr ""
-"      **FAIL**  BAD PSVersion - not \"(string) int\".\n"
-"                REF: Pages 62-64, section 5.3.\n"
-
-msgid "        PASS    PSVersion\n"
-msgstr "        PASS    PSVersion\n"
-
-msgid ""
-"      **FAIL**  REQUIRED PSVersion\n"
-"                REF: Pages 62-64, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED PSVersion\n"
-"                REF: Pages 62-64, section 5.3.\n"
-
-msgid ""
-"      **FAIL**  BAD ShortNickName - longer than 31 chars.\n"
-"                REF: Pages 64-65, section 5.3.\n"
-msgstr ""
-"      **FAIL**  BAD ShortNickName - longer than 31 chars.\n"
-"                REF: Pages 64-65, section 5.3.\n"
-
-msgid "        PASS    ShortNickName\n"
-msgstr "        PASS    ShortNickName\n"
-
-msgid ""
-"      **FAIL**  REQUIRED ShortNickName\n"
-"                REF: Page 64-65, section 5.3.\n"
-msgstr ""
-"      **FAIL**  REQUIRED ShortNickName\n"
-"                REF: Page 64-65, section 5.3.\n"
-
-msgid ""
-"      **FAIL**  BAD JobPatchFile attribute in file\n"
-"                REF: Page 24, section 3.4.\n"
-msgstr ""
-"      **FAIL**  BAD JobPatchFile attribute in file\n"
-"                REF: Page 24, section 3.4.\n"
-
-msgid ""
-"      **FAIL**  REQUIRED PageSize\n"
-"                REF: Page 41, section 5.\n"
-"                REF: Page 99, section 5.14.\n"
-msgstr ""
-"      **FAIL**  REQUIRED PageSize\n"
-"                REF: Page 41, section 5.\n"\n"
-"                REF: Page 99, section 5.14.\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  REQUIRED ImageableArea for PageSize %s\n"
-"                REF: Page 41, section 5.\n"
-"                REF: Page 102, section 5.15.\n"
-msgstr ""
-"      **FAIL**  REQUIRED ImageableArea for PageSize %s\n"
-"                REF: Page 41, section 5.\n"
-"                REF: Page 102, section 5.15.\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  REQUIRED PaperDimension for PageSize %s\n"
-"                REF: Page 41, section 5.\n"
-"                REF: Page 103, section 5.15.\n"
-msgstr ""
-"      **FAIL**  REQUIRED PaperDimension for PageSize %s\n"
-"                REF: Page 41, section 5.\n"
-"                REF: Page 103, section 5.15.\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  Bad %s choice %s!\n"
-"                REF: Page 84, section 5.9\n"
-msgstr ""
-"      **FAIL**  Bad %s choice %s!\n"
-"                REF: Page 84, section 5.9\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  REQUIRED %s does not define choice None!\n"
-"                REF: Page 122, section 5.17\n"
-msgstr ""
-"      **FAIL**  REQUIRED %s does not define choice None!\n"
-"                REF: Page 122, section 5.17\n"
-
-#, c-format
-msgid ""
-"      **FAIL**  Bad %s choice %s!\n"
-"                REF: Page 122, section 5.17\n"
-msgstr ""
-"      **FAIL**  Bad %s choice %s!\n"
-"                REF: Page 122, section 5.17\n"
-
-msgid " PASS\n"
-msgstr " PASS\n"
-
-#, c-format
-msgid ""
-"        WARN    Duplex option keyword %s should be named Duplex or JCLDuplex!\n"
-"                REF: Page 122, section 5.17\n"
-msgstr ""
-"        WARN    Duplex option keyword %s should be named Duplex or JCLDuplex!\n"
-"                REF: Page 122, section 5.17\n"
-
-msgid "        WARN    Default choices conflicting!\n"
-msgstr ""
-
-#, c-format
-msgid ""
-"        WARN    Obsolete PPD version %.1f!\n"
-"                REF: Page 42, section 5.2.\n"
-msgstr ""
-"        WARN    Obsolete PPD version %.1f!\n"
-"                REF: Page 42, section 5.2.\n"
-
-msgid ""
-"        WARN    LanguageEncoding required by PPD 4.3 spec.\n"
-"                REF: Pages 56-57, section 5.3.\n"
-msgstr ""
-"        WARN    LanguageEncoding required by PPD 4.3 spec.\n"
-"                REF: Pages 56-57, section 5.3.\n"
-
-msgid ""
-"        WARN    Manufacturer required by PPD 4.3 spec.\n"
-"                REF: Pages 58-59, section 5.3.\n"
-msgstr ""
-"        WARN    Manufacturer required by PPD 4.3 spec.\n"
-"                REF: Pages 58-59, section 5.3.\n"
-
-msgid ""
-"        WARN    PCFileName longer than 8.3 in violation of PPD spec.\n"
-"                REF: Pages 61-62, section 5.3.\n"
-msgstr ""
-"        WARN    PCFileName longer than 8.3 in violation of PPD spec.\n"
-"                REF: Pages 61-62, section 5.3.\n"
-
-msgid ""
-"        WARN    ShortNickName required by PPD 4.3 spec.\n"
-"                REF: Pages 64-65, section 5.3.\n"
-msgstr ""
-"        WARN    ShortNickName required by PPD 4.3 spec.\n"
-"                REF: Pages 64-65, section 5.3.\n"
-
-msgid ""
-"        WARN    Protocols contains both PJL and BCP; expected TBCP.\n"
-"                REF: Pages 78-79, section 5.7.\n"
-msgstr ""
-"        WARN    Protocols contains both PJL and BCP; expected TBCP.\n"
-"                REF: Pages 78-79, section 5.7.\n"
-
-msgid ""
-"        WARN    Protocols contains PJL but JCL attributes are not set.\n"
-"                REF: Pages 78-79, section 5.7.\n"
-msgstr ""
-"        WARN    Protocols contains PJL but JCL attributes are not set.\n"
-"                REF: Pages 78-79, section 5.7.\n"
-
-#, c-format
-msgid ""
-"        WARN    %s shares a common prefix with %s\n"
-"                REF: Page 15, section 3.2.\n"
-msgstr ""
-"        WARN    %s shares a common prefix with %s\n"
-"                REF: Page 15, section 3.2.\n"
-
-#, c-format
-msgid "    %d ERROR%s FOUND\n"
-msgstr "    %d ERROR%s FOUND\n"
-
-msgid "    NO ERRORS FOUND\n"
-msgstr "    NO ERRORS FOUND\n"
-
-#, c-format
-msgid ""
-"        WARN    \"%s %s\" conflicts with \"%s %s\"\n"
-"                (constraint=\"%s %s %s %s\")\n"
-msgstr ""
-"        WARN    \"%s %s\" conflicts with \"%s %s\"\n"
-"                (constraint=\"%s %s %s %s\")\n"
-msgid ""
-"Usage: cupstestppd [-q] [-r] [-v[v]] filename1.ppd[.gz] [... filenameN.ppd[.gz]]\n"
-"       program | cupstestppd [-q] [-r] [-v[v]] -\n"
-msgstr ""
-"Utilisation : cupstestppd [-q] [-r] [-v[v]] fichier1.ppd[.gz] [... fichierN.ppd[.gz]]\n"
-"              programme | cupstestppd [-q] [-r] [-v[v]] -\n"
-
-msgid "lpstat: Need \"completed\" or \"not-completed\" after -W!\n"
-msgstr "lpstat: Il faut « completed » ou « not-completed » après l'option -W !\n"
-
-msgid "lpstat: The -b option requires a destination argument.\n"
-msgstr "lpstat: Il faut une destination après l'option '-b' !\n"
-
-msgid "Error: need hostname after '-h' option!\n"
-msgstr "Erreur : Il faut un nom d'hôte après l'option '-h' !\n"
-
-#, c-format
-msgid "lpstat: Unknown option '%c'!\n"
-msgstr "lpstat: Option '%c inconnue !\n"
-
-#, c-format
-msgid "lpstat: Invalid destination name in list \"%s\"!\n"
-msgstr "lpstat: Nom de destination incorrect dans la liste « %s » !\n"
-
-#, c-format
-msgid "lpstat: Unknown destination \"%s\"!\n"
-msgstr "lpstat: Destination « %s » inconnue !\n"
-
-#, c-format
-msgid "lpstat: Unable to connect to server %s on port %d: %s\n"
-msgstr "lpstat: Impossible de se connecter au serveur « %s » sur le port %d : %s\n"
-
-#, c-format
-msgid "lpstat: get-printers failed: %s\n"
-msgstr "lpstat: get-printers a échoué: %s\n"
-
-#, c-format
-msgid "%s accepting requests since Jan 01 00:00\n"
-msgstr "%s accepte les requêtes depuis le Jan 01 00:00\n"
-
-#, c-format
-msgid ""
-"%s not accepting requests since Jan 01 00:00 -\n"
-"\t%s\n"
-msgstr ""
-"%s n'accepte pas les requêtes depuis le Jan 01 00:00 -\n"
-"\t%s\n"
-
-#, c-format
-msgid "%s/%s accepting requests since Jan 01 00:00\n"
-msgstr "%s/%s accepte les requêtes depuis le Jan 01 00:00\n"
-
-#, c-format
-msgid ""
-"%s/%s not accepting requests since Jan 01 00:00 -\n"
-"\t%s\n"
-msgstr ""
-"%s/%s n'accepte pas les requêtes depuis le Jan 01 00:00 -\n"
-"\t%s\n"
-
-#, c-format
-msgid "lpstat: get-classes failed: %s\n"
-msgstr "lpstat: get-classes a échoué : %s !\n"
-
-#, c-format
-msgid "members of class %s:\n"
-msgstr "membres de la classe %s :\n"
-
-#, c-format
-msgid "system default destination: %s/%s\n"
-msgstr "destination par défaut du système : %s/%s\n"
-
-#, c-format
-msgid "system default destination: %s\n"
-msgstr "destination par défaut du système : %s\n"
-
-#, c-format
-msgid "lpstat: error - %s environment variable names non-existent destination \"%s\"!\n"
-msgstr ""
-"lpstat: erreur - la variable d'environnement désigne une destination\n"
-"                 inexistente « %s » !\n"
-
-msgid "no system default destination\n"
-msgstr "le système n'a pas de destination par défaut\n"
-
-#, c-format
-msgid "Output for printer %s is sent to remote printer %s on %s\n"
-msgstr ""
-"Ce qui est envoyé à l'imprimante %s est redirigé vers l'imprimante\n"
-"distante %s sur %s\n"
-
-#, c-format
-msgid "Output for printer %s is sent to %s\n"
-msgstr "Ce qui est envoyé à l'imprimante %s est redirigé vers %s\n"
-
-#, c-format
-msgid "Output for printer %s/%s is sent to remote printer %s on %s\n"
-msgstr ""
-"Ce qui est envoyé à l'imprimante %s/%s est redirigé vers l'imprimante\n"
-"distante %s sur %s\n"
-
-#, c-format
-msgid "Output for printer %s/%s is sent to %s\n"
-msgstr "Ce qui est envoyé à l'imprimante %s/%s est redirigé vers %s\n"
-
-#, c-format
-msgid "device for %s: %s\n"
-msgstr "périphérique pour %s : %s\n"
-
-#, c-format
-msgid "device for %s/%s: %s\n"
-msgstr "périphérique pour %s/%s : %s \n"
-
-#, c-format
-msgid "lpstat: get-jobs failed: %s\n"
-msgstr "lpstat: get-jobs a échoué : %s !\n"
-
-#, c-format
-msgid "\tqueued for %s\n"
-msgstr "\tmis en file d'attente pour %s\n"
-
-#, c-format
-msgid "printer %s is idle.  enabled since %s\n"
-msgstr "l'imprimante %s ne fait rien ; elle est activée depuis le %s\n"
-
-#, c-format
-msgid "printer %s now printing %s-%d.  enabled since %s\n"
-msgstr "l'imprimante %s est en train d'imprimer %s-%d ; elle est activée depuis le %s\n""
-
-#, c-format
-msgid "printer %s disabled since %s -\n"
-msgstr "l'imprimante %s est désactivée depuis le %s -\n"
-
-msgid "\treason unknown\n"
-msgstr "\traison inconnue\n"
-
-msgid ""
-"\tForm mounted:\n"
-"\tContent types: any\n"
-"\tPrinter types: unknown\n"
-msgstr ""
-"\tFormat monté :\n"
-"\tTypes de contenu : any\n"
-"\tTypes d'imprimante : unknown\n"
-
-#, c-format
-msgid "\tDescription: %s\n"
-msgstr "\tDescription : %s\n"
-
-msgid "\tAlerts:"
-msgstr "\tAlertes :"
-
-#, c-format
-msgid "\tLocation: %s\n"
-msgstr "\tLieu : %s\n"
-
-msgid "\tConnection: remote\n"
-msgstr "\tConnexion : distante\n"
-
-#, c-format
-msgid "\tInterface: %s.ppd\n"
-msgstr "\tInterface : %s.ppd\n"
-
-msgid "\tConnection: direct\n"
-msgstr "\tConnexion : directe\n"
-
-#, c-format
-msgid "\tInterface: %s/interfaces/%s\n"
-msgstr "\tInterface : %s/interfaces/%s\n"
-
-#, c-format
-msgid "\tInterface: %s/ppd/%s.ppd\n"
-msgstr "\tInterface : %s/ppd/%s.ppd\n"
-
-msgid "\tOn fault: no alert\n"
-msgstr "\tEn cas d'erreur : pas d'alerte\n"
-
-msgid "\tAfter fault: continue\n"
-msgstr "\tAprès une erreur : poursuivre\n"
-
-msgid "\tUsers allowed:\n"
-msgstr "\tUtilisateurs autorisés :\n"
-
-msgid "\tUsers denied:\n"
-msgstr "\tUtilisateurs refusés :\n"
-
-msgid "\t\t(all)\n"
-msgstr "\t\t( tous )\n"
-
-msgid "\tForms allowed:\n"
-msgstr "\tFormats autorisés :\n"
-
-msgid "\t\t(none)\n"
-msgstr "\t\t( aucun )\n"
-
-msgid "\tBanner required\n"
-msgstr "\tBannière requise\n"
-
-msgid "\tCharset sets:\n"
-msgstr "\tJeux de caractères :\n"
-
-msgid "\tDefault pitch:\n"
-msgstr "\t« pitch » par défaut :\n"
-
-msgid "\tDefault page size:\n"
-msgstr "\tTaille de papier par défaut :\n"
-
-msgid "\tDefault port settings:\n"
-msgstr "\tParamètres par défaut du port :\n"
-
-#, c-format
-msgid "printer %s/%s is idle.  enabled since %s\n"
-msgstr "l'imprimante %s/%s ne fait rien ; elle est activée depuis le %s\n"
-
-#, c-format
-msgid "printer %s/%s now printing %s-%d.  enabled since %s\n"
-msgstr "l'imprimante %s/%s est en train d'imprimer %s-%d ; elle est activée depuis le %s\n""
-
-#, c-format
-msgid "printer %s/%s disabled since %s -\n"
-msgstr "l'imprimante %s/%s est désactivée depuis le %s -\n"
-
-msgid "scheduler is running\n"
-msgstr "l'ordonnanceur tourne\n"
-
-msgid "scheduler is not running\n"
-msgstr "l'ordonnanceur est arrêté\n"
-
-#, c-format
-msgid "lpadmin: Unable to connect to server: %s\n"
-msgstr "lpadmin: Impossible de se connecter au serveur « %s » !\n"
-
-msgid ""
-"lpadmin: Unable to add a printer to the class:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible d'ajouter une imprimante à la classe :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected class name after '-c' option!\n"
-msgstr "lpadmin: Il faut un nom de classe après l'option '-c' !\n"
-
-msgid "lpadmin: Class name can only contain printable characters!\n"
-msgstr "lpadmin: Un nom de classe ne peut comporter que des caractères imprimables !\n"
-
-msgid "lpadmin: Expected printer name after '-d' option!\n"
-msgstr "lpadmin: Il faut un nom d'imprimante après l'option '-d' !\n"
-
-msgid "lpadmin: Printer name can only contain printable characters!\n"
-msgstr "lpadmin: Un nom d'imprimante ne peut comporter que des caractères imprimables !\n"
-
-msgid "lpadmin: Expected hostname after '-h' option!\n"
-msgstr "lpadmin: Il faut un nom d'hôte après l'option 'h' !\n"
-
-msgid ""
-"lpadmin: Unable to set the interface script:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de définir le script d'interface :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected interface after '-i' option!\n"
-msgstr "lpadmin: Il faut une interface après l'option '-i' !\n"
-
-msgid ""
-"lpadmin: Unable to set the interface script or PPD file:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de définir le script d'interface ou le fichier PPD :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected model after '-m' option!\n"
-msgstr "lpadmin: Il faut un modèle après l'option '-m' !\n"
-
-msgid "lpadmin: Expected name=value after '-o' option!\n"
-msgstr "lpadmin: Il faut un argument du type option=valeur après l'option '-o' !\n"
-
-msgid "lpadmin: Expected printer after '-p' option!\n"
-msgstr "lpadmin: Il faut une imprimante après l'option '-p' !\n"
-
-msgid ""
-"lpadmin: Unable to remove a printer from the class:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de supprimer une imprimante de la classe :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected class after '-r' option!\n"
-msgstr "lpadmin: Il faut une classe après l'option '-r' !\n"
-
-msgid "lpadmin: Expected allow/deny:userlist after '-u' option!\n"
-msgstr ""
-"lpadmin: Il faut un argument du type allow/deny:liste_utilisateurs\n"
-"         après l'option '-u' !\n"
-
-#, c-format
-msgid "lpadmin: Unknown allow/deny option \"%s\"!\n"
-msgstr "lpadmin: Option allow/deny « %s » inconnue !\n"
-
-msgid ""
-"lpadmin: Unable to set the device URI:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de définir l'URI du périphérique :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected device URI after '-v' option!\n"
-msgstr "lpadmin: Il faut un URI de périphérique après l'option '-v' !\n"
-
-msgid "lpadmin: Expected printer or class after '-x' option!\n"
-msgstr "lpadmin: Il faut une imprimante ou une classe après l'option '-x' !\n"
-
-msgid ""
-"lpadmin: Unable to set the printer description:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de définir la description de l'imprimante :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected description after '-D' option!\n"
-msgstr "lpadmin: Il faut une description après l'option '-D' !\n"
-
-msgid "lpadmin: Expected file type(s) after '-I' option!\n"
-msgstr "lpadmin: Il faut un ou plusieurs types de fichier après l'option '-I' !\n"
-
-msgid "lpadmin: Warning - content type list ignored!\n"
-msgstr "lpadmin: Attention - les types de contenu sont ignorés !\n"
-
-msgid ""
-"lpadmin: Unable to set the printer location:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de définir le lieu de l'imprimante :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected location after '-L' option!\n"
-msgstr "lpadmin: Il faut un lieu après l'option '-L' !\n"
-
-msgid ""
-"lpadmin: Unable to set the PPD file:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de définir le fichier PPD :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid "lpadmin: Expected PPD after '-P' option!\n"
-msgstr "lpadmin: Il faut un fichier PPD après l'option '-P' !\n"
-
-#, c-format
-msgid "lpadmin: Unknown option '%c'!\n"
-msgstr "lpadmin: Option '%c' inconnue !\n"
-
-#, c-format
-msgid "lpadmin: Unknown argument '%s'!\n"
-msgstr "lpadmin: Argument « %s » inconnu !\n"
-
-msgid ""
-"lpadmin: Unable to set the printer options:\n"
-"         You must specify a printer name first!\n"
-msgstr ""
-"lpadmin: Impossible de définir les options de l'imprimante :\n"
-"         Vous devez d'abord préciser un nom d'imprimante !\n"
-
-msgid ""
-"Usage:\n"
-"\n"
-"    lpadmin [-h server] -d destination\n"
-"    lpadmin [-h server] -x destination\n"
-"    lpadmin [-h server] -p printer [-c add-class] [-i interface] [-m model]\n"
-"                       [-r remove-class] [-v device] [-D description]\n"
-"                       [-P ppd-file] [-o name=value]\n"
-"                       [-u allow:user,user] [-u deny:user,user]\n"
-"\n"
-msgstr ""
-"Utilisation :\n"
-"\n"
-"    lpadmin [-h serveur] -d destination\n"
-"    lpadmin [-h serveur] -x destination\n"
-"    lpadmin [-h serveur] -p imprimante [-c classe] [-i interface] [-m modèle]\n"
-"                        [-r classe] [-v URI] [-D description]\n"
-"                        [-P fichier-ppd] [-o option=valeur]\n"
-"                        [-u allow:util.,util.] [-u deny:util.,util.]\n"
-"\n"
-
-#, c-format
-msgid "lpadmin: Unable to create temporary file: %s\n"
-msgstr "lpadmin: Impossible de créer un fichier temporaire : %s\n"
-
-#, c-format
-msgid "lpadmin: Unable to open file \"%s\": %s\n"
-msgstr "lpadmin: Impossible d'ouvrir le fichier « %s » : %s\n"
-
-#, c-format
-msgid "lpadmin: add-printer (set model) failed: %s\n"
-msgstr "lpadmin: add-printer ( définition du modèle ) a échoué : %s\n"
-
-#, c-format
-msgid "lpadmin: add-printer (set description) failed: %s\n"
-msgstr "lpadmin: add-printer ( définition de la description ) a échoué : %s\n"
-
-#, c-format
-msgid "lpadmin: add-printer (set location) failed: %s\n"
-msgstr "lpadmin: add-printer ( définition du lieu ) a échoué : %s\n"
-
-#, c-format
-msgid "lpadmin: Unable to create temporary file - %s\n"
-msgstr "lpadmin: Impossible de créer un fichier temporaire : %s\n"
-
-#, c-format
-msgid "lpadmin: Unable to open PPD file \"%s\" - %s\n"
-msgstr "lpadmin: Impossible d'ouvrir le fichier PPD « %s » : %s\n"
-
-#, c-format
-msgid "lpadmin: %s failed: %s\n"
-msgstr "lpadmin: %s a échoué : %s\n"
-
-msgid "lp: Expected destination after -d option!\n"
-msgstr "lp: Il faut une destination après l'option '-d' !\n"
-
-msgid "lp: Expected form after -f option!\n"
-msgstr "lp: Il faut un format après l'option '-f' !\n"
-
-msgid "lp: Expected hostname after -h option!\n"
-msgstr "lp: Il faut un nom d'hôte après l'option '-h' !\n"
-
-msgid "lp: Expected job ID after -i option!\n"
-msgstr "lp: Il faut un numéro de tâche après l'option '-i' !\n"
-
-msgid "lp: Error - cannot print files and alter jobs simultaneously!\n"
-msgstr "lp: Erreur - impossible d'imprimer et modifier les tâches en même temps !\n"
-
-msgid "lp: Error - bad job ID!\n"
-msgstr "lp: Erreur - numéro de tâche incorrect !\n"
-
-msgid "lp: Expected copies after -n option!\n"
-msgstr "lp: Il faut un nombre de copies après l'option '-n' !\n"
-
-msgid "lp: Expected option string after -o option!\n"
-msgstr "lp: Il faut une chaîne d'option \"nom=valeur\" après l'option '-o' !\n"
-
-#, c-format
-msgid "lp: Expected priority after -%c option!\n"
-msgstr "lp: Il faut une priorité après l'option '-%c' !\n"
-
-msgid "lp: Priority must be between 1 and 100.\n"
-msgstr "lp: La priorité doit être comprise entre 1 et 100.\n"
-
-msgid "lp: Expected title after -t option!\n"
-msgstr "lp: Il faut un titre après l'option '-t' !\n"
-
-msgid "lp: Expected mode list after -y option!\n"
-msgstr "lp: Il faut une liste de modes après l'option '-y' !\n"
-
-msgid "lp: Warning - mode option ignored!\n"
-msgstr "lp: Attention - l'option « mode » est ignorée !\n"
-
-msgid "lp: Expected hold name after -H option!\n"
-msgstr "lp: Il faut un code de retenue après l'option '-H' !\n"
-
-msgid "lp: Need job ID (-i) before \"-H restart\"!\n"
-msgstr "lp: Il faut un numéro de tâche ( '-i' ) avant '-H restart' !\n"
-
-msgid "lp: Expected page list after -P option!\n"
-msgstr "lp: Il faut une liste de pages après l'option '-P' !\n"
-
-msgid "lp: Expected character set after -S option!\n"
-msgstr "lp: Il faut un jeu de caractères après l'option '-S' !\n"
-
-msgid "lp: Warning - character set option ignored!\n"
-msgstr "lp: Attention - l'option « jeu de caractères » est ignorée !\n"
-
-msgid "lp: Expected content type after -T option!\n"
-msgstr "lp: Il faut un type de contenu après l'option '-T' !\n"
-
-msgid "lp: Warning - content type option ignored!\n"
-msgstr "lp: Attention - l'option « type de contenu » est ignorée !\n"
-
-#, c-format
-msgid "lp: Unknown option '%c'!\n"
-msgstr "lp: Option '%c' inconnue !\n"
-
-msgid "lp: Error - cannot print from stdin if files or a job ID are provided!\n"
-msgstr ""
-"lp: Erreur - impossible d'imprimer depuis l'entrée standard si un fichier\n"
-"             ou un numéro de tâche est spécifié !\n"
-
-#, c-format
-msgid "lp: Unable to access \"%s\" - %s\n"
-msgstr "lp: Impossible d'accéder à « %s » - %s\n"
-
-#, c-format
-msgid "lp: Too many files - \"%s\"\n"
-msgstr "lp: Trop de fichiers - « %s »\n"
-
-msgid "lp: error - no default destination available.\n"
-msgstr "lp: Erreur - aucune destination par défaut n'est disponible.\n"
-
-msgid "lp: error - scheduler not responding!\n"
-msgstr "lp: Erreur - l'odonnanceur ne répond pas !\n"
-
-#, c-format
-msgid "lp: Error - unable to create temporary file \"%s\" - %s\n"
-msgstr "lp: Erreur - impossible de créer le fichier temporaire « %s » - %s\n"
-
-#, c-format
-msgid "lp: error - unable to write to temporary file \"%s\" - %s\n"
-msgstr "lp: Erreur - impossible d'écrire dans le fichier temporaire « %s » - %s\n"
-
-msgid "lp: stdin is empty, so no job has been sent.\n"
-msgstr "lp: l'entrée standard est vide, donc aucune tâche n'a été envoyée.\n"
-
-#, c-format
-msgid "lp: unable to print file: %s\n"
-msgstr "lp: impossible d'imprimer le fichier - %s\n"
-
-#, c-format
-msgid "request id is %s-%d (%d file(s))\n"
-msgstr "l'identifiant de requête est %s-%d ( %d fichier(s) )\n"
-
-#, c-format
-msgid "lp: restart-job failed: %s\n"
-msgstr "lp: restart-job a échoué : %s\n"
-
-#, c-format
-msgid "lp: set-job-attributes failed: %s\n"
-msgstr "lp: set-job-attributes a échoué : %s\n"
-
-#, c-format
-msgid "lpinfo: Unable to connect to server: %s\n"
-msgstr "lpinfo: Impossible de se connecter au serveur : %s\n"
-
-#, c-format
-msgid "lpinfo: Unknown option '%c'!\n"
-msgstr "lpinfo: Option '%c' inconnue !\n"
-
-#, c-format
-msgid "lpinfo: Unknown argument '%s'!\n"
-msgstr "lpinfo: Argument '%s' inconnu !\n"
-
-#, c-format
-msgid "lpinfo: cups-get-devices failed: %s\n"
-msgstr "lpinfo: cups-get-devices a échoué : %s\n"
-
-#, c-format
-msgid ""
-"Device: uri = %s\n"
-"        class = %s\n"
-"        info = %s\n"
-"        make-and-model = %s\n"
-msgstr ""
-"Matériel :   URI = %s\n"
-"          classe = %s\n"
-"            info = %s\n"
-"   marque/modèle = %s\n"
-
-#, c-format
-msgid "lpinfo: cups-get-ppds failed: %s\n"
-msgstr "lpinfo: cups-get-ppds a échoué : %s\n"
-
-#, c-format
-msgid ""
-"Model:  name = %s\n"
-"        natural_language = %s\n"
-"        make-and-model = %s\n"
-msgstr ""
-"Modèle :        nom = %s\n"
-"   langue naturelle = %s\n"
-"      marque/modèle = %s\n"
-
-#, c-format
-msgid "lpmove: Unknown option '%c'!\n"
-msgstr "lpmove: Option '%c' inconnue !\n"
-
-#, c-format
-msgid "lpmove: Unknown argument '%s'!\n"
-msgstr "lpmove: Argument '%s' inconnu !\n"
-
-msgid "Usage: lpmove job dest\n"
-msgstr "Utilisation : lpmove tâche destination\n"
-
-#, c-format
-msgid "lpmove: Unable to connect to server: %s\n"
-msgstr "lpmove: Impossible de se connecter au serveur : %s\n"
-
-#, c-format
-msgid "lpmove: move-job failed: %s\n"
-msgstr "lpmove: move-job a échoué : %s\n""
-
-msgid "lpoptions: Unknown printer or class!\n"
-msgstr "lpoptions: Imprimante ou classe inconnue !\n"
-
-msgid "lpoptions: No printers!?!\n"
-msgstr "lpoptions: Pas d'imprimante !?!\n"
-
-#, c-format
-msgid "lpoptions: Unable to add printer or instance: %s\n"
-msgstr "lpoptions: Impossible d'ajouter l'imprimante ou l'instance : %s\n"
-
-#, c-format
-msgid "lpoptions: Destination %s has no PPD file!\n"
-msgstr "lpoptions: La destination %s n'a pas de fichier PPD !\n"
-
-#, c-format
-msgid "lpoptions: Unable to open PPD file for %s!\n"
-msgstr "lpoptions: Impossible d'ouvrir le fichier PPD pour %s !\n"
-
-msgid ""
-"Usage: lpoptions [-h server] [-E] -d printer\n"
-"       lpoptions [-h server] [-E] [-p printer] -l\n"
-"       lpoptions [-h server] [-E] -p printer -o option[=value] ...\n"
-"       lpoptions [-h server] [-E] -x printer\n"
-msgstr ""
-"Utilisation : lpoptions [-h serveur] [-E] -d imprimante\n"
-"              lpoptions [-h serveur] [-E] [-p imprimante] -l\n"
-"              lpoptions [-h serveur] [-E] -p imprimante -o option[=valeur] ...\n"
-"              lpoptions [-h serveur] [-E] -x imprimante\n"
-
-msgid "lppasswd: Only root can add or delete passwords!\n"
-msgstr "lppasswd: Seul l'utilisateur « root » peut ajouter ou supprimer des mots de passe !\n"
-
-msgid "Enter old password:"
-msgstr "Ancien mot de passe :"
-
-#, c-format
-msgid "lppasswd: Unable to copy password string: %s\n"
-msgstr "lppasswd: Impossible de copier le mot de passe : %s\n"
-
-msgid "Enter password:"
-msgstr "Entrez le nouveau mot de passe :"
-
-msgid "Enter password again:"
-msgstr "Confirmez le nouveau mot de passe :"
-
-msgid "lppasswd: Sorry, passwords don't match!\n"
-msgstr "lppasswd: Désolé, les mots de passe sont différents !\n"
-
-msgid ""
-"lppasswd: Sorry, password rejected.\n"
-"Your password must be at least 6 characters long, cannot contain\n"
-"your username, and must contain at least one letter and number.\n"
-msgstr ""
-"lppasswd: Désolé, mot de passe refusé.\n"
-"Votre mot de passe doit comporter au moins 6 caractères, au moins une lettre\n"
-"et un nombre, et ne peut contenir votre nom d'utilisateur.\n"
-
-msgid "lppasswd: Password file busy!\n"
-msgstr "lppasswd: Le fichier des mots de passe exidte déjà !\n"
-
-#, c-format
-msgid "lppasswd: Unable to open password file: %s\n"
-msgstr "lppasswd: Impossible d'ouvrir le fichier des mots de passe: %s\n"
-
-#, c-format
-msgid "lppasswd: Unable to write to password file: %s\n"
-msgstr "lppasswd: Impossible d'écrire dans le fichier des mots de passe : %s\n"
-
-#, c-format
-msgid "lppasswd: user \"%s\" and group \"%s\" do not exist.\n"
-msgstr "lppasswd: l'utilisateur « %s » et/ou le groupe « %s » n'existe(nt) pas !\n"
-
-msgid "lppasswd: Sorry, password doesn't match!\n"
-msgstr "lppasswd: Désolé, le mot de passe est erroné !\n"
-
-msgid "lppasswd: Password file not updated!\n"
-msgstr "lppasswd: Le fichier des mots de passe n'a pas été mis-à-jour !\n"
-
-#, c-format
-msgid "lppasswd: failed to backup old password file: %s\n"
-msgstr "lppasswd: impossible de sauvegarder l'ancien fichier des mots de passe : %s\n"
-
-#, c-format
-msgid "lppasswd: failed to rename password file: %s\n"
-msgstr "lppasswd: impossible de renommer le fichier des mots de passe : %s\n"
-
-msgid "Usage: lppasswd [-g groupname]\n"
-msgstr "Utilisation : lppasswd [-g nom_groupe]\n"
-
-msgid ""
-"Usage: lppasswd [-g groupname] [username]\n"
-"       lppasswd [-g groupname] -a [username]\n"
-"       lppasswd [-g groupname] -x [username]\n"
-msgstr ""
-"Utilisation : lppasswd [-g nom_groupe] [nom_utilisateur]\n"
-"              lppasswd [-g nom_groupe] -a [nom_utilisateur]\n"
-"              lppasswd [-g nom_groupe] -x [nom_utilisateur]\n"
-
-msgid "Start Printer"
-msgstr "Démarrer l'imprimante"
-
-msgid "Stop Printer"
-msgstr "Arrêter l'imprimante"
-
-msgid "Start Class"
-msgstr "Démarrer la classe"
-
-msgid "Stop Class"
-msgstr "Arrêter la classe"
-
-msgid "Accept Jobs"
-msgstr "Accepter les tâches"
-
-msgid "Reject Jobs"
-msgstr "Refuser les tâches"
-
-msgid "Purge Jobs"
-msgstr "Effacer les tâches"
-
-msgid "Set As Default"
-msgstr "Choisir par défaut"
-
-msgid "Administration"
-msgstr "Administration"
-
-msgid "Modify Class"
-msgstr "Modifier la classe"
-
-msgid "Add Class"
-msgstr "Ajouter une classe"
-
-msgid "The class name may only contain up to 127 printable characters and may not contain spaces, slashes (/), or the pound sign (#)."
-msgstr "Le nom de classe doit comporter au plus 127 caractères, tous imprimables, sans espace, '/' ni '#'."
-
-msgid "Unable to modify class:"
-msgstr "Impossible de modifier la classe :"
-
-msgid "Unable to add class:"
-msgstr "Impossible d'ajouter la classe :"
-
-msgid "Modify Printer"
-msgstr "Modifier l'imprimante"
-
-msgid "Add Printer"
-msgstr "Ajouter une imprimante"
-
-msgid "The printer name may only contain up to 127 printable characters and may not contain spaces, slashes (/), or the pound sign (#)."
-msgstr "Le nom d'imprimante doit comporter au plus 127 caractères, tous imprimables, sans espace, '/' ni '#'."
-
-msgid "Unable to get list of printer drivers:"
-msgstr "Impossible d'obtenir la liste des pilotes pour l'imprimante:"
-
-msgid "Unable to modify printer:"
-msgstr "Impossible de modifier l'imprimante :"
-
-msgid "Unable to add printer:"
-msgstr "Impossible d'ajouter l'imprimante :"
-
-msgid "Set Printer Options"
-msgstr "Définir les options de l'imprimante"
-
-msgid "Missing form variable!"
-msgstr "Un champ du formulaire HTML n'a pas été rempli !"
-
-msgid "Unable to get PPD file!"
-msgstr "Impossible de trouver le fichier PPD !"
-
-msgid "Unable to open PPD file:"
-msgstr "Impossible d'ouvrir le fichier PPD :"
-
-msgid "Banners"
-msgstr "Bannières"
-
-msgid "Starting Banner"
-msgstr "Début de la bannière"
-
-msgid "Ending Banner"
-msgstr "Fin de la bannière"
-
-msgid "Policies"
-msgstr "Politiques"
-
-msgid "Error Policy"
-msgstr "Politique d'erreur"
-
-msgid "Operation Policy"
-msgstr "Politique des opérations"
-
-msgid "PS Binary Protocol"
-msgstr "Protocole binaire PS"
-
-msgid "None"
-msgstr "Auncun(e)"
-
-msgid "Unable to set options:"
-msgstr "Impossible de définir les options :"
-
-msgid "Change Settings"
-msgstr "Modifier les paramètres"
-
-msgid "Unable to change server settings:"
-msgstr "Impossible de modifier les paramètres du serveur :"
-
-msgid "Unable to upload cupsd.conf file:"
-msgstr "Impossible de transmettre le fichier cupsd.conf :"
-
-msgid "Edit Configuration File"
-msgstr "Éditer le fichier de configuration"
-
-msgid "Unable to create temporary file:"
-msgstr "Impossible de créer le fichier temporaire :"
-
-msgid "Unable to access cupsd.conf file:"
-msgstr "Impossible d'accéder au fichier cupsd.conf :"
-
-msgid "Unable to edit cupsd.conf files larger than 1MB!"
-msgstr "Impossible d'éditer des fichiers cupsd.conf de taille supérieure à 1Mo !"
-
-msgid "Delete Class"
-msgstr "Supprimer la classe"
-
-msgid "Unable to delete class:"
-msgstr "Impossible de supprimer la classe :"
-
-msgid "Delete Printer"
-msgstr "Supprimer l'imprimante"
-
-msgid "Unable to delete printer:"
-msgstr "Impossible de supprimer l'imprimante :"
-
-msgid "Export Printers to Samba"
-msgstr "Exporter les imprimantes vers SAMBA"
-
-msgid "Unable to fork process!"
-msgstr "Impossible de faire un « fork » !"
-
-msgid "Unable to connect to server!"
-msgstr "Impossible de se connecter au serveur !"
-
-msgid "Unable to get printer attributes!"
-msgstr "Impossible de récupérer les attributs de l'imprimante !"
-
-msgid "Unable to convert PPD file!"
-msgstr "Impossible de convertir le fichier PPD !"
-
-msgid "Unable to copy Windows 2000 printer driver files!"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour Windows 2000 !"
-
-msgid "Unable to install Windows 2000 printer driver files!"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows 2000 !"
-
-msgid "Unable to copy Windows 9x printer driver files!"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour Windows 9x !"
-
-msgid "Unable to install Windows 9x printer driver files!"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows 9x !"
-
-msgid "Unable to set Windows printer driver!"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows !"
-
-msgid "No printer drivers found!"
-msgstr "Aucun pilote trouvé pour l'imprimante !"
-
-msgid "Unable to execute cupsaddsmb command!"
-msgstr "Impossible d'exécuter la commande cupsaddsmb !"
-
-#, c-format
-msgid "cupsaddsmb failed with status %d"
-msgstr "cupsaddsmb a échoué avec le statut %d"
-
-#, c-format
-msgid "cupsaddsmb crashed on signal %d"
-msgstr "cupsaddsmb s'est terminé inopinément sur réception du signal %d"
-
-msgid "A Samba username is required to export printer drivers!"
-msgstr "Il faut un nom d'utilisateur SAMBA pour exporter les pilotes d'imprimante !"
-
-msgid "A Samba password is required to export printer drivers!"
-msgstr "Il faut un mot de passe SAMBA pour exporter les pilotes d'imprimante !"
-
-msgid "Unable to open cupsd.conf file:"
-msgstr "Impossible d'ouvrir le fichier cupsd.conf :"
-
-msgid "Unable to change printer:"
-msgstr "Impossible de modifier l'imprimante :"
-
-msgid "Set Allowed Users"
-msgstr "Définir les autorisations"
-
-msgid "Unable to get printer attributes:"
-msgstr "Impossible de récupérer les attributs de l'imprimante :"
-
-msgid "Set Publishing"
-msgstr "Publier"
-
-msgid "Unable to change printer-is-shared attribute:"
-msgstr "Impossible de modifier l'attribut « printer-is-shared » :"
-
-msgid "Classes"
-msgstr "Classes"
-
-msgid "Unable to get class list:"
-msgstr "Impossible d'obtenir la liste des classes :"
-
-msgid "Unable to get class status:"
-msgstr "Impossible d'obtenir l'état de la classe :"
-
-msgid "Move Job"
-msgstr "Transférer la tâche"
-
-msgid "Unable to find destination for job!"
-msgstr "Impossible de trouver la destination de la tâche !"
-
-msgid "Move All Jobs"
-msgstr "Transférer toutes les tâches"
-
-msgid "Unable to move job"
-msgstr "Impossible de transférer la tâche !"
-
-msgid "Unable to move jobs"
-msgstr "Impossible de transférer les tâches !"
-
-msgid "Print Test Page"
-msgstr "Imprimer la page de test"
-
-msgid "Unable to print test page:"
-msgstr "Impossible d'imprimer la page de test :"
-
-msgid "Jobs"
-msgstr "Tâches"
-
-msgid "Job operation failed:"
-msgstr "L'opération sur la tâche a échoué :"
-
-msgid "Printers"
-msgstr "Imprimantes"
-
-msgid "Unable to get printer list:"
-msgstr "Impossible d'obtenir la liste des imprimantes :"
-
-msgid "Unable to get printer status:"
-msgstr "Impossible d'obtenir l'état de l'imprimante :"
-
-msgid "OK"
-msgstr "OK"
-
-msgid "Unable to open PPD file"
-msgstr "Impossible d'ouvrir le fichier PPD !"
-
-msgid "NULL PPD file pointer"
-msgstr "Pointeur de fichier PPD NUL !"
-
-msgid "Memory allocation error"
-msgstr "Problème d'allocation de mémoire"
-
-msgid "Missing PPD-Adobe-4.x header"
-msgstr "Il manque l'entête PPD-Adobe-4.x"
-
-msgid "Missing value string"
-msgstr "Il manque la valeur"
-
-msgid "Internal error"
-msgstr "Erreur interne"
-
-msgid "Bad OpenGroup"
-msgstr "OpenGroup erroné"
-
-msgid "OpenGroup without a CloseGroup first"
-msgstr "OpenGroup sans de CloseGroup d'abord"
-
-msgid "Bad OpenUI/JCLOpenUI"
-msgstr "OpenUI/JCLOpenUI erroné"
-
-msgid "OpenUI/JCLOpenUI without a CloseUI/JCLCloseUI first"
-msgstr "OpenUI/JCLOpenUI sans de CloseUI/JCLCloseUI d'abord"
-
-msgid "Bad OrderDependency"
-msgstr "OrderDependency erroné"
-
-msgid "Bad UIConstraints"
-msgstr "UIConstraints erroné"
-
-msgid "Missing asterisk in column 1"
-msgstr "Il manque un astérisque à la colonne 1"
-
-msgid "Line longer than the maximum allowed (255 characters)"
-msgstr "Ligne plus longue que les 255 caractères autorisés"
-
-msgid "Illegal control character"
-msgstr "Caractère de contrôle incorrect"
-
-msgid "Illegal main keyword string"
-msgstr "Mot-clé essentiel incorrect"
-
-msgid "Illegal option keyword string"
-msgstr "Mot-clé d'option incorrect"
-
-msgid "Illegal translation string"
-msgstr "Traduction incorrecte"
-
-msgid "Illegal whitespace character"
-msgstr "Caractère « espace blanc » incorrect"
-
-msgid "Bad custom parameter"
-msgstr "Paramètre de personnalisation incorrect"
-
-msgid "Unknown"
-msgstr "Inconnu(e)"
-
-msgid "Custom"
-msgstr "Personnalisation"
-
-msgid "JCL"
-msgstr "JCL ( Langage de contrôle de tâche )"
-
-msgid "No authentication information provided!"
-msgstr "Pas d'information d'authentification !"
-
-#, c-format
-msgid "Password for %s required to access %s via SAMBA: "
-msgstr "Il faut un mot de passe à %s pour accéder à %s via SAMBA : "
-
-#, c-format
-msgid "Running command: %s %s -N -U '%s%%%s' -c '%s'\n"
-msgstr "Exécute la commande : %s %s -N -U '%s%%%s' -c '%s'\n"
-
-#, c-format
-msgid "cupsaddsmb: Unable to run \"%s\": %s\n"
-msgstr "cupsaddsmb: Impossible d'exécuter « %s » : %s\n"
-
-msgid "cupsaddsmb: No Windows printer drivers are installed!\n"
-msgstr "cupsaddsmb: Aucun pilote d'impression pour Windows n'est installé !\n"
-
-msgid "cupsaddsmb: Warning, no Windows 2000 printer drivers are installed!\n"
-msgstr "cupsaddsmb: Attention, aucun pilote d'impression pour Windows 2000 n'est installé !\n"
-
-#, c-format
-msgid "lpadmin: Printer %s is already a member of class %s.\n"
-msgstr "lpadmin: L'imprimante %s est déjà membre de la classe %s.\n"
-
-msgid "lpadmin: No member names were seen!\n"
-msgstr "lpadmin: Aucun nom de membre trouvé !\n"
-
-#, c-format
-msgid "lpadmin: Printer %s is not a member of class %s.\n"
-msgstr "lpadmin: L'imprimante %s n'est pas membre de la classe %s.\n"
-
-#, c-format
-msgid ""
-"Device: uri = %s\n"
-"        class = %s\n"
-"        info = %s\n"
-"        make-and-model = %s\n"
-"        device-id = %s\n"
-msgstr ""
-"Matériel :   URI = %s\n"
-"          classe = %s\n"
-"            info = %s\n"
-"   marque/modèle = %s\n"
-"     ID matériel = %s\n"
-
-#, c-format
-msgid ""
-"Model:  name = %s\n"
-"        natural_language = %s\n"
-"        make-and-model = %s\n"
-"        device-id = %s\n"
-msgstr ""
-"Modèle :        nom = %s\n"
-"   langue naturelle = %s\n"
-"      marque/modèle = %s\n"
-"     ID matériel = %s\n"
-
-
-msgid "Usage: lpmove job/src dest\n"
-msgstr "Utilisation : lpmove tâche/source destination\n"
-
-msgid "lpstat: Need \"completed\", \"not-completed\", or \"all\" after -W!\n"
-msgstr "lpstat: Il faut « completed » ou « not-completed » après l'option -W !\n"
-
-#, c-format
-msgid "%s accepting requests since %s\n"
-msgstr "%s accepte les requêtes depuis le %s\n"
-
-#, c-format
-msgid ""
-"%s not accepting requests since %s -\n"
-"\t%s\n"
-msgstr ""
-"%s n'accepte pas les requêtes depuis le %s -\n"
-"\t%s\n"
-
-#, c-format
-msgid "%s/%s accepting requests since %s\n"
-msgstr "%s/%s accepte les requêtes depuis le %s\n"
-
-#, c-format
-msgid ""
-"%s/%s not accepting requests since %s -\n"
-"\t%s\n"
-msgstr ""
-"%s/%s n'accepte pas les requêtes depuis le %s -\n"
-"\t%s\n"
-
-msgid "lpc> "
-msgstr "lpc> "
-
-#, c-format
-msgid "%s: Unable to contact server!\n"
-msgstr "%s: Impossible de contacter le serveur !\n"
-
-#, c-format
-msgid "%s: Error - expected username after '-U' option!\n"
-msgstr "%s: Erreur - il faut un nom d'utilisateur après l'option '-U' !\n"
-
-#, c-format
-msgid "%s: Error - unknown destination \"%s/%s\"!\n"
-msgstr "%s: Erreur - destination « %s/%s » inconnue !\n"
-
-#, c-format
-msgid "%s: Unknown destination \"%s\"!\n"
-msgstr "%s: Destination « %s » inconnue !\n"
-
-#, c-format
-msgid "%s: Error - expected hostname after '-h' option!\n"
-msgstr "%s: Erreur - il faut un nom de machine après l'option '-h' !\n"
-
-#, c-format
-msgid "%s: error - %s environment variable names non-existent destination \"%s\"!\n"
-msgstr "%s: Erreur - la variable d'environnement %s désigne une destination inexistente « %s » !\n"
-
-#, c-format
-msgid "%s: error - no default destination available.\n"
-msgstr "%s: Erreur - aucune destination par défaut n'est disponible.\n"
-
-msgid "Usage: lpq [-P dest] [-U username] [-h hostname[:port]] [-l] [+interval]\n"
-msgstr "Utilisation : lpq [-P dest] [-U nom_utilisateur] [-h nom_machine[:port]] [-l] [+intervalle]\n"
-
-#, c-format
-msgid "%s: Error - expected hostname after '-H' option!\n"
-msgstr "%s: Erreur - il faut un nom de machine après l'option '-H' !\n"
-
-#, c-format
-msgid "%s: Error - expected value after '-%c' option!\n"
-msgstr "%s: Erreur - il faut une valeur après l'option '-%c' !\n"
-
-#, c-format
-msgid "%s: Warning - '%c' format modifier not supported - output may not be correct!\n"
-msgstr "%s: Attention - le modificateur de format '%c' n'est pas géré - l'affichage pourrait être incorrect !\n"
-
-#, c-format
-msgid "%s: error - expected option=value after '-o' option!\n"
-msgstr "%s: Erreur - il faut un argument du type option=valeur après l'option '-o' !\n"
-
-#, c-format
-msgid "%s: Error - expected destination after '-P' option!\n"
-msgstr "%s: Erreur - il faut une destination après l'option '-P' !\n"
-
-#, c-format
-msgid "%s: Error - expected copy count after '-#' option!\n"
-msgstr "%s: Erreur - il faut un nombre de copies après l'option '-#' !\n"
-
-#, c-format
-msgid "%s: Error - expected name after '-%c' option!\n"
-msgstr "%s: Erreur - il faut un nom après l'option '-%c' !\n"
-
-#, c-format
-msgid "%s: Error - unknown option '%c'!\n"
-msgstr "%s: Erreur - option '%c' inconnue !\n"
-
-#, c-format
-msgid "%s: Error - unable to access \"%s\" - %s\n"
-msgstr "%s: Erreur - impossible d'accéder à « %s » - %s\n"
-
-#, c-format
-msgid "%s: Error - too many files - \"%s\"\n"
-msgstr "%s: Erreur - trop de fichiers - « %s »\n"
-
-#, c-format
-msgid "%s: Error - %s environment variable names non-existent destination \"%s\"!\n"
-msgstr "%s: Erreur - la variable d'environnement %s désigne une destination inexistente « %s » !\n"
-
-#, c-format
-msgid "%s: Error - no default destination available.\n"
-msgstr "%s: Erreur - aucune destination par défaut n'est disponible.\n"
-
-#, c-format
-msgid "%s: Error - scheduler not responding!\n"
-msgstr "%s: Erreur - l'ordonnanceur ne répond pas !\n"
-
-#, c-format
-msgid "%s: Error - unable to create temporary file \"%s\" - %s\n"
-msgstr "%s: Erreur - impossible de créer le fichier temporaire « %s » - %s\n"
-
-#, c-format
-msgid "%s: Error - unable to write to temporary file \"%s\" - %s\n"
-msgstr "%s: Erreur - impossible d'écrire dans le fichier temporaire « %s » - %s\n"
-
-#, c-format
-msgid "%s: Error - stdin is empty, so no job has been sent.\n"
-msgstr "%s: Erreur - stdin est vide, donc aucune tâche n'a été envoyée.\n"
-
-#, c-format
-msgid "%s: Error - unknown destination \"%s\"!\n"
-msgstr "%s: Erreur - destination « %s » inconnue !\n"
-
-#, c-format
-msgid "%s: Error - expected reason text after '-r' option!\n"
-msgstr "%s: Erreur - il faut le texte de la raison après l'option '-r' !\n"
-
-#, c-format
-msgid "%s: Error - expected username after '-u' option!\n"
-msgstr "%s: Erreur - il faut un nom d'utilisateur après l'option '-u' !\n"
-
-#, c-format
-msgid "%s: %s failed: %s\n"
-msgstr ""%s: %s a échoué : %s"
-
-#, c-format
-msgid "%s: Error - expected destination after '-d' option!\n"
-msgstr "%s: Erreur - il faut une destination après l'option '-d' !\n"
-
-#, c-format
-msgid "%s: Error - expected form after '-f' option!\n"
-msgstr "%s: Erreur - il faut un format après l'option '-f' !\n"
-
-#, c-format
-msgid "%s: Warning - form option ignored!\n"
-msgstr "%s: Attention - l'option « format » est ignorée !\n"
-
-#, c-format
-msgid "%s: Expected job ID after '-i' option!\n"
-msgstr "%s: Il faut un numéro de tâche après l'option '-i' !\n"
-
-#, c-format
-msgid "%s: Error - cannot print files and alter jobs simultaneously!\n"
-msgstr "%s: Erreur - impossible d'imprimer et modifier les tâches en même temps !\n"
-
-#, c-format
-msgid "%s: Error - bad job ID!\n"
-msgstr "%s: Erreur - numéro de tâche incorrect !\n"
-
-#, c-format
-msgid "%s: Error - expected copies after '-n' option!\n"
-msgstr "%s: Erreur - il faut un nombre de copies après l'option '-n' !\n"
-
-#, c-format
-msgid "%s: Error - expected option string after '-o' option!\n"
-msgstr "%s: Erreur - il faut une chaîne d'option \"nom=valeur\" après l'option '-o' !\n"
-
-#, c-format
-msgid "%s: Error - expected priority after '-%c' option!\n"
-msgstr "%s: Erreur - il faut une priorité après l'option '-%c' !\n"
-
-#, c-format
-msgid "%s: Error - priority must be between 1 and 100.\n"
-msgstr "%s: Erreur - la priorité doit être comprise entre 1 et 100.\n"
-
-#, c-format
-msgid "%s: Error - expected title after '-t' option!\n"
-msgstr "%s: Erreur - il faut un titre après l'option '-t'  !\n"
-
-#, c-format
-msgid "%s: Error - expected mode list after '-y' option!\n"
-msgstr "%s: Erreur - il faut une liste de modes après l'option '-y' !\n"
-
-#, c-format
-msgid "%s: Warning - mode option ignored!\n"
-msgstr "%s: Attention - l'option « mode » est ignorée !\n"
-
-#, c-format
-msgid "%s: Error - expected hold name after '-H' option!\n"
-msgstr "%s: Erreur - il faut un code de retenue après l'option '-H' !\n"
-
-#, c-format
-msgid "%s: Need job ID ('-i jobid') before '-H restart'!\n"
-msgstr "%s: Il faut un numéro de tâche ( '-i' ) avant '-H restart' !\n"
-
-#, c-format
-msgid "%s: Error - expected page list after '-P' option!\n"
-msgstr "%s: Erreur - il faut une liste de pages après l'option '-P' !\n"
-
-#, c-format
-msgid "%s: Error - expected character set after '-S' option!\n"
-msgstr "%s: Erreur - il faut un jeu de caractères après l'option '-S' !\n"
-
-#, c-format
-msgid "%s: Warning - character set option ignored!\n"
-msgstr "%s: Attention - l'option « jeu de caractères » est ignorée !\n"
-
-#, c-format
-msgid "%s: Error - expected content type after '-T' option!\n"
-msgstr "%s: Erreur - il faut un type de contenu après l'option '-T' !\n"
-
-#, c-format
-msgid "%s: Warning - content type option ignored!\n"
-msgstr "%s: Attention - l'option « type de contenu » est ignorée !\n"
-
-#, c-format
-msgid "%s: Error - cannot print from stdin if files or a job ID are provided!\n"
-msgstr ""
-"%s: Erreur - impossible d'imprimer depuis l'entrée standard si un fichier\n"
-"             ou un numéro de tâche est spécifié !\n"
-
-#, c-format
-msgid "%s: Error - need \"completed\", \"not-completed\", or \"all\" after '-W' option!\n"
-msgstr "%s: Erreur - il faut « completed », « not-completed », ou « all » après l'option -W !\n"
-
-#, c-format
-msgid "%s: Error - expected destination after '-b' option!\n"
-msgstr "%s: Erreur - il faut une destination après l'option '-b' !\n"
-
-#, c-format
-msgid "%s: Invalid destination name in list \"%s\"!\n"
-msgstr "%s: Erreur - nom de destination incorrect dans la liste « %s » !\n"
-
-#, c-format
-msgid "%s: Unable to connect to server\n"
-msgstr "%s: Impossible de se connecter au serveur !\n"
-
-msgid "Print Job:"
-msgstr "Imprimer la tâche :"
-
-msgid "pending"
-msgstr "en attente"
-
-msgid "held"
-msgstr "retenue"
-
-msgid "processing"
-msgstr "en cours"
-
-msgid "stopped"
-msgstr "arrêtée"
-
-msgid "canceled"
-msgstr "annulée"
-
-msgid "aborted"
-msgstr "abandonnée"
-
-msgid "completed"
-msgstr "terminée"
-
-msgid "unknown"
-msgstr "inconnue"
-
-msgid "untitled"
-msgstr "sans titre"
-
-msgid "Printer:"
-msgstr "Imprimante :"
-
-msgid "idle"
-msgstr "inactive"
-
-msgid "Missing notify-subscription-ids attribute!"
-msgstr "Il manque l'attibut notify-subscription-ids"
-
-msgid "Job subscriptions cannot be renewed!"
-msgstr "Les souscriptions de tâche ne peuvent être renouvelées !"
-
-
-I AM HERE
-
-
-msgid "cupsd: Expected config filename after \"-c\" option!\n"
-msgstr "cupsd: Il faut un nom de fichier de configuration après l'option '-c' !\n"
-
-msgid "cupsd: launchd(8) support not compiled in, running in normal mode.\n"
-msgstr "cupsd: la gestion de launchd(8) n'a pas été compilée - exécution en mode normal.\n"
-
-#, c-format
-msgid "cupsd: Unknown option \"%c\" - aborting!\n"
-msgstr "cupsd: Option « %c » inconnue - abandon !\n"
-
-#, c-format
-msgid "cupsd: Unknown argument \"%s\" - aborting!\n"
-msgstr "cupsd: Argument « %s » inconnu - abandon !\n"
-
-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 ""
-"Utilisation : cupsd [-c fichier-config] [-f] [-F] [-h] [-l]\n"
-"\n"
-"-c fichier-config   Charge un autre fichier de configuration\n"
-"-f                  Exécution au premier plan\n"
-"-F                  Exécution au premier plan mais détaché\n"
-"-h                  Affiche the message d'aide\n"
-"-l                  Exécute cupsd depuis launchd(8)\n"
-
-#, c-format
-msgid "        WARN    Line %d only contains whitespace!\n"
-msgstr "        WARN    Line %d only contains whitespace!\n"
-
-msgid "        WARN    File contains a mix of CR, LF, and CR LF line endings!\n"
-msgstr "        WARN    File contains a mix of CR, LF, and CR LF line endings!\n"
-
-msgid "        WARN    Non-Windows PPD files should use lines ending with only LF, not CR LF!\n"
-msgstr "        WARN    Non-Windows PPD files should use lines ending with only LF, not CR LF!\n"
-
-msgid "Printer Maintenance"
-msgstr "Maintenance de l'imprimante"
-
-msgid "Unable to send maintenance job:"
-msgstr "Impossible d'envoyer la tâche de maintenance :"
-
-#, c-format
-msgid "cupsaddsmb: No PPD file for printer \"%s\" - %s\n"
-msgstr "cupsaddsmb: Pas de fichier PPD pour l'imprimante « %s » - %s\n"
-
-#, c-format
-msgid "      **FAIL**  %s %s does not exist!\n"
-msgstr "      **FAIL**  %s %s does not exist!\n"
-
-#, c-format
-msgid "      **FAIL**  Bad language \"%s\"!\n"
-msgstr "      **FAIL**  Bad language \"%s\"!\n"
-
-#, c-format
-msgid "      **FAIL**  Missing \"%s\" translation string for option %s!\n"
-msgstr "      **FAIL**  Missing \"%s\" translation string for option %s!\n"
-
-#, c-format
-msgid "      **FAIL**  Default translation string for option %s contains 8-bit characters!\n"
-msgstr "      **FAIL**  Default translation string for option %s contains 8-bit characters!\n"
-
-#, c-format
-msgid "      **FAIL**  Missing \"%s\" translation string for option %s, choice %s!\n"
-msgstr "      **FAIL**  Missing \"%s\" translation string for option %s, choice %s!\n"
-
-#, c-format
-msgid "      **FAIL**  Default translation string for option %s choice %s contains 8-bit characters!\n"
-msgstr "      **FAIL**  Default translation string for option %s choice %s contains 8-bit characters!\n"
-
-#, c-format
-msgid "      **FAIL**  Bad cupsFilter value \"%s\"!\n"
-msgstr "      **FAIL**  Bad cupsFilter value \"%s\"!\n"
-
-msgid "Help"
-msgstr "Aide"
-
-#, c-format
-msgid "Missing value on line %d!\n"
-msgstr "Il manque une valeur à la ligne %d !\n"
-
-#, c-format
-msgid "Missing double quote on line %d!\n"
-msgstr "Il manque un \" à la ligne %d !\n"
-
-#, c-format
-msgid "Bad option + choice on line %d!\n"
-msgstr "Couple option + choix incorrect à la ligne %d !\n"
-
-#, c-format
-msgid "Unable to copy Windows 2000 printer driver files (%d)!\n"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour Windows 2000 ( %d ) !\n"
-
-#, c-format
-msgid "Unable to copy CUPS printer driver files (%d)!\n"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour CUPS ( %d ) !\n"
-
-#, c-format
-msgid "Unable to install Windows 2000 printer driver files (%d)!\n"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows 2000 ( %d ) !\n"
-
-#, c-format
-msgid "Unable to copy Windows 9x printer driver files (%d)!\n"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour Windows 9x ( %d ) !\n"
-
-#, c-format
-msgid "Unable to install Windows 9x printer driver files (%d)!\n"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows 9x ( %d ) !\n"
-
-msgid "No Windows printer drivers are installed!\n"
-msgstr "Aucun pilote d'impression pour Windows n'est installé !\n"
-
-msgid "Warning, no Windows 2000 printer drivers are installed!\n"
-msgstr "Attention, aucun pilote d'impression pour Windows 2000 n'est installé !\n"
-
-#, c-format
-msgid "Unable to set Windows printer driver (%d)!\n"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows ( %d ) !\n""
-
-msgid ""
-"Usage: cupsaddsmb [options] printer1 ... printerN\n"
-"       cupsaddsmb [options] -a\n"
-"\n"
-"Options:\n"
-"  -E               Encrypt the connection to the server\n"
-"  -H samba-server  Use the named SAMBA server\n"
-"  -U samba-user    Authenticate using the named SAMBA user\n"
-"  -a               Export all printers\n"
-"  -h cups-server   Use the named CUPS server\n"
-"  -v               Be verbose (show commands)\n"
-msgstr ""
-"Utilisation : cupsaddsmb [options] imprimante1 ... imprimanteN\n"
-"              cupsaddsmb [options] -a\n"
-"\n"
-"Options:\n"
-"  -E                    Crypter la connexion au serveur\n"
-"  -H serveur-samba      Utiliser le serveur SAMBA désigné\n"
-"  -U utilisateur-samba  S'authentifier avec l'utilisateur SAMBA désigné\n"
-"  -a                    Exporter toutes les imprimantes\n"
-"  -h serveur-CUPS       Utiliser le serveur CUPS désigné\n"
-"  -v                    Être locace ( afficher les commandes )\n"
-
-#, c-format
-msgid "Unable to copy Windows 2000 printer driver files (%d)!"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour Windows 2000 ( %d ) !"
-
-#, c-format
-msgid "Unable to copy CUPS printer driver files (%d)!"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour CUPS ( %d ) !"
-
-#, c-format
-msgid "Unable to install Windows 2000 printer driver files (%d)!"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows 2000 ( %d ) !"
-
-#, c-format
-msgid "Unable to copy Windows 9x printer driver files (%d)!"
-msgstr "Impossible de copier les fichiers de pilote d'impression pour Windows 9x ( %d ) !"
-
-#, c-format
-msgid "Unable to install Windows 9x printer driver files (%d)!"
-msgstr "Impossible d'installer les fichiers de pilote d'impression pour Windows 9x ( %d ) !"
-
-msgid "No Windows printer drivers are installed!"
-msgstr "Aucun pilote d'impression pour Windows n'est installé !"
-
-msgid "Warning, no Windows 2000 printer drivers are installed!"
-msgstr "Attention, aucun pilote d'impression pour Windows 2000 n'est installé !"
-
-#, c-format
-msgid "open of %s failed: %s"
-msgstr "l'ouverture de %s a échoué : %s"
-
-#, c-format
-msgid "Running command: %s %s -N -A %s -c '%s'\n"
-msgstr "Exécution de la commande : %s %s -N -A %s -c '%s'\n"
-
-#, c-format
-msgid "stat of %s failed: %s"
-msgstr "stat sur %s a échoué : %s"
-
-#, c-format
-msgid "Job #%d is already cancelled - can't cancel."
-msgstr "La tâche n°%d est déjà annulée - impossible de l'annuler."
-
-#, c-format
-msgid "Job #%d is already aborted - can't cancel."
-msgstr "La tâche n°%d est déjà abandonnée - impossible de l'annuler."
-
-#, c-format
-msgid "Job #%d is already completed - can't cancel."
-msgstr "La tâche n°%d est déjà terminée - impossible de l'annuler."
-
-#, c-format
-msgid "You must access this page using the URL <A HREF=\"https://%s:%d%s\">https://%s:%d%s</A>."
-msgstr "Vous devez accéder à cette page avec l'URL <A HREF=\"https://%s:%d%s\">https://%s:%d%s</A>."
-
-#, c-format
-msgid "Unsupported format '%s'!"
-msgstr "Format non géré '%s' !"
-
-msgid "FAIL\n"
-msgstr "ÉCHEC"
-
-#, c-format
-msgid ""
-"    Line %d is longer than 255 characters (%d)!\n"
-"        REF: Page 25, Line Length\n"
-msgstr ""
-"    Line %d is longer than 255 characters (%d)!\n"
-"        REF: Page 25, Line Length\n"
-
-msgid ""
-"    Missing %!PS-Adobe-3.0 on first line!\n"
-"        REF: Page 17, 3.1 Conforming Documents\n"
-msgstr ""
-"    Missing %!PS-Adobe-3.0 on first line!\n"
-"        REF: Page 17, 3.1 Conforming Documents\n"
-
-#, c-format
-msgid ""
-"    Bad %%%%Pages: on line %d!\n"
-"        REF: Page 43, %%%%Pages:\n"
-msgstr ""
-"    Bad %%%%Pages: on line %d!\n"
-"        REF: Page 43, %%%%Pages:\n"
-
-#, c-format
-msgid ""
-"    Bad %%%%BoundingBox: on line %d!\n"
-"        REF: Page 39, %%%%BoundingBox:\n"
-msgstr ""
-"    Bad %%%%BoundingBox: on line %d!\n"
-"        REF: Page 39, %%%%BoundingBox:\n"
-
-#, c-format
-msgid ""
-"    Bad %%%%Page: on line %d!\n"
-"        REF: Page 53, %%%%Page:\n"
-msgstr ""
-"    Bad %%%%Page: on line %d!\n"
-"        REF: Page 53, %%%%Page:\n"
-
-#, c-format
-msgid ""
-"    Missing or bad %%BoundingBox: comment!\n"
-"        REF: Page 39, %%BoundingBox:\n"
-msgstr ""
-"    Missing or bad %%BoundingBox: comment!\n"
-"        REF: Page 39, %%BoundingBox:\n"
-
-#, c-format
-msgid ""
-"    Missing or bad %%Pages: comment!\n"
-"        REF: Page 43, %%Pages:\n"
-msgstr ""
-"    Missing or bad %%Pages: comment!\n"
-"        REF: Page 43, %%Pages:\n"
-
-#, c-format
-msgid ""
-"    Missing %%EndComments comment!\n"
-"        REF: Page 41, %%EndComments\n"
-msgstr ""
-"    Missing %%EndComments comment!\n"
-"        REF: Page 41, %%EndComments\n"
-
-#, c-format
-msgid ""
-"    Missing or bad %%Page: comments!\n"
-"        REF: Page 53, %%Page:\n"
-msgstr ""
-"    Missing or bad %%Page: comments!\n"
-"        REF: Page 53, %%Page:\n"
-
-#, c-format
-msgid "    Too many %%EndDocument comments!\n"
-msgstr "    Too many %%EndDocument comments!\n"
-
-#, c-format
-msgid "    Too many %%BeginDocument comments!\n"
-msgstr "    Too many %%BeginDocument comments!\n"
-
-#, c-format
-msgid "    Saw %d lines that exceeded 255 characters!\n"
-msgstr "    Saw %d lines that exceeded 255 characters!\n"
-
-msgid "PASS\n"
-msgstr "OK"
-
-msgid "    Warning: file contains binary data!\n"
-msgstr "    Warning: file contains binary data!\n"
-
-#, c-format
-msgid "    Warning: obsolete DSC version %.1f in file!\n"
-msgstr "    Warning: obsolete DSC version %.1f in file!\n"
-
-#, c-format
-msgid "    Warning: no %%EndComments comment in file!\n"
-msgstr "    Warning: no %%EndComments comment in file!\n"
-
-msgid ""
-"Usage: cupstestdsc [options] filename.ps [... filename.ps]\n"
-"       cupstestdsc [options] -\n"
-"\n"
-"Options:\n"
-"\n"
-"    -h       Show program usage\n"
-"\n"
-"    Note: this program only validates the DSC comments, not the PostScript itself.\n"
-msgstr ""
-"Usage: cupstestdsc [options] filename.ps [... filename.ps]\n"
-"       cupstestdsc [options] -\n"
-"\n"
-"Options:\n"
-"\n"
-"    -h       Show program usage\n"
-"\n"
-"    Note: this program only validates the DSC comments, not the PostScript itself.\n"
-
-
-#, c-format
-msgid "Password for %s on %s? "
-msgstr "Mot de passe pour %s sur %s? "
-
-msgid ""
-"      **FAIL**  1284DeviceId must be 1284DeviceID!\n"
-"                REF: Page 72, section 5.5\n"
-msgstr ""
-"      **FAIL**  1284DeviceId must be 1284DeviceID!\n"
-"                REF: Page 72, section 5.5\n"
-
-
 #
 # End of "$Id$".
 #
index 60d920327b819b7925aeb6147484cfbfa851a955..f4bafde80477f2cabcf13a714f3a57120c37b5f6 100644 (file)
@@ -22,7 +22,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: cups_it\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2007-01-23 09:19-0500\n"
+"POT-Creation-Date: 2007-01-23 09:44-0500\n"
 "PO-Revision-Date: 2006-11-16 00:34+0100\n"
 "Last-Translator: Vincenzo Reale <smart2128@baslug.org>\n"
 "Language-Team: Italian <kde-i18n-it@mail.kde.org>\n"
@@ -2972,6 +2972,15 @@ msgstr "Impossibile configurare il driver di stampa di Windows (%d)!\n"
 msgid "Unable to run \"%s\": %s\n"
 msgstr "cupsaddsmb: Impossibile eseguire \"%s\": %s\n"
 
+#, fuzzy
+msgid ""
+"Enter your username and password or the root username and password to access "
+"this page. If you are using Kerberos authentication, make sure you have a "
+"valid Kerberos ticket."
+msgstr ""
+"Inserisci il tuo nome utente e la tua password o il nome utente e la "
+"password di root per accedere a questa pagina."
+
 #, fuzzy, c-format
 msgid "Job #%d is already canceled - can't cancel."
 msgstr "L'operazione #%d è già annullata - impossibile annullare."
@@ -2996,6 +3005,10 @@ msgstr ""
 "      **FAIL**  1284DeviceId deve essere 1284DeviceID!\n"
 "                RIF: Pagina 72, sezione 5.5\n"
 
+#, fuzzy, c-format
+msgid "    %d ERRORS FOUND\n"
+msgstr "    %d ERROR%s TROVATI\n"
+
 #, fuzzy, c-format
 msgid "lpoptions: Unable to get PPD file for %s: %s\n"
 msgstr "lpoptions: Impossibile aprire il file PPD per %s!\n"
index 7ee8c6b2f70e3921673b40790ac614fa3f1b2b6d..dd3ad603c31bdec02356881465639cc109f5f048 100644 (file)
@@ -25,7 +25,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: CUPS 1.2\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2007-01-23 09:19-0500\n"
+"POT-Creation-Date: 2007-01-23 09:44-0500\n"
 "PO-Revision-Date: 2006-05-09 17:20+0200\n"
 "Last-Translator: Piotr Drąg <raven@pmail.pl>\n"
 "Language-Team: Polish <pl@li.org>\n"
@@ -2972,6 +2972,15 @@ msgstr "Nie można ustawić sterownika drukarki Windows (%d)!\n"
 msgid "Unable to run \"%s\": %s\n"
 msgstr "cupsaddsmb: nie można uruchomić \"%s\": %s\n"
 
+#, fuzzy
+msgid ""
+"Enter your username and password or the root username and password to access "
+"this page. If you are using Kerberos authentication, make sure you have a "
+"valid Kerberos ticket."
+msgstr ""
+"Podaj swoją nazwę użytkownika i hasło lub nazwę użytkownika root i hasło, "
+"aby uzyskać dostęp do tej strony."
+
 #, fuzzy, c-format
 msgid "Job #%d is already canceled - can't cancel."
 msgstr "Zadanie #%d zostało już anulowane - nie można anulować."
@@ -2996,6 +3005,10 @@ msgstr ""
 "      **ZAWIÓDŁ**  Błędny %s wybór %s!\n"
 "                REF: strona 122, sekcja 5.17\n"
 
+#, fuzzy, c-format
+msgid "    %d ERRORS FOUND\n"
+msgstr "    ZNALEZIONO %d BŁĘDÓW%s\n"
+
 #, fuzzy, c-format
 msgid "lpoptions: Unable to get PPD file for %s: %s\n"
 msgstr "lpoptions: nie można otworzyć pliku PPD dla %s!\n"
index 4e03b07c85e675d5f29950cd166fee9f04258f2c..ce22e56e4fcc19309400d1cbd73fc8826ffdea62 100644 (file)
 # Daniel Nylander <po@danielnylander.se>, 2006, 2007.
 msgid ""
 msgstr ""
-"Project-Id-Version: CUPS 1.2\n"
+"Project-Id-Version: CUPS 1.3\n"
 "Report-Msgid-Bugs-To: http://www.cups.org/str.php\n"
-"POT-Creation-Date: 2007-01-23 09:19-0500\n"
-"PO-Revision-Date: 2007-01-23 16:23+0100\n"
+"POT-Creation-Date: 2007-01-23 09:44-0500\n"
+"PO-Revision-Date: 2007-01-23 16:31+0100\n"
 "Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
 "MIME-Version: 1.0\n"
@@ -2828,7 +2828,7 @@ msgstr "Saknar värde på rad %d!"
 
 #, c-format
 msgid "Missing double quote on line %d!"
-msgstr "Saknar citationstecken på rad %d!\n"
+msgstr "Saknar dubbla citationstecken på rad %d!"
 
 #, c-format
 msgid "Bad option + choice on line %d!"
@@ -2845,6 +2845,9 @@ msgstr "Kunde inte ställa in Windows-skrivardrivrutin (%d)!"
 msgid "Unable to run \"%s\": %s\n"
 msgstr "Kunde inte köra \"%s\": %s\n"
 
+msgid "Enter your username and password or the root username and password to access this page. If you are using Kerberos authentication, make sure you have a valid Kerberos ticket."
+msgstr "Ange ditt användarnamn och lösenord eller root-användarnamnet och lösenord för att komma åt denna sida. Om du använder Kerberos-autentisering, kontrollera att du har en giltig Kerberos-biljett."
+
 #, c-format
 msgid "Job #%d is already canceled - can't cancel."
 msgstr "Jobb #%d är redan avbrutet - kan inte avbryta."
@@ -2869,6 +2872,10 @@ msgstr ""
 "      **FEL**   %s måste vara 1284DeviceID!\n"
 "                REF: Sida 72, sektion 5.5\n"
 
+#, c-format
+msgid "    %d ERRORS FOUND\n"
+msgstr "    %d FEL HITTADES\n"
+
 #, c-format
 msgid "lpoptions: Unable to get PPD file for %s: %s\n"
 msgstr "lpoptions: Kunde inte hämta PPD-fil för %s: %s\n"
index 709e0ac7e5c1704c58f9fc10b48b6b98bb558278..f60d35d7e739f83c7f05e3a90efa69eefbcecf36 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5728 2006-07-12 20:45:13Z mike $"
+# "$Id: Makefile 5727 2006-07-12 20:44:30Z mike $"
 #
 #   Man page makefile for the Common UNIX Printing System (CUPS).
 #
@@ -184,5 +184,5 @@ mantohtml:  mantohtml.o
 
 
 #
-# End of "$Id: Makefile 5728 2006-07-12 20:45:13Z mike $".
+# End of "$Id: Makefile 5727 2006-07-12 20:44:30Z mike $".
 #
index 4df347aded5dae5d15a023e9a33ea1497a317770..6cd391120debdff1d988937a415d0fb07a855bc3 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: classes.conf.man 5970 2006-09-19 20:11:08Z mike $"
+.\" "$Id: classes.conf.man 5969 2006-09-19 20:09:24Z mike $"
 .\"
 .\"   classes.conf man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -123,5 +123,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: classes.conf.man 5970 2006-09-19 20:11:08Z mike $".
+.\" End of "$Id: classes.conf.man 5969 2006-09-19 20:09:24Z mike $".
 .\"
index 9fd43137dd543949c14fb78970949b39f237af0a..e1a1f08bb2f492064ddad3e4d129cd06b70e8fe0 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: cupsaddsmb.man.in 6049 2006-10-20 15:07:21Z mike $"
+.\" "$Id: cupsaddsmb.man.in 6047 2006-10-20 14:52:55Z mike $"
 .\"
 .\"   cupsaddsmb man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -215,5 +215,5 @@ http://www.cups.org/windows/
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cupsaddsmb.man.in 6049 2006-10-20 15:07:21Z mike $".
+.\" End of "$Id: cupsaddsmb.man.in 6047 2006-10-20 14:52:55Z mike $".
 .\"
index f17a4dcb3d060466bcdf28d8c3481b5abe296650..757f71a7cc37551bfe2e6b75ad38cd1af747e4ef 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: cupsd.conf.man.in 5638 2006-06-06 20:08:13Z mike $"
+.\" "$Id: cupsd.conf.man.in 5919 2006-08-31 04:20:45Z mike $"
 .\"
 .\"   cupsd.conf man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -83,8 +83,10 @@ AuthType Basic
 AuthType BasicDigest
 .TP 5
 AuthType Digest
+.TP 5
+AuthType Kerberos
 .br
-Specifies the authentication type (None, Basic, BasicDigest, Digest)
+Specifies the authentication type (None, Basic, BasicDigest, Digest, Kerberos)
 .TP 5
 AutoPurgeJobs Yes
 .TP 5
@@ -220,6 +222,8 @@ DefaultAuthType Basic
 DefaultAuthType BasicDigest
 .TP 5
 DefaultAuthType Digest
+.TP 5
+DefaultAuthType Kerberos
 .br
 Specifies the default type of authentication to use.
 .TP 5
@@ -350,6 +354,10 @@ KeepAliveTimeout seconds
 .br
 Specifies the amount of time that connections are kept alive.
 .TP 5
+Krb5Keytab filename
+.br
+Overrides the Kerberos key tab location.
+.TP 5
 <Limit operations> ... </Limit>
 .br
 Specifies the IPP operations that are being limited inside a policy.
@@ -609,5 +617,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: cupsd.conf.man.in 5638 2006-06-06 20:08:13Z mike $".
+.\" End of "$Id: cupsd.conf.man.in 5919 2006-08-31 04:20:45Z mike $".
 .\"
index 82677fcb684a13e3d7422824ad0324157ac9c0e7..d4e18c485b0a0439d1e7ca3b63c1050fc45ad3b1 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: lpadmin.man 5970 2006-09-19 20:11:08Z mike $"
+.\" "$Id: lpadmin.man 5969 2006-09-19 20:09:24Z mike $"
 .\"
 .\"   lpadmin man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -205,5 +205,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: lpadmin.man 5970 2006-09-19 20:11:08Z mike $".
+.\" End of "$Id: lpadmin.man 5969 2006-09-19 20:09:24Z mike $".
 .\"
index 0a0469247385ac73739319a3b04683f088db0491..7e1f12d2747551e082a2da9e99593ddcaeb31ca7 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$Id: printers.conf.man 5970 2006-09-19 20:11:08Z mike $"
+.\" "$Id: printers.conf.man 5969 2006-09-19 20:09:24Z mike $"
 .\"
 .\"   printers.conf man page for the Common UNIX Printing System (CUPS).
 .\"
@@ -127,5 +127,5 @@ http://localhost:631/help
 .SH COPYRIGHT
 Copyright 1997-2006 by Easy Software Products, All Rights Reserved.
 .\"
-.\" End of "$Id: printers.conf.man 5970 2006-09-19 20:11:08Z mike $".
+.\" End of "$Id: printers.conf.man 5969 2006-09-19 20:09:24Z mike $".
 .\"
index 52599cfa1443629c235903823aa5de261575bd73..251caa2e7f9cd29d7a920e5f5c80370f594fc5dc 100644 (file)
@@ -1,8 +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
+bcp.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+bcp.o: ../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
+tbcp.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+tbcp.o: ../cups/language.h
index 4ee88b7767d96046e7b15bb4b853859d87205150..fb1754ab4f3ea8875d0da16cc0d3bca302901b79 100644 (file)
@@ -1,8 +1,8 @@
 # DO NOT DELETE
 
-mailto.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-mailto.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-mailto.o: ../cups/i18n.h ../cups/transcode.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/array.h ../cups/file.h ../cups/language.h
+mailto.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+mailto.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/i18n.h
+mailto.o: ../cups/transcode.h ../cups/string.h ../config.h
+testnotify.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+testnotify.o: ../cups/array.h ../cups/file.h ../cups/language.h
 testnotify.o: ../cups/language.h ../cups/string.h ../config.h
index ecfd7a51f4ca50185156517bcf78e932d9f31e7c..f2b221605f8d1537c5e929715011c8e90d7c4a86 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $"
+# "$Id: Makefile 6304 2007-02-22 22:06:23Z mike $"
 #
 #   Notifier makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2007 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
@@ -25,8 +25,8 @@
 include ../Makedefs
 
 
-TARGETS =      mailto testnotify
-OBJS   =       mailto.o testnotify.o
+TARGETS =      mailto rss testnotify
+OBJS   =       mailto.o rss.o testnotify.o
 
 
 #
@@ -53,6 +53,8 @@ install:      all
        for file in $(TARGETS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/notifier; \
        done
+       $(INSTALL_DIR) -m 755 $(CACHEDIR)/rss
+       -chgrp $(CUPS_GROUP) $(CACHEDIR)/rss
 
 
 #
@@ -65,6 +67,7 @@ uninstall:
        done
        -$(RMDIR) $(SERVERBIN)/notifier
        -$(RMDIR) $(SERVERBIN)
+       -$(RMDIR) $(CACHEDIR)/rss
 
 
 #
@@ -84,6 +87,15 @@ mailto:      mailto.o ../cups/$(LIBCUPS)
        $(CC) $(LDFLAGS) -o mailto mailto.o $(LIBS)
 
 
+#
+# rss
+#
+
+rss:   rss.o ../cups/$(LIBCUPS)
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o rss rss.o $(LIBS)
+
+
 #
 # testnotify
 #
@@ -99,5 +111,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $".
+# End of "$Id: Makefile 6304 2007-02-22 22:06:23Z mike $".
 #
diff --git a/notifier/rss.c b/notifier/rss.c
new file mode 100644 (file)
index 0000000..e9abfa3
--- /dev/null
@@ -0,0 +1,705 @@
+/*
+ * "$Id: rss.c 6326 2007-03-11 17:50:18Z mike $"
+ *
+ *   RSS notifier for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2007 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()           - Main entry for the test notifier.
+ *   compare_rss()    - Compare two messages.
+ *   delete_message() - Free all memory used by a message.
+ *   load_rss()       - Load an existing RSS feed file.
+ *   new_message()    - Create a new RSS message.
+ *   password_cb()    - Return the cached password.
+ *   save_rss()       - Save messages to a RSS file.
+ *   xml_escape()     - Copy a string, escaping &, <, and > as needed.
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include <cups/cups.h>
+#include <cups/language.h>
+#include <cups/string.h>
+#include <cups/array.h>
+#include <errno.h>
+
+
+/*
+ * Structures...
+ */
+
+typedef struct _cups_rss_s             /**** RSS message data ****/
+{
+  int          sequence_number;        /* notify-sequence-number */
+  char         *subject,               /* Message subject/summary */
+               *text,                  /* Message text */
+               *link_url;              /* Link to printer */
+  time_t       event_time;             /* When the event occurred */
+} _cups_rss_t;
+
+
+/*
+ * Local globals...
+ */
+
+static char            *rss_password;  /* Password for remote RSS */
+
+
+/*
+ * Local functions...
+ */
+
+static int             compare_rss(_cups_rss_t *a, _cups_rss_t *b);
+static void            delete_message(_cups_rss_t *rss);
+static void            load_rss(cups_array_t *rss, const char *filename);
+static _cups_rss_t     *new_message(int sequence_number, char *subject,
+                                    char *text, char *link_url,
+                                    time_t event_time);
+static const char      *password_cb(const char *prompt);
+static int             save_rss(cups_array_t *rss, const char *filename,
+                                const char *baseurl);
+static char            *xml_escape(const char *s);
+
+
+/*
+ * 'main()' - Main entry for the test notifier.
+ */
+
+int                                    /* O - Exit status */
+main(int  argc,                                /* I - Number of command-line arguments */
+     char *argv[])                     /* I - Command-line arguments */
+{
+  int          i;                      /* Looping var */
+  ipp_t                *event;                 /* Event from scheduler */
+  ipp_state_t  state;                  /* IPP event state */
+  char         scheme[32],             /* URI scheme ("rss") */
+               username[256],          /* Username for remote RSS */
+               host[1024],             /* Hostname for remote RSS */
+               resource[1024],         /* RSS file */
+               *options;               /* Options */
+  int          port,                   /* Port number for remote RSS */
+               max_events;             /* Maximum number of events */
+  http_t       *http;                  /* Connection to remote server */
+  http_status_t        status;                 /* HTTP GET/PUT status code */
+  char         filename[1024],         /* Local filename */
+               newname[1024];          /* filename.N */
+  cups_lang_t  *language;              /* Language information */
+  ipp_attribute_t *printer_up_time,    /* Timestamp on event */
+               *notify_sequence_number,/* Sequence number */
+               *notify_printer_uri;    /* Printer URI */
+  char         *subject,               /* Subject for notification message */
+               *text,                  /* Text for notification message */
+               link_url[1024],         /* Link to printer */
+               link_scheme[32],        /* Scheme for link */
+               link_username[256],     /* Username for link */
+               link_host[1024],        /* Host for link */
+               link_resource[1024];    /* Resource for link */
+  int          link_port;              /* Link port */
+  cups_array_t *rss;                   /* RSS message array */
+  _cups_rss_t  *msg;                   /* RSS message */
+  char         baseurl[1024];          /* Base URL */
+
+
+  fprintf(stderr, "DEBUG: argc=%d\n", argc);
+  for (i = 0; i < argc; i ++)
+    fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
+
+ /*
+  * See whether we are publishing this RSS feed locally or remotely...
+  */
+
+  if (httpSeparateURI(HTTP_URI_CODING_ALL, argv[1], scheme, sizeof(scheme),
+                      username, sizeof(username), host, sizeof(host), &port,
+                     resource, sizeof(resource)) < HTTP_URI_OK)
+  {
+    fprintf(stderr, "ERROR: Bad RSS URI \"%s\"!\n", argv[1]);
+    return (1);
+  }
+
+  max_events = 20;
+
+  if ((options = strchr(resource, '?')) != NULL)
+  {
+    *options++ = '\0';
+
+    if (!strncmp(options, "max_events=", 11))
+    {
+      max_events = atoi(options + 11);
+
+      if (max_events <= 0)
+        max_events = 20;
+    }
+  }
+
+  rss = cupsArrayNew((cups_array_func_t)compare_rss, NULL);
+
+  if (host[0])
+  {
+   /*
+    * Remote feed, see if we can get the current file...
+    */
+
+    int        fd;                             /* Temporary file */
+
+
+    if ((rss_password = strchr(username, ':')) != NULL)
+      *rss_password++ = '\0';
+
+    cupsSetPasswordCB(password_cb);
+    cupsSetUser(username);
+
+    if ((fd = cupsTempFd(filename, sizeof(filename))) < 0)
+    {
+      fprintf(stderr, "ERROR: Unable to create temporary file: %s\n",
+              strerror(errno));
+
+      return (1);
+    }
+
+    if ((http = httpConnect(host, port)) == NULL)
+    {
+      fprintf(stderr, "ERROR: Unable to connect to %s on port %d: %s\n",
+              host, port, strerror(errno));
+
+      close(fd);
+      unlink(filename);
+
+      return (1);
+    }
+
+    status = cupsGetFd(http, resource, fd);
+
+    close(fd);
+
+    if (status != HTTP_OK && status != HTTP_NOT_FOUND)
+    {
+      fprintf(stderr, "ERROR: Unable to GET %s from %s on port %d: %d %s\n",
+             resource, host, port, status, httpStatus(status));
+
+      httpClose(http);
+      unlink(filename);
+
+      return (1);
+    }
+
+    strlcpy(newname, filename, sizeof(newname));
+
+    httpAssembleURI(HTTP_URI_CODING_ALL, baseurl, sizeof(baseurl), "http",
+                    NULL, host, port, resource);
+  }
+  else
+  {
+    const char *cachedir,              /* CUPS_CACHEDIR */
+               *server_name,           /* SERVER_NAME */
+               *server_port;           /* SERVER_PORT */
+
+
+    http = NULL;
+
+    if ((cachedir = getenv("CUPS_CACHEDIR")) == NULL)
+      cachedir = CUPS_CACHEDIR;
+
+    if ((server_name = getenv("SERVER_NAME")) == NULL)
+      server_name = "localhost";
+
+    if ((server_port = getenv("SERVER_PORT")) == NULL)
+      server_port = "631";
+
+    snprintf(filename, sizeof(filename), "%s/rss%s", cachedir, resource);
+    snprintf(newname, sizeof(newname), "%s.N", filename);
+
+    httpAssembleURIf(HTTP_URI_CODING_ALL, baseurl, sizeof(baseurl), "http",
+                     NULL, server_name, atoi(server_port), "/rss%s", resource);
+  }
+
+ /*
+  * Load the previous RSS file, if any...
+  */
+
+  load_rss(rss, filename);
+
+ /*
+  * Localize for the user's chosen language...
+  */
+
+  language = cupsLangDefault();
+
+ /*
+  * Read events and update the RSS file until we are out of events.
+  */
+
+  for (;;)
+  {
+   /*
+    * Read the next event...
+    */
+
+    event = ippNew();
+    while ((state = ippReadFile(0, event)) != IPP_DATA)
+    {
+      if (state <= IPP_IDLE)
+        break;
+    }
+
+    if (state == IPP_ERROR)
+      fputs("DEBUG: ippReadFile() returned IPP_ERROR!\n", stderr);
+
+    if (state <= IPP_IDLE)
+    {
+      ippDelete(event);
+
+      if (http)
+        unlink(filename);
+
+      httpClose(http);
+
+      return (0);
+    }
+
+   /*
+    * Collect the info from the event...
+    */
+
+    printer_up_time        = ippFindAttribute(event, "printer-up-time",
+                                              IPP_TAG_INTEGER);
+    notify_sequence_number = ippFindAttribute(event, "notify-sequence-number",
+                                             IPP_TAG_INTEGER);
+    notify_printer_uri     = ippFindAttribute(event, "notify-printer-uri",
+                                             IPP_TAG_URI);
+    subject                = cupsNotifySubject(language, event);
+    text                   = cupsNotifyText(language, event);
+
+    if (printer_up_time && notify_sequence_number && subject && text)
+    {
+     /*
+      * Create a new RSS message...
+      */
+
+      if (notify_printer_uri)
+      {
+        httpSeparateURI(HTTP_URI_CODING_ALL,
+                       notify_printer_uri->values[0].string.text,
+                       link_scheme, sizeof(link_scheme),
+                        link_username, sizeof(link_username),
+                       link_host, sizeof(link_host), &link_port,
+                       link_resource, sizeof(link_resource));
+        httpAssembleURI(HTTP_URI_CODING_ALL, link_url, sizeof(link_url),
+                       "http", link_username, link_host, link_port,
+                       link_resource);
+      }
+
+      msg = new_message(notify_sequence_number->values[0].integer,
+                        xml_escape(subject), xml_escape(text),
+                       notify_printer_uri ? xml_escape(link_url) : NULL,
+                       printer_up_time->values[0].integer);
+
+      if (!msg)
+      {
+        fprintf(stderr, "ERROR: Unable to create message: %s\n",
+               strerror(errno));
+
+        ippDelete(event);
+
+       if (http)
+          unlink(filename);
+
+        httpClose(http);
+
+       return (1);
+      }
+
+     /*
+      * Add it to the array...
+      */
+
+      cupsArrayAdd(rss, msg);
+
+     /*
+      * Trim the array as needed...
+      */
+
+      while (cupsArrayCount(rss) > max_events)
+      {
+        msg = cupsArrayFirst(rss);
+
+       cupsArrayRemove(rss, msg);
+
+       delete_message(msg);
+      }
+
+     /*
+      * Save the messages to the file again, uploading as needed...
+      */ 
+
+      if (save_rss(rss, newname, baseurl))
+      {
+       if (http)
+       {
+        /*
+          * Upload the RSS file...
+         */
+
+          if ((status = cupsPutFile(http, resource, filename)) != HTTP_CREATED)
+            fprintf(stderr, "ERROR: Unable to PUT %s from %s on port %d: %d %s\n",
+                   resource, host, port, status, httpStatus(status));
+       }
+       else
+       {
+        /*
+          * Move the new RSS file over top the old one...
+         */
+
+          if (rename(newname, filename))
+            fprintf(stderr, "ERROR: Unable to rename %s to %s: %s\n",
+                   newname, filename, strerror(errno));
+       }
+      }
+    }
+
+    if (subject)
+      free(subject);
+
+    if (text)
+      free(text);
+
+    ippDelete(event);
+  }
+}
+
+
+/*
+ * 'compare_rss()' - Compare two messages.
+ */
+
+static int                             /* O - Result of comparison */
+compare_rss(_cups_rss_t *a,            /* I - First message */
+            _cups_rss_t *b)            /* I - Second message */
+{
+  return (a->sequence_number - b->sequence_number);
+}
+
+
+/*
+ * 'delete_message()' - Free all memory used by a message.
+ */
+
+static void
+delete_message(_cups_rss_t *msg)       /* I - RSS message */
+{
+  if (msg->subject)
+    free(msg->subject);
+
+  if (msg->text)
+    free(msg->text);
+
+  if (msg->link_url)
+    free(msg->link_url);
+
+  free(msg);
+}
+
+
+/*
+ * 'load_rss()' - Load an existing RSS feed file.
+ */
+
+static void
+load_rss(cups_array_t *rss,            /* I - RSS messages */
+         const char   *filename)       /* I - File to load */
+{
+  FILE         *fp;                    /* File pointer */
+  char         line[4096],             /* Line from file */
+               *subject,               /* Subject */
+               *text,                  /* Text */
+               *link_url,              /* Link URL */
+               *start,                 /* Start of element */
+               *end;                   /* End of element */
+  time_t       event_time;             /* Event time */
+  int          sequence_number;        /* Sequence number */
+  int          in_item;                /* In an item */
+  _cups_rss_t  *msg;                   /* New message */
+
+
+  if ((fp = fopen(filename, "r")) == NULL)
+  {
+    if (errno != ENOENT)
+      fprintf(stderr, "ERROR: Unable to open %s: %s\n", filename,
+              strerror(errno));
+
+    return;
+  }
+
+  subject         = NULL;
+  text            = NULL;
+  link_url        = NULL;
+  event_time      = 0;
+  sequence_number = 0;
+  in_item         = 0;
+
+  while (fgets(line, sizeof(line), fp))
+  {
+    if (strstr(line, "<item>"))
+      in_item = 1;
+    else if (strstr(line, "</item>") && in_item)
+    {
+      if (subject && text)
+      {
+        msg = new_message(sequence_number, subject, text, link_url,
+                         event_time);
+
+        if (msg)
+         cupsArrayAdd(rss, msg);
+
+      }
+      else
+      {
+        if (subject)
+         free(subject);
+
+       if (text)
+         free(text);
+
+       if (link_url)
+         free(link_url);
+      }
+
+      subject         = NULL;
+      text            = NULL;
+      link_url        = NULL;
+      event_time      = 0;
+      sequence_number = 0;
+      in_item         = 0;
+    }
+    else if (!in_item)
+      continue;
+    else if ((start = strstr(line, "<title>")) != NULL)
+    {
+      start += 7;
+      if ((end = strstr(start, "</title>")) != NULL)
+      {
+        *end    = '\0';
+       subject = strdup(start);
+      }
+    }
+    else if ((start = strstr(line, "<description>")) != NULL)
+    {
+      start += 13;
+      if ((end = strstr(start, "</description>")) != NULL)
+      {
+        *end = '\0';
+       text = strdup(start);
+      }
+    }
+    else if ((start = strstr(line, "<link>")) != NULL)
+    {
+      start += 6;
+      if ((end = strstr(start, "</link>")) != NULL)
+      {
+        *end     = '\0';
+       link_url = strdup(start);
+      }
+    }
+    else if ((start = strstr(line, "<pubDate>")) != NULL)
+    {
+      start += 9;
+      if ((end = strstr(start, "</pubDate>")) != NULL)
+      {
+        *end       = '\0';
+       event_time = httpGetDateTime(start);
+      }
+    }
+    else if ((start = strstr(line, "<guid>")) != NULL)
+      sequence_number = atoi(start + 6);
+  }
+
+  fclose(fp);
+}
+
+
+/*
+ * 'new_message()' - Create a new RSS message.
+ */
+
+static _cups_rss_t *                   /* O - New message */
+new_message(int    sequence_number,    /* I - notify-sequence-number */
+            char   *subject,           /* I - Subject/summary */
+            char   *text,              /* I - Text */
+           char   *link_url,           /* I - Link to printer */
+           time_t event_time)          /* I - Date/time of event */
+{
+  _cups_rss_t  *msg;                   /* New message */
+
+
+  if ((msg = calloc(1, sizeof(_cups_rss_t))) == NULL)
+    return (NULL);
+
+  msg->sequence_number = sequence_number;
+  msg->subject         = subject;
+  msg->text            = text;
+  msg->link_url        = link_url;
+  msg->event_time      = event_time;
+
+  return (msg);
+}
+
+
+/*
+ * 'password_cb()' - Return the cached password.
+ */
+
+static const char *                    /* O - Cached password */
+password_cb(const char *prompt)                /* I - Prompt string, unused */
+{
+  (void)prompt;
+
+  return (rss_password);
+}
+
+
+/*
+ * 'save_rss()' - Save messages to a RSS file.
+ */
+
+static int                             /* O - 1 on success, 0 on failure */
+save_rss(cups_array_t *rss,            /* I - RSS messages */
+         const char   *filename,       /* I - File to save to */
+        const char   *baseurl)         /* I - Base URL */
+{
+  FILE         *fp;                    /* File pointer */
+  _cups_rss_t  *msg;                   /* Current message */
+  char         date[1024];             /* Current date */
+
+
+  if ((fp = fopen(filename, "w")) == NULL)
+  {
+    fprintf(stderr, "ERROR: Unable to create %s: %s\n", filename,
+            strerror(errno));
+    return (0);
+  }
+
+  fputs("<?xml version=\"1.0\"?>\n", fp);
+  fputs("<rss version=\"2.0\">\n", fp);
+  fputs("  <channel>\n", fp);
+  fputs("    <title>CUPS RSS Feed</title>\n", fp);
+  fprintf(fp, "    <link>%s</link>\n", baseurl);
+  fputs("    <description>CUPS RSS Feed</title>\n", fp);
+  fputs("    <generator>" CUPS_SVERSION "</generator>\n", fp);
+  fputs("    <ttl>1</ttl>\n", fp);
+
+  fprintf(fp, "    <pubDate>%s</pubDate>\n",
+          httpGetDateString2(time(NULL), date, sizeof(date)));
+
+  for (msg = (_cups_rss_t *)cupsArrayLast(rss);
+       msg;
+       msg = (_cups_rss_t *)cupsArrayPrev(rss))
+  {
+    fputs("    <item>\n", fp);
+    fprintf(fp, "      <title>%s</title>\n", msg->subject);
+    fprintf(fp, "      <description>%s</description>\n", msg->text);
+    if (msg->link_url)
+      fprintf(fp, "      <link>%s</link>\n", msg->link_url);
+    fprintf(fp, "      <pubDate>%s</pubDate>\n",
+            httpGetDateString2(msg->event_time, date, sizeof(date)));
+    fprintf(fp, "      <guid>%d</guid>\n", msg->sequence_number);
+    fputs("    </item>\n", fp);
+  }
+
+  fputs(" </channel>\n", fp);
+  fputs("</rss>\n", fp);
+
+  return (!fclose(fp));
+}
+
+
+/*
+ * 'xml_escape()' - Copy a string, escaping &, <, and > as needed.
+ */
+
+static char *                          /* O - Escaped string */
+xml_escape(const char *s)              /* I - String to escape */
+{
+  char         *e,                     /* Escaped string */
+               *eptr;                  /* Pointer into escaped string */
+  const char   *sptr;                  /* Pointer into string */
+  size_t       bytes;                  /* Bytes needed for string */
+
+
+ /*
+  * First figure out how many extra bytes we need...
+  */
+
+  for (bytes = 0, sptr = s; *sptr; sptr ++)
+    if (*sptr == '&')
+      bytes += 4;                      /* &amp; */
+    else if (*sptr == '<' || *sptr == '>')
+      bytes += 3;                      /* &lt; and &gt; */
+
+ /*
+  * If there is nothing to escape, just strdup() it...
+  */
+
+  if (bytes == 0)
+    return (strdup(s));
+
+ /*
+  * Otherwise allocate memory and copy...
+  */
+
+  if ((e = malloc(bytes + 1 + strlen(s))) == NULL)
+    return (NULL);
+
+  for (eptr = e, sptr = s; *sptr; sptr ++)
+    if (*sptr == '&')
+    {
+      *eptr++ = '&';
+      *eptr++ = 'a';
+      *eptr++ = 'm';
+      *eptr++ = 'p';
+      *eptr++ = ';';
+    }
+    else if (*sptr == '<')
+    {
+      *eptr++ = '&';
+      *eptr++ = 'l';
+      *eptr++ = 't';
+      *eptr++ = ';';
+    }
+    else if (*sptr == '>')
+    {
+      *eptr++ = '&';
+      *eptr++ = 'g';
+      *eptr++ = 't';
+      *eptr++ = ';';
+    }
+    else
+      *eptr++ = *sptr;
+
+  *eptr = '\0';
+
+  return (e);
+}
+
+
+/*
+ * End of "$Id: rss.c 6326 2007-03-11 17:50:18Z mike $".
+ */
index d0a502b20c51ee339081ad6d3dc44cf8109b0547..e9fec26c0cc6a2daae8a9e2a0c22829ffa0c761a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testnotify.c 5716 2006-07-11 17:56:57Z mike $"
+ * "$Id: testnotify.c 5715 2006-07-11 17:56:13Z mike $"
  *
  *   Test notifier for the Common UNIX Printing System (CUPS).
  *
@@ -289,5 +289,5 @@ print_attributes(ipp_t *ipp,                /* I - IPP request */
 
 
 /*
- * End of "$Id: testnotify.c 5716 2006-07-11 17:56:57Z mike $".
+ * End of "$Id: testnotify.c 5715 2006-07-11 17:56:13Z mike $".
  */
index 832780032b4146da019e1ada9565c36b775c35fd..a949db828f698416bd602c90951146e33551faf3 100644 (file)
@@ -10,7 +10,7 @@
 \f1\b WARNING\
 
 \f0\b0 \
-Because MacOS X packages cannot be uninstalled, you will need to reinstall MacOS X to revert to the original CUPS 1.1.x software.\
+This is pre-release software and should not be used in production environments. Because MacOS X packages cannot be uninstalled, you will need to reinstall MacOS X to revert to the original CUPS 1.1.x software.\
 \
 Please report all problems using the Bugs & Features page on the CUPS home page:\
 \
index 24f6235132296c42033de8e716eec64519ecdd72..48d2479dd4ae51da3b0b889d4980af0b7f26616a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: cups.list.in 6234 2007-02-05 20:25:50Z mike $"
+# "$Id: cups.list.in 6332 2007-03-12 16:08:51Z mike $"
 #
 #   ESP Package Manager (EPM) file list for the Common UNIX Printing
 #   System (CUPS).
@@ -353,6 +353,7 @@ d 0755 root sys $LOGDIR -
 d 0710 root $CUPS_GROUP $REQUESTS -
 d 1770 root $CUPS_GROUP $REQUESTS/tmp -
 d 0775 root $CUPS_GROUP $CACHEDIR -
+d 0775 root $CUPS_GROUP $CACHEDIR/rss -
 #d 0755 root $CUPS_GROUP $CACHEDIR/ppd -
 d 0755 root $CUPS_GROUP $STATEDIR -
 d 0511 root $CUPS_PRIMARY_SYSTEM_GROUP $STATEDIR/certs -
@@ -486,7 +487,6 @@ f 0644 root sys $INCLUDEDIR/cups/http.h cups/http.h
 f 0644 root sys $INCLUDEDIR/cups/image.h filter/image.h
 f 0644 root sys $INCLUDEDIR/cups/ipp.h cups/ipp.h
 f 0644 root sys $INCLUDEDIR/cups/language.h cups/language.h
-f 0644 root sys $INCLUDEDIR/cups/md5.h cups/md5.h
 f 0644 root sys $INCLUDEDIR/cups/ppd.h cups/ppd.h
 f 0644 root sys $INCLUDEDIR/cups/raster.h filter/raster.h
 f 0644 root sys $INCLUDEDIR/cups/transcode.h cups/transcode.h
@@ -635,7 +635,7 @@ EOF
 %subpackage
 
 %system !darwin
-i 0755 root sys cups init/cups.sh
+i 0755 root sys cups init/cups.sh start(@RCSTART@) stop(@RCSTOP) runlevels(@RCLEVELS@)
 %subpackage lpd
 %if XINETD
 f 0644 root sys $XINETD/cups-lpd init/cups-lpd
@@ -643,5 +643,5 @@ f 0644 root sys $XINETD/cups-lpd init/cups-lpd
 %subpackage
 
 #
-# End of "$Id: cups.list.in 6234 2007-02-05 20:25:50Z mike $".
+# End of "$Id: cups.list.in 6332 2007-03-12 16:08:51Z mike $".
 #
index 958bd7b10a8c39d94c244f319358735dcfe95ce6..c2f96483249d462afb6c6734ce538772b96d702a 100644 (file)
@@ -1,21 +1,86 @@
+README - CUPS v1.2.0b1 - 01/10/2006
+-----------------------------------
+
+*****************************************************************
+*****************************************************************
+****                                                         ****
+**** WARNING: THIS IS BETA RELEASE SOFTWARE AND MAY BE       ****
+****          TOTALLY UNSTABLE.  DO NOT USE IN ENVIRONMENTS  ****
+****          WHERE RELIABLE SOFTWARE IS REQUIRED!           ****
+****                                                         ****
+*****************************************************************
+*****************************************************************
+
+Looking for compile instructions?  Read the file "INSTALL.txt"
+instead...
+
+*****************************************************************
+*****************************************************************
+****                                                         ****
+**** IF YOU HAVE A NON-POSTSCRIPT PRINTER, YOU WILL ALSO     ****
+**** NEED TO INSTALL ESP GHOSTSCRIPT OR A PATCHED VERSION    ****
+**** OF A STANDARD GHOSTSCRIPT RELEASE.                      ****
+****                                                         ****
+*****************************************************************
+*****************************************************************
+
+
+INTRODUCTION
+
+CUPS provides a portable printing layer for UNIX(r)-based
+operating systems.  It has been developed by Easy Software
+Products to promote a standard printing solution for all UNIX
+vendors and users.  CUPS provides the System V and Berkeley
+command-line interfaces.
+
+CUPS uses the Internet Printing Protocol ("IPP") as the basis
+for managing print jobs and queues.  The Line Printer Daemon
+("LPD") Server Message Block ("SMB"), and AppSocket (a.k.a.
+JetDirect) protocols are also supported with reduced
+functionality.  CUPS adds network printer browsing and
+PostScript Printer Description ("PPD") based printing options to
+support real-world printing under UNIX.
+
+CUPS includes an image file RIP that supports printing of image
+files to non-PostScript printers.  A customized version of GNU
+Ghostscript for CUPS called ESP Ghostscript is available
+separately to support printing of PostScript files within the
+CUPS driver framework.  Sample drivers for Dymo, EPSON, HP, and
+OKIDATA printers are included that use these filters.
+
+Drivers for thousands of printers are provided with our ESP
+Print Pro software, available at:
+
+       http://www.easysw.com/printpro/
+
+CUPS is licensed under the GNU General Public License and GNU
+Library General Public License.  Please contact Easy Software
+Products for commercial support and "binary distribution"
+rights.
+
+
 SYSTEM REQUIREMENTS
 
 Binary distributions require a minimum of 10MB of free disk
 space. We do not recommend using CUPS on a workstation with less
 than 32MB of RAM or a PC with less than 16MB of RAM.
 
+If you are installing from source you'll need ANSI-compliant C
+and C++ compilers and optionally one or more image file support
+libraries.  Complete source installation instructions can be
+found in the file "INSTALL.txt".
+
 
 SOFTWARE REQUIREMENTS
 
 The following operating system software is required to install
 one of the binary distributions from Easy Software Products:
 
-    - AIX 5.2 or higher
+    - AIX 4.3 or higher
     - HP-UX 11.00 or higher
     - IRIX 6.5 or higher
-    - Linux 2.4 with glibc 2.3 or higher (LSB 3.1)
-    - MacOS X 10.4 or higher (PowerPC or Intel)
-    - Solaris 8 or higher (SPARC or Intel)
+    - Linux 2.4 with glibc 2.2 or higher
+    - Solaris 7 or higher (SPARC or Intel)
 
 
 INSTALLING "PORTABLE" CUPS DISTRIBUTIONS
@@ -25,7 +90,7 @@ distributions in TAR format with installation and removal
 scripts generated by our ESP Package Manager (EPM) software,
 which is available from:
 
-    http://www.easysw.com/epm/
+    http://www.easysw.com/epm
 
 WARNING: Installing CUPS will overwrite your existing printing
 system. Backup files are made by the installation script and
@@ -47,9 +112,10 @@ be installed and the scheduler will be started automatically.
 
 INSTALLING HOST-SPECIFIC (RPM, DEBIAN, ETC.) DISTRIBUTIONS
 
-The host-specific distributions use the operating system software
-installation tools.  To install a host-specific distribution
-please consult your operating system documentation.
+The host-specific distributions use the operating system
+software installation tools.  To install a host-specific
+distribution please consult the CUPS Software Administrators
+Manual or your operating system documentation.
 
 
 READING THE DOCUMENTATION
@@ -98,7 +164,93 @@ shown a menu of available functions.
 
 DO NOT use the hostname for your machine - it will not work with
 the default CUPS configuration.  To enable administration access
-on other addresses, consult the on-line help.
+on other addresses, consult the CUPS Software Administrators
+Manual.
+
+
+SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
+
+CUPS works best with PPD (PostScript Printer Description)
+files.  In a pinch you can also use System V style printer
+interface scripts.
+
+Six sample PPD files are provided with this distribution that
+utilize the PostScript and image file RIPs and the sample EPSON
+and HP printer drivers.  To add the sample DeskJet driver to the
+system for a printer connected to the parallel port, use one of
+the following commands:
+
+    HP-UX:
+
+        /usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/c2t0d0_lp -E
+
+    IRIX:
+
+        /usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/plp -E
+
+    Linux:
+
+        /usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/lp0 -E
+        /usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/lp1 -E
+        /usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/lp2 -E
+
+    Solaris:
+
+        /usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/bpp0 -E
+        /usr/lib/lpadmin -p DeskJet -m deskjet.ppd -v parallel:/dev/ecpp0 -E
+
+Similarly, for the other sample drivers you can use:
+
+    Driver                         PPD File
+    -----------------------------  ------------
+    Dymo Label Printers            dymo.ppd
+    EPSON Stylus Color Series      stcolor.ppd
+    EPSON Stylus Photo Series      stphoto.ppd
+    EPSON Stylus New Color Series  stcolor2.ppd
+    EPSON Stylus New Photo Series  stphoto2.ppd
+    EPSON 9-pin Series             epson9.ppd
+    EPSON 24-pin Series            epson24.ppd
+    HP DeskJet Series              deskjet.ppd
+    HP New DeskJet Series          deskjet2.ppd
+    HP LaserJet Series             laserjet.ppd
+    OKIDATA 9-Pin Series           okidata9.ppd
+    OKIDATA 24-Pin Series          okidat24.ppd
+
+These sample drivers provide basic printing capabilities, but
+generally do not exercise the full potential of the printers or
+CUPS.  For commercial printer drivers check out our ESP Print
+Pro software at:
+
+    http://www.easysw.com/printpro/
+
+
+PRINTING FILES
+
+CUPS provides both the System V "lp" and Berkeley "lpr" commands
+for printing:
+
+    lp filename
+    lpr filename
+
+Both the "lp" and "lpr" commands support printing options for
+the driver:
+
+    lp -omedia=A4 -oresolution=600dpi filename
+    lpr -omedia=A4 -oresolution=600dpi filename
+
+CUPS recognizes many types of images files as well as PDF,
+PostScript, HP-GL/2, and text files, so you can print those
+files directly rather than through an application.
+
+If you have an application that generates output specifically
+for your printer then you need to use the "-oraw" or "-l"
+options:
+
+    lp -oraw filename
+    lpr -l filename
+
+This will prevent the filters from misinterpreting your print
+file.
 
 
 LEGAL STUFF
index 0c00b8cd18e599abea36abcc9a6dd14ce32c9803..a63e725bdf3bca26c57ab14e43fc525d82ad0699 100644 (file)
@@ -1,11 +1,11 @@
 #
-# "$Id: cups.spec.in 6240 2007-02-06 16:09:05Z mike $"
+# "$Id: cups.spec.in 6300 2007-02-22 04:46:59Z mike $"
 #
 #   RPM "spec" file for the Common UNIX Printing System (CUPS).
 #
 #   Original version by Jason McMullan <jmcc@ontv.com>.
 #
-#   Copyright 1999-2006 by Easy Software Products, all rights reserved.
+#   Copyright 1999-2007 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
@@ -366,6 +366,7 @@ rm -rf $RPM_BUILD_ROOT
 /usr/share/man/man8/reject.8.gz
 
 %dir /var/cache/cups
+%attr(0775,root,sys) %dir /var/cache/cups/rss
 %dir /var/log/cups
 %dir /var/run/cups
 %attr(0711,lp,sys) %dir /var/run/cups/certs
@@ -497,5 +498,5 @@ rm -rf $RPM_BUILD_ROOT
 
 
 #
-# End of "$Id: cups.spec.in 6240 2007-02-06 16:09:05Z mike $".
+# End of "$Id: cups.spec.in 6300 2007-02-22 04:46:59Z mike $".
 #
index a36824a85a95ab1f02c88f2a966d30e236cc81c6..70b1e0acdd7e67ed2681faf5b808fe1b90028c6a 100644 (file)
@@ -3,8 +3,8 @@
 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 ../cups/language.h
+pdftops.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+pdftops.o: ../cups/array.h ../cups/file.h ../cups/language.h
 Annot.o: ../config.h gmem.h Object.h gtypes.h GString.h Array.h Dict.h
 Annot.o: Stream.h Catalog.h Gfx.h Lexer.h Annot.h
 Array.o: ../config.h gmem.h Object.h gtypes.h GString.h Array.h Dict.h
index b9459cfa9939c3dafdfe2fe8748b79ec9f481312..cb3b55e4c9aebd27fae0203ec1345680f946e7a5 100644 (file)
@@ -1,5 +1,5 @@
 //
-// "$Id: pdftops.cxx 4906 2006-01-10 20:53:28Z mike $"
+// "$Id: pdftops.cxx 6324 2007-03-11 02:09:46Z mike $"
 //
 //   PDF to PostScript filter front-end for the Common UNIX Printing
 //   System (CUPS).
@@ -279,9 +279,16 @@ main(int  argc,                            // I - Number of command-line args
 
   globalParams = new GlobalParams(buffer);
 
-  globalParams->setPSPaperWidth(width);
-  globalParams->setPSPaperHeight(length);
-  globalParams->setPSImageableArea(left, bottom, right, top);
+  if (fit || globalParams->getPSPaperWidth() > 0)
+  {
+    // Only set paper size and area if we are fitting to the job's
+    // page size or the pdftops.conf file does not contain
+    // "psPaperSize match"...
+    globalParams->setPSPaperWidth(width);
+    globalParams->setPSPaperHeight(length);
+    globalParams->setPSImageableArea(left, bottom, right, top);
+  }
+
   globalParams->setPSDuplex(duplex);
   globalParams->setPSExpandSmaller(fit);
   globalParams->setPSShrinkLarger(fit);
@@ -341,5 +348,5 @@ main(int  argc,                             // I - Number of command-line args
 
 
 //
-// End of "$Id: pdftops.cxx 4906 2006-01-10 20:53:28Z mike $".
+// End of "$Id: pdftops.cxx 6324 2007-03-11 02:09:46Z mike $".
 //
diff --git a/ppd/intelbar.ppd b/ppd/intelbar.ppd
new file mode 100644 (file)
index 0000000..cc2ea6d
--- /dev/null
@@ -0,0 +1,235 @@
+*PPD-Adobe: "4.3"
+*%
+*% "$Id$"
+*%
+*%   Sample IntelliBar label printer driver PPD file for the Common UNIX
+*%   Printing System (CUPS).
+*%
+*%   Copyright 2001-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
+*%
+*FormatVersion:        "4.3"
+*FileVersion:  "1.2"
+*LanguageVersion: English 
+*LanguageEncoding: ISOLatin1
+*PCFileName:   "INTELBAR.PPD"
+*Manufacturer: "Intellitech"
+*Product:      "(GNU Ghostscript)"
+*Product:      "(ESP Ghostscript)"
+*cupsVersion:  1.2
+*cupsManualCopies: False
+*cupsFilter:   "application/vnd.cups-raster 0 rastertolabel"
+*cupsModelNumber: 32
+*ModelName:     "Intellitech IntelliBar Series Label Printer"
+*ShortNickName: "Intellitech IntelliBar Series"
+*NickName:      "Intellitech IntelliBar Series Label Printer v1.2"
+*PSVersion:    "(3010.000) 81501"
+*LanguageLevel:        "3"
+*ColorDevice:  False
+*DefaultColorSpace: Gray
+*FileSystem:   False
+*Throughput:   "8"
+*LandscapeOrientation: Plus90
+*TTRasterizer: Type42
+
+*OpenUI *PageSize/Media Size: PickOne
+*OrderDependency: 10 AnySetup *PageSize
+*DefaultPageSize: w288h432
+*PageSize w288h432/Label - 4.00x6.00": "<</PageSize[288 432]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageSize
+
+*OpenUI *PageRegion: PickOne
+*OrderDependency: 10 AnySetup *PageRegion
+*DefaultPageRegion: w288h432
+*PageRegion w288h432/Label - 4.00x6.00": "<</PageSize[288 432]/ImagingBBox null>>setpagedevice"
+*CloseUI: *PageRegion
+
+*DefaultImageableArea: w288h432
+*ImageableArea w288h432/Label - 4.00x6.00": "0 5.76 288 426.24"
+
+*DefaultPaperDimension: w288h432
+*PaperDimension w288h432/Label - 4.00x6.00": "288 432"
+
+*MaxMediaWidth: "630"
+*MaxMediaHeight: "7128"
+*HWMargins: 0 5.76 0 5.76
+*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"
+*ParamCustomPageSize Width: 1 points 36 630
+*ParamCustomPageSize Height: 2 points 36 7128
+*ParamCustomPageSize WidthOffset: 3 points 0 0
+*ParamCustomPageSize HeightOffset: 4 points 0 0
+*ParamCustomPageSize Orientation: 5 int 0 0
+
+*OpenUI *Resolution/Output Resolution: PickOne
+*OrderDependency: 20 AnySetup *Resolution
+*DefaultResolution: 300dpi
+*Resolution 300dpi/300 DPI: "<</HWResolution[300 300]>>setpagedevice"
+*CloseUI: *Resolution
+
+*OpenGroup: PrinterSettings/Printer Settings
+*OpenUI *inPrintDensity/Print Density: PickOne
+*OrderDependency: 20 DocumentSetup *inPrintDensity
+*DefaultinPrintDensity: Default
+*inPrintDensity Default/PrinterDefault: "<<cupsCompression -1>>setpagedevice"
+*inPrintDensity -15: "<</cupsCompression 0>>setpagedevice"
+*inPrintDensity -14: "<</cupsCompression 3>>setpagedevice"
+*inPrintDensity -13: "<</cupsCompression 6>>setpagedevice"
+*inPrintDensity -12: "<</cupsCompression 10>>setpagedevice"
+*inPrintDensity -11: "<</cupsCompression 13>>setpagedevice"
+*inPrintDensity -10: "<</cupsCompression 16>>setpagedevice"
+*inPrintDensity -9: "<</cupsCompression 20>>setpagedevice"
+*inPrintDensity -8: "<</cupsCompression 23>>setpagedevice"
+*inPrintDensity -7: "<</cupsCompression 26>>setpagedevice"
+*inPrintDensity -6: "<</cupsCompression 30>>setpagedevice"
+*inPrintDensity -5: "<</cupsCompression 33>>setpagedevice"
+*inPrintDensity -4: "<</cupsCompression 36>>setpagedevice"
+*inPrintDensity -3: "<</cupsCompression 40>>setpagedevice"
+*inPrintDensity -2: "<</cupsCompression 43>>setpagedevice"
+*inPrintDensity -1: "<</cupsCompression 46>>setpagedevice"
+*inPrintDensity 0: "<</cupsCompression 50>>setpagedevice"
+*inPrintDensity 1: "<</cupsCompression 53>>setpagedevice"
+*inPrintDensity 2: "<</cupsCompression 56>>setpagedevice"
+*inPrintDensity 3: "<</cupsCompression 60>>setpagedevice"
+*inPrintDensity 4: "<</cupsCompression 63>>setpagedevice"
+*inPrintDensity 5: "<</cupsCompression 66>>setpagedevice"
+*inPrintDensity 6: "<</cupsCompression 70>>setpagedevice"
+*inPrintDensity 7: "<</cupsCompression 73>>setpagedevice"
+*inPrintDensity 8: "<</cupsCompression 76>>setpagedevice"
+*inPrintDensity 9: "<</cupsCompression 80>>setpagedevice"
+*inPrintDensity 10: "<</cupsCompression 83>>setpagedevice"
+*inPrintDensity 11: "<</cupsCompression 86>>setpagedevice"
+*inPrintDensity 12: "<</cupsCompression 90>>setpagedevice"
+*inPrintDensity 13: "<</cupsCompression 93>>setpagedevice"
+*inPrintDensity 14: "<</cupsCompression 96>>setpagedevice"
+*inPrintDensity 15: "<</cupsCompression 100>>setpagedevice"
+*CloseUI: *inPrintDensity
+
+*OpenUI *inPrintRate/Print Speed: PickOne
+*OrderDependency: 20 DocumentSetup *inPrintRate
+*DefaultinPrintRate: Default
+*inPrintRate Default/PrinterDefault: "<</cupsRowFeed 0>>setpagedevice"
+*inPrintRate 15/15 mm/sec.: "<</cupsRowFeed 15>>setpagedevice"
+*inPrintRate 20/20 mm/sec.: "<</cupsRowFeed 20>>setpagedevice"
+*inPrintRate 30/30 mm/sec.: "<</cupsRowFeed 30>>setpagedevice"
+*inPrintRate 40/40 mm/sec.: "<</cupsRowFeed 40>>setpagedevice"
+*inPrintRate 60/60 mm/sec.: "<</cupsRowFeed 60>>setpagedevice"
+*inPrintRate 80/80 mm/sec.: "<</cupsRowFeed 80>>setpagedevice"
+*inPrintRate 100/100 mm/sec.: "<</cupsRowFeed 100>>setpagedevice"
+*inPrintRate 120/120 mm/sec.: "<</cupsRowFeed 120>>setpagedevice"
+*inPrintRate 150/150 mm/sec.: "<</cupsRowFeed 150>>setpagedevice"
+*inPrintRate 200/200 mm/sec.: "<</cupsRowFeed 200>>setpagedevice"
+*inPrintRate 250/250 mm/sec.: "<</cupsRowFeed 250>>setpagedevice"
+*inPrintRate 300/300 mm/sec.: "<</cupsRowFeed 300>>setpagedevice"
+*CloseUI: *inPrintRate
+
+*OpenUI *inPrintMode/Print Mode: PickOne
+*OrderDependency: 20 DocumentSetup *inPrintMode
+*DefaultinPrintMode: Standard
+*inPrintMode Standard: ""
+*inPrintMode Tear: ""
+*inPrintMode Cut: ""
+*CloseUI: *inPrintMode
+
+*OpenUI *inTearInterval/Print and Tear: PickOne
+*OrderDependency: 20 DocumentSetup *inTearInterval
+*DefaultinTearInterval: None
+*inTearInterval None/Disabled: "<</cupsRowCount 0>>setpagedevice"
+*inTearInterval 1/Every Label: "<</cupsRowCount 1>>setpagedevice"
+*inTearInterval 2/Every 2 Labels: "<</cupsRowCount 2>>setpagedevice"
+*inTearInterval 3/Every 3 Labels: "<</cupsRowCount 3>>setpagedevice"
+*inTearInterval 4/Every 4 Labels: "<</cupsRowCount 4>>setpagedevice"
+*inTearInterval 5/Every 5 Labels: "<</cupsRowCount 5>>setpagedevice"
+*inTearInterval 6/Every 6 Labels: "<</cupsRowCount 6>>setpagedevice"
+*inTearInterval 7/Every 7 Labels: "<</cupsRowCount 7>>setpagedevice"
+*inTearInterval 8/Every 8 Labels: "<</cupsRowCount 8>>setpagedevice"
+*inTearInterval 9/Every 9 Labels: "<</cupsRowCount 9>>setpagedevice"
+*inTearInterval 10/Every 10 Labels: "<</cupsRowCount 10>>setpagedevice"
+*CloseUI: *inTearInterval
+
+*CustominTearInterval True: "<</cupsRowCount 2 1 roll>>setpagedevice"
+*ParamCustominTearInterval Interval: 1 int 1 99
+
+*OpenUI *inCutInterval/Print and Cut: PickOne
+*OrderDependency: 20 DocumentSetup *inCutInterval
+*DefaultinCutInterval: None
+*inCutInterval None/Disabled: "<</cupsRowStep 0>>setpagedevice"
+*inCutInterval 1/Every Label: "<</cupsRowStep 1>>setpagedevice"
+*inCutInterval 2/Every 2 Labels: "<</cupsRowStep 2>>setpagedevice"
+*inCutInterval 3/Every 3 Labels: "<</cupsRowStep 3>>setpagedevice"
+*inCutInterval 4/Every 4 Labels: "<</cupsRowStep 4>>setpagedevice"
+*inCutInterval 5/Every 5 Labels: "<</cupsRowStep 5>>setpagedevice"
+*inCutInterval 6/Every 6 Labels: "<</cupsRowStep 6>>setpagedevice"
+*inCutInterval 7/Every 7 Labels: "<</cupsRowStep 7>>setpagedevice"
+*inCutInterval 8/Every 8 Labels: "<</cupsRowStep 8>>setpagedevice"
+*inCutInterval 9/Every 9 Labels: "<</cupsRowStep 9>>setpagedevice"
+*inCutInterval 10/Every 10 Labels: "<</cupsRowStep 10>>setpagedevice"
+*CloseUI: *inCutInterval
+
+*CustominCutInterval True: "<</cupsRowStep 2 1 roll>>setpagedevice"
+*ParamCustominCutInterval Interval: 1 int 1 99
+*CloseGroup: *PrinterSettings
+
+*UIConstraints: *inCutInterval *inPrintMode Standard
+*UIConstraints: *inCutInterval *inPrintMode Tear
+*UIConstraints: *inPrintMode Standard *inCutInterval
+*UIConstraints: *inPrintMode Tear *inCutInterval
+
+*UIConstraints: *inTearInterval *inPrintMode Standard
+*UIConstraints: *inTearInterval *inPrintMode Cut
+*UIConstraints: *inPrintMode Standard *inTearInterval
+*UIConstraints: *inPrintMode Cut *inTearInterval
+
+*DefaultFont: Courier
+*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
+*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
+*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
+*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
+*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
+*Font Bookman-Light: Standard "(001.004S)" Standard ROM
+*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
+*Font Courier: Standard "(002.004S)" Standard ROM
+*Font Courier-Bold: Standard "(002.004S)" Standard ROM
+*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
+*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
+*Font Helvetica: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
+*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
+*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
+*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
+*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
+*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
+*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
+*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
+*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
+*Font Symbol: Special "(001.007S)" Special ROM
+*Font Times-Bold: Standard "(001.007S)" Standard ROM
+*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
+*Font Times-Italic: Standard "(001.007S)" Standard ROM
+*Font Times-Roman: Standard "(001.007S)" Standard ROM
+*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
+*Font ZapfDingbats: Special "(001.004S)" Standard ROM
+*%
+*% End of "$Id: zebra.ppd 5130 2006-02-17 20:25:33Z mike $".
+*%
index 536896cb4ec47558fe18b94bbbb30c63506a4e71..c478eda0f76e3e0a671ca6e238069107a70bb040 100644 (file)
@@ -1,6 +1,6 @@
 *PPD-Adobe: "4.3"
 *%
-*% "$Id: zebra.ppd 5511 2006-05-11 17:43:12Z mike $"
+*% "$Id: zebra.ppd 5510 2006-05-11 17:41:54Z mike $"
 *%
 *%   Sample Zebra label printer driver PPD file for the Common UNIX Printing
 *%   System (CUPS).
 *Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
 *Font ZapfDingbats: Special "(001.004S)" Standard ROM
 *%
-*% End of "$Id: zebra.ppd 5511 2006-05-11 17:43:12Z mike $".
+*% End of "$Id: zebra.ppd 5510 2006-05-11 17:41:54Z mike $".
 *%
index e90107a76868db4e6d528dd8e8a904ae9a3efe94..46199952fc2bbdef64b7d43385e9a549feae486d 100644 (file)
@@ -178,11 +178,11 @@ mime.o: ../cups/array.h ../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/array.h ../cups/file.h
+cups-deviced.o: ../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/array.h ../cups/file.h
+cups-driverd.o: ../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/transcode.h
 cups-lpd.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
@@ -193,20 +193,20 @@ cups-polld.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.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/array.h ../cups/file.h ../cups/language.h
+testdirsvc.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+testdirsvc.o: ../cups/array.h ../cups/file.h ../cups/language.h
 testdirsvc.o: ../cups/string.h ../config.h
-testlpd.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-testlpd.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testlpd.o: ../cups/string.h ../config.h
+testlpd.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+testlpd.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/string.h
+testlpd.o: ../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/array.h ../cups/file.h ../cups/language.h
+testspeed.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+testspeed.o: ../cups/array.h ../cups/file.h ../cups/language.h
 testspeed.o: ../cups/language.h ../cups/debug.h
-testsub.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.h
-testsub.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
-testsub.o: ../cups/debug.h ../cups/string.h ../config.h
-util.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/md5.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
+testsub.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+testsub.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
+testsub.o: ../cups/string.h ../config.h
+util.o: util.h ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
+util.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/file.h
+util.o: ../cups/string.h ../config.h
index 2eb297051559daa3e825549cb3a049ef88e5226f..c76690e0616800f94bc9207fb677e0f1885fb700 100644 (file)
@@ -1,9 +1,9 @@
 #
-# "$Id: Makefile 5940 2006-09-11 18:30:09Z mike $"
+# "$Id: Makefile 6291 2007-02-19 21:54:27Z mike $"
 #
 #   Scheduler Makefile for the Common UNIX Printing System (CUPS).
 #
-#   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+#   Copyright 1997-2007 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
@@ -43,6 +43,7 @@ CUPSDOBJS =   \
                printers.o \
                process.o \
                quotas.o \
+               select.o \
                server.o \
                statbuf.o \
                subscriptions.o \
@@ -188,14 +189,15 @@ cupsd:    $(CUPSDOBJS) libmime.a ../cups/$(LIBCUPS)
        echo Linking $@...
        $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) libmime.a \
                $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
-               $(LIBPAPER) $(LIBMALLOC) $(CUPSDLIBS) $(LIBS)
+               $(LIBPAPER) $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBS) \
+               $(LIBGSSAPI)
 
 cupsd-static:  $(CUPSDOBJS) libmime.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o cupsd-static $(CUPSDOBJS) libmime.a \
                $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
                ../cups/libcups.a $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
-               $(LIBMALLOC) $(CUPSDLIBS)
+               $(LIBMALLOC) $(CUPSDLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
 
 
 #
@@ -261,7 +263,7 @@ testdirsvc: testdirsvc.o
 testlpd:       testlpd.o ../cups/libcups.a cups-lpd
        echo Linking $@...
        $(CC) $(LDFLAGS) -o testlpd testlpd.o ../cups/libcups.a \
-               $(COMMONLIBS) $(LIBZ) $(SSLLIBS)
+               $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
 
 
 #
@@ -271,7 +273,7 @@ testlpd:    testlpd.o ../cups/libcups.a cups-lpd
 testmime:      testmime.o libmime.a ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o $@ testmime.o libmime.a ../cups/libcups.a \
-               $(COMMONLIBS) $(LIBZ) $(SSLLIBS)
+               $(COMMONLIBS) $(LIBZ) $(SSLLIBS) $(LIBGSSAPI)
 
 
 #
@@ -281,7 +283,7 @@ testmime:   testmime.o libmime.a ../cups/libcups.a
 testspeed:     testspeed.o ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o testspeed testspeed.o ../cups/libcups.a \
-               $(COMMONLIBS) $(LIBZ) $(SSLLIBS)
+               $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
 
 
 #
@@ -291,7 +293,7 @@ testspeed:  testspeed.o ../cups/libcups.a
 testsub:       testsub.o ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o testsub testsub.o ../cups/libcups.a \
-               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(SSLLIBS) $(COMMONLIBS) $(LIBZ) $(LIBGSSAPI)
 
 
 #
@@ -302,5 +304,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5940 2006-09-11 18:30:09Z mike $".
+# End of "$Id: Makefile 6291 2007-02-19 21:54:27Z mike $".
 #
index 41fd65f87215e94b30d842ef0e02d7ad883a29d4..8baf945113c32b05b5905ef2cd30b448607f7ffc 100644 (file)
@@ -1,9 +1,12 @@
 /*
- * "$Id: auth.c 5948 2006-09-12 13:58:39Z mike $"
+ * "$Id: auth.c 6314 2007-03-01 19:11:54Z mike $"
  *
  *   Authorization routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ *
+ *   This file contains Kerberos support code, copyright 2006 by
+ *   Jelmer Vernooij.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  *   compare_locations()       - Compare two locations.
  *   cups_crypt()              - Encrypt the password using the DES or MD5
  *                               algorithms, as needed.
+ *   get_gss_creds()           - Obtain GSS credentials.
  *   get_md5_password()        - Get an MD5 password.
  *   pam_func()                - PAM conversation function.
  *   to64()                    - Base64-encode an integer value...
+ *   check_authref()           - Check an authorization services reference.
  */
 
 /*
 #ifdef HAVE_MEMBERSHIP_H
 #  include <membership.h>
 #endif /* HAVE_MEMBERSHIP_H */
+#ifdef HAVE_AUTHORIZATION_H
+#  include <Security/AuthorizationTags.h>
+#  ifdef HAVE_SECBASEPRIV_H
+#    include <Security/SecBasePriv.h>
+#  else
+extern const char *cssmErrorString(int error);
+#  endif /* HAVE_SECBASEPRIV_H */
+#endif /* HAVE_AUTHORIZATION_H */
 
 
 /*
 
 static cupsd_authmask_t        *add_allow(cupsd_location_t *loc);
 static cupsd_authmask_t        *add_deny(cupsd_location_t *loc);
+#ifdef HAVE_AUTHORIZATION_H
+static int             check_authref(cupsd_client_t *con, const char *right);
+#endif /* HAVE_AUTHORIZATION_H */
 static int             compare_locations(cupsd_location_t *a,
                                          cupsd_location_t *b);
 #if !HAVE_LIBPAM && !defined(HAVE_USERSEC_H)
 static char            *cups_crypt(const char *pw, const char *salt);
 #endif /* !HAVE_LIBPAM && !HAVE_USERSEC_H */
+#ifdef HAVE_GSSAPI
+static gss_cred_id_t   get_gss_creds(const char *service_name);
+#endif /* HAVE_GSSAPI */
 static char            *get_md5_password(const char *username,
                                          const char *group, char passwd[33]);
 #if HAVE_LIBPAM
 static int             pam_func(int, const struct pam_message **,
                                 struct pam_response **, void *);
-#else
+#elif !defined(HAVE_USERSEC_H)
 static void            to64(char *s, unsigned long v, int n);
 #endif /* HAVE_LIBPAM */
 
@@ -309,8 +328,8 @@ void
 cupsdAuthorize(cupsd_client_t *con)    /* I - Client connection */
 {
   int          type;                   /* Authentication type */
-  char         *authorization,         /* Pointer into Authorization string */
-               *ptr,                   /* Pointer into string */
+  const char   *authorization;         /* Pointer into Authorization string */
+  char         *ptr,                   /* Pointer into string */
                username[65],           /* Username string */
                password[33];           /* Password string */
   const char   *localuser;             /* Certificate username */
@@ -356,7 +375,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
   * Decode the Authorization string...
   */
 
-  authorization = con->http.fields[HTTP_FIELD_AUTHORIZATION];
+  authorization = httpGetField(&con->http, HTTP_FIELD_AUTHORIZATION);
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdAuthorize: Authorization=\"%s\"",
                   authorization);
@@ -364,6 +383,14 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
   username[0] = '\0';
   password[0] = '\0';
 
+#ifdef HAVE_AUTHORIZATION_H
+  if (con->authref)
+  {
+    AuthorizationFree(con->authref, kAuthorizationFlagDefaults);
+    con->authref = NULL;
+  }
+#endif /* HAVE_AUTHORIZATION_H */
+
   if (type == AUTH_NONE)
   {
    /*
@@ -384,6 +411,59 @@ cupsdAuthorize(cupsd_client_t *con)        /* I - Client connection */
                     "cupsdAuthorize: No authentication data provided.");
     return;
   }
+#ifdef HAVE_AUTHORIZATION_H
+  else if (!strncmp(authorization, "AuthRef", 6) && 
+           !strcasecmp(con->http.hostname, "localhost"))
+  {
+    OSStatus           status;         /* Status */
+    int                        authlen;        /* Auth string length */
+    AuthorizationItemSet *authinfo;    /* Authorization item set */
+
+   /*
+    * Get the Authorization Services data...
+    */
+
+    authorization += 7;
+    while (isspace(*authorization & 255))
+      authorization ++;
+
+    authlen = sizeof(nonce);
+    httpDecode64_2(nonce, &authlen, authorization);
+
+    if (authlen != kAuthorizationExternalFormLength)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "cupsdAuthorize: External Authorization reference size"
+                     "is incorrect!");
+      return;
+    }
+
+    if ((status = AuthorizationCreateFromExternalForm(
+                     (AuthorizationExternalForm *)nonce, &con->authref)) != 0)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "cupsdAuthorize: AuthorizationCreateFromExternalForm "
+                     "returned %d (%s)",
+                     (int)status, cssmErrorString(status));
+      return;
+    }
+
+    if ((status = AuthorizationCopyInfo(con->authref, 
+                                       kAuthorizationEnvironmentUsername, 
+                                       &authinfo)) != 0)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "cupsdAuthorize: AuthorizationCopyInfo returned %d (%s)",
+                     (int)status, cssmErrorString(status));
+      return;
+    }
+  
+    if (authinfo->count == 1)
+      strlcpy(username, authinfo->items[0].value, sizeof(username));
+
+    AuthorizationFreeItemSet(authinfo);
+  }
+#endif /* HAVE_AUTHORIZATION_H */
   else if (!strncmp(authorization, "Local", 5) &&
            !strcasecmp(con->http.hostname, "localhost"))
   {
@@ -754,6 +834,118 @@ cupsdAuthorize(cupsd_client_t *con)       /* I - Client connection */
       return;
     }
   }
+#ifdef HAVE_GSSAPI
+  else if (!strncmp(authorization, "Negotiate", 9) && type == AUTH_KERBEROS) 
+  {
+    int                        len;            /* Length of authorization string */
+    gss_cred_id_t      server_creds;   /* Server credentials */
+    gss_ctx_id_t       context;        /* Authorization context */
+    OM_uint32          major_status,   /* Major status code */
+                       minor_status;   /* Minor status code */
+    gss_buffer_desc    input_token = GSS_C_EMPTY_BUFFER,
+                                       /* Input token from string */
+                       output_token = GSS_C_EMPTY_BUFFER;
+                                       /* Output token for username */
+    gss_name_t         client_name;    /* Client name */
+
+
+    con->gss_output_token.length = 0;
+
+   /*
+    * Find the start of the Kerberos input token...
+    */
+
+    authorization += 9;
+    while (isspace(*authorization & 255))
+      authorization ++;
+
+    if (!*authorization)
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                      "cupsdAuthorize: No authentication data specified.");
+      return;
+    }
+
+   /*
+    * Get the server credentials...
+    */
+
+    if ((server_creds = get_gss_creds(GSSServiceName)) == NULL)
+    {
+      con->no_negotiate = 1;
+      return;  
+    }
+
+   /*
+    * Decode the authorization string to get the input token...
+    */
+
+    len                = strlen(authorization);
+    input_token.value  = malloc(len);
+    input_token.value  = httpDecode64_2(input_token.value, &len,
+                                       authorization);
+    input_token.length = len;
+
+   /*
+    * Accept the input token to get the authorization info...
+    */
+
+    context      = GSS_C_NO_CONTEXT;
+    client_name  = GSS_C_NO_NAME;
+    major_status = gss_accept_sec_context(&minor_status,
+                                         &context,
+                                         server_creds, 
+                                         &input_token,
+                                         GSS_C_NO_CHANNEL_BINDINGS,
+                                         &client_name,
+                                         NULL,
+                                         &con->gss_output_token,
+                                         NULL,
+                                         NULL,
+                                         &con->gss_delegated_cred);
+
+    if (GSS_ERROR(major_status))
+    {
+      cupsdLogGSSMessage(CUPSD_LOG_DEBUG, major_status, minor_status,
+                         "cupsdAuthorize: Error accepting GSSAPI security "
+                        "context");
+
+      if (context != GSS_C_NO_CONTEXT)
+       gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
+
+      con->no_negotiate = 1;
+      return;
+    }
+
+   /*
+    * Get the username associated with the credentials...
+    */
+
+    if (major_status == GSS_S_COMPLETE)
+    {
+      major_status = gss_display_name(&minor_status, client_name, 
+                                     &output_token, NULL);
+
+      if (GSS_ERROR(major_status))
+      {
+       cupsdLogGSSMessage(CUPSD_LOG_DEBUG, major_status, minor_status,
+                           "cupsdAuthorize: Error getting username");
+       gss_release_name(&minor_status, &client_name);
+       gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
+       con->no_negotiate = 1;
+       return;
+      }
+
+      gss_release_name(&minor_status, &client_name);
+      strlcpy(username, output_token.value, sizeof(username));
+
+      gss_release_buffer(&minor_status, &output_token);
+      gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
+    }
+    else
+      gss_release_name(&minor_status, &client_name);
+  }
+#endif /* HAVE_GSSAPI */
   else
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG,
@@ -1493,7 +1685,8 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
                  "NONE",
                  "BASIC",
                  "DIGEST",
-                 "BASICDIGEST"
+                 "BASICDIGEST",
+                 "KERBEROS"
                };
 
 
@@ -1623,9 +1816,11 @@ 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 &&
       strcasecmp(con->http.hostname, "localhost") &&
-      best->satisfy == AUTH_SATISFY_ALL)
+      best->satisfy == AUTH_SATISFY_ALL) &&
+      !(best->type == AUTH_KERBEROS || 
+        (best->type == AUTH_NONE && DefaultAuthType == AUTH_KERBEROS)))
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "cupsdIsAuthorized: Need upgrade to TLS...");
@@ -1669,7 +1864,11 @@ cupsdIsAuthorized(cupsd_client_t *con,   /* I - Connection */
     cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdIsAuthorized: username=\"%s\"",
                    con->username);
 
+#ifdef HAVE_AUTHORIZATION_H
+    if (!con->username[0] && !con->authref)
+#else
     if (!con->username[0])
+#endif /* HAVE_AUTHORIZATION_H */
     {
       if (best->satisfy == AUTH_SATISFY_ALL || auth == AUTH_DENY)
        return (HTTP_UNAUTHORIZED);     /* Non-anonymous needs user/pass */
@@ -1692,8 +1891,13 @@ cupsdIsAuthorized(cupsd_client_t *con,   /* I - Connection */
   * Get the user info...
   */
 
-  pw = getpwnam(username);
-  endpwent();
+  if (username[0])
+  {
+    pw = getpwnam(username);
+    endpwent();
+  }
+  else
+    pw = NULL;
 
   if (best->level == AUTH_USER)
   {
@@ -1713,6 +1917,28 @@ cupsdIsAuthorized(cupsd_client_t *con,   /* I - Connection */
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "cupsdIsAuthorized: Checking user membership...");
 
+#ifdef HAVE_AUTHORIZATION_H
+   /*
+    * If an authorization reference was supplied it must match a right name...
+    */
+
+    if (con->authref)
+    {
+      for (i = 0; i < best->num_names; i ++)
+      {
+       if (!strncasecmp(best->names[i], "@AUTHKEY(", 9) && 
+           check_authref(con, best->names[i] + 9))
+         return (HTTP_OK);
+       else if (!strcasecmp(best->names[i], "@SYSTEM") &&
+                SystemGroupAuthKey &&
+                check_authref(con, SystemGroupAuthKey))
+         return (HTTP_OK);
+      }
+
+      return (HTTP_UNAUTHORIZED);
+    }
+#endif /* HAVE_AUTHORIZATION_H */
+
     for (i = 0; i < best->num_names; i ++)
     {
       if (!strcasecmp(best->names[i], "@OWNER") && owner &&
@@ -1858,6 +2084,59 @@ add_deny(cupsd_location_t *loc)          /* I - Location to add to */
 }
 
 
+#ifdef HAVE_AUTHORIZATION_H
+/*
+ * 'check_authref()' - Check if an authorization services reference has the
+ *                    supplied right.
+ */
+
+static int                             /* O - 1 if right is valid, 0 otherwise */
+check_authref(cupsd_client_t *con,     /* I - Connection */
+             const char     *right)    /* I - Right name */
+{
+  OSStatus             status;         /* OS Status */
+  AuthorizationItem    authright;      /* Authorization right */
+  AuthorizationRights  authrights;     /* Authorization rights */
+  AuthorizationFlags   authflags;      /* Authorization flags */
+
+
+ /*
+  * Check to see if the user is allowed to perform the task...
+  */
+
+  if (!con->authref)
+    return (0);
+
+  authright.name        = right;
+  authright.valueLength = 0;
+  authright.value       = NULL;
+  authright.flags       = 0;
+
+  authrights.count = 1;
+  authrights.items = &authright;
+
+  authflags = kAuthorizationFlagDefaults | 
+             kAuthorizationFlagExtendRights;
+
+  if ((status = AuthorizationCopyRights(con->authref, &authrights, 
+                                       kAuthorizationEmptyEnvironment, 
+                                       authflags, NULL)) != 0)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR,
+                   "AuthorizationCopyRights(\"%s\") returned %d (%s)",
+                   authright.name, (int)status, cssmErrorString(status));
+    return (0);
+  }
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "AuthorizationCopyRights(\"%s\") succeeded!",
+                 authright.name);
+
+  return (1);
+}
+#endif /* HAVE_AUTHORIZATION_H */
+
+
 /*
  * 'compare_locations()' - Compare two locations.
  */
@@ -1993,6 +2272,79 @@ cups_crypt(const char *pw,               /* I - Password string */
 #endif /* !HAVE_LIBPAM && !HAVE_USERSEC_H */
 
 
+#ifdef HAVE_GSSAPI
+/*
+ * 'get_gss_creds()' - Obtain GSS credentials.
+ */
+
+static gss_cred_id_t                   /* O - Server credentials */
+get_gss_creds(const char *service_name)        /* I - Service name */
+{
+  OM_uint32    major_status,           /* Major status code */
+               minor_status;           /* Minor status code */
+  gss_name_t   server_name;            /* Server name */
+  gss_cred_id_t        server_creds;           /* Server credentials */
+  gss_buffer_desc token = GSS_C_EMPTY_BUFFER;
+                                       /* Service name token */
+  char         buf[1024],              /* Service name buffer */
+               fqdn[HTTP_MAX_URI];     /* Hostname of server */
+
+
+  snprintf(buf, sizeof(buf), "%s@%s", service_name,
+          httpGetHostname(NULL, fqdn, sizeof(fqdn)));
+
+  token.value  = buf;
+  token.length = strlen(buf);
+  server_name  = GSS_C_NO_NAME;
+  major_status = gss_import_name(&minor_status, &token,
+                                GSS_C_NT_HOSTBASED_SERVICE,
+                                &server_name);
+
+  memset(&token, 0, sizeof(token));
+
+  if (GSS_ERROR(major_status))
+  {
+    cupsdLogGSSMessage(CUPSD_LOG_WARN, major_status, minor_status, 
+                      "gss_import_name() failed");
+    return (NULL);
+  }
+
+  major_status = gss_display_name(&minor_status, server_name, &token, NULL);
+
+  if (GSS_ERROR(major_status))
+  {
+    cupsdLogGSSMessage(CUPSD_LOG_WARN, major_status, minor_status,
+                       "gss_display_name() failed"); 
+    return (NULL);
+  }
+
+  cupsdLogMessage(CUPSD_LOG_INFO, "Attempting to acquire credentials for %s...", 
+                  (char *)token.value);
+
+  server_creds = GSS_C_NO_CREDENTIAL;
+  major_status = gss_acquire_cred(&minor_status, server_name, GSS_C_INDEFINITE,
+                                 GSS_C_NO_OID_SET, GSS_C_ACCEPT,
+                                 &server_creds, NULL, NULL);
+  if (GSS_ERROR(major_status))
+  {
+    cupsdLogGSSMessage(CUPSD_LOG_WARN, major_status, minor_status,
+                       "gss_acquire_cred() failed"); 
+    gss_release_name(&minor_status, &server_name);
+    gss_release_buffer(&minor_status, &token);
+    return (NULL);
+  }
+
+  cupsdLogMessage(CUPSD_LOG_INFO, "Credentials acquired successfully for %s.", 
+                  (char *)token.value);
+
+  gss_release_name(&minor_status, &server_name);
+  gss_release_buffer(&minor_status, &token);
+
+  return (server_creds);
+}
+#endif /* HAVE_GSSAPI */
+
+
 /*
  * 'get_md5_password()' - Get an MD5 password.
  */
@@ -2146,7 +2498,7 @@ pam_func(
 
   return (PAM_SUCCESS);
 }
-#else
+#elif !defined(HAVE_USERSEC_H)
 
 
 /*
@@ -2170,5 +2522,5 @@ to64(char          *s,                    /* O - Output string */
 
 
 /*
- * End of "$Id: auth.c 5948 2006-09-12 13:58:39Z mike $".
+ * End of "$Id: auth.c 6314 2007-03-01 19:11:54Z mike $".
  */
index 87bd72cd986e49cf104712b375fa6c512e525239..61c7ae993685d4293ca39ed6dc248111f05bd0d4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: auth.h 5305 2006-03-18 03:05:12Z mike $"
+ * "$Id: auth.h 5919 2006-08-31 04:20:45Z mike $"
  *
  *   Authorization definitions for the Common UNIX Printing System (CUPS)
  *   scheduler.
@@ -38,6 +38,7 @@
 #define AUTH_BASIC             1       /* Basic authentication */
 #define AUTH_DIGEST            2       /* Digest authentication */
 #define AUTH_BASICDIGEST       3       /* Basic authentication w/passwd.md5 */
+#define AUTH_KERBEROS          4       /* Kerberos authentication */
 
 #define AUTH_ANON              0       /* Anonymous access */
 #define AUTH_USER              1       /* Must have a valid username/password */
@@ -158,5 +159,5 @@ extern http_status_t        cupsdIsAuthorized(cupsd_client_t *con, const char *owner);
 
 
 /*
- * End of "$Id: auth.h 5305 2006-03-18 03:05:12Z mike $".
+ * End of "$Id: auth.h 5919 2006-08-31 04:20:45Z mike $".
  */
index f78a1077dd1eaa5bddb4212d91875064fd6298f2..31847ad2fd103acd3d06e5aecc54cbd1fad64c6a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: banners.c 5948 2006-09-12 13:58:39Z mike $"
+ * "$Id: banners.c 5947 2006-09-12 13:58:22Z mike $"
  *
  *   Banner routines for the Common UNIX Printing System (CUPS).
  *
@@ -215,5 +215,5 @@ free_banners(void)
 
 
 /*
- * End of "$Id: banners.c 5948 2006-09-12 13:58:39Z mike $".
+ * End of "$Id: banners.c 5947 2006-09-12 13:58:22Z mike $".
  */
index 749a1bda01bdefd08c21d1df86791b7ef3878bdb..63a818bfd5dabc11c48881ff1b6e7aaada954370 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: classes.c 5151 2006-02-22 22:43:17Z mike $"
+ * "$Id: classes.c 6318 2007-03-06 04:36:55Z mike $"
  *
  *   Printer class routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -366,7 +366,21 @@ cupsdLoadAllClasses(void)
       {
         cupsdLogMessage(CUPSD_LOG_DEBUG, "Loading class %s...", value);
 
-        p = cupsdAddClass(value);
+       /*
+        * Since prior classes may have implicitly defined this class,
+       * see if it already exists...
+       */
+
+        if ((p = cupsdFindDest(value)) != NULL)
+       {
+         p->type = CUPS_PRINTER_CLASS;
+         cupsdSetStringf(&p->uri, "ipp://%s:%d/classes/%s", ServerName,
+                         LocalPort, value);
+         cupsdSetString(&p->error_policy, "retry-job");
+       }
+       else
+          p = cupsdAddClass(value);
+
        p->accepting = 1;
        p->state     = IPP_PRINTER_IDLE;
 
@@ -400,6 +414,13 @@ cupsdLoadAllClasses(void)
                       "Syntax error on line %d of classes.conf.", linenum);
       return;
     }
+    else if (!strcasecmp(line, "AuthInfoRequired"))
+    {
+      if (!cupsdSetAuthInfoRequired(p, value, NULL))
+       cupsdLogMessage(CUPSD_LOG_ERROR,
+                       "Bad AuthInfoRequired on line %d of classes.conf.",
+                       linenum);
+    }
     else if (!strcasecmp(line, "Info"))
     {
       if (value)
@@ -703,6 +724,7 @@ cupsdSaveAllClasses(void)
   time_t               curtime;        /* Current time */
   struct tm            *curdate;       /* Current date */
   cups_option_t                *option;        /* Current option */
+  const char           *ptr;           /* Pointer into info/location */
 
 
  /*
@@ -776,11 +798,49 @@ cupsdSaveAllClasses(void)
     else
       cupsFilePrintf(fp, "<Class %s>\n", pclass->name);
 
+    if (pclass->num_auth_info_required > 0)
+    {
+      cupsFilePrintf(fp, "AuthInfoRequired %s", pclass->auth_info_required[0]);
+      for (i = 1; i < pclass->num_auth_info_required; i ++)
+        cupsFilePrintf(fp, ",%s", pclass->auth_info_required[i]);
+      cupsFilePutChar(fp, '\n');
+    }
+
     if (pclass->info)
-      cupsFilePrintf(fp, "Info %s\n", pclass->info);
+    {
+      if ((ptr = strchr(pclass->info, '#')) != NULL)
+      {
+       /*
+        * Need to quote the first # in the info string...
+       */
+
+        cupsFilePuts(fp, "Info ");
+       cupsFileWrite(fp, pclass->info, ptr - pclass->info);
+       cupsFilePutChar(fp, '\\');
+       cupsFilePuts(fp, ptr);
+       cupsFilePutChar(fp, '\n');
+      }
+      else
+        cupsFilePrintf(fp, "Info %s\n", pclass->info);
+    }
 
     if (pclass->location)
-      cupsFilePrintf(fp, "Location %s\n", pclass->location);
+    {
+      if ((ptr = strchr(pclass->info, '#')) != NULL)
+      {
+       /*
+        * Need to quote the first # in the location string...
+       */
+
+        cupsFilePuts(fp, "Location ");
+       cupsFileWrite(fp, pclass->location, ptr - pclass->location);
+       cupsFilePutChar(fp, '\\');
+       cupsFilePuts(fp, ptr);
+       cupsFilePutChar(fp, '\n');
+      }
+      else
+        cupsFilePrintf(fp, "Location %s\n", pclass->location);
+    }
 
     if (pclass->state == IPP_PRINTER_STOPPED)
     {
@@ -864,5 +924,5 @@ cupsdUpdateImplicitClasses(void)
 
 
 /*
- * End of "$Id: classes.c 5151 2006-02-22 22:43:17Z mike $".
+ * End of "$Id: classes.c 6318 2007-03-06 04:36:55Z mike $".
  */
index 44a76f49e9a9e614c42036121730691da7e0305b..9c0a17dc68191759b1e521f654192352769283b9 100644 (file)
@@ -1,9 +1,12 @@
 /*
- * "$Id: client.c 6247 2007-02-07 20:54:37Z mike $"
+ * "$Id: client.c 6329 2007-03-12 14:48:28Z mike $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ *
+ *   This file contains Kerberos support code, copyright 2006 by
+ *   Jelmer Vernooij.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -33,6 +36,7 @@
  *   cupsdSendHeader()       - Send an HTTP request.
  *   cupsdUpdateCGI()        - Read status messages from CGI scripts and programs.
  *   cupsdWriteClient()      - Write data to a client as needed.
+ *   cupsdWritePipe()        - Flag that data is available on the CGI pipe.
  *   check_if_modified()     - Decode an "If-Modified-Since" line.
  *   encrypt_client()        - Enable encryption for the client...
  *   get_cdsa_certificate()  - Convert a keychain name into the CFArrayRef
@@ -94,7 +98,7 @@ static int            encrypt_client(cupsd_client_t *con);
 #ifdef HAVE_CDSASSL
 static CFArrayRef      get_cdsa_certificate(cupsd_client_t *con);
 #endif /* HAVE_CDSASSL */
-static char            *get_file(cupsd_client_t *con, struct stat *filestats, 
+static char            *get_file(cupsd_client_t *con, struct stat *filestats,
                                  char *filename, int len);
 static http_status_t   install_conf_file(cupsd_client_t *con);
 static int             is_cgi(cupsd_client_t *con, const char *filename,
@@ -405,7 +409,7 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
   */
 
   val = 1;
-  setsockopt(con->http.fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)); 
+  setsockopt(con->http.fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
 
  /*
   * Close this file on all execs...
@@ -417,10 +421,7 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
   * Add the socket to the select() input mask.
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdAcceptClient: Adding fd %d to InputSet...",
-                  con->http.fd);
-  FD_SET(con->http.fd, InputSet);
+  cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient, NULL, con);
 
  /*
   * Temporarily suspend accept()'s until we lose a client...
@@ -587,13 +588,7 @@ cupsdCloseClient(cupsd_client_t *con)      /* I - Client to close */
 
   if (con->file >= 0)
   {
-    if (FD_ISSET(con->file, InputSet))
-    {
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdCloseClient: %d Removing fd %d from InputSet...",
-                     con->http.fd, con->file);
-      FD_CLR(con->file, InputSet);
-    }
+    cupsdRemoveSelect(con->file);
 
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "cupsdCloseClient: %d Closing data file %d.",
@@ -615,11 +610,8 @@ cupsdCloseClient(cupsd_client_t *con)      /* I - Client to close */
       * Only do a partial close so that the encrypted client gets everything.
       */
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdCloseClient: Removing fd %d from OutputSet...",
-                     con->http.fd);
       shutdown(con->http.fd, 0);
-      FD_CLR(con->http.fd, OutputSet);
+      cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient, NULL, con);
     }
     else
     {
@@ -627,12 +619,8 @@ cupsdCloseClient(cupsd_client_t *con)      /* I - Client to close */
       * Shut the socket down fully...
       */
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdCloseClient: Removing fd %d from InputSet and OutputSet...",
-                     con->http.fd);
+      cupsdRemoveSelect(con->http.fd);
       close(con->http.fd);
-      FD_CLR(con->http.fd, InputSet);
-      FD_CLR(con->http.fd, OutputSet);
       con->http.fd = -1;
     }
   }
@@ -671,6 +659,14 @@ cupsdCloseClient(cupsd_client_t *con)      /* I - Client to close */
       con->language = NULL;
     }
 
+#ifdef HAVE_AUTHORIZATION_H
+    if (con->authref)
+    {
+      AuthorizationFree(con->authref, kAuthorizationFlagDefaults);
+      con->authref = NULL;
+    }
+#endif /* HAVE_AUTHORIZATION_H */
+
    /*
     * Re-enable new client connections if we are going back under the
     * limit...
@@ -711,7 +707,7 @@ cupsdFlushHeader(cupsd_client_t *con)       /* I - Client to flush to */
  * 'cupsdReadClient()' - Read data from a client.
  */
 
-int                                    /* O - 1 on success, 0 on error */
+void
 cupsdReadClient(cupsd_client_t *con)   /* I - Client to read from */
 {
   char                 line[32768],    /* Line from client... */
@@ -740,7 +736,8 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
   if (con->http.error)
   {
     cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReadClient: http error seen...");
-    return (cupsdCloseClient(con));
+    cupsdCloseClient(con);
+    return;
   }
 
 #ifdef HAVE_SSL
@@ -764,9 +761,9 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
                       buf[0] & 255);
 
       if (!encrypt_client(con))
-        return (cupsdCloseClient(con));
+        cupsdCloseClient(con);
 
-      return (1);
+      return;
     }
   }
 #endif /* HAVE_SSL */
@@ -782,7 +779,8 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
        {
          cupsdLogMessage(CUPSD_LOG_DEBUG2,
                          "cupsdReadClient: httpGets returned EOF...");
-          return (cupsdCloseClient(con));
+         cupsdCloseClient(con);
+         return;
        }
 
        /*
@@ -846,7 +844,8 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
                              "Bad request line \"%s\" from %s!", line,
                              con->http.hostname);
              cupsdSendError(con, HTTP_BAD_REQUEST);
-             return (cupsdCloseClient(con));
+             cupsdCloseClient(con);
+             return;
          case 2 :
              con->http.version = HTTP_0_9;
              break;
@@ -857,7 +856,8 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
                                "Bad request line \"%s\" from %s!", line,
                                con->http.hostname);
                cupsdSendError(con, HTTP_BAD_REQUEST);
-               return (cupsdCloseClient(con));
+               cupsdCloseClient(con);
+               return;
              }
 
              if (major < 2)
@@ -871,7 +871,8 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
              else
              {
                cupsdSendError(con, HTTP_NOT_SUPPORTED);
-               return (cupsdCloseClient(con));
+               cupsdCloseClient(con);
+               return;
              }
              break;
        }
@@ -916,7 +917,8 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
            cupsdLogMessage(CUPSD_LOG_ERROR, "Bad URI \"%s\" in request!",
                            con->uri);
            cupsdSendError(con, HTTP_METHOD_NOT_ALLOWED);
-           return (cupsdCloseClient(con));
+           cupsdCloseClient(con);
+           return;
          }
 
          /*
@@ -949,7 +951,8 @@ cupsdReadClient(cupsd_client_t *con)        /* I - Client to read from */
        {
          cupsdLogMessage(CUPSD_LOG_ERROR, "Bad operation \"%s\"!", operation);
          cupsdSendError(con, HTTP_BAD_REQUEST);
-         return (cupsdCloseClient(con));
+         cupsdCloseClient(con);
+         return;
        }
 
         con->start     = time(NULL);
@@ -972,12 +975,16 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
         * Parse incoming parameters until the status changes...
        */
 
-        status = httpUpdate(HTTP(con));
+        while ((status = httpUpdate(HTTP(con))) == HTTP_CONTINUE)
+         if (con->http.used == 0 ||
+             !memchr(con->http.buffer, '\n', con->http.used))
+           break;
 
        if (status != HTTP_OK && status != HTTP_CONTINUE)
        {
          cupsdSendError(con, HTTP_BAD_REQUEST);
-         return (cupsdCloseClient(con));
+         cupsdCloseClient(con);
+         return;
        }
        break;
 
@@ -1044,7 +1051,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
       */
 
       if (!cupsdSendError(con, HTTP_BAD_REQUEST))
-       return (cupsdCloseClient(con));
+      {
+       cupsdCloseClient(con);
+       return;
+      }
     }
     else if (con->operation == HTTP_OPTIONS)
     {
@@ -1055,7 +1065,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
       if (con->best && con->best->type != AUTH_NONE)
       {
        if (!cupsdSendHeader(con, HTTP_UNAUTHORIZED, NULL))
-         return (cupsdCloseClient(con));
+       {
+         cupsdCloseClient(con);
+         return;
+       }
       }
 
       if (!strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") &&
@@ -1067,7 +1080,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
        */
 
        if (!cupsdSendHeader(con, HTTP_SWITCHING_PROTOCOLS, NULL))
-         return (cupsdCloseClient(con));
+       {
+         cupsdCloseClient(con);
+         return;
+       }
 
        httpPrintf(HTTP(con), "Connection: Upgrade\r\n");
        httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
@@ -1075,25 +1091,40 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
        httpPrintf(HTTP(con), "\r\n");
 
        if (cupsdFlushHeader(con) < 0)
-         return (cupsdCloseClient(con));
+        {
+         cupsdCloseClient(con);
+         return;
+       }
 
         if (!encrypt_client(con))
-         return (cupsdCloseClient(con));
+        {
+         cupsdCloseClient(con);
+         return;
+       }
 #else
        if (!cupsdSendError(con, HTTP_NOT_IMPLEMENTED))
-         return (cupsdCloseClient(con));
+       {
+         cupsdCloseClient(con);
+         return;
+       }
 #endif /* HAVE_SSL */
       }
 
       if (!cupsdSendHeader(con, HTTP_OK, NULL))
-       return (cupsdCloseClient(con));
+      {
+       cupsdCloseClient(con);
+       return;
+      }
 
       httpPrintf(HTTP(con), "Allow: GET, HEAD, OPTIONS, POST, PUT\r\n");
       httpPrintf(HTTP(con), "Content-Length: 0\r\n");
       httpPrintf(HTTP(con), "\r\n");
 
       if (cupsdFlushHeader(con) < 0)
-       return (cupsdCloseClient(con));
+      {
+       cupsdCloseClient(con);
+       return;
+      }
     }
     else if (!is_path_absolute(con->uri))
     {
@@ -1102,7 +1133,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
       */
 
       if (!cupsdSendError(con, HTTP_FORBIDDEN))
-       return (cupsdCloseClient(con));
+      {
+       cupsdCloseClient(con);
+       return;
+      }
     }
     else
     {
@@ -1115,7 +1149,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
        */
 
        if (!cupsdSendHeader(con, HTTP_SWITCHING_PROTOCOLS, NULL))
-         return (cupsdCloseClient(con));
+       {
+         cupsdCloseClient(con);
+         return;
+       }
 
        httpPrintf(HTTP(con), "Connection: Upgrade\r\n");
        httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
@@ -1123,13 +1160,22 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
        httpPrintf(HTTP(con), "\r\n");
 
        if (cupsdFlushHeader(con) < 0)
-         return (cupsdCloseClient(con));
+        {
+         cupsdCloseClient(con);
+         return;
+       }
 
         if (!encrypt_client(con))
-         return (cupsdCloseClient(con));
+        {
+         cupsdCloseClient(con);
+         return;
+       }
 #else
        if (!cupsdSendError(con, HTTP_NOT_IMPLEMENTED))
-         return (cupsdCloseClient(con));
+       {
+         cupsdCloseClient(con);
+         return;
+       }
 #endif /* HAVE_SSL */
       }
 
@@ -1139,7 +1185,8 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
                        "cupsdReadClient: Unauthorized request for %s...\n",
                        con->uri);
        cupsdSendError(con, status);
-       return (cupsdCloseClient(con));
+       cupsdCloseClient(con);
+       return;
       }
 
       if (con->http.expect &&
@@ -1152,7 +1199,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
          */
 
          if (!cupsdSendHeader(con, HTTP_CONTINUE, NULL))
-           return (cupsdCloseClient(con));
+         {
+           cupsdCloseClient(con);
+           return;
+         }
        }
        else
        {
@@ -1161,13 +1211,19 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
          */
 
          if (!cupsdSendHeader(con, HTTP_EXPECTATION_FAILED, NULL))
-           return (cupsdCloseClient(con));
+         {
+           cupsdCloseClient(con);
+           return;
+         }
 
          httpPrintf(HTTP(con), "Content-Length: 0\r\n");
          httpPrintf(HTTP(con), "\r\n");
 
          if (cupsdFlushHeader(con) < 0)
-           return (cupsdCloseClient(con));
+          {
+           cupsdCloseClient(con);
+           return;
+         }
        }
       }
 
@@ -1189,7 +1245,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              else
              {
                if (!cupsdSendError(con, HTTP_NOT_FOUND))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
 
                break;
              }
@@ -1258,7 +1317,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
               if (!cupsdSendCommand(con, con->command, con->options, 0))
              {
                if (!cupsdSendError(con, HTTP_NOT_FOUND))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
               }
              else
                cupsdLogRequest(con, HTTP_OK);
@@ -1279,7 +1341,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              */
 
              if (!cupsdSendError(con, HTTP_FORBIDDEN))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              break;
            }
@@ -1293,7 +1358,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
                                       sizeof(buf))) == NULL)
              {
                if (!cupsdSendError(con, HTTP_NOT_FOUND))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
 
                break;
              }
@@ -1310,7 +1378,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
                if (!cupsdSendCommand(con, con->command, con->options, 0))
                {
                  if (!cupsdSendError(con, HTTP_NOT_FOUND))
-                   return (cupsdCloseClient(con));
+                 {
+                   cupsdCloseClient(con);
+                   return;
+                 }
                }
                else
                  cupsdLogRequest(con, HTTP_OK);
@@ -1323,7 +1394,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              if (!check_if_modified(con, &filestats))
               {
                if (!cupsdSendError(con, HTTP_NOT_MODIFIED))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
              }
              else
               {
@@ -1333,7 +1407,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
                  snprintf(line, sizeof(line), "%s/%s", type->super, type->type);
 
                if (!write_file(con, HTTP_OK, filename, line, &filestats))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
              }
            }
             break;
@@ -1357,7 +1434,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              */
 
               if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              break;
             }
@@ -1368,7 +1448,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              */
 
               if (!cupsdSendError(con, HTTP_BAD_REQUEST))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              break;
            }
@@ -1460,7 +1543,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
                                       sizeof(buf))) == NULL)
              {
                if (!cupsdSendError(con, HTTP_NOT_FOUND))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
 
                break;
              }
@@ -1474,7 +1560,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
                */
 
                if (!cupsdSendError(con, HTTP_UNAUTHORIZED))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
              }
            }
            break;
@@ -1494,7 +1583,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              */
 
              if (!cupsdSendError(con, HTTP_FORBIDDEN))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              break;
            }
@@ -1517,7 +1609,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              */
 
               if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              break;
             }
@@ -1528,7 +1623,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              */
 
               if (!cupsdSendError(con, HTTP_BAD_REQUEST))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              break;
            }
@@ -1548,7 +1646,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
            if (con->file < 0)
            {
              if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
            }
 
            fchmod(con->file, 0640);
@@ -1559,7 +1660,8 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
        case HTTP_DELETE :
        case HTTP_TRACE :
             cupsdSendError(con, HTTP_NOT_IMPLEMENTED);
-           return (cupsdCloseClient(con));
+           cupsdCloseClient(con);
+           return;
 
        case HTTP_HEAD :
             if (!strncmp(con->uri, "/printers/", 10) &&
@@ -1577,7 +1679,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              else
              {
                if (!cupsdSendError(con, HTTP_NOT_FOUND))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
 
                break;
              }
@@ -1596,13 +1701,22 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
              */
 
               if (!cupsdSendHeader(con, HTTP_OK, "text/html"))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              if (httpPrintf(HTTP(con), "\r\n") < 0)
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              if (cupsdFlushHeader(con) < 0)
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
               cupsdLogRequest(con, HTTP_OK);
            }
@@ -1619,7 +1733,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              */
 
              if (!cupsdSendError(con, HTTP_FORBIDDEN))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              break;
            }
@@ -1627,14 +1744,20 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
                                          sizeof(buf))) == NULL)
            {
              if (!cupsdSendHeader(con, HTTP_NOT_FOUND, "text/html"))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
               cupsdLogRequest(con, HTTP_NOT_FOUND);
            }
            else if (!check_if_modified(con, &filestats))
             {
               if (!cupsdSendError(con, HTTP_NOT_MODIFIED))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
               cupsdLogRequest(con, HTTP_NOT_MODIFIED);
            }
@@ -1651,24 +1774,39 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
                snprintf(line, sizeof(line), "%s/%s", type->super, type->type);
 
               if (!cupsdSendHeader(con, HTTP_OK, line))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              if (httpPrintf(HTTP(con), "Last-Modified: %s\r\n",
                             httpGetDateString(filestats.st_mtime)) < 0)
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
              if (httpPrintf(HTTP(con), "Content-Length: %lu\r\n",
                             (unsigned long)filestats.st_size) < 0)
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
 
               cupsdLogRequest(con, HTTP_OK);
            }
 
             if (httpPrintf(HTTP(con), "\r\n") < 0)
-             return (cupsdCloseClient(con));
+           {
+             cupsdCloseClient(con);
+             return;
+           }
 
            if (cupsdFlushHeader(con) < 0)
-             return (cupsdCloseClient(con));
+            {
+             cupsdCloseClient(con);
+             return;
+           }
 
             con->http.state = HTTP_WAITING;
             break;
@@ -1694,35 +1832,45 @@ cupsdReadClient(cupsd_client_t *con)    /* I - Client to read from */
                            "CHUNKED" : "LENGTH",
                        CUPS_LLCAST con->http.data_remaining, con->file);
 
-        if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0)
-         return (cupsdCloseClient(con));
-       else if (bytes > 0)
+        do
        {
-         con->bytes += bytes;
+          if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0)
+         {
+           cupsdCloseClient(con);
+           return;
+         }
+         else if (bytes > 0)
+         {
+           con->bytes += bytes;
 
-          cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                         "cupsdReadClient: %d writing %d bytes to %d",
-                         con->http.fd, bytes, con->file);
+            cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                           "cupsdReadClient: %d writing %d bytes to %d",
+                           con->http.fd, bytes, con->file);
 
-          if (write(con->file, line, bytes) < bytes)
-         {
-            cupsdLogMessage(CUPSD_LOG_ERROR,
-                           "cupsdReadClient: Unable to write %d bytes to %s: %s",
-                           bytes, con->filename, strerror(errno));
+            if (write(con->file, line, bytes) < bytes)
+           {
+              cupsdLogMessage(CUPSD_LOG_ERROR,
+                             "cupsdReadClient: Unable to write %d bytes to %s: %s",
+                             bytes, con->filename, strerror(errno));
 
-           cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                           "cupsdReadClient: Closing data file %d...",
-                           con->file);
+             cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                             "cupsdReadClient: Closing data file %d...",
+                             con->file);
 
-           close(con->file);
-           con->file = -1;
-           unlink(con->filename);
-           cupsdClearString(&con->filename);
+             close(con->file);
+             con->file = -1;
+             unlink(con->filename);
+             cupsdClearString(&con->filename);
 
-            if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-             return (cupsdCloseClient(con));
+              if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
+             {
+               cupsdCloseClient(con);
+               return;
+             }
+           }
          }
-       }
+        }
+       while (con->http.state == HTTP_PUT_RECV && con->http.used > 0);
 
         if (con->http.state == HTTP_WAITING)
        {
@@ -1755,7 +1903,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
            cupsdClearString(&con->filename);
 
             if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-             return (cupsdCloseClient(con));
+           {
+             cupsdCloseClient(con);
+             return;
+           }
          }
 
          /*
@@ -1769,7 +1920,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
          */
 
           if (!cupsdSendError(con, status))
-           return (cupsdCloseClient(con));
+         {
+           cupsdCloseClient(con);
+           return;
+         }
        }
         break;
 
@@ -1782,94 +1936,112 @@ cupsdReadClient(cupsd_client_t *con)   /* I - Client to read from */
                            "CHUNKED" : "LENGTH",
                        CUPS_LLCAST con->http.data_remaining, con->file);
 
-        if (con->request)
+        do
        {
-        /*
-         * Grab any request data from the connection...
-         */
-
-         if ((ipp_state = ippRead(&(con->http), con->request)) == IPP_ERROR)
+          if (con->request)
          {
-            cupsdLogMessage(CUPSD_LOG_ERROR,
-                           "cupsdReadClient: %d IPP Read Error!",
-                           con->http.fd);
+          /*
+           * Grab any request data from the connection...
+           */
 
-           cupsdSendError(con, HTTP_BAD_REQUEST);
-           return (cupsdCloseClient(con));
-         }
-         else if (ipp_state != IPP_DATA)
-         {
-            if (con->http.state == HTTP_POST_SEND)
+           if ((ipp_state = ippRead(&(con->http), con->request)) == IPP_ERROR)
            {
+              cupsdLogMessage(CUPSD_LOG_ERROR,
+                             "cupsdReadClient: %d IPP Read Error!",
+                             con->http.fd);
+
              cupsdSendError(con, HTTP_BAD_REQUEST);
-             return (cupsdCloseClient(con));
+             cupsdCloseClient(con);
+             return;
            }
+           else if (ipp_state != IPP_DATA)
+           {
+              if (con->http.state == HTTP_POST_SEND)
+             {
+               cupsdSendError(con, HTTP_BAD_REQUEST);
+               cupsdCloseClient(con);
+               return;
+             }
 
-           break;
-          }
-         else
-           con->bytes += ippLength(con->request);
-       }
+             break;
+            }
+           else
+             con->bytes += ippLength(con->request);
+         }
 
-        if (con->file < 0 && con->http.state != HTTP_POST_SEND)
-       {
-         /*
-         * Create a file as needed for the request data...
-         */
+          if (con->file < 0 && con->http.state != HTTP_POST_SEND)
+         {
+           /*
+           * Create a file as needed for the request data...
+           */
 
-          cupsdSetStringf(&con->filename, "%s/%08x", RequestRoot, request_id ++);
-         con->file = open(con->filename, O_WRONLY | O_CREAT | O_TRUNC, 0640);
+            cupsdSetStringf(&con->filename, "%s/%08x", RequestRoot, request_id ++);
+           con->file = open(con->filename, O_WRONLY | O_CREAT | O_TRUNC, 0640);
 
-          cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReadClient: %d REQUEST %s=%d", con->http.fd,
-                         con->filename, con->file);
+            cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdReadClient: %d REQUEST %s=%d", con->http.fd,
+                           con->filename, con->file);
 
-         if (con->file < 0)
-         {
-           if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-             return (cupsdCloseClient(con));
-         }
+           if (con->file < 0)
+           {
+             if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
+             {
+               cupsdCloseClient(con);
+               return;
+             }
+           }
 
-         fchmod(con->file, 0640);
-         fchown(con->file, RunUser, Group);
-          fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
-       }
+           fchmod(con->file, 0640);
+           fchown(con->file, RunUser, Group);
+            fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
+         }
 
-       if (con->http.state != HTTP_POST_SEND)
-       {
-          if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0)
-           return (cupsdCloseClient(con));
-         else if (bytes > 0)
+         if (con->http.state != HTTP_POST_SEND)
          {
-           con->bytes += bytes;
+            if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0)
+           {
+             cupsdCloseClient(con);
+             return;
+           }
+           else if (bytes > 0)
+           {
+             con->bytes += bytes;
 
-            cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                           "cupsdReadClient: %d writing %d bytes to %d",
-                           con->http.fd, bytes, con->file);
+              cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                             "cupsdReadClient: %d writing %d bytes to %d",
+                             con->http.fd, bytes, con->file);
 
-            if (write(con->file, line, bytes) < bytes)
-           {
-              cupsdLogMessage(CUPSD_LOG_ERROR,
-                             "cupsdReadClient: Unable to write %d bytes to %s: %s",
-                             bytes, con->filename, strerror(errno));
+              if (write(con->file, line, bytes) < bytes)
+             {
+               cupsdLogMessage(CUPSD_LOG_ERROR,
+                               "cupsdReadClient: Unable to write %d bytes to %s: %s",
+                               bytes, con->filename, strerror(errno));
 
-             cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                             "cupsdReadClient: Closing file %d...",
-                             con->file);
+               cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                               "cupsdReadClient: Closing file %d...",
+                               con->file);
 
-             close(con->file);
-             con->file = -1;
-             unlink(con->filename);
-             cupsdClearString(&con->filename);
+               close(con->file);
+               con->file = -1;
+               unlink(con->filename);
+               cupsdClearString(&con->filename);
 
-              if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-               return (cupsdCloseClient(con));
+               if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
+             }
+           }
+           else if (con->http.state == HTTP_POST_RECV)
+              return;
+           else if (con->http.state != HTTP_POST_SEND)
+           {
+             cupsdCloseClient(con);
+             return;
            }
          }
-         else if (con->http.state == HTTP_POST_RECV)
-            return (1); /* ??? */
-         else if (con->http.state != HTTP_POST_SEND)
-           return (cupsdCloseClient(con));
-       }
+        }
+       while (con->http.state == HTTP_POST_RECV && con->http.used > 0);
 
        if (con->http.state == HTTP_POST_SEND)
        {
@@ -1910,7 +2082,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
               }
 
               if (!cupsdSendError(con, HTTP_REQUEST_TOO_LARGE))
-               return (cupsdCloseClient(con));
+             {
+               cupsdCloseClient(con);
+               return;
+             }
            }
 
            if (con->command)
@@ -1918,7 +2093,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
              if (!cupsdSendCommand(con, con->command, con->options, 0))
              {
                if (!cupsdSendError(con, HTTP_NOT_FOUND))
-                 return (cupsdCloseClient(con));
+               {
+                 cupsdCloseClient(con);
+                 return;
+               }
               }
              else
                cupsdLogRequest(con, HTTP_OK);
@@ -1926,7 +2104,10 @@ cupsdReadClient(cupsd_client_t *con)     /* I - Client to read from */
          }
 
           if (con->request)
-           return (cupsdProcessIPPRequest(con));
+         {
+           cupsdProcessIPPRequest(con);
+           return;
+         }
        }
         break;
 
@@ -1935,9 +2116,7 @@ cupsdReadClient(cupsd_client_t *con)      /* I - Client to read from */
   }
 
   if (!con->http.keep_alive && con->http.state == HTTP_WAITING)
-    return (cupsdCloseClient(con));
-  else
-    return (1);
+    cupsdCloseClient(con);
 }
 
 
@@ -1989,14 +2168,7 @@ cupsdSendCommand(
 
   fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdSendCommand: Adding fd %d to InputSet...", con->file);
-  cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdSendCommand: Adding fd %d to OutputSet...",
-                  con->http.fd);
-
-  FD_SET(con->file, InputSet);
-  FD_SET(con->http.fd, OutputSet);
+  cupsdAddSelect(con->file, (cupsd_selfunc_t)cupsdWritePipe, NULL, con);
 
   con->sent_header = 0;
   con->file_ready  = 0;
@@ -2044,9 +2216,12 @@ cupsdSendError(cupsd_client_t *con,      /* I - Connection */
  /*
   * To work around bugs in some proxies, don't use Keep-Alive for some
   * error messages...
+  *
+  * Kerberos authentication doesn't work without Keep-Alive, so
+  * never disable it in that case.
   */
 
-  if (code >= HTTP_BAD_REQUEST)
+  if (code >= HTTP_BAD_REQUEST && con->http.auth_type != AUTH_KERBEROS)
     con->http.keep_alive = HTTP_KEEPALIVE_OFF;
 
  /*
@@ -2066,8 +2241,8 @@ cupsdSendError(cupsd_client_t *con,       /* I - Connection */
     return (0);
 #endif /* HAVE_SSL */
 
-  if ((con->http.version >= HTTP_1_1 && !con->http.keep_alive) ||
-      (code >= HTTP_BAD_REQUEST && code != HTTP_UPGRADE_REQUIRED))
+  if (con->http.version >= HTTP_1_1 &&
+      con->http.keep_alive == HTTP_KEEPALIVE_OFF)
   {
     if (httpPrintf(HTTP(con), "Connection: close\r\n") < 0)
       return (0);
@@ -2091,7 +2266,8 @@ cupsdSendError(cupsd_client_t *con,       /* I - Connection */
       text = _cupsLangString(con->language,
                              _("Enter your username and password or the "
                               "root username and password to access this "
-                              "page."));
+                              "page. If you are using Kerberos authentication, "
+                              "make sure you have a valid Kerberos ticket."));
     else if (code == HTTP_UPGRADE_REQUIRED)
     {
       text = urltext;
@@ -2162,6 +2338,9 @@ cupsdSendHeader(cupsd_client_t *con,      /* I - Client to send to */
                 http_status_t  code,   /* I - HTTP status code */
                char           *type)   /* I - MIME type of document */
 {
+  char auth_str[1024];                 /* Authorization string */
+
+
  /*
   * Send the HTTP status header...
   */
@@ -2209,22 +2388,77 @@ cupsdSendHeader(cupsd_client_t *con,    /* I - Client to send to */
       auth_type = DefaultAuthType;
     else
       auth_type = con->best->type;
-      
-    if (auth_type != AUTH_DIGEST)
-    {
-      if (httpPrintf(HTTP(con),
-                     "WWW-Authenticate: Basic realm=\"CUPS\"\r\n") < 0)
-       return (0);
-    }
-    else
+
+    auth_str[0] = '\0';
+
+    if (auth_type == AUTH_BASIC || auth_type == AUTH_BASICDIGEST)
+      strlcpy(auth_str, "Basic realm=\"CUPS\"", sizeof(auth_str));
+    else if (auth_type == AUTH_DIGEST)
+      snprintf(auth_str, sizeof(auth_str), "Digest realm=\"CUPS\", nonce=\"%s\"",
+              con->http.hostname);
+#ifdef HAVE_GSSAPI
+    else if (auth_type == AUTH_KERBEROS && !con->no_negotiate &&
+            con->gss_output_token.length == 0)
+      strlcpy(auth_str, "Negotiate", sizeof(auth_str));
+#endif /* HAVE_GSSAPI */
+
+#ifdef HAVE_AUTHORIZATION_H
+    if (con->best)
     {
-      if (httpPrintf(HTTP(con),
-                     "WWW-Authenticate: Digest realm=\"CUPS\", nonce=\"%s\"\r\n",
-                    con->http.hostname) < 0)
-       return (0);
+      int       i;                     /* Looping var */
+      char     *auth_key;              /* Auth key buffer */
+      size_t   auth_size;              /* Size of remaining buffer */
+
+
+      auth_key  = auth_str + strlen(auth_str);
+      auth_size = sizeof(auth_str) - (auth_key - auth_str);
+
+      for (i = 0; i < con->best->num_names; i ++)
+      {
+       if (!strncasecmp(con->best->names[i], "@AUTHKEY(", 9))
+       {
+         snprintf(auth_key, auth_size, ", authkey=\"%s\"",
+                  con->best->names[i] + 9);
+         /* end parenthesis is stripped in conf.c */
+         break;
+        }
+       else if (!strcasecmp(con->best->names[i], "@SYSTEM") &&
+                SystemGroupAuthKey)
+       {
+         snprintf(auth_key, auth_size, ", authkey=\"%s\"", SystemGroupAuthKey);
+         break;
+       }
+      }
     }
+#endif /* HAVE_AUTHORIZATION_H */
+
+    if (auth_str[0] &&
+       httpPrintf(HTTP(con), "WWW-Authenticate: %s\r\n", auth_str) < 0)
+      return (0);
   }
 
+#ifdef HAVE_GSSAPI
+ /*
+  * WWW-Authenticate: Negotiate can be included even for
+  * non-401 replies...
+  */
+
+  if (con->gss_output_token.length > 0)
+  {
+    char       buf[2048];              /* Output token buffer */
+    OM_uint32  minor_status;           /* Minor status code */
+
+
+    httpEncode64_2(buf, sizeof(buf),
+                  con->gss_output_token.value,
+                  con->gss_output_token.length);
+    gss_release_buffer(&minor_status, &con->gss_output_token);
+
+    if (httpPrintf(HTTP(con), "WWW-Authenticate: Negotiate %s\r\n", buf) < 0)
+      return (0);
+  }
+#endif /* HAVE_GSSAPI */
+
   if (con->language && strcmp(con->language->language, "C"))
   {
     if (httpPrintf(HTTP(con), "Content-Language: %s\r\n",
@@ -2282,7 +2516,7 @@ cupsdUpdateCGI(void)
  * 'cupsdWriteClient()' - Write data to a client as needed.
  */
 
-int                                    /* O - 1 if success, 0 if fail */
+void
 cupsdWriteClient(cupsd_client_t *con)  /* I - Client connection */
 {
   int          bytes;                  /* Number of bytes written */
@@ -2301,7 +2535,28 @@ cupsdWriteClient(cupsd_client_t *con)    /* I - Client connection */
 
   if (con->http.state != HTTP_GET_SEND &&
       con->http.state != HTTP_POST_SEND)
-    return (1);
+    return;
+
+  if (con->pipe_pid)
+  {
+   /*
+    * Make sure we select on the CGI output...
+    */
+
+    cupsdAddSelect(con->file, (cupsd_selfunc_t)cupsdWritePipe, NULL, con);
+
+    if (!con->file_ready)
+    {
+     /*
+      * Try again later when there is CGI output available...
+      */
+
+      cupsdRemoveSelect(con->http.fd);
+      return;
+    }
+
+    con->file_ready = 0;
+  }
 
   if (con->response)
   {
@@ -2347,7 +2602,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
              con->sent_header = 2;
 
              if (httpPrintf(HTTP(con), "Content-Length: 0\r\n") < 0)
-               return (0);
+               return;
            }
            else if (!strncasecmp(buf, "Status:", 7))
            {
@@ -2362,7 +2617,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
              if (con->http.version == HTTP_1_1)
              {
                if (httpPrintf(HTTP(con), "Transfer-Encoding: chunked\r\n") < 0)
-                 return (0);
+                 return;
              }
             }
          }
@@ -2392,7 +2647,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
             if (cupsdFlushHeader(con) < 0)
            {
              cupsdCloseClient(con);
-             return (0);
+             return;
            }
 
            if (con->http.version == HTTP_1_1)
@@ -2417,7 +2672,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
         httpPrintf(HTTP(con), "%s", buf);
 
         con->http.activity = time(NULL);
-        return (1);
+        return;
       }
       else if (bytes == 0)
         con->http.activity = time(NULL);
@@ -2432,7 +2687,7 @@ cupsdWriteClient(cupsd_client_t *con)     /* I - Client connection */
                        con->http.fd, bytes);
 
        cupsdCloseClient(con);
-       return (0);
+       return;
       }
 
       con->bytes += bytes;
@@ -2456,27 +2711,17 @@ cupsdWriteClient(cupsd_client_t *con)   /* I - Client connection */
       if (httpWrite2(HTTP(con), "", 0) < 0)
       {
         cupsdCloseClient(con);
-       return (0);
+       return;
       }
     }
 
     con->http.state = HTTP_WAITING;
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdWriteClient: Removing fd %d from OutputSet...",
-                    con->http.fd);
-
-    FD_CLR(con->http.fd, OutputSet);
+    cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient, NULL, con);
 
     if (con->file >= 0)
     {
-      if (FD_ISSET(con->file, InputSet))
-      {
-       cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                       "cupsdWriteClient: Removing fd %d from InputSet...",
-                        con->file);
-       FD_CLR(con->file, InputSet);
-      }
+      cupsdRemoveSelect(con->file);
 
       if (con->pipe_pid)
        cupsdEndProcess(con->pipe_pid, 0);
@@ -2518,25 +2763,28 @@ cupsdWriteClient(cupsd_client_t *con)   /* I - Client connection */
     if (!con->http.keep_alive)
     {
       cupsdCloseClient(con);
-      return (0);
-    }
-  }
-  else
-  {
-    con->file_ready = 0;
-
-    if (con->pipe_pid && !FD_ISSET(con->file, InputSet))
-    {
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdWriteClient: Adding fd %d to InputSet...",
-                     con->file);
-      FD_SET(con->file, InputSet);
+      return;
     }
   }
 
   con->http.activity = time(NULL);
+}
 
-  return (1);
+
+/*
+ * 'cupsdWritePipe()' - Flag that data is available on the CGI pipe.
+ */
+
+void
+cupsdWritePipe(cupsd_client_t *con)    /* I - Client connection */
+{
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdWritePipe: CGI output on fd %d...",
+                  con->file);
+
+  con->file_ready = 1;
+
+  cupsdRemoveSelect(con->file);
+  cupsdAddSelect(con->http.fd, NULL, (cupsd_selfunc_t)cupsdWriteClient, con);
 }
 
 
@@ -2667,7 +2915,7 @@ encrypt_client(cupsd_client_t *con)       /* I - Client to encrypt */
 
   con->http.tls = conn;
   return (1);
-  
+
 #  elif defined(HAVE_GNUTLS)
   http_tls_t   *conn;                  /* TLS session object */
   int          error;                  /* Error code */
@@ -2712,7 +2960,7 @@ encrypt_client(cupsd_client_t *con)       /* I - Client to encrypt */
   }
 
   gnutls_certificate_allocate_credentials(credentials);
-  gnutls_certificate_set_x509_key_file(*credentials, ServerCertificate, 
+  gnutls_certificate_set_x509_key_file(*credentials, ServerCertificate,
                                       ServerKey, GNUTLS_X509_FMT_PEM);
 
   gnutls_init(&(conn->session), GNUTLS_SERVER);
@@ -2979,11 +3227,13 @@ get_file(cupsd_client_t *con,           /* I  - Client connection */
 
 
  /*
-  * Need to add DocumentRoot global...
+  * Figure out the real filename...
   */
 
   if (!strncmp(con->uri, "/ppd/", 5))
     snprintf(filename, len, "%s%s", ServerRoot, con->uri);
+  else if (!strncmp(con->uri, "/rss/", 5) && !strchr(con->uri + 5, '/'))
+    snprintf(filename, len, "%s/rss/%s", CacheDir, con->uri + 5);
   else if (!strncmp(con->uri, "/admin/conf/", 12))
     snprintf(filename, len, "%s%s", ServerRoot, con->uri + 11);
   else if (!strncmp(con->uri, "/admin/log/", 11))
@@ -3472,7 +3722,7 @@ make_certificate(cupsd_client_t *con)     /* I - Client connection */
   int          pid,                    /* Process ID of command */
                status;                 /* Status of command */
   char         command[1024],          /* Command */
-               *argv[11],              /* Command-line arguments */
+               *argv[12],              /* Command-line arguments */
                *envp[MAX_ENV + 1],     /* Environment variables */
                home[1024],             /* HOME environment variable */
                infofile[1024],         /* Type-in information for cert */
@@ -3548,7 +3798,7 @@ make_certificate(cupsd_client_t *con)     /* I - Client connection */
     envp[envc++] = home;
     envp[envc]   = NULL;
 
-    if (!cupsdStartProcess(command, argv, envp, -1, -1, -1, -1, 1, &pid))
+    if (!cupsdStartProcess(command, argv, envp, -1, -1, -1, -1, -1, 1, &pid))
     {
       unlink(seedfile);
       return (0);
@@ -3625,7 +3875,7 @@ make_certificate(cupsd_client_t *con)     /* I - Client connection */
 
   infofd = open(infofile, O_RDONLY);
 
-  if (!cupsdStartProcess(command, argv, envp, infofd, -1, -1, -1, 1, &pid))
+  if (!cupsdStartProcess(command, argv, envp, infofd, -1, -1, -1, -1, 1, &pid))
   {
     close(infofd);
     unlink(infofile);
@@ -3858,7 +4108,7 @@ make_certificate(cupsd_client_t *con)     /* I - Client connection */
 
   infofd = open(infofile, O_RDONLY);
 
-  if (!cupsdStartProcess(command, argv, envp, infofd, -1, -1, -1, 1, &pid))
+  if (!cupsdStartProcess(command, argv, envp, infofd, -1, -1, -1, -1, 1, &pid))
   {
     close(infofd);
     unlink(infofile);
@@ -3928,10 +4178,11 @@ 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 + 17];    /* Environment variables */
+               *envp[MAX_ENV + 18];    /* Environment variables */
   char         content_length[1024],   /* CONTENT_LENGTH environment variable */
                content_type[1024],     /* CONTENT_TYPE environment variable */
                http_cookie[32768],     /* HTTP_COOKIE environment variable */
+               http_referer[1024],     /* HTTP_REFERER environment variable */
                http_user_agent[1024],  /* HTTP_USER_AGENT environment variable */
                lang[1024],             /* LANG environment variable */
                path_info[1024],        /* PATH_INFO environment variable */
@@ -4126,6 +4377,13 @@ pipe_command(cupsd_client_t *con,        /* I - Client connection */
     envp[envc ++] = http_user_agent;
   }
 
+  if (con->http.fields[HTTP_FIELD_REFERER][0])
+  {
+    snprintf(http_referer, sizeof(http_referer), "HTTP_REFERER=%s",
+             con->http.fields[HTTP_FIELD_REFERER]);
+    envp[envc ++] = http_referer;
+  }
+
   if (con->operation == HTTP_GET)
   {
     envp[envc ++] = "REQUEST_METHOD=GET";
@@ -4190,7 +4448,7 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
   */
 
   if (cupsdStartProcess(command, argv, envp, infile, fds[1], CGIPipes[1],
-                       -1, root, &pid) < 0)
+                       -1, -1, root, &pid) < 0)
   {
    /*
     * Error - can't fork!
@@ -4267,15 +4525,13 @@ write_file(cupsd_client_t *con,         /* I - Client connection */
   else
     con->http._data_remaining = INT_MAX;
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "write_file: Adding fd %d to OutputSet...", con->http.fd);
-
-  FD_SET(con->http.fd, OutputSet);
+  cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient,
+                 (cupsd_selfunc_t)cupsdWriteClient, con);
 
   return (1);
 }
 
 
 /*
- * End of "$Id: client.c 6247 2007-02-07 20:54:37Z mike $".
+ * End of "$Id: client.c 6329 2007-03-12 14:48:28Z mike $".
  */
index d11feb836c36f95190e31067d4d6ed98cf124eff..50f095abf6e98b0320ae9751072de58b20c3895a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.h 6205 2007-01-22 22:04:43Z mike $"
+ * "$Id: client.h 6253 2007-02-10 18:48:40Z mike $"
  *
  *   Client definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
  *         WWW: http://www.cups.org
  */
 
+#ifdef HAVE_AUTHORIZATION_H
+#  include <Security/Authorization.h>
+#endif /* HAVE_AUTHORIZATION_H */
+
 /*
  * HTTP client structure...
  */
@@ -56,6 +60,16 @@ struct cupsd_client_s
   http_addr_t          clientaddr;     /* Client address */
   char                 servername[256];/* Server name for connection */
   int                  serverport;     /* Server port for connection */
+#ifdef HAVE_GSSAPI
+  int                  no_negotiate;   /* Don't offer WWW-Authenticate: Negotiate */
+  gss_buffer_desc      gss_output_token;
+                                       /* Output token for Negotiate header */
+  gss_cred_id_t        gss_delegated_cred;
+                                       /* Credentials from client header */
+#endif /* HAVE_GSSAPI */
+#ifdef HAVE_AUTHORIZATION_H
+  AuthorizationRef     authref;        /* Authorization ref */
+#endif /* HAVE_AUTHORIZATION_H */
 };
 
 #define HTTP(con) &((con)->http)
@@ -108,7 +122,7 @@ extern void cupsdDeleteAllListeners(void);
 extern int     cupsdFlushHeader(cupsd_client_t *con);
 extern void    cupsdPauseListening(void);
 extern int     cupsdProcessIPPRequest(cupsd_client_t *con);
-extern int     cupsdReadClient(cupsd_client_t *con);
+extern void    cupsdReadClient(cupsd_client_t *con);
 extern void    cupsdResumeListening(void);
 extern int     cupsdSendCommand(cupsd_client_t *con, char *command,
                                 char *options, int root);
@@ -119,9 +133,10 @@ extern void        cupsdShutdownClient(cupsd_client_t *con);
 extern void    cupsdStartListening(void);
 extern void    cupsdStopListening(void);
 extern void    cupsdUpdateCGI(void);
-extern int     cupsdWriteClient(cupsd_client_t *con);
+extern void    cupsdWriteClient(cupsd_client_t *con);
+extern void    cupsdWritePipe(cupsd_client_t *con);
 
 
 /*
- * End of "$Id: client.h 6205 2007-01-22 22:04:43Z mike $".
+ * End of "$Id: client.h 6253 2007-02-10 18:48:40Z mike $".
  */
index c8a3afa43b554d86aa65357ff6a4c58e2b2dd1b2..d033627ad73b0105e47f135b69ae6a3e526f91c0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: conf.c 6205 2007-01-22 22:04:43Z mike $"
+ * "$Id: conf.c 6253 2007-02-10 18:48:40Z mike $"
  *
  *   Configuration routines for the Common UNIX Printing System (CUPS).
  *
@@ -117,13 +117,19 @@ static cupsd_var_t        variables[] =
   { "FilterLimit",             &FilterLimit,           CUPSD_VARTYPE_INTEGER },
   { "FilterNice",              &FilterNice,            CUPSD_VARTYPE_INTEGER },
   { "FontPath",                        &FontPath,              CUPSD_VARTYPE_STRING },
-  { "HideImplicitMembers",     &HideImplicitMembers,   CUPSD_VARTYPE_BOOLEAN },
+#ifdef HAVE_GSSAPI
+  { "GSSServiceName",          &GSSServiceName,        CUPSD_VARTYPE_STRING },
+#endif /* HAVE_GSSAPI */
   { "ImplicitClasses",         &ImplicitClasses,       CUPSD_VARTYPE_BOOLEAN },
   { "ImplicitAnyClasses",      &ImplicitAnyClasses,    CUPSD_VARTYPE_BOOLEAN },
   { "JobRetryLimit",           &JobRetryLimit,         CUPSD_VARTYPE_INTEGER },
   { "JobRetryInterval",                &JobRetryInterval,      CUPSD_VARTYPE_INTEGER },
   { "KeepAliveTimeout",                &KeepAliveTimeout,      CUPSD_VARTYPE_INTEGER },
   { "KeepAlive",               &KeepAlive,             CUPSD_VARTYPE_BOOLEAN },
+#ifdef HAVE_LAUNCHD
+  { "LaunchdTimeout",          &LaunchdTimeout,        CUPSD_VARTYPE_INTEGER },
+  { "LaunchdConf",             &LaunchdConf,           CUPSD_VARTYPE_STRING },
+#endif /* HAVE_LAUNCHD */
   { "LimitRequestBody",                &MaxRequestSize,        CUPSD_VARTYPE_INTEGER },
   { "ListenBackLog",           &ListenBackLog,         CUPSD_VARTYPE_INTEGER },
   { "LogFilePerm",             &LogFilePerm,           CUPSD_VARTYPE_INTEGER },
@@ -161,13 +167,12 @@ static cupsd_var_t        variables[] =
   { "ServerKey",               &ServerKey,             CUPSD_VARTYPE_STRING },
 #  endif /* HAVE_LIBSSL || HAVE_GNUTLS */
 #endif /* HAVE_SSL */
-#ifdef HAVE_LAUNCHD
-  { "LaunchdTimeout",          &LaunchdTimeout,        CUPSD_VARTYPE_INTEGER },
-  { "LaunchdConf",             &LaunchdConf,           CUPSD_VARTYPE_STRING },
-#endif /* HAVE_LAUNCHD */
   { "ServerName",              &ServerName,            CUPSD_VARTYPE_STRING },
   { "ServerRoot",              &ServerRoot,            CUPSD_VARTYPE_STRING },
   { "StateDir",                        &StateDir,              CUPSD_VARTYPE_STRING },
+#ifdef HAVE_AUTHORIZATION_H
+  { "SystemGroupAuthKey",      &SystemGroupAuthKey,    CUPSD_VARTYPE_STRING },
+#endif /* HAVE_AUTHORIZATION_H */
   { "TempDir",                 &TempDir,               CUPSD_VARTYPE_STRING },
   { "Timeout",                 &Timeout,               CUPSD_VARTYPE_INTEGER },
   { "UseNetworkDefault",       &UseNetworkDefault,     CUPSD_VARTYPE_BOOLEAN }
@@ -288,6 +293,9 @@ cupsdReadConfiguration(void)
   cupsdSetString(&RemoteRoot, "remroot");
   cupsdSetString(&ServerHeader, "CUPS/1.2");
   cupsdSetString(&StateDir, CUPS_STATEDIR);
+#ifdef HAVE_GSSAPI
+  cupsdSetString(&GSSServiceName, CUPS_DEFAULT_GSSSERVICENAME);
+#endif /* HAVE_GSSAPI */
 
   if (!strcmp(CUPS_DEFAULT_PRINTCAP, "/etc/printers.conf"))
     PrintcapFormat = PRINTCAP_SOLARIS;
@@ -434,11 +442,15 @@ cupsdReadConfiguration(void)
   MaxActiveJobs       = 0;
   MaxJobsPerUser      = 0;
   MaxJobsPerPrinter   = 0;
-  MaxCopies           = 100;
+  MaxCopies           = CUPS_DEFAULT_MAX_COPIES;
 
   cupsdDeleteAllPolicies();
   cupsdClearString(&DefaultPolicy);
 
+#ifdef HAVE_AUTHORIZATION_H
+  cupsdClearString(&SystemGroupAuthKey);
+#endif /* HAVE_AUTHORIZATION_H */
+
   MaxSubscriptions           = 100;
   MaxSubscriptionsPerJob     = 0;
   MaxSubscriptionsPerPrinter = 0;
@@ -1705,6 +1717,16 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
       if (loc->level == AUTH_ANON)
        loc->level = AUTH_USER;
     }
+#ifdef HAVE_GSSAPI
+    else if (!strcasecmp(value, "kerberos") ||
+            !strcasecmp(value, "gssapi"))
+    {
+      loc->type = AUTH_KERBEROS;
+
+      if (loc->level == AUTH_ANON)
+       loc->level = AUTH_USER;
+    }
+#endif /* HAVE_GSSAPI */
     else
     {
       cupsdLogMessage(CUPSD_LOG_WARN,
@@ -1813,6 +1835,20 @@ parse_aaa(cupsd_location_t *loc, /* I - Location */
       while (isspace(*value & 255))
        value ++;
 
+#ifdef HAVE_AUTHORIZATION_H
+      if (!strncmp(value, "@AUTHKEY(", 9))
+      {
+       /*
+       * Grab "@AUTHKEY(name)" value...
+       */
+
+        for (valptr = value + 9; *valptr != ')' && *valptr; valptr ++);
+
+       if (*valptr)
+         *valptr++ = '\0';
+      }
+      else
+#endif /* HAVE_AUTHORIZATION_H */
       if (*value == '\"' || *value == '\'')
       {
        /*
@@ -2700,6 +2736,10 @@ read_configuration(cups_file_t *fp)      /* I - File to read from */
        DefaultAuthType = AUTH_DIGEST;
       else if (!strcasecmp(value, "basicdigest"))
        DefaultAuthType = AUTH_BASICDIGEST;
+#ifdef HAVE_GSSAPI
+      else if (!strcasecmp(value, "kerberos"))
+        DefaultAuthType = AUTH_KERBEROS;
+#endif /* HAVE_GSSAPI */
       else
       {
        cupsdLogMessage(CUPSD_LOG_WARN,
@@ -2730,6 +2770,19 @@ read_configuration(cups_file_t *fp)      /* I - File to read from */
       }
     }
 #endif /* HAVE_SSL */
+#ifdef HAVE_GSSAPI
+    else if (!strcasecmp(line, "Krb5Keytab"))
+    {
+      cupsdSetStringf(&Krb5Keytab, "KRB5_KTNAME=%s", value);
+      putenv(Krb5Keytab);
+
+#  ifdef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
+      gsskrb5_register_acceptor_identity(value);
+#  else
+      cupsdSetEnv("KRB5_KTNAME", value);
+#  endif /* HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
+    }
+#endif /* HAVE_GSSAPI */
     else if (!strcasecmp(line, "User"))
     {
      /*
@@ -3289,5 +3342,5 @@ read_policy(cups_file_t *fp,              /* I - Configuration file */
 
 
 /*
- * End of "$Id: conf.c 6205 2007-01-22 22:04:43Z mike $".
+ * End of "$Id: conf.c 6253 2007-02-10 18:48:40Z mike $".
  */
index 6320f9d196f701366a6a3e4f6177aa4e1517b3a1..cfb71fc4e371621026620f1b7717cffe1bd4cfa5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: conf.h 5696 2006-06-26 18:34:20Z mike $"
+ * "$Id: conf.h 6291 2007-02-19 21:54:27Z mike $"
  *
  *   Configuration file definitions for the Common UNIX Printing System (CUPS)
  *   scheduler.
 
 typedef enum
 {
-  CUPSD_LOG_ATTR = -3,         /* Used internally for attributes */
-  CUPSD_LOG_STATE,             /* Used internally for state-reasons */
-  CUPSD_LOG_PAGE,              /* Used internally for page logging */
+  CUPSD_LOG_ATTR = -3,                 /* Used internally for attributes */
+  CUPSD_LOG_STATE,                     /* Used internally for state-reasons */
+  CUPSD_LOG_PAGE,                      /* Used internally for page logging */
   CUPSD_LOG_NONE,
-  CUPSD_LOG_EMERG,             /* Emergency issues */
-  CUPSD_LOG_ALERT,             /* Something bad happened that needs attention */
-  CUPSD_LOG_CRIT,              /* Critical error but server continues */
-  CUPSD_LOG_ERROR,             /* Error condition */
-  CUPSD_LOG_WARN,              /* Warning */
-  CUPSD_LOG_NOTICE,            /* Normal condition that needs logging */
-  CUPSD_LOG_INFO,              /* General information */
-  CUPSD_LOG_DEBUG,             /* General debugging */
-  CUPSD_LOG_DEBUG2             /* Detailed debugging */
+  CUPSD_LOG_EMERG,                     /* Emergency issues */
+  CUPSD_LOG_ALERT,                     /* Something bad happened that needs attention */
+  CUPSD_LOG_CRIT,                      /* Critical error but server continues */
+  CUPSD_LOG_ERROR,                     /* Error condition */
+  CUPSD_LOG_WARN,                      /* Warning */
+  CUPSD_LOG_NOTICE,                    /* Normal condition that needs logging */
+  CUPSD_LOG_INFO,                      /* General information */
+  CUPSD_LOG_DEBUG,                     /* General debugging */
+  CUPSD_LOG_DEBUG2                     /* Detailed debugging */
 } cupsd_loglevel_t;
 
 
@@ -50,8 +50,8 @@ typedef enum
  * Printcap formats...
  */
 
-#define PRINTCAP_BSD   0       /* Berkeley LPD format */
-#define PRINTCAP_SOLARIS 1     /* Solaris lpsched format */
+#define PRINTCAP_BSD           0       /* Berkeley LPD format */
+#define PRINTCAP_SOLARIS       1       /* Solaris lpsched format */
 
 
 /*
@@ -111,6 +111,12 @@ VAR char           *AccessLog              VALUE(NULL),
                                        /* Remote root user */
                        *Classification         VALUE(NULL);
                                        /* Classification of system */
+#ifdef HAVE_GSSAPI
+VAR char               *GSSServiceName         VALUE(NULL);
+                                       /* GSS service name */
+VAR char               *Krb5Keytab             VALUE(NULL);
+                                       /* Kerberos Keytab */
+#endif /* HAVE_GSSAPI */
 VAR uid_t              User                    VALUE(1);
                                        /* User ID for server */
 VAR gid_t              Group                   VALUE(0);
@@ -127,7 +133,7 @@ VAR int                     ClassifyOverride        VALUE(0),
                                        /* Maximum number of clients */
                        MaxClientsPerHost       VALUE(0),
                                        /* Maximum number of clients per host */
-                       MaxCopies               VALUE(100),
+                       MaxCopies               VALUE(CUPS_DEFAULT_MAX_COPIES),
                                        /* Maximum number of copies per job */
                        MaxLogSize              VALUE(1024 * 1024),
                                        /* Maximum size of log files */
@@ -195,21 +201,32 @@ VAR char          *LaunchdConf            VALUE(NULL);
                                        /* launchd(8) configuration file */
 #endif /* HAVE_LAUNCHD */
 
+#ifdef HAVE_AUTHORIZATION_H
+VAR char               *SystemGroupAuthKey     VALUE(NULL);
+                                       /* System group auth key */
+#endif /* HAVE_AUTHORIZATION_H */
+
+
 /*
  * Prototypes...
  */
 
 extern char    *cupsdGetDateTime(time_t t);
 extern int     cupsdReadConfiguration(void);
-extern int     cupsdLogRequest(cupsd_client_t *con, http_status_t code);
+#ifdef HAVE_GSSAPI
+extern int     cupsdLogGSSMessage(int level, int major_status,
+                                  int minor_status,
+                                  const char *message, ...);
+#endif /* HAVE_GSSAPI */
 extern int     cupsdLogMessage(int level, const char *message, ...)
 #ifdef __GNUC__
 __attribute__ ((__format__ (__printf__, 2, 3)))
 #endif /* __GNUC__ */
 ;
 extern int     cupsdLogPage(cupsd_job_t *job, const char *page);
+extern int     cupsdLogRequest(cupsd_client_t *con, http_status_t code);
 
 
 /*
- * End of "$Id: conf.h 5696 2006-06-26 18:34:20Z mike $".
+ * End of "$Id: conf.h 6291 2007-02-19 21:54:27Z mike $".
  */
index a51e4a9341ea1b4c6e0b28a51539d9231a794338..39892bc71f0a42c0fb9664a791385e6519e290be 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups-driverd.c 6214 2007-01-23 17:01:48Z mike $"
+ * "$Id: cups-driverd.c 6211 2007-01-23 15:44:34Z mike $"
  *
  *   PPD/driver support for the Common UNIX Printing System (CUPS).
  *
@@ -1122,5 +1122,5 @@ load_drivers(void)
 
 
 /*
- * End of "$Id: cups-driverd.c 6214 2007-01-23 17:01:48Z mike $".
+ * End of "$Id: cups-driverd.c 6211 2007-01-23 15:44:34Z mike $".
  */
index e771c9eff882e495941ad851291771419fbf523d..a2b0f90038e82156b8dcf625435a4676c3bee0cb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups-lpd.c 6022 2006-10-10 19:47:03Z mike $"
+ * "$Id: cups-lpd.c 6327 2007-03-12 14:32:10Z mike $"
  *
  *   Line Printer Daemon interface for the Common UNIX Printing System (CUPS).
  *
@@ -96,7 +96,8 @@ 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);
+                          const char *docname, const char *user,
+                          const char *format, 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,
@@ -824,6 +825,7 @@ print_file(http_t     *http,                /* I - HTTP connection */
           const char *filename,        /* I - File to print */
            const char *docname,                /* I - document-name */
           const char *user,            /* I - requesting-user-name */
+          const char *format,          /* I - document-format */
           int        last)             /* I - 1 = last file in job */
 {
   ipp_t                *request;               /* IPP request */
@@ -846,6 +848,10 @@ print_file(http_t     *http,               /* I - HTTP connection */
     ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
                 "document-name", NULL, docname);
 
+  if (format)
+    ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
+                 "document-format", NULL, format);
+
   if (last)
     ippAddBoolean(request, IPP_TAG_OPERATION, "last-document", 1);
 
@@ -1278,6 +1284,8 @@ recv_print_job(
                docnumber ++;
 
                if (print_file(http, id, temp[i], docname, user,
+                              cupsGetOption("document-format", num_options,
+                                            options),
                               docnumber == doccount))
                   status = 1;
                else
@@ -1717,5 +1725,5 @@ smart_gets(char *s,                       /* I - Pointer to line buffer */
 
 
 /*
- * End of "$Id: cups-lpd.c 6022 2006-10-10 19:47:03Z mike $".
+ * End of "$Id: cups-lpd.c 6327 2007-03-12 14:32:10Z mike $".
  */
index be6bbb5e62f1bb5b365a63f2d70ef91e1335142f..2d21f1a0c84617ebcb97b822ef4ddd791522dee7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cups-polld.c 5871 2006-08-23 20:55:33Z mike $"
+ * "$Id: cups-polld.c 5870 2006-08-23 20:30:51Z mike $"
  *
  *   Polling daemon for the Common UNIX Printing System (CUPS).
  *
@@ -478,5 +478,5 @@ sighup_handler(int sig)                     /* I - Signal number */
 
 
 /*
- * End of "$Id: cups-polld.c 5871 2006-08-23 20:55:33Z mike $".
+ * End of "$Id: cups-polld.c 5870 2006-08-23 20:30:51Z mike $".
  */
index dbdca8bef2c5b414cd0c93363d46966e1ffbbaa6..81b5b35888ea929ace3b702ba3b24b0f0b74754b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cupsd.h 5305 2006-03-18 03:05:12Z mike $"
+ * "$Id: cupsd.h 6170 2007-01-02 17:26:41Z mike $"
  *
  *   Main header file for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -150,14 +150,18 @@ extern const char *cups_hstrerror(int);
 #define RELOAD_CUPSD   2               /* Reload only cupsd.conf */
 
 
+/*
+ * Select callback function type...
+ */
+
+typedef void (*cupsd_selfunc_t)(void *data);
+
+
 /*
  * Globals...
  */
 
-VAR int                        MaxFDs,         /* Maximum number of files */
-                       SetSize;        /* The size of the input/output sets */
-VAR fd_set             *InputSet,      /* Input files for select() */
-                       *OutputSet;     /* Output files for select() */
+VAR int                        MaxFDs;         /* Maximum number of files */
 
 VAR time_t             ReloadTime      VALUE(0);
                                        /* Time of reload request... */
@@ -200,9 +204,18 @@ extern int cupsdEndProcess(int pid, int force);
 extern const char *cupsdFinishProcess(int pid, char *name, int namelen);
 extern int     cupsdStartProcess(const char *command, char *argv[],
                                  char *envp[], int infd, int outfd,
-                                 int errfd, int backfd, int root, int *pid);
+                                 int errfd, int backfd, int sidefd,
+                                 int root, int *pid);
+
+extern int     cupsdAddSelect(int fd, cupsd_selfunc_t read_cb,
+                              cupsd_selfunc_t write_cb, void *data);
+extern int     cupsdDoSelect(long timeout);
+extern int     cupsdIsSelecting(int fd);
+extern void    cupsdRemoveSelect(int fd);
+extern void    cupsdStartSelect(void);
+extern void    cupsdStopSelect(void);
 
 
 /*
- * End of "$Id: cupsd.h 5305 2006-03-18 03:05:12Z mike $".
+ * End of "$Id: cupsd.h 6170 2007-01-02 17:26:41Z mike $".
  */
index bc5b3a4669d3befaf152ab3c5e78152769a286a5..73abd7bfce43792f2708c905ce30399e38c03639 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: dirsvc.c 6205 2007-01-22 22:04:43Z mike $"
+ * "$Id: dirsvc.c 6309 2007-02-24 03:11:56Z mike $"
  *
  *   Directory services routines for the Common UNIX Printing System (CUPS).
  *
  *
  * Contents:
  *
+ *   cupsdDeregisterPrinter()      - Stop sending broadcast information for a 
+ *                                  local printer and remove any pending
+ *                                   references to remote printers.
  *   cupsdLoadRemoteCache()        - Load the remote printer cache.
+ *   cupsdRegisterPrinter()        - Start sending broadcast information for a
+ *                                   printer update the broadcast contents.
  *   cupsdSaveRemoteCache()        - Save the remote printer cache.
- *   cupsdSendBrowseDelete()       - Send a "browse delete" message for a
- *                                   printer.
  *   cupsdSendBrowseList()         - Send new browsing information as necessary.
  *   cupsdStartBrowsing()          - Start sending and receiving broadcast
  *                                   information.
  *   cupsdStopPolling()            - Stop polling servers as needed.
  *   cupsdUpdateCUPSBrowse()       - Update the browse lists using the CUPS
  *                                   protocol.
+ *   cupsdUpdateDNSSDBrowse()      - Handle DNS-SD queries.
  *   cupsdUpdateLDAPBrowse()       - Scan for new printers via LDAP...
  *   cupsdUpdatePolling()          - Read status messages from the poll daemons.
  *   cupsdUpdateSLPBrowse()        - Get browsing information via SLP.
+ *   dnssdBuildTxtRecord()         - Build a TXT record from printer info.
+ *   dnssdDeregisterPrinter()      - Stop sending broadcast information for a
+ *                                   printer.
+ *   dnssdPackTxtRecord()          - Pack an array of key/value pairs into the
+ *                                   TXT record format.
+ *   dnssdRegisterCallback()       - DNSServiceRegister callback.
+ *   dnssdRegisterPrinter()        - Start sending broadcast information for a
+ *                                   printer or update the broadcast contents.
  *   dequote()                     - Remote quotes from a string.
  *   process_browse_data()         - Process new browse data.
  *   process_implicit_classes()    - Create/update implicit classes as needed.
 #include "cupsd.h"
 #include <grp.h>
 
+#ifdef HAVE_DNSSD
+#  include <dns_sd.h>
+#  include <nameser.h>
+#  include <nameser.h>
+#  ifdef HAVE_COREFOUNDATION
+#    include <CoreFoundation/CoreFoundation.h>
+#  endif /* HAVE_COREFOUNDATION */
+#  ifdef HAVE_SYSTEMCONFIGURATION
+#    include <SystemConfiguration/SystemConfiguration.h>
+#  endif /* HAVE_SYSTEMCONFIGURATION */
+#endif /* HAVE_DNSSD */
+
 
 /*
  * Local functions...
@@ -135,6 +159,72 @@ static SLPBoolean  slp_url_callback(SLPHandle hslp, const char *srvurl,
                                         SLPError errcode, void *cookie);
 #endif /* HAVE_LIBSLP */
 
+#ifdef HAVE_DNSSD
+/*
+ * For IPP register using a subtype of 'cups' so that shared printer browsing
+ * only finds other CUPS servers (not all IPP based printers).
+ */
+static char    dnssdIPPRegType[]    = "_ipp._tcp,_cups";
+static char    dnssdIPPFaxRegType[] = "_fax-ipp._tcp";
+
+static char    *dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p);
+static void    dnssdDeregisterPrinter(cupsd_printer_t *p);
+static char    *dnssdPackTxtRecord(int *txt_len, char *keyvalue[][2],
+                                   int count);
+static void    dnssdRegisterCallback(DNSServiceRef sdRef,
+                                     DNSServiceFlags flags, 
+                                     DNSServiceErrorType errorCode,
+                                     const char *name, const char *regtype,
+                                     const char *domain, void *context);
+static void    dnssdRegisterPrinter(cupsd_printer_t *p);
+#endif /* HAVE_DNSSD */
+
+
+/*
+ * 'cupsdDeregisterPrinter()' - Stop sending broadcast information for a 
+ *                             local printer and remove any pending
+ *                              references to remote printers.
+ */
+
+void
+cupsdDeregisterPrinter(
+    cupsd_printer_t *p,                        /* I - Printer to register */
+    int             removeit)          /* I - Printer being permanently removed */
+{
+ /*
+  * Only deregister if browsing is enabled and it's a local printers...
+  */
+
+  if (!Browsing || !p->shared ||
+      (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)))
+    return;
+
+ /*
+  * Announce the deletion...
+  */
+
+  if ((BrowseLocalProtocols & BROWSE_CUPS))
+  {
+    cups_ptype_t savedtype = p->type;  /* Saved printer type */
+
+    p->type |= CUPS_PRINTER_DELETE;
+
+    send_cups_browse(p);
+
+    p->type = savedtype;
+  }
+
+#ifdef HAVE_LIBSLP
+  if (BrowseLocalProtocols & BROWSE_SLP)
+    slp_dereg_printer(p);
+#endif /* HAVE_LIBSLP */
+
+#ifdef HAVE_DNSSD
+  if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD))
+    dnssdDeregisterPrinter(p);
+#endif /* HAVE_DNSSD */
+}
+
 
 /*
  * 'cupsdLoadRemoteCache()' - Load the remote printer cache.
@@ -524,6 +614,30 @@ cupsdLoadRemoteCache(void)
 }
 
 
+/*
+ * 'cupsdRegisterPrinter()' - Start sending broadcast information for a
+ *                            printer or update the broadcast contents.
+ */
+
+void
+cupsdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
+{
+  if (!Browsing || !BrowseLocalProtocols || !BrowseInterval || !NumBrowsers ||
+      (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)))
+    return;
+
+#ifdef HAVE_LIBSLP
+/*  if (BrowseLocalProtocols & BROWSE_SLP)
+    slpRegisterPrinter(p); */
+#endif /* HAVE_LIBSLP */
+
+#ifdef HAVE_DNSSD
+  if (BrowseLocalProtocols & BROWSE_DNSSD)
+    dnssdRegisterPrinter(p);
+#endif /* HAVE_DNSSD */
+}
+
+
 /*
  * 'cupsdRestartPolling()' - Restart polling servers as needed.
  */
@@ -570,7 +684,7 @@ cupsdSaveRemoteCache(void)
     return;
   }
   else
-    cupsdLogMessage(CUPSD_LOG_INFO, "Saving remote.cache...");
+    cupsdLogMessage(CUPSD_LOG_DEBUG, "Saving remote.cache...");
 
  /*
   * Restrict access to the file...
@@ -670,41 +784,6 @@ cupsdSaveRemoteCache(void)
 }
 
 
-/*
- * 'cupsdSendBrowseDelete()' - Send a "browse delete" message for a printer.
- */
-
-void
-cupsdSendBrowseDelete(
-    cupsd_printer_t *p)                        /* I - Printer to delete */
-{
- /*
-  * Only announce if browsing is enabled and this is a local queue...
-  */
-
-  if (!Browsing || !p->shared ||
-      (p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)))
-    return;
-
- /*
-  * First mark the printer for deletion...
-  */
-
-  p->type |= CUPS_PRINTER_DELETE;
-
- /*
-  * Announce the deletion...
-  */
-
-  if ((BrowseLocalProtocols & BROWSE_CUPS) && BrowseSocket >= 0)
-    send_cups_browse(p);
-#ifdef HAVE_LIBSLP
-  if ((BrowseLocalProtocols & BROWSE_SLP) && BrowseSLPHandle)
-    slp_dereg_printer(p);
-#endif /* HAVE_LIBSLP */
-}
-
-
 /*
  * 'cupsdSendBrowseList()' - Send new browsing information as necessary.
  */
@@ -853,6 +932,7 @@ cupsdStartBrowsing(void)
 {
   int                  val;            /* Socket option value */
   struct sockaddr_in   addr;           /* Broadcast address */
+  cupsd_printer_t      *p;             /* Current printer */
 
 
   BrowseNext = NULL;
@@ -945,11 +1025,8 @@ cupsdStartBrowsing(void)
       * We only listen if we want remote printers...
       */
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdStartBrowsing: Adding fd %d to InputSet...",
-                      BrowseSocket);
-
-      FD_SET(BrowseSocket, InputSet);
+      cupsdAddSelect(BrowseSocket, (cupsd_selfunc_t)cupsdUpdateCUPSBrowse,
+                     NULL, NULL);
     }
   }
   else
@@ -1048,6 +1125,16 @@ cupsdStartBrowsing(void)
     BrowseLDAPRefresh = 0;
   }
 #endif /* HAVE_OPENLDAP */
+
+ /*
+  * Register the individual printers
+  */
+
+  for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
+       p;
+       p = (cupsd_printer_t *)cupsArrayNext(Printers))
+    if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)))
+      cupsdRegisterPrinter(p);
 }
 
 
@@ -1129,7 +1216,7 @@ cupsdStartPolling(void)
 
     argv[1] = pollp->hostname;
 
-    if (cupsdStartProcess(polld, argv, envp, -1, -1, statusfds[1], -1,
+    if (cupsdStartProcess(polld, argv, envp, -1, -1, statusfds[1], -1, -1,
                           0, &(pollp->pid)) < 0)
     {
       cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -1150,10 +1237,7 @@ cupsdStartPolling(void)
   * Finally, add the pipe to the input selection set...
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdStartPolling: Adding fd %d to InputSet...", PollPipe);
-
-  FD_SET(PollPipe, InputSet);
+  cupsdAddSelect(PollPipe, (cupsd_selfunc_t)cupsdUpdatePolling, NULL, NULL);
 }
 
 
@@ -1164,9 +1248,26 @@ cupsdStartPolling(void)
 void
 cupsdStopBrowsing(void)
 {
+  cupsd_printer_t      *p;             /* Current printer */
+
+
   if (!Browsing || !(BrowseLocalProtocols | BrowseRemoteProtocols))
     return;
 
+ /*
+  * De-register the individual printers
+  */
+
+  for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
+       p;
+       p = (cupsd_printer_t *)cupsArrayNext(Printers))
+    if (!(p->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT)))
+      cupsdDeregisterPrinter(p, 1);
+
+ /*
+  * Shut down browsing sockets...
+  */
+
   if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS) &&
       BrowseSocket >= 0)
   {
@@ -1180,11 +1281,7 @@ cupsdStopBrowsing(void)
     close(BrowseSocket);
 #endif /* WIN32 */
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                   "cupsdStopBrowsing: Removing fd %d from InputSet...",
-                   BrowseSocket);
-
-    FD_CLR(BrowseSocket, InputSet);
+    cupsdRemoveSelect(BrowseSocket);
     BrowseSocket = -1;
   }
 
@@ -1228,9 +1325,7 @@ cupsdStopPolling(void)
     cupsdStatBufDelete(PollStatusBuffer);
     close(PollPipe);
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdStopPolling: removing fd %d from InputSet.", PollPipe);
-    FD_CLR(PollPipe, InputSet);
+    cupsdRemoveSelect(PollPipe);
 
     PollPipe         = -1;
     PollStatusBuffer = NULL;
@@ -1515,6 +1610,34 @@ cupsdUpdateCUPSBrowse(void)
 }
 
 
+#ifdef HAVE_DNSSD
+/*
+ * 'cupsdUpdateDNSSDBrowse()' - Handle DNS-SD queries.
+ */
+
+void
+cupsdUpdateDNSSDBrowse(
+    cupsd_printer_t *p)                        /* I - Printer being queried */
+{
+  DNSServiceErrorType  sdErr;          /* Service discovery error */
+
+
+  if ((sdErr = DNSServiceProcessResult(p->dnssd_ipp_ref))
+          != kDNSServiceErr_NoError)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR,
+                    "DNS Service Discovery registration error %d for \"%s\"!",
+                   sdErr, p->name);
+    cupsdRemoveSelect(p->dnssd_ipp_fd);
+    DNSServiceRefDeallocate(p->dnssd_ipp_ref);
+
+    p->dnssd_ipp_ref = NULL;
+    p->dnssd_ipp_fd  = -1;
+  }
+}
+#endif /* HAVE_DNSSD */
+
+
 #ifdef HAVE_OPENLDAP
 /*
  * 'cupsdUpdateLDAPBrowse()' - Scan for new printers via LDAP...
@@ -2315,6 +2438,465 @@ process_browse_data(
 }
 
 
+#ifdef HAVE_DNSSD
+/*
+ * 'dnssdBuildTxtRecord()' - Build a TXT record from printer info.
+ */
+
+static char *                          /* O - TXT record */
+dnssdBuildTxtRecord(
+    int             *txt_len,          /* O - TXT record length */
+    cupsd_printer_t *p)                        /* I - Printer information */
+{
+  int          i;                      /* Looping var */
+  char         type_str[32],           /* Type to string buffer */
+               state_str[32],          /* State to string buffer */
+               rp_str[1024],           /* Queue name string buffer */
+               *keyvalue[32][2];       /* Table of key/value pairs */
+
+
+ /*
+  * Load up the key value pairs...
+  */
+
+  i = 0;
+
+  keyvalue[i  ][0] = "txtvers";
+  keyvalue[i++][1] = "1";
+
+  keyvalue[i  ][0] = "qtotal";
+  keyvalue[i++][1] = "1";
+
+  keyvalue[i  ][0] = "rp";
+  keyvalue[i++][1] = rp_str;
+  snprintf(rp_str, sizeof(rp_str), "%s/%s", 
+          (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
+
+  keyvalue[i  ][0] = "ty";
+  keyvalue[i++][1] = p->make_model;
+
+  if (p->location && *p->location != '\0')
+  {
+    keyvalue[i  ][0] = "note";
+    keyvalue[i++][1] = p->location;
+  }
+
+  keyvalue[i  ][0] = "product";
+  keyvalue[i++][1] = p->product ? p->product : "Unknown";
+
+  snprintf(type_str, sizeof(type_str), "0x%X", p->type | CUPS_PRINTER_REMOTE);
+  snprintf(state_str, sizeof(state_str), "%d", p->state);
+
+  keyvalue[i  ][0] = "printer-state";
+  keyvalue[i++][1] = state_str;
+
+  keyvalue[i  ][0] = "printer-type";
+  keyvalue[i++][1] = type_str;
+
+  keyvalue[i  ][0] = "Transparent";
+  keyvalue[i++][1] = "T";
+
+  keyvalue[i  ][0] = "Binary";
+  keyvalue[i++][1] = "T";
+
+  if ((p->type & CUPS_PRINTER_FAX))
+  {
+    keyvalue[i  ][0] = "Fax";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_COLOR))
+  {
+    keyvalue[i  ][0] = "Color";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_DUPLEX))
+  {
+    keyvalue[i  ][0] = "Duplex";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_STAPLE))
+  {
+    keyvalue[i  ][0] = "Staple";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_COPIES))
+  {
+    keyvalue[i  ][0] = "Copies";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_COLLATE))
+  {
+    keyvalue[i  ][0] = "Collate";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_PUNCH))
+  {
+    keyvalue[i  ][0] = "Punch";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_BIND))
+  {
+    keyvalue[i  ][0] = "Bind";
+    keyvalue[i++][1] = "T";
+  }
+
+  if ((p->type & CUPS_PRINTER_SORT))
+  {
+    keyvalue[i  ][0] = "Sort";
+    keyvalue[i++][1] = "T";
+  }
+
+  keyvalue[i  ][0] = "pdl";
+  keyvalue[i++][1] = p->pdl ? p->pdl : "application/postscript";
+
+ /*
+  * Then pack them into a proper txt record...
+  */
+
+  return (dnssdPackTxtRecord(txt_len, keyvalue, i));
+}
+
+
+/*
+ * 'dnssdDeregisterPrinter()' - Stop sending broadcast information for a
+ *                              printer.
+ */
+
+static void
+dnssdDeregisterPrinter(
+    cupsd_printer_t *p)                        /* I - Printer */
+{
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdDeregisterPrinter(%s)", p->name);
+
+ /*
+  * Closing the socket deregisters the service
+  */
+
+  if (p->dnssd_ipp_ref)
+  {
+    cupsdRemoveSelect(p->dnssd_ipp_fd);
+    DNSServiceRefDeallocate(p->dnssd_ipp_ref);
+    p->dnssd_ipp_ref = NULL;
+    p->dnssd_ipp_fd  = -1;
+  }
+
+  cupsdClearString(&p->reg_name);
+
+  if (p->txt_record)
+  {
+   /*
+    * p->txt_record is malloc'd, not _cupsStrAlloc'd...
+    */
+
+    free(p->txt_record);
+    p->txt_record = NULL;
+  }
+}
+
+
+/*
+ * 'dnssdPackTxtRecord()' - Pack an array of key/value pairs into the
+ *                          TXT record format.
+ */
+
+static char *                          /* O - TXT record */
+dnssdPackTxtRecord(int  *txt_len,      /* O - TXT record length */
+                  char *keyvalue[][2], /* I - Table of key value pairs */
+                  int  count)          /* I - Items in table */
+{
+  int  i;                              /* Looping var */
+  int  length;                         /* Length of TXT record */
+  int  length2;                                /* Length of value */
+  char *txtRecord;                     /* TXT record buffer */
+  char *cursor;                                /* Looping pointer */
+
+
+ /*
+  * Calculate the buffer size
+  */
+
+  for (length = i = 0; i < count; i++)
+    length += 1 + strlen(keyvalue[i][0]) + 
+             (keyvalue[i][1] ? 1 + strlen(keyvalue[i][1]) : 0);
+
+ /*
+  * Allocate and fill it
+  */
+
+  txtRecord = malloc(length);
+  if (txtRecord)
+  {
+    *txt_len = length;
+
+    for (cursor = txtRecord, i = 0; i < count; i++)
+    {
+     /*
+      * Drop in the p-string style length byte followed by the data
+      */
+
+      length  = strlen(keyvalue[i][0]);
+      length2 = keyvalue[i][1] ? 1 + strlen(keyvalue[i][1]) : 0;
+
+      *cursor++ = (unsigned char)(length + length2);
+
+      memcpy(cursor, keyvalue[i][0], length);
+      cursor += length;
+
+      if (length2)
+      {
+        length2 --;
+       *cursor++ = '=';
+       memcpy(cursor, keyvalue[i][1], length2);
+       cursor += length2;
+      }
+    }
+  }
+
+  return (txtRecord);
+}
+
+
+/*
+ * 'dnssdRegisterCallback()' - DNSServiceRegister callback.
+ */
+
+static void
+dnssdRegisterCallback(
+    DNSServiceRef      sdRef,          /* I - DNS Service reference */
+    DNSServiceFlags    flags,          /* I - Reserved for future use */
+    DNSServiceErrorType        errorCode,      /* I - Error code */
+    const char         *name,          /* I - Service name */
+    const char         *regtype,       /* I - Service type */
+    const char         *domain,        /* I - Domain. ".local" for now */
+    void               *context)       /* I - User-defined context */
+{
+  (void)context;
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, 
+                 "dnssdRegisterCallback(%s, %s)", name, regtype);
+
+  if (errorCode)
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR, 
+                   "DNSServiceRegister failed with error %d", (int)errorCode);
+    return;
+  }
+}
+
+
+/*
+ * 'dnssdRegisterPrinter()' - Start sending broadcast information for a printer
+ *                           or update the broadcast contents.
+ */
+
+static void 
+dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
+{
+  DNSServiceErrorType  se;             /* dnssd errors */
+  cupsd_listener_t     *lis;           /* Current listening socket */
+  char                 *txt_record,    /* TXT record buffer */
+                       *name;          /* Service name */
+  int                  txt_len,        /* TXT record length */
+                       port;           /* IPP port number */
+  char                 str_buffer[1024];
+                                       /* C-string buffer */
+  const char           *computerName;  /* Computer name c-string ptr */
+  const char           *regtype;       /* Registration type */
+#ifdef HAVE_COREFOUNDATION_H
+  CFStringRef          computerNameRef;/* Computer name CFString */
+  CFStringEncoding     nameEncoding;   /* Computer name encoding */
+  CFMutableStringRef   shortNameRef;   /* Mutable name string */
+  CFIndex              nameLength;     /* Name string length */
+#else
+  int                  nameLength;     /* Name string length */
+#endif /* HAVE_COREFOUNDATION_H */
+
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name,
+                  !p->dnssd_ipp_ref ? "new" : "update");
+
+ /*
+  * If per-printer sharing was just disabled make sure we're not
+  * registered before returning.
+  */
+
+  if (!p->shared)
+  {
+    dnssdDeregisterPrinter(p);
+    return;
+  }
+
+ /*
+  * Get the computer name as a c-string...
+  */
+
+#ifdef HAVE_COREFOUNDATION_H
+  computerName = NULL;
+  if ((computerNameRef = SCDynamicStoreCopyComputerName(NULL, &nameEncoding)))
+    if ((computerName = CFStringGetCStringPtr(computerNameRef,
+                                              kCFStringEncodingUTF8)) == NULL)
+      if (CFStringGetCString(computerNameRef, str_buffer, sizeof(str_buffer),
+                             kCFStringEncodingUTF8))
+       computerName = str_buffer;
+#else
+  computerName = ServerName;
+#endif /* HAVE_COREFOUNDATION_H */
+
+ /*
+  * The registered name takes the form of "<printer-info> @ <computer name>"...
+  */
+
+  name = NULL;
+  if (computerName)
+    cupsdSetStringf(&name, "%s @ %s",
+                    (p->info && strlen(p->info)) ? p->info : p->name,
+                   computerName);
+  else
+    cupsdSetString(&name, (p->info && strlen(p->info)) ? p->info : p->name);
+
+#ifdef HAVE_COREFOUNDATION_H
+  if (computerNameRef)
+    CFRelease(computerNameRef);
+#endif /* HAVE_COREFOUNDATION_H */
+
+ /*
+  * If an existing printer was renamed, unregister it and start over...
+  */
+
+  if (p->reg_name && strcmp(p->reg_name, name))
+    dnssdDeregisterPrinter(p);
+
+  txt_len    = 0;                      /* anti-compiler-warning-code */
+  txt_record = dnssdBuildTxtRecord(&txt_len, p);
+
+  if (!p->dnssd_ipp_ref)
+  {
+   /*
+    * Initial registration...
+    */
+
+    cupsdSetString(&p->reg_name, name);
+
+    port = ippPort();
+
+    for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+        lis;
+        lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
+    {
+      if (lis->address.addr.sa_family == AF_INET)
+      {
+       port = ntohs(lis->address.ipv4.sin_port);
+       break;
+      }
+      else if (lis->address.addr.sa_family == AF_INET6)
+      {
+       port = ntohs(lis->address.ipv6.sin6_port);
+       break;
+      }
+    }
+
+   /*
+    * Use the _fax subtype for fax queues...
+    */
+
+    regtype = (p->type & CUPS_PRINTER_FAX) ? dnssdIPPFaxRegType :
+                                             dnssdIPPRegType;
+
+    cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) type is \"%s\"",
+                    p->name, regtype);
+
+    se = DNSServiceRegister(&p->dnssd_ipp_ref, 0, 0, name, regtype, 
+                           NULL, NULL, htons(port), txt_len, txt_record,
+                           dnssdRegisterCallback, p);
+
+   /*
+    * In case the name is too long, try shortening the string one character
+    * at a time...
+    */
+
+    if (se == kDNSServiceErr_BadParam)
+    {
+#ifdef HAVE_COREFOUNDATION_H
+      if ((shortNameRef = CFStringCreateMutable(NULL, 0)) != NULL)
+      {
+       CFStringAppendCString(shortNameRef, name, kCFStringEncodingUTF8);
+        nameLength = CFStringGetLength(shortNameRef);
+
+       while (se == kDNSServiceErr_BadParam && nameLength > 1)
+       {
+         CFStringDelete(shortNameRef, CFRangeMake(--nameLength, 1));
+         if (CFStringGetCString(shortNameRef, str_buffer, sizeof(str_buffer),
+                                kCFStringEncodingUTF8))
+         {
+           se = DNSServiceRegister(&p->dnssd_ipp_ref, 0, 0, str_buffer,
+                                   regtype, NULL, NULL, htons(port),
+                                   txt_len, txt_record,
+                                   dnssdRegisterCallback, p);
+         }
+       }
+
+       CFRelease(shortNameRef);
+      }
+#else
+      nameLength = strlen(name);
+      while (se == kDNSServiceErr_BadParam && nameLength > 1)
+      {
+       name[--nameLength] = '\0';
+       se = DNSServiceRegister(&p->dnssd_ipp_ref, 0, 0, str_buffer, regtype, 
+                               NULL, NULL, htons(port), txt_len, txt_record,
+                               dnssdRegisterCallback, p);
+      }
+#endif /* HAVE_COREFOUNDATION_H */
+    }
+
+    if (se == kDNSServiceErr_NoError)
+    {
+      p->dnssd_ipp_fd = DNSServiceRefSockFD(p->dnssd_ipp_ref);
+      p->txt_record   = txt_record;
+      p->txt_len      = txt_len;
+      txt_record      = NULL;
+
+      cupsdAddSelect(p->dnssd_ipp_fd, (cupsd_selfunc_t)cupsdUpdateDNSSDBrowse,
+                     NULL, (void *)p);
+    }
+    else
+      cupsdLogMessage(CUPSD_LOG_WARN,
+                      "DNS-SD registration of \"%s\" failed with %d",
+                     p->name, se);
+  }
+  else if (txt_len != p->txt_len || memcmp(txt_record, p->txt_record, txt_len))
+  {
+   /*
+    * Update the existing registration...
+    */
+
+    /* A TTL of 0 means use record's original value (Radar 3176248) */
+    se = DNSServiceUpdateRecord(p->dnssd_ipp_ref, NULL, 0,
+                               txt_len, txt_record, 0);
+
+    if (p->txt_record)
+      free(p->txt_record);
+
+    p->txt_record = txt_record;
+    p->txt_len    = txt_len;
+    txt_record    = NULL;
+  }
+
+  if (txt_record)
+    free(txt_record);
+
+  cupsdClearString(&name);
+}
+#endif /* HAVE_DNSSD */
+
+
 /*
  * 'process_implicit_classes()' - Create/update implicit classes as needed.
  */
@@ -3192,5 +3774,5 @@ slp_url_callback(
 
 
 /*
- * End of "$Id: dirsvc.c 6205 2007-01-22 22:04:43Z mike $".
+ * End of "$Id: dirsvc.c 6309 2007-02-24 03:11:56Z mike $".
  */
index 2e3a05988f611abdb63f239725b7098a5b02c058..f9d0c025cd0f28491749ce78502e47cf5829014c 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * "$Id: dirsvc.h 5833 2006-08-16 20:05:58Z mike $"
+ * "$Id: dirsvc.h 6291 2007-02-19 21:54:27Z mike $"
  *
  *   Directory services definitions for the Common UNIX Printing System
  *   (CUPS) scheduler.
  *
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -45,7 +45,7 @@
 #define BROWSE_CUPS    1               /* CUPS */
 #define        BROWSE_SLP      2               /* SLPv2 */
 #define BROWSE_LDAP    4               /* LDAP */
-#define BROWSE_DNSSD   8               /* DNS Service Discovery aka Bonjour */
+#define BROWSE_DNSSD   8               /* DNS Service Discovery (aka Bonjour) */
 #define BROWSE_ALL     15              /* All protocols */
 
 
@@ -163,16 +163,20 @@ VAR char          *BrowseLDAPBindDN VALUE(NULL),
  * Prototypes...
  */
 
+extern void    cupsdDeregisterPrinter(cupsd_printer_t *p, int removeit);
 extern void    cupsdLoadRemoteCache(void);
+extern void    cupsdRegisterPrinter(cupsd_printer_t *p);
 extern void    cupsdRestartPolling(void);
 extern void    cupsdSaveRemoteCache(void);
-extern void    cupsdSendBrowseDelete(cupsd_printer_t *p);
 extern void    cupsdSendBrowseList(void);
 extern void    cupsdStartBrowsing(void);
 extern void    cupsdStartPolling(void);
 extern void    cupsdStopBrowsing(void);
 extern void    cupsdStopPolling(void);
 extern void    cupsdUpdateCUPSBrowse(void);
+#ifdef HAVE_DNSSD
+extern void    cupsdUpdateDNSSDBrowse(cupsd_printer_t *p);
+#endif /* HAVE_DNSSD */
 #ifdef HAVE_LDAP
 extern void    cupsdUpdateLDAPBrowse(void);
 #endif /* HAVE_LDAP */
@@ -181,5 +185,5 @@ extern void cupsdUpdateSLPBrowse(void);
 
 
 /*
- * End of "$Id: dirsvc.h 5833 2006-08-16 20:05:58Z mike $".
+ * End of "$Id: dirsvc.h 6291 2007-02-19 21:54:27Z mike $".
  */
index 25d3b651e2bde4fb42c044e203b42bce653c0fad..e6ca1b518d6055f89c0ce35335a010c89ee23362 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: filter.c 5606 2006-05-30 19:40:34Z mike $"
+ * "$Id: filter.c 6252 2007-02-10 15:34:18Z mike $"
  *
  *   File type conversion routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  *
  * Contents:
  *
- *   mimeAddFilter()   - Add a filter to the current MIME database.
- *   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...
+ *   mimeAddFilter()    - Add a filter to the current MIME database.
+ *   mimeFilter()       - Find the fastest way to convert from one type to
+ *                        another.
+ *   mimeFilterLookup() - Lookup a filter...
+ *   compare_filters()  - Compare two filters...
+ *   find_filters()     - Find the filters to convert from one type to another.
  */
 
 /*
@@ -64,7 +64,6 @@ static int            compare_srcs(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 *);
 
 
 /*
@@ -93,7 +92,7 @@ mimeAddFilter(mime_t      *mime,      /* I - MIME database */
   * destination...
   */
 
-  if ((temp = lookup(mime, src, dst)) != NULL)
+  if ((temp = mimeFilterLookup(mime, src, dst)) != NULL)
   {
    /*
     * Yup, does the existing filter have a higher cost?  If so, copy the
@@ -193,6 +192,25 @@ mimeFilter(mime_t      *mime,              /* I - MIME database */
 }
 
 
+/*
+ * 'mimeFilterLookup()' - Lookup a filter...
+ */
+
+mime_filter_t *                                /* O - Filter for src->dst */
+mimeFilterLookup(mime_t      *mime,    /* I - MIME database */
+                 mime_type_t *src,     /* I - Source type */
+                 mime_type_t *dst)     /* I - Destination type */
+{
+  mime_filter_t        key;                    /* Key record for filter search */
+
+
+  key.src = src;
+  key.dst = dst;
+
+  return ((mime_filter_t *)cupsArrayFind(mime->filters, &key));
+}
+
+
 /*
  * 'compare_filters()' - Compare two filters...
  */
@@ -260,7 +278,7 @@ find_filters(mime_t           *mime,        /* I - MIME database */
   * See if there is a filter that can convert the files directly...
   */
 
-  if ((current = lookup(mime, src, dst)) != NULL)
+  if ((current = mimeFilterLookup(mime, src, dst)) != NULL)
   {
    /*
     * Got a direct filter!
@@ -392,24 +410,5 @@ find_filters(mime_t           *mime,       /* I - MIME database */
 
 
 /*
- * 'lookup()' - Lookup a filter...
- */
-
-static mime_filter_t *                 /* O - Filter for src->dst */
-lookup(mime_t      *mime,              /* I - MIME database */
-       mime_type_t *src,               /* I - Source type */
-       mime_type_t *dst)               /* I - Destination type */
-{
-  mime_filter_t        key;                    /* Key record for filter search */
-
-
-  key.src = src;
-  key.dst = dst;
-
-  return ((mime_filter_t *)cupsArrayFind(mime->filters, &key));
-}
-
-
-/*
- * End of "$Id: filter.c 5606 2006-05-30 19:40:34Z mike $".
+ * End of "$Id: filter.c 6252 2007-02-10 15:34:18Z mike $".
  */
index f96d2bf133b4a3219a59f6a5e661fb9c32c3280f..78edc3cc869573689a4f4c7a7b0118258c7d1cb1 100644 (file)
@@ -1,9 +1,12 @@
 /*
- * "$Id: ipp.c 6145 2006-12-06 20:10:16Z mike $"
+ * "$Id: ipp.c 6318 2007-03-06 04:36:55Z mike $"
  *
  *   IPP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
+ *
+ *   This file contains Kerberos support code, copyright 2006 by
+ *   Jelmer Vernooij.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
@@ -79,6 +82,7 @@
  *   release_job()               - Release a held print job.
  *   restart_job()               - Restart an old print job.
  *   save_auth_info()            - Save authentication information for a job.
+ *   save_krb5_creds()           - Save Kerberos credentials for a job.
  *   send_document()             - Send a file to a printer or class.
  *   send_http_error()           - Send a HTTP error back to the IPP client.
  *   send_ipp_status()           - Send a status back to the IPP client.
 
 #include "cupsd.h"
 
+#ifdef HAVE_KRB5_H
+#  include <krb5.h>
+#endif /* HAVE_KRB5_H */
+
 #ifdef HAVE_LIBPAPER
 #  include <paper.h>
 #endif /* HAVE_LIBPAPER */
@@ -114,8 +122,7 @@ static void accept_jobs(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    add_class(cupsd_client_t *con, ipp_attribute_t *uri);
 static int     add_file(cupsd_client_t *con, cupsd_job_t *job,
                         mime_type_t *filetype, int compression);
-static cupsd_job_t *add_job(cupsd_client_t *con, ipp_attribute_t *uri,
-                           cupsd_printer_t **dprinter,
+static cupsd_job_t *add_job(cupsd_client_t *con, cupsd_printer_t *printer,
                            mime_type_t *filetype);
 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);
@@ -174,7 +181,11 @@ static void        reject_jobs(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    release_job(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    renew_subscription(cupsd_client_t *con, int sub_id);
 static void    restart_job(cupsd_client_t *con, ipp_attribute_t *uri);
-static void    save_auth_info(cupsd_client_t *con, cupsd_job_t *job);
+static void    save_auth_info(cupsd_client_t *con, cupsd_job_t *job,
+                              ipp_attribute_t *auth_info);
+#if defined(HAVE_GSSAPI) && defined(HAVE_KRB5_H)
+static void    save_krb5_creds(cupsd_client_t *con, cupsd_job_t *job);
+#endif /* HAVE_GSSAPI && HAVE_KRB5_H */
 static void    send_document(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    send_http_error(cupsd_client_t *con, http_status_t status);
 static void    send_ipp_status(cupsd_client_t *con, ipp_status_t status,
@@ -233,7 +244,7 @@ cupsdProcessIPPRequest(
  /*
   * Then validate the request header and required attributes...
   */
-  
+
   if (con->request->request.any.version[0] != 1)
   {
    /*
@@ -250,7 +261,7 @@ cupsdProcessIPPRequest(
                     _("Bad request version number %d.%d!"),
                    con->request->request.any.version[0],
                    con->request->request.any.version[1]);
-  }  
+  }
   else if (!con->request->attrs)
   {
     cupsdAddEvent(CUPSD_EVENT_SERVER_AUDIT, NULL, NULL,
@@ -384,7 +395,7 @@ cupsdProcessIPPRequest(
        cupsdLogMessage(CUPSD_LOG_DEBUG, "Request attributes follow...");
 
        for (attr = con->request->attrs; attr; attr = attr->next)
-         cupsdLogMessage(CUPSD_LOG_DEBUG, 
+         cupsdLogMessage(CUPSD_LOG_DEBUG,
                          "attr \"%s\": group_tag = %x, value_tag = %x",
                          attr->name ? attr->name : "(null)", attr->group_tag,
                          attr->value_tag);
@@ -651,11 +662,8 @@ cupsdProcessIPPRequest(
        con->http.data_remaining = length;
       }
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdProcessIPPRequest: Adding fd %d to OutputSet...",
-                     con->http.fd);
-
-      FD_SET(con->http.fd, OutputSet);
+      cupsdAddSelect(con->http.fd, (cupsd_selfunc_t)cupsdReadClient,
+                     (cupsd_selfunc_t)cupsdWriteClient, con);
 
      /*
       * Tell the caller the response header was sent successfully...
@@ -694,12 +702,6 @@ accept_jobs(cupsd_client_t  *con,  /* I - Client connection */
 {
   http_status_t        status;                 /* Policy status */
   cups_ptype_t dtype;                  /* Destination type (printer or class) */
-  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   *name;                  /* Printer name */
   cupsd_printer_t *printer;            /* Printer data */
 
 
@@ -710,11 +712,7 @@ accept_jobs(cupsd_client_t  *con,  /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((name = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -745,12 +743,19 @@ accept_jobs(cupsd_client_t  *con, /* I - Client connection */
   cupsdAddPrinterHistory(printer);
 
   if (dtype & CUPS_PRINTER_CLASS)
+  {
     cupsdSaveAllClasses();
+
+    cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" now accepting jobs (\"%s\").",
+                    printer->name, get_username(con));
+  }
   else
+  {
     cupsdSaveAllPrinters();
 
-  cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" now accepting jobs (\"%s\").", name,
-                  get_username(con));
+    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" now accepting jobs (\"%s\").",
+                    printer->name, get_username(con));
+  }
 
  /*
   * Everything was ok, so return OK status...
@@ -932,7 +937,7 @@ add_class(cupsd_client_t  *con,             /* I - Client connection */
                                IPP_TAG_BOOLEAN)) != NULL)
   {
     if (pclass->shared && !attr->values[0].boolean)
-      cupsdSendBrowseDelete(pclass);
+      cupsdDeregisterPrinter(pclass, 1);
 
     cupsdLogMessage(CUPSD_LOG_INFO,
                     "Setting %s printer-is-shared to %d (was %d.)",
@@ -996,11 +1001,7 @@ add_class(cupsd_client_t  *con,           /* I - Client connection */
       * Search for the printer or class URI...
       */
 
-      httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[i].string.text, method,
-                      sizeof(method), username, sizeof(username), host,
-                     sizeof(host), &port, resource, sizeof(resource));
-
-      if (!cupsdValidateDest(host, resource, &dtype, &member))
+      if (!cupsdValidateDest(attr->values[i].string.text, &dtype, &member))
       {
        /*
        * Bad URI...
@@ -1137,54 +1138,25 @@ add_file(cupsd_client_t *con,           /* I - Connection to client */
 
 static cupsd_job_t *                   /* O - Job object */
 add_job(cupsd_client_t  *con,          /* I - Client connection */
-        ipp_attribute_t *uri,          /* I - printer-uri */
-       cupsd_printer_t **dprinter,     /* I - Destination printer */
+       cupsd_printer_t *printer,       /* I - Destination printer */
        mime_type_t     *filetype)      /* I - First print file type, if any */
 {
   http_status_t        status;                 /* Policy status */
-  ipp_attribute_t *attr;               /* Current attribute */
-  const char   *dest;                  /* Destination */
-  cups_ptype_t dtype;                  /* Destination type (printer or class) */
+  ipp_attribute_t *attr,               /* Current attribute */
+               *auth_info;             /* auth-info attribute */
   const char   *val;                   /* Default option value */
   int          priority;               /* Job priority */
   char         *title;                 /* Job name/title */
   cupsd_job_t  *job;                   /* Current job */
-  char         job_uri[HTTP_MAX_URI],  /* Job URI */
-               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 */
-  cupsd_printer_t *printer;            /* Printer data */
+  char         job_uri[HTTP_MAX_URI];  /* Job URI */
   int          kbytes;                 /* Size of print file */
   int          i;                      /* Looping var */
   int          lowerpagerange;         /* Page range bound */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %s)", con,
-                  con->http.fd, uri->values[0].string.text);
-
- /*
-  * Is the destination valid?
-  */
-
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((dest = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
-  {
-   /*
-    * Bad URI...
-    */
-
-    send_ipp_status(con, IPP_NOT_FOUND,
-                    _("The printer or class was not found."));
-    return (NULL);
-  }
-
-  if (dprinter)
-    *dprinter = printer;
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
+                  con, con->http.fd, printer, printer->name,
+                 filetype, filetype->super, filetype->type);
 
  /*
   * Check remote printing to non-shared printer...
@@ -1222,13 +1194,13 @@ add_job(cupsd_client_t  *con,           /* I - Client connection */
   {
     send_ipp_status(con, IPP_NOT_ACCEPTING,
                     _("Destination \"%s\" is not accepting jobs."),
-                    dest);
+                    printer->name);
     return (NULL);
   }
 
  /*
   * Validate job template attributes; for now just document-format,
-  * copies, and page-ranges...
+  * copies, number-up, and page-ranges...
   */
 
   if (filetype && printer->filetypes &&
@@ -1263,12 +1235,30 @@ add_job(cupsd_client_t  *con,           /* I - Client connection */
     }
   }
 
+  if ((attr = ippFindAttribute(con->request, "number-up",
+                               IPP_TAG_INTEGER)) != NULL)
+  {
+    if (attr->values[0].integer != 1 &&
+        attr->values[0].integer != 2 &&
+        attr->values[0].integer != 4 &&
+        attr->values[0].integer != 6 &&
+        attr->values[0].integer != 9 &&
+        attr->values[0].integer != 16)
+    {
+      send_ipp_status(con, IPP_ATTRIBUTES, _("Bad number-up value %d."),
+                      attr->values[0].integer);
+      ippAddInteger(con->response, IPP_TAG_UNSUPPORTED_GROUP, IPP_TAG_INTEGER,
+                   "number-up", attr->values[0].integer);
+      return (NULL);
+    }
+  }
+
   if ((attr = ippFindAttribute(con->request, "page-ranges",
                                IPP_TAG_RANGE)) != NULL)
   {
     for (i = 0, lowerpagerange = 1; i < attr->num_values; i ++)
     {
-      if (attr->values[i].range.lower < lowerpagerange || 
+      if (attr->values[i].range.lower < lowerpagerange ||
          attr->values[i].range.lower > attr->values[i].range.upper)
       {
        send_ipp_status(con, IPP_BAD_REQUEST,
@@ -1289,7 +1279,7 @@ add_job(cupsd_client_t  *con,             /* I - Client connection */
   if (MaxJobs && cupsArrayCount(Jobs) >= MaxJobs)
     cupsdCleanJobs();
 
-  if (cupsArrayCount(Jobs) >= MaxJobs && MaxJobs)
+  if (MaxJobs && cupsArrayCount(Jobs) >= MaxJobs)
   {
     send_ipp_status(con, IPP_NOT_POSSIBLE,
                     _("Too many active jobs."));
@@ -1331,11 +1321,13 @@ add_job(cupsd_client_t  *con,           /* I - Client connection */
   if ((job = cupsdAddJob(priority, printer->name)) == NULL)
   {
     send_ipp_status(con, IPP_INTERNAL_ERROR,
-                    _("Unable to add job for destination \"%s\"!"), dest);
+                    _("Unable to add job for destination \"%s\"!"),
+                   printer->name);
     return (NULL);
   }
 
-  job->dtype   = dtype;
+  job->dtype   = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
+                                  CUPS_PRINTER_REMOTE);
   job->attrs   = con->request;
   con->request = ippNewRequest(job->attrs->request.op.operation_id);
 
@@ -1350,8 +1342,6 @@ add_job(cupsd_client_t  *con,             /* I - Client connection */
 
     if (attr)
       cupsdSetString(&attr->values[0].string.text, con->username);
-
-    save_auth_info(con, job);
   }
   else if (attr)
   {
@@ -1374,6 +1364,30 @@ add_job(cupsd_client_t  *con,            /* I - Client connection */
     attr->name = _cupsStrAlloc("job-originating-user-name");
   }
 
+  auth_info = ippFindAttribute(job->attrs, "auth-info", IPP_TAG_TEXT);
+
+  if (con->username[0] || auth_info)
+  {
+    save_auth_info(con, job, auth_info);
+
+   /*
+    * Remove the auth-info attribute from the attribute data...
+    */
+
+    if (auth_info)
+    {
+      if (job->attrs->prev)
+        job->attrs->prev->next = auth_info->next;
+      else
+        job->attrs->attrs = auth_info->next;
+
+      if (job->attrs->last == auth_info)
+        job->attrs->last = job->attrs->prev;
+
+      _ippFreeAttr(auth_info);
+    }
+  }
+
   if ((attr = ippFindAttribute(job->attrs, "job-originating-host-name",
                                IPP_TAG_ZERO)) != NULL)
   {
@@ -1440,7 +1454,7 @@ add_job(cupsd_client_t  *con,             /* I - Client connection */
     * the connection...
     */
 
-    ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, 
+    ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME,
                 "job-originating-host-name", NULL, con->http.hostname);
   }
 
@@ -2266,7 +2280,7 @@ add_printer(cupsd_client_t  *con, /* I - Client connection */
                                IPP_TAG_BOOLEAN)) != NULL)
   {
     if (printer->shared && !attr->values[0].boolean)
-      cupsdSendBrowseDelete(printer);
+      cupsdDeregisterPrinter(printer, 1);
 
     cupsdLogMessage(CUPSD_LOG_INFO,
                     "Setting %s printer-is-shared to %d (was %d.)",
@@ -2566,7 +2580,7 @@ apply_printer_defaults(
   int          i,                      /* Looping var */
                num_options;            /* Number of default options */
   cups_option_t        *options,               /* Default options */
-               *option;                /* Current option */    
+               *option;                /* Current option */
 
 
  /*
@@ -2600,7 +2614,8 @@ static void
 authenticate_job(cupsd_client_t  *con, /* I - Client connection */
                 ipp_attribute_t *uri)  /* I - Job URI */
 {
-  ipp_attribute_t      *attr;          /* Job-id attribute */
+  ipp_attribute_t      *attr,          /* job-id attribute */
+                       *auth_info;     /* auth-info attribute */
   int                  jobid;          /* Job ID */
   cupsd_job_t          *job;           /* Current job */
   char                 method[HTTP_MAX_URI],
@@ -2652,7 +2667,7 @@ authenticate_job(cupsd_client_t  *con,    /* I - Client connection */
     httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
                     sizeof(method), username, sizeof(username), host,
                    sizeof(host), &port, resource, sizeof(resource));
+
     if (strncmp(resource, "/jobs/", 6))
     {
      /*
@@ -2702,7 +2717,9 @@ authenticate_job(cupsd_client_t  *con,    /* I - Client connection */
   * See if we have already authenticated...
   */
 
-  if (!con->username[0])
+  auth_info = ippFindAttribute(con->request, "auth-info", IPP_TAG_TEXT);
+
+  if (!con->username[0] && !auth_info)
   {
     send_ipp_status(con, IPP_NOT_AUTHORIZED,
                     _("No authentication information provided!"));
@@ -2723,7 +2740,7 @@ authenticate_job(cupsd_client_t  *con,    /* I - Client connection */
   * Save the authentication information for this job...
   */
 
-  save_auth_info(con, job);
+  save_auth_info(con, job, auth_info);
 
  /*
   * Reset the job-hold-until value to "no-hold"...
@@ -2759,11 +2776,10 @@ cancel_all_jobs(cupsd_client_t  *con,   /* I - Client connection */
                ipp_attribute_t *uri)   /* I - Job or Printer URI */
 {
   http_status_t        status;                 /* Policy status */
-  const char   *dest;                  /* Destination */
   cups_ptype_t dtype;                  /* Destination type */
-  char         method[HTTP_MAX_URI],   /* Method portion of URI */
+  char         scheme[HTTP_MAX_URI],   /* Scheme portion of URI */
                userpass[HTTP_MAX_URI], /* Username portion of URI */
-               host[HTTP_MAX_URI],     /* Host portion of URI */
+               hostname[HTTP_MAX_URI], /* Host portion of URI */
                resource[HTTP_MAX_URI]; /* Resource portion of URI */
   int          port;                   /* Port portion of URI */
   ipp_attribute_t *attr;               /* Attribute in request */
@@ -2822,16 +2838,17 @@ cancel_all_jobs(cupsd_client_t  *con,   /* I - Client connection */
   * And if the destination is valid...
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), userpass, sizeof(userpass), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((dest = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI?
     */
 
+    httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text,
+                    scheme, sizeof(scheme), userpass, sizeof(userpass),
+                   hostname, sizeof(hostname), &port,
+                   resource, sizeof(resource));
+
     if ((!strncmp(resource, "/printers/", 10) && resource[10]) ||
         (!strncmp(resource, "/classes/", 9) && resource[9]))
     {
@@ -2839,13 +2856,6 @@ cancel_all_jobs(cupsd_client_t  *con,    /* I - Client connection */
                       _("The printer or class was not found."));
       return;
     }
-    else if (strcmp(resource, "/printers/"))
-    {
-      send_ipp_status(con, IPP_NOT_FOUND,
-                      _("The printer-uri \"%s\" is not valid."),
-                     uri->values[0].string.text);
-      return;
-    }
 
    /*
     * Check policy...
@@ -2872,7 +2882,8 @@ cancel_all_jobs(cupsd_client_t  *con,     /* I - Client connection */
     * Check policy...
     */
 
-    if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, NULL)) != HTTP_OK)
+    if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con,
+                                   NULL)) != HTTP_OK)
     {
       send_http_error(con, status);
       return;
@@ -2882,10 +2893,11 @@ cancel_all_jobs(cupsd_client_t  *con,   /* I - Client connection */
     * Cancel all of the jobs on the named printer...
     */
 
-    cupsdCancelJobs(dest, username, purge);
+    cupsdCancelJobs(printer->name, username, purge);
 
     cupsdLogMessage(CUPSD_LOG_INFO, "All jobs on \"%s\" were %s by \"%s\".",
-                    dest, purge ? "purged" : "canceled", get_username(con));
+                    printer->name, purge ? "purged" : "canceled",
+                   get_username(con));
   }
 
   con->response->request.status.status_code = IPP_OK;
@@ -2902,13 +2914,12 @@ cancel_job(cupsd_client_t  *con,        /* I - Client connection */
 {
   ipp_attribute_t *attr;               /* Current attribute */
   int          jobid;                  /* Job ID */
-  char         method[HTTP_MAX_URI],   /* Method portion of URI */
+  char         scheme[HTTP_MAX_URI],   /* Scheme 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 */
   cupsd_job_t  *job;                   /* Job information */
-  const char   *dest;                  /* Destination */
   cups_ptype_t dtype;                  /* Destination type (printer or class) */
   cupsd_printer_t *printer;            /* Printer data */
 
@@ -2940,11 +2951,7 @@ cancel_job(cupsd_client_t  *con, /* I - Client connection */
       * Find the current job on the specified printer...
       */
 
-      httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                      sizeof(method), username, sizeof(username), host,
-                     sizeof(host), &port, resource, sizeof(resource));
-
-      if ((dest = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+      if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
       {
        /*
        * Bad URI...
@@ -2966,12 +2973,12 @@ cancel_job(cupsd_client_t  *con,        /* I - Client connection */
        /*
         * No, see if there are any pending jobs...
        */
-        
+
         for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
             job;
             job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
          if (job->state_value <= IPP_JOB_PROCESSING &&
-             !strcasecmp(job->dest, dest))
+             !strcasecmp(job->dest, printer->name))
            break;
 
        if (job)
@@ -2979,7 +2986,7 @@ cancel_job(cupsd_client_t  *con,  /* I - Client connection */
        else
        {
          send_ipp_status(con, IPP_NOT_POSSIBLE, _("No active jobs on %s!"),
-                         dest);
+                         printer->name);
          return;
        }
       }
@@ -2991,10 +2998,10 @@ cancel_job(cupsd_client_t  *con,        /* I - Client connection */
     * Got a job URI; parse it to get the job ID...
     */
 
-    httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                    sizeof(method), username, sizeof(username), host,
+    httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
+                    sizeof(scheme), username, sizeof(username), host,
                    sizeof(host), &port, resource, sizeof(resource));
+
     if (strncmp(resource, "/jobs/", 6))
     {
      /*
@@ -3794,7 +3801,7 @@ copy_model(cupsd_client_t *con,           /* I - Client connection */
            const char     *from,       /* I - Source file */
            const char     *to)         /* I - Destination file */
 {
-  fd_set       *input;                 /* select() input set */
+  fd_set       input;                  /* select() input set */
   struct timeval timeout;              /* select() timeout */
   int          maxfd;                  /* Maximum file descriptor for select() */
   char         tempfile[1024];         /* Temporary PPD file */
@@ -3847,24 +3854,12 @@ copy_model(cupsd_client_t *con,         /* I - Client connection */
 
   cupsdOpenPipe(temppipe);
 
-  if ((input = calloc(1, SetSize)) == NULL)
-  {
-    close(tempfd);
-    unlink(tempfile);
-
-    cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "copy_model: Unable to allocate %d bytes for select()...",
-                    SetSize);
-    return (-1);
-  }
-
   cupsdLogMessage(CUPSD_LOG_DEBUG,
                   "copy_model: Running \"cups-driverd cat %s\"...", from);
 
   if (!cupsdStartProcess(buffer, argv, envp, -1, temppipe[1], CGIPipes[1],
-                         -1, 0, &temppid))
+                         -1, -1, 0, &temppid))
   {
-    free(input);
     close(tempfd);
     unlink(tempfile);
     return (-1);
@@ -3891,13 +3886,14 @@ copy_model(cupsd_client_t *con,         /* I - Client connection */
 
     bytes = 0;
 
-    FD_SET(temppipe[0], input);
-    FD_SET(CGIPipes[0], input);
+    FD_ZERO(&input);
+    FD_SET(temppipe[0], &input);
+    FD_SET(CGIPipes[0], &input);
 
     timeout.tv_sec  = 30;
     timeout.tv_usec = 0;
 
-    if ((i = select(maxfd, input, NULL, NULL, &timeout)) < 0)
+    if ((i = select(maxfd, &input, NULL, NULL, &timeout)) < 0)
     {
       if (errno == EINTR)
         continue;
@@ -3913,7 +3909,7 @@ copy_model(cupsd_client_t *con,           /* I - Client connection */
       break;
     }
 
-    if (FD_ISSET(temppipe[0], input))
+    if (FD_ISSET(temppipe[0], &input))
     {
      /*
       * Read the PPD file from the pipe, and write it to the PPD file.
@@ -3930,15 +3926,13 @@ copy_model(cupsd_client_t *con,         /* I - Client connection */
        break;
     }
 
-    if (FD_ISSET(CGIPipes[0], input))
+    if (FD_ISSET(CGIPipes[0], &input))
       cupsdUpdateCGI();
   }
 
   close(temppipe[0]);
   close(tempfd);
 
-  free(input);
-
   if (!total)
   {
    /*
@@ -4020,13 +4014,13 @@ copy_model(cupsd_client_t *con,         /* I - Client connection */
     if ((!strcmp(system_paper, "Letter") && have_letter) ||
         (!strcmp(system_paper, "A4") && have_a4))
     {
-      num_defaults = cupsAddOption("PageSize", system_paper, 
+      num_defaults = cupsAddOption("PageSize", system_paper,
                                   num_defaults, &defaults);
-      num_defaults = cupsAddOption("PageRegion", system_paper, 
+      num_defaults = cupsAddOption("PageRegion", system_paper,
                                   num_defaults, &defaults);
-      num_defaults = cupsAddOption("PaperDimension", system_paper, 
+      num_defaults = cupsAddOption("PaperDimension", system_paper,
                                   num_defaults, &defaults);
-      num_defaults = cupsAddOption("ImageableArea", system_paper, 
+      num_defaults = cupsAddOption("ImageableArea", system_paper,
                                   num_defaults, &defaults);
     }
   }
@@ -4261,7 +4255,7 @@ copy_printer_attrs(
   if (!ra || cupsArrayFind(ra, "printer-state-change-time"))
     ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
                   "printer-state-change-time", printer->state_time);
-                
+
   if (MaxPrinterHistory > 0 && printer->num_history > 0 &&
       cupsArrayFind(ra, "printer-state-history"))
   {
@@ -4446,23 +4440,39 @@ static void
 create_job(cupsd_client_t  *con,       /* I - Client connection */
           ipp_attribute_t *uri)        /* I - Printer URI */
 {
-  cupsd_job_t  *job;                   /* New job */
+  cupsd_printer_t      *printer;       /* Printer */
+  cupsd_job_t          *job;           /* New job */
 
 
   cupsdLogMessage(CUPSD_LOG_DEBUG2, "create_job(%p[%d], %s)", con,
                   con->http.fd, uri->values[0].string.text);
 
+ /*
+  * Is the destination valid?
+  */
+
+  if (!cupsdValidateDest(uri->values[0].string.text, NULL, &printer))
+  {
+   /*
+    * Bad URI...
+    */
+
+    send_ipp_status(con, IPP_NOT_FOUND,
+                    _("The printer or class was not found."));
+    return;
+  }
+
  /*
   * Create the job object...
   */
 
-  if ((job = add_job(con, uri, NULL, NULL)) == NULL)
+  if ((job = add_job(con, printer, NULL)) == NULL)
     return;
 
  /*
   * Save and log the job...
   */
-   
+
   cupsdSaveJob(job);
 
   cupsdLogMessage(CUPSD_LOG_INFO, "Job %d created on \"%s\" by \"%s\".",
@@ -4630,6 +4640,16 @@ create_requested_array(ipp_t *request)   /* I - IPP request */
       cupsArrayAdd(ra, "uri-authentication-supported");
       cupsArrayAdd(ra, "uri-security-supported");
     }
+    else if (!strcmp(value, "printer-defaults"))
+    {
+      char     *name;                  /* Option name */
+
+
+      for (name = (char *)cupsArrayFirst(CommonDefaults);
+           name;
+          name = (char *)cupsArrayNext(CommonDefaults))
+        cupsArrayAdd(ra, name);
+    }
     else if (!strcmp(value, "subscription-template"))
     {
       cupsArrayAdd(ra, "notify-attributes");
@@ -4683,6 +4703,8 @@ create_subscription(
   int                  interval,       /* notify-time-interval */
                        lease;          /* notify-lease-duration */
   unsigned             mask;           /* notify-events */
+  ipp_attribute_t      *notify_events,/* notify-events(-default) */
+                       *notify_lease;  /* notify-lease-duration(-default) */
 
 
 #ifdef DEBUG
@@ -4723,7 +4745,7 @@ create_subscription(
     dtype   = CUPS_PRINTER_CLASS;
     printer = NULL;
   }
-  else if (!cupsdValidateDest(host, resource, &dtype, &printer))
+  else if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -4740,7 +4762,8 @@ create_subscription(
 
   if (printer)
   {
-    if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, NULL)) != HTTP_OK)
+    if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con,
+                                   NULL)) != HTTP_OK)
     {
       send_http_error(con, status);
       return;
@@ -4790,6 +4813,23 @@ create_subscription(
     jobid      = 0;
     mask       = CUPSD_EVENT_NONE;
 
+    if (printer)
+    {
+      notify_events = ippFindAttribute(printer->attrs, "notify-events-default",
+                                       IPP_TAG_KEYWORD);
+      notify_lease  = ippFindAttribute(printer->attrs,
+                                       "notify-lease-duration-default",
+                                       IPP_TAG_INTEGER);
+
+      if (notify_lease)
+        lease = notify_lease->values[0].integer;
+    }
+    else
+    {
+      notify_events = NULL;
+      notify_lease  = NULL;
+    }
+
     while (attr && attr->group_tag != IPP_TAG_ZERO)
     {
       if (!strcmp(attr->name, "notify-recipient") &&
@@ -4878,10 +4918,7 @@ create_subscription(
       }
       else if (!strcmp(attr->name, "notify-events") &&
                attr->value_tag == IPP_TAG_KEYWORD)
-      {
-        for (i = 0; i < attr->num_values; i ++)
-         mask |= cupsdEventValue(attr->values[i].string.text);
-      }
+        notify_events = attr;
       else if (!strcmp(attr->name, "notify-lease-duration") &&
                attr->value_tag == IPP_TAG_INTEGER)
         lease = attr->values[0].integer;
@@ -4895,6 +4932,12 @@ create_subscription(
       attr = attr->next;
     }
 
+    if (notify_events)
+    {
+      for (i = 0; i < notify_events->num_values; i ++)
+       mask |= cupsdEventValue(notify_events->values[i].string.text);
+    }
+
     if (recipient)
       cupsdLogMessage(CUPSD_LOG_DEBUG, "recipient=\"%s\"", recipient);
     if (pullmethod)
@@ -4989,13 +5032,7 @@ delete_printer(cupsd_client_t  *con,     /* I - Client connection */
                ipp_attribute_t *uri)   /* I - URI of printer or class */
 {
   http_status_t        status;                 /* Policy status */
-  const char   *dest;                  /* Destination */
   cups_ptype_t dtype;                  /* Destination type (printer or class) */
-  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 */
   cupsd_printer_t *printer;            /* Printer/class */
   char         filename[1024];         /* Script/PPD filename */
 
@@ -5007,11 +5044,7 @@ delete_printer(cupsd_client_t  *con,     /* I - Client connection */
   * Do we have a valid URI?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((dest = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -5036,7 +5069,7 @@ delete_printer(cupsd_client_t  *con,      /* I - Client connection */
   * Remove old jobs...
   */
 
-  cupsdCancelJobs(dest, NULL, 1);
+  cupsdCancelJobs(printer->name, NULL, 1);
 
  /*
   * Remove old subscriptions and send a "deleted printer" event...
@@ -5045,32 +5078,34 @@ delete_printer(cupsd_client_t  *con,    /* I - Client connection */
   cupsdAddEvent(CUPSD_EVENT_PRINTER_DELETED, printer, NULL,
                 "%s \"%s\" deleted by \"%s\".",
                (dtype & CUPS_PRINTER_CLASS) ? "Class" : "Printer",
-               dest, get_username(con));
+               printer->name, get_username(con));
 
   cupsdExpireSubscriptions(printer, NULL);
+
  /*
   * Remove any old PPD or script files...
   */
 
-  snprintf(filename, sizeof(filename), "%s/interfaces/%s", ServerRoot, dest);
+  snprintf(filename, sizeof(filename), "%s/interfaces/%s", ServerRoot,
+           printer->name);
   unlink(filename);
 
-  snprintf(filename, sizeof(filename), "%s/ppd/%s.ppd", ServerRoot, dest);
+  snprintf(filename, sizeof(filename), "%s/ppd/%s.ppd", ServerRoot,
+           printer->name);
   unlink(filename);
 
   if (dtype & CUPS_PRINTER_CLASS)
   {
-    cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" deleted by \"%s\".", dest,
-                    get_username(con));
+    cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" deleted by \"%s\".",
+                    printer->name, get_username(con));
 
     cupsdDeletePrinter(printer, 0);
     cupsdSaveAllClasses();
   }
   else
   {
-    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" deleted by \"%s\".", dest,
-                    get_username(con));
+    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" deleted by \"%s\".",
+                    printer->name, get_username(con));
 
     cupsdDeletePrinter(printer, 0);
     cupsdSaveAllPrinters();
@@ -5313,7 +5348,7 @@ get_jobs(cupsd_client_t  *con,            /* I - Client connection */
   const char   *dest;                  /* Destination */
   cups_ptype_t dtype;                  /* Destination type (printer or class) */
   cups_ptype_t dmask;                  /* Destination type mask */
-  char         method[HTTP_MAX_URI],   /* Method portion of URI */
+  char         scheme[HTTP_MAX_URI],   /* Scheme 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 */
@@ -5335,8 +5370,8 @@ get_jobs(cupsd_client_t  *con,            /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
+  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
+                  sizeof(scheme), username, sizeof(username), host,
                  sizeof(host), &port, resource, sizeof(resource));
 
   if (!strcmp(resource, "/") ||
@@ -5361,7 +5396,8 @@ get_jobs(cupsd_client_t  *con,            /* I - Client connection */
     dmask   = CUPS_PRINTER_CLASS;
     printer = NULL;
   }
-  else if ((dest = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  else if ((dest = cupsdValidateDest(uri->values[0].string.text, &dtype,
+                                     &printer)) == NULL)
   {
    /*
     * Bad URI...
@@ -5383,7 +5419,8 @@ get_jobs(cupsd_client_t  *con,            /* I - Client connection */
 
   if (printer)
   {
-    if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, NULL)) != HTTP_OK)
+    if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con,
+                                   NULL)) != HTTP_OK)
     {
       send_http_error(con, status);
       return;
@@ -5512,7 +5549,7 @@ get_notifications(cupsd_client_t *con)    /* I - Client connection */
   int                  interval;       /* Poll interval */
 
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_subscription_attrs(con=%p[%d])",
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_notifications(con=%p[%d])",
                   con, con->http.fd);
 
  /*
@@ -5720,15 +5757,6 @@ get_printer_attrs(cupsd_client_t  *con,  /* I - Client connection */
 {
   http_status_t                status;         /* Policy status */
   cups_ptype_t         dtype;          /* Destination type (printer or class) */
-  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 */
   cupsd_printer_t      *printer;       /* Printer/class */
   cups_array_t         *ra;            /* Requested attributes array */
 
@@ -5740,11 +5768,7 @@ get_printer_attrs(cupsd_client_t  *con,  /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if (!cupsdValidateDest(host, resource, &dtype, &printer))
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -6007,8 +6031,8 @@ get_subscriptions(cupsd_client_t  *con,   /* I - Client connection */
   cups_array_t         *ra;            /* Requested attributes array */
   ipp_attribute_t      *attr;          /* Attribute */
   cups_ptype_t         dtype;          /* Destination type (printer or class) */
-  char                 method[HTTP_MAX_URI],
-                                       /* Method portion of URI */
+  char                 scheme[HTTP_MAX_URI],
+                                       /* Scheme portion of URI */
                        username[HTTP_MAX_URI],
                                        /* Username portion of URI */
                        host[HTTP_MAX_URI],
@@ -6028,8 +6052,8 @@ get_subscriptions(cupsd_client_t  *con,   /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
+  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
+                  sizeof(scheme), username, sizeof(username), host,
                  sizeof(host), &port, resource, sizeof(resource));
 
   if (!strcmp(resource, "/") ||
@@ -6052,7 +6076,7 @@ get_subscriptions(cupsd_client_t  *con,   /* I - Client connection */
       return;
     }
   }
-  else if (!cupsdValidateDest(host, resource, &dtype, &printer))
+  else if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -6316,7 +6340,7 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
   const char   *src;                   /* Source printer/class */
   cups_ptype_t stype,                  /* Source type (printer or class) */
                dtype;                  /* Destination type (printer or class) */
-  char         method[HTTP_MAX_URI],   /* Method portion of URI */
+  char         scheme[HTTP_MAX_URI],   /* Scheme 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 */
@@ -6343,12 +6367,8 @@ move_job(cupsd_client_t  *con,           /* I - Client connection */
                     _("job-printer-uri attribute missing!"));
     return;
   }
-    
-  httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
 
-  if (!cupsdValidateDest(host, resource, &dtype, &dprinter))
+  if (!cupsdValidateDest(attr->values[0].string.text, &dtype, &dprinter))
   {
    /*
     * Bad URI...
@@ -6363,7 +6383,8 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
   * Check policy...
   */
 
-  if ((status = cupsdCheckPolicy(dprinter->op_policy_ptr, con, NULL)) != HTTP_OK)
+  if ((status = cupsdCheckPolicy(dprinter->op_policy_ptr, con,
+                                 NULL)) != HTTP_OK)
   {
     send_http_error(con, status);
     return;
@@ -6373,8 +6394,8 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
   * See if we have a job URI or a printer URI...
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
+  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, scheme,
+                  sizeof(scheme), username, sizeof(username), host,
                  sizeof(host), &port, resource, sizeof(resource));
 
   if (!strcmp(uri->name, "printer-uri"))
@@ -6390,7 +6411,8 @@ move_job(cupsd_client_t  *con,            /* I - Client connection */
       * Move all jobs...
       */
 
-      if ((src = cupsdValidateDest(host, resource, &stype, &sprinter)) == NULL)
+      if ((src = cupsdValidateDest(uri->values[0].string.text, &stype,
+                                   &sprinter)) == NULL)
       {
        /*
        * Bad URI...
@@ -6638,6 +6660,7 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
 {
   ipp_attribute_t *attr;               /* Current attribute */
   ipp_attribute_t *format;             /* Document-format attribute */
+  const char   *default_format;        /* document-format-default value */
   cupsd_job_t  *job;                   /* New job */
   char         filename[1024];         /* Job filename */
   mime_type_t  *filetype;              /* Type of file */
@@ -6694,6 +6717,21 @@ print_job(cupsd_client_t  *con,          /* I - Client connection */
     return;
   }
 
+ /*
+  * Is the destination valid?
+  */
+
+  if (!cupsdValidateDest(uri->values[0].string.text, NULL, &printer))
+  {
+   /*
+    * Bad URI...
+    */
+
+    send_ipp_status(con, IPP_NOT_FOUND,
+                    _("The printer or class was not found."));
+    return;
+  }
+
  /*
   * Is it a format we support?
   */
@@ -6705,7 +6743,8 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
     * Grab format from client...
     */
 
-    if (sscanf(format->values[0].string.text, "%15[^/]/%31[^;]", super, type) != 2)
+    if (sscanf(format->values[0].string.text, "%15[^/]/%31[^;]", super,
+               type) != 2)
     {
       send_ipp_status(con, IPP_BAD_REQUEST,
                       _("Could not scan type \"%s\"!"),
@@ -6713,10 +6752,26 @@ print_job(cupsd_client_t  *con,         /* I - Client connection */
       return;
     }
   }
+  else if ((default_format = cupsGetOption("document-format",
+                                           printer->num_options,
+                                          printer->options)) != NULL)
+  {
+   /*
+    * Use default document format...
+    */
+
+    if (sscanf(default_format, "%15[^/]/%31[^;]", super, type) != 2)
+    {
+      send_ipp_status(con, IPP_BAD_REQUEST,
+                      _("Could not scan type \"%s\"!"),
+                     default_format);
+      return;
+    }
+  }
   else
   {
    /*
-    * No document format attribute?  Auto-type it!
+    * Auto-type it!
     */
 
     strcpy(super, "application");
@@ -6739,32 +6794,35 @@ print_job(cupsd_client_t  *con,         /* I - Client connection */
                             doc_name ? doc_name->values[0].string.text : NULL,
                            &compression);
 
-    if (filetype)
-    {
-     /*
-      * Replace the document-format attribute value with the auto-typed one.
-      */
+    if (!filetype)
+      filetype = mimeType(MimeDatabase, super, type);
+  }
+  else
+    filetype = mimeType(MimeDatabase, super, type);
 
-      snprintf(mimetype, sizeof(mimetype), "%s/%s", filetype->super,
-               filetype->type);
+  if (filetype &&
+      (!format ||
+       (!strcmp(super, "application") && !strcmp(type, "octet-stream"))))
+  {
+   /*
+    * Replace the document-format attribute value with the auto-typed or
+    * default one.
+    */
 
-      if (format)
-      {
-         _cupsStrFree(format->values[0].string.text);
+    snprintf(mimetype, sizeof(mimetype), "%s/%s", filetype->super,
+             filetype->type);
 
-       format->values[0].string.text = _cupsStrAlloc(mimetype);
-      }
-      else
-        ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
-                    "document-format", NULL, mimetype);
+    if (format)
+    {
+      _cupsStrFree(format->values[0].string.text);
+
+      format->values[0].string.text = _cupsStrAlloc(mimetype);
     }
     else
-      filetype = mimeType(MimeDatabase, super, type);
+      ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
+                  "document-format", NULL, mimetype);
   }
-  else
-    filetype = mimeType(MimeDatabase, super, type);
-
-  if (!filetype)
+  else if (!filetype)
   {
     send_ipp_status(con, IPP_DOCUMENT_FORMAT,
                     _("Unsupported format \'%s/%s\'!"), super, type);
@@ -6793,7 +6851,7 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
   * Create the job object...
   */
 
-  if ((job = add_job(con, uri, &printer, filetype)) == NULL)
+  if ((job = add_job(con, printer, filetype)) == NULL)
     return;
 
  /*
@@ -7058,12 +7116,6 @@ reject_jobs(cupsd_client_t  *con,        /* I - Client connection */
 {
   http_status_t        status;                 /* Policy status */
   cups_ptype_t dtype;                  /* Destination type (printer or class) */
-  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   *name;                  /* Printer name */
   cupsd_printer_t *printer;            /* Printer data */
   ipp_attribute_t *attr;               /* printer-state-message text */
 
@@ -7075,11 +7127,7 @@ reject_jobs(cupsd_client_t  *con,        /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((name = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -7120,14 +7168,14 @@ reject_jobs(cupsd_client_t  *con,       /* I - Client connection */
     cupsdSaveAllClasses();
 
     cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" rejecting jobs (\"%s\").",
-                    name, get_username(con));
+                    printer->name, get_username(con));
   }
   else
   {
     cupsdSaveAllPrinters();
 
     cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" rejecting jobs (\"%s\").",
-                    name, get_username(con));
+                    printer->name, get_username(con));
   }
 
  /*
@@ -7499,22 +7547,24 @@ restart_job(cupsd_client_t  *con,       /* I - Client connection */
  */
 
 static void
-save_auth_info(cupsd_client_t *con,    /* I - Client connection */
-               cupsd_job_t    *job)    /* I - Job */
+save_auth_info(
+    cupsd_client_t  *con,              /* I - Client connection */
+    cupsd_job_t     *job,              /* I - Job */
+    ipp_attribute_t *auth_info)                /* I - auth-info attribute, if any */
 {
   int          i;                      /* Looping var */
   char         filename[1024];         /* Job authentication filename */
   cups_file_t  *fp;                    /* Job authentication file */
-  char         line[1024];             /* Line for file */
+  char         line[2048];             /* Line for file */
 
 
  /*
   * This function saves the in-memory authentication information for
   * a job so that it can be used to authenticate with a remote host.
   * The information is stored in a file that is readable only by the
-  * root user.  The username and password are Base-64 encoded, each
-  * on a separate line, followed by random number (up to 1024) of
-  * newlines to limit the amount of information that is exposed.
+  * root user.  The fields are Base-64 encoded, each on a separate line,
+  * followed by random number (up to 1024) of newlines to limit the
+  * amount of information that is exposed.
   *
   * Because of the potential for exposing of authentication information,
   * this functionality is only enabled when running cupsd as root.
@@ -7550,19 +7600,35 @@ save_auth_info(cupsd_client_t *con,     /* I - Client connection */
   fchown(cupsFileNumber(fp), 0, 0);
   fchmod(cupsFileNumber(fp), 0400);
 
- /*
-  * Write the authenticated username...
-  */
+  if (auth_info)
+  {
+   /*
+    * Write 1 to 4 auth values...
+    */
 
-  httpEncode64_2(line, sizeof(line), con->username, strlen(con->username));
-  cupsFilePrintf(fp, "%s\n", line);
+    for (i = 0; i < auth_info->num_values; i ++)
+    {
+      httpEncode64_2(line, sizeof(line), auth_info->values[i].string.text,
+                     strlen(auth_info->values[i].string.text));
+      cupsFilePrintf(fp, "%s\n", line);
+    }
+  }
+  else
+  {
+   /*
+    * Write the authenticated username...
+    */
 
- /*
-  * Write the authenticated password...
-  */
+    httpEncode64_2(line, sizeof(line), con->username, strlen(con->username));
+    cupsFilePrintf(fp, "%s\n", line);
 
-  httpEncode64_2(line, sizeof(line), con->password, strlen(con->password));
-  cupsFilePrintf(fp, "%s\n", line);
+   /*
+    * Write the authenticated password...
+    */
+
+    httpEncode64_2(line, sizeof(line), con->password, strlen(con->password));
+    cupsFilePrintf(fp, "%s\n", line);
+  }
 
  /*
   * Write a random number of newlines to the end of the file...
@@ -7576,7 +7642,66 @@ save_auth_info(cupsd_client_t *con,      /* I - Client connection */
   */
 
   cupsFileClose(fp);
+
+#if defined(HAVE_GSSAPI) && defined(HAVE_KRB5_H)
+  save_krb5_creds(con, job);
+#endif /* HAVE_GSSAPI && HAVE_KRB5_H */
+}
+
+
+#if defined(HAVE_GSSAPI) && defined(HAVE_KRB5_H)
+/*
+ * 'save_krb5_creds()' - Save Kerberos credentials for the job.
+ */
+
+static void
+save_krb5_creds(cupsd_client_t *con,   /* I - Client connection */
+                cupsd_job_t    *job)   /* I - Job */
+{
+#  ifndef __APPLE__
+  krb5_context krb_context;            /* Kerberos context */
+  krb5_ccache  ccache;                 /* Credentials cache */
+  OM_uint32    major_status,           /* Major status code */
+               minor_status;           /* Minor status code */
+
+
+ /*
+  * Setup a cached context for the job filters to use...
+  */
+
+  if (krb5_init_context(&krb_context))
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to initialize Kerberos context");
+    return;
+  }
+
+#  ifdef HAVE_HEIMDAL
+  if (krb5_cc_gen_new(krb_context, &krb5_fcc_ops, &ccache))
+#  else
+  if (krb5_cc_gen_new(krb_context, &ccache))
+#  endif /* HAVE_HEIMDAL */
+  {
+    cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create new credentials");
+    return;
+  }
+
+  major_status = gss_krb5_copy_ccache(&minor_status, con->gss_delegated_cred,
+                                     ccache);
+
+  if (GSS_ERROR(major_status))
+  {
+    cupsdLogGSSMessage(CUPSD_LOG_ERROR, major_status, minor_status,
+                       "Unable to import client credentials cache");
+    krb5_cc_destroy(krb_context, ccache);
+    return;
+  }
+
+  cupsdSetStringf(&(job->ccname), "KRB5CCNAME=FILE:%s",
+                  krb5_cc_get_name(krb_context, ccache));
+  krb5_cc_close(krb_context, ccache);
+#  endif /* !__APPLE__ */
 }
+#endif /* HAVE_GSSAPI && HAVE_KRB5_H */
 
 
 /*
@@ -7589,6 +7714,7 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
 {
   ipp_attribute_t      *attr;          /* Current attribute */
   ipp_attribute_t      *format;        /* Document-format attribute */
+  const char           *default_format;/* document-format-default value */
   int                  jobid;          /* Job ID number */
   cupsd_job_t          *job;           /* Current job */
   char                 job_uri[HTTP_MAX_URI],
@@ -7747,6 +7873,22 @@ send_document(cupsd_client_t  *con,      /* I - Client connection */
       return;
     }
   }
+  else if ((default_format = cupsGetOption("document-format",
+                                           printer->num_options,
+                                          printer->options)) != NULL)
+  {
+   /*
+    * Use default document format...
+    */
+
+    if (sscanf(default_format, "%15[^/]/%31[^;]", super, type) != 2)
+    {
+      send_ipp_status(con, IPP_BAD_REQUEST,
+                      _("Could not scan type \"%s\"!"),
+                     default_format);
+      return;
+    }
+  }
   else
   {
    /*
@@ -7773,31 +7915,35 @@ send_document(cupsd_client_t  *con,     /* I - Client connection */
                             doc_name ? doc_name->values[0].string.text : NULL,
                            &compression);
 
-    if (filetype)
-    {
-     /*
-      * Replace the document-format attribute value with the auto-typed one.
-      */
-
-      snprintf(mimetype, sizeof(mimetype), "%s/%s", filetype->super,
-               filetype->type);
-
-      if (format)
-      {
-       _cupsStrFree(format->values[0].string.text);
-       format->values[0].string.text = _cupsStrAlloc(mimetype);
-      }
-      else
-        ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
-                    "document-format", NULL, mimetype);
-    }
-    else
+    if (!filetype)
       filetype = mimeType(MimeDatabase, super, type);
   }
   else
     filetype = mimeType(MimeDatabase, super, type);
 
-  if (!filetype)
+  if (filetype &&
+      (!format ||
+       (!strcmp(super, "application") && !strcmp(type, "octet-stream"))))
+  {
+   /*
+    * Replace the document-format attribute value with the auto-typed or
+    * default one.
+    */
+
+    snprintf(mimetype, sizeof(mimetype), "%s/%s", filetype->super,
+             filetype->type);
+
+    if (format)
+    {
+      _cupsStrFree(format->values[0].string.text);
+
+      format->values[0].string.text = _cupsStrAlloc(mimetype);
+    }
+    else
+      ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
+                  "document-format", NULL, mimetype);
+  }
+  else if (!filetype)
   {
     send_ipp_status(con, IPP_DOCUMENT_FORMAT,
                     _("Unsupported format \'%s/%s\'!"), super, type);
@@ -8035,16 +8181,6 @@ set_default(cupsd_client_t  *con,        /* I - Client connection */
 {
   http_status_t                status;         /* Policy status */
   cups_ptype_t         dtype;          /* Destination type (printer or class) */
-  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           *name;          /* Printer name */
   cupsd_printer_t      *printer;       /* Printer */
 
 
@@ -8055,11 +8191,7 @@ set_default(cupsd_client_t  *con,        /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((name = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -8092,8 +8224,8 @@ set_default(cupsd_client_t  *con, /* I - Client connection */
   cupsdWritePrintcap();
 
   cupsdLogMessage(CUPSD_LOG_INFO,
-                  "Default destination set to \"%s\" by \"%s\".", name,
-                  get_username(con));
+                  "Default destination set to \"%s\" by \"%s\".",
+                 printer->name, get_username(con));
 
  /*
   * Everything was ok, so return OK status...
@@ -8613,10 +8745,6 @@ set_printer_defaults(
                       attr->values[0].string.text);
       cupsdSetString(&printer->error_policy, attr->values[0].string.text);
     }
-    else if (!strcmp(attr->name, "document-format-default") ||
-             !strcmp(attr->name, "notify-lease-duration-default") ||
-             !strcmp(attr->name, "notify-events-default"))
-      continue;
 
    /*
     * Skip any other non-default attributes...
@@ -8717,16 +8845,6 @@ start_printer(cupsd_client_t  *con,      /* I - Client connection */
 {
   http_status_t                status;         /* Policy status */
   cups_ptype_t         dtype;          /* Destination type (printer or class) */
-  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           *name;          /* Printer name */
   cupsd_printer_t      *printer;       /* Printer data */
 
 
@@ -8737,11 +8855,7 @@ start_printer(cupsd_client_t  *con,      /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((name = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -8771,11 +8885,11 @@ start_printer(cupsd_client_t  *con,     /* I - Client connection */
   cupsdStartPrinter(printer, 1);
 
   if (dtype & CUPS_PRINTER_CLASS)
-    cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" started by \"%s\".", name,
-                    get_username(con));
+    cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" started by \"%s\".",
+                    printer->name, get_username(con));
   else
-    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" started by \"%s\".", name,
-                    get_username(con));
+    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" started by \"%s\".",
+                    printer->name, get_username(con));
 
   cupsdCheckJobs();
 
@@ -8797,16 +8911,6 @@ stop_printer(cupsd_client_t  *con,       /* I - Client connection */
 {
   http_status_t                status;         /* Policy status */
   cups_ptype_t         dtype;          /* Destination type (printer or class) */
-  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           *name;          /* Printer name */
   cupsd_printer_t      *printer;       /* Printer data */
   ipp_attribute_t      *attr;          /* printer-state-message attribute */
 
@@ -8818,11 +8922,7 @@ stop_printer(cupsd_client_t  *con,       /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if ((name = cupsdValidateDest(host, resource, &dtype, &printer)) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -8859,11 +8959,11 @@ stop_printer(cupsd_client_t  *con,      /* I - Client connection */
   cupsdStopPrinter(printer, 1);
 
   if (dtype & CUPS_PRINTER_CLASS)
-    cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" stopped by \"%s\".", name,
-                    get_username(con));
+    cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" stopped by \"%s\".",
+                    printer->name, get_username(con));
   else
-    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" stopped by \"%s\".", name,
-                    get_username(con));
+    cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" stopped by \"%s\".",
+                    printer->name, get_username(con));
 
  /*
   * Everything was ok, so return OK status...
@@ -8989,15 +9089,6 @@ validate_job(cupsd_client_t  *con,       /* I - Client connection */
   ipp_attribute_t      *attr;          /* Current attribute */
   ipp_attribute_t      *format;        /* Document-format attribute */
   cups_ptype_t         dtype;          /* Destination type (printer or class) */
-  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 */
   char                 super[MIME_MAX_SUPER],
                                        /* Supertype of file */
                        type[MIME_MAX_TYPE];
@@ -9057,11 +9148,7 @@ validate_job(cupsd_client_t  *con,       /* I - Client connection */
   * Is the destination valid?
   */
 
-  httpSeparateURI(HTTP_URI_CODING_ALL, uri->values[0].string.text, method,
-                  sizeof(method), username, sizeof(username), host,
-                 sizeof(host), &port, resource, sizeof(resource));
-
-  if (cupsdValidateDest(host, resource, &dtype, &printer) == NULL)
+  if (!cupsdValidateDest(uri->values[0].string.text, &dtype, &printer))
   {
    /*
     * Bad URI...
@@ -9105,7 +9192,7 @@ validate_name(const char *name)   /* I - Name to check */
   */
 
   for (ptr = name; *ptr; ptr ++)
-    if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' || *ptr == '#')
+    if ((*ptr > 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' || *ptr == '#')
       return (0);
 
  /*
@@ -9161,5 +9248,5 @@ validate_user(cupsd_job_t    *job,        /* I - Job */
 
 
 /*
- * End of "$Id: ipp.c 6145 2006-12-06 20:10:16Z mike $".
+ * End of "$Id: ipp.c 6318 2007-03-06 04:36:55Z mike $".
  */
index f219c6980400b34703a255d6d7ba19259bd223e9..3c876a649f3774a0928b98aa3a675c6fa4291205 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: job.c 6234 2007-02-05 20:25:50Z mike $"
+ * "$Id: job.c 6318 2007-03-06 04:36:55Z mike $"
  *
  *   Job management routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -127,6 +127,8 @@ cupsdAddJob(int        priority,    /* I - Job priority */
   job->back_pipes[1]   = -1;
   job->print_pipes[0]  = -1;
   job->print_pipes[1]  = -1;
+  job->side_pipes[0]   = -1;
+  job->side_pipes[1]   = -1;
   job->status_pipes[0] = -1;
   job->status_pipes[1] = -1;
 
@@ -461,7 +463,6 @@ cupsdCleanJobs(void)
 void
 cupsdFinishJob(cupsd_job_t *job)       /* I - Job */
 {
-  int                  job_history;    /* Did cupsdCancelJob() keep the job? */
   cupsd_printer_t      *printer;       /* Current printer */
 
 
@@ -478,11 +479,7 @@ cupsdFinishJob(cupsd_job_t *job)   /* I - Job */
     * Close the pipe and clear the input bit.
     */
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdFinishJob: Removing fd %d from InputSet...",
-                    job->status_buffer->fd);
-
-    FD_CLR(job->status_buffer->fd, InputSet);
+    cupsdRemoveSelect(job->status_buffer->fd);
 
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                    "cupsdFinishJob: Closing status pipes [ %d %d ]...",
@@ -711,8 +708,6 @@ cupsdFinishJob(cupsd_job_t *job)    /* I - Job */
       * Close out this job...
       */
 
-      job_history = JobHistory && !(job->dtype & CUPS_PRINTER_REMOTE);
-
       cupsdCancelJob(job, 0, IPP_JOB_COMPLETED);
       cupsdCheckJobs();
     }
@@ -921,13 +916,6 @@ cupsdLoadJob(cupsd_job_t *job)             /* I - Job */
   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 */
@@ -1011,11 +999,7 @@ cupsdLoadJob(cupsd_job_t *job)            /* I - Job */
       return;
     }
 
-    httpSeparateURI(HTTP_URI_CODING_ALL, attr->values[0].string.text, scheme,
-                    sizeof(scheme), username, sizeof(username), host,
-                   sizeof(host), &port, resource, sizeof(resource));
-
-    if ((dest = cupsdValidateDest(host, resource, &(job->dtype),
+    if ((dest = cupsdValidateDest(attr->values[0].string.text, &(job->dtype),
                                   NULL)) == NULL)
     {
       cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -1427,7 +1411,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job,    /* I - Job */
       job->hold_until = curtime +
                         ((17 - curdate->tm_hour) * 60 + 59 -
                         curdate->tm_min) * 60 + 60 - curdate->tm_sec;
-  }  
+  }
   else if (!strcmp(when, "second-shift"))
   {
    /*
@@ -1443,7 +1427,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job,    /* I - Job */
       job->hold_until = curtime +
                         ((15 - curdate->tm_hour) * 60 + 59 -
                         curdate->tm_min) * 60 + 60 - curdate->tm_sec;
-  }  
+  }
   else if (!strcmp(when, "third-shift"))
   {
    /*
@@ -1459,7 +1443,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job,    /* I - Job */
       job->hold_until = curtime +
                         ((23 - curdate->tm_hour) * 60 + 59 -
                         curdate->tm_min) * 60 + 60 - curdate->tm_sec;
-  }  
+  }
   else if (!strcmp(when, "weekend"))
   {
    /*
@@ -1622,17 +1606,19 @@ cupsdStopJob(cupsd_job_t *job,          /* I - Job */
 
   cupsdClosePipe(job->back_pipes);
 
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdStopJob: Closing side pipes [ %d %d ]...",
+                  job->side_pipes[0], job->side_pipes[1]);
+
+  cupsdClosePipe(job->side_pipes);
+
   if (job->status_buffer)
   {
    /*
     * Close the pipe and clear the input bit.
     */
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdStopJob: Removing fd %d from InputSet...",
-                   job->status_buffer->fd);
-
-    FD_CLR(job->status_buffer->fd, InputSet);
+    cupsdRemoveSelect(job->status_buffer->fd);
 
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "cupsdStopJob: Closing status pipes [ %d %d ]...",
@@ -1710,7 +1696,7 @@ cupsdUpdateJob(cupsd_job_t *job)  /* I - Job to check */
        }
        else if (!sscanf(message, "%*d%d", &copies))
          copies = 1;
-         
+
         job->sheets->values[0].integer += copies;
 
        if (job->printer->page_limit)
@@ -1734,7 +1720,18 @@ cupsdUpdateJob(cupsd_job_t *job) /* I - Job to check */
       * Set attribute(s)...
       */
 
-      /**** TODO ****/
+      int              num_attrs;      /* Number of attributes */
+      cups_option_t    *attrs;         /* Attributes */
+      const char       *attr;          /* Attribute */
+
+
+      num_attrs = cupsParseOptions(message, 0, &attrs);
+
+      if ((attr = cupsGetOption("auth-info-required", num_attrs,
+                                attrs)) != NULL)
+        cupsdSetAuthInfoRequired(job->printer, attr, NULL);
+
+      cupsFreeOptions(num_attrs, attrs);
     }
 #ifdef __APPLE__
     else if (!strncmp(message, "recoverable:", 12))
@@ -1853,6 +1850,9 @@ free_job(cupsd_job_t *job)                /* I - Job */
 {
   cupsdClearString(&job->username);
   cupsdClearString(&job->dest);
+#ifdef HAVE_GSSAPI
+  cupsdClearString(&job->ccname);
+#endif /* HAVE_GSSAPI */
 
   if (job->num_files > 0)
   {
@@ -1867,7 +1867,7 @@ free_job(cupsd_job_t *job)                /* I - Job */
 
 
 /*
- * 'ipp_length()' - Compute the size of the buffer needed to hold 
+ * 'ipp_length()' - Compute the size of the buffer needed to hold
  *                 the textual IPP attributes.
  */
 
@@ -2082,6 +2082,8 @@ load_job_cache(const char *filename)      /* I - job.cache filename */
       job->back_pipes[1]   = -1;
       job->print_pipes[0]  = -1;
       job->print_pipes[1]  = -1;
+      job->side_pipes[0]   = -1;
+      job->side_pipes[1]   = -1;
       job->status_pipes[0] = -1;
       job->status_pipes[1] = -1;
 
@@ -2337,6 +2339,8 @@ load_request_root(void)
       job->back_pipes[1]   = -1;
       job->print_pipes[0]  = -1;
       job->print_pipes[1]  = -1;
+      job->side_pipes[0]   = -1;
+      job->side_pipes[1]   = -1;
       job->status_pipes[0] = -1;
       job->status_pipes[1] = -1;
 
@@ -2388,7 +2392,7 @@ set_time(cupsd_job_t *job,                /* I - Job to update */
  * 'set_hold_until()' - Set the hold time and update job-hold-until attribute...
  */
 
-static void 
+static void
 set_hold_until(cupsd_job_t *job,       /* I - Job to update */
               time_t      holdtime)    /* I - Hold until time */
 {
@@ -2414,7 +2418,7 @@ set_hold_until(cupsd_job_t *job,  /* I - Job to update */
   */
 
   holddate = gmtime(&holdtime);
-  snprintf(holdstr, sizeof(holdstr), "%d:%d:%d", holddate->tm_hour, 
+  snprintf(holdstr, sizeof(holdstr), "%d:%d:%d", holddate->tm_hour,
           holddate->tm_min, holddate->tm_sec);
 
   if ((attr = ippFindAttribute(job->attrs, "job-hold-until",
@@ -2445,8 +2449,10 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
 {
   int                  i;              /* Looping var */
   int                  slot;           /* Pipe slot */
-  cups_array_t         *filters;       /* Filters for job */
+  cups_array_t         *filters,       /* Filters for job */
+                       *prefilters;    /* Filters with prefilters */
   mime_filter_t                *filter,        /* Current filter */
+                       *prefilter,     /* Prefilter */
                        port_monitor;   /* Port monitor filter */
   char                 method[255],    /* Method for output */
                        *optptr,        /* Pointer to options */
@@ -2466,7 +2472,7 @@ start_job(cupsd_job_t     *job,           /* I - Job ID */
                        title[IPP_MAX_NAME],
                                        /* Job title string */
                        copies[255],    /* # copies string */
-                       *envp[MAX_ENV + 11],
+                       *envp[MAX_ENV + 12],
                                        /* Environment variables */
                        charset[255],   /* CHARSET env variable */
                        class_name[255],/* CLASS env variable */
@@ -2579,6 +2585,33 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
       cupsArrayDelete(filters);
       filters = NULL;
     }
+
+   /*
+    * If this printer has any pre-filters, insert the required pre-filter
+    * in the filters array...
+    */
+
+    if (printer->prefiltertype && filters)
+    {
+      prefilters = cupsArrayNew(NULL, NULL);
+
+      for (filter = (mime_filter_t *)cupsArrayFirst(filters);
+          filter;
+          filter = (mime_filter_t *)cupsArrayNext(filters))
+      {
+       if ((prefilter = mimeFilterLookup(MimeDatabase, filter->src,
+                                         printer->prefiltertype)))
+       {
+         cupsArrayAdd(prefilters, prefilter);
+         job->cost += prefilter->cost;
+       }
+
+       cupsArrayAdd(prefilters, filter);
+      }
+
+      cupsArrayDelete(filters);
+      filters = prefilters;
+    }
   }
 
  /*
@@ -2707,6 +2740,18 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
 
     fcntl(job->back_pipes[1], F_SETFL,
           fcntl(job->back_pipes[1], F_GETFL) | O_NONBLOCK);
+
+   /*
+    * Create the side-channel pipes and make them non-blocking...
+    */
+
+    socketpair(AF_LOCAL, SOCK_STREAM, 0, job->side_pipes);
+
+    fcntl(job->side_pipes[0], F_SETFL,
+          fcntl(job->side_pipes[0], F_GETFL) | O_NONBLOCK);
+
+    fcntl(job->side_pipes[1], F_SETFL,
+          fcntl(job->side_pipes[1], F_GETFL) | O_NONBLOCK);
   }
 
  /*
@@ -3083,6 +3128,11 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
     envp[envc ++] = class_name;
   }
 
+#ifdef HAVE_GSSAPI
+  if (job->ccname)
+    envp[envc ++] = job->ccname;
+#endif /* HAVE_GSSAPI */
+
   envp[envc] = NULL;
 
   for (i = 0; i < envc; i ++)
@@ -3115,19 +3165,19 @@ start_job(cupsd_job_t     *job,         /* I - Job ID */
                      strerror(errno));
       snprintf(printer->state_message, sizeof(printer->state_message),
               "Unable to create status pipes - %s.", strerror(errno));
-  
+
       cupsdAddPrinterHistory(printer);
-  
+
       cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job,
                    "Job canceled because the server could not create the job "
                    "status pipes.");
-  
+
       goto abort_job;
     }
-  
+
     cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job: status_pipes = [ %d %d ]",
                    job->status_pipes[0], job->status_pipes[1]);
-  
+
     job->status_buffer = cupsdStatBufNew(job->status_pipes[0], "[Job %d]",
                                         job->id);
   }
@@ -3244,7 +3294,8 @@ start_job(cupsd_job_t     *job,           /* I - Job ID */
 
     pid = cupsdStartProcess(command, argv, envp, filterfds[!slot][0],
                             filterfds[slot][1], job->status_pipes[1],
-                           job->back_pipes[0], 0, job->filters + i);
+                           job->back_pipes[0], job->side_pipes[0], 0,
+                           job->filters + i);
 
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "start_job: Closing filter pipes for slot %d "
@@ -3314,8 +3365,8 @@ start_job(cupsd_job_t     *job,           /* I - Job ID */
 
       pid = cupsdStartProcess(command, argv, envp, filterfds[!slot][0],
                              filterfds[slot][1], job->status_pipes[1],
-                             job->back_pipes[1], backroot,
-                             &(job->backend));
+                             job->back_pipes[1], job->side_pipes[1],
+                             backroot, &(job->backend));
 
       if (pid == 0)
       {
@@ -3353,6 +3404,12 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
 
       cupsdClosePipe(job->back_pipes);
 
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                      "start_job: Closing side pipes [ %d %d ]...",
+                     job->side_pipes[0], job->side_pipes[1]);
+
+      cupsdClosePipe(job->side_pipes);
+
       cupsdLogMessage(CUPSD_LOG_DEBUG2,
                      "start_job: Closing status output pipe %d...",
                      job->status_pipes[1]);
@@ -3397,11 +3454,8 @@ start_job(cupsd_job_t     *job,          /* I - Job ID */
 
   free(argv);
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "start_job: Adding fd %d to InputSet...",
-                  job->status_buffer->fd);
-
-  FD_SET(job->status_buffer->fd, InputSet);
+  cupsdAddSelect(job->status_buffer->fd, (cupsd_selfunc_t)cupsdUpdateJob, NULL,
+                 job);
 
   cupsdAddEvent(CUPSD_EVENT_JOB_STATE, job->printer, job, "Job #%d started.",
                 job->id);
@@ -3467,5 +3521,5 @@ unload_job(cupsd_job_t *job)              /* I - Job */
 
 
 /*
- * End of "$Id: job.c 6234 2007-02-05 20:25:50Z mike $".
+ * End of "$Id: job.c 6318 2007-03-06 04:36:55Z mike $".
  */
index 5c1b540eb4f3166d0727db8f8d8d0420106b5f47..4b8e399f12fd6b189526de7d5a322aed8e48858d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: job.h 5970 2006-09-19 20:11:08Z mike $"
+ * "$Id: job.h 6170 2007-01-02 17:26:41Z mike $"
  *
  *   Print job definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -46,6 +46,7 @@ typedef struct cupsd_job_s
   ipp_t                        *attrs;         /* Job attributes */
   int                  print_pipes[2], /* Print data pipes */
                        back_pipes[2],  /* Backchannel pipes */
+                       side_pipes[2],  /* Sidechannel pipes */
                        status_pipes[2];/* Status pipes */
   cupsd_statbuf_t      *status_buffer; /* Status buffer for this job */
   int                  cost;           /* Filtering cost */
@@ -55,6 +56,9 @@ typedef struct cupsd_job_s
   int                  status;         /* Status code from filters */
   cupsd_printer_t      *printer;       /* Printer this job is assigned to */
   int                  tries;          /* Number of tries for this job */
+#ifdef HAVE_GSSAPI
+  char                 *ccname;        /* KRB5CCNAME environment variable */
+#endif /* HAVE_GSSAPI */
 } cupsd_job_t;
 
 
@@ -122,5 +126,5 @@ extern void         cupsdUpdateJob(cupsd_job_t *job);
 
 
 /*
- * End of "$Id: job.h 5970 2006-09-19 20:11:08Z mike $".
+ * End of "$Id: job.h 6170 2007-01-02 17:26:41Z mike $".
  */
index 2c5ad2bd76b67c192e04c7907e815d65cc8f172b..258e292f7933a16daa570ec45c2b439f0deadb0c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: listen.c 5970 2006-09-19 20:11:08Z mike $"
+ * "$Id: listen.c 6123 2006-11-21 15:36:04Z mike $"
  *
  *   Server listening routines for the Common UNIX Printing System (CUPS)
  *   scheduler.
@@ -90,14 +90,7 @@ cupsdPauseListening(void)
   for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
        lis;
        lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
-    if (lis->fd >= 0)
-    {
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdPauseListening: Removing fd %d from InputSet...",
-                      lis->fd);
-
-      FD_CLR(lis->fd, InputSet);
-    }
+    cupsdRemoveSelect(lis->fd);
 }
 
 
@@ -123,13 +116,7 @@ cupsdResumeListening(void)
   for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
        lis;
        lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
-    if (lis->fd >= 0)
-    {
-      cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                      "cupsdResumeListening: Adding fd %d to InputSet...",
-                      lis->fd);
-      FD_SET(lis->fd, InputSet);
-    }
+    cupsdAddSelect(lis->fd, (cupsd_selfunc_t)cupsdAcceptClient, NULL, lis);
 }
 
 
@@ -444,5 +431,5 @@ cupsdStopListening(void)
 
 
 /*
- * End of "$Id: listen.c 5970 2006-09-19 20:11:08Z mike $".
+ * End of "$Id: listen.c 6123 2006-11-21 15:36:04Z mike $".
  */
index 3839dc87883cd0e9174387dd963c77f972f1646e..11c3cbcfe1a9d0134e369c115ff6b3520400a8df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: log.c 6027 2006-10-11 21:04:58Z mike $"
+ * "$Id: log.c 6328 2007-03-12 14:45:42Z mike $"
  *
  *   Log file routines for the Common UNIX Printing System (CUPS).
  *
  *
  * Contents:
  *
- *   cupsdGetDateTime() - Returns a pointer to a date/time string.
- *   cupsdLogMessage()  - Log a message to the error log file.
- *   cupsdLogPage()     - Log a page to the page log file.
- *   cupsdLogRequest()  - Log an HTTP request in Common Log Format.
- *   check_log_file()   - Open/rotate a log file if it needs it.
+ *   cupsdGetDateTime()   - Returns a pointer to a date/time string.
+ *   cupsdLogGSSMessage() - Log a GSSAPI error...
+ *   cupsdLogMessage()    - Log a message to the error log file.
+ *   cupsdLogPage()       - Log a page to the page log file.
+ *   cupsdLogRequest()    - Log an HTTP request in Common Log Format.
+ *   check_log_file()     - Open/rotate a log file if it needs it.
  */
 
 /*
@@ -107,6 +108,56 @@ cupsdGetDateTime(time_t t)         /* I - Time value */
 }
 
 
+#ifdef HAVE_GSSAPI
+/*
+ * 'cupsdLogGSSMessage()' - Log a GSSAPI error...
+ */
+
+int                                    /* O - 1 on success, 0 on error */
+cupsdLogGSSMessage(
+    int        level,                  /* I - Log level */
+    int               major_status,            /* I - Major GSSAPI status */
+    int               minor_status,            /* I - Minor GSSAPI status */
+    const char *message,               /* I - printf-style message string */
+    ...)                               /* I - Additional args as needed */
+{
+  OM_uint32    err_major_status,       /* Major status code for display */
+               err_minor_status;       /* Minor status code for display */
+  OM_uint32    msg_ctx;                /* Message context */
+  gss_buffer_desc major_status_string = GSS_C_EMPTY_BUFFER,
+                                       /* Major status message */
+               minor_status_string = GSS_C_EMPTY_BUFFER;
+                                       /* Minor status message */
+  int          ret;                    /* Return value */
+
+
+  msg_ctx             = 0;
+  err_major_status    = gss_display_status(&err_minor_status,
+                                          major_status,
+                                          GSS_C_GSS_CODE,
+                                          GSS_C_NO_OID,
+                                          &msg_ctx,
+                                          &major_status_string);
+
+  if (!GSS_ERROR(err_major_status))
+    err_major_status = gss_display_status(&err_minor_status,
+                                         minor_status,
+                                         GSS_C_MECH_CODE,
+                                         GSS_C_NULL_OID,
+                                         &msg_ctx,
+                                         &minor_status_string);
+
+  ret = cupsdLogMessage(level, "%s: %s, %s", message,
+                       (char *)major_status_string.value,
+                       (char *)minor_status_string.value);
+  gss_release_buffer(&err_minor_status, &major_status_string);
+  gss_release_buffer(&err_minor_status, &minor_status_string);
+
+  return (ret);
+}
+#endif /* HAVE_GSSAPI */
+
+
 /*
  * 'cupsdLogMessage()' - Log a message to the error log file.
  */
@@ -414,9 +465,10 @@ static int                         /* O  - 1 if log file open */
 check_log_file(cups_file_t **lf,       /* IO - Log file */
               const char  *logname)    /* I  - Log filename */
 {
-  char backname[1024],                 /* Backup log filename */
-       filename[1024],                 /* Formatted log filename */
-       *ptr;                           /* Pointer into filename */
+  char         backname[1024],         /* Backup log filename */
+               filename[1024],         /* Formatted log filename */
+               *ptr;                   /* Pointer into filename */
+  const char   *logptr;                /* Pointer into log filename */
 
 
  /*
@@ -448,17 +500,17 @@ check_log_file(cups_file_t **lf,  /* IO - Log file */
     else
       filename[0] = '\0';
 
-    for (ptr = filename + strlen(filename);
-         *logname && ptr < (filename + sizeof(filename) - 1);
-        logname ++)
-      if (*logname == '%')
+    for (logptr = logname, ptr = filename + strlen(filename);
+         *logptr && ptr < (filename + sizeof(filename) - 1);
+        logptr ++)
+      if (*logptr == '%')
       {
        /*
         * Format spec...
        */
 
-        logname ++;
-       if (*logname == 's')
+        logptr ++;
+       if (*logptr == 's')
        {
         /*
          * Insert the server name...
@@ -473,11 +525,11 @@ check_log_file(cups_file_t **lf,  /* IO - Log file */
          * Otherwise just insert the character...
          */
 
-         *ptr++ = *logname;
+         *ptr++ = *logptr;
        }
       }
       else
-       *ptr++ = *logname;
+       *ptr++ = *logptr;
 
     *ptr = '\0';
   }
@@ -551,5 +603,5 @@ check_log_file(cups_file_t **lf,    /* IO - Log file */
 
 
 /*
- * End of "$Id: log.c 6027 2006-10-11 21:04:58Z mike $".
+ * End of "$Id: log.c 6328 2007-03-12 14:45:42Z mike $".
  */
index 434cacf89200fecc2de4643da9fb5f13a8e9ac1c..8591cc0f37264b0e47c1903ffd67d2907480ca7d 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: main.c 6090 2006-11-14 16:35:27Z mike $"
+ * "$Id: main.c 6326 2007-03-11 17:50:18Z mike $"
  *
  *   Scheduler main loop for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
  *   cupsdSetStringf()         - Set a formatted string value.
  *   launchd_checkin()         - Check-in with launchd and collect the
  *                               listening fds.
+ *   launchd_checkout()        - Check-out with launchd.
  *   launchd_create_dict()     - Create a dictionary representing the launchd
  *                              config file org.cups.cupsd.plist.
- *   launchd_reload()          - Tell launchd to reload the configuration
- *                               file to pick up the new listening directives.
  *   launchd_sync_conf()       - Re-write the launchd config file
  *                              org.cups.cupsd.plist based on cupsd.conf.
  *   parent_handler()          - Catch USR1/CHLD signals...
 #ifdef HAVE_LAUNCH_H
 #  include <launch.h>
 #  include <libgen.h>
+#  define CUPS_KEEPALIVE       CUPS_STATEDIR "/org.cups.cupsd"
+                                       /* Name of the launchd KeepAlive file */
+#  ifndef LAUNCH_JOBKEY_KEEPALIVE
+#    define LAUNCH_JOBKEY_KEEPALIVE "KeepAlive"
+#  endif /* !LAUNCH_JOBKEY_KEEPALIVE */
+#  ifndef LAUNCH_JOBKEY_PATHSTATE
+#    define LAUNCH_JOBKEY_PATHSTATE "PathState"
+#  endif /* !LAUNCH_JOBKEY_PATHSTATE */
+#  ifndef LAUNCH_JOBKEY_SERVICEIPC
+#    define LAUNCH_JOBKEY_SERVICEIPC "ServiceIPC"
+#  endif /* !LAUNCH_JOBKEY_SERVICEIPC */
 #endif /* HAVE_LAUNCH_H */
 
 #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
@@ -78,8 +88,8 @@
 
 #ifdef HAVE_LAUNCHD
 static void            launchd_checkin(void);
+static void            launchd_checkout(void);
 static CFDictionaryRef launchd_create_dict(void);
-static void            launchd_reload(void);
 static int             launchd_sync_conf(void);
 #endif /* HAVE_LAUNCHD */
 static void            parent_handler(int sig);
@@ -126,8 +136,6 @@ main(int  argc,                             /* I - Number of command-line args */
   char                 *opt;           /* Option character */
   int                  fg;             /* Run in the foreground */
   int                  fds;            /* Number of ready descriptors */
-  fd_set               *input,         /* Input set for select() */
-                       *output;        /* Output set for select() */
   cupsd_client_t       *con;           /* Current client */
   cupsd_job_t          *job;           /* Current job */
   cupsd_listener_t     *lis;           /* Current listener */
@@ -136,14 +144,11 @@ main(int  argc,                           /* I - Number of command-line args */
                        browse_time,    /* Next browse send time */
                        senddoc_time,   /* Send-Document time */
                        expire_time,    /* Subscription expire time */
-#ifndef __APPLE__
-                       netif_time,     /* Network interface poll time */
-#endif /* !__APPLE__ */
                        mallinfo_time;  /* Malloc information time */
   size_t               string_count,   /* String count */
                        alloc_bytes,    /* Allocated string bytes */
                        total_bytes;    /* Total string bytes */
-  struct timeval       timeout;        /* select() timeout */
+  long                 timeout;        /* Timeout for cupsdDoSelect() */
   struct rlimit                limit;          /* Runtime limit */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction     action;         /* Actions for POSIX signals */
@@ -372,33 +377,23 @@ main(int  argc,                           /* I - Number of command-line args */
 
   getrlimit(RLIMIT_NOFILE, &limit);
 
+#if !defined(HAVE_POLL) && !defined(HAVE_EPOLL) && !defined(HAVE_KQUEUE)
   if (limit.rlim_max > FD_SETSIZE)
     MaxFDs = FD_SETSIZE;
   else
+#endif /* !HAVE_POLL && !HAVE_EPOLL && !HAVE_KQUEUE */
+#ifdef RLIM_INFINITY
+  if (limit.rlim_max == RLIM_INFINITY)
+    MaxFDs = 16384;
+  else
+#endif /* RLIM_INFINITY */
     MaxFDs = limit.rlim_max;
 
   limit.rlim_cur = MaxFDs;
 
   setrlimit(RLIMIT_NOFILE, &limit);
 
- /*
-  * Allocate memory for the input and output sets...
-  */
-
-  SetSize = (MaxFDs + 31) / 8 + 4;
-  if (SetSize < sizeof(fd_set))
-    SetSize = sizeof(fd_set);
-
-  InputSet  = (fd_set *)calloc(1, SetSize);
-  OutputSet = (fd_set *)calloc(1, SetSize);
-  input     = (fd_set *)calloc(1, SetSize);
-  output    = (fd_set *)calloc(1, SetSize);
-
-  if (InputSet == NULL || OutputSet == NULL || input == NULL || output == NULL)
-  {
-    syslog(LOG_LPR, "Unable to allocate memory for select() sets - exiting!");
-    return (1);
-  }
+  cupsdStartSelect();
 
  /*
   * Read configuration...
@@ -415,22 +410,15 @@ main(int  argc,                           /* I - Number of command-line args */
   if (Launchd)
   {
    /*
-    * If we were started by launchd make sure the cupsd plist file contains the
-    * same listeners as cupsd.conf; If it didn't then reload it before getting
-    * the list of listening file descriptors...
+    * If we were started by launchd, make sure the cupsd plist file contains
+    * the same listeners as cupsd.conf.
     */
 
-    if (launchd_sync_conf())
-    {
-      launchd_reload();
-
-     /*
-      * Until rdar://3854821 is fixed we have to exit after the reload...
-      */
+    launchd_sync_conf();
 
-      cupsdLogMessage(CUPSD_LOG_DEBUG2, "Exiting on launchd_reload");
-      exit(0);
-    }
+   /*
+    * Then get the file descriptors from launchd...
+    */
 
     launchd_checkin();
   }
@@ -551,9 +539,6 @@ main(int  argc,                             /* I - Number of command-line args */
   senddoc_time  = time(NULL);
   expire_time   = time(NULL);
   fds           = 1;
-#ifndef __APPLE__
-  netif_time    = 0;
-#endif /* !__APPLE__ */
 
   while (!stop_scheduler)
   {
@@ -632,19 +617,7 @@ main(int  argc,                            /* I - Number of command-line args */
 #if HAVE_LAUNCHD
        if (Launchd)
        {
-         if (launchd_sync_conf())
-         {
-           launchd_reload();
-
-          /*
-           * Until rdar://3854821 is fixed we have to exit after the reload...
-           */
-
-           cupsdLogMessage(CUPSD_LOG_DEBUG2, "Exiting on launchd_reload");
-           stop_scheduler = 1;
-           break;
-         }
-
+         launchd_sync_conf();
          launchd_checkin();
        }
 #endif /* HAVE_LAUNCHD */
@@ -658,18 +631,15 @@ main(int  argc,                           /* I - Number of command-line args */
     }
 
    /*
-    * Check for available input or ready output.  If select() returns
-    * 0 or -1, something bad happened and we should exit immediately.
+    * Check for available input or ready output.  If cupsdDoSelect()
+    * returns 0 or -1, something bad happened and we should exit
+    * immediately.
     *
     * Note that we at least have one listening socket open at all
     * times.
     */
 
-    memcpy(input, InputSet, SetSize);
-    memcpy(output, OutputSet, SetSize);
-
-    timeout.tv_sec  = select_timeout(fds);
-    timeout.tv_usec = 0;
+    timeout = select_timeout(fds);
 
 #if HAVE_LAUNCHD
    /*
@@ -678,71 +648,40 @@ main(int  argc,                           /* I - Number of command-line args */
     * inactivity...
     */
 
-    if (timeout.tv_sec == 86400 && Launchd && LaunchdTimeout && !NumPolled &&
-       (!Browsing || !(BrowseLocalProtocols & BROWSE_DNSSD) ||
-        cupsArrayCount(Printers) == 0))
+    if (timeout == 86400 && Launchd && LaunchdTimeout && !NumPolled &&
+       (!Browsing || 
+        (!BrowseRemoteProtocols && 
+         (!NumBrowsers || !BrowseLocalProtocols ||
+          cupsArrayCount(Printers) == 0))))
     {
-      timeout.tv_sec    = LaunchdTimeout;
+      timeout          = LaunchdTimeout;
       launchd_idle_exit = 1;
     }
     else
       launchd_idle_exit = 0;
 #endif /* HAVE_LAUNCHD */
 
-    if (timeout.tv_sec < 86400)                /* Only use timeout for < 1 day */
-      fds = select(MaxFDs, input, output, NULL, &timeout);
-    else
-      fds = select(MaxFDs, input, output, NULL, NULL);
-
-    if (fds < 0)
+    if ((fds = cupsdDoSelect(timeout)) < 0)
     {
-      char     s[16384],               /* String buffer */
-               *sptr;                  /* Pointer into buffer */
-      int      slen;                   /* Length of string buffer */
-
-
      /*
       * Got an error from select!
       */
 
-      if (errno == EINTR)      /* Just interrupted by a signal */
+#ifdef HAVE_DNSSD
+      cupsd_printer_t  *p;             /* Current printer */
+#endif /* HAVE_DNSSD */
+
+
+      if (errno == EINTR)              /* Just interrupted by a signal */
         continue;
 
      /*
       * Log all sorts of debug info to help track down the problem.
       */
 
-      cupsdLogMessage(CUPSD_LOG_EMERG, "select() failed - %s!",
+      cupsdLogMessage(CUPSD_LOG_EMERG, "cupsdDoSelect() failed - %s!",
                       strerror(errno));
 
-      strcpy(s, "InputSet =");
-      slen = 10;
-      sptr = s + 10;
-
-      for (i = 0; i < MaxFDs; i ++)
-        if (FD_ISSET(i, InputSet))
-       {
-          snprintf(sptr, sizeof(s) - slen, " %d", i);
-         slen += strlen(sptr);
-         sptr += strlen(sptr);
-       }
-
-      cupsdLogMessage(CUPSD_LOG_EMERG, "%s", s);
-
-      strcpy(s, "OutputSet =");
-      slen = 11;
-      sptr = s + 11;
-
-      for (i = 0; i < MaxFDs; i ++)
-        if (FD_ISSET(i, OutputSet))
-       {
-          snprintf(sptr, sizeof(s) - slen, " %d", i);
-         slen += strlen(sptr);
-         sptr += strlen(sptr);
-       }
-
-      cupsdLogMessage(CUPSD_LOG_EMERG, "%s", s);
-
       for (i = 0, con = (cupsd_client_t *)cupsArrayFirst(Clients);
           con;
           i ++, con = (cupsd_client_t *)cupsArrayNext(Clients))
@@ -772,6 +711,15 @@ main(int  argc,                            /* I - Number of command-line args */
                        job->status_buffer ? job->status_buffer->fd : -1,
                        job->print_pipes[0], job->print_pipes[1],
                        job->back_pipes[0], job->back_pipes[1]);
+
+#ifdef HAVE_DNSSD
+      for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
+          p;
+          p = (cupsd_printer_t *)cupsArrayNext(Printers))
+        cupsdLogMessage(CUPSD_LOG_EMERG, "printer[%s] %d", p->name,
+                       p->dnssd_ipp_fd);
+#endif /* HAVE_DNSSD */
+
       break;
     }
 
@@ -793,67 +741,6 @@ main(int  argc,                            /* I - Number of command-line args */
     }
 #endif /* HAVE_LAUNCHD */
 
-   /*
-    * Check for status info from job filters...
-    */
-
-    for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
-        job;
-        job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
-      if (job->status_buffer && FD_ISSET(job->status_buffer->fd, input))
-      {
-       /*
-        * Clear the input bit to avoid updating the next job
-       * using the same status pipe file descriptor...
-       */
-
-        FD_CLR(job->status_buffer->fd, input);
-
-       /*
-        * Read any status messages from the filters...
-       */
-
-        cupsdUpdateJob(job);
-      }
-
-   /*
-    * Update CGI messages as needed...
-    */
-
-    if (CGIPipes[0] >= 0 && FD_ISSET(CGIPipes[0], input))
-      cupsdUpdateCGI();
-
-   /*
-    * Handle system management events as needed...
-    */
-
-#ifdef __APPLE__
-   /*
-    * Mac OS X provides the SystemConfiguration framework for system
-    * configuration change events...
-    */
-
-    if (SysEventPipes[0] >= 0 && FD_ISSET(SysEventPipes[0], input))
-      cupsdUpdateSystemMonitor();
-#else
-   /*
-    * All other operating systems need to poll for changes...
-    */
-
-    if ((current_time - netif_time) >= 60)
-    {
-      NetIFUpdate = 1;
-      netif_time  = current_time;
-    }
-#endif /* __APPLE__ */
-
-   /*
-    * Update notifier messages as needed...
-    */
-
-    if (NotifierPipes[0] >= 0 && FD_ISSET(NotifierPipes[0], input))
-      cupsdUpdateNotifierStatus();
-
    /*
     * Expire subscriptions and unload completed jobs as needed...
     */
@@ -872,14 +759,8 @@ main(int  argc,                            /* I - Number of command-line args */
     * Update the browse list as needed...
     */
 
-    if (Browsing && BrowseRemoteProtocols)
+    if (Browsing)
     {
-      if (BrowseSocket >= 0 && FD_ISSET(BrowseSocket, input))
-        cupsdUpdateCUPSBrowse();
-
-      if (PollPipe >= 0 && FD_ISSET(PollPipe, input))
-        cupsdUpdatePolling();
-
 #ifdef HAVE_LIBSLP
       if ((BrowseRemoteProtocols & BROWSE_SLP) &&
           BrowseSLPRefresh <= current_time)
@@ -900,17 +781,20 @@ main(int  argc,                           /* I - Number of command-line args */
     }
 
    /*
-    * Check for new connections on the "listen" sockets...
+    * Update the root certificate once every 5 minutes if we have client
+    * connections...
     */
 
-    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);
-        cupsdAcceptClient(lis);
-      }
+    if ((current_time - RootCertTime) >= RootCertDuration && RootCertDuration &&
+        !RunUser && cupsArrayCount(Clients))
+    {
+     /*
+      * Update the root certificate...
+      */
+
+      cupsdDeleteCert(0);
+      cupsdAddCert(0, "root");
+    }
 
    /*
     * Check for new data on the client sockets...
@@ -921,61 +805,13 @@ main(int  argc,                           /* I - Number of command-line args */
         con = (cupsd_client_t *)cupsArrayNext(Clients))
     {
      /*
-      * Process the input buffer...
-      */
-
-      if (FD_ISSET(con->http.fd, input) || con->http.used)
-      {
-        int fd = con->file;
-
-
-        FD_CLR(con->http.fd, input);
-
-        if (!cupsdReadClient(con))
-       {
-         if (fd >= 0)
-           FD_CLR(fd, input);
-
-         continue;
-       }
-      }
-
-     /*
-      * Write data as needed...
+      * Process pending data in the input buffer...
       */
 
-      if (con->pipe_pid && FD_ISSET(con->file, input))
-      {
-       /*
-        * Keep track of pending input from the file/pipe separately
-       * so that we don't needlessly spin on select() when the web
-       * client is not ready to receive data...
-       */
-
-       FD_CLR(con->file, input);
-        con->file_ready = 1;
-
-#ifdef DEBUG
-        cupsdLogMessage(CUPSD_LOG_DEBUG2, "main: Data ready file %d!",
-                       con->file);
-#endif /* DEBUG */
-
-       if (!FD_ISSET(con->http.fd, output))
-       {
-         cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                         "main: Removing fd %d from InputSet...", con->file);
-         FD_CLR(con->file, input);
-         FD_CLR(con->file, InputSet);
-       }
-      }
-
-      if (FD_ISSET(con->http.fd, output))
+      if (con->http.used)
       {
-        FD_CLR(con->http.fd, output);
-
-       if (!con->pipe_pid || con->file_ready)
-          if (!cupsdWriteClient(con))
-           continue;
+        cupsdReadClient(con);
+       continue;
       }
 
      /*
@@ -1031,22 +867,6 @@ main(int  argc,                           /* I - Number of command-line args */
       mallinfo_time = current_time;
     }
 
-   /*
-    * Update the root certificate once every 5 minutes if we have client
-    * connections...
-    */
-
-    if ((current_time - RootCertTime) >= RootCertDuration && RootCertDuration &&
-        !RunUser && cupsArrayCount(Clients))
-    {
-     /*
-      * Update the root certificate...
-      */
-
-      cupsdDeleteCert(0);
-      cupsdAddCert(0, "root");
-    }
-
    /*
     * Handle OS-specific event notification for any events that have
     * accumulated.  Don't send these more than once a second...
@@ -1114,13 +934,17 @@ main(int  argc,                          /* I - Number of command-line args */
   * Update the launchd config file as needed...
   */
 
-  launchd_sync_conf();
+  if (Launchd)
+  {
+    launchd_checkout();
+    launchd_sync_conf();
 
-  if (launchd_conf_url)
-    CFRelease(launchd_conf_url);
+    if (launchd_conf_url)
+      CFRelease(launchd_conf_url);
 
-  if (launchd_conf_dict)
-    CFRelease(launchd_conf_dict);
+    if (launchd_conf_dict)
+      CFRelease(launchd_conf_dict);
+  }
 #endif /* HAVE_LAUNCHD */
 
 #ifdef __sgi
@@ -1135,14 +959,7 @@ main(int  argc,                           /* I - Number of command-line args */
       unlink("/var/spool/lp/SCHEDLOCK");
 #endif /* __sgi */
 
- /*
-  * Free memory used by FD sets and return...
-  */
-
-  free(InputSet);
-  free(OutputSet);
-  free(input);
-  free(output);
+  cupsdStopSelect();
 
   return (!stop_scheduler);
 }
@@ -1364,6 +1181,8 @@ launchd_checkin(void)
   cupsd_listener_t     *lis;           /* Listeners array */
   http_addr_t          addr;           /* Address variable */
   socklen_t            addrlen;        /* Length of address */
+  int                  fd;             /* File descriptor */
+  char                 s[256];         /* String addresss */
 
 
   cupsdLogMessage(CUPSD_LOG_DEBUG, "launchd_checkin: pid=%d", (int)getpid());
@@ -1417,56 +1236,77 @@ launchd_checkin(void)
 
   if (launch_data_get_type(ld_array) == LAUNCH_DATA_ARRAY)
   {
-   /*
-    * Free the listeners array built from cupsd.conf...
-    */
-
-    cupsdDeleteAllListeners();
-
-   /*
-    * Create a new array of listeners from the launchd data...
-    */
-
-    Listeners = cupsArrayNew(NULL, NULL);
-    count     = launch_data_array_get_count(ld_array);
+    count = launch_data_array_get_count(ld_array);
 
     for (i = 0; i < count; i ++)
     {
      /*
-      * Copy the current address and log it...
+      * Get the launchd file descriptor and address...
       */
 
-      if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
+      tmp     = launch_data_array_get_index(ld_array, i);
+      fd      = launch_data_get_fd(tmp);
+      addrlen = sizeof(addr);
+
+      if (getsockname(fd, (struct sockaddr *)&addr, &addrlen))
       {
        cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "launchd_checkin: Unable to allocate listener - %s.",
-                       strerror(errno));
-       exit(EXIT_FAILURE);
+                       "launchd_checkin: Unable to get local address - %s",
+                       strerror(errno));
+       continue;
       }
 
-      cupsArrayAdd(Listeners, lis);
+     /*
+      * Try to match the launchd socket address to one of the listeners...
+      */
 
-      tmp     = launch_data_array_get_index(ld_array, i);
-      lis->fd = launch_data_get_fd(tmp);
-      addrlen = sizeof(lis->address);
+      for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
+          lis;
+          lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
+       if (httpAddrEqual(&lis->address, &addr))
+         break;
+
+     /*
+      * Add a new listener If there's no match...
+      */
 
-      if (getsockname(lis->fd, (struct sockaddr *)&(lis->address), &addrlen))
+      if (lis)
       {
-       cupsdLogMessage(CUPSD_LOG_ERROR,
-                       "launchd_checkin: Unable to get local address - %s",
-                       strerror(errno));
+       cupsdLogMessage(CUPSD_LOG_DEBUG, 
+               "launchd_checkin: Matched existing listener %s with fd %d...",
+               httpAddrString(&(lis->address), s, sizeof(s)), fd);
+      }
+      else
+      {
+       cupsdLogMessage(CUPSD_LOG_DEBUG, 
+               "launchd_checkin: Adding new listener %s with fd %d...",
+               httpAddrString(&addr, s, sizeof(s)), fd);
+
+        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);
+
+       memcpy(&lis->address, &addr, sizeof(lis->address));
       }
 
+      lis->fd = fd;
+
 #  ifdef HAVE_SSL
       portnum = 0;
 
 #    ifdef AF_INET6
-      if (addr.addr.sa_family == AF_INET6)
-       portnum = ntohs(addr.ipv6.sin6_port);
+      if (lis->address.addr.sa_family == AF_INET6)
+       portnum = ntohs(lis->address.ipv6.sin6_port);
       else
 #    endif /* AF_INET6 */
-      if (addr.addr.sa_family == AF_INET)
-       portnum = ntohs(addr.ipv4.sin_port);
+      if (lis->address.addr.sa_family == AF_INET)
+       portnum = ntohs(lis->address.ipv4.sin_port);
 
       if (portnum == 443)
        lis->encryption = HTTP_ENCRYPT_ALWAYS;
@@ -1511,6 +1351,43 @@ launchd_checkin(void)
 }
 
 
+/*
+ * 'launchd_checkout()' - Update the launchd KeepAlive file as needed.
+ */
+
+static void
+launchd_checkout(void)
+{
+  int  fd;                             /* File descriptor */
+
+
+ /*
+  * Create or remove the launchd KeepAlive file based on whether
+  * there are active jobs, polling, browsing for remote printers or 
+  * shared printers to advertise...
+  */
+
+  if ((cupsArrayCount(ActiveJobs) || NumPolled || 
+       (Browsing && 
+       (BrowseRemoteProtocols ||
+        (BrowseLocalProtocols && NumBrowsers && cupsArrayCount(Printers))))))
+  {
+    cupsdLogMessage(CUPSD_LOG_DEBUG,
+                    "Creating launchd keepalive file \"" CUPS_KEEPALIVE "\"...");
+
+    if ((fd = open(CUPS_KEEPALIVE, O_RDONLY | O_CREAT | O_EXCL, S_IRUSR)) >= 0)
+      close(fd);
+  }
+  else
+  {
+    cupsdLogMessage(CUPSD_LOG_DEBUG,
+                    "Removing launchd keepalive file \"" CUPS_KEEPALIVE "\"...");
+
+    unlink(CUPS_KEEPALIVE);
+  }
+}
+
+
 /*
  * 'launchd_create_dict()' - Create a dictionary representing the launchd
  *                          config file org.cups.cupsd.plist.
@@ -1519,24 +1396,26 @@ launchd_checkin(void)
 static CFDictionaryRef                 /* O - CFDictionary */
 launchd_create_dict(void)
 {
-  int                    portnum;      /* Port number */
-  bool                   runatload;    /* Run at load? */
-  CFMutableDictionaryRef  cupsd_dict,  /* org.cups.cupsd.plist dictionary */
-                         sockets,      /* Sockets dictionary */
-                         listener;     /* Listener dictionary */
-  CFMutableArrayRef      array;        /* Array */
-  CFNumberRef            socket_mode;  /* Domain socket mode bits */
-  CFStringRef            socket_path;  /* Domain socket path */
-  CFTypeRef              value;        /* CF values */
-  cupsd_listener_t       *lis;         /* Current listening socket */
-  struct servent         *service;     /* Services data base entry */
-  char                   temp[1024];   /* Temporary buffer for value */
+  int                  portnum;        /* Port number */
+  bool                 runatload;      /* Run at load? */
+  CFMutableDictionaryRef cupsd_dict,   /* org.cups.cupsd.plist dictionary */
+                       keepalive,      /* KeepAlive dictionary */
+                       pathstate,      /* PathState dictionary */
+                       sockets,        /* Sockets dictionary */
+                       listener;       /* Listener dictionary */
+  CFMutableArrayRef    array;          /* Array */
+  CFNumberRef          socket_mode;    /* Domain socket mode bits */
+  CFStringRef          socket_path;    /* Domain socket path */
+  CFTypeRef            value;          /* CF values */
+  cupsd_listener_t     *lis;           /* Current listening socket */
+  struct servent       *service;       /* Services data base entry */
+  char                 temp[1024];     /* Temporary buffer for value */
 
 
   if ((cupsd_dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
                                &kCFTypeDictionaryKeyCallBacks,
                                &kCFTypeDictionaryValueCallBacks)) == NULL)
-    return NULL;
+    return (NULL);
 
   CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_LABEL),
                       CFSTR("org.cups.cupsd"));
@@ -1544,20 +1423,35 @@ launchd_create_dict(void)
                       kCFBooleanTrue);
 
  /*
-  * Run-at-load if there are active jobs, polling or shared printers
-  * to advertise...
+  * Use run-at-load and/or KeepAlive if there are active jobs, polling or
+  * shared printers to advertise...
   */
-  
+
+  if ((keepalive = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+                               &kCFTypeDictionaryKeyCallBacks,
+                               &kCFTypeDictionaryValueCallBacks)) != NULL)
+  {
+    if ((pathstate = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+                               &kCFTypeDictionaryKeyCallBacks,
+                               &kCFTypeDictionaryValueCallBacks)) != NULL)
+    {
+      CFDictionaryAddValue(pathstate, CFSTR(CUPS_KEEPALIVE), kCFBooleanTrue);
+      CFDictionaryAddValue(keepalive, CFSTR(LAUNCH_JOBKEY_PATHSTATE),
+                          pathstate);
+    }
+
+    CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_KEEPALIVE),
+                        keepalive);
+  }
+
   runatload = (cupsArrayCount(ActiveJobs) || NumPolled || 
               (Browsing && BrowseLocalProtocols && 
                NumBrowsers && cupsArrayCount(Printers))) ? true : false;
 
   CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_RUNATLOAD),
                       runatload ? kCFBooleanTrue : kCFBooleanFalse);
-#  ifdef LAUNCH_JOBKEY_SERVICEIPC
   CFDictionaryAddValue(cupsd_dict, CFSTR(LAUNCH_JOBKEY_SERVICEIPC),
                       kCFBooleanTrue);
-#  endif /* LAUNCH_JOBKEY_SERVICEIPC */
 
   if ((array = CFArrayCreateMutable(kCFAllocatorDefault, 2,
                                    &kCFTypeArrayCallBacks)) != NULL)
@@ -1727,106 +1621,6 @@ launchd_create_dict(void)
 }
 
 
-/*
- * 'launchd_reload()' - Tell launchd to reload the configuration file to pick
- *                      up the new listening directives.
- */
-
-static void
-launchd_reload(void)
-{
-  int          child_status;           /* Exit status of child process */
-  pid_t                child_pid,              /* Child PID */
-               waitpid_status;         /* Child process exit status */
-  char         *argv[4];               /* Argument strings */
-
-
- /*
-  * The current launchd doesn't support a reload option (rdar://3854821).
-  * Until this is fixed we need to reload the config file by execing launchctl
-  * twice (to unload then load). NOTE: This will cause us to exit on SIGTERM
-  * which will cancel all client & job activity.
-  *
-  * After this is fixed we'll be able to tell launchd to reload the file
-  * and pick up the new listening descriptors without disrupting current
-  * activity.
-  */
-
- /*
-  * Unloading the current configuration will cause launchd to send us a SIGTERM;
-  * block it for now so we can get our work done...
-  */
-
-  cupsdHoldSignals();
-
- /*
-  * Set up the unload arguments to launchctl...
-  */
-
-  argv[0] = "/bin/launchctl";
-  argv[1] = "unload";
-  argv[2] = LaunchdConf;
-  argv[3] = NULL;
-
-  if (cupsdStartProcess(argv[0], argv, NULL, -1, -1, -1, -1, 1, &child_pid) < 0)
-    cupsdLogMessage(CUPSD_LOG_ERROR,
-                    "launchd_reload: Unable to execute %s - %s", argv[0],
-                    strerror(errno));
-  else
-  {
-    do
-    {
-      waitpid_status = waitpid(child_pid, &child_status, 0);
-    }
-    while (waitpid_status == (pid_t)-1 && errno == EINTR);
-
-    if (WIFSIGNALED(child_status))
-      cupsdLogMessage(CUPSD_LOG_DEBUG,
-                      "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!",
-                     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,
-                          &child_pid) < 0)
-    {
-      cupsdLogMessage(CUPSD_LOG_ERROR,
-                      "launchd_reload: Unable to fork for %s - %s", argv[0],
-                      strerror(errno));
-    }
-    else
-    {
-      do
-      {
-       waitpid_status = waitpid(child_pid, &child_status, 0);
-      } while (waitpid_status == (pid_t)-1 && errno == EINTR);
-
-      if (WIFSIGNALED(child_status))
-       cupsdLogMessage(CUPSD_LOG_DEBUG,
-                       "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",
-                       basename(argv[0]), child_pid,
-                       WEXITSTATUS(child_status));
-    }
-  }
-
- /*
-  * Leave signals blocked since exit() will be called momentarily anyways...
-  */
-}
-
-
 /*
  * 'launchd_sync_conf()' - Rewrite the launchd config file
  *                        org.cups.cupsd.plist based on cupsd.conf.
@@ -1890,7 +1684,7 @@ launchd_sync_conf(void)
   if (!CFEqual(cupsd_dict, launchd_conf_dict))
   {
     if ((resourceData = CFPropertyListCreateXMLData(kCFAllocatorDefault,
-                                                 cupsd_dict)))
+                                                   cupsd_dict)))
     {
       if (CFURLWriteDataAndPropertiesToResource(launchd_conf_url, resourceData,
                                                 NULL, &errorCode))
@@ -2174,12 +1968,12 @@ select_timeout(int fds)                 /* I - Number of descriptors returned */
       return (0);
 
  /*
-  * If select has been active in the last second (fds != 0) or we have
+  * If select has been active in the last second (fds > 0) or we have
   * many resources in use then don't bother trying to optimize the
   * timeout, just make it 1 second.
   */
 
-  if (fds || cupsArrayCount(Clients) > 50)
+  if (fds > 0 || cupsArrayCount(Clients) > 50)
     return (1);
 
  /*
@@ -2225,7 +2019,7 @@ select_timeout(int fds)                   /* I - Number of descriptors returned */
     }
 #endif /* HAVE_LDAP */
 
-    if (BrowseLocalProtocols & BROWSE_CUPS)
+    if ((BrowseLocalProtocols & BROWSE_CUPS) && NumBrowsers)
     {
       for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
            p;
@@ -2239,7 +2033,7 @@ select_timeout(int fds)                   /* I - Number of descriptors returned */
            why     = "browse timeout a printer";
          }
        }
-       else if (!(p->type & CUPS_PRINTER_IMPLICIT))
+       else if (p->shared && !(p->type & CUPS_PRINTER_IMPLICIT))
        {
          if (BrowseInterval && (p->browse_time + BrowseInterval) < timeout)
          {
@@ -2313,8 +2107,8 @@ select_timeout(int fds)                   /* I - Number of descriptors returned */
   * Log and return the timeout value...
   */
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2, "select_timeout: %ld seconds to %s",
-                  timeout, why);
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "select_timeout(%d): %ld seconds to %s",
+                  fds, timeout, why);
 
   return (timeout);
 }
@@ -2340,5 +2134,5 @@ usage(int status)                 /* O - Exit status */
 
 
 /*
- * End of "$Id: main.c 6090 2006-11-14 16:35:27Z mike $".
+ * End of "$Id: main.c 6326 2007-03-11 17:50:18Z mike $".
  */
index 2e98d0b3ff57a973ba41e19182efc3fdd12b5c9d..052b42922e9b77f9892451a70cf650e5c5c3ac47 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: mime.c 5606 2006-05-30 19:40:34Z mike $"
+ * "$Id: mime.c 5605 2006-05-30 19:38:02Z mike $"
  *
  *   MIME database file routines for the Common UNIX Printing System (CUPS).
  *
@@ -738,5 +738,5 @@ load_types(mime_t     *mime,                /* I - MIME database */
 
 
 /*
- * End of "$Id: mime.c 5606 2006-05-30 19:40:34Z mike $".
+ * End of "$Id: mime.c 5605 2006-05-30 19:38:02Z mike $".
  */
index 2b44bf121282dfa6caf8298a589df9dbe362cfa3..16e9a3d7c0273b6ec35bdde396f3997397642a2b 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: mime.h 5771 2006-07-20 18:06:20Z mike $"
+ * "$Id: mime.h 6252 2007-02-10 15:34:18Z mike $"
  *
  *   MIME type/conversion database definitions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -143,6 +143,8 @@ extern mime_filter_t        *mimeAddFilter(mime_t *mime, mime_type_t *src,
 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);
+extern mime_filter_t   *mimeFilterLookup(mime_t *mime, mime_type_t *src,
+                                         mime_type_t *dst);
 extern mime_filter_t   *mimeFirstFilter(mime_t *mime);
 extern mime_filter_t   *mimeNextFilter(mime_t *mime);
 extern int             mimeNumFilters(mime_t *mime);
@@ -153,5 +155,5 @@ extern int          mimeNumFilters(mime_t *mime);
 #endif /* !_CUPS_MIME_H_ */
 
 /*
- * End of "$Id: mime.h 5771 2006-07-20 18:06:20Z mike $".
+ * End of "$Id: mime.h 6252 2007-02-10 15:34:18Z mike $".
  */
index e63d4f44e78abdee5316e90e85482fd177a7155a..b7057d7b440ed4a42ce4f928db4a1519487ab80e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: network.c 6090 2006-11-14 16:35:27Z mike $"
+ * "$Id: network.c 6086 2006-11-14 15:43:55Z mike $"
  *
  *   Network interface functions for the Common UNIX Printing System
  *   (CUPS) scheduler.
@@ -314,5 +314,5 @@ compare_netif(cupsd_netif_t *a,             /* I - First network interface */
 
 
 /*
- * End of "$Id: network.c 6090 2006-11-14 16:35:27Z mike $".
+ * End of "$Id: network.c 6086 2006-11-14 15:43:55Z mike $".
  */
index 5d8c83f8a4b3a97054400d074e1c88b74924daa7..c26e8dbb2d5b5d5264c8078581fe4a8f6b43bc79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: network.h 6090 2006-11-14 16:35:27Z mike $"
+ * "$Id: network.h 6086 2006-11-14 15:43:55Z mike $"
  *
  *   Network interface definitions for the Common UNIX Printing System
  *   (CUPS) scheduler.
@@ -57,5 +57,5 @@ extern void           cupsdNetIFUpdate(void);
 
 
 /*
- * End of "$Id: network.h 6090 2006-11-14 16:35:27Z mike $".
+ * End of "$Id: network.h 6086 2006-11-14 15:43:55Z mike $".
  */
index 606978e3e8d76adfb21f6669bdcd165497e0570f..668bbff6fd20cfe247470cb043f06942e52cadf1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: policy.c 5838 2006-08-17 14:41:42Z mike $"
+ * "$Id: policy.c 5837 2006-08-17 14:37:40Z mike $"
  *
  *   Policy routines for the Common UNIX Printing System (CUPS).
  *
@@ -330,5 +330,5 @@ cupsdFindPolicyOp(cupsd_policy_t *p,        /* I - Policy */
 
 
 /*
- * End of "$Id: policy.c 5838 2006-08-17 14:41:42Z mike $".
+ * End of "$Id: policy.c 5837 2006-08-17 14:37:40Z mike $".
  */
index 936c9d0be988ace9461c04fb0bef53b140c530b2..9a33a22212940d56235a8c0ca380099536a64742 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: printers.c 5970 2006-09-19 20:11:08Z mike $"
+ * "$Id: printers.c 6318 2007-03-06 04:36:55Z mike $"
  *
  *   Printer routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -70,7 +70,8 @@
  */
 
 static void    add_printer_defaults(cupsd_printer_t *p);
-static void    add_printer_filter(cupsd_printer_t *p, const char *filter);
+static void    add_printer_filter(cupsd_printer_t *p, mime_type_t *type,
+                                  const char *filter);
 static void    add_printer_formats(cupsd_printer_t *p);
 static int     compare_printers(void *first, void *second, void *data);
 static void    delete_printer_filters(cupsd_printer_t *p);
@@ -412,10 +413,6 @@ cupsdCreateCommonData(void)
   /* copies-supported */
   ippAddRange(CommonData, IPP_TAG_PRINTER, "copies-supported", 1, MaxCopies);
 
-  /* document-format-default */
-  ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
-               "document-format-default", NULL, "application/octet-stream");
-
   /* generated-natural-language-supported */
   ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_LANGUAGE,
                "generated-natural-language-supported", NULL, DefaultLanguage);
@@ -495,10 +492,6 @@ cupsdCreateCommonData(void)
                (int)(sizeof(notify_attrs) / sizeof(notify_attrs[0])),
                NULL, notify_attrs);
 
-  /* notify-lease-duration-default */
-  ippAddInteger(CommonData, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
-               "notify-lease-duration-default", DefaultLeaseDuration);
-
   /* notify-lease-duration-supported */
   ippAddRange(CommonData, IPP_TAG_PRINTER,
               "notify-lease-duration-supported", 0,
@@ -508,10 +501,6 @@ cupsdCreateCommonData(void)
   ippAddInteger(CommonData, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
                "notify-max-events-supported", MaxEvents);
 
-  /* notify-events-default */
-  ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
-               "notify-events-default", NULL, "job-completed");
-
   /* notify-events-supported */
   ippAddStrings(CommonData, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
                 "notify-events-supported",
@@ -703,13 +692,18 @@ cupsdDeletePrinter(
   }
 
  /*
-  * Remove this printer from any classes and send a browse delete message...
+  * Remove this printer from any classes...
   */
 
   if (!(p->type & CUPS_PRINTER_IMPLICIT))
   {
     cupsdDeletePrinterFromClasses(p);
-    cupsdSendBrowseDelete(p);
+
+   /*
+    * Deregister from any browse protocols...
+    */
+
+    cupsdDeregisterPrinter(p, 1);
   }
 
  /*
@@ -735,6 +729,7 @@ cupsdDeletePrinter(
   delete_printer_filters(p);
 
   mimeDeleteType(MimeDatabase, p->filetype);
+  mimeDeleteType(MimeDatabase, p->prefiltertype);
 
   cupsdFreePrinterUsers(p);
   cupsdFreeQuotas(p);
@@ -752,6 +747,11 @@ cupsdDeletePrinter(
   cupsdClearString(&p->op_policy);
   cupsdClearString(&p->error_policy);
 
+#ifdef HAVE_DNSSD
+  cupsdClearString(&p->product);
+  cupsdClearString(&p->pdl);
+#endif /* HAVE_DNSSD */
+
   cupsArrayDelete(p->filetypes);
 
   if (p->browse_attrs)
@@ -954,6 +954,13 @@ cupsdLoadAllPrinters(void)
                       "Syntax error on line %d of printers.conf.", linenum);
       return;
     }
+    else if (!strcasecmp(line, "AuthInfoRequired"))
+    {
+      if (!cupsdSetAuthInfoRequired(p, value, NULL))
+       cupsdLogMessage(CUPSD_LOG_ERROR,
+                       "Bad AuthInfoRequired on line %d of printers.conf.",
+                       linenum);
+    }
     else if (!strcasecmp(line, "Info"))
     {
       if (value)
@@ -1247,6 +1254,9 @@ cupsdRenamePrinter(
   mimeDeleteType(MimeDatabase, p->filetype);
   p->filetype = mimeAddType(MimeDatabase, "printer", name);
 
+  mimeDeleteType(MimeDatabase, p->prefiltertype);
+  p->prefiltertype = mimeAddType(MimeDatabase, "prefilter", name);
+
  /*
   * Rename the printer...
   */
@@ -1286,6 +1296,7 @@ cupsdSaveAllPrinters(void)
   time_t               curtime;        /* Current time */
   struct tm            *curdate;       /* Current date */
   cups_option_t                *option;        /* Current option */
+  const char           *ptr;           /* Pointer into info/location */
 
 
  /*
@@ -1359,12 +1370,49 @@ cupsdSaveAllPrinters(void)
     else
       cupsFilePrintf(fp, "<Printer %s>\n", printer->name);
 
+    if (printer->num_auth_info_required > 0)
+    {
+      cupsFilePrintf(fp, "AuthInfoRequired %s", printer->auth_info_required[0]);
+      for (i = 1; i < printer->num_auth_info_required; i ++)
+        cupsFilePrintf(fp, ",%s", printer->auth_info_required[i]);
+      cupsFilePutChar(fp, '\n');
+    }
+
     if (printer->info)
-      cupsFilePrintf(fp, "Info %s\n", printer->info);
+    {
+      if ((ptr = strchr(printer->info, '#')) != NULL)
+      {
+       /*
+        * Need to quote the first # in the info string...
+       */
+
+        cupsFilePuts(fp, "Info ");
+       cupsFileWrite(fp, printer->info, ptr - printer->info);
+       cupsFilePutChar(fp, '\\');
+       cupsFilePuts(fp, ptr);
+       cupsFilePutChar(fp, '\n');
+      }
+      else
+        cupsFilePrintf(fp, "Info %s\n", printer->info);
+    }
 
     if (printer->location)
-      cupsFilePrintf(fp, "Location %s\n", printer->location);
+    {
+      if ((ptr = strchr(printer->info, '#')) != NULL)
+      {
+       /*
+        * Need to quote the first # in the location string...
+       */
 
+        cupsFilePuts(fp, "Location ");
+       cupsFileWrite(fp, printer->location, ptr - printer->location);
+       cupsFilePutChar(fp, '\\');
+       cupsFilePuts(fp, ptr);
+       cupsFilePutChar(fp, '\n');
+      }
+      else
+        cupsFilePrintf(fp, "Location %s\n", printer->location);
+    }
     if (printer->device_uri)
       cupsFilePrintf(fp, "DeviceURI %s\n", printer->device_uri);
 
@@ -1427,6 +1475,119 @@ cupsdSaveAllPrinters(void)
 }
 
 
+/*
+ * 'cupsdSetAuthInfoRequired()' - Set the required authentication info.
+ */
+
+int                                    /* O - 1 if value OK, 0 otherwise */
+cupsdSetAuthInfoRequired(
+    cupsd_printer_t *p,                        /* I - Printer */
+    const char      *values,           /* I - Plain text value (or NULL) */
+    ipp_attribute_t *attr)             /* I - IPP attribute value (or NULL) */
+{
+  int  i;                              /* Looping var */
+
+
+  p->num_auth_info_required = 0;
+
+ /*
+  * Do we have a plain text value?
+  */
+
+  if (values)
+  {
+   /*
+    * Yes, grab the keywords...
+    */
+
+    const char *end;                   /* End of current value */
+
+
+    while (*values && p->num_auth_info_required < 4)
+    {
+      if ((end = strchr(values, ',')) == NULL)
+        end = values + strlen(values);
+
+      if (!strncmp(values, "none", end - values))
+      {
+        if (p->num_auth_info_required != 0 || *end)
+         return (0);
+
+        p->auth_info_required[p->num_auth_info_required] = "none";
+       p->num_auth_info_required ++;
+
+       return (1);
+      }
+      else if (!strncmp(values, "domain", end - values))
+      {
+        p->auth_info_required[p->num_auth_info_required] = "domain";
+       p->num_auth_info_required ++;
+      }
+      else if (!strncmp(values, "password", end - values))
+      {
+        p->auth_info_required[p->num_auth_info_required] = "password";
+       p->num_auth_info_required ++;
+      }
+      else if (!strncmp(values, "username", end - values))
+      {
+        p->auth_info_required[p->num_auth_info_required] = "username";
+       p->num_auth_info_required ++;
+      }
+      else
+        return (0);
+    }
+
+    if (p->num_auth_info_required == 0)
+    {
+      p->auth_info_required[0]  = "none";
+      p->num_auth_info_required = 1;
+    }
+
+    return (1);
+  }
+
+ /*
+  * Grab values from an attribute instead...
+  */
+
+  if (!attr || attr->num_values > 4)
+    return (0);
+
+  for (i = 0; i < attr->num_values; i ++)
+  {
+    if (!strcmp(attr->values[i].string.text, "none"))
+    {
+      if (p->num_auth_info_required != 0 || attr->num_values != 1)
+       return (0);
+
+      p->auth_info_required[p->num_auth_info_required] = "none";
+      p->num_auth_info_required ++;
+
+      return (1);
+    }
+    else if (!strcmp(attr->values[i].string.text, "domain"))
+    {
+      p->auth_info_required[p->num_auth_info_required] = "domain";
+      p->num_auth_info_required ++;
+    }
+    else if (!strcmp(attr->values[i].string.text, "password"))
+    {
+      p->auth_info_required[p->num_auth_info_required] = "password";
+      p->num_auth_info_required ++;
+    }
+    else if (!strcmp(attr->values[i].string.text, "username"))
+    {
+      p->auth_info_required[p->num_auth_info_required] = "username";
+      p->num_auth_info_required ++;
+    }
+    else
+      return (0);
+  }
+
+  return (1);
+}
+
+
 /*
  * 'cupsdSetPrinterAttrs()' - Set printer attributes based upon the PPD file.
  */
@@ -1552,6 +1713,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
                 "job-k-limit", p->k_limit);
   ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
                 "job-page-limit", p->page_limit);
+  if (p->num_auth_info_required)
+    ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
+                 "auth-info-required", p->num_auth_info_required,
+                 NULL, p->auth_info_required);
+  else
+    ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
+                "auth-info-required", NULL, "none");
 
   if (cupsArrayCount(Banners) > 0 && !(p->type & CUPS_PRINTER_REMOTE))
   {
@@ -1880,7 +2048,20 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
        * handle "raw" printing by users.
        */
 
-        add_printer_filter(p, "application/vnd.cups-raw 0 -");
+        add_printer_filter(p, p->filetype, "application/vnd.cups-raw 0 -");
+
+       /*
+       * Add any pre-filters in the PPD file...
+       */
+
+       if ((ppdattr = ppdFindAttr(ppd, "cupsPreFilter", NULL)) != NULL)
+       {
+         p->prefiltertype = mimeAddType(MimeDatabase, "prefilter", p->name);
+
+         for (; ppdattr; ppdattr = ppdFindNextAttr(ppd, "cupsPreFilter", NULL))
+           if (ppdattr->value)
+             add_printer_filter(p, p->prefiltertype, ppdattr->value);
+       }
 
        /*
        * Add any filters in the PPD file...
@@ -1890,7 +2071,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]));
-          add_printer_filter(p, ppd->filters[i]);
+          add_printer_filter(p, p->filetype, ppd->filters[i]);
        }
 
        if (ppd->num_filters == 0)
@@ -1899,7 +2080,8 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
          * If there are no filters, add a PostScript printing filter.
          */
 
-          add_printer_filter(p, "application/vnd.cups-postscript 0 -");
+          add_printer_filter(p, p->filetype,
+                            "application/vnd.cups-postscript 0 -");
         }
 
        /*
@@ -1940,6 +2122,10 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
            attr->values[i].string.text = _cupsStrAlloc("bcp");
        }
 
+#ifdef HAVE_DNSSD
+       cupsdSetString(&p->product, ppd->product);
+#endif /* HAVE_DNSSD */
+
        /*
         * Close the PPD and set the type...
        */
@@ -1974,13 +2160,14 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
        * handle "raw" printing by users.
        */
 
-        add_printer_filter(p, "application/vnd.cups-raw 0 -");
+        add_printer_filter(p, p->filetype, "application/vnd.cups-raw 0 -");
 
        /*
         * Add a PostScript filter, since this is still possibly PS printer.
        */
 
-       add_printer_filter(p, "application/vnd.cups-postscript 0 -");
+       add_printer_filter(p, p->filetype,
+                          "application/vnd.cups-postscript 0 -");
       }
       else
       {
@@ -1997,11 +2184,12 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
          */
 
          ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT,
-                       "printer-make-and-model", NULL, "Local System V Printer");
+                       "printer-make-and-model", NULL,
+                      "Local System V Printer");
 
          snprintf(filename, sizeof(filename), "*/* 0 %s/interfaces/%s",
                   ServerRoot, p->name);
-         add_printer_filter(p, filename);
+         add_printer_filter(p, p->filetype, filename);
        }
        else if (p->device_uri &&
                 !strncmp(p->device_uri, "ipp://", 6) &&
@@ -2098,12 +2286,12 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
     length += 13 + strlen(p->job_sheets[0]) + strlen(p->job_sheets[1]);
     length += 32;
     if (BrowseLocalOptions)
-      length += 12 + strlen(BrowseLocalOptions); 
+      length += 12 + strlen(BrowseLocalOptions);
 
    /*
     * Allocate the new string...
     */
+
     if ((p->browse_attrs = calloc(1, length)) == NULL)
       cupsdLogMessage(CUPSD_LOG_ERROR,
                       "Unable to allocate %d bytes for browse data!",
@@ -2173,6 +2361,12 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
   write_irix_config(p);
   write_irix_state(p);
 #endif /* __sgi */
+
+ /*
+  * Let the browse protocols reflect the change
+  */
+
+  cupsdRegisterPrinter(p);
 }
 
 
@@ -2327,6 +2521,12 @@ cupsdSetPrinterState(
 
   cupsdAddPrinterHistory(p);
 
+ /*
+  * Let the browse protocols reflect the change...
+  */
+
+  cupsdRegisterPrinter(p);
+
  /*
   * Save the printer configuration if a printer goes from idle or processing
   * to stopped (or visa-versa)...
@@ -2452,18 +2652,25 @@ cupsdUpdatePrinters(void)
 
 const char *                           /* O - Printer or class name */
 cupsdValidateDest(
-    const char      *hostname,         /* I - Host name */
-    const char      *resource,         /* I - Resource name */
+    const char      *uri,              /* I - Printer URI */
     cups_ptype_t    *dtype,            /* O - Type (printer or class) */
     cupsd_printer_t **printer)         /* O - Printer pointer */
 {
   cupsd_printer_t      *p;             /* Current printer */
   char                 localname[1024],/* Localized hostname */
                        *lptr,          /* Pointer into localized hostname */
-                       *sptr;          /* Pointer into server name */
-
-
-  DEBUG_printf(("cupsdValidateDest(\"%s\", \"%s\", %p, %p)\n", hostname, resource,
+                       *sptr,          /* Pointer into server name */
+                       *rptr,          /* Pointer into resource */
+                       scheme[32],     /* Scheme portion of URI */
+                       username[64],   /* Username portion of URI */
+                       hostname[HTTP_MAX_HOST],
+                                       /* Host portion of URI */
+                       resource[HTTP_MAX_URI];
+                                       /* Resource portion of URI */
+  int                  port;           /* Port portion of URI */
+
+
+  DEBUG_printf(("cupsdValidateDest(uri=\"%s\", dtype=%p, printer=%p)\n", uri,
                 dtype, printer));
 
  /*
@@ -2473,7 +2680,16 @@ cupsdValidateDest(
   if (printer)
     *printer = NULL;
 
-  *dtype = (cups_ptype_t)0;
+  if (dtype)
+    *dtype = (cups_ptype_t)0;
+
+ /*
+  * Pull the hostname and resource from the URI...
+  */
+
+  httpSeparateURI(HTTP_URI_CODING_ALL, uri, scheme, sizeof(scheme),
+                  username, sizeof(username), hostname, sizeof(hostname),
+                 &port, resource, sizeof(resource));
 
  /*
   * See if the resource is a class or printer...
@@ -2485,7 +2701,7 @@ cupsdValidateDest(
     * Class...
     */
 
-    resource += 9;
+    rptr = resource + 9;
   }
   else if (!strncmp(resource, "/printers/", 10))
   {
@@ -2493,7 +2709,7 @@ cupsdValidateDest(
     * Printer...
     */
 
-    resource += 10;
+    rptr = resource + 10;
   }
   else
   {
@@ -2508,17 +2724,19 @@ cupsdValidateDest(
   * See if the printer or class name exists...
   */
 
-  p = cupsdFindDest(resource);
+  p = cupsdFindDest(rptr);
 
-  if (p == NULL && strchr(resource, '@') == NULL)
+  if (p == NULL && strchr(rptr, '@') == NULL)
     return (NULL);
   else if (p != NULL)
   {
     if (printer)
       *printer = p;
 
-    *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
-                        CUPS_PRINTER_REMOTE);
+    if (dtype)
+      *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
+                          CUPS_PRINTER_REMOTE);
+
     return (p->name);
   }
 
@@ -2527,7 +2745,7 @@ cupsdValidateDest(
   */
 
   if (!strcasecmp(hostname, "localhost"))
-    hostname = ServerName;
+    strlcpy(hostname, ServerName, sizeof(hostname));
 
   strlcpy(localname, hostname, sizeof(localname));
 
@@ -2569,13 +2787,15 @@ cupsdValidateDest(
        p;
        p = (cupsd_printer_t *)cupsArrayNext(Printers))
     if (!strcasecmp(p->hostname, localname) &&
-        !strcasecmp(p->name, resource))
+        !strcasecmp(p->name, rptr))
     {
       if (printer)
         *printer = p;
 
-      *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
-                          CUPS_PRINTER_REMOTE);
+      if (dtype)
+       *dtype = p->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
+                            CUPS_PRINTER_REMOTE);
+
       return (p->name);
     }
 
@@ -2792,6 +3012,27 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
   char         name[256];              /* name-default */
 
 
+ /*
+  * Maintain a common array of default attribute names...
+  */
+
+  if (!CommonDefaults)
+  {
+    CommonDefaults = cupsArrayNew((cups_array_func_t)strcmp, NULL);
+
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("copies-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("document-format-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("finishings-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("job-hold-until-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("job-priority-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("job-sheets-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("media-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("number-up-default"));
+    cupsArrayAdd(CommonDefaults,
+                 _cupsStrAlloc("orientation-requested-default"));
+    cupsArrayAdd(CommonDefaults, _cupsStrAlloc("sides-default"));
+  }
+
  /*
   * Add all of the default options from the .conf files...
   */
@@ -2806,6 +3047,9 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
     {
       snprintf(name, sizeof(name), "%s-default", option->name);
       num_options = cupsAddOption(name, option->value, num_options, &options);
+
+      if (!cupsArrayFind(CommonDefaults, name))
+        cupsArrayAdd(CommonDefaults, _cupsStrAlloc(name));
     }
   }
 
@@ -2824,6 +3068,10 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
     ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "copies-default",
                   1);
 
+  if (!cupsGetOption("document-format", p->num_options, p->options))
+    ippAddString(CommonData, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
+                "document-format-default", NULL, "application/octet-stream");
+
   if (!cupsGetOption("job-hold-until", p->num_options, p->options))
     ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
                  "job-hold-until-default", NULL, "no-hold");
@@ -2839,6 +3087,14 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
   if (!cupsGetOption("orientation-requested", p->num_options, p->options))
     ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
                   "orientation-requested-default", IPP_PORTRAIT);
+
+  if (!cupsGetOption("notify-lease-duration", p->num_options, p->options))
+    ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
+                 "notify-lease-duration-default", DefaultLeaseDuration);
+
+  if (!cupsGetOption("notify-events", p->num_options, p->options))
+    ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
+                "notify-events-default", NULL, "job-completed");
 }
 
 
@@ -2849,6 +3105,7 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
 static void
 add_printer_filter(
     cupsd_printer_t  *p,               /* I - Printer to add to */
+    mime_type_t             *filtertype,       /* I - Filter or prefilter MIME type */
     const char       *filter)          /* I - Filter to add */
 {
   char         super[MIME_MAX_SUPER],  /* Super-type for filter */
@@ -2919,9 +3176,9 @@ add_printer_filter(
       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,
+                     filtertype->super, filtertype->type,
                       cost, program);
-      mimeAddFilter(MimeDatabase, temptype, p->filetype, cost, program);
+      mimeAddFilter(MimeDatabase, temptype, filtertype, cost, program);
     }
 }
 
@@ -3017,6 +3274,54 @@ add_printer_formats(cupsd_printer_t *p)  /* I - Printer */
 
     attr->values[i].string.text = _cupsStrAlloc(mimetype);
   }
+
+#ifdef HAVE_DNSSD
+  {
+    char               pdl[1024];      /* Buffer to build pdl list */
+    mime_filter_t      *filter;        /* MIME filter looping var */
+
+
+    pdl[0] = '\0';
+
+    if (mimeType(MimeDatabase, "application", "pdf"))
+      strlcat(pdl, "application/pdf,", sizeof(pdl));
+
+    if (mimeType(MimeDatabase, "application", "postscript"))
+      strlcat(pdl, "application/postscript,", sizeof(pdl));
+
+    if (mimeType(MimeDatabase, "application", "vnd.cups-raster"))
+      strlcat(pdl, "application/vnd.cups-raster,", sizeof(pdl));
+
+   /*
+    * Determine if this is a Tioga PrintJobMgr based queue...
+    */
+
+    for (filter = (mime_filter_t *)cupsArrayFirst(MimeDatabase->filters);
+        filter;
+        filter = (mime_filter_t *)cupsArrayNext(MimeDatabase->filters))
+    {
+      if (filter->dst == p->filetype && filter->filter && 
+         strstr(filter->filter, "PrintJobMgr"))
+       break;
+    }
+
+   /*
+    * We only support raw printing if this is not a Tioga PrintJobMgr based
+    * queue and if application/octet-stream is a known conversion...
+    */
+
+    if (!filter && mimeType(MimeDatabase, "application", "octet-stream"))
+      strlcat(pdl, "application/octet-stream,", sizeof(pdl));
+
+    if (mimeType(MimeDatabase, "image", "png"))
+      strlcat(pdl, "image/png,", sizeof(pdl));
+
+    if (pdl[0])
+      pdl[strlen(pdl) - 1] = '\0';     /* Remove trailing comma */
+
+    cupsdSetString(&p->pdl, pdl);
+  }
+#endif /* HAVE_DNSSD */
 }
 
 
@@ -3327,5 +3632,5 @@ write_irix_state(cupsd_printer_t *p)      /* I - Printer to update */
 
 
 /*
- * End of "$Id: printers.c 5970 2006-09-19 20:11:08Z mike $".
+ * End of "$Id: printers.c 6318 2007-03-06 04:36:55Z mike $".
  */
index acbc73800ca62ce4714752daa8fe198bd564fa11..77782359d23127eea6cb0c5e04339c55d0fcf485 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: printers.h 5828 2006-08-15 21:21:45Z mike $"
+ * "$Id: printers.h 6318 2007-03-06 04:36:55Z mike $"
  *
  *   Printer definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
  *         WWW: http://www.cups.org
  */
 
+#ifdef HAVE_DNSSD
+#  include <dns_sd.h>
+#endif /* HAVE_DNSSD */
+
 /*
  * Quota data...
  */
@@ -67,7 +71,8 @@ typedef struct cupsd_printer_s
   char         *port_monitor;          /* Port monitor */
   int          raw;                    /* Raw queue? */
   int          remote;                 /* Remote queue? */
-  mime_type_t  *filetype;              /* Pseudo-filetype for printer */
+  mime_type_t  *filetype,              /* Pseudo-filetype for printer */
+               *prefiltertype;         /* Pseudo-filetype for pre-filters */
   cups_array_t *filetypes;             /* Supported file types */
   void         *job;                   /* Current job in queue */
   ipp_t                *attrs;                 /* Attributes supported by this printer */
@@ -86,9 +91,21 @@ typedef struct cupsd_printer_s
   int          sequence_number;        /* Increasing sequence number */
   int          num_options;            /* Number of default options */
   cups_option_t        *options;               /* Default options */
+  int          num_auth_info_required; /* Number of required auth fields */
+  const char   *auth_info_required[4]; /* Required authentication fields */
 #ifdef __APPLE__
   char         *recoverable;           /* com.apple.print.recoverable-message */
 #endif /* __APPLE__ */
+
+#ifdef HAVE_DNSSD
+  char         *reg_name,              /* Name used for service registration */
+               *product,               /* PPD Product string */
+               *pdl,                   /* pdl value for TXT record */
+               *txt_record;            /* TXT record contents */
+  int          txt_len;                /* TXT record length */
+  DNSServiceRef        dnssd_ipp_ref;          /* DNSServiceRegister ref for _ipp */
+  int          dnssd_ipp_fd;           /* File descriptor for DNSServiceRegister reference */
+#endif /* HAVE_DNSSD */
 } cupsd_printer_t;
 
 
@@ -98,6 +115,8 @@ typedef struct cupsd_printer_s
 
 VAR ipp_t              *CommonData     VALUE(NULL);
                                        /* Common printer object attrs */
+VAR cups_array_t       *CommonDefaults VALUE(NULL);
+                                       /* Common -default option names */
 VAR cups_array_t       *Printers       VALUE(NULL),
                                        /* Printer list */
                        *ImplicitPrinters VALUE(NULL);
@@ -117,7 +136,8 @@ VAR cupsd_policy_t  *DefaultPolicyPtr
 
 extern cupsd_printer_t *cupsdAddPrinter(const char *name);
 extern void            cupsdAddPrinterHistory(cupsd_printer_t *p);
-extern void            cupsdAddPrinterUser(cupsd_printer_t *p, const char *username);
+extern void            cupsdAddPrinterUser(cupsd_printer_t *p,
+                                           const char *username);
 extern void            cupsdCreateCommonData(void);
 extern void            cupsdDeleteAllPrinters(void);
 extern void            cupsdDeletePrinter(cupsd_printer_t *p, int update);
@@ -126,26 +146,31 @@ extern cupsd_printer_t    *cupsdFindPrinter(const char *name);
 extern void            cupsdFreePrinterUsers(cupsd_printer_t *p);
 extern void            cupsdFreeQuotas(cupsd_printer_t *p);
 extern void            cupsdLoadAllPrinters(void);
-extern void            cupsdRenamePrinter(cupsd_printer_t *p, const char *name);
+extern void            cupsdRenamePrinter(cupsd_printer_t *p,
+                                          const char *name);
+extern char            *cupsdSanitizeURI(const char *uri, char *buffer,
+                                         int buflen);
 extern void            cupsdSaveAllPrinters(void);
+extern int             cupsdSetAuthInfoRequired(cupsd_printer_t *p,
+                                                const char *values,
+                                                ipp_attribute_t *attr);
 extern void            cupsdSetPrinterAttrs(cupsd_printer_t *p);
-extern void            cupsdSetPrinterReasons(cupsd_printer_t *p, const char *s);
-extern void            cupsdSetPrinterState(cupsd_printer_t *p, ipp_pstate_t s, int update);
+extern void            cupsdSetPrinterReasons(cupsd_printer_t *p,
+                                              const char *s);
+extern void            cupsdSetPrinterState(cupsd_printer_t *p, ipp_pstate_t s,
+                                            int update);
 #define                        cupsdStartPrinter(p,u) cupsdSetPrinterState((p), IPP_PRINTER_IDLE, (u))
 extern void            cupsdStopPrinter(cupsd_printer_t *p, int update);
 extern void            cupsdUpdatePrinters(void);
-extern cupsd_quota_t   *cupsdUpdateQuota(cupsd_printer_t *p, const char *username,
-                                         int pages, int k);
-extern const char      *cupsdValidateDest(const char *hostname,
-                                          const char *resource,
+extern cupsd_quota_t   *cupsdUpdateQuota(cupsd_printer_t *p,
+                                         const char *username, int pages,
+                                         int k);
+extern const char      *cupsdValidateDest(const char *uri,
                                           cups_ptype_t *dtype,
                                           cupsd_printer_t **printer);
 extern void            cupsdWritePrintcap(void);
 
-extern char            *cupsdSanitizeURI(const char *uri, char *buffer,
-                                         int buflen);
-
 
 /*
- * End of "$Id: printers.h 5828 2006-08-15 21:21:45Z mike $".
+ * End of "$Id: printers.h 6318 2007-03-06 04:36:55Z mike $".
  */
index 5af7e5eef361a1ab0b7b395a8436e175d3e1baa5..7462472a6e0a5571c138a428254bbdd5ffd7b1a0 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: process.c 5376 2006-04-06 20:32:07Z mike $"
+ * "$Id: process.c 6326 2007-03-11 17:50:18Z mike $"
  *
  *   Process management routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -121,6 +121,7 @@ cupsdStartProcess(
     int        outfd,                  /* I - Standard output file descriptor */
     int        errfd,                  /* I - Standard error file descriptor */
     int        backfd,                 /* I - Backchannel file descriptor */
+    int        sidefd,                 /* I - Sidechannel file descriptor */
     int        root,                   /* I - Run as root? */
     int        *pid)                   /* O - Process ID */
 {
@@ -161,7 +162,7 @@ cupsdStartProcess(
                 linkpath);
       else
        snprintf(processPath, sizeof(processPath), "CFProcessPath=%s/%s",
-                dirname(command), linkpath);
+                dirname((char *)command), linkpath);
     }
     else
       snprintf(processPath, sizeof(processPath), "CFProcessPath=%s", command);
@@ -217,6 +218,12 @@ cupsdStartProcess(
         open("/dev/null", O_RDWR);
       fcntl(3, F_SETFL, O_NDELAY);
     }
+    if (sidefd != 4 && sidefd > 0)
+    {
+      close(4);
+      dup(sidefd);
+      fcntl(4, F_SETFL, O_NDELAY);
+    }
 
    /*
     * Change the priority of the process based on the FilterNice setting.
@@ -344,5 +351,5 @@ compare_procs(cupsd_proc_t *a,              /* I - First process */
 
 
 /*
- * End of "$Id: process.c 5376 2006-04-06 20:32:07Z mike $".
+ * End of "$Id: process.c 6326 2007-03-11 17:50:18Z mike $".
  */
index 7d3e4e3eb5138111685ca7adc1a1fb234c2b354a..a51f7f08dc0ee4a8df85cc55d0e0925e016c9b7f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: quotas.c 5970 2006-09-19 20:11:08Z mike $"
+ * "$Id: quotas.c 5969 2006-09-19 20:09:24Z mike $"
  *
  *   Quota routines for the Common UNIX Printing System (CUPS).
  *
@@ -230,5 +230,5 @@ find_quota(cupsd_printer_t *p,              /* I - Printer */
 
 
 /*
- * End of "$Id: quotas.c 5970 2006-09-19 20:11:08Z mike $".
+ * End of "$Id: quotas.c 5969 2006-09-19 20:09:24Z mike $".
  */
diff --git a/scheduler/select.c b/scheduler/select.c
new file mode 100644 (file)
index 0000000..c72adbd
--- /dev/null
@@ -0,0 +1,946 @@
+/*
+ * "$Id: select.c 6166 2006-12-29 20:35:18Z mike $"
+ *
+ *   Select abstraction functions 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:
+ *
+ *   cupsdAddSelect()    - Add a file descriptor to the list.
+ *   cupsdDoSelect()     - Do a select-like operation.
+ *   cupsdIsSelecting()  - Determine whether we are monitoring a file
+ *                         descriptor.
+ *   cupsdRemoveSelect() - Remove a file descriptor from the list.
+ *   cupsdStartSelect()  - Initialize the file polling engine.
+ *   cupsdStopSelect()   - Shutdown the file polling engine.
+ *   compare_fds()       - Compare file descriptors.
+ *   find_fd()           - Find an existing file descriptor record.
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include "cupsd.h"
+
+#ifdef HAVE_EPOLL
+#  include <sys/epoll.h>
+#elif defined(HAVE_KQUEUE)
+#  include <sys/event.h>
+#  include <sys/time.h>
+#elif defined(HAVE_POLL)
+#  include <sys/poll.h>
+#elif defined(__hpux)
+#  include <sys/time.h>
+#else
+#  include <sys/select.h>
+#endif /* HAVE_EPOLL */
+
+
+/*
+ * Design Notes for Poll/Select API in CUPSD
+ * -----------------------------------------
+ * 
+ * SUPPORTED APIS
+ * 
+ *     OS              select  poll    epoll   kqueue  /dev/poll
+ *     --------------  ------  ------  ------  ------  ---------
+ *     AIX             YES     YES     NO      NO      NO
+ *     FreeBSD         YES     YES     NO      YES     NO
+ *     HP-UX           YES     YES     NO      NO      NO
+ *     IRIX            YES     YES     NO      NO      NO
+ *     Linux           YES     YES     YES     NO      NO
+ *     MacOS X         YES     YES     NO      YES     NO
+ *     NetBSD          YES     YES     NO      YES     NO
+ *     OpenBSD         YES     YES     NO      YES     NO
+ *     Solaris         YES     YES     NO      NO      YES
+ *     Tru64           YES     YES     NO      NO      NO
+ *     Windows         YES     NO      NO      NO      NO
+ * 
+ * 
+ * HIGH-LEVEL API
+ * 
+ *     typedef void (*cupsd_selfunc_t)(void *data);
+ * 
+ *     void cupsdStartSelect(void);
+ *     void cupsdStopSelect(void);
+ *     void cupsdAddSelect(int fd, cupsd_selfunc_t read_cb,
+ *                         cupsd_selfunc_t write_cb, void *data);
+ *     void cupsdRemoveSelect(int fd);
+ *     int cupsdDoSelect(int timeout);
+ * 
+ * 
+ * IMPLEMENTATION STRATEGY
+ * 
+ *     0. Common Stuff
+ *         a. CUPS array of file descriptor to callback functions
+ *            and data.
+ *         b. cupsdStartSelect() creates the array
+ *         c. cupsdStopSelect() destroys the array and all elements.
+ *         d. cupsdAddSelect() adds to the array and allocates a
+ *            new callback element.
+ *         e. cupsdRemoveSelect() removes from the array and frees
+ *            the callback element.
+ *         f. _cupsd_fd_t provides a reference-counted structure for
+ *            tracking file descriptors that are monitored.
+ * 
+ *     1. select() O(n)
+ *         a. Input/Output fd_set variables, copied to working
+ *            copies and then used with select().
+ *         b. Loop through CUPS array, using FD_ISSET and calling
+ *            the read/write callbacks as needed.
+ *         c. cupsdRemoveSelect() clears fd_set bit from main and
+ *            working sets.
+ *         d. cupsdStopSelect() frees all of the memory used by the
+ *            CUPS array and fd_set's.
+ * 
+ *     2. poll() - O(n log n)
+ *         a. Regular array of pollfd, sorted the same as the CUPS
+ *            array.
+ *         b. Loop through pollfd array, call the corresponding
+ *            read/write callbacks as needed.
+ *         c. cupsdAddSelect() adds first to CUPS array and flags the
+ *            pollfd array as invalid.
+ *         d. cupsdDoSelect() rebuilds pollfd array as needed, calls
+ *            poll(), then loops through the pollfd array looking up
+ *            as needed.
+ *         e. cupsdRemoveSelect() flags the pollfd array as invalid.
+ *         f. cupsdStopSelect() frees all of the memory used by the
+ *            CUPS array and pollfd array.
+ * 
+ *     3. epoll() - O(n)
+ *         a. cupsdStartSelect() creates epoll file descriptor using
+ *            epoll_create() with the maximum fd count, and
+ *            allocates an events buffer for the maximum fd count.
+ *         b. cupsdAdd/RemoveSelect() uses epoll_ctl() to add
+ *            (EPOLL_CTL_ADD) or remove (EPOLL_CTL_DEL) a single
+ *            event using the level-triggered semantics. The event
+ *            user data field is a pointer to the new callback array
+ *            element.
+ *         c. cupsdDoSelect() uses epoll_wait() with the global event
+ *            buffer allocated in cupsdStartSelect() and then loops
+ *            through the events, using the user data field to find
+ *            the callback record.
+ *         d. cupsdStopSelect() closes the epoll file descriptor and
+ *            frees all of the memory used by the event buffer.
+ * 
+ *     4. kqueue() - O(n)
+ *         b. cupsdStartSelect() creates kqueue file descriptor
+ *            using kqyeue() function and allocates a global event
+ *            buffer.
+ *         c. cupsdAdd/RemoveSelect() uses EV_SET and kevent() to
+ *            register the changes. The event user data field is a
+ *            pointer to the new callback array element.
+ *         d. cupsdDoSelect() uses kevent() to poll for events and
+ *            loops through the events, using the user data field to
+ *            find the callback record.
+ *         e. cupsdStopSelect() closes the kqyeye() file descriptor
+ *            and frees all of the memory used by the event buffer.
+ * 
+ *     5. /dev/poll - O(n log n) - NOT YET IMPLEMENTED
+ *         a. cupsdStartSelect() opens /dev/poll and allocates an
+ *            array of pollfd structs; on failure to open /dev/poll,
+ *            revert to poll() system call.
+ *         b. cupsdAddSelect() writes a single pollfd struct to
+ *            /dev/poll with the new file descriptor and the
+ *            POLLIN/POLLOUT flags.
+ *         c. cupsdRemoveSelect() writes a single pollfd struct to
+ *            /dev/poll with the file descriptor and the POLLREMOVE
+ *            flag.
+ *         d. cupsdDoSelect() uses the DP_POLL ioctl to retrieve
+ *            events from /dev/poll and then loops through the
+ *            returned pollfd array, looking up the file descriptors
+ *            as needed.
+ *         e. cupsdStopSelect() closes /dev/poll and frees the
+ *            pollfd array.
+ *
+ * PERFORMANCE
+ *
+ *   In tests using the "make test" target with option 0 (keep cupsd
+ *   running) and the "testspeed" program with "-c 50 -r 1000", epoll()
+ *   performed 5.5% slower select(), followed by kqueue() at 16% slower
+ *   than select() and poll() at 18% slower than select().  Similar
+ *   results were seen with twice the number of client connections.
+ *
+ *   The epoll() and kqueue() performance is likely limited by the
+ *   number of system calls used to add/modify/remove file
+ *   descriptors dynamically.  Further optimizations may be possible
+ *   in the area of limiting use of cupsdAddSelect() and
+ *   cupsdRemoveSelect(), however extreme care will be needed to avoid
+ *   excess CPU usage and deadlock conditions.
+ *
+ *   We may be able to improve the poll() implementation simply by
+ *   keeping the pollfd array sync'd with the _cupsd_fd_t array, as that
+ *   will eliminate the rebuilding of the array whenever there is a
+ *   change and eliminate the fd array lookups in the inner loop of
+ *   cupsdDoSelect().
+ *
+ *   Since /dev/poll will never be able to use a shadow array, it may
+ *   not make sense to implement support for it.  ioctl() overhead will
+ *   impact performance as well, so my guess would be that, for CUPS,
+ *   /dev/poll will yield a net performance loss.
+ */
+
+/*
+ * Local structures...
+ */
+
+typedef struct _cupsd_fd_s
+{
+  int                  fd,             /* File descriptor */
+                       use;            /* Use count */
+  cupsd_selfunc_t      read_cb,        /* Read callback */
+                       write_cb;       /* Write callback */
+  void                 *data;          /* Data pointer for callbacks */
+} _cupsd_fd_t;
+
+
+/*
+ * Local globals...
+ */
+
+static cups_array_t    *cupsd_fds = NULL;
+
+#ifdef HAVE_EPOLL
+static int             cupsd_epoll_fd = -1;
+static struct epoll_event *cupsd_epoll_events = NULL;
+#elif defined(HAVE_KQUEUE)
+static int             cupsd_kqueue_fd = -1,
+                       cupsd_kqueue_changes = 0;
+static struct kevent   *cupsd_kqueue_events = NULL;
+#elif defined(HAVE_POLL)
+static int             cupsd_alloc_pollfds = 0,
+                       cupsd_update_pollfds = 0;
+static struct pollfd   *cupsd_pollfds = NULL;
+#else /* select() */
+static fd_set          cupsd_global_input,
+                       cupsd_global_output,
+                       cupsd_current_input,
+                       cupsd_current_output;
+#endif /* HAVE_EPOLL */
+
+
+/*
+ * Local functions...
+ */
+
+static int             compare_fds(_cupsd_fd_t *a, _cupsd_fd_t *b);
+static _cupsd_fd_t     *find_fd(int fd);
+#define                        release_fd(f) { \
+                         (f)->use --; \
+                         if (!(f)->use) free((f));\
+                       }
+#define                        retain_fd(f) (f)->use++
+
+
+/*
+ * 'cupsdAddSelect()' - Add a file descriptor to the list.
+ */
+
+int                                    /* O - 1 on success, 0 on error */
+cupsdAddSelect(int             fd,     /* I - File descriptor */
+               cupsd_selfunc_t read_cb,        /* I - Read callback */
+               cupsd_selfunc_t write_cb,/* I - Write callback */
+              void            *data)   /* I - Data to pass to callback */
+{
+  _cupsd_fd_t  *fdptr;                 /* File descriptor record */
+  int          added;                  /* 1 if added, 0 if modified */
+
+
+ /*
+  * Range check input...
+  */
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdAddSelect: fd=%d, read_cb=%p, write_cb=%p, data=%p",
+                 fd, read_cb, write_cb, data);
+
+  if (fd < 0)
+    return (0);
+
+ /*
+  * See if this FD has already been added...
+  */
+
+  if ((fdptr = find_fd(fd)) == NULL)
+  {
+   /*
+    * No, add a new entry...
+    */
+
+    if ((fdptr = calloc(1, sizeof(_cupsd_fd_t))) == NULL)
+      return (0);
+
+    fdptr->fd  = fd;
+    fdptr->use = 1;
+
+    if (!cupsArrayAdd(cupsd_fds, fdptr))
+    {
+      cupsdLogMessage(CUPSD_LOG_EMERG, "Unable to add fd %d to array!", fd);
+      free(fdptr);
+      return (0);
+    }
+
+    added = 1;
+  }
+  else
+    added = 0;
+
+#ifdef HAVE_EPOLL
+  {
+    struct epoll_event event;          /* Event data */
+
+
+    event.events = 0;
+
+    if (read_cb)
+      event.events |= EPOLLIN;
+
+    if (write_cb)
+      event.events |= EPOLLOUT;
+
+    event.data.ptr = fdptr;
+
+    epoll_ctl(cupsd_epoll_fd, added ? EPOLL_CTL_ADD : EPOLL_CTL_MOD, fd,
+              &event);
+  }
+
+#elif defined(HAVE_KQUEUE)
+  {
+    struct kevent      event;          /* Event data */
+    struct timespec    timeout;        /* Timeout value */
+
+
+    timeout.tv_sec  = 0;
+    timeout.tv_nsec = 0;
+
+    if (fdptr->read_cb != read_cb)
+    {
+      if (read_cb)
+        EV_SET(&event, fd, EVFILT_READ, EV_ADD, 0, 0, fdptr);
+      else
+        EV_SET(&event, fd, EVFILT_READ, EV_DELETE, 0, 0, fdptr);
+
+      if (kevent(cupsd_kqueue_fd, &event, 1, NULL, 0, &timeout))
+      {
+       cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                       "cupsdAddSelect: kevent() returned %s",
+                       strerror(errno));
+       return (0);
+      }
+    }
+
+    if (fdptr->write_cb != write_cb)
+    {
+      if (write_cb)
+        EV_SET(&event, fd, EVFILT_WRITE, EV_ADD, 0, 0, fdptr);
+      else
+        EV_SET(&event, fd, EVFILT_WRITE, EV_DELETE, 0, 0, fdptr);
+
+      if (kevent(cupsd_kqueue_fd, &event, 1, NULL, 0, &timeout))
+      {
+       cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                       "cupsdAddSelect: kevent() returned %s",
+                       strerror(errno));
+       return (0);
+      }
+    }
+  }
+
+#elif defined(HAVE_POLL)
+  cupsd_update_pollfds = 1;
+
+#else /* select() */
+ /*
+  * Add or remove the file descriptor in the input and output sets
+  * for select()...
+  */
+
+  if (read_cb)
+  {
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdAddSelect: Adding fd %d to input set...", fd);
+    FD_SET(fd, &cupsd_global_input);
+  }
+  else
+  {
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdAddSelect: Removing fd %d from input set...", fd);
+    FD_CLR(fd, &cupsd_global_input);
+    FD_CLR(fd, &cupsd_current_input);
+  }
+
+  if (write_cb)
+  {
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdAddSelect: Adding fd %d to output set...", fd);
+    FD_SET(fd, &cupsd_global_output);
+  }
+  else
+  {
+    cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                    "cupsdAddSelect: Removing fd %d from output set...", fd);
+    FD_CLR(fd, &cupsd_global_output);
+    FD_CLR(fd, &cupsd_current_output);
+  }
+#endif /* HAVE_EPOLL */
+
+ /*
+  * Save the (new) read and write callbacks...
+  */
+
+  fdptr->read_cb  = read_cb;
+  fdptr->write_cb = write_cb;
+  fdptr->data     = data;
+
+  return (1);
+}
+
+
+/*
+ * 'cupsdDoSelect()' - Do a select-like operation.
+ */
+
+int                                    /* O - Number of files or -1 on error */
+cupsdDoSelect(long timeout)            /* I - Timeout in seconds */
+{
+  int                  nfds;           /* Number of file descriptors */
+  _cupsd_fd_t          *fdptr;         /* Current file descriptor */
+#ifdef HAVE_EPOLL
+  int                  i;              /* Looping var */
+  struct epoll_event   *event;         /* Current event */
+
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdDoSelect: polling %d fds for %ld seconds...",
+                 cupsArrayCount(cupsd_fds), timeout);
+
+  if (timeout >= 0 && timeout < 86400)
+    nfds = epoll_wait(cupsd_epoll_fd, cupsd_epoll_events, MaxFDs,
+                      timeout * 1000);
+  else
+    nfds = epoll_wait(cupsd_epoll_fd, cupsd_epoll_events, MaxFDs, -1);
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: epoll() returned %d...",
+                  nfds);
+
+  for (i = nfds, event = cupsd_epoll_events; i > 0; i --, event ++)
+  {
+    fdptr = (_cupsd_fd_t *)event->data.ptr;
+
+    retain_fd(fdptr);
+
+    if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP)))
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Read on fd %d...",
+                     fdptr->fd);
+      (*(fdptr->read_cb))(fdptr->data);
+    }
+
+    if (fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)))
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
+                     fdptr->fd);
+      (*(fdptr->write_cb))(fdptr->data);
+    }
+
+    release_fd(fdptr);
+  }
+
+#elif defined(HAVE_KQUEUE)
+  int                  i;              /* Looping var */
+  struct kevent                *event;         /* Current event */
+  struct timespec      ktimeout;       /* kevent() timeout */
+
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdDoSelect: polling %d fds for %ld seconds...",
+                 cupsArrayCount(cupsd_fds), timeout);
+
+  if (timeout >= 0 && timeout < 86400)
+  {
+    ktimeout.tv_sec  = timeout;
+    ktimeout.tv_nsec = 0;
+
+    nfds = kevent(cupsd_kqueue_fd, NULL, 0, cupsd_kqueue_events, MaxFDs,
+                  &ktimeout);
+  }
+  else
+    nfds = kevent(cupsd_kqueue_fd, NULL, 0, cupsd_kqueue_events, MaxFDs, NULL);
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdDoSelect: kevent(%d, ..., %d, ...) returned %d...",
+                  cupsd_kqueue_fd, MaxFDs, nfds);
+
+  cupsd_kqueue_changes = 0;
+
+  for (i = nfds, event = cupsd_kqueue_events; i > 0; i --, event ++)
+  {
+    fdptr = (_cupsd_fd_t *)event->udata;
+
+    cupsdLogMessage(CUPSD_LOG_DEBUG2, "event->filter=%d, event->ident=%d",
+                    event->filter, (int)event->ident);
+
+    retain_fd(fdptr);
+
+    if (fdptr->read_cb && event->filter == EVFILT_READ)
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Read on fd %d...",
+                     fdptr->fd);
+      (*(fdptr->read_cb))(fdptr->data);
+    }
+
+    if (fdptr->write_cb && event->filter == EVFILT_WRITE)
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
+                     fdptr->fd);
+      (*(fdptr->write_cb))(fdptr->data);
+    }
+
+    release_fd(fdptr);
+  }
+
+#elif defined(HAVE_POLL)
+  struct pollfd                *pfd;           /* Current pollfd structure */
+  int                  count;          /* Number of file descriptors */
+
+
+  count = cupsArrayCount(cupsd_fds);
+
+  if (cupsd_update_pollfds)
+  {
+   /*
+    * Update the cupsd_pollfds array to match the current FD array...
+    */
+
+    cupsd_update_pollfds = 0;
+
+    cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Updating pollfd array...");
+
+   /*
+    * (Re)allocate memory as needed...
+    */
+
+    if (count > cupsd_alloc_pollfds)
+    {
+      int allocfds = count + 16;
+
+
+      if (cupsd_pollfds)
+       pfd = realloc(cupsd_pollfds, allocfds * sizeof(struct pollfd));
+      else
+       pfd = malloc(allocfds * sizeof(struct pollfd));
+
+      if (!pfd)
+      {
+       cupsdLogMessage(CUPSD_LOG_EMERG,
+                       "Unable to allocate %d bytes for polling!",
+                       (int)(allocfds * sizeof(struct pollfd)));
+
+       return (-1);
+      }
+
+      cupsd_pollfds       = pfd;
+      cupsd_alloc_pollfds = allocfds;
+    }
+
+   /*
+    * Rebuild the array...
+    */
+
+    for (fdptr = (_cupsd_fd_t *)cupsArrayFirst(cupsd_fds), pfd = cupsd_pollfds;
+         fdptr;
+        fdptr = (_cupsd_fd_t *)cupsArrayNext(cupsd_fds), pfd ++)
+    {
+      pfd->fd      = fdptr->fd;
+      pfd->events  = 0;
+
+      if (fdptr->read_cb)
+       pfd->events |= POLLIN;
+
+      if (fdptr->write_cb)
+       pfd->events |= POLLOUT;
+    }
+  }
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdDoSelect: polling %d fds for %ld seconds...",
+                 count, timeout);
+
+  if (timeout >= 0 && timeout < 86400)
+    nfds = poll(cupsd_pollfds, count, timeout * 1000);
+  else
+    nfds = poll(cupsd_pollfds, count, -1);
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: poll() returned %d...",
+                  nfds);
+
+  if (nfds > 0)
+  {
+   /*
+    * Do callbacks for each file descriptor...
+    */
+
+    for (pfd = cupsd_pollfds; count > 0; pfd ++, count --)
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                      "cupsdDoSelect: pollfds[%d]={fd=%d, revents=%x}",
+                     pfd - cupsd_pollfds, pfd->fd, pfd->revents);
+
+      if (!pfd->revents)
+        continue;
+
+      if ((fdptr = find_fd(pfd->fd)) == NULL)
+        continue;
+
+      retain_fd(fdptr);
+
+      if (fdptr->read_cb && (pfd->revents & (POLLIN | POLLERR | POLLHUP)))
+      {
+        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Read on fd %d...",
+                       fdptr->fd);
+        (*(fdptr->read_cb))(fdptr->data);
+      }
+
+      if (fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP)))
+      {
+        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
+                       fdptr->fd);
+        (*(fdptr->write_cb))(fdptr->data);
+      }
+
+      release_fd(fdptr);
+    }
+  }
+
+#else /* select() */
+  struct timeval       stimeout;       /* Timeout for select() */
+  int                  maxfd;          /* Maximum file descriptor */
+
+
+ /*
+  * Figure out the highest file descriptor number...
+  */
+
+  if ((fdptr = (_cupsd_fd_t *)cupsArrayLast(cupsd_fds)) == NULL)
+    maxfd = 1;
+  else
+    maxfd = fdptr->fd + 1;
+
+ /*
+  * Do the select()...
+  */
+
+  cupsd_current_input  = cupsd_global_input;
+  cupsd_current_output = cupsd_global_output;
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdDoSelect: selecting %d fds for %ld seconds...",
+                 maxfd, timeout);
+
+  if (timeout >= 0 && timeout < 86400)
+  {
+    stimeout.tv_sec  = timeout;
+    stimeout.tv_usec = 0;
+
+    nfds = select(maxfd, &cupsd_current_input, &cupsd_current_output, NULL,
+                  &stimeout);
+  }
+  else
+    nfds = select(maxfd, &cupsd_current_input, &cupsd_current_output, NULL,
+                  NULL);
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: select() returned %d...",
+                  nfds);
+
+  if (nfds > 0)
+  {
+   /*
+    * Do callbacks for each file descriptor...
+    */
+
+    for (fdptr = (_cupsd_fd_t *)cupsArrayFirst(cupsd_fds);
+         fdptr;
+        fdptr = (_cupsd_fd_t *)cupsArrayNext(cupsd_fds))
+    {
+      retain_fd(fdptr);
+
+      if (fdptr->read_cb && FD_ISSET(fdptr->fd, &cupsd_current_input))
+      {
+        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Read on fd %d...",
+                       fdptr->fd);
+        (*(fdptr->read_cb))(fdptr->data);
+      }
+
+      if (fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output))
+      {
+        cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdDoSelect: Write on fd %d...",
+                       fdptr->fd);
+        (*(fdptr->write_cb))(fdptr->data);
+      }
+
+      release_fd(fdptr);
+    }
+  }
+
+#endif /* HAVE_EPOLL */
+
+ /*
+  * Return the number of file descriptors handled...
+  */
+
+  return (nfds);
+}
+
+
+/*
+ * 'cupsdIsSelecting()' - Determine whether we are monitoring a file
+ *                        descriptor.
+ */
+
+int                                    /* O - 1 if selecting, 0 otherwise */
+cupsdIsSelecting(int fd)               /* I - File descriptor */
+{
+  return (find_fd(fd) != NULL);
+}
+
+
+/*
+ * 'cupsdRemoveSelect()' - Remove a file descriptor from the list.
+ */
+
+void
+cupsdRemoveSelect(int fd)              /* I - File descriptor */
+{
+  _cupsd_fd_t          *fdptr;         /* File descriptor record */
+#ifdef HAVE_EPOLL
+  struct epoll_event   event;          /* Event data */
+#elif defined(HAVE_KQUEUE)
+  struct kevent                event;          /* Event data */
+  struct timespec      timeout;        /* Timeout value */
+#elif defined(HAVE_POLL)
+  /* No variables for poll() */
+#endif /* HAVE_EPOLL */
+
+
+ /*
+  * Range check input...
+  */
+
+  cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdRemoveSelect: fd=%d", fd);
+
+  if (fd < 0)
+    return;
+
+ /*
+  * Find the file descriptor...
+  */
+
+  if ((fdptr = find_fd(fd)) == NULL)
+    return;
+
+#ifdef HAVE_EPOLL
+  epoll_ctl(cupsd_epoll_fd, EPOLL_CTL_DEL, fd, &event);
+
+#elif defined(HAVE_KQUEUE)
+  timeout.tv_sec  = 0;
+  timeout.tv_nsec = 0;
+
+  if (fdptr->read_cb)
+  {
+    EV_SET(&event, fd, EVFILT_READ, EV_DELETE, 0, 0, fdptr);
+
+    if (kevent(cupsd_kqueue_fd, &event, 1, NULL, 0, &timeout))
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                     "cupsdRemoveSelect: kevent() returned %s",
+                     strerror(errno));
+      return;
+    }
+  }
+
+  if (fdptr->write_cb)
+  {
+    EV_SET(&event, fd, EVFILT_WRITE, EV_DELETE, 0, 0, fdptr);
+
+    if (kevent(cupsd_kqueue_fd, &event, 1, NULL, 0, &timeout))
+    {
+      cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                     "cupsdRemoveSelect: kevent() returned %s",
+                     strerror(errno));
+      return;
+    }
+  }
+
+
+#elif defined(HAVE_POLL)
+ /*
+  * Update the pollfds array...
+  */
+
+  cupsd_update_pollfds = 1;
+
+#else /* select() */
+  cupsdLogMessage(CUPSD_LOG_DEBUG2,
+                  "cupsdRemoveSelect: Removing fd %d from input and output "
+                 "sets...", fd);
+  FD_CLR(fd, &cupsd_global_input);
+  FD_CLR(fd, &cupsd_global_output);
+  FD_CLR(fd, &cupsd_current_input);
+  FD_CLR(fd, &cupsd_current_output);
+#endif /* HAVE_EPOLL */
+
+ /*
+  * Remove the file descriptor for from the FD array...
+  */
+
+  cupsArrayRemove(cupsd_fds, fdptr);
+  release_fd(fdptr);
+}
+
+
+/*
+ * 'cupsdStartSelect()' - Initialize the file polling engine.
+ */
+
+void
+cupsdStartSelect(void)
+{
+  cupsd_fds = cupsArrayNew((cups_array_func_t)compare_fds, NULL);
+
+#ifdef HAVE_EPOLL
+  cupsd_epoll_fd     = epoll_create(MaxFDs);
+  cupsd_epoll_events = calloc(MaxFDs, sizeof(struct epoll_event));
+
+#elif defined(HAVE_KQUEUE)
+  cupsd_kqueue_fd      = kqueue();
+  cupsd_kqueue_changes = 0;
+  cupsd_kqueue_events  = calloc(MaxFDs, sizeof(struct kevent));
+
+#elif defined(HAVE_POLL)
+  cupsd_update_pollfds = 0;
+
+#else /* select() */
+  FD_ZERO(&cupsd_global_input);
+  FD_ZERO(&cupsd_global_output);
+#endif /* HAVE_EPOLL */
+}
+
+
+/*
+ * 'cupsdStopSelect()' - Shutdown the file polling engine.
+ */
+
+void
+cupsdStopSelect(void)
+{
+  _cupsd_fd_t  *fdptr;                 /* Current file descriptor */
+
+
+  for (fdptr = (_cupsd_fd_t *)cupsArrayFirst(cupsd_fds);
+       fdptr;
+       fdptr = (_cupsd_fd_t *)cupsArrayNext(cupsd_fds))
+    free(fdptr);
+
+  cupsArrayDelete(cupsd_fds);
+  cupsd_fds = NULL;
+
+#ifdef HAVE_EPOLL
+  if (cupsd_epoll_events)
+  {
+    free(cupsd_epoll_events);
+    cupsd_epoll_events = NULL;
+  }
+
+  if (cupsd_epoll_fd >= 0)
+  {
+    close(cupsd_epoll_fd);
+    cupsd_epoll_fd = -1;
+  }
+
+#elif defined(HAVE_KQUEUE)
+  if (cupsd_kqueue_events)
+  {
+    free(cupsd_kqueue_events);
+    cupsd_kqueue_events = NULL;
+  }
+
+  if (cupsd_kqueue_fd >= 0)
+  {
+    close(cupsd_kqueue_fd);
+    cupsd_kqueue_fd = -1;
+  }
+
+  cupsd_kqueue_changes = 0;
+
+#elif defined(HAVE_POLL)
+  if (cupsd_pollfds)
+  {
+    free(cupsd_pollfds);
+    cupsd_pollfds       = NULL;
+    cupsd_alloc_pollfds = 0;
+  }
+
+  cupsd_update_pollfds = 0;
+
+#else /* select() */
+  FD_ZERO(&cupsd_global_input);
+  FD_ZERO(&cupsd_global_output);
+#endif /* HAVE_EPOLL */
+}
+
+
+/*
+ * 'compare_fds()' - Compare file descriptors.
+ */
+
+static int                             /* O - Result of comparison */
+compare_fds(_cupsd_fd_t *a,            /* I - First file descriptor */
+            _cupsd_fd_t *b)            /* I - Second file descriptor */
+{
+  return (a->fd - b->fd);
+}
+
+
+/*
+ * 'find_fd()' - Find an existing file descriptor record.
+ */
+
+static _cupsd_fd_t *                   /* O - FD record pointer or NULL */
+find_fd(int fd)                                /* I - File descriptor */
+{
+  _cupsd_fd_t  *fdptr,                 /* Matching record (if any) */
+               key;                    /* Search key */
+
+
+  cupsArraySave(cupsd_fds);
+
+  key.fd = fd;
+  fdptr  = (_cupsd_fd_t *)cupsArrayFind(cupsd_fds, &key);
+
+  cupsArrayRestore(cupsd_fds);
+
+  return (fdptr);
+}
+
+
+/*
+ * End of "$Id: select.c 6166 2006-12-29 20:35:18Z mike $".
+ */
index bcc3c71e6bc7521282464d911bf08f51edb400a7..7efbbcd71108af536f76570a86320086c15c07ef 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: server.c 5493 2006-05-05 16:33:57Z mike $"
+ * "$Id: server.c 6123 2006-11-21 15:36:04Z mike $"
  *
  *   Server start/stop routines for the Common UNIX Printing System (CUPS).
  *
@@ -107,10 +107,7 @@ cupsdStartServer(void)
   {
     CGIStatusBuffer = cupsdStatBufNew(CGIPipes[0], "[CGI]");
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdStartServer: Adding fd %d to InputSet...",
-                   CGIPipes[0]);
-    FD_SET(CGIPipes[0], InputSet);
+    cupsdAddSelect(CGIPipes[0], (cupsd_selfunc_t)cupsdUpdateCGI, NULL, NULL);
   }
 
  /*
@@ -158,11 +155,7 @@ cupsdStopServer(void)
 
   if (CGIPipes[0] >= 0)
   {
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdStopServer: Removing fd %d from InputSet...",
-                    CGIPipes[0]);
-
-    FD_CLR(CGIPipes[0], InputSet);
+    cupsdRemoveSelect(CGIPipes[0]);
 
     cupsdStatBufDelete(CGIStatusBuffer);
     close(CGIPipes[1]);
@@ -211,5 +204,5 @@ cupsdStopServer(void)
 
 
 /*
- * End of "$Id: server.c 5493 2006-05-05 16:33:57Z mike $".
+ * End of "$Id: server.c 6123 2006-11-21 15:36:04Z mike $".
  */
index b10f63ebc8f4edfb635b85bacb02b02b577346b6..0450fa14a854f607a3ea7aa68b16605ab6c7d0ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: statbuf.c 5889 2006-08-24 21:44:35Z mike $"
+ * "$Id: statbuf.c 5888 2006-08-24 21:42:47Z mike $"
  *
  *   Status buffer routines for the Common UNIX Printing System (CUPS)
  *   scheduler.
@@ -330,5 +330,5 @@ cupsdStatBufUpdate(cupsd_statbuf_t *sb,     /* I - Status buffer */
 
 
 /*
- * End of "$Id: statbuf.c 5889 2006-08-24 21:44:35Z mike $".
+ * End of "$Id: statbuf.c 5888 2006-08-24 21:42:47Z mike $".
  */
index d0e05d9bec08e5c4b2324f40a967dd0114fa55a6..c077bcdeb0ba9122121595b7628414b0b2cdee18 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: subscriptions.c 5991 2006-09-29 02:26:29Z mike $"
+ * "$Id: subscriptions.c 6176 2007-01-03 15:28:30Z mike $"
  *
  *   Subscription routines for the Common UNIX Printing System (CUPS) scheduler.
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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
@@ -52,8 +52,8 @@
 #  include <dbus/dbus.h>
 #  ifdef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
 #    define dbus_message_append_iter_init dbus_message_iter_init_append
-#    define dbus_message_iter_append_string(i,v) dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, v)
-#    define dbus_message_iter_append_uint32(i,v) dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, v)
+#    define dbus_message_iter_append_string(i,v) dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &(v))
+#    define dbus_message_iter_append_uint32(i,v) dbus_message_iter_append_basic(i, DBUS_TYPE_UINT32, &(v))
 #  endif /* HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
 #endif /* HAVE_DBUS */
 
@@ -1226,10 +1226,7 @@ cupsdStopAllNotifiers(void)
 
   if (NotifierPipes[0] >= 0)
   {
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdStopAllNotifiers: Removing fd %d from InputSet...",
-                   NotifierPipes[0]);
-    FD_CLR(NotifierPipes[0], InputSet);
+    cupsdRemoveSelect(NotifierPipes[0]);
 
     cupsdStatBufDelete(NotifierStatusBuffer);
 
@@ -1362,11 +1359,11 @@ cupsd_send_dbus(cupsd_eventmask_t event,/* I - Event to send */
 
   dbus_message_append_iter_init(message, &iter);
   if (dest)
-    dbus_message_iter_append_string(&iter, &(dest->name));
+    dbus_message_iter_append_string(&iter, dest->name);
   if (job)
   {
-    dbus_message_iter_append_uint32(&iter, &(job->id));
-    dbus_message_iter_append_string(&iter, &(job->username));
+    dbus_message_iter_append_uint32(&iter, job->id);
+    dbus_message_iter_append_string(&iter, job->username);
   }
 
   dbus_connection_send(con, message, NULL);
@@ -1571,11 +1568,8 @@ cupsd_start_notifier(
 
     NotifierStatusBuffer = cupsdStatBufNew(NotifierPipes[0], "[Notifier]");
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "start_notifier: Adding fd %d to InputSet...",
-                   NotifierPipes[0]);
-
-    FD_SET(NotifierPipes[0], InputSet);
+    cupsdAddSelect(NotifierPipes[0], (cupsd_selfunc_t)cupsdUpdateNotifierStatus,
+                   NULL, NULL);
   }
 
   if (cupsdOpenPipe(fds))
@@ -1597,7 +1591,7 @@ cupsd_start_notifier(
   */
 
   if (cupsdStartProcess(command, argv, envp, fds[0], -1, NotifierPipes[1],
-                       -1, 0, &pid) < 0)
+                       -1, -1, 0, &pid) < 0)
   {
    /*
     * Error - can't fork!
@@ -1627,5 +1621,5 @@ cupsd_start_notifier(
 
 
 /*
- * End of "$Id: subscriptions.c 5991 2006-09-29 02:26:29Z mike $".
+ * End of "$Id: subscriptions.c 6176 2007-01-03 15:28:30Z mike $".
  */
index 9671d937faba2682985594cc21d87b701a0f24f7..6cdd3a0635ff9a7a738bc77ebb33916ba9d879f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: subscriptions.h 5673 2006-06-16 21:04:45Z mike $"
+ * "$Id: subscriptions.h 5672 2006-06-16 21:04:07Z mike $"
  *
  *   Subscription definitions for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -168,5 +168,5 @@ extern void cupsdUpdateNotifierStatus(void);
 
 
 /*
- * End of "$Id: subscriptions.h 5673 2006-06-16 21:04:45Z mike $".
+ * End of "$Id: subscriptions.h 5672 2006-06-16 21:04:07Z mike $".
  */
index 61f342dcb92750a9ed0fda1a587f44d6d0e0b9bb..6267b665bfdff947e1c4175e28bde86d32da2849 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: sysman.c 6090 2006-11-14 16:35:27Z mike $"
+ * "$Id: sysman.c 6291 2007-02-19 21:54:27Z mike $"
  *
  *   System management definitions for the Common UNIX Printing System (CUPS).
  *
@@ -160,10 +160,8 @@ cupsdStartSystemMonitor(void)
     return;
   }
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                  "cupsdStartSystemMonitor: Adding fd %d to InputSet...",
-                  SysEventPipes[0]);
-  FD_SET(SysEventPipes[0], InputSet);
+  cupsdAddSelect(SysEventPipes[0], (cupsd_selfunc_t)cupsdUpdateSystemMonitor,
+                 NULL, NULL);
 
  /*
   * Set non-blocking mode on the descriptor we will be receiving notification
@@ -220,12 +218,7 @@ cupsdStopSystemMonitor(void)
 
   if (SysEventPipes[0] >= 0)
   {
-    cupsdLogMessage(CUPSD_LOG_DEBUG2,
-                    "cupsdStopSystemMonitor: Removing fd %d from InputSet...",
-                   SysEventPipes[0]);
-
-    FD_CLR(SysEventPipes[0], InputSet);
-
+    cupsdRemoveSelect(SysEventPipes[0]);
     cupsdClosePipe(SysEventPipes);
   }
 }
@@ -314,7 +307,7 @@ cupsdUpdateSystemMonitor(void)
        {
          cupsdLogMessage(CUPSD_LOG_DEBUG,
                          "Deregistering local printer \"%s\"", p->name);
-         cupsdSendBrowseDelete(p);
+         cupsdDeregisterPrinter(p, 0);
        }
       }
 
@@ -370,18 +363,19 @@ cupsdUpdateSystemMonitor(void)
        for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
             p;
             p = (cupsd_printer_t *)cupsArrayNext(Printers))
-         cupsdSendBrowseDelete(p);
+         cupsdDeregisterPrinter(p, 1);
 
        /*
        * Now re-register them...
-       *
-       * TODO: This might need updating for MDNS.
        */
 
        for (p = (cupsd_printer_t *)cupsArrayFirst(Printers);
             p;
             p = (cupsd_printer_t *)cupsArrayNext(Printers))
+       {
          p->browse_time = 0;
+         cupsdRegisterPrinter(p);
+       }
       }
       else
         cupsdLogMessage(CUPSD_LOG_DEBUG,
@@ -757,5 +751,5 @@ sysEventTimerNotifier(
 
 
 /*
- * End of "$Id: sysman.c 6090 2006-11-14 16:35:27Z mike $".
+ * End of "$Id: sysman.c 6291 2007-02-19 21:54:27Z mike $".
  */
index a49950391980681bd0b73867d2e6bb1b7b0659c7..65b827c25b4a06fb3143dd16f564412674bd4b14 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testlpd.c 5868 2006-08-23 19:39:39Z mike $"
+ * "$Id: testlpd.c 6331 2007-03-12 16:07:31Z mike $"
  *
  *   cups-lpd test program for the Common UNIX Printing System (CUPS).
  *
@@ -184,6 +184,11 @@ main(int  argc,                            /* I - Number of command-line arguments */
     status = status_long(cupslpd_stdin[1], cupslpd_stdout[0], dest, opargs);
   else if (!strcmp(op, "status-short"))
     status = status_short(cupslpd_stdin[1], cupslpd_stdout[0], dest, opargs);
+  else
+  {
+    printf("Unknown operation \"%s\"!\n", op);
+    status = 1;
+  }
 
  /*
   * Kill the test program...
@@ -296,8 +301,8 @@ print_job(int  outfd,                       /* I - Command file descriptor */
            "Hlocalhost\n"
            "P%s\n"
            "J%s\n"
-           "ldfA%03.3dlocalhost\n"
-           "UdfA%03.3dlocalhost\n"
+           "ldfA%03dlocalhost\n"
+           "UdfA%03dlocalhost\n"
            "N%s\n",
           cupsUser(), jobname, sequence, sequence, jobname);
 
@@ -307,7 +312,7 @@ print_job(int  outfd,                       /* I - Command file descriptor */
 
   bytes = strlen(control);
 
-  snprintf(command, sizeof(command), "\002%d cfA%03.3dlocalhost\n",
+  snprintf(command, sizeof(command), "\002%d cfA%03dlocalhost\n",
            bytes, sequence);
 
   if ((status = do_command(outfd, infd, command)) != 0)
@@ -344,7 +349,7 @@ print_job(int  outfd,                       /* I - Command file descriptor */
   * Send the data file...
   */
 
-  snprintf(command, sizeof(command), "\003%d dfA%03.3dlocalhost\n",
+  snprintf(command, sizeof(command), "\003%d dfA%03dlocalhost\n",
            (int)fileinfo.st_size, sequence);
 
   if ((status = do_command(outfd, infd, command)) != 0)
@@ -546,5 +551,5 @@ usage(void)
 
 
 /*
- * End of "$Id: testlpd.c 5868 2006-08-23 19:39:39Z mike $".
+ * End of "$Id: testlpd.c 6331 2007-03-12 16:07:31Z mike $".
  */
index 460e1d5878ffda4650e1f239d3af8c959b3404b9..6246b64b65cbeeded88ebfc2c14bbd59b8a8b455 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testmime.c 5606 2006-05-30 19:40:34Z mike $"
+ * "$Id: testmime.c 5605 2006-05-30 19:38:02Z mike $"
  *
  *   MIME test program for the Common UNIX Printing System (CUPS).
  *
@@ -331,5 +331,5 @@ type_dir(mime_t     *mime,          /* I - MIME database */
 
 
 /*
- * End of "$Id: testmime.c 5606 2006-05-30 19:40:34Z mike $".
+ * End of "$Id: testmime.c 5605 2006-05-30 19:38:02Z mike $".
  */
index 62156bd17e212e4da34a474c77bb7408621479c6..4c70e7839be003f40cca71fad05dce6532c5ead6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testsub.c 5940 2006-09-11 18:30:09Z mike $"
+ * "$Id: testsub.c 5938 2006-09-11 18:23:46Z mike $"
  *
  *   Scheduler notification tester for the Common UNIX Printing System (CUPS).
  *
@@ -527,5 +527,5 @@ usage(void)
 
 
 /*
- * End of "$Id: testsub.c 5940 2006-09-11 18:30:09Z mike $".
+ * End of "$Id: testsub.c 5938 2006-09-11 18:23:46Z mike $".
  */
diff --git a/scripting/java/src/com/easysw/cups/IPPBase64Encoder.java b/scripting/java/src/com/easysw/cups/IPPBase64Encoder.java
deleted file mode 100644 (file)
index e69de29..0000000
index d17772edc4ad68015528b0c8042696f3421e1a69..81f5921f162d3423743eafb467f53ac9fc2f859e 100644 (file)
@@ -1,6 +1,6 @@
 # DO NOT DELETE
 
 phpcups.o: ../../cups/string.h ../../config.h phpcups.h ../../cups/cups.h
-phpcups.o: ../../cups/ipp.h ../../cups/http.h ../../cups/md5.h
-phpcups.o: ../../cups/ppd.h ../../cups/array.h ../../cups/file.h
-phpcups.o: ../../cups/language.h ../../cups/language.h ../../cups/debug.h
+phpcups.o: ../../cups/ipp.h ../../cups/http.h ../../cups/ppd.h
+phpcups.o: ../../cups/array.h ../../cups/file.h ../../cups/language.h
+phpcups.o: ../../cups/language.h ../../cups/debug.h
diff --git a/standards/papi-1.0.pdf b/standards/papi-1.0.pdf
new file mode 100644 (file)
index 0000000..bea5be8
Binary files /dev/null and b/standards/papi-1.0.pdf differ
index c8eac0a08c7cb9d0958a43c5dabea238bddb38cc..e48da544c42b37efae1e16ffeaf491b61ad4e79f 100644 (file)
@@ -1,49 +1,45 @@
 # 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/array.h
-accept.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-accept.o: ../cups/transcode.h
+accept.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+accept.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.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/array.h
-cancel.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-cancel.o: ../cups/transcode.h
+cancel.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+cancel.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
 cupsaddsmb.o: ../cups/string.h ../config.h ../cups/adminutil.h ../cups/cups.h
-cupsaddsmb.o: ../cups/ipp.h ../cups/http.h ../cups/md5.h ../cups/ppd.h
-cupsaddsmb.o: ../cups/array.h ../cups/file.h ../cups/language.h
-cupsaddsmb.o: ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
+cupsaddsmb.o: ../cups/ipp.h ../cups/http.h ../cups/ppd.h ../cups/array.h
+cupsaddsmb.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
+cupsaddsmb.o: ../cups/transcode.h ../cups/debug.h
 cupstestdsc.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
-cupstestdsc.o: ../cups/http.h ../cups/md5.h ../cups/ppd.h ../cups/array.h
-cupstestdsc.o: ../cups/file.h ../cups/language.h ../cups/file.h
-cupstestdsc.o: ../cups/i18n.h ../cups/transcode.h
+cupstestdsc.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+cupstestdsc.o: ../cups/language.h ../cups/file.h ../cups/i18n.h
+cupstestdsc.o: ../cups/transcode.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/array.h
-cupstestppd.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-cupstestppd.o: ../cups/transcode.h
+cupstestppd.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+cupstestppd.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.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/array.h
-lp.o: ../cups/file.h ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+lp.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lp.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.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/array.h
-lpadmin.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-lpadmin.o: ../cups/transcode.h ../cups/debug.h
+lpadmin.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lpadmin.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+lpadmin.o: ../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/array.h
-lpinfo.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-lpinfo.o: ../cups/transcode.h ../cups/debug.h
+lpinfo.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lpinfo.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+lpinfo.o: ../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/array.h
-lpmove.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-lpmove.o: ../cups/transcode.h ../cups/debug.h
+lpmove.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lpmove.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+lpmove.o: ../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/array.h
-lpoptions.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-lpoptions.o: ../cups/transcode.h
+lpoptions.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lpoptions.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.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/array.h
-lppasswd.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-lppasswd.o: ../cups/transcode.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/array.h
-lpstat.o: ../cups/file.h ../cups/language.h ../cups/i18n.h
-lpstat.o: ../cups/transcode.h ../cups/debug.h
+lppasswd.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+lppasswd.o: ../cups/language.h ../cups/i18n.h ../cups/transcode.h
+lppasswd.o: ../cups/md5.h
+lpstat.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/md5.h
+lpstat.o: ../cups/ipp-private.h ../cups/ipp.h ../cups/string.h ../cups/cups.h
+lpstat.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h
+lpstat.o: ../cups/i18n.h ../cups/transcode.h ../cups/debug.h
index 708e4f2dbac12a0797c47bb83fb71c4dae9638c8..053fe2b6bd2f89d6551ef825c5e8742f09beacd5 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5628 2006-06-05 15:25:23Z mike $"
+# "$Id: Makefile 5627 2006-06-05 15:24:20Z mike $"
 #
 #   System V commands makefile for the Common UNIX Printing System (CUPS).
 #
@@ -225,5 +225,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5628 2006-06-05 15:25:23Z mike $".
+# End of "$Id: Makefile 5627 2006-06-05 15:24:20Z mike $".
 #
index f13d4b409b6a510cd41674da9fccc9a2e1eef0c9..63dec108e2c40c628ed4464280d7d36c6426ad68 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: accept.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: accept.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "accept", "disable", "enable", and "reject" commands for the Common
  *   UNIX Printing System (CUPS).
@@ -288,5 +288,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: accept.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: accept.c 5925 2006-09-05 19:43:11Z mike $".
  */
index c5be12dee47441f016db9e61cd0e78ea135382ca..37712f9a242f972b4d3d886d4191bec19735e0fd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cancel.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: cancel.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "cancel" command for the Common UNIX Printing System (CUPS).
  *
@@ -392,5 +392,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id: cancel.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: cancel.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 9e246b770588a4ce23e856fed1522578e394657f..32a0a71880ad475dd69e8243dc04303b1ea21ecd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cupsaddsmb.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: cupsaddsmb.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "cupsaddsmb" command for the Common UNIX Printing System (CUPS).
  *
@@ -294,5 +294,5 @@ usage(void)
 
 
 /*
- * End of "$Id: cupsaddsmb.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: cupsaddsmb.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 1fb3b426e40fc1b09db965c4fbb2c6d15e2de253..e9cc988fee37b211db2f3ba9c6d705ed756ae841 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: cupstestdsc.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: cupstestdsc.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   DSC test program for the Common UNIX Printing System (CUPS).
  *
@@ -452,5 +452,5 @@ usage(void)
 
 
 /*
- * End of "$Id: cupstestdsc.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: cupstestdsc.c 5925 2006-09-05 19:43:11Z mike $".
  */
index fceef8b48473a22805ef5b3884c8c51f659c8271..068a4b81be00e2ac7ff615bebefc14a73a0d5f03 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: cupstestppd.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: cupstestppd.c 6322 2007-03-08 19:25:26Z mike $"
  *
  *   PPD test program for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
+ *   Copyright 1997-2007 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,7 @@
  *   main()           - Main entry for test program.
  *   show_conflicts() - Show option conflicts in a PPD file.
  *   usage()          - Show program usage...
+ *   valid_utf8()     - Check whether a string contains valid UTF-8 text.
  */
 
 /*
@@ -77,7 +78,7 @@ enum
 void   check_basics(const char *filename);
 void   show_conflicts(ppd_file_t *ppd);
 void   usage(void);
-
+int    valid_utf8(const char *s);
 
 /*
  * 'main()' - Main entry for test program.
@@ -1068,7 +1069,7 @@ main(int  argc,                   /* I - Number of command-line arguments */
               option = ppdNextOption(ppd))
          {
            snprintf(keyword, sizeof(keyword), "%s.Translation", langstart);
-           if (!ppdFindAttr(ppd, keyword, option->keyword))
+           if ((attr = ppdFindAttr(ppd, keyword, option->keyword)) == NULL)
            {
              if (verbose >= 0)
              {
@@ -1083,6 +1084,21 @@ main(int  argc,                  /* I - Number of command-line arguments */
 
              errors ++;
            }
+           else if (!valid_utf8(attr->text))
+           {
+             if (verbose >= 0)
+             {
+               if (!errors && !verbose)
+                 _cupsLangPuts(stdout, _(" FAIL\n"));
+
+               _cupsLangPrintf(stdout,
+                               _("      **FAIL**  Bad UTF-8 \"%s\" translation "
+                                 "string for option %s!\n"),
+                               langstart, option->keyword);
+              }
+
+             errors ++;
+           }
 
             for (ptr = option->text; *ptr; ptr ++)
              if (*ptr & 128)
@@ -1116,7 +1132,7 @@ main(int  argc,                   /* I - Number of command-line arguments */
                snprintf(ckeyword, sizeof(ckeyword), "%s.Custom%s",
                         langstart, option->keyword);
 
-               if (!ppdFindAttr(ppd, ckeyword, "True"))
+               if ((attr = ppdFindAttr(ppd, ckeyword, "True")) == NULL)
                {
                  if (verbose >= 0)
                  {
@@ -1133,6 +1149,23 @@ main(int  argc,                  /* I - Number of command-line arguments */
 
                  errors ++;
                }
+               else if (!valid_utf8(attr->text))
+               {
+                 if (verbose >= 0)
+                 {
+                   if (!errors && !verbose)
+                     _cupsLangPuts(stdout, _(" FAIL\n"));
+
+                   _cupsLangPrintf(stdout,
+                                   _("      **FAIL**  Bad UTF-8 \"%s\" "
+                                     "translation string for option %s, "
+                                     "choice %s!\n"),
+                                   langstart, ckeyword + 1 + strlen(langstart),
+                                   "True");
+                 }
+
+                 errors ++;
+               }
 
                 if (strcasecmp(option->keyword, "PageSize"))
                {
@@ -1142,7 +1175,7 @@ main(int  argc,                   /* I - Number of command-line arguments */
                  {
                    snprintf(ckeyword, sizeof(ckeyword), "%s.ParamCustom%s",
                             langstart, option->keyword);
-                   if (!ppdFindAttr(ppd, ckeyword, cparam->name))
+                   if ((attr = ppdFindAttr(ppd, ckeyword, cparam->name)) == NULL)
                    {
                      if (verbose >= 0)
                      {
@@ -1158,12 +1191,30 @@ main(int  argc,                 /* I - Number of command-line arguments */
                                        cparam->name);
                      }
 
+                     errors ++;
+                   }
+                   else if (!valid_utf8(attr->text))
+                   {
+                     if (verbose >= 0)
+                     {
+                       if (!errors && !verbose)
+                         _cupsLangPuts(stdout, _(" FAIL\n"));
+
+                       _cupsLangPrintf(stdout,
+                                       _("      **FAIL**  Bad UTF-8 \"%s\" "
+                                         "translation string for option %s, "
+                                         "choice %s!\n"),
+                                       langstart,
+                                       ckeyword + 1 + strlen(langstart),
+                                       cparam->name);
+                     }
+
                      errors ++;
                    }
                   }
                 }
              }
-             else if (!ppdFindAttr(ppd, keyword, option->choices[j].choice))
+             else if ((attr = ppdFindAttr(ppd, keyword, option->choices[j].choice)) == NULL)
              {
                if (verbose >= 0)
                {
@@ -1180,6 +1231,23 @@ main(int  argc,                  /* I - Number of command-line arguments */
 
                errors ++;
              }
+             else if (!valid_utf8(attr->text))
+             {
+               if (verbose >= 0)
+               {
+                 if (!errors && !verbose)
+                   _cupsLangPuts(stdout, _(" FAIL\n"));
+
+                 _cupsLangPrintf(stdout,
+                                 _("      **FAIL**  Bad UTF-8 \"%s\" "
+                                   "translation string for option %s, "
+                                   "choice %s!\n"),
+                                 langstart, option->keyword,
+                                 option->choices[j].choice);
+               }
+
+               errors ++;
+             }
 
               for (ptr = option->choices[j].text; *ptr; ptr ++)
                if (*ptr & 128)
@@ -1418,8 +1486,7 @@ main(int  argc,                   /* I - Number of command-line arguments */
       if (verbose > 0)
       {
         if (errors)
-          _cupsLangPrintf(stdout, _("    %d ERROR%s FOUND\n"),
-                         errors, errors == 1 ? "" : "S");
+          _cupsLangPrintf(stdout, _("    %d ERRORS FOUND\n"), errors);
        else
          _cupsLangPuts(stdout, _("    NO ERRORS FOUND\n"));
       }
@@ -1790,5 +1857,81 @@ usage(void)
 
 
 /*
- * End of "$Id: cupstestppd.c 5926 2006-09-05 20:45:47Z mike $".
+ * 'valid_utf8()' - Check whether a string contains valid UTF-8 text.
+ */
+
+int                                    /* O - 1 if valid, 0 if not */
+valid_utf8(const char *s)              /* I - String to check */
+{
+  while (*s)
+  {
+    if (*s & 0x80)
+    {
+     /*
+      * Check for valid UTF-8 sequence...
+      */
+
+      if ((*s & 0xc0) == 0x80)
+        return (0);                    /* Illegal suffix byte */
+      else if ((*s & 0xe0) == 0xc0)
+      {
+       /*
+        * 2-byte sequence...
+        */
+
+        s ++;
+
+        if ((*s & 0xc0) != 0x80)
+          return (0);                  /* Missing suffix byte */
+      }
+      else if ((*s & 0xf0) == 0xe0)
+      {
+       /*
+        * 3-byte sequence...
+        */
+
+        s ++;
+
+        if ((*s & 0xc0) != 0x80)
+          return (0);                  /* Missing suffix byte */
+
+        s ++;
+
+        if ((*s & 0xc0) != 0x80)
+          return (0);                  /* Missing suffix byte */
+      }
+      else if ((*s & 0xf8) == 0xf0)
+      {
+       /*
+        * 4-byte sequence...
+        */
+
+        s ++;
+
+        if ((*s & 0xc0) != 0x80)
+          return (0);                  /* Missing suffix byte */
+
+        s ++;
+
+        if ((*s & 0xc0) != 0x80)
+          return (0);                  /* Missing suffix byte */
+
+        s ++;
+
+        if ((*s & 0xc0) != 0x80)
+          return (0);                  /* Missing suffix byte */
+      }
+      else
+        return (0);                    /* Bad sequence */
+    }
+
+    s ++;
+  }
+
+  return (1);
+}
+
+
+/*
+ * End of "$Id: cupstestppd.c 6322 2007-03-08 19:25:26Z mike $".
  */
index f4658ccf9c9ea86192477309ecebd74f44b67e5b..526930cd7dc2927aa299cde036277b53b8ef46ea 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lp.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lp.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "lp" command for the Common UNIX Printing System (CUPS).
  *
@@ -840,5 +840,5 @@ sighandler(int s)                   /* I - Signal number */
 
 
 /*
- * End of "$Id: lp.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lp.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 92ecc866719b7c4ce7a15138bb8a84563b1b6aa6..f48677dd112cfd5ff34cb21f8c53fa862fab2c64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpadmin.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lpadmin.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "lpadmin" command for the Common UNIX Printing System (CUPS).
  *
@@ -1986,5 +1986,5 @@ validate_name(const char *name)           /* I - Name to check */
 
 
 /*
- * End of "$Id: lpadmin.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lpadmin.c 5925 2006-09-05 19:43:11Z mike $".
  */
index dbbe3f63cf63a8c886b1fcc15ebf47ef8d4ccdcb..26f4cf495eb4f3f6eec46083d7c4423819a48c56 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpinfo.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lpinfo.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "lpinfo" command for the Common UNIX Printing System (CUPS).
  *
@@ -436,5 +436,5 @@ show_models(http_t *http,           /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpinfo.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lpinfo.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 5545ddf9aebc01382b4d2a530145a2729918bf13..a46efe0f65a3b0bf2fd472c57269b4664759eecf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpmove.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lpmove.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   "lpmove" command for the Common UNIX Printing System (CUPS).
  *
@@ -235,5 +235,5 @@ move_job(http_t     *http,          /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpmove.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lpmove.c 5925 2006-09-05 19:43:11Z mike $".
  */
index e69bd5a6f14978d9c7be1eb32688c7480734f339..e6778acc9d5378a3f9488e73f61758d81aea580a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpoptions.c 6205 2007-01-22 22:04:43Z mike $"
+ * "$Id: lpoptions.c 6202 2007-01-22 21:37:45Z mike $"
  *
  *   Printer option program for the Common UNIX Printing System (CUPS).
  *
@@ -484,5 +484,5 @@ usage(void)
 
 
 /*
- * End of "$Id: lpoptions.c 6205 2007-01-22 22:04:43Z mike $".
+ * End of "$Id: lpoptions.c 6202 2007-01-22 21:37:45Z mike $".
  */
index 8ad801fd859cf1295eecce9d191eb5f09cb37e77..362fbf208cb5e5d0065868e80a14bf673a5acb94 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lppasswd.c 5926 2006-09-05 20:45:47Z mike $"
+ * "$Id: lppasswd.c 5925 2006-09-05 19:43:11Z mike $"
  *
  *   MD5 password program for the Common UNIX Printing System (CUPS).
  *
@@ -511,5 +511,5 @@ usage(FILE *fp)             /* I - File to send usage to */
 
 
 /*
- * End of "$Id: lppasswd.c 5926 2006-09-05 20:45:47Z mike $".
+ * End of "$Id: lppasswd.c 5925 2006-09-05 19:43:11Z mike $".
  */
index 27f0926e80f29969228a5b87415488e3df4be507..4830117c1aadb7f8bf0dd5877ada27e0ceb7c202 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpstat.c 6090 2006-11-14 16:35:27Z mike $"
+ * "$Id: lpstat.c 6084 2006-11-14 14:35:53Z mike $"
  *
  *   "lpstat" command for the Common UNIX Printing System (CUPS).
  *
@@ -42,6 +42,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
+#include <cups/http-private.h>
 #include <cups/string.h>
 #include <cups/cups.h>
 #include <cups/i18n.h>
@@ -2248,5 +2249,5 @@ show_scheduler(http_t *http)      /* I - HTTP connection to server */
 
 
 /*
- * End of "$Id: lpstat.c 6090 2006-11-14 16:35:27Z mike $".
+ * End of "$Id: lpstat.c 6084 2006-11-14 14:35:53Z mike $".
  */
index e1b5babc76c1eb31ce40d22be5693ad0a84a8a7f..908e622b3ca9fed50bb424258c9b448268ca5584 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5878 2006-08-24 15:55:42Z mike $"
+# "$Id: Makefile 5877 2006-08-24 15:54:12Z mike $"
 #
 #   Template makefile for the Common UNIX Printing System (CUPS).
 #
@@ -156,5 +156,5 @@ uninstall-languages:
 
 
 #
-# End of "$Id: Makefile 5878 2006-08-24 15:55:42Z mike $".
+# End of "$Id: Makefile 5877 2006-08-24 15:54:12Z mike $".
 #
index cff93eb2947eb76308b84a65e01acdbc93f25354..b8c440fe6eb30f9c18ba0e06e40398e4ea921125 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">Add New Printer</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Name:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>(May contain any printable characters except "/", "#", and space)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Location:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>(Human-readable location such as "Lab 1")</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Description:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>(Human-readable description such as "HP LaserJet with Duplexer")</SMALL></TD>
 </TR>
 <TR>
diff --git a/templates/add-rss-subscription.tmpl b/templates/add-rss-subscription.tmpl
new file mode 100644 (file)
index 0000000..4f92351
--- /dev/null
@@ -0,0 +1,43 @@
+<FORM METHOD="POST" ACTION="/admin">
+<INPUT TYPE="HIDDEN" NAME="OP" VALUE="add-rss-subscription">
+
+<H2 CLASS="title">Add RSS Subscription</H2>
+
+<TABLE SUMMARY="Add RSS Subscription form">
+<TR>
+<TH CLASS="label">Name:</TH>
+<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="SUBSCRIPTION_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?SUBSCRIPTION_NAME}"><BR>
+<SMALL>(May contain any printable characters except space, "/", "?", and "#")</SMALL></TD>
+</TR>
+<TR>
+<TH CLASS="label">Queue:</TH>
+<TD COLSPAN="5"><SELECT NAME="PRINTER_URI" SIZE="10"><OPTION VALUE="#ALL#"{?PRINTER_URI=#ALL#? SELECTED:}>All Queues</OPTION>{[printer_name]<OPTION VALUE="{printer_uri_supported}"{?PRINTER_URI={printer_uri_supported}? SELECTED:}>{printer_name}</OPTION>}</SELECT></TD>
+</TR>
+<TR VALIGN="TOP">
+<TH CLASS="label">Events:</TH>
+<TD><INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_CREATED" {?EVENT_JOB_CREATED}>Job Created<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_COMPLETED" {?EVENT_JOB_COMPLETED}>Job Completed<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_STOPPED" {?EVENT_JOB_STOPPED}>Job Stopped<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_JOB_CONFIG_CHANGED" {?EVENT_JOB_CONFIG_CHANGED}>Job Options Changed</TD>
+<TD>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD><INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_STOPPED" {?EVENT_PRINTER_STOPPED}>Queue Stopped<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_ADDED" {?EVENT_PRINTER_ADDED}>Queue Added<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_MODIFIED" {?EVENT_PRINTER_MODIFIED}>Queue Modified<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_PRINTER_DELETED" {?EVENT_PRINTER_DELETED}>Queue Deleted</TD>
+<TD>&nbsp;&nbsp;&nbsp;&nbsp;</TD>
+<TD><INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_STARTED" {?EVENT_SERVER_STARTED}>Server Started<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_STOPPED" {?EVENT_SERVER_STOPPED}>Server Stopped<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_RESTARTED" {?EVENT_SERVER_RESTARTED}>Server Restarted<BR>
+<INPUT TYPE="CHECKBOX" NAME="EVENT_SERVER_AUDIT" {?EVENT_SERVER_AUDIT}>Server Security Auditing</TD>
+</TR>
+<TR>
+<TH CLASS="label">Maximum Events in Feed:</TH>
+<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+</TR>
+<TR>
+<TD></TD>
+<TD COLSPAN="5"><INPUT TYPE="IMAGE" SRC="/images/button-add-rss-subscription.gif" ALT="Add RSS Subscription"></TD>
+</TR>
+</TABLE>
+
+</FORM>
index 470faaa775bef3ed7fd77d7c64231b04a03b6e60..056790dfd9cd33e55c813f22f8722d00b7f0169d 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Administration Tasks">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Printers</H2>
 
@@ -36,7 +36,7 @@ ALT="Manage Classes" CLASS="button"></A>
 Jobs" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Server</H2>
 
@@ -65,6 +65,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Show printers shared by other systems<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Share published printers connected to this system<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Allow remote administration<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Allow users to cancel any job (not just their own)<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Save debugging information for troubleshooting</P>
@@ -75,3 +76,16 @@ CLASS="button"></A>
 
 </TD></TR>
 </TABLE>
+
+<H2 CLASS="title">Subscriptions</H2>
+
+<P>
+<A HREF="/admin/?op=add-rss-subscription"><IMG SRC="/images/button-add-rss-subscription.gif" ALT="Add RSS Subscription" CLASS="button"></A>
+</P>
+
+{notify_subscription_id?<TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0" SUMMARY="RSS Subscriptions">
+<THEAD><TR CLASS="data"><TH>ID</TH><TH>Name</TH><TH>Events</TH><TH>Queue</TH></TR></THEAD>
+<TBODY>{[notify_subscription_id]
+<TR><TD><A HREF="{notify_recipient_uri}">{notify_subscription_id}</A></TD><TD NOWRAP><A HREF="{notify_recipient_uri}">{notify_recipient_name}</A> <A HREF="/admin/?op=cancel-subscription&amp;notify_subscription_id={notify_subscription_id}"><IMG SRC="/images/button-cancel-subscription.gif" CLASS="button" ALT="Cancel RSS Subscription"></A>&nbsp;</TD><TD>{notify_events}</TD><TD NOWRAP>&nbsp;{notify_printer_name?{notify_printer_name}:All Queues}</TD></TR>}
+</TBODY>
+</TABLE>:}
index ef13feca22b0ce50679719e60cd4b7036989fc5d..bc87f9f58a05a70e83f4e43f4fff654c0633ebea 100644 (file)
 {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}, {printer_is_shared=0?not:} published.
 {?member_uris=?:<BR>Members: {member_uris}}
 
-<P>
+<P><TABLE WIDTH="100%" CELLPADDING="5" SUMMARY="Actions">
+<TR VALIGN="TOP"><TD>
 <A HREF="{printer_uri_supported}?op=print-test-page">
-<IMG SRC="/images/button-print-test-page.gif" ALT="Print Test Page" CLASS="button"></A>
-{printer_state=5?
+<IMG SRC="/images/button-print-test-page.gif" ALT="Print Test Page" CLASS="button"></A></TD>
+<TD>{printer_state=5?
 <A HREF="{admin_uri}?op=start-class&amp;printer_name={%printer_name}&amp;is_class=Y">
 <IMG SRC="/images/button-start-class.gif" ALT="Start Class" CLASS="button"></A>
 :
@@ -31,8 +32,8 @@
 <IMG SRC="/images/button-reject-jobs.gif" ALT="Reject Jobs" CLASS="button"></A>
 }
 <A HREF="{admin_uri}?op=purge-jobs&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-cancel-all-jobs.gif" ALT="Cancel All Jobs" CLASS="button"></A>
-{printer_is_shared=0?
+<IMG SRC="/images/button-cancel-all-jobs.gif" ALT="Cancel All Jobs" CLASS="button"></A></TD>
+<TD>{printer_is_shared=0?
 <A HREF="{admin_uri}?op=set-sharing&amp;printer_name={%printer_name}&amp;shared=1&amp;is_class=Y">
 <IMG SRC="/images/button-publish-printer.gif" ALT="Publish Printer" CLASS="button"></A>
 :
@@ -46,8 +47,9 @@
 <A HREF="{admin_uri}?op=set-as-default&amp;printer_name={%printer_name}&amp;is_class=Y">
 <IMG SRC="/images/button-set-as-default.gif" ALT="Set As Default" CLASS="button"></A>
 <A HREF="{admin_uri}?op=set-allowed-users&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-set-allowed-users.gif" ALT="Set Allowed Users" CLASS="button"></A>
-</P>
+<IMG SRC="/images/button-set-allowed-users.gif" ALT="Set Allowed Users" CLASS="button"></A></TD>
+</TR>
+</TABLE></P>
 </TD>
 </TR>
 </TABLE>
index db60277f99a48fd863ff7885e2036c8282ded599..2313910ccf4b774ba3095c02733ca20be45f61b0 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">Neuen Drucker hinzuf&uuml;gen</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Name:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>(Darf alle druckbaren Zeichen au&szlig;er "/", "#", und Leerzeichen enthalten)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Ort:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>(F&uuml;r Menschen lesbarer Ort wie "Labor 1")</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Beschreibung:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>(F&uuml;r Menschen lesbare Beschreibung wie "HP LaserJet mit Duplexeinheit")</SMALL></TD>
 </TR>
 <TR>
index 9bf66863122a27edc430b6b3a0f2398c2c6c19c9..170c42c36a2817d27c2067431f6db2a9aa6b9329 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Administration Tasks">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Drucker</H2>
 
@@ -36,7 +36,7 @@ ALT="Klassen verwalten" CLASS="button"></A>
 verwalten" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Server</H2>
 
@@ -65,6 +65,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Zeige verteilte Drucker von anderen Systemen<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Verteile publizierte Drucker welche mit diesem System verbunden sind<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Erlaube entfernte Verwaltung<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Erlaube Benutzern jeden Auftrag abzubrechen (nicht nur die Eigenen)<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Speichere Fehlerinformationen f&uuml;r Fehlersuche</P>
index 4cfcad1a8a43d3579e900eebba52c3b0bd27f5e8..dc3f09c324266c0186891abde8404e85269f3c68 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index b457fadaf2bad3abf4d52de7a33d75d986edcf62..998514df79f142ee74c6dedcb55591a3a98f2d3b 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index 66c06e97bb7552a0d87c7163ed736c1f5934f974..82c004fe4433ac665f5dc4c05154392bc2658743 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">A&ntilde;adir impresora nueva</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Nombre:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>(Puede contener cualquier car&aacute;cter imprimible excepto "/", "#", y espacio)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Ubicaci&oacute;n:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>(Ubicaci&oacute;n f&aacute;cilmente le&iacute;ble tal como "Lab 1")</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Descripci&oacute;n:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>(Descripci&oacute;n f&aacute;cilmente le&iacute;ble tal como "HP LaserJet de doble cara")</SMALL></TD>
 </TR>
 <TR>
index b80f46f8805c38636d4940112a4a888030bf7ca1..3cd99e0dce7812d4fe4dca8da61903d06f2afe2d 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Tareas de administraci&oacute;n">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Impresoras</H2>
 
@@ -36,7 +36,7 @@ ALT="Administrar clases" CLASS="button"></A>
 trabajos" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Servidor</H2>
 
@@ -65,6 +65,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Mostrar impresoras compartidas por otros sistemas<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Compartir impresoras p&uacute;blicas conectadas a este sistema<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Permitir administraci&oacute;n remota<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Permitir a los usuarios cancelar cualquier trabajo (no s&oacute;lo los suyos propios)<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Guardar informaci&oacute;n de depuraci&oacute;n para b&uacute;squeda de problemas</P>
index 5ebd84cd737fb3153c653383e398b3e23016cc54..28a11beafc5b7db67903cc973ce93e202dfe26e1 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index 21fd997b8e7441d405e7fc420c28295bc7bb02dd..ac59291c5fbe0182f253b0a350baa61b709ea862 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">Uue printeri lisamine</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Nimi:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>(Võib sisaldada kõiki trükitavaid märke, välja arvatud "/", "#" ja tühik)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Asukoht:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>(Arusaadava sisuga asukoht, näiteks "Laud 1")</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Kirjeldus:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>(Arusaadava sisuga kirjeldus, näiteks "HP LaserJet duplekseriga")</SMALL></TD>
 </TR>
 <TR>
index e04ec96c907ea180fe0131812c5c9815910940de..e7d38428a8b6ef19f62dad448fbbc3fba37b160d 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Administration Tasks">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Printerid</H2>
 
@@ -36,7 +36,7 @@ ALT="Halda klasse" CLASS="button"></A>
 töid" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Server</H2>
 
@@ -65,6 +65,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Teiste süsteemide jagatud printerite näitamine<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Aktiivse süsteemiga ühendatud avaldatud printerite jagamine<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Võrguhalduse lubamine<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Kasutajatel lubatakse katkestada kõiki töid (mitte ainult enda omi)<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Silumisinfo salvestamine probleemide tuvastamiseks</P>
index 1345129bd6948eb25250bb0b960dfa70cc9e1ed9..965eeb61843f026d043713df764385e569976616 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index 0fca49e5500672dc4880e273a6f36e4d04aad183..576d53f1734e4d943c0f7999539ac152e65d692a 100644 (file)
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-
-<H2 CLASS="title">Ajouter une classe</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Nom :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"></TD>
-</TR>
-<TR>
-<TH CLASS="label">Lieu :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"></TD>
-</TR>
-<TR>
-<TH CLASS="label">Description :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"></TD>
-</TR>
-<TR>
-<TH CLASS="label">Membres :</TH>
-<TD>
-<SELECT NAME="MEMBER_URIS" SIZE="10" MULTIPLE>
-{[member_uris]<OPTION VALUE="{member_uris}" {?member_selected}>{member_names}}
-</SELECT>
-</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-add-class.gif" ALT="Ajouter une classe"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index f039b95fec2634a55afa00fcc730ffd2df602eb3..f27b415e9f9e170f2f478bd2302ded597888a2a0 100644 (file)
@@ -1,50 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">Ajouter une nouvelle imprimante</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Nom :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>( Peut comporter tout caractère imprimable, "/", "#", et espace exceptés )</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Lieu :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>( Lieu compréhensible pour un utilisateur, comme "Labo 1" )</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Description :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
-<SMALL>( Description compréhensible pour un utilisateur, comme "HP LaserJet recto/verso" )</SMALL></TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-continue.gif" ALT="Poursuivre"></TD>
-</TR>
-</TABLE>
-
-</FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-
-<H2 CLASS="title">Ajouter une nouvelle imprimante</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Nom :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
-<SMALL>( Peut comporter tout caractère imprimable, "/", "#", et espace exceptés )</SMALL></TD>
-</TR>
-<TR>
-<TH CLASS="label">Lieu :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
-<SMALL>( Lieu compréhensible pour un utilisateur, comme "Labo 1" )</SMALL></TD>
-</TR>
-<TR>
-<TH CLASS="label">Description :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>( Description compréhensible pour un utilisateur, comme "HP LaserJet recto/verso" )</SMALL></TD>
 </TR>
 <TR>
index a76ce3636f42baf1a00cefcdb84ee30098ff0d4f..e0486ef6773a0870c7eff3c06d0d2bb971a9d45b 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Tâches d'administration">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Imprimantes</H2>
 
@@ -36,90 +36,7 @@ ALT="Administrer les classes" CLASS="button"></A>
 tâches" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
-
-<H2 CLASS="title">Serveur</H2>
-
-<P>
-<A HREF="/admin?op=config-server"><IMG
-SRC="/images/button-edit-configuration-file.gif" ALT="Éditer le fichier de
-configuration" CLASS="button"></A>
-<A HREF="/admin/log/access_log" TARGET="_blank"><IMG
-SRC="/images/button-view-access-log.gif" ALT="Liste des accès"
-CLASS="button"></A>
-<A HREF="/admin/log/error_log" TARGET="_blank"><IMG
-SRC="/images/button-view-error-log.gif" ALT="Liste des erreurs"
-CLASS="button"></A>
-<A HREF="/admin/log/page_log" TARGET="_blank"><IMG
-SRC="/images/button-view-page-log.gif" ALT="Liste des pages"
-CLASS="button"></A>
-</P>
-
-{SETTINGS_ERROR?<P>{SETTINGS_MESSAGE}</P>
-<BLOCKQUOTE>{SETTINGS_ERROR}</BLOCKQUOTE>:
-
-<FORM METHOD="POST" ACTION="/admin">
-
-<P><B>Paramètres de base du serveur :</B></P>
-
-<P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
-<INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Afficher les
-imprimantes partagées par d'autres systèmes<BR>
-<INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Partager les
-imprimantes publiques connectées à ce système<BR>
-<INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Autoriser
-l'administration à distance<BR>
-<INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Autoriser les
-utilisateurs à annuler n'importe quelle tâche ( pas seulement les leurs )<BR>
-<INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Enregistrer les
-informations de <I>debug</I> pour la résolution de problèmes</P>
-
-<P><INPUT TYPE="IMAGE" SRC="/images/button-change-settings.gif" ALT="Modifier
-les paramètres"></P>
-
-</FORM>}
-
-</TD></TR>
-</TABLE>
-<TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Tâches d'administration">
-<TR><TD VALIGN="TOP" NOWRAP>
-
-<H2 CLASS="title">Imprimantes</H2>
-
-<P>
-<A HREF="/admin?op=add-printer"><IMG
-SRC="/images/button-add-printer.gif" ALT="Ajouter une imprimante" CLASS="button"></A>
-<A HREF="/printers/"><IMG SRC="/images/button-manage-printers.gif"
-ALT="Administrer les imprimantes" CLASS="button"></A>
-{have_samba?<A HREF="/admin/?op=export-samba"><IMG
-SRC="/images/button-export-samba.gif" ALT="Exporter les imprimantes vers SAMBA"
-CLASS="button"></A>:}
-</P>
-
-{#device_uri=0?:<P><B>Nouvelles imprimantes détectées:</B></P><UL>{[device_uri]
-<LI><A HREF="/admin?op=add-printer&amp;{device_options}"><IMG
-SRC="/images/button-add-this-printer.gif" ALT="Ajouter cette imprimante" CLASS="button"
-ALIGN="MIDDLE"></A>
-{device_make_and_model} ({device_info})</LI>
-}</UL>}
-
-<H2 CLASS="title">Classes</H2>
-
-<P>
-<A HREF="/admin?op=add-class"><IMG SRC="/images/button-add-class.gif"
-ALT="Ajouter une classe" CLASS="button"></A>
-<A HREF="/classes/"><IMG SRC="/images/button-manage-classes.gif"
-ALT="Administrer les classes" CLASS="button"></A>
-</P>
-
-<H2 CLASS="title">Tâches d'impression</H2>
-
-<P>
-<A HREF="/jobs/"><IMG SRC="/images/button-manage-jobs.gif" ALT="Administrer les
-tâches" CLASS="button"></A>
-</P>
-
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Serveur</H2>
 
@@ -150,6 +67,7 @@ CLASS="button"></A>
 imprimantes partagées par d'autres systèmes<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Partager les
 imprimantes publiques connectées à ce système<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Autoriser
 l'administration à distance<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Autoriser les
index 89f774b2936c1f0995f30e7ef014200c5bc1d53f..14f19b7b18deb9251d6a1af8c6033c53b049cb76 100644 (file)
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
-<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{?current_make_and_model}">
-
-<H2 CLASS="title">Matériel pour {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Matériel :</TH>
-<TD>
-<SELECT NAME="DEVICE_URI">
-{[device_uri]<OPTION VALUE="{device_uri}{?device_make_and_model!Unknown?|{device_make_and_model}:}" {?current_device_uri={device_uri}?SELECTED:{current_device_scheme={device_uri}?SELECTED:}}>
-{device_info} {?device_make_and_model!Unknown?({device_make_and_model}):}</OPTION>
-}</SELECT>
-</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-continue.gif" ALT="Poursuivre"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index c8b216a08c6b7f7af54df1ae1376ae0206a67497..238d5d98292a5ef0b14c1da69344d6f53206a6c1 100644 (file)
@@ -40,45 +40,3 @@ TYPE="FILE" NAME="PPD_FILE"></TD>
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin" ENCTYPE="multipart/form-data">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
-<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">
-<INPUT TYPE="HIDDEN" NAME="BAUDRATE" VALUE="{?baudrate}">
-<INPUT TYPE="HIDDEN" NAME="BITS" VALUE="{?bits}">
-<INPUT TYPE="HIDDEN" NAME="PARITY" VALUE="{?parity}">
-<INPUT TYPE="HIDDEN" NAME="FLOW" VALUE="{?flow}">
-
-<H2 CLASS="title">Marque/Fabricant pour {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Marque :</TH>
-<TD>
-<SELECT NAME="PPD_MAKE" SIZE="10">
-{[ppd_make]<OPTION VALUE="{ppd_make}" {?current_make={ppd_make}?SELECTED:}>{ppd_make}}
-</SELECT>
-</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-continue.gif" ALT="Poursuivre"></TD>
-</TR>
-<TR>
-<TD></TD>
-<TD>&nbsp;</TD>
-</TR>
-<TR>
-<TH CLASS="label">Ou donnez un fichier PPD :</TH>
-<TD><INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="262144"><INPUT
-TYPE="FILE" NAME="PPD_FILE"></TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-{op}.gif" ALT="{op=add-printer?Ajouter une imprimante:Modifier l'imprimante}"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index 1ee051ebbdc97b80e697e8cd60e85414c0868457..1efeeaefd06f4572c917fcb3026577441f240316 100644 (file)
@@ -32,37 +32,3 @@ TYPE="FILE" NAME="PPD_FILE"></TD>
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin" ENCTYPE="multipart/form-data">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
-<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">
-<INPUT TYPE="HIDDEN" NAME="BAUDRATE" VALUE="{?baudrate}">
-<INPUT TYPE="HIDDEN" NAME="BITS" VALUE="{?bits}">
-<INPUT TYPE="HIDDEN" NAME="PARITY" VALUE="{?parity}">
-<INPUT TYPE="HIDDEN" NAME="FLOW" VALUE="{?flow}">
-
-<H2 CLASS="title">Modèle/Pilote pour {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Modèle:</TH>
-<TD>
-<SELECT NAME="PPD_NAME" SIZE="10">
-{[ppd_name]<OPTION VALUE="{ppd_name}" {?current_make_and_model={ppd_make_and_model}?SELECTED:}>{ppd_make_and_model} ({ppd_natural_language})
-}</SELECT>
-</TD>
-</TR>
-<TR>
-<TH CLASS="label">Ou donnez un fichier PPD :</TH>
-<TD><INPUT TYPE="HIDDEN" NAME="MAX_FILE_SIZE" VALUE="262144"><INPUT
-TYPE="FILE" NAME="PPD_FILE"></TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-{op}.gif" ALT="{op=add-printer?Ajouter une imprimante:Modifier l'imprimante}"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index 14cc4a3f1cc024a185293dc8d3c476ce5e1606fa..5e51734013bc61537ca37846a737fd2a08feefb0 100644 (file)
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
-<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">
-
-<H2 CLASS="title">Paramètres du port série pour {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Baud/s :</TH>
-<TD><SELECT NAME="BAUDRATE">
-{[baudrates]<OPTION {?baudrate={baudrates}?SELECTED:}>{baudrates}}
-</SELECT></TD>
-</TR>
-<TR>
-<TH CLASS="label">Parité :</TH>
-<TD><SELECT NAME="PARITY">
-<OPTION VALUE="none" {?parity=none?SELECTED:}>Aucune
-<OPTION VALUE="even" {?parity=even?SELECTED:}>Paire
-<OPTION VALUE="odd" {?parity=odd?SELECTED:}>Impaire
-</SELECT></TD>
-</TR>
-<TR>
-<TH CLASS="label">Bits données :</TH>
-<TD><SELECT NAME="BITS">
-<OPTION {?bits=8?SELECTED:}>8
-<OPTION {?bits=7?SELECTED:}>7
-</SELECT></TD>
-</TR>
-<TR>
-<TH CLASS="label">Contrôle de flux :</TH>
-<TD><SELECT NAME="FLOW">
-<OPTION VALUE="none" {?flow=none?SELECTED:}>Auncun
-<OPTION VALUE="soft" {?flow=soft?SELECTED:}>XON/XOFF ( Logiciel )
-<OPTION VALUE="hard" {?flow=hard?SELECTED:}>RTS/CTS ( Matériel )
-<OPTION VALUE="dtrdsr" {?flow=dtrdsr?SELECTED:}>DTR/DSR ( Matériel )
-</SELECT></TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-continue.gif" ALT="Poursuivre"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index f9d2873aadd97f7d8087b6df3dee7988ed1da1f1..10401784272f5f5d77ac4b8fe039990f686a7049 100644 (file)
@@ -40,45 +40,3 @@ Printers"</A> pour construire l'URI à employer avec votre imprimante.</P>
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_LOCATION" VALUE="{?printer_location}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_INFO" VALUE="{?printer_info}">
-<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{?current_make_and_model}">
-
-<H2 CLASS="title">URI du matériel pour {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">URI du matériel :</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{device_uri}"></TD>
-</TR>
-<TR>
-<TD></TD>
-<TD>Exemples :
-<PRE>
-    http://nom_machine:631/ipp/
-    http://nom_machine:631/ipp/port1
-
-    ipp://nom_machine/ipp/
-    ipp://nom_machine/ipp/port1
-
-    lpd://nom_machine/queue
-
-    socket://nom_machine
-    socket://nom_machine:9100
-</PRE>
-
-<P>cf. <A HREF="/help/network.html" TARGET="_blank">"Network
-Printers"</A> pour construire l'URI à employer avec votre imprimante.</P>
-
-</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-continue.gif" ALT="Poursuivre"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index be95a0ade3e2347b25dd52c4a18ee2c7c32f668b..097e5081f00f27a6ac43663357ccb66be3290df1 100644 (file)
@@ -1,2 +1 @@
 <P>La classe <A HREF="/classes/{printer_name}">{printer_name}</A> a bien été ajoutée.
-<P>La classe <A HREF="/classes/{printer_name}">{printer_name}</A> a bien été ajoutée.
index 4b8081edfe780f7307a7ee34bac330fb071c5210..95b402021b2bc618dabbb73f778e41b808c81884 100644 (file)
@@ -5,10 +5,3 @@
 HREF="/admin?op=delete-class&printer_name={printer_name}&confirm=yes"><IMG
 SRC="/images/button-delete-class.gif" ALT="Supprimer la classe"
 CLASS="button"></A></P>
-<P><B>Attention :</B> Êtes vous sûr(e) de vouloir supprimer la classe
-{printer_name}?</P>
-
-<P ALIGN="CENTER"><A
-HREF="/admin?op=delete-class&printer_name={printer_name}&confirm=yes"><IMG
-SRC="/images/button-delete-class.gif" ALT="Supprimer la classe"
-CLASS="button"></A></P>
index 9cd00fd82d436a02f6585037ba595c2f4ce41c5f..e7200e69676e1771174893207164d9fc5808ad67 100644 (file)
@@ -1,2 +1 @@
 <P>La classe {printer_name} a bien été supprimée.
-<P>La classe {printer_name} a bien été supprimée.
index 481b044c9798a218799fd0c7788383dcaed5bd9e..8c6dd642fa7e1d0c4c0d6a1d327ff1ff87a11e53 100644 (file)
@@ -1,2 +1 @@
 <H3 CLASS="title">Tâches d'impression</H3>
-<H3 CLASS="title">Tâches d'impression</H3>
index 0915550a002781238f2a32ff4fcef76b60eda0e0..e2e2c3db74fa5fe22b99e13ec3f4a1cbad53994b 100644 (file)
@@ -1,2 +1 @@
 <P>La classe <A HREF="/classes/{printer_name}">{printer_name}</A> a bien été modifiée.
-<P>La classe <A HREF="/classes/{printer_name}">{printer_name}</A> a bien été modifiée.
index 0d8009cfa26845912970adb7e564d0e3b0c57ec9..953cec5b657f4246d175ee882252f37e4aecb08f 100644 (file)
@@ -1,2 +1 @@
 <P ALIGN="CENTER">{total=0?Aucune classe:Affichage de {#printer_name} classe{#printer_name=1?:s} sur {total}}.</P>
-<P ALIGN="CENTER">{total=0?Aucune classe:Affichage de {#printer_name} classe{#printer_name=1?:s} sur {total}}.</P>
index 99706b9f2862dea9187603dc590a78bcd7e08124..4cedfc496066d3e2845d9924478d35a6b48d8f2d 100644 (file)
 </TR>
 </TABLE>
 }}
-{#printer_name=0?:
-{[printer_name]
-<H2 CLASS="title"><A HREF="{printer_uri_supported}">{printer_name}</A>{default_name={printer_name}? ( Imprimante par défaut ) :}
-{?printer_state_message=?:<SPAN CLASS="message">"{printer_state_message}"</SPAN>}</H2>
-
-<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
-<TR>
-<TD VALIGN=TOP><A HREF="{printer_uri_supported}">
-<IMG SRC="/images/classes.gif" CLASS="button" ALT=""></A></TD>
-<TD VALIGN=TOP><B>Description :</B> {printer_info}<BR>
-<B>Lieu :</B> {printer_location}<BR>
-<B>État de la classe:</B> {printer_state=3?ne fait rien:{printer_state=4?en cours d'impression:arrêtée}},
-{printer_is_accepting_jobs=0?rejette les tâches:accepte les tâches}, {printer_is_shared=0?cachée:publique}.
-{?member_uris=?:<BR>Membres : {member_uris}}
-
-<P>
-<A HREF="{printer_uri_supported}?op=print-test-page">
-<IMG SRC="/images/button-print-test-page.gif" ALT="Imprimer une page de test" CLASS="button"></A>
-{printer_state=5?
-<A HREF="{admin_uri}?op=start-class&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-start-class.gif" ALT="Démarrer la classe" CLASS="button"></A>
-:
-<A HREF="{admin_uri}?op=stop-class&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-stop-class.gif" ALT="Arrêter la classe" CLASS="button"></A>
-}
-{printer_is_accepting_jobs=0?
-<A HREF="{admin_uri}?op=accept-jobs&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-accept-jobs.gif" ALT="Accepter les tâches" CLASS="button"></A>
-:
-<A HREF="{admin_uri}?op=reject-jobs&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-reject-jobs.gif" ALT="Rejeter les tâches" CLASS="button"></A>
-}
-<A HREF="{admin_uri}?op=purge-jobs&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-cancel-all-jobs.gif" ALT="Annuler toutes les tâches" CLASS="button"></A>
-{printer_is_shared=0?
-<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={%printer_name}&amp;shared=1&amp;is_class=Y">
-<IMG SRC="/images/button-publish-printer.gif" ALT="Publier l'imprimante" CLASS="button"></A>
-:
-<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={%printer_name}&amp;shared=0&amp;is_class=Y">
-<IMG SRC="/images/button-unpublish-printer.gif" ALT="Cacher l'imprimante" CLASS="button"></A>
-}
-<A HREF="{admin_uri}?op=modify-class&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-modify-class.gif" ALT="Modifier la classe" CLASS="button"></A>
-<A HREF="{admin_uri}?op=delete-class&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-delete-class.gif" ALT="Supprimer la classe" CLASS="button"></A>
-<A HREF="{admin_uri}?op=set-as-default&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-set-as-default.gif" ALT="Choisir par défaut" CLASS="button"></A>
-<A HREF="{admin_uri}?op=set-allowed-users&amp;printer_name={%printer_name}&amp;is_class=Y">
-<IMG SRC="/images/button-set-allowed-users.gif" ALT="Définir les autorisations" CLASS="button"></A>
-</P>
-</TD>
-</TR>
-</TABLE>
-}}
index 95163c0dbd0869d0700ffd085cd321b3dcc44220..d6829317a37d165f62cfb19bc9376183cd23097e 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Groupe des utilisateurs UNIX pour les administrateurs CUPS...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# N'accepter que les connexions de la machine locale.\\n" +
@@ -19,98 +20,7 @@ function reset_config()
 "# Publier les imprimantes partagées sur le réseau local.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
-"\\n" +
-"\\n" +
-"# S'authentifier par défaut via les comptes UNIX...\\n" +
-"DefaultAuthType Basic\\n" +
-"\\n" +
-"# Restreindre l'accès au serveur...\\n" +
-"<Location />\\n" +
-"  Order allow,deny\\n" +
-"  Allow localhost\\n" +
-"</Location>\\n" +
-"\\n" +
-"# Restreindre l'accès aux pages d'administration...\\n" +
-"<Location /admin>\\n" +
-"@ENCRYPTION_REQUIRED@\\n" +
-"  Order allow,deny\\n" +
-"  Allow localhost\\n" +
-"</Location>\\n" +
-"\\n" +
-"# Restreindre l'accès au ficher de configuration...\\n" +
-"<Location /admin/conf>\\n" +
-"  AuthType Basic\\n" +
-"  Require user @SYSTEM\\n" +
-"  Order allow,deny\\n" +
-"  Allow localhost\\n" +
-"</Location>\\n" +
-"\\n" +
-"# Définir la politique par défaut des tâches d'impression...\\n" +
-"<Policy default>\\n" +
-"  # Les opérations sur les tâches doivent être faites par leur propriétaire ou un adminstrateur...\\n" +
-"  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>\\n" +
-"    Require user @OWNER @SYSTEM\\n" +
-"    Order deny,allow\\n" +
-"  </Limit>\\n" +
-"\\n" +
-"  # Toutes les opérations d'administration nécessite l'authentification d'un adminstrateur...\\n" +
-"  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>\\n" +
-"    AuthType Basic\\n" +
-"    Require user @SYSTEM\\n" +
-"    Order deny,allow\\n" +
-"  </Limit>\\n" +
-"\\n" +
-"  # Seuls le propriétaire et un administrateur peuvent annuler ou authentifier une tâche...\\n" +
-"  <Limit Cancel-Job CUPS-Authenticate-Job>\\n" +
-"    Require user @OWNER @SYSTEM\\n" +
-"    Order deny,allow\\n" +
-"  </Limit>\\n" +
-"\\n" +
-"  <Limit All>\\n" +
-"    Order deny,allow\\n" +
-"  </Limit>\\n" +
-"</Policy>\\n";
-}
-</SCRIPT>
-
-<H2 CLASS="title">Ficher de configuration du serveur</H2>
-
-<FORM NAME="cups" METHOD="POST" ACTION="/admin/">
-
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
-
-<TEXTAREA NAME="CUPSDCONF" COLS="80" ROWS="25">{CUPSDCONF}</TEXTAREA>
-
-<P><INPUT TYPE="IMAGE" SRC="/images/button-save-changes.gif"
-ALT="Enregistrer les modifications"> <A
-HREF="javascript:reset_config();"><IMG
-SRC="/images/button-use-default-config.gif" CLASS="button"
-ALT="Utiliser la configuration par défaut"></A></P>
-
-</FORM>
-<SCRIPT TYPE="text/javascript">
-function reset_config()
-{
-  document.cups.CUPSDCONF.value =
-"# Écrire des informations générales dans error_log - changez \\"info\\" en \\"debug\\"\\n" +
-"# pour la résolution de problème...\\n" +
-"LogLevel info\\n" +
-"\\n" +
-"\\n" +
-"# Groupe des utilisateurs UNIX pour les administrateurs CUPS...\\n" +
-"SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
-"\\n" +
-"\\n" +
-"# N'accepter que les connexions de la machine locale.\\n" +
-"Listen localhost:@DEFAULT_IPP_PORT@\\n" +
-"@CUPS_LISTEN_DOMAINSOCKET@\\n" +
-"\\n" +
-"\\n" +
-"# Publier les imprimantes partagées sur le réseau local.\\n" +
-"Browsing On\\n" +
-"BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# S'authentifier par défaut via les comptes UNIX...\\n" +
index dac3e7a3af3053dfccba47c8ffcab5da0c174cf0..85a125424619f1b42d4182c3793893d412af9ecc 100644 (file)
@@ -1,6 +1,3 @@
 <P>Erreur :</P>
 
 <BLOCKQUOTE>Opération inconnue : "{op}"!</BLOCKQUOTE>
-<P>Erreur :</P>
-
-<BLOCKQUOTE>Opération inconnue : "{op}"!</BLOCKQUOTE>
index d51750e00b46fc4c754d61fcbf9979ab95b3e3be..834d131c86ece5eac1b3b651189b62f136633667 100644 (file)
@@ -1,6 +1,3 @@
 <P>{?message?{message}:Erreur :}</P>
 
 <BLOCKQUOTE>{error}</BLOCKQUOTE>
-<P>{?message?{message}:Erreur :}</P>
-
-<BLOCKQUOTE>{error}</BLOCKQUOTE>
index 39b44f919e263b0d3d7a57e8fb6008164f9358c9..1e9c6e5b6130ac8fa8722572a7587fb88807394e 100644 (file)
@@ -61,66 +61,3 @@ BORDER="0" ALT=""></A>
 <TR CLASS="page">
 <TD WIDTH="15">&nbsp;</TD>
 <TD COLSPAN="2" WIDTH="100%" STYLE="height: 100%;" VALIGN="TOP" CLASS="page">
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<HTML>
-<HEAD>
-       <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-       <TITLE>{title} - CUPS @CUPS_VERSION@@CUPS_REVISION@</TITLE>
-       <!-- Prevent caching of CGI content -->
-       <META HTTP-EQUIV="Expires" CONTENT="now">
-       <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
-       {refresh_page?<META HTTP-EQUIV="Refresh" CONTENT="{refresh_page}">:}
-       <LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups.css">
-       <LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
-</HEAD>
-<BODY>
-<TABLE WIDTH="100%" STYLE="height: 100%;" BORDER="0" CELLSPACING="0" CELLPADDING="0" SUMMARY="{title}">
-<TR CLASS="HEADER">
-<TD VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG SRC="/images/top-left.gif" WIDTH="15" HEIGHT="80" ALT=""></TD>
-<TD VALIGN="TOP" WIDTH="55" ROWSPAN="2"><IMG SRC="/images/top-middle.gif" WIDTH="55" HEIGHT="80" ALT=""></TD>
-<TD WIDTH="100%" HEIGHT="60"><H1>{title}</H1></TD>
-<TD ALIGN="RIGHT" VALIGN="TOP" WIDTH="15" ROWSPAN="2"><IMG
-SRC="/images/top-right.gif" WIDTH="15" HEIGHT="15" ALT=""></TD>
-</TR>
-<TR CLASS="HEADER"><TD WIDTH="100%" VALIGN="BOTTOM" NOWRAP>
-
-<A CLASS="unsel" HREF="/"><IMG SRC="/images/tab-left.gif"
-WIDTH="4" HEIGHT="4" ALIGN="TOP" BORDER="0"
-ALT="">&nbsp;&nbsp;Accueil&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="{SECTION=admin?:un}sel" HREF="/admin"><IMG
-SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT="">&nbsp;&nbsp;Administration&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="{SECTION=classes?:un}sel" HREF="/classes/"><IMG
-SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT="">&nbsp;&nbsp;Classes&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="{SECTION=help?:un}sel" HREF="/help/"><IMG
-SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT="">&nbsp;&nbsp;Documentation/Aide&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="{SECTION=jobs?:un}sel" HREF="/jobs/"><IMG
-SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT="">&nbsp;&nbsp;Tâches&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-&nbsp;<A CLASS="{SECTION=printers?:un}sel" HREF="/printers/"><IMG
-SRC="/images/tab-left.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT="">&nbsp;&nbsp;Imprimantes&nbsp;&nbsp;<IMG
-SRC="/images/tab-right.gif" WIDTH="4" HEIGHT="4" ALIGN="TOP"
-BORDER="0" ALT=""></A>
-
-</TD></TR>
-<TR CLASS="page">
-<TD WIDTH="15">&nbsp;</TD>
-<TD COLSPAN="2" WIDTH="100%" STYLE="height: 100%;" VALIGN="TOP" CLASS="page">
index 89e3673a068fc4d2daebc8a0529c2cfd468b8cab..f638d4b3fe0510bb8da79be9c0064d35fc6c710f 100644 (file)
@@ -50,55 +50,3 @@ accès à de nombreuses ressources, comme des forums de discussion pour les
 utilisateurs, des réponses aux questions fréquentes, et un formulaire pour
 soumettre des rapports de <I>bug</I> ou des demandes pour de nouvelles
 fonctionnalités.</P>}
-<FORM ACTION="/help/{?HELPFILE}" METHOD="GET">
-{TOPIC?<INPUT TYPE="HIDDEN" NAME="TOPIC" VALUE="{TOPIC}">:}
-
-<P ALIGN="CENTER"><B>Rechercher dans 
-{HELPTITLE?{HELPTITLE}:{TOPIC?{TOPIC}:Tous les Documents}}:</B> <INPUT
-TYPE="TEXT" NAME="QUERY" VALUE="{?QUERY}" SIZE="60"> <INPUT
-TYPE="IMAGE" SRC="/images/button-search.gif" ALT="Search">
-<A HREF="/help/{?HELPFILE}{QUERY?{TOPIC??TOPIC={TOPIC}:}:}"><IMG
-SRC="/images/button-clear.gif" ALT="Clear" CLASS="button"></A></P>
-
-</FORM>
-
-<!-- Bookmarks -->
-<DIV CLASS="sidebar">
-<H3 CLASS="title">Documents d'aide en ligne</H3>
-
-<P CLASS="l0"><A HREF="/help/{QUERY??QUERY={QUERY}:}">Tous les documents</A></P>
-<HR>
-
-{[BMTEXT]<P CLASS="l{BMINDENT}"><A HREF="{BMLINK}">{BMTEXT}</A></P>
-}
-</DIV>
-
-{QUERY?<P>Résultats de la recherche dans {HELPFILE?{HELPTITLE}:{TOPIC?{TOPIC}:Tous les Documents}}\:</P>
-{QTEXT?<UL>
-{[QTEXT]<LI><A HREF="{QLINK}">{QTEXT}</A>{QPTEXT? (in <I><A HREF="{QPLINK}">{QPTEXT}</A></I>):}</LI>}
-{QTEXT?</UL>:}
-:<P>Aucun résultat.</P>}
-<HR NOSHADE>:}
-{HELPTITLE?<H1>{HELPTITLE}
-<A HREF="/help/{HELPFILE}?PRINTABLE=YES" TARGET="_blank"><IMG
-SRC="/images/button-view-printable-version.gif" ALT="Version imprimable"
-CLASS="button"></A></H1>:<H1>Pages d'aide de CUPS</H1>
-
-<P>Voici l'interface d'aide en ligne de CUPS. Entrez ci-dessus les mots à rechercher
-ou cliquez sur un lien ci-contre pour afficher l'ade en ligne du document.</P>
-
-<P><SMALL><B>NDT:</B> Cette interface n'a pas été traduite en Français. Si vous souhaitez vous
-atteler à cette tâche, merci d'aller au préalable sur le forum <A
-HREF="http://www.cups.org/newsgroups.php?gcups.development">cups.development</A>
-pour en informer les développeurs.</SMALL></P>
-
-<P>Si vous êtes un nouvel utilisateur de CUPS, lisez la page "<a
-href="overview.html">Overview of CUPS</a>". Il est conseillé aux utilisateurs
-habitués de lire la page "<a href="whatsnew.html">What's New in CUPS
-1.2</a>".</P>
-
-<P>La <A HREF="http://www.cups.org/">page d'accueil de CUPS</A> donne aussi
-accès à de nombreuses ressources, comme des forums de discussion pour les
-utilisateurs, des réponses aux questions fréquentes, et un formulaire pour
-soumettre des rapports de <I>bug</I> ou des demandes pour de nouvelles
-fonctionnalités.</P>}
index 66617689db6036aedac28077c814d6a18ce2db49..305112a337342ad30986de08a061772354400bdd 100644 (file)
@@ -9,14 +9,3 @@
 <BODY>
 
 <H1>{HELPTITLE}</H1>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
-<HTML>
-<HEAD>
-       <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
-       <TITLE>{HELPTITLE}</TITLE>
-       <LINK REL="STYLESHEET" TYPE="text/css" HREF="/cups-printable.css">
-       <LINK REL="SHORTCUT ICON" HREF="/favicon.ico" TYPE="image/x-icon">
-</HEAD>
-<BODY>
-
-<H1>{HELPTITLE}</H1>
index 9c2b220f69db9d9441a75f3d9a68d07f51b51ffb..7e473c4145891cb132881f1ea34de0d850c1a4e4 100644 (file)
@@ -1,2 +1 @@
 <P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> a été annulée.
-<P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> a été annulée.
index 17e11a4a2926f0004f13e4528964dd165c8a212a..eea3356dfc97d63d0f39c96a19d89f5cfea7ea07 100644 (file)
@@ -1,2 +1 @@
 <P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> est retenue en attente.
-<P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> est retenue en attente.
index 46ff20b511c6bbff6e9cddacaae0aafbd8452a8e..33f8cf5cb898d004a4886ed88c2a635af9f4271c 100644 (file)
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/{SECTION}/{job_id?:{printer_name}}">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-{job_id?<INPUT TYPE="HIDDEN" NAME="JOB_ID" VALUE="{job_id}">:}
-
-<H2 CLASS="title">{job_id?Transférer la tâche n°{job_id}:Transférer toutes les tâches}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Nouvelle destination :</TH>
-<TD>
-<SELECT NAME="JOB_PRINTER_URI" SIZE="10">
-{[job_printer_uri]<OPTION VALUE="{job_printer_uri}">{job_printer_name}}
-</SELECT>
-</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-move-job{job_id?:s}.gif" ALT="Transférer {job_id?la tâche:les tâches}"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index acde4b93f8821dc1e7a5322464a2c1e54623d543..eb234ce3259ea34d389f5e49f2df3b33ea265f75 100644 (file)
@@ -1,4 +1,2 @@
 <P>{job_id?<A HREF="/jobs/{job_id}">La tâche n°{job_id}</A>:Toutes les tâches}
 ont été transférées vers <A HREF="{job_printer_uri}">{job_printer_name}</A>.</P>
-<P>{job_id?<A HREF="/jobs/{job_id}">La tâche n°{job_id}</A>:Toutes les tâches}
-ont été transférées vers <A HREF="{job_printer_uri}">{job_printer_name}</A>.</P>
index 99768e0d23a899e5bff6fa74a1ef3a3e1bd15b37..bd1693bc9e2faf727312295eea2be108387218ed 100644 (file)
@@ -1,2 +1 @@
 <P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> a été libérée pour l'impression.
-<P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> a été libérée pour l'impression.
index eec322327b63afc26d2fa7169bdaa3afcb48c592..166cf863ccedb5adb3217fa79dae26534e2af7bf 100644 (file)
@@ -1,2 +1 @@
 <P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> a été redémarrée.
-<P><A HREF="{job_printer_uri}">La tâche n°{job_id}</A> a été redémarrée.
index fef8f08cf814c91a21c46cf80d13e7f10a402400..ddf82f3e0adb6523fe86740d3712dbd9be53928d 100644 (file)
@@ -14,19 +14,3 @@ SRC="/images/button-show-all.gif" CLASS="button" ALT="Montrer toutes les tâches
 
 <P ALIGN="CENTER">{total=0?Aucune tâche:Affichage de {#job_id}
 tâche{#job_id=1?:s} {?which_jobs=?en cours:{which_jobs=all?:terminée{#job_id=1?:s}}} sur {total}}.</P>
-<P>{?which_jobs=?<A
-HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
-SRC="/images/button-show-completed.gif" CLASS="button" ALT="Montrer les tâches terminées"></A>
-<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
-SRC="/images/button-show-all.gif" CLASS="button" ALT="Montrer toutes les tâches">:{which_jobs=all?<A
-HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=completed"><IMG
-SRC="/images/button-show-completed.gif" CLASS="button" ALT="Montrer les tâches terminées"></A>
-<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}"><IMG
-SRC="/images/button-show-active.gif" CLASS="button" ALT="Montrer les tâches en cours">:<A
-HREF="{?printer_name=?/jobs:{printer_uri_supported}}"><IMG
-SRC="/images/button-show-active.gif" CLASS="button" ALT="Montrer les tâches en cours"></A>
-<A HREF="{?printer_name=?/jobs:{printer_uri_supported}}?which_jobs=all"><IMG
-SRC="/images/button-show-all.gif" CLASS="button" ALT="Montrer toutes les tâches">}}</A></P>
-
-<P ALIGN="CENTER">{total=0?Aucune tâche:Affichage de {#job_id}
-tâche{#job_id=1?:s} {?which_jobs=?en cours:{which_jobs=all?:terminée{#job_id=1?:s}}} sur {total}}.</P>
index 65e9fa8c5130044132cad34401adf92fdf0483f0..c727ed15f0fad8e425cd66121f17959f44078f68 100644 (file)
@@ -40,45 +40,3 @@ SRC="/images/button-move-job.gif" ALT="Transférer la tâche" CLASS="button"></A
 }
 </TABLE>
 }
-{#job_id=0?:
-<TABLE CELLPADDING="0" CELLSPACING="0" CLASS="button" WIDTH="100%" SUMMARY="Liste de tâches">
-<TR CLASS="data">
-<TH>N°&nbsp;</TH>
-<TH>Nom&nbsp;</TH>
-<TH>Utilisateur&nbsp;</TH>
-<TH>Taille&nbsp;</TH>
-<TH>Pages&nbsp;</TH>
-<TH>État&nbsp;</TH>
-<TH>Contrôle&nbsp;</TH>
-</TR>
-
-{[job_id]
-<TR CLASS="data" VALIGN="TOP">
-<TD><A HREF="{job_printer_uri}">{job_printer_name}</A>-{job_id}&nbsp;</TD>
-<TD>{?job_name=?Inconnue:{job_name}}&nbsp;</TD>
-<TD>{job_originating_user_name}&nbsp;</TD>
-<TD>{job_k_octets}ko&nbsp;</TD>
-<TD>{job_media_sheets_completed=0?Inconnue:{?job_media_sheets_completed}}</TD>
-<TD>{job_state=3?en attente depuis le<BR>{time_at_creation}:{job_state=4?retenue depuis le<BR>{time_at_creation}:
-{job_state=5?en cours depuis le<BR>{time_at_processing}:{job_state=6?arrêtée:
-{job_state=7?annulée le<BR>{time_at_completed}:{job_state=8?abandonnée:terminée le<BR>{time_at_completed}}}}}}}&nbsp;</TD>
-<TD>
-{job_preserved>0?
-<A HREF="/jobs/?op=restart-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
-<IMG SRC="/images/button-restart-job.gif" ALT="Redémarrer la tâche" CLASS="button"></A>:}
-{job_state=4?
-<A HREF="/jobs/?op=release-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
-<IMG SRC="/images/button-release-job.gif" ALT="Libérer la tâche" CLASS="button"></A>:}
-{job_state=3?
-<A HREF="/jobs/?op=hold-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
-<IMG SRC="/images/button-hold-job.gif" ALT="Retenir la tâche" CLASS="button"></A>:}
-{job_state<7?
-<A HREF="/jobs/?op=cancel-job&amp;job_id={job_id}&amp;job_printer_uri={job_printer_uri}">
-<IMG SRC="/images/button-cancel-job.gif" ALT="Annuler la tâche" CLASS="button"></A>
-<A HREF="/jobs/?op=move-job&amp;job_id={job_id}"><IMG
-SRC="/images/button-move-job.gif" ALT="Transférer la tâche" CLASS="button"></A>:}
-&nbsp;</TD>
-</TR>
-}
-</TABLE>
-}
index 25c8f20361669e55ee391c237304ba1593d30def..ab2330d90e366be8a2b900f9380b4041bbfe7e4f 100644 (file)
@@ -1,4 +1,2 @@
 <P>Les commandes de maintenance ont été envoyées ; l'identifiant de tâche est <A
 HREF="/printers/{printer_name}"> {printer_name}-{job_id}</A>.</P>
-<P>Les commandes de maintenance ont été envoyées ; l'identifiant de tâche est <A
-HREF="/printers/{printer_name}"> {printer_name}-{job_id}</A>.</P>
index 68a4747393e5b137cca88ce0e3d697cd603902ad..76cca3864828a66425fbf94f467fcf553d88aa4b 100644 (file)
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-
-<H2 CLASS="title">Modifier la classe {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Nom :</TH>
-<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-{printer_name}</TD>
-</TR>
-<TR>
-<TH CLASS="label">Lieu :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" VALUE="{?printer_location}" SIZE="40" MAXLENGTH="127"></TD>
-</TR>
-<TR>
-<TH CLASS="label">Description :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" VALUE="{?printer_info}" SIZE="40" MAXLENGTH="127"></TD>
-</TR>
-<TR>
-<TH CLASS="label">Membres :</TH>
-<TD>
-<SELECT NAME="MEMBER_URIS" SIZE="10" MULTIPLE>
-{[member_uris]<OPTION VALUE="{member_uris}" {?member_selected}>{member_names}}
-</SELECT>
-</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-modify-class.gif" ALT="Modifier la classe"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index 583e60a7585733f57422a3a02aec5e4eaf6a0863..8834f6f416ce38c7514d706b67209dd65eb17c4e 100644 (file)
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-{?device_uri=?:<INPUT TYPE="HIDDEN" NAME="CURRENT_DEVICE_URI" VALUE="{device_uri}">}
-{?printer_make_and_model=?:<INPUT TYPE="HIDDEN" NAME="CURRENT_MAKE_AND_MODEL" VALUE="{printer_make_and_model}">}
-
-<H2 CLASS="title">Modifier l'imprimante {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Nom :</TH>
-<TD><INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">{printer_name}</TD>
-</TR>
-<TR>
-<TH CLASS="label">Lieu :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" VALUE="{?printer_location}" SIZE="40" MAXLENGTH="127"><BR>
-<SMALL>( Lieu compréhensible pour un utilisateur, comme "Labo 1" )</SMALL></TD>
-</TR>
-<TR>
-<TH CLASS="label">Description :</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" VALUE="{?printer_info}" SIZE="40" MAXLENGTH="127"><BR>
-<SMALL>( Description compréhensible pour un utilisateur, comme "HP LaserJet recto/verso" )</SMALL></TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-continue.gif" ALT="Poursuivre"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index ebf7a03ab5c8f87fe08ba4ff21b218e657c2b857..520980b173c16b7a2ddc149d2334ba6c03f28507 100644 (file)
@@ -1,2 +1 @@
 <p>Le serveur n'a pas été redémarré parce que la configuration n'a pas été modifiée...</p>
-<p>Le serveur n'a pas été redémarré parce que la configuration n'a pas été modifiée...</p>
index 044d628c4c2a6e9ddfb900445c685c0767c0693f..cbac38a8012ed9b9eec9afa111d5eae1e693ffb0 100644 (file)
@@ -5,10 +5,3 @@ NAME="{keyword}">{keytext}</A> :</TH>
 {[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice}?CHECKED:} VALUE="{choices}">{text}}
 </TD>
 </TR>
-<TR>
-<TH CLASS="label"{conflicted=1? CLASS="conflict":}><A
-NAME="{keyword}">{keytext}</A> :</TH>
-<TD>
-{[choices]<INPUT TYPE="RADIO" NAME="{keyword}" {choices={defchoice}?CHECKED:} VALUE="{choices}">{text}}
-</TD>
-</TR>
index 1742255bc79272e7ed33b888d470981f47428846..4746ec8d8ebb815a305ca8872597def498e41483 100644 (file)
@@ -5,10 +5,3 @@
 }</UL>
 
 <P>Veuillez modifier une ou plusieurs des ces options pour résoudre les conflits.</P>
-<P><B>Erreur :</B> Les options suivantes sont incompatibles entre elles :</P>
-
-<UL>
-{[ckeyword]<LI><A HREF="#{ckeyword}">{ckeytext}</A></LI>
-}</UL>
-
-<P>Veuillez modifier une ou plusieurs des ces options pour résoudre les conflits.</P>
index b1b90ccaf141bf77e6d74baee462845db5e30e00..38491dbf5d32a73d8fb19c4a2f47bae21a690a50 100644 (file)
@@ -1,6 +1,3 @@
 <H2 CLASS="title">{printer_name} : {group}</H2>
 
 <TABLE>
-<H2 CLASS="title">{printer_name} : {group}</H2>
-
-<TABLE>
index 0ec733dd46f266e395750e9be5158aab1adad4f3..d59f8cbbf679f8a86e5799fdc13ad869c3700da0 100644 (file)
@@ -5,10 +5,3 @@ NAME="{keyword}">{keytext}</A> :</TH>
 {[choices]<OPTION {choices={defchoice}?SELECTED:} VALUE="{choices}">{text}}
 </SELECT></TD>
 </TR>
-<TR>
-<TH CLASS="label"{conflicted=1? CLASS="conflict":}><A
-NAME="{keyword}">{keytext}</A> :</TH>
-<TD><SELECT NAME="{keyword}" MULTIPLE SIZE="10">
-{[choices]<OPTION {choices={defchoice}?SELECTED:} VALUE="{choices}">{text}}
-</SELECT></TD>
-</TR>
index 780340da85bca6112ec1e645d36d3b17a1e1d61f..3c74fca28cec0b279b90e72396b52176fadacee8 100644 (file)
@@ -5,10 +5,3 @@ NAME="{keyword}">{keytext}</A> :</TH>
 {[choices]<OPTION {choices={defchoice}?SELECTED:} VALUE="{choices}">{text}}
 </SELECT></TD>
 </TR>
-<TR>
-<TH CLASS="label"{conflicted=1? CLASS="conflict":}><A
-NAME="{keyword}">{keytext}</A> :</TH>
-<TD><SELECT NAME="{keyword}">
-{[choices]<OPTION {choices={defchoice}?SELECTED:} VALUE="{choices}">{text}}
-</SELECT></TD>
-</TR>
index 7a72a478516650e77a2c5e4a3bb36a716bf9346a..203796ad8d8e3fb03624dac8a16cddfb3e00d0e5 100644 (file)
@@ -4,9 +4,3 @@
 ALT="Définir les options de l'imprimante"></TD>
 </TR>
 </TABLE>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-set-printer-options.gif"
-ALT="Définir les options de l'imprimante"></TD>
-</TR>
-</TABLE>
index 39dc8464382885e729fb8443ff500e5f2c2383cf..5b0d3bf7355cae28fac9ad9cb0e7c725d35723be 100644 (file)
@@ -9,14 +9,3 @@
         SRC="/images/button-show-next.gif" ALT="Montrer les suivantes" CLASS="button"></A>:&nbsp;}</TD>
 </TR>
 </TABLE>
-<TABLE WIDTH="100%" CLASS="pager" SUMMARY="Mise en page">
-<TR>
-       <TD WIDTH="33%">{PREVURL?<A HREF="{PREVURL}"><IMG
-        SRC="/images/button-show-previous.gif" ALT="Montrer les précédentes" CLASS="button"></A>:&nbsp;}</TD>
-       <TD WIDTH="34%" ALIGN="CENTER">{ORDER=dec?<A
-        HREF="{THISURL}&amp;ORDER=asc"><IMG
-        SRC="/images/button-sort-ascending.gif" ALT="Par ordre croissant" CLASS="button"></A>:<A HREF="{THISURL}&amp;ORDER=dec"><IMG SRC="/images/button-sort-descending.gif" ALT="Par ordre décroissant" CLASS="button"></A>}</TD>
-       <TD WIDTH="33%" ALIGN="RIGHT">{NEXTURL?<A HREF="{NEXTURL}"><IMG
-        SRC="/images/button-show-next.gif" ALT="Montrer les suivantes" CLASS="button"></A>:&nbsp;}</TD>
-</TR>
-</TABLE>
index da26c7ba43906432287c4d0d11a75de8b613e3ce..64e46112e5b6683b0f2efc1d434e7f314922aab8 100644 (file)
@@ -1,6 +1,3 @@
 <P>{is_class?Class:Printer} <A
 HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
 accepte désormais les tâches d'impression.</P>
-<P>{is_class?Class:Printer} <A
-HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
-accepte désormais les tâches d'impression.</P>
index 14302a3688db61152b509b0d48804d4e0ea014ae..67a7ae01bf11c8f78b2cf66fbed22efdc422e0ba 100644 (file)
@@ -1,2 +1 @@
 <P>L'imprimante <A HREF="/printers/{printer_name}">{printer_name}</A> a bien été ajoutée.
-<P>L'imprimante <A HREF="/printers/{printer_name}">{printer_name}</A> a bien été ajoutée.
index 284b753b2d0ef001716cd633aa282350025370f4..808d51e0d657495de82b589e482d347368d3166b 100644 (file)
@@ -1,2 +1 @@
 <P>L'imprimante <A HREF="/printers/{printer_name}">{printer_name}</A> a bien été configurée.
-<P>L'imprimante <A HREF="/printers/{printer_name}">{printer_name}</A> a bien été configurée.
index c1010d7853776895bb2c6f61e8fa32cb036a7a88..8ffcdf9bec3b581723faf6cacc8c78725cca8dc8 100644 (file)
@@ -5,10 +5,3 @@
 HREF="/admin?op=delete-printer&printer_name={printer_name}&confirm=yes"><IMG
 SRC="/images/button-delete-printer.gif" ALT="Supprimer l'imprimante"
 CLASS="button"></A></P>
-<P><B>Attention :</B> Êtes-vous sûr(e) de vouloir supprimer l'imprimante
-{printer_name} ?</P>
-
-<P ALIGN="CENTER"><A
-HREF="/admin?op=delete-printer&printer_name={printer_name}&confirm=yes"><IMG
-SRC="/images/button-delete-printer.gif" ALT="Supprimer l'imprimante"
-CLASS="button"></A></P>
index fbdcbf20779d35c32604666d137197fbdb3b4478..2ce4ef8f3979905a1d88c895a654ff341f507e78 100644 (file)
@@ -5,10 +5,3 @@ a été définie comme imprimante par défaut sur le serveur.</P>
 <BLOCKQUOTE><B>NB:</B> Pour un utilisateur qui a défini un paramètre par défaut
 via la commande <TT>lpoptions</TT>, le paramètre du serveur sera
 ignoré.</BLOCKQUOTE>
-<P>{is_class?La classe:L'imprimante} <A
-HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
-a été définie comme imprimante par défaut sur le serveur.</P>
-
-<BLOCKQUOTE><B>NB:</B> Pour un utilisateur qui a défini un paramètre par défaut
-via la commande <TT>lpoptions</TT>, le paramètre du serveur sera
-ignoré.</BLOCKQUOTE>
index c1fc3a18cc389200c251567c7c2ae731ffa84dc7..2f31e34cb616ecb3d0950cd5ea81711d01b0dd5d 100644 (file)
@@ -1,2 +1 @@
 <P>L'imprimante {printer_name} a bien été supprimée.
-<P>L'imprimante {printer_name} a bien été supprimée.
index 481b044c9798a218799fd0c7788383dcaed5bd9e..8c6dd642fa7e1d0c4c0d6a1d327ff1ff87a11e53 100644 (file)
@@ -1,2 +1 @@
 <H3 CLASS="title">Tâches d'impression</H3>
-<H3 CLASS="title">Tâches d'impression</H3>
index 07b1033eb088115ae9ad313375165362889c7502..16bec9ac18540bb35c54a7b82192ec70a3fa9f6c 100644 (file)
@@ -1,2 +1 @@
 <P>L'imprimante <A HREF="/printers/{printer_name}">{printer_name}</A> a bien été modifiée.
-<P>L'imprimante <A HREF="/printers/{printer_name}">{printer_name}</A> a bien été modifiée.
index e3550fe5d02d741b48fdd20bcab038f7c8846002..fe6b91488b3b21e3732da8301e9dd8ceed755310 100644 (file)
@@ -1,6 +1,3 @@
 <P>{is_class?La classe:L'imprimante} <A
 HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
 a été nettoyée de toute tâche... d'impression !</P>
-<P>{is_class?La classe:L'imprimante} <A
-HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
-a été nettoyée de toute tâche... d'impression !</P>
index 78fb124b99108f4284834b967258c01f80f79f94..aee5a5f0f249aac1d08ef3fe5f3f06c0944bb5af 100644 (file)
@@ -1,6 +1,3 @@
 <P>{is_class?La classe:L'imprimante} <A
 HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
 n'accepte plus les tâches d'impression.</P>
-<P>{is_class?La classe:L'imprimante} <A
-HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
-n'accepte plus les tâches d'impression.</P>
index 38af56631f6045b4e99da065c312910e749c96d4..369160583d6f0ce6b37f7bd4eaaebe223afaa455 100644 (file)
@@ -1,6 +1,3 @@
 <P>{is_class?La classe:L'imprimante} <A
 HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
 a été démarrée.</P>
-<P>{is_class?La classe:L'imprimante} <A
-HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
-a été démarrée.</P>
index dd7bb22daa34378c23a30fdff9dde4fb21a1f388..df12bee75dfbee4d0aff9936bcd74b85047e6b8f 100644 (file)
@@ -1,6 +1,3 @@
 <P>{is_class?La classe:L'imprimante} <A
 HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
 a été arrêtée.</P>
-<P>{is_class?La classe:L'imprimante} <A
-HREF="/{is_class?classes:printers}/{printer_name}">{printer_name}</A>
-a été arrêtée.</P>
index 87754f431bbf7c554a81a65afea7cf550fd7b3a7..b97d99f2cb8c9a793acba70912d67bccfe23ec70 100644 (file)
@@ -1,2 +1 @@
 <P ALIGN="CENTER">{total=0?Aucune imprimante:Affichage de {#printer_name} imprimante{#printer_name=1?:s}} sur {total}.</P>
-<P ALIGN="CENTER">{total=0?Aucune imprimante:Affichage de {#printer_name} imprimante{#printer_name=1?:s}} sur {total}.</P>
index ac7d24902bb36cd032bd4c34c3770f7df940cf49..d392b257b57140e5733ad3588bd280f380913391 100644 (file)
@@ -64,69 +64,3 @@ imprimante par défaut ) :}
 </TR>
 </TABLE>
 }}
-{printer_type?:}{#printer_name=0?:
-{[printer_name]
-<H2 CLASS="title"><A
-HREF="{printer_uri_supported}">{printer_name}</A>{default_name={printer_name}? (
-imprimante par défaut ) :}
-{?printer_state_message=?:<SPAN CLASS="message">"{printer_state_message}"</SPAN>}</H2>
-
-<TABLE WIDTH="100%" CLASS="button" CELLSPACING="0" CELLPADDING="0" SUMMARY="{printer_name}">
-<TR>
-<TD VALIGN="TOP"><A HREF="{printer_uri_supported}">
-<IMG SRC="/images/printer-{printer_state=3?idle:{printer_state=4?processing:stopped}}.gif" CLASS="button" ALT=""></A>
-</TD>
-<TD VALIGN="TOP"><B>Description :</B> {printer_info}<BR>
-<B>Lieu :</B> {printer_location}<BR>
-<B>Marque et modèle :</B> {printer_make_and_model}<BR>
-<B>État de l'imprimante :</B> {printer_state=3?ne fait rien:{printer_state=4?en cours d'impression:arrêtée}},
-{printer_is_accepting_jobs=0?rejette les tâches:accepte les tâches}, {printer_is_shared=0?cachée:publique}.
-{?device_uri=?:<BR><B>URI du matériel :</B> {device_uri}}
-
-<P>
-<A HREF="{printer_uri_supported}?op=print-test-page">
-<IMG SRC="/images/button-print-test-page.gif" ALT="Imprimer la page de test CUPS" CLASS="button"></A>
-{?cupscommand=1?<A HREF="{printer_uri_supported}?op=clean-print-heads">
-<IMG SRC="/images/button-clean-print-heads.gif" ALT="Nettoyer les têtes d'impression" CLASS="button"></A>
-<A HREF="{printer_uri_supported}?op=print-self-test-page">
-<IMG SRC="/images/button-print-self-test-page.gif" ALT="Imprimer la page de test de l'imprimante" CLASS="button"></A>:}
-{printer_state=5?
-<A HREF="{admin_uri}?op=start-printer&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-start-printer.gif" ALT="Démarrer l'imprimante" CLASS="button"></A>
-:
-<A HREF="{admin_uri}?op=stop-printer&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-stop-printer.gif" ALT="Arrêter l'imprimante" CLASS="button"></A>
-}
-{printer_is_accepting_jobs=0?
-<A HREF="{admin_uri}?op=accept-jobs&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-accept-jobs.gif" ALT="Accepter les tâches" CLASS="button"></A>
-:
-<A HREF="{admin_uri}?op=reject-jobs&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-reject-jobs.gif" ALT="Rejeter les tâches" CLASS="button"></A>
-}
-<A HREF="{printer_uri_supported}?op=move-jobs&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-move-jobs.gif" ALT="Transférer toutes les tâches" CLASS="button"></A>
-<A HREF="{admin_uri}?op=purge-jobs&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-cancel-all-jobs.gif" ALT="Annuler toutes les tâches" CLASS="button"></A>
-{printer_is_shared=0?
-<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={%printer_name}&amp;shared=1">
-<IMG SRC="/images/button-publish-printer.gif" ALT="Publier l'imprimante" CLASS="button"></A>
-:
-<A HREF="{admin_uri}?op=set-sharing&amp;printer_name={%printer_name}&amp;shared=0">
-<IMG SRC="/images/button-unpublish-printer.gif" ALT="Cacher l'imprimante" CLASS="button"></A>
-}
-<A HREF="{admin_uri}?op=modify-printer&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-modify-printer.gif" ALT="Modifier l'imprimante" CLASS="button"></A>
-<A HREF="{admin_uri}?op=set-printer-options&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-set-printer-options.gif" ALT="Définir les options de l'imprimante" CLASS="button"></A>
-<A HREF="{admin_uri}?op=delete-printer&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-delete-printer.gif" ALT="Supprimer l'imprimante" CLASS="button"></A>
-<A HREF="{admin_uri}?op=set-as-default&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-set-as-default.gif" ALT="Définir par défaut" CLASS="button"></A>
-<A HREF="{admin_uri}?op=set-allowed-users&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-set-allowed-users.gif" ALT="Définir les autorisations" CLASS="button"></A>
-</P>
-</TD>
-</TR>
-</TABLE>
-}}
index f2485c5c49824c4a10ce81e235a4d5e83456891e..b78344d60e8e36bf6073fe7e61dccc11068acf11 100644 (file)
@@ -1,2 +1 @@
 <p>Attendez s'il vous plaît, que le serveur redémarre...</p>
-<p>Attendez s'il vous plaît, que le serveur redémarre...</p>
index 9ed3259be258e0c03bbcc8e4456d8fe1b189c269..3a51c932f5c65a4f75d14e2500ec406489334ed9 100644 (file)
@@ -51,56 +51,3 @@ ALT="Exporter les imprimantes vers SAMBA"></TD>
 </TABLE>
 
 </FORM>
-<SCRIPT TYPE="text/javascript"><!--
-function select_printers() {
-  var list = document.export_samba.EXPORT_NAME;
-  var sel = document.export_samba.EXPORT_ALL.checked;
-
-  for (i = 0; i < list.length; i ++) {
-    list.options[i].selected = sel;
-  }
-}
---></SCRIPT>
-
-<FORM METHOD="POST" ACTION="/admin/" NAME="export_samba">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="export-samba">
-
-<H2 CLASS="title">Exporter des imprimantes vers SAMBA</H2>
-
-{error?<P>Impossible d'exporter les imprimantes vers SAMBA \:</P>
-<BLOCKQUOTE>{error}</BLOCKQUOTE>
-<P>Regardez le fichier <A HREF="/admin/log/error_log"
-TARGET="_blank">error_log</A> pour plus d'informations.</P>:
-<P>Cette page vous permet d'exporter des imprimantes vers SAMBA de sorte que des
-clients Windows puissent y accéder via l'icône <VAR>Voisinage réseau</VAR> ou
-<VAR>Favoris réseau</VAR> du bureau. Vous devez au préalable installer les
-pilotes Windows d'imprimante PostScript : cf. la page <i>man</i> <A
-HREF="/help/man-cupsaddsmb.html" TARGET="_blank">cupsaddsmb(8)</A>.</P>}
-
-<TABLE>
-<TR>
-<TH CLASS="label">Imprimantes :</TH>
-<TD>
-<SELECT NAME="EXPORT_NAME" SIZE="10" MULTIPLE>
-{[printer_name]<OPTION VALUE="{printer_name}"{export_all? SELECTED:{printer_export? SELECTED:}}>{printer_name}}
-</SELECT><BR>
-<INPUT TYPE="CHECKBOX" NAME="EXPORT_ALL"{export_all? CHECKED:}
-onChange="select_printers()"> Exporter toutes les imprimantes
-</TD>
-</TR>
-<TR>
-<TH CLASS="label">Utilisateur SAMBA :</TH>
-<TD><INPUT TYPE="TEXT" NAME="USERNAME" VALUE="{?USERNAME}"> ( indispensable )</TD>
-</TR>
-<TR>
-<TH CLASS="label">Mot-de-passe SAMBA :</TH>
-<TD><INPUT TYPE="PASSWORD" NAME="PASSWORD" VALUE=""> ( indispensable )</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD><INPUT TYPE="IMAGE" SRC="/images/button-export-samba.gif"
-ALT="Exporter les imprimantes vers SAMBA"></TD>
-</TR>
-</TABLE>
-
-</FORM>
index cac3084312789fd6012585148bae2e17724e342c..2eca0390aaf891ca98b75468b0d3570313640e65 100644 (file)
@@ -1,2 +1 @@
 <P>Les imprimantes ont bien été exportées vers SAMBA.</P>
-<P>Les imprimantes ont bien été exportées vers SAMBA.</P>
index 91f673e80f899f6346af068b808114c2bbdf5428..667eedbad63bd26fe5835a0655c2f2b9c0140eaa 100644 (file)
@@ -11,16 +11,3 @@ HREF="/{SECTION}/{?SEARCH_DEST}{WHICH_JOBS??WHICH_JOBS={WHICH_JOBS}{ORDER?&amp;O
 SRC="/images/button-clear.gif" ALT="Nettoyer" CLASS="button"></A></P>
 
 </FORM>
-<FORM ACTION="/{SECTION}/{?SEARCH_DEST}" METHOD="GET">
-{WHICH_JOBS?<INPUT TYPE="HIDDEN" NAME="WHICH_JOBS" VALUE="{WHICH_JOBS}">:}
-{ORDER?<INPUT TYPE="HIDDEN" NAME="ORDER" VALUE="{ORDER}">:}
-
-<P ALIGN="CENTER"><B>Rechercher dans 
-{SEARCH_DEST?{SEARCH_DEST}:{SECTION=classes?les classes:{SECTION=jobs?les tâches:les imprimantes}}} :</B>
-<INPUT TYPE="TEXT" NAME="QUERY" VALUE="{?QUERY}" SIZE="60"> <INPUT
-TYPE="IMAGE" SRC="/images/button-search.gif" ALT="Rechercher">
-<A
-HREF="/{SECTION}/{?SEARCH_DEST}{WHICH_JOBS??WHICH_JOBS={WHICH_JOBS}{ORDER?&amp;ORDER={ORDER}:}:{ORDER??ORDER={ORDER}:}}"><IMG
-SRC="/images/button-clear.gif" ALT="Nettoyer" CLASS="button"></A></P>
-
-</FORM>
index 84536d54521814966d40a2950a5e06a52020405a..864f9f0ced9bf5455d0dbbff27101b4ad137a216 100644 (file)
@@ -1,6 +1,3 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
index 3f6f64a749abc0fab0a711bd9fb791569d65ed36..a3d1e1ffaa67982f21baa9adb4e1866af29f1793 100644 (file)
@@ -1,2 +1 @@
 </FORM>
-</FORM>
index bf79bd9316396f057c4e35889132aaaa4e09cefd..60c16ac1e6c3acd4113953f458138b41b054d595 100644 (file)
@@ -1,4 +1,2 @@
 <P>La page de test a été envoyée ; l'identifiant de la tâche est <A HREF="/{SECTION}/{printer_name}">
 {printer_name}-{job_id}</A>.</P>
-<P>La page de test a été envoyée ; l'identifiant de la tâche est <A HREF="/{SECTION}/{printer_name}">
-{printer_name}-{job_id}</A>.</P>
index d9b74c3dd51c0790aa297099c75bf2e76ca240b8..9d03e7537ce0223e58ff83e1287838163ea46448 100644 (file)
@@ -19,24 +19,3 @@ WIDTH="15" HEIGHT="15" ALT=""></TD>
 </TABLE>
 </BODY>
 </HTML>
-</TD>
-<TD WIDTH="15">&nbsp;</TD>
-</TR>
-<TR CLASS="trailer">
-<TD VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-left.gif"
-WIDTH="15" HEIGHT="15" ALT=""></TD>
-<TD COLSPAN="2" WIDTH="100%" STYLE="padding: 5;">
-
-<P><SMALL>Le logiciel CUPS ( Common UNIX Printing System ) et son logo sont
-propriété commerciale de <A HREF="http://www.easysw.com">Easy Software
-Products</A>. CUPS est sous copyright 1997-2006 par Easy Software Products, Tous
-Droits Réservés.</SMALL></P>
-
-</TD>
-
-<TD ALIGN="RIGHT" VALIGN="BOTTOM" WIDTH="15"><IMG SRC="/images/bottom-right.gif"
-WIDTH="15" HEIGHT="15" ALT=""></TD>
-</TR>
-</TABLE>
-</BODY>
-</HTML>
index b2d29141f0b399a4130dacf881671770fbeda692..8c5486a01566567212e3ba851e18d9734306b179 100644 (file)
 </TABLE>
 
 </FORM>
-<FORM METHOD="POST" ACTION="/admin">
-<INPUT TYPE="HIDDEN" NAME="OP" VALUE="{OP}">
-<INPUT TYPE="HIDDEN" NAME="PRINTER_NAME" VALUE="{printer_name}">
-{IS_CLASS?<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="{IS_CLASS}">:}
-
-<H2 CLASS="title">Utilisateurs autorisés à utiliser {printer_name}</H2>
-
-<TABLE>
-<TR>
-<TH CLASS="label">Utilisateurs :</TH>
-<TD>
-<INPUT TYPE='TEXT' NAME='users' SIZE='60' VALUE='{?requesting_user_name_allowed}{?requesting_user_name_denied}'>
-<BR>
-<INPUT TYPE='RADIO' NAME='type' VALUE='requesting-user-name-allowed' {requesting_user_name_allowed?checked:}>Autoriser ces utilisateurs à imprimer
-<INPUT TYPE='RADIO' NAME='type' VALUE='requesting-user-name-denied' {requesting_user_name_denied?checked:}>Empêcher ces utilisateurs d'imprimer
-</TD>
-</TR>
-<TR>
-<TD></TD>
-<TD>
-<INPUT TYPE="IMAGE" SRC="/images/button-set-allowed-users.gif" ALT="Définir les autorisations">
-</TD>
-</TR>
-</TABLE>
-
-</FORM>
index cff93eb2947eb76308b84a65e01acdbc93f25354..b8c440fe6eb30f9c18ba0e06e40398e4ea921125 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">Add New Printer</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Name:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>(May contain any printable characters except "/", "#", and space)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Location:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>(Human-readable location such as "Lab 1")</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Description:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>(Human-readable description such as "HP LaserJet with Duplexer")</SMALL></TD>
 </TR>
 <TR>
index ee1019025cd0ad3dd61c8fd1861a543e1cb2d66a..b7526b3cfd7a70bc9f8a099aa903438b5884ce27 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Administration Tasks">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Stampanti</H2>
 
@@ -36,7 +36,7 @@ ALT="Gestione classi" CLASS="button"></A>
 operazioni" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Server</H2>
 
@@ -65,6 +65,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Mostra stampanti condivise da altri sistemi<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Condividi le stampanti pubblicate connesse a questo sistema<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Consenti amministrazione remota<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Consenti agli utenti di annullare qualunque operazione (non solo le proprie)<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Salva le informazioni di debug per la risoluzione di problemi</P>
index be2ed2ba43d2ce737304a1a3fdbdc831252e6b86..7c3f4301e678da0f2a8578b65ae5f8abd16105e8 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index aac93808b358353e645b72f5b715e2a9711c3625..87cda3381e1ec2b0bb95e25fd905252f5cd73d38 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">新しいプリンタの追加</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">名前:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>("/"、"#"、空白を除く適当な表示可能文字を含めることができます)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">場所:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>("Lab 1" のように人間が読みやすい場所)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">説明:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>("HP LaserJet with Duplexer" のように人間が読みやすい説明)</SMALL></TD>
 </TR>
 <TR>
index 064028af86c7c7451db575ae3bdefcdb2f2b0956..ad8a5b7d1029c62129a7e6a2556ce781fbfd683b 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" CLASS="button" WIDTH="100%" SUMMARY="Administration Tasks">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">プリンタ</H2>
 
@@ -35,7 +35,7 @@ ALT="クラスの管理" CLASS="button"></A>
 <A HREF="/jobs/"><IMG SRC="/images/button-manage-jobs.gif" ALT="ジョブの管理" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">サーバ</H2>
 
@@ -63,6 +63,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> ほかのシステムで共有されているプリンタを表示<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> このシステムに接続されている公開済みプリンタを共有<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> リモート管理を許可<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> どのジョブであってもキャンセルすることを (たとえ所有者でなくても) ユーザに許可<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> トラブルシューティングのためにデバッグ情報を保存</P>
index b3d4a96d1c10ba928320d4564faca06ddf9c3088..baa2f5f2aac3f4f47d4537170019f99b08cf6db4 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index a264e05f2dcd998b594d9da216e5e6cd7f581ee9..59aa6faa9a3211168ba46a1b94b4f9ac210c1957 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">Dodaj nową drukarkę</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Nazwa:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>(Może zawierać dowolne drukowalne znaki z wyjątkiem "/", "#" i spacji)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Położenie:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>(Położenie czytelne dla człowieka, takie jak "Laboratorium 1")</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Opis:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>(Opis czytelny dla człowieka, taki jak "HP LaserJet z Dupleksem")</SMALL></TD>
 </TR>
 <TR>
index 5dd0ac8187bbf792b58a6be752a1641717c4a716..12e40cd1c43e15defe78f95a120e4895d667015a 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Zadania administracyjne">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Drukarki</H2>
 
@@ -35,7 +35,7 @@ ALT="Zarządzaj klasami" CLASS="button"></A>
 <A HREF="/jobs/"><IMG SRC="/images/button-manage-jobs.gif" ALT="Zarządzaj zadaniami" CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Serwer</H2>
 
@@ -63,6 +63,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Wyświetl drukarki udostępniane przez inne systemy<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Udostępnij opublikowane drukarki połączone do tego systemu<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Pozwól na zdalną administrację<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Pozwól użytkownikom na anulowanie każdego zadania (nie tylko ich)<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Zapisz informacje o debugowaniu do rozwiązywania problemów</P>
index 939f0115356a19558f5c2207dfa6dd7e10183861..0fd1800790a7b78315f4c712af67e9b06b187d0f 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index d4f5e569acaf3bf8ab35c7353b514493a2c70832..24fb466bb0fb30a3bb02cc2c2d0f085abed7d637 100644 (file)
 {printer_is_accepting_jobs=0?rejecting jobs:accepting jobs}, {printer_is_shared=0?not:} published.
 {?device_uri=?:<BR><B>Device URI:</B> {device_uri}}
 
-<P>
+<P><TABLE WIDTH="100%" CELLPADDING="5" SUMMARY="Actions">
+<TR VALIGN="TOP"><TD>
 <A HREF="{printer_uri_supported}?op=print-test-page">
 <IMG SRC="/images/button-print-test-page.gif" ALT="Print Test Page" CLASS="button"></A>
 {?cupscommand=1?<A HREF="{printer_uri_supported}?op=clean-print-heads">
 <IMG SRC="/images/button-clean-print-heads.gif" ALT="Clean Print Heads" CLASS="button"></A>
 <A HREF="{printer_uri_supported}?op=print-self-test-page">
-<IMG SRC="/images/button-print-self-test-page.gif" ALT="Print Self Test Page" CLASS="button"></A>:}
-{printer_state=5?
+<IMG SRC="/images/button-print-self-test-page.gif" ALT="Print Self Test Page" CLASS="button"></A>:}</TD>
+<TD>{printer_state=5?
 <A HREF="{admin_uri}?op=start-printer&amp;printer_name={%printer_name}">
 <IMG SRC="/images/button-start-printer.gif" ALT="Start Printer" CLASS="button"></A>
 :
@@ -39,8 +40,8 @@
 <A HREF="{printer_uri_supported}?op=move-jobs&amp;printer_name={%printer_name}">
 <IMG SRC="/images/button-move-jobs.gif" ALT="Move All Jobs" CLASS="button"></A>
 <A HREF="{admin_uri}?op=purge-jobs&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-cancel-all-jobs.gif" ALT="Cancel All Jobs" CLASS="button"></A>
-{printer_is_shared=0?
+<IMG SRC="/images/button-cancel-all-jobs.gif" ALT="Cancel All Jobs" CLASS="button"></A></TD>
+<TD>{printer_is_shared=0?
 <A HREF="{admin_uri}?op=set-sharing&amp;printer_name={%printer_name}&amp;shared=1">
 <IMG SRC="/images/button-publish-printer.gif" ALT="Publish Printer" CLASS="button"></A>
 :
@@ -56,8 +57,9 @@
 <A HREF="{admin_uri}?op=set-as-default&amp;printer_name={%printer_name}">
 <IMG SRC="/images/button-set-as-default.gif" ALT="Set As Default" CLASS="button"></A>
 <A HREF="{admin_uri}?op=set-allowed-users&amp;printer_name={%printer_name}">
-<IMG SRC="/images/button-set-allowed-users.gif" ALT="Set Allowed Users" CLASS="button"></A>
-</P>
+<IMG SRC="/images/button-set-allowed-users.gif" ALT="Set Allowed Users" CLASS="button"></A></TD>
+</TR>
+</TABLE></P>
 </TD>
 </TR>
 </TABLE>
diff --git a/templates/subscription-added.tmpl b/templates/subscription-added.tmpl
new file mode 100644 (file)
index 0000000..6153d79
--- /dev/null
@@ -0,0 +1 @@
+<P>Subscription {subscription_name} has been added successfully.</P>
diff --git a/templates/subscription-canceled.tmpl b/templates/subscription-canceled.tmpl
new file mode 100644 (file)
index 0000000..46662cc
--- /dev/null
@@ -0,0 +1 @@
+<P>Subscription #{notify_subscription_id} has been canceled.</P>
index e80dec9b38b78ea4f2590683afcf1db63057ef87..712e843e9eb98c1f7c5e44e0bc6652cd896c9679 100644 (file)
@@ -1,22 +1,23 @@
 <FORM METHOD="POST" ACTION="/admin">
 <INPUT TYPE="HIDDEN" NAME="OP" VALUE="{op}">
+{device_uri?<INPUT TYPE="HIDDEN" NAME="DEVICE_URI" VALUE="{device_uri}">:}
 
 <H2 CLASS="title">Lägg till ny skrivare</H2>
 
 <TABLE>
 <TR>
 <TH CLASS="label">Namn:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_NAME" SIZE="40" MAXLENGTH="127" VALUE="{?template_name}"><BR>
 <SMALL>(Får innehålla utskrivbara tecken förutom "/", "#", och blanksteg)</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Plats:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_LOCATION" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_LOCATION}"><BR>
 <SMALL>(Läsbar plats såsom "Lab 1")</SMALL></TD>
 </TR>
 <TR>
 <TH CLASS="label">Beskrivning:</TH>
-<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127"><BR>
+<TD><INPUT TYPE="TEXT" NAME="PRINTER_INFO" SIZE="40" MAXLENGTH="127" VALUE="{?PRINTER_INFO}"><BR>
 <SMALL>(Läsbar beskrivning såsom "HP LaserJet")</SMALL></TD>
 </TR>
 <TR>
index 0a0c0cb1fe30f1b20d3885d7a1cce35b5e56380f..ff80be8b8fb6b5189e5fe301cb400dbc0fed4ce5 100644 (file)
@@ -1,5 +1,5 @@
 <TABLE CELLPADDING="0" CELLSPACING="0" WIDTH="100%" SUMMARY="Administration Tasks">
-<TR><TD VALIGN="TOP" NOWRAP>
+<TR><TD VALIGN="TOP">
 
 <H2 CLASS="title">Skrivare</H2>
 
@@ -36,7 +36,7 @@ ALT="Hantera klasser" CLASS="button"></A>
  CLASS="button"></A>
 </P>
 
-</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
+</TD><TD>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD VALIGN="TOP">
 
 <H2 CLASS="title">Server</H2>
 
@@ -65,6 +65,7 @@ CLASS="button"></A>
 <P><INPUT TYPE="HIDDEN" NAME="OP" VALUE="config-server">
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_PRINTERS" {?remote_printers}> Visa skrivare utdelade av andra system<BR>
 <INPUT TYPE="CHECKBOX" NAME="SHARE_PRINTERS" {?share_printers}> Dela ut publicerade skrivare anslutna till detta system<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="CHECKBOX" NAME="REMOTE_ANY" {?remote_any}> Allow printing from the Internet<BR>
 <INPUT TYPE="CHECKBOX" NAME="REMOTE_ADMIN" {?remote_admin}> Tillåt fjärradministration<BR>
 <INPUT TYPE="CHECKBOX" NAME="USER_CANCEL_ANY" {?user_cancel_any}> Tillåt användare att avbryta alla jobb (inte bara sina egna)<BR>
 <INPUT TYPE="CHECKBOX" NAME="DEBUG_LOGGING" {?debug_logging}> Spara felsökningsinformation för problemlösning</P>
index b4d1d8bec72786b5da30fcc72ed8558a306cb724..7cd827b75dc389d0daf3ea79f7503dd1d1caab89 100644 (file)
@@ -9,6 +9,7 @@ function reset_config()
 "\\n" +
 "# Administrator user group...\\n" +
 "SystemGroup @CUPS_SYSTEM_GROUPS@\\n" +
+"@CUPS_SYSTEM_AUTHKEY@\\n" +
 "\\n" +
 "\\n" +
 "# Only listen for connections from the local machine.\\n" +
@@ -19,7 +20,7 @@ function reset_config()
 "# Show shared printers on the local network.\\n" +
 "Browsing On\\n" +
 "BrowseOrder allow,deny\\n" +
-"BrowseAllow @LOCAL\\n" +
+"BrowseAllow all\\n" +
 "\\n" +
 "\\n" +
 "# Authenticate against system accounts by default...\\n" +
index 1be448e3ba0f0941f0fabf587484700aec0a0248..585807ed09ea434bcc7e9922338a9fe344608274 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: 4.2-cups-printer-ops.test 5833 2006-08-16 20:05:58Z mike $"
+# "$Id: 4.2-cups-printer-ops.test 5831 2006-08-16 19:28:09Z mike $"
 #
 #   Verify that the CUPS printer operations work.
 #
 }
 
 #
-# End of "$Id: 4.2-cups-printer-ops.test 5833 2006-08-16 20:05:58Z mike $"
+# End of "$Id: 4.2-cups-printer-ops.test 5831 2006-08-16 19:28:09Z mike $"
 #
index 4126c11d7d972b61620942c532cc8d58d681b50e..a724fb4e905570956401e19bd09cab40f6e51be8 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: 4.4-subscription-ops.test 5833 2006-08-16 20:05:58Z mike $"
+# "$Id: 4.4-subscription-ops.test 5831 2006-08-16 19:28:09Z mike $"
 #
 #   Verify that the CUPS subscription operations work.
 #
 }
 
 #
-# End of "$Id: 4.4-subscription-ops.test 5833 2006-08-16 20:05:58Z mike $"
+# End of "$Id: 4.4-subscription-ops.test 5831 2006-08-16 19:28:09Z mike $"
 #
index 15b3056c8d62db6e1674bf11f4bb706bf08ee30c..8f5d16b17167e9d5bd12e2fa2c38b46b450c4fc9 100644 (file)
@@ -1,5 +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/array.h
-ipptest.o: ../cups/file.h ../cups/language.h ../cups/language.h
+ipptest.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+ipptest.o: ../cups/language.h ../cups/language.h
index de2fd5713db975fc003396903cadcfd20de4eccb..93363cdd91d43e03b0719ba9ce2aa4cefbb889a8 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $"
+# "$Id: Makefile 5919 2006-08-31 04:20:45Z mike $"
 #
 #   IPP test makefile for the Common UNIX Printing System (CUPS).
 #
@@ -69,7 +69,7 @@ uninstall:
 ipptest:       ipptest.o ../cups/libcups.a
        echo Linking $@...
        $(CC) $(LDFLAGS) -o ipptest ipptest.o  ../cups/libcups.a \
-               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+               $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
@@ -80,5 +80,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $".
+# End of "$Id: Makefile 5919 2006-08-31 04:20:45Z mike $".
 #
index 35b241b06bbe2eac8c79bd0ca900b461734a237e..ba62bd7f3d16ecbddfc8893e752e7bc22e786fc7 100644 (file)
@@ -15,6 +15,7 @@
        ATTR charset attributes-charset utf-8
        ATTR language attributes-natural-language en
        ATTR uri job-uri $uri
+#      ATTR keyword requested-attributes job-media-sheets-completed,job-state
 
        # What statuses are OK?
        #STATUS ok
@@ -23,5 +24,4 @@
        # What attributes do we expect?
        EXPECT job-uri
        EXPECT job-state
-       EXPECT bogus-attribute
 }
diff --git a/test/get-jobs.test b/test/get-jobs.test
new file mode 100644 (file)
index 0000000..2d2e5a7
--- /dev/null
@@ -0,0 +1,21 @@
+# Get list of jobs
+{
+       # The name of the test...
+       NAME "Get-Jobs"
+
+       # The resource to use for the POST
+       # RESOURCE /admin
+
+       # The operation to use
+       OPERATION Get-Jobs
+
+       # Attributes, starting in the operation group...
+       GROUP operation
+       ATTR charset attributes-charset utf-8
+       ATTR language attributes-natural-language en
+       ATTR uri printer-uri $uri
+       ATTR keyword which-jobs completed
+
+       # What statuses are OK?
+       STATUS successful-ok
+}
index 252e1dffdff20be626493ba9e2d255ebe6ebce0c..7a127e5dfe5622fd6007fa67b8c847a934431473 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipptest.c 5878 2006-08-24 15:55:42Z mike $"
+ * "$Id: ipptest.c 5876 2006-08-24 15:05:04Z mike $"
  *
  *   IPP test command for the Common UNIX Printing System (CUPS).
  *
@@ -924,5 +924,5 @@ usage(const char *option)           /* I - Option string or NULL */
 
 
 /*
- * End of "$Id: ipptest.c 5878 2006-08-24 15:55:42Z mike $".
+ * End of "$Id: ipptest.c 5876 2006-08-24 15:05:04Z mike $".
  */
index ae38459e9003e85cc7b8b31d5d1d4d92400121a9..43a0f9c258c369f5cb772a92adca42e33205a975 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: run-stp-tests.sh 6113 2006-11-15 20:37:45Z mike $"
+# "$Id: run-stp-tests.sh 6297 2007-02-21 02:24:16Z mike $"
 #
 #   Perform the complete set of IPP compliance tests specified in the
 #   CUPS Software Test Plan.
@@ -454,7 +454,7 @@ done
 # Create the test report source file...
 #
 
-strfile=cups-str-1.2-`date +%Y-%m-%d`-$user.html
+strfile=cups-str-1.3-`date +%Y-%m-%d`-$user.html
 
 rm -f $strfile
 cat str-header.html >$strfile
@@ -584,5 +584,5 @@ echo "A HTML report was created in test/$strfile."
 echo ""
 
 #
-# End of "$Id: run-stp-tests.sh 6113 2006-11-15 20:37:45Z mike $"
+# End of "$Id: run-stp-tests.sh 6297 2007-02-21 02:24:16Z mike $"
 #
index a17e8013a542387866692186dc07d6212f10970c..955a8f42dcd086965d54e25ce52b52d74395b3aa 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# "$Id: makesrcdist 5500 2006-05-08 20:32:27Z mike $"
+# "$Id: makesrcdist 5502 2006-05-08 21:09:15Z mike $"
 #
 # makesrcdist - make a source distribution of CUPS.
 #
@@ -18,9 +18,9 @@ if test $# = 0; then
        echo Updating for snapshot...
        svn up
        rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
-       version="1.2svn"
+       version="1.3svn"
        revision="-r$rev"
-       fileversion="1.2svn-r$rev"
+       fileversion="1.3svn-r$rev"
        fileurl="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar."
        url="."
 else
@@ -32,7 +32,7 @@ else
        fileurl="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar."
        url="https://svn.easysw.com/public/cups/tags/release-$version"
 
-       svn copy https://svn.easysw.com/public/cups/branches/branch-1.2 "$url" \
+       svn copy https://svn.easysw.com/public/cups/trunk "$url" \
                -m "Tag $version" || exit 1
 fi
 
@@ -81,5 +81,5 @@ rm -rf cups-$version
 echo "Done!"
 
 #
-# End of "$Id: makesrcdist 5500 2006-05-08 20:32:27Z mike $".
+# End of "$Id: makesrcdist 5502 2006-05-08 21:09:15Z mike $".
 #
index 5d8ac84771862f143c518513be6998e39a1da303..92cc0306358c643c192699eb8a83309663dc449b 100755 (executable)
@@ -12,7 +12,7 @@ fi
 rev=`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[a-zA-Z]*//g'`
 
 if test $# = 0; then
-       version="1.2svn-r$rev"
+       version="1.3svn-r$rev"
 else
        version=$1
 fi
@@ -72,7 +72,7 @@ for file in packaging/cups-desc.plist packaging/cups-info.plist \
        echo Updating $file...
        sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \
                -e '1,$s/@CUPS_REVISION@//g' \
-               -e '1,$s/@CUPS_RELEASE@/1.2.'$rev'/g' \
+               -e '1,$s/@CUPS_RELEASE@/1.3.'$rev'/g' \
                <$file.in >$file
 done
 
index 6a4613d71602b1a16359cf8527dc3f40d5b2cc1f..c5f1752d08b49a5856326b9972b12bde5ddee325 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: config.h 6189 2007-01-10 16:30:34Z mike $"
+ * "$Id: config.h 4828 2005-11-11 12:53:38Z mike $"
  *
  *   Configuration file for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2007 by Easy Software Products.
+ *   Copyright 1997-2005 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
  *   property of Easy Software Products and are protected by Federal
  * Version of software...
  */
 
-#define CUPS_SVERSION          "CUPS v1.2.8"
-#define CUPS_MINIMAL           "CUPS/1.2.8"
+#define CUPS_SVERSION          "CUPS v1.2svn"
+#define CUPS_MINIMAL           "CUPS/1.2svn"
 
 
 /*
- * Default user and groups...
+ * Default user and group...
  */
 
-#define CUPS_DEFAULT_USER "lp"
-#define CUPS_DEFAULT_GROUP "lp"
-#define CUPS_DEFAULT_SYSTEM_GROUPS "sys root"
-
-
-/*
- * Default file permissions...
- */
-
-#define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
-#define CUPS_DEFAULT_LOG_FILE_PERM 0644
-
-
-/*
- * Default browsing settings...
- */
-
-#define CUPS_DEFAULT_BROWSING 1
-#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "CUPS"
-#define CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS "CUPS"
-#define CUPS_DEFAULT_BROWSE_SHORT_NAMES 1
-#define CUPS_DEFAULT_DEFAULT_SHARED 1
-#define CUPS_DEFAULT_IMPLICIT_CLASSES 1
-#define CUPS_DEFAULT_USE_NETWORK_DEFAULT 1
+#define CUPS_DEFAULT_USER      "lp"
+#define CUPS_DEFAULT_GROUP     "sys"
 
 
 /*
 #undef HAVE_CRYPT_H
 
 
-/*
- * Do we have <scsi/sg.h>?
- */
-
-#undef HAVE_SCSI_SG_H
-
-
 /*
  * Use <string.h>, <strings.h>, and/or <bstring.h>?
  */
 #undef HAVE_MALLOC_H
 
 
-/*
- * Do we have the POSIX ACL functions?
- */
-
-#undef HAVE_ACL_INIT
-
-
 /*
  * Do we have the langinfo.h header file?
  */
 
 #undef HAVE_CDSASSL
 #undef HAVE_GNUTLS
-#define HAVE_LIBSSL 1
-#define HAVE_SSL 1
+#undef HAVE_LIBSSL
+#undef HAVE_SSL
 
 
 /*
 #undef HAVE_LIBSLP
 
 
-/*
- * Do we have an LDAP library?
- */
-
-#undef HAVE_LDAP
-#undef HAVE_OPENLDAP
-
-
 /*
  * Do we have libpaper?
  */
 #undef HAVE_PTHREAD_H
 
 
-/*
- * Do we have launchd support?
- */
-
-/* #undef HAVE_LAUNCH_H */
-/* #undef HAVE_LAUNCHD */
-#define CUPS_DEFAULT_LAUNCHD_CONF ""
-
-
 /*
  * Various scripting languages...
  */
 #define CUPS_PYTHON    "/usr/bin/python"
 
 
-/*
- * Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
- */
-
-/* #undef HAVE_COREFOUNDATION */
-/* #undef HAVE_SYSTEMCONFIGURATION */
-
-
-/*
- * Do we have CoreFoundation public and private headers?
- */
-
-/* #undef HAVE_COREFOUNDATION_H */
-/* #undef HAVE_CFPRIV_H */
-/* #undef HAVE_CFBUNDLEPRIV_H */
-
-
-/*
- * Do we have CFLocaleCreateCanonicalLocaleIdentifierFromString()?
- */
-
-/* #undef HAVE_CF_LOCALE_ID */
-
-
-/*
- * Do we have MacOSX 10.4's mbr_XXX functions()?
- */
-
-/* #undef HAVE_MEMBERSHIP_H */
-/* #undef HAVE_MBR_UID_TO_UUID */
-
-
-/*
- * Do we have Darwin's notify_post() header and function?
- */
-
-/* #undef HAVE_NOTIFY_H */
-/* #undef HAVE_NOTIFY_POST */
-
-
-/*
- * Do we have DBUS?
- */
-
-/* #undef HAVE_DBUS */
-/* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
-
-
-/*
- * Do we have the AppleTalk/at_proto.h header?
- */
-
-/* #undef HAVE_APPLETALK_AT_PROTO_H */
-
-
 #endif /* !_CUPS_CONFIG_H_ */
 
 /*
- * End of "$Id: config.h 6189 2007-01-10 16:30:34Z mike $".
+ * End of "$Id: config.h 4828 2005-11-11 12:53:38Z mike $".
  */
old mode 100644 (file)
new mode 100755 (executable)