[PATCH] gdi: Remove support for libicu, and all dependencies on it
maarten (none)
mlankhorst at maarten-laptop.
Tue Sep 11 06:07:56 CDT 2007
---
configure.ac | 21 -------------
dlls/gdi32/Makefile.in | 2 +-
dlls/gdi32/bidi.c | 73 ++++++---------------------------------------
dlls/gdi32/font.c | 4 +-
dlls/gdi32/gdi_private.h | 1 -
include/config.h.in | 6 ----
6 files changed, 13 insertions(+), 94 deletions(-)
diff --git a/configure.ac b/configure.ac
index fe36eb2..2c8c5da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,7 +263,6 @@ AC_CHECK_HEADERS(\
sys/wait.h \
syscall.h \
termios.h \
- unicode/ubidi.h \
unistd.h \
utime.h \
valgrind/memcheck.h
@@ -819,26 +818,6 @@ WINE_NOTICE_IF([test "$ac_cv_lib_gphoto2_gp_camera_new" != "yes"],[libgphoto2 de
Wine will be built without Digital Camera support. (gphoto2.ds/twain_32.dll)])
-dnl **** Check for the ICU library ****
-if test "$ac_cv_header_unicode_ubidi_h" = "yes"
-then
- saved_libs="$LIBS"
- icu_libs="-lsicuuc -lsicudata -lstdc++ -lgcc_s"
- if test -n "$ICU_LIB_DIR"
- then
- icu_libs="-L$ICU_LIB_DIR $icu_libs"
- fi
- AC_MSG_CHECKING(whether can link with ICU libraries)
- LIBS="$saved_libs $icu_libs"
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unicode/ubidi.h>]],[[ubidi_open()]])],
- [AC_DEFINE(HAVE_ICU,1,[Define to 1 if the ICU libraries are installed])
- AC_SUBST(ICULIBS,"$icu_libs")
- AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
- LIBS="$saved_libs"
-fi
-WINE_NOTICE_IF([test "x$ICULIBS" = "x"],[libicu development files not found.
-Wine will be built without bidi (Right to Left) support. (gdi32.dll)])
-
dnl **** Check for resolver library ***
AC_SUBST(RESOLVLIBS,"")
if test "$ac_cv_header_resolv_h" = "yes"
diff --git a/dlls/gdi32/Makefile.in b/dlls/gdi32/Makefile.in
index e3b2d67..ee44d14 100644
--- a/dlls/gdi32/Makefile.in
+++ b/dlls/gdi32/Makefile.in
@@ -7,7 +7,7 @@ MODULE = gdi32.dll
IMPORTLIB = libgdi32.$(IMPLIBEXT)
IMPORTS = advapi32 kernel32 ntdll
EXTRAINCL = @FREETYPEINCL@
-EXTRALIBS = @ICULIBS@ @CARBONLIB@
+EXTRALIBS = @CARBONLIB@
SPEC_SRCS16 = \
dispdib.spec \
diff --git a/dlls/gdi32/bidi.c b/dlls/gdi32/bidi.c
index ec8b36c..d21b23b 100644
--- a/dlls/gdi32/bidi.c
+++ b/dlls/gdi32/bidi.c
@@ -22,10 +22,6 @@
#include "config.h"
#include <stdarg.h>
-#ifdef HAVE_UNICODE_UBIDI_H
-#include <unicode/ubidi.h>
-#endif
-
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
@@ -34,13 +30,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(bidi);
-#ifdef HAVE_ICU
-BOOL BidiAvail = TRUE;
-#else
-BOOL BidiAvail = FALSE;
-#endif
-
-
/*************************************************************
* BIDI_Reorder
*/
@@ -54,62 +43,20 @@ BOOL BIDI_Reorder(
UINT *lpOrder /* [out] Logical -> Visual order map */
)
{
+ unsigned i;
TRACE("%s, %d, 0x%08x lpOutString=%p, lpOrder=%p\n",
debugstr_wn(lpString, uCount), uCount, dwFlags,
lpOutString, lpOrder);
-#ifdef HAVE_ICU
- if ((dwFlags & GCP_REORDER) != 0) {
- UBiDi *bidi;
- UErrorCode err=0;
- UBiDiLevel level=0;
-
- bidi=ubidi_open();
- if( bidi==NULL ) {
- WARN("Failed to allocate structure\n");
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return FALSE;
- }
-
- switch( dwWineGCP_Flags&WINE_GCPW_DIR_MASK )
- {
- case WINE_GCPW_FORCE_LTR:
- level=0;
- break;
- case WINE_GCPW_FORCE_RTL:
- level=1;
- break;
- case WINE_GCPW_LOOSE_LTR:
- level=UBIDI_DEFAULT_LTR;
- break;
- case WINE_GCPW_LOOSE_RTL:
- level=UBIDI_DEFAULT_RTL;
- break;
- }
-
- ubidi_setPara( bidi, lpString, uCount, level, NULL, &err );
- if( lpOutString!=NULL ) {
- ubidi_writeReordered( bidi, lpOutString, uCount,
- (dwFlags&GCP_SYMSWAPOFF)?0:UBIDI_DO_MIRRORING, &err );
- }
-
- if( lpOrder!=NULL ) {
- ubidi_getLogicalMap( bidi, lpOrder, &err );
- }
-
- ubidi_close( bidi );
-
- if( U_FAILURE(err) ) {
- FIXME("ICU Library return error code %d.\n", err );
- FIXME("Please report this error to wine-devel at winehq.org so we can place "
- "descriptive Windows error codes here\n");
- SetLastError(ERROR_INVALID_LEVEL); /* This error is cryptic enough not to mean anything, I hope */
-
- return FALSE;
- }
+ if (!(dwFlags & GCP_REORDER))
+ {
+ FIXME("Asked to reorder without reorder flag set\n");
+ return FALSE;
}
+ memcpy(lpOutString, lpString, uCount * sizeof(WCHAR));
+ if (lpOrder)
+ for (i = 0; i < uCount; ++i)
+ *(lpOrder++) = i;
+
return TRUE;
-#else /* HAVE_ICU */
- return FALSE;
-#endif /* HAVE_ICU */
}
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 0cc7339..0ffa486 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -1906,7 +1906,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if (!lprect)
flags &= ~ETO_CLIPPED;
- if( !(flags & (ETO_GLYPH_INDEX | ETO_IGNORELANGUAGE)) && BidiAvail && count > 0 )
+ if( !(flags & (ETO_GLYPH_INDEX | ETO_IGNORELANGUAGE)) && count > 0 )
{
reordered_str = HeapAlloc(GetProcessHeap(), 0, count*sizeof(WCHAR));
@@ -2996,7 +2996,7 @@ GetCharacterPlacementW(
/* return number of initialized fields */
lpResults->nGlyphs = nSet;
- if((dwFlags&GCP_REORDER)==0 || !BidiAvail)
+ if((dwFlags&GCP_REORDER)==0 )
{
/* Treat the case where no special handling was requested in a fastpath way */
/* copy will do if the GCP_REORDER flag is not set */
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index c665373..157a7de 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -383,7 +383,6 @@ typedef struct tagBITMAPOBJ
#define WINE_GCPW_DIR_MASK 3
extern BOOL BIDI_Reorder( LPCWSTR lpString, INT uCount, DWORD dwFlags, DWORD dwWineGCP_Flags,
LPWSTR lpOutString, INT uCountOut, UINT *lpOrder );
-extern BOOL BidiAvail;
/* bitmap.c */
extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
diff --git a/include/config.h.in b/include/config.h.in
index df65adb..8692bb1 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -228,9 +228,6 @@
/* Define to 1 if you have the <hal/libhal.h> header file. */
#undef HAVE_HAL_LIBHAL_H
-/* Define to 1 if the ICU libraries are installed */
-#undef HAVE_ICU
-
/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H
@@ -861,9 +858,6 @@
/* Define to 1 if you have the <ucontext.h> header file. */
#undef HAVE_UCONTEXT_H
-/* Define to 1 if you have the <unicode/ubidi.h> header file. */
-#undef HAVE_UNICODE_UBIDI_H
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
--
1.5.2.5
--------------040902070307080907060101--
More information about the wine-patches
mailing list