]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Clean up compiler warnings reported in build farm logs.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 10 Apr 2003 12:57:44 +0000 (12:57 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 10 Apr 2003 12:57:44 +0000 (12:57 +0000)
Drop extended PPD options from 1.1.x branch.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@3580 7a7537e8-13f0-0310-91df-b6672ffda945

backend/ipp.c
backend/lpd.c
backend/socket.c
cups/ppd.h
filter/imagetops.c
filter/pstops.c
scheduler/auth.c
scheduler/conf.c
scheduler/file.c
scheduler/ipp.c

index 95ad0421b8e0cfb0962f4f34ece00381bbb247d1..16c1bf5188612ba6948bb5f3d7dd5acbada8aea4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c,v 1.75 2003/03/24 21:29:49 mike Exp $"
+ * "$Id: ipp.c,v 1.76 2003/04/10 12:57:40 mike Exp $"
  *
  *   IPP backend for the Common UNIX Printing System (CUPS).
  *
@@ -82,6 +82,11 @@ cups_hstrerror(int error)                    /* I - Error number */
   else
     return (errors[error]);
 }
+#elif defined(_AIX)
+/*
+ * AIX doesn't provide a prototype but does provide the function...
+ */
+extern const char *hstrerror(int);
 #endif /* !HAVE_HSTRERROR */
 
 
@@ -1209,5 +1214,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: ipp.c,v 1.75 2003/03/24 21:29:49 mike Exp $".
+ * End of "$Id: ipp.c,v 1.76 2003/04/10 12:57:40 mike Exp $".
  */
index 5697e86cc83bd57a677aa060983d6db2525a80d9..c0df675aeabbd5b0123507e0d813aad6854b5071 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpd.c,v 1.50 2003/03/24 20:51:00 mike Exp $"
+ * "$Id: lpd.c,v 1.51 2003/04/10 12:57:40 mike Exp $"
  *
  *   Line Printer Daemon backend for the Common UNIX Printing System (CUPS).
  *
@@ -91,6 +91,11 @@ cups_hstrerror(int error)                    /* I - Error number */
   else
     return (errors[error]);
 }
+#elif defined(_AIX)
+/*
+ * AIX doesn't provide a prototype but does provide the function...
+ */
+extern const char *hstrerror(int);
 #endif /* !HAVE_HSTRERROR */
 
 
@@ -1015,5 +1020,5 @@ sigterm_handler(int sig)          /* I - Signal */
 
 
 /*
- * End of "$Id: lpd.c,v 1.50 2003/03/24 20:51:00 mike Exp $".
+ * End of "$Id: lpd.c,v 1.51 2003/04/10 12:57:40 mike Exp $".
  */
index 9843cf51ccad66244f840f6612c234ae11c1ee34..71bdb4c1bd1f9a2f912d996bc9cb4c0a9555c1a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: socket.c,v 1.36 2003/02/12 16:32:42 mike Exp $"
+ * "$Id: socket.c,v 1.37 2003/04/10 12:57:40 mike Exp $"
  *
  *   AppSocket backend for the Common UNIX Printing System (CUPS).
  *
@@ -79,6 +79,11 @@ cups_hstrerror(int error)                    /* I - Error number */
   else
     return (errors[error]);
 }
+#elif defined(_AIX)
+/*
+ * AIX doesn't provide a prototype but does provide the function...
+ */
+extern const char *hstrerror(int);
 #endif /* !HAVE_HSTRERROR */
 
 
@@ -317,11 +322,7 @@ main(int  argc,                    /* I - Number of command-line arguments (6 or 7) */
 
       FD_ZERO(&input);
       FD_SET(fd, &input);
-#ifdef __hpux
-      if (select(fd + 1, (int *)&input, NULL, NULL, &timeout) > 0)
-#else
       if (select(fd + 1, &input, NULL, NULL, &timeout) > 0)
-#endif /* __hpux */
       {
        /*
        * Grab the data coming back and spit it out to stderr...
@@ -442,5 +443,5 @@ print_backchannel(const unsigned char *buffer,      /* I - Data buffer */
 
 
 /*
- * End of "$Id: socket.c,v 1.36 2003/02/12 16:32:42 mike Exp $".
+ * End of "$Id: socket.c,v 1.37 2003/04/10 12:57:40 mike Exp $".
  */
index 87d247bfb5e6d678b34513dc6699f7db38545c54..1e619dcd9c13586822ce779531f0f17f68e79157 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ppd.h,v 1.34 2003/04/10 03:00:48 mike Exp $"
+ * "$Id: ppd.h,v 1.35 2003/04/10 12:57:41 mike Exp $"
  *
  *   PostScript Printer Description definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -222,71 +222,6 @@ typedef struct                     /**** sRGB Color Profiles ****/
                matrix[3][3];   /* Transform matrix */
 } ppd_profile_t;
 
-/**** New in CUPS 1.1.19 ****/
-typedef enum                   /**** Extended UI Types ****/
-{
-  PPD_UI_CUPS_TEXT,            /* Specify a string */
-  PPD_UI_CUPS_INTEGER,         /* Specify an integer number */
-  PPD_UI_CUPS_REAL,            /* Specify a real number */
-  PPD_UI_CUPS_GAMMA,           /* Specify a gamma number */
-  PPD_UI_CUPS_CURVE,           /* Specify start, end, and gamma numbers */
-  PPD_UI_CUPS_INTEGER_ARRAY,   /* Specify an array of integer numbers */
-  PPD_UI_CUPS_REAL_ARRAY,      /* Specify an array of real numbers */
-  PPD_UI_CUPS_XY_ARRAY         /* Specify an array of X/Y real numbers */
-} ppd_ext_ui_t;
-
-typedef union                  /**** Extended Values ****/
-{
-  char         *text;          /* Text value */
-  int          integer;        /* Integer value */
-  float                real;           /* Real value */
-  float                gamma;          /* Gamma value */
-  struct
-  {
-    float      start,          /* Linear (density) start value for curve */
-               end,            /* Linear (density) end value for curve */
-               gamma;          /* Gamma correction */
-  }            curve;          /* Curve values */
-  struct
-  {
-    int                num_elements,   /* Number of array elements */
-               *elements;      /* Array of integer values */
-  }            integer_array;  /* Integer array value */
-  struct
-  {
-    int                num_elements;   /* Number of array elements */
-    float      *elements;      /* Array of real values */
-  }            real_array;     /* Real array value */
-  struct
-  {
-    int                num_elements;   /* Number of array elements */
-    float      *elements;      /* Array of XY values */
-  }            xy_array;       /* XY array value */
-} ppd_ext_value_t;
-
-typedef struct                 /**** Extended Parameter ****/
-{
-  char         keyword[PPD_MAX_NAME],
-                               /* Parameter name */
-               text[PPD_MAX_TEXT];
-                               /* Human-readable text */
-  ppd_ext_value_t *value,      /* Current values */
-               *defval,        /* Default values */
-               *minval,        /* Minimum numeric values */
-               *maxval;        /* Maximum numeric values */
-} ppd_ext_param_t;
-
-typedef struct                 /**** Extended Options ****/
-{
-  char         keyword[PPD_MAX_NAME];
-                               /* Name of option that is being extended... */
-  ppd_option_t *option;        /* Option that is being extended... */
-  int          marked;         /* Extended option is marked */
-  char         *code;          /* Generic PS code for extended options */
-  int          num_params;     /* Number of parameters */
-  ppd_ext_param_t **params;    /* Parameters */
-} ppd_ext_option_t;
-
 typedef struct                 /**** Files ****/
 {
   int          language_level, /* Language level of device */
@@ -338,8 +273,6 @@ typedef struct                      /**** Files ****/
   int          num_attrs,      /* Number of attributes */
                cur_attr;       /* Current attribute */
   ppd_attr_t   **attrs;        /* Attributes */
-  int          num_extended;   /* Number of extended options */
-  ppd_ext_option_t **extended; /* Extended options */
 } ppd_file_t;
 
 
@@ -379,28 +312,7 @@ extern ppd_attr_t  *ppdFindAttr(ppd_file_t *ppd, const char *name,
 extern ppd_attr_t      *ppdFindNextAttr(ppd_file_t *ppd, const char *name,
                                         const char *spec);
 extern ppd_status_t    ppdLastError(int *line);
-extern ppd_ext_option_t        *ppdFindExtOption(ppd_file_t *ppd, const char *keyword);
-extern ppd_ext_param_t *ppdFindExtParam(ppd_ext_option_t *opt, const char *param);
-extern int             ppdMarkCurve(ppd_file_t *ppd, const char *keyword,
-                                    const char *param, float low, float high,
-                                    float gvalue);
-extern int             ppdMarkGamma(ppd_file_t *ppd, const char *keyword,
-                                    const char *param, float gvalue);
-extern int             ppdMarkInteger(ppd_file_t *ppd, const char *keyword,
-                                      const char *param, int value);
-extern int             ppdMarkIntegerArray(ppd_file_t *ppd, const char *keyword,
-                                           const char *param, int num_values,
-                                           const int *values);
-extern int             ppdMarkReal(ppd_file_t *ppd, const char *keyword,
-                                   const char *param, float value);
-extern int             ppdMarkRealArray(ppd_file_t *ppd, const char *keyword,
-                                        const char *param, int num_values,
-                                        const float *values);
-extern int             ppdMarkText(ppd_file_t *ppd, const char *keyword,
-                                   const char *param, const char *value);
-extern int             ppdMarkXYArray(ppd_file_t *ppd, const char *keyword,
-                                      const char *param, int num_values,
-                                      const float *values);
+
 
 /*
  * C++ magic...
@@ -412,5 +324,5 @@ extern int          ppdMarkXYArray(ppd_file_t *ppd, const char *keyword,
 #endif /* !_CUPS_PPD_H_ */
 
 /*
- * End of "$Id: ppd.h,v 1.34 2003/04/10 03:00:48 mike Exp $".
+ * End of "$Id: ppd.h,v 1.35 2003/04/10 12:57:41 mike Exp $".
  */
index 081ab09e3dcda763c84584ba04175314fbdfadab..47c1eae92592a5ee1e7b72b8f4b3ca2164d54e54 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: imagetops.c,v 1.51 2003/02/24 20:09:12 mike Exp $"
+ * "$Id: imagetops.c,v 1.52 2003/04/10 12:57:42 mike Exp $"
  *
  *   Image file to PostScript filter for the Common UNIX Printing System (CUPS).
  *
@@ -643,7 +643,7 @@ main(int  argc,             /* I - Number of command-line arguments */
 
         switch (Orientation)
        {
-         case 0 : /* Portrait */
+         default : /* Portrait */
              pos = XPosition;
              break;
          case 1 : /* Landscape */
@@ -672,7 +672,7 @@ main(int  argc,             /* I - Number of command-line arguments */
 
         switch (Orientation)
        {
-         case 0 : /* Portrait */
+         default : /* Portrait */
              pos = YPosition;
              break;
          case 1 : /* Landscape */
@@ -924,5 +924,5 @@ ps_ascii85(ib_t *data,              /* I - Data to print */
 
 
 /*
- * End of "$Id: imagetops.c,v 1.51 2003/02/24 20:09:12 mike Exp $".
+ * End of "$Id: imagetops.c,v 1.52 2003/04/10 12:57:42 mike Exp $".
  */
index 5f2a93610eeb8bdd8eae28fcb936b2a2624a9a05..14ffebcd49f28e510954397388e5e77ebb0f6441 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: pstops.c,v 1.100 2003/02/28 16:38:11 mike Exp $"
+ * "$Id: pstops.c,v 1.101 2003/04/10 12:57:42 mike Exp $"
  *
  *   PostScript filter for the Common UNIX Printing System (CUPS).
  *
@@ -127,6 +127,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
 {
   FILE         *fp;            /* Print file */
   ppd_file_t   *ppd;           /* PPD file */
+  ppd_attr_t   *attr;          /* Attribute in PPD file */
   int          num_options;    /* Number of print options */
   cups_option_t        *options;       /* Print options */
   const char   *val;           /* Option value */
@@ -343,11 +344,12 @@ main(int  argc,                   /* I - Number of command-line arguments */
   * See if we should use a binary transmission protocol...
   */
 
-  if ((val = ppdFindAttr(ppd, "cupsProtocol", NULL)) != NULL)
+  if ((attr = ppdFindAttr(ppd, "cupsProtocol", NULL)) != NULL &&
+      attr->value != NULL)
   {
-    if (!strcasecmp(val, "TBCP"))
+    if (!strcasecmp(attr->value, "TBCP"))
       Protocol = PROT_TBCP;
-    else if (!strcasecmp(val, "BCP"))
+    else if (!strcasecmp(attr->value, "BCP"))
     {
       Protocol = PROT_BCP;
 
@@ -1884,5 +1886,5 @@ start_nup(int number,                     /* I - Page number */
 
 
 /*
- * End of "$Id: pstops.c,v 1.100 2003/02/28 16:38:11 mike Exp $".
+ * End of "$Id: pstops.c,v 1.101 2003/04/10 12:57:42 mike Exp $".
  */
index 26013b048a8967122b9f0e8f2c28cb4a014add22..ff14770293c164ee64dff206568da228b03fe4d6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: auth.c,v 1.69 2003/03/30 19:50:33 mike Exp $"
+ * "$Id: auth.c,v 1.70 2003/04/10 12:57:43 mike Exp $"
  *
  *   Authorization routines for the Common UNIX Printing System (CUPS).
  *
@@ -96,9 +96,9 @@ static void           to64(char *s, unsigned long v, int n);
  * Local globals...
  */
 
-#ifdef __hpux
+#if defined(__hpux) && defined(HAVE_LIBPAM)
 static client_t                *auth_client;   /* Current client being authenticated */
-#endif /* __hpux */
+#endif /* __hpux && HAVE_LIBPAM */
 
 
 /*
@@ -1643,5 +1643,5 @@ to64(char          *s,    /* O - Output string */
 
 
 /*
- * End of "$Id: auth.c,v 1.69 2003/03/30 19:50:33 mike Exp $".
+ * End of "$Id: auth.c,v 1.70 2003/04/10 12:57:43 mike Exp $".
  */
index 64b6af76b8a263ddba59cef4bd46cf1beaa4134d..270f6248aad1c96bb295c76d70ae69088d2cf8b4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: conf.c,v 1.130 2003/03/31 16:45:38 mike Exp $"
+ * "$Id: conf.c,v 1.131 2003/04/10 12:57:43 mike Exp $"
  *
  *   Configuration routines for the Common UNIX Printing System (CUPS).
  *
@@ -82,6 +82,11 @@ cups_hstrerror(int error)                    /* I - Error number */
   else
     return (errors[error]);
 }
+#elif defined(_AIX)
+/*
+ * AIX doesn't provide a prototype but does provide the function...
+ */
+extern const char *hstrerror(int);
 #endif /* !HAVE_HSTRERROR */
 
 
@@ -2124,5 +2129,5 @@ CDSAGetServerCerts(void)
 
 
 /*
- * End of "$Id: conf.c,v 1.130 2003/03/31 16:45:38 mike Exp $".
+ * End of "$Id: conf.c,v 1.131 2003/04/10 12:57:43 mike Exp $".
  */
index e067f3d95e406eb9ce81fac9098838b4dcf3d979..886510fd35c797304c71c9ad08304463bbefb46f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: file.c,v 1.2 2003/03/30 19:50:34 mike Exp $"
+ * "$Id: file.c,v 1.3 2003/04/10 12:57:44 mike Exp $"
  *
  *   File functions for the Common UNIX Printing System (CUPS).
  *
@@ -296,6 +296,9 @@ cupsFileOpen(const char *filename,  /* I - Name of file */
         o = O_WRONLY | O_TRUNC | O_CREAT;
        fp->mode = 'w';
         break;
+
+    default : /* Remove bogus compiler warning... */
+        return (NULL);
   }
 
   if ((fp->fd = open(filename, o, 0644)) < 0)
@@ -966,5 +969,5 @@ cups_write(int        fd,           /* I - File descriptor */
 
 
 /*
- * End of "$Id: file.c,v 1.2 2003/03/30 19:50:34 mike Exp $".
+ * End of "$Id: file.c,v 1.3 2003/04/10 12:57:44 mike Exp $".
  */
index 5650ddc3b48720b15c7bfe0babb1192f5a5a17f4..0b74dd6d831fe83d59f64569e009329914048918 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c,v 1.205 2003/04/08 03:45:17 mike Exp $"
+ * "$Id: ipp.c,v 1.206 2003/04/10 12:57:44 mike Exp $"
  *
  *   IPP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -2575,7 +2575,7 @@ copy_model(const char *from,              /* I - Source file */
     * Read all of the default lines from the old PPD...
     */
 
-    while (cupsFileGets(src, buffer, sizeof(buffer)) != NULL)
+    while (cupsFileGets(dst, buffer, sizeof(buffer)) != NULL)
       if (!strncmp(buffer, "*Default", 8))
       {
        /*
@@ -6547,5 +6547,5 @@ validate_user(client_t   *con,            /* I - Client connection */
 
 
 /*
- * End of "$Id: ipp.c,v 1.205 2003/04/08 03:45:17 mike Exp $".
+ * End of "$Id: ipp.c,v 1.206 2003/04/10 12:57:44 mike Exp $".
  */