changeset 36478:742df7c33f75

(parse_qualified_param_ident_or_type): Return a freshly allocated object in *LAST_ID. (read_line): Accept \r\n line endings.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 02 Mar 2001 12:34:45 +0000
parents 957e48a1565e
children ac3ee681e8f9
files lib-src/ebrowse.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ebrowse.c	Fri Mar 02 12:27:41 2001 +0000
+++ b/lib-src/ebrowse.c	Fri Mar 02 12:34:45 2001 +0000
@@ -2914,8 +2914,8 @@
      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 @@
 	{
 	  cls = add_sym (id, cls);
 	  *last_id = NULL;
+	  xfree (id);
+	  id = NULL;
+	  id_size = 0;
 	  MATCH ();
 	}
       else
@@ -3617,6 +3620,8 @@
     }
 
   buffer[i] = '\0';
+  if (i > 0 && buffer[i - 1] == '\r')
+    buffer[i - 1] = '\0';
   return buffer;
 }