]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - locale/strings2po.c
Import experimental work-in-progress HTTP/2 branch
[thirdparty/cups.git] / locale / strings2po.c
index 1278c6c55fb32b11798c4973055fe1a53559b019..ab37733edb205fb078fca89f3c4d83385547cea0 100644 (file)
@@ -1,8 +1,16 @@
 /*
- * "$Id$"
+ * "$Id: strings2po.c 11984 2014-07-02 13:16:59Z msweet $"
  *
  * Convert Apple .strings file (UTF-16 BE text file) to GNU gettext .po files.
  *
+ * Copyright 2007-2014 by Apple Inc.
+ *
+ * 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/".
+ *
  * Usage:
  *
  *   strings2po filename.strings filename.po
  * Compile with:
  *
  *   gcc -o strings2po strings2po.c
- *
- * Contents:
- *
- *   main()         - Convert .strings file to .po.
- *   read_strings() - Read a line from a .strings file.
- *   write_po()     - Write a line to the .po file.
  */
 
 #include <stdio.h>
@@ -116,7 +118,7 @@ read_strings(FILE   *strings,               /* I - .strings file */
   char *bufptr;                        /* Pointer into buffer */
 
 
-  while (fgets(buffer, bufsize, strings))
+  while (fgets(buffer, (int)bufsize, strings))
   {
     if (buffer[0] != '\"')
       continue;
@@ -148,7 +150,7 @@ read_strings(FILE   *strings,               /* I - .strings file */
     if (*bufptr != '\"')
       continue;
 
-    *bufptr++ = '\0';
+    *bufptr = '\0';
 
     return (1);
   }
@@ -171,5 +173,5 @@ write_po(FILE       *po,            /* I - .po file */
 
 
 /*
- * End of "$Id$".
+ * End of "$Id: strings2po.c 11984 2014-07-02 13:16:59Z msweet $".
  */