From: Robert Wilhelm (robert.wilhelm@gmx.net)
Date: Mon Sep 15 2003 - 23:15:33 EDT
I have committed a patch to speed up rtf loading quite a bit
by using system strcasecmp instead of our homegrown UT_stricmp code.
I have added a check only to configure.ac so you will have to
run autogen.
Robert
Index: configure.ac
===================================================================
RCS file: /cvsroot/abi/configure.ac,v
retrieving revision 1.110
diff -u -r1.110 configure.ac
--- configure.ac 12 Sep 2003 15:15:17 -0000 1.110
+++ configure.ac 16 Sep 2003 03:27:01 -0000
@@ -350,7 +350,7 @@
dnl Checks for library functions.
AC_FUNC_ALLOCA
AC_TYPE_SIGNAL
-AC_CHECK_FUNCS(re_comp regcomp strdup strstr)
+AC_CHECK_FUNCS(re_comp regcomp strdup strstr strcasecmp)
AC_CHECK_FUNC(putenv,abi_putenv=maybe,abi_putenv=no)
AC_CHECK_FUNC(setenv,abi_setenv=maybe,abi_setenv=no)
Index: src/af/util/xp/ut_string.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_string.cpp,v
retrieving revision 1.93
diff -u -r1.93 ut_string.cpp
--- src/af/util/xp/ut_string.cpp 5 Feb 2003 01:44:18 -0000
1.93
+++ src/af/util/xp/ut_string.cpp 16 Sep 2003 03:27:03 -0000
@@ -154,6 +154,12 @@
UT_sint32 UT_stricmp(const char * s1, const char * s2)
{
+
+#ifdef HAVE_STRCASECMP
+
+ return strcasecmp(s1,s2);
+
+#else
UT_return_val_if_fail(s1, 1);
UT_return_val_if_fail(s2, -1);
@@ -176,6 +182,7 @@
while (c1 == c2);
return c1 - c2;
+#endif /* HAVE_STRCASECMP */
}
This archive was generated by hypermail 2.1.4 : Mon Sep 15 2003 - 23:35:52 EDT