diff --git a/include/link/section.h b/include/link/section.h index 5a94de6d..8f34417a 100644 --- a/include/link/section.h +++ b/include/link/section.h @@ -10,7 +10,7 @@ #ifndef RGBDS_LINK_SECTION_H #define RGBDS_LINK_SECTION_H -// GUIDELINE: external code MUST NOT BE AWARE of the data structure used!! +// GUIDELINE: external code MUST NOT BE AWARE of the data structure used! #include #include diff --git a/include/link/symbol.h b/include/link/symbol.h index 11c2d541..2a161130 100644 --- a/include/link/symbol.h +++ b/include/link/symbol.h @@ -10,7 +10,7 @@ #ifndef RGBDS_LINK_SYMBOL_H #define RGBDS_LINK_SYMBOL_H -// GUIDELINE: external code MUST NOT BE AWARE of the data structure used!! +// GUIDELINE: external code MUST NOT BE AWARE of the data structure used! #include diff --git a/man/rgbasm.5 b/man/rgbasm.5 index 90a4ac96..f688322a 100644 --- a/man/rgbasm.5 +++ b/man/rgbasm.5 @@ -1327,7 +1327,7 @@ Note also that only exported symbols will appear in symbol and map files produce .Ss Purging symbols .Ic PURGE allows you to completely remove a symbol from the symbol table as if it had never existed. -.Em USE WITH EXTREME CAUTION!!! +.Em USE WITH EXTREME CAUTION! I can't stress this enough, .Sy you seriously need to know what you are doing . DON'T purge a symbol that you use in expressions the linker needs to calculate. diff --git a/src/asm/charmap.c b/src/asm/charmap.c index 42a45b6f..bbf428c7 100644 --- a/src/asm/charmap.c +++ b/src/asm/charmap.c @@ -27,7 +27,7 @@ struct Charnode { bool isTerminal; // Whether there exists a mapping that ends here uint8_t value; // If the above is true, its corresponding value - // This MUST be indexes and not pointers, because pointers get invalidated by `realloc`!! + // This MUST be indexes and not pointers, because pointers get invalidated by `realloc`! size_t next[255]; // Indexes of where to go next, 0 = nowhere }; diff --git a/src/asm/format.c b/src/asm/format.c index 6f14c80d..960775d6 100644 --- a/src/asm/format.c +++ b/src/asm/format.c @@ -249,7 +249,7 @@ void fmt_PrintNumber(char *buf, size_t bufLen, struct FormatSpec const *fmt, uin } size_t len = strlen(valueBuf); - size_t numLen = !!sign + !!prefix + len; + size_t numLen = (sign != 0) + (prefix != 0) + len; size_t totalLen = fmt->width > numLen ? fmt->width : numLen; if (totalLen > bufLen - 1) { // bufLen includes terminator diff --git a/src/asm/fstack.c b/src/asm/fstack.c index 14c63c1e..970c405f 100644 --- a/src/asm/fstack.c +++ b/src/asm/fstack.c @@ -291,7 +291,7 @@ bool yywrap(void) } // Make sure not to switch the lexer state before calling this, so the saved line no is correct. -// BE CAREFUL!! This modifies the file stack directly, you should have set up the file info first. +// BE CAREFUL! This modifies the file stack directly, you should have set up the file info first. // Callers should set contextStack->lexerState after this so it is not NULL. static void newContext(struct FileStackNode *fileInfo) { @@ -313,7 +313,7 @@ static void newContext(struct FileStackNode *fileInfo) context->forName = NULL; // Link new entry to its parent so it's reachable later - // ERRORS SHOULD NOT OCCUR AFTER THIS!! + // ERRORS SHOULD NOT OCCUR AFTER THIS! context->parent = contextStack; contextStack = context; } diff --git a/src/asm/symbol.c b/src/asm/symbol.c index 915d7b16..4a565d7a 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -101,7 +101,7 @@ static char const *Callback__FILE__(void) // Account for the extra backslash inserted below if (fileName[i] == '"') j++; - // Ensure there will be enough room; DO NOT PRINT ANYTHING ABOVE THIS!! + // Ensure there will be enough room; DO NOT PRINT ANYTHING ABOVE THIS! if (j + 2 >= bufsize) { // Always keep room for 2 tail chars bufsize = bufsize ? bufsize * 2 : 64; buf = realloc(buf, bufsize); @@ -590,7 +590,7 @@ struct Symbol *sym_AddAnonLabel(void) } char name[MAXSYMLEN + 1]; - sym_WriteAnonLabelName(name, 0, true); // The direction is important!! + sym_WriteAnonLabelName(name, 0, true); // The direction is important! anonLabelID++; return addLabel(name); } diff --git a/src/link/patch.c b/src/link/patch.c index 83cb1477..9eb90134 100644 --- a/src/link/patch.c +++ b/src/link/patch.c @@ -146,7 +146,7 @@ static int32_t computeRPNExpr(struct Patch const *patch, isError = false; // Be VERY careful with two `popRPN` in the same expression. - // C does not guarantee order of evaluation of operands!! + // C does not guarantee order of evaluation of operands! // So, if there are two `popRPN` in the same expression, make // sure the operation is commutative. switch (command) {