]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 15 May 2002 01:57:04 +0000 (01:57 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 15 May 2002 01:57:04 +0000 (01:57 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@2407 7a7537e8-13f0-0310-91df-b6672ffda945

cups/http.h
cups/snprintf.c
cups/string.c
cups/string.h
scheduler/client.c
scheduler/conf.h
scheduler/ipp.c
scheduler/job.c

index 3d3c1e4fd4d95619815de3f556abbeb78f955cea..7544be4fff98152bca85431cb97257a9e0109d9c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.h,v 1.33.2.11 2002/05/09 03:44:17 mike Exp $"
+ * "$Id: http.h,v 1.33.2.12 2002/05/15 01:57:00 mike Exp $"
  *
  *   Hyper-Text Transport Protocol definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -330,7 +330,11 @@ extern int         httpHead(http_t *http, const char *uri);
 extern void            httpInitialize(void);
 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             httpPrintf(http_t *http, const char *format, ...)
+#  ifdef __GNUC__
+__attribute__ ((__format__ (__printf__, 2, 3)))
+#  endif /* __GNUC__ */
+;
 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);
@@ -373,5 +377,5 @@ extern char         *httpAddrString(const http_addr_t *addr,
 #endif /* !_IPP_HTTP_H_ */
 
 /*
- * End of "$Id: http.h,v 1.33.2.11 2002/05/09 03:44:17 mike Exp $".
+ * End of "$Id: http.h,v 1.33.2.12 2002/05/15 01:57:00 mike Exp $".
  */
index 59da4ce28062bf63fb6111a8658510864b16dbda..1ede4b1f402872904a353dbf6d27d0e12d1ab90f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: snprintf.c,v 1.4.2.4 2002/05/09 02:22:09 mike Exp $"
+ * "$Id: snprintf.c,v 1.4.2.5 2002/05/15 01:57:00 mike Exp $"
  *
  *   snprintf functions for the Common UNIX Printing System (CUPS).
  *
@@ -25,8 +25,8 @@
  *
  * Contents:
  *
- *   ipp_vsnprintf() - Format a string into a fixed size buffer.
- *   ipp_snprintf()  - Format a string into a fixed size buffer.
+ *   cups_vsnprintf() - Format a string into a fixed size buffer.
+ *   cups_snprintf()  - Format a string into a fixed size buffer.
  */
 
 /*
 
 #ifndef HAVE_VSNPRINTF
 /*
- * 'ipp_vsnprintf()' - Format a string into a fixed size buffer.
+ * 'cups_vsnprintf()' - Format a string into a fixed size buffer.
  */
 
 int                                    /* O - Number of bytes formatted */
-ipp_vsnprintf(char       *buffer,      /* O - Output buffer */
+cups_vsnprintf(char       *buffer,     /* O - Output buffer */
               size_t     bufsize,      /* O - Size of output buffer */
              const char *format,       /* I - printf-style format string */
              va_list    ap)            /* I - Pointer to additional arguments */
@@ -261,11 +261,11 @@ ipp_vsnprintf(char       *buffer, /* O - Output buffer */
 
 #ifndef HAVE_SNPRINTF
 /*
- * 'ipp_snprintf()' - Format a string into a fixed size buffer.
+ * 'cups_snprintf()' - Format a string into a fixed size buffer.
  */
 
 int                                    /* O - Number of bytes formatted */
-ipp_snprintf(char       *buffer,       /* O - Output buffer */
+cups_snprintf(char       *buffer,      /* O - Output buffer */
              size_t     bufsize,       /* O - Size of output buffer */
              const char *format,       /* I - printf-style format string */
             ...)                       /* I - Additional arguments as needed */
@@ -284,6 +284,6 @@ ipp_snprintf(char       *buffer,    /* O - Output buffer */
 
 
 /*
- * End of "$Id: snprintf.c,v 1.4.2.4 2002/05/09 02:22:09 mike Exp $".
+ * End of "$Id: snprintf.c,v 1.4.2.5 2002/05/15 01:57:00 mike Exp $".
  */
 
index f60f83008b96c089d5ef5e7928af888573ffba66..16acbfd708444ab0a4a4dc0eb309ad4c0008e446 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: string.c,v 1.5.2.4 2002/05/09 02:22:09 mike Exp $"
+ * "$Id: string.c,v 1.5.2.5 2002/05/15 01:57:01 mike Exp $"
  *
  *   String functions for the Common UNIX Printing System (CUPS).
  *
@@ -25,9 +25,9 @@
  *
  * Contents:
  *
- *   ipp_strdup()      - Duplicate a string.
- *   ipp_strcasecmp()  - Do a case-insensitive comparison.
- *   ipp_strncasecmp() - Do a case-insensitive comparison on up to N chars.
+ *   cups_strdup()      - Duplicate a string.
+ *   cups_strcasecmp()  - Do a case-insensitive comparison.
+ *   cups_strncasecmp() - Do a case-insensitive comparison on up to N chars.
  */
 
 /*
 
 
 /*
- * 'ipp_strdup()' - Duplicate a string.
+ * 'cups_strdup()' - Duplicate a string.
  */
 
 #  ifndef HAVE_STRDUP
 char *                         /* O - New string pointer */
-ipp_strdup(const char *s)      /* I - String to duplicate */
+cups_strdup(const char *s)     /* I - String to duplicate */
 {
   char *t;                     /* New string pointer */
 
@@ -60,12 +60,12 @@ ipp_strdup(const char *s)   /* I - String to duplicate */
 
 
 /*
- * 'ipp_strcasecmp()' - Do a case-insensitive comparison.
+ * 'cups_strcasecmp()' - Do a case-insensitive comparison.
  */
 
 #  ifndef HAVE_STRCASECMP
 int                            /* O - Result of comparison (-1, 0, or 1) */
-ipp_strcasecmp(const char *s,  /* I - First string */
+cups_strcasecmp(const char *s, /* I - First string */
                const char *t)  /* I - Second string */
 {
   while (*s != '\0' && *t != '\0')
@@ -89,12 +89,12 @@ ipp_strcasecmp(const char *s,       /* I - First string */
 #  endif /* !HAVE_STRCASECMP */
 
 /*
- * 'ipp_strncasecmp()' - Do a case-insensitive comparison on up to N chars.
+ * 'cups_strncasecmp()' - Do a case-insensitive comparison on up to N chars.
  */
 
 #  ifndef HAVE_STRNCASECMP
 int                            /* O - Result of comparison (-1, 0, or 1) */
-ipp_strncasecmp(const char *s, /* I - First string */
+cups_strncasecmp(const char *s,        /* I - First string */
                 const char *t, /* I - Second string */
                size_t     n)   /* I - Maximum number of characters to compare */
 {
@@ -123,5 +123,5 @@ ipp_strncasecmp(const char *s,      /* I - First string */
 
 
 /*
- * End of "$Id: string.c,v 1.5.2.4 2002/05/09 02:22:09 mike Exp $".
+ * End of "$Id: string.c,v 1.5.2.5 2002/05/15 01:57:01 mike Exp $".
  */
index 5c55fc6548aeee720144f796092e09fcae0a39e5..c58c192b85d98298508a6f5b98996b25dc5752f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: string.h,v 1.7.2.6 2002/05/09 02:22:09 mike Exp $"
+ * "$Id: string.h,v 1.7.2.7 2002/05/15 01:57:01 mike Exp $"
  *
  *   String definitions for the Common UNIX Printing System (CUPS).
  *
@@ -70,28 +70,32 @@ extern "C" {
  */
 
 #  ifndef HAVE_STRDUP
-extern char    *ipp_strdup(const char *);
-#    define strdup ipp_strdup
+extern char    *cups_strdup(const char *);
+#    define strdup cups_strdup
 #  endif /* !HAVE_STRDUP */
 
 #  ifndef HAVE_STRCASECMP
-extern int     ipp_strcasecmp(const char *, const char *);
-#    define strcasecmp ipp_strcasecmp
+extern int     cups_strcasecmp(const char *, const char *);
+#    define strcasecmp cups_strcasecmp
 #  endif /* !HAVE_STRCASECMP */
 
 #  ifndef HAVE_STRNCASECMP
-extern int     ipp_strncasecmp(const char *, const char *, size_t n);
-#    define strncasecmp ipp_strncasecmp
+extern int     cups_strncasecmp(const char *, const char *, size_t n);
+#    define strncasecmp cups_strncasecmp
 #  endif /* !HAVE_STRNCASECMP */
 
 #  ifndef HAVE_SNPRINTF
-extern int     ipp_snprintf(char *, size_t, const char *, ...);
-#    define snprintf ipp_snprintf
+extern int     cups_snprintf(char *, size_t, const char *, ...)
+#    ifdef __GNUC__
+__attribute__ ((__format__ (__printf__, 3, 4)))
+#    endif /* __GNUC__ */
+;
+#    define snprintf cups_snprintf
 #  endif /* !HAVE_SNPRINTF */
 
 #  ifndef HAVE_VSNPRINTF
-extern int     ipp_vsnprintf(char *, size_t, const char *, va_list);
-#    define vsnprintf ipp_vsnprintf
+extern int     cups_vsnprintf(char *, size_t, const char *, va_list);
+#    define vsnprintf cups_vsnprintf
 #  endif /* !HAVE_VSNPRINTF */
 
 
@@ -106,5 +110,5 @@ extern int  ipp_vsnprintf(char *, size_t, const char *, va_list);
 #endif /* !_IPP_STRING_H_ */
 
 /*
- * End of "$Id: string.h,v 1.7.2.6 2002/05/09 02:22:09 mike Exp $".
+ * End of "$Id: string.h,v 1.7.2.7 2002/05/15 01:57:01 mike Exp $".
  */
index c7462114c496a754860a1a05620bfcc7660281ac..d78f2093b16275953c18b6bd0565bada379e0203 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: client.c,v 1.91.2.10 2002/04/23 18:40:41 mike Exp $"
+ * "$Id: client.c,v 1.91.2.11 2002/05/15 01:57:01 mike Exp $"
  *
  *   Client routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -83,7 +83,7 @@ AcceptClient(listener_t *lis) /* I - Listener socket */
   http_addr_t          temp;   /* Temporary address variable */
 
 
-  LogMessage(L_DEBUG2, "AcceptClient(%08x) %d NumClients = %d",
+  LogMessage(L_DEBUG2, "AcceptClient(%p) %d NumClients = %d",
              lis, lis->fd, NumClients);
 
  /*
@@ -1245,7 +1245,7 @@ ReadClient(client_t *con) /* I - Client to read from */
          fstat(con->file, &filestats);
 
           LogMessage(L_DEBUG2, "ReadClient() %d Closing data file %d, size = %d.",
-                     con->http.fd, con->file, filestats.st_size);
+                     con->http.fd, con->file, (int)filestats.st_size);
 
          close(con->file);
          con->file = 0;
@@ -1385,7 +1385,7 @@ ReadClient(client_t *con) /* I - Client to read from */
            fstat(con->file, &filestats);
 
             LogMessage(L_DEBUG2, "ReadClient() %d Closing data file %d, size = %d.",
-                       con->http.fd, con->file, filestats.st_size);
+                       con->http.fd, con->file, (int)filestats.st_size);
 
            close(con->file);
            con->file = 0;
@@ -1911,7 +1911,8 @@ check_if_modified(client_t    *con,               /* I - Client connection */
   }
 
   LogMessage(L_DEBUG2, "check_if_modified() %d sizes=%d,%d dates=%d,%d",
-             con->http.fd, size, filestats->st_size, date, filestats->st_mtime);
+             con->http.fd, size, (int)filestats->st_size, (int)date,
+            (int)filestats->st_mtime);
 
   return ((size != filestats->st_size && size != 0) ||
           (date < filestats->st_mtime && date != 0) ||
@@ -1937,7 +1938,7 @@ decode_auth(client_t *con)                /* I - Client to decode to */
 
   s = con->http.fields[HTTP_FIELD_AUTHORIZATION];
 
-  LogMessage(L_DEBUG2, "decode_auth(%08x): Authorization string = \"%s\"",
+  LogMessage(L_DEBUG2, "decode_auth(%p): Authorization string = \"%s\"",
              con, s);
 
   if (strncmp(s, "Basic", 5) == 0)
@@ -2072,7 +2073,7 @@ get_file(client_t    *con,        /* I - Client connection */
   }
 
   LogMessage(L_DEBUG2, "get_file() %d filename=%s size=%d",
-             con->http.fd, filename, status ? -1 : filestats->st_size);
+             con->http.fd, filename, status ? -1 : (int)filestats->st_size);
 
   if (status)
     return (NULL);
@@ -2535,5 +2536,5 @@ pipe_command(client_t *con,       /* I - Client connection */
 
 
 /*
- * End of "$Id: client.c,v 1.91.2.10 2002/04/23 18:40:41 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.11 2002/05/15 01:57:01 mike Exp $".
  */
index be0d14d9d827f35391eb1562ed0ec77787b52668..a269a79678ad4961a055c048003b1e546a974963 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: conf.h,v 1.36.2.4 2002/05/14 01:25:41 mike Exp $"
+ * "$Id: conf.h,v 1.36.2.5 2002/05/15 01:57:02 mike Exp $"
  *
  *   Configuration file definitions for the Common UNIX Printing System (CUPS)
  *   scheduler.
@@ -164,10 +164,14 @@ VAR char          ServerCertificate[1024] VALUE("ssl/server.crt"),
 extern char    *GetDateTime(time_t t);
 extern int     ReadConfiguration(void);
 extern int     LogRequest(client_t *con, http_status_t code);
-extern int     LogMessage(int level, const char *message, ...);
+extern int     LogMessage(int level, const char *message, ...)
+#ifdef __GNUC__
+__attribute__ ((__format__ (__printf__, 2, 3)))
+#endif /* __GNUC__ */
+;
 extern int     LogPage(job_t *job, const char *page);
 
 
 /*
- * End of "$Id: conf.h,v 1.36.2.4 2002/05/14 01:25:41 mike Exp $".
+ * End of "$Id: conf.h,v 1.36.2.5 2002/05/15 01:57:02 mike Exp $".
  */
index 0fd9a306469980a05060660884a371130866d620..6b57d91da839692c1bb4410d051289a0c61e9fab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: ipp.c,v 1.127.2.13 2002/05/09 03:08:02 mike Exp $"
+ * "$Id: ipp.c,v 1.127.2.14 2002/05/15 01:57:02 mike Exp $"
  *
  *   IPP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -4344,7 +4344,7 @@ print_job(client_t        *con,           /* I - Client connection */
 
   LogMessage(L_INFO, "Job %d queued on \'%s\' by \'%s\'.", job->id,
              job->dest, job->username);
-  LogMessage(L_DEBUG, "Job %d hold_until = %d", job->id, job->hold_until);
+  LogMessage(L_DEBUG, "Job %d hold_until = %d", job->id, (int)job->hold_until);
 
   SaveJob(job->id);
 
@@ -5823,5 +5823,5 @@ validate_user(client_t   *con,            /* I - Client connection */
 
 
 /*
- * End of "$Id: ipp.c,v 1.127.2.13 2002/05/09 03:08:02 mike Exp $".
+ * End of "$Id: ipp.c,v 1.127.2.14 2002/05/15 01:57:02 mike Exp $".
  */
index 028a55ac4e7819f0823594ba0898a37b7fe78827..0fbcf12b5a14ce5cfdc49ecc5a454ccdd48e794e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: job.c,v 1.124.2.16 2002/05/14 01:25:42 mike Exp $"
+ * "$Id: job.c,v 1.124.2.17 2002/05/15 01:57:04 mike Exp $"
  *
  *   Job management routines for the Common UNIX Printing System (CUPS).
  *
@@ -978,7 +978,7 @@ SetJobHoldUntil(int        id,              /* I - Job ID */
       job->hold_until += 24 * 60 * 60 * 60;
   }
 
-  LogMessage(L_DEBUG, "SetJobHoldUntil: hold_until = %d", job->hold_until);
+  LogMessage(L_DEBUG, "SetJobHoldUntil: hold_until = %d", (int)job->hold_until);
 }
 
 
@@ -1106,7 +1106,7 @@ StartJob(int       id,            /* I - Job ID */
                fontpath[1050]; /* CUPS_FONTPATH environment variable */
 
 
-  LogMessage(L_DEBUG, "StartJob(%d, %08x)", id, printer);
+  LogMessage(L_DEBUG, "StartJob(%d, %p)", id, printer);
 
   for (current = Jobs; current != NULL; current = current->next)
     if (current->id == id)
@@ -2221,7 +2221,7 @@ start_process(const char *command,        /* I - Full path to command */
   int  pid;                            /* Process ID */
 
 
-  LogMessage(L_DEBUG, "start_process(\"%s\", %08x, %08x, %d, %d, %d)",
+  LogMessage(L_DEBUG, "start_process(\"%s\", %p, %p, %d, %d, %d)",
              command, argv, envp, infd, outfd, errfd);
 
   if ((pid = fork()) == 0)
@@ -2311,5 +2311,5 @@ start_process(const char *command,        /* I - Full path to command */
 
 
 /*
- * End of "$Id: job.c,v 1.124.2.16 2002/05/14 01:25:42 mike Exp $".
+ * End of "$Id: job.c,v 1.124.2.17 2002/05/15 01:57:04 mike Exp $".
  */