if (dst >= edst)
goto overflow;
+ // Skip comments in case a loose @ or \ is in there
+ // In that case the tokeniser was trying to expand it.
+ if (*s == '*' || *s == ';' || ((*s == '/') && (*(s + 1) == '/')))
+ goto skipcomments;
+
*dst++ = *s++;
}
// Do macro expansion
}
}
+skipcomments:
+
*dst = EOS;
DEBUG { printf("ExM: dst=\"%s\"\n", dest); }
return OK;
// auto-optimise? I think it's ok for now...
if (*ln == '.')
{
- if (obj_format == ALCYON)
- {
- if ((*(ln + 1) == 'b') || (*(ln + 1) == 'B') || (*(ln + 1) == 'w') || (*(ln + 1) == 'W') || (*(ln + 1) == 'l') || (*(ln + 1) == 'L'))
- {
- ln += 2;
- }
- }
- else
+ if (obj_format == BSD)
{
if ((*(ln + 1) & 0xDF) == 'B')
{
*tk++ = CONST;
*tk++ = v;
+
+ if (obj_format == ALCYON)
+ {
+ if ((*(ln + 1) == 'w') || (*(ln + 1) == 'W'))
+ {
+ *tk++ = DOTW;
+ ln += 2;
+ }
+ else if ((*(ln + 1) == 'l') || (*(ln + 1) == 'L'))
+ {
+ *tk++ = DOTL;
+ ln += 2;
+ }
+ }
}
else
*tk++ = '$';