Added some patches for ISO C90 compatibility.

This commit is contained in:
rillig 2005-12-18 20:24:46 +00:00
parent 8650b1c1bc
commit a68c2bf7dd
6 changed files with 129 additions and 1 deletions

View file

@ -1,5 +1,10 @@
$NetBSD: distinfo,v 1.5 2005/11/22 19:27:46 wiz Exp $
$NetBSD: distinfo,v 1.6 2005/12/18 20:24:46 rillig Exp $
SHA1 (gmpc-0.12.0.tar.gz) = 89f4ac5e1bd1c89cf2e7a8d1d8a3ed16f8931cfa
RMD160 (gmpc-0.12.0.tar.gz) = 8061590dc633633a09bf64662ae06c35e4e1a3ca
Size (gmpc-0.12.0.tar.gz) = 452390 bytes
SHA1 (patch-aa) = 6223ea3d0fa230b28900885cdb9d00e8533eb8a2
SHA1 (patch-ab) = de883be7b1ec93041530ab0ef5d6b7a06bc43b1d
SHA1 (patch-ac) = a88c2782233136e4ad50ba183e5b53278a69b755
SHA1 (patch-ad) = 712040c9303532cbf08d299023468789f497f222
SHA1 (patch-af) = 6b86c55f44b12073439c822e50b960ff390e3fbb

View file

@ -0,0 +1,18 @@
$NetBSD: patch-aa,v 1.3 2005/12/18 20:24:46 rillig Exp $
Keywords: c90
--- src/edit_markup.c.orig Sun Jun 19 11:58:50 2005
+++ src/edit_markup.c Sun Dec 18 21:11:14 2005
@@ -121,8 +121,10 @@ char * edit_song_markup(char *format)
{
char *str_format = NULL;
GtkTextIter start_iter, stop_iter;
+ GtkWidget *dialog;
+
xml_esf= glade_xml_new(GLADE_PATH"gmpc.glade", "esf_dialog",NULL);
- GtkWidget *dialog = glade_xml_get_widget(xml_esf, "esf_dialog");
+ dialog = glade_xml_get_widget(xml_esf, "esf_dialog");
buffer= gtk_text_view_get_buffer(GTK_TEXT_VIEW(glade_xml_get_widget(xml_esf, "textview_markup")));
glade_xml_signal_autoconnect (xml_esf);
g_signal_connect(G_OBJECT(buffer), "changed", G_CALLBACK(esf_render_example), NULL);

View file

@ -0,0 +1,34 @@
$NetBSD: patch-ab,v 1.1 2005/12/18 20:24:46 rillig Exp $
Keywords: c90
--- src/main.c.orig Sun Aug 14 18:43:45 2005
+++ src/main.c Sun Dec 18 21:01:32 2005
@@ -333,6 +333,7 @@ int update_interface ()
void playlist_changed(MpdObj *mi, int old_playlist_id, int new_playlist_id)
{
MpdData *data = NULL;
+ char *string;
/*
* so I don't have to check all the time
@@ -342,7 +343,7 @@ void playlist_changed(MpdObj *mi, int ol
gchar buffer[1024];
debug_printf(DEBUG_INFO, "playlist_changed_callback: playlist changed\n");
old_length = info.playlist_length;
- char *string = cfg_get_single_value_as_string_with_default(config, "playlist","markup", DEFAULT_PLAYLIST_MARKUP);
+ string = cfg_get_single_value_as_string_with_default(config, "playlist","markup", DEFAULT_PLAYLIST_MARKUP);
data = mpd_ob_playlist_get_changes(mi,info.playlist_id);
@@ -608,8 +609,9 @@ void error_callback(MpdObj *mi, int erro
if (xml_error_window == NULL)
{
gchar *str = g_strdup_printf("error code %i: %s", error_id, error_msg);
+ GtkWidget *dialog;
xml_error_window = glade_xml_new(GLADE_PATH"gmpc.glade", "error_dialog",NULL);
- GtkWidget *dialog = glade_xml_get_widget(xml_error_window, "error_dialog");
+ dialog = glade_xml_get_widget(xml_error_window, "error_dialog");
gtk_label_set_markup(GTK_LABEL(glade_xml_get_widget(xml_error_window,"em_label")), str);
gtk_widget_show_all(dialog);
g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(error_window_destroy), GINT_TO_POINTER(autoconnect));

View file

@ -0,0 +1,22 @@
$NetBSD: patch-ac,v 1.1 2005/12/18 20:24:46 rillig Exp $
Keywords: c90
--- src/misc.c.orig Tue May 3 10:40:16 2005
+++ src/misc.c Sun Dec 18 21:06:07 2005
@@ -87,12 +87,14 @@ gchar * format_time(unsigned long second
int houres = (seconds % 86400)/3600;
int minutes = (seconds % 3600)/60;
char *ret;
+ GString *str;
+
if(seconds == 0)
{
GString *str = g_string_new(NULL);
return str->str;
}
- GString *str = g_string_new(" Total time: ");
+ str = g_string_new(" Total time: ");
if(days != 0)
{
g_string_append_printf(str, "%i days ", days);

View file

@ -0,0 +1,19 @@
$NetBSD: patch-ad,v 1.1 2005/12/18 20:24:46 rillig Exp $
Keywords: c90
--- src/player.c.orig Sat Aug 6 22:25:32 2005
+++ src/player.c Sun Dec 18 21:03:56 2005
@@ -273,9 +273,11 @@ void msg_pop_popup()
int update_player()
{
+ GtkRange *scale;
+
if(!mpd_ob_check_connected(connection)) return FALSE;
/* update the volume slider */
- GtkRange *scale = (GtkRange *)glade_xml_get_widget(xml_main_window, "volume_slider");
+ scale = (GtkRange *)glade_xml_get_widget(xml_main_window, "volume_slider");
if((int)gtk_range_get_value(scale) != mpd_ob_status_get_volume(connection))
{
gtk_range_set_value(scale, (double)mpd_ob_status_get_volume(connection));

View file

@ -0,0 +1,30 @@
$NetBSD: patch-af,v 1.1 2005/12/18 20:24:46 rillig Exp $
Keywords: c90
--- src/playlist3.c.orig Sun Aug 14 15:01:07 2005
+++ src/playlist3.c Sun Dec 18 21:09:30 2005
@@ -193,7 +193,7 @@ unsigned long pl3_find_view_browser()
if(loop)
{
GtkTreeIter piter;
- int id = 0, ttime = 0;;
+ int id = 0, ttime = 0;
char *icon;
gtk_tree_model_get(GTK_TREE_MODEL(pl2_store), &iter, SONG_ID, &id, SONG_STOCK_ID, &icon, -1);
gtk_list_store_append(pl3_store, &piter);
@@ -1239,9 +1239,12 @@ void pl3_playlist_row_activated(GtkTreeV
*/
void pl3_reinitialize_tree()
{
+ GtkTreePath *path;
+ GtkTreeSelection *sel;
+
if(pl3_xml == NULL) return;
- GtkTreePath *path = gtk_tree_path_new_from_string("0");
- GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(glade_xml_get_widget(pl3_xml, "cat_tree")));
+ path = gtk_tree_path_new_from_string("0");
+ sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(glade_xml_get_widget(pl3_xml, "cat_tree")));
gtk_tree_store_clear(pl3_tree);
/* add the current playlist */
pl3_current_playlist_add();