From 42c53db6c54eddb5613afbcee64a82ca0db855bf Mon Sep 17 00:00:00 2001 From: mbr Date: Tue, 13 Aug 2002 21:58:39 +0000 Subject: Sort the array _nl_language_list[] in ascending order. Remove NetBSD part of code which was wrong. Change a signed int to unsigned. --- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal::osl::unx::nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal::osl::unx::nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../openoffice/files/patch-sal+osl+unx+nlsupport.c | 81 ++++++++++++++-------- .../files/patch-sal::osl::unx::nlsupport.c | 81 ++++++++++++++-------- 23 files changed, 1196 insertions(+), 667 deletions(-) (limited to 'editors') diff --git a/editors/openoffice-1.0/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice-1.0/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-1.0/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice-1.0/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice-1.0/files/patch-sal::osl::unx::nlsupport.c b/editors/openoffice-1.0/files/patch-sal::osl::unx::nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-1.0/files/patch-sal::osl::unx::nlsupport.c +++ b/editors/openoffice-1.0/files/patch-sal::osl::unx::nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice-1.1-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice-1.1-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-1.1-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice-1.1-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice-1.1/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice-1.1/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-1.1/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice-1.1/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice-2.0-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice-2.0-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-2.0-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice-2.0-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice-3-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice-3-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-3-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice-3-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice-3/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice-3/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-3/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice-3/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-1.0/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-1.0/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-1.0/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-1.0/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-1.0/files/patch-sal::osl::unx::nlsupport.c b/editors/openoffice.org-1.0/files/patch-sal::osl::unx::nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-1.0/files/patch-sal::osl::unx::nlsupport.c +++ b/editors/openoffice.org-1.0/files/patch-sal::osl::unx::nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-1.1-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-1.1-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-1.1-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-1.1-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-1.1/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-1.1/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-1.1/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-1.1/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-2.0-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-2.0-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-2.0-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-2.0-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-2.0/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-2.0/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-2.0/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-2.0/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-2/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-2/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-2/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-2/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-3-RC/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-3-RC/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-3-RC/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-3-RC/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-3-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-3-devel/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-3-devel/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-3-devel/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-3/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-3/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-3/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-3/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice.org-vcltesttool/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-vcltesttool/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice.org-vcltesttool/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice.org-vcltesttool/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice/files/patch-sal+osl+unx+nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice/files/patch-sal+osl+unx+nlsupport.c +++ b/editors/openoffice/files/patch-sal+osl+unx+nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ diff --git a/editors/openoffice/files/patch-sal::osl::unx::nlsupport.c b/editors/openoffice/files/patch-sal::osl::unx::nlsupport.c index 5fab5cf..1a606f1 100644 --- a/editors/openoffice/files/patch-sal::osl::unx::nlsupport.c +++ b/editors/openoffice/files/patch-sal::osl::unx::nlsupport.c @@ -5,10 +5,19 @@ #include -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) #include #include #include +@@ -87,7 +87,7 @@ + static int + _pair_compare (const char *key, const _pair *pair) + { +- int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); ++ unsigned int result = rtl_str_compareIgnoreAsciiCase( key, pair->key ); + return result; + } + @@ -114,8 +114,7 @@ comparison = _pair_compare( key, base + current ); if (comparison < 0) @@ -24,7 +33,7 @@ } -#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) -+#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) ++#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(FREEBSD) /* * This implementation of osl_getTextEncodingFromLocale maps @@ -35,70 +44,84 @@ * * This routine is SLOW because of the setlocale call, so * grab the result and cache it. -@@ -312,7 +312,30 @@ +@@ -260,6 +260,10 @@ + #endif + #endif + ++/* ++ * _nl_language_list[] is an array list of supported encodings. Because ++ * we are using a binary search, the list has to be in ascending order. ++ */ + + #if defined(SOLARIS) + +@@ -312,10 +316,33 @@ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */ { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */ -- { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ +}; + +#elif defined(FREEBSD) + +const _pair _nl_language_list[] = { -+ { "US-ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ASCII", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ -+ { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ -+ { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ -+ { "ISO8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ -+ { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ -+ { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ -+ { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ -+ { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ -+ { "KOI8-R", RTL_TEXTENCODING_KOI8_R }, -+ { "KOI8-U", RTL_TEXTENCODING_DONTKNOW }, -+ { "CP866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ -+ { "CP1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "ascii", RTL_TEXTENCODING_ASCII_US }, /* US-ASCII */ ++ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ ++ { "cp1251", RTL_TEXTENCODING_MS_1251 }, /* MS-CYRL */ ++ { "cp866", RTL_TEXTENCODING_IBM_866 }, /* CP866 866 */ ++ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China - Simplified Chinese */ + { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */ + { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */ -+ { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */ -+ { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */ -+ { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */ ++ { "iso8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */ ++ { "iso8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */ ++ { "iso8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */ ++ { "iso8859-4", RTL_TEXTENCODING_ISO_8859_4 }, /* LATIN4 L4 */ ++ { "iso8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */ ++ { "iso8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */ ++ { "iso8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */ ++ { "koi-u", RTL_TEXTENCODING_DONTKNOW }, /* Not supported at the moment */ ++ { "koi8-r", RTL_TEXTENCODING_KOI8_R }, /* KOI8 */ + { "sjis", RTL_TEXTENCODING_SHIFT_JIS }, /* Japan */ ++ { "us-ascii", RTL_TEXTENCODING_ASCII_US } /* US-ASCII */ }; - #elif defined(LINUX) || defined(NETBSD) -@@ -496,7 +519,7 @@ +-#elif defined(LINUX) || defined(NETBSD) ++#elif defined(LINUX) + + const _pair _nl_language_list[] = { + { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */ +@@ -496,7 +523,7 @@ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */ }; -#endif /* ifdef LINUX || NETBSD */ -+#endif /* ifdef LINUX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || FREEBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; -@@ -618,7 +641,7 @@ +@@ -618,7 +645,7 @@ return ret; } -#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD */ -+#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */ ++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || FREEBSD */ /* * FIXME: the MacOS X implemetation is missing -@@ -651,7 +674,7 @@ +@@ -651,7 +678,7 @@ return 0; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#else /* ifdef LINUX || SOLARIS || FREEBSD || MACOSX */ /* * This implementation of osl_getTextEncodingFromLocale maps -@@ -887,6 +910,6 @@ +@@ -887,6 +914,6 @@ return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ -+#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */ ++#endif /* ifdef LINUX || SOLARIS || MACOSX || FREEBSD */ -- cgit v1.1