- remove HAVE_ICU_LIBRARY ifdefs
* khtml/rendering/render_text.cpp: Just use ICU all the time; no ifdef.
* kwq/KWQKURL.mm: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9223
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-05-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Adele.
+
+ - remove HAVE_ICU_LIBRARY ifdefs
+
+ * khtml/rendering/render_text.cpp: Just use ICU all the time; no ifdef.
+ * kwq/KWQKURL.mm: Ditto.
+
2005-05-26 Darin Adler <darin@apple.com>
Reviewed by me, patch by Mitz Pettel.
#include <kdebug.h>
#include <assert.h>
-// You may have to turn this to 0 to compile without the headers for ICU installed.
-#define HAVE_ICU_LIBRARY 1
-
-#if HAVE_ICU_LIBRARY
#include <unicode/ubrk.h>
#include <unicode/uloc.h>
#include <unicode/utypes.h>
#include <unicode/parseerr.h>
-#endif
using namespace khtml;
using namespace DOM;
return m_start + m_len;
}
-#if HAVE_ICU_LIBRARY
-
static UBreakIterator *getCharacterBreakIterator(const DOMStringImpl *i)
{
// The locale is currently ignored when determining character cluster breaks. This may change
return iterator;
}
-#endif
-
long RenderText::previousOffset (long current) const
{
-#if HAVE_ICU_LIBRARY
UBreakIterator *iterator = getCharacterBreakIterator(str);
if (iterator) {
return ubrk_preceding(iterator, current);
}
-#endif
return current - 1;
}
long RenderText::nextOffset (long current) const
{
-#if HAVE_ICU_LIBRARY
UBreakIterator *iterator = getCharacterBreakIterator(str);
if (iterator) {
return ubrk_following(iterator, current);
}
-#endif
return current + 1;
}
// FIXME: Should get this from a header.
extern "C" int malloc_good_size(int size);
-// You may have to turn this to 0 to compile without the headers for ICU installed.
-#define HAVE_ICU_LIBRARY 1
-
-#if HAVE_ICU_LIBRARY
#import <unicode/uidna.h>
-#endif
struct KWQIntegerPair {
KWQIntegerPair(int s, int e) : start(s), end(e) { }
return [NSData dataWithBytes:bytes length:urlString.length()];
}
-#if HAVE_ICU_LIBRARY
-
static QString encodeHostname(const QString &s)
{
// Needs to be big enough to hold an IDN-encoded name.
return s;
}
-#endif // HAVE_ICU_LIBRARY
-
static char *encodeRelativeString(const KURL &base, const QString &rel, const QTextCodec *codec)
{
-#if HAVE_ICU_LIBRARY
QString s = encodeHostnames(rel);
-#else
- QString s = rel;
-#endif
char *strBuffer;