summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2017-11-12 00:10:41 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2017-11-12 00:28:22 +0200
commit39d1c30d9fbfbcf6df81b94600cb000c69a02475 (patch)
tree0a7458be77562125063a6442990af3da4616c230
parent93fbff126e3474d7b35563cc921073323fc70ed3 (diff)
downloadfribidi-39d1c30d9fbfbcf6df81b94600cb000c69a02475.tar.gz
Drop GLib use in the library and main program
Only users left are the fribidi-vs-unicode test programs.
-rw-r--r--charset/fribidi-char-sets.c11
-rw-r--r--lib/common.h39
-rw-r--r--lib/fribidi-common.h8
-rw-r--r--lib/fribidi-config.h.in3
-rw-r--r--lib/fribidi-types.h14
-rw-r--r--lib/fribidi.c5
6 files changed, 3 insertions, 77 deletions
diff --git a/charset/fribidi-char-sets.c b/charset/fribidi-char-sets.c
index f7156b4..5a9e21e 100644
--- a/charset/fribidi-char-sets.c
+++ b/charset/fribidi-char-sets.c
@@ -113,12 +113,8 @@ static FriBidiCharSetHandler char_sets[FRIBIDI_CHAR_SETS_NUM + 1] = {
# undef _FRIBIDI_ADD_CHAR_SET_ONE2ONE
};
-#if FRIBIDI_USE_GLIB+0
-# include <glib/gstrfuncs.h>
-# define fribidi_strcasecmp g_ascii_strcasecmp
-#else /* !FRIBIDI_USE_GLIB */
static char
-toupper (
+fribidi_toupper (
/* input */
char c
)
@@ -133,14 +129,13 @@ fribidi_strcasecmp (
const char *s2
)
{
- while (*s1 && toupper (*s1) == toupper (*s2))
+ while (*s1 && fribidi_toupper (*s1) == fribidi_toupper (*s2))
{
s1++;
s2++;
}
- return toupper (*s1) - toupper (*s2);
+ return fribidi_toupper (*s1) - fribidi_toupper (*s2);
}
-#endif /* !FRIBIDI_USE_GLIB */
FRIBIDI_ENTRY FriBidiCharSet
fribidi_parse_charset (
diff --git a/lib/common.h b/lib/common.h
index 8ef427e..d8395c3 100644
--- a/lib/common.h
+++ b/lib/common.h
@@ -45,45 +45,6 @@
# define FRIBIDI_PRIVATESPACE(SYMBOL) FRIBIDI_PRIVATESPACE0(_,FRIBIDI_NAMESPACE(_##SYMBOL##__internal__))
#endif /* !FRIBIDI_PRIVATESPACE */
-#if FRIBIDI_USE_GLIB+0
-# ifndef SIZEOF_LONG
-# define SIZEOF_LONG GLIB_SIZEOF_LONG
-# endif /* !SIZEOF_LONG */
-# ifndef SIZEOF_VOID_P
-# define SIZEOF_VOID_P GLIB_SIZEOF_VOID_P
-# endif /* !SIZEOF_VOID_P */
-# ifndef __FRIBIDI_DOC
-# include <glib.h>
-# endif /* !__FRIBIDI_DOC */
-# ifndef fribidi_malloc
-# define fribidi_malloc g_try_malloc
-# define fribidi_free g_free
-# endif /* !fribidi_malloc */
-# ifndef fribidi_assert
-# ifndef __FRIBIDI_DOC
-# include <glib.h>
-# endif /* !__FRIBIDI_DOC */
-# define fribidi_assert g_assert
-# endif /* !fribidi_assert */
-# ifndef __FRIBIDI_DOC
-# include <glib.h>
-# endif /* !__FRIBIDI_DOC */
-# ifndef FRIBIDI_BEGIN_STMT
-# define FRIBIDI_BEGIN_STMT G_STMT_START {
-# define FRIBIDI_END_STMT } G_STMT_END
-# endif /* !FRIBIDI_BEGIN_STMT */
-# ifndef LIKELY
-# define LIKELY G_LIKELY
-# define UNLIKELY G_UNLIKELY
-# endif /* !LIKELY */
-# ifndef false
-# define false FALSE
-# endif /* !false */
-# ifndef true
-# define true TRUE
-# endif /* !true */
-#endif /* FRIBIDI_USE_GLIB */
-
#ifndef false
# define false (0)
# endif /* !false */
diff --git a/lib/fribidi-common.h b/lib/fribidi-common.h
index 72d7007..0dc9c5b 100644
--- a/lib/fribidi-common.h
+++ b/lib/fribidi-common.h
@@ -56,14 +56,6 @@
# define FRIBIDI_ENTRY /* empty */
#endif /* !FRIBIDI_ENTRY */
-#if FRIBIDI_USE_GLIB+0
-# ifndef __FRIBIDI_DOC
-# include <glib.h>
-# endif /* !__FRIBIDI_DOC */
-# define FRIBIDI_BEGIN_DECLS G_BEGIN_DECLS
-# define FRIBIDI_END_DECLS G_END_DECLS
-#endif /* !FRIBIDI_USE_GLIB */
-
#ifdef __ICC
#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \
_Pragma ("warning (push)") \
diff --git a/lib/fribidi-config.h.in b/lib/fribidi-config.h.in
index 7e10261..4587b65 100644
--- a/lib/fribidi-config.h.in
+++ b/lib/fribidi-config.h.in
@@ -17,9 +17,6 @@
/* Define to 1 if you want charset conversion codes in the library */
#define FRIBIDI_CHARSETS @FRIBIDI_CHARSETS@
-/* Define to 1 if you want to use glib */
-#define FRIBIDI_USE_GLIB @FRIBIDI_USE_GLIB@
-
/* The size of a `int', as computed by sizeof. */
#define FRIBIDI_SIZEOF_INT @SIZEOF_INT@
diff --git a/lib/fribidi-types.h b/lib/fribidi-types.h
index ddc3457..1288fb4 100644
--- a/lib/fribidi-types.h
+++ b/lib/fribidi-types.h
@@ -38,19 +38,6 @@
#include "fribidi-begindecls.h"
-#if FRIBIDI_USE_GLIB+0
-# ifndef __FRIBIDI_DOC
-# include <glib.h>
-# endif /* !__FRIBIDI_DOC */
-# define FRIBIDI_INT8_LOCAL gint8
-# define FRIBIDI_INT16_LOCAL gint16
-# define FRIBIDI_INT32_LOCAL gint32
-# define FRIBIDI_UINT8_LOCAL guint8
-# define FRIBIDI_UINT16_LOCAL guint16
-# define FRIBIDI_UINT32_LOCAL guint32
-# define FRIBIDI_BOOLEAN_LOCAL gboolean
-# define FRIBIDI_UNICHAR_LOCAL gunichar
-#else /* !FRIBIDI_USE_GLIB */
# if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
# ifndef __FRIBIDI_DOC
# if HAVE_INTTYPES_H
@@ -96,7 +83,6 @@
# else /* SIZEOF_WCHAR_T < 4 */
# define FRIBIDI_UNICHAR_LOCAL fribidi_uint32
# endif /* SIZEOF_WCHAR_T < 4 */
-#endif /* !FRIBIDI_USE_GLIB */
#if FRIBIDI_INT_TYPES+0
#else
diff --git a/lib/fribidi.c b/lib/fribidi.c
index 0ce3a1f..6e77b4e 100644
--- a/lib/fribidi.c
+++ b/lib/fribidi.c
@@ -82,11 +82,6 @@ const char *fribidi_version_info =
#else
" --disable-charsets"
#endif /* !FRIBIDI_CHARSETS */
-#if FRIBIDI_USE_GLIB+0
- " --with-glib"
-#else /* !FRIBIDI_USE_GLIB */
- " --without-glib"
-#endif /* !FRIBIDI_USE_GLIB */
".\n\n"
"Copyright (C) 2004 Sharif FarsiWeb, Inc.\n"
"Copyright (C) 2001, 2002, 2004, 2005 Behdad Esfahbod\n"