Mercurial > audlegacy
changeset 248:e557fce67f47 trunk
[svn] Avoid discarding pointer type qualifiers.
author | chainsaw |
---|---|
date | Sat, 03 Dec 2005 08:46:07 -0800 |
parents | 95f7737919b1 |
children | a4566101cab4 |
files | Plugins/Input/flac/charset.c Plugins/Input/flac/charset.h Plugins/Input/flac/configure.c Plugins/Input/flac/fileinfo.c |
diffstat | 4 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/Input/flac/charset.c Sat Dec 03 08:17:14 2005 -0800 +++ b/Plugins/Input/flac/charset.c Sat Dec 03 08:46:07 2005 -0800 @@ -167,7 +167,7 @@ /* * Return charset_name from charset_title */ -gchar *Charset_Get_Name_From_Title (gchar *charset_title) +gchar *Charset_Get_Name_From_Title (const gchar *charset_title) { guint i; @@ -182,7 +182,7 @@ /* * Return charset_title from charset_name */ -gchar *Charset_Get_Title_From_Name (gchar *charset_name) +gchar *Charset_Get_Title_From_Name (const gchar *charset_name) { guint i;
--- a/Plugins/Input/flac/charset.h Sat Dec 03 08:17:14 2005 -0800 +++ b/Plugins/Input/flac/charset.h Sat Dec 03 08:46:07 2005 -0800 @@ -49,8 +49,8 @@ GList *Charset_Create_List (void); GList *Charset_Create_List_UTF8_Only (void); -gchar *Charset_Get_Name_From_Title (gchar *charset_title); -gchar *Charset_Get_Title_From_Name (gchar *charset_name); +gchar *Charset_Get_Name_From_Title (const gchar *charset_title); +gchar *Charset_Get_Title_From_Name (const gchar *charset_name); #endif /* __CHARSET_H__ */
--- a/Plugins/Input/flac/configure.c Sat Dec 03 08:17:14 2005 -0800 +++ b/Plugins/Input/flac/configure.c Sat Dec 03 08:46:07 2005 -0800 @@ -121,7 +121,7 @@ static GtkWidget *streaming_proxy_hbox, *streaming_proxy_auth_hbox, *streaming_save_dirbrowser; static GtkWidget *streaming_save_hbox; -static gchar *gtk_entry_get_text_1 (GtkWidget *widget); +static const gchar *gtk_entry_get_text_1 (GtkWidget *widget); static void flac_configurewin_ok(GtkWidget * widget, gpointer data); static void configure_destroy(GtkWidget * w, gpointer data); @@ -803,7 +803,7 @@ /* * Get text of an Entry or a ComboBox */ -static gchar *gtk_entry_get_text_1 (GtkWidget *widget) +static const gchar *gtk_entry_get_text_1 (GtkWidget *widget) { if (GTK_IS_COMBO(widget)) {
--- a/Plugins/Input/flac/fileinfo.c Sat Dec 03 08:17:14 2005 -0800 +++ b/Plugins/Input/flac/fileinfo.c Sat Dec 03 08:46:07 2005 -0800 @@ -122,9 +122,12 @@ gchar *text; char *utf8; - text = gtk_entry_get_text(entry); - if (!text || strlen(text) == 0) + text = g_strdup(gtk_entry_get_text(entry)); + if (!text || strlen(text) == 0) + { + g_free(text); return; + } if(flac_cfg.title.convert_char_set) utf8 = convert_from_user_to_utf8(text); else @@ -134,6 +137,7 @@ if(flac_cfg.title.convert_char_set) free(utf8); + g_free(text); } static void show_tag()