# $Id$
+EXTRA_DIST += modules/preprocs/tasm/Makefile.inc
EXTRA_DIST += modules/preprocs/nasm/Makefile.inc
EXTRA_DIST += modules/preprocs/raw/Makefile.inc
EXTRA_DIST += modules/preprocs/cpp/Makefile.inc
+include modules/preprocs/tasm/Makefile.inc
include modules/preprocs/nasm/Makefile.inc
include modules/preprocs/raw/Makefile.inc
include modules/preprocs/cpp/Makefile.inc
char *p, *oldline, oldchar, *q, oldchar2;
TMEndItem *end;
- if ((p = strchr(line, ';')))
- *p = '\0';
-
p = line;
/* Skip whitespace */
- while (isspace(*p) && *p != 0)
+ while (isspace(*p) && *p != 0 && *p != ';')
p++;
/* Ignore nasm directives */
/* Binary search for the directive name */
len = 0;
- while (!isspace(p[len]) && p[len] != 0)
+ while (!isspace(p[len]) && p[len] != 0 && p[len] != ';')
len++;
if (!len)
return line;
/* Skip whitespaces */
while (isspace(*q) && *q)
q++;
- while (*q) {
+ while (*q && *q != ';') {
p = q;
- for (; *q && *q != ':' && !isspace(*q); q++);
- if (!*q)
+ for (; *q && *q != ';' && *q != ':' && !isspace(*q); q++);
+ if (!*q || *q == ';')
break;
/* segment register name */
for (assume = TAssumes; assume->segreg; assume++)
assume->segreg = nasm_strndup(p, q-p);
assume[1].segreg = NULL;
}
- for (; *q && *q != ':' && isspace(*q); q++);
+ for (; *q && *q != ';' && *q != ':' && isspace(*q); q++);
if (*q != ':')
error(ERR_FATAL, "expected `:' instead of `%c'", *q);
for (q++; *q && isspace(*q); q++);
/* segment name */
p = q;
- for (; *q && *q != ',' && !isspace(*q); q++);
+ for (; *q && *q != ';' && *q != ',' && !isspace(*q); q++);
assume->segment = nasm_strndup(p, q-p);
for (; *q && isspace(*q); q++);
- if (*q && *q != ',')
+ if (*q && *q != ';' && *q != ',')
error(ERR_FATAL, "expected `,' instead of `%c'", *q);
- for (q++; *q && isspace(*q); q++);
+ if (*q && *q != ';')
+ q++;
+ for (; *q && isspace(*q); q++);
}
TAssumes[i].segreg = NULL;
TAssumes = nasm_realloc(TAssumes, (i+1)*sizeof(*TAssumes));
--- /dev/null
+# $Id$
+
+TESTS += modules/preprocs/tasm/tests/tasmpp_test.sh
+
+EXTRA_DIST += modules/preprocs/tasm/tests/tasmpp_test.sh
+EXTRA_DIST += modules/preprocs/nasm/tests/tasm-assume-comment.asm
+EXTRA_DIST += modules/preprocs/nasm/tests/tasm-assume-comment.hex
+EXTRA_DIST += modules/preprocs/nasm/tests/tasm-comment-instr.asm
+EXTRA_DIST += modules/preprocs/nasm/tests/tasm-comment-instr.hex