]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge final 1.4.0 (r8761) changes.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 7 Aug 2009 22:49:21 +0000 (22:49 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 7 Aug 2009 22:49:21 +0000 (22:49 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1629 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES.txt
backend/dnssd.c
backend/ieee1284.c
backend/usb-libusb.c
config-scripts/cups-pdf.m4
filter/bannertops.c

index 19e5d889f7eab2e4bc62bf611ea4f8ef85edc050..ea17aa96c02edc40c2aabec1fb564c97f5ff4040 100644 (file)
@@ -1,10 +1,16 @@
-CHANGES.txt - 2009-07-14
+CHANGES.txt - 2009-08-07
 ------------------------
 
 CHANGES IN CUPS V1.4.0
 
        - Localization updates (STR #3223, STR #3246, STR #3248, STR #3250)
        - Documentation updates (STR #3225, STR #3230, STR #3242, STR #3260)
+       - The --with-pdftops configure option did not accept a full path to the
+         filter (STR #3278)
+       - The banner filter did not position the back side image correctly
+         (STR #3277)
+       - The dnssd backend could crash (STR #3272)
+       - The 1284 device ID sometimes contained trailing garbage (STR #3266)
        - The USB backend returned different URIs for some printers than in
          CUPS 1.3 (STR #3259)
        - The scheduler did not do local job-hold-until processing for remote
index 5cdf160833760a9a6cbf8212af135f1fb7212ac8..50c364c5b3ba7de1672bce396263aa02b442cfc6 100644 (file)
@@ -153,8 +153,8 @@ main(int  argc,                             /* I - Number of command-line args */
   memset(&action, 0, sizeof(action));
 
   sigemptyset(&action.sa_mask);
-  action.sa_handler = SIG_IGN;
-  sigaction(SIGTERM, &action, sigterm_handler);
+  action.sa_handler = sigterm_handler;
+  sigaction(SIGTERM, &action, NULL);
 #else
   signal(SIGTERM, sigterm_handler);
 #endif /* HAVE_SIGSET */
index dfb9c9c70cf1b08740c8693ef7db65f0a1563cbd..46499db45720fae59274afedc4f7dd7192c94ec4 100644 (file)
@@ -196,12 +196,19 @@ backendGetDeviceID(
       * and then limit the length to the size of our buffer...
       */
 
-      if (length > (device_id_size - 2))
+      if (length > device_id_size)
        length = (((unsigned)device_id[1] & 255) << 8) +
                 ((unsigned)device_id[0] & 255);
 
-      if (length > (device_id_size - 2))
-       length = device_id_size - 2;
+      if (length > device_id_size)
+       length = device_id_size;
+
+     /*
+      * The length field counts the number of bytes in the string
+      * including the length field itself (2 bytes).
+      */
+
+      length -= 2;
 
      /*
       * Copy the device ID text to the beginning of the buffer and
index 3cb61e395a1df8ea6809f03991a95ca4e17d5791..d5c6ae5b64b9d8843ce4fcf75825fa3a70099967 100644 (file)
@@ -418,12 +418,14 @@ get_device_id(usb_printer_t *printer,     /* I - Printer */
   * and then limit the length to the size of our buffer...
   */
 
-  if (length > (bufsize - 2))
+  if (length > bufsize)
     length = (((unsigned)buffer[1] & 255) << 8) +
             ((unsigned)buffer[0] & 255);
 
-  if (length > (bufsize - 2))
-    length = bufsize - 2;
+  if (length > bufsize)
+    length = bufsize;
+
+  length -= 2;
 
  /*
   * Copy the device ID text to the beginning of the buffer and
index 5d71f4d3f098c12c2d3b36952f2de0006e38033e..0421aa73228e6a0f08593bc2fc3d94c51aaa9848 100644 (file)
@@ -13,7 +13,7 @@ dnl   which should have been included with this file.  If this file is
 dnl   file is missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
-AC_ARG_WITH(pdftops, [  --with-pdftops          set pdftops filter (gs,pdftops,none), default=pdftops ])
+AC_ARG_WITH(pdftops, [  --with-pdftops          set pdftops filter (gs,/path/to/gs,pdftops,/path/to/pdftops,none), default=pdftops ])
 
 PDFTOPS=""
 CUPS_PDFTOPS=""
@@ -47,6 +47,12 @@ case "x$with_pdftops" in
        fi
        ;;
 
+       x/*/gs) # Use /path/to/gs without any check:
+       CUPS_GHOSTSCRIPT="$with_pdftops"
+       AC_DEFINE(HAVE_GHOSTSCRIPT)
+       PDFTOPS="pdftops"
+       ;;
+
        xpdftops)
        AC_PATH_PROG(CUPS_PDFTOPS, pdftops)
        if test "x$CUPS_PDFTOPS" != x; then
@@ -57,6 +63,20 @@ case "x$with_pdftops" in
                exit 1
        fi
        ;;
+
+       x/*/pdftops) # Use /path/to/pdftops without any check:
+       CUPS_PDFTOPS="$with_pdftops"
+       AC_DEFINE(HAVE_PDFTOPS)
+       PDFTOPS="pdftops"
+       ;;
+
+       xnone) # Make no pdftops filter if with_pdftops=none:
+       ;;
+
+       *) # Invalid with_pdftops value:
+       AC_MSG_ERROR(Invalid with_pdftops value!)
+       exit 1
+       ;;
 esac
 
 AC_DEFINE_UNQUOTED(CUPS_PDFTOPS, "$CUPS_PDFTOPS")
index 4bd8ced9dacf76a74d28d3ec02526d757008708f..e18c07e09c01f1ca5cb46c97a15d4570bfb8a25e 100644 (file)
@@ -593,7 +593,7 @@ write_banner(banner_file_t *banner, /* I - Banner file */
       printf("%.1f %.1f translate\n", PageLeft, PageBottom);
     else
       printf("%.1f %.1f translate\n", PageWidth - PageRight,
-             PageLength - PageRight);
+             PageLength - PageTop);
     puts("0 setgray");
 
     y = info_top;