/*
- * "$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).
*
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 */
/*
- * 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 $".
*/
/*
- * "$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).
*
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 */
/*
- * 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 $".
*/
/*
- * "$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).
*
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 */
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...
/*
- * 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 $".
*/
/*
- * "$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).
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 */
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;
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...
#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 $".
*/
/*
- * "$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).
*
switch (Orientation)
{
- case 0 : /* Portrait */
+ default : /* Portrait */
pos = XPosition;
break;
case 1 : /* Landscape */
switch (Orientation)
{
- case 0 : /* Portrait */
+ default : /* Portrait */
pos = YPosition;
break;
case 1 : /* Landscape */
/*
- * 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 $".
*/
/*
- * "$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).
*
{
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 */
* 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;
/*
- * 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 $".
*/
/*
- * "$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).
*
* 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 */
/*
/*
- * 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 $".
*/
/*
- * "$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).
*
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 */
/*
- * 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 $".
*/
/*
- * "$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).
*
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)
/*
- * 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 $".
*/
/*
- * "$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.
*
* 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))
{
/*
/*
- * 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 $".
*/