summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNickolay Yurchenko <unv@rbcmail.ru>2003-09-26 19:03:40 +0000
committerNickolay Yurchenko <unv@rbcmail.ru>2003-09-26 19:03:40 +0000
commitf7956c4072428edd2cace7dadd0f5bb8826a0e8b (patch)
tree9991dfefee446a70eec921329dfcb046abad99aa
parent0a76a9e69069cc45a44fcec08c7f52932cdbc0f4 (diff)
downloadnasm-f7956c4072428edd2cace7dadd0f5bb8826a0e8b.tar.gz
For compatibility with older code removed feature:
* Unterminated string auto termination.
-rw-r--r--CHANGES1
-rw-r--r--preproc.c64
2 files changed, 33 insertions, 32 deletions
diff --git a/CHANGES b/CHANGES
index be8e10fe..149f1cdb 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,6 @@
0.98.39
-------
* "make spotless" no longer deletes config.h.in.
-* Unterminated string auto termination.
* %(el)if(n)idn insensitivity to string quotes difference (#809300).
* (nasm.c) __OUTPUT_FORMAT__ changed to string value instead of symbol.
diff --git a/preproc.c b/preproc.c
index e2fcb70e..0c209b5f 100644
--- a/preproc.c
+++ b/preproc.c
@@ -841,7 +841,8 @@ tokenise(char *line)
else
{
error(ERR_WARNING, "unterminated string");
- type = -1;
+ /* Handling unterminated strings by UNV */
+ /* type = -1; */
}
}
else if (isnumstart(*p))
@@ -904,14 +905,15 @@ tokenise(char *line)
p++;
}
- /* Handle unterminated string */
- if (type == -1)
+ /* Handling unterminated string by UNV */
+ /*if (type == -1)
{
*tail = t = new_Token(NULL, TOK_STRING, line, p-line+1);
t->text[p-line] = *line;
tail = &t->next;
}
- else if (type != TOK_COMMENT)
+ else*/
+ if (type != TOK_COMMENT)
{
*tail = t = new_Token(NULL, type, line, p - line);
tail = &t->next;
@@ -929,20 +931,20 @@ tokenise(char *line)
static void *
new_Block(size_t size)
{
- Blocks *b = &blocks;
+ Blocks *b = &blocks;
- /* first, get to the end of the linked list */
- while (b->next)
- b = b->next;
- /* now allocate the requested chunk */
- b->chunk = nasm_malloc(size);
+ /* first, get to the end of the linked list */
+ while (b->next)
+ b = b->next;
+ /* now allocate the requested chunk */
+ b->chunk = nasm_malloc(size);
- /* now allocate a new block for the next request */
- b->next = nasm_malloc(sizeof(Blocks));
- /* and initialize the contents of the new block */
- b->next->next = NULL;
- b->next->chunk = NULL;
- return b->chunk;
+ /* now allocate a new block for the next request */
+ b->next = nasm_malloc(sizeof(Blocks));
+ /* and initialize the contents of the new block */
+ b->next->next = NULL;
+ b->next->chunk = NULL;
+ return b->chunk;
}
/*
@@ -951,22 +953,22 @@ new_Block(size_t size)
static void
delete_Blocks(void)
{
- Blocks *a,*b = &blocks;
+ Blocks *a,*b = &blocks;
- /*
- * keep in mind that the first block, pointed to by blocks
- * is a static and not dynamically allocated, so we don't
- * free it.
- */
- while (b)
- {
- if (b->chunk)
- nasm_free(b->chunk);
- a = b;
- b = b->next;
- if (a != &blocks)
- nasm_free(a);
- }
+ /*
+ * keep in mind that the first block, pointed to by blocks
+ * is a static and not dynamically allocated, so we don't
+ * free it.
+ */
+ while (b)
+ {
+ if (b->chunk)
+ nasm_free(b->chunk);
+ a = b;
+ b = b->next;
+ if (a != &blocks)
+ nasm_free(a);
+ }
}
/*