From 524932d8d25d51ca1d0c6993ec9f36014073b3d9 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 28 Jul 2009 07:05:42 +0200 Subject: [PATCH] Replace safe_strcmp with g_strcmp0. --- lib/gtk-contrib/psppire-sheet.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) 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); -- 2.30.2