mirror of
https://github.com/open-simh/simtools.git
synced 2026-04-29 13:12:09 +00:00
Merge commit 'c311f6a175fd52da171795bc093762f4eba4c136' into macro11-v0.7.2
Update to latest released version of macro-11. Command run: git subtree pull --prefix=crossassemblers/macro11 ../macro11 macro11-v0.7.2 (should be equivalent to git subtree pull --prefix=crossassemblers/macro11 git://gitlab.com/Rhialto/macro11.git macro11-v0.7.2)
This commit is contained in:
@@ -29,7 +29,7 @@ typedef struct rept_stream {
|
||||
|
||||
/* rept_stream_gets gets a line from a repeat stream. At the end of
|
||||
each count, the coutdown is decreated and the stream is reset to
|
||||
it's beginning. */
|
||||
its beginning. */
|
||||
|
||||
char *rept_stream_gets(
|
||||
STREAM *str)
|
||||
@@ -38,13 +38,14 @@ char *rept_stream_gets(
|
||||
char *cp;
|
||||
|
||||
for (;;) {
|
||||
if (rstr->count <= 0)
|
||||
return NULL;
|
||||
|
||||
if ((cp = buffer_stream_gets(str)) != NULL)
|
||||
return cp;
|
||||
|
||||
if (--rstr->count <= 0)
|
||||
return NULL;
|
||||
|
||||
buffer_stream_rewind(str);
|
||||
rstr->count--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +84,14 @@ STREAM *expand_rept(
|
||||
free_tree(value);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
* Reading the next lines-to-be-repeated overwrites the line buffer
|
||||
* that the caller is using. So for junk-at-end-of-line checking we
|
||||
* need to do it here.
|
||||
*/
|
||||
check_eol(stack, value->cp);
|
||||
|
||||
list_value(stack->top, value->data.lit);
|
||||
|
||||
gb = new_buffer();
|
||||
|
||||
@@ -211,6 +220,8 @@ STREAM *expand_irp(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
check_eol(stack, cp);
|
||||
|
||||
gb = new_buffer();
|
||||
|
||||
levelmod = 0;
|
||||
@@ -339,6 +350,8 @@ STREAM *expand_irpc(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
check_eol(stack, cp);
|
||||
|
||||
gb = new_buffer();
|
||||
|
||||
levelmod = 0;
|
||||
|
||||
Reference in New Issue
Block a user