]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/snprintf.c
Load cups into easysw/current.
[thirdparty/cups.git] / cups / snprintf.c
index efd593e736441d42e783df7e813edb65d87d0bbc..018a3f7aeec05edf6408f5686d103405c2219130 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id$"
+ * "$Id: snprintf.c 6649 2007-07-11 21:46:42Z mike $"
  *
  *   snprintf functions for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ *   Copyright 2007 by Apple Inc.
+ *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products 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 missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   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.
  *
@@ -195,7 +186,7 @@ _cups_vsnprintf(char       *buffer, /* O - Output buffer */
 
            sprintf(temp, tformat, va_arg(ap, double));
 
-            bytes += strlen(temp);
+            bytes += (int)strlen(temp);
 
             if (bufptr)
            {
@@ -225,7 +216,7 @@ _cups_vsnprintf(char       *buffer, /* O - Output buffer */
 
            sprintf(temp, tformat, va_arg(ap, int));
 
-            bytes += strlen(temp);
+            bytes += (int)strlen(temp);
 
            if (bufptr)
            {
@@ -248,7 +239,7 @@ _cups_vsnprintf(char       *buffer, /* O - Output buffer */
 
            sprintf(temp, tformat, va_arg(ap, void *));
 
-            bytes += strlen(temp);
+            bytes += (int)strlen(temp);
 
            if (bufptr)
            {
@@ -275,7 +266,7 @@ _cups_vsnprintf(char       *buffer, /* O - Output buffer */
              else
              {
                if ((bufptr + width) > bufend)
-                 width = bufend - bufptr;
+                 width = (int)(bufend - bufptr);
 
                memcpy(bufptr, va_arg(ap, char *), (size_t)width);
                bufptr += width;
@@ -287,7 +278,7 @@ _cups_vsnprintf(char       *buffer, /* O - Output buffer */
            if ((s = va_arg(ap, char *)) == NULL)
              s = "(null)";
 
-           slen = strlen(s);
+           slen = (int)strlen(s);
            if (slen > width && prec != width)
              width = slen;
 
@@ -296,7 +287,7 @@ _cups_vsnprintf(char       *buffer, /* O - Output buffer */
            if (bufptr)
            {
              if ((bufptr + width) > bufend)
-               width = bufend - bufptr;
+               width = (int)(bufend - bufptr);
 
               if (slen > width)
                slen = width;
@@ -368,6 +359,6 @@ _cups_snprintf(char       *buffer,  /* O - Output buffer */
 
 
 /*
- * End of "$Id$".
+ * End of "$Id: snprintf.c 6649 2007-07-11 21:46:42Z mike $".
  */