From: msweet
*% Base JCL key code option
-*OpenUI JCLPasscode/Key Code: PickOne
+*JCLOpenUI JCLPasscode/Key Code: PickOne
*OrderDependency: 10 JCLSetup *JCLPasscode
*DefaultJCLPasscode: None
*JCLPasscode None/No Code: ""
diff --git a/filter/pstops.c b/filter/pstops.c
index 964df18671..0064199da4 100644
--- a/filter/pstops.c
+++ b/filter/pstops.c
@@ -889,7 +889,7 @@ copy_dsc(cups_file_t *fp, /* I - File to read from */
* Finish up the last page(s)...
*/
- if (number && is_not_last_page(number) && cupsArrayLast(doc->pages))
+ if (number && !is_first_page(number) && cupsArrayLast(doc->pages))
{
pageinfo = (pstops_page_t *)cupsArrayLast(doc->pages);
@@ -2785,8 +2785,11 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
tx, ty; /* Translation values for subpage */
float pagew, /* Printable width of page */
pagel; /* Printable height of page */
- int bboxw, /* BoundingBox width */
+ int bboxx, /* BoundingBox X origin */
+ bboxy, /* BoundingBox Y origin */
+ bboxw, /* BoundingBox width */
bboxl; /* BoundingBox height */
+ float margin = 0; /* Current margin for border */
if (doc->number_up > 1)
@@ -2801,17 +2804,22 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
if (doc->fitplot)
{
+ bboxx = bounding_box[0];
+ bboxy = bounding_box[1];
bboxw = bounding_box[2] - bounding_box[0];
bboxl = bounding_box[3] - bounding_box[1];
}
else
{
+ bboxx = 0;
+ bboxy = 0;
bboxw = PageWidth;
bboxl = PageLength;
}
fprintf(stderr, "DEBUG: pagew = %.1f, pagel = %.1f\n", pagew, pagel);
- fprintf(stderr, "DEBUG: bboxw = %d, bboxl = %d\n", bboxw, bboxl);
+ fprintf(stderr, "DEBUG: bboxx = %d, bboxy = %d, bboxw = %d, bboxl = %d\n",
+ bboxx, bboxy, bboxw, bboxl);
fprintf(stderr, "DEBUG: PageLeft = %.1f, PageRight = %.1f\n",
PageLeft, PageRight);
fprintf(stderr, "DEBUG: PageTop = %.1f, PageBottom = %.1f\n",
@@ -3129,8 +3137,7 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
if (doc->page_border && show_border)
{
int rects; /* Number of border rectangles */
- float fscale, /* Scaling value for points */
- margin; /* Current margin for borders */
+ float fscale; /* Scaling value for points */
rects = (doc->page_border & PSTOPS_BORDERDOUBLE) ? 2 : 1;
@@ -3153,10 +3160,10 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
for (; rects > 0; rects --, margin += 2 * fscale)
if (doc->number_up > 1)
doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrs\n",
- margin - 2.25 * fscale,
- margin - 2.25 * fscale,
- bboxw + 4.5 * fscale - 2 * margin,
- bboxl + 4.5 * fscale - 2 * margin);
+ margin,
+ margin,
+ bboxw - 2 * margin,
+ bboxl - 2 * margin);
else
doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrs\n",
PageLeft + margin,
@@ -3174,21 +3181,22 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
if (doc->fitplot)
{
/*
- * Clip the page that follows to the bounding box of the page...
+ * Offset the page by its bounding box...
*/
doc_printf(doc, "%d %d translate\n", -bounding_box[0],
-bounding_box[1]);
- doc_printf(doc, "%d %d %d %d ESPrc\n", bounding_box[0], bounding_box[1],
- bboxw, bboxl);
}
- else if (doc->number_up > 1)
+
+ if (doc->fitplot || doc->number_up > 1)
{
/*
- * Clip the page that follows to the default page size...
+ * Clip the page to the page's bounding box...
*/
- doc_printf(doc, "0 0 %d %d ESPrc\n", bboxw, bboxl);
+ doc_printf(doc, "%.1f %.1f %.1f %.1f ESPrc\n",
+ bboxx + margin, bboxy + margin,
+ bboxw - 2 * margin, bboxl - 2 * margin);
}
}
diff --git a/init/Localizable.strings b/init/Localizable.strings
index d08f919727..e69de29bb2 100644
--- a/init/Localizable.strings
+++ b/init/Localizable.strings
@@ -1,9 +0,0 @@
-
-
-
-
- Starting printing services
- Starting printing services
-
-
-
diff --git a/init/PrintingServices b/init/PrintingServices
index bbe5ac36b2..e69de29bb2 100755
--- a/init/PrintingServices
+++ b/init/PrintingServices
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-##
-# PrintingServices - a.k.a. CUPS
-##
-
-. /etc/rc.common
-
-StartService ()
-{
- if [ "${CUPS:=-AUTOMATIC-}" = "-AUTOMATIC-" ]; then
- ConsoleMessage "Starting printing services"
- /usr/sbin/cupsd
- elif [ "${CUPS:=-AUTOMATIC-}" = "-YES-" ]; then
- ConsoleMessage "Starting printing services"
- /usr/sbin/cupsd
- fi
-}
-
-StopService ()
-{
- # Until cupsd has a pid file...
- pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
- if test "$pid" != ""; then
- ConsoleMessage "Stopping printing services"
- kill "${pid}"
- fi
-}
-
-RestartService ()
-{
- # Until cupsd has a pid file...
- pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
- if test "x$pid" != x; then
- ConsoleMessage "Restarting printing services"
- kill -HUP "${pid}"
- else
- if [ "${CUPS:=-AUTOMATIC-}" = "-AUTOMATIC-" -o "${CUPS:=-AUTOMATIC-}" = "-YES-" ]; then
- ConsoleMessage "Starting printing services"
- /usr/sbin/cupsd
- fi
- fi
-}
-
-RunService "$1"
diff --git a/init/PrintingServices.launchd b/init/PrintingServices.launchd
index be9992a78e..e69de29bb2 100755
--- a/init/PrintingServices.launchd
+++ b/init/PrintingServices.launchd
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-##
-# PrintingServices - a.k.a. CUPS
-##
-
-. /etc/rc.common
-
-StartService ()
-{
- ConsoleMessage "Starting printing services"
- launchctl start org.cups.cupsd
-}
-
-StopService ()
-{
- ConsoleMessage "Stopping printing services"
- launchctl stop org.cups.cupsd
-}
-
-RestartService ()
-{
- ConsoleMessage "Restarting printing services"
- launchctl stop org.cups.cupsd
- launchctl start org.cups.cupsd
-}
-
-RunService "$1"
diff --git a/init/StartupParameters.plist b/init/StartupParameters.plist
index 0633bf88a2..e69de29bb2 100644
--- a/init/StartupParameters.plist
+++ b/init/StartupParameters.plist
@@ -1,7 +0,0 @@
-{
- Description = "Printing Services";
- Provides = ("PrintingServices");
- Requires = ("Resolver");
- Uses = ("Network Time");
- OrderPreference = "Late";
-}
diff --git a/packaging/cups.list.in b/packaging/cups.list.in
index a6205f6a84..8198efa7aa 100644
--- a/packaging/cups.list.in
+++ b/packaging/cups.list.in
@@ -450,38 +450,38 @@ f 0644 root sys $DATADIR/model ppd/*.ppd
d 0755 root sys $DATADIR/templates -
f 0644 root sys $DATADIR/templates templates/*.tmpl
-# Japanese template files
-%subpackage de
-d 0755 root sys $DATADIR/templates/de
-f 0644 root sys $DATADIR/templates/de templates/de/*.tmpl
-%subpackage es
-d 0755 root sys $DATADIR/templates/es
-f 0644 root sys $DATADIR/templates/es templates/es/*.tmpl
-%subpackage et
-d 0755 root sys $DATADIR/templates/et
-f 0644 root sys $DATADIR/templates/et templates/et/*.tmpl
-%subpackage fr
-d 0755 root sys $DATADIR/templates/fr
-f 0644 root sys $DATADIR/templates/fr templates/fr/*.tmpl
-%subpackage he
-d 0755 root sys $DATADIR/templates/he
-f 0644 root sys $DATADIR/templates/he templates/he/*.tmpl
-%subpackage it
-d 0755 root sys $DATADIR/templates/it
-f 0644 root sys $DATADIR/templates/it templates/it/*.tmpl
-%subpackage ja
-d 0755 root sys $DATADIR/templates/ja
-f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
-%subpackage pl
-d 0755 root sys $DATADIR/templates/pl
-f 0644 root sys $DATADIR/templates/pl templates/pl/*.tmpl
-%subpackage sv
-d 0755 root sys $DATADIR/templates/sv
-f 0644 root sys $DATADIR/templates/sv templates/sv/*.tmpl
-%subpackage zh
-d 0755 root sys $DATADIR/templates/zh_TW
-f 0644 root sys $DATADIR/templates/zh_TW templates/zh_TW/*.tmpl
-%subpackage
+## Template files
+#%subpackage de
+#d 0755 root sys $DATADIR/templates/de
+#f 0644 root sys $DATADIR/templates/de templates/de/*.tmpl
+#%subpackage es
+#d 0755 root sys $DATADIR/templates/es
+#f 0644 root sys $DATADIR/templates/es templates/es/*.tmpl
+#%subpackage et
+#d 0755 root sys $DATADIR/templates/et
+#f 0644 root sys $DATADIR/templates/et templates/et/*.tmpl
+#%subpackage fr
+#d 0755 root sys $DATADIR/templates/fr
+#f 0644 root sys $DATADIR/templates/fr templates/fr/*.tmpl
+#%subpackage he
+#d 0755 root sys $DATADIR/templates/he
+#f 0644 root sys $DATADIR/templates/he templates/he/*.tmpl
+#%subpackage it
+#d 0755 root sys $DATADIR/templates/it
+#f 0644 root sys $DATADIR/templates/it templates/it/*.tmpl
+#%subpackage ja
+#d 0755 root sys $DATADIR/templates/ja
+#f 0644 root sys $DATADIR/templates/ja templates/ja/*.tmpl
+#%subpackage pl
+#d 0755 root sys $DATADIR/templates/pl
+#f 0644 root sys $DATADIR/templates/pl templates/pl/*.tmpl
+#%subpackage sv
+#d 0755 root sys $DATADIR/templates/sv
+#f 0644 root sys $DATADIR/templates/sv templates/sv/*.tmpl
+#%subpackage zh
+#d 0755 root sys $DATADIR/templates/zh_TW
+#f 0644 root sys $DATADIR/templates/zh_TW templates/zh_TW/*.tmpl
+#%subpackage
# Config files
d 0755 root sys $SERVERROOT -
@@ -640,12 +640,6 @@ f 0644 root sys $AMANDIR/man$MAN8DIR/cups-lpd.$MAN8EXT man/cups-lpd.$MAN8EXT
# Startup scripts
%system darwin
f 0644 root sys /System/Library/LaunchDaemons/org.cups.cupsd.plist init/org.cups.cupsd.plist
-d 0755 root sys /System/Library/StartupItems/PrintingServices -
-f 0644 root sys /System/Library/StartupItems/PrintingServices/PrintingServices init/PrintingServices.launchd
-f 0644 root sys /System/Library/StartupItems/PrintingServices/StartupParamters.plist init/StartupParameters.plist
-d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources -
-d 0755 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj -
-f 0644 root sys /System/Library/StartupItems/PrintingServices/Resources/English.lproj/Localizable.strings init/Localizable.strings
%preremove <attrs, "port-monitor-supported",
- IPP_TAG_KEYWORD);
+ IPP_TAG_NAME);
for (i = 0; i < supported->num_values; i ++)
if (!strcmp(supported->values[i].string.text,
attr->values[0].string.text))
diff --git a/scheduler/main.c b/scheduler/main.c
index 9cb8439bbe..f3836b785e 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -146,6 +146,10 @@ main(int argc, /* I - Number of command-line args */
cups_file_t *fp; /* Fake lpsched lock file */
struct stat statbuf; /* Needed for checking lpsched FIFO */
#endif /* __sgi */
+#ifdef __APPLE__
+ int run_as_child = 0;
+ /* Needed for Mac OS X fork/exec */
+#endif /* __APPLE__ */
#if HAVE_LAUNCHD
int launchd_idle_exit;
/* Idle exit on select timeout? */
@@ -183,6 +187,12 @@ main(int argc, /* I - Number of command-line args */
for (opt = argv[i] + 1; *opt != '\0'; opt ++)
switch (*opt)
{
+#ifdef __APPLE__
+ case 'C' : /* Run as child with config file */
+ run_as_child = 1;
+ fg = -1;
+#endif /* __APPLE__ */
+
case 'c' : /* Configuration file */
i ++;
if (i >= argc)
@@ -339,6 +349,18 @@ main(int argc, /* I - Number of command-line args */
return (3);
}
}
+
+#ifdef __APPLE__
+ /*
+ * Since CoreFoundation has an overly-agressive check for whether a
+ * process has forked but not exec'd (whether CF has been called or
+ * not...), we now have to exec ourselves with the "-f" option to
+ * eliminate their bogus warning messages.
+ */
+
+ execlp(argv[0], argv[0], "-C", ConfigurationFile, (char *)0);
+ exit(errno);
+#endif /* __APPLE__ */
}
if (fg < 1)
@@ -502,7 +524,11 @@ main(int argc, /* I - Number of command-line args */
*/
if (krb5_init_context(&KerberosContext))
+ {
+ KerberosContext = NULL;
+
cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to initialize Kerberos context");
+ }
#endif /* HAVE_GSSAPI */
/*
@@ -583,7 +609,11 @@ main(int argc, /* I - Number of command-line args */
* we are up and running...
*/
+#ifdef __APPLE__
+ if (!fg || run_as_child)
+#else
if (!fg)
+#endif /* __APPLE__ */
{
/*
* Send a signal to the parent process, but only if the parent is
@@ -968,7 +998,9 @@ main(int argc, /* I - Number of command-line args */
if (LastEvent)
{
#ifdef HAVE_NOTIFY_POST
- if (LastEvent & CUPSD_EVENT_PRINTER_CHANGED)
+ if (LastEvent & (CUPSD_EVENT_PRINTER_ADDED |
+ CUPSD_EVENT_PRINTER_DELETED |
+ CUPSD_EVENT_PRINTER_MODIFIED))
{
cupsdLogMessage(CUPSD_LOG_DEBUG2,
"notify_post(\"com.apple.printerListChange\")");
@@ -1052,7 +1084,8 @@ main(int argc, /* I - Number of command-line args */
if (krb5_init_context != NULL)
# endif /* __APPLE__ */
- krb5_free_context(KerberosContext);
+ if (KerberosContext)
+ krb5_free_context(KerberosContext);
#endif /* HAVE_GSSAPI */
#ifdef __APPLE__
diff --git a/scheduler/sysman.c b/scheduler/sysman.c
index a67b4fa7f0..03aa8d0355 100644
--- a/scheduler/sysman.c
+++ b/scheduler/sysman.c
@@ -286,7 +286,7 @@ cupsdUpdateSystemMonitor(void)
p;
p = (cupsd_printer_t *)cupsArrayNext(Printers))
{
- if (p->type & CUPS_PRINTER_REMOTE)
+ if (p->type & CUPS_PRINTER_DISCOVERED)
{
cupsdLogMessage(CUPSD_LOG_DEBUG,
"Deleting remote destination \"%s\"", p->name);
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index 8625f5a150..e0e3ad9ff3 100644
--- a/systemv/lpadmin.c
+++ b/systemv/lpadmin.c
@@ -1815,10 +1815,10 @@ set_printer_options(
if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL)
{
if (!strcasecmp(protocol, "bcp"))
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "port-monitor",
+ ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
NULL, "bcp");
else if (!strcasecmp(protocol, "tbcp"))
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "port-monitor",
+ ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
NULL, "tbcp");
}
diff --git a/tools/testosx b/tools/testosx
index fe44a364cc..36ee266126 100755
--- a/tools/testosx
+++ b/tools/testosx
@@ -99,7 +99,7 @@ for file in packaging/cups-desc.plist packaging/cups-info.plist \
echo Updating $file...
sed -e '1,$s/@CUPS_VERSION@/'$version'/g' \
-e '1,$s/@CUPS_REVISION@//g' \
- -e '1,$s/@CUPS_RELEASE@/1.3.'$rev'/g' \
+ -e '1,$s/@CUPS_RELEASE@/1.4.'$rev'/g' \
<$file.in >$file
done