diff options
author | Gerd Moellmann <[email protected]> | 2001-03-02 12:34:45 +0000 |
---|---|---|
committer | Gerd Moellmann <[email protected]> | 2001-03-02 12:34:45 +0000 |
commit | 1727db8c85c00fca94aff36d94439219531c6f66 (patch) | |
tree | 95286f39ec6e49da6bd2da11f9a03e02a2b09646 | |
parent | 38458147e811ad45077d7f7f0ff70c09fbe18dd1 (diff) |
(parse_qualified_param_ident_or_type): Return a
freshly allocated object in *LAST_ID.
(read_line): Accept \r\n line endings.
-rw-r--r-- | lib-src/ebrowse.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 58e9c45945..cdd3ccba2c 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -2914,8 +2914,8 @@ parse_qualified_ident_or_type (last_id) char **last_id; { struct sym *cls = NULL; - static char *id = NULL; - static int id_size = 0; + char *id = NULL; + size_t id_size = 0; while (LOOKING_AT (IDENT)) { @@ -2935,6 +2935,9 @@ parse_qualified_ident_or_type (last_id) { cls = add_sym (id, cls); *last_id = NULL; + xfree (id); + id = NULL; + id_size = 0; MATCH (); } else @@ -3617,6 +3620,8 @@ read_line (fp) } buffer[i] = '\0'; + if (i > 0 && buffer[i - 1] == '\r') + buffer[i - 1] = '\0'; return buffer; } |