]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Load cups into easysw/current.
authorjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 27 Jan 2006 00:19:36 +0000 (00:19 +0000)
committerjlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 27 Jan 2006 00:19:36 +0000 (00:19 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@29 a1ca3aef-8c08-0410-bb20-df032aa958be

Makedefs.in
config-scripts/cups-common.m4
cups/Makefile
filter/Makefile
filter/interpret.c
filter/raster.h
scheduler/Makefile
scheduler/conf.c
scheduler/main.c
systemv/Makefile

index 7829d96b4aa55e7106a4aebbdb8d40aa3ad00e3f..7177bcbbcd7aeea9b805767f67eb8564143d44d1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makedefs.in 4836 2005-11-13 06:14:46Z mike $"
+# "$Id: Makedefs.in 4999 2006-01-26 23:36:22Z mike $"
 #
 #   Common makefile definitions for the Common UNIX Printing System (CUPS).
 #
@@ -74,6 +74,12 @@ LIBSLP               =       @LIBSLP@
 LIBTIFF                =       @LIBTIFF@
 LIBZ           =       @LIBZ@
 
+#
+# Install static libraries?
+#
+
+INSTALLSTATIC  =       @INSTALLSTATIC@
+
 #
 # Program options...
 #
@@ -189,5 +195,5 @@ PAMFILE             =       @PAMFILE@
 
 
 #
-# End of "$Id: Makedefs.in 4836 2005-11-13 06:14:46Z mike $"
+# End of "$Id: Makedefs.in 4999 2006-01-26 23:36:22Z mike $"
 #
index 28b45a3b720305c31bf5f9850680f371f20527fb..cc001bf747f2f2d2923f3ca4b84a990d5d157ed5 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-common.m4 4979 2006-01-25 17:47:43Z mike $"
+dnl "$Id: cups-common.m4 4999 2006-01-26 23:36:22Z mike $"
 dnl
 dnl   Common configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
@@ -69,8 +69,15 @@ if test "x$CXX" = x; then
        AC_MSG_ERROR([Unable to find required C++ compiler command.])
 fi
 
-dnl Architecture checks...
-AC_C_BIGENDIAN
+dnl Static library option...
+INSTALLSTATIC=""
+AC_ARG_ENABLE(install_static, [  --enable-static         install static libraries, default=no])
+
+if test x$enable_install_static = xyes; then
+       INSTALLSTATIC="installstatic"
+fi
+
+AC_SUBST(INSTALLSTATIC)
 
 dnl Check for libraries...
 AC_SEARCH_LIBS(crypt, crypt)
@@ -221,5 +228,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
 
 dnl
-dnl End of "$Id: cups-common.m4 4979 2006-01-25 17:47:43Z mike $".
+dnl End of "$Id: cups-common.m4 4999 2006-01-26 23:36:22Z mike $".
 dnl
index 3393108c81ae5fc14c55b8c1a2aa73a7906d087c..94ff53a2906e9bfd4078ec3515b1d354e16abb21 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 4961 2006-01-20 22:19:13Z mike $"
+# "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $"
 #
 #   API library Makefile for the Common UNIX Printing System (CUPS).
 #
@@ -140,7 +140,7 @@ depend:
 # Install object and target files...
 #
 
-install:       all     installhdrs
+install:       all installhdrs $(INSTALLSTATIC)
        $(INSTALL_DIR) $(LIBDIR)
        $(INSTALL_LIB) $(LIBCUPS) $(LIBDIR)
        if test $(LIBCUPS) = "libcups.so.2" -o $(LIBCUPS) = "libcups.sl.2"; then \
@@ -152,6 +152,9 @@ install:    all     installhdrs
                $(RM) $(LIBDIR)/libcups.dylib; \
                $(LN) $(LIBCUPS) $(LIBDIR)/libcups.dylib; \
        fi
+
+installstatic:
+       $(INSTALL_DIR) -m 755 $(LIBDIR)
        if test $(LIBCUPS) != "libcups.a"; then \
                $(INSTALL_LIB) libcups.a $(LIBDIR); \
                $(RANLIB) $(LIBDIR)/libcups.a; \
@@ -353,5 +356,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4961 2006-01-20 22:19:13Z mike $".
+# End of "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $".
 #
index d1eb3ca49c0133a00156fc54031cd16fc127603d..aff050503a5ad95c0f4acfeec964eca202616afc 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $"
+# "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $"
 #
 #   Filter makefile for the Common UNIX Printing System (CUPS).
 #
@@ -71,14 +71,14 @@ depend:
 # Install all targets...
 #
 
-install:       all installhdrs
+install:       all installhdrs $(INSTALLSTATIC)
        $(INSTALL_DIR) $(SERVERBIN)/filter
        for file in $(FILTERS); do \
                $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
        done
        $(RM) $(SERVERBIN)/filter/rastertodymo
        $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
-       $(INSTALL_DIR) $(LIBDIR)
+       $(INSTALL_DIR) -m 755 $(LIBDIR)
        $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
        -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
                $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
@@ -89,6 +89,9 @@ install:      all installhdrs
                $(RM) $(LIBDIR)/libcupsimage.dylib; \
                $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
        fi
+
+installstatic:
+       $(INSTALL_DIR) -m 755 $(LIBDIR)
        -if test $(LIBCUPSIMAGE) != "libcupsimage.a"; then \
                $(INSTALL_LIB) libcupsimage.a $(LIBDIR); \
                $(RANLIB) $(LIBDIR)/libcupsimage.a; \
@@ -281,5 +284,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4950 2006-01-19 16:07:57Z mike $".
+# End of "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $".
 #
index 6f8f754afc6a09976c75ebf2897ddea360af95d0..8c3408f372e0c45f3a2d99a815773efa891e26b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: interpret.c 4982 2006-01-25 21:44:44Z mike $"
+ * "$Id: interpret.c 4998 2006-01-26 21:59:54Z mike $"
  *
  *   PPD command interpreter for the Common UNIX Printing System (CUPS).
  *
@@ -34,7 +34,6 @@
  * Include necessary headers...
  */
 
-#include <cups/ppd.h>
 #include <cups/string.h>
 #include "raster.h"
 #include <stdlib.h>
@@ -60,17 +59,25 @@ static int  exec_code(cups_page_header2_t *header, const char *code);
 /*
  * 'cupsRasterInterpretPPD()' - Interpret PPD commands to create a page header.
  *
+ * This function does not mark the options in the PPD using the "num_options"
+ * and "options" arguments.  Instead, mark the options prior to calling
+ * cupsRasterInterpretPPD() - this allows you to do per-page options
+ * without manipulating the options array.
+ *
  * @since CUPS 1.2@
  */
 
 int                                    /* O - 0 on success, -1 on failure */
 cupsRasterInterpretPPD(
     cups_page_header2_t *h,            /* O - Page header */
-    ppd_file_t          *ppd)          /* I - PPD file */
+    ppd_file_t          *ppd,          /* I - PPD file */
+    int                 num_options,   /* I - Number of options */
+    cups_option_t       *options)      /* I - Options */
 {
   int          i;                      /* Looping var */
   int          status;                 /* Cummulative status */
   int          count;                  /* Number of marked choices */
+  const char   *val;                   /* Option value */
   ppd_choice_t **choices;              /* List of marked choices */
   ppd_size_t   *size;                  /* Current size */
   float                left,                   /* Left position */
@@ -92,21 +99,21 @@ cupsRasterInterpretPPD(
 
   memset(h, 0, sizeof(cups_page_header2_t));
 
-  h->NumCopies          = 1;
-  h->PageSize[0]        = 612;
-  h->PageSize[1]        = 792;
-  h->HWResolution[0]    = 100;
-  h->HWResolution[1]    = 100;
-  h->cupsBitsPerColor   = 1;
-  h->cupsColorOrder     = CUPS_ORDER_CHUNKED;
-  h->cupsColorSpace     = CUPS_CSPACE_K;
-  h->cupsPageScaling    = 1.0f;
-  h->cupsPageSize[0]    = 612.0f;
-  h->cupsPageSize[1]    = 792.0f;
-  h->cupsImagingBBox[0] = 0.0f;
-  h->cupsImagingBBox[1] = 0.0f;
-  h->cupsImagingBBox[2] = 612.0f;
-  h->cupsImagingBBox[3] = 792.0f;
+  h->NumCopies                   = 1;
+  h->PageSize[0]                 = 612;
+  h->PageSize[1]                 = 792;
+  h->HWResolution[0]             = 100;
+  h->HWResolution[1]             = 100;
+  h->cupsBitsPerColor            =  1;
+  h->cupsColorOrder              = CUPS_ORDER_CHUNKED;
+  h->cupsColorSpace              = CUPS_CSPACE_K;
+  h->cupsBorderlessScalingFactor = 1.0f;
+  h->cupsPageSize[0]             = 612.0f;
+  h->cupsPageSize[1]             = 792.0f;
+  h->cupsImagingBBox[0]          = 0.0f;
+  h->cupsImagingBBox[1]          = 0.0f;
+  h->cupsImagingBBox[2]          = 612.0f;
+  h->cupsImagingBBox[3]          = 792.0f;
 
   strcpy(h->cupsPageSizeName, "Letter");
 
@@ -161,9 +168,24 @@ cupsRasterInterpretPPD(
   if (!h->HWResolution[0] || !h->HWResolution[1] ||
       !h->PageSize[0] || !h->PageSize[1] ||
       (h->cupsBitsPerColor != 1 && h->cupsBitsPerColor != 2 &&
-       h->cupsBitsPerColor != 4 && h->cupsBitsPerColor != 8))
+       h->cupsBitsPerColor != 4 && h->cupsBitsPerColor != 8) ||
+      h->cupsBorderlessScalingFactor < 0.9 ||
+      h->cupsBorderlessScalingFactor > 1.1)
     return (-1);
 
+ /*
+  * Allow option override for page scaling...
+  */
+
+  if ((val = cupsGetOption("cupsBorderlessScalingFactor", num_options,
+                           options)) != NULL)
+  {
+    float sc = atof(val);
+
+    if (sc >= 0.9 && sc <= 1.1)
+      h->cupsBorderlessScalingFactor = sc;
+  }
+
  /*
   * Get the margins for the current size...
   */
@@ -193,12 +215,16 @@ cupsRasterInterpretPPD(
     top    = 792.0f;
   }
 
-  h->Margins[0]            = left;
-  h->Margins[1]            = bottom;
-  h->ImagingBoundingBox[0] = left;
-  h->ImagingBoundingBox[1] = bottom;
-  h->ImagingBoundingBox[2] = right;
-  h->ImagingBoundingBox[3] = top;
+  h->PageSize[0]           = h->cupsPageSize[0] *
+                             h->cupsBorderlessScalingFactor;
+  h->PageSize[1]           = h->cupsPageSize[1] *
+                             h->cupsBorderlessScalingFactor;
+  h->Margins[0]            = left * h->cupsBorderlessScalingFactor;
+  h->Margins[1]            = bottom * h->cupsBorderlessScalingFactor;
+  h->ImagingBoundingBox[0] = left * h->cupsBorderlessScalingFactor;
+  h->ImagingBoundingBox[1] = bottom * h->cupsBorderlessScalingFactor;
+  h->ImagingBoundingBox[2] = right * h->cupsBorderlessScalingFactor;
+  h->ImagingBoundingBox[3] = top * h->cupsBorderlessScalingFactor;
   h->cupsImagingBBox[0]    = left;
   h->cupsImagingBBox[1]    = bottom;
   h->cupsImagingBBox[2]    = right;
@@ -208,9 +234,9 @@ cupsRasterInterpretPPD(
   * Compute the bitmap parameters...
   */
 
-  h->cupsWidth  = (int)((right - left) * h->cupsPageScaling *
+  h->cupsWidth  = (int)((right - left) * h->cupsBorderlessScalingFactor *
                         h->HWResolution[0] / 72.0f + 0.5f);
-  h->cupsHeight = (int)((top - bottom) * h->cupsPageScaling *
+  h->cupsHeight = (int)((top - bottom) * h->cupsBorderlessScalingFactor *
                         h->HWResolution[1] / 72.0f + 0.5f);
 
   switch (h->cupsColorSpace)
@@ -488,9 +514,6 @@ exec_code(cups_page_header2_t *h,   /* O - Page header */
       h->OutputFaceUp = !strcmp(value, "true");
     else if (!strcmp(name, "PageSize") && type == CUPS_TYPE_ARRAY)
     {
-      if (sscanf(value, "[%d%d]", h->PageSize + 0, h->PageSize + 1) != 2)
-        return (-1);
-
       if (sscanf(value, "[%f%f]", h->cupsPageSize + 0, h->cupsPageSize + 1) != 2)
         return (-1);
     }
@@ -516,10 +539,9 @@ exec_code(cups_page_header2_t *h,  /* O - Page header */
       h->cupsRowFeed = atoi(value);
     else if (!strcmp(name, "cupsRowStep") && type == CUPS_TYPE_NUMBER)
       h->cupsRowStep = atoi(value);
-    else if (!strcmp(name, "cupsPageScaling") && type == CUPS_TYPE_NUMBER)
-    {
-      h->cupsPageScaling = atof(value);
-    }
+    else if (!strcmp(name, "cupsBorderlessScalingFactor") &&
+             type == CUPS_TYPE_NUMBER)
+      h->cupsBorderlessScalingFactor = atof(value);
     else if (!strncmp(name, "cupsInteger", 11) && type == CUPS_TYPE_NUMBER)
     {
       if ((i = atoi(name + 11)) >= 0 || i > 15)
@@ -565,5 +587,5 @@ exec_code(cups_page_header2_t *h,   /* O - Page header */
 
 
 /*
- * End of "$Id: interpret.c 4982 2006-01-25 21:44:44Z mike $".
+ * End of "$Id: interpret.c 4998 2006-01-26 21:59:54Z mike $".
  */
index ecef9b9a514761dc8553c84ab682c91da30aa16f..541e6ebf8a2a563e3ea9815ef65b6bc440010a15 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: raster.h 4981 2006-01-25 21:34:00Z mike $"
+ * "$Id: raster.h 4998 2006-01-26 21:59:54Z mike $"
  *
  *   Raster file definitions for the Common UNIX Printing System (CUPS).
  *
@@ -40,7 +40,7 @@
  * Include necessary headers...
  */
 
-#  include <cups/ppd.h>
+#  include <cups/cups.h>
 
 #  ifdef __cplusplus
 extern "C" {
@@ -289,9 +289,12 @@ typedef struct cups_page_header2_s /**** Version 2 Page Header @since CUPS 1.2@
 
   /**** Version 2 Dictionary Values ****/
   unsigned     cupsNumColors;          /* Number of colors @since CUPS 1.2@ */
-  float                cupsPageScaling;        /* Scaling that was applied to page data */
-  float                cupsPageSize[2];        /* Floating point PageSize @since CUPS 1.2@ */
-  float                cupsImagingBBox[4];     /* Floating point ImagingBoundingBox @since CUPS 1.2@ */
+  float                cupsBorderlessScalingFactor;
+                                       /* Scaling that was applied to page data */
+  float                cupsPageSize[2];        /* Floating point PageSize (scaling *
+                                        * factor not applied) @since CUPS 1.2@ */
+  float                cupsImagingBBox[4];     /* Floating point ImagingBoundingBox *
+                                        * (scaling factor not applied) @since CUPS 1.2@ */
   unsigned     cupsInteger[16];        /* User-defined integer values @since CUPS 1.2@ */
   float                cupsReal[16];           /* User-defined floating-point values @since CUPS 1.2@ */
   char         cupsString[16][64];     /* User-defined string values @since CUPS 1.2@ */
@@ -332,7 +335,9 @@ extern unsigned             cupsRasterWritePixels(cups_raster_t *r,
 
 /**** New in CUPS 1.2 ****/
 extern int             cupsRasterInterpretPPD(cups_page_header2_t *h,
-                                              ppd_file_t *ppd);
+                                              ppd_file_t *ppd,
+                                              int num_options,
+                                              cups_option_t *options);
 extern unsigned                cupsRasterReadHeader2(cups_raster_t *r,
                                              cups_page_header2_t *h);
 extern unsigned                cupsRasterWriteHeader2(cups_raster_t *r,
@@ -345,5 +350,5 @@ extern unsigned             cupsRasterWriteHeader2(cups_raster_t *r,
 #endif /* !_CUPS_RASTER_H_ */
 
 /*
- * End of "$Id: raster.h 4981 2006-01-25 21:34:00Z mike $".
+ * End of "$Id: raster.h 4998 2006-01-26 21:59:54Z mike $".
  */
index ac15d4fdedf7bb0182ae95132904182c917068d8..66adc3015f38b69676cba77a2fee8f0566f4cd4a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 4970 2006-01-24 14:05:45Z mike $"
+# "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $"
 #
 #   Scheduler Makefile for the Common UNIX Printing System (CUPS).
 #
@@ -103,40 +103,40 @@ depend:
 
 install:       all
        echo Creating $(SBINDIR)...
-       $(INSTALL_DIR) $(SBINDIR)
+       $(INSTALL_DIR) -m 755 $(SBINDIR)
        echo Installing cupsd in $(SBINDIR)...
        $(INSTALL_BIN) cupsd $(SBINDIR)
        echo Creating $(SERVERBIN)...
-       $(INSTALL_DIR) $(SERVERBIN)
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)
        echo Creating $(SERVERBIN)/daemon...
-       $(INSTALL_DIR) $(SERVERBIN)/daemon
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/daemon
        echo Installing cups-deviced, cups-driverd, cups-lpd, and cups-polld in $(SERVERBIN)/daemon...
        $(INSTALL_BIN) cups-deviced $(SERVERBIN)/daemon
        $(INSTALL_BIN) cups-driverd $(SERVERBIN)/daemon
        $(INSTALL_BIN) cups-lpd $(SERVERBIN)/daemon
        $(INSTALL_BIN) cups-polld $(SERVERBIN)/daemon
        echo Creating $(SERVERBIN)/driver...
-       $(INSTALL_DIR) $(SERVERBIN)/driver
+       $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver
        echo Creating $(SERVERROOT)...
-       $(INSTALL_DIR) $(SERVERROOT)
+       $(INSTALL_DIR) -m 755 $(SERVERROOT)
        echo Creating $(SERVERROOT)/interfaces...
-       $(INSTALL_DIR) -g $(CUPS_GROUP) $(SERVERROOT)/interfaces
+       $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/interfaces
        echo Creating $(SERVERROOT)/ppd...
-       $(INSTALL_DIR) -g $(CUPS_GROUP) $(SERVERROOT)/ppd
+       $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/ppd
        echo Creating $(STATEDIR)...
-       $(INSTALL_DIR) $(STATEDIR)
+       $(INSTALL_DIR) -m 755 $(STATEDIR)
        echo Creating $(STATEDIR)/certs...
-       $(INSTALL_DIR) $(STATEDIR)/certs
+       $(INSTALL_DIR) -m 711 $(STATEDIR)/certs
        echo Creating $(LOGDIR)...
-       $(INSTALL_DIR) $(LOGDIR)
+       $(INSTALL_DIR) -m 755 $(LOGDIR)
        echo Creating $(REQUESTS)...
-       $(INSTALL_DIR) -g $(CUPS_GROUP) $(REQUESTS)
-       echo Creating -g $(CUPS_GROUP) $(REQUESTS)/tmp...
-       $(INSTALL_DIR) $(REQUESTS)/tmp
+       $(INSTALL_DIR) -m 710 -g $(CUPS_GROUP) $(REQUESTS)
+       echo Creating $(REQUESTS)/tmp...
+       $(INSTALL_DIR) -m 1770 -g $(CUPS_GROUP) $(REQUESTS)/tmp
        echo Creating $(CACHEDIR)...
-       $(INSTALL_DIR) $(CACHEDIR)
-       echo Creating $(CACHEDIR)/ppd...
-       $(INSTALL_DIR) $(CACHEDIR)/ppd
+       $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)
+#      echo Creating $(CACHEDIR)/ppd...
+#      $(INSTALL_DIR) -m 755 $(CACHEDIR)/ppd
 
 
 #
@@ -239,5 +239,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4970 2006-01-24 14:05:45Z mike $".
+# End of "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $".
 #
index 9dfe9360a929b8e4f202ccc83ea120be9db84618..aab53c63aa96987bfce9981c1da3f08edc4eb06d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: conf.c 4993 2006-01-26 19:27:40Z mike $"
+ * "$Id: conf.c 5001 2006-01-26 23:39:23Z mike $"
  *
  *   Configuration routines for the Common UNIX Printing System (CUPS).
  *
@@ -615,7 +615,7 @@ cupsdReadConfiguration(void)
   check_permissions(CacheDir, NULL, 0775, RunUser, Group, 1, 1);
   check_permissions(CacheDir, "ppd", 0755, RunUser, Group, 1, 1);
 
-  check_permissions(StateDir, NULL, 0775, RunUser, Group, 1, 1);
+  check_permissions(StateDir, NULL, 0755, RunUser, Group, 1, 1);
   check_permissions(StateDir, "certs", RunUser ? 0711 : 0511, User,
                     SystemGroupIDs[0], 1, 1);
 
@@ -3122,5 +3122,5 @@ read_policy(cups_file_t *fp,              /* I - Configuration file */
 
 
 /*
- * End of "$Id: conf.c 4993 2006-01-26 19:27:40Z mike $".
+ * End of "$Id: conf.c 5001 2006-01-26 23:39:23Z mike $".
  */
index 4fd62fad5078af34a9a6b94a8aea039a6664559c..c34a6b4602fa6b2e68d5ca74aa46116f4748c7e0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: main.c 4993 2006-01-26 19:27:40Z mike $"
+ * "$Id: main.c 4997 2006-01-26 21:43:54Z mike $"
  *
  *   Scheduler main loop for the Common UNIX Printing System (CUPS).
  *
@@ -545,7 +545,12 @@ main(int  argc,                            /* I - Number of command-line arguments */
     timeout.tv_sec  = select_timeout(fds);
     timeout.tv_usec = 0;
 
-    if ((fds = select(MaxFDs, input, output, NULL, &timeout)) < 0)
+    if (timeout.tv_sec < 86400)                /* Only use timeout for < 1 day */
+      fds = select(MaxFDs, input, output, NULL, &timeout);
+    else
+      fds = select(MaxFDs, input, output, NULL, NULL);
+
+    if (fds < 0)
     {
       char     s[16384],               /* String buffer */
                *sptr;                  /* Pointer into buffer */
@@ -604,6 +609,8 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
       cupsdLogMessage(CUPSD_LOG_EMERG, "BrowseSocket = %d", BrowseSocket);
 
+      cupsdLogMessage(CUPSD_LOG_EMERG, "CGIPipes[0] = %d", CGIPipes[0]);
+
       for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
           job;
           job = (cupsd_job_t *)cupsArrayNext(ActiveJobs))
@@ -749,6 +756,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
        {
          cupsdLogMessage(CUPSD_LOG_DEBUG2,
                          "main: Removing fd %d from InputSet...", con->file);
+         FD_CLR(con->file, input);
          FD_CLR(con->file, InputSet);
        }
       }
@@ -1490,17 +1498,6 @@ select_timeout(int fds)                  /* I - Number of ready descriptors select returned */
   }
 #endif /* HAVE_MALLINFO */
 
- /*
-  * Update the root certificate when needed...
-  */
-
-  if (!RunUser && RootCertDuration &&
-      (RootCertTime + RootCertDuration) < timeout)
-  {
-    timeout = RootCertTime + RootCertDuration;
-    why     = "update root certificate";
-  }
-
  /*
   * Expire subscriptions as needed...
   */
@@ -1554,5 +1551,5 @@ usage(void)
 
 
 /*
- * End of "$Id: main.c 4993 2006-01-26 19:27:40Z mike $".
+ * End of "$Id: main.c 4997 2006-01-26 21:43:54Z mike $".
  */
index 16902faa85621a220b71034d613c1574f5d01563..0e22d8faefe357ce453d033efe2da582a4607357 100644 (file)
@@ -1,5 +1,5 @@
 #
-# "$Id: Makefile 4791 2005-10-14 01:39:44Z mike $"
+# "$Id: Makefile 4999 2006-01-26 23:36:22Z mike $"
 #
 #   System V commands makefile for the Common UNIX Printing System (CUPS).
 #
@@ -70,10 +70,10 @@ install:    all
        $(INSTALL_DIR) $(BINDIR)
        $(INSTALL_BIN) cancel $(BINDIR)
        $(INSTALL_BIN) cupstestppd $(BINDIR)
-       $(RM) $(SBINDIR)/disable
-       $(LN) accept $(SBINDIR)/disable
-       $(RM) $(SBINDIR)/enable
-       $(LN) accept $(SBINDIR)/enable
+       $(RM) $(SBINDIR)/cupsdisable
+       $(LN) accept $(SBINDIR)/cupsdisable
+       $(RM) $(SBINDIR)/cupsenable
+       $(LN) accept $(SBINDIR)/cupsenable
        $(INSTALL_BIN) lp $(BINDIR)
        $(INSTALL_BIN) lpoptions $(BINDIR)
        $(INSTALL_BIN) lpstat $(BINDIR)
@@ -191,5 +191,5 @@ include Dependencies
 
 
 #
-# End of "$Id: Makefile 4791 2005-10-14 01:39:44Z mike $".
+# End of "$Id: Makefile 4999 2006-01-26 23:36:22Z mike $".
 #