fontconfig: Branch 'master' - 2 commits

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

 



 configure.ac     |   10 ++--------
 src/fcfreetype.c |    4 ++--
 src/fcint.h      |    6 ------
 src/fcstr.c      |   52 ----------------------------------------------------
 4 files changed, 4 insertions(+), 68 deletions(-)

New commits:
commit 874a5491641642f669396c514c3672f6794fdfa7
Author: Behdad Esfahbod <behdad@xxxxxxxxxx>
Date:   Thu Jul 24 15:42:54 2014 -0400

    Remove unused regex code
    
    Regex matching was disabled in f6244d2cf231e1dc756f3e941e61b9bf124879bb

diff --git a/configure.ac b/configure.ac
index ce468b8..a366853 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,7 +138,7 @@ dnl ==========================================================================
 # Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h regex.h stdlib.h string.h unistd.h sys/statvfs.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h])
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h sys/statvfs.h sys/vfs.h sys/statfs.h sys/param.h sys/mount.h])
 AX_CREATE_STDINT_H([src/fcstdint.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
@@ -150,7 +150,7 @@ AC_TYPE_PID_T
 # Checks for library functions.
 AC_FUNC_VPRINTF
 AC_FUNC_MMAP
-AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink regcomp regerror regexec regfree fstatvfs fstatfs lstat])
+AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink fstatvfs fstatfs lstat])
 
 dnl AC_CHECK_FUNCS doesn't check for header files.
 dnl posix_fadvise() may be not available in older libc.
@@ -211,12 +211,6 @@ if test "x$ac_cv_func_fstatfs" = "xyes"; then
 fi
 AC_CHECK_MEMBERS([struct dirent.d_type],,,
 	[#include <dirent.h>])
-#
-# regex
-#
-if test "x$ac_cv_func_regcomp" = "xyes" -a "x$ac_cv_func_regerror" = "xyes" -a "x$ac_cv_func_regexec" = "xyes" -a "x$ac_cv_func_regfree"; then
-	AC_DEFINE(USE_REGEX,,[Use regex])
-fi
 
 #
 # Checks for iconv
diff --git a/src/fcint.h b/src/fcint.h
index d3079ed..45dfc6e 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -1152,12 +1152,6 @@ FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
 FcPrivate int
 FcStrCmpIgnoreCaseAndDelims (const FcChar8 *s1, const FcChar8 *s2, const FcChar8 *delims);
 
-FcPrivate FcBool
-FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex);
-
-FcPrivate FcBool
-FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex);
-
 FcPrivate const FcChar8 *
 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
 
diff --git a/src/fcstr.c b/src/fcstr.c
index 024dae3..29a577d 100644
--- a/src/fcstr.c
+++ b/src/fcstr.c
@@ -26,9 +26,6 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
-#ifdef HAVE_REGEX_H
-#include <regex.h>
-#endif
 
 
 /* Objects MT-safe for readonly access. */
@@ -242,55 +239,6 @@ FcStrCmp (const FcChar8 *s1, const FcChar8 *s2)
     return (int) c1 - (int) c2;
 }
 
-#ifdef USE_REGEX
-static FcBool
-_FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex, int cflags, int eflags)
-{
-    int ret = -1;
-    regex_t reg;
-
-    if ((ret = regcomp (&reg, (const char *)regex, cflags)) != 0)
-    {
-	if (FcDebug () & FC_DBG_MATCHV)
-	{
-	    char buf[512];
-
-	    regerror (ret, &reg, buf, 512);
-	    printf("Regexp compile error: %s\n", buf);
-	}
-	return FcFalse;
-    }
-    ret = regexec (&reg, (const char *)s, 0, NULL, eflags);
-    if (ret != 0)
-    {
-	if (FcDebug () & FC_DBG_MATCHV)
-	{
-	    char buf[512];
-
-	    regerror (ret, &reg, buf, 512);
-	    printf("Regexp exec error: %s\n", buf);
-	}
-    }
-    regfree (&reg);
-
-    return ret == 0 ? FcTrue : FcFalse;
-}
-#else
-#  define _FcStrRegexCmp(_s_, _regex_, _cflags_, _eflags_)	(FcFalse)
-#endif
-
-FcBool
-FcStrRegexCmp (const FcChar8 *s, const FcChar8 *regex)
-{
-	return _FcStrRegexCmp (s, regex, REG_EXTENDED | REG_NOSUB, 0);
-}
-
-FcBool
-FcStrRegexCmpIgnoreCase (const FcChar8 *s, const FcChar8 *regex)
-{
-	return _FcStrRegexCmp (s, regex, REG_EXTENDED | REG_NOSUB | REG_ICASE, 0);
-}
-
 /*
  * Return a hash value for a string
  */
commit 9a8e812477bd65d2ecfa721819d0555289520401
Author: Behdad Esfahbod <behdad@xxxxxxxxxx>
Date:   Thu Jul 24 15:37:51 2014 -0400

    Use lang=und instead of lang=xx for "undetermined"
    
    That's the correct BCP 47 code.

diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 9740a14..000b101 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1446,10 +1446,10 @@ FcFreeTypeQueryFace (const FT_Face  face,
 		    free (utf8);
 		    if (lang)
 		    {
-			/* pad lang list with 'xx' to line up with elt */
+			/* pad lang list with 'und' to line up with elt */
 			while (*nlangp < *np)
 			{
-			    if (!FcPatternAddString (pat, eltlang, (FcChar8 *) "xx"))
+			    if (!FcPatternAddString (pat, eltlang, (FcChar8 *) "und"))
 				goto bail1;
 			    ++*nlangp;
 			}
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux