1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Index: apps/misc.h
===================================================================
--- apps/misc.h	(revision 30049)
+++ apps/misc.h	(working copy)
@@ -57,7 +57,7 @@
  */
 int read_line(int fd, char* buffer, int buffer_size);
 int fast_readline(int fd, char *buf, int buf_size, void *parameters,
-                  int (*callback)(int n, const char *buf, void *parameters));
+                  int (*callback)(int n, char *buf, void *parameters));
 
 bool settings_parseline(char* line, char** name, char** value);
 long default_event_handler_ex(long event, void (*callback)(void *), void *parameter);
Index: apps/tagcache.c
===================================================================
--- apps/tagcache.c	(revision 30049)
+++ apps/tagcache.c	(working copy)
@@ -3350,7 +3350,7 @@
     return false;
 }
 
-static int parse_changelog_line(int line_n, const char *buf, void *parameters)
+static int parse_changelog_line(int line_n, char *buf, void *parameters)
 {
     struct index_entry idx;
     char tag_data[TAG_MAXLEN+32];
Index: apps/misc.c
===================================================================
--- apps/misc.c	(revision 30049)
+++ apps/misc.c	(working copy)
@@ -170,7 +170,7 @@
 
 /* Performance optimized version of the read_line() (see below) function. */
 int fast_readline(int fd, char *buf, int buf_size, void *parameters,
-                  int (*callback)(int n, const char *buf, void *parameters))
+                  int (*callback)(int n, char *buf, void *parameters))
 {
     char *p, *next;
     int rc, pos = 0;
Index: apps/tagtree.c
===================================================================
--- apps/tagtree.c	(revision 30049)
+++ apps/tagtree.c	(working copy)
@@ -852,15 +852,21 @@
 
 static bool parse_menu(const char *filename);
 
-static int parse_line(int n, const char *buf, void *parameters)
+static int parse_line(int n, char *buf, void *parameters)
 {
     char data[256];
     int variable;
     static bool read_menu;
     int i;
+    char *p;
     
     (void)parameters;
     
+    /* Strip possible <CR> at end of line. */
+    p = strchr(buf, '\r');
+    if (p != NULL)
+        *p = '\0';
+    
     logf("parse:%d/%s", n, buf);
     
     /* First line, do initialisation. */