summaryrefslogtreecommitdiff
path: root/legacy/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-08-28 06:18:53 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-08-28 06:18:53 +0000
commit54ad1a4c1dd39657a416fb98cc036247f6f939f2 (patch)
tree067edc31a2ebcb732f3b7409e2ef3f405349468f /legacy/evil
parent7322487bd2c0b5a0e66ed8860c17568e13cb73e7 (diff)
Evil: fix evil_format_message()
SVN revision: 75749
Diffstat (limited to 'legacy/evil')
-rw-r--r--legacy/evil/ChangeLog13
-rw-r--r--legacy/evil/NEWS5
-rw-r--r--legacy/evil/src/lib/evil_util.c9
3 files changed, 17 insertions, 10 deletions
diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog
index 53098610cd..559143907d 100644
--- a/legacy/evil/ChangeLog
+++ b/legacy/evil/ChangeLog
@@ -1,13 +1,11 @@
12012-08-20 Vincent Torri <doursse at users dot sf dot net> 12012-08-20 Vincent Torri <doursse at users dot sf dot net>
2 2
3 * configure.ac: 3 * src/lib/evil_util.c:
4 quoting. 4 fix evil_format_message(): free the message to display
5 5 at the end of the function. Hence the message is displayed,
6 * Makefile.am: 6 now.
7 * src/lib/Makefile.am:
8 fix distcheck
9 7
102012-08-19 Vincent Torri <doursse at users dot sf dot net> 8012-08-19 Vincent Torri <doursse at users dot sf dot net>
11 9
12 * configure.ac: 10 * configure.ac:
13 * src/bin/Makefile.am: 11 * src/bin/Makefile.am:
@@ -43,6 +41,7 @@
43 41
44 * NEWS: 42 * NEWS:
45 * src/lib/evil_langinfo.c: 43 * src/lib/evil_langinfo.c:
44 Release Version 1.1.0.
46 Fix nl_langinfo(RADIXCHAR). 45 Fix nl_langinfo(RADIXCHAR).
47 46
482012-04-20 Vincent Torri <doursse at users dot sf dot net> 472012-04-20 Vincent Torri <doursse at users dot sf dot net>
diff --git a/legacy/evil/NEWS b/legacy/evil/NEWS
index adfbceadba..7838617d80 100644
--- a/legacy/evil/NEWS
+++ b/legacy/evil/NEWS
@@ -1,7 +1,12 @@
1Evil NEWS - User visible changes. 1Evil NEWS - User visible changes.
2 2
3* Evil 1.7:
4
5** Correctly display messages with evil_format_message()
6
3* Evil 1.1: 7* Evil 1.1:
4 8
9** Released April 26th, 2012, by Vincent Torri
5** Add evil_path_is_absolute() API 10** Add evil_path_is_absolute() API
6** Add POSIX printf() family functions 11** Add POSIX printf() family functions
7** Add S_ISLNK macro 12** Add S_ISLNK macro
diff --git a/legacy/evil/src/lib/evil_util.c b/legacy/evil/src/lib/evil_util.c
index 84e8f31ac0..ad42559a71 100644
--- a/legacy/evil/src/lib/evil_util.c
+++ b/legacy/evil/src/lib/evil_util.c
@@ -142,11 +142,12 @@ evil_format_message(long err)
142 str = msg; 142 str = msg;
143#endif /* UNICODE */ 143#endif /* UNICODE */
144 144
145 LocalFree(msg);
146
147 disp = (char *)malloc((strlen(str) + strlen("(00000) ") + 1) * sizeof(char)); 145 disp = (char *)malloc((strlen(str) + strlen("(00000) ") + 1) * sizeof(char));
148 if (!disp) 146 if (!disp)
149 return NULL; 147 {
148 LocalFree(msg);
149 return NULL;
150 }
150 151
151 snprintf(disp, strlen(str) + strlen("(00000) ") + 1, 152 snprintf(disp, strlen(str) + strlen("(00000) ") + 1,
152 "(%5ld) %s", err, str); 153 "(%5ld) %s", err, str);
@@ -155,6 +156,8 @@ evil_format_message(long err)
155 free(str); 156 free(str);
156#endif /* UNICODE */ 157#endif /* UNICODE */
157 158
159 LocalFree(msg);
160
158 return disp; 161 return disp;
159} 162}
160 163