Revert second bunch of mhl patches (see 9b9cab5874)

This reintroduce GString again and drop the use of mhl_mem_free in some files

Signed-off-by: Patrick Winnertz <winnie@debian.org>
This commit is contained in:
Patrick Winnertz 2009-02-05 23:18:38 +01:00
parent 5920d13810
commit 155fd328a4
2 changed files with 12 additions and 10 deletions

View File

@ -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;

View File

@ -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;
}