diff --git a/tokenize.c b/tokenize.c index cb71c11..5662ef3 100644 --- a/tokenize.c +++ b/tokenize.c @@ -1333,28 +1333,28 @@ int Tokenize( char *line, unsigned int start, struct asm_tok tokenarray[], unsig ;//OK QWORD else goto nobcst; /* let parser throw error */ - if (*input1 != '\[') { /* if address is not inside [] */ - *p1++ = '\['; /* force it */ + if (*input1 != '[') { /* if address is not inside [] */ + *p1++ = '['; /* force it */ for (; *input1 > ','; p1++, input1++) { /* input1 points to [address] */ if (*input1 == ';') break; *p1 = *input1; /* copy first memory part over 'qword bcst */ } - *p1++ = '\]'; + *p1++ = ']'; if (*input1 == ';') *input1 = 0; while (isspace(*input1)) input1++; /* skip the space, now pointing to address */ } else { - for (; *input1 != '\]'; p1++, input1++) /* input1 points to [address] */ + for (; *input1 != ']'; p1++, input1++) /* input1 points to [address] */ *p1 = *input1; /* copy first memory part over 'qword bcst */ *p1++ = *input1++; /* copy ']' */ } /* now add broadcast size */ - if (cnt == 2) strcpy(p1, "\{1to2\}"); - else if (cnt == 4) strcpy(p1, "\{1to4\}"); - else if (cnt == 8) strcpy(p1, "\{1to8\}"); - else if (cnt == 16) strcpy(p1, "\{1to16\}"); + if (cnt == 2) strcpy(p1, "{1to2}"); + else if (cnt == 4) strcpy(p1, "{1to4}"); + else if (cnt == 8) strcpy(p1, "{1to8}"); + else if (cnt == 16) strcpy(p1, "{1to16}"); else goto nobcst; /* let parser throw error */ strcat(p1, input1); } @@ -1364,24 +1364,24 @@ int Tokenize( char *line, unsigned int start, struct asm_tok tokenarray[], unsig if (*p1 == ';') { /* found ';' */ *p1 = 0; /* that means '{' is in comment */ } - if (*p1 == '\{') { /* found '{' */ - if ((_memicmp(p1, "\{1to", 4) == 0)) + if (*p1 == '{') { /* found '{' */ + if ((_memicmp(p1, "{1to", 4) == 0)) break; /* found "bcst" */ } /* if it was {kn} or {z} search till end */ } - if (*p1 == '\{') { /* if found {1toN} */ + if (*p1 == '{') { /* if found {1toN} */ p1--; /* go back 1 byte to check if ']' is present */ while (isspace(*p1)) --p1; /* skip the space */ - if (*p1 != '\]') { /* if not present insert it */ + if (*p1 != ']') { /* if not present insert it */ while (*p1 != ',') --p1; /* step backwards till the comma */ p1++; /* skip the comma forward */ input1 = p1; /* save that location in input1 */ while (isspace(*p1)) p1++; /* skip the space */ strcpy(buff, p1); /* copy to the buffer from variable on */ - *input1++ = '\['; /* skip the space */ - for (p1 = buff; *p1 != '\{'; p1++, input1++) /* till the end of var */ + *input1++ = '['; /* skip the space */ + for (p1 = buff; *p1 != '{'; p1++, input1++) /* till the end of var */ *input1 = *p1; /* copy it back to input string */ - *input1++ = '\]'; /* insert ']' before '{' */ + *input1++ = ']'; /* insert ']' before '{' */ strcpy(input1, p1); /* now copy the rest of string from buffer */ } }