ref: 459773b3f0b26144e3756d9e510cca10f846ef15
parent: 6d0a3c75e9a79acec82fc1cae3e97fc6ba0b9d8e
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Mon Apr 19 12:47:39 EDT 2021
Update some whitespace after Hungarian prefixes were removed Keep the parameter alignment and 100-char line limit
--- a/include/asm/rpn.h
+++ b/include/asm/rpn.h
@@ -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
};
/*
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -292,7 +292,7 @@
*targetFileName = '\0';
} else {
targetFileName = realloc(targetFileName,
- targetFileNameLen + 1);
+ targetFileNameLen + 1);
}
if (targetFileName == NULL)
err(1, "Cannot append new file to target file list");
--- a/src/asm/rpn.c
+++ b/src/asm/rpn.c
@@ -189,8 +189,7 @@
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 @@
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 @@
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);