From: Gerd Moellmann Date: Fri, 2 Mar 2001 12:34:45 +0000 (+0000) Subject: (parse_qualified_param_ident_or_type): Return a X-Git-Tag: emacs-pretest-21.0.99~51 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1727db8c85c00fca94aff36d94439219531c6f66;p=emacs.git (parse_qualified_param_ident_or_type): Return a freshly allocated object in *LAST_ID. (read_line): Accept \r\n line endings. --- diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 58e9c45945d..cdd3ccba2c5 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; }