]> git.sur5r.net Git - cc65/blobdiff - src/sp65/c.c
Add sample linker configurations for Atari binary output in C.
[cc65] / src / sp65 / c.c
index 537333b67aeeff5a3139beb14db599f1ef5c58f9..57950ca6d850b0f934c2acef452b44d22c21a7fd 100644 (file)
@@ -89,7 +89,7 @@ static unsigned GetBytesPerLine (const Collection* A)
     const char* V = GetAttrVal (A, "bytesperline");
     if ((V && sscanf (V, "%u%c", &BytesPerLine, &C) != 1) ||
         (BytesPerLine < 1 || BytesPerLine > 64)) {
-        Error ("Invalid value for attribute `bytesperline'");
+        Error ("Invalid value for attribute 'bytesperline'");
     }
     return BytesPerLine;
 }
@@ -105,7 +105,7 @@ static unsigned GetBase (const Collection* A)
     /* Check for a base attribute */
     const char* V = GetAttrVal (A, "base");
     if ((V && sscanf (V, "%u%c", &Base, &C) != 1) || (Base != 10 && Base != 16)) {
-        Error ("Invalid value for attribute `base'");
+        Error ("Invalid value for attribute 'base'");
     }
     return Base;
 }
@@ -118,7 +118,7 @@ static const char* GetIdentifier (const Collection* A)
     /* Check for a ident attribute */
     const char* Ident = GetAttrVal (A, "ident");
     if (Ident && !ValidIdentifier (Ident)) {
-        Error ("Invalid value for attribute `ident'");
+        Error ("Invalid value for attribute 'ident'");
     }
     return Ident;
 }
@@ -151,15 +151,15 @@ void WriteCFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
     /* Open the output file */
     F = fopen (Name, "w");
     if (F == 0) {
-        Error ("Cannot open output file `%s': %s", Name, strerror (errno));
+        Error ("Cannot open output file '%s': %s", Name, strerror (errno));
     }
 
     /* Write a readable header */
     fprintf (F,
              "/*\n"
-             " * This file was generated by %s %s from\n"
-             " * %.*s (%ux%u, %u colors%s)\n"
-             " */\n"
+             "** This file was generated by %s %s from\n"
+             "** %.*s (%ux%u, %u colors%s)\n"
+             "*/\n"
              "\n",
              ProgName,
              GetVersionAsString (),
@@ -169,8 +169,8 @@ void WriteCFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
              BitmapIsIndexed (B)? ", indexed" : "");
 
     /* If an identifier was given, output #defines for width, height, the
-     * number of colors and declare a variable for the data.
-     */
+    ** number of colors and declare a variable for the data.
+    */
     if (Ident) {
         fprintf (F,
                  "#define %s_COLORS       %u\n"
@@ -220,9 +220,6 @@ void WriteCFile (const StrBuf* Data, const Collection* A, const Bitmap* B)
 
     /* Close the file */
     if (fclose (F) != 0) {
-        Error ("Error closing output file `%s': %s", Name, strerror (errno));
+        Error ("Error closing output file '%s': %s", Name, strerror (errno));
     }
 }
-
-
-