#include <string.h>
/* common */
+#include "segnames.h"
#include "tgttrans.h"
/* cc65 */
#include "litpool.h"
#include "scanner.h"
#include "scanstrbuf.h"
-#include "segments.h"
#include "symtab.h"
#include "pragma.h"
}
/* Remap the character */
- printf ("Translating %04lX to %04lX\n", Index, C);
TgtTranslateSet ((unsigned) Index, (unsigned char) C);
}
/* Handle a pragma that expects a boolean paramater */
{
ident Ident;
+ long Val;
- if (SB_Peek (B) == '0') {
- SB_Skip (B);
- *Flag = 0;
- } else if (SB_Peek (B) == '1') {
- SB_Skip (B);
- *Flag = 1;
- } else if (SB_GetSym (B, Ident)) {
+ if (SB_GetSym (B, Ident)) {
if (strcmp (Ident, "true") == 0 || strcmp (Ident, "on") == 0) {
*Flag = 1;
} else if (strcmp (Ident, "false") == 0 || strcmp (Ident, "off") == 0) {
} else {
Error ("Pragma argument must be one of `on', `off', `true' or `false'");
}
+ } else if (SB_GetNumber (B, &Val)) {
+ *Flag = (Val != 0);
} else {
Error ("Invalid pragma argument");
}