From b75195549edad68d947c37e746b24eefdce9f7f8 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Wed, 3 Jun 2015 23:03:36 +0200 Subject: [PATCH] Combine .IF IDN and .IF DIF. --- assemble.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/assemble.c b/assemble.c index c9fd31e..0afa2bb 100644 --- a/assemble.c +++ b/assemble.c @@ -780,7 +780,8 @@ static int assemble( if (label[0] == 'N') { ok = !ok; } - } else if (strcmp(label, "IDN") == 0) { + } else if (strcmp(label, "IDN") == 0 || + strcmp(label, "DIF") == 0) { char *thing1, *thing2; @@ -791,19 +792,9 @@ static int assemble( else thing2 = memcheck(strdup("")); ok = (strcmp(thing1, thing2) == 0); - free(thing1); - free(thing2); - } else if (strcmp(label, "DIF") == 0) { - char *thing1, - *thing2; - - thing1 = getstring(cp, &cp); - cp = skipdelim(cp); - if (!EOL(*cp)) - thing2 = getstring(cp, &cp); - else - thing2 = memcheck(strdup("")); - ok = (strcmp(thing1, thing2) != 0); + if (label[0] == 'D') { + ok = !ok; + } free(thing1); free(thing2); } else {