Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/asm/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ static void verboseOutputConfig() {
fputs("\tGenerate phony dependencies\n", stderr);
}
}
fputs("Ready.\n", stderr);
fputs("Ready for assembly\n", stderr);

style_Reset(stderr);
}
Expand Down
2 changes: 1 addition & 1 deletion src/asm/symbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static uint32_t anonLabelID = 0;
Symbol *sym_AddAnonLabel() {
if (anonLabelID == UINT32_MAX) {
// LCOV_EXCL_START
error("Only %" PRIu32 " anonymous labels can be created!", anonLabelID);
error("Only %" PRIu32 " anonymous labels can be created", anonLabelID);
return nullptr;
// LCOV_EXCL_STOP
}
Expand Down
4 changes: 2 additions & 2 deletions src/asm/warning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static void incrementErrors() {
style_Set(stderr, STYLE_RED, true);
fprintf(
stderr,
"Assembly aborted after the maximum of %" PRIu64 " error%s!",
"Assembly aborted after the maximum of %" PRIu64 " error%s",
warnings.nbErrors,
warnings.nbErrors == 1 ? "" : "s"
);
Expand Down Expand Up @@ -136,7 +136,7 @@ void requireZeroErrors() {
style_Set(stderr, STYLE_RED, true);
fprintf(
stderr,
"Assembly aborted with %" PRIu64 " error%s!\n",
"Assembly aborted with %" PRIu64 " error%s\n",
warnings.nbErrors,
warnings.nbErrors == 1 ? "" : "s"
);
Expand Down
18 changes: 9 additions & 9 deletions src/gfx/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static uint16_t readNumber(char const *&str, char const *errPrefix, uint16_t err
error("%s: expected number, but found nothing", errPrefix);
return errVal;
} else if (*number > UINT16_MAX) {
error("%s: the number is too large!", errPrefix);
error("%s: the number is too large", errPrefix);
return errVal;
} else {
return *number;
Expand Down Expand Up @@ -239,7 +239,7 @@ static void parseArg(int ch, char *arg) {
case 'L':
options.inputSlice.left = readNumber(argPtr, "Input slice left coordinate");
if (options.inputSlice.left > INT16_MAX) {
error("Input slice left coordinate is out of range!");
error("Input slice left coordinate is out of range");
break;
}
skipBlankSpace(argPtr);
Expand All @@ -260,7 +260,7 @@ static void parseArg(int ch, char *arg) {
options.inputSlice.width = readNumber(argPtr, "Input slice width");
skipBlankSpace(argPtr);
if (options.inputSlice.width == 0) {
error("Input slice width may not be 0!");
error("Input slice width may not be 0");
}
if (*argPtr != ',') {
error("Missing comma after width in \"%s\"", arg);
Expand All @@ -270,7 +270,7 @@ static void parseArg(int ch, char *arg) {
skipBlankSpace(argPtr);
options.inputSlice.height = readNumber(argPtr, "Input slice height");
if (options.inputSlice.height == 0) {
error("Input slice height may not be 0!");
error("Input slice height may not be 0");
}
if (*argPtr != '\0') {
error("Unexpected extra characters after slice spec in \"%s\"", arg);
Expand Down Expand Up @@ -330,9 +330,9 @@ static void parseArg(int ch, char *arg) {
error("Number of palettes ('-n') must be a valid number, not \"%s\"", arg);
}
if (number > 256) {
error("Number of palettes ('-n') must not exceed 256!");
error("Number of palettes ('-n') must not exceed 256");
} else if (number == 0) {
error("Number of palettes ('-n') may not be 0!");
error("Number of palettes ('-n') may not be 0");
} else {
options.nbPalettes = number;
}
Expand Down Expand Up @@ -388,9 +388,9 @@ static void parseArg(int ch, char *arg) {
error("Palette size ('-s') must be a valid number, not \"%s\"", arg);
}
if (options.nbColorsPerPal > 4) {
error("Palette size ('-s') must not exceed 4!");
error("Palette size ('-s') must not exceed 4");
} else if (options.nbColorsPerPal == 0) {
error("Palette size ('-s') may not be 0!");
error("Palette size ('-s') may not be 0");
}
break;

Expand Down Expand Up @@ -608,7 +608,7 @@ static void verboseOutputConfig() {
if (localOptions.reverse) {
fprintf(stderr, "\tReverse image width: %" PRIu16 " tiles\n", options.reversedWidth);
}
fputs("Ready.\n", stderr);
fputs("Ready for conversion\n", stderr);

style_Reset(stderr);
}
Expand Down
14 changes: 7 additions & 7 deletions src/gfx/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ struct Image {

// Validate input slice
if (options.inputSlice.width == 0 && png.width % 8 != 0) {
fatal("Image width (%" PRIu32 " pixels) is not a multiple of 8!", png.width);
fatal("Image width (%" PRIu32 " pixels) is not a multiple of 8", png.width);
}
if (options.inputSlice.height == 0 && png.height % 8 != 0) {
fatal("Image height (%" PRIu32 " pixels) is not a multiple of 8!", png.height);
fatal("Image height (%" PRIu32 " pixels) is not a multiple of 8", png.height);
}
if (options.inputSlice.right() > png.width || options.inputSlice.bottom() > png.height) {
error(
"Image slice ((%" PRIu16 ", %" PRIu16 ") to (%" PRIu32 ", %" PRIu32
")) is outside the image bounds (%" PRIu32 "x%" PRIu32 ")!",
")) is outside the image bounds (%" PRIu32 "x%" PRIu32 ")",
options.inputSlice.left,
options.inputSlice.top,
options.inputSlice.right(),
Expand Down Expand Up @@ -319,7 +319,7 @@ static void generatePalSpec(Image const &image) {
// Generate a palette spec from the first few colors in the embedded palette
std::vector<Rgba> const &embPal = image.png.palette;
if (embPal.empty()) {
fatal("\"-c embedded\" was given, but the PNG does not have an embedded palette!");
fatal("\"-c embedded\" was given, but the PNG does not have an embedded palette");
}

// Ignore extraneous colors if they are unused
Expand Down Expand Up @@ -821,7 +821,7 @@ static UniqueTiles dedupTiles(
if (inputWithoutOutput && matchType == TileData::NOPE) {
error(
"Tile at (%" PRIu32 ", %" PRIu32
") is not within the input tileset, and '-o' was not given!",
") is not within the input tileset, and '-o' was not given",
tile.x,
tile.y
);
Expand Down Expand Up @@ -973,7 +973,7 @@ void process() {

if (tileColors.size() > options.maxOpaqueColors()) {
fatal(
"Tile at (%" PRIu32 ", %" PRIu32 ") has %zu colors, more than %" PRIu8 "!",
"Tile at (%" PRIu32 ", %" PRIu32 ") has %zu colors, more than %" PRIu8,
tile.x,
tile.y,
tileColors.size(),
Expand Down Expand Up @@ -1001,7 +1001,7 @@ void process() {
continue;
}
fatal(
"Tile (%" PRIu32 ", %" PRIu32 ") contains the background color (#%08x)!",
"Tile (%" PRIu32 ", %" PRIu32 ") contains the background color (#%08x)",
tile.x,
tile.y,
options.bgColor->toCSS()
Expand Down
19 changes: 10 additions & 9 deletions src/gfx/reverse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ void reverse() {
// Check for weird flag combinations

if (options.output.empty()) {
fatal("Tile data must be provided when reversing an image!");
fatal("Tile data must be provided when reversing an image");
}

if (options.allowDedup && options.tilemap.empty()) {
warnx("Tile deduplication is enabled, but no tilemap is provided?");
warnx("Tile deduplication is enabled, but no tilemap is provided");
}

if (options.useColorCurve) {
warnx("The color curve is not yet supported in reverse mode...");
warnx("The color curve is not yet supported in reverse mode");
}

if (options.inputSlice.left != 0 || options.inputSlice.top != 0
Expand Down Expand Up @@ -149,13 +149,13 @@ void reverse() {

// By default, assume tiles are not deduplicated, and add the (allegedly) trimmed tiles
size_t const nbTiles = tiles.size() / tileSize;
verbosePrint(VERB_INFO, "Read %zu tiles.\n", nbTiles);
verbosePrint(VERB_INFO, "Read %zu tiles\n", nbTiles);
size_t mapSize = nbTiles + options.trim; // Image size in tiles
std::optional<std::vector<uint8_t>> tilemap;
if (!options.tilemap.empty()) {
tilemap = readInto(options.tilemap);
mapSize = tilemap->size();
verbosePrint(VERB_INFO, "Read %zu tilemap entries.\n", mapSize);
verbosePrint(VERB_INFO, "Read %zu tilemap entries\n", mapSize);
}

if (mapSize == 0) {
Expand Down Expand Up @@ -224,7 +224,7 @@ void reverse() {
break;
} else if (nbRead != buf.size()) {
fatal(
"Palette data size (%zu) is not a multiple of %zu bytes!\n",
"Palette data size (%zu) is not a multiple of %zu bytes\n",
palettes.size() * buf.size() + nbRead,
buf.size()
);
Expand All @@ -250,7 +250,7 @@ void reverse() {
}

if (options.palSpecType == Options::EXPLICIT && palettes != options.palSpec) {
warnx("Colors in the palette file do not match those specified with '-c'!");
warnx("Colors in the palette file do not match those specified with '-c'");
// This spacing aligns "...versus with `-c`" above the column of `-c` palettes
fputs("Colors specified in the palette file: ...versus with '-c':\n", stderr);
for (size_t i = 0; i < palettes.size() && i < options.palSpec.size(); ++i) {
Expand All @@ -272,7 +272,7 @@ void reverse() {
}
} else if (options.palSpecType == Options::EMBEDDED) {
warnx("An embedded palette was requested, but no palette file was specified; ignoring "
"request.");
"request");
} else if (options.palSpecType == Options::EXPLICIT) {
palettes = std::move(options.palSpec); // We won't be using it again.
}
Expand All @@ -299,7 +299,8 @@ void reverse() {

if (uint8_t palID = (attr & 0b111) - options.basePalID; palID > palettes.size()) {
error(
"Attribute map references palette #%u at (%zu, %zu), but there are only %zu!",
"Attribute map references palette #%u at (%zu, %zu), but there are only %zu "
"palettes",
palID,
tx,
ty,
Expand Down
2 changes: 1 addition & 1 deletion src/link/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static void verboseOutputConfig() {
}
// -n/--sym
printPath("Output sym file", options.symFileName);
fputs("Ready.\n", stderr);
fputs("Ready for linking\n", stderr);

style_Reset(stderr);
}
Expand Down
2 changes: 1 addition & 1 deletion src/link/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void obj_ReadFile(std::string const &filePath, size_t fileID) {
// A single `ungetc` is guaranteed to work.
switch (ungetc(getc(file), file)) {
case EOF:
fatal("File \"%s\" is empty!", fileName);
fatal("File \"%s\" is empty", fileName);

case 'X':
case 'D':
Expand Down
2 changes: 1 addition & 1 deletion src/link/sdas_obj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void sdobj_ReadFile(FileStackNode const &src, FILE *file, std::vector<Symbol> &f
if (tmp > UINT16_MAX) {
fatalAt(
where,
"Area \"%s\" is larger than the GB address space!?",
"Area \"%s\" is larger than the GB address space",
curSection->name.c_str()
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/asm/align-large-ofs.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: The absolute alignment offset (2) must be less than alignment size (2)
at align-large-ofs.asm(2)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/align-large.err
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: Alignment must be between 0 and 16, not 17
at align-large.asm(1)
error: Alignment must be between 0 and 16, not 17
at align-large.asm(2)
Assembly aborted with 2 errors!
Assembly aborted with 2 errors
2 changes: 1 addition & 1 deletion test/asm/align-offset.err
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: The absolute alignment offset (18) must be less than alignment size (16)
at align-offset.asm(4)
error: The absolute alignment offset (20) must be less than alignment size (16)
at align-offset.asm(6)
Assembly aborted with 2 errors!
Assembly aborted with 2 errors
2 changes: 1 addition & 1 deletion test/asm/align-pc-outside-section.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: Cannot output data outside of a `SECTION`
at align-pc-outside-section.asm(1)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/align-unattainable.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: Section "X"'s alignment cannot be attained in WRAM0
at align-unattainable.asm(3)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/anon-label-bad.err
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ error: syntax error, unexpected anonymous label, expecting symbol or label or lo
at anon-label-bad.asm(10)
error: syntax error, unexpected ::
at anon-label-bad.asm(22)
Assembly aborted with 5 errors!
Assembly aborted with 5 errors
2 changes: 1 addition & 1 deletion test/asm/assert-nosect-bank.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: PC has no bank outside of a section
at assert-nosect-bank.asm(1)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/assert@-no-sect.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: PC has no value outside of a section
at assert@-no-sect.asm(1)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/bad-precision.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: Fixed-point precision must be between 1 and 31, not 42
at bad-precision.asm(1)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/bank.err
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ error: Expected constant expression: `Label_u12`'s bank is not known
at bank.asm::def_sect(8) <- bank.asm(22)
error: `BANK` argument must be a label
at bank.asm(26)
Assembly aborted with 11 errors!
Assembly aborted with 11 errors
2 changes: 1 addition & 1 deletion test/asm/block-comment-termination-error.err
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: Unterminated block comment
at block-comment-termination-error.asm(1)
error: syntax error, unexpected end of buffer
at block-comment-termination-error.asm(1)
Assembly aborted with 2 errors!
Assembly aborted with 2 errors
2 changes: 1 addition & 1 deletion test/asm/blue-paint-limits.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: Invalid character '2' after line continuation
at blue-paint-limits.asm::nth(40) <- blue-paint-limits.asm(43)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/bracketed-macro-args.err
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ error: Macro argument `\<2>` not defined
at bracketed-macro-args.asm::bad(30) <- bracketed-macro-args.asm(33)
error: Bracketed symbol `abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz` does not exist
at bracketed-macro-args.asm::toolong(36) <- bracketed-macro-args.asm(39)
Assembly aborted with 6 errors!
Assembly aborted with 6 errors
2 changes: 1 addition & 1 deletion test/asm/bracketed-symbols.err
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ error: `Label` does not have a constant value
at bracketed-symbols.asm(20)
error: PC does not have a constant value; the current section is not fixed
at bracketed-symbols.asm(21)
Assembly aborted with 3 errors!
Assembly aborted with 3 errors
2 changes: 1 addition & 1 deletion test/asm/builtin-overwrite.err
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ error: Built-in symbol `__ISO_8601_UTC__` cannot be redefined
at builtin-overwrite.asm::tickle(29) <- builtin-overwrite.asm(37)
error: Built-in symbol `__ISO_8601_UTC__` cannot be redefined
at builtin-overwrite.asm::tickle(30) <- builtin-overwrite.asm(37)
Assembly aborted with 28 errors!
Assembly aborted with 28 errors
2 changes: 1 addition & 1 deletion test/asm/builtin-reserved.err
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ error: `.` is reserved for a built-in symbol
at builtin-reserved.asm(29)
error: `.` has no value outside of a label scope
at builtin-reserved.asm(32)
Assembly aborted with 16 errors!
Assembly aborted with 16 errors
2 changes: 1 addition & 1 deletion test/asm/character-escape-at-end.err
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: Illegal character escape '\' at end of input
at character-escape-at-end.asm(1)
error: Unterminated string
at character-escape-at-end.asm(1)
Assembly aborted with 2 errors!
Assembly aborted with 2 errors
2 changes: 1 addition & 1 deletion test/asm/character-escapes.err
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ error: Invalid character '\' in bracketed macro argument
at character-escapes.asm::m(7) <- character-escapes.asm(10)
error: Invalid character '\t' in bracketed macro argument
at character-escapes.asm::m(8) <- character-escapes.asm(10)
Assembly aborted with 3 errors!
Assembly aborted with 3 errors
2 changes: 1 addition & 1 deletion test/asm/character-literals.err
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ error: Unterminated character
at character-literals.asm(35)
error: Character literals must be a single charmap unit
at character-literals.asm(35)
Assembly aborted with 5 errors!
Assembly aborted with 5 errors
2 changes: 1 addition & 1 deletion test/asm/charmap-empty.err
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: Cannot map an empty string
at charmap-empty.asm(1)
error: syntax error, unexpected end of line
at charmap-empty.asm(2)
Assembly aborted with 2 errors!
Assembly aborted with 2 errors
2 changes: 1 addition & 1 deletion test/asm/charmap-inheritance.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: Undefined base charmap `eggs`
at charmap-inheritance.asm(26)
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/charsize.err
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ error: CHARSIZE: No character mapping for "abcdef"
at charsize.asm(19)
error: CHARSIZE: No character mapping for "é"
at charsize.asm(20)
Assembly aborted with 4 errors!
Assembly aborted with 4 errors
2 changes: 1 addition & 1 deletion test/asm/charval.err
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ warning: CHARVAL: Index starts at 0 [-Wbuiltin-args]
at charval.asm(28)
warning: CHARVAL: Index 10 is past the end of the character mapping [-Wbuiltin-args]
at charval.asm(29)
Assembly aborted with 5 errors!
Assembly aborted with 5 errors
2 changes: 1 addition & 1 deletion test/asm/command-line-symbols.err
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: `FOO` already defined (should it be {interpolated} to define its contents
at command-line-symbols.asm(3)
and also:
at <command-line>
Assembly aborted with 1 error!
Assembly aborted with 1 error
2 changes: 1 addition & 1 deletion test/asm/compound-assignment.err
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
error: Expected constant expression: undefined symbol `UnDeFiNeD`
at compound-assignment.asm(35)
Assembly aborted with 1 error!
Assembly aborted with 1 error
Loading
Loading