X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=lib%2Fgtk-contrib%2Fpsppire-sheet.c;fp=lib%2Fgtk-contrib%2Fpsppire-sheet.c;h=8122eba99967fbef89b17c4c04363820449763e8;hp=dc0f4080ec36d5629a19327312f3168b5f1a55d7;hb=524932d8d25d51ca1d0c6993ec9f36014073b3d9;hpb=edf539fc797fedcdf7a71894f707d3c9728335d6 diff --git a/lib/gtk-contrib/psppire-sheet.c b/lib/gtk-contrib/psppire-sheet.c index dc0f4080..8122eba9 100644 --- a/lib/gtk-contrib/psppire-sheet.c +++ b/lib/gtk-contrib/psppire-sheet.c @@ -54,8 +54,6 @@ #include #include -#include -#include #include #include #include @@ -72,8 +70,6 @@ #include #include -#include - /* sheet flags */ enum { @@ -2257,17 +2253,6 @@ draw_sheet_region (PsppireSheet *sheet, GdkRegion *region) psppire_sheet_show_entry_widget (sheet); } - - -static inline gint -safe_strcmp (const gchar *s1, const gchar *s2) -{ - if ( !s1 && !s2) return 0; - if ( !s1) return -1; - if ( !s2) return +1; - return strcmp (s1, s2); -} - static void psppire_sheet_set_cell (PsppireSheet *sheet, gint row, gint col, GtkJustification justification, @@ -2289,7 +2274,7 @@ psppire_sheet_set_cell (PsppireSheet *sheet, gint row, gint col, old_text = psppire_sheet_model_get_string (model, row, col); - if (0 != safe_strcmp (old_text, text)) + if (0 != g_strcmp0 (old_text, text)) { g_signal_handler_block (sheet->model, sheet->update_handler_id); psppire_sheet_model_set_string (model, text, row, col);