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;
}
/* 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;
}
/* 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;
}
/* 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 (),
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"
/* 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));
}
}