# HG changeset patch # User Christian Hammond # Date 1054972644 0 # Node ID 5e93fc46d1afd67b40416746f3084abd99d88ae8 # Parent 952710ac6635fa8c9a27c345a2d613377d552820 [gaim-migrate @ 6219] Removed the __ prefix from static functions. I love them, but ANSI C knocked on my door and threatened to sue, saying they own all rights to them, so I was forced to remove them. committer: Tailor Script diff -r 952710ac6635 -r 5e93fc46d1af src/account.c --- a/src/account.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/account.c Sat Jun 07 07:57:24 2003 +0000 @@ -93,7 +93,7 @@ static gboolean accounts_loaded = FALSE; static void -__delete_setting(void *data) +delete_setting(void *data) { GaimAccountSetting *setting = (GaimAccountSetting *)data; @@ -107,7 +107,7 @@ } static gboolean -__accounts_save_cb(gpointer unused) +accounts_save_cb(gpointer unused) { gaim_accounts_sync(); accounts_save_timer = 0; @@ -119,7 +119,7 @@ schedule_accounts_save() { if (!accounts_save_timer) - accounts_save_timer = g_timeout_add(5000, __accounts_save_cb, NULL); + accounts_save_timer = g_timeout_add(5000, accounts_save_cb, NULL); } GaimAccount * @@ -135,7 +135,7 @@ gaim_account_set_protocol(account, protocol); account->settings = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, __delete_setting); + g_free, delete_setting); account->ui_settings = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_hash_table_destroy); @@ -333,7 +333,7 @@ g_hash_table_destroy(account->settings); account->settings = g_hash_table_new_full(g_str_hash, g_str_equal, - g_free, __delete_setting); + g_free, delete_setting); } void @@ -392,7 +392,7 @@ } static GHashTable * -_get_ui_settings_table(GaimAccount *account, const char *ui) +get_ui_settings_table(GaimAccount *account, const char *ui) { GHashTable *table; @@ -400,7 +400,7 @@ if (table == NULL) { table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, - __delete_setting); + delete_setting); g_hash_table_insert(account->ui_settings, g_strdup(ui), table); } @@ -424,7 +424,7 @@ setting->ui = g_strdup(ui); setting->value.integer = value; - table = _get_ui_settings_table(account, ui); + table = get_ui_settings_table(account, ui); g_hash_table_insert(table, g_strdup(name), setting); @@ -448,7 +448,7 @@ setting->ui = g_strdup(ui); setting->value.string = g_strdup(value); - table = _get_ui_settings_table(account, ui); + table = get_ui_settings_table(account, ui); g_hash_table_insert(table, g_strdup(name), setting); @@ -472,7 +472,7 @@ setting->ui = g_strdup(ui); setting->value.bool = value; - table = _get_ui_settings_table(account, ui); + table = get_ui_settings_table(account, ui); g_hash_table_insert(table, g_strdup(name), setting); @@ -702,7 +702,7 @@ /* XML Stuff */ static void -__free_parser_data(gpointer user_data) +free_parser_data(gpointer user_data) { AccountParserData *data = user_data; @@ -716,11 +716,11 @@ } static void -__start_element_handler(GMarkupParseContext *context, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, - gpointer user_data, GError **error) +start_element_handler(GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, GError **error) { const char *value; AccountParserData *data = user_data; @@ -785,8 +785,8 @@ } static void -__end_element_handler(GMarkupParseContext *context, const gchar *element_name, - gpointer user_data, GError **error) +end_element_handler(GMarkupParseContext *context, const gchar *element_name, + gpointer user_data, GError **error) { AccountParserData *data = user_data; gchar *buffer; @@ -927,8 +927,8 @@ } static void -__text_handler(GMarkupParseContext *context, const gchar *text, - gsize text_len, gpointer user_data, GError **error) +text_handler(GMarkupParseContext *context, const gchar *text, + gsize text_len, gpointer user_data, GError **error) { AccountParserData *data = user_data; @@ -940,9 +940,9 @@ static GMarkupParser accounts_parser = { - __start_element_handler, - __end_element_handler, - __text_handler, + start_element_handler, + end_element_handler, + text_handler, NULL, NULL }; @@ -975,7 +975,7 @@ parser_data = g_new0(AccountParserData, 1); context = g_markup_parse_context_new(&accounts_parser, 0, - parser_data, __free_parser_data); + parser_data, free_parser_data); if (!g_markup_parse_context_parse(context, contents, length, NULL)) { g_markup_parse_context_free(context); @@ -1008,7 +1008,7 @@ } static void -_write_setting(gpointer key, gpointer value, gpointer user_data) +write_setting(gpointer key, gpointer value, gpointer user_data) { GaimAccountSetting *setting; const char *name; @@ -1033,7 +1033,7 @@ } static void -_write_ui_setting_list(gpointer key, gpointer value, gpointer user_data) +write_ui_setting_list(gpointer key, gpointer value, gpointer user_data) { GHashTable *table; const char *ui; @@ -1044,7 +1044,7 @@ fp = (FILE *)user_data; fprintf(fp, " \n", ui); - g_hash_table_foreach(table, _write_setting, fp); + g_hash_table_foreach(table, write_setting, fp); fprintf(fp, " \n"); } @@ -1088,10 +1088,10 @@ } fprintf(fp, " \n"); - g_hash_table_foreach(account->settings, _write_setting, fp); + g_hash_table_foreach(account->settings, write_setting, fp); fprintf(fp, " \n"); - g_hash_table_foreach(account->ui_settings, _write_ui_setting_list, fp); + g_hash_table_foreach(account->ui_settings, write_ui_setting_list, fp); if ((proxy_info = gaim_account_get_proxy_info(account)) != NULL && (proxy_type = gaim_proxy_info_get_type(proxy_info)) != GAIM_PROXY_NONE) diff -r 952710ac6635 -r 5e93fc46d1af src/blist.h --- a/src/blist.h Sat Jun 07 06:41:31 2003 +0000 +++ b/src/blist.h Sat Jun 07 07:57:24 2003 +0000 @@ -32,6 +32,7 @@ /* TODO Namespace these! */ struct chat; +struct buddy; #include "account.h" diff -r 952710ac6635 -r 5e93fc46d1af src/gtkdebug.c --- a/src/gtkdebug.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/gtkdebug.c Sat Jun 07 07:57:24 2003 +0000 @@ -64,7 +64,7 @@ } static gboolean -__configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win) +configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win) { if (GTK_WIDGET_VISIBLE(w)) { gaim_prefs_set_int("/gaim/gtk/debug/width", event->width); @@ -75,19 +75,19 @@ } static void -__clear_cb(GtkWidget *w, DebugWindow *win) +clear_cb(GtkWidget *w, DebugWindow *win) { gtk_imhtml_clear(GTK_IMHTML(win->text)); } static void -__pause_cb(GtkWidget *w, DebugWindow *win) +pause_cb(GtkWidget *w, DebugWindow *win) { win->paused = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); } static void -__timestamps_cb(GtkWidget *w, DebugWindow *win) +timestamps_cb(GtkWidget *w, DebugWindow *win) { win->timestamps = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); @@ -127,7 +127,7 @@ g_signal_connect(G_OBJECT(win->window), "delete_event", G_CALLBACK(debug_window_destroy), NULL); g_signal_connect(G_OBJECT(win->window), "configure_event", - G_CALLBACK(__configure_cb), win); + G_CALLBACK(configure_cb), win); /* Setup the vbox */ vbox = gtk_vbox_new(FALSE, 0); @@ -154,7 +154,7 @@ /* Clear button */ gtk_toolbar_insert_stock(GTK_TOOLBAR(toolbar), GTK_STOCK_CLEAR, - NULL, NULL, G_CALLBACK(__clear_cb), win, -1); + NULL, NULL, G_CALLBACK(clear_cb), win, -1); gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); @@ -162,13 +162,13 @@ gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, _("Pause"), NULL, NULL, - NULL, G_CALLBACK(__pause_cb), win); + NULL, G_CALLBACK(pause_cb), win); /* Timestamps */ button = gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, _("Timestamps"), NULL, NULL, - NULL, G_CALLBACK(__timestamps_cb), + NULL, G_CALLBACK(timestamps_cb), win); win->timestamps_handle = @@ -225,7 +225,7 @@ gaim_prefs_add_int("/gaim/gtk/debug/height", 250); gaim_prefs_connect_callback("/gaim/gtk/debug/enabled", - debug_enabled_cb, NULL); + debug_enabled_cb, NULL); } void diff -r 952710ac6635 -r 5e93fc46d1af src/gtknotify.c --- a/src/gtknotify.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/gtknotify.c Sat Jun 07 07:57:24 2003 +0000 @@ -43,7 +43,7 @@ void *user_data); static void -__email_response_cb(GtkDialog *dialog, gint id, GaimNotifyMailData *data) +email_response_cb(GtkDialog *dialog, gint id, GaimNotifyMailData *data) { if (id == 0) open_url(NULL, data->url); @@ -161,7 +161,7 @@ gtk_dialog_add_button(GTK_DIALOG(dialog), GAIM_STOCK_OPEN_MAIL, 0); g_signal_connect(G_OBJECT(dialog), "response", - G_CALLBACK(__email_response_cb), data); + G_CALLBACK(email_response_cb), data); /* Setup the dialog */ gtk_container_set_border_width(GTK_CONTAINER(dialog), 6); diff -r 952710ac6635 -r 5e93fc46d1af src/gtkrequest.c --- a/src/gtkrequest.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/gtkrequest.c Sat Jun 07 07:57:24 2003 +0000 @@ -53,7 +53,7 @@ } GaimRequestData; static void -__input_response_cb(GtkDialog *dialog, gint id, GaimRequestData *data) +input_response_cb(GtkDialog *dialog, gint id, GaimRequestData *data) { const char *value; @@ -78,7 +78,7 @@ } static void -__action_response_cb(GtkDialog *dialog, gint id, GaimRequestData *data) +action_response_cb(GtkDialog *dialog, gint id, GaimRequestData *data) { if (id < data->cb_count && data->cbs[id] != NULL) ((GaimRequestActionCb)data->cbs[id])(data->user_data, id); @@ -91,7 +91,7 @@ return (l); static const char * -__text_to_stock(const char *text) +text_to_stock(const char *text) { STOCK_ITEMIZE(_("Yes"), GTK_STOCK_YES); STOCK_ITEMIZE(_("No"), GTK_STOCK_NO); @@ -135,13 +135,13 @@ /* Create the dialog. */ dialog = gtk_dialog_new_with_buttons("", NULL, 0, - __text_to_stock(cancel_text), 1, - __text_to_stock(ok_text), 0, + text_to_stock(cancel_text), 1, + text_to_stock(ok_text), 0, NULL); data->dialog = dialog; g_signal_connect(G_OBJECT(dialog), "response", - G_CALLBACK(__input_response_cb), data); + G_CALLBACK(input_response_cb), data); /* Setup the dialog */ gtk_container_set_border_width(GTK_CONTAINER(dialog), 6); @@ -272,7 +272,7 @@ for (i = 0; i < action_count; i++) { gtk_dialog_add_button(GTK_DIALOG(dialog), - __text_to_stock(buttons[2 * i]), i); + text_to_stock(buttons[2 * i]), i); data->cbs[i] = buttons[2 * i + 1]; } @@ -280,7 +280,7 @@ g_free(buttons); g_signal_connect(G_OBJECT(dialog), "response", - G_CALLBACK(__action_response_cb), data); + G_CALLBACK(action_response_cb), data); /* Setup the dialog */ gtk_container_set_border_width(GTK_CONTAINER(dialog), 6); diff -r 952710ac6635 -r 5e93fc46d1af src/gtksound.c --- a/src/gtksound.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/gtksound.c Sat Jun 07 07:57:24 2003 +0000 @@ -90,7 +90,7 @@ static int ao_driver = -1; #endif /* USE_AO */ -static void __pref_sound_method_changed(const char *name, GaimPrefType type, +static void _pref_sound_method_changed(const char *name, GaimPrefType type, gpointer val, gpointer data); static void gaim_gtk_sound_init(void) @@ -129,7 +129,7 @@ #endif /* USE_AO */ gaim_prefs_connect_callback("/gaim/gtk/sound/method", - __pref_sound_method_changed, NULL); + _pref_sound_method_changed, NULL); gaim_prefs_trigger_callback("/gaim/gtk/sound/method"); } @@ -321,7 +321,7 @@ } -static void __pref_sound_method_changed(const char *name, GaimPrefType type, +static void _pref_sound_method_changed(const char *name, GaimPrefType type, gpointer val, gpointer data) { if(type != GAIM_PREF_STRING || strcmp(name, "/gaim/gtk/sound/method")) return; diff -r 952710ac6635 -r 5e93fc46d1af src/gtkutils.c --- a/src/gtkutils.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/gtkutils.c Sat Jun 07 07:57:24 2003 +0000 @@ -526,7 +526,7 @@ } static void -__protocol_menu_cb(GtkWidget *optmenu, GCallback cb) +protocol_menu_cb(GtkWidget *optmenu, GCallback cb) { GtkWidget *menu; GtkWidget *item; @@ -639,7 +639,7 @@ gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu), selected_index); g_signal_connect(G_OBJECT(optmenu), "changed", - G_CALLBACK(__protocol_menu_cb), cb); + G_CALLBACK(protocol_menu_cb), cb); g_object_unref(sg); diff -r 952710ac6635 -r 5e93fc46d1af src/main.c --- a/src/main.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/main.c Sat Jun 07 07:57:24 2003 +0000 @@ -656,7 +656,6 @@ #ifdef DEBUG opt_debug = 1; #endif - abort(); #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); diff -r 952710ac6635 -r 5e93fc46d1af src/plugin.c --- a/src/plugin.c Sat Jun 07 06:41:31 2003 +0000 +++ b/src/plugin.c Sat Jun 07 07:57:24 2003 +0000 @@ -98,7 +98,7 @@ } static gboolean -__loader_supports_file(GaimPlugin *loader, const char *filename) +loader_supports_file(GaimPlugin *loader, const char *filename) { GList *l, *exts; GaimPlugin *plugin; @@ -119,7 +119,7 @@ } static GaimPlugin * -__find_loader_for_plugin(const GaimPlugin *plugin) +find_loader_for_plugin(const GaimPlugin *plugin) { GaimPlugin *loader; GList *l; @@ -131,7 +131,7 @@ loader = l->data; if (loader->info->type == GAIM_PLUGIN_LOADER && - __loader_supports_file(loader, plugin->path)) { + loader_supports_file(loader, plugin->path)) { return loader; } @@ -213,7 +213,7 @@ } } else { - loader = __find_loader_for_plugin(plugin); + loader = find_loader_for_plugin(plugin); if (loader == NULL) { gaim_plugin_destroy(plugin); @@ -278,7 +278,7 @@ GaimPlugin *loader; GaimPluginLoaderInfo *loader_info; - loader = __find_loader_for_plugin(plugin); + loader = find_loader_for_plugin(plugin); if (loader == NULL) return FALSE; @@ -358,7 +358,7 @@ GaimPlugin *loader; GaimPluginLoaderInfo *loader_info; - loader = __find_loader_for_plugin(plugin); + loader = find_loader_for_plugin(plugin); if (loader == NULL) return FALSE; @@ -449,7 +449,7 @@ GaimPlugin *loader; GaimPluginLoaderInfo *loader_info; - loader = __find_loader_for_plugin(plugin); + loader = find_loader_for_plugin(plugin); if (loader == NULL) return;