ported from UXP: Issue #1451 - Split hunspell library out of xul. (cbbc15ad)

This commit is contained in:
2023-04-30 21:53:06 +08:00
parent b7f8906a47
commit 5a8817b809
6 changed files with 9900 additions and 15 deletions
@@ -34,6 +34,4 @@ EXPORTS.mozilla += [
'RemoteSpellCheckEngineParent.h',
]
# This variable is referenced in configure.in. Make sure to change that file
# too if you need to change this variable.
DEFINES['HUNSPELL_STATIC'] = True
DEFINES['BUILDING_LIBHUNSPELL'] = True
@@ -82,13 +82,6 @@
#include "atypes.hxx"
#include "langnum.hxx"
// Unicode character encoding information
struct unicode_info {
unsigned short c;
unsigned short cupper;
unsigned short clower;
};
#ifdef _WIN32
#include <windows.h>
#include <wchar.h>
@@ -74,6 +74,9 @@
#ifndef CSUTIL_HXX_
#define CSUTIL_HXX_
// Quick hack to make building hunspell as a shared library work.
#undef MOZILLA_CLIENT
#include "hunvisapi.h"
// First some base level utility routines
@@ -184,6 +187,13 @@ struct cs_info {
unsigned char cupper;
};
// Unicode character encoding information
struct unicode_info {
unsigned short c;
unsigned short cupper;
unsigned short clower;
};
LIBHUNSPELL_DLL_EXPORTED void initialize_utf_tbl();
LIBHUNSPELL_DLL_EXPORTED void free_utf_tbl();
LIBHUNSPELL_DLL_EXPORTED unsigned short unicodetoupper(unsigned short c,
+8 -5
View File
@@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
UNIFIED_SOURCES += [
SOURCES += [
'affentry.cxx',
'affixmgr.cxx',
'csutil.cxx',
@@ -15,13 +15,16 @@ UNIFIED_SOURCES += [
'phonet.cxx',
'replist.cxx',
'suggestmgr.cxx',
'utf_info.cxx',
]
# This variable is referenced in configure.in. Make sure to change that file
# too if you need to change this variable.
DEFINES['HUNSPELL_STATIC'] = True
DEFINES['BUILDING_LIBHUNSPELL'] = True
FINAL_LIBRARY = 'xul'
SharedLibrary('hunspell')
USE_LIBS += [
'mozglue'
]
LOCAL_INCLUDES += [
'../glue',
File diff suppressed because it is too large Load Diff
+2
View File
@@ -227,6 +227,8 @@ if CONFIG['MOZ_SYSTEM_PNG']:
if CONFIG['MOZ_SYSTEM_HUNSPELL']:
OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
else:
USE_LIBS += [ 'hunspell' ]
if CONFIG['MOZ_SYSTEM_LIBEVENT']:
OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']