mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
rgbasm: Convert oDontExpandStrings to bool.
This commit is contained in:
@@ -9,8 +9,9 @@
|
||||
#ifndef ASMOTOR_ASM_ASM_H
|
||||
#define ASMOTOR_ASM_ASM_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "asm/types.h"
|
||||
#include "asm/symbol.h"
|
||||
@@ -26,7 +27,7 @@ extern char tzCurrentFileName[_MAX_PATH + 1];
|
||||
extern struct Section *pCurrentSection;
|
||||
extern struct sSymbol *tHashedSymbols[HASHSIZE];
|
||||
extern struct sSymbol *pPCSymbol;
|
||||
extern UBYTE oDontExpandStrings;
|
||||
extern bool oDontExpandStrings;
|
||||
|
||||
#define MAXMACROARGS 9
|
||||
#define MAXINCPATHS 16
|
||||
|
||||
@@ -706,11 +706,11 @@ dl : T_POP_DL constlist_32bit
|
||||
|
||||
purge : T_POP_PURGE
|
||||
{
|
||||
oDontExpandStrings=1;
|
||||
oDontExpandStrings = true;
|
||||
}
|
||||
purge_list
|
||||
{
|
||||
oDontExpandStrings=0;
|
||||
oDontExpandStrings = false;
|
||||
}
|
||||
;
|
||||
|
||||
@@ -952,8 +952,8 @@ relocconst : T_ID
|
||||
{ rpn_UNNOT(&$$,&$2); }
|
||||
| T_OP_BANK '(' T_ID ')'
|
||||
{ rpn_Bank(&$$,$3); $$.nVal = 0; }
|
||||
| T_OP_DEF { oDontExpandStrings=1; } '(' T_ID ')'
|
||||
{ rpn_Number(&$$,sym_isConstDefined($4)); oDontExpandStrings=0; }
|
||||
| T_OP_DEF { oDontExpandStrings = true; } '(' T_ID ')'
|
||||
{ rpn_Number(&$$,sym_isConstDefined($4)); oDontExpandStrings = false; }
|
||||
| T_OP_ROUND '(' const ')' { rpn_Number(&$$,math_Round($3)); }
|
||||
| T_OP_CEIL '(' const ')' { rpn_Number(&$$,math_Ceil($3)); }
|
||||
| T_OP_FLOOR '(' const ')' { rpn_Number(&$$,math_Floor($3)); }
|
||||
@@ -1022,7 +1022,7 @@ const : T_ID { $$ = sym_GetConstantValue($1); }
|
||||
| T_OP_ACOS '(' const ')' { $$ = math_ACos($3); }
|
||||
| T_OP_ATAN '(' const ')' { $$ = math_ATan($3); }
|
||||
| T_OP_ATAN2 '(' const ',' const ')' { $$ = math_ATan2($3,$5); }
|
||||
| T_OP_DEF { oDontExpandStrings=1; } '(' T_ID ')' { $$ = sym_isConstDefined($4); oDontExpandStrings=0; }
|
||||
| T_OP_DEF { oDontExpandStrings = true; } '(' T_ID ')' { $$ = sym_isConstDefined($4); oDontExpandStrings = false; }
|
||||
| T_OP_STRCMP '(' string ',' string ')' { $$ = strcmp( $3, $5 ); }
|
||||
| T_OP_STRIN '(' string ',' string ')'
|
||||
{
|
||||
|
||||
@@ -7,12 +7,13 @@
|
||||
|
||||
#include "asmy.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
UBYTE oDontExpandStrings = 0;
|
||||
bool oDontExpandStrings = false;
|
||||
SLONG nGBGfxID = -1;
|
||||
SLONG nBinaryID = -1;
|
||||
|
||||
@@ -184,7 +185,7 @@ ParseSymbol(char *src, ULONG size)
|
||||
|
||||
dest[copied] = 0;
|
||||
|
||||
if (oDontExpandStrings == 0 && sym_isString(dest)) {
|
||||
if (!oDontExpandStrings && sym_isString(dest)) {
|
||||
char *s;
|
||||
|
||||
yyskipbytes(size_backup);
|
||||
|
||||
Reference in New Issue
Block a user