updated: [155fd32] Revert second bunch of mhl patches (see 9b9cab58749217101ab16504a77efb301812cfbf)
- From: "Patrick Winnertz" <winnie debian org>
- To: mc-devel gnome org
- Subject: updated: [155fd32] Revert second bunch of mhl patches (see 9b9cab58749217101ab16504a77efb301812cfbf)
- Date: Tue, 10 Feb 2009 12:49:52 +0100 (CET)
The following commit has been merged in the master branch:
commit 155fd328a4b9f085d1f44ea710a5dee4a7d67f3e
Author: Patrick Winnertz <winnie debian org>
Date: Thu Feb 5 23:18:38 2009 +0100
Revert second bunch of mhl patches (see 9b9cab58749217101ab16504a77efb301812cfbf)
This reintroduce GString again and drop the use of mhl_mem_free in some files
Signed-off-by: Patrick Winnertz <winnie debian org>
diff --git a/edit/edit.c b/edit/edit.c
index 36284df..e853a96 100644
--- a/edit/edit.c
+++ b/edit/edit.c
@@ -274,20 +274,22 @@ edit_insert_file (WEdit *edit, const char *filename)
edit_insert_stream (edit, f);
edit_cursor_move (edit, current - edit->curs1);
if (pclose (f) > 0) {
- char errmsg[8192];
- snprintf(errmsg, sizeof(errmsg), _(" Error reading from pipe: %s "), p);
- edit_error_dialog (_("Error"), errmsg);
- mhl_mem_free (p);
+ GString *errmsg = g_string_new (NULL);
+ g_string_sprintf (errmsg, _(" Error reading from pipe: %s "), p);
+ edit_error_dialog (_("Error"), errmsg->str);
+ g_string_free (errmsg, TRUE);
+ g_free (p);
return 0;
}
} else {
- char errmsg[8192];
- snprintf(errmsg, sizeof(errmsg), _(" Cannot open pipe for reading: %s "), p);
- edit_error_dialog (_("Error"), errmsg);
- mhl_mem_free (p);
+ GString *errmsg = g_string_new (NULL);
+ g_string_sprintf (errmsg, _(" Cannot open pipe for reading: %s "), p);
+ edit_error_dialog (_("Error"), errmsg->str);
+ g_string_free (errmsg, TRUE);
+ g_free (p);
return 0;
}
- mhl_mem_free (p);
+ g_free (p);
} else {
int i, file, blocklen;
long current = edit->curs1;
diff --git a/src/utilunix.c b/src/utilunix.c
index 4cf70dc..5dfa18e 100644
--- a/src/utilunix.c
+++ b/src/utilunix.c
@@ -590,7 +590,7 @@ putenv (char *string)
size * sizeof (char *));
new_environ[size] = (char *) string;
new_environ[size + 1] = NULL;
- mhl_mem_free ((void *) last_environ);
+ g_free ((void *) last_environ);
last_environ = new_environ;
__environ = new_environ;
}
--
Midnight Commander Development
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]