]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r7874.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 27 Aug 2008 22:04:19 +0000 (22:04 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 27 Aug 2008 22:04:19 +0000 (22:04 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@924 a1ca3aef-8c08-0410-bb20-df032aa958be

32 files changed:
CHANGES-1.3.txt
Makedefs.in
Makefile
backend/Makefile
backend/socket.c
berkeley/Makefile
cgi-bin/Makefile
conf/Makefile
config-scripts/cups-compiler.m4
cups/Makefile
cups/globals.c
cups/http-addr.c
data/Makefile
doc/Makefile
doc/help/spec-command.html
doc/help/spec-ipp.html
doc/help/spec-postscript.html
driver/Makefile
filter/Makefile
fonts/Makefile
locale/Makefile
man/Makefile
monitor/Makefile
notifier/Makefile
ppdc/Makefile
scheduler/Makefile
scheduler/ipp.c
scripting/php/Makefile
standards/Makefile
systemv/Makefile
templates/Makefile
test/Makefile

index ced5b20d7c2902be332ae9af5a22b03a802954e2..d126cfac9e79edf00fbdac3a4c3cd9d93bcf87f9 100644 (file)
@@ -3,6 +3,12 @@ CHANGES-1.3.txt
 
 CHANGES IN CUPS V1.3.9
 
 
 CHANGES IN CUPS V1.3.9
 
+       - Documentation updates (STR #2904)
+       - The scheduler required Kerberos authentication for
+         all operations on remote Kerberized printers instead
+         of just for the operations that needed it.
+       - The socket backend could wait indefinitely for back-
+         channel data with some devices.
        - PJL panel messages were not reset correctly on older
          printers (STR #2909)
        - cupsfilter used the wrong default path (STR #2908)
        - PJL panel messages were not reset correctly on older
          printers (STR #2909)
        - cupsfilter used the wrong default path (STR #2908)
index b34c7ae0e97231134faf1c0adda6cb8b94a1b0ca..f213a3f38f157aea6e3ab178e9a2fa1c57276fb4 100644 (file)
@@ -152,6 +152,8 @@ PHPDIR              =       @PHPDIR@
 PHPOPTIONS     =       @PHPOPTIONS@ -I../.. `$(PHPCONFIG) --includes`
 SSLFLAGS       =       @SSLFLAGS@
 SSLLIBS                =       @SSLLIBS@
 PHPOPTIONS     =       @PHPOPTIONS@ -I../.. `$(PHPCONFIG) --includes`
 SSLFLAGS       =       @SSLFLAGS@
 SSLLIBS                =       @SSLLIBS@
+UNITTESTS      =       @UNITTESTS@
+
 
 #
 # Separate 32/64-bit library support...
 
 #
 # Separate 32/64-bit library support...
index 9354f05ca43a4982eead7a568b969d559b255dcf..7be3bac5981c26b1d4b033773e5483a75ec646fc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,8 @@ all:
        echo Using ARCHFLAGS="$(ARCHFLAGS)"
        echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
        echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
        echo Using ARCHFLAGS="$(ARCHFLAGS)"
        echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
        echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+       echo Using CC="$(CC)"
+       echo Using CXX="$(CC)"
        echo Using DSOFLAGS="$(DSOFLAGS)"
        echo Using LDFLAGS="$(LDFLAGS)"
        echo Using LIBS="$(LIBS)"
        echo Using DSOFLAGS="$(DSOFLAGS)"
        echo Using LDFLAGS="$(LDFLAGS)"
        echo Using LIBS="$(LIBS)"
@@ -51,6 +53,8 @@ libs:
        echo Using ARCHFLAGS="$(ARCHFLAGS)"
        echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
        echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
        echo Using ARCHFLAGS="$(ARCHFLAGS)"
        echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
        echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+       echo Using CC="$(CC)"
+       echo Using CXX="$(CC)"
        echo Using DSOFLAGS="$(DSOFLAGS)"
        echo Using LDFLAGS="$(LDFLAGS)"
        echo Using LIBS="$(LIBS)"
        echo Using DSOFLAGS="$(DSOFLAGS)"
        echo Using LDFLAGS="$(LDFLAGS)"
        echo Using LIBS="$(LIBS)"
@@ -60,6 +64,25 @@ libs:
        done
 
 
        done
 
 
+#
+# Make unit test targets...
+#
+
+unittests:
+       echo Using ARCHFLAGS="$(ARCHFLAGS)"
+       echo Using ALL_CFLAGS="$(ALL_CFLAGS)"
+       echo Using ALL_CXXFLAGS="$(ALL_CXXFLAGS)"
+       echo Using CC="$(CC)"
+       echo Using CXX="$(CC)"
+       echo Using DSOFLAGS="$(DSOFLAGS)"
+       echo Using LDFLAGS="$(LDFLAGS)"
+       echo Using LIBS="$(LIBS)"
+       for dir in $(DIRS); do\
+               echo Making all in $$dir... ;\
+               (cd $$dir ; $(MAKE) $(MFLAGS) unittests) || exit 1;\
+       done
+
+
 #
 # Remove object and target files...
 #
 #
 # Remove object and target files...
 #
index a2d4b1ed0205690711518c13e78bc67394b278fb..bb9d0f8dc75dcf188415f28ba0e8d05eb84bc093 100644 (file)
@@ -40,6 +40,13 @@ all: $(TARGETS)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all object files...
 #
 #
 # Clean all object files...
 #
index 4e2dac1463304a7d039aaff72d595e2714ec721e..70a0891954918059b1e774de9fdacf1d4a35f593 100644 (file)
@@ -72,7 +72,8 @@ main(int  argc,                               /* I - Number of command-line arguments (6 or 7) */
                sep;                    /* Option separator */
   int          print_fd;               /* Print file */
   int          copies;                 /* Number of copies to print */
                sep;                    /* Option separator */
   int          print_fd;               /* Print file */
   int          copies;                 /* Number of copies to print */
-  time_t       start_time;             /* Time of first connect */
+  time_t       start_time,             /* Time of first connect */
+               wait_time;              /* Time to wait before shutting down socket */
   int          recoverable;            /* Recoverable error shown? */
   int          contimeout;             /* Connection timeout */
   int          waiteof;                /* Wait for end-of-file? */
   int          recoverable;            /* Recoverable error shown? */
   int          contimeout;             /* Connection timeout */
   int          waiteof;                /* Wait for end-of-file? */
@@ -412,10 +413,13 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
   }
 
  /*
   }
 
  /*
-  * Get any pending back-channel data...
+  * Wait up to 5 seconds to get any pending back-channel data...
   */
 
   */
 
-  while (wait_bc(device_fd, 5) > 0);
+  wait_time = time(NULL) + 5;
+  while (wait_time >= time(NULL))
+    if (wait_bc(device_fd, 1) <= 0)
+      break;
 
   if (waiteof)
   {
 
   if (waiteof)
   {
index 7852f245fb82ee3706607172793ce545b92698ec..996858d388fdfa3d108f842d44a072296d34dcf5 100644 (file)
@@ -15,6 +15,7 @@
 
 include ../Makedefs
 
 
 include ../Makedefs
 
+
 TARGETS        =       lpc lpq lpr lprm
 OBJS   =       lpc.o lpq.o lpr.o lprm.o
 
 TARGETS        =       lpc lpq lpr lprm
 OBJS   =       lpc.o lpq.o lpr.o lprm.o
 
@@ -33,6 +34,13 @@ all: $(TARGETS)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all object files...
 #
 #
 # Clean all object files...
 #
index 3ddc6cd650cdf68831a84e7a816e848d94bafaa1..0d538c0d7999a3be89519df18eddb542acfe0854 100644 (file)
@@ -48,14 +48,16 @@ LIBTARGETS =        \
                $(LIBCUPSCGI) \
                $(LIB32CUPSCGI) \
                $(LIB32CUPSCGI) \
                $(LIBCUPSCGI) \
                $(LIB32CUPSCGI) \
                $(LIB32CUPSCGI) \
+               websearch
+
+UNITTARGETS =  \
                testcgi \
                testhi \
                testcgi \
                testhi \
-               websearch
+               testtemplate
 
 TARGETS        =       \
                $(LIBTARGETS) \
 
 TARGETS        =       \
                $(LIBTARGETS) \
-               $(CGIS) \
-               testtemplate
+               $(CGIS)
 
 
 #
 
 
 #
@@ -69,7 +71,14 @@ all: $(TARGETS)
 # Make library targets...
 #
 
 # Make library targets...
 #
 
-libs:          $(LIBTARGETS)
+libs:          $(LIBTARGETS) $(UNITTESTS)
+
+
+#
+# Make unit tests...
+#
+
+unittests:     $(UNITTARGETS)
 
 
 #
 
 
 #
@@ -77,7 +86,7 @@ libs:         $(LIBTARGETS)
 #
 
 clean:
 #
 
 clean:
-       $(RM) $(OBJS) $(TARGETS)
+       $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
        $(RM) libcupscgi.so libcupscgi.sl libcupscgi.dylib
        $(RM) -r 32bit 64bit
 
        $(RM) libcupscgi.so libcupscgi.sl libcupscgi.dylib
        $(RM) -r 32bit 64bit
 
index 8d4ffbf2f273910eb54ccd25771ab16158608621..acd7eacbabd05aa0dd48b402e9a64a12c4daa967 100644 (file)
@@ -37,6 +37,13 @@ all:
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all config and object files...
 #
 #
 # Clean all config and object files...
 #
index 8d30df79c110f762e45be06a390a864cc7035e37..2781e18bab2de1729c94516eff3d25c1d6e01c60 100644 (file)
@@ -22,15 +22,29 @@ AC_SUBST(OPTIM)
 
 AC_ARG_WITH(optim, [  --with-optim="flags"    set optimization flags ])
 AC_ARG_ENABLE(debug, [  --enable-debug          turn on debugging, default=no])
 
 AC_ARG_WITH(optim, [  --with-optim="flags"    set optimization flags ])
 AC_ARG_ENABLE(debug, [  --enable-debug          turn on debugging, default=no])
+AC_ARG_ENABLE(debug_printfs, [  --enable-debug-printfs  turn on debug printfs, default=no])
+AC_ARG_ENABLE(unit_tests, [  --enable-unit-tests     turn on unit tests, default=no])
 
 dnl For debugging, keep symbols, otherwise strip them...
 if test x$enable_debug = xyes; then
        OPTIM="-g"
 
 dnl For debugging, keep symbols, otherwise strip them...
 if test x$enable_debug = xyes; then
        OPTIM="-g"
-       CFLAGS="$CFLAGS -DDEBUG"
 else
        INSTALL_STRIP="-s"
 fi
 
 else
        INSTALL_STRIP="-s"
 fi
 
+dnl Debug printfs can slow things down, so provide a separate option for that
+if test x$enable_debug_printf = xyes; then
+       CFLAGS="$CFLAGS -DDEBUG"
+fi
+
+dnl Unit tests take up time during a compile...
+if test x$enable_unit_tests = xyes; then
+       UNITTESTS="unittests"
+else
+       UNITTESTS=""
+fi
+AC_SUBST(UNITTESTS)
+
 dnl Setup general architecture flags...
 AC_ARG_WITH(archflags, [  --with-archflags="flags"
                           set default architecture flags ])
 dnl Setup general architecture flags...
 AC_ARG_WITH(archflags, [  --with-archflags="flags"
                           set default architecture flags ])
index 584276a16872babff7d60170559af1a19ff10df2..752edd1a9adadb175dec225a346e582ff73248dd 100644 (file)
@@ -115,22 +115,24 @@ LIBTARGETS =      \
                $(LIBCUPS) \
                $(LIB32CUPS) \
                $(LIB64CUPS) \
                $(LIBCUPS) \
                $(LIB32CUPS) \
                $(LIB64CUPS) \
-               libcups.a \
+               libcups.a
+
+UNITTARGETS =  \
+               testadmin \
                testarray \
                testarray \
+               testconflicts \
+               testcups \
                testfile \
                testhttp \
                testi18n \
                testipp \
                testlang \
                testoptions \
                testfile \
                testhttp \
                testi18n \
                testipp \
                testlang \
                testoptions \
-               testppd
+               testppd \
+               testsnmp
 
 TARGETS        =       \
 
 TARGETS        =       \
-               $(LIBTARGETS) \
-               testadmin \
-               testconflicts \
-               testcups \
-               testsnmp
+               $(LIBTARGETS)
 
 
 #
 
 
 #
@@ -147,12 +149,19 @@ all:      $(TARGETS)
 libs:          $(LIBTARGETS)
 
 
 libs:          $(LIBTARGETS)
 
 
+#
+# Make unit tests...
+#
+
+unittests:     $(UNITTARGETS)
+
+
 #
 # Remove object and target files...
 #
 
 clean:
 #
 # Remove object and target files...
 #
 
 clean:
-       $(RM) $(OBJS) $(TARGETS)
+       $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
        $(RM) libcups.so libcups.sl libcups.dylib
        $(RM) -r 32bit 64bit
 
        $(RM) libcups.so libcups.sl libcups.dylib
        $(RM) -r 32bit 64bit
 
index d104f1b50467b947c7c4e1d737da3451fd479ed4..14d5f7842edeaeb147b4a95f2ab8e3771843bd68 100644 (file)
@@ -155,7 +155,7 @@ globals_destructor(void *value)             /* I - Data to free */
     cupsFileClose(cg->stdio_files[i]);
 
   if (cg->last_status_message)
     cupsFileClose(cg->stdio_files[i]);
 
   if (cg->last_status_message)
-    free(cg->last_status_message);
+    _cupsStrFree(cg->last_status_message);
 
   cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings);
 
 
   cupsFreeOptions(cg->cupsd_num_settings, cg->cupsd_settings);
 
index b16961886bdca31295f1dc8e63b8eb82952430d0..0bc71f6fa711f08e172bd68cfd5a0127bef06672 100644 (file)
@@ -249,12 +249,13 @@ httpAddrLookup(
 int                                    /* O - Port number */
 _httpAddrPort(http_addr_t *addr)       /* I - Address */
 {
 int                                    /* O - Port number */
 _httpAddrPort(http_addr_t *addr)       /* I - Address */
 {
+  if (!addr)
+    return (ippPort());
 #ifdef AF_INET6
 #ifdef AF_INET6
-  if (addr->addr.sa_family == AF_INET6)
+  else if (addr->addr.sa_family == AF_INET6)
     return (ntohs(addr->ipv6.sin6_port));
     return (ntohs(addr->ipv6.sin6_port));
-  else
 #endif /* AF_INET6 */
 #endif /* AF_INET6 */
-  if (addr->addr.sa_family == AF_INET)
+  else if (addr->addr.sa_family == AF_INET)
     return (ntohs(addr->ipv4.sin_port));
   else
     return (ippPort());
     return (ntohs(addr->ipv4.sin_port));
   else
     return (ippPort());
index 48dd1db55669e8572c3f53dea0f221ebfee3634f..9e8378b283d3584a9e8b3fcc59bfab484dfddaab 100644 (file)
@@ -99,6 +99,13 @@ all:
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all config and object files...
 #
 #
 # Clean all config and object files...
 #
index 9d24b284481614a3ae5299aa86a1884c48db925b..4c461f75f9c9d4685343ea0f8b5a6d2d22bc912b 100644 (file)
@@ -132,6 +132,13 @@ all:
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Remove all generated files...
 #
 #
 # Remove all generated files...
 #
index 7abb3adea461823e88cf330d1204e05fe9e6d387..3e48f9f188a114c0570f99de1a9ced1bfe4d1200 100644 (file)
   Copyright 1997-2006 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
   Copyright 1997-2006 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
-  property of Easy Software Products and are protected by Federal
-  copyright law.  Distribution and use rights are outlined in the file
-  "LICENSE.txt" which should have been included with this file.  If this
-  file is missing or damaged please contact Easy Software Products
-  at:
-
-      Attn: CUPS Licensing Information
-      Easy Software Products
-      44141 Airport View Drive, Suite 204
-      Hollywood, Maryland 20636 USA
-
-      Voice: (301) 373-9600
-      EMail: cups-info@cups.org
-        WWW: http://www.cups.org
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 -->
 
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
index 63a5fe5a642ed48376695a45d6dce0aecbbb5b4b..74df07290baa423979c3a7af030885f19acb0319 100644 (file)
   Copyright 1997-2007 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
   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
-  copyright law.  Distribution and use rights are outlined in the file
-  "LICENSE.txt" which should have been included with this file.  If this
-  file is missing or damaged please contact Easy Software Products
-  at:
-
-      Attn: CUPS Licensing Information
-      Easy Software Products
-      44141 Airport View Drive, Suite 204
-      Hollywood, Maryland 20636 USA
-
-      Voice: (301) 373-9600
-      EMail: cups-info@cups.org
-        WWW: http://www.cups.org
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 -->
 
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
index 7e9f9a80277e08263dfecdd51b92c183215f1acc..1bb3cd67a98dd906b2cb56c4c056fcf3404bf5c7 100644 (file)
 
   CUPS PostScript file specification for the Common UNIX Printing System (CUPS).
 
 
   CUPS PostScript file specification for the Common UNIX Printing System (CUPS).
 
+  Copyright 2007-2008 by Apple Inc.
   Copyright 2006 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
   Copyright 2006 by Easy Software Products.
 
   These coded instructions, statements, and computer programs are the
-  property of Easy Software Products and are protected by Federal
-  copyright law.  Distribution and use rights are outlined in the file
-  "LICENSE.txt" which should have been included with this file.  If this
-  file is missing or damaged please contact Easy Software Products
-  at:
-
-      Attn: CUPS Licensing Information
-      Easy Software Products
-      44141 Airport View Drive, Suite 204
-      Hollywood, Maryland 20636 USA
-
-      Voice: (301) 373-9600
-      EMail: cups-info@cups.org
-        WWW: http://www.cups.org
+  property of Apple Inc. and are protected by Federal copyright
+  law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+  which should have been included with this file.  If this file is
+  file is missing or damaged, see the license at "http://www.cups.org/".
 -->
 
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
 -->
 
 <h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
@@ -46,16 +37,16 @@ output will work reliably.</p>
 defacto-standard print job file format/language for UNIX-based
 applications, it is slowly being phased out in favor of Adobe's
 Portable Document Format ("PDF") which offers many advantages
 defacto-standard print job file format/language for UNIX-based
 applications, it is slowly being phased out in favor of Adobe's
 Portable Document Format ("PDF") which offers many advantages
-over PostScript. MacOS X uses PDF as the primary print job file
-format, and we expect Linux to soon follow. Both PostScript and
+over PostScript. Mac OS X uses PDF as the primary print job file
+format and Linux is making the transition. Both PostScript and
 PDF are complex formats, and we highly recommend using high-level
 PDF are complex formats, and we highly recommend using high-level
-toolkits whenever possible.</blockquote>
+toolkits whenever possible to create your print jobs.</blockquote>
 
 <h3>Anatomy of a PostScript File</h3>
 
 <p>PostScript files are ASCII text files starting with a header
 line (<tt>%!PS-Adobe-3.0</tt>) followed by a combination of
 
 <h3>Anatomy of a PostScript File</h3>
 
 <p>PostScript files are ASCII text files starting with a header
 line (<tt>%!PS-Adobe-3.0</tt>) followed by a combination of
-comment lines starting with two percent signs (<tt>%%</tt>) and
+comment lines starting with the percent sign (<tt>%</tt>) and
 PostScript code lines. The lines themselves should not exceed 255
 characters to conform to the DSC. The following short PostScript
 file produces a box with a smiley face in it:</p>
 PostScript code lines. The lines themselves should not exceed 255
 characters to conform to the DSC. The following short PostScript
 file produces a box with a smiley face in it:</p>
@@ -66,7 +57,13 @@ file produces a box with a smiley face in it:</p>
 %%Pages: 1
 %%LanguageLevel: 2
 %%EndComments
 %%Pages: 1
 %%LanguageLevel: 2
 %%EndComments
+%%BeginSetup
+% this is where fonts would be embedded
+%%EndSetup
 %%Page: (1) 1
 %%Page: (1) 1
+%%BeginPageSetup
+% this is where page-specific features would be specified
+%%EndPageSetup
 % Draw a black box around the page
 0 setgray
 1 setlinewidth
 % Draw a black box around the page
 0 setgray
 1 setlinewidth
@@ -98,23 +95,52 @@ width="445" height="570" alt="Sample PostScript File Output"></td></tr>
 </table></div>
 
 
 </table></div>
 
 
-<h2>Embedding Printer Options</h2>
+<h2><a name='OPTIONS'>Embedding Printer Options</a></h2>
 
 
+<p>There are two main strategies for embedding printer options in PostScript
+files. The first is to list CUPS options using the <code>%cupsJobTicket</code>
+comment:</p>
 
 
-<h2>Embedding Fonts and Text</h2>
+<pre>
+%!PS-Adobe-3.0
+%cupsJobTicket: media=A4 sides=two-sided-long-edge
+%cupsJobTicket: PrinterOption=foo PrinterOption2=bar
+...
+%%EndComments
+</pre>
+
+<p>CUPS options apply to the entire job. To apply options to individual pages,
+use the <code>%%IncludeFeature</code> comment instead:</p>
+
+<pre>
+%%Page: label 123
+%%BeginPageSetup
+%%IncludeFeature: *PageSize A4
+%%IncludeFeature: *PrinterOption Foo
+%%IncludeFeature: *PrinterOption2 Bar
+%%EndPageSetup
+...
+</pre>
 
 
 
 
-<h2>Embedding Images</h2>
+<h2><a name='FONTS'>Embedding Fonts and Text</a></h2>
 
 
+<p>Always embed the fonts used by your print job, and for best performance
+embed the fonts and character encodings in the setup section of the PostScript
+file. Type 1 and Type 3 fonts are supported by all PostScript printers, while
+Type 42 (TrueType) and CID fonts are supported by most level 2 and all level 3
+PostScript printers. Binary font files should always be converted to the
+corresponding ASCII (hex) encoding to avoid problems when printing over
+interfaces that do not support binary PostScript.</p>
 
 
-<blockquote><b>Note:</b> While some printers support arbitrary
-binary data in PostScript files, we do not recommend this
-practice because it does not work with all printers or
-interfaces. In most cases, the Base-85 encoding and compression
-filters can be used to embed images with very little, if any,
-increase in data size.</blockquote>
 
 
+<h2><a name='IMAGES'>Embedding Images</a></h2>
 
 
+<p>The <code>image</code> operator should be used to embed images in PostScript
+files. Always use ASCII hex or Base-85 encoding for the image data to avoid
+problems when printing over interfaces that do not support binary PostScript.
+In most cases, the Base-85 encoding and compression filters can be used to
+embed images with very little, if any, increase in data size.</p>
 
 </body>
 </html>
 
 </body>
 </html>
index 81d58ff251efe3391284ffa753173abb930c70e6..998501e881fd1f87cd9dba748eff63fbf616965e 100644 (file)
@@ -79,6 +79,13 @@ all:         $(TARGETS)
 libs:          $(LIBTARGETS)
 
 
 libs:          $(LIBTARGETS)
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean everything...
 #
 #
 # Clean everything...
 #
index 3bb3981bb44e2685f98e15f5600d1023e05d775e..ff4e724bbfee0478760f0d104dbca47337a3c57e 100644 (file)
@@ -33,13 +33,14 @@ LIBTARGETS =        \
                $(LIBCUPSIMAGE) \
                libcupsimage.a \
                $(LIB32CUPSIMAGE) \
                $(LIBCUPSIMAGE) \
                libcupsimage.a \
                $(LIB32CUPSIMAGE) \
-               $(LIB64CUPSIMAGE) \
+               $(LIB64CUPSIMAGE)
+UNITTARGETS =  \
+               rasterbench \
+               testimage \
                testraster
 TARGETS        =       \
                $(LIBTARGETS) \
                testraster
 TARGETS        =       \
                $(LIBTARGETS) \
-               $(FILTERS) \
-               rasterbench \
-               testimage
+               $(FILTERS)
 
 HPGLOBJS =     hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
                hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
 
 HPGLOBJS =     hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
                hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
@@ -71,12 +72,19 @@ all:        $(TARGETS)
 libs:          $(LIBTARGETS)
 
 
 libs:          $(LIBTARGETS)
 
 
+#
+# Make unit tests...
+#
+
+unittests:     $(UNITTARGETS)
+
+
 #
 # Clean all object files...
 #
 
 clean:
 #
 # Clean all object files...
 #
 
 clean:
-       $(RM) $(OBJS) $(TARGETS)
+       $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
        $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
        $(RM) -r 32bit 64bit
 
        $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
        $(RM) -r 32bit 64bit
 
index a73e23433dc2b7c02e2e12c1d148bc1012919c12..7018beb45aae42681b23a66740e4a8703c3c8d6b 100644 (file)
@@ -37,6 +37,13 @@ all:
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all config and object files...
 #
 #
 # Clean all config and object files...
 #
index 04656a59c5463dd3c31efaf8f3021a503ef23a46..0baf06cdb281c4928712b6de3f7e223c8ba93282 100644 (file)
@@ -34,6 +34,13 @@ all: $(TARGETS)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all config and object files...
 #
 #
 # Clean all config and object files...
 #
index c89770b08aa8e9c124c3212d2e39b9cc21349cc9..1e2bb0100526956b9531fb1965590bd69cb609a9 100644 (file)
@@ -83,6 +83,13 @@ all: $(MAN1) $(MAN5) $(MAN7) $(MAN8) html
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all config and object files...
 #
 #
 # Clean all config and object files...
 #
index 2083948e439891c7f49ec7f13fa362723950c0f0..4debb6ac01ff5abb647f2fe9331e0653fe3aa0e0 100644 (file)
@@ -36,6 +36,13 @@ all: $(TARGETS)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all object files...
 #
 #
 # Clean all object files...
 #
index 90b51b4d7f2d5bf0bf5259bda26c1d738c476219..42c86ea86c3486926de1010a2ab66b83a3e8f013 100644 (file)
@@ -34,6 +34,13 @@ all: $(TARGETS)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all object files...
 #
 #
 # Clean all object files...
 #
index 34f8a61e084f794e75e10eb8f1543efdaa5ac71d..16c32dd8e666c631f5e1dee4f9cf9152266bd06d 100644 (file)
@@ -54,16 +54,17 @@ OBJS =              \
                testcatalog.o
 LIBTARGETS =   \
                $(LIBCUPSPPDC) \
                testcatalog.o
 LIBTARGETS =   \
                $(LIBCUPSPPDC) \
-               libcupsppdc.a \
-               ppdc-static
+               libcupsppdc.a
+UNITTARGETS =  \
+               ppdc-static \
+               testcatalog
 TARGETS        =       \
                $(LIBTARGETS) \
                ppdc \
                ppdhtml \
                ppdi \
                ppdmerge \
 TARGETS        =       \
                $(LIBTARGETS) \
                ppdc \
                ppdhtml \
                ppdi \
                ppdmerge \
-               ppdpo \
-               testcatalog
+               ppdpo
 
 
 #
 
 
 #
@@ -80,6 +81,13 @@ all:         $(TARGETS)
 libs:          $(LIBTARGETS)
 
 
 libs:          $(LIBTARGETS)
 
 
+#
+# Make unit tests...
+#
+
+unittests:     $(UNITTARGETS)
+
+
 #
 # Clean everything...
 #
 #
 # Clean everything...
 #
@@ -87,7 +95,7 @@ libs:         $(LIBTARGETS)
 clean:
        $(RM) $(OBJS) core
        $(RM) *.bak *.bck core.*
 clean:
        $(RM) $(OBJS) core
        $(RM) *.bak *.bck core.*
-       $(RM) $(TARGETS)
+       $(RM) $(TARGETS) $(UNITTARGETS)
        $(RM) -r ppd
        $(RM) test.drv
        $(RM) libcupsppdc.so libcupsppdc.sl libcupsppdc.dylib
        $(RM) -r ppd
        $(RM) test.drv
        $(RM) libcupsppdc.so libcupsppdc.sl libcupsppdc.dylib
index e580c2ddcea6ee89c52562a2df8e0a7aeda6ba7f..2921faf7f4dd7c1ab1ea045ad2169a6f3e6fdd04 100644 (file)
@@ -101,6 +101,13 @@ all:               $(TARGETS)
 libs:          $(LIBTARGETS)
 
 
 libs:          $(LIBTARGETS)
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all object files...
 #
 #
 # Clean all object files...
 #
index ccd8d851c0006fc665de38a4ec418b6da4cef78e..35a61a696f3a624b1b56c7ee4e7cffc92d3bbec2 100644 (file)
@@ -9811,35 +9811,57 @@ send_http_error(
                  uri ? uri->values[0].string.text : "no URI",
                  con->http.hostname);
 
                  uri ? uri->values[0].string.text : "no URI",
                  con->http.hostname);
 
-  if (status == HTTP_UNAUTHORIZED &&
-      printer && printer->num_auth_info_required > 0 &&
-      !strcmp(printer->auth_info_required[0], "negotiate"))
-    cupsdSendError(con, status, CUPSD_AUTH_NEGOTIATE);
-  else if (printer)
-  {
-    char       resource[HTTP_MAX_URI]; /* Resource portion of URI */
-    cupsd_location_t *auth;            /* Pointer to authentication element */
+  if (printer)
+  {
     int                auth_type;              /* Type of authentication required */
 
 
     int                auth_type;              /* Type of authentication required */
 
 
-    if (printer->type & CUPS_PRINTER_CLASS)
-      snprintf(resource, sizeof(resource), "/classes/%s", printer->name);
-    else
-      snprintf(resource, sizeof(resource), "/printers/%s", printer->name);
-
-    if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
-        auth->type == CUPSD_AUTH_NONE)
-      auth = cupsdFindPolicyOp(printer->op_policy_ptr,
-                               con->request ?
-                                  con->request->request.op.operation_id :
-                                  IPP_PRINT_JOB);
-
-    if (!auth)
-      auth_type = CUPSD_AUTH_NONE;
-    else if (auth->type == CUPSD_AUTH_DEFAULT)
-      auth_type = DefaultAuthType;
+    auth_type = CUPSD_AUTH_NONE;
+
+    if (status == HTTP_UNAUTHORIZED &&
+        printer->num_auth_info_required > 0 &&
+        !strcmp(printer->auth_info_required[0], "negotiate") &&
+       con->request &&
+       (con->request->request.op.operation_id == IPP_PRINT_JOB ||
+        con->request->request.op.operation_id == IPP_CREATE_JOB ||
+        con->request->request.op.operation_id == CUPS_AUTHENTICATE_JOB))
+    {
+     /*
+      * Creating and authenticating jobs requires Kerberos...
+      */
+
+      auth_type = CUPSD_AUTH_NEGOTIATE;
+    }
     else
     else
-      auth_type = auth->type;
+    {
+     /*
+      * Use policy/location-defined authentication requirements...
+      */
+
+      char     resource[HTTP_MAX_URI]; /* Resource portion of URI */
+      cupsd_location_t *auth;          /* Pointer to authentication element */
+
+
+      if (printer->type & CUPS_PRINTER_CLASS)
+       snprintf(resource, sizeof(resource), "/classes/%s", printer->name);
+      else
+       snprintf(resource, sizeof(resource), "/printers/%s", printer->name);
+
+      if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
+         auth->type == CUPSD_AUTH_NONE)
+       auth = cupsdFindPolicyOp(printer->op_policy_ptr,
+                                con->request ?
+                                    con->request->request.op.operation_id :
+                                    IPP_PRINT_JOB);
+
+      if (auth)
+      {
+        if (auth->type == CUPSD_AUTH_DEFAULT)
+         auth_type = DefaultAuthType;
+       else
+         auth_type = auth->type;
+      }
+    }
 
     cupsdSendError(con, status, auth_type);
   }
 
     cupsdSendError(con, status, auth_type);
   }
index 36b5766af450895e14b2274099132d35c7b525d8..19147869823f0f45433e01d5ae0f96a61472d41c 100644 (file)
@@ -52,6 +52,13 @@ all: $(PHPCUPS)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Remove object and target files...
 #
 #
 # Remove object and target files...
 #
index 6e39c798b6528a1ac13303542e86200204928b39..bda305af053cef66351713181c39f037de14b902 100644 (file)
@@ -75,6 +75,13 @@ all: rfctohtml $(RFCS:.txt=.html)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all config and object files...
 #
 #
 # Clean all config and object files...
 #
index 5b906e6c9ee9ffe47de0d15033e0a7baae152960..8d95c1fc16f3de8ec8d250dc95837eafd22c974a 100644 (file)
@@ -36,6 +36,13 @@ all: $(TARGETS)
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all object files...
 #
 #
 # Clean all object files...
 #
index 831c1c96827ab64ce8730b2707dc64377d464de6..34712e5b43752b795dbc348ad98d288cd0d75c57 100644 (file)
@@ -103,6 +103,13 @@ all:
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all config and object files...
 #
 #
 # Clean all config and object files...
 #
index 1698aca3dafa0d602b810e3e0a95700a4d5db32d..f3e0fcf31270944037dd50c876eb10926ea9029f 100644 (file)
@@ -30,6 +30,13 @@ all: ipptest
 libs:
 
 
 libs:
 
 
+#
+# Make unit tests...
+#
+
+unittests:
+
+
 #
 # Clean all object files...
 #
 #
 # Clean all object files...
 #