/*
- * "$Id: cups.h,v 1.16 1999/07/12 12:42:49 mike Exp $"
+ * "$Id: cups.h,v 1.17 1999/07/12 16:09:34 mike Exp $"
*
* API definitions for the Common UNIX Printing System (CUPS).
*
* Functions...
*/
-extern int cupsCancelJob(char *printer, int job);
+extern int cupsCancelJob(const char *printer, int job);
#define cupsDoRequest(http,request,resource) cupsDoFileRequest((http),(request),(resource),NULL)
extern ipp_t *cupsDoFileRequest(http_t *http, ipp_t *request,
- char *resource, char *filename);
+ const char *resource, const char *filename);
extern int cupsGetClasses(char ***classes);
-extern char *cupsGetDefault(void);
-extern char *cupsGetPPD(char *printer);
+extern const char *cupsGetDefault(void);
+extern const char *cupsGetPPD(const char *printer);
extern int cupsGetPrinters(char ***printers);
-extern int cupsPrintFile(char *printer, char *filename, char *title,
- int num_options, cups_option_t *options);
+extern int cupsPrintFile(const char *printer, const char *filename,
+ const char *title, int num_options,
+ cups_option_t *options);
-extern int cupsAddOption(char *name, char *value, int num_options,
- cups_option_t **options);
+extern int cupsAddOption(const char *name, const char *value,
+ int num_options, cups_option_t **options);
extern void cupsFreeOptions(int num_options, cups_option_t *options);
-extern char *cupsGetOption(char *name, int num_options,
+extern const char *cupsGetOption(const char *name, int num_options,
cups_option_t *options);
-extern int cupsParseOptions(char *arg, int num_options,
+extern int cupsParseOptions(const char *arg, int num_options,
cups_option_t **options);
extern int cupsMarkOptions(ppd_file_t *ppd, int num_options,
cups_option_t *options);
-extern char *cupsGetPassword(const char *prompt);
-extern char *cupsServer();
-extern char *cupsUser();
+extern const char *cupsGetPassword(const char *prompt);
+extern const char *cupsServer(void);
+extern const char *cupsUser(void);
# ifdef __cplusplus
}
#endif /* !_CUPS_CUPS_H_ */
/*
- * End of "$Id: cups.h,v 1.16 1999/07/12 12:42:49 mike Exp $".
+ * End of "$Id: cups.h,v 1.17 1999/07/12 16:09:34 mike Exp $".
*/
/*
- * "$Id: filter.c,v 1.8 1999/06/18 18:36:08 mike Exp $"
+ * "$Id: filter.c,v 1.9 1999/07/12 16:09:35 mike Exp $"
*
* File type conversion routines for the Common UNIX Printing System (CUPS).
*
mime_type_t *src, /* I - Source type */
mime_type_t *dst, /* I - Destination type */
int cost, /* I - Relative time/resource cost */
- char *filter) /* I - Filter program to run */
+ const char *filter) /* I - Filter program to run */
{
mime_filter_t *temp; /* New filter */
/*
- * End of "$Id: filter.c,v 1.8 1999/06/18 18:36:08 mike Exp $".
+ * End of "$Id: filter.c,v 1.9 1999/07/12 16:09:35 mike Exp $".
*/
/*
- * "$Id: http.c,v 1.38 1999/07/09 13:08:37 mike Exp $"
+ * "$Id: http.c,v 1.39 1999/07/12 16:09:35 mike Exp $"
*
* HTTP routines for the Common UNIX Printing System (CUPS) scheduler.
*
* Local functions...
*/
-static http_field_t http_field(char *name);
-static int http_send(http_t *http, http_state_t request, char *uri);
+static http_field_t http_field(const char *name);
+static int http_send(http_t *http, http_state_t request,
+ const char *uri);
/*
* Local globals...
*/
-static char *http_fields[] =
+static const char *http_fields[] =
{
"Accept-Language",
"Accept-Ranges",
"User-Agent",
"WWW-Authenticate"
};
-static char *days[7] =
+static const char *days[7] =
{
"Sun",
"Mon",
"Fri",
"Sat"
};
-static char *months[12] =
+static const char *months[12] =
{
"Jan",
"Feb",
*/
http_t * /* O - New HTTP connection */
-httpConnect(char *host, /* I - Host to connect to */
- int port) /* I - Port number */
+httpConnect(const char *host, /* I - Host to connect to */
+ int port) /* I - Port number */
{
http_t *http; /* New HTTP connection */
struct hostent *hostaddr; /* Host address data */
*/
void
-httpSeparate(char *uri, /* I - Universal Resource Identifier */
- char *method, /* O - Method (http, https, etc.) */
- char *username, /* O - Username */
- char *host, /* O - Hostname */
- int *port, /* O - Port number to use */
- char *resource) /* O - Resource/filename */
+httpSeparate(const char *uri, /* I - Universal Resource Identifier */
+ char *method, /* O - Method (http, https, etc.) */
+ char *username, /* O - Username */
+ char *host, /* O - Hostname */
+ int *port, /* O - Port number to use */
+ char *resource) /* O - Resource/filename */
{
char *ptr; /* Pointer into string... */
* OK, we have "hostname:port[/resource]"...
*/
- *port = strtol(uri, &uri, 10);
+ *port = strtol(uri, (char **)&uri, 10);
if (*uri == '/')
strcpy(resource, uri);
void
httpSetField(http_t *http, /* I - HTTP data */
http_field_t field, /* I - Field index */
- char *value) /* I - Value */
+ const char *value) /* I - Value */
{
strncpy(http->fields[field], value, HTTP_MAX_VALUE - 1);
http->fields[field][HTTP_MAX_VALUE - 1] = '\0';
*/
int /* O - Status of call (0 = success) */
-httpDelete(http_t *http, /* I - HTTP data */
- char *uri) /* I - URI to delete */
+httpDelete(http_t *http, /* I - HTTP data */
+ const char *uri) /* I - URI to delete */
{
return (http_send(http, HTTP_DELETE, uri));
}
*/
int /* O - Status of call (0 = success) */
-httpGet(http_t *http, /* I - HTTP data */
- char *uri) /* I - URI to get */
+httpGet(http_t *http, /* I - HTTP data */
+ const char *uri) /* I - URI to get */
{
return (http_send(http, HTTP_GET, uri));
}
*/
int /* O - Status of call (0 = success) */
-httpHead(http_t *http, /* I - HTTP data */
- char *uri) /* I - URI for head */
+httpHead(http_t *http, /* I - HTTP data */
+ const char *uri) /* I - URI for head */
{
return (http_send(http, HTTP_HEAD, uri));
}
*/
int /* O - Status of call (0 = success) */
-httpOptions(http_t *http, /* I - HTTP data */
- char *uri) /* I - URI for options */
+httpOptions(http_t *http, /* I - HTTP data */
+ const char *uri) /* I - URI for options */
{
return (http_send(http, HTTP_OPTIONS, uri));
}
*/
int /* O - Status of call (0 = success) */
-httpPost(http_t *http, /* I - HTTP data */
- char *uri) /* I - URI for post */
+httpPost(http_t *http, /* I - HTTP data */
+ const char *uri) /* I - URI for post */
{
httpGetLength(http);
*/
int /* O - Status of call (0 = success) */
-httpPut(http_t *http, /* I - HTTP data */
- char *uri) /* I - URI to put */
+httpPut(http_t *http, /* I - HTTP data */
+ const char *uri) /* I - URI to put */
{
httpGetLength(http);
*/
int /* O - Status of call (0 = success) */
-httpTrace(http_t *http, /* I - HTTP data */
- char *uri) /* I - URI for trace */
+httpTrace(http_t *http, /* I - HTTP data */
+ const char *uri) /* I - URI for trace */
{
return (http_send(http, HTTP_TRACE, uri));
}
*/
int /* O - Number of bytes written */
-httpWrite(http_t *http, /* I - HTTP data */
- char *buffer, /* I - Buffer for data */
- int length) /* I - Number of bytes to write */
+httpWrite(http_t *http, /* I - HTTP data */
+ const char *buffer, /* I - Buffer for data */
+ int length) /* I - Number of bytes to write */
{
int tbytes, /* Total bytes sent */
bytes; /* Bytes sent */
* 'httpStatus()' - Return a short string describing a HTTP status code.
*/
-char * /* O - String or NULL */
+const char * /* O - String or NULL */
httpStatus(http_status_t status) /* I - HTTP status code */
{
switch (status)
* 'httpGetDateString()' - Get a formatted date/time string from a time value.
*/
-char * /* O - Date/time string */
+const char * /* O - Date/time string */
httpGetDateString(time_t t) /* I - UNIX time */
{
struct tm *tdate;
*/
time_t /* O - UNIX time */
-httpGetDateTime(char *s) /* I - Date/time string */
+httpGetDateTime(const char *s) /* I - Date/time string */
{
int i; /* Looping var */
struct tm tdate; /* Time/date structure */
*/
char * /* O - Decoded string */
-httpDecode64(char *out, /* I - String to write to */
- char *in) /* I - String to read from */
+httpDecode64(char *out, /* I - String to write to */
+ const char *in) /* I - String to read from */
{
int pos, /* Bit position */
base64; /* Value of this character */
*/
char * /* O - Encoded string */
-httpEncode64(char *out, /* I - String to write to */
- char *in) /* I - String to read from */
+httpEncode64(char *out, /* I - String to write to */
+ const char *in) /* I - String to read from */
{
char *outptr; /* Output pointer */
static char base64[] = /* Base64 characters... */
* content-length or transfer-encoding fields.
*/
-int
+int /* O - Content length */
httpGetLength(http_t *http) /* I - HTTP data */
{
if (strcasecmp(http->fields[HTTP_FIELD_TRANSFER_ENCODING], "chunked") == 0)
*/
static http_field_t /* O - Field index */
-http_field(char *name) /* I - String name */
+http_field(const char *name) /* I - String name */
{
int i; /* Looping var */
static int /* O - 0 on success, non-zero on error */
http_send(http_t *http, /* I - HTTP data */
http_state_t request, /* I - Request code */
- char *uri) /* I - URI */
+ const char *uri) /* I - URI */
{
int i; /* Looping var */
char *ptr, /* Pointer in buffer */
buf[1024]; /* Encoded URI buffer */
- static char *codes[] = /* Request code strings */
+ static const char *codes[] = /* Request code strings */
{
NULL,
"OPTIONS",
"TRACE",
"CLOSE"
};
- static char *hex = "0123456789ABCDEF";
+ static const char *hex = "0123456789ABCDEF";
/* Hex digits */
/*
- * End of "$Id: http.c,v 1.38 1999/07/09 13:08:37 mike Exp $".
+ * End of "$Id: http.c,v 1.39 1999/07/12 16:09:35 mike Exp $".
*/
/*
- * "$Id: http.h,v 1.20 1999/07/09 13:08:38 mike Exp $"
+ * "$Id: http.h,v 1.21 1999/07/12 16:09:36 mike Exp $"
*
* Hyper-Text Transport Protocol definitions for the Common UNIX Printing
* System (CUPS).
# define httpClearFields(http) memset((http)->fields, 0, sizeof((http)->fields)),\
httpSetField((http), HTTP_FIELD_HOST, (http)->hostname)
extern void httpClose(http_t *http);
-extern http_t *httpConnect(char *host, int port);
-extern int httpDelete(http_t *http, char *uri);
+extern http_t *httpConnect(const char *host, int port);
+extern int httpDelete(http_t *http, const char *uri);
extern void httpFlush(http_t *http);
-extern int httpGet(http_t *http, char *uri);
+extern int httpGet(http_t *http, const char *uri);
extern char *httpGets(char *line, int length, http_t *http);
-extern char *httpGetDateString(time_t t);
-extern time_t httpGetDateTime(char *s);
+extern const char *httpGetDateString(time_t t);
+extern time_t httpGetDateTime(const char *s);
# define httpGetField(http,field) (http)->fields[field]
-extern int httpHead(http_t *http, char *uri);
+extern int httpHead(http_t *http, const char *uri);
extern void httpInitialize(void);
-extern int httpOptions(http_t *http, char *uri);
-extern int httpPost(http_t *http, char *uri);
+extern int httpOptions(http_t *http, const char *uri);
+extern int httpPost(http_t *http, const char *uri);
extern int httpPrintf(http_t *http, const char *format, ...);
-extern int httpPut(http_t *http, char *uri);
+extern int httpPut(http_t *http, const char *uri);
extern int httpRead(http_t *http, char *buffer, int length);
extern int httpReconnect(http_t *http);
-extern void httpSeparate(char *uri, char *method, char *username,
+extern void httpSeparate(const char *uri, char *method, char *username,
char *host, int *port, char *resource);
-extern void httpSetField(http_t *http, http_field_t field, char *value);
-extern char *httpStatus(http_status_t status);
-extern int httpTrace(http_t *http, char *uri);
+extern void httpSetField(http_t *http, http_field_t field, const char *value);
+extern const char *httpStatus(http_status_t status);
+extern int httpTrace(http_t *http, const char *uri);
extern http_status_t httpUpdate(http_t *http);
-extern int httpWrite(http_t *http, char *buffer, int length);
-extern char *httpEncode64(char *out, char *in);
-extern char *httpDecode64(char *out, char *in);
+extern int httpWrite(http_t *http, const char *buffer, int length);
+extern char *httpEncode64(char *out, const char *in);
+extern char *httpDecode64(char *out, const char *in);
extern int httpGetLength(http_t *http);
#endif /* !_CUPS_HTTP_H_ */
/*
- * End of "$Id: http.h,v 1.20 1999/07/09 13:08:38 mike Exp $".
+ * End of "$Id: http.h,v 1.21 1999/07/12 16:09:36 mike Exp $".
*/
/*
- * "$Id: ipp.c,v 1.19 1999/06/25 12:41:22 mike Exp $"
+ * "$Id: ipp.c,v 1.20 1999/07/12 16:09:36 mike Exp $"
*
* Internet Printing Protocol support functions for the Common UNIX
* Printing System (CUPS).
*/
ipp_attribute_t * /* O - New attribute */
-ippAddBoolean(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- char *name, /* I - Name of attribute */
- char value) /* I - Value of attribute */
+ippAddBoolean(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ const char *name, /* I - Name of attribute */
+ char value) /* I - Value of attribute */
{
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddBooleans(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- char *name, /* I - Name of attribute */
- int num_values, /* I - Number of values */
- char *values) /* I - Values */
+ippAddBooleans(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ const char *name, /* I - Name of attribute */
+ int num_values, /* I - Number of values */
+ const char *values) /* I - Values */
{
int i; /* Looping var */
ipp_attribute_t *attr; /* New attribute */
ipp_attribute_t * /* O - New attribute */
ippAddDate(ipp_t *ipp, /* I - IPP request */
ipp_tag_t group, /* I - IPP group */
- char *name, /* I - Name of attribute */
+ const char *name, /* I - Name of attribute */
ipp_uchar_t *value) /* I - Value */
{
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddInteger(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- ipp_tag_t type, /* I - Type of attribute */
- char *name, /* I - Name of attribute */
- int value) /* I - Value of attribute */
+ippAddInteger(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ ipp_tag_t type, /* I - Type of attribute */
+ const char *name, /* I - Name of attribute */
+ int value) /* I - Value of attribute */
{
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddIntegers(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- ipp_tag_t type, /* I - Type of attribute */
- char *name, /* I - Name of attribute */
- int num_values, /* I - Number of values */
- int *values) /* I - Values */
+ippAddIntegers(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ ipp_tag_t type, /* I - Type of attribute */
+ const char *name, /* I - Name of attribute */
+ int num_values, /* I - Number of values */
+ const int *values) /* I - Values */
{
int i; /* Looping var */
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddString(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- ipp_tag_t type, /* I - Type of attribute */
- char *name, /* I - Name of attribute */
- char *charset, /* I - Character set */
- char *value) /* I - Value */
+ippAddString(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ ipp_tag_t type, /* I - Type of attribute */
+ const char *name, /* I - Name of attribute */
+ const char *charset, /* I - Character set */
+ const char *value) /* I - Value */
{
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddStrings(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- ipp_tag_t type, /* I - Type of attribute */
- char *name, /* I - Name of attribute */
- int num_values, /* I - Number of values */
- char *charset, /* I - Character set */
- char **values) /* I - Values */
+ippAddStrings(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ ipp_tag_t type, /* I - Type of attribute */
+ const char *name, /* I - Name of attribute */
+ int num_values, /* I - Number of values */
+ const char *charset, /* I - Character set */
+ const char **values) /* I - Values */
{
int i; /* Looping var */
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddRange(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- char *name, /* I - Name of attribute */
- int lower, /* I - Lower value */
- int upper) /* I - Upper value */
+ippAddRange(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ const char *name, /* I - Name of attribute */
+ int lower, /* I - Lower value */
+ int upper) /* I - Upper value */
{
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddRanges(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- char *name, /* I - Name of attribute */
- int num_values, /* I - Number of values */
- int *lower, /* I - Lower values */
- int *upper) /* I - Upper values */
+ippAddRanges(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ const char *name, /* I - Name of attribute */
+ int num_values, /* I - Number of values */
+ const int *lower, /* I - Lower values */
+ const int *upper) /* I - Upper values */
{
int i; /* Looping var */
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddResolution(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- char *name, /* I - Name of attribute */
- ipp_res_t units, /* I - Units for resolution */
- int xres, /* I - X resolution */
- int yres) /* I - Y resolution */
+ippAddResolution(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ const char *name, /* I - Name of attribute */
+ ipp_res_t units, /* I - Units for resolution */
+ int xres, /* I - X resolution */
+ int yres) /* I - Y resolution */
{
ipp_attribute_t *attr; /* New attribute */
*/
ipp_attribute_t * /* O - New attribute */
-ippAddResolutions(ipp_t *ipp, /* I - IPP request */
- ipp_tag_t group, /* I - IPP group */
- char *name, /* I - Name of attribute */
- int num_values, /* I - Number of values */
- ipp_res_t units, /* I - Units for resolution */
- int *xres, /* I - X resolutions */
- int *yres) /* I - Y resolutions */
+ippAddResolutions(ipp_t *ipp, /* I - IPP request */
+ ipp_tag_t group, /* I - IPP group */
+ const char *name, /* I - Name of attribute */
+ int num_values,/* I - Number of values */
+ ipp_res_t units, /* I - Units for resolution */
+ const int *xres, /* I - X resolutions */
+ const int *yres) /* I - Y resolutions */
{
int i; /* Looping var */
ipp_attribute_t *attr; /* New attribute */
* in seconds.
*/
-time_t /* O - UNIX time value */
-ippDateToTime(ipp_uchar_t *date)/* I - RFC 1903 date info */
+time_t /* O - UNIX time value */
+ippDateToTime(const ipp_uchar_t *date) /* I - RFC 1903 date info */
{
struct tm unixdate; /* UNIX date/time info */
time_t t; /* Computed time */
*/
ipp_attribute_t * /* O - Matching attribute */
-ippFindAttribute(ipp_t *ipp, /* I - IPP request */
- char *name, /* I - Name of attribute */
- ipp_tag_t type) /* I - Type of attribute */
+ippFindAttribute(ipp_t *ipp, /* I - IPP request */
+ const char *name, /* I - Name of attribute */
+ ipp_tag_t type) /* I - Type of attribute */
{
ipp_attribute_t *attr; /* Current atttribute */
* 'ippTimeToDate()' - Convert from UNIX time to RFC 1903 format.
*/
-ipp_uchar_t * /* O - RFC-1903 date/time data */
+const ipp_uchar_t * /* O - RFC-1903 date/time data */
ippTimeToDate(time_t t) /* I - UNIX time value */
{
struct tm *unixdate; /* UNIX unixdate/time info */
int /* O - Port number */
ippPort(void)
{
- char *server_port; /* SERVER_PORT environment variable */
+ const char *server_port; /* SERVER_PORT environment variable */
struct servent *port; /* Port number info */
}
-
/*
- * End of "$Id: ipp.c,v 1.19 1999/06/25 12:41:22 mike Exp $".
+ * End of "$Id: ipp.c,v 1.20 1999/07/12 16:09:36 mike Exp $".
*/
/*
- * "$Id: ipp.h,v 1.15 1999/05/19 18:00:52 mike Exp $"
+ * "$Id: ipp.h,v 1.16 1999/07/12 16:09:37 mike Exp $"
*
* Internet Printing Protocol definitions for the Common UNIX Printing
* System (CUPS).
* Prototypes...
*/
-extern time_t ippDateToTime(ipp_uchar_t *date);
-extern ipp_attribute_t *ippAddBoolean(ipp_t *ipp, ipp_tag_t group, char *name, char value);
-extern ipp_attribute_t *ippAddBooleans(ipp_t *ipp, ipp_tag_t group, char *name, int num_values, char *values);
-extern ipp_attribute_t *ippAddDate(ipp_t *ipp, ipp_tag_t group, char *name, ipp_uchar_t *value);
-extern ipp_attribute_t *ippAddInteger(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, char *name, int value);
-extern ipp_attribute_t *ippAddIntegers(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, char *name, int num_values, int *values);
-extern ipp_attribute_t *ippAddRange(ipp_t *ipp, ipp_tag_t group, char *name, int lower, int upper);
-extern ipp_attribute_t *ippAddRanges(ipp_t *ipp, ipp_tag_t group, char *name, int num_values, int *lower, int *upper);
-extern ipp_attribute_t *ippAddResolution(ipp_t *ipp, ipp_tag_t group, char *name, ipp_res_t units, int xres, int yres);
-extern ipp_attribute_t *ippAddResolutions(ipp_t *ipp, ipp_tag_t group, char *name, int num_values, ipp_res_t units, int *xres, int *yres);
+extern time_t ippDateToTime(const ipp_uchar_t *date);
+extern ipp_attribute_t *ippAddBoolean(ipp_t *ipp, ipp_tag_t group, const char *name, char value);
+extern ipp_attribute_t *ippAddBooleans(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, const char *values);
+extern ipp_attribute_t *ippAddDate(ipp_t *ipp, ipp_tag_t group, const char *name, ipp_uchar_t *value);
+extern ipp_attribute_t *ippAddInteger(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, const char *name, int value);
+extern ipp_attribute_t *ippAddIntegers(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, const char *name, int num_values, const int *values);
+extern ipp_attribute_t *ippAddRange(ipp_t *ipp, ipp_tag_t group, const char *name, int lower, int upper);
+extern ipp_attribute_t *ippAddRanges(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, const int *lower, const int *upper);
+extern ipp_attribute_t *ippAddResolution(ipp_t *ipp, ipp_tag_t group, const char *name, ipp_res_t units, int xres, int yres);
+extern ipp_attribute_t *ippAddResolutions(ipp_t *ipp, ipp_tag_t group, const char *name, int num_values, ipp_res_t units, const int *xres, const int *yres);
extern ipp_attribute_t *ippAddSeparator(ipp_t *ipp);
-extern ipp_attribute_t *ippAddString(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, char *name, char *charset, char *value);
-extern ipp_attribute_t *ippAddStrings(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, char *name, int num_values, char *charset, char **values);
+extern ipp_attribute_t *ippAddString(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, const char *name, const char *charset, const char *value);
+extern ipp_attribute_t *ippAddStrings(ipp_t *ipp, ipp_tag_t group, ipp_tag_t type, const char *name, int num_values, const char *charset, const char **values);
extern void ippDelete(ipp_t *ipp);
-extern ipp_attribute_t *ippFindAttribute(ipp_t *ipp, char *name, ipp_tag_t type);
+extern ipp_attribute_t *ippFindAttribute(ipp_t *ipp, const char *name, ipp_tag_t type);
extern size_t ippLength(ipp_t *ipp);
extern ipp_t *ippNew(void);
extern ipp_state_t ippRead(http_t *http, ipp_t *ipp);
-extern ipp_uchar_t *ippTimeToDate(time_t t);
+extern const ipp_uchar_t *ippTimeToDate(time_t t);
extern ipp_state_t ippWrite(http_t *http, ipp_t *ipp);
extern int ippPort(void);
#endif /* !_CUPS_IPP_H_ */
/*
- * End of "$Id: ipp.h,v 1.15 1999/05/19 18:00:52 mike Exp $".
+ * End of "$Id: ipp.h,v 1.16 1999/07/12 16:09:37 mike Exp $".
*/
/*
- * "$Id: language.c,v 1.9 1999/06/18 18:36:09 mike Exp $"
+ * "$Id: language.c,v 1.10 1999/07/12 16:09:37 mike Exp $"
*
* I18N/language support for the Common UNIX Printing System (CUPS).
*
*/
cups_lang_t * /* O - Language data */
-cupsLangGet(char *language) /* I - Language or locale */
+cupsLangGet(const char *language) /* I - Language or locale */
{
int i, count; /* Looping vars */
- char real[16], /* Real language name */
+ char langname[16], /* Requested language name */
+ real[16], /* Real language name */
filename[1024], /* Filename for language locale file */
*localedir; /* Directory for locale files */
FILE *fp; /* Language locale file pointer */
*/
if (language == NULL || language[0] == '\0')
- language = "C";
+ strcpy(langname, "C");
+ else
+ strcpy(langname, language);
- if (strlen(language) < 2)
+ if (strlen(langname) < 2)
strcpy(real, "C");
else
{
- real[0] = tolower(language[0]);
- real[1] = tolower(language[1]);
+ real[0] = tolower(langname[0]);
+ real[1] = tolower(langname[1]);
- if (language[2] == '_' || language[2] == '-')
+ if (langname[2] == '_' || langname[2] == '-')
{
real[2] = '_';
- real[3] = toupper(language[3]);
- real[4] = toupper(language[4]);
+ real[3] = toupper(langname[3]);
+ real[4] = toupper(langname[4]);
real[5] = '\0';
- language[5] = '\0';
+ langname[5] = '\0';
}
else
{
- language[2] = '\0';
+ langname[2] = '\0';
real[2] = '\0';
}
}
*/
for (lang = lang_cache; lang != NULL; lang = lang->next)
- if (strcmp(lang->language, language) == 0)
+ if (strcmp(lang->language, langname) == 0)
{
lang->used ++;
*/
lang->used ++;
- strcpy(lang->language, language);
+ strcpy(lang->language, langname);
for (i = 0; i < (sizeof(lang_encodings) / sizeof(lang_encodings[0])); i ++)
if (strcmp(lang_encodings[i], line) == 0)
/*
- * End of "$Id: language.c,v 1.9 1999/06/18 18:36:09 mike Exp $".
+ * End of "$Id: language.c,v 1.10 1999/07/12 16:09:37 mike Exp $".
*/
/*
- * "$Id: language.h,v 1.10 1999/07/12 12:42:50 mike Exp $"
+ * "$Id: language.h,v 1.11 1999/07/12 16:09:37 mike Exp $"
*
* Multi-language support for the Common UNIX Printing System (CUPS).
*
extern char *cupsLangEncoding(cups_lang_t *lang);
extern void cupsLangFlush(void);
extern void cupsLangFree(cups_lang_t *lang);
-extern cups_lang_t *cupsLangGet(char *language);
+extern cups_lang_t *cupsLangGet(const char *language);
# define cupsLangString(lang,msg) (lang)->messages[(msg)]
# ifdef __cplusplus
#endif /* !_CUPS_LANGUAGE_H_ */
/*
- * End of "$Id: language.h,v 1.10 1999/07/12 12:42:50 mike Exp $".
+ * End of "$Id: language.h,v 1.11 1999/07/12 16:09:37 mike Exp $".
*/
/*
- * "$Id: mark.c,v 1.13 1999/07/12 14:02:39 mike Exp $"
+ * "$Id: mark.c,v 1.14 1999/07/12 16:09:38 mike Exp $"
*
* Option marking routines for the Common UNIX Printing System (CUPS).
*
ppd_choice_t * /* O - Choice pointer or NULL */
ppdFindChoice(ppd_option_t *o, /* I - Pointer to option */
- char *choice) /* I - Name of choice */
+ const char *choice) /* I - Name of choice */
{
int i; /* Looping var */
ppd_choice_t *c; /* Current choice */
ppd_choice_t * /* O - Pointer to choice or NULL */
ppdFindMarkedChoice(ppd_file_t *ppd, /* I - PPD file */
- char *option) /* I - Keyword/option name */
+ const char *option) /* I - Keyword/option name */
{
int i; /* Looping var */
ppd_option_t *o; /* Pointer to option */
ppd_option_t * /* O - Pointer to option or NULL */
ppdFindOption(ppd_file_t *ppd, /* I - PPD file data */
- char *option) /* I - Option/Keyword name */
+ const char *option) /* I - Option/Keyword name */
{
int i, j, k; /* Looping vars */
ppd_option_t *o; /* Pointer to option */
int /* O - Non-zero if option is marked */
ppdIsMarked(ppd_file_t *ppd, /* I - PPD file data */
- char *option, /* I - Option/Keyword name */
- char *choice) /* I - Choice name */
+ const char *option, /* I - Option/Keyword name */
+ const char *choice) /* I - Choice name */
{
ppd_option_t *o; /* Option pointer */
ppd_choice_t *c; /* Choice pointer */
int /* O - Number of conflicts */
ppdMarkOption(ppd_file_t *ppd, /* I - PPD file record */
- char *option, /* I - Keyword */
- char *choice) /* I - Option name */
+ const char *option, /* I - Keyword */
+ const char *choice) /* I - Option name */
{
int i; /* Looping var */
ppd_option_t *o; /* Option pointer */
/*
- * End of "$Id: mark.c,v 1.13 1999/07/12 14:02:39 mike Exp $".
+ * End of "$Id: mark.c,v 1.14 1999/07/12 16:09:38 mike Exp $".
*/
/*
- * "$Id: mime.c,v 1.13 1999/06/18 18:36:10 mike Exp $"
+ * "$Id: mime.c,v 1.14 1999/07/12 16:09:38 mike Exp $"
*
* MIME database file routines for the Common UNIX Printing System (CUPS).
*
* Revision History:
*
* $Log: mime.c,v $
+ * Revision 1.14 1999/07/12 16:09:38 mike
+ * Fixed all constant arrays to use "const" modifier.
+ *
* Revision 1.13 1999/06/18 18:36:10 mike
* Fixed address to 44141 Airport View Drive...
*
*/
mime_t * /* O - Updated MIME database */
-mimeMerge(mime_t *mime, /* I - MIME database to add to */
- char *pathname) /* I - Directory to load */
+mimeMerge(mime_t *mime, /* I - MIME database to add to */
+ const char *pathname) /* I - Directory to load */
{
#if defined(WIN32) || defined(__EMX__)
HANDLE dir; /* Directory handle */
/*
- * End of "$Id: mime.c,v 1.13 1999/06/18 18:36:10 mike Exp $".
+ * End of "$Id: mime.c,v 1.14 1999/07/12 16:09:38 mike Exp $".
*/
/*
- * "$Id: mime.h,v 1.5 1999/06/18 18:36:11 mike Exp $"
+ * "$Id: mime.h,v 1.6 1999/07/12 16:09:39 mike Exp $"
*
* MIME type/conversion database definitions for the Common UNIX Printing System (CUPS).
*
extern void mimeDelete(mime_t *mime);
#define mimeLoad(pathname) mimeMerge((mime_t *)0, (pathname));
-extern mime_t *mimeMerge(mime_t *mime, char *pathname);
+extern mime_t *mimeMerge(mime_t *mime, const char *pathname);
extern mime_t *mimeNew(void);
-extern mime_type_t *mimeAddType(mime_t *mime, char *super, char *type);
-extern int mimeAddTypeRule(mime_type_t *mt, char *rule);
-extern mime_type_t *mimeFileType(mime_t *mime, char *pathname);
-extern mime_type_t *mimeType(mime_t *mime, char *super, char *type);
+extern mime_type_t *mimeAddType(mime_t *mime, const char *super, const char *type);
+extern int mimeAddTypeRule(mime_type_t *mt, const char *rule);
+extern mime_type_t *mimeFileType(mime_t *mime, const char *pathname);
+extern mime_type_t *mimeType(mime_t *mime, const char *super, const char *type);
extern mime_filter_t *mimeAddFilter(mime_t *mime, mime_type_t *src, mime_type_t *dst,
- int cost, char *filter);
+ int cost, const char *filter);
extern mime_filter_t *mimeFilter(mime_t *mime, mime_type_t *src, mime_type_t *dst,
int *num_filters);
#endif /* !_MIME_H_ */
/*
- * End of "$Id: mime.h,v 1.5 1999/06/18 18:36:11 mike Exp $".
+ * End of "$Id: mime.h,v 1.6 1999/07/12 16:09:39 mike Exp $".
*/
/*
- * "$Id: options.c,v 1.10 1999/07/12 14:02:40 mike Exp $"
+ * "$Id: options.c,v 1.11 1999/07/12 16:09:39 mike Exp $"
*
* Option routines for the Common UNIX Printing System (CUPS).
*
*/
int /* O - Number of options */
-cupsAddOption(char *name, /* I - Name of option */
- char *value, /* I - Value of option */
+cupsAddOption(const char *name, /* I - Name of option */
+ const char *value, /* I - Value of option */
int num_options, /* I - Number of options */
cups_option_t **options) /* IO - Pointer to options */
{
* 'cupsGetOption()' - Get an option value.
*/
-char * /* O - Option value or NULL */
-cupsGetOption(char *name, /* I - Name of option */
+const char * /* O - Option value or NULL */
+cupsGetOption(const char *name, /* I - Name of option */
int num_options,/* I - Number of options */
cups_option_t *options) /* I - Options */
{
*/
int /* O - Number of options found */
-cupsParseOptions(char *arg, /* I - Argument to parse */
+cupsParseOptions(const char *arg, /* I - Argument to parse */
int num_options, /* I - Number of options */
cups_option_t **options) /* O - Options found */
{
/*
- * End of "$Id: options.c,v 1.10 1999/07/12 14:02:40 mike Exp $".
+ * End of "$Id: options.c,v 1.11 1999/07/12 16:09:39 mike Exp $".
*/
/*
- * "$Id: page.c,v 1.7 1999/07/12 14:02:40 mike Exp $"
+ * "$Id: page.c,v 1.8 1999/07/12 16:09:40 mike Exp $"
*
* Page size functions for the Common UNIX Printing System (CUPS).
*
ppd_size_t * /* O - Size record for page or NULL */
ppdPageSize(ppd_file_t *ppd, /* I - PPD file record */
- char *name) /* I - Size name */
+ const char *name) /* I - Size name */
{
int i; /* Looping var */
float w, l; /* Width and length of page */
float /* O - Width of page in points or 0.0 */
ppdPageWidth(ppd_file_t *ppd, /* I - PPD file record */
- char *name) /* I - Size name */
+ const char *name) /* I - Size name */
{
ppd_size_t *size; /* Page size */
float /* O - Length of page in points or 0.0 */
ppdPageLength(ppd_file_t *ppd, /* I - PPD file */
- char *name) /* I - Size name */
+ const char *name) /* I - Size name */
{
ppd_size_t *size; /* Page size */
/*
- * End of "$Id: page.c,v 1.7 1999/07/12 14:02:40 mike Exp $".
+ * End of "$Id: page.c,v 1.8 1999/07/12 16:09:40 mike Exp $".
*/
/*
- * "$Id: ppd.c,v 1.27 1999/07/12 12:42:50 mike Exp $"
+ * "$Id: ppd.c,v 1.28 1999/07/12 16:09:40 mike Exp $"
*
* PPD file routines for the Common UNIX Printing System (CUPS).
*
*/
ppd_file_t * /* O - PPD file record */
-ppdOpenFile(char *filename) /* I - File to read from */
+ppdOpenFile(const char *filename) /* I - File to read from */
{
FILE *fp; /* File pointer */
ppd_file_t *ppd; /* PPD file record */
/*
- * End of "$Id: ppd.c,v 1.27 1999/07/12 12:42:50 mike Exp $".
+ * End of "$Id: ppd.c,v 1.28 1999/07/12 16:09:40 mike Exp $".
*/
/*
- * "$Id: ppd.h,v 1.15 1999/05/17 18:11:46 mike Exp $"
+ * "$Id: ppd.h,v 1.16 1999/07/12 16:09:41 mike Exp $"
*
* PostScript Printer Description definitions for the Common UNIX Printing
* System (CUPS).
ppd_section_t section);
extern int ppdEmitFd(ppd_file_t *ppd, int fd,
ppd_section_t section);
-extern int ppdIsMarked(ppd_file_t *ppd, char *keyword,
- char *option);
+extern int ppdIsMarked(ppd_file_t *ppd, const char *keyword,
+ const char *option);
extern void ppdMarkDefaults(ppd_file_t *ppd);
-extern int ppdMarkOption(ppd_file_t *ppd, char *keyword,
- char *option);
-extern ppd_choice_t *ppdFindChoice(ppd_option_t *o, char *option);
-extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd, char *keyword);
-extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, char *keyword);
+extern int ppdMarkOption(ppd_file_t *ppd, const char *keyword,
+ const char *option);
+extern ppd_choice_t *ppdFindChoice(ppd_option_t *o, const char *option);
+extern ppd_choice_t *ppdFindMarkedChoice(ppd_file_t *ppd, const char *keyword);
+extern ppd_option_t *ppdFindOption(ppd_file_t *ppd, const char *keyword);
extern ppd_file_t *ppdOpen(FILE *fp);
extern ppd_file_t *ppdOpenFd(int fd);
-extern ppd_file_t *ppdOpenFile(char *filename);
-extern float ppdPageLength(ppd_file_t *ppd, char *name);
-extern ppd_size_t *ppdPageSize(ppd_file_t *ppd, char *name);
-extern float ppdPageWidth(ppd_file_t *ppd, char *name);
+extern ppd_file_t *ppdOpenFile(const char *filename);
+extern float ppdPageLength(ppd_file_t *ppd, const char *name);
+extern ppd_size_t *ppdPageSize(ppd_file_t *ppd, const char *name);
+extern float ppdPageWidth(ppd_file_t *ppd, const char *name);
/*
* C++ magic...
#endif /* !_CUPS_PPD_H_ */
/*
- * End of "$Id: ppd.h,v 1.15 1999/05/17 18:11:46 mike Exp $".
+ * End of "$Id: ppd.h,v 1.16 1999/07/12 16:09:41 mike Exp $".
*/
/*
- * "$Id: testppd.c,v 1.12 1999/06/18 18:36:12 mike Exp $"
+ * "$Id: testppd.c,v 1.13 1999/07/12 16:09:41 mike Exp $"
*
* PPD test program for the Common UNIX Printing System (CUPS).
*
char *argv[]) /* I - Command-line arguments */
{
int i, j, k, m, n; /* Looping vars */
- char *filename; /* File to load */
+ const char *filename; /* File to load */
ppd_file_t *ppd; /* PPD file record */
ppd_size_t *size; /* Size record */
ppd_group_t *group; /* UI group */
/*
- * End of "$Id: testppd.c,v 1.12 1999/06/18 18:36:12 mike Exp $".
+ * End of "$Id: testppd.c,v 1.13 1999/07/12 16:09:41 mike Exp $".
*/
/*
- * "$Id: type.c,v 1.8 1999/06/18 18:36:13 mike Exp $"
+ * "$Id: type.c,v 1.9 1999/07/12 16:09:41 mike Exp $"
*
* MIME typing routines for the Common UNIX Printing System (CUPS).
*
*/
static int compare(mime_type_t **, mime_type_t **);
-static int checkrules(char *, FILE *, mime_magic_t *);
-static int patmatch(char *, char *);
+static int checkrules(const char *, FILE *, mime_magic_t *);
+static int patmatch(const char *, const char *);
/*
*/
mime_type_t * /* O - New (or existing) MIME type */
-mimeAddType(mime_t *mime, /* I - MIME database */
- char *super, /* I - Super-type name */
- char *type) /* I - Type name */
+mimeAddType(mime_t *mime, /* I - MIME database */
+ const char *super, /* I - Super-type name */
+ const char *type) /* I - Type name */
{
mime_type_t *temp, /* New MIME type */
**types; /* New MIME types array */
int /* O - 0 on success, -1 on failure */
mimeAddTypeRule(mime_type_t *mt, /* I - Type to add to */
- char *rule) /* I - Rule to add */
+ const char *rule) /* I - Rule to add */
{
int num_values, /* Number of values seen */
op, /* Operation code */
* 'mimeFileType()' - Determine the type of a file.
*/
-mime_type_t * /* O - Type of file */
-mimeFileType(mime_t *mime, /* I - MIME database */
- char *pathname) /* I - Name of file to check */
+mime_type_t * /* O - Type of file */
+mimeFileType(mime_t *mime, /* I - MIME database */
+ const char *pathname) /* I - Name of file to check */
{
int i; /* Looping var */
FILE *fp; /* File pointer */
mime_type_t **types; /* File types */
- char *filename; /* Base filename of file */
+ const char *filename; /* Base filename of file */
/*
*/
mime_type_t * /* O - Matching file type definition */
-mimeType(mime_t *mime, /* I - MIME database */
- char *super, /* I - Super-type name */
- char *type) /* I - Type name */
+mimeType(mime_t *mime, /* I - MIME database */
+ const char *super, /* I - Super-type name */
+ const char *type) /* I - Type name */
{
mime_type_t key, /* MIME type search key*/
*keyptr, /* Key pointer... */
*/
static int /* O - 1 if match, 0 if no match */
-checkrules(char *filename, /* I - Filename */
+checkrules(const char *filename, /* I - Filename */
FILE *fp, /* I - File to check */
mime_magic_t *rules) /* I - Rules to check */
{
* 'patmatch()' - Pattern matching...
*/
-static int /* O - 1 if match, 0 if no match */
-patmatch(char *s, /* I - String to match against */
- char *pat) /* I - Pattern to match against */
+static int /* O - 1 if match, 0 if no match */
+patmatch(const char *s, /* I - String to match against */
+ const char *pat) /* I - Pattern to match against */
{
/*
* Range check the input...
/*
- * End of "$Id: type.c,v 1.8 1999/06/18 18:36:13 mike Exp $".
+ * End of "$Id: type.c,v 1.9 1999/07/12 16:09:41 mike Exp $".
*/
/*
- * "$Id: usersys.c,v 1.1 1999/06/21 18:46:15 mike Exp $"
+ * "$Id: usersys.c,v 1.2 1999/07/12 16:09:42 mike Exp $"
*
* User, system, and password routines for the Common UNIX Printing
* System (CUPS).
* 'cupsUser()' - Return the current user's name.
*/
-char * /* O - User name */
+const char * /* O - User name */
cupsUser(void)
{
return ("WindowsUser");
* 'cupsGetPassword()' - Get a password from the user...
*/
-char * /* O - Password */
+const char * /* O - Password */
cupsGetPassword(const char *prompt) /* I - Prompt string */
{
return (NULL);
* 'cupsUser()' - Return the current user's name.
*/
-char * /* O - User name */
+const char * /* O - User name */
cupsUser(void)
{
struct passwd *pwd; /* User/password entry */
* 'cupsGetPassword()' - Get a password from the user...
*/
-char * /* O - Password */
+const char * /* O - Password */
cupsGetPassword(const char *prompt) /* I - Prompt string */
{
return (getpass(prompt));
* 'cupsServer()' - Return the hostname of the default server...
*/
-char * /* O - Server name */
+const char * /* O - Server name */
cupsServer(void)
{
FILE *fp; /* cupsd.conf file */
/*
- * End of "$Id: usersys.c,v 1.1 1999/06/21 18:46:15 mike Exp $".
+ * End of "$Id: usersys.c,v 1.2 1999/07/12 16:09:42 mike Exp $".
*/
/*
- * "$Id: util.c,v 1.25 1999/07/12 12:42:50 mike Exp $"
+ * "$Id: util.c,v 1.26 1999/07/12 16:09:42 mike Exp $"
*
* Printing utilities for the Common UNIX Printing System (CUPS).
*
* Local functions...
*/
-static char *cups_connect(char *name, char *printer, char *hostname);
+static char *cups_connect(const char *name, char *printer, char *hostname);
/*
*/
int /* O - 1 on success, 0 on failure */
-cupsCancelJob(char *name, /* I - Name of printer or class */
- int job) /* I - Job ID */
+cupsCancelJob(const char *name, /* I - Name of printer or class */
+ int job) /* I - Job ID */
{
char printer[HTTP_MAX_URI], /* Printer name */
hostname[HTTP_MAX_URI], /* Hostname */
*/
ipp_t * /* O - Response data */
-cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
- ipp_t *request, /* I - IPP request */
- char *resource, /* I - HTTP resource for POST */
- char *filename) /* I - File to send or NULL */
+cupsDoFileRequest(http_t *http, /* I - HTTP connection to server */
+ ipp_t *request, /* I - IPP request */
+ const char *resource, /* I - HTTP resource for POST */
+ const char *filename) /* I - File to send or NULL */
{
ipp_t *response; /* IPP response data */
char length[255]; /* Content-Length field */
struct stat fileinfo; /* File information */
int bytes; /* Number of bytes read/written */
char buffer[8192]; /* Output buffer */
- char *password, /* Password string */
- plain[255], /* Plaintext username:password */
+ const char *password; /* Password string */
+ char plain[255], /* Plaintext username:password */
encode[255]; /* Encoded username:password */
char junk[8192]; /* Junk buffer for error data */
static char authstring[255] = "";
* 'cupsGetDefault()' - Get the default printer or class.
*/
-char * /* O - Default printer or NULL */
+const char * /* O - Default printer or NULL */
cupsGetDefault(void)
{
ipp_t *request, /* IPP Request */
* 'cupsGetPPD()' - Get the PPD file for a printer.
*/
-char * /* O - Filename for PPD file */
-cupsGetPPD(char *name) /* I - Printer name */
+const char * /* O - Filename for PPD file */
+cupsGetPPD(const char *name) /* I - Printer name */
{
FILE *fp; /* PPD file */
int bytes; /* Number of bytes read */
*/
int /* O - Job ID */
-cupsPrintFile(char *name, /* I - Printer or class name */
- char *filename, /* I - File to print */
- char *title, /* I - Title of job */
+cupsPrintFile(const char *name, /* I - Printer or class name */
+ const char *filename, /* I - File to print */
+ const char *title, /* I - Title of job */
int num_options,/* I - Number of options */
cups_option_t *options) /* I - Options */
{
* 'cups_connect()' - Connect to the specified host...
*/
-static char * /* I - Printer name if success, NULL if fail */
-cups_connect(char *name, /* I - Destination (printer[@host]) */
- char *printer, /* O - Printer name */
- char *hostname) /* O - Hostname */
+static char * /* I - Printer name or NULL */
+cups_connect(const char *name, /* I - Destination (printer[@host]) */
+ char *printer, /* O - Printer name */
+ char *hostname) /* O - Hostname */
{
char hostbuf[HTTP_MAX_URI];
/* Name of host */
/*
- * End of "$Id: util.c,v 1.25 1999/07/12 12:42:50 mike Exp $".
+ * End of "$Id: util.c,v 1.26 1999/07/12 16:09:42 mike Exp $".
*/