]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/adminutil.c
Fix build errors on Fedora.
[thirdparty/cups.git] / cups / adminutil.c
index 8b5a5302024a47837d949288468de7cc5ae4efa3..81234f083a5cccb0c9357de49ad43e728749e939 100644 (file)
@@ -1,29 +1,18 @@
 /*
- * "$Id: adminutil.c 7850 2008-08-20 00:07:25Z mike $"
+ * "$Id$"
  *
- *   Administration utility API definitions for CUPS.
+ * Administration utility API definitions for CUPS.
  *
- *   Copyright 2007-2013 by Apple Inc.
- *   Copyright 2001-2007 by Easy Software Products.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 2001-2007 by Easy Software Products.
  *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   cupsAdminCreateWindowsPPD()  - Create the Windows PPD file for a printer.
- *   cupsAdminExportSamba()       - Export a printer to Samba.
- *   cupsAdminGetServerSettings() - Get settings from the server.
- *   cupsAdminSetServerSettings() - Set settings on the server.
- *   do_samba_command()           - Do a SAMBA command.
- *   get_cupsd_conf()             - Get the current cupsd.conf file.
- *   invalidate_cupsd_cache()     - Invalidate the cached cupsd.conf settings.
- *   write_option()               - Write a CUPS option to a PPD file.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 /*
@@ -52,7 +41,7 @@ static int            do_samba_command(const char *command,
                                         FILE *logfile);
 static http_status_t   get_cupsd_conf(http_t *http, _cups_globals_t *cg,
                                       time_t last_update, char *name,
-                                      int namelen, int *remote);
+                                      size_t namelen, int *remote);
 static void            invalidate_cupsd_cache(_cups_globals_t *cg);
 static void            write_option(cups_file_t *dstfp, int order,
                                     const char *name, const char *text,
@@ -319,7 +308,7 @@ cupsAdminCreateWindowsPPD(
        }
       }
 
-      snprintf(ptr + 1, sizeof(line) - (ptr - line + 1),
+      snprintf(ptr + 1, sizeof(line) - (size_t)(ptr - line + 1),
                "%%cupsJobTicket: %s=%s\n\"\n*End", option, choice);
 
       cupsFilePrintf(dstfp, "*%% Changed for CUPS Windows Driver...\n%s\n",
@@ -2120,7 +2109,7 @@ get_cupsd_conf(
     _cups_globals_t *cg,               /* I - Global data */
     time_t          last_update,       /* I - Last update time for file */
     char            *name,             /* I - Filename buffer */
-    int             namesize,          /* I - Size of filename buffer */
+    size_t          namesize,          /* I - Size of filename buffer */
     int             *remote)           /* O - Remote file? */
 {
   int          fd;                     /* Temporary file descriptor */
@@ -2337,5 +2326,5 @@ write_option(cups_file_t     *dstfp,      /* I - PPD file */
 
 
 /*
- * End of "$Id: adminutil.c 7850 2008-08-20 00:07:25Z mike $".
+ * End of "$Id$".
  */