From f7deaa1a21758ec90bf23314af018481ea8aea7f Mon Sep 17 00:00:00 2001
From: jlovell
Date: Wed, 14 Mar 2007 16:55:44 +0000
Subject: [PATCH] Load cups into easysw/current.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@279 a1ca3aef-8c08-0410-bb20-df032aa958be
---
CHANGES-1.2.txt | 1088 +++++++
CHANGES.txt | 1138 +------
INSTALL.txt | 4 +-
LICENSE.txt | 36 +
Makedefs.in | 17 +-
Makefile | 55 +-
README.txt | 4 +-
backend/Dependencies | 42 +-
backend/Makefile | 4 +-
backend/backend-private.h | 11 +-
backend/easysw-firewire-design.txt | 71 +
backend/easysw-firewire-linux.txt | 35 +
backend/ieee1284.c | 112 +-
backend/ieee1394-linux.c | 877 +++++
backend/ieee1394.c | 267 ++
backend/ieee1394.h | 103 +
backend/ipp.c | 9 +-
backend/lpd.c | 4 +-
backend/pap.c | 2 +-
backend/parallel.c | 79 +-
backend/runloop.c | 25 +-
backend/scsi.c | 4 +-
backend/serial.c | 69 +-
backend/snmp.c | 4 +-
backend/socket.c | 67 +-
backend/test1284.c | 4 +-
backend/usb-darwin.c | 332 +-
backend/usb-unix.c | 89 +-
backend/usb.c | 4 +-
berkeley/Dependencies | 22 +-
berkeley/lpc.c | 4 +-
berkeley/lpq.c | 4 +-
berkeley/lpr.c | 4 +-
berkeley/lprm.c | 4 +-
cgi-bin/Dependencies | 83 +-
cgi-bin/Makefile | 10 +-
cgi-bin/admin.c | 294 +-
cgi-bin/classes.c | 4 +-
cgi-bin/help-index.c | 478 ++-
cgi-bin/help-index.h | 17 +-
cgi-bin/html.c | 4 +-
cgi-bin/ipp-var.c | 144 +-
cgi-bin/jobs.c | 18 +-
cgi-bin/printers.c | 4 +-
cgi-bin/search.c | 4 +-
cgi-bin/template.c | 4 +-
cgi-bin/testhi.c | 14 +-
cgi-bin/testhi.html | 2 +
cgi-bin/var.c | 4 +-
conf/cupsd.conf.in | 7 +-
conf/mime.types | 13 +-
config-scripts/cups-common.m4 | 25 +-
config-scripts/cups-compiler.m4 | 18 +-
config-scripts/cups-defaults.m4 | 54 +-
config-scripts/cups-directories.m4 | 103 +-
config-scripts/cups-dnssd.m4 | 47 +
config-scripts/cups-gssapi.m4 | 105 +
config-scripts/cups-image.m4 | 4 +-
config-scripts/cups-largefile.m4 | 8 +-
config-scripts/cups-ldap.m4 | 4 +-
config-scripts/cups-manpages.m4 | 4 +-
config-scripts/cups-network.m4 | 6 +-
config-scripts/cups-opsys.m4 | 4 +-
config-scripts/cups-poll.m4 | 31 +
config-scripts/cups-sharedlibs.m4 | 4 +-
config-scripts/cups-ssl.m4 | 4 +-
config-scripts/cups-threads.m4 | 4 +-
config.h.in | 58 +-
configure.in | 9 +-
cups-config.in | 8 +-
cups/Dependencies | 87 +-
cups/Makefile | 41 +-
cups/adminutil.c | 51 +-
cups/adminutil.h | 7 +-
cups/api-filter.shtml | 175 +-
cups/array.c | 84 +-
cups/array.h | 6 +-
cups/attr.c | 4 +-
cups/auth.c | 384 ++-
cups/backchannel.c | 4 +-
cups/cups.h | 19 +-
cups/dest.c | 243 +-
cups/emit.c | 15 +-
cups/encode.c | 7 +-
cups/file.c | 27 +-
cups/file.h | 4 +-
cups/getifaddrs.c | 4 +-
cups/getputfile.c | 6 +-
cups/globals.c | 11 +-
cups/globals.h | 15 +-
cups/http-addrlist.c | 4 +-
cups/http-private.h | 81 +-
cups/http-support.c | 6 +-
cups/http.c | 164 +-
cups/http.h | 64 +-
cups/i18n.h | 4 +-
cups/ipp-private.h | 4 +-
cups/ipp-support.c | 4 +-
cups/ipp.c | 4 +-
cups/ipp.h | 4 +-
cups/langprintf.c | 4 +-
cups/language.c | 4 +-
cups/localize.c | 4 +-
cups/mark.c | 4 +-
cups/md5passwd.c | 6 +-
cups/notify.c | 4 +-
cups/options.c | 29 +-
cups/page.c | 4 +-
cups/ppd.c | 4 +-
cups/request.c | 19 +-
cups/sidechannel.c | 340 ++
cups/sidechannel.h | 115 +
cups/snprintf.c | 4 +-
cups/string.c | 4 +-
cups/tempfile.c | 4 +-
cups/testfile.c | 4 +-
cups/testhttp.c | 4 +-
cups/testi18n.c | 4 +-
cups/testipp.c | 4 +-
cups/testppd.c | 4 +-
cups/transcode.c | 4 +-
cups/usersys.c | 4 +-
cups/util.c | 4 +-
data/testprint.ps | 15 +-
doc/Makefile | 3 +-
doc/cups.css | 8 +
doc/fr/index.html.in | 139 -
doc/help/api-array.html | 42 +
doc/help/api-cups.html | 59 +
doc/help/api-filter.html | 280 +-
doc/help/api-httpipp.html | 3 +-
doc/help/api-raster.html | 144 +-
doc/help/license.html | 42 +
doc/help/ref-client-conf.html | 10 +-
doc/help/ref-cupsd-conf.html | 27 +-
doc/help/spec-ipp.html | 170 +-
doc/help/spec-pdf.html | 21 +
doc/help/spec-postscript.html | 120 +
doc/help/spec-ppd.html | 47 +-
doc/help/standard.html.in | 4 +
doc/help/translation.html | 20 +
doc/help/whatsnew.html | 510 +--
doc/images/button-add-rss-subscription.gif | Bin 0 -> 717 bytes
doc/images/button-cancel-subscription.gif | Bin 0 -> 663 bytes
doc/pl/images/button-accept-jobs.gif | Bin 627 -> 691 bytes
doc/pl/images/button-add-class.gif | Bin 536 -> 528 bytes
doc/pl/images/button-add-printer.gif | Bin 571 -> 579 bytes
doc/pl/images/button-add-this-printer.gif | Bin 608 -> 648 bytes
doc/pl/images/button-cancel-all-jobs.gif | Bin 797 -> 768 bytes
doc/pl/images/button-cancel-job.gif | Bin 531 -> 524 bytes
doc/pl/images/button-change-settings.gif | Bin 580 -> 624 bytes
doc/pl/images/button-clean-print-heads.gif | Bin 878 -> 943 bytes
doc/pl/images/button-clear.gif | Bin 469 -> 480 bytes
doc/pl/images/button-continue.gif | Bin 339 -> 447 bytes
doc/pl/images/button-delete-class.gif | Bin 463 -> 477 bytes
doc/pl/images/button-delete-printer.gif | Bin 513 -> 533 bytes
.../images/button-edit-configuration-file.gif | Bin 673 -> 734 bytes
doc/pl/images/button-export-samba.gif | Bin 657 -> 977 bytes
doc/pl/images/button-help.gif | Bin 363 -> 380 bytes
doc/pl/images/button-hold-job.gif | Bin 649 -> 709 bytes
doc/pl/images/button-manage-classes.gif | Bin 605 -> 640 bytes
doc/pl/images/button-manage-jobs.gif | Bin 697 -> 669 bytes
doc/pl/images/button-manage-printers.gif | Bin 643 -> 717 bytes
doc/pl/images/button-manage-server.gif | Bin 669 -> 689 bytes
doc/pl/images/button-modify-class.gif | Bin 592 -> 647 bytes
doc/pl/images/button-modify-printer.gif | Bin 659 -> 702 bytes
doc/pl/images/button-move-job.gif | Bin 608 -> 604 bytes
doc/pl/images/button-move-jobs.gif | Bin 843 -> 837 bytes
doc/pl/images/button-print-self-test-page.gif | Bin 711 -> 1074 bytes
doc/pl/images/button-print-test-page.gif | Bin 709 -> 788 bytes
doc/pl/images/button-publish-printer.gif | Bin 579 -> 662 bytes
doc/pl/images/button-reject-jobs.gif | Bin 638 -> 582 bytes
doc/pl/images/button-release-job.gif | Bin 613 -> 605 bytes
doc/pl/images/button-restart-job.gif | Bin 653 -> 827 bytes
doc/pl/images/button-save-changes.gif | Bin 536 -> 565 bytes
doc/pl/images/button-search.gif | Bin 381 -> 505 bytes
doc/pl/images/button-set-allowed-users.gif | Bin 909 -> 985 bytes
doc/pl/images/button-set-as-default.gif | Bin 706 -> 729 bytes
doc/pl/images/button-set-printer-options.gif | Bin 691 -> 709 bytes
doc/pl/images/button-show-active.gif | Bin 764 -> 866 bytes
doc/pl/images/button-show-all.gif | Bin 813 -> 891 bytes
doc/pl/images/button-show-completed.gif | Bin 809 -> 923 bytes
doc/pl/images/button-show-next.gif | Bin 605 -> 702 bytes
doc/pl/images/button-show-previous.gif | Bin 568 -> 742 bytes
doc/pl/images/button-sort-ascending.gif | Bin 648 -> 576 bytes
doc/pl/images/button-sort-descending.gif | Bin 673 -> 627 bytes
doc/pl/images/button-start-class.gif | Bin 544 -> 579 bytes
doc/pl/images/button-start-printer.gif | Bin 606 -> 636 bytes
doc/pl/images/button-stop-class.gif | Bin 573 -> 624 bytes
doc/pl/images/button-stop-printer.gif | Bin 638 -> 696 bytes
doc/pl/images/button-unpublish-printer.gif | Bin 613 -> 694 bytes
doc/pl/images/button-use-default-config.gif | Bin 930 -> 1007 bytes
doc/pl/images/button-view-access-log.gif | Bin 711 -> 888 bytes
doc/pl/images/button-view-error-log.gif | Bin 717 -> 893 bytes
doc/pl/images/button-view-page-log.gif | Bin 793 -> 812 bytes
.../images/button-view-printable-version.gif | Bin 819 -> 939 bytes
filter/Dependencies | 840 +++--
filter/Makefile | 16 +-
filter/common.c | 4 +-
filter/common.h | 4 +-
filter/error.c | 297 ++
filter/hpgl-prolog.c | 4 +-
filter/image-bmp.c | 4 +-
filter/image-colorspace.c | 4 +-
filter/image-gif.c | 4 +-
filter/image-jpeg.c | 4 +-
filter/image-photocd.c | 4 +-
filter/image-pix.c | 4 +-
filter/image-png.c | 4 +-
filter/image-pnm.c | 4 +-
filter/image-private.h | 7 +-
filter/image-sgi.c | 4 +-
filter/image-sun.c | 4 +-
filter/image-tiff.c | 4 +-
filter/imagetops.c | 4 +-
filter/imagetoraster.c | 4 +-
filter/interpret.c | 146 +-
filter/pstops.c | 17 +-
filter/raster.c | 253 +-
filter/raster.h | 10 +-
filter/rasterbench.c | 4 +-
filter/rastertolabel.c | 308 +-
filter/testraster.c | 193 +-
filter/texttops.c | 10 +-
init/cups.sh.in | 30 +-
init/org.cups.cupsd.plist | 12 +-
locale/Makefile | 6 +-
locale/cups.pot | 9 +-
locale/cups_de.po | 15 +-
locale/cups_es.po | 12 +-
locale/cups_et.po | 15 +-
locale/cups_fr.po | 2845 -----------------
locale/cups_it.po | 15 +-
locale/cups_pl.po | 15 +-
locale/cups_sv.po | 15 +-
man/Makefile | 4 +-
man/classes.conf.man | 4 +-
man/cupsaddsmb.man.in | 4 +-
man/cupsd.conf.man.in | 14 +-
man/lpadmin.man | 4 +-
man/printers.conf.man | 4 +-
monitor/Dependencies | 8 +-
notifier/Dependencies | 10 +-
notifier/Makefile | 22 +-
notifier/rss.c | 705 ++++
notifier/testnotify.c | 4 +-
packaging/WELCOME.rtf | 2 +-
packaging/cups.list.in | 8 +-
packaging/cups.readme | 170 +-
packaging/cups.spec.in | 7 +-
pdftops/Dependencies | 4 +-
pdftops/pdftops.cxx | 17 +-
ppd/intelbar.ppd | 235 ++
ppd/zebra.ppd | 4 +-
scheduler/Dependencies | 30 +-
scheduler/Makefile | 20 +-
scheduler/auth.c | 378 ++-
scheduler/auth.h | 5 +-
scheduler/banners.c | 4 +-
scheduler/classes.c | 72 +-
scheduler/client.c | 756 +++--
scheduler/client.h | 23 +-
scheduler/conf.c | 69 +-
scheduler/conf.h | 53 +-
scheduler/cups-driverd.c | 4 +-
scheduler/cups-lpd.c | 14 +-
scheduler/cups-polld.c | 4 +-
scheduler/cupsd.h | 27 +-
scheduler/dirsvc.c | 698 +++-
scheduler/dirsvc.h | 14 +-
scheduler/filter.c | 61 +-
scheduler/ipp.c | 789 +++--
scheduler/job.c | 156 +-
scheduler/job.h | 8 +-
scheduler/listen.c | 21 +-
scheduler/log.c | 88 +-
scheduler/main.c | 640 ++--
scheduler/mime.c | 4 +-
scheduler/mime.h | 8 +-
scheduler/network.c | 4 +-
scheduler/network.h | 4 +-
scheduler/policy.c | 4 +-
scheduler/printers.c | 401 ++-
scheduler/printers.h | 55 +-
scheduler/process.c | 15 +-
scheduler/quotas.c | 4 +-
scheduler/select.c | 946 ++++++
scheduler/server.c | 15 +-
scheduler/statbuf.c | 4 +-
scheduler/subscriptions.c | 30 +-
scheduler/subscriptions.h | 4 +-
scheduler/sysman.c | 26 +-
scheduler/testlpd.c | 17 +-
scheduler/testmime.c | 4 +-
scheduler/testsub.c | 4 +-
.../src/com/easysw/cups/IPPBase64Encoder.java | 0
scripting/php/Dependencies | 6 +-
standards/papi-1.0.pdf | Bin 0 -> 503784 bytes
systemv/Dependencies | 68 +-
systemv/Makefile | 4 +-
systemv/accept.c | 4 +-
systemv/cancel.c | 4 +-
systemv/cupsaddsmb.c | 4 +-
systemv/cupstestdsc.c | 4 +-
systemv/cupstestppd.c | 163 +-
systemv/lp.c | 4 +-
systemv/lpadmin.c | 4 +-
systemv/lpinfo.c | 4 +-
systemv/lpmove.c | 4 +-
systemv/lpoptions.c | 4 +-
systemv/lppasswd.c | 4 +-
systemv/lpstat.c | 5 +-
templates/Makefile | 4 +-
templates/add-printer.tmpl | 7 +-
templates/add-rss-subscription.tmpl | 43 +
templates/admin.tmpl | 18 +-
templates/classes.tmpl | 16 +-
templates/de/add-printer.tmpl | 7 +-
templates/de/admin.tmpl | 5 +-
templates/de/edit-config.tmpl.in | 3 +-
templates/edit-config.tmpl.in | 3 +-
templates/es/add-printer.tmpl | 7 +-
templates/es/admin.tmpl | 5 +-
templates/es/edit-config.tmpl.in | 3 +-
templates/et/add-printer.tmpl | 7 +-
templates/et/admin.tmpl | 5 +-
templates/et/edit-config.tmpl.in | 3 +-
templates/fr/add-class.tmpl | 33 -
templates/fr/add-printer.tmpl | 35 +-
templates/fr/admin.tmpl | 88 +-
templates/fr/choose-device.tmpl | 26 -
templates/fr/choose-make.tmpl | 42 -
templates/fr/choose-model.tmpl | 34 -
templates/fr/choose-serial.tmpl | 47 -
templates/fr/choose-uri.tmpl | 42 -
templates/fr/class-added.tmpl | 1 -
templates/fr/class-confirm.tmpl | 7 -
templates/fr/class-deleted.tmpl | 1 -
templates/fr/class-jobs-header.tmpl | 1 -
templates/fr/class-modified.tmpl | 1 -
templates/fr/classes-header.tmpl | 1 -
templates/fr/classes.tmpl | 54 -
templates/fr/edit-config.tmpl.in | 94 +-
templates/fr/error-op.tmpl | 3 -
templates/fr/error.tmpl | 3 -
templates/fr/header.tmpl.in | 63 -
templates/fr/help-header.tmpl | 52 -
templates/fr/help-printable.tmpl | 11 -
templates/fr/job-cancel.tmpl | 1 -
templates/fr/job-hold.tmpl | 1 -
templates/fr/job-move.tmpl | 22 -
templates/fr/job-moved.tmpl | 2 -
templates/fr/job-release.tmpl | 1 -
templates/fr/job-restart.tmpl | 1 -
templates/fr/jobs-header.tmpl | 16 -
templates/fr/jobs.tmpl | 42 -
templates/fr/maintenance.tmpl | 2 -
templates/fr/modify-class.tmpl | 34 -
templates/fr/modify-printer.tmpl | 29 -
templates/fr/norestart.tmpl | 1 -
templates/fr/option-boolean.tmpl | 7 -
templates/fr/option-conflict.tmpl | 7 -
templates/fr/option-header.tmpl | 3 -
templates/fr/option-pickmany.tmpl | 7 -
templates/fr/option-pickone.tmpl | 7 -
templates/fr/option-trailer.tmpl | 6 -
templates/fr/pager.tmpl | 11 -
templates/fr/printer-accept.tmpl | 3 -
templates/fr/printer-added.tmpl | 1 -
templates/fr/printer-configured.tmpl | 1 -
templates/fr/printer-confirm.tmpl | 7 -
templates/fr/printer-default.tmpl | 7 -
templates/fr/printer-deleted.tmpl | 1 -
templates/fr/printer-jobs-header.tmpl | 1 -
templates/fr/printer-modified.tmpl | 1 -
templates/fr/printer-purge.tmpl | 3 -
templates/fr/printer-reject.tmpl | 3 -
templates/fr/printer-start.tmpl | 3 -
templates/fr/printer-stop.tmpl | 3 -
templates/fr/printers-header.tmpl | 1 -
templates/fr/printers.tmpl | 66 -
templates/fr/restart.tmpl | 1 -
templates/fr/samba-export.tmpl | 53 -
templates/fr/samba-exported.tmpl | 1 -
templates/fr/search.tmpl | 13 -
templates/fr/set-printer-options-header.tmpl | 3 -
templates/fr/set-printer-options-trailer.tmpl | 1 -
templates/fr/test-page.tmpl | 2 -
templates/fr/trailer.tmpl | 21 -
templates/fr/users.tmpl | 26 -
templates/it/add-printer.tmpl | 7 +-
templates/it/admin.tmpl | 5 +-
templates/it/edit-config.tmpl.in | 3 +-
templates/ja/add-printer.tmpl | 7 +-
templates/ja/admin.tmpl | 5 +-
templates/ja/edit-config.tmpl.in | 3 +-
templates/pl/add-printer.tmpl | 7 +-
templates/pl/admin.tmpl | 5 +-
templates/pl/edit-config.tmpl.in | 3 +-
templates/printers.tmpl | 16 +-
templates/subscription-added.tmpl | 1 +
templates/subscription-canceled.tmpl | 1 +
templates/sv/add-printer.tmpl | 7 +-
templates/sv/admin.tmpl | 5 +-
templates/sv/edit-config.tmpl.in | 3 +-
test/4.2-cups-printer-ops.test | 4 +-
test/4.4-subscription-ops.test | 4 +-
test/Dependencies | 4 +-
test/Makefile | 6 +-
test/get-job-attributes.test | 2 +-
test/get-jobs.test | 21 +
test/ipptest.c | 4 +-
test/run-stp-tests.sh | 6 +-
tools/makesrcdist | 10 +-
tools/testosx | 4 +-
vcnet/config.h | 128 +-
vcnet/testhttp.vcproj | 0
417 files changed, 14820 insertions(+), 8777 deletions(-)
create mode 100644 CHANGES-1.2.txt
create mode 100644 backend/easysw-firewire-design.txt
create mode 100644 backend/easysw-firewire-linux.txt
create mode 100644 backend/ieee1394-linux.c
create mode 100644 backend/ieee1394.c
create mode 100644 backend/ieee1394.h
create mode 100644 config-scripts/cups-dnssd.m4
create mode 100644 config-scripts/cups-gssapi.m4
create mode 100644 config-scripts/cups-poll.m4
create mode 100644 cups/sidechannel.c
create mode 100644 cups/sidechannel.h
create mode 100644 doc/help/spec-pdf.html
create mode 100644 doc/help/spec-postscript.html
create mode 100644 doc/images/button-add-rss-subscription.gif
create mode 100644 doc/images/button-cancel-subscription.gif
create mode 100644 filter/error.c
create mode 100644 notifier/rss.c
create mode 100644 ppd/intelbar.ppd
create mode 100644 scheduler/select.c
delete mode 100644 scripting/java/src/com/easysw/cups/IPPBase64Encoder.java
create mode 100644 standards/papi-1.0.pdf
create mode 100644 templates/add-rss-subscription.tmpl
create mode 100644 templates/subscription-added.tmpl
create mode 100644 templates/subscription-canceled.tmpl
create mode 100644 test/get-jobs.test
mode change 100644 => 100755 vcnet/testhttp.vcproj
diff --git a/CHANGES-1.2.txt b/CHANGES-1.2.txt
new file mode 100644
index 000000000..8c0c5f145
--- /dev/null
+++ b/CHANGES-1.2.txt
@@ -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 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 and 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.
diff --git a/CHANGES.txt b/CHANGES.txt
index 4dd18bf0c..f5e4af6d3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,1088 +1,54 @@
-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 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 and 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.
diff --git a/INSTALL.txt b/INSTALL.txt
index b9636837c..329409b37 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -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
diff --git a/LICENSE.txt b/LICENSE.txt
index 4a3e913c3..aee2abed0 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -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
diff --git a/Makedefs.in b/Makedefs.in
index 97c55e09c..9e49bdb31 100644
--- a/Makedefs.in
+++ b/Makedefs.in
@@ -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 $"
#
diff --git a/Makefile b/Makefile
index 3d96ec143..c24ccdb2d 100644
--- 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 $".
#
diff --git a/README.txt b/README.txt
index 8d555a2f3..26f52b8e1 100644
--- a/README.txt
+++ b/README.txt
@@ -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...
diff --git a/backend/Dependencies b/backend/Dependencies
index 068343821..48771748a 100644
--- a/backend/Dependencies
+++ b/backend/Dependencies
@@ -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
diff --git a/backend/Makefile b/backend/Makefile
index 2ea79f15c..ae8f30bbf 100644
--- a/backend/Makefile
+++ b/backend/Makefile
@@ -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 $".
#
diff --git a/backend/backend-private.h b/backend/backend-private.h
index 14b93cc87..91a9926df 100644
--- a/backend/backend-private.h
+++ b/backend/backend-private.h
@@ -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
+# include
# include
# include
# include
@@ -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
index 000000000..194c487ed
--- /dev/null
+++ b/backend/easysw-firewire-design.txt
@@ -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
index 000000000..a8e461189
--- /dev/null
+++ b/backend/easysw-firewire-linux.txt
@@ -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.
diff --git a/backend/ieee1284.c b/backend/ieee1284.c
index f54149367..94b01843f 100644
--- a/backend/ieee1284.c
+++ b/backend/ieee1284.c
@@ -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
index 000000000..b95e8204e
--- /dev/null
+++ b/backend/ieee1394-linux.c
@@ -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
+#include
+#include
+
+
+/*
+ * 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
index 000000000..3d88c7a08
--- /dev/null
+++ b/backend/ieee1394.c
@@ -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
index 000000000..19181c5c0
--- /dev/null
+++ b/backend/ieee1394.h
@@ -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
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifdef WIN32
+# include
+#else
+# include
+# include
+#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 $".
+ */
diff --git a/backend/ipp.c b/backend/ipp.c
index 693911c65..c7d647d14 100644
--- a/backend/ipp.c
+++ b/backend/ipp.c
@@ -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
#include
-
/*
* 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 $".
*/
diff --git a/backend/lpd.c b/backend/lpd.c
index 1e2b9405f..6366a7fcc 100644
--- a/backend/lpd.c
+++ b/backend/lpd.c
@@ -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 $".
*/
diff --git a/backend/pap.c b/backend/pap.c
index dd599f83f..b24ed3617 100644
--- a/backend/pap.c
+++ b/backend/pap.c
@@ -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.
*
diff --git a/backend/parallel.c b/backend/parallel.c
index c33fc10d2..4164e7895 100644
--- a/backend/parallel.c
+++ b/backend/parallel.c
@@ -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 $".
*/
diff --git a/backend/runloop.c b/backend/runloop.c
index f613c0540..461bbb4e7 100644
--- a/backend/runloop.c
+++ b/backend/runloop.c
@@ -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
@@ -45,9 +45,11 @@
*/
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 $".
*/
diff --git a/backend/scsi.c b/backend/scsi.c
index fd06127d7..df4f1fc51 100644
--- a/backend/scsi.c
+++ b/backend/scsi.c
@@ -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 $".
*/
diff --git a/backend/serial.c b/backend/serial.c
index ec1b0e6a6..a931389f8 100644
--- a/backend/serial.c
+++ b/backend/serial.c
@@ -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 $".
*/
diff --git a/backend/snmp.c b/backend/snmp.c
index fd7d3922e..a269ddaba 100644
--- a/backend/snmp.c
+++ b/backend/snmp.c
@@ -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 $".
*/
diff --git a/backend/socket.c b/backend/socket.c
index e6889cf8f..20fb7e31d 100644
--- a/backend/socket.c
+++ b/backend/socket.c
@@ -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...
*/
/*
@@ -50,6 +51,13 @@
#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 $".
*/
diff --git a/backend/test1284.c b/backend/test1284.c
index dc1845e90..4622e5d21 100644
--- a/backend/test1284.c
+++ b/backend/test1284.c
@@ -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 $".
*/
diff --git a/backend/usb-darwin.c b/backend/usb-darwin.c
index d1da59b9b..4e0697752 100644
--- a/backend/usb-darwin.c
+++ b/backend/usb-darwin.c
@@ -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
#include
#include
+#include
#include
#include
@@ -65,6 +66,7 @@
#include
+
/*
* 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 $".
*/
diff --git a/backend/usb-unix.c b/backend/usb-unix.c
index 7e78a3f27..5efa30ff9 100644
--- a/backend/usb-unix.c
+++ b/backend/usb-unix.c
@@ -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 $".
*/
diff --git a/backend/usb.c b/backend/usb.c
index cee5d86ca..ad6d95d07 100644
--- a/backend/usb.c
+++ b/backend/usb.c
@@ -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 $".
*/
diff --git a/berkeley/Dependencies b/berkeley/Dependencies
index 767d33e1c..2c5dd988d 100644
--- a/berkeley/Dependencies
+++ b/berkeley/Dependencies
@@ -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
diff --git a/berkeley/lpc.c b/berkeley/lpc.c
index 3c51c6a54..808ed674d 100644
--- a/berkeley/lpc.c
+++ b/berkeley/lpc.c
@@ -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 $".
*/
diff --git a/berkeley/lpq.c b/berkeley/lpq.c
index 1feacaaf4..719e3b249 100644
--- a/berkeley/lpq.c
+++ b/berkeley/lpq.c
@@ -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 $".
*/
diff --git a/berkeley/lpr.c b/berkeley/lpr.c
index 1597aef2f..893c62bf3 100644
--- a/berkeley/lpr.c
+++ b/berkeley/lpr.c
@@ -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 $".
*/
diff --git a/berkeley/lprm.c b/berkeley/lprm.c
index 0551dbbd4..23fbbb37d 100644
--- a/berkeley/lprm.c
+++ b/berkeley/lprm.c
@@ -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 $".
*/
diff --git a/cgi-bin/Dependencies b/cgi-bin/Dependencies
index 7e976859d..e87f276b8 100644
--- a/cgi-bin/Dependencies
+++ b/cgi-bin/Dependencies
@@ -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
diff --git a/cgi-bin/Makefile b/cgi-bin/Makefile
index 9497bb59f..bf884689c 100644
--- a/cgi-bin/Makefile
+++ b/cgi-bin/Makefile
@@ -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 $".
#
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index 6536c86f7..de4bcd112 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -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
@@ -24,8 +24,10 @@
* 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...
@@ -55,8 +57,10 @@
* 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 $".
*/
diff --git a/cgi-bin/classes.c b/cgi-bin/classes.c
index f639525cc..1c22d513e 100644
--- a/cgi-bin/classes.c
+++ b/cgi-bin/classes.c
@@ -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 $".
*/
diff --git a/cgi-bin/help-index.c b/cgi-bin/help-index.c
index 8daf99049..df909a406 100644
--- a/cgi-bin/help-index.c
+++ b/cgi-bin/help-index.c
@@ -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
@@ -28,13 +28,16 @@
* 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.
*/
/*
@@ -45,11 +48,118 @@
#include
+/*
+ * 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, "")) == 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 $".
*/
diff --git a/cgi-bin/help-index.h b/cgi-bin/help-index.h
index d564663a0..c7cbe2b54 100644
--- a/cgi-bin/help-index.h
+++ b/cgi-bin/help-index.h
@@ -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
@@ -36,19 +36,26 @@
* 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 $".
*/
diff --git a/cgi-bin/html.c b/cgi-bin/html.c
index da5f7cd20..62e0cc517 100644
--- a/cgi-bin/html.c
+++ b/cgi-bin/html.c
@@ -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 $".
*/
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c
index 4639643de..f9dc54ca7 100644
--- a/cgi-bin/ipp-var.c
+++ b/cgi-bin/ipp-var.c
@@ -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 $".
*/
diff --git a/cgi-bin/jobs.c b/cgi-bin/jobs.c
index ed379b001..f86aa9bb9 100644
--- a/cgi-bin/jobs.c
+++ b/cgi-bin/jobs.c
@@ -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 $".
*/
diff --git a/cgi-bin/printers.c b/cgi-bin/printers.c
index e8ec0d2b3..50dc2b322 100644
--- a/cgi-bin/printers.c
+++ b/cgi-bin/printers.c
@@ -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 $".
*/
diff --git a/cgi-bin/search.c b/cgi-bin/search.c
index 205a40cff..25a410f7d 100644
--- a/cgi-bin/search.c
+++ b/cgi-bin/search.c
@@ -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 $".
*/
diff --git a/cgi-bin/template.c b/cgi-bin/template.c
index 82cf0e45d..d2fd9b8e3 100644
--- a/cgi-bin/template.c
+++ b/cgi-bin/template.c
@@ -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 $".
*/
diff --git a/cgi-bin/testhi.c b/cgi-bin/testhi.c
index dad5d70b7..1d6e23f04 100644
--- a/cgi-bin/testhi.c
+++ b/cgi-bin/testhi.c
@@ -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 $".
*/
diff --git a/cgi-bin/testhi.html b/cgi-bin/testhi.html
index 747b5ea31..b45399fdb 100644
--- a/cgi-bin/testhi.html
+++ b/cgi-bin/testhi.html
@@ -19,6 +19,8 @@ up to 1024 bytes in length.
This is some text for the first anchor.
+John asked Mary to the dance.
+
diff --git a/cgi-bin/var.c b/cgi-bin/var.c
index 17d507756..113b8d026 100644
--- a/cgi-bin/var.c
+++ b/cgi-bin/var.c
@@ -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 $".
*/
diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in
index 21f43b2cc..ee0b28fb4 100644
--- a/conf/cupsd.conf.in
+++ b/conf/cupsd.conf.in
@@ -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
#
-# 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 $".
#
diff --git a/conf/mime.types b/conf/mime.types
index e5a522df5..c36dbb95d 100644
--- a/conf/mime.types
+++ b/conf/mime.types
@@ -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 $".
#
diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4
index 8610523ba..03a348031 100644
--- a/config-scripts/cups-common.m4
+++ b/config-scripts/cups-common.m4
@@ -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
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
index 9a15cb535..1af623a16 100644
--- a/config-scripts/cups-compiler.m4
+++ b/config-scripts/cups-compiler.m4
@@ -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
diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4
index 48b3aea5f..393204563 100644
--- a/config-scripts/cups-defaults.m4
+++ b/config-scripts/cups-defaults.m4
@@ -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
diff --git a/config-scripts/cups-directories.m4 b/config-scripts/cups-directories.m4
index 595512b43..09f3d9697 100644
--- a/config-scripts/cups-directories.m4
+++ b/config-scripts/cups-directories.m4
@@ -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
index 000000000..360910a0d
--- /dev/null
+++ b/config-scripts/cups-dnssd.m4
@@ -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
index 000000000..ebb8c12fc
--- /dev/null
+++ b/config-scripts/cups-gssapi.m4
@@ -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 ],
+ [ 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 ],
+ [ 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 ],
+ [ 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
diff --git a/config-scripts/cups-image.m4 b/config-scripts/cups-image.m4
index 22cb798f4..8c63cc9a5 100644
--- a/config-scripts/cups-image.m4
+++ b/config-scripts/cups-image.m4
@@ -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
diff --git a/config-scripts/cups-largefile.m4 b/config-scripts/cups-largefile.m4
index 25400ce2d..f5f6bf1ad 100644
--- a/config-scripts/cups-largefile.m4
+++ b/config-scripts/cups-largefile.m4
@@ -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
diff --git a/config-scripts/cups-ldap.m4 b/config-scripts/cups-ldap.m4
index c78e17509..d2171eb30 100644
--- a/config-scripts/cups-ldap.m4
+++ b/config-scripts/cups-ldap.m4
@@ -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
diff --git a/config-scripts/cups-manpages.m4 b/config-scripts/cups-manpages.m4
index 41e8190cb..71f1e60ba 100644
--- a/config-scripts/cups-manpages.m4
+++ b/config-scripts/cups-manpages.m4
@@ -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
diff --git a/config-scripts/cups-network.m4 b/config-scripts/cups-network.m4
index abe2ebcf0..10cf68281 100644
--- a/config-scripts/cups-network.m4
+++ b/config-scripts/cups-network.m4
@@ -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
diff --git a/config-scripts/cups-opsys.m4 b/config-scripts/cups-opsys.m4
index 8d510da91..964fe74bf 100644
--- a/config-scripts/cups-opsys.m4
+++ b/config-scripts/cups-opsys.m4
@@ -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
index 000000000..d0b6e9760
--- /dev/null
+++ b/config-scripts/cups-poll.m4
@@ -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
diff --git a/config-scripts/cups-sharedlibs.m4 b/config-scripts/cups-sharedlibs.m4
index ca695aa13..940fdac28 100644
--- a/config-scripts/cups-sharedlibs.m4
+++ b/config-scripts/cups-sharedlibs.m4
@@ -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
diff --git a/config-scripts/cups-ssl.m4 b/config-scripts/cups-ssl.m4
index 2522e9b16..a208b712f 100644
--- a/config-scripts/cups-ssl.m4
+++ b/config-scripts/cups-ssl.m4
@@ -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
diff --git a/config-scripts/cups-threads.m4 b/config-scripts/cups-threads.m4
index dbf5afaf2..a779aad84 100644
--- a/config-scripts/cups-threads.m4
+++ b/config-scripts/cups-threads.m4
@@ -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
diff --git a/config.h.in b/config.h.in
index bad25cb09..e2a76addd 100644
--- a/config.h.in
+++ b/config.h.in
@@ -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).
*
@@ -77,6 +77,13 @@
#define CUPS_DEFAULT_PRINTCAP "/etc/printcap"
+/*
+ * Default MaxCopies value...
+ */
+
+#define CUPS_DEFAULT_MAX_COPIES 100
+
+
/*
* Maximum number of file descriptors to support.
*/
@@ -271,6 +278,7 @@
* What Security framework headers do we have?
*/
+#undef HAVE_AUTHORIZATION_H
#undef HAVE_SECPOLICY_H
#undef HAVE_SECPOLICYPRIV_H
#undef HAVE_SECBASEPRIV_H
@@ -306,6 +314,21 @@
#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 ?
*/
@@ -468,8 +491,39 @@
#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 $".
*/
diff --git a/configure.in b/configure.in
index b96b42272..2472ce6fc 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/cups-config.in b/cups-config.in
index 81a982b47..98e80a88f 100755
--- a/cups-config.in
+++ b/cups-config.in
@@ -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 $".
#
diff --git a/cups/Dependencies b/cups/Dependencies
index cedd9bded..0efee6e4a 100644
--- a/cups/Dependencies
+++ b/cups/Dependencies
@@ -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
diff --git a/cups/Makefile b/cups/Makefile
index e0064b42e..36c170baa 100644
--- a/cups/Makefile
+++ b/cups/Makefile
@@ -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 $".
#
diff --git a/cups/adminutil.c b/cups/adminutil.c
index e697e6a1d..8b96fcb6c 100644
--- a/cups/adminutil.c
+++ b/cups/adminutil.c
@@ -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 $".
*/
diff --git a/cups/adminutil.h b/cups/adminutil.h
index 8b66d1b8d..2a0392d00 100644
--- a/cups/adminutil.h
+++ b/cups/adminutil.h
@@ -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 $".
*/
diff --git a/cups/api-filter.shtml b/cups/api-filter.shtml
index 66f5e0a09..66b65267e 100644
--- a/cups/api-filter.shtml
+++ b/cups/api-filter.shtml
@@ -1,5 +1,5 @@
+
+Description
+Get the index of the current element.
+
+
+Syntax
+
+int
+cupsArrayGetIndex(
+ cups_array_t * a);
+
+Arguments
+
+Name | Description |
+
+a | Array |
+
+Returns
+Index of the current element
+
+
+Description
+Get the index of the last inserted element.
+
+
+Syntax
+
+int
+cupsArrayGetInsert(
+ cups_array_t * a);
+
+Arguments
+
+Name | Description |
+
+a | Array |
+
+Returns
+Index of the last inserted element
+
Description
Get the N-th element in the array.
diff --git a/doc/help/api-cups.html b/doc/help/api-cups.html
index 7466fa322..fafea6149 100644
--- a/doc/help/api-cups.html
+++ b/doc/help/api-cups.html
@@ -158,8 +158,10 @@ CUPS 1.1 or higher.
cupsPrintFiles2() CUPS 1.1.21
cupsPutFd() CUPS 1.1.20
cupsPutFile() CUPS 1.1.20
+ cupsRemoveDest() CUPS 1.3
cupsRemoveOption() CUPS 1.2
cupsServer()
+ cupsSetDefaultDest() CUPS 1.3
cupsSetDests()
cupsSetDests2() CUPS 1.1.21
cupsSetEncryption()
@@ -1034,6 +1036,37 @@ cupsPutFile(
Returns
HTTP status
+
+Description
+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.
+
+
+Syntax
+
+int
+cupsRemoveDest(
+ const char * name,
+ const char * instance,
+ int num_dests,
+ cups_dest_t ** dests);
+
+Arguments
+
+Name | Description |
+
+name | Destination name |
+instance | Instance name or NULL |
+num_dests | Number of destinations |
+dests | Destinations |
+
+Returns
+New number of destinations
+
Description
Remove an option from an option array.
@@ -1074,6 +1107,32 @@ cupsServer(void);
Returns
Server name
+
+Description
+Set the default destination.
+
+
+Syntax
+
+void
+cupsSetDefaultDest(
+ const char * name,
+ const char * instance,
+ int num_dests,
+ cups_dest_t * dests);
+
+Arguments
+
+Name | Description |
+
+name | Destination name |
+instance | Instance name or NULL |
+num_dests | Number of destinations |
+dests | Destinations |
+
+Returns
+Nothing.
+
Description
Save the list of destinations for the default server.
diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html
index 63607f38b..dcf032034 100644
--- a/doc/help/api-filter.html
+++ b/doc/help/api-filter.html
@@ -52,6 +52,9 @@ used when writing backends, filters, and port monitors.
use the CUPS_BACKEND_ constants and
cupsBackChannel functions, respectively.
+The <cups/sidechannel.h> header file must be
+included to use the CUPS_SC_ constants and cupsSideChannel functions.
+
Programs using these functions must be linked to the CUPS
library: libcups.a, libcups.so.2,
libcups.2.dylib, libcups_s.a, or
@@ -63,9 +66,177 @@ library:
gcc -o myprogram myprogram.c -lcups
+
Compatibility
-All of these functions require CUPS 1.2 or higher.
+The cupsBackChannel functions require CUPS 1.2 or higher. The cupsSideChannel functions require CUPS 1.3 or higher.
+
+
+Using the cupsBackChannel APIs
+
+The cupsBackChannel 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 stdout.
+
+The cupsBackChannelRead() 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:
+
+
+#include <cups/cups.h>
+
+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);
+
+
+If you are writing a backend, the cupsBackChannelWrite() 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:
+
+
+#include <cups/cups.h>
+
+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);
+
+
+
+Using the cupsSideChannel APIs
+
+The cupsSideChannel APIs allow your filters, drivers, port monitors, and backend to send and receive the following out-of-band commands:
+
+
+
+ - CUPS_SC_CMD_SOFT_RESET - Do a soft reset
+ - CUPS_SC_CMD_DRAIN_OUTPUT - Drain all pending output
+ - CUPS_SC_CMD_GET_BIDI - Return bidirectional capabilities
+ - CUPS_SC_CMD_GET_DEVICE_ID - Return the IEEE-1284 device ID
+ - CUPS_SC_CMD_GET_STATE - Return the device state
+
+
+
+
+Sending Commands from a Filter, Driver, or Port Monitor
+
+The cupsSideChannelDoRequest() function is used by filters, drivers, and port monitors to send a command to the backend and read back a response:
+
+
+cups_sc_status_t cupsSideChannelDoRequest(cups_sc_command_t command,
+ char *data, int *datalen,
+ double timeout);
+
+
+The CUPS_SC_CMD_SOFT_RESET and CUPS_SC_CMD_DRAIN_OUTPUT commands do not return any data values, while the others return one or more bytes. The timeout parameter allows your program to poll or wait for the command to complete - use a timeout of 30 seconds for CUPS_SC_CMD_SOFT_RESET and CUPS_SC_CMD_DRAIN_OUTPUT and a timeout of 1 second for all other commands.
+
+CUPS_SC_CMD_GET_BIDI returns a single char value that tells you whether the backend supports bidirectional communications:
+
+
+#include <cups/sidechannel.h>
+
+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, &data, &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;
+
+
+CUPS_SC_CMD_GET_DEVICE_ID returns a string of characters containing the IEEE-1284 device ID for the connected printer:
+
+
+#include <cups/sidechannel.h>
+
+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, &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';
+
+
+CUPS_SC_CMD_GET_STATE returns a single char value that tells you the current device state:
+
+
+#include <cups/sidechannel.h>
+
+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, &data, &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;
+
+
+
+Handling Commands in your Backend
+
+The cupsSideChannelRead() function is used by backends to read a command from a filter, driver, or port monitor:
+
+
+int cupsSideChannelRead(cups_sc_command_t &command,
+ cups_sc_status_t &status,
+ char *data, int *datalen, double timeout);
+
+
+Backends can either poll for commands using a timeout of 0.0, wait indefinitely for commands using a timeout of -1.0 (probably in a separate thread for that purpose), or use select() or poll() on the CUPS_SC_FD file descriptor (4) to handle input and output on several file descriptors at the same time. Backends can pass NULL for the data and datalen parameters, since none of the commands sent by upstream filters contain any data at this time.
+
+Once a command is processed, the backend uses the cupsSideChannelWrite() function to send its response:
+
+
+#include <cups/sidechannel.h>
+
+cups_sc_command_t command;
+cups_sc_status_t status;
+
+/* Poll for a command... */
+if (!cupsSideChannelRead(&command, &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);
+}
+
Contents
- Functions
@@ -75,6 +246,9 @@ library:
@@ -134,5 +308,109 @@ cupsBackChannelWrite(
Returns
Bytes written or -1 on error
+
+
+Description
+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.
+
+
+Syntax
+
+cups_sc_status_t
+cupsSideChannelDoRequest(
+ cups_sc_command_t command,
+ char * data,
+ int * datalen,
+ double timeout);
+
+Arguments
+
+Name | Description |
+
+command | Command to send |
+data | Response data buffer pointer |
+datalen | Size of data buffer on entry, number of bytes in buffer on return |
+timeout | Timeout in seconds |
+
+Returns
+Status of command
+
+
+Description
+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.
+
+
+Syntax
+
+int
+cupsSideChannelRead(
+ cups_sc_command_t * command,
+ cups_sc_status_t * status,
+ char * data,
+ int * datalen,
+ double timeout);
+
+Arguments
+
+Name | Description |
+
+command | Command code |
+status | Status code |
+data | Data buffer pointer |
+datalen | Size of data buffer on entry, number of bytes in buffer on return |
+timeout | Timeout in seconds |
+
+Returns
+0 on success, -1 on error
+
+
+Description
+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.
+
+
+Syntax
+
+int
+cupsSideChannelWrite(
+ cups_sc_command_t command,
+ cups_sc_status_t status,
+ const char * data,
+ int datalen,
+ double timeout);
+
+Arguments
+
+Name | Description |
+
+command | Command code |
+status | Status code |
+data | Data buffer pointer |
+datalen | Number of bytes of data |
+timeout | Timeout in seconds |
+
+Returns
+0 on success, -1 on error