diff options
57 files changed, 403 insertions, 801 deletions
diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt index f50af051b..d9ea9ca1d 100644 --- a/CHANGES-1.3.txt +++ b/CHANGES-1.3.txt @@ -3,6 +3,11 @@ CHANGES-1.3.txt CHANGES IN CUPS V1.3.10 + - The scheduler now rejects ATTR: messages with empty values. + - The scheduler could consume all CPU handling closed connections + (STR #2988) + - The scheduler now protects against DNS rebinding attacks on + localhost. - SECURITY: The PNG image reading code did not validate the image size properly, leading to a potential buffer overflow (STR #2974) diff --git a/CHANGES.txt b/CHANGES.txt index 508451547..f92ab127e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,20 @@ -CHANGES.txt - 2008-10-10 +CHANGES.txt - 2008-11-11 ------------------------ +CHANGES IN CUPS V1.4b2 + + - Fixed a PPD compiler problem with the loading of message + catalogs (STR #2990) + - Fixed a PPD compiler problem with the loading of .strings files + (STR #2989) + - The cupsfilter utility did not set the CONTENT_TYPE environment + variable when running filters. + - The scheduler now waits to allow system sleep until the jobs + have all stopped. + - The IPP, LPD, and socket backends used different "connecting" + progress messages. + + CHANGES IN CUPS V1.4b1 - Documentation updates (STR #2567) diff --git a/Makedefs.in b/Makedefs.in index c756e0283..8753db79f 100644 --- a/Makedefs.in +++ b/Makedefs.in @@ -122,6 +122,7 @@ ALL_CXXFLAGS = -I.. -D_CUPS_SOURCE $(CXXFLAGS) $(SSLFLAGS) \ ARCHFLAGS = @ARCHFLAGS@ ARFLAGS = @ARFLAGS@ BACKLIBS = @BACKLIBS@ +BANNERTOPS = @BANNERTOPS@ CFLAGS = @CPPFLAGS@ @CFLAGS@ COMMONLIBS = @LIBS@ CUPSDLIBS = @CUPSDLIBS@ @@ -155,6 +156,7 @@ PHPDIR = @PHPDIR@ PHPOPTIONS = @PHPOPTIONS@ -I../.. `$(PHPCONFIG) --includes` SSLFLAGS = @SSLFLAGS@ SSLLIBS = @SSLLIBS@ +TEXTTOPS = @TEXTTOPS@ UNITTESTS = @UNITTESTS@ diff --git a/backend/lpd.c b/backend/lpd.c index 19d1f2f75..a543c27f7 100644 --- a/backend/lpd.c +++ b/backend/lpd.c @@ -698,7 +698,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */ fputs("STATE: +connecting-to-device\n", stderr); _cupsLangPrintf(stderr, - _("INFO: Attempting to connect to host %s for printer %s\n"), + _("INFO: Connecting to %s for printer %s\n"), hostname, printer); for (lport = reserve == RESERVE_RFC1179 ? 732 : 1024, addr = addrlist, diff --git a/backend/socket.c b/backend/socket.c index 01d6d0472..067d2d739 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -267,7 +267,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ } _cupsLangPrintf(stderr, - _("INFO: Attempting to connect to host %s on port %d\n"), + _("INFO: Connecting to %s on port %d\n"), hostname, port); fputs("STATE: +connecting-to-device\n", stderr); diff --git a/cgi-bin/Dependencies b/cgi-bin/Dependencies index 3c913998b..c417e9693 100644 --- a/cgi-bin/Dependencies +++ b/cgi-bin/Dependencies @@ -59,125 +59,3 @@ testtemplate.o: help-index.h websearch.o: cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h websearch.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h websearch.o: ../cups/file.h ../cups/language.h ../cups/array.h help-index.h -# DO NOT DELETE - -help-index.32.o: help-index.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -help-index.32.o: help-index.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -help-index.32.o: help-index.c ../cups/file.h ../cups/language.h ../cups/array.h help-index.h -help-index.32.o: help-index.c ../cups/debug.h ../cups/i18n.h ../cups/transcode.h -help-index.32.o: help-index.c ../cups/string.h ../config.h ../cups/dir.h -html.32.o: html.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -html.32.o: html.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -html.32.o: html.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -html.32.o: html.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -ipp-var.32.o: ipp-var.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -ipp-var.32.o: ipp-var.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -ipp-var.32.o: ipp-var.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -ipp-var.32.o: ipp-var.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -search.32.o: search.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -search.32.o: search.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -search.32.o: search.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -search.32.o: search.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -template.32.o: template.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -template.32.o: template.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -template.32.o: template.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -template.32.o: template.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -var.32.o: var.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -var.32.o: var.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -var.32.o: var.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -var.32.o: var.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -admin.32.o: admin.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -admin.32.o: admin.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -admin.32.o: admin.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -admin.32.o: admin.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -admin.32.o: admin.c ../cups/adminutil.h ../cups/cups.h ../cups/file.h -classes.32.o: classes.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -classes.32.o: classes.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -classes.32.o: classes.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -classes.32.o: classes.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -help.32.o: help.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -help.32.o: help.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -help.32.o: help.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -help.32.o: help.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -jobs.32.o: jobs.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -jobs.32.o: jobs.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -jobs.32.o: jobs.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -jobs.32.o: jobs.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -printers.32.o: printers.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -printers.32.o: printers.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -printers.32.o: printers.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -printers.32.o: printers.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -testcgi.32.o: testcgi.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testcgi.32.o: testcgi.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -testcgi.32.o: testcgi.c ../cups/language.h ../cups/array.h help-index.h -testhi.32.o: testhi.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testhi.32.o: testhi.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -testhi.32.o: testhi.c ../cups/language.h ../cups/array.h help-index.h -testtemplate.32.o: testtemplate.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testtemplate.32.o: testtemplate.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -testtemplate.32.o: testtemplate.c ../cups/file.h ../cups/language.h ../cups/array.h -testtemplate.32.o: testtemplate.c help-index.h -websearch.32.o: websearch.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -websearch.32.o: websearch.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -websearch.32.o: websearch.c ../cups/file.h ../cups/language.h ../cups/array.h help-index.h -# DO NOT DELETE - -help-index.64.o: help-index.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -help-index.64.o: help-index.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -help-index.64.o: help-index.c ../cups/file.h ../cups/language.h ../cups/array.h help-index.h -help-index.64.o: help-index.c ../cups/debug.h ../cups/i18n.h ../cups/transcode.h -help-index.64.o: help-index.c ../cups/string.h ../config.h ../cups/dir.h -html.64.o: html.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -html.64.o: html.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -html.64.o: html.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -html.64.o: html.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -ipp-var.64.o: ipp-var.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -ipp-var.64.o: ipp-var.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -ipp-var.64.o: ipp-var.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -ipp-var.64.o: ipp-var.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -search.64.o: search.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -search.64.o: search.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -search.64.o: search.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -search.64.o: search.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -template.64.o: template.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -template.64.o: template.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -template.64.o: template.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -template.64.o: template.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -var.64.o: var.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -var.64.o: var.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -var.64.o: var.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -var.64.o: var.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -admin.64.o: admin.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -admin.64.o: admin.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -admin.64.o: admin.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -admin.64.o: admin.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -admin.64.o: admin.c ../cups/adminutil.h ../cups/cups.h ../cups/file.h -classes.64.o: classes.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -classes.64.o: classes.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -classes.64.o: classes.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -classes.64.o: classes.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -help.64.o: help.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -help.64.o: help.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -help.64.o: help.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -help.64.o: help.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -jobs.64.o: jobs.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -jobs.64.o: jobs.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -jobs.64.o: jobs.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -jobs.64.o: jobs.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -printers.64.o: printers.c cgi-private.h cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -printers.64.o: printers.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -printers.64.o: printers.c ../cups/language.h ../cups/array.h help-index.h ../cups/debug.h -printers.64.o: printers.c ../cups/i18n.h ../cups/transcode.h ../cups/string.h ../config.h -testcgi.64.o: testcgi.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testcgi.64.o: testcgi.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -testcgi.64.o: testcgi.c ../cups/language.h ../cups/array.h help-index.h -testhi.64.o: testhi.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testhi.64.o: testhi.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -testhi.64.o: testhi.c ../cups/language.h ../cups/array.h help-index.h -testtemplate.64.o: testtemplate.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testtemplate.64.o: testtemplate.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -testtemplate.64.o: testtemplate.c ../cups/file.h ../cups/language.h ../cups/array.h -testtemplate.64.o: testtemplate.c help-index.h -websearch.64.o: websearch.c cgi.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -websearch.64.o: websearch.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -websearch.64.o: websearch.c ../cups/file.h ../cups/language.h ../cups/array.h help-index.h diff --git a/cgi-bin/Makefile b/cgi-bin/Makefile index 0e35492b0..b94cf0840 100644 --- a/cgi-bin/Makefile +++ b/cgi-bin/Makefile @@ -22,12 +22,8 @@ LIBOBJS = \ search.o \ template.o \ var.o -LIB32OBJS = $(LIBOBJS:.o=.32.o) -LIB64OBJS = $(LIBOBJS:.o=.64.o) OBJS = \ $(LIBOBJS) \ - $(LIB32OBJS) \ - $(LIB64OBJS) \ admin.o \ classes.o \ help.o \ @@ -46,8 +42,6 @@ CGIS = \ LIBTARGETS = \ libcupscgi.a \ $(LIBCUPSCGI) \ - $(LIB32CUPSCGI) \ - $(LIB32CUPSCGI) \ websearch UNITTARGETS = \ @@ -88,7 +82,6 @@ unittests: $(UNITTARGETS) clean: $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) $(RM) libcupscgi.so libcupscgi.sl libcupscgi.dylib - $(RM) -r 32bit 64bit # @@ -96,13 +89,7 @@ clean: # depend: - touch Dependencies.tmp - makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1 - $(RM) Dependencies - cp Dependencies.tmp Dependencies - sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies - sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies - $(RM) Dependencies.tmp + makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 # @@ -151,7 +138,7 @@ install-headers: # Install libraries... # -install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64) +install-libs: $(INSTALLSTATIC) echo Installing libraries in $(LIBDIR)... $(INSTALL_DIR) -m 755 $(LIBDIR) $(INSTALL_LIB) $(LIBCUPSCGI) $(LIBDIR) @@ -173,24 +160,12 @@ installstatic: $(INSTALL_LIB) libcupscgi.a $(LIBDIR) $(RANLIB) $(LIBDIR)/libcupscgi.a -install32bit: - echo Installing libraries in $(LIB32DIR)... - $(INSTALL_DIR) -m 755 $(LIB32DIR) - $(INSTALL_LIB) 32bit/libcupscgi.so.1 $(LIB32DIR)/libcupscgi.so.1 - $(LN) libcupscgi.so.1 $(LIB32DIR)/libcupscgi.so - -install64bit: - echo Installing libraries in $(LIB64DIR)... - $(INSTALL_DIR) -m 755 $(LIB64DIR) - $(INSTALL_LIB) 64bit/libcupscgi.so.1 $(LIB64DIR)/libcupscgi.so.1 - $(LN) libcupscgi.so.1 $(LIB64DIR)/libcupscgi.so - # # Uninstall all targets... # -uninstall: $(UNINSTALL32) $(UNINSTALL64) +uninstall: for file in $(CGIS); do \ $(RM) $(SERVERBIN)/cgi-bin/$$file; \ done @@ -208,16 +183,6 @@ uninstall: $(UNINSTALL32) $(UNINSTALL64) $(RM) $(INCLUDEDIR)/cups/help-index.h -$(RMDIR) $(INCLUDEDIR)/cups -uninstall32bit: - $(RM) $(LIB32DIR)/libcupscgi.so - $(RM) $(LIB32DIR)/libcupscgi.so.1 - -$(RMDIR) $(LIB32DIR) - -uninstall64bit: - $(RM) $(LIB64DIR)/libcupscgi.so - $(RM) $(LIB64DIR)/libcupscgi.so.1 - -$(RMDIR) $(LIB64DIR) - # # Automatic API help files... @@ -251,30 +216,6 @@ libcupscgi.so.1 libcupscgi.sl.1: $(LIBOBJS) # -# 32bit/libcupscgi.so.1 -# - -32bit/libcupscgi.so.1: $(LIB32OBJS) - echo Linking 32-bit $@... - -mkdir 32bit - $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(LIBS) - $(RM) 32bit/libcupscgi.so - $(LN) libcupscgi.so.1 32bit/libcupscgi.so - - -# -# 64bit/libcupscgi.so.1 -# - -64bit/libcupscgi.so.1: $(LIB64OBJS) - echo Linking 64-bit $@... - -mkdir 64bit - $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(LIBS) - $(RM) 64bit/libcupscgi.so - $(LN) libcupscgi.so.1 64bit/libcupscgi.so - - -# # libcupscgi.1.dylib # diff --git a/cgi-bin/printers.c b/cgi-bin/printers.c index d3e0224fd..300d4869e 100644 --- a/cgi-bin/printers.c +++ b/cgi-bin/printers.c @@ -294,8 +294,7 @@ show_all_printers(http_t *http, /* I - Connection to server */ ipp_t *request, /* IPP request */ *response; /* IPP response */ cups_array_t *printers; /* Array of printer objects */ - ipp_attribute_t *printer, /* Printer object */ - *attr; /* Current attribute */ + ipp_attribute_t *printer; /* Printer object */ int ascending, /* Order of printers (0 = descending) */ first, /* First printer to show */ count; /* Number of printers */ diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index 97431c371..042145f0f 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -20,7 +20,7 @@ dnl Set the name of the config header file... AC_CONFIG_HEADER(config.h) dnl Version number information... -CUPS_VERSION="1.4b1" +CUPS_VERSION="1.4b2" 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'`" diff --git a/config-scripts/cups-defaults.m4 b/config-scripts/cups-defaults.m4 index 7efd78363..023f13cc0 100644 --- a/config-scripts/cups-defaults.m4 +++ b/config-scripts/cups-defaults.m4 @@ -413,6 +413,33 @@ AC_ARG_WITH(ipp-port, [ --with-ipp-port set default port number for IPP AC_SUBST(DEFAULT_IPP_PORT) AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT) +dnl Filters +AC_ARG_ENABLE(bannertops, [ --enable-bannertops build with default banner filter, default=auto ]) +AC_ARG_ENABLE(texttops, [ --enable-texttops build with default text filter, default=auto ]) + +if test "x$enable_bannertops" = xno; then + BANNERTOPS="" +elif test "x$enable_bannertops" = xyes; then + BANNERTOPS="bannertops" +elif test $uname = Darwin; then + BANNERTOPS="" +else + BANNERTOPS="bannertops" +fi + +if test "x$enable_texttops" = xno; then + TEXTTOPS="" +elif test "x$enable_texttops" = xyes; then + TEXTTOPS="texttops" +elif test $uname = Darwin; then + TEXTTOPS="" +else + TEXTTOPS="texttops" +fi + +AC_SUBST(BANNERTOPS) +AC_SUBST(TEXTTOPS) + dnl dnl End of "$Id: cups-defaults.m4 7959 2008-09-17 19:30:58Z mike $". dnl diff --git a/data/testprint b/data/testprint index 1a8270ddb..d76f84e1c 100644 --- a/data/testprint +++ b/data/testprint @@ -4,3 +4,5 @@ Header Printer Test Page Footer Printer Test Page Notice This test page was produced by CUPS 1.4. Image images/cups.rgb +Image images/color-wheel.rgb + diff --git a/doc/Makefile b/doc/Makefile index 1373dea68..1792e0870 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -26,6 +26,7 @@ WEBPAGES = \ index.html \ robots.txt WEBIMAGES = \ + images/color-wheel.rgb \ images/cups.png \ images/cups.rgb \ images/cups-block-diagram.gif \ diff --git a/doc/images/color-wheel.rgb b/doc/images/color-wheel.rgb Binary files differnew file mode 100644 index 000000000..f01f4c5dc --- /dev/null +++ b/doc/images/color-wheel.rgb diff --git a/driver/Dependencies b/driver/Dependencies index 2ff3e4390..a89ca293f 100644 --- a/driver/Dependencies +++ b/driver/Dependencies @@ -55,117 +55,3 @@ rgb.o: ../cups/language.h ../cups/raster.h srgb.o: driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h srgb.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h srgb.o: ../cups/language.h ../cups/raster.h -# DO NOT DELETE - -commandtoescpx.32.o: commandtoescpx.c ../cups/cups.h ../cups/ipp.h ../cups/http.h -commandtoescpx.32.o: commandtoescpx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -commandtoescpx.32.o: commandtoescpx.c ../cups/file.h ../cups/language.h driver.h ../cups/raster.h -commandtoescpx.32.o: commandtoescpx.c ../cups/string.h ../config.h ../data/escp.h -commandtopclx.32.o: commandtopclx.c ../cups/cups.h ../cups/ipp.h ../cups/http.h -commandtopclx.32.o: commandtopclx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -commandtopclx.32.o: commandtopclx.c ../cups/file.h ../cups/language.h driver.h ../cups/raster.h -commandtopclx.32.o: commandtopclx.c ../cups/string.h ../config.h ../data/pcl.h -rastertoescpx.32.o: rastertoescpx.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -rastertoescpx.32.o: rastertoescpx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -rastertoescpx.32.o: rastertoescpx.c ../cups/file.h ../cups/language.h ../cups/raster.h -rastertoescpx.32.o: rastertoescpx.c ../cups/string.h ../config.h ../data/escp.h -rastertopclx.32.o: rastertopclx.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -rastertopclx.32.o: rastertopclx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -rastertopclx.32.o: rastertopclx.c ../cups/file.h ../cups/language.h ../cups/raster.h -rastertopclx.32.o: rastertopclx.c pcl-common.h ../cups/string.h ../config.h ../data/pcl.h -pcl-common.32.o: pcl-common.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -pcl-common.32.o: pcl-common.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -pcl-common.32.o: pcl-common.c ../cups/file.h ../cups/language.h ../cups/raster.h pcl-common.h -pcl-common.32.o: pcl-common.c ../cups/string.h ../config.h ../data/pcl.h -testcmyk.32.o: testcmyk.c ../cups/string.h ../config.h driver.h ../cups/cups.h -testcmyk.32.o: testcmyk.c ../cups/ipp.h ../cups/http.h ../cups/versioning.h ../cups/ppd.h -testcmyk.32.o: testcmyk.c ../cups/array.h ../cups/file.h ../cups/language.h -testcmyk.32.o: testcmyk.c ../cups/raster.h -testdither.32.o: testdither.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testdither.32.o: testdither.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -testdither.32.o: testdither.c ../cups/file.h ../cups/language.h ../cups/raster.h -testdither.32.o: testdither.c ../cups/string.h ../config.h -testrgb.32.o: testrgb.c ../cups/string.h ../config.h driver.h ../cups/cups.h ../cups/ipp.h -testrgb.32.o: testrgb.c ../cups/http.h ../cups/versioning.h ../cups/ppd.h ../cups/array.h -testrgb.32.o: testrgb.c ../cups/file.h ../cups/language.h ../cups/raster.h -attr.32.o: attr.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -attr.32.o: attr.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -attr.32.o: attr.c ../cups/language.h ../cups/raster.h ../cups/string.h ../config.h -check.32.o: check.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -check.32.o: check.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -check.32.o: check.c ../cups/language.h ../cups/raster.h -cmyk.32.o: cmyk.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -cmyk.32.o: cmyk.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -cmyk.32.o: cmyk.c ../cups/language.h ../cups/raster.h ../cups/string.h ../config.h -dither.32.o: dither.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -dither.32.o: dither.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -dither.32.o: dither.c ../cups/language.h ../cups/raster.h -lut.32.o: lut.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -lut.32.o: lut.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -lut.32.o: lut.c ../cups/language.h ../cups/raster.h -pack.32.o: pack.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -pack.32.o: pack.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -pack.32.o: pack.c ../cups/language.h ../cups/raster.h -rgb.32.o: rgb.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -rgb.32.o: rgb.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -rgb.32.o: rgb.c ../cups/language.h ../cups/raster.h -srgb.32.o: srgb.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -srgb.32.o: srgb.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -srgb.32.o: srgb.c ../cups/language.h ../cups/raster.h -# DO NOT DELETE - -commandtoescpx.64.o: commandtoescpx.c ../cups/cups.h ../cups/ipp.h ../cups/http.h -commandtoescpx.64.o: commandtoescpx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -commandtoescpx.64.o: commandtoescpx.c ../cups/file.h ../cups/language.h driver.h ../cups/raster.h -commandtoescpx.64.o: commandtoescpx.c ../cups/string.h ../config.h ../data/escp.h -commandtopclx.64.o: commandtopclx.c ../cups/cups.h ../cups/ipp.h ../cups/http.h -commandtopclx.64.o: commandtopclx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -commandtopclx.64.o: commandtopclx.c ../cups/file.h ../cups/language.h driver.h ../cups/raster.h -commandtopclx.64.o: commandtopclx.c ../cups/string.h ../config.h ../data/pcl.h -rastertoescpx.64.o: rastertoescpx.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -rastertoescpx.64.o: rastertoescpx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -rastertoescpx.64.o: rastertoescpx.c ../cups/file.h ../cups/language.h ../cups/raster.h -rastertoescpx.64.o: rastertoescpx.c ../cups/string.h ../config.h ../data/escp.h -rastertopclx.64.o: rastertopclx.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -rastertopclx.64.o: rastertopclx.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -rastertopclx.64.o: rastertopclx.c ../cups/file.h ../cups/language.h ../cups/raster.h -rastertopclx.64.o: rastertopclx.c pcl-common.h ../cups/string.h ../config.h ../data/pcl.h -pcl-common.64.o: pcl-common.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -pcl-common.64.o: pcl-common.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -pcl-common.64.o: pcl-common.c ../cups/file.h ../cups/language.h ../cups/raster.h pcl-common.h -pcl-common.64.o: pcl-common.c ../cups/string.h ../config.h ../data/pcl.h -testcmyk.64.o: testcmyk.c ../cups/string.h ../config.h driver.h ../cups/cups.h -testcmyk.64.o: testcmyk.c ../cups/ipp.h ../cups/http.h ../cups/versioning.h ../cups/ppd.h -testcmyk.64.o: testcmyk.c ../cups/array.h ../cups/file.h ../cups/language.h -testcmyk.64.o: testcmyk.c ../cups/raster.h -testdither.64.o: testdither.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -testdither.64.o: testdither.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h -testdither.64.o: testdither.c ../cups/file.h ../cups/language.h ../cups/raster.h -testdither.64.o: testdither.c ../cups/string.h ../config.h -testrgb.64.o: testrgb.c ../cups/string.h ../config.h driver.h ../cups/cups.h ../cups/ipp.h -testrgb.64.o: testrgb.c ../cups/http.h ../cups/versioning.h ../cups/ppd.h ../cups/array.h -testrgb.64.o: testrgb.c ../cups/file.h ../cups/language.h ../cups/raster.h -attr.64.o: attr.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -attr.64.o: attr.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -attr.64.o: attr.c ../cups/language.h ../cups/raster.h ../cups/string.h ../config.h -check.64.o: check.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -check.64.o: check.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -check.64.o: check.c ../cups/language.h ../cups/raster.h -cmyk.64.o: cmyk.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -cmyk.64.o: cmyk.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -cmyk.64.o: cmyk.c ../cups/language.h ../cups/raster.h ../cups/string.h ../config.h -dither.64.o: dither.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -dither.64.o: dither.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -dither.64.o: dither.c ../cups/language.h ../cups/raster.h -lut.64.o: lut.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -lut.64.o: lut.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -lut.64.o: lut.c ../cups/language.h ../cups/raster.h -pack.64.o: pack.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -pack.64.o: pack.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -pack.64.o: pack.c ../cups/language.h ../cups/raster.h -rgb.64.o: rgb.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -rgb.64.o: rgb.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -rgb.64.o: rgb.c ../cups/language.h ../cups/raster.h -srgb.64.o: srgb.c driver.h ../cups/cups.h ../cups/ipp.h ../cups/http.h -srgb.64.o: srgb.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h -srgb.64.o: srgb.c ../cups/language.h ../cups/raster.h diff --git a/driver/Makefile b/driver/Makefile index 4692ff964..d0078a88f 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -33,9 +33,6 @@ LIBOBJS = \ pack.o \ rgb.o \ srgb.o -LIB32OBJS = $(LIBOBJS:.o=.32.o) -LIB64OBJS = $(LIBOBJS:.o=.64.o) - OBJS = \ commandtoescpx.o \ commandtopclx.o \ @@ -45,14 +42,10 @@ OBJS = \ testcmyk.o \ testdither.o \ testrgb.o \ - $(LIBOBJS) \ - $(LIB32OBJS) \ - $(LIB64OBJS) + $(LIBOBJS) LIBTARGETS = \ $(LIBCUPSDRIVER) \ - $(LIB32CUPSDRIVER) \ - $(LIB64CUPSDRIVER) \ libcupsdriver.a UNITTARGETS = \ testcmyk \ @@ -97,7 +90,6 @@ clean: $(RM) $(TARGETS) $(UNITTARGETS) $(RM) -r test $(RM) libcupsdriver.so libcupsdriver.sl libcupsdriver.dylib - $(RM) -r 32bit 64bit # @@ -105,13 +97,7 @@ clean: # depend: - touch Dependencies.tmp - makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1 - $(RM) Dependencies - cp Dependencies.tmp Dependencies - sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies - sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies - $(RM) Dependencies.tmp + makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 # @@ -159,7 +145,7 @@ install-headers: # Install libraries... # -install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64) +install-libs: $(INSTALLSTATIC) echo Installing libraries in $(LIBDIR)... $(INSTALL_DIR) -m 755 $(LIBDIR) $(INSTALL_LIB) $(LIBCUPSDRIVER) $(LIBDIR) @@ -181,24 +167,12 @@ installstatic: $(INSTALL_LIB) libcupsdriver.a $(LIBDIR) $(RANLIB) $(LIBDIR)/libcupsdriver.a -install32bit: - echo Installing libraries in $(LIB32DIR)... - $(INSTALL_DIR) -m 755 $(LIB32DIR) - $(INSTALL_LIB) 32bit/libcupsdriver.so.1 $(LIB32DIR)/libcupsdriver.so.1 - $(LN) libcupsdriver.so.1 $(LIB32DIR)/libcupsdriver.so - -install64bit: - echo Installing libraries in $(LIB64DIR)... - $(INSTALL_DIR) -m 755 $(LIB64DIR) - $(INSTALL_LIB) 64bit/libcupsdriver.so.1 $(LIB64DIR)/libcupsdriver.so.1 - $(LN) libcupsdriver.so.1 $(LIB64DIR)/libcupsdriver.so - # # Uninstall... # -uninstall: $(UNINSTALL32) $(UNINSTALL64) +uninstall: for file in commandtoescpx commandtopclx rastertoescpx rastertopclx; do \ $(RM) $(SERVERBIN)/filter/$$file; \ done @@ -214,16 +188,6 @@ uninstall: $(UNINSTALL32) $(UNINSTALL64) $(RM) $(INCLUDEDIR)/cups/driver.h -$(RMDIR) $(INCLUDEDIR)/cups -uninstall32bit: - $(RM) $(LIB32DIR)/libcupsdriver.so - $(RM) $(LIB32DIR)/libcupsdriver.so.1 - -$(RMDIR) $(LIB32DIR) - -uninstall64bit: - $(RM) $(LIB64DIR)/libcupsdriver.so - $(RM) $(LIB64DIR)/libcupsdriver.so.1 - -$(RMDIR) $(LIB64DIR) - # # Automatic API help files... @@ -350,30 +314,6 @@ libcupsdriver.so.1 libcupsdriver.sl.1: $(LIBOBJS) # -# 32bit/libcupsdriver.so.1 -# - -32bit/libcupsdriver.so.1: $(LIB32OBJS) - echo Linking 32-bit $@... - -mkdir 32bit - $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(LIBS) - $(RM) 32bit/libcupsdriver.so - $(LN) libcupsdriver.so.1 32bit/libcupsdriver.so - - -# -# 64bit/libcupsdriver.so.1 -# - -64bit/libcupsdriver.so.1: $(LIB64OBJS) - echo Linking 64-bit $@... - -mkdir 64bit - $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(LIBS) - $(RM) 64bit/libcupsdriver.so - $(LN) libcupsdriver.so.1 64bit/libcupsdriver.so - - -# # libcupsdriver.1.dylib # diff --git a/filter/Dependencies b/filter/Dependencies index 75cf78cb0..a50962a1a 100644 --- a/filter/Dependencies +++ b/filter/Dependencies @@ -110,6 +110,11 @@ form-tree.o: form.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h form-tree.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h form-tree.o: ../cups/file.h ../cups/language.h ../cups/language.h form-tree.o: ../cups/string.h ../config.h +bannertops.o: pstext.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h +bannertops.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h +bannertops.o: ../cups/file.h ../cups/language.h ../cups/language.h +bannertops.o: ../cups/string.h ../config.h ../cups/transcode.h image.h +bannertops.o: ../cups/raster.h ../cups/i18n.h ../cups/transcode.h commandtops.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h commandtops.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h commandtops.o: ../cups/file.h ../cups/language.h ../cups/string.h ../config.h @@ -134,6 +139,10 @@ common.o: ../cups/language.h ../cups/language.h ../cups/string.h ../config.h pdftops.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h pdftops.o: ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h pdftops.o: ../cups/string.h ../config.h ../cups/i18n.h ../cups/transcode.h +pstext.o: pstext.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h +pstext.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h +pstext.o: ../cups/language.h ../cups/language.h ../cups/string.h ../config.h +pstext.o: ../cups/transcode.h ../cups/i18n.h ../cups/transcode.h pstops.o: common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h pstops.o: ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h pstops.o: ../cups/language.h ../cups/language.h ../cups/string.h ../config.h @@ -283,6 +292,11 @@ form-tree.32.o: form-tree.c form.h common.h ../cups/cups.h ../cups/ipp.h ../cup form-tree.32.o: form-tree.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h form-tree.32.o: form-tree.c ../cups/file.h ../cups/language.h ../cups/language.h form-tree.32.o: form-tree.c ../cups/string.h ../config.h +bannertops.32.o: bannertops.c pstext.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h +bannertops.32.o: bannertops.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h +bannertops.32.o: bannertops.c ../cups/file.h ../cups/language.h ../cups/language.h +bannertops.32.o: bannertops.c ../cups/string.h ../config.h ../cups/transcode.h image.h +bannertops.32.o: bannertops.c ../cups/raster.h ../cups/i18n.h ../cups/transcode.h commandtops.32.o: commandtops.c ../cups/cups.h ../cups/ipp.h ../cups/http.h commandtops.32.o: commandtops.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h commandtops.32.o: commandtops.c ../cups/file.h ../cups/language.h ../cups/string.h ../config.h @@ -307,6 +321,10 @@ common.32.o: common.c ../cups/language.h ../cups/language.h ../cups/string.h .. pdftops.32.o: pdftops.c ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h pdftops.32.o: pdftops.c ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h pdftops.32.o: pdftops.c ../cups/string.h ../config.h ../cups/i18n.h ../cups/transcode.h +pstext.32.o: pstext.c pstext.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h +pstext.32.o: pstext.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h +pstext.32.o: pstext.c ../cups/language.h ../cups/language.h ../cups/string.h ../config.h +pstext.32.o: pstext.c ../cups/transcode.h ../cups/i18n.h ../cups/transcode.h pstops.32.o: pstops.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h pstops.32.o: pstops.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h pstops.32.o: pstops.c ../cups/language.h ../cups/language.h ../cups/string.h ../config.h @@ -456,6 +474,11 @@ form-tree.64.o: form-tree.c form.h common.h ../cups/cups.h ../cups/ipp.h ../cup form-tree.64.o: form-tree.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h form-tree.64.o: form-tree.c ../cups/file.h ../cups/language.h ../cups/language.h form-tree.64.o: form-tree.c ../cups/string.h ../config.h +bannertops.64.o: bannertops.c pstext.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h +bannertops.64.o: bannertops.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h +bannertops.64.o: bannertops.c ../cups/file.h ../cups/language.h ../cups/language.h +bannertops.64.o: bannertops.c ../cups/string.h ../config.h ../cups/transcode.h image.h +bannertops.64.o: bannertops.c ../cups/raster.h ../cups/i18n.h ../cups/transcode.h commandtops.64.o: commandtops.c ../cups/cups.h ../cups/ipp.h ../cups/http.h commandtops.64.o: commandtops.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h commandtops.64.o: commandtops.c ../cups/file.h ../cups/language.h ../cups/string.h ../config.h @@ -480,6 +503,10 @@ common.64.o: common.c ../cups/language.h ../cups/language.h ../cups/string.h .. pdftops.64.o: pdftops.c ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/versioning.h pdftops.64.o: pdftops.c ../cups/ppd.h ../cups/array.h ../cups/file.h ../cups/language.h pdftops.64.o: pdftops.c ../cups/string.h ../config.h ../cups/i18n.h ../cups/transcode.h +pstext.64.o: pstext.c pstext.h common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h +pstext.64.o: pstext.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h +pstext.64.o: pstext.c ../cups/language.h ../cups/language.h ../cups/string.h ../config.h +pstext.64.o: pstext.c ../cups/transcode.h ../cups/i18n.h ../cups/transcode.h pstops.64.o: pstops.c common.h ../cups/cups.h ../cups/ipp.h ../cups/http.h pstops.64.o: pstops.c ../cups/versioning.h ../cups/ppd.h ../cups/array.h ../cups/file.h pstops.64.o: pstops.c ../cups/language.h ../cups/language.h ../cups/string.h ../config.h diff --git a/filter/Makefile b/filter/Makefile index d87fc97db..45ae1ca7f 100644 --- a/filter/Makefile +++ b/filter/Makefile @@ -19,11 +19,11 @@ include ../Makedefs FILTERS = \ - bannertops \ + $(BANNERTOPS) \ commandtops \ gziptoany \ hpgltops \ - texttops \ + $(TEXTTOPS) \ pstops \ $(IMGFILTERS) \ $(PDFTOPS) \ diff --git a/filter/textcommon.c b/filter/textcommon.c index 52289793d..a32646bce 100644 --- a/filter/textcommon.c +++ b/filter/textcommon.c @@ -45,7 +45,6 @@ lchar_t **Page = NULL; /* Page characters */ int NumPages = 0; /* Number of pages in document */ float CharsPerInch = 10; /* Number of character columns per inch */ float LinesPerInch = 6; /* Number of lines per inch */ -int UTF8 = 0; /* Use UTF-8 encoding? */ int NumKeywords = 0; /* Number of known keywords */ char **Keywords = NULL; /* List of known keywords */ @@ -1167,7 +1166,7 @@ getutf8(FILE *fp) /* I - File to read from */ if ((ch = getc(fp)) == EOF) return (EOF); - if (ch < 0xc0 || !UTF8) /* One byte character? */ + if (ch < 0xc0) /* One byte character? */ return (ch); else if ((ch & 0xe0) == 0xc0) { diff --git a/filter/texttops.c b/filter/texttops.c index 29f5b15c6..d8b6b1430 100644 --- a/filter/texttops.c +++ b/filter/texttops.c @@ -303,184 +303,12 @@ WriteProlog(const char *title, /* I - Title of job */ line[strlen(line) - 1] = '\0'; /* Drop \n */ for (lineptr = line + 7; isspace(*lineptr & 255); lineptr ++); /* Skip whitespace */ - if (strcmp(lineptr, "8bit") == 0) - { - /* - * 8-bit text... - */ - - UTF8 = 0; - NumFonts = 0; - - /* - * Read the font description(s)... - */ - - while (fgets(line, sizeof(line), fp) != NULL) - { - /* - * Skip comment and blank lines... - */ - - if (line[0] == '#' || line[0] == '\n') - continue; - - /* - * Read the font descriptions that should look like: - * - * first last direction width normal [bold italic bold-italic] - */ - - lineptr = line; - - start = strtol(lineptr, &lineptr, 16); - end = strtol(lineptr, &lineptr, 16); - - while (isspace(*lineptr & 255)) - lineptr ++; - - if (!*lineptr) - break; /* Must be a font mapping */ - - valptr = lineptr; - - while (!isspace(*lineptr & 255) && *lineptr) - lineptr ++; - - if (!*lineptr) - { - /* - * Can't have a font without all required values... - */ - - fprintf(stderr, _("ERROR: Bad font description line: %s\n"), valptr); - fclose(fp); - exit(1); - } - - *lineptr++ = '\0'; - - if (strcmp(valptr, "ltor") == 0) - Directions[NumFonts] = 1; - else if (strcmp(valptr, "rtol") == 0) - Directions[NumFonts] = -1; - else - { - fprintf(stderr, _("ERROR: Bad text direction %s\n"), valptr); - fclose(fp); - exit(1); - } - - /* - * Got the direction, now get the width... - */ - - while (isspace(*lineptr & 255)) - lineptr ++; - - valptr = lineptr; - - while (!isspace(*lineptr & 255) && *lineptr) - lineptr ++; - - if (!*lineptr) - { - /* - * Can't have a font without all required values... - */ - - fprintf(stderr, _("ERROR: Bad font description line: %s\n"), valptr); - fclose(fp); - exit(1); - } - - *lineptr++ = '\0'; - - if (strcmp(valptr, "single") == 0) - Widths[NumFonts] = 1; - else if (strcmp(valptr, "double") == 0) - Widths[NumFonts] = 2; - else - { - fprintf(stderr, _("ERROR: Bad text width %s\n"), valptr); - fclose(fp); - exit(1); - } - - /* - * Get the fonts... - */ - - for (i = 0; *lineptr && i < 4; i ++) - { - while (isspace(*lineptr & 255)) - lineptr ++; - - valptr = lineptr; - - while (!isspace(*lineptr & 255) && *lineptr) - lineptr ++; - - if (*lineptr) - *lineptr++ = '\0'; - - if (lineptr > valptr) - Fonts[NumFonts][i] = strdup(valptr); - } - - /* - * Fill in remaining fonts as needed... - */ - - for (j = i; j < 4; j ++) - Fonts[NumFonts][j] = strdup(Fonts[NumFonts][0]); - - /* - * Define the character mappings... - */ - - for (i = start, j = NumFonts * 256; i <= end; i ++, j ++) - Chars[i] = j; - - NumFonts ++; - } - - /* - * Read encoding lines... - */ - - do - { - /* - * Skip comment and blank lines... - */ - - if (line[0] == '#' || line[0] == '\n') - continue; - - /* - * Grab the character and unicode glyph number. - */ - - if (sscanf(line, "%x%x", &ch, &unicode) == 2 && ch < 256) - Codes[Chars[ch]] = unicode; - } - while (fgets(line, sizeof(line), fp) != NULL); - - fclose(fp); - } - else if (strcmp(lineptr, "utf8") == 0) + if (strcmp(lineptr, "utf8") == 0) { /* * UTF-8 (Unicode) text... */ - UTF8 = 1; - - /* - * Read the font descriptions... - */ - NumFonts = 0; while (fgets(line, sizeof(line), fp) != NULL) @@ -1258,7 +1086,7 @@ write_text(const char *s) /* I - String to write */ while (*utf8) { - if (*utf8 < 0xc0 || !UTF8) + if (*utf8 < 0xc0) ch = *utf8 ++; else if ((*utf8 & 0xe0) == 0xc0) { diff --git a/fonts/Makefile b/fonts/Makefile index af4e85161..61b793972 100644 --- a/fonts/Makefile +++ b/fonts/Makefile @@ -74,9 +74,11 @@ install: all install-data install-headers install-libs install-exec install-data: $(INSTALL_DIR) -m 755 $(DATADIR)/fonts - for file in $(FONTS); do \ - $(INSTALL_DATA) $$file $(DATADIR)/fonts; \ - done + if test "x$(BANNERTOPS)" != x -o "x$(TEXTTOPS)" != x; then \ + for file in $(FONTS); do \ + $(INSTALL_DATA) $$file $(DATADIR)/fonts; \ + done \ + fi # diff --git a/locale/cups.pot b/locale/cups.pot index 00eaebe18..5d5444aab 100644 --- a/locale/cups.pot +++ b/locale/cups.pot @@ -3509,16 +3509,6 @@ msgstr "" msgid "INFO: AppleTalk disabled in System Preferences.\n" msgstr "" -#: backend/lpd.c:701 -#, c-format -msgid "INFO: Attempting to connect to host %s for printer %s\n" -msgstr "" - -#: backend/socket.c:270 -#, c-format -msgid "INFO: Attempting to connect to host %s on port %d\n" -msgstr "" - #: backend/ipp.c:1328 msgid "INFO: Canceling print job...\n" msgstr "" @@ -3528,7 +3518,12 @@ msgstr "" msgid "INFO: Connected to %s...\n" msgstr "" -#: backend/ipp.c:526 +#: backend/lpd.c:701 +#, c-format +msgid "INFO: Connecting to %s for printer %s\n" +msgstr "" + +#: backend/ipp.c:526 backend/socket.c:270 #, c-format msgid "INFO: Connecting to %s on port %d...\n" msgstr "" diff --git a/man/cancel.man b/man/cancel.man index babaeed8d..1a107b2b7 100644 --- a/man/cancel.man +++ b/man/cancel.man @@ -3,7 +3,7 @@ .\" .\" cancel man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -69,7 +69,7 @@ Cancel-Jobs operations in \fIcupsd.conf(5)\fR. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cancel.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/classes.conf.man b/man/classes.conf.man index 882192770..1c227095a 100644 --- a/man/classes.conf.man +++ b/man/classes.conf.man @@ -3,7 +3,7 @@ .\" .\" classes.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -112,7 +112,7 @@ Specifies the date/time associated with the state. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: classes.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/client.conf.man.in b/man/client.conf.man.in index 856d6504b..608b41b2d 100644 --- a/man/client.conf.man.in +++ b/man/client.conf.man.in @@ -3,7 +3,7 @@ .\" .\" client.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -43,7 +43,7 @@ connecting to the server .SH SEE ALSO http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: client.conf.man.in 6649 2007-07-11 21:46:42Z mike $". .\" diff --git a/man/commandtoescpx.man b/man/commandtoescpx.man index d860a3798..771c9d845 100644 --- a/man/commandtoescpx.man +++ b/man/commandtoescpx.man @@ -3,7 +3,7 @@ .\" .\" rastertoescpx man page for the CUPS Driver Development Kit. .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -27,7 +27,7 @@ EPSON-compatible printers and plotters. .SH SEE ALSO cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual. .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: commandtoescpx.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/commandtopclx.man b/man/commandtopclx.man index 529a4cf64..931d92831 100644 --- a/man/commandtopclx.man +++ b/man/commandtopclx.man @@ -3,7 +3,7 @@ .\" .\" rastertopclx man page for the CUPS Driver Development Kit. .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -27,7 +27,7 @@ printers and plotters. .SH SEE ALSO cupsprofile(1), ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual. .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: commandtopclx.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cups-lpd.man.in b/man/cups-lpd.man.in index 59d72453c..e26556ca9 100644 --- a/man/cups-lpd.man.in +++ b/man/cups-lpd.man.in @@ -118,7 +118,7 @@ clients may be unreliable. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cups-lpd.man.in 7835 2008-08-09 06:37:04Z mike $". .\" diff --git a/man/cups-polld.man b/man/cups-polld.man index 17a9719c6..067380a47 100644 --- a/man/cups-polld.man +++ b/man/cups-polld.man @@ -3,7 +3,7 @@ .\" .\" cups-polld man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -32,7 +32,7 @@ This program is started automatically by \fIcupsd\fR for every .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cups-polld.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cups-snmp.conf.man b/man/cups-snmp.conf.man index bb8e4b8b5..3a77e42e5 100644 --- a/man/cups-snmp.conf.man +++ b/man/cups-snmp.conf.man @@ -3,7 +3,7 @@ .\" .\" snmp.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -67,7 +67,7 @@ will scan the network for printers. .SH SEE ALSO http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cups-snmp.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupsaddsmb.man.in b/man/cupsaddsmb.man.in index 00e05ebfa..c825b98b8 100644 --- a/man/cupsaddsmb.man.in +++ b/man/cupsaddsmb.man.in @@ -3,7 +3,7 @@ .\" .\" cupsaddsmb man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -208,7 +208,7 @@ http://localhost:631/help http://www.cups.org/windows/ .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cupsaddsmb.man.in 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupsctl.man b/man/cupsctl.man index dc4929d7b..6f6d1ce7e 100644 --- a/man/cupsctl.man +++ b/man/cupsctl.man @@ -3,7 +3,7 @@ .\" .\" cupsctl man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 2007 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -99,7 +99,7 @@ Enable printing using the file: pseudo-device: .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cupsctl.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupsd.man.in b/man/cupsd.man.in index e754a64f5..c87287a12 100644 --- a/man/cupsd.man.in +++ b/man/cupsd.man.in @@ -3,7 +3,7 @@ .\" .\" cupsd man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -67,7 +67,7 @@ operations. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cupsd.man.in 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/cupstestdsc.man b/man/cupstestdsc.man index ce1c3a4d0..4de16f6fa 100644 --- a/man/cupstestdsc.man +++ b/man/cupstestdsc.man @@ -3,7 +3,7 @@ .\" .\" cupstestdsc man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -44,7 +44,7 @@ http://localhost:631/help Adobe PostScript Language Document Structuring Conventions Specification, Version 3.0. .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: cupstestdsc.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/filter.man b/man/filter.man index 9abb21dc0..77a280c9a 100644 --- a/man/filter.man +++ b/man/filter.man @@ -233,7 +233,7 @@ only filter. Typically the interface script will be provided via the .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: filter.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpadmin.man b/man/lpadmin.man index 91658aafb..d3c3cb31f 100644 --- a/man/lpadmin.man +++ b/man/lpadmin.man @@ -12,7 +12,7 @@ .\" which should have been included with this file. If this file is .\" file is missing or damaged, see the license at "http://www.cups.org/". .\" -.TH lpadmin 8 "Common UNIX Printing System" "2 January 2008" "Apple Inc." +.TH lpadmin 8 "Common UNIX Printing System" "3 November 2008" "Apple Inc." .SH NAME lpadmin \- configure cups printers and classes .SH SYNOPSIS @@ -173,7 +173,7 @@ Provides a textual description of the printer. -E .br Enables the printer and accepts jobs; this is the same as running the -\fIaccept(8)\fR and \fIcupsenable(8)\fR programs on the printer. +\fIcupsaccept(8)\fR and \fIcupsenable(8)\fR programs on the printer. .TP 5 -L "location" .br @@ -196,7 +196,7 @@ requires the root user to execute this command. The CUPS version of \fIlpadmin\fR does not support all of the System V or Solaris printing system configuration options. .SH SEE ALSO -\fIaccept(8)\fR, \fIcupsenable(8)\fR, \fIlpinfo(8)\fR, +\fIcupsaccept(8)\fR, \fIcupsenable(8)\fR, \fIlpinfo(8)\fR, \fIlpoptions(1)\fR, .br http://localhost:631/help diff --git a/man/lpc.man b/man/lpc.man index caa9896af..9196190a7 100644 --- a/man/lpc.man +++ b/man/lpc.man @@ -3,7 +3,7 @@ .\" .\" lpc man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -12,7 +12,7 @@ .\" which should have been included with this file. If this file is .\" file is missing or damaged, see the license at "http://www.cups.org/". .\" -.TH lpc 8 "Common UNIX Printing System" "12 February 2006" "Apple Inc." +.TH lpc 8 "Common UNIX Printing System" "3 November 2008" "Apple Inc." .SH NAME lpc \- line printer control program .SH SYNOPSIS @@ -60,12 +60,12 @@ CUPS-compatible client with that functionality. The CUPS version of \fIlpc\fR does not implement all of the standard Berkeley or LPRng commands. .SH SEE ALSO -\fIaccept(8)\fR, \fIcancel(1)\fR, \fIcupsenable(8)\fR, +\fIcancel(1)\fR, \fIcupsaccept(8)\fR, \fIcupsenable(8)\fR, \fIlp(1)\fR, \fIlpr(1)\fR, \fIlprm(1)\fR, \fIlpstat(1)\fR, .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: lpc.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lpmove.man b/man/lpmove.man index 5bd406ffb..480c81998 100644 --- a/man/lpmove.man +++ b/man/lpmove.man @@ -3,7 +3,7 @@ .\" .\" lpmove man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -60,7 +60,7 @@ Specifies an alternate server. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: lpmove.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/lprm.man b/man/lprm.man index 6f24d09a2..c5441d44c 100644 --- a/man/lprm.man +++ b/man/lprm.man @@ -3,7 +3,7 @@ .\" .\" lprm man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -59,7 +59,7 @@ Berkeley \fIlprm\fR command. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: lprm.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/mailto.conf.man b/man/mailto.conf.man index c6d9d3932..79b2c4b8a 100644 --- a/man/mailto.conf.man +++ b/man/mailto.conf.man @@ -3,7 +3,7 @@ .\" .\" mailto.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -54,7 +54,7 @@ Specifies a prefix string for the subject line of an email notification. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: mailto.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/mime.convs.man b/man/mime.convs.man index 9c91a65c7..417b3ba74 100644 --- a/man/mime.convs.man +++ b/man/mime.convs.man @@ -3,7 +3,7 @@ .\" .\" mime.convs man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -40,7 +40,7 @@ application/postscript application/vnd.cups-raster 50 pstoraster .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: mime.convs.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/printers.conf.man b/man/printers.conf.man index 7abd1cd46..04717eb87 100644 --- a/man/printers.conf.man +++ b/man/printers.conf.man @@ -3,7 +3,7 @@ .\" .\" printers.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 1997-2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -116,7 +116,7 @@ Specifies the date/time associated with the state. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: printers.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/man/subscriptions.conf.man b/man/subscriptions.conf.man index d51763d22..e473ad078 100644 --- a/man/subscriptions.conf.man +++ b/man/subscriptions.conf.man @@ -3,7 +3,7 @@ .\" .\" subscriptions.conf man page for the Common UNIX Printing System (CUPS). .\" -.\" Copyright 2007 by Apple Inc. +.\" Copyright 2007-2008 by Apple Inc. .\" Copyright 2006 by Easy Software Products. .\" .\" These coded instructions, statements, and computer programs are the @@ -83,7 +83,7 @@ is typically the "from" address in mailto: notifications. .br http://localhost:631/help .SH COPYRIGHT -Copyright 2007 by Apple Inc. +Copyright 2007-2008 by Apple Inc. .\" .\" End of "$Id: subscriptions.conf.man 7600 2008-05-20 21:06:23Z mike $". .\" diff --git a/packaging/cups.spec.in b/packaging/cups.spec.in index cbec673a4..6e07e4f83 100644 --- a/packaging/cups.spec.in +++ b/packaging/cups.spec.in @@ -264,7 +264,7 @@ rm -rf $RPM_BUILD_ROOT /usr/share/doc/cups/help/whatsnew.html %dir /usr/share/doc/cups/images /usr/share/doc/cups/images/* -/usr/share/locale/* +#/usr/share/locale/* %dir /usr/share/man/man1 /usr/share/man/man1/cancel.1.gz @@ -317,6 +317,8 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) +%dir /usr/share/cups/examples +/usr/share/cups/examples/* %dir /usr/share/man/man1 /usr/share/man/man1/cups-config.1.gz /usr/share/man/man1/ppd*.1.gz @@ -337,6 +339,9 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/share/doc/cups/help /usr/share/doc/cups/help/api*.html +/usr/share/doc/cups/help/postscript-driver.html +/usr/share/doc/cups/help/ppd-compiler.html +/usr/share/doc/cups/help/raster-driver.html /usr/share/doc/cups/help/spec*.html %files libs diff --git a/ppdc/Dependencies b/ppdc/Dependencies index 79160528d..1e53cc2a4 100644 --- a/ppdc/Dependencies +++ b/ppdc/Dependencies @@ -66,9 +66,11 @@ ppdhtml.o: ../cups/language.h ../cups/array.h ppdi.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h ppdi.o: ../cups/versioning.h ../cups/i18n.h ../cups/transcode.h ppdi.o: ../cups/language.h ../cups/array.h -ppdmerge.o: ../cups/cups.h ../cups/array.h ../cups/versioning.h -ppdmerge.o: ../cups/string.h ../config.h ../cups/i18n.h ../cups/transcode.h -ppdmerge.o: ../cups/language.h ../cups/array.h +ppdmerge.o: ../cups/ppd-private.h ../cups/cups.h ../cups/ipp.h ../cups/http.h +ppdmerge.o: ../cups/versioning.h ../cups/string.h ../cups/ppd.h +ppdmerge.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/cups.h +ppdmerge.o: ../cups/array.h ../cups/string.h ../config.h ../cups/i18n.h +ppdmerge.o: ../cups/transcode.h ppdpo.o: ppdc.h ../cups/string.h ../config.h ../cups/file.h ppdpo.o: ../cups/versioning.h ../cups/i18n.h ../cups/transcode.h ppdpo.o: ../cups/language.h ../cups/array.h diff --git a/ppdc/Makefile b/ppdc/Makefile index 771d23621..598b9112c 100644 --- a/ppdc/Makefile +++ b/ppdc/Makefile @@ -162,7 +162,7 @@ install-headers: # Install libraries... # -install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64) +install-libs: $(INSTALLSTATIC) echo Installing libraries in $(LIBDIR)... $(INSTALL_DIR) -m 755 $(LIBDIR) $(INSTALL_LIB) $(LIBCUPSPPDC) $(LIBDIR) diff --git a/ppdc/ppdc-catalog.cxx b/ppdc/ppdc-catalog.cxx index da06bb36d..e67754a5b 100644 --- a/ppdc/ppdc-catalog.cxx +++ b/ppdc/ppdc-catalog.cxx @@ -14,6 +14,16 @@ // // Contents: // +// ppdcCatalog::ppdcCatalog() - Create a shared message catalog. +// ppdcCatalog::~ppdcCatalog() - Destroy a shared message catalog. +// ppdcCatalog::add_message() - Add a new message. +// ppdcCatalog::find_message() - Find a message in a catalog... +// ppdcCatalog::load_messages() - Load messages from a .po file. +// ppdcCatalog::save_messages() - Save the messages to a .po file. +// get_utf8() - Get a UTF-8 character. +// get_utf16() - Get a UTF-16 character... +// put_utf8() - Add a UTF-8 character to a string. +// put_utf16() - Write a UTF-16 character to a file. // // @@ -140,7 +150,7 @@ ppdcCatalog::add_message( string = text; } - messages->add(new ppdcMessage(id, text)); + messages->add(new ppdcMessage(id, string)); } @@ -276,6 +286,7 @@ ppdcCatalog::load_messages( { // Add string... add_message(id, str); + id[0] = '\0'; } } } diff --git a/ppdc/sample.drv b/ppdc/sample.drv index cb9e3a3a6..195466e41 100644 --- a/ppdc/sample.drv +++ b/ppdc/sample.drv @@ -22,26 +22,26 @@ // Localizations are provided for all of the base languages supported by // CUPS... -#po da "" -#po de "" -#po es "" -#po et "" -#po fi "" -#po fr "" -#po he "" -#po id "" -#po it "" -#po ja "" -#po ko "" -#po nl "" -#po no "" -#po pl "" -#po pt "" -#po pt_BR "" -#po ru "" -#po sv "" -#po zh "" -#po zh_TW "" +//#po da "" +//#po de "" +//#po es "" +//#po et "" +//#po fi "" +//#po fr "" +//#po he "" +//#po id "" +//#po it "" +//#po ja "" +//#po ko "" +//#po nl "" +//#po no "" +//#po pl "" +//#po pt "" +//#po pt_BR "" +//#po ru "" +//#po sv "" +//#po zh "" +//#po zh_TW "" // MediaSize sizes used by label drivers... #media "w81h252/Address - 1 1/8 x 3 1/2\"" 81 252 diff --git a/scheduler/Dependencies b/scheduler/Dependencies index 064c1ee8c..ec69eb867 100644 --- a/scheduler/Dependencies +++ b/scheduler/Dependencies @@ -243,23 +243,3 @@ cups-driverd.o: ../cups/file.h ../cups/language.h ../cups/file.h cups-driverd.o: ../cups/string.h ../config.h ../cups/dir.h cups-driverd.o: ../cups/transcode.h ../cups/ppd-private.h ../cups/cups.h cups-driverd.o: ../ppdc/ppdc.h -# DO NOT DELETE - -filter.32.o: filter.c ../cups/debug.h ../cups/string.h ../config.h mime.h ../cups/array.h -filter.32.o: filter.c ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h -mime.32.o: mime.c ../cups/debug.h ../cups/dir.h ../cups/versioning.h ../cups/string.h -mime.32.o: mime.c ../config.h mime.h ../cups/array.h ../cups/ipp.h ../cups/http.h -mime.32.o: mime.c ../cups/file.h -type.32.o: type.c ../cups/string.h ../config.h mime.h ../cups/array.h -type.32.o: type.c ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h -type.32.o: type.c ../cups/debug.h -# DO NOT DELETE - -filter.64.o: filter.c ../cups/debug.h ../cups/string.h ../config.h mime.h ../cups/array.h -filter.64.o: filter.c ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h -mime.64.o: mime.c ../cups/debug.h ../cups/dir.h ../cups/versioning.h ../cups/string.h -mime.64.o: mime.c ../config.h mime.h ../cups/array.h ../cups/ipp.h ../cups/http.h -mime.64.o: mime.c ../cups/file.h -type.64.o: type.c ../cups/string.h ../config.h mime.h ../cups/array.h -type.64.o: type.c ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/file.h -type.64.o: type.c ../cups/debug.h diff --git a/scheduler/Makefile b/scheduler/Makefile index 32918149e..c8846001f 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -44,13 +44,9 @@ LIBOBJS = \ filter.o \ mime.o \ type.o -LIB32OBJS = $(LIBOBJS:.o=.32.o) -LIB64OBJS = $(LIBOBJS:.o=.64.o) COBJS = \ $(CUPSDOBJS) \ $(LIBOBJS) \ - $(LIB32OBJS) \ - $(LIB64OBJS) \ cupsfilter.o \ cups-deviced.o \ cups-lpd.o \ @@ -68,8 +64,6 @@ OBJS = \ $(CXXOBJS) LIBTARGETS = \ $(LIBCUPSMIME) \ - $(LIB32CUPSMIME) \ - $(LIB64CUPSMIME) \ libcupsmime.a UNITTARGETS = \ @@ -118,7 +112,6 @@ clean: $(RM) $(OBJS) $(RM) $(TARGETS) $(UNITTARGETS) convert $(RM) libcupsmime.so libcupsmime.sl libcupsmime.dylib - $(RM) -r 32bit 64bit # @@ -126,17 +119,8 @@ clean: # depend: - touch Dependencies.tmp Dependencies.tmplib - makedepend -Y -I.. -fDependencies.tmp $(COBJS:.o=.c) \ + makedepend -Y -I.. -fDependencies $(COBJS:.o=.c) \ $(CXXOBJS:.o=.cxx) >/dev/null 2>&1 - makedepend -Y -I.. -fDependencies.tmplib $(LIBOBJS:.o=.c) >/dev/null 2>&1 - $(RM) Dependencies - cp Dependencies.tmp Dependencies - sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' \ - Dependencies.tmplib >>Dependencies - sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' \ - Dependencies.tmplib >>Dependencies - $(RM) Dependencies.tmp Dependencies.tmplib # @@ -230,7 +214,7 @@ install-headers: # Install libraries... # -install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64) +install-libs: $(INSTALLSTATIC) echo Installing libraries in $(LIBDIR)... $(INSTALL_DIR) -m 755 $(LIBDIR) $(INSTALL_LIB) $(LIBCUPSMIME) $(LIBDIR) @@ -252,24 +236,12 @@ installstatic: $(INSTALL_LIB) libcupsmime.a $(LIBDIR) $(RANLIB) $(LIBDIR)/libcupsmime.a -install32bit: - echo Installing libraries in $(LIB32DIR)... - $(INSTALL_DIR) -m 755 $(LIB32DIR) - $(INSTALL_LIB) 32bit/libcupsmime.so.1 $(LIB32DIR)/libcupsmime.so.1 - $(LN) libcupsmime.so.1 $(LIB32DIR)/libcupsmime.so - -install64bit: - echo Installing libraries in $(LIB64DIR)... - $(INSTALL_DIR) -m 755 $(LIB64DIR) - $(INSTALL_LIB) 64bit/libcupsmime.so.1 $(LIB64DIR)/libcupsmime.so.1 - $(LN) libcupsmime.so.1 $(LIB64DIR)/libcupsmime.so - # # Uninstall the scheduler... # -uninstall: $(UNINSTALL32) $(UNINSTALL64) +uninstall: $(RM) $(SBINDIR)/cupsd $(RM) $(SBINDIR)/cupsfilter $(RM) $(SERVERBIN)/daemon/cups-deviced @@ -302,16 +274,6 @@ uninstall: $(UNINSTALL32) $(UNINSTALL64) $(RM) $(INCLUDEDIR)/cups/mime.h -$(RMDIR) $(INCLUDEDIR)/cups -uninstall32bit: - $(RM) $(LIB32DIR)/libcupsmime.so - $(RM) $(LIB32DIR)/libcupsmime.so.1 - -$(RMDIR) $(LIB32DIR) - -uninstall64bit: - $(RM) $(LIB64DIR)/libcupsmime.so - $(RM) $(LIB64DIR)/libcupsmime.so.1 - -$(RMDIR) $(LIB64DIR) - # # Automatic API help files... @@ -413,30 +375,6 @@ libcupsmime.so.1 libcupsmime.sl.1: $(LIBOBJS) # -# 32bit/libcupsmime.so.1 -# - -32bit/libcupsmime.so.1: $(LIB32OBJS) - echo Linking 32-bit $@... - -mkdir 32bit - $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(LIB32OBJS) $(LIBS) - $(RM) 32bit/libcupsmime.so - $(LN) libcupsmime.so.1 32bit/libcupsmime.so - - -# -# 64bit/libcupsmime.so.1 -# - -64bit/libcupsmime.so.1: $(LIB64OBJS) - echo Linking 64-bit $@... - -mkdir 64bit - $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(LIB64OBJS) $(LIBS) - $(RM) 64bit/libcupsmime.so - $(LN) libcupsmime.so.1 64bit/libcupsmime.so - - -# # libcupsmime.1.dylib # diff --git a/scheduler/client.c b/scheduler/client.c index 4f776b48c..d50e6e387 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -966,7 +966,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ if (strcmp(con->uri, "*")) { - char method[HTTP_MAX_URI], /* Method/scheme */ + char scheme[HTTP_MAX_URI], /* Method/scheme */ userpass[HTTP_MAX_URI], /* Username:password */ hostname[HTTP_MAX_URI], /* Hostname */ resource[HTTP_MAX_URI]; /* Resource path */ @@ -978,7 +978,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ */ httpSeparateURI(HTTP_URI_CODING_MOST, con->uri, - method, sizeof(method), + scheme, sizeof(scheme), userpass, sizeof(userpass), hostname, sizeof(hostname), &port, resource, sizeof(resource)); @@ -988,10 +988,10 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ * address... */ - if (strcmp(method, "file") && + if (strcmp(scheme, "file") && strcasecmp(hostname, ServerName) && strcasecmp(hostname, "localhost") && - !isdigit(hostname[0])) + !isdigit(hostname[0]) && hostname[0] != '[') { /* * Nope, we don't do proxies... @@ -1077,6 +1077,15 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ break; default : + if (!data_ready(con) && recv(con->http.fd, buf, 1, MSG_PEEK) < 1) + { + /* + * Connection closed... + */ + + cupsdCloseClient(con); + return; + } break; /* Anti-compiler-warning-code */ } @@ -1144,6 +1153,29 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ return; } } + else if (httpAddrLocalhost(con->http.hostaddr) && + strcasecmp(con->http.fields[HTTP_FIELD_HOST], "localhost") && + strncasecmp(con->http.fields[HTTP_FIELD_HOST], "localhost:", 10) && + strcmp(con->http.fields[HTTP_FIELD_HOST], "127.0.0.1") && + strncmp(con->http.fields[HTTP_FIELD_HOST], "127.0.0.1:", 10) && + strcmp(con->http.fields[HTTP_FIELD_HOST], "[::1]") && + strncmp(con->http.fields[HTTP_FIELD_HOST], "[::1]:", 6)) + { + /* + * Access to localhost must use "localhost" or the corresponding IPv4 + * or IPv6 values in the Host: field. + */ + + cupsdLogMessage(CUPSD_LOG_WARN, + "Request from \"%s\" using invalid Host: field \"%s\"", + con->http.hostname, con->http.fields[HTTP_FIELD_HOST]); + + if (!cupsdSendError(con, HTTP_BAD_REQUEST, CUPSD_AUTH_NONE)) + { + cupsdCloseClient(con); + return; + } + } else if (con->operation == HTTP_OPTIONS) { /* @@ -2499,7 +2531,7 @@ cupsdSendHeader( return (0); } if (code == HTTP_METHOD_NOT_ALLOWED) - if (httpPrintf(HTTP(con), "Allow: GET, HEAD, OPTIONS, POST\r\n") < 0) + if (httpPrintf(HTTP(con), "Allow: GET, HEAD, OPTIONS, POST, PUT\r\n") < 0) return (0); if (code == HTTP_UNAUTHORIZED) @@ -4443,7 +4475,9 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */ ipp_attribute_t *attr; /* attributes-natural-language attribute */ #ifdef HAVE_GSSAPI krb5_ccache ccache = NULL; /* Kerberos credentials */ +# if defined(HAVE_KRB5_CC_NEW_UNIQUE) || defined(HAVE_HEIMDAL) char krb5ccname[1024]; /* KRB5CCNAME environment variable */ +# endif /* HAVE_KRB5_CC_NEW_UNIQUE || HAVE_HEIMDAL */ #endif /* HAVE_GSSAPI */ diff --git a/scheduler/cupsfilter.c b/scheduler/cupsfilter.c index 6974e47c6..a4bea217b 100644 --- a/scheduler/cupsfilter.c +++ b/scheduler/cupsfilter.c @@ -801,9 +801,10 @@ exec_filters(cups_array_t *filters, /* I - Array of filters to run */ { int i; /* Looping var */ const char *argv[8], /* Command-line arguments */ - *envp[11], /* Environment variables */ + *envp[12], /* Environment variables */ *temp; /* Temporary string */ char *optstr, /* Filter options */ + content_type[1024], /* CONTENT_TYPE */ cups_datadir[1024], /* CUPS_DATADIR */ cups_fontpath[1024], /* CUPS_FONTPATH */ cups_serverbin[1024], /* CUPS_SERVERBIN */ @@ -832,6 +833,9 @@ exec_filters(cups_array_t *filters, /* I - Array of filters to run */ optstr = escape_options(num_options, options); + filter = cupsArrayFirst(filters); + snprintf(content_type, sizeof(content_type), "CONTENT_TYPE=%s/%s", + filter->src->super, filter->src->type); snprintf(cups_datadir, sizeof(cups_datadir), "CUPS_DATADIR=%s", DataDir); snprintf(cups_fontpath, sizeof(cups_fontpath), "CUPS_FONTPATH=%s", FontPath); snprintf(cups_serverbin, sizeof(cups_serverbin), "CUPS_SERVERBIN=%s", @@ -876,16 +880,17 @@ exec_filters(cups_array_t *filters, /* I - Array of filters to run */ argv[4] = "1"; envp[0] = "<CFProcessPath>"; - envp[1] = cups_datadir; - envp[2] = cups_fontpath; - envp[3] = cups_serverbin; - envp[4] = cups_serverroot; - envp[5] = lang; - envp[6] = path; - envp[7] = ppd; - envp[8] = rip_cache; - envp[9] = userenv; - envp[10] = NULL; + envp[1] = content_type; + envp[2] = cups_datadir; + envp[3] = cups_fontpath; + envp[4] = cups_serverbin; + envp[5] = cups_serverroot; + envp[6] = lang; + envp[7] = path; + envp[8] = ppd; + envp[9] = rip_cache; + envp[10] = userenv; + envp[11] = NULL; for (i = 0; argv[i]; i ++) fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]); diff --git a/scheduler/job.c b/scheduler/job.c index 3076a2930..adb708455 100644 --- a/scheduler/job.c +++ b/scheduler/job.c @@ -216,6 +216,16 @@ cupsdCancelJob(cupsd_job_t *job, /* I - Job to cancel */ cupsArrayRemove(ActiveJobs, job); cupsArrayRemove(PrintingJobs, job); +#ifdef __APPLE__ + /* + * If we are going to sleep and the PrintingJobs count is now 0, allow the + * sleep to happen immediately... + */ + + if (Sleeping && cupsArrayCount(PrintingJobs) == 0) + cupsdAllowSleep(); +#endif /* __APPLE__ */ + /* * Remove any authentication data... */ @@ -478,13 +488,11 @@ cupsdCheckJobs(void) !printer->job)) /* and not printing */ { /* - * Clear any message and reasons for the queue... + * Clear any message for the queue... */ printer->state_message[0] = '\0'; - cupsdSetPrinterReasons(printer, "none"); - /* * Start the job... */ diff --git a/scheduler/main.c b/scheduler/main.c index 41d6d1977..6f9902441 100644 --- a/scheduler/main.c +++ b/scheduler/main.c @@ -26,12 +26,12 @@ * launchd_checkout() - Check-out with launchd. * parent_handler() - Catch USR1/CHLD signals... * process_children() - Process all dead children... + * select_timeout() - Calculate the select timeout value. * sigchld_handler() - Handle 'child' signals from old processes. * sighup_handler() - Handle 'hangup' signals to reconfigure the * scheduler. * sigterm_handler() - Handle 'terminate' signals that stop the * scheduler. - * select_timeout() - Calculate the select timeout value. * usage() - Show scheduler usage. */ @@ -873,6 +873,20 @@ main(int argc, /* I - Number of command-line args */ if (DirtyCleanTime && current_time >= DirtyCleanTime) cupsdCleanDirty(); +#ifdef __APPLE__ + /* + * If we are going to sleep and still have pending jobs, stop them after + * a period of time... + */ + + if (SleepJobs > 0 && current_time >= SleepJobs && + cupsArrayCount(PrintingJobs) > 0) + { + SleepJobs = 0; + cupsdStopAllJobs(0); + } +#endif /* __APPLE__ */ + #ifndef __APPLE__ /* * Update the network interfaces once a minute... @@ -1756,66 +1770,6 @@ process_children(void) /* - * 'sigchld_handler()' - Handle 'child' signals from old processes. - */ - -static void -sigchld_handler(int sig) /* I - Signal number */ -{ - (void)sig; - - /* - * Flag that we have dead children... - */ - - dead_children = 1; - - /* - * Reset the signal handler as needed... - */ - -#if !defined(HAVE_SIGSET) && !defined(HAVE_SIGACTION) - signal(SIGCLD, sigchld_handler); -#endif /* !HAVE_SIGSET && !HAVE_SIGACTION */ -} - - -/* - * 'sighup_handler()' - Handle 'hangup' signals to reconfigure the scheduler. - */ - -static void -sighup_handler(int sig) /* I - Signal number */ -{ - (void)sig; - - NeedReload = RELOAD_ALL; - ReloadTime = time(NULL); - -#if !defined(HAVE_SIGSET) && !defined(HAVE_SIGACTION) - signal(SIGHUP, sighup_handler); -#endif /* !HAVE_SIGSET && !HAVE_SIGACTION */ -} - - -/* - * 'sigterm_handler()' - Handle 'terminate' signals that stop the scheduler. - */ - -static void -sigterm_handler(int sig) /* I - Signal number */ -{ - (void)sig; /* remove compiler warnings... */ - - /* - * Flag that we should stop and return... - */ - - stop_scheduler = 1; -} - - -/* * 'select_timeout()' - Calculate the select timeout value. * */ @@ -1860,6 +1814,18 @@ select_timeout(int fds) /* I - Number of descriptors returned */ timeout = now + 86400; /* 86400 == 1 day */ why = "do nothing"; +#ifdef __APPLE__ + /* + * When going to sleep, wake up to cancel jobs that don't complete in time. + */ + + if (SleepJobs > 0 && SleepJobs < timeout) + { + timeout = SleepJobs; + why = "cancel jobs before sleeping"; + } +#endif /* __APPLE__ */ + /* * Check whether we are accepting new connections... */ @@ -2016,6 +1982,66 @@ select_timeout(int fds) /* I - Number of descriptors returned */ /* + * 'sigchld_handler()' - Handle 'child' signals from old processes. + */ + +static void +sigchld_handler(int sig) /* I - Signal number */ +{ + (void)sig; + + /* + * Flag that we have dead children... + */ + + dead_children = 1; + + /* + * Reset the signal handler as needed... + */ + +#if !defined(HAVE_SIGSET) && !defined(HAVE_SIGACTION) + signal(SIGCLD, sigchld_handler); +#endif /* !HAVE_SIGSET && !HAVE_SIGACTION */ +} + + +/* + * 'sighup_handler()' - Handle 'hangup' signals to reconfigure the scheduler. + */ + +static void +sighup_handler(int sig) /* I - Signal number */ +{ + (void)sig; + + NeedReload = RELOAD_ALL; + ReloadTime = time(NULL); + +#if !defined(HAVE_SIGSET) && !defined(HAVE_SIGACTION) + signal(SIGHUP, sighup_handler); +#endif /* !HAVE_SIGSET && !HAVE_SIGACTION */ +} + + +/* + * 'sigterm_handler()' - Handle 'terminate' signals that stop the scheduler. + */ + +static void +sigterm_handler(int sig) /* I - Signal number */ +{ + (void)sig; /* remove compiler warnings... */ + + /* + * Flag that we should stop and return... + */ + + stop_scheduler = 1; +} + + +/* * 'usage()' - Show scheduler usage. */ diff --git a/scheduler/printers.c b/scheduler/printers.c index 077776953..f15cef334 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -1544,7 +1544,8 @@ cupsdSaveAllPrinters(void) cupsFilePrintf(fp, "StateTime %d\n", (int)printer->state_time); for (i = 0; i < printer->num_reasons; i ++) - cupsFilePutConf(fp, "Reason", printer->reasons[i]); + if (strcmp(printer->reasons[i], "connecting-to-device")) + cupsFilePutConf(fp, "Reason", printer->reasons[i]); cupsFilePrintf(fp, "Type %d\n", printer->type); @@ -1934,6 +1935,16 @@ cupsdSetPrinterAttr( /* + * Don't allow empty values... + */ + + if (!*value) + { + cupsdLogMessage(CUPSD_LOG_ERROR, "Ignoring empty \"%s\" attribute", name); + return; + } + + /* * Count the number of values... */ @@ -2576,6 +2587,8 @@ cupsdSetPrinterReasons( p->num_reasons = 0; + cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); + if (PrintcapFormat == PRINTCAP_PLIST) cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP); } @@ -2630,6 +2643,9 @@ cupsdSetPrinterReasons( if (!strcmp(reason, "paused") && p->state == IPP_PRINTER_STOPPED) cupsdSetPrinterState(p, IPP_PRINTER_IDLE, 1); + if (strcmp(reason, "connecting-to-device")) + cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); + if (PrintcapFormat == PRINTCAP_PLIST) cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP); } @@ -2652,6 +2668,9 @@ cupsdSetPrinterReasons( if (!strcmp(reason, "paused") && p->state != IPP_PRINTER_STOPPED) cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 1); + if (strcmp(reason, "connecting-to-device")) + cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); + if (PrintcapFormat == PRINTCAP_PLIST) cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP); } diff --git a/scheduler/printers.h b/scheduler/printers.h index 0effd8bd9..fac12b245 100644 --- a/scheduler/printers.h +++ b/scheduler/printers.h @@ -152,8 +152,6 @@ extern void cupsdFreeQuotas(cupsd_printer_t *p); extern void cupsdLoadAllPrinters(void); extern void cupsdRenamePrinter(cupsd_printer_t *p, const char *name); -extern char *cupsdSanitizeURI(const char *uri, char *buffer, - int buflen); extern void cupsdSaveAllPrinters(void); extern int cupsdSetAuthInfoRequired(cupsd_printer_t *p, const char *values, diff --git a/scheduler/sysman.c b/scheduler/sysman.c index 25ffc6f3f..7084ddfcd 100644 --- a/scheduler/sysman.c +++ b/scheduler/sysman.c @@ -19,6 +19,7 @@ * write. * cupsdSetBusyState() - Let the system know when we are busy * doing something. + * cupsdAllowSleep() - Tell the OS it is now OK to sleep. * cupsdStartSystemMonitor() - Start monitoring for system change. * cupsdStopSystemMonitor() - Stop monitoring for system change. * sysEventThreadEntry() - A thread to receive power and computer @@ -227,6 +228,7 @@ static CFStringRef ComputerNameKey = NULL, /* Netowrk interface key */ NetworkInterfaceKeyIPv6 = NULL; /* Netowrk interface key */ +static cupsd_sysevent_t LastSysEvent; /* Last system event (for delayed sleep) */ /* @@ -245,6 +247,20 @@ static void sysUpdate(void); /* + * 'cupsdAllowSleep()' - Tell the OS it is now OK to sleep. + */ + +void +cupsdAllowSleep(void) +{ + cupsdCleanDirty(); + + IOAllowPowerChange(LastSysEvent.powerKernelPort, + LastSysEvent.powerNotificationID); +} + + +/* * 'cupsdStartSystemMonitor()' - Start monitoring for system change. */ @@ -752,8 +768,6 @@ sysUpdate(void) Sleeping = 1; - cupsdStopAllJobs(0); - for (p = (cupsd_printer_t *)cupsArrayFirst(Printers); p; p = (cupsd_printer_t *)cupsArrayNext(Printers)) @@ -776,8 +790,20 @@ sysUpdate(void) cupsdCleanDirty(); - IOAllowPowerChange(sysevent.powerKernelPort, - sysevent.powerNotificationID); + /* + * If we have no printing jobs, allow the power change immediately. + * Otherwise set the SleepJobs time to 20 seconds in the future when + * we'll take more drastic measures... + */ + + if (cupsArrayCount(PrintingJobs) == 0) + IOAllowPowerChange(sysevent.powerKernelPort, + sysevent.powerNotificationID); + else + { + LastSysEvent = sysevent; + SleepJobs = time(NULL) + 20; + } } if (sysevent.event & SYSEVENT_WOKE) diff --git a/scheduler/sysman.h b/scheduler/sysman.h index 517d143cb..231fc2c54 100644 --- a/scheduler/sysman.h +++ b/scheduler/sysman.h @@ -38,6 +38,9 @@ VAR time_t DirtyCleanTime VALUE(0); VAR int Sleeping VALUE(0); /* Non-zero if machine is entering or * * in a sleep state... */ +VAR time_t SleepJobs VALUE(0); + /* Time when all jobs must be * + * canceled for system sleep. */ #ifdef __APPLE__ VAR int SysEventPipes[2] VALUE2(-1,-1); /* System event notification pipes */ @@ -48,6 +51,7 @@ VAR int SysEventPipes[2] VALUE2(-1,-1); * Prototypes... */ +extern void cupsdAllowSleep(void); extern void cupsdCleanDirty(void); extern void cupsdMarkDirty(int what); extern void cupsdSetBusyState(void); |