Use ++ and -- instead of [+-]= 1

Seriously...
This commit is contained in:
ISSOtm
2020-02-09 15:21:08 +01:00
parent 579a324ce7
commit fe0c269382
6 changed files with 51 additions and 51 deletions

View File

@@ -150,24 +150,24 @@ static void copyrept(void)
while (src < bufferEnd && level) {
if (instring == 0) {
if (isRept(src)) {
level += 1;
level++;
src += 4;
} else if (isEndr(src)) {
level -= 1;
level--;
src += 4;
} else {
if (*src == '\"')
instring = 1;
src += 1;
src++;
}
} else {
if (*src == '\\') {
src += 2;
} else if (*src == '\"') {
src += 1;
src++;
instring = 0;
} else {
src += 1;
src++;
}
}
}
@@ -188,10 +188,10 @@ static void copyrept(void)
uint32_t i;
tzNewMacro[ulNewMacroSize] = 0;
for (i = 0; i < ulNewMacroSize; i += 1) {
for (i = 0; i < ulNewMacroSize; i++) {
tzNewMacro[i] = src[i];
if (src[i] == '\n')
nLineNo+=1;
nLineNo++;
}
yyskipbytes(ulNewMacroSize + 4);
@@ -220,24 +220,24 @@ static void copymacro(void)
while (src < bufferEnd && level) {
if (instring == 0) {
if (isMacro(src)) {
level += 1;
level++;
src += 4;
} else if (isEndm(src)) {
level -= 1;
level--;
src += 4;
} else {
if(*src == '\"')
instring = 1;
src += 1;
src++;
}
} else {
if (*src == '\\') {
src += 2;
} else if (*src == '\"') {
src += 1;
src++;
instring = 0;
} else {
src += 1;
src++;
}
}
}
@@ -257,10 +257,10 @@ static void copymacro(void)
uint32_t i;
tzNewMacro[ulNewMacroSize] = 0;
for (i = 0; i < ulNewMacroSize; i += 1) {
for (i = 0; i < ulNewMacroSize; i++) {
tzNewMacro[i] = src[i];
if (src[i] == '\n')
nLineNo += 1;
nLineNo++;
}
yyskipbytes(ulNewMacroSize + 4);
@@ -651,8 +651,8 @@ lines : /* empty */
nListCountEmpty = 0;
nPCOffset = 1;
} line '\n' {
nLineNo += 1;
nTotalLines += 1;
nLineNo++;
nTotalLines++;
}
;

View File

@@ -225,7 +225,7 @@ int32_t charmap_Convert(char **input)
if (match) {
output[length] = foundCode;
length += 1;
length++;
} else {
/*
* put a utf-8 character

View File

@@ -413,7 +413,7 @@ void fstk_RunInclude(char *tzFileName)
/* Dirty hack to give the INCLUDE directive a linefeed */
yyunput('\n');
nLineNo -= 1;
nLineNo--;
}
/*

View File

@@ -34,7 +34,7 @@ static int32_t gbgfx2bin(char ch)
{
int32_t i;
for (i = 0; i <= 3; i += 1) {
for (i = 0; i <= 3; i++) {
if (CurrentOptions.gbgfx[i] == ch)
return i;
}
@@ -46,7 +46,7 @@ static int32_t binary2bin(char ch)
{
int32_t i;
for (i = 0; i <= 1; i += 1) {
for (i = 0; i <= 1; i++) {
if (CurrentOptions.binary[i] == ch)
return i;
}
@@ -80,22 +80,22 @@ static int32_t ascii2bin(char *s)
switch (*s) {
case '$':
radix = 16;
s += 1;
s++;
convertfunc = char2bin;
break;
case '&':
radix = 8;
s += 1;
s++;
convertfunc = char2bin;
break;
case '`':
radix = 4;
s += 1;
s++;
convertfunc = gbgfx2bin;
break;
case '%':
radix = 2;
s += 1;
s++;
convertfunc = binary2bin;
break;
default:

View File

@@ -62,7 +62,7 @@ void upperstring(char *s)
{
while (*s) {
*s = toupper(*s);
s += 1;
s++;
}
}
@@ -70,7 +70,7 @@ void lowerstring(char *s)
{
while (*s) {
*s = tolower(*s);
s += 1;
s++;
}
}
@@ -380,7 +380,7 @@ void lex_FloatDeleteRange(uint32_t id, uint16_t start, uint16_t end)
while (start <= end) {
tFloatingChars[start] &= ~id;
start += 1;
start++;
}
}
@@ -390,7 +390,7 @@ void lex_FloatAddRange(uint32_t id, uint16_t start, uint16_t end)
while (start <= end) {
tFloatingChars[start] |= id;
start += 1;
start++;
}
}
@@ -400,7 +400,7 @@ void lex_FloatDeleteFirstRange(uint32_t id, uint16_t start, uint16_t end)
while (start <= end) {
tFloatingFirstChar[start] &= ~id;
start += 1;
start++;
}
}
@@ -410,7 +410,7 @@ void lex_FloatAddFirstRange(uint32_t id, uint16_t start, uint16_t end)
while (start <= end) {
tFloatingFirstChar[start] |= id;
start += 1;
start++;
}
}
@@ -420,7 +420,7 @@ void lex_FloatDeleteSecondRange(uint32_t id, uint16_t start, uint16_t end)
while (start <= end) {
tFloatingSecondChar[start] &= ~id;
start += 1;
start++;
}
}
@@ -430,7 +430,7 @@ void lex_FloatAddSecondRange(uint32_t id, uint16_t start, uint16_t end)
while (start <= end) {
tFloatingSecondChar[start] |= id;
start += 1;
start++;
}
}
@@ -506,7 +506,7 @@ void lex_AddStrings(const struct sLexInitString *lex)
if ((*ppHash)->nNameLength > nLexMaxLength)
nLexMaxLength = (*ppHash)->nNameLength;
lex += 1;
lex++;
}
}
@@ -821,7 +821,7 @@ scanagain:
pLexBuffer++;
} else if (*pLexBuffer == '\n') {
pLexBuffer++;
nLineNo += 1;
nLineNo++;
goto scanagain;
} else {
errx(1, "Expected a new line after the continuation character.");
@@ -832,7 +832,7 @@ scanagain:
/* Line continuation character */
if (pLexBuffer[1] == '\n') {
pLexBuffer += 2;
nLineNo += 1;
nLineNo++;
goto scanagain;
}
@@ -970,7 +970,7 @@ static uint32_t yylex_MACROARGS(void)
pLexBuffer++;
} else if (*pLexBuffer == '\n') {
pLexBuffer++;
nLineNo += 1;
nLineNo++;
ch = 0;
break;
} else {
@@ -980,7 +980,7 @@ static uint32_t yylex_MACROARGS(void)
break;
case '\n':
/* Line continuation character */
nLineNo += 1;
nLineNo++;
ch = 0;
break;
default:

View File

@@ -129,7 +129,7 @@ static uint32_t countsymbols(void)
pSym = pPatchSymbols;
while (pSym) {
count += 1;
count++;
pSym = pSym->pNext;
}
@@ -147,7 +147,7 @@ static uint32_t countsections(void)
pSect = pSectionList;
while (pSect) {
count += 1;
count++;
pSect = pSect->pNext;
}
@@ -164,7 +164,7 @@ static uint32_t countpatches(struct Section *pSect)
pPatch = pSect->pPatches;
while (pPatch) {
r += 1;
r++;
pPatch = pPatch->pNext;
}
@@ -205,7 +205,7 @@ static uint32_t getsectid(struct Section *pSect)
while (sec) {
if (sec == pSect)
return ID;
ID += 1;
ID++;
sec = sec->pNext;
}
@@ -344,7 +344,7 @@ static void addexports(void)
{
int32_t i;
for (i = 0; i < HASHSIZE; i += 1) {
for (i = 0; i < HASHSIZE; i++) {
struct sSymbol *pSym;
pSym = tHashedSymbols[i];
@@ -704,9 +704,9 @@ void out_AbsByteBypassCheck(int32_t b)
checksectionoverflow(1);
b &= 0xFF;
pCurrentSection->tData[nPC] = b;
pCurrentSection->nPC += 1;
nPC += 1;
pPCSymbol->nValue += 1;
pCurrentSection->nPC++;
nPC++;
pPCSymbol->nValue++;
}
/*
@@ -769,9 +769,9 @@ void out_RelByte(struct Expression *expr)
if (rpn_isReloc(expr)) {
pCurrentSection->tData[nPC] = 0;
createpatch(PATCHTYPE_BYTE, expr);
pCurrentSection->nPC += 1;
nPC += 1;
pPCSymbol->nValue += 1;
pCurrentSection->nPC++;
nPC++;
pPCSymbol->nValue++;
} else {
out_AbsByte(expr->nVal);
}
@@ -865,9 +865,9 @@ void out_PCRelByte(struct Expression *expr)
/* Always let the linker calculate the offset. */
pCurrentSection->tData[nPC] = 0;
createpatch(PATCHTYPE_JR, expr);
pCurrentSection->nPC += 1;
nPC += 1;
pPCSymbol->nValue += 1;
pCurrentSection->nPC++;
nPC++;
pPCSymbol->nValue++;
rpn_Free(expr);
}