mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-23 03:22:08 +00:00
Update some whitespace after Hungarian prefixes were removed
Keep the parameter alignment and 100-char line limit
This commit is contained in:
@@ -17,14 +17,14 @@
|
||||
#define MAXRPNLEN 1048576
|
||||
|
||||
struct Expression {
|
||||
int32_t val; // If the expression's value is known, it's here
|
||||
char *reason; // Why the expression is not known, if it isn't
|
||||
bool isKnown; // Whether the expression's value is known
|
||||
bool isSymbol; // Whether the expression represents a symbol
|
||||
uint8_t *rpn; // Array of bytes serializing the RPN expression
|
||||
uint32_t rpnCapacity; // Size of the `tRPN` buffer
|
||||
uint32_t rpnLength; // Used size of the `tRPN` buffer
|
||||
uint32_t rpnPatchSize; // Size the expression will take in the obj file
|
||||
int32_t val; // If the expression's value is known, it's here
|
||||
char *reason; // Why the expression is not known, if it isn't
|
||||
bool isKnown; // Whether the expression's value is known
|
||||
bool isSymbol; // Whether the expression represents a symbol
|
||||
uint8_t *rpn; // Array of bytes serializing the RPN expression
|
||||
uint32_t rpnCapacity; // Size of the `rpn` buffer
|
||||
uint32_t rpnLength; // Used size of the `rpn` buffer
|
||||
uint32_t rpnPatchSize; // Size the expression will take in the obj file
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -292,7 +292,7 @@ int main(int argc, char *argv[])
|
||||
*targetFileName = '\0';
|
||||
} else {
|
||||
targetFileName = realloc(targetFileName,
|
||||
targetFileNameLen + 1);
|
||||
targetFileNameLen + 1);
|
||||
}
|
||||
if (targetFileName == NULL)
|
||||
err(1, "Cannot append new file to target file list");
|
||||
|
||||
@@ -189,8 +189,7 @@ void rpn_BankSection(struct Expression *expr, char const *sectionName)
|
||||
if (section && section->bank != (uint32_t)-1) {
|
||||
expr->val = section->bank;
|
||||
} else {
|
||||
makeUnknown(expr, "Section \"%s\"'s bank is not known",
|
||||
sectionName);
|
||||
makeUnknown(expr, "Section \"%s\"'s bank is not known", sectionName);
|
||||
|
||||
size_t nameLen = strlen(sectionName) + 1; /* Room for NUL! */
|
||||
uint8_t *ptr = reserveSpace(expr, nameLen + 1);
|
||||
@@ -361,16 +360,14 @@ void rpn_BinaryOp(enum RPNCommand op, struct Expression *expr,
|
||||
|
||||
if (src2->val >= 32)
|
||||
warning(WARNING_SHIFT_AMOUNT,
|
||||
"Shifting left by large amount %" PRId32 "\n",
|
||||
src2->val);
|
||||
"Shifting left by large amount %" PRId32 "\n", src2->val);
|
||||
|
||||
expr->val = op_shift_left(src1->val, src2->val);
|
||||
break;
|
||||
case RPN_SHR:
|
||||
if (src1->val < 0)
|
||||
warning(WARNING_SHIFT, "Shifting right negative value %"
|
||||
PRId32 "\n",
|
||||
src1->val);
|
||||
warning(WARNING_SHIFT,
|
||||
"Shifting right negative value %" PRId32 "\n", src1->val);
|
||||
|
||||
if (src2->val < 0)
|
||||
warning(WARNING_SHIFT_AMOUNT,
|
||||
@@ -392,8 +389,9 @@ void rpn_BinaryOp(enum RPNCommand op, struct Expression *expr,
|
||||
fatalerror("Division by zero\n");
|
||||
|
||||
if (src1->val == INT32_MIN && src2->val == -1) {
|
||||
warning(WARNING_DIV, "Division of %" PRId32 " by -1 yields %"
|
||||
PRId32 "\n", INT32_MIN, INT32_MIN);
|
||||
warning(WARNING_DIV,
|
||||
"Division of %" PRId32 " by -1 yields %" PRId32 "\n",
|
||||
INT32_MIN, INT32_MIN);
|
||||
expr->val = INT32_MIN;
|
||||
} else {
|
||||
expr->val = op_divide(src1->val, src2->val);
|
||||
|
||||
Reference in New Issue
Block a user