From: John Darrington Date: Fri, 12 Jan 2007 22:50:14 +0000 (+0000) Subject: Changed instances of 'signal' to 'signals', to avoid conflicts X-Git-Tag: v0.6.0~587 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=992bcbd6001c1b36828de093c3b218f5bfd688b6;p=pspp-builds.git Changed instances of 'signal' to 'signals', to avoid conflicts from /usr/include/signal.h --- diff --git a/src/ui/gui/ChangeLog b/src/ui/gui/ChangeLog index 6e8767ed..18558a0a 100644 --- a/src/ui/gui/ChangeLog +++ b/src/ui/gui/ChangeLog @@ -1,3 +1,11 @@ +Sat Jan 13 07:47:26 WST 2007 John Darrington + + * psppire-case-file.c psppire-data-store.c psppire-dialog.c + psppire-dict.c psppire-var-select.c : Replaced identifier 'signal' + with 'signals' to avoid conflict with sysv based systems which use + this identifer for something else. + Thanks to Daniel E WILLIAMS for reporting this problem. + Wed Jan 10 07:20:39 WST 2007 John Darrington * psppire-case-file.c : Make sure there is always a valid flexifile diff --git a/src/ui/gui/psppire-case-file.c b/src/ui/gui/psppire-case-file.c index 4c4bce88..fda12160 100644 --- a/src/ui/gui/psppire-case-file.c +++ b/src/ui/gui/psppire-case-file.c @@ -48,7 +48,7 @@ enum {CASE_CHANGED, CASES_DELETED, n_SIGNALS}; -static guint signal[n_SIGNALS]; +static guint signals [n_SIGNALS]; /* --- functions --- */ @@ -92,7 +92,7 @@ psppire_case_file_class_init (PsppireCaseFileClass *class) object_class->finalize = psppire_case_file_finalize; - signal[CASE_CHANGED] = + signals [CASE_CHANGED] = g_signal_new ("case_changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -104,7 +104,7 @@ psppire_case_file_class_init (PsppireCaseFileClass *class) G_TYPE_INT); - signal[CASE_INSERTED] = + signals [CASE_INSERTED] = g_signal_new ("case_inserted", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -116,7 +116,7 @@ psppire_case_file_class_init (PsppireCaseFileClass *class) G_TYPE_INT); - signal[CASES_DELETED] = + signals [CASES_DELETED] = g_signal_new ("cases_deleted", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -181,7 +181,7 @@ psppire_case_file_delete_cases (PsppireCaseFile *cf, gint n_cases, gint first) result = flexifile_delete_cases (FLEXIFILE (cf->flexifile), n_cases, first); - g_signal_emit (cf, signal[CASES_DELETED], 0, n_cases, first); + g_signal_emit (cf, signals [CASES_DELETED], 0, n_cases, first); return result; } @@ -200,7 +200,7 @@ psppire_case_file_insert_case (PsppireCaseFile *cf, result = flexifile_insert_case (FLEXIFILE (cf->flexifile), cc, posn); if ( result ) - g_signal_emit (cf, signal[CASE_INSERTED], 0, posn); + g_signal_emit (cf, signals [CASE_INSERTED], 0, posn); else g_warning ("Cannot insert case at position %d\n", posn); @@ -223,7 +223,7 @@ psppire_case_file_append_case (PsppireCaseFile *cf, result = casefile_append (cf->flexifile, c); - g_signal_emit (cf, signal[CASE_INSERTED], 0, posn); + g_signal_emit (cf, signals [CASE_INSERTED], 0, posn); return result; } @@ -267,7 +267,7 @@ psppire_case_file_clear (PsppireCaseFile *cf) { casefile_destroy (cf->flexifile); cf->flexifile = 0; - g_signal_emit (cf, signal[CASES_DELETED], 0, 0, -1); + g_signal_emit (cf, signals [CASES_DELETED], 0, 0, -1); } /* Set the IDXth value of case C to SYSMIS/EMPTY */ @@ -294,7 +294,7 @@ psppire_case_file_set_value (PsppireCaseFile *cf, gint casenum, gint idx, /* Cast away const in flagrant abuse of the casefile */ memcpy ((union value *)case_data_idx (&cc, idx), v, bytes); - g_signal_emit (cf, signal[CASE_CHANGED], 0, casenum); + g_signal_emit (cf, signals [CASE_CHANGED], 0, casenum); return TRUE; } @@ -321,7 +321,7 @@ psppire_case_file_data_in (PsppireCaseFile *cf, gint casenum, gint idx, (union value *) case_data_idx (&cc, idx), fmt_var_width (fmt))) g_warning ("Cant set value\n"); - g_signal_emit (cf, signal[CASE_CHANGED], 0, casenum); + g_signal_emit (cf, signals [CASE_CHANGED], 0, casenum); return TRUE; } @@ -346,7 +346,7 @@ psppire_case_file_sort (PsppireCaseFile *cf, const struct sort_criteria *sc) /* FIXME: Need to have a signal to change a range of cases, instead of calling a signal many times */ for ( c = 0 ; c < casefile_get_case_cnt (cf->flexifile) ; ++c ) - g_signal_emit (cf, signal[CASE_CHANGED], 0, c); + g_signal_emit (cf, signals [CASE_CHANGED], 0, c); flexifile_factory_destroy (factory); } diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 986f30e0..6af1b224 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -77,7 +77,7 @@ static GObjectClass *parent_class = NULL; enum {FONT_CHANGED, n_SIGNALS}; -static guint signal[n_SIGNALS]; +static guint signals [n_SIGNALS]; inline GType @@ -152,7 +152,7 @@ psppire_data_store_class_init (PsppireDataStoreClass *class) object_class->finalize = psppire_data_store_finalize; - signal[FONT_CHANGED] = + signals [FONT_CHANGED] = g_signal_new ("font_changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -614,7 +614,7 @@ psppire_data_store_set_font (PsppireDataStore *store, #if 0 store->width_of_m = calc_m_width (fd); #endif - g_signal_emit (store, signal[FONT_CHANGED], 0); + g_signal_emit (store, signals [FONT_CHANGED], 0); g_sheet_model_range_changed (G_SHEET_MODEL (store), diff --git a/src/ui/gui/psppire-dialog.c b/src/ui/gui/psppire-dialog.c index 8bb78358..a6118f44 100644 --- a/src/ui/gui/psppire-dialog.c +++ b/src/ui/gui/psppire-dialog.c @@ -29,7 +29,7 @@ static void psppire_dialog_init (PsppireDialog *); enum {DIALOG_REFRESH, n_SIGNALS}; -static guint signal [n_SIGNALS]; +static guint signals [n_SIGNALS]; GType @@ -84,7 +84,7 @@ psppire_dialog_class_init (PsppireDialogClass *class) { GObjectClass *object_class = (GObjectClass *) class; - signal [DIALOG_REFRESH] = + signals [DIALOG_REFRESH] = g_signal_new ("refresh", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -167,5 +167,5 @@ psppire_dialog_run (PsppireDialog *dialog) void psppire_dialog_reload (PsppireDialog *dialog, gpointer data) { - g_signal_emit (dialog, signal [DIALOG_REFRESH], 0, data); + g_signal_emit (dialog, signals [DIALOG_REFRESH], 0, data); } diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c index 395be9ed..40ddf501 100644 --- a/src/ui/gui/psppire-dict.c +++ b/src/ui/gui/psppire-dict.c @@ -54,7 +54,7 @@ enum {VARIABLE_CHANGED, SPLIT_CHANGED, n_SIGNALS}; -static guint signal[n_SIGNALS]; +static guint signals [n_SIGNALS]; /* --- functions --- */ /** @@ -109,7 +109,7 @@ psppire_dict_class_init (PsppireDictClass *class) object_class->finalize = psppire_dict_finalize; - signal[VARIABLE_CHANGED] = + signals [VARIABLE_CHANGED] = g_signal_new ("variable_changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -122,7 +122,7 @@ psppire_dict_class_init (PsppireDictClass *class) - signal[VARIABLE_INSERTED] = + signals [VARIABLE_INSERTED] = g_signal_new ("variable_inserted", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -134,7 +134,7 @@ psppire_dict_class_init (PsppireDictClass *class) G_TYPE_INT); - signal[VARIABLES_DELETED] = + signals [VARIABLES_DELETED] = g_signal_new ("variables_deleted", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -147,7 +147,7 @@ psppire_dict_class_init (PsppireDictClass *class) G_TYPE_INT); - signal[VARIABLE_RESIZED] = + signals [VARIABLE_RESIZED] = g_signal_new ("dict-size-changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -160,7 +160,7 @@ psppire_dict_class_init (PsppireDictClass *class) G_TYPE_INT); - signal [WEIGHT_CHANGED] = + signals [WEIGHT_CHANGED] = g_signal_new ("weight-changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -172,7 +172,7 @@ psppire_dict_class_init (PsppireDictClass *class) G_TYPE_INT); - signal [FILTER_CHANGED] = + signals [FILTER_CHANGED] = g_signal_new ("filter-changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -184,7 +184,7 @@ psppire_dict_class_init (PsppireDictClass *class) G_TYPE_INT); - signal [SPLIT_CHANGED] = + signals [SPLIT_CHANGED] = g_signal_new ("split-changed", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -210,37 +210,37 @@ psppire_dict_finalize (GObject *object) static void addcb (struct dictionary *d, int idx, void *pd) { - g_signal_emit (pd, signal[VARIABLE_INSERTED], 0, idx); + g_signal_emit (pd, signals [VARIABLE_INSERTED], 0, idx); } static void delcb (struct dictionary *d, int idx, void *pd) { - g_signal_emit (pd, signal[VARIABLES_DELETED], 0, idx, 1); + g_signal_emit (pd, signals [VARIABLES_DELETED], 0, idx, 1); } static void mutcb (struct dictionary *d, int idx, void *pd) { - g_signal_emit (pd, signal[VARIABLE_CHANGED], 0, idx); + g_signal_emit (pd, signals [VARIABLE_CHANGED], 0, idx); } static void weight_changed_callback (struct dictionary *d, int idx, void *pd) { - g_signal_emit (pd, signal [WEIGHT_CHANGED], 0, idx); + g_signal_emit (pd, signals [WEIGHT_CHANGED], 0, idx); } static void filter_changed_callback (struct dictionary *d, int idx, void *pd) { - g_signal_emit (pd, signal [FILTER_CHANGED], 0, idx); + g_signal_emit (pd, signals [FILTER_CHANGED], 0, idx); } static void split_changed_callback (struct dictionary *d, void *pd) { - g_signal_emit (pd, signal [SPLIT_CHANGED], 0); + g_signal_emit (pd, signals [SPLIT_CHANGED], 0); } @@ -460,7 +460,7 @@ psppire_dict_resize_variable (PsppireDict *d, const struct variable *pv, fv = var_get_case_index (pv); - g_signal_emit (d, signal[VARIABLE_RESIZED], 0, + g_signal_emit (d, signals [VARIABLE_RESIZED], 0, fv + old_size, new_size - old_size ); } diff --git a/src/ui/gui/psppire-var-select.c b/src/ui/gui/psppire-var-select.c index 64edfc6f..b4c32b63 100644 --- a/src/ui/gui/psppire-var-select.c +++ b/src/ui/gui/psppire-var-select.c @@ -56,7 +56,7 @@ enum {VARIABLE_SELECTED, DESELECT_ALL, n_SIGNALS}; -static guint signal[n_SIGNALS]; +static guint signals [n_SIGNALS]; /* --- variables --- */ @@ -103,7 +103,7 @@ psppire_var_select_class_init (PsppireVarSelectClass *class) parent_class = g_type_class_peek_parent (class); - signal [VARIABLE_SELECTED] = + signals [VARIABLE_SELECTED] = g_signal_new ("variable_selected", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -115,7 +115,7 @@ psppire_var_select_class_init (PsppireVarSelectClass *class) G_TYPE_INT); - signal [DESELECT_ALL] = + signals [DESELECT_ALL] = g_signal_new ("deselect_all", G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_FIRST, @@ -165,7 +165,7 @@ add_variable_to_selection (PsppireVarSelect *vs, struct variable *var) } vs->list = g_list_append (vs->list, var); - g_signal_emit (vs, signal [VARIABLE_SELECTED], 0, var_get_dict_index (var)); + g_signal_emit (vs, signals [VARIABLE_SELECTED], 0, var_get_dict_index (var)); } @@ -249,7 +249,7 @@ psppire_var_select_deselect_all (PsppireVarSelect *vs) gtk_entry_set_text ( GTK_ENTRY(vs->dest), ""); - g_signal_emit (vs, signal [DESELECT_ALL], 0); + g_signal_emit (vs, signals [DESELECT_ALL], 0); }