[gucharmap] charmap: Remove --disable-unihan configure switch



commit 8ac882c2e0f4212e8fcc4089b098a0be7f3ca00a
Author: Christian Persch <chpe gnome org>
Date:   Sun Jul 31 13:15:42 2016 +0200

    charmap: Remove --disable-unihan configure switch

 configure.ac                        |    8 -----
 gucharmap/gucharmap-charmap.c       |    5 ---
 gucharmap/gucharmap-search-dialog.c |    7 ----
 gucharmap/gucharmap-unicode-info.c  |   58 +----------------------------------
 4 files changed, 1 insertions(+), 77 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 53efd9f..69e133e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,14 +138,6 @@ AC_CHECK_FUNCS([bind_textdomain_codeset])
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
-AH_TEMPLATE([ENABLE_UNIHAN], [Define if you want CJK ideograph information])
-AC_ARG_ENABLE(unihan, 
-              AC_HELP_STRING([--disable-unihan], 
-                             [do not build in CJK ideograph information]))
-if test "x$enable_unihan" != "xno" ; then
-    AC_DEFINE([ENABLE_UNIHAN],[1],[Define if you want CJK ideograph information])
-fi
-
 # Some utilities
 AC_PROG_LN_S
 AC_PROG_SED
diff --git a/gucharmap/gucharmap-charmap.c b/gucharmap/gucharmap-charmap.c
index 45bf2f3..4397484 100644
--- a/gucharmap/gucharmap-charmap.c
+++ b/gucharmap/gucharmap-charmap.c
@@ -695,8 +695,6 @@ set_details (GucharmapCharmap *charmap,
         }
     }
 
-#if ENABLE_UNIHAN
-
   /* this isn't so bad efficiency-wise */
   if (gucharmap_get_unicode_kDefinition (uc)
       || gucharmap_get_unicode_kCantonese (uc)
@@ -743,7 +741,6 @@ set_details (GucharmapCharmap *charmap,
         insert_vanilla_detail (charmap, buffer, &iter,
                                _("Korean Pronunciation:"), csp);
     }
-#endif /* #if ENABLE_UNIHAN */
 }
 
 static void
@@ -778,11 +775,9 @@ chartable_sync_active_char (GtkWidget *widget,
   g_string_append_printf (gs, "U+%4.4X %s", wc, 
                           gucharmap_get_unicode_name (wc));
 
-#if ENABLE_UNIHAN
   temp = gucharmap_get_unicode_kDefinition (wc);
   if (temp)
     g_string_append_printf (gs, "   %s", temp);
-#endif
 
   temps = gucharmap_get_nameslist_equals (wc);
   if (temps)
diff --git a/gucharmap/gucharmap-search-dialog.c b/gucharmap/gucharmap-search-dialog.c
index 1ee7692..94bf547 100644
--- a/gucharmap/gucharmap-search-dialog.c
+++ b/gucharmap/gucharmap-search-dialog.c
@@ -149,8 +149,6 @@ matches (GucharmapSearchDialog *search_dialog,
 
   if (annotations)
     {
-
-#if ENABLE_UNIHAN
       haystack = gucharmap_get_unicode_kDefinition (wc);
       if (haystack)
        {
@@ -163,7 +161,6 @@ matches (GucharmapSearchDialog *search_dialog,
 
       if (matched)
        return TRUE;
-#endif
 
       haystack_arr = gucharmap_get_nameslist_equals (wc);
       if (haystack_arr)
@@ -877,11 +874,7 @@ gucharmap_search_dialog_get_completed (GucharmapSearchDialog *search_dialog)
     return -1.0;
   else
     {
-#if ENABLE_UNIHAN
       gdouble total = gucharmap_get_unicode_data_name_count () + gucharmap_get_unihan_count ();
-#else
-      gdouble total = gucharmap_get_unicode_data_name_count ();
-#endif
       return (gdouble) priv->search_state->strings_checked / total;
     }
 }
diff --git a/gucharmap/gucharmap-unicode-info.c b/gucharmap/gucharmap-unicode-info.c
index 2abe344..e773389 100644
--- a/gucharmap/gucharmap-unicode-info.c
+++ b/gucharmap/gucharmap-unicode-info.c
@@ -31,9 +31,7 @@
 #include "unicode-nameslist.h"
 #include "unicode-categories.h"
 #include "unicode-versions.h"
-#if ENABLE_UNIHAN
-# include "unicode-unihan.h"
-#endif
+#include "unicode-unihan.h"
 
 /* constants for hangul (de)composition, see UAX #15 */
 #define SBase 0xAC00
@@ -240,8 +238,6 @@ gucharmap_unicode_version_to_string (GucharmapUnicodeVersion version)
   return unicode_version_strings + unicode_version_string_offsets[version - 1];
 }
 
-#if ENABLE_UNIHAN
-
 gint
 gucharmap_get_unihan_count (void)
 {
@@ -286,58 +282,6 @@ _get_unihan (gunichar uc)
   return NULL;
 }
 
-#else /* #if ENABLE_UNIHAN */
-
-gint
-gucharmap_get_unihan_count ()
-{
-  return 0;
-}
-
-const gchar * 
-gucharmap_get_unicode_kDefinition (gunichar uc)
-{
-  return "This feature was not compiled in.";
-}
-
-const gchar * 
-gucharmap_get_unicode_kCantonese (gunichar uc)
-{
-  return "This feature was not compiled in.";
-}
-
-const gchar * 
-gucharmap_get_unicode_kMandarin (gunichar uc)
-{
-  return "This feature was not compiled in.";
-}
-
-const gchar * 
-gucharmap_get_unicode_kTang (gunichar uc)
-{
-  return "This feature was not compiled in.";
-}
-
-const gchar * 
-gucharmap_get_unicode_kKorean (gunichar uc)
-{
-  return "This feature was not compiled in.";
-}
-
-const gchar * 
-gucharmap_get_unicode_kJapaneseKun (gunichar uc)
-{
-  return "This feature was not compiled in.";
-}
-
-const gchar * 
-gucharmap_get_unicode_kJapaneseOn (gunichar uc)
-{
-  return "This feature was not compiled in.";
-}
-
-#endif /* #else (#if ENABLE_UNIHAN) */
-
 /* does a binary search; also caches most recent, since it will often be
  * called in succession on the same character */
 static const NamesList *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]