mirror of https://github.com/odrling/Aegisub
Added a minimal hunspell (for win32 only) to repository
Originally committed to SVN as r1694.
This commit is contained in:
parent
b16bfa6676
commit
6d9b40114c
|
@ -181,6 +181,8 @@ FrameMain::FrameMain (wxArrayString args)
|
|||
DialogVersionCheck *checker = new DialogVersionCheck (this,true);
|
||||
(void)checker;
|
||||
}
|
||||
|
||||
//ShowFullScreen(true,wxFULLSCREEN_NOBORDER | wxFULLSCREEN_NOCAPTION);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -477,6 +477,13 @@ wxGLContext *VideoContext::GetGLContext(wxGLCanvas *canvas) {
|
|||
if (!glContext) glContext = new wxGLContext(canvas);
|
||||
#endif
|
||||
return glContext;
|
||||
/*
|
||||
if (!((VideoDisplay*)canvas)->freeSize) return glContext;
|
||||
else {
|
||||
static wxGLContext *test = NULL;
|
||||
if (test = NULL) test = new wxGLContext(canvas,glContext);
|
||||
return test;
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -169,6 +169,7 @@ void VideoDisplay::ShowCursor(bool show) {
|
|||
void VideoDisplay::Render() {
|
||||
// Is shown?
|
||||
if (!IsShownOnScreen()) return;
|
||||
if (!wxIsMainThread()) throw _T("Error: trying to render from non-primary thread");
|
||||
|
||||
// Get video context
|
||||
VideoContext *context = VideoContext::Get();
|
||||
|
|
|
@ -0,0 +1,405 @@
|
|||
Notes on the Free Translation Project
|
||||
*************************************
|
||||
|
||||
Free software is going international! The Free Translation Project
|
||||
is a way to get maintainers of free software, translators, and users all
|
||||
together, so that will gradually become able to speak many languages.
|
||||
A few packages already provide translations for their messages.
|
||||
|
||||
If you found this `ABOUT-NLS' file inside a distribution, you may
|
||||
assume that the distributed package does use GNU `gettext' internally,
|
||||
itself available at your nearest GNU archive site. But you do _not_
|
||||
need to install GNU `gettext' prior to configuring, installing or using
|
||||
this package with messages translated.
|
||||
|
||||
Installers will find here some useful hints. These notes also
|
||||
explain how users should proceed for getting the programs to use the
|
||||
available translations. They tell how people wanting to contribute and
|
||||
work at translations should contact the appropriate team.
|
||||
|
||||
When reporting bugs in the `intl/' directory or bugs which may be
|
||||
related to internationalization, you should tell about the version of
|
||||
`gettext' which is used. The information can be found in the
|
||||
`intl/VERSION' file, in internationalized packages.
|
||||
|
||||
Quick configuration advice
|
||||
==========================
|
||||
|
||||
If you want to exploit the full power of internationalization, you
|
||||
should configure it using
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to force usage of internationalizing routines provided within this
|
||||
package, despite the existence of internationalizing capabilities in the
|
||||
operating system where this package is being installed. So far, only
|
||||
the `gettext' implementation in the GNU C library version 2 provides as
|
||||
many features (such as locale alias, message inheritance, automatic
|
||||
charset conversion or plural form handling) as the implementation here.
|
||||
It is also not possible to offer this additional functionality on top
|
||||
of a `catgets' implementation. Future versions of GNU `gettext' will
|
||||
very likely convey even more functionality. So it might be a good idea
|
||||
to change to GNU `gettext' as soon as possible.
|
||||
|
||||
So you need _not_ provide this option if you are using GNU libc 2 or
|
||||
you have installed a recent copy of the GNU gettext package with the
|
||||
included `libintl'.
|
||||
|
||||
INSTALL Matters
|
||||
===============
|
||||
|
||||
Some packages are "localizable" when properly installed; the
|
||||
programs they contain can be made to speak your own native language.
|
||||
Most such packages use GNU `gettext'. Other packages have their own
|
||||
ways to internationalization, predating GNU `gettext'.
|
||||
|
||||
By default, this package will be installed to allow translation of
|
||||
messages. It will automatically detect whether the system already
|
||||
provides the GNU `gettext' functions. If not, the GNU `gettext' own
|
||||
library will be used. This library is wholly contained within this
|
||||
package, usually in the `intl/' subdirectory, so prior installation of
|
||||
the GNU `gettext' package is _not_ required. Installers may use
|
||||
special options at configuration time for changing the default
|
||||
behaviour. The commands:
|
||||
|
||||
./configure --with-included-gettext
|
||||
./configure --disable-nls
|
||||
|
||||
will respectively bypass any pre-existing `gettext' to use the
|
||||
internationalizing routines provided within this package, or else,
|
||||
_totally_ disable translation of messages.
|
||||
|
||||
When you already have GNU `gettext' installed on your system and run
|
||||
configure without an option for your new package, `configure' will
|
||||
probably detect the previously built and installed `libintl.a' file and
|
||||
will decide to use this. This might be not what is desirable. You
|
||||
should use the more recent version of the GNU `gettext' library. I.e.
|
||||
if the file `intl/VERSION' shows that the library which comes with this
|
||||
package is more recent, you should use
|
||||
|
||||
./configure --with-included-gettext
|
||||
|
||||
to prevent auto-detection.
|
||||
|
||||
The configuration process will not test for the `catgets' function
|
||||
and therefore it will not be used. The reason is that even an
|
||||
emulation of `gettext' on top of `catgets' could not provide all the
|
||||
extensions of the GNU `gettext' library.
|
||||
|
||||
Internationalized packages have usually many `po/LL.po' files, where
|
||||
LL gives an ISO 639 two-letter code identifying the language. Unless
|
||||
translations have been forbidden at `configure' time by using the
|
||||
`--disable-nls' switch, all available translations are installed
|
||||
together with the package. However, the environment variable `LINGUAS'
|
||||
may be set, prior to configuration, to limit the installed set.
|
||||
`LINGUAS' should then contain a space separated list of two-letter
|
||||
codes, stating which languages are allowed.
|
||||
|
||||
Using This Package
|
||||
==================
|
||||
|
||||
As a user, if your language has been installed for this package, you
|
||||
only have to set the `LANG' environment variable to the appropriate
|
||||
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
|
||||
and `CC' is an ISO 3166 two-letter country code. For example, let's
|
||||
suppose that you speak German and live in Germany. At the shell
|
||||
prompt, merely execute `setenv LANG de_DE' (in `csh'),
|
||||
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
|
||||
This can be done from your `.login' or `.profile' file, once and for
|
||||
all.
|
||||
|
||||
You might think that the country code specification is redundant.
|
||||
But in fact, some languages have dialects in different countries. For
|
||||
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
|
||||
country code serves to distinguish the dialects.
|
||||
|
||||
The locale naming convention of `LL_CC', with `LL' denoting the
|
||||
language and `CC' denoting the country, is the one use on systems based
|
||||
on GNU libc. On other systems, some variations of this scheme are
|
||||
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
|
||||
locales supported by your system for your country by running the command
|
||||
`locale -a | grep '^LL''.
|
||||
|
||||
Not all programs have translations for all languages. By default, an
|
||||
English message is shown in place of a nonexistent translation. If you
|
||||
understand other languages, you can set up a priority list of languages.
|
||||
This is done through a different environment variable, called
|
||||
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
|
||||
for the purpose of message handling, but you still need to have `LANG'
|
||||
set to the primary language; this is required by other parts of the
|
||||
system libraries. For example, some Swedish users who would rather
|
||||
read translations in German than English for when Swedish is not
|
||||
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
|
||||
|
||||
In the `LANGUAGE' environment variable, but not in the `LANG'
|
||||
environment variable, `LL_CC' combinations can be abbreviated as `LL'
|
||||
to denote the language's main dialect. For example, `de' is equivalent
|
||||
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
|
||||
(Portuguese as spoken in Portugal) in this context.
|
||||
|
||||
Translating Teams
|
||||
=================
|
||||
|
||||
For the Free Translation Project to be a success, we need interested
|
||||
people who like their own language and write it well, and who are also
|
||||
able to synergize with other translators speaking the same language.
|
||||
Each translation team has its own mailing list. The up-to-date list of
|
||||
teams can be found at the Free Translation Project's homepage,
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
|
||||
area.
|
||||
|
||||
If you'd like to volunteer to _work_ at translating messages, you
|
||||
should become a member of the translating team for your own language.
|
||||
The subscribing address is _not_ the same as the list itself, it has
|
||||
`-request' appended. For example, speakers of Swedish can send a
|
||||
message to `sv-request@li.org', having this message body:
|
||||
|
||||
subscribe
|
||||
|
||||
Keep in mind that team members are expected to participate
|
||||
_actively_ in translations, or at solving translational difficulties,
|
||||
rather than merely lurking around. If your team does not exist yet and
|
||||
you want to start one, or if you are unsure about what to do or how to
|
||||
get started, please write to `translation@iro.umontreal.ca' to reach the
|
||||
coordinator for all translator teams.
|
||||
|
||||
The English team is special. It works at improving and uniformizing
|
||||
the terminology in use. Proven linguistic skill are praised more than
|
||||
programming skill, here.
|
||||
|
||||
Available Packages
|
||||
==================
|
||||
|
||||
Languages are not equally supported in all packages. The following
|
||||
matrix shows the current state of internationalization, as of April
|
||||
2002. The matrix shows, in regard of each package, for which languages
|
||||
PO files have been submitted to translation coordination, with a
|
||||
translation percentage of at least 50%.
|
||||
|
||||
Ready PO files bg ca cs da de el en eo es et fi fr
|
||||
+-------------------------------------+
|
||||
a2ps | [] [] [] [] |
|
||||
bash | [] [] [] [] |
|
||||
bfd | [] [] |
|
||||
binutils | [] [] |
|
||||
bison | [] [] [] [] |
|
||||
clisp | [] [] [] [] |
|
||||
cpio | [] [] [] [] |
|
||||
diffutils | [] [] [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] [] |
|
||||
fetchmail | [] () [] [] [] () |
|
||||
fileutils | [] [] [] [] [] |
|
||||
findutils | [] [] [] [] [] |
|
||||
flex | [] [] [] [] [] |
|
||||
gas | [] [] |
|
||||
gawk | [] [] [] |
|
||||
gcal | [] [] |
|
||||
gcc | [] [] |
|
||||
gettext | [] [] [] [] [] |
|
||||
gnupg | [] [] [] [] [] [] |
|
||||
gprof | [] [] |
|
||||
gpsdrive | () () () () () |
|
||||
grep | [] [] [] [] [] [] [] |
|
||||
gretl | |
|
||||
hello | [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] [] [] |
|
||||
indent | [] [] [] [] [] |
|
||||
jpilot | () [] [] [] |
|
||||
jwhois | [] [] |
|
||||
kbd | [] [] |
|
||||
ld | [] [] |
|
||||
libc | [] [] [] [] [] [] [] |
|
||||
lilypond | [] [] |
|
||||
lynx | [] [] [] [] |
|
||||
m4 | [] [] [] [] [] |
|
||||
make | [] [] [] [] |
|
||||
mysecretdiary | [] [] |
|
||||
nano | [] () [] [] [] [] |
|
||||
nano_1_0 | [] () [] [] [] [] |
|
||||
opcodes | [] [] [] |
|
||||
parted | [] [] [] [] [] |
|
||||
ptx | [] [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] [] [] [] |
|
||||
sharutils | [] [] [] [] [] [] |
|
||||
sketch | () [] () |
|
||||
soundtracker | [] [] [] |
|
||||
sp | [] |
|
||||
tar | [] [] [] [] [] [] |
|
||||
texinfo | [] [] [] [] [] |
|
||||
textutils | [] [] [] [] [] |
|
||||
util-linux | [] [] [] [] [] [] |
|
||||
vorbis-tools | |
|
||||
wastesedge | |
|
||||
wdiff | [] [] [] [] [] [] |
|
||||
wget | [] [] [] [] [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
bg ca cs da de el en eo es et fi fr
|
||||
2 14 11 31 40 10 1 8 41 16 1 50
|
||||
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
+-------------------------------------+
|
||||
a2ps | () () [] |
|
||||
bash | |
|
||||
bfd | [] |
|
||||
binutils | [] |
|
||||
bison | [] [] |
|
||||
clisp | [] |
|
||||
cpio | [] [] [] |
|
||||
diffutils | [] [] [] [] |
|
||||
enscript | [] [] |
|
||||
error | [] |
|
||||
fetchmail | [] |
|
||||
fileutils | [] [] [] |
|
||||
findutils | [] [] [] [] [] [] [] |
|
||||
flex | [] |
|
||||
gas | |
|
||||
gawk | [] |
|
||||
gcal | |
|
||||
gcc | |
|
||||
gettext | [] [] |
|
||||
gnupg | [] [] [] [] |
|
||||
gprof | |
|
||||
gpsdrive | () () |
|
||||
grep | [] [] [] [] [] [] |
|
||||
gretl | |
|
||||
hello | [] [] [] [] [] [] [] [] [] [] [] [] |
|
||||
id-utils | [] |
|
||||
indent | [] [] [] |
|
||||
jpilot | () () |
|
||||
jwhois | [] |
|
||||
kbd | |
|
||||
ld | |
|
||||
libc | [] [] [] [] |
|
||||
lilypond | [] [] |
|
||||
lynx | [] [] [] |
|
||||
m4 | [] [] [] [] |
|
||||
make | [] [] [] [] [] [] |
|
||||
mysecretdiary | |
|
||||
nano | [] [] [] () [] [] [] |
|
||||
nano_1_0 | [] [] [] () [] [] |
|
||||
opcodes | [] |
|
||||
parted | [] [] [] |
|
||||
ptx | [] [] [] [] |
|
||||
python | |
|
||||
recode | [] [] [] |
|
||||
sed | [] [] [] [] [] [] [] |
|
||||
sh-utils | [] [] [] [] [] |
|
||||
sharutils | [] [] [] |
|
||||
sketch | () |
|
||||
soundtracker | [] |
|
||||
sp | |
|
||||
tar | [] [] [] [] [] |
|
||||
texinfo | [] [] [] |
|
||||
textutils | [] [] [] |
|
||||
util-linux | () [] |
|
||||
vorbis-tools | |
|
||||
wastesedge | |
|
||||
wdiff | [] [] |
|
||||
wget | [] [] [] [] [] [] |
|
||||
+-------------------------------------+
|
||||
gl he hr hu id it ja ko lv nb nl nn
|
||||
23 9 8 4 12 12 25 9 1 8 20 4
|
||||
|
||||
no pl pt pt_BR ru sk sl sv tr uk zh_TW
|
||||
+----------------------------------------+
|
||||
a2ps | () () () [] [] [] [] () | 9
|
||||
bash | | 4
|
||||
bfd | [] [] | 5
|
||||
binutils | [] | 4
|
||||
bison | [] [] [] | 9
|
||||
clisp | | 5
|
||||
cpio | [] [] [] [] | 11
|
||||
diffutils | [] [] [] [] [] [] | 16
|
||||
enscript | [] [] [] | 7
|
||||
error | [] [] [] | 6
|
||||
fetchmail | () () [] | 6
|
||||
fileutils | [] [] [] [] [] | 13
|
||||
findutils | [] [] [] [] [] [] [] | 19
|
||||
flex | [] [] [] | 9
|
||||
gas | [] | 3
|
||||
gawk | [] [] | 6
|
||||
gcal | [] [] | 4
|
||||
gcc | [] | 3
|
||||
gettext | [] [] [] [] [] [] | 13
|
||||
gnupg | [] [] [] | 13
|
||||
gprof | [] [] | 4
|
||||
gpsdrive | () | 0
|
||||
grep | [] [] [] [] | 17
|
||||
gretl | | 0
|
||||
hello | [] [] [] [] [] [] [] | 27
|
||||
id-utils | [] [] | 6
|
||||
indent | [] [] [] [] | 12
|
||||
jpilot | () () [] | 4
|
||||
jwhois | () () [] [] | 5
|
||||
kbd | [] [] | 4
|
||||
ld | [] [] | 4
|
||||
libc | [] [] [] [] [] [] | 17
|
||||
lilypond | [] | 5
|
||||
lynx | [] [] [] | 10
|
||||
m4 | [] [] [] | 12
|
||||
make | [] [] [] [] | 14
|
||||
mysecretdiary | [] [] | 4
|
||||
nano | () [] [] [] [] | 15
|
||||
nano_1_0 | () [] [] [] [] | 14
|
||||
opcodes | [] [] | 6
|
||||
parted | [] [] [] | 11
|
||||
ptx | [] [] [] [] [] [] | 15
|
||||
python | | 0
|
||||
recode | [] [] [] [] | 13
|
||||
sed | [] [] [] [] [] [] | 21
|
||||
sh-utils | [] [] [] [] [] [] [] [] [] | 22
|
||||
sharutils | [] [] [] [] | 13
|
||||
sketch | [] () | 3
|
||||
soundtracker | [] | 5
|
||||
sp | | 1
|
||||
tar | [] [] [] [] [] [] [] | 18
|
||||
texinfo | [] [] | 10
|
||||
textutils | [] [] [] [] [] | 13
|
||||
util-linux | [] [] [] | 10
|
||||
vorbis-tools | [] | 1
|
||||
wastesedge | | 0
|
||||
wdiff | [] [] [] [] | 12
|
||||
wget | [] [] [] [] [] [] [] [] | 23
|
||||
+----------------------------------------+
|
||||
35 teams no pl pt pt_BR ru sk sl sv tr uk zh_TW
|
||||
58 domains 5 16 2 14 27 11 11 41 36 4 9 536
|
||||
|
||||
Some counters in the preceding matrix are higher than the number of
|
||||
visible blocks let us expect. This is because a few extra PO files are
|
||||
used for implementing regional variants of languages, or language
|
||||
dialects.
|
||||
|
||||
For a PO file in the matrix above to be effective, the package to
|
||||
which it applies should also have been internationalized and
|
||||
distributed as such by its maintainer. There might be an observable
|
||||
lag between the mere existence a PO file and its wide availability in a
|
||||
distribution.
|
||||
|
||||
If April 2002 seems to be old, you may fetch a more recent copy of
|
||||
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
|
||||
matrix with full percentage details can be found at
|
||||
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
|
||||
|
||||
Using `gettext' in new packages
|
||||
===============================
|
||||
|
||||
If you are writing a freely available program and want to
|
||||
internationalize it you are welcome to use GNU `gettext' in your
|
||||
package. Of course you have to respect the GNU Library General Public
|
||||
License which covers the use of the GNU `gettext' library. This means
|
||||
in particular that even non-free programs can use `libintl' as a shared
|
||||
library, whereas only free software can use `libintl' as a static
|
||||
library or use modified versions of `libintl'.
|
||||
|
||||
Once the sources are changed appropriately and the setup can handle
|
||||
to use of `gettext' the only thing missing are the translations. The
|
||||
Free Translation Project is also available for packages which are not
|
||||
developed inside the GNU project. Therefore the information given above
|
||||
applies also for every other Free Software Project. Contact
|
||||
`translation@iro.umontreal.ca' to make the `.pot' files available to
|
||||
the translation teams.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Author of Hunspell:
|
||||
Németh László nemeth (at) OpenOffice.org
|
||||
|
||||
Hunspell based on OpenOffice.org's Myspell. MySpell's author:
|
||||
Kevin Hendricks kevin.hendricks (at) sympatico.ca
|
|
@ -0,0 +1,67 @@
|
|||
Developer Credits:
|
||||
|
||||
Special credit and thanks go to ispell's creator Geoff Kuenning.
|
||||
Ispell affix compression code was used as the basis for the
|
||||
affix code used in MySpell. Specifically Geoff's use of a
|
||||
conds[] array that makes it easy to check if the conditions
|
||||
required for a particular affix are present was very
|
||||
ingenious! Kudos to Geoff. Very nicely done.
|
||||
BTW: ispell is available under a BSD style license
|
||||
from Geoff Kuennings ispell website:
|
||||
http://www.cs.ucla.edu/ficus-members/geoff/ispell.html
|
||||
|
||||
|
||||
Kevin Hendricks <kevin.hendricks@sympatico.ca> is the original
|
||||
author and now maintainer of the MySpell codebase. Recent
|
||||
additions include ngram support, and related character maps
|
||||
to help improve and create suggestions for very poorly
|
||||
spelled words.
|
||||
|
||||
Please send any and all contributions or improvements
|
||||
to him or to dev@lingucomponent.openoffice.org.
|
||||
|
||||
|
||||
David Einstein (Deinst@world.std.com) developed an almost
|
||||
complete rewrite of MySpell for use by the Mozilla project.
|
||||
David and I are now working on parallel development tracks
|
||||
to help our respective projects (Mozilla and OpenOffice.org)
|
||||
and we will maintain full affix file and dictionary file
|
||||
compatibility and work on merging our versions of MySpell
|
||||
back into a single tree. David has been a significant help
|
||||
in improving MySpell.
|
||||
|
||||
|
||||
Németh László <nemethl@gyorsposta.hu> is the author of
|
||||
the Hungarian dictionary and he developed and contributed
|
||||
extensive changes to MySpell including ...
|
||||
* code to support compound words in MySpell
|
||||
* fixed numerous problems with encoding case conversion tables.
|
||||
* designed/developed replacement tables to improve suggestions
|
||||
* changed affix file parsing to trees to greatly speed loading
|
||||
* removed the need for malloc/free pairs in suffix_check which
|
||||
speeds up spell checking in suffix rich languages by 20%
|
||||
|
||||
Davide Prina <davideprina@uahoo.com>, Giuseppe Modugno
|
||||
<gppe.modugno@libero.it>, Gianluca Turconi <luctur@comeg.it>
|
||||
all from the it_IT OpenOffice.org team performed an
|
||||
extremely detailed code review of MySpell and generated
|
||||
fixes for bugs, leaks, and speedup improvements.
|
||||
|
||||
Simon Brouwer <simon.oo.o@xs4all.nl> for fixes and enhancements
|
||||
that have greatly improved MySpell auggestions
|
||||
* n-gram suggestions for an initcap word have an init. cap.
|
||||
* fix for too many n-gram suggestions from specialized dictionary,
|
||||
* fix for long suggestions rather than close ones in case of
|
||||
dictionaries with many compound words (kompuuter)
|
||||
* optionally disabling split-word suggestions (controlled
|
||||
by NOSPLITSUGS line in affix file)
|
||||
|
||||
|
||||
Special Thanks to all others who have either contributed ideas or
|
||||
testing for MySpell
|
||||
|
||||
|
||||
Thanks,
|
||||
|
||||
Kevin Hendricks
|
||||
kevin.hendricks@sympatico.ca
|
|
@ -0,0 +1,9 @@
|
|||
* Problems with UTF-8 flag support on ARM platform (fail reputf and maputf test)
|
||||
|
||||
* Interactive interface has some visualisation problem with UTF-8 characters
|
||||
|
||||
* -U, -u options doesn't support Unicode.
|
||||
|
||||
* Compound handling is not thread safe in Hungarian specific code
|
||||
|
||||
* stemming is experimental and incomplete
|
|
@ -0,0 +1,12 @@
|
|||
GPL 2.0/LGPL 2.1/MPL 1.1 tri-license
|
||||
|
||||
The contents of this software may be used under the terms of
|
||||
the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
the GNU Lesser General Public License Version 2.1 or later (the "LGPL",
|
||||
see COPYING.LGPL) or (excepting the LGPLed GNU gettext library in the
|
||||
intl/ directory) the Mozilla Public License Version 1.1 or later
|
||||
(the "MPL", see COPYING.MPL).
|
||||
|
||||
Software distributed under these licenses is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences
|
||||
for the specific language governing rights and limitations under the licenses.
|
|
@ -0,0 +1,515 @@
|
|||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
^L
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
^L
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
^L
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
^L
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
^L
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
^L
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
^L
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
^L
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it
|
||||
does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
|
@ -0,0 +1,470 @@
|
|||
MOZILLA PUBLIC LICENSE
|
||||
Version 1.1
|
||||
|
||||
---------------
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.0.1. "Commercial Use" means distribution or otherwise making the
|
||||
Covered Code available to a third party.
|
||||
|
||||
1.1. "Contributor" means each entity that creates or contributes to
|
||||
the creation of Modifications.
|
||||
|
||||
1.2. "Contributor Version" means the combination of the Original
|
||||
Code, prior Modifications used by a Contributor, and the Modifications
|
||||
made by that particular Contributor.
|
||||
|
||||
1.3. "Covered Code" means the Original Code or Modifications or the
|
||||
combination of the Original Code and Modifications, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
||||
accepted in the software development community for the electronic
|
||||
transfer of data.
|
||||
|
||||
1.5. "Executable" means Covered Code in any form other than Source
|
||||
Code.
|
||||
|
||||
1.6. "Initial Developer" means the individual or entity identified
|
||||
as the Initial Developer in the Source Code notice required by Exhibit
|
||||
A.
|
||||
|
||||
1.7. "Larger Work" means a work which combines Covered Code or
|
||||
portions thereof with code not governed by the terms of this License.
|
||||
|
||||
1.8. "License" means this document.
|
||||
|
||||
1.8.1. "Licensable" means having the right to grant, to the maximum
|
||||
extent possible, whether at the time of the initial grant or
|
||||
subsequently acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.9. "Modifications" means any addition to or deletion from the
|
||||
substance or structure of either the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files, a
|
||||
Modification is:
|
||||
A. Any addition to or deletion from the contents of a file
|
||||
containing Original Code or previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.10. "Original Code" means Source Code of computer software code
|
||||
which is described in the Source Code notice required by Exhibit A as
|
||||
Original Code, and which, at the time of its release under this
|
||||
License is not already Covered Code governed by this License.
|
||||
|
||||
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
||||
hereafter acquired, including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by grantor.
|
||||
|
||||
1.11. "Source Code" means the preferred form of the Covered Code for
|
||||
making modifications to it, including all modules it contains, plus
|
||||
any associated interface definition files, scripts used to control
|
||||
compilation and installation of an Executable, or source code
|
||||
differential comparisons against either the Original Code or another
|
||||
well known, available Covered Code of the Contributor's choice. The
|
||||
Source Code can be in a compressed or archival form, provided the
|
||||
appropriate decompression or de-archiving software is widely available
|
||||
for no charge.
|
||||
|
||||
1.12. "You" (or "Your") means an individual or a legal entity
|
||||
exercising rights under, and complying with all of the terms of, this
|
||||
License or a future version of this License issued under Section 6.1.
|
||||
For legal entities, "You" includes any entity which controls, is
|
||||
controlled by, or is under common control with You. For purposes of
|
||||
this definition, "control" means (a) the power, direct or indirect,
|
||||
to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or (b) ownership of more than fifty percent
|
||||
(50%) of the outstanding shares or beneficial ownership of such
|
||||
entity.
|
||||
|
||||
2. Source Code License.
|
||||
|
||||
2.1. The Initial Developer Grant.
|
||||
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license, subject to third party intellectual property
|
||||
claims:
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Initial Developer to use, reproduce,
|
||||
modify, display, perform, sublicense and distribute the Original
|
||||
Code (or portions thereof) with or without Modifications, and/or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patents Claims infringed by the making, using or
|
||||
selling of Original Code, to make, have made, use, practice,
|
||||
sell, and offer for sale, and/or otherwise dispose of the
|
||||
Original Code (or portions thereof).
|
||||
|
||||
(c) the licenses granted in this Section 2.1(a) and (b) are
|
||||
effective on the date Initial Developer first distributes
|
||||
Original Code under the terms of this License.
|
||||
|
||||
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
||||
granted: 1) for code that You delete from the Original Code; 2)
|
||||
separate from the Original Code; or 3) for infringements caused
|
||||
by: i) the modification of the Original Code or ii) the
|
||||
combination of the Original Code with other software or devices.
|
||||
|
||||
2.2. Contributor Grant.
|
||||
Subject to third party intellectual property claims, each Contributor
|
||||
hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||
|
||||
(a) under intellectual property rights (other than patent or
|
||||
trademark) Licensable by Contributor, to use, reproduce, modify,
|
||||
display, perform, sublicense and distribute the Modifications
|
||||
created by such Contributor (or portions thereof) either on an
|
||||
unmodified basis, with other Modifications, as Covered Code
|
||||
and/or as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims infringed by the making, using, or
|
||||
selling of Modifications made by that Contributor either alone
|
||||
and/or in combination with its Contributor Version (or portions
|
||||
of such combination), to make, use, sell, offer for sale, have
|
||||
made, and/or otherwise dispose of: 1) Modifications made by that
|
||||
Contributor (or portions thereof); and 2) the combination of
|
||||
Modifications made by that Contributor with its Contributor
|
||||
Version (or portions of such combination).
|
||||
|
||||
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
||||
effective on the date Contributor first makes Commercial Use of
|
||||
the Covered Code.
|
||||
|
||||
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||
granted: 1) for any code that Contributor has deleted from the
|
||||
Contributor Version; 2) separate from the Contributor Version;
|
||||
3) for infringements caused by: i) third party modifications of
|
||||
Contributor Version or ii) the combination of Modifications made
|
||||
by that Contributor with other software (except as part of the
|
||||
Contributor Version) or other devices; or 4) under Patent Claims
|
||||
infringed by Covered Code in the absence of Modifications made by
|
||||
that Contributor.
|
||||
|
||||
3. Distribution Obligations.
|
||||
|
||||
3.1. Application of License.
|
||||
The Modifications which You create or to which You contribute are
|
||||
governed by the terms of this License, including without limitation
|
||||
Section 2.2. The Source Code version of Covered Code may be
|
||||
distributed only under the terms of this License or a future version
|
||||
of this License released under Section 6.1, and You must include a
|
||||
copy of this License with every copy of the Source Code You
|
||||
distribute. You may not offer or impose any terms on any Source Code
|
||||
version that alters or restricts the applicable version of this
|
||||
License or the recipients' rights hereunder. However, You may include
|
||||
an additional document offering the additional rights described in
|
||||
Section 3.5.
|
||||
|
||||
3.2. Availability of Source Code.
|
||||
Any Modification which You create or to which You contribute must be
|
||||
made available in Source Code form under the terms of this License
|
||||
either on the same media as an Executable version or via an accepted
|
||||
Electronic Distribution Mechanism to anyone to whom you made an
|
||||
Executable version available; and if made available via Electronic
|
||||
Distribution Mechanism, must remain available for at least twelve (12)
|
||||
months after the date it initially became available, or at least six
|
||||
(6) months after a subsequent version of that particular Modification
|
||||
has been made available to such recipients. You are responsible for
|
||||
ensuring that the Source Code version remains available even if the
|
||||
Electronic Distribution Mechanism is maintained by a third party.
|
||||
|
||||
3.3. Description of Modifications.
|
||||
You must cause all Covered Code to which You contribute to contain a
|
||||
file documenting the changes You made to create that Covered Code and
|
||||
the date of any change. You must include a prominent statement that
|
||||
the Modification is derived, directly or indirectly, from Original
|
||||
Code provided by the Initial Developer and including the name of the
|
||||
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
||||
Executable version or related documentation in which You describe the
|
||||
origin or ownership of the Covered Code.
|
||||
|
||||
3.4. Intellectual Property Matters
|
||||
(a) Third Party Claims.
|
||||
If Contributor has knowledge that a license under a third party's
|
||||
intellectual property rights is required to exercise the rights
|
||||
granted by such Contributor under Sections 2.1 or 2.2,
|
||||
Contributor must include a text file with the Source Code
|
||||
distribution titled "LEGAL" which describes the claim and the
|
||||
party making the claim in sufficient detail that a recipient will
|
||||
know whom to contact. If Contributor obtains such knowledge after
|
||||
the Modification is made available as described in Section 3.2,
|
||||
Contributor shall promptly modify the LEGAL file in all copies
|
||||
Contributor makes available thereafter and shall take other steps
|
||||
(such as notifying appropriate mailing lists or newsgroups)
|
||||
reasonably calculated to inform those who received the Covered
|
||||
Code that new knowledge has been obtained.
|
||||
|
||||
(b) Contributor APIs.
|
||||
If Contributor's Modifications include an application programming
|
||||
interface and Contributor has knowledge of patent licenses which
|
||||
are reasonably necessary to implement that API, Contributor must
|
||||
also include this information in the LEGAL file.
|
||||
|
||||
(c) Representations.
|
||||
Contributor represents that, except as disclosed pursuant to
|
||||
Section 3.4(a) above, Contributor believes that Contributor's
|
||||
Modifications are Contributor's original creation(s) and/or
|
||||
Contributor has sufficient rights to grant the rights conveyed by
|
||||
this License.
|
||||
|
||||
3.5. Required Notices.
|
||||
You must duplicate the notice in Exhibit A in each file of the Source
|
||||
Code. If it is not possible to put such notice in a particular Source
|
||||
Code file due to its structure, then You must include such notice in a
|
||||
location (such as a relevant directory) where a user would be likely
|
||||
to look for such a notice. If You created one or more Modification(s)
|
||||
You may add your name as a Contributor to the notice described in
|
||||
Exhibit A. You must also duplicate this License in any documentation
|
||||
for the Source Code where You describe recipients' rights or ownership
|
||||
rights relating to Covered Code. You may choose to offer, and to
|
||||
charge a fee for, warranty, support, indemnity or liability
|
||||
obligations to one or more recipients of Covered Code. However, You
|
||||
may do so only on Your own behalf, and not on behalf of the Initial
|
||||
Developer or any Contributor. You must make it absolutely clear than
|
||||
any such warranty, support, indemnity or liability obligation is
|
||||
offered by You alone, and You hereby agree to indemnify the Initial
|
||||
Developer and every Contributor for any liability incurred by the
|
||||
Initial Developer or such Contributor as a result of warranty,
|
||||
support, indemnity or liability terms You offer.
|
||||
|
||||
3.6. Distribution of Executable Versions.
|
||||
You may distribute Covered Code in Executable form only if the
|
||||
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||
and if You include a notice stating that the Source Code version of
|
||||
the Covered Code is available under the terms of this License,
|
||||
including a description of how and where You have fulfilled the
|
||||
obligations of Section 3.2. The notice must be conspicuously included
|
||||
in any notice in an Executable version, related documentation or
|
||||
collateral in which You describe recipients' rights relating to the
|
||||
Covered Code. You may distribute the Executable version of Covered
|
||||
Code or ownership rights under a license of Your choice, which may
|
||||
contain terms different from this License, provided that You are in
|
||||
compliance with the terms of this License and that the license for the
|
||||
Executable version does not attempt to limit or alter the recipient's
|
||||
rights in the Source Code version from the rights set forth in this
|
||||
License. If You distribute the Executable version under a different
|
||||
license You must make it absolutely clear that any terms which differ
|
||||
from this License are offered by You alone, not by the Initial
|
||||
Developer or any Contributor. You hereby agree to indemnify the
|
||||
Initial Developer and every Contributor for any liability incurred by
|
||||
the Initial Developer or such Contributor as a result of any such
|
||||
terms You offer.
|
||||
|
||||
3.7. Larger Works.
|
||||
You may create a Larger Work by combining Covered Code with other code
|
||||
not governed by the terms of this License and distribute the Larger
|
||||
Work as a single product. In such a case, You must make sure the
|
||||
requirements of this License are fulfilled for the Covered Code.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation.
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Code due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description
|
||||
must be included in the LEGAL file described in Section 3.4 and must
|
||||
be included with all distributions of the Source Code. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Application of this License.
|
||||
|
||||
This License applies to code to which the Initial Developer has
|
||||
attached the notice in Exhibit A and to related Covered Code.
|
||||
|
||||
6. Versions of the License.
|
||||
|
||||
6.1. New Versions.
|
||||
Netscape Communications Corporation ("Netscape") may publish revised
|
||||
and/or new versions of the License from time to time. Each version
|
||||
will be given a distinguishing version number.
|
||||
|
||||
6.2. Effect of New Versions.
|
||||
Once Covered Code has been published under a particular version of the
|
||||
License, You may always continue to use it under the terms of that
|
||||
version. You may also choose to use such Covered Code under the terms
|
||||
of any subsequent version of the License published by Netscape. No one
|
||||
other than Netscape has the right to modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
6.3. Derivative Works.
|
||||
If You create or use a modified version of this License (which you may
|
||||
only do in order to apply it to code which is not already Covered Code
|
||||
governed by this License), You must (a) rename Your license so that
|
||||
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
||||
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
||||
license (except to note that your license differs from this License)
|
||||
and (b) otherwise make it clear that Your version of the license
|
||||
contains terms which differ from the Mozilla Public License and
|
||||
Netscape Public License. (Filling in the name of the Initial
|
||||
Developer, Original Code or Contributor in the notice described in
|
||||
Exhibit A shall not of themselves be deemed to be modifications of
|
||||
this License.)
|
||||
|
||||
7. DISCLAIMER OF WARRANTY.
|
||||
|
||||
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||
|
||||
8. TERMINATION.
|
||||
|
||||
8.1. This License and the rights granted hereunder will terminate
|
||||
automatically if You fail to comply with terms herein and fail to cure
|
||||
such breach within 30 days of becoming aware of the breach. All
|
||||
sublicenses to the Covered Code which are properly granted shall
|
||||
survive any termination of this License. Provisions which, by their
|
||||
nature, must remain in effect beyond the termination of this License
|
||||
shall survive.
|
||||
|
||||
8.2. If You initiate litigation by asserting a patent infringement
|
||||
claim (excluding declatory judgment actions) against Initial Developer
|
||||
or a Contributor (the Initial Developer or Contributor against whom
|
||||
You file such action is referred to as "Participant") alleging that:
|
||||
|
||||
(a) such Participant's Contributor Version directly or indirectly
|
||||
infringes any patent, then any and all rights granted by such
|
||||
Participant to You under Sections 2.1 and/or 2.2 of this License
|
||||
shall, upon 60 days notice from Participant terminate prospectively,
|
||||
unless if within 60 days after receipt of notice You either: (i)
|
||||
agree in writing to pay Participant a mutually agreeable reasonable
|
||||
royalty for Your past and future use of Modifications made by such
|
||||
Participant, or (ii) withdraw Your litigation claim with respect to
|
||||
the Contributor Version against such Participant. If within 60 days
|
||||
of notice, a reasonable royalty and payment arrangement are not
|
||||
mutually agreed upon in writing by the parties or the litigation claim
|
||||
is not withdrawn, the rights granted by Participant to You under
|
||||
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
||||
the 60 day notice period specified above.
|
||||
|
||||
(b) any software, hardware, or device, other than such Participant's
|
||||
Contributor Version, directly or indirectly infringes any patent, then
|
||||
any rights granted to You by such Participant under Sections 2.1(b)
|
||||
and 2.2(b) are revoked effective as of the date You first made, used,
|
||||
sold, distributed, or had made, Modifications made by that
|
||||
Participant.
|
||||
|
||||
8.3. If You assert a patent infringement claim against Participant
|
||||
alleging that such Participant's Contributor Version directly or
|
||||
indirectly infringes any patent where such claim is resolved (such as
|
||||
by license or settlement) prior to the initiation of patent
|
||||
infringement litigation, then the reasonable value of the licenses
|
||||
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
||||
into account in determining the amount or value of any payment or
|
||||
license.
|
||||
|
||||
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
||||
all end user license agreements (excluding distributors and resellers)
|
||||
which have been validly granted by You or any distributor hereunder
|
||||
prior to termination shall survive termination.
|
||||
|
||||
9. LIMITATION OF LIABILITY.
|
||||
|
||||
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
||||
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
||||
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
||||
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||
|
||||
10. U.S. GOVERNMENT END USERS.
|
||||
|
||||
The Covered Code is a "commercial item," as that term is defined in
|
||||
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
||||
software" and "commercial computer software documentation," as such
|
||||
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||
all U.S. Government End Users acquire Covered Code with only those
|
||||
rights set forth herein.
|
||||
|
||||
11. MISCELLANEOUS.
|
||||
|
||||
This License represents the complete agreement concerning subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. This License shall be governed by
|
||||
California law provisions (except to the extent applicable law, if
|
||||
any, provides otherwise), excluding its conflict-of-law provisions.
|
||||
With respect to disputes in which at least one party is a citizen of,
|
||||
or an entity chartered or registered to do business in the United
|
||||
States of America, any litigation relating to this License shall be
|
||||
subject to the jurisdiction of the Federal Courts of the Northern
|
||||
District of California, with venue lying in Santa Clara County,
|
||||
California, with the losing party responsible for costs, including
|
||||
without limitation, court costs and reasonable attorneys' fees and
|
||||
expenses. The application of the United Nations Convention on
|
||||
Contracts for the International Sale of Goods is expressly excluded.
|
||||
Any law or regulation which provides that the language of a contract
|
||||
shall be construed against the drafter shall not apply to this
|
||||
License.
|
||||
|
||||
12. RESPONSIBILITY FOR CLAIMS.
|
||||
|
||||
As between Initial Developer and the Contributors, each party is
|
||||
responsible for claims and damages arising, directly or indirectly,
|
||||
out of its utilization of rights under this License and You agree to
|
||||
work with Initial Developer and Contributors to distribute such
|
||||
responsibility on an equitable basis. Nothing herein is intended or
|
||||
shall be deemed to constitute any admission of liability.
|
||||
|
||||
13. MULTIPLE-LICENSED CODE.
|
||||
|
||||
Initial Developer may designate portions of the Covered Code as
|
||||
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
||||
Developer permits you to utilize portions of the Covered Code under
|
||||
Your choice of the NPL or the alternative licenses, if any, specified
|
||||
by the Initial Developer in the file described in Exhibit A.
|
||||
|
||||
EXHIBIT A -Mozilla Public License.
|
||||
|
||||
``The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Original Code is ______________________________________.
|
||||
|
||||
The Initial Developer of the Original Code is ________________________.
|
||||
Portions created by ______________________ are Copyright (C) ______
|
||||
_______________________. All Rights Reserved.
|
||||
|
||||
Contributor(s): ______________________________________.
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the _____ license (the "[___] License"), in which case the
|
||||
provisions of [______] License are applicable instead of those
|
||||
above. If you wish to allow use of your version of this file only
|
||||
under the terms of the [____] License and not to allow others to use
|
||||
your version of this file under the MPL, indicate your decision by
|
||||
deleting the provisions above and replace them with the notice and
|
||||
other provisions required by the [___] License. If you do not delete
|
||||
the provisions above, a recipient may use your version of this file
|
||||
under either the MPL or the [___] License."
|
||||
|
||||
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||
the notices in the Source Code files of the Original Code. You should
|
||||
use the text of this Exhibit A rather than the text found in the
|
||||
Original Code Source Code for Your Modifications.]
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,524 @@
|
|||
Myspell has a lot of parallel development, that is not documented here.
|
||||
|
||||
2005-01-11: Németh László <nemethl@gyorsposta.hu>
|
||||
* hunspell.cxx:
|
||||
- interaktív javításnál hiányzó új sor karakterek pótlása.
|
||||
A hibát Gefferth András és Khiraly jelezte.
|
||||
* csutil.cxx:
|
||||
- pontosvesszők törlése a GCC 3.4-es fordító igényeinek megfelelően
|
||||
A hibát Dvornik László jelezte.
|
||||
- i változó ismételt deklarásának törlése, ami helyenként hibás
|
||||
fordítást eredményez.
|
||||
A hibát Lódoktor és Bencsáth Boldizsár jelezte.
|
||||
* OLVASS.EL:
|
||||
- Windows alatti fordításnál Langid.cxx módosítandó. A hibát
|
||||
Lódoktor jelezte.
|
||||
|
||||
2004-12-15 Németh László <nemethl@gyorsposta.hu>
|
||||
* src/morphbase/*:
|
||||
- handling K&R morphological encoding (remove plus signs from output)
|
||||
- LEMMA_PRESENT: put only morphological description to output
|
||||
- LANG parameter, langnum variable in source for writing language-dependent codes
|
||||
- remove HU_KOTOHANGZO
|
||||
- etc.
|
||||
* doc/hunspell.4:
|
||||
- adding some
|
||||
|
||||
2004-09-29 Halácsy Péter <peter@halacsy.com>
|
||||
|
||||
* doc/ : bemásoltam a hunspell.1 hunspell.4 man oldalakat
|
||||
* doc/hunspell.1: Kivettem a -s -m kapcsolókról szóló részt
|
||||
|
||||
2004-09-28 Halácsy Péter <peter@halacsy.com>
|
||||
|
||||
* src/hunspell/hunspell.cxx (indexing_interface): Ezt kiszedtem a
|
||||
HunSpell-bol, mert nem ide valo. Ez egy kulon program lehet.
|
||||
(main): a hunstem üzemmódot is kidobtam, ez se ide való
|
||||
(main): meg a hunmorph üzemmódot is
|
||||
|
||||
* src/morphbase/morphbase.cxx (MorphBase): Átneveztem a MySpell
|
||||
osztályt MorphBase-re
|
||||
(stems): Átnevezten a suggest_stems metódust stem -re (mint to stem)
|
||||
|
||||
2004-08-25 Németh László <nemethl@gyorsposta.hu>
|
||||
* src/hunbase/suggestmgr.cxx: tövezés visszaállítása, nem
|
||||
működik még az igekötők hozzátoldása a tőhöz, továbbá a
|
||||
kivételek kezelése (ehhez a 0.99.4-es szótár szükséges még).
|
||||
* src/hunbase/myspell.cxx: -s vissza a tövezéshez
|
||||
* src/hunbase/atypes.hxx: HUNSTEM makró definiálása itt az
|
||||
affixmgr.cxx feltételes kódjához
|
||||
|
||||
2004-08-12 Halacsy Peter
|
||||
* src/misc/lexfilter.cxx : uj program, ami a szotar szureshez hasznalhato
|
||||
lecserelheti a mostani hunmorph, hunspell -G -1 funkciokat
|
||||
|
||||
* src/hunbase/myspell.cxx (analyzer) : Uj metodust vettem fel, ami mar
|
||||
karaktertombben adja vissza az elemzes eredmenyet
|
||||
|
||||
2004-08-03 Halácsy Péter <peter@halacsy.com>
|
||||
|
||||
* src/hunspell/hunspell.cxx (HUNSPELL_VERSION): Áttettem ide ennek definiálását
|
||||
|
||||
2004-07-31 Halácsy Péter <peter@halacsy.com>
|
||||
|
||||
* src/hunbase/suggestmgr.cxx (fixstems): A fixstems miért itt van
|
||||
és miért így hívják. Ez mehetne egy külön osztályba.
|
||||
|
||||
2004-07-31 Halácsy Péter <peter@halacsy.com>
|
||||
|
||||
* src/huntoken/htmlparser.cxx: Egyebkent az include-ok kezelese
|
||||
eleg zavaros. Peldaul itt minek a textparser.hxx includolasa?
|
||||
|
||||
* src/huntoken/textparser.hxx (MAXLNLEN): Áthoztam ide a MAXLNLEN makrót
|
||||
az atypes.hxx-bol, hogy a fuggoseget megszuntessem
|
||||
|
||||
* src/hunbase/myspell.cxx (suggest): Kivettem azt a részt, ami visszaadja a HUNSPELL_VERSION stringet
|
||||
ha a VERSION_KEYWORD a bemeneti string. Csúnya gányolásnak tartottam
|
||||
|
||||
2004-07-27 Halácsy Péter <peter@halacsy.com>
|
||||
|
||||
* src/hunbase/myspell.cxx (morph_with_correction):
|
||||
|
||||
* src/hunbase/baseaffix.hxx (class AffEntry): Allandora felvettem a morphcode mezot (last htypes.hxx)
|
||||
|
||||
* src/hunbase/affentry.hxx: Kivettem a hunmorph felteteleket (last htypes.hxx)
|
||||
|
||||
* src/hunbase/htypes.hxx (struct hentry): Kivettem a HUNMORPH feltetelt a char* description korul. Ertem,
|
||||
hogy hatekonyabb egy folosleges mutato nelkul, ha nincs morf info, de szerintem felesleges
|
||||
|
||||
* src/hunbase/myspell.hxx: HUNSPELL_VERSION es VERSION_KEYWORD makrokat kivettem. Valamiert a
|
||||
hunspellnek kell majd
|
||||
|
||||
* src/hunbase/config.hxx (FLAG): config.hxx torolve, helyet atveszi a kozponti config.h; FLAG
|
||||
definicioja az atypes.hxx-be ment
|
||||
|
||||
* src/hunbase/atypes.hxx (FLAG): config.hxx megszuntetese erdekeben attettem ide a FLAG makro
|
||||
definialasat, ami az EXT_CLASS-tol fugg
|
||||
|
||||
config.hxx include kicserelve a configure altal kezelt config.h-ra
|
||||
|
||||
2004-06-29: Németh László <nemethl@gyorsposta.hu>
|
||||
* affixmgr.cxx:
|
||||
- csak utolsó tagként megengedett szavak (compound3) toldalék
|
||||
nélküli előfordulásának engedélyezése (pl. macskapár)
|
||||
- többszörösen összetett szavak toldalékolt alakjainak morfológiai
|
||||
elemzése
|
||||
* myspell.cxx:
|
||||
- rövidítések, számok, kötőjeles összetett szavak és a
|
||||
-e határozószót tartalmazó szavak morfológiai elemzése
|
||||
* suggestmgr.cxx: suggest_morph_for_spelling_error() optimalizálása
|
||||
(csak a felhasznált egy javaslatot keresi meg, többet nem).
|
||||
* csutil.cxx: kimenetben szereplő üres sorok törlése
|
||||
|
||||
2004-06-10: Németh László <nemethl@gyorsposta.hu>
|
||||
* suggestmgr.cxx: összetett szavak elemzésének korlátozása
|
||||
- a tövezés még nincs megvalósítva a 0.9.9-es változatban
|
||||
(helyette a Hunspell 0.9.7 használandó a Magyar Ispell 0.99.4-es
|
||||
változatával)
|
||||
|
||||
2004-05-19: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.9f-alpha
|
||||
|
||||
- morf. leírás sztringkezelése jav.
|
||||
- EXT_CLASS: config.cxx-ben
|
||||
- nagybetűs alakok is elemezve (a hibát Tron Viktor jelezte)
|
||||
- szebb kimenet
|
||||
- rule119 törölve
|
||||
- firstparser.cxx javítva
|
||||
|
||||
2004-02-13: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.8a:
|
||||
- MAXUSERWORD helyett USERWORD, nincs korlát
|
||||
- description \t-vel dic fájlba
|
||||
- homonimák kezelése
|
||||
- aff formátumbővítés
|
||||
- konfixumok
|
||||
- _morpho függvények
|
||||
- kettős szuffixum
|
||||
- hunmorph
|
||||
- lásd tests/hunmorph
|
||||
|
||||
2004-01-29: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.7-sztaki:
|
||||
- memóriakezelési hibák javítása
|
||||
|
||||
2003-12-17: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.7-es változat:
|
||||
* affixmgr.cxx:
|
||||
- suffix_check() javítás (tmpword kiváltása isRevSubSet()
|
||||
függvénnyel
|
||||
- betöltés optimalizálása, build_pfxlist() helyett:
|
||||
- build_pfxtree()
|
||||
- process_sfx_tree_to_list(), process_sfx_inorder()
|
||||
|
||||
* csutil.cxx:
|
||||
- isSubSet() gyorsabb változata
|
||||
- isRevSubSet()
|
||||
|
||||
* langid.cxx, hunp.cxx:
|
||||
- nyelvfelismerő osztály és program (l. man hunp)
|
||||
* man/hunp.1:
|
||||
- nyelvfelismerő program leírása
|
||||
|
||||
* firstparser.cxx:
|
||||
- csak a tabulátorjelet tartalmazó sorokból a tabulátorjel
|
||||
előtti részt adja vissza (l. man Hunspell, -1 kapcsoló)
|
||||
|
||||
* hunspell.cxx:
|
||||
- -u, -U, -u2 kapcsolók: tipikus hibák kijelzése;
|
||||
automatikus, illetve lektorált javítása. L. man hunspell.
|
||||
|
||||
- -w kapcsoló teljes sor vizsgálatához
|
||||
|
||||
* hunspell.cxx:
|
||||
- spell(): javítás (Valgrind hibajelzés alapján)
|
||||
|
||||
* hunspell.cxx: sprintf()-ek elé strlen() feltételvizsgálat
|
||||
|
||||
* suggestmgr.cxx:
|
||||
- 0.99.4-es Hunspell szótárral bekerült tövezési hiba
|
||||
javítása (nem produktív ragozású, összetett szóbam szereplő
|
||||
főneveknél lépett fel ez a probléma).
|
||||
|
||||
* OLVASS.EL:
|
||||
- bővítés
|
||||
|
||||
2003-11-03: Németh László <nemethl@gyorsposta.hu>
|
||||
* SuggestMgr::permute_accent():
|
||||
- illegális memóriaolvasási hiba javítása.
|
||||
* example.cxx::
|
||||
- dupla free() a "" karakterlánc tövezése után
|
||||
|
||||
A hibákat Sarlós Tamás <stamas@csillag.ilab.sztaki.hu>
|
||||
fedezte fel a figyelemre méltó Valgrind nyomkövető
|
||||
programmal (http://developer.kde.org/~sewardj/)
|
||||
|
||||
2003-10-22: Bencsáth Boldizsár <boldi@datacontact.hu>
|
||||
* affixmgr.[ch]xx, csutil.[ch]xx: Az eredeti
|
||||
MySpell foltjainak alkalmazása az OpenOffice.org 1.1
|
||||
kompatibilitás érdekében. Itt karakterkezelő
|
||||
segédfüggvények lettek áthelyezve elérhetőbb helyre.
|
||||
|
||||
* dictmgr.[ch]xx: Itt etype paraméter hozzáadása.
|
||||
|
||||
* makefile.mk: Itt angol szótárak megjegyzésbe tétele.
|
||||
|
||||
2003-10-04: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.6.3-as változat:
|
||||
* myspell.cxx: suggest() függvényben hibás
|
||||
memóriafoglalás javítása. A hiba a pontra végződő
|
||||
helytelen szavakra adott javaslattevés során
|
||||
jelentkezett. A hibás működést Khiraly
|
||||
<khiraly@gmx.net> jelezte.
|
||||
|
||||
2003-09-15: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.6.2-es változat:
|
||||
* latexparser.cxx: TeX elemző javítása:
|
||||
- elemzési hiba ({{}}})
|
||||
- verb+ +, \verb stb. kezelése
|
||||
|
||||
2003-09-01: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.6-os változat:
|
||||
|
||||
* affentry.cxx: check2 törlése, lehetséges
|
||||
tövek tárolása
|
||||
* suggestmgr.cxx, myspell.cxx: suggest_pos_stems()
|
||||
az ismeretlen szavak névszóragjainak és
|
||||
jeleinek leválasztására.
|
||||
|
||||
* affixmgr.cxx, suggestmgr.cxx: suggest_stems()
|
||||
szálkezeléshez módosított és javított függvény
|
||||
|
||||
* myspell.cxx: számok tövezése (teszt: 5-nek)
|
||||
|
||||
* myspell.cxx: egy karakter + szó javaslatok
|
||||
törlése (például cápak->cápa k)
|
||||
|
||||
* affixmgr.cxx, myspell.cxx, hunspell.cxx: szótár
|
||||
verziószámának kiírása
|
||||
|
||||
* hunspell.cxx: \r karaktert tartalmazó sorok
|
||||
helyes megjelenítése
|
||||
|
||||
* myspell.cxx, hunspell.cxx: rövidítés végi pontok
|
||||
hozzáadása függvénykönyvtár szinten
|
||||
|
||||
* hunspell.cxx: pipe_interface(): standard bemenet
|
||||
tövezésénél hiányzó memóriafelszabadítás pótlása
|
||||
|
||||
* Makefile: install javítása, több feltételvizsgálat
|
||||
deinstall szakasz
|
||||
|
||||
2003-07-22: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.5-ös változat
|
||||
* suggestmgr.cxx: marhalevél->lelevél tövezés javítása
|
||||
* myspell.cxx: nagy kezdőbetűs rövidítések vizsgálata (Bp., Btk.)
|
||||
- pontot tartalmazó számok helyesnek való elfogadása, ha:
|
||||
- az első pontot legalább egy,
|
||||
- de legfeljebb három számjegy előzi meg,
|
||||
- a pontok nem egymás mellett helyezkednek el,
|
||||
- az utolsó pont után legfeljebb két számjegy van.
|
||||
Ezzel elfogadjuk az időpontokat (12.00-kor), a pontozásokat
|
||||
(1.1.2-ben), de kizárjuk a szóköz nélküli hibás dátummegadásokat
|
||||
(2003.7.22.), valamint a tizedesvessző helyett ponttal írt
|
||||
tizedestörteket (3.456, 4563.34).
|
||||
- Javítás a tiltott szavakra adott kötőjeles javaslatoknál:
|
||||
Straussal->Strauss-szal, és nem ,,Strauss szal''.
|
||||
* hunspell.cxx: csak a -a kapcsoló megadásával élnek a
|
||||
csőfelületi parancsok. Ezért most már nincsenek figyelmen
|
||||
kívül hagyva például a kötőjellel kezdődő sorok, ha a -l
|
||||
kapcsolóval hibás szavakat keresünk egy állományban.
|
||||
* man/hunspell.1: a -a kapcsoló leírásának kiegészítése.
|
||||
|
||||
2003-06-13: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.4-es változat
|
||||
* bin/*: makedb, lookdb segédprogramok az indexeléshez
|
||||
* man/*: hunstem, makedb, lookdb
|
||||
* hunspell.cxx: pipe_interface: nyomkövető kiírás törlése
|
||||
- LOG #ifdef-be
|
||||
|
||||
2003-06-11: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.3-es változat
|
||||
* suggestmgr.cxx: nagybetűs javaslat tulajdonneveknél
|
||||
* hunspell.cxx: pipe_interface: hiba javítása
|
||||
|
||||
2003-06-05: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.2-es változat
|
||||
* hunspell.cxx: -s kapcsoló
|
||||
* suggestmgr.cxx: suggest_stems()
|
||||
Szótövek előállítása
|
||||
* example.cxx: példa a szótövek előállítására
|
||||
|
||||
2003-05-13: Németh László <nemethl@gyorsposta.hu>
|
||||
* 0.9.1-es változat
|
||||
* hunspell.cxx:
|
||||
- rl_escape(), stb.: a readline sorban ki lett kapcsolva
|
||||
a fájlnév-kiegészítés, és helyette a két Escape lenyomás
|
||||
megszakítja a szövegbevitelt. A Csere műveletnél is a
|
||||
readline() hívás található most már.
|
||||
- egy hibás sprintf() sor javítva lett
|
||||
* Makefile.unix:
|
||||
- beállítások elkülönítve az állomány elején
|
||||
- Makefile most már szimbólikus kötés
|
||||
* ooomagyarispellteszt.txt: tesztállomány
|
||||
|
||||
2003-04-28: Németh László <nemethl@gyorsposta.hu>
|
||||
* affixmgr.cxx:
|
||||
- y végű szavak kezelése: bővebb leírás a
|
||||
Magyar Ispell Changelog állományában.
|
||||
|
||||
* *parser.cxx:
|
||||
ISO-8859-1 HTML karakterentitások közül a betűértékűek
|
||||
(csak az ISO-8859-2-ben nem szereplők) felismerése
|
||||
és kezelése.
|
||||
|
||||
2003-04-21: Goldman Elenonóra <eleonora46@gmx.net>
|
||||
* *.dll függvénykönyvtár előállítása Windows alatt:
|
||||
- StdAfx.h
|
||||
- libmyspell.def
|
||||
- dlltest.cpp
|
||||
|
||||
2003-04-16: Németh László <nemethl@gyorsposta.hu>
|
||||
* Hunspell.cxx, stb: a Mispell átnevezése Hunspell-lé.
|
||||
A nevet Kornai András <andras@kornai.com> javasolta.
|
||||
Könyvtárak: /usr/share/mispell -> /usr/share/myspell
|
||||
(korábban is ez volt).
|
||||
A /usr/share/hunmorph szótár a helye a speciális
|
||||
morfológiai információkat tartalmazó Hunmorph (bővített
|
||||
Myspell szótárformátumú) szótárállományoknak.
|
||||
* Licenc: LGPL
|
||||
* config.hxx: SZOSZABLYA_POSSIBLE_ROOTS
|
||||
Ha a makrót bekapcsoljuk, akkor kiírásra kerülnek
|
||||
a lehetséges tövek is, az alkalmazott ragozási szabály
|
||||
osztályának betűjelével, illetve az alapszóval együtt.
|
||||
|
||||
2003-04-10: Németh László <nemethl@gyorsposta.hu>:
|
||||
* affixmgr.cxx:
|
||||
- kötőhangzók helyes kezelése (hu_kotohangzo kapcsolóval),
|
||||
l. még Magyar Ispell Changelog
|
||||
|
||||
2003-03-24: Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: pipe_interface(): az adatfájl szűrésnél fellépő
|
||||
memóriaszivárgás megszüntetése a kimaradt free(token) pótlásával
|
||||
* affixmgr.cxx: prefix_check(): leg-, legesleg- confixum ellenőrzés
|
||||
- onlyroot kapcsoló a csak tőszót érintő tiltáshoz. L. Magyar Ispell
|
||||
Az affixum állományban új kapcsolót adhatunk meg az
|
||||
ONLYROOT paranccsal bevezetve. A kapcsoló módosítja a tiltókapcsoló
|
||||
működését. L. man 4 mispell
|
||||
* myspell.cxx:
|
||||
- spell(): nagybetűs tulajdonnevek ellenőrzése (pl. BALATON)
|
||||
- onlyroot vizsgálat forbiddenword mellett -> mangrove kezelése
|
||||
|
||||
2003-03-17: Goldman Elenonóra <eleonora46@gmx.net>
|
||||
* Windows port
|
||||
* makefile.Windows:
|
||||
|
||||
2003-03-04: Németh László <nemethl@gyorsposta.hu>
|
||||
* firstparser.[ch]xx: adatfájlok szűréséhez (l. -1 kapcsoló)
|
||||
* mispell.cxx: -L, -1, -G kapcsolók
|
||||
* man/mispell.1: -L, -1, -G kapcsolók
|
||||
|
||||
2003-03-03: Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: -l, -p, WORDLIST
|
||||
* man/mispell.1: -l, -p, WORDLIST
|
||||
|
||||
2003-02-26: Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: dialog_screen():
|
||||
TILTOTT! (FORBIDDEN!) megjelenítése a tiltott szóösszetételek
|
||||
esetén.
|
||||
* suggestmgr.cxx:
|
||||
- check(): -ó, -ő képzős igeneveket érintő kód törlése
|
||||
- check_forbidden(): a 6 szótagnál hosszabb, tiltott szótövekre
|
||||
vonatkozó javaslatok nem kötőjellel, hanem szóközzel elválasztva
|
||||
tartalmazzák a szavakat, ehhez szükséges a check_forbidden().
|
||||
* man/*: új kézikönyv oldal az állományok formátumáról (mispell(4)),
|
||||
a mispell(1) bővítése.
|
||||
* Makefile, mispell.mo: Bíró Árpád <biro_arpad@yahoo.com> javításai
|
||||
|
||||
2003-02-18: Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: interactive_interface()
|
||||
- nem nyeli el a MAXLNLEN-t meghaladó méretű sorokban a MAXLNLEN
|
||||
méretű részek határán lévő karaktereket, és a nem újsor karakterre
|
||||
végződő állományok utolsó karakterét. (Hibát viszont még mindig
|
||||
jelez, ha a MAXLNLEN határ feldarabol egy amúgy helyes szót.)
|
||||
A MAXLNLEN 8192 karakter jelenleg.
|
||||
- readline függvénykönyvtár használata a bevitelnél
|
||||
- tőfelvételnél egy lehetséges tő előállítása, és a beviteli
|
||||
sorban való feltüntetése. Az így megjelenő szó javítható.
|
||||
- --help kapcsoló
|
||||
* Makefile: Javítások az install szakaszban.
|
||||
A hibákat Bíró Árpád <biro_arpad@yahoo.com> jelezte.
|
||||
|
||||
2003-02-07: Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: put_dots_to_suggestions()
|
||||
- realloc() cseréje malloc()-ra ismeretlen eredetű lefagyás miatt.
|
||||
- lehetséges az Ispellhez hasonlóan a kapcsolókat kézzel megadni a
|
||||
saját szótárban a szavak után egy perjelet követően: például a
|
||||
valamicsúnyaszó/w
|
||||
sor megadása után a valamicsúnyaszó és toldalékolt változatai hibásak
|
||||
lesznek az ellenőrzés alatt. (További kapcsolók leírásáért lásd a
|
||||
Magyar Ispell forrásában az aff/aff.fej állományt.)
|
||||
* affixmgr.cxx: compound_check()
|
||||
- repl_chars() hívása a megfelelő helyre lett téve, ezzel a
|
||||
javaslattevés sebessége kétszeresére nőtt.
|
||||
- A dinamikus memóriakezelés lecserelése veremmemóriára nem járt
|
||||
lényeges sebességnövekedéssel, de a közeljövőben ezzel elkerülhető
|
||||
az a memóriaszivárgás, ami például itt a tiltott szavak kezelésénél
|
||||
volt az előző változatban (javítva).
|
||||
* affentry.cxx, affixmgr.cxx: szótő-előállító kód megalapozása:
|
||||
get_possible_root() metódus az utolsó toldalék-leválasztás
|
||||
eredményével tér vissza.
|
||||
|
||||
2003-02-05: Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: put_dots_to_suggestions(): amennyiben
|
||||
a felismert szó pontra, vagy pontokra végződik, a
|
||||
javaslatokat is bővíti ezzel.
|
||||
- @, valamint 1-nél több pontot magába foglaló (de nem arra végződő)
|
||||
szavak ellenőrzésének tiltása (e-mail, fájlnevek, még nem opcionális).
|
||||
- Hosszú sorok helyes megjelenítése.
|
||||
- Tabulátorjelet tartalmazó sorok helyes megjelenítése.
|
||||
- Mozaikszavak tőfelvételénél kötőjeles alak automatikus rögzítése
|
||||
Pl.: BKV//URH mellett BKV-//URH- is bekerül a saját szótárba
|
||||
(a ragozott mozaikszavak felismerése tehát automatikus lesz, kivéve a
|
||||
nem triviális -val/-vel toldalékos alakoké, amit külön kell felvenni.)
|
||||
- PuT törlése (helyette MySpell::put_word(), put_word_suffix(),
|
||||
put_word_pattern() eljárások a saját szótár bővítésére)
|
||||
- dupla szavak ellenőrzésének törlése a MySpell kódból (áthelyezés majd a
|
||||
Mispell felületbe), hogy a MySpell meghívható maradjon párhuzamosan
|
||||
futó szálakból.
|
||||
|
||||
2002-12-30: Németh László <nemethl@gyorsposta.hu>
|
||||
* *parser.cxx, *parser.hxx: elemző osztályok a régi és csúnya kód helyett
|
||||
|
||||
2002-12-10: Németh László <nemethl@gyorsposta.hu>
|
||||
* myspell.cxx: 35°-os, 20%-kal kezelése
|
||||
* man/mispell.1: kézikönyv
|
||||
|
||||
2002-12-04: Noll János <johnzero@johnzero.hu>
|
||||
* spdaemon/: kiszolgáló felület, ld. README.spdaemon
|
||||
|
||||
2002-12-04: Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: Emacs kompatibilitáshoz hibák javítása (pl. többszörös -d)
|
||||
* mispell.cxx: CURSES makróval kikapcsolható az interaktív felület + locale
|
||||
(Windows, Macintosh)
|
||||
|
||||
2002-11-30: Németh László <nemethl@gyorsposta.hu>
|
||||
* affixmgr.cxx: get_checkdoublewords()
|
||||
|
||||
2002-11-25: Németh László <nemethl@gyorsposta.hu>
|
||||
* affixmgr.cxx: mozgószabály (hu_mov_rule)
|
||||
* myspell.cxx: mozgószabály
|
||||
* affixmgr.cxx: kiötlőjénekmacskát (affix is összetettben, ha prefix)
|
||||
|
||||
2002-11-08 Németh László <nemethl@gyorsposta.hu>
|
||||
* myspell.cxx: balatonnak->Balatonnak, balatoninak
|
||||
|
||||
2002-11-07 Németh László <nemethl@gyorsposta.hu>
|
||||
* myspell: 0.6-os változat
|
||||
|
||||
2002-10-31 Németh László <nemethl@gyorsposta.hu>
|
||||
* Egyszerűbb név: Magyar MySpell 0.5 után -> MIspell 0.6
|
||||
* mispell.cxx: többnyelvű interaktív felület (ncurses, locale)
|
||||
* Makefile: make install
|
||||
|
||||
2002-09-22 Németh László <nemethl@gyorsposta.hu>
|
||||
* affixmgr.cxx: compound_check() macskaugom->macskaugrom, stb. javítása
|
||||
* affixmgr.cxx: compound_check() szóismétlés (pl. macskamacska) tiltása
|
||||
* myspell.cxx: szóismétlődés tiltása (pl. kutya kutya) második rossz
|
||||
* suggestmgr.cxx: macskaírat->macska írat mellett ->macskairat
|
||||
|
||||
2002-07-29 Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell Windowsra, teszt Emacs-szel (vagy Emacs-csal)
|
||||
* tiltott szavakat nem javasol, és összetett szóban sem fogad el
|
||||
* fonev_morfo, fonev_morfo2 álszótövek elutasítása (házakmacska)
|
||||
* kötőjeles szavak kezelése
|
||||
* számok kezelése, kötőjeles alakjaikkal együtt, CHECKNUM kapcsoló
|
||||
|
||||
2002-07-17 Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: MySpell Ispell cső interfész
|
||||
|
||||
2002-07-04 Németh László <nemethl@gyorsposta.hu>
|
||||
* mispell.cxx: MySpell Ispell cső interfész
|
||||
* affxmgr.cxx: szszerű kiszűrése,
|
||||
* új funkciók:
|
||||
COMPOUNDFIRST: szó szerepelhet első tagként a szóöszetételekben
|
||||
COMPOUNDLAST: szó szerepelhet utolsó tagként a szóöszetételekben
|
||||
FORBIDDENWORD: tiltott szavak kapcsolója (utú, uta, stb.)
|
||||
|
||||
2002-06-25 Németh László <nemethl@gyorsposta.hu>
|
||||
* myspell.cxx, suggestmgr.cxx: get_compound() char* helyett char
|
||||
* affxmgr.cxx: check_repl() a helyesnek tűnő, de hibás összetett
|
||||
szavak kiszűrésére (pl. tejles, szervíz)
|
||||
A szóösszetétel elfogadása előtt még megnézzük, hogy a szó
|
||||
nem-e a cseretáblázatban felvett hibát tartalmaz,
|
||||
ha igen, akkor a szó hibásnak minősül, hiába helyes szóösszetétel.
|
||||
* affxmgr.cxx, suggestmgr.xx: accent: ékezetesítő.
|
||||
Leírás: README.accent
|
||||
További optimalizáció: az ékezet nélküli betű ékezetes
|
||||
változatai számának függvényében
|
||||
|
||||
2002-06-05 Noll János <johnzero@johnzero.hu>
|
||||
* myspell.cxx, suggestmgr.cxx: mem. szivárgás javítása
|
||||
(a get_compound() felszabadítás nélkül lett meghíva).
|
||||
A hiba a GNU mtrace segítségével lett detektálva.
|
||||
|
||||
2002-06-03 Németh László <nemethl@gyorsposta.hu>
|
||||
* Licenc: GPL
|
||||
* Lásd MYSPELL.HU
|
||||
* compound_check: 6-3 szabály, stb.
|
||||
|
||||
MySpell:
|
||||
|
||||
2002-xx-xx Kevin Hendricks <kevin.hendricks@sympatico.ca>
|
||||
* REP: ismétlések kiszűrése a javaslatokból
|
||||
* COMPOUNDMIN
|
||||
|
||||
2002-xx-xx Németh László <nemethl@gyorsposta.hu>
|
||||
* REP cseretáblázat
|
||||
* COMPOUND, szóösszetételképzés
|
||||
|
||||
2002-xx-xx David Einstein <Deinst@world.std.com>
|
||||
* optimalizált MySpell algoritmus
|
||||
|
||||
2001-xx-xx Kevin Hendricks <kevin.hendricks@sympatico.ca>
|
||||
* Működő ellenőrző, Ispell toldaléktömörítési algoritmussal
|
|
@ -0,0 +1,229 @@
|
|||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a
|
||||
time in the source code directory. After you have installed the
|
||||
package for one architecture, use `make distclean' before reconfiguring
|
||||
for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
|
@ -0,0 +1,502 @@
|
|||
2007-11-01: Hunspell 1.2.1 release:
|
||||
- new memory efficient condition checking algorithm for affix rules
|
||||
|
||||
- new morphological functions:
|
||||
- stem() for stemming
|
||||
- analyze() for morphological analysis
|
||||
- generate() for morphological generation
|
||||
|
||||
- new demos:
|
||||
- analyze: stemming, morphological analysis and generation
|
||||
- chmorph: morphological conversion of texts
|
||||
|
||||
2007-09-05: Hunspell 1.1.12 release:
|
||||
- dictionary based phonetic suggestion for words with
|
||||
special or foreign pronounciation or alternative (bad) transliteration
|
||||
(see Changelog, tests/phone.* and manual).
|
||||
|
||||
- improved data structure and memory optimization for dictionaries
|
||||
with variable count fields
|
||||
|
||||
- bug fixes for Unicode encoding dictionaries and ngram suggestions
|
||||
|
||||
- improved REP suggestions with space: it works without dictionary
|
||||
modification
|
||||
|
||||
- updated and new project files for Windows API
|
||||
|
||||
2007-08-27: Hunspell 1.1.11 release:
|
||||
- portability fixes
|
||||
|
||||
2007-08-23: Hunspell 1.1.10 release:
|
||||
- pronounciation based suggestion using Björn Jacke's original Aspell
|
||||
phonetic transcription algorithm (http://aspell.net), relicensed under
|
||||
GPL/LGPL/MPL tri-license with the permission of the author
|
||||
|
||||
- keyboard base suggestion by KEY (see manual)
|
||||
|
||||
- better time limits for suggestion search
|
||||
|
||||
- test environment for suggestion based on Wikipedia data
|
||||
|
||||
- bug fixes for non standard Mozilla platforms etc.
|
||||
|
||||
2007-07-25: Hunspell 1.1.9 release:
|
||||
- better tokenization:
|
||||
- for URLs, mail addresses and directory paths (default: skip these tokens)
|
||||
- for colons in words (for Finnish and Swedish)
|
||||
|
||||
- new examples:
|
||||
- affixation of personal dictionary words
|
||||
- digits in words
|
||||
|
||||
- bug fixes (see ChangeLog)
|
||||
|
||||
2007-07-16: Hunspell 1.1.8 release:
|
||||
- better Mac OS X/Cygwin and Windows compatibility
|
||||
|
||||
- fix Hunspell's Valgrind environment and memory handling errors
|
||||
detected by Valgrind
|
||||
|
||||
- other bug fixes (see ChangeLog)
|
||||
|
||||
2007-07-06: Hunspell 1.1.7 release:
|
||||
- fix warning messages of OpenOffice.org build
|
||||
|
||||
2007-06-29: Hunspell 1.1.6 release:
|
||||
- check capitalization of the following word forms
|
||||
- words with mixed capitalisation: OpenOffice.org - OPENOFFICE.ORG
|
||||
- allcap words and suffixes: UNICEF's - UNICEF'S
|
||||
- prefixes with apostrophe and proper names: Sant'Elia - SANT'ELIA
|
||||
|
||||
- suggestion for missing sentence spacing: something.The -> something. The
|
||||
|
||||
- Hunspell executable: improved locale support
|
||||
- -i option: custom input encoding
|
||||
- use locale data for default dictionary names.
|
||||
- tools/hunspell.cxx: fix 8-bit tokenization (letters without
|
||||
casing, like ß or Hebrew characters now are handled well)
|
||||
- dictionary search path (automatic detection of OpenOffice.org directories)
|
||||
- DICPATH environmental variable
|
||||
- -D option: show directory path of loaded dictionary
|
||||
|
||||
- patches and bug fixes for Mozilla, OpenOffice.org.
|
||||
|
||||
2007-03-19: Hunspell 1.1.5 release:
|
||||
- optimizations: 10-100% speed up, smaller code size and memory footprint
|
||||
(conditional experimental code and warning messages)
|
||||
|
||||
- extended Unicode support:
|
||||
- non BMP Unicode characters in dictionary words and affixes (except
|
||||
affix rules and conditions)
|
||||
- support BOM sequence in aff and dic files
|
||||
|
||||
- IGNORE feature for Arabic diacritics and other optional characters
|
||||
|
||||
- New edit distance suggestion methods:
|
||||
- capitalisation: nasa -> NASA
|
||||
- long swap: permenant -> permanent
|
||||
- long move: Ghandi -> Gandhi, greatful -> grateful
|
||||
- double two characters: vacacation -> vacation
|
||||
- spaces in REP sug.: REP alot a_lot (NOTE: "a lot" must be a dictionary word)
|
||||
|
||||
- patches and bug fixes for Mozilla, OpenOffice.org, Emacs, MinGW, Aqua,
|
||||
German and Arabic language, etc.
|
||||
|
||||
2006-02-01: Hunspell 1.1.4 release:
|
||||
- Improved suggestion for typical OCR bugs (missing spaces between
|
||||
capitalized words). For example: "aNew" -> "a New".
|
||||
http://qa.openoffice.org/issues/show_bug.cgi?id=58202
|
||||
|
||||
- tokenization fixes (fix incomplete tokenization of input texts on big-endian
|
||||
platforms, and locale-dependent tokenization of dictionary entries)
|
||||
|
||||
2006-01-06: Hunspell 1.1.3.2 release:
|
||||
- fix Visual C++ compiling errors
|
||||
|
||||
2006-01-05: Hunspell 1.1.3 release:
|
||||
- GPL/LGPL/MPL tri-license for Mozilla integration
|
||||
|
||||
- Alias compression of flag sets and morphological descriptions.
|
||||
(For example, 16 MB Arabic dic file can be compressed to 1 MB.)
|
||||
|
||||
- Improved suggestion.
|
||||
|
||||
- Improved, language independent German sharp s casing with CHECKSHARPS
|
||||
declaration.
|
||||
|
||||
- Unicode tokenization in Hunspell program.
|
||||
|
||||
- Bug fixes (at new and old compound word handling methods), etc.
|
||||
|
||||
2005-11-11: Hunspell 1.1.2 release:
|
||||
|
||||
- Bug fixes (MAP Unicode, COMPOUND pattern matching, ONLYINCOMPOUND
|
||||
suggestions)
|
||||
|
||||
- Checked with 51 regression tests in Valgrind debugging environment,
|
||||
and tested with 52 OOo dictionaries on i686-pc-linux platform.
|
||||
|
||||
2005-11-09: Hunspell 1.1.1 release:
|
||||
|
||||
- Compound word patterns for complex compound word handling and
|
||||
simple word-level lexical scanning. Ideal for checking
|
||||
Arabic and Roman numbers, ordinal numbers in English, affixed
|
||||
numbers in agglutinative languages, etc.
|
||||
http://qa.openoffice.org/issues/show_bug.cgi?id=53643
|
||||
|
||||
- Support ISO-8859-15 encoding for French (French oe ligatures are
|
||||
missing from the latin-1 encoding).
|
||||
http://qa.openoffice.org/issues/show_bug.cgi?id=54980
|
||||
|
||||
- Implemented a flag to forbid obscene word suggestion:
|
||||
http://qa.openoffice.org/issues/show_bug.cgi?id=55498
|
||||
|
||||
- Checked with 50 regression tests in Valgrind debugging environment,
|
||||
and tested with 52 OOo dictionaries.
|
||||
|
||||
- other improvements and bug fixes (see ChangeLog)
|
||||
|
||||
2005-09-19: Hunspell 1.1.0 release
|
||||
|
||||
* complete comparison with MySpell 3.2 (from OpenOffice.org 2 beta)
|
||||
|
||||
* improved ngram suggestion with swap character detection and
|
||||
case insensitivity
|
||||
|
||||
------ examples for ngram improvement (input word and suggestions) -----
|
||||
|
||||
1. pernament (instead of permanent)
|
||||
|
||||
MySpell 3.2: tournaments, tournament, ornaments, ornament's, ornamenting, ornamented,
|
||||
ornament, ornamentals, ornamental, ornamentally
|
||||
|
||||
Hunspell 1.0.9: ornamental, ornament, tournament
|
||||
|
||||
Hunspell 1.1.0: permanent
|
||||
|
||||
Note: swap character detection
|
||||
|
||||
|
||||
2. PERNAMENT (instead of PERMANENT)
|
||||
|
||||
MySpell 3.2: -
|
||||
|
||||
Hunspell 1.0.9: -
|
||||
|
||||
Hunspell 1.1.0: PERMANENT
|
||||
|
||||
|
||||
3. Unesco (instead of UNESCO)
|
||||
|
||||
MySpell 3.2: Genesco, Ionesco, Genesco's, Ionesco's, Frescoing, Fresco's,
|
||||
Frescoed, Fresco, Escorts, Escorting
|
||||
|
||||
Hunspell 1.0.9: Genesco, Ionesco, Fresco
|
||||
|
||||
Hunspell 1.1.0: UNESCO
|
||||
|
||||
|
||||
4. siggraph's (instead of SIGGRAPH's)
|
||||
|
||||
MySpell 3.2: serigraph's, photograph's, serigraphs, physiography's,
|
||||
physiography, digraphs, serigraph, stratigraphy's, stratigraphy
|
||||
epigraphs
|
||||
|
||||
Hunspell 1.0.9: serigraph's, epigraph's, digraph's
|
||||
|
||||
Hunspell 1.1.0: SIGGRAPH's
|
||||
|
||||
--------------- end of examples --------------------
|
||||
|
||||
* improved testing environment with suggestion checking and memory debugging
|
||||
|
||||
memory debugging of all tests with a simple command:
|
||||
|
||||
VALGRIND=memcheck make check
|
||||
|
||||
* lots of other improvements and bug fixes (see ChangeLog)
|
||||
|
||||
|
||||
2005-08-26: Hunspell 1.0.9 release
|
||||
|
||||
* improved related character map suggestion
|
||||
|
||||
* improved ngram suggestion
|
||||
|
||||
------ examples for ngram improvement (O=old, N = new ngram suggestions) --
|
||||
|
||||
1. Permenant (instead of Permanent)
|
||||
|
||||
O: Endangerment, Ferment, Fermented, Deferment's, Empowerment,
|
||||
Ferment's, Ferments, Fermenting, Countermen, Weathermen
|
||||
|
||||
N: Permanent, Supermen, Preferment
|
||||
|
||||
Note: Ngram suggestions was case sensitive.
|
||||
|
||||
2. permenant (instead of permanent)
|
||||
|
||||
O: supermen, newspapermen, empowerment, endangerment, preferments,
|
||||
preferment, permanent, preferment's, permanently, impermanent
|
||||
|
||||
N: permanent, supermen, preferment
|
||||
|
||||
Note: new suggestions are also weighted with longest common subsequence,
|
||||
first letter and common character positions
|
||||
|
||||
3. pernemant (instead of permanent)
|
||||
|
||||
O: pimpernel's, pimpernel, pimpernels, permanently, permanents, permanent,
|
||||
supernatant, impermanent, semipermanent, impermanently
|
||||
|
||||
N: permanent, supernatant, pimpernel
|
||||
|
||||
Note: new method also prefers root word instead of not
|
||||
relevant affixes ('s, s and ly)
|
||||
|
||||
|
||||
4. pernament (instead of permanent)
|
||||
|
||||
O: tournaments, tournament, ornaments, ornament's, ornamenting, ornamented,
|
||||
ornament, ornamentals, ornamental, ornamentally
|
||||
|
||||
N: ornamental, ornament, tournament
|
||||
|
||||
Note: Both ngram methods misses here.
|
||||
|
||||
|
||||
5. obvus (instad of obvious):
|
||||
|
||||
O: obvious, Corvus, obverse, obviously, Jacobus, obtuser, obtuse,
|
||||
obviates, obviate, Travus
|
||||
|
||||
N: obvious, obtuse, obverse
|
||||
|
||||
Note: new method also prefers common first letters.
|
||||
|
||||
|
||||
6. unambigus (instead of unambiguous)
|
||||
|
||||
O: unambiguous, unambiguity, unambiguously, ambiguously, ambiguous,
|
||||
unambitious, ambiguities, ambiguousness
|
||||
|
||||
N: unambiguous, unambiguity, unambitious
|
||||
|
||||
|
||||
|
||||
7. consecvence (instead of consequence)
|
||||
|
||||
O: consecutive, consecutively, consecutiveness, nonconsecutive, consequence,
|
||||
consecutiveness's, convenience's, consistences, consistence
|
||||
|
||||
N: consequence, consecutive, consecrates
|
||||
|
||||
|
||||
An example in a language with rich morphology:
|
||||
|
||||
8. Misisipiben (instead of Mississippiben [`in Mississippi' in Hungarian]):
|
||||
|
||||
O: Misikédéiben, Pisisedéiben, Misikéiéiben, Pisisekéiben, Misikéiben,
|
||||
Misikéidéiben, Misikékéiben, Misikéikéiben, Misikéiméiben, Mississippiiben
|
||||
|
||||
N: Mississippiben, Mississippiiben, Misiiben
|
||||
|
||||
Note: Suggesting not relevant affixes was the biggest fault in ngram
|
||||
suggestion for languages with a lot of affixes.
|
||||
|
||||
--------------- end of examples --------------------
|
||||
|
||||
* support twofold prefix cutting
|
||||
|
||||
* lots of other improvements and bug fixes (see ChangeLog)
|
||||
|
||||
* test Hunspell with 54 OpenOffice.org dictionaries:
|
||||
|
||||
source: ftp://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
|
||||
|
||||
testing shell script:
|
||||
-------------------------------------------------------
|
||||
for i in `ls *zip | grep '^[a-z]*_[A-Z]*[.]'`
|
||||
do
|
||||
dic=`basename $i .zip`
|
||||
mkdir $dic
|
||||
echo unzip $dic
|
||||
unzip -d $dic $i 2>/dev/null
|
||||
cd $dic
|
||||
echo unmunch and test $dic
|
||||
unmunch $dic.dic $dic.aff 2>/dev/null | awk '{print$0"\t"}' |
|
||||
hunspell -d $dic -l -1 >$dic.result 2>$dic.err || rm -f $dic.result
|
||||
cd ..
|
||||
done
|
||||
--------------------------------------------------------
|
||||
|
||||
test result (0 size is o.k.):
|
||||
|
||||
$ for i in *_*/*.result; do wc -c $i; done
|
||||
0 af_ZA/af_ZA.result
|
||||
0 bg_BG/bg_BG.result
|
||||
0 ca_ES/ca_ES.result
|
||||
0 cy_GB/cy_GB.result
|
||||
0 cs_CZ/cs_CZ.result
|
||||
0 da_DK/da_DK.result
|
||||
0 de_AT/de_AT.result
|
||||
0 de_CH/de_CH.result
|
||||
0 de_DE/de_DE.result
|
||||
0 el_GR/el_GR.result
|
||||
6 en_AU/en_AU.result
|
||||
0 en_CA/en_CA.result
|
||||
0 en_GB/en_GB.result
|
||||
0 en_NZ/en_NZ.result
|
||||
0 en_US/en_US.result
|
||||
0 eo_EO/eo_EO.result
|
||||
0 es_ES/es_ES.result
|
||||
0 es_MX/es_MX.result
|
||||
0 es_NEW/es_NEW.result
|
||||
0 fo_FO/fo_FO.result
|
||||
0 fr_FR/fr_FR.result
|
||||
0 ga_IE/ga_IE.result
|
||||
0 gd_GB/gd_GB.result
|
||||
0 gl_ES/gl_ES.result
|
||||
0 he_IL/he_IL.result
|
||||
0 hr_HR/hr_HR.result
|
||||
200694989 hu_HU/hu_HU.result
|
||||
0 id_ID/id_ID.result
|
||||
0 it_IT/it_IT.result
|
||||
0 ku_TR/ku_TR.result
|
||||
0 lt_LT/lt_LT.result
|
||||
0 lv_LV/lv_LV.result
|
||||
0 mg_MG/mg_MG.result
|
||||
0 mi_NZ/mi_NZ.result
|
||||
0 ms_MY/ms_MY.result
|
||||
0 nb_NO/nb_NO.result
|
||||
0 nl_NL/nl_NL.result
|
||||
0 nn_NO/nn_NO.result
|
||||
0 ny_MW/ny_MW.result
|
||||
0 pl_PL/pl_PL.result
|
||||
0 pt_BR/pt_BR.result
|
||||
0 pt_PT/pt_PT.result
|
||||
0 ro_RO/ro_RO.result
|
||||
0 ru_RU/ru_RU.result
|
||||
0 rw_RW/rw_RW.result
|
||||
0 sk_SK/sk_SK.result
|
||||
0 sl_SI/sl_SI.result
|
||||
0 sv_SE/sv_SE.result
|
||||
0 sw_KE/sw_KE.result
|
||||
0 tet_ID/tet_ID.result
|
||||
0 tl_PH/tl_PH.result
|
||||
0 tn_ZA/tn_ZA.result
|
||||
0 uk_UA/uk_UA.result
|
||||
0 zu_ZA/zu_ZA.result
|
||||
|
||||
In en_AU dictionary, there is an abbrevation with two dots (`eqn..'), but
|
||||
`eqn.' is missing. Presumably it is a dictionary bug. Myspell also
|
||||
haven't accepted it.
|
||||
|
||||
Hungarian dictionary contains pseudoroots and forbidden words.
|
||||
Unmunch haven't supported these features yet, and generates bad words, too.
|
||||
|
||||
* check affix rules and OOo dictionaries. Detected bugs in cs_CZ,
|
||||
es_ES, es_NEW, es_MX, lt_LT, nn_NO, pt_PT, ro_RO, sk_SK and sv_SE dictionaries).
|
||||
|
||||
Details:
|
||||
--------------------------------------------------------
|
||||
cs_CZ
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX D us ech [^ighk]os
|
||||
SFX D us y [^i]os
|
||||
SFX Q os ech [^ghk]es
|
||||
SFX M o ech [^ghkei]a
|
||||
SFX J ém ej ám
|
||||
SFX J ém ejme ám
|
||||
SFX J ém ejte ám
|
||||
SFX A ou¾it up oupit
|
||||
SFX A ou¾it upme oupit
|
||||
SFX A ou¾it upte oupit
|
||||
SFX A nout l [aeiouyáéíóúýùìr][^aeiouyáéíóúýùìrl][^aeiouy
|
||||
SFX A nout l [aeiouyáéíóúýùìr][^aeiouyáéíóúýùìrl][^aeiouy
|
||||
|
||||
es_ES
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX W umar úse [ae]husar
|
||||
SFX W emir iñáis eñir
|
||||
|
||||
es_NEW
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX I unan únen unar
|
||||
|
||||
es_MX
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX A a ote e
|
||||
SFX W umar úse [ae]husar
|
||||
SFX W emir iñáis eñir
|
||||
|
||||
lt_LT
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX U ti siuosi tis
|
||||
SFX U ti siuosi tis
|
||||
SFX U ti siesi tis
|
||||
SFX U ti siesi tis
|
||||
SFX U ti sis tis
|
||||
SFX U ti sis tis
|
||||
SFX U ti simës tis
|
||||
SFX U ti simës tis
|
||||
SFX U ti sitës tis
|
||||
SFX U ti sitës tis
|
||||
|
||||
nn_NO
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX D ar rar [^fmk]er
|
||||
SFX U Øre orde ere
|
||||
SFX U Øre ort ere
|
||||
|
||||
pt_PT
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX g ãos oas ão
|
||||
SFX g ãos oas ão
|
||||
|
||||
ro_RO
|
||||
warning - bad field number:
|
||||
SFX L 0 le [^cg] i
|
||||
SFX L 0 i [cg] i
|
||||
SFX U 0 i [^i] ii
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX P l i l [<- there is an unnecessary tabulator here)
|
||||
SFX I a ii [gc] a
|
||||
warning - bad field number:
|
||||
SFX I a ii [gc] a
|
||||
SFX I a ei [^cg] a
|
||||
|
||||
sk_SK
|
||||
warning - incompatible stripping characters and condition:
|
||||
SFX T µa» olú kla»
|
||||
SFX T µa» olúc kla»
|
||||
SFX T sµa» ¹lú sla»
|
||||
SFX T sµa» ¹lúc sla»
|
||||
SFX R µc» lèiem åc»
|
||||
SFX R iás» ätie mias»
|
||||
SFX R iez» iem [^i]ez»
|
||||
SFX R iez» ie¹ [^i]ez»
|
||||
SFX R iez» ie [^i]ez»
|
||||
SFX R iez» eme [^i]ez»
|
||||
SFX R iez» ete [^i]ez»
|
||||
SFX R iez» ú [^i]ez»
|
||||
SFX R iez» úc [^i]ez»
|
||||
SFX R iez» z [^i]ez»
|
||||
SFX R iez» me [^i]ez»
|
||||
SFX R iez» te [^i]ez»
|
||||
|
||||
sv_SE
|
||||
warning - bad field number:
|
||||
SFX C 0 net nets [^e]n
|
||||
--------------------------------------------------------
|
||||
|
||||
2005-08-01: Hunspell 1.0.8 release
|
||||
|
||||
- improved compound word support
|
||||
- fix German S handling
|
||||
- port MySpell files and MAP feature
|
||||
|
||||
2005-07-22: Hunspell 1.0.7 release
|
||||
|
||||
2005-07-21: new home page: http://hunspell.sourceforge.net
|
|
@ -0,0 +1,132 @@
|
|||
About Hunspell
|
||||
--------------
|
||||
|
||||
Hunspell is a spell checker and morphological analyzer library and program
|
||||
designed for languages with rich morphology and complex word compounding or
|
||||
character encoding. Hunspell interfaces: Ispell-like terminal interface
|
||||
using Curses library, Ispell pipe interface, OpenOffice.org UNO module.
|
||||
|
||||
Hunspell's code base comes from the OpenOffice.org MySpell
|
||||
(http://lingucomponent.openoffice.org/MySpell-3.zip). See README.MYSPELL,
|
||||
AUTHORS.MYSPELL and license.myspell files.
|
||||
Hunspell is designed to eventually replace Myspell in OpenOffice.org.
|
||||
|
||||
Main features of Hunspell spell checker and morphological analyzer:
|
||||
|
||||
- Unicode support (affix rules work only with the first 65535 Unicode characters)
|
||||
|
||||
- Morphological analysis (in custom item and arrangement style)
|
||||
|
||||
- Max. 65535 affix classes and twofold affix stripping (for agglutinative
|
||||
languages, like Azeri, Basque, Estonian, Finnish, Hungarian, Turkish, etc.)
|
||||
|
||||
- Support complex compoundings (for example, Hungarian and German)
|
||||
|
||||
- Support language specific features (for example, special casing of
|
||||
Azeri and Turkish dotted i, or German sharp s)
|
||||
|
||||
- Handle conditional affixes, circumfixes, fogemorphemes,
|
||||
forbidden words, pseudoroots and homonyms.
|
||||
|
||||
- Free software (LGPL, GPL, MPL tri-license)
|
||||
|
||||
Compiling
|
||||
---------
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
For dictionary development, use the --with-warnings option of configure.
|
||||
|
||||
For compiling morphological analyser and stemmer code and tools, use the
|
||||
--with-experimental option of configure.
|
||||
|
||||
For interactive user interface of Hunspell executable, use the --with-ui option.
|
||||
|
||||
The developer packages you need to compile Hunspell's interface:
|
||||
|
||||
glibc-devel
|
||||
|
||||
optional developer packages:
|
||||
|
||||
ncurses (need for --with-ui)
|
||||
readline (for fancy input line editing,
|
||||
configure parameter: --with-readline)
|
||||
locale and gettext (but you can also use the
|
||||
--with-included-gettext configure parameter)
|
||||
|
||||
Hunspell distribution uses new Autoconf (2.59) and Automake (1.9).
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
Testing Hunspell (see tests in tests/ subdirectory):
|
||||
|
||||
make check
|
||||
|
||||
or with Valgrind debugger:
|
||||
|
||||
make check
|
||||
VALGRIND=[Valgrind_tool] make check
|
||||
|
||||
For example:
|
||||
|
||||
make check
|
||||
VALGRIND=memcheck make check
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
features and dictionary format:
|
||||
man 4 hunspell
|
||||
|
||||
man hunspell
|
||||
hunspell -h
|
||||
http://hunspell.sourceforge.net
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
The src/tools dictionary contains three executables.
|
||||
A spell checker with Ispell-like curses interface and Ispell
|
||||
compatible pipe interface (hunspell) and two small example
|
||||
program (hunmorph and hunstem).
|
||||
|
||||
After compiling and installing (see INSTALL) you can
|
||||
run the Hunspell spell checker (compiled with user interface)
|
||||
with a Hunspell or Myspell dictionary:
|
||||
|
||||
hunspell -d en_UK text.txt
|
||||
|
||||
or without interface:
|
||||
|
||||
hunspell -d en_UK -l <text.txt
|
||||
|
||||
(Dictionaries consists of an affix and dictionary file.)
|
||||
|
||||
Usage of Hunmorph morphological analyzer:
|
||||
|
||||
hunmorph en_UK.aff en_UK.dic input_file
|
||||
|
||||
Using Hunspell library with GCC
|
||||
-------------------------------
|
||||
|
||||
Including in your program:
|
||||
#include <hunspell.hxx>
|
||||
|
||||
Linking with Hunspell static library:
|
||||
g++ -lhunspell example.cxx
|
||||
|
||||
Dictionaries
|
||||
------------
|
||||
|
||||
Myspell dictionaries:
|
||||
http://lingucomponent.openoffice.org/spell_dic.html
|
||||
|
||||
Aspell dictionaries (need some conversion):
|
||||
ftp://ftp.gnu.org/gnu/aspell/dict
|
||||
Conversion steps: see relevant feature request at http://hunspell.sf.net.
|
||||
|
||||
Németh László
|
||||
nemeth at OOo
|
|
@ -0,0 +1,69 @@
|
|||
MySpell is a simple spell checker that uses affix
|
||||
compression and is modelled after the spell checker
|
||||
ispell.
|
||||
|
||||
MySpell was written to explore how affix compression
|
||||
can be implemented.
|
||||
|
||||
The Main features of MySpell are:
|
||||
|
||||
1. written in C++ to make it easier to interface with
|
||||
Pspell, OpenOffice, AbiWord, etc
|
||||
|
||||
2. it is stateless, uses no static variables and
|
||||
should be completely reentrant with almost no
|
||||
ifdefs
|
||||
|
||||
3. it tries to be as compatible with ispell to
|
||||
the extent it can. It can read slightly modified
|
||||
versions of munched ispell dictionaries (and it
|
||||
comes with a munched english wordlist borrowed from
|
||||
Kevin Atkinson's excellent Aspell.
|
||||
|
||||
4. it uses a heavily modified aff file format that
|
||||
can be derived from ispell aff files but uses
|
||||
the iso-8859-X character sets only
|
||||
|
||||
5. it is simple with *lots* of comments that
|
||||
describes how the affixes are stored
|
||||
and tested for (based on the approach used by
|
||||
ispell).
|
||||
|
||||
6. it supports improved suggestions with replacement
|
||||
tables and ngram-scoring based mechanisms in addition
|
||||
to the main suggestion mechanisms
|
||||
|
||||
7. like ispell it has a BSD license (and no
|
||||
advertising clause)
|
||||
|
||||
But ... it has *no* support for adding words
|
||||
to a personal dictionary, *no* support for converting
|
||||
between various text encodings, and *no* command line
|
||||
interface (it is purely meant to be a library).
|
||||
|
||||
It can not (in any way) replace all of the functionality
|
||||
of ispell or aspell/pspell. It is meant as a learning
|
||||
tool for understanding affix compression and for
|
||||
being used by front ends like OpenOffice, Abiword, etc.
|
||||
|
||||
MySpell has been tested under Linux and Solaris
|
||||
and has the world's simplest Makefile and no
|
||||
configure support.
|
||||
|
||||
It does come with a simple example program that
|
||||
spell checks some words and returns suggestions.
|
||||
|
||||
To build a static library and an example
|
||||
program under Linux simply type:
|
||||
|
||||
tar -zxvf myspell.tar.gz
|
||||
cd myspell2
|
||||
make
|
||||
|
||||
To run the example program:
|
||||
./example ./en_US.aff ./en_US.dic checkme.lst
|
||||
|
||||
Please play around with it and let me know
|
||||
what you think.
|
||||
|
||||
Please see the file CONTRIBUTORS for more info.
|
|
@ -0,0 +1,94 @@
|
|||
Many thanks to the following contributors and supporters:
|
||||
|
||||
Lars Aronsson
|
||||
Bencsáth Boldizsár
|
||||
Bíró Árpád
|
||||
Ingo H. de Boer
|
||||
Simon Brouwer
|
||||
Jeppe Bundsgaard
|
||||
Ginn Chen
|
||||
Dmitri Gabinski
|
||||
Dvornik László
|
||||
David Einstein
|
||||
Rene Engelhard
|
||||
Frederik Fouvry
|
||||
Gavins at OOo
|
||||
Gefferth András
|
||||
Godó Ferenc
|
||||
Goldman Eleonóra
|
||||
Halácsy Péter
|
||||
Chris Halls
|
||||
Khaled Hosny
|
||||
Izsók András
|
||||
Björn Jacke
|
||||
Mike Tian-Jian Jiang
|
||||
Dafydd Jones
|
||||
Ryan Jones
|
||||
Jean-Christophe Helary
|
||||
Kevin Hendricks
|
||||
Martin Hollmichel
|
||||
Pavel Janík
|
||||
Kéménczy Kálmán
|
||||
Dan Kenigsberg
|
||||
Khiraly László
|
||||
Koblinger Egmont
|
||||
Kornai András
|
||||
Tor Lillqvist
|
||||
Robert Longson
|
||||
Marot at SF dot net
|
||||
Caolan McNamara
|
||||
Michael Meeks
|
||||
Moheb Mekhaiel
|
||||
Ellis Miller
|
||||
Giuseppe Modugno
|
||||
János Mohácsi
|
||||
Bram Moolenaar
|
||||
Daniel Naber
|
||||
Nagy Viktor
|
||||
John Nisly
|
||||
Noll János
|
||||
Bryan Petty
|
||||
Harri Pitkänen
|
||||
Davide Prina
|
||||
Kevin F. Quinn
|
||||
Erdal Ronahi
|
||||
Bernhard Rosenkraenzer
|
||||
Sarlós Tamás
|
||||
Thobias Schlemmer
|
||||
Jose da Silva
|
||||
Munzir Taha
|
||||
Tímár András
|
||||
Tonal at OOo
|
||||
Trón Viktor
|
||||
Gianluca Turconi
|
||||
Ryan VanderMeulen
|
||||
Varga Dániel
|
||||
Miha Vrhovnik
|
||||
Martijn Wargers
|
||||
Friedel Wolff
|
||||
Gábor Zahemszky
|
||||
Taha Zerrouki
|
||||
and others (see also AUTHORS.myspell)
|
||||
|
||||
FSF.hu Foundation
|
||||
http://www.fsf.hu
|
||||
|
||||
MOKK Research Centre
|
||||
Budapest University of Technology and Economics
|
||||
Sociology and Communications Department
|
||||
http://www.mokk.bme.hu
|
||||
|
||||
Hungarian Ministry of Informatics and Telecommunications
|
||||
|
||||
IMEDIA Ltd.
|
||||
http://www.imedia.hu
|
||||
|
||||
OpenOffice.org community
|
||||
http://www.openoffice.org
|
||||
|
||||
UHU-Linux Ltd.
|
||||
|
||||
Thanks,
|
||||
|
||||
Németh László
|
||||
nemeth at OOo
|
|
@ -0,0 +1,4 @@
|
|||
* shared dictionaries for multi-user environment
|
||||
* improve compound handling
|
||||
* Unicode unmunch (munch)
|
||||
* forbiddenword and pseudoword support in unmunch
|
|
@ -0,0 +1,10 @@
|
|||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: hunspell
|
||||
Description: Hunpell spellchecking library
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lhunspell-@HUNSPELL_VERSION_MAJOR@.@HUNSPELL_VERSION_MINOR@
|
||||
Cflags: -I${includedir}/hunspell
|
|
@ -0,0 +1,55 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Hunspell, based on MySpell.
|
||||
*
|
||||
* The Initial Developers of the Original Code are
|
||||
* Kevin Hendricks (MySpell) and Németh László (Hunspell).
|
||||
* Portions created by the Initial Developers are Copyright (C) 2002-2005
|
||||
* the Initial Developers. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* David Einstein
|
||||
* Davide Prina
|
||||
* Giuseppe Modugno
|
||||
* Gianluca Turconi
|
||||
* Simon Brouwer
|
||||
* Noll János
|
||||
* Bíró Árpád
|
||||
* Goldman Eleonóra
|
||||
* Sarlós Tamás
|
||||
* Bencsáth Boldizsár
|
||||
* Halácsy Péter
|
||||
* Dvornik László
|
||||
* Gefferth András
|
||||
* Nagy Viktor
|
||||
* Varga Dániel
|
||||
* Chris Halls
|
||||
* Rene Engelhard
|
||||
* Bram Moolenaar
|
||||
* Dafydd Jones
|
||||
* Harri Pitkänen
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada
|
||||
* And Contributors. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* NOTE: A special thanks and credit goes to Geoff Kuenning
|
||||
* the creator of ispell. MySpell's affix algorithms were
|
||||
* based on those of ispell which should be noted is
|
||||
* copyright Geoff Kuenning et.al. and now available
|
||||
* under a BSD style license. For more information on ispell
|
||||
* and affix compression in general, please see:
|
||||
* http://www.cs.ucla.edu/ficus-members/geoff/ispell.html
|
||||
* (the home page for ispell)
|
||||
*
|
||||
* An almost complete rewrite of MySpell for use by
|
||||
* the Mozilla project has been developed by David Einstein
|
||||
* (Deinst@world.std.com). David and I are now
|
||||
* working on parallel development tracks to help
|
||||
* our respective projects (Mozilla and OpenOffice.org
|
||||
* and we will maintain full affix file and dictionary
|
||||
* file compatibility and work on merging our versions
|
||||
* of MySpell back into a single tree. David has been
|
||||
* a significant help in improving MySpell.
|
||||
*
|
||||
* Special thanks also go to La'szlo' Ne'meth
|
||||
* <nemethl@gyorsposta.hu> who is the author of the
|
||||
* Hungarian dictionary and who developed and contributed
|
||||
* the code to support compound words in MySpell
|
||||
* and fixed numerous problems with the encoding
|
||||
* case conversion tables.
|
||||
*
|
||||
*/
|
|
@ -0,0 +1,360 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2003-09-02.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case "$f" in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
|
||||
fi
|
||||
if [ -f "$file" ]; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
|
||||
# We have makeinfo, but it failed.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -0,0 +1 @@
|
|||
SUBDIRS=hunspell parsers tools win_api
|
|
@ -0,0 +1,505 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURSESLIB = @CURSESLIB@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HUNSPELL_VERSION_MAJOR = @HUNSPELL_VERSION_MAJOR@
|
||||
HUNSPELL_VERSION_MINOR = @HUNSPELL_VERSION_MINOR@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
READLINELIB = @READLINELIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XFAILED = @XFAILED@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
SUBDIRS = hunspell parsers tools win_api
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,15 @@
|
|||
libhunspell_la_LDFLAGS = -version-info 1:1:0
|
||||
|
||||
lib_LTLIBRARIES = libhunspell.la
|
||||
libhunspell_includedir = $(includedir)/hunspell
|
||||
libhunspell_la_SOURCES=affentry.cxx affixmgr.cxx csutil.cxx \
|
||||
dictmgr.cxx hashmgr.cxx hunspell.cxx utf_info.cxx \
|
||||
suggestmgr.cxx license.myspell license.hunspell \
|
||||
phonet.cxx
|
||||
|
||||
libhunspell_include_HEADERS=affentry.hxx htypes.hxx affixmgr.hxx \
|
||||
csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx hunspell.h \
|
||||
suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx \
|
||||
phonet.hxx
|
||||
|
||||
EXTRA_DIST=hunspell.dsp makefile.mk README
|
|
@ -0,0 +1,533 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = src/hunspell
|
||||
DIST_COMMON = README $(libhunspell_include_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" \
|
||||
"$(DESTDIR)$(libhunspell_includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libhunspell_la_LIBADD =
|
||||
am_libhunspell_la_OBJECTS = affentry.lo affixmgr.lo csutil.lo \
|
||||
dictmgr.lo hashmgr.lo hunspell.lo utf_info.lo suggestmgr.lo \
|
||||
phonet.lo
|
||||
libhunspell_la_OBJECTS = $(am_libhunspell_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libhunspell_la_SOURCES)
|
||||
DIST_SOURCES = $(libhunspell_la_SOURCES)
|
||||
libhunspell_includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(libhunspell_include_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURSESLIB = @CURSESLIB@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HUNSPELL_VERSION_MAJOR = @HUNSPELL_VERSION_MAJOR@
|
||||
HUNSPELL_VERSION_MINOR = @HUNSPELL_VERSION_MINOR@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
READLINELIB = @READLINELIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XFAILED = @XFAILED@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
libhunspell_la_LDFLAGS = -version-info 1:1:0
|
||||
lib_LTLIBRARIES = libhunspell.la
|
||||
libhunspell_includedir = $(includedir)/hunspell
|
||||
libhunspell_la_SOURCES = affentry.cxx affixmgr.cxx csutil.cxx \
|
||||
dictmgr.cxx hashmgr.cxx hunspell.cxx utf_info.cxx \
|
||||
suggestmgr.cxx license.myspell license.hunspell \
|
||||
phonet.cxx
|
||||
|
||||
libhunspell_include_HEADERS = affentry.hxx htypes.hxx affixmgr.hxx \
|
||||
csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx hunspell.h \
|
||||
suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx \
|
||||
phonet.hxx
|
||||
|
||||
EXTRA_DIST = hunspell.dsp makefile.mk README
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cxx .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/hunspell/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/hunspell/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libhunspell.la: $(libhunspell_la_OBJECTS) $(libhunspell_la_DEPENDENCIES)
|
||||
$(CXXLINK) -rpath $(libdir) $(libhunspell_la_LDFLAGS) $(libhunspell_la_OBJECTS) $(libhunspell_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affentry.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affixmgr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csutil.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dictmgr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashmgr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hunspell.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phonet.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suggestmgr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf_info.Plo@am__quote@
|
||||
|
||||
.cxx.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cxx.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cxx.lo:
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-libhunspell_includeHEADERS: $(libhunspell_include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libhunspell_includedir)" || $(mkdir_p) "$(DESTDIR)$(libhunspell_includedir)"
|
||||
@list='$(libhunspell_include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(libhunspell_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libhunspell_includedir)/$$f'"; \
|
||||
$(libhunspell_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libhunspell_includedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-libhunspell_includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(libhunspell_include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(libhunspell_includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(libhunspell_includedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libhunspell_includedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-libhunspell_includeHEADERS
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \
|
||||
uninstall-libhunspell_includeHEADERS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-libhunspell_includeHEADERS \
|
||||
install-man install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \
|
||||
uninstall-libhunspell_includeHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,21 @@
|
|||
Hunspell spell checker and morphological analyser library
|
||||
|
||||
Documentation, tests, examples: http://hunspell.sourceforge.net
|
||||
|
||||
Author of Hunspell:
|
||||
László Németh (nemethl (at) gyorsposta.hu)
|
||||
|
||||
Hunspell based on OpenOffice.org's Myspell. MySpell's author:
|
||||
Kevin Hendricks (kevin.hendricks (at) sympatico.ca)
|
||||
|
||||
License: GPL 2.0/LGPL 2.1/MPL 1.1 tri-license
|
||||
|
||||
The contents of this library may be used under the terms of
|
||||
the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
the GNU Lesser General Public License Version 2.1 or later (the "LGPL",
|
||||
see http://gnu.org/copyleft/lesser.html) or the Mozilla Public License
|
||||
Version 1.1 or later (the "MPL", see http://mozilla.org/MPL/MPL-1.1.html).
|
||||
|
||||
Software distributed under these licenses is distributed on an "AS IS" basis,
|
||||
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences
|
||||
for the specific language governing rights and limitations under the licenses.
|
|
@ -0,0 +1,941 @@
|
|||
#include "license.hunspell"
|
||||
#include "license.myspell"
|
||||
|
||||
#ifndef MOZILLA_CLIENT
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#include "affentry.hxx"
|
||||
#include "csutil.hxx"
|
||||
|
||||
#ifndef MOZILLA_CLIENT
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
PfxEntry::PfxEntry(AffixMgr* pmgr, affentry* dp)
|
||||
{
|
||||
// register affix manager
|
||||
pmyMgr = pmgr;
|
||||
|
||||
// set up its intial values
|
||||
|
||||
aflag = dp->aflag; // flag
|
||||
strip = dp->strip; // string to strip
|
||||
appnd = dp->appnd; // string to append
|
||||
stripl = dp->stripl; // length of strip string
|
||||
appndl = dp->appndl; // length of append string
|
||||
numconds = dp->numconds; // length of the condition
|
||||
opts = dp->opts; // cross product flag
|
||||
// then copy over all of the conditions
|
||||
if (opts & aeLONGCOND) {
|
||||
memcpy(c.conds, dp->c.l.conds1, MAXCONDLEN_1);
|
||||
c.l.conds2 = dp->c.l.conds2;
|
||||
} else memcpy(c.conds, dp->c.conds, MAXCONDLEN);
|
||||
next = NULL;
|
||||
nextne = NULL;
|
||||
nexteq = NULL;
|
||||
morphcode = dp->morphcode;
|
||||
contclass = dp->contclass;
|
||||
contclasslen = dp->contclasslen;
|
||||
}
|
||||
|
||||
|
||||
PfxEntry::~PfxEntry()
|
||||
{
|
||||
aflag = 0;
|
||||
if (appnd) free(appnd);
|
||||
if (strip) free(strip);
|
||||
pmyMgr = NULL;
|
||||
appnd = NULL;
|
||||
strip = NULL;
|
||||
if (opts & aeLONGCOND) free(c.l.conds2);
|
||||
if (morphcode && !(opts & aeALIASM)) free(morphcode);
|
||||
if (contclass && !(opts & aeALIASF)) free(contclass);
|
||||
}
|
||||
|
||||
// add prefix to this word assuming conditions hold
|
||||
char * PfxEntry::add(const char * word, int len)
|
||||
{
|
||||
char tword[MAXWORDUTF8LEN + 4];
|
||||
|
||||
if ((len > stripl) && (len >= numconds) && test_condition(word) &&
|
||||
(!stripl || (strncmp(word, strip, stripl) == 0)) &&
|
||||
((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) {
|
||||
/* we have a match so add prefix */
|
||||
char * pp = tword;
|
||||
if (appndl) {
|
||||
strcpy(tword,appnd);
|
||||
pp += appndl;
|
||||
}
|
||||
strcpy(pp, (word + stripl));
|
||||
return mystrdup(tword);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline char * PfxEntry::nextchar(char * p) {
|
||||
if (p) {
|
||||
p++;
|
||||
if (opts & aeLONGCOND) {
|
||||
// jump to the 2nd part of the condition
|
||||
if (p == c.conds + MAXCONDLEN_1) return c.l.conds2;
|
||||
// end of the MAXCONDLEN length condition
|
||||
} else if (p == c.conds + MAXCONDLEN) return NULL;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
inline int PfxEntry::test_condition(const char * st)
|
||||
{
|
||||
const char * pos = NULL; // group with pos input position
|
||||
bool neg = false; // complementer
|
||||
bool ingroup = false; // character in the group
|
||||
if (numconds == 0) return 1;
|
||||
char * p = c.conds;
|
||||
while (1) {
|
||||
switch (*p) {
|
||||
case '\0': return 1;
|
||||
case '[': { p = nextchar(p); pos = st; break; }
|
||||
case '^': { p = nextchar(p); neg = true; break; }
|
||||
case ']': { if ((neg && ingroup) || (!neg && !ingroup)) return 0;
|
||||
pos = NULL;
|
||||
neg = false;
|
||||
ingroup = false;
|
||||
p = nextchar(p);
|
||||
st++;
|
||||
if (*st == '\0' && p && *p != '\0') return 0; // word <= condition
|
||||
break;
|
||||
}
|
||||
case '.': if (!pos) { // dots are not metacharacters in groups: [.]
|
||||
p = nextchar(p);
|
||||
// skip the next character
|
||||
for (st++; (opts & aeUTF8) && (*st & 0xc0) == 0x80; st++);
|
||||
if (*st == '\0') return 0; // word <= condition
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (*st == *p) {
|
||||
st++;
|
||||
p = nextchar(p);
|
||||
if ((opts & aeUTF8) && (*(st - 1) & 0x80)) { // multibyte
|
||||
while (p && (*p & 0xc0) == 0x80) { // character
|
||||
if (*p != *st) {
|
||||
if (!pos) return 0;
|
||||
st = pos;
|
||||
break;
|
||||
}
|
||||
p = nextchar(p);
|
||||
st++;
|
||||
}
|
||||
if (st != pos) ingroup = true;
|
||||
} else if (pos) ingroup = true;
|
||||
} else if (pos) { // group
|
||||
p = nextchar(p);
|
||||
} else return 0;
|
||||
}
|
||||
}
|
||||
if (!p) return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// check if this prefix entry matches
|
||||
struct hentry * PfxEntry::checkword(const char * word, int len, char in_compound, const FLAG needflag)
|
||||
{
|
||||
int tmpl; // length of tmpword
|
||||
struct hentry * he; // hash entry of root word or NULL
|
||||
char tmpword[MAXWORDUTF8LEN + 4];
|
||||
|
||||
// on entry prefix is 0 length or already matches the beginning of the word.
|
||||
// So if the remaining root word has positive length
|
||||
// and if there are enough chars in root word and added back strip chars
|
||||
// to meet the number of characters conditions, then test it
|
||||
|
||||
tmpl = len - appndl;
|
||||
|
||||
// if ((tmpl > 0) && (tmpl + stripl >= numconds)) {
|
||||
if (tmpl > 0) {
|
||||
|
||||
// generate new root word by removing prefix and adding
|
||||
// back any characters that would have been stripped
|
||||
|
||||
if (stripl) strcpy (tmpword, strip);
|
||||
strcpy ((tmpword + stripl), (word + appndl));
|
||||
|
||||
// now make sure all of the conditions on characters
|
||||
// are met. Please see the appendix at the end of
|
||||
// this file for more info on exactly what is being
|
||||
// tested
|
||||
|
||||
// if all conditions are met then check if resulting
|
||||
// root word in the dictionary
|
||||
|
||||
if (test_condition(tmpword)) {
|
||||
tmpl += stripl;
|
||||
if ((he = pmyMgr->lookup(tmpword)) != NULL) {
|
||||
do {
|
||||
if (TESTAFF(he->astr, aflag, he->alen) &&
|
||||
// forbid single prefixes with needaffix flag
|
||||
! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) &&
|
||||
// needflag
|
||||
((!needflag) || TESTAFF(he->astr, needflag, he->alen) ||
|
||||
(contclass && TESTAFF(contclass, needflag, contclasslen))))
|
||||
return he;
|
||||
he = he->next_homonym; // check homonyms
|
||||
} while (he);
|
||||
}
|
||||
|
||||
// prefix matched but no root word was found
|
||||
// if aeXPRODUCT is allowed, try again but now
|
||||
// ross checked combined with a suffix
|
||||
|
||||
//if ((opts & aeXPRODUCT) && in_compound) {
|
||||
if ((opts & aeXPRODUCT)) {
|
||||
he = pmyMgr->suffix_check(tmpword, tmpl, aeXPRODUCT, (AffEntry *)this, NULL,
|
||||
0, NULL, FLAG_NULL, needflag, in_compound);
|
||||
if (he) return he;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// check if this prefix entry matches
|
||||
struct hentry * PfxEntry::check_twosfx(const char * word, int len,
|
||||
char in_compound, const FLAG needflag)
|
||||
{
|
||||
int tmpl; // length of tmpword
|
||||
struct hentry * he; // hash entry of root word or NULL
|
||||
char tmpword[MAXWORDUTF8LEN + 4];
|
||||
|
||||
// on entry prefix is 0 length or already matches the beginning of the word.
|
||||
// So if the remaining root word has positive length
|
||||
// and if there are enough chars in root word and added back strip chars
|
||||
// to meet the number of characters conditions, then test it
|
||||
|
||||
tmpl = len - appndl;
|
||||
|
||||
if ((tmpl > 0) && (tmpl + stripl >= numconds)) {
|
||||
// if (tmpl > 0) {
|
||||
|
||||
// generate new root word by removing prefix and adding
|
||||
// back any characters that would have been stripped
|
||||
|
||||
if (stripl) strcpy (tmpword, strip);
|
||||
strcpy ((tmpword + stripl), (word + appndl));
|
||||
|
||||
// now make sure all of the conditions on characters
|
||||
// are met. Please see the appendix at the end of
|
||||
// this file for more info on exactly what is being
|
||||
// tested
|
||||
|
||||
// if all conditions are met then check if resulting
|
||||
// root word in the dictionary
|
||||
|
||||
if (test_condition(tmpword)) {
|
||||
tmpl += stripl;
|
||||
|
||||
// prefix matched but no root word was found
|
||||
// if aeXPRODUCT is allowed, try again but now
|
||||
// cross checked combined with a suffix
|
||||
|
||||
if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
|
||||
he = pmyMgr->suffix_check_twosfx(tmpword, tmpl, aeXPRODUCT, (AffEntry *)this, needflag);
|
||||
if (he) return he;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// check if this prefix entry matches
|
||||
char * PfxEntry::check_twosfx_morph(const char * word, int len,
|
||||
char in_compound, const FLAG needflag)
|
||||
{
|
||||
int tmpl; // length of tmpword
|
||||
char tmpword[MAXWORDUTF8LEN + 4];
|
||||
|
||||
// on entry prefix is 0 length or already matches the beginning of the word.
|
||||
// So if the remaining root word has positive length
|
||||
// and if there are enough chars in root word and added back strip chars
|
||||
// to meet the number of characters conditions, then test it
|
||||
|
||||
tmpl = len - appndl;
|
||||
|
||||
if ((tmpl > 0) && (tmpl + stripl >= numconds)) {
|
||||
// if (tmpl > 0) {
|
||||
|
||||
// generate new root word by removing prefix and adding
|
||||
// back any characters that would have been stripped
|
||||
|
||||
if (stripl) strcpy (tmpword, strip);
|
||||
strcpy ((tmpword + stripl), (word + appndl));
|
||||
|
||||
// now make sure all of the conditions on characters
|
||||
// are met. Please see the appendix at the end of
|
||||
// this file for more info on exactly what is being
|
||||
// tested
|
||||
|
||||
// if all conditions are met then check if resulting
|
||||
// root word in the dictionary
|
||||
|
||||
if (test_condition(tmpword)) {
|
||||
tmpl += stripl;
|
||||
|
||||
// prefix matched but no root word was found
|
||||
// if aeXPRODUCT is allowed, try again but now
|
||||
// ross checked combined with a suffix
|
||||
|
||||
if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
|
||||
return pmyMgr->suffix_check_twosfx_morph(tmpword, tmpl,
|
||||
aeXPRODUCT, (AffEntry *)this, needflag);
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// check if this prefix entry matches
|
||||
char * PfxEntry::check_morph(const char * word, int len, char in_compound, const FLAG needflag)
|
||||
{
|
||||
int tmpl; // length of tmpword
|
||||
struct hentry * he; // hash entry of root word or NULL
|
||||
char tmpword[MAXWORDUTF8LEN + 4];
|
||||
char result[MAXLNLEN];
|
||||
char * st;
|
||||
|
||||
*result = '\0';
|
||||
|
||||
// on entry prefix is 0 length or already matches the beginning of the word.
|
||||
// So if the remaining root word has positive length
|
||||
// and if there are enough chars in root word and added back strip chars
|
||||
// to meet the number of characters conditions, then test it
|
||||
|
||||
tmpl = len - appndl;
|
||||
|
||||
if ((tmpl > 0) && (tmpl + stripl >= numconds)) {
|
||||
// if (tmpl > 0) {
|
||||
|
||||
// generate new root word by removing prefix and adding
|
||||
// back any characters that would have been stripped
|
||||
|
||||
if (stripl) strcpy (tmpword, strip);
|
||||
strcpy ((tmpword + stripl), (word + appndl));
|
||||
|
||||
// now make sure all of the conditions on characters
|
||||
// are met. Please see the appendix at the end of
|
||||
// this file for more info on exactly what is being
|
||||
// tested
|
||||
|
||||
// if all conditions are met then check if resulting
|
||||
// root word in the dictionary
|
||||
|
||||
if (test_condition(tmpword)) {
|
||||
tmpl += stripl;
|
||||
if ((he = pmyMgr->lookup(tmpword)) != NULL) {
|
||||
do {
|
||||
if (TESTAFF(he->astr, aflag, he->alen) &&
|
||||
// forbid single prefixes with needaffix flag
|
||||
! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) &&
|
||||
// needflag
|
||||
((!needflag) || TESTAFF(he->astr, needflag, he->alen) ||
|
||||
(contclass && TESTAFF(contclass, needflag, contclasslen)))) {
|
||||
if (morphcode) {
|
||||
strcat(result, " ");
|
||||
strcat(result, morphcode);
|
||||
} else strcat(result,getKey());
|
||||
if (!HENTRY_FIND(he, MORPH_STEM)) {
|
||||
strcat(result, " ");
|
||||
strcat(result, MORPH_STEM);
|
||||
strcat(result,HENTRY_WORD(he));
|
||||
}
|
||||
// store the pointer of the hash entry
|
||||
// sprintf(result + strlen(result), " %s%p", MORPH_HENTRY, he);
|
||||
if (HENTRY_DATA(he)) {
|
||||
strcat(result, " ");
|
||||
strcat(result,HENTRY_DATA(he));
|
||||
}
|
||||
strcat(result, "\n");
|
||||
}
|
||||
he = he->next_homonym;
|
||||
} while (he);
|
||||
}
|
||||
|
||||
// prefix matched but no root word was found
|
||||
// if aeXPRODUCT is allowed, try again but now
|
||||
// ross checked combined with a suffix
|
||||
|
||||
if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
|
||||
st = pmyMgr->suffix_check_morph(tmpword, tmpl, aeXPRODUCT, (AffEntry *)this,
|
||||
FLAG_NULL, needflag);
|
||||
if (st) {
|
||||
strcat(result, st);
|
||||
free(st);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*result) return mystrdup(result);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SfxEntry::SfxEntry(AffixMgr * pmgr, affentry* dp)
|
||||
{
|
||||
// register affix manager
|
||||
pmyMgr = pmgr;
|
||||
|
||||
// set up its intial values
|
||||
aflag = dp->aflag; // char flag
|
||||
strip = dp->strip; // string to strip
|
||||
appnd = dp->appnd; // string to append
|
||||
stripl = dp->stripl; // length of strip string
|
||||
appndl = dp->appndl; // length of append string
|
||||
numconds = dp->numconds; // length of the condition
|
||||
opts = dp->opts; // cross product flag
|
||||
|
||||
// then copy over all of the conditions
|
||||
if (opts & aeLONGCOND) {
|
||||
memcpy(c.l.conds1, dp->c.l.conds1, MAXCONDLEN_1);
|
||||
c.l.conds2 = dp->c.l.conds2;
|
||||
} else memcpy(c.conds, dp->c.conds, MAXCONDLEN);
|
||||
|
||||
rappnd = myrevstrdup(appnd);
|
||||
morphcode = dp->morphcode;
|
||||
contclass = dp->contclass;
|
||||
contclasslen = dp->contclasslen;
|
||||
}
|
||||
|
||||
|
||||
SfxEntry::~SfxEntry()
|
||||
{
|
||||
aflag = 0;
|
||||
if (appnd) free(appnd);
|
||||
if (rappnd) free(rappnd);
|
||||
if (strip) free(strip);
|
||||
pmyMgr = NULL;
|
||||
appnd = NULL;
|
||||
strip = NULL;
|
||||
if (opts & aeLONGCOND) free(c.l.conds2);
|
||||
if (morphcode && !(opts & aeALIASM)) free(morphcode);
|
||||
if (contclass && !(opts & aeALIASF)) free(contclass);
|
||||
}
|
||||
|
||||
// add suffix to this word assuming conditions hold
|
||||
char * SfxEntry::add(const char * word, int len)
|
||||
{
|
||||
char tword[MAXWORDUTF8LEN + 4];
|
||||
|
||||
/* make sure all conditions match */
|
||||
if ((len > stripl) && (len >= numconds) && test_condition(word + len, word) &&
|
||||
(!stripl || (strcmp(word + len - stripl, strip) == 0)) &&
|
||||
((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) {
|
||||
/* we have a match so add suffix */
|
||||
strcpy(tword,word);
|
||||
if (appndl) {
|
||||
strcpy(tword + len - stripl, appnd);
|
||||
} else {
|
||||
*(tword + len - stripl) = '\0';
|
||||
}
|
||||
return mystrdup(tword);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline char * SfxEntry::nextchar(char * p) {
|
||||
p++;
|
||||
if (opts & aeLONGCOND) {
|
||||
// jump to the 2nd part of the condition
|
||||
if (p == c.l.conds1 + MAXCONDLEN_1) return c.l.conds2;
|
||||
// end of the MAXCONDLEN length condition
|
||||
} else if (p == c.conds + MAXCONDLEN) return NULL;
|
||||
return p;
|
||||
}
|
||||
|
||||
inline int SfxEntry::test_condition(const char * st, const char * beg)
|
||||
{
|
||||
const char * pos = NULL; // group with pos input position
|
||||
bool neg = false; // complementer
|
||||
bool ingroup = false; // character in the group
|
||||
if (numconds == 0) return 1;
|
||||
char * p = c.conds;
|
||||
st--;
|
||||
int c = 1;
|
||||
while (1) {
|
||||
switch (*p) {
|
||||
case '\0': return 1;
|
||||
case '[': { p = nextchar(p); pos = st; break; }
|
||||
case '^': { p = nextchar(p); neg = true; break; }
|
||||
case ']': { if (!neg && !ingroup) return 0;
|
||||
c++;
|
||||
pos = NULL;
|
||||
neg = false;
|
||||
ingroup = false;
|
||||
p = nextchar(p);
|
||||
st--;
|
||||
if (st < beg && p && *p != '\0') return 0; // word <= condition
|
||||
break;
|
||||
}
|
||||
case '.': if (!pos) { // dots are not metacharacters in groups: [.]
|
||||
p = nextchar(p);
|
||||
// skip the next character
|
||||
for (st--; (opts & aeUTF8) && (st >= beg) && (*st & 0xc0) == 0x80; st--);
|
||||
if (st < beg) return 0; // word <= condition
|
||||
if (*st & 0x80) { // head of the UTF-8 character
|
||||
st--;
|
||||
if (st < beg) return 0; // word <= condition
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (*st == *p) {
|
||||
p = nextchar(p);
|
||||
if ((opts & aeUTF8) && (*st & 0x80)) {
|
||||
st--;
|
||||
while (p && (st >= beg)) {
|
||||
if (*p != *st) {
|
||||
if (!pos) return 0;
|
||||
st = pos;
|
||||
break;
|
||||
}
|
||||
// first byte of the UTF-8 multibyte character
|
||||
if ((*p & 0xc0) != 0x80) break;
|
||||
p = nextchar(p);
|
||||
st--;
|
||||
}
|
||||
if (pos && st != pos) {
|
||||
if (neg) return 0;
|
||||
else if (c == numconds) return 1;
|
||||
ingroup = true;
|
||||
}
|
||||
if (p && *p != '\0') p = nextchar(p);
|
||||
} else if (pos) {
|
||||
if (neg) return 0;
|
||||
else if (c == numconds) return 1;
|
||||
ingroup = true;
|
||||
}
|
||||
if (!pos) {
|
||||
c++;
|
||||
st--;
|
||||
if (st < beg && p && *p != '\0') return 0; // word <= condition
|
||||
}
|
||||
} else if (pos) { // group
|
||||
p = nextchar(p);
|
||||
} else return 0;
|
||||
}
|
||||
}
|
||||
if (!p) return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// see if this suffix is present in the word
|
||||
struct hentry * SfxEntry::checkword(const char * word, int len, int optflags,
|
||||
AffEntry* ppfx, char ** wlst, int maxSug, int * ns, const FLAG cclass, const FLAG needflag,
|
||||
const FLAG badflag)
|
||||
{
|
||||
int tmpl; // length of tmpword
|
||||
struct hentry * he; // hash entry pointer
|
||||
unsigned char * cp;
|
||||
char tmpword[MAXWORDUTF8LEN + 4];
|
||||
PfxEntry* ep = (PfxEntry *) ppfx;
|
||||
|
||||
// if this suffix is being cross checked with a prefix
|
||||
// but it does not support cross products skip it
|
||||
|
||||
if (((optflags & aeXPRODUCT) != 0) && ((opts & aeXPRODUCT) == 0))
|
||||
return NULL;
|
||||
|
||||
// upon entry suffix is 0 length or already matches the end of the word.
|
||||
// So if the remaining root word has positive length
|
||||
// and if there are enough chars in root word and added back strip chars
|
||||
// to meet the number of characters conditions, then test it
|
||||
|
||||
tmpl = len - appndl;
|
||||
// the second condition is not enough for UTF-8 strings
|
||||
// it checked in test_condition()
|
||||
|
||||
if ((tmpl > 0) && (tmpl + stripl >= numconds)) {
|
||||
// if (tmpl > 0) {
|
||||
|
||||
// generate new root word by removing suffix and adding
|
||||
// back any characters that would have been stripped or
|
||||
// or null terminating the shorter string
|
||||
|
||||
strcpy (tmpword, word);
|
||||
cp = (unsigned char *)(tmpword + tmpl);
|
||||
if (stripl) {
|
||||
strcpy ((char *)cp, strip);
|
||||
tmpl += stripl;
|
||||
cp = (unsigned char *)(tmpword + tmpl);
|
||||
} else *cp = '\0';
|
||||
|
||||
// now make sure all of the conditions on characters
|
||||
// are met. Please see the appendix at the end of
|
||||
// this file for more info on exactly what is being
|
||||
// tested
|
||||
|
||||
// if all conditions are met then check if resulting
|
||||
// root word in the dictionary
|
||||
|
||||
if (test_condition((char *) cp, (char *) tmpword)) {
|
||||
|
||||
#ifdef SZOSZABLYA_POSSIBLE_ROOTS
|
||||
fprintf(stdout,"%s %s %c\n", word, tmpword, aflag);
|
||||
#endif
|
||||
if ((he = pmyMgr->lookup(tmpword)) != NULL) {
|
||||
do {
|
||||
// check conditional suffix (enabled by prefix)
|
||||
if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() &&
|
||||
TESTAFF(ep->getCont(), aflag, ep->getContLen()))) &&
|
||||
(((optflags & aeXPRODUCT) == 0) ||
|
||||
TESTAFF(he->astr, ep->getFlag(), he->alen) ||
|
||||
// enabled by prefix
|
||||
((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen))
|
||||
) &&
|
||||
// handle cont. class
|
||||
((!cclass) ||
|
||||
((contclass) && TESTAFF(contclass, cclass, contclasslen))
|
||||
) &&
|
||||
// check only in compound homonyms (bad flags)
|
||||
(!badflag || !TESTAFF(he->astr, badflag, he->alen)
|
||||
) &&
|
||||
// handle required flag
|
||||
((!needflag) ||
|
||||
(TESTAFF(he->astr, needflag, he->alen) ||
|
||||
((contclass) && TESTAFF(contclass, needflag, contclasslen)))
|
||||
)
|
||||
) return he;
|
||||
he = he->next_homonym; // check homonyms
|
||||
} while (he);
|
||||
|
||||
// obsolote stemming code (used only by the
|
||||
// experimental SuffixMgr:suggest_pos_stems)
|
||||
// store resulting root in wlst
|
||||
} else if (wlst && (*ns < maxSug)) {
|
||||
int cwrd = 1;
|
||||
for (int k=0; k < *ns; k++)
|
||||
if (strcmp(tmpword, wlst[k]) == 0) cwrd = 0;
|
||||
if (cwrd) {
|
||||
wlst[*ns] = mystrdup(tmpword);
|
||||
if (wlst[*ns] == NULL) {
|
||||
for (int j=0; j<*ns; j++) free(wlst[j]);
|
||||
*ns = -1;
|
||||
return NULL;
|
||||
}
|
||||
(*ns)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// see if two-level suffix is present in the word
|
||||
struct hentry * SfxEntry::check_twosfx(const char * word, int len, int optflags,
|
||||
AffEntry* ppfx, const FLAG needflag)
|
||||
{
|
||||
int tmpl; // length of tmpword
|
||||
struct hentry * he; // hash entry pointer
|
||||
unsigned char * cp;
|
||||
char tmpword[MAXWORDUTF8LEN + 4];
|
||||
PfxEntry* ep = (PfxEntry *) ppfx;
|
||||
|
||||
|
||||
// if this suffix is being cross checked with a prefix
|
||||
// but it does not support cross products skip it
|
||||
|
||||
if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0)
|
||||
return NULL;
|
||||
|
||||
// upon entry suffix is 0 length or already matches the end of the word.
|
||||
// So if the remaining root word has positive length
|
||||
// and if there are enough chars in root word and added back strip chars
|
||||
// to meet the number of characters conditions, then test it
|
||||
|
||||
tmpl = len - appndl;
|
||||
|
||||
if ((tmpl > 0) && (tmpl + stripl >= numconds)) {
|
||||
// if (tmpl > 0) {
|
||||
|
||||
// generate new root word by removing suffix and adding
|
||||
// back any characters that would have been stripped or
|
||||
// or null terminating the shorter string
|
||||
|
||||
strcpy (tmpword, word);
|
||||
cp = (unsigned char *)(tmpword + tmpl);
|
||||
if (stripl) {
|
||||
strcpy ((char *)cp, strip);
|
||||
tmpl += stripl;
|
||||
cp = (unsigned char *)(tmpword + tmpl);
|
||||
} else *cp = '\0';
|
||||
|
||||
// now make sure all of the conditions on characters
|
||||
// are met. Please see the appendix at the end of
|
||||
// this file for more info on exactly what is being
|
||||
// tested
|
||||
|
||||
// if all conditions are met then recall suffix_check
|
||||
|
||||
if (test_condition((char *) cp, (char *) tmpword)) {
|
||||
if (ppfx) {
|
||||
// handle conditional suffix
|
||||
if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen))
|
||||
he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag);
|
||||
else
|
||||
he = pmyMgr->suffix_check(tmpword, tmpl, optflags, ppfx, NULL, 0, NULL, (FLAG) aflag, needflag);
|
||||
} else {
|
||||
he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag);
|
||||
}
|
||||
if (he) return he;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// see if two-level suffix is present in the word
|
||||
char * SfxEntry::check_twosfx_morph(const char * word, int len, int optflags,
|
||||
AffEntry* ppfx, const FLAG needflag)
|
||||
{
|
||||
int tmpl; // length of tmpword
|
||||
unsigned char * cp;
|
||||
char tmpword[MAXWORDUTF8LEN + 4];
|
||||
PfxEntry* ep = (PfxEntry *) ppfx;
|
||||
char * st;
|
||||
|
||||
char result[MAXLNLEN];
|
||||
|
||||
*result = '\0';
|
||||
|
||||
// if this suffix is being cross checked with a prefix
|
||||
// but it does not support cross products skip it
|
||||
|
||||
if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0)
|
||||
return NULL;
|
||||
|
||||
// upon entry suffix is 0 length or already matches the end of the word.
|
||||
// So if the remaining root word has positive length
|
||||
// and if there are enough chars in root word and added back strip chars
|
||||
// to meet the number of characters conditions, then test it
|
||||
|
||||
tmpl = len - appndl;
|
||||
|
||||
if ((tmpl > 0) && (tmpl + stripl >= numconds)) {
|
||||
// if (tmpl > 0) {
|
||||
|
||||
// generate new root word by removing suffix and adding
|
||||
// back any characters that would have been stripped or
|
||||
// or null terminating the shorter string
|
||||
|
||||
strcpy (tmpword, word);
|
||||
cp = (unsigned char *)(tmpword + tmpl);
|
||||
if (stripl) {
|
||||
strcpy ((char *)cp, strip);
|
||||
tmpl += stripl;
|
||||
cp = (unsigned char *)(tmpword + tmpl);
|
||||
} else *cp = '\0';
|
||||
|
||||
// now make sure all of the conditions on characters
|
||||
// are met. Please see the appendix at the end of
|
||||
// this file for more info on exactly what is being
|
||||
// tested
|
||||
|
||||
// if all conditions are met then recall suffix_check
|
||||
|
||||
if (test_condition((char *) cp, (char *) tmpword)) {
|
||||
if (ppfx) {
|
||||
// handle conditional suffix
|
||||
if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen)) {
|
||||
st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag);
|
||||
if (st) {
|
||||
if (((PfxEntry *) ppfx)->getMorph()) {
|
||||
strcat(result, ((PfxEntry *) ppfx)->getMorph());
|
||||
strcat(result, " ");
|
||||
}
|
||||
strcat(result,st);
|
||||
free(st);
|
||||
mychomp(result);
|
||||
}
|
||||
} else {
|
||||
st = pmyMgr->suffix_check_morph(tmpword, tmpl, optflags, ppfx, aflag, needflag);
|
||||
if (st) {
|
||||
strcat(result, st);
|
||||
free(st);
|
||||
mychomp(result);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag);
|
||||
if (st) {
|
||||
strcat(result, st);
|
||||
free(st);
|
||||
mychomp(result);
|
||||
}
|
||||
}
|
||||
if (*result) return mystrdup(result);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// get next homonym with same affix
|
||||
struct hentry * SfxEntry::get_next_homonym(struct hentry * he, int optflags, AffEntry* ppfx,
|
||||
const FLAG cclass, const FLAG needflag)
|
||||
{
|
||||
PfxEntry* ep = (PfxEntry *) ppfx;
|
||||
FLAG eFlag = ep ? ep->getFlag() : FLAG_NULL;
|
||||
|
||||
while (he->next_homonym) {
|
||||
he = he->next_homonym;
|
||||
if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() && TESTAFF(ep->getCont(), aflag, ep->getContLen()))) &&
|
||||
((optflags & aeXPRODUCT) == 0 ||
|
||||
TESTAFF(he->astr, eFlag, he->alen) ||
|
||||
// handle conditional suffix
|
||||
((contclass) && TESTAFF(contclass, eFlag, contclasslen))
|
||||
) &&
|
||||
// handle cont. class
|
||||
((!cclass) ||
|
||||
((contclass) && TESTAFF(contclass, cclass, contclasslen))
|
||||
) &&
|
||||
// handle required flag
|
||||
((!needflag) ||
|
||||
(TESTAFF(he->astr, needflag, he->alen) ||
|
||||
((contclass) && TESTAFF(contclass, needflag, contclasslen)))
|
||||
)
|
||||
) return he;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
Appendix: Understanding Affix Code
|
||||
|
||||
|
||||
An affix is either a prefix or a suffix attached to root words to make
|
||||
other words.
|
||||
|
||||
Basically a Prefix or a Suffix is set of AffEntry objects
|
||||
which store information about the prefix or suffix along
|
||||
with supporting routines to check if a word has a particular
|
||||
prefix or suffix or a combination.
|
||||
|
||||
The structure affentry is defined as follows:
|
||||
|
||||
struct affentry
|
||||
{
|
||||
unsigned short aflag; // ID used to represent the affix
|
||||
char * strip; // string to strip before adding affix
|
||||
char * appnd; // the affix string to add
|
||||
unsigned char stripl; // length of the strip string
|
||||
unsigned char appndl; // length of the affix string
|
||||
char numconds; // the number of conditions that must be met
|
||||
char opts; // flag: aeXPRODUCT- combine both prefix and suffix
|
||||
char conds[SETSIZE]; // array which encodes the conditions to be met
|
||||
};
|
||||
|
||||
|
||||
Here is a suffix borrowed from the en_US.aff file. This file
|
||||
is whitespace delimited.
|
||||
|
||||
SFX D Y 4
|
||||
SFX D 0 e d
|
||||
SFX D y ied [^aeiou]y
|
||||
SFX D 0 ed [^ey]
|
||||
SFX D 0 ed [aeiou]y
|
||||
|
||||
This information can be interpreted as follows:
|
||||
|
||||
In the first line has 4 fields
|
||||
|
||||
Field
|
||||
-----
|
||||
1 SFX - indicates this is a suffix
|
||||
2 D - is the name of the character flag which represents this suffix
|
||||
3 Y - indicates it can be combined with prefixes (cross product)
|
||||
4 4 - indicates that sequence of 4 affentry structures are needed to
|
||||
properly store the affix information
|
||||
|
||||
The remaining lines describe the unique information for the 4 SfxEntry
|
||||
objects that make up this affix. Each line can be interpreted
|
||||
as follows: (note fields 1 and 2 are as a check against line 1 info)
|
||||
|
||||
Field
|
||||
-----
|
||||
1 SFX - indicates this is a suffix
|
||||
2 D - is the name of the character flag for this affix
|
||||
3 y - the string of chars to strip off before adding affix
|
||||
(a 0 here indicates the NULL string)
|
||||
4 ied - the string of affix characters to add
|
||||
5 [^aeiou]y - the conditions which must be met before the affix
|
||||
can be applied
|
||||
|
||||
Field 5 is interesting. Since this is a suffix, field 5 tells us that
|
||||
there are 2 conditions that must be met. The first condition is that
|
||||
the next to the last character in the word must *NOT* be any of the
|
||||
following "a", "e", "i", "o" or "u". The second condition is that
|
||||
the last character of the word must end in "y".
|
||||
|
||||
So how can we encode this information concisely and be able to
|
||||
test for both conditions in a fast manner? The answer is found
|
||||
but studying the wonderful ispell code of Geoff Kuenning, et.al.
|
||||
(now available under a normal BSD license).
|
||||
|
||||
If we set up a conds array of 256 bytes indexed (0 to 255) and access it
|
||||
using a character (cast to an unsigned char) of a string, we have 8 bits
|
||||
of information we can store about that character. Specifically we
|
||||
could use each bit to say if that character is allowed in any of the
|
||||
last (or first for prefixes) 8 characters of the word.
|
||||
|
||||
Basically, each character at one end of the word (up to the number
|
||||
of conditions) is used to index into the conds array and the resulting
|
||||
value found there says whether the that character is valid for a
|
||||
specific character position in the word.
|
||||
|
||||
For prefixes, it does this by setting bit 0 if that char is valid
|
||||
in the first position, bit 1 if valid in the second position, and so on.
|
||||
|
||||
If a bit is not set, then that char is not valid for that postion in the
|
||||
word.
|
||||
|
||||
If working with suffixes bit 0 is used for the character closest
|
||||
to the front, bit 1 for the next character towards the end, ...,
|
||||
with bit numconds-1 representing the last char at the end of the string.
|
||||
|
||||
Note: since entries in the conds[] are 8 bits, only 8 conditions
|
||||
(read that only 8 character positions) can be examined at one
|
||||
end of a word (the beginning for prefixes and the end for suffixes.
|
||||
|
||||
So to make this clearer, lets encode the conds array values for the
|
||||
first two affentries for the suffix D described earlier.
|
||||
|
||||
|
||||
For the first affentry:
|
||||
numconds = 1 (only examine the last character)
|
||||
|
||||
conds['e'] = (1 << 0) (the word must end in an E)
|
||||
all others are all 0
|
||||
|
||||
For the second affentry:
|
||||
numconds = 2 (only examine the last two characters)
|
||||
|
||||
conds[X] = conds[X] | (1 << 0) (aeiou are not allowed)
|
||||
where X is all characters *but* a, e, i, o, or u
|
||||
|
||||
|
||||
conds['y'] = (1 << 1) (the last char must be a y)
|
||||
all other bits for all other entries in the conds array are zero
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
#ifndef _AFFIX_HXX_
|
||||
#define _AFFIX_HXX_
|
||||
|
||||
#include "atypes.hxx"
|
||||
#include "baseaffix.hxx"
|
||||
#include "affixmgr.hxx"
|
||||
|
||||
/* A Prefix Entry */
|
||||
|
||||
class PfxEntry : public AffEntry
|
||||
{
|
||||
AffixMgr* pmyMgr;
|
||||
|
||||
PfxEntry * next;
|
||||
PfxEntry * nexteq;
|
||||
PfxEntry * nextne;
|
||||
PfxEntry * flgnxt;
|
||||
|
||||
public:
|
||||
|
||||
PfxEntry(AffixMgr* pmgr, affentry* dp );
|
||||
~PfxEntry();
|
||||
|
||||
inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); }
|
||||
struct hentry * checkword(const char * word, int len, char in_compound,
|
||||
const FLAG needflag = FLAG_NULL);
|
||||
|
||||
struct hentry * check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
|
||||
|
||||
char * check_morph(const char * word, int len, char in_compound,
|
||||
const FLAG needflag = FLAG_NULL);
|
||||
|
||||
char * check_twosfx_morph(const char * word, int len,
|
||||
char in_compound, const FLAG needflag = FLAG_NULL);
|
||||
|
||||
inline FLAG getFlag() { return aflag; }
|
||||
inline const char * getKey() { return appnd; }
|
||||
char * add(const char * word, int len);
|
||||
|
||||
inline short getKeyLen() { return appndl; }
|
||||
|
||||
inline const char * getMorph() { return morphcode; }
|
||||
|
||||
inline const unsigned short * getCont() { return contclass; }
|
||||
inline short getContLen() { return contclasslen; }
|
||||
|
||||
inline PfxEntry * getNext() { return next; }
|
||||
inline PfxEntry * getNextNE() { return nextne; }
|
||||
inline PfxEntry * getNextEQ() { return nexteq; }
|
||||
inline PfxEntry * getFlgNxt() { return flgnxt; }
|
||||
|
||||
inline void setNext(PfxEntry * ptr) { next = ptr; }
|
||||
inline void setNextNE(PfxEntry * ptr) { nextne = ptr; }
|
||||
inline void setNextEQ(PfxEntry * ptr) { nexteq = ptr; }
|
||||
inline void setFlgNxt(PfxEntry * ptr) { flgnxt = ptr; }
|
||||
|
||||
inline char * nextchar(char * p);
|
||||
inline int test_condition(const char * st);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/* A Suffix Entry */
|
||||
|
||||
class SfxEntry : public AffEntry
|
||||
{
|
||||
AffixMgr* pmyMgr;
|
||||
char * rappnd;
|
||||
|
||||
SfxEntry * next;
|
||||
SfxEntry * nexteq;
|
||||
SfxEntry * nextne;
|
||||
SfxEntry * flgnxt;
|
||||
|
||||
SfxEntry * l_morph;
|
||||
SfxEntry * r_morph;
|
||||
SfxEntry * eq_morph;
|
||||
|
||||
public:
|
||||
|
||||
SfxEntry(AffixMgr* pmgr, affentry* dp );
|
||||
~SfxEntry();
|
||||
|
||||
inline bool allowCross() { return ((opts & aeXPRODUCT) != 0); }
|
||||
struct hentry * checkword(const char * word, int len, int optflags,
|
||||
AffEntry* ppfx, char ** wlst, int maxSug, int * ns,
|
||||
// const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT);
|
||||
const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0);
|
||||
|
||||
struct hentry * check_twosfx(const char * word, int len, int optflags, AffEntry* ppfx, const FLAG needflag = NULL);
|
||||
|
||||
char * check_twosfx_morph(const char * word, int len, int optflags,
|
||||
AffEntry* ppfx, const FLAG needflag = FLAG_NULL);
|
||||
struct hentry * get_next_homonym(struct hentry * he);
|
||||
struct hentry * get_next_homonym(struct hentry * word, int optflags, AffEntry* ppfx,
|
||||
const FLAG cclass, const FLAG needflag);
|
||||
|
||||
|
||||
inline FLAG getFlag() { return aflag; }
|
||||
inline const char * getKey() { return rappnd; }
|
||||
char * add(const char * word, int len);
|
||||
|
||||
|
||||
inline const char * getMorph() { return morphcode; }
|
||||
|
||||
inline const unsigned short * getCont() { return contclass; }
|
||||
inline short getContLen() { return contclasslen; }
|
||||
inline const char * getAffix() { return appnd; }
|
||||
|
||||
inline short getKeyLen() { return appndl; }
|
||||
|
||||
inline SfxEntry * getNext() { return next; }
|
||||
inline SfxEntry * getNextNE() { return nextne; }
|
||||
inline SfxEntry * getNextEQ() { return nexteq; }
|
||||
|
||||
inline SfxEntry * getLM() { return l_morph; }
|
||||
inline SfxEntry * getRM() { return r_morph; }
|
||||
inline SfxEntry * getEQM() { return eq_morph; }
|
||||
inline SfxEntry * getFlgNxt() { return flgnxt; }
|
||||
|
||||
inline void setNext(SfxEntry * ptr) { next = ptr; }
|
||||
inline void setNextNE(SfxEntry * ptr) { nextne = ptr; }
|
||||
inline void setNextEQ(SfxEntry * ptr) { nexteq = ptr; }
|
||||
inline void setFlgNxt(SfxEntry * ptr) { flgnxt = ptr; }
|
||||
|
||||
inline char * nextchar(char * p);
|
||||
inline int test_condition(const char * st, const char * begin);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,224 @@
|
|||
#ifndef _AFFIXMGR_HXX_
|
||||
#define _AFFIXMGR_HXX_
|
||||
|
||||
#ifdef MOZILLA_CLIENT
|
||||
#ifdef __SUNPRO_CC // for SunONE Studio compiler
|
||||
using namespace std;
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#else
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
#include "atypes.hxx"
|
||||
#include "baseaffix.hxx"
|
||||
#include "hashmgr.hxx"
|
||||
#include "phonet.hxx"
|
||||
|
||||
// check flag duplication
|
||||
#define dupSFX (1 << 0)
|
||||
#define dupPFX (1 << 1)
|
||||
|
||||
class AffixMgr
|
||||
{
|
||||
|
||||
AffEntry * pStart[SETSIZE];
|
||||
AffEntry * sStart[SETSIZE];
|
||||
AffEntry * pFlag[CONTSIZE];
|
||||
AffEntry * sFlag[CONTSIZE];
|
||||
HashMgr * pHMgr;
|
||||
char * keystring;
|
||||
char * trystring;
|
||||
char * encoding;
|
||||
struct cs_info * csconv;
|
||||
int utf8;
|
||||
int complexprefixes;
|
||||
FLAG compoundflag;
|
||||
FLAG compoundbegin;
|
||||
FLAG compoundmiddle;
|
||||
FLAG compoundend;
|
||||
FLAG compoundroot;
|
||||
FLAG compoundforbidflag;
|
||||
FLAG compoundpermitflag;
|
||||
int checkcompounddup;
|
||||
int checkcompoundrep;
|
||||
int checkcompoundcase;
|
||||
int checkcompoundtriple;
|
||||
FLAG forbiddenword;
|
||||
FLAG nosuggest;
|
||||
FLAG needaffix;
|
||||
int cpdmin;
|
||||
int numrep;
|
||||
replentry * reptable;
|
||||
int nummap;
|
||||
mapentry * maptable;
|
||||
int numbreak;
|
||||
char ** breaktable;
|
||||
int numcheckcpd;
|
||||
replentry * checkcpdtable;
|
||||
int numdefcpd;
|
||||
flagentry * defcpdtable;
|
||||
phonetable * phone;
|
||||
int maxngramsugs;
|
||||
int nosplitsugs;
|
||||
int sugswithdots;
|
||||
int cpdwordmax;
|
||||
int cpdmaxsyllable;
|
||||
char * cpdvowels;
|
||||
w_char * cpdvowels_utf16;
|
||||
int cpdvowels_utf16_len;
|
||||
char * cpdsyllablenum;
|
||||
const char * pfxappnd; // BUG: not stateless
|
||||
const char * sfxappnd; // BUG: not stateless
|
||||
FLAG sfxflag; // BUG: not stateless
|
||||
char * derived; // BUG: not stateless
|
||||
AffEntry * sfx; // BUG: not stateless
|
||||
AffEntry * pfx; // BUG: not stateless
|
||||
int checknum;
|
||||
char * wordchars;
|
||||
unsigned short * wordchars_utf16;
|
||||
int wordchars_utf16_len;
|
||||
char * ignorechars;
|
||||
unsigned short * ignorechars_utf16;
|
||||
int ignorechars_utf16_len;
|
||||
char * version;
|
||||
char * lang;
|
||||
int langnum;
|
||||
FLAG lemma_present;
|
||||
FLAG circumfix;
|
||||
FLAG onlyincompound;
|
||||
FLAG keepcase;
|
||||
FLAG substandard;
|
||||
int checksharps;
|
||||
|
||||
int havecontclass; // boolean variable
|
||||
char contclasses[CONTSIZE]; // flags of possible continuing classes (twofold affix)
|
||||
flag flag_mode;
|
||||
|
||||
public:
|
||||
|
||||
AffixMgr(const char * affpath, HashMgr * ptr);
|
||||
~AffixMgr();
|
||||
struct hentry * affix_check(const char * word, int len,
|
||||
const unsigned short needflag = (unsigned short) 0,
|
||||
char in_compound = IN_CPD_NOT);
|
||||
struct hentry * prefix_check(const char * word, int len,
|
||||
char in_compound, const FLAG needflag = FLAG_NULL);
|
||||
inline int isSubset(const char * s1, const char * s2);
|
||||
struct hentry * prefix_check_twosfx(const char * word, int len,
|
||||
char in_compound, const FLAG needflag = FLAG_NULL);
|
||||
inline int isRevSubset(const char * s1, const char * end_of_s2, int len);
|
||||
struct hentry * suffix_check(const char * word, int len, int sfxopts,
|
||||
AffEntry* ppfx, char ** wlst, int maxSug, int * ns,
|
||||
const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL,
|
||||
char in_compound = IN_CPD_NOT);
|
||||
struct hentry * suffix_check_twosfx(const char * word, int len,
|
||||
int sfxopts, AffEntry* ppfx, const FLAG needflag = FLAG_NULL);
|
||||
|
||||
char * affix_check_morph(const char * word, int len,
|
||||
const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT);
|
||||
char * prefix_check_morph(const char * word, int len,
|
||||
char in_compound, const FLAG needflag = FLAG_NULL);
|
||||
char * suffix_check_morph (const char * word, int len, int sfxopts,
|
||||
AffEntry * ppfx, const FLAG cclass = FLAG_NULL,
|
||||
const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT);
|
||||
|
||||
char * prefix_check_twosfx_morph(const char * word, int len,
|
||||
char in_compound, const FLAG needflag = FLAG_NULL);
|
||||
char * suffix_check_twosfx_morph(const char * word, int len,
|
||||
int sfxopts, AffEntry * ppfx, const FLAG needflag = FLAG_NULL);
|
||||
|
||||
char * morphgen(char * ts, int wl, const unsigned short * ap,
|
||||
unsigned short al, char * morph, char * targetmorph, int level);
|
||||
|
||||
int expand_rootword(struct guessword * wlst, int maxn, const char * ts,
|
||||
int wl, const unsigned short * ap, unsigned short al, char * bad,
|
||||
int, char *);
|
||||
|
||||
short get_syllable (const char * word, int wlen);
|
||||
int cpdrep_check(const char * word, int len);
|
||||
int cpdpat_check(const char * word, int len);
|
||||
int defcpd_check(hentry *** words, short wnum, hentry * rv,
|
||||
hentry ** rwords, char all);
|
||||
int cpdcase_check(const char * word, int len);
|
||||
inline int candidate_check(const char * word, int len);
|
||||
struct hentry * compound_check(const char * word, int len, short wordnum,
|
||||
short numsyllable, short maxwordnum, short wnum, hentry ** words,
|
||||
char hu_mov_rule, int * cmpdstemnum, int * cmpdstem, char is_sug);
|
||||
|
||||
int compound_check_morph(const char * word, int len, short wordnum,
|
||||
short numsyllable, short maxwordnum, short wnum, hentry ** words,
|
||||
char hu_mov_rule, char ** result, char * partresult);
|
||||
|
||||
struct hentry * lookup(const char * word);
|
||||
int get_numrep();
|
||||
struct replentry * get_reptable();
|
||||
struct phonetable * get_phonetable();
|
||||
int get_nummap();
|
||||
struct mapentry * get_maptable();
|
||||
int get_numbreak();
|
||||
char ** get_breaktable();
|
||||
char * get_encoding();
|
||||
int get_langnum();
|
||||
char * get_key_string();
|
||||
char * get_try_string();
|
||||
const char * get_wordchars();
|
||||
unsigned short * get_wordchars_utf16(int * len);
|
||||
char * get_ignore();
|
||||
unsigned short * get_ignore_utf16(int * len);
|
||||
int get_compound();
|
||||
FLAG get_compoundflag();
|
||||
FLAG get_compoundbegin();
|
||||
FLAG get_forbiddenword();
|
||||
FLAG get_nosuggest();
|
||||
// FLAG get_circumfix();
|
||||
FLAG get_needaffix();
|
||||
FLAG get_onlyincompound();
|
||||
FLAG get_compoundroot();
|
||||
FLAG get_lemma_present();
|
||||
int get_checknum();
|
||||
char * get_possible_root();
|
||||
const char * get_prefix();
|
||||
const char * get_suffix();
|
||||
const char * get_derived();
|
||||
const char * get_version();
|
||||
const int have_contclass();
|
||||
int get_utf8();
|
||||
int get_complexprefixes();
|
||||
char * get_suffixed(char );
|
||||
int get_maxngramsugs();
|
||||
int get_nosplitsugs();
|
||||
int get_sugswithdots(void);
|
||||
FLAG get_keepcase(void);
|
||||
int get_checksharps(void);
|
||||
|
||||
private:
|
||||
int parse_file(const char * affpath);
|
||||
int parse_flag(char * line, unsigned short * out, const char * name);
|
||||
int parse_num(char * line, int * out, const char * name);
|
||||
int parse_cpdsyllable(char * line);
|
||||
int parse_reptable(char * line, FILE * af);
|
||||
int parse_phonetable(char * line, FILE * af);
|
||||
int parse_maptable(char * line, FILE * af);
|
||||
int parse_breaktable(char * line, FILE * af);
|
||||
int parse_checkcpdtable(char * line, FILE * af);
|
||||
int parse_defcpdtable(char * line, FILE * af);
|
||||
int parse_affix(char * line, const char at, FILE * af, char * dupflags);
|
||||
|
||||
void reverse_condition(char *);
|
||||
int condlen(char *);
|
||||
int encodeit(struct affentry * ptr, char * cs);
|
||||
int build_pfxtree(AffEntry* pfxptr);
|
||||
int build_sfxtree(AffEntry* sfxptr);
|
||||
int process_pfx_order();
|
||||
int process_sfx_order();
|
||||
AffEntry * process_pfx_in_order(AffEntry * ptr, AffEntry * nptr);
|
||||
AffEntry * process_sfx_in_order(AffEntry * ptr, AffEntry * nptr);
|
||||
int process_pfx_tree_to_list();
|
||||
int process_sfx_tree_to_list();
|
||||
int redundant_condition(char, char * strip, int stripl,
|
||||
const char * cond, char *);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
#ifndef _ATYPES_HXX_
|
||||
#define _ATYPES_HXX_
|
||||
|
||||
#ifndef HUNSPELL_WARNING
|
||||
#ifdef HUNSPELL_WARNING_ON
|
||||
#define HUNSPELL_WARNING fprintf
|
||||
#else
|
||||
// empty inline function to switch off warnings (instead of the C99 standard variadic macros)
|
||||
static inline void HUNSPELL_WARNING(FILE *, const char *, ...) {}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// HUNSTEM def.
|
||||
#define HUNSTEM
|
||||
|
||||
#include "csutil.hxx"
|
||||
#include "hashmgr.hxx"
|
||||
|
||||
#define SETSIZE 256
|
||||
#define CONTSIZE 65536
|
||||
#define MAXWORDLEN 100
|
||||
#define MAXWORDUTF8LEN 256
|
||||
|
||||
// affentry options
|
||||
#define aeXPRODUCT (1 << 0)
|
||||
#define aeUTF8 (1 << 1)
|
||||
#define aeALIASF (1 << 2)
|
||||
#define aeALIASM (1 << 3)
|
||||
#define aeLONGCOND (1 << 4)
|
||||
|
||||
// compound options
|
||||
#define IN_CPD_NOT 0
|
||||
#define IN_CPD_BEGIN 1
|
||||
#define IN_CPD_END 2
|
||||
#define IN_CPD_OTHER 3
|
||||
|
||||
#define MAXLNLEN 8192
|
||||
|
||||
#define MINCPDLEN 3
|
||||
#define MAXCOMPOUND 10
|
||||
#define MAXCONDLEN 20
|
||||
#define MAXCONDLEN_1 (MAXCONDLEN - sizeof(char *))
|
||||
|
||||
#define MAXACC 1000
|
||||
|
||||
#define FLAG unsigned short
|
||||
#define FLAG_NULL 0x00
|
||||
#define FREE_FLAG(a) a = 0
|
||||
|
||||
#define TESTAFF( a, b , c ) flag_bsearch((unsigned short *) a, (unsigned short) b, c)
|
||||
|
||||
struct affentry
|
||||
{
|
||||
char * strip;
|
||||
char * appnd;
|
||||
unsigned char stripl;
|
||||
unsigned char appndl;
|
||||
char numconds;
|
||||
char opts;
|
||||
unsigned short aflag;
|
||||
unsigned short * contclass;
|
||||
short contclasslen;
|
||||
union {
|
||||
char conds[MAXCONDLEN];
|
||||
struct {
|
||||
char conds1[MAXCONDLEN_1];
|
||||
char * conds2;
|
||||
} l;
|
||||
} c;
|
||||
char * morphcode;
|
||||
};
|
||||
|
||||
struct mapentry {
|
||||
char * set;
|
||||
w_char * set_utf16;
|
||||
int len;
|
||||
};
|
||||
|
||||
struct flagentry {
|
||||
FLAG * def;
|
||||
int len;
|
||||
};
|
||||
|
||||
struct guessword {
|
||||
char * word;
|
||||
bool allow;
|
||||
char * orig;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef _BASEAFF_HXX_
|
||||
#define _BASEAFF_HXX_
|
||||
|
||||
class AffEntry
|
||||
{
|
||||
public:
|
||||
|
||||
protected:
|
||||
char * appnd;
|
||||
char * strip;
|
||||
unsigned char appndl;
|
||||
unsigned char stripl;
|
||||
char numconds;
|
||||
char opts;
|
||||
unsigned short aflag;
|
||||
union {
|
||||
char conds[MAXCONDLEN];
|
||||
struct {
|
||||
char conds1[MAXCONDLEN_1];
|
||||
char * conds2;
|
||||
} l;
|
||||
} c;
|
||||
char * morphcode;
|
||||
unsigned short * contclass;
|
||||
short contclasslen;
|
||||
};
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,203 @@
|
|||
#ifndef __CSUTILHXX__
|
||||
#define __CSUTILHXX__
|
||||
|
||||
// First some base level utility routines
|
||||
|
||||
#define NOCAP 0
|
||||
#define INITCAP 1
|
||||
#define ALLCAP 2
|
||||
#define HUHCAP 3
|
||||
#define HUHINITCAP 4
|
||||
|
||||
#define MORPH_STEM "st:"
|
||||
#define MORPH_ALLOMORPH "al:"
|
||||
#define MORPH_POS "po:"
|
||||
#define MORPH_DERI_PFX "dp:"
|
||||
#define MORPH_INFL_PFX "ip:"
|
||||
#define MORPH_TERM_PFX "tp:"
|
||||
#define MORPH_DERI_SFX "ds:"
|
||||
#define MORPH_INFL_SFX "is:"
|
||||
#define MORPH_TERM_SFX "ts:"
|
||||
#define MORPH_SURF_PFX "sp:"
|
||||
#define MORPH_FREQ "fr:"
|
||||
#define MORPH_PHON "ph:"
|
||||
#define MORPH_HYPH "hy:"
|
||||
#define MORPH_PART "pa:"
|
||||
#define MORPH_HENTRY "_H:"
|
||||
#define MORPH_TAG_LEN strlen(MORPH_STEM)
|
||||
|
||||
#define MSEP_FLD ' '
|
||||
#define MSEP_REC '\n'
|
||||
#define MSEP_ALT '\v'
|
||||
|
||||
|
||||
// default flags
|
||||
#define DEFAULTFLAGS 65510
|
||||
#define FORBIDDENWORD 65510
|
||||
#define ONLYUPCASEFLAG 65511
|
||||
|
||||
typedef struct {
|
||||
unsigned char l;
|
||||
unsigned char h;
|
||||
} w_char;
|
||||
|
||||
#define w_char_eq(a,b) (((a).l == (b).l) && ((a).h == (b).h))
|
||||
|
||||
// convert UTF-16 characters to UTF-8
|
||||
char * u16_u8(char * dest, int size, const w_char * src, int srclen);
|
||||
|
||||
// convert UTF-8 characters to UTF-16
|
||||
int u8_u16(w_char * dest, int size, const char * src);
|
||||
|
||||
// sort 2-byte vector
|
||||
void flag_qsort(unsigned short flags[], int begin, int end);
|
||||
|
||||
// binary search in 2-byte vector
|
||||
int flag_bsearch(unsigned short flags[], unsigned short flag, int right);
|
||||
|
||||
// remove end of line char(s)
|
||||
void mychomp(char * s);
|
||||
|
||||
// duplicate string
|
||||
char * mystrdup(const char * s);
|
||||
|
||||
// duplicate reverse of string
|
||||
char * myrevstrdup(const char * s);
|
||||
|
||||
// parse into tokens with char delimiter
|
||||
char * mystrsep(char ** sptr, const char delim);
|
||||
// parse into tokens with char delimiter
|
||||
char * mystrsep2(char ** sptr, const char delim);
|
||||
|
||||
// parse into tokens with char delimiter
|
||||
char * mystrrep(char *, const char *, const char *);
|
||||
|
||||
// append s to ends of every lines in text
|
||||
void strlinecat(char * lines, const char * s);
|
||||
|
||||
// tokenize into lines with new line
|
||||
int line_tok(const char * text, char *** lines, char breakchar);
|
||||
|
||||
// tokenize into lines with new line and uniq in place
|
||||
char * line_uniq(char * text, char breakchar);
|
||||
char * line_uniq_app(char ** text, char breakchar);
|
||||
|
||||
// change oldchar to newchar in place
|
||||
char * tr(char * text, char oldc, char newc);
|
||||
|
||||
// reverse word
|
||||
int reverseword(char *);
|
||||
|
||||
// reverse word
|
||||
int reverseword_utf(char *);
|
||||
|
||||
// remove duplicates
|
||||
int uniqlist(char ** list, int n);
|
||||
|
||||
// free character array list
|
||||
void freelist(char *** list, int n);
|
||||
|
||||
// character encoding information
|
||||
struct cs_info {
|
||||
unsigned char ccase;
|
||||
unsigned char clower;
|
||||
unsigned char cupper;
|
||||
};
|
||||
|
||||
// two character arrays
|
||||
struct replentry {
|
||||
char * pattern;
|
||||
char * pattern2;
|
||||
};
|
||||
|
||||
// Unicode character encoding information
|
||||
struct unicode_info {
|
||||
unsigned short c;
|
||||
unsigned short cupper;
|
||||
unsigned short clower;
|
||||
};
|
||||
|
||||
struct unicode_info2 {
|
||||
char cletter;
|
||||
unsigned short cupper;
|
||||
unsigned short clower;
|
||||
};
|
||||
|
||||
int initialize_utf_tbl();
|
||||
void free_utf_tbl();
|
||||
unsigned short unicodetoupper(unsigned short c, int langnum);
|
||||
unsigned short unicodetolower(unsigned short c, int langnum);
|
||||
int unicodeisalpha(unsigned short c);
|
||||
|
||||
struct enc_entry {
|
||||
const char * enc_name;
|
||||
struct cs_info * cs_table;
|
||||
};
|
||||
|
||||
// language to encoding default map
|
||||
|
||||
struct lang_map {
|
||||
const char * lang;
|
||||
const char * def_enc;
|
||||
int num;
|
||||
};
|
||||
|
||||
struct cs_info * get_current_cs(const char * es);
|
||||
|
||||
const char * get_default_enc(const char * lang);
|
||||
|
||||
// get language identifiers of language codes
|
||||
int get_lang_num(const char * lang);
|
||||
|
||||
// get characters of the given 8bit encoding with lower- and uppercase forms
|
||||
char * get_casechars(const char * enc);
|
||||
|
||||
// convert null terminated string to all caps using encoding
|
||||
void enmkallcap(char * d, const char * p, const char * encoding);
|
||||
|
||||
// convert null terminated string to all little using encoding
|
||||
void enmkallsmall(char * d, const char * p, const char * encoding);
|
||||
|
||||
// convert null terminated string to have intial capital using encoding
|
||||
void enmkinitcap(char * d, const char * p, const char * encoding);
|
||||
|
||||
// convert null terminated string to all caps
|
||||
void mkallcap(char * p, const struct cs_info * csconv);
|
||||
|
||||
// convert null terminated string to all little
|
||||
void mkallsmall(char * p, const struct cs_info * csconv);
|
||||
|
||||
// convert null terminated string to have intial capital
|
||||
void mkinitcap(char * p, const struct cs_info * csconv);
|
||||
|
||||
// convert first nc characters of UTF-8 string to little
|
||||
void mkallsmall_utf(w_char * u, int nc, int langnum);
|
||||
|
||||
// convert first nc characters of UTF-8 string to capital
|
||||
void mkallcap_utf(w_char * u, int nc, int langnum);
|
||||
|
||||
// get type of capitalization
|
||||
int get_captype(char * q, int nl, cs_info *);
|
||||
|
||||
// get type of capitalization (UTF-8)
|
||||
int get_captype_utf8(w_char * q, int nl, int langnum);
|
||||
|
||||
// strip all ignored characters in the string
|
||||
void remove_ignored_chars_utf(char * word, unsigned short ignored_chars[], int ignored_len);
|
||||
|
||||
// strip all ignored characters in the string
|
||||
void remove_ignored_chars(char * word, char * ignored_chars);
|
||||
|
||||
int parse_string(char * line, char ** out, const char * name);
|
||||
|
||||
int parse_array(char * line, char ** out,
|
||||
unsigned short ** out_utf16, int * out_utf16_len, const char * name, int utf8);
|
||||
|
||||
int fieldlen(const char * r);
|
||||
char * copy_field(char * dest, const char * morph, const char * var);
|
||||
|
||||
int morphcmp(const char * s, const char * t);
|
||||
|
||||
int get_sfxcount(const char * morph);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,177 @@
|
|||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <cstdio>
|
||||
|
||||
#include "dictmgr.hxx"
|
||||
|
||||
using namespace std;
|
||||
|
||||
DictMgr::DictMgr(const char * dictpath, const char * etype)
|
||||
{
|
||||
// load list of etype entries
|
||||
numdict = 0;
|
||||
pdentry = (dictentry *)malloc(MAXDICTIONARIES*sizeof(struct dictentry));
|
||||
if (pdentry) {
|
||||
if (parse_file(dictpath, etype)) {
|
||||
numdict = 0;
|
||||
// no dictionary.lst found is okay
|
||||
}
|
||||
} else {
|
||||
numdict = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DictMgr::~DictMgr()
|
||||
{
|
||||
dictentry * pdict = NULL;
|
||||
if (pdentry) {
|
||||
pdict = pdentry;
|
||||
for (int i=0;i<numdict;i++) {
|
||||
if (pdict->lang) {
|
||||
free(pdict->lang);
|
||||
pdict->lang = NULL;
|
||||
}
|
||||
if (pdict->region) {
|
||||
free(pdict->region);
|
||||
pdict->region=NULL;
|
||||
}
|
||||
if (pdict->filename) {
|
||||
free(pdict->filename);
|
||||
pdict->filename = NULL;
|
||||
}
|
||||
pdict++;
|
||||
}
|
||||
free(pdentry);
|
||||
pdentry = NULL;
|
||||
pdict = NULL;
|
||||
}
|
||||
numdict = 0;
|
||||
}
|
||||
|
||||
|
||||
// read in list of etype entries and build up structure to describe them
|
||||
int DictMgr::parse_file(const char * dictpath, const char * etype)
|
||||
{
|
||||
|
||||
int i;
|
||||
char line[MAXDICTENTRYLEN+1];
|
||||
dictentry * pdict = pdentry;
|
||||
|
||||
// open the dictionary list file
|
||||
FILE * dictlst;
|
||||
dictlst = fopen(dictpath,"r");
|
||||
if (!dictlst) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// step one is to parse the dictionary list building up the
|
||||
// descriptive structures
|
||||
|
||||
// read in each line ignoring any that dont start with etype
|
||||
while (fgets(line,MAXDICTENTRYLEN,dictlst)) {
|
||||
mychomp(line);
|
||||
|
||||
/* parse in a dictionary entry */
|
||||
if (strncmp(line,etype,4) == 0) {
|
||||
if (numdict < MAXDICTIONARIES) {
|
||||
char * tp = line;
|
||||
char * piece;
|
||||
i = 0;
|
||||
while ((piece=mystrsep(&tp,' '))) {
|
||||
if (*piece != '\0') {
|
||||
switch(i) {
|
||||
case 0: break;
|
||||
case 1: pdict->lang = mystrdup(piece); break;
|
||||
case 2: if (strcmp (piece, "ANY") == 0)
|
||||
pdict->region = mystrdup("");
|
||||
else
|
||||
pdict->region = mystrdup(piece);
|
||||
break;
|
||||
case 3: pdict->filename = mystrdup(piece); break;
|
||||
default: break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
free(piece);
|
||||
}
|
||||
if (i == 4) {
|
||||
numdict++;
|
||||
pdict++;
|
||||
} else {
|
||||
fprintf(stderr,"dictionary list corruption in line \"%s\"\n",line);
|
||||
fflush(stderr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fclose(dictlst);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// return text encoding of dictionary
|
||||
int DictMgr::get_list(dictentry ** ppentry)
|
||||
{
|
||||
*ppentry = pdentry;
|
||||
return numdict;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// strip strings into token based on single char delimiter
|
||||
// acts like strsep() but only uses a delim char and not
|
||||
// a delim string
|
||||
|
||||
char * DictMgr::mystrsep(char ** stringp, const char delim)
|
||||
{
|
||||
char * rv = NULL;
|
||||
char * mp = *stringp;
|
||||
int n = strlen(mp);
|
||||
if (n > 0) {
|
||||
char * dp = (char *)memchr(mp,(int)((unsigned char)delim),n);
|
||||
if (dp) {
|
||||
*stringp = dp+1;
|
||||
int nc = (int)((unsigned long)dp - (unsigned long)mp);
|
||||
rv = (char *) malloc(nc+1);
|
||||
if (rv) {
|
||||
memcpy(rv,mp,nc);
|
||||
*(rv+nc) = '\0';
|
||||
return rv;
|
||||
}
|
||||
} else {
|
||||
rv = (char *) malloc(n+1);
|
||||
if (rv) {
|
||||
memcpy(rv, mp, n);
|
||||
*(rv+n) = '\0';
|
||||
*stringp = mp + n;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
// replaces strdup with ansi version
|
||||
char * DictMgr::mystrdup(const char * s)
|
||||
{
|
||||
char * d = NULL;
|
||||
if (s) {
|
||||
int sl = strlen(s);
|
||||
d = (char *) malloc(((sl+1) * sizeof(char)));
|
||||
if (d) memcpy(d,s,((sl+1)*sizeof(char)));
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
// remove cross-platform text line end characters
|
||||
void DictMgr:: mychomp(char * s)
|
||||
{
|
||||
int k = strlen(s);
|
||||
if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0';
|
||||
if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0';
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef _DICTMGR_HXX_
|
||||
#define _DICTMGR_HXX_
|
||||
|
||||
#define MAXDICTIONARIES 100
|
||||
#define MAXDICTENTRYLEN 1024
|
||||
|
||||
struct dictentry {
|
||||
char * filename;
|
||||
char * lang;
|
||||
char * region;
|
||||
};
|
||||
|
||||
|
||||
class DictMgr
|
||||
{
|
||||
|
||||
int numdict;
|
||||
dictentry * pdentry;
|
||||
|
||||
public:
|
||||
|
||||
DictMgr(const char * dictpath, const char * etype);
|
||||
~DictMgr();
|
||||
int get_list(dictentry** ppentry);
|
||||
|
||||
private:
|
||||
int parse_file(const char * dictpath, const char * etype);
|
||||
char * mystrsep(char ** stringp, const char delim);
|
||||
char * mystrdup(const char * s);
|
||||
void mychomp(char * s);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,897 @@
|
|||
#include "license.hunspell"
|
||||
#include "license.myspell"
|
||||
|
||||
#ifndef MOZILLA_CLIENT
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#include "hashmgr.hxx"
|
||||
#include "csutil.hxx"
|
||||
#include "atypes.hxx"
|
||||
|
||||
#ifdef MOZILLA_CLIENT
|
||||
#ifdef __SUNPRO_CC // for SunONE Studio compiler
|
||||
using namespace std;
|
||||
#endif
|
||||
#else
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// build a hash table from a munched word list
|
||||
|
||||
HashMgr::HashMgr(const char * tpath, const char * apath)
|
||||
{
|
||||
tablesize = 0;
|
||||
tableptr = NULL;
|
||||
flag_mode = FLAG_CHAR;
|
||||
complexprefixes = 0;
|
||||
utf8 = 0;
|
||||
langnum = 0;
|
||||
lang = NULL;
|
||||
enc = NULL;
|
||||
csconv = 0;
|
||||
ignorechars = NULL;
|
||||
ignorechars_utf16 = NULL;
|
||||
ignorechars_utf16_len = 0;
|
||||
numaliasf = 0;
|
||||
aliasf = NULL;
|
||||
numaliasm = 0;
|
||||
aliasm = NULL;
|
||||
forbiddenword = FORBIDDENWORD; // forbidden word signing flag
|
||||
load_config(apath);
|
||||
int ec = load_tables(tpath);
|
||||
if (ec) {
|
||||
/* error condition - what should we do here */
|
||||
HUNSPELL_WARNING(stderr, "Hash Manager Error : %d\n",ec);
|
||||
if (tableptr) {
|
||||
free(tableptr);
|
||||
tableptr = NULL;
|
||||
}
|
||||
tablesize = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HashMgr::~HashMgr()
|
||||
{
|
||||
if (tableptr) {
|
||||
// now pass through hash table freeing up everything
|
||||
// go through column by column of the table
|
||||
for (int i=0; i < tablesize; i++) {
|
||||
struct hentry * pt = tableptr[i];
|
||||
struct hentry * nt = NULL;
|
||||
while(pt) {
|
||||
nt = pt->next;
|
||||
if (pt->astr && (!aliasf || TESTAFF(pt->astr, ONLYUPCASEFLAG, pt->alen))) free(pt->astr);
|
||||
free(pt);
|
||||
pt = nt;
|
||||
}
|
||||
}
|
||||
free(tableptr);
|
||||
}
|
||||
tablesize = 0;
|
||||
|
||||
if (aliasf) {
|
||||
for (int j = 0; j < (numaliasf); j++) free(aliasf[j]);
|
||||
free(aliasf);
|
||||
aliasf = NULL;
|
||||
if (aliasflen) {
|
||||
free(aliasflen);
|
||||
aliasflen = NULL;
|
||||
}
|
||||
}
|
||||
if (aliasm) {
|
||||
for (int j = 0; j < (numaliasm); j++) free(aliasm[j]);
|
||||
free(aliasm);
|
||||
aliasm = NULL;
|
||||
}
|
||||
|
||||
#ifndef OPENOFFICEORG
|
||||
#ifndef MOZILLA_CLIENT
|
||||
if (utf8) free_utf_tbl();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (enc) free(enc);
|
||||
if (lang) free(lang);
|
||||
|
||||
if (ignorechars) free(ignorechars);
|
||||
if (ignorechars_utf16) free(ignorechars_utf16);
|
||||
}
|
||||
|
||||
// lookup a root word in the hashtable
|
||||
|
||||
struct hentry * HashMgr::lookup(const char *word) const
|
||||
{
|
||||
struct hentry * dp;
|
||||
if (tableptr) {
|
||||
dp = tableptr[hash(word)];
|
||||
if (!dp) return NULL;
|
||||
for ( ; dp != NULL; dp = dp->next) {
|
||||
if (strcmp(word,&(dp->word)) == 0) return dp;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// add a word to the hash table (private)
|
||||
int HashMgr::add_word(const char * word, int wbl, int wcl, unsigned short * aff,
|
||||
int al, const char * desc, bool onlyupcase)
|
||||
{
|
||||
bool upcasehomonym = false;
|
||||
int descl = desc ? (aliasm ? sizeof(char *) : strlen(desc) + 1) : 0;
|
||||
// variable-length hash record with word and optional fields
|
||||
struct hentry* hp =
|
||||
(struct hentry *) malloc (sizeof(struct hentry) + wbl + descl);
|
||||
if (!hp) return 1;
|
||||
char * hpw = &(hp->word);
|
||||
strcpy(hpw, word);
|
||||
if (ignorechars != NULL) {
|
||||
if (utf8) {
|
||||
remove_ignored_chars_utf(hpw, ignorechars_utf16, ignorechars_utf16_len);
|
||||
} else {
|
||||
remove_ignored_chars(hpw, ignorechars);
|
||||
}
|
||||
}
|
||||
if (complexprefixes) {
|
||||
if (utf8) reverseword_utf(hpw); else reverseword(hpw);
|
||||
}
|
||||
|
||||
int i = hash(hpw);
|
||||
|
||||
hp->blen = (unsigned char) wbl;
|
||||
hp->clen = (unsigned char) wcl;
|
||||
hp->alen = (short) al;
|
||||
hp->astr = aff;
|
||||
hp->next = NULL;
|
||||
hp->next_homonym = NULL;
|
||||
|
||||
// store the description string or its pointer
|
||||
if (desc) {
|
||||
hp->var = H_OPT;
|
||||
if (aliasm) {
|
||||
hp->var += H_OPT_ALIASM;
|
||||
*((char **) (hpw + wbl + 1)) = get_aliasm(atoi(desc));
|
||||
} else {
|
||||
strcpy(hpw + wbl + 1, desc);
|
||||
if (complexprefixes) {
|
||||
if (utf8) reverseword_utf(HENTRY_DATA(hp));
|
||||
else reverseword(HENTRY_DATA(hp));
|
||||
}
|
||||
}
|
||||
if (strstr(HENTRY_DATA(hp), MORPH_PHON)) hp->var += H_OPT_PHON;
|
||||
} else hp->var = 0;
|
||||
|
||||
struct hentry * dp = tableptr[i];
|
||||
if (!dp) {
|
||||
tableptr[i] = hp;
|
||||
return 0;
|
||||
}
|
||||
while (dp->next != NULL) {
|
||||
if ((!dp->next_homonym) && (strcmp(&(hp->word), &(dp->word)) == 0)) {
|
||||
// remove hidden onlyupcase homonym
|
||||
if (!onlyupcase) {
|
||||
if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) {
|
||||
free(dp->astr);
|
||||
dp->astr = hp->astr;
|
||||
dp->alen = hp->alen;
|
||||
free(hp);
|
||||
return 0;
|
||||
} else {
|
||||
dp->next_homonym = hp;
|
||||
}
|
||||
} else {
|
||||
upcasehomonym = true;
|
||||
}
|
||||
}
|
||||
dp=dp->next;
|
||||
}
|
||||
if (strcmp(&(hp->word), &(dp->word)) == 0) {
|
||||
// remove hidden onlyupcase homonym
|
||||
if (!onlyupcase) {
|
||||
if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) {
|
||||
free(dp->astr);
|
||||
dp->astr = hp->astr;
|
||||
dp->alen = hp->alen;
|
||||
free(hp);
|
||||
return 0;
|
||||
} else {
|
||||
dp->next_homonym = hp;
|
||||
}
|
||||
} else {
|
||||
upcasehomonym = true;
|
||||
}
|
||||
}
|
||||
if (!upcasehomonym) {
|
||||
dp->next = hp;
|
||||
} else {
|
||||
// remove hidden onlyupcase homonym
|
||||
if (hp->astr) free(hp->astr);
|
||||
free(hp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HashMgr::add_hidden_capitalized_word(char * word, int wbl, int wcl,
|
||||
unsigned short * flags, int al, char * dp, int captype)
|
||||
{
|
||||
// add inner capitalized forms to handle the following allcap forms:
|
||||
// Mixed caps: OpenOffice.org -> OPENOFFICE.ORG
|
||||
// Allcaps with suffixes: CIA's -> CIA'S
|
||||
if (((captype == HUHCAP) || (captype == HUHINITCAP) ||
|
||||
((captype == ALLCAP) && (flags != NULL))) &&
|
||||
!((flags != NULL) && TESTAFF(flags, forbiddenword, al))) {
|
||||
unsigned short * flags2 = (unsigned short *) malloc (sizeof(unsigned short) * (al+1));
|
||||
if (!flags2) return 1;
|
||||
if (al) memcpy(flags2, flags, al * sizeof(unsigned short));
|
||||
flags2[al] = ONLYUPCASEFLAG;
|
||||
if (utf8) {
|
||||
char st[MAXDELEN];
|
||||
w_char w[MAXDELEN];
|
||||
int wlen = u8_u16(w, MAXDELEN, word);
|
||||
mkallsmall_utf(w, wlen, langnum);
|
||||
mkallcap_utf(w, 1, langnum);
|
||||
u16_u8(st, MAXDELEN, w, wlen);
|
||||
return add_word(st,wbl,wcl,flags2,al+1,dp, true);
|
||||
} else {
|
||||
mkallsmall(word, csconv);
|
||||
mkinitcap(word, csconv);
|
||||
return add_word(word,wbl,wcl,flags2,al+1,dp, true);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// detect captype and modify word length for UTF-8 encoding
|
||||
int HashMgr::get_clen_and_captype(const char * word, int wbl, int * captype) {
|
||||
int len;
|
||||
if (utf8) {
|
||||
w_char dest_utf[MAXDELEN];
|
||||
len = u8_u16(dest_utf, MAXDELEN, word);
|
||||
*captype = get_captype_utf8(dest_utf, len, langnum);
|
||||
} else {
|
||||
len = wbl;
|
||||
*captype = get_captype((char *) word, len, csconv);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
// remove word with FORBIDDENWORD flag (not implemented)
|
||||
int HashMgr::remove(const char * word)
|
||||
{
|
||||
struct hentry * dp = lookup(word);
|
||||
/*
|
||||
if (!word || (!dp->astr || !TESTAFF(dp->astr, forbiddenword, pt->alen))) {
|
||||
int wbl = strlen(word);
|
||||
int wcl = get_clen_and_captype(word, wbl, &captype);
|
||||
if (aliasf) {
|
||||
add_word(word, wbl, wcl, dp->astr, dp->alen, NULL, false);
|
||||
} else {
|
||||
unsigned short * flags = (unsigned short *) malloc (dp->alen * sizeof(short));
|
||||
if (flags) {
|
||||
memcpy((void *) flags, (void *) dp->astr, dp->alen * sizeof(short));
|
||||
add_word(word, wbl, wcl, flags, dp->alen, NULL, false);
|
||||
} else return 1;
|
||||
}
|
||||
return add_hidden_capitalized_word((char *) word, wbl, wcl, dp->astr, dp->alen, NULL, captype);
|
||||
}
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
// add a custom dic. word to the hash table (public)
|
||||
int HashMgr::add(const char * word, char * aff)
|
||||
{
|
||||
unsigned short * flags;
|
||||
int al = 0;
|
||||
if (aff) {
|
||||
al = decode_flags(&flags, aff);
|
||||
flag_qsort(flags, 0, al);
|
||||
} else {
|
||||
flags = NULL;
|
||||
}
|
||||
|
||||
int captype;
|
||||
int wbl = strlen(word);
|
||||
int wcl = get_clen_and_captype(word, wbl, &captype);
|
||||
add_word(word, wbl, wcl, flags, al, NULL, false);
|
||||
return add_hidden_capitalized_word((char *) word, wbl, wcl, flags, al, NULL, captype);
|
||||
}
|
||||
|
||||
int HashMgr::add_with_affix(const char * word, const char * example)
|
||||
{
|
||||
// detect captype and modify word length for UTF-8 encoding
|
||||
struct hentry * dp = lookup(example);
|
||||
if (dp && dp->astr) {
|
||||
int captype;
|
||||
int wbl = strlen(word);
|
||||
int wcl = get_clen_and_captype(word, wbl, &captype);
|
||||
if (aliasf) {
|
||||
add_word(word, wbl, wcl, dp->astr, dp->alen, NULL, false);
|
||||
} else {
|
||||
unsigned short * flags = (unsigned short *) malloc (dp->alen * sizeof(short));
|
||||
if (flags) {
|
||||
memcpy((void *) flags, (void *) dp->astr, dp->alen * sizeof(short));
|
||||
add_word(word, wbl, wcl, flags, dp->alen, NULL, false);
|
||||
} else return 1;
|
||||
}
|
||||
return add_hidden_capitalized_word((char *) word, wbl, wcl, dp->astr, dp->alen, NULL, captype);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// walk the hash table entry by entry - null at end
|
||||
// initialize: col=-1; hp = NULL; hp = walk_hashtable(&col, hp);
|
||||
struct hentry * HashMgr::walk_hashtable(int &col, struct hentry * hp) const
|
||||
{
|
||||
if (hp && hp->next != NULL) return hp->next;
|
||||
for (col++; col < tablesize; col++) {
|
||||
if (tableptr[col]) return tableptr[col];
|
||||
}
|
||||
// null at end and reset to start
|
||||
col = -1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// load a munched word list and build a hash table on the fly
|
||||
int HashMgr::load_tables(const char * tpath)
|
||||
{
|
||||
int al;
|
||||
char * ap;
|
||||
char * dp;
|
||||
unsigned short * flags;
|
||||
|
||||
// raw dictionary - munched file
|
||||
FILE * rawdict = fopen(tpath, "r");
|
||||
if (rawdict == NULL) return 1;
|
||||
|
||||
// first read the first line of file to get hash table size */
|
||||
char ts[MAXDELEN];
|
||||
if (! fgets(ts, MAXDELEN-1,rawdict)) {
|
||||
HUNSPELL_WARNING(stderr, "error: empty dic file\n");
|
||||
fclose(rawdict);
|
||||
return 2;
|
||||
}
|
||||
mychomp(ts);
|
||||
|
||||
/* remove byte order mark */
|
||||
if (strncmp(ts,"\xEF\xBB\xBF",3) == 0) {
|
||||
memmove(ts, ts+3, strlen(ts+3)+1);
|
||||
HUNSPELL_WARNING(stderr, "warning: dic file begins with byte order mark: possible incompatibility with old Hunspell versions\n");
|
||||
}
|
||||
|
||||
if ((*ts < '1') || (*ts > '9')) HUNSPELL_WARNING(stderr, "error - missing word count in dictionary file\n");
|
||||
tablesize = atoi(ts);
|
||||
if (!tablesize) {
|
||||
fclose(rawdict);
|
||||
return 4;
|
||||
}
|
||||
tablesize = tablesize + 5 + USERWORD;
|
||||
if ((tablesize %2) == 0) tablesize++;
|
||||
|
||||
// allocate the hash table
|
||||
tableptr = (struct hentry **) malloc(tablesize * sizeof(struct hentry *));
|
||||
if (! tableptr) {
|
||||
fclose(rawdict);
|
||||
return 3;
|
||||
}
|
||||
for (int i=0; i<tablesize; i++) tableptr[i] = NULL;
|
||||
|
||||
// loop through all words on much list and add to hash
|
||||
// table and create word and affix strings
|
||||
|
||||
while (fgets(ts,MAXDELEN-1,rawdict)) {
|
||||
mychomp(ts);
|
||||
// split each line into word and morphological description
|
||||
dp = strchr(ts,'\t');
|
||||
char * dp2 = strchr(ts,' ');
|
||||
if (dp2 && (!dp || (dp2 < dp))) dp = dp2;
|
||||
|
||||
if (dp) {
|
||||
*dp = '\0';
|
||||
dp++;
|
||||
} else {
|
||||
dp = NULL;
|
||||
}
|
||||
|
||||
// split each line into word and affix char strings
|
||||
// "\/" signs slash in words (not affix separator)
|
||||
// "/" at beginning of the line is word character (not affix separator)
|
||||
ap = strchr(ts,'/');
|
||||
while (ap) {
|
||||
if (ap == ts) {
|
||||
ap++;
|
||||
continue;
|
||||
} else if (*(ap - 1) != '\\') break;
|
||||
// replace "\/" with "/"
|
||||
for (char * sp = ap - 1; *sp; *sp = *(sp + 1), sp++);
|
||||
ap = strchr(ap,'/');
|
||||
}
|
||||
|
||||
if (ap) {
|
||||
*ap = '\0';
|
||||
if (aliasf) {
|
||||
int index = atoi(ap + 1);
|
||||
al = get_aliasf(index, &flags);
|
||||
if (!al) {
|
||||
HUNSPELL_WARNING(stderr, "error - bad flag vector alias: %s\n", ts);
|
||||
*ap = '\0';
|
||||
}
|
||||
} else {
|
||||
al = decode_flags(&flags, ap + 1);
|
||||
flag_qsort(flags, 0, al);
|
||||
}
|
||||
} else {
|
||||
al = 0;
|
||||
ap = NULL;
|
||||
flags = NULL;
|
||||
}
|
||||
|
||||
int captype;
|
||||
int wbl = strlen(ts);
|
||||
int wcl = get_clen_and_captype(ts, wbl, &captype);
|
||||
// add the word and its index plus its capitalized form optionally
|
||||
if (add_word(ts,wbl,wcl,flags,al,dp, false) ||
|
||||
add_hidden_capitalized_word(ts, wbl, wcl, flags, al, dp, captype)) {
|
||||
fclose(rawdict);
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(rawdict);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// the hash function is a simple load and rotate
|
||||
// algorithm borrowed
|
||||
|
||||
int HashMgr::hash(const char * word) const
|
||||
{
|
||||
long hv = 0;
|
||||
for (int i=0; i < 4 && *word != 0; i++)
|
||||
hv = (hv << 8) | (*word++);
|
||||
while (*word != 0) {
|
||||
ROTATE(hv,ROTATE_LEN);
|
||||
hv ^= (*word++);
|
||||
}
|
||||
return (unsigned long) hv % tablesize;
|
||||
}
|
||||
|
||||
int HashMgr::decode_flags(unsigned short ** result, char * flags) {
|
||||
int len;
|
||||
switch (flag_mode) {
|
||||
case FLAG_LONG: { // two-character flags (1x2yZz -> 1x 2y Zz)
|
||||
len = strlen(flags);
|
||||
if (len%2 == 1) HUNSPELL_WARNING(stderr, "error: length of FLAG_LONG flagvector is odd: %s\n", flags);
|
||||
len /= 2;
|
||||
*result = (unsigned short *) malloc(len * sizeof(short));
|
||||
if (!*result) return -1;
|
||||
for (int i = 0; i < len; i++) {
|
||||
(*result)[i] = (((unsigned short) flags[i * 2]) << 8) + (unsigned short) flags[i * 2 + 1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FLAG_NUM: { // decimal numbers separated by comma (4521,23,233 -> 4521 23 233)
|
||||
len = 1;
|
||||
char * src = flags;
|
||||
unsigned short * dest;
|
||||
char * p;
|
||||
for (p = flags; *p; p++) {
|
||||
if (*p == ',') len++;
|
||||
}
|
||||
*result = (unsigned short *) malloc(len * sizeof(short));
|
||||
if (!*result) return -1;
|
||||
dest = *result;
|
||||
for (p = flags; *p; p++) {
|
||||
if (*p == ',') {
|
||||
*dest = (unsigned short) atoi(src);
|
||||
if (*dest == 0) HUNSPELL_WARNING(stderr, "error: 0 is wrong flag id\n");
|
||||
src = p + 1;
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
*dest = (unsigned short) atoi(src);
|
||||
if (*dest == 0) HUNSPELL_WARNING(stderr, "error: 0 is wrong flag id\n");
|
||||
break;
|
||||
}
|
||||
case FLAG_UNI: { // UTF-8 characters
|
||||
w_char w[MAXDELEN/2];
|
||||
len = u8_u16(w, MAXDELEN/2, flags);
|
||||
*result = (unsigned short *) malloc(len * sizeof(short));
|
||||
if (!*result) return -1;
|
||||
memcpy(*result, w, len * sizeof(short));
|
||||
break;
|
||||
}
|
||||
default: { // Ispell's one-character flags (erfg -> e r f g)
|
||||
unsigned short * dest;
|
||||
len = strlen(flags);
|
||||
*result = (unsigned short *) malloc(len * sizeof(short));
|
||||
if (!*result) return -1;
|
||||
dest = *result;
|
||||
for (unsigned char * p = (unsigned char *) flags; *p; p++) {
|
||||
*dest = (unsigned short) *p;
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
unsigned short HashMgr::decode_flag(const char * f) {
|
||||
unsigned short s = 0;
|
||||
switch (flag_mode) {
|
||||
case FLAG_LONG:
|
||||
s = ((unsigned short) f[0] << 8) + (unsigned short) f[1];
|
||||
break;
|
||||
case FLAG_NUM:
|
||||
s = (unsigned short) atoi(f);
|
||||
break;
|
||||
case FLAG_UNI:
|
||||
u8_u16((w_char *) &s, 1, f);
|
||||
break;
|
||||
default:
|
||||
s = (unsigned short) *((unsigned char *)f);
|
||||
}
|
||||
if (!s) HUNSPELL_WARNING(stderr, "error: 0 is wrong flag id\n");
|
||||
return s;
|
||||
}
|
||||
|
||||
char * HashMgr::encode_flag(unsigned short f) {
|
||||
unsigned char ch[10];
|
||||
if (f==0) return mystrdup("(NULL)");
|
||||
if (flag_mode == FLAG_LONG) {
|
||||
ch[0] = (unsigned char) (f >> 8);
|
||||
ch[1] = (unsigned char) (f - ((f >> 8) << 8));
|
||||
ch[2] = '\0';
|
||||
} else if (flag_mode == FLAG_NUM) {
|
||||
sprintf((char *) ch, "%d", f);
|
||||
} else if (flag_mode == FLAG_UNI) {
|
||||
u16_u8((char *) &ch, 10, (w_char *) &f, 1);
|
||||
} else {
|
||||
ch[0] = (unsigned char) (f);
|
||||
ch[1] = '\0';
|
||||
}
|
||||
return mystrdup((char *) ch);
|
||||
}
|
||||
|
||||
// read in aff file and set flag mode
|
||||
int HashMgr::load_config(const char * affpath)
|
||||
{
|
||||
int firstline = 1;
|
||||
|
||||
// io buffers
|
||||
char line[MAXDELEN+1];
|
||||
|
||||
// open the affix file
|
||||
FILE * afflst;
|
||||
afflst = fopen(affpath,"r");
|
||||
if (!afflst) {
|
||||
HUNSPELL_WARNING(stderr, "Error - could not open affix description file %s\n",affpath);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// read in each line ignoring any that do not
|
||||
// start with a known line type indicator
|
||||
|
||||
while (fgets(line,MAXDELEN,afflst)) {
|
||||
mychomp(line);
|
||||
|
||||
/* remove byte order mark */
|
||||
if (firstline) {
|
||||
firstline = 0;
|
||||
if (strncmp(line,"\xEF\xBB\xBF",3) == 0) memmove(line, line+3, strlen(line+3)+1);
|
||||
}
|
||||
|
||||
/* parse in the try string */
|
||||
if ((strncmp(line,"FLAG",4) == 0) && isspace(line[4])) {
|
||||
if (flag_mode != FLAG_CHAR) {
|
||||
HUNSPELL_WARNING(stderr, "error: duplicate FLAG parameter\n");
|
||||
}
|
||||
if (strstr(line, "long")) flag_mode = FLAG_LONG;
|
||||
if (strstr(line, "num")) flag_mode = FLAG_NUM;
|
||||
if (strstr(line, "UTF-8")) flag_mode = FLAG_UNI;
|
||||
if (flag_mode == FLAG_CHAR) {
|
||||
HUNSPELL_WARNING(stderr, "error: FLAG need `num', `long' or `UTF-8' parameter: %s\n", line);
|
||||
}
|
||||
}
|
||||
if (strncmp(line,"FORBIDDENWORD",13) == 0) {
|
||||
char * st = NULL;
|
||||
if (parse_string(line, &st, "FORBIDDENWORD")) {
|
||||
fclose(afflst);
|
||||
return 1;
|
||||
}
|
||||
forbiddenword = decode_flag(st);
|
||||
free(st);
|
||||
}
|
||||
if (strncmp(line, "SET", 3) == 0) {
|
||||
if (parse_string(line, &enc, "SET")) {
|
||||
fclose(afflst);
|
||||
return 1;
|
||||
}
|
||||
if (strcmp(enc, "UTF-8") == 0) {
|
||||
utf8 = 1;
|
||||
#ifndef OPENOFFICEORG
|
||||
#ifndef MOZILLA_CLIENT
|
||||
initialize_utf_tbl();
|
||||
#endif
|
||||
#endif
|
||||
} else csconv = get_current_cs(enc);
|
||||
}
|
||||
if (strncmp(line, "LANG", 4) == 0) {
|
||||
if (parse_string(line, &lang, "LANG")) {
|
||||
fclose(afflst);
|
||||
return 1;
|
||||
}
|
||||
langnum = get_lang_num(lang);
|
||||
}
|
||||
|
||||
/* parse in the ignored characters (for example, Arabic optional diacritics characters */
|
||||
if (strncmp(line,"IGNORE",6) == 0) {
|
||||
if (parse_array(line, &ignorechars, &ignorechars_utf16, &ignorechars_utf16_len, "IGNORE", utf8)) {
|
||||
fclose(afflst);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((strncmp(line,"AF",2) == 0) && isspace(line[2])) {
|
||||
if (parse_aliasf(line, afflst)) {
|
||||
fclose(afflst);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((strncmp(line,"AM",2) == 0) && isspace(line[2])) {
|
||||
if (parse_aliasm(line, afflst)) {
|
||||
fclose(afflst);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (strncmp(line,"COMPLEXPREFIXES",15) == 0) complexprefixes = 1;
|
||||
if (((strncmp(line,"SFX",3) == 0) || (strncmp(line,"PFX",3) == 0)) && isspace(line[3])) break;
|
||||
}
|
||||
if (csconv == NULL) csconv = get_current_cs("ISO8859-1");
|
||||
fclose(afflst);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* parse in the ALIAS table */
|
||||
int HashMgr::parse_aliasf(char * line, FILE * af)
|
||||
{
|
||||
if (numaliasf != 0) {
|
||||
HUNSPELL_WARNING(stderr, "error: duplicate AF (alias for flag vector) tables used\n");
|
||||
return 1;
|
||||
}
|
||||
char * tp = line;
|
||||
char * piece;
|
||||
int i = 0;
|
||||
int np = 0;
|
||||
piece = mystrsep(&tp, 0);
|
||||
while (piece) {
|
||||
if (*piece != '\0') {
|
||||
switch(i) {
|
||||
case 0: { np++; break; }
|
||||
case 1: {
|
||||
numaliasf = atoi(piece);
|
||||
if (numaliasf < 1) {
|
||||
numaliasf = 0;
|
||||
aliasf = NULL;
|
||||
aliasflen = NULL;
|
||||
HUNSPELL_WARNING(stderr, "incorrect number of entries in AF table\n");
|
||||
// free(piece);
|
||||
return 1;
|
||||
}
|
||||
aliasf = (unsigned short **) malloc(numaliasf * sizeof(unsigned short *));
|
||||
aliasflen = (unsigned short *) malloc(numaliasf * sizeof(short));
|
||||
if (!aliasf || !aliasflen) {
|
||||
numaliasf = 0;
|
||||
if (aliasf) free(aliasf);
|
||||
if (aliasflen) free(aliasflen);
|
||||
aliasf = NULL;
|
||||
aliasflen = NULL;
|
||||
return 1;
|
||||
}
|
||||
np++;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// free(piece);
|
||||
piece = mystrsep(&tp, 0);
|
||||
}
|
||||
if (np != 2) {
|
||||
numaliasf = 0;
|
||||
free(aliasf);
|
||||
free(aliasflen);
|
||||
aliasf = NULL;
|
||||
aliasflen = NULL;
|
||||
HUNSPELL_WARNING(stderr, "error: missing AF table information\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* now parse the numaliasf lines to read in the remainder of the table */
|
||||
char * nl = line;
|
||||
for (int j=0; j < numaliasf; j++) {
|
||||
if (!fgets(nl,MAXDELEN,af)) return 1;
|
||||
mychomp(nl);
|
||||
tp = nl;
|
||||
i = 0;
|
||||
aliasf[j] = NULL;
|
||||
aliasflen[j] = 0;
|
||||
piece = mystrsep(&tp, 0);
|
||||
while (piece) {
|
||||
if (*piece != '\0') {
|
||||
switch(i) {
|
||||
case 0: {
|
||||
if (strncmp(piece,"AF",2) != 0) {
|
||||
numaliasf = 0;
|
||||
free(aliasf);
|
||||
free(aliasflen);
|
||||
aliasf = NULL;
|
||||
aliasflen = NULL;
|
||||
HUNSPELL_WARNING(stderr, "error: AF table is corrupt\n");
|
||||
// free(piece);
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
aliasflen[j] = (unsigned short) decode_flags(&(aliasf[j]), piece);
|
||||
flag_qsort(aliasf[j], 0, aliasflen[j]);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// free(piece);
|
||||
piece = mystrsep(&tp, 0);
|
||||
}
|
||||
if (!aliasf[j]) {
|
||||
free(aliasf);
|
||||
free(aliasflen);
|
||||
aliasf = NULL;
|
||||
aliasflen = NULL;
|
||||
numaliasf = 0;
|
||||
HUNSPELL_WARNING(stderr, "error: AF table is corrupt\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HashMgr::is_aliasf() {
|
||||
return (aliasf != NULL);
|
||||
}
|
||||
|
||||
int HashMgr::get_aliasf(int index, unsigned short ** fvec) {
|
||||
if ((index > 0) && (index <= numaliasf)) {
|
||||
*fvec = aliasf[index - 1];
|
||||
return aliasflen[index - 1];
|
||||
}
|
||||
HUNSPELL_WARNING(stderr, "error: bad flag alias index: %d\n", index);
|
||||
*fvec = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* parse morph alias definitions */
|
||||
int HashMgr::parse_aliasm(char * line, FILE * af)
|
||||
{
|
||||
if (numaliasm != 0) {
|
||||
HUNSPELL_WARNING(stderr, "error: duplicate AM (aliases for morphological descriptions) tables used\n");
|
||||
return 1;
|
||||
}
|
||||
char * tp = line;
|
||||
char * piece;
|
||||
int i = 0;
|
||||
int np = 0;
|
||||
piece = mystrsep(&tp, 0);
|
||||
while (piece) {
|
||||
if (*piece != '\0') {
|
||||
switch(i) {
|
||||
case 0: { np++; break; }
|
||||
case 1: {
|
||||
numaliasm = atoi(piece);
|
||||
if (numaliasm < 1) {
|
||||
HUNSPELL_WARNING(stderr, "incorrect number of entries in AM table\n");
|
||||
// free(piece);
|
||||
return 1;
|
||||
}
|
||||
aliasm = (char **) malloc(numaliasm * sizeof(char *));
|
||||
if (!aliasm) {
|
||||
numaliasm = 0;
|
||||
return 1;
|
||||
}
|
||||
np++;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// free(piece);
|
||||
piece = mystrsep(&tp, 0);
|
||||
}
|
||||
if (np != 2) {
|
||||
numaliasm = 0;
|
||||
free(aliasm);
|
||||
aliasm = NULL;
|
||||
HUNSPELL_WARNING(stderr, "error: missing AM alias information\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* now parse the numaliasm lines to read in the remainder of the table */
|
||||
char * nl = line;
|
||||
for (int j=0; j < numaliasm; j++) {
|
||||
if (!fgets(nl,MAXDELEN,af)) return 1;
|
||||
mychomp(nl);
|
||||
tp = nl;
|
||||
i = 0;
|
||||
aliasm[j] = NULL;
|
||||
piece = mystrsep(&tp, ' ');
|
||||
while (piece) {
|
||||
if (*piece != '\0') {
|
||||
switch(i) {
|
||||
case 0: {
|
||||
if (strncmp(piece,"AM",2) != 0) {
|
||||
HUNSPELL_WARNING(stderr, "error: AM table is corrupt\n");
|
||||
// free(piece);
|
||||
numaliasm = 0;
|
||||
free(aliasm);
|
||||
aliasm = NULL;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
// add the remaining of the line
|
||||
if (*tp) {
|
||||
*(tp - 1) = ' ';
|
||||
tp = tp + strlen(tp);
|
||||
}
|
||||
if (complexprefixes) {
|
||||
if (utf8) reverseword_utf(piece);
|
||||
else reverseword(piece);
|
||||
}
|
||||
aliasm[j] = mystrdup(piece);
|
||||
break; }
|
||||
default: break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// free(piece);
|
||||
piece = mystrsep(&tp, ' ');
|
||||
}
|
||||
if (!aliasm[j]) {
|
||||
numaliasm = 0;
|
||||
free(aliasm);
|
||||
aliasm = NULL;
|
||||
HUNSPELL_WARNING(stderr, "error: map table is corrupt\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HashMgr::is_aliasm() {
|
||||
return (aliasm != NULL);
|
||||
}
|
||||
|
||||
char * HashMgr::get_aliasm(int index) {
|
||||
if ((index > 0) && (index <= numaliasm)) return aliasm[index - 1];
|
||||
HUNSPELL_WARNING(stderr, "error: bad morph. alias index: %d\n", index);
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
#ifndef _HASHMGR_HXX_
|
||||
#define _HASHMGR_HXX_
|
||||
|
||||
#ifndef MOZILLA_CLIENT
|
||||
#include <cstdio>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "htypes.hxx"
|
||||
|
||||
enum flag { FLAG_CHAR, FLAG_LONG, FLAG_NUM, FLAG_UNI };
|
||||
|
||||
class HashMgr
|
||||
{
|
||||
int tablesize;
|
||||
struct hentry ** tableptr;
|
||||
int userword;
|
||||
flag flag_mode;
|
||||
int complexprefixes;
|
||||
int utf8;
|
||||
unsigned short forbiddenword;
|
||||
int langnum;
|
||||
char * enc;
|
||||
char * lang;
|
||||
struct cs_info * csconv;
|
||||
char * ignorechars;
|
||||
unsigned short * ignorechars_utf16;
|
||||
int ignorechars_utf16_len;
|
||||
int numaliasf; // flag vector `compression' with aliases
|
||||
unsigned short ** aliasf;
|
||||
unsigned short * aliasflen;
|
||||
int numaliasm; // morphological desciption `compression' with aliases
|
||||
char ** aliasm;
|
||||
|
||||
|
||||
public:
|
||||
HashMgr(const char * tpath, const char * apath);
|
||||
~HashMgr();
|
||||
|
||||
struct hentry * lookup(const char *) const;
|
||||
int hash(const char *) const;
|
||||
struct hentry * walk_hashtable(int & col, struct hentry * hp) const;
|
||||
|
||||
int add(const char * word, char * aff);
|
||||
int add_with_affix(const char * word, const char * pattern);
|
||||
int remove(const char * word);
|
||||
int decode_flags(unsigned short ** result, char * flags);
|
||||
unsigned short decode_flag(const char * flag);
|
||||
char * encode_flag(unsigned short flag);
|
||||
int is_aliasf();
|
||||
int get_aliasf(int index, unsigned short ** fvec);
|
||||
int is_aliasm();
|
||||
char * get_aliasm(int index);
|
||||
|
||||
private:
|
||||
int get_clen_and_captype(const char * word, int wbl, int * captype);
|
||||
int load_tables(const char * tpath);
|
||||
int add_word(const char * word, int wbl, int wcl, unsigned short * ap,
|
||||
int al, const char * desc, bool onlyupcase);
|
||||
int load_config(const char * affpath);
|
||||
int parse_aliasf(char * line, FILE * af);
|
||||
int add_hidden_capitalized_word(char * word, int wbl, int wcl,
|
||||
unsigned short * flags, int al, char * dp, int captype);
|
||||
int parse_aliasm(char * line, FILE * af);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef _HTYPES_HXX_
|
||||
#define _HTYPES_HXX_
|
||||
|
||||
#define MAXDELEN 8192
|
||||
|
||||
#define ROTATE_LEN 5
|
||||
|
||||
#define ROTATE(v,q) \
|
||||
(v) = ((v) << (q)) | (((v) >> (32 - q)) & ((1 << (q))-1));
|
||||
|
||||
// hentry options
|
||||
#define H_OPT (1 << 0)
|
||||
#define H_OPT_ALIASM (1 << 1)
|
||||
#define H_OPT_PHON (1 << 2)
|
||||
|
||||
#define HENTRY_WORD(h) &(h->word)
|
||||
#define HENTRY_DATA(h) (h->var ? ((h->var & H_OPT_ALIASM) ? \
|
||||
*((char **) (&(h->word) + h->blen + 1)) : &(h->word) + h->blen + 1) : NULL)
|
||||
#define HENTRY_FIND(h,p) (HENTRY_DATA(h) ? strstr(HENTRY_DATA(h), p) : NULL)
|
||||
|
||||
// approx. number of user defined words
|
||||
#define USERWORD 1000
|
||||
|
||||
struct hentry
|
||||
{
|
||||
unsigned char blen; // word length in bytes
|
||||
unsigned char clen; // word length in characters (different for UTF-8 enc.)
|
||||
short alen; // length of affix flag vector
|
||||
unsigned short * astr; // affix flag vector
|
||||
struct hentry * next; // next word with same hash code
|
||||
struct hentry * next_homonym; // next homonym word (with same hash code)
|
||||
char var; // variable fields (only for special pronounciation yet)
|
||||
char word; // variable-length word (8-bit or UTF-8 encoding)
|
||||
};
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,87 @@
|
|||
#ifndef _MYSPELLMGR_H_
|
||||
#define _MYSPELLMGR_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct Hunhandle Hunhandle;
|
||||
|
||||
Hunhandle *Hunspell_create(const char * affpath, const char * dpath);
|
||||
void Hunspell_destroy(Hunhandle *pHunspell);
|
||||
|
||||
/* spell(word) - spellcheck word
|
||||
* output: 0 = bad word, not 0 = good word
|
||||
*/
|
||||
int Hunspell_spell(Hunhandle *pHunspell, const char *);
|
||||
|
||||
char *Hunspell_get_dic_encoding(Hunhandle *pHunspell);
|
||||
|
||||
/* suggest(suggestions, word) - search suggestions
|
||||
* input: pointer to an array of strings pointer and the (bad) word
|
||||
* array of strings pointer (here *slst) may not be initialized
|
||||
* output: number of suggestions in string array, and suggestions in
|
||||
* a newly allocated array of strings (*slts will be NULL when number
|
||||
* of suggestion equals 0.)
|
||||
*/
|
||||
int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word);
|
||||
|
||||
/* morphological functions */
|
||||
|
||||
/* analyze(result, word) - morphological analysis of the word */
|
||||
|
||||
int Hunspell_analyze(Hunhandle *pHunspell, char*** slst, const char * word);
|
||||
|
||||
/* stem(result, word) - stemmer function */
|
||||
|
||||
int Hunspell_stem(Hunhandle *pHunspell, char*** slst, const char * word);
|
||||
|
||||
/* stem(result, analysis, n) - get stems from a morph. analysis
|
||||
* example:
|
||||
* char ** result, result2;
|
||||
* int n1 = Hunspell_analyze(result, "words");
|
||||
* int n2 = Hunspell_stem2(result2, result, n1);
|
||||
*/
|
||||
|
||||
int Hunspell_stem2(Hunhandle *pHunspell, char*** slst, char** desc, int n);
|
||||
|
||||
/* generate(result, word, word2) - morphological generation by example(s) */
|
||||
|
||||
int Hunspell_generate(Hunhandle *pHunspell, char*** slst, const char * word,
|
||||
const char * word2);
|
||||
|
||||
/* generate(result, word, desc, n) - generation by morph. description(s)
|
||||
* example:
|
||||
* char ** result;
|
||||
* char * affix = "is:plural"; // description depends from dictionaries, too
|
||||
* int n = Hunspell_generate2(result, "word", &affix, 1);
|
||||
* for (int i = 0; i < n; i++) printf("%s\n", result[i]);
|
||||
*/
|
||||
|
||||
int Hunspell_generate2(Hunhandle *pHunspell, char*** slst, const char * word,
|
||||
char** desc, int n);
|
||||
|
||||
/* functions for run-time modification of the dictionary */
|
||||
|
||||
/* add word to the run-time dictionary */
|
||||
|
||||
int Hunspell_add(const char * word);
|
||||
|
||||
/* add word to the run-time dictionary with affix flags of
|
||||
* the example (a dictionary word): Hunspell will recognize
|
||||
* affixed forms of the new word, too.
|
||||
*/
|
||||
|
||||
int Hunspell_add_with_affix(const char * word, const char * example);
|
||||
|
||||
/* remove word from the run-time dictionary */
|
||||
/* NOTE: not implemented yet */
|
||||
|
||||
int Hunspell_remove(const char * word);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -0,0 +1,172 @@
|
|||
#include "hashmgr.hxx"
|
||||
#include "affixmgr.hxx"
|
||||
#include "suggestmgr.hxx"
|
||||
#include "csutil.hxx"
|
||||
#include "langnum.hxx"
|
||||
|
||||
#define SPELL_COMPOUND (1 << 0)
|
||||
#define SPELL_FORBIDDEN (1 << 1)
|
||||
#define SPELL_ALLCAP (1 << 2)
|
||||
#define SPELL_NOCAP (1 << 3)
|
||||
#define SPELL_INITCAP (1 << 4)
|
||||
|
||||
#define MAXSUGGESTION 15
|
||||
#define MAXSHARPS 5
|
||||
|
||||
#ifndef _MYSPELLMGR_HXX_
|
||||
#define _MYSPELLMGR_HXX_
|
||||
|
||||
#ifdef HUNSPELL_STATIC
|
||||
#define DLLEXPORT
|
||||
#else
|
||||
#ifdef HUNSPELL_EXPORTS
|
||||
#define DLLEXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define DLLEXPORT __declspec( dllimport )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef W32
|
||||
class DLLEXPORT Hunspell
|
||||
#else
|
||||
class Hunspell
|
||||
#endif
|
||||
{
|
||||
AffixMgr* pAMgr;
|
||||
HashMgr* pHMgr;
|
||||
SuggestMgr* pSMgr;
|
||||
char * encoding;
|
||||
struct cs_info * csconv;
|
||||
int langnum;
|
||||
int utf8;
|
||||
int complexprefixes;
|
||||
char** wordbreak;
|
||||
|
||||
public:
|
||||
|
||||
/* Hunspell(aff, dic) - constructor of Hunspell class
|
||||
* input: path of affix file and dictionary file
|
||||
*/
|
||||
|
||||
Hunspell(const char * affpath, const char * dpath);
|
||||
|
||||
~Hunspell();
|
||||
|
||||
/* spell(word) - spellcheck word
|
||||
* output: 0 = bad word, not 0 = good word
|
||||
*
|
||||
* plus output:
|
||||
* info: information bit array, fields:
|
||||
* SPELL_COMPOUND = a compound word
|
||||
* SPELL_FORBIDDEN = an explicit forbidden word
|
||||
* root: root (stem), when input is a word with affix(es)
|
||||
*/
|
||||
|
||||
int spell(const char * word, int * info = NULL, char ** root = NULL);
|
||||
|
||||
/* suggest(suggestions, word) - search suggestions
|
||||
* input: pointer to an array of strings pointer and the (bad) word
|
||||
* array of strings pointer (here *slst) may not be initialized
|
||||
* output: number of suggestions in string array, and suggestions in
|
||||
* a newly allocated array of strings (*slts will be NULL when number
|
||||
* of suggestion equals 0.)
|
||||
*/
|
||||
|
||||
int suggest(char*** slst, const char * word);
|
||||
|
||||
char * get_dic_encoding();
|
||||
|
||||
/* morphological functions */
|
||||
|
||||
/* analyze(result, word) - morphological analysis of the word */
|
||||
|
||||
int analyze(char*** slst, const char * word);
|
||||
|
||||
/* stem(result, word) - stemmer function */
|
||||
|
||||
int stem(char*** slst, const char * word);
|
||||
|
||||
/* stem(result, analysis, n) - get stems from a morph. analysis
|
||||
* example:
|
||||
* char ** result, result2;
|
||||
* int n1 = analyze(result, "words");
|
||||
* int n2 = stem(result2, result, n1);
|
||||
*/
|
||||
|
||||
int stem(char*** slst, char ** morph, int n);
|
||||
|
||||
/* generate(result, word, word2) - morphological generation by example(s) */
|
||||
|
||||
int generate(char*** slst, const char * word, const char * word2);
|
||||
|
||||
/* generate(result, word, desc, n) - generation by morph. description(s)
|
||||
* example:
|
||||
* char ** result;
|
||||
* char * affix = "is:plural"; // description depends from dictionaries, too
|
||||
* int n = generate(result, "word", &affix, 1);
|
||||
* for (int i = 0; i < n; i++) printf("%s\n", result[i]);
|
||||
*/
|
||||
|
||||
int generate(char*** slst, const char * word, char ** desc, int n);
|
||||
|
||||
/* functions for run-time modification of the dictionary */
|
||||
|
||||
/* add word to the run-time dictionary */
|
||||
|
||||
int add(const char * word);
|
||||
|
||||
/* add word to the run-time dictionary with affix flags of
|
||||
* the example (a dictionary word): Hunspell will recognize
|
||||
* affixed forms of the new word, too.
|
||||
*/
|
||||
|
||||
int add_with_affix(const char * word, const char * example);
|
||||
|
||||
/* remove word from the run-time dictionary */
|
||||
/* NOTE: not implemented yet */
|
||||
|
||||
int remove(const char * word);
|
||||
|
||||
/* other */
|
||||
|
||||
/* get extra word characters definied in affix file for tokenization */
|
||||
const char * get_wordchars();
|
||||
unsigned short * get_wordchars_utf16(int * len);
|
||||
|
||||
struct cs_info * get_csconv();
|
||||
const char * get_version();
|
||||
|
||||
/* experimental and deprecated functions */
|
||||
|
||||
#ifdef HUNSPELL_EXPERIMENTAL
|
||||
/* suffix is an affix flag string, similarly in dictionary files */
|
||||
int put_word_suffix(const char * word, const char * suffix);
|
||||
char * morph_with_correction(const char * word);
|
||||
|
||||
/* spec. suggestions */
|
||||
int suggest_auto(char*** slst, const char * word);
|
||||
int suggest_pos_stems(char*** slst, const char * word);
|
||||
char * get_possible_root();
|
||||
#endif
|
||||
|
||||
private:
|
||||
int cleanword(char *, const char *, int * pcaptype, int * pabbrev);
|
||||
int cleanword2(char *, const char *, w_char *, int * w_len, int * pcaptype, int * pabbrev);
|
||||
void mkinitcap(char *);
|
||||
int mkinitcap2(char * p, w_char * u, int nc);
|
||||
int mkinitsmall2(char * p, w_char * u, int nc);
|
||||
void mkallcap(char *);
|
||||
int mkallcap2(char * p, w_char * u, int nc);
|
||||
void mkallsmall(char *);
|
||||
int mkallsmall2(char * p, w_char * u, int nc);
|
||||
struct hentry * checkword(const char *, int * info, char **root);
|
||||
char * sharps_u8_l1(char * dest, char * source);
|
||||
hentry * spellsharps(char * base, char *, int, int, char * tmp, int * info, char **root);
|
||||
int is_keepcase(const hentry * rv);
|
||||
int insert_sug(char ***slst, char * word, int ns);
|
||||
char * cat_result(char * result, char * st);
|
||||
char * stem_description(const char * desc);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef _LANGNUM_HXX_
|
||||
#define _LANGNUM_HXX_
|
||||
|
||||
/*
|
||||
language numbers for language specific codes
|
||||
see http://l10n.openoffice.org/languages.html
|
||||
*/
|
||||
|
||||
enum {
|
||||
LANG_ar=96,
|
||||
LANG_az=100, // custom number
|
||||
LANG_bg=41,
|
||||
LANG_ca=37,
|
||||
LANG_cs=42,
|
||||
LANG_da=45,
|
||||
LANG_de=49,
|
||||
LANG_el=30,
|
||||
LANG_en=01,
|
||||
LANG_es=34,
|
||||
LANG_eu=10,
|
||||
LANG_fr=02,
|
||||
LANG_gl=38,
|
||||
LANG_hr=78,
|
||||
LANG_hu=36,
|
||||
LANG_it=39,
|
||||
LANG_la=99, // custom number
|
||||
LANG_lv=101, // custom number
|
||||
LANG_nl=31,
|
||||
LANG_pl=48,
|
||||
LANG_pt=03,
|
||||
LANG_ru=07,
|
||||
LANG_sv=50,
|
||||
LANG_tr=90,
|
||||
LANG_uk=80,
|
||||
LANG_xx=999
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,59 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Hunspell, based on MySpell.
|
||||
*
|
||||
* The Initial Developers of the Original Code are
|
||||
* Kevin Hendricks (MySpell) and Laszlo Nemeth (Hunspell).
|
||||
* Portions created by the Initial Developers are Copyright (C) 2002-2005
|
||||
* the Initial Developers. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* David Einstein
|
||||
* Davide Prina
|
||||
* Giuseppe Modugno
|
||||
* Gianluca Turconi
|
||||
* Simon Brouwer
|
||||
* Noll Janos
|
||||
* Biro Arpad
|
||||
* Goldman Eleonora
|
||||
* Sarlos Tamas
|
||||
* Bencsath Boldizsar
|
||||
* Halacsy Peter
|
||||
* Dvornik Laszlo
|
||||
* Gefferth Andras
|
||||
* Nagy Viktor
|
||||
* Varga Daniel
|
||||
* Chris Halls
|
||||
* Rene Engelhard
|
||||
* Bram Moolenaar
|
||||
* Dafydd Jones
|
||||
* Harri Pitkanen
|
||||
* Andras Timar
|
||||
* Tor Lillqvist
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "config.h"
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada
|
||||
* And Contributors. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* NOTE: A special thanks and credit goes to Geoff Kuenning
|
||||
* the creator of ispell. MySpell's affix algorithms were
|
||||
* based on those of ispell which should be noted is
|
||||
* copyright Geoff Kuenning et.al. and now available
|
||||
* under a BSD style license. For more information on ispell
|
||||
* and affix compression in general, please see:
|
||||
* http://www.cs.ucla.edu/ficus-members/geoff/ispell.html
|
||||
* (the home page for ispell)
|
||||
*
|
||||
* An almost complete rewrite of MySpell for use by
|
||||
* the Mozilla project has been developed by David Einstein
|
||||
* (Deinst@world.std.com). David and I are now
|
||||
* working on parallel development tracks to help
|
||||
* our respective projects (Mozilla and OpenOffice.org
|
||||
* and we will maintain full affix file and dictionary
|
||||
* file compatibility and work on merging our versions
|
||||
* of MySpell back into a single tree. David has been
|
||||
* a significant help in improving MySpell.
|
||||
*
|
||||
* Special thanks also go to La'szlo' Ne'meth
|
||||
* <nemethl@gyorsposta.hu> who is the author of the
|
||||
* Hungarian dictionary and who developed and contributed
|
||||
* the code to support compound words in MySpell
|
||||
* and fixed numerous problems with the encoding
|
||||
* case conversion tables.
|
||||
*
|
||||
*/
|
|
@ -0,0 +1,113 @@
|
|||
#*************************************************************************
|
||||
#
|
||||
# $RCSfile: makefile.mk,v $
|
||||
#
|
||||
# $Revision: 1.7 $
|
||||
#
|
||||
# last change: $Author: vg $ $Date: 2003/06/12 10:38:24 $
|
||||
#
|
||||
# The Contents of this file are made available subject to the terms of
|
||||
# either of the following licenses
|
||||
#
|
||||
# - GNU Lesser General Public License Version 2.1
|
||||
# - Sun Industry Standards Source License Version 1.1
|
||||
#
|
||||
# Sun Microsystems Inc., October, 2000
|
||||
#
|
||||
# GNU Lesser General Public License Version 2.1
|
||||
# =============================================
|
||||
# Copyright 2000 by Sun Microsystems, Inc.
|
||||
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License version 2.1, as published by the Free Software Foundation.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
# MA 02111-1307 USA
|
||||
#
|
||||
#
|
||||
# Sun Industry Standards Source License Version 1.1
|
||||
# =================================================
|
||||
# The contents of this file are subject to the Sun Industry Standards
|
||||
# Source License Version 1.1 (the "License"); You may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of the
|
||||
# License at http://www.openoffice.org/license.html.
|
||||
#
|
||||
# Software provided under this License is provided on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
||||
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
||||
# See the License for the specific provisions governing your rights and
|
||||
# obligations concerning the Software.
|
||||
#
|
||||
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
||||
#
|
||||
# Copyright: 2000 by Sun Microsystems, Inc.
|
||||
#
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Contributor(s): _______________________________________
|
||||
#
|
||||
#
|
||||
#
|
||||
#*************************************************************************
|
||||
|
||||
PRJ = ..
|
||||
|
||||
PRJNAME = hunspell
|
||||
TARGET = hunspell
|
||||
LIBTARGET=NO
|
||||
|
||||
#----- Settings ---------------------------------------------------------
|
||||
|
||||
.INCLUDE : settings.mk
|
||||
|
||||
# --- Files --------------------------------------------------------
|
||||
|
||||
# all_target: ALLTAR DICTIONARY
|
||||
all_target: ALLTAR
|
||||
|
||||
##CXXFLAGS += -I..$/..$/lingutil
|
||||
##CFLAGSCXX += -I..$/..$/lingutil
|
||||
##CFLAGSCC += -I..$/..$/lingutil
|
||||
|
||||
CDEFS+=-DOPENOFFICEORG
|
||||
|
||||
SLOFILES= \
|
||||
$(SLO)$/affentry.obj \
|
||||
$(SLO)$/affixmgr.obj \
|
||||
$(SLO)$/dictmgr.obj \
|
||||
$(SLO)$/csutil.obj \
|
||||
$(SLO)$/utf_info.obj \
|
||||
$(SLO)$/hashmgr.obj \
|
||||
$(SLO)$/suggestmgr.obj \
|
||||
$(SLO)$/hunspell.obj
|
||||
|
||||
LIB1TARGET= $(SLB)$/lib$(TARGET).lib
|
||||
LIB1ARCHIV= $(LB)/lib$(TARGET).a
|
||||
LIB1OBJFILES= $(SLOFILES)
|
||||
|
||||
# DIC2BIN= \
|
||||
# en_US.aff \
|
||||
# en_US.dic
|
||||
#
|
||||
# de_DE.aff \
|
||||
# de_DE.dic
|
||||
|
||||
|
||||
# DICTIONARY :
|
||||
# +$(COPY) $(foreach,i,$(DIC2BIN) $i) $(BIN)
|
||||
|
||||
|
||||
# --- Targets ------------------------------------------------------
|
||||
|
||||
.INCLUDE : target.mk
|
||||
|
|
@ -0,0 +1,294 @@
|
|||
/* phonetic.c - generic replacement aglogithms for phonetic transformation
|
||||
Copyright (C) 2000 Bjoern Jacke
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License version 2.1 as published by the Free Software Foundation;
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Changelog:
|
||||
|
||||
2000-01-05 Bjoern Jacke <bjoern at j3e.de>
|
||||
Initial Release insprired by the article about phonetic
|
||||
transformations out of c't 25/1999
|
||||
|
||||
2007-07-26 Bjoern Jacke <bjoern at j3e.de>
|
||||
Released under MPL/GPL/LGPL tri-license for Hunspell
|
||||
|
||||
2007-08-23 Laszlo Nemeth <nemeth at OOo>
|
||||
Porting from Aspell to Hunspell using C-like structs
|
||||
*/
|
||||
|
||||
#ifndef MOZILLA_CLIENT
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#include "csutil.hxx"
|
||||
#include "phonet.hxx"
|
||||
|
||||
void init_phonet_hash(phonetable & parms)
|
||||
{
|
||||
int i, k;
|
||||
|
||||
for (i = 0; i < parms.hash_size; i++) {
|
||||
parms.hash[i] = -1;
|
||||
}
|
||||
|
||||
for (i = 0; parms.rules[i][0] != '\0'; i += 2) {
|
||||
/** set hash value **/
|
||||
k = (unsigned char) parms.rules[i][0];
|
||||
|
||||
if (parms.hash[k] < 0) {
|
||||
parms.hash[k] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// like strcpy but safe if the strings overlap
|
||||
// but only if dest < src
|
||||
static inline void strmove(char * dest, char * src) {
|
||||
while (*src)
|
||||
*dest++ = *src++;
|
||||
*dest = '\0';
|
||||
}
|
||||
|
||||
/* phonetic transcription algorithm */
|
||||
/* see: http://aspell.net/man-html/Phonetic-Code.html */
|
||||
/* convert string to uppercase before this call */
|
||||
int phonet (const char * inword, char * target,
|
||||
int len,
|
||||
phonetable & parms)
|
||||
{
|
||||
/** Do phonetic transformation. **/
|
||||
/** "len" = length of "inword" incl. '\0'. **/
|
||||
|
||||
/** result: >= 0: length of "target" **/
|
||||
/** otherwise: error **/
|
||||
|
||||
int i,j,k=0,n,p,z;
|
||||
int k0,n0,p0=-333,z0;
|
||||
char c, c0;
|
||||
const char * s;
|
||||
typedef unsigned char uchar;
|
||||
char word[MAXPHONETUTF8LEN + 1];
|
||||
if (len == -1) len = strlen(inword);
|
||||
if (len > MAXPHONETUTF8LEN) return 0;
|
||||
strcpy(word, inword);
|
||||
|
||||
/** check word **/
|
||||
i = j = z = 0;
|
||||
while ((c = word[i]) != '\0') {
|
||||
n = parms.hash[(uchar) c];
|
||||
z0 = 0;
|
||||
|
||||
if (n >= 0) {
|
||||
/** check all rules for the same letter **/
|
||||
while (parms.rules[n][0] == c) {
|
||||
|
||||
/** check whole string **/
|
||||
k = 1; /** number of found letters **/
|
||||
p = 5; /** default priority **/
|
||||
s = parms.rules[n];
|
||||
s++; /** important for (see below) "*(s-1)" **/
|
||||
|
||||
while (*s != '\0' && word[i+k] == *s
|
||||
&& !isdigit (*s) && strchr ("(-<^$", *s) == NULL) {
|
||||
k++;
|
||||
s++;
|
||||
}
|
||||
if (*s == '(') {
|
||||
/** check letters in "(..)" **/
|
||||
if (isalpha(word[i+k]) // ...could be implied?
|
||||
&& strchr(s+1, word[i+k]) != NULL) {
|
||||
k++;
|
||||
while (*s != ')')
|
||||
s++;
|
||||
s++;
|
||||
}
|
||||
}
|
||||
p0 = (int) *s;
|
||||
k0 = k;
|
||||
while (*s == '-' && k > 1) {
|
||||
k--;
|
||||
s++;
|
||||
}
|
||||
if (*s == '<')
|
||||
s++;
|
||||
if (isdigit (*s)) {
|
||||
/** determine priority **/
|
||||
p = *s - '0';
|
||||
s++;
|
||||
}
|
||||
if (*s == '^' && *(s+1) == '^')
|
||||
s++;
|
||||
|
||||
if (*s == '\0'
|
||||
|| (*s == '^'
|
||||
&& (i == 0 || ! isalpha(word[i-1]))
|
||||
&& (*(s+1) != '$'
|
||||
|| (! isalpha(word[i+k0]) )))
|
||||
|| (*s == '$' && i > 0
|
||||
&& isalpha(word[i-1])
|
||||
&& (! isalpha(word[i+k0]) )))
|
||||
{
|
||||
/** search for followup rules, if: **/
|
||||
/** parms.followup and k > 1 and NO '-' in searchstring **/
|
||||
c0 = word[i+k-1];
|
||||
n0 = parms.hash[(uchar) c0];
|
||||
|
||||
// if (parms.followup && k > 1 && n0 >= 0
|
||||
if (k > 1 && n0 >= 0
|
||||
&& p0 != (int) '-' && word[i+k] != '\0') {
|
||||
/** test follow-up rule for "word[i+k]" **/
|
||||
while (parms.rules[n0][0] == c0) {
|
||||
|
||||
/** check whole string **/
|
||||
k0 = k;
|
||||
p0 = 5;
|
||||
s = parms.rules[n0];
|
||||
s++;
|
||||
while (*s != '\0' && word[i+k0] == *s
|
||||
&& ! isdigit(*s) && strchr("(-<^$",*s) == NULL) {
|
||||
k0++;
|
||||
s++;
|
||||
}
|
||||
if (*s == '(') {
|
||||
/** check letters **/
|
||||
if (isalpha(word[i+k0])
|
||||
&& strchr (s+1, word[i+k0]) != NULL) {
|
||||
k0++;
|
||||
while (*s != ')' && *s != '\0')
|
||||
s++;
|
||||
if (*s == ')')
|
||||
s++;
|
||||
}
|
||||
}
|
||||
while (*s == '-') {
|
||||
/** "k0" gets NOT reduced **/
|
||||
/** because "if (k0 == k)" **/
|
||||
s++;
|
||||
}
|
||||
if (*s == '<')
|
||||
s++;
|
||||
if (isdigit (*s)) {
|
||||
p0 = *s - '0';
|
||||
s++;
|
||||
}
|
||||
|
||||
if (*s == '\0'
|
||||
/** *s == '^' cuts **/
|
||||
|| (*s == '$' && ! isalpha(word[i+k0])))
|
||||
{
|
||||
if (k0 == k) {
|
||||
/** this is just a piece of the string **/
|
||||
n0 += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (p0 < p) {
|
||||
/** priority too low **/
|
||||
n0 += 2;
|
||||
continue;
|
||||
}
|
||||
/** rule fits; stop search **/
|
||||
break;
|
||||
}
|
||||
n0 += 2;
|
||||
} /** End of "while (parms.rules[n0][0] == c0)" **/
|
||||
|
||||
if (p0 >= p && parms.rules[n0][0] == c0) {
|
||||
n += 2;
|
||||
continue;
|
||||
}
|
||||
} /** end of follow-up stuff **/
|
||||
|
||||
/** replace string **/
|
||||
s = parms.rules[n+1];
|
||||
p0 = (parms.rules[n][0] != '\0'
|
||||
&& strchr (parms.rules[n]+1,'<') != NULL) ? 1:0;
|
||||
if (p0 == 1 && z == 0) {
|
||||
/** rule with '<' is used **/
|
||||
if (j > 0 && *s != '\0'
|
||||
&& (target[j-1] == c || target[j-1] == *s)) {
|
||||
j--;
|
||||
}
|
||||
z0 = 1;
|
||||
z = 1;
|
||||
k0 = 0;
|
||||
while (*s != '\0' && word[i+k0] != '\0') {
|
||||
word[i+k0] = *s;
|
||||
k0++;
|
||||
s++;
|
||||
}
|
||||
if (k > k0)
|
||||
strmove (&word[0]+i+k0, &word[0]+i+k);
|
||||
|
||||
/** new "actual letter" **/
|
||||
c = word[i];
|
||||
}
|
||||
else { /** no '<' rule used **/
|
||||
i += k - 1;
|
||||
z = 0;
|
||||
while (*s != '\0'
|
||||
&& *(s+1) != '\0' && j < len) {
|
||||
if (j == 0 || target[j-1] != *s) {
|
||||
target[j] = *s;
|
||||
j++;
|
||||
}
|
||||
s++;
|
||||
}
|
||||
/** new "actual letter" **/
|
||||
c = *s;
|
||||
if (parms.rules[n][0] != '\0'
|
||||
&& strstr (parms.rules[n]+1, "^^") != NULL) {
|
||||
if (c != '\0') {
|
||||
target[j] = c;
|
||||
j++;
|
||||
}
|
||||
strmove (&word[0], &word[0]+i+1);
|
||||
i = 0;
|
||||
z0 = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
} /** end of follow-up stuff **/
|
||||
n += 2;
|
||||
} /** end of while (parms.rules[n][0] == c) **/
|
||||
} /** end of if (n >= 0) **/
|
||||
if (z0 == 0) {
|
||||
// if (k && (assert(p0!=-333),!p0) && j < len && c != '\0'
|
||||
// && (!parms.collapse_result || j == 0 || target[j-1] != c)){
|
||||
if (k && !p0 && j < len && c != '\0'
|
||||
&& (1 || j == 0 || target[j-1] != c)){
|
||||
/** condense only double letters **/
|
||||
target[j] = c;
|
||||
///printf("\n setting \n");
|
||||
j++;
|
||||
}
|
||||
|
||||
i++;
|
||||
z = 0;
|
||||
k=0;
|
||||
}
|
||||
} /** end of while ((c = word[i]) != '\0') **/
|
||||
|
||||
target[j] = '\0';
|
||||
return (j);
|
||||
|
||||
} /** end of function "phonet" **/
|
|
@ -0,0 +1,50 @@
|
|||
/* phonetic.c - generic replacement aglogithms for phonetic transformation
|
||||
Copyright (C) 2000 Bjoern Jacke
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License version 2.1 as published by the Free Software Foundation;
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; If not, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Changelog:
|
||||
|
||||
2000-01-05 Bjoern Jacke <bjoern at j3e.de>
|
||||
Initial Release insprired by the article about phonetic
|
||||
transformations out of c't 25/1999
|
||||
|
||||
2007-07-26 Bjoern Jacke <bjoern at j3e.de>
|
||||
Released under MPL/GPL/LGPL tri-license for Hunspell
|
||||
|
||||
2007-08-23 Laszlo Nemeth <nemeth at OOo>
|
||||
Porting from Aspell to Hunspell using C-like structs
|
||||
*/
|
||||
|
||||
#ifndef __PHONETHXX__
|
||||
#define __PHONETHXX__
|
||||
|
||||
#define MAXPHONETLEN 256
|
||||
#define MAXPHONETUTF8LEN (MAXPHONETLEN * 4)
|
||||
|
||||
struct phonetable {
|
||||
char utf8;
|
||||
cs_info * lang;
|
||||
int num;
|
||||
char * * rules;
|
||||
static const int hash_size = 256;
|
||||
int hash[hash_size];
|
||||
};
|
||||
|
||||
void init_phonet_hash(phonetable & parms);
|
||||
|
||||
int phonet (const char * inword, char * target,
|
||||
int len, phonetable & phone);
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,107 @@
|
|||
#ifndef _SUGGESTMGR_HXX_
|
||||
#define _SUGGESTMGR_HXX_
|
||||
|
||||
#define MAXSWL 100
|
||||
#define MAXSWUTF8L (MAXSWL * 4)
|
||||
#define MAX_ROOTS 100
|
||||
#define MAX_WORDS 100
|
||||
#define MAX_GUESS 200
|
||||
#define MAXNGRAMSUGS 4
|
||||
#define MAXPHONSUGS 2
|
||||
|
||||
// timelimit: max ~1/4 sec (process time on Linux) for a time consuming function
|
||||
#define TIMELIMIT (CLOCKS_PER_SEC >> 2)
|
||||
#define MINTIMER 100
|
||||
#define MAXPLUSTIMER 100
|
||||
|
||||
#define NGRAM_LONGER_WORSE (1 << 0)
|
||||
#define NGRAM_ANY_MISMATCH (1 << 1)
|
||||
#define NGRAM_LOWERING (1 << 2)
|
||||
|
||||
#include "atypes.hxx"
|
||||
#include "affixmgr.hxx"
|
||||
#include "hashmgr.hxx"
|
||||
#include "langnum.hxx"
|
||||
#include <time.h>
|
||||
|
||||
enum { LCS_UP, LCS_LEFT, LCS_UPLEFT };
|
||||
|
||||
class SuggestMgr
|
||||
{
|
||||
char * ckey;
|
||||
int ckeyl;
|
||||
w_char * ckey_utf;
|
||||
|
||||
char * ctry;
|
||||
int ctryl;
|
||||
w_char * ctry_utf;
|
||||
|
||||
AffixMgr* pAMgr;
|
||||
int maxSug;
|
||||
struct cs_info * csconv;
|
||||
int utf8;
|
||||
int langnum;
|
||||
int nosplitsugs;
|
||||
int maxngramsugs;
|
||||
int complexprefixes;
|
||||
|
||||
|
||||
public:
|
||||
SuggestMgr(const char * tryme, int maxn, AffixMgr *aptr);
|
||||
~SuggestMgr();
|
||||
|
||||
int suggest(char*** slst, const char * word, int nsug, int * onlycmpdsug);
|
||||
int ngsuggest(char ** wlst, char * word, int ns, HashMgr* pHMgr);
|
||||
int suggest_auto(char*** slst, const char * word, int nsug);
|
||||
int suggest_stems(char*** slst, const char * word, int nsug);
|
||||
int suggest_pos_stems(char*** slst, const char * word, int nsug);
|
||||
|
||||
char * suggest_morph(const char * word);
|
||||
char * suggest_gen(char ** pl, int pln, char * pattern);
|
||||
char * suggest_morph_for_spelling_error(const char * word);
|
||||
|
||||
private:
|
||||
int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsuggest,
|
||||
int * timer, clock_t * timelimit);
|
||||
int checkword(const char *, int, int, int *, clock_t *);
|
||||
int check_forbidden(const char *, int);
|
||||
|
||||
int capchars(char **, const char *, int, int);
|
||||
int replchars(char**, const char *, int, int);
|
||||
int doubletwochars(char**, const char *, int, int);
|
||||
int forgotchar(char **, const char *, int, int);
|
||||
int swapchar(char **, const char *, int, int);
|
||||
int longswapchar(char **, const char *, int, int);
|
||||
int movechar(char **, const char *, int, int);
|
||||
int extrachar(char **, const char *, int, int);
|
||||
int badcharkey(char **, const char *, int, int);
|
||||
int badchar(char **, const char *, int, int);
|
||||
int twowords(char **, const char *, int, int);
|
||||
int fixstems(char **, const char *, int);
|
||||
|
||||
int capchars_utf(char **, const w_char *, int wl, int, int);
|
||||
int doubletwochars_utf(char**, const w_char *, int wl, int, int);
|
||||
int forgotchar_utf(char**, const w_char *, int wl, int, int);
|
||||
int extrachar_utf(char**, const w_char *, int wl, int, int);
|
||||
int badcharkey_utf(char **, const w_char *, int wl, int, int);
|
||||
int badchar_utf(char **, const w_char *, int wl, int, int);
|
||||
int swapchar_utf(char **, const w_char *, int wl, int, int);
|
||||
int longswapchar_utf(char **, const w_char *, int, int, int);
|
||||
int movechar_utf(char **, const w_char *, int, int, int);
|
||||
|
||||
int mapchars(char**, const char *, int, int);
|
||||
int map_related(const char *, int, char ** wlst, int, int, const mapentry*, int, int *, clock_t *);
|
||||
int map_related_utf(w_char *, int, int, int, char ** wlst, int, const mapentry*, int, int *, clock_t *);
|
||||
int ngram(int n, char * s1, const char * s2, int opt);
|
||||
int mystrlen(const char * word);
|
||||
int leftcommonsubstring(char * s1, const char * s2);
|
||||
int commoncharacterpositions(char * s1, const char * s2, int * is_swap);
|
||||
void bubblesort( char ** rwd, char ** rwd2, int * rsc, int n);
|
||||
void lcs(const char * s, const char * s2, int * l1, int * l2, char ** result);
|
||||
int lcslen(const char * s, const char* s2);
|
||||
char * suggest_hentry_gen(hentry * rv, char * pattern);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
|||
lib_LIBRARIES=libparsers.a
|
||||
libparsers_a_SOURCES=firstparser.cxx htmlparser.cxx \
|
||||
latexparser.cxx manparser.cxx \
|
||||
textparser.cxx
|
||||
|
||||
noinst_PROGRAMS=testparser
|
||||
testparser_SOURCES=firstparser.cxx firstparser.hxx htmlparser.cxx htmlparser.hxx latexparser.cxx latexparser.hxx manparser.cxx manparser.hxx testparser.cxx textparser.cxx textparser.hxx
|
||||
|
||||
# need mystrdup()
|
||||
LDADD = ../hunspell/libhunspell.la
|
|
@ -0,0 +1,533 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
noinst_PROGRAMS = testparser$(EXEEXT)
|
||||
subdir = src/parsers
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/isc-posix.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLIBRARIES_INSTALL = $(INSTALL_DATA)
|
||||
LIBRARIES = $(lib_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libparsers_a_AR = $(AR) $(ARFLAGS)
|
||||
libparsers_a_LIBADD =
|
||||
am_libparsers_a_OBJECTS = firstparser.$(OBJEXT) htmlparser.$(OBJEXT) \
|
||||
latexparser.$(OBJEXT) manparser.$(OBJEXT) textparser.$(OBJEXT)
|
||||
libparsers_a_OBJECTS = $(am_libparsers_a_OBJECTS)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_testparser_OBJECTS = firstparser.$(OBJEXT) htmlparser.$(OBJEXT) \
|
||||
latexparser.$(OBJEXT) manparser.$(OBJEXT) testparser.$(OBJEXT) \
|
||||
textparser.$(OBJEXT)
|
||||
testparser_OBJECTS = $(am_testparser_OBJECTS)
|
||||
testparser_LDADD = $(LDADD)
|
||||
testparser_DEPENDENCIES = ../hunspell/libhunspell.la
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libparsers_a_SOURCES) $(testparser_SOURCES)
|
||||
DIST_SOURCES = $(libparsers_a_SOURCES) $(testparser_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURSESLIB = @CURSESLIB@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
HUNSPELL_VERSION_MAJOR = @HUNSPELL_VERSION_MAJOR@
|
||||
HUNSPELL_VERSION_MINOR = @HUNSPELL_VERSION_MINOR@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
READLINELIB = @READLINELIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XFAILED = @XFAILED@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
lib_LIBRARIES = libparsers.a
|
||||
libparsers_a_SOURCES = firstparser.cxx htmlparser.cxx \
|
||||
latexparser.cxx manparser.cxx \
|
||||
textparser.cxx
|
||||
|
||||
testparser_SOURCES = firstparser.cxx firstparser.hxx htmlparser.cxx htmlparser.hxx latexparser.cxx latexparser.hxx manparser.cxx manparser.hxx testparser.cxx textparser.cxx textparser.hxx
|
||||
|
||||
# need mystrdup()
|
||||
LDADD = ../hunspell/libhunspell.la
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cxx .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/parsers/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/parsers/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLIBRARIES: $(lib_LIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLIBRARIES:
|
||||
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
|
||||
libparsers.a: $(libparsers_a_OBJECTS) $(libparsers_a_DEPENDENCIES)
|
||||
-rm -f libparsers.a
|
||||
$(libparsers_a_AR) libparsers.a $(libparsers_a_OBJECTS) $(libparsers_a_LIBADD)
|
||||
$(RANLIB) libparsers.a
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
testparser$(EXEEXT): $(testparser_OBJECTS) $(testparser_DEPENDENCIES)
|
||||
@rm -f testparser$(EXEEXT)
|
||||
$(CXXLINK) $(testparser_LDFLAGS) $(testparser_OBJECTS) $(testparser_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/firstparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htmlparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/latexparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testparser.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/textparser.Po@am__quote@
|
||||
|
||||
.cxx.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cxx.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cxx.lo:
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLIBRARIES clean-libtool \
|
||||
clean-noinstPROGRAMS mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
|
||||
distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-libLIBRARIES install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,33 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../hunspell/csutil.hxx"
|
||||
#include "firstparser.hxx"
|
||||
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
FirstParser::FirstParser(const char * wordchars)
|
||||
{
|
||||
init(wordchars);
|
||||
}
|
||||
|
||||
FirstParser::~FirstParser()
|
||||
{
|
||||
}
|
||||
|
||||
char * FirstParser::next_token()
|
||||
{
|
||||
char * tabpos = strchr(line[actual],'\t');
|
||||
if ((tabpos) && (tabpos - line[actual]>token)) {
|
||||
char * t = (char *) malloc(tabpos - line[actual] + 1);
|
||||
t[tabpos - line[actual]] = '\0';
|
||||
token = tabpos - line[actual] +1;
|
||||
if (t) return strncpy(t, line[actual], tabpos - line[actual]);
|
||||
fprintf(stderr,"Error - Insufficient Memory\n");
|
||||
}
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* parser classes of HunTools
|
||||
*
|
||||
* implemented: text, HTML, TeX, first word
|
||||
*
|
||||
* Copyright (C) 2003, Laszlo Nemeth
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _FIRSTPARSER_HXX_
|
||||
#define _FIRSTPARSER_HXX_
|
||||
|
||||
#include "textparser.hxx"
|
||||
|
||||
/*
|
||||
* Check first word of the input line
|
||||
*
|
||||
*/
|
||||
|
||||
class FirstParser : public TextParser
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
FirstParser(const char * wc);
|
||||
virtual ~FirstParser();
|
||||
|
||||
virtual char * next_token();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../hunspell/csutil.hxx"
|
||||
#include "htmlparser.hxx"
|
||||
|
||||
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
enum { ST_NON_WORD, ST_WORD, ST_TAG, ST_CHAR_ENTITY, ST_OTHER_TAG, ST_ATTRIB };
|
||||
|
||||
static char * PATTERN[][2] = {
|
||||
{ "<script", "</script>" },
|
||||
{ "<style", "</style>" },
|
||||
{ "<code", "</code>" },
|
||||
{ "<samp", "</samp>" },
|
||||
{ "<kbd", "</kbd>" },
|
||||
{ "<var", "</var>" },
|
||||
{ "<listing", "</listing>" },
|
||||
{ "<address", "</address>" },
|
||||
{ "<pre", "</pre>" },
|
||||
{ "<!--", "-->" },
|
||||
{ "<[cdata[", "]]>" }, // XML comment
|
||||
{ "<", ">" }
|
||||
};
|
||||
|
||||
#define PATTERN_LEN (sizeof(PATTERN) / (sizeof(char *) * 2))
|
||||
|
||||
static char * PATTERN2[][2] = {
|
||||
{ "<img", "alt=" }, // ALT and TITLE attrib handled spec.
|
||||
{ "<img", "title=" },
|
||||
{ "<a ", "title=" }
|
||||
};
|
||||
|
||||
#define PATTERN_LEN2 (sizeof(PATTERN2) / (sizeof(char *) * 2))
|
||||
|
||||
HTMLParser::HTMLParser(const char * wordchars)
|
||||
{
|
||||
init(wordchars);
|
||||
}
|
||||
|
||||
HTMLParser::HTMLParser(unsigned short * wordchars, int len)
|
||||
{
|
||||
init(wordchars, len);
|
||||
}
|
||||
|
||||
HTMLParser::~HTMLParser()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int HTMLParser::look_pattern(char * p[][2], unsigned int len, int column)
|
||||
{
|
||||
for (unsigned int i = 0; i < len; i++) {
|
||||
char * j = line[actual] + head;
|
||||
char * k = p[i][column];
|
||||
while ((*k != '\0') && (tolower(*j) == *k)) {
|
||||
j++;
|
||||
k++;
|
||||
}
|
||||
if (*k == '\0') return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* HTML parser
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
char * HTMLParser::next_token()
|
||||
{
|
||||
char * latin1;
|
||||
|
||||
for (;;) {
|
||||
//fprintf(stderr, "%d:%c:%s\n", state, line[actual][head], line[actual]);
|
||||
//getch();
|
||||
switch (state)
|
||||
{
|
||||
case ST_NON_WORD: // non word chars
|
||||
prevstate = ST_NON_WORD;
|
||||
if ((pattern_num = look_pattern(PATTERN, PATTERN_LEN, 0)) != -1) {
|
||||
checkattr = 0;
|
||||
if ((pattern2_num = look_pattern(PATTERN2, PATTERN_LEN2, 0)) != -1) {
|
||||
checkattr = 1;
|
||||
}
|
||||
state = ST_TAG;
|
||||
} else if (is_wordchar(line[actual] + head)) {
|
||||
state = ST_WORD;
|
||||
token = head;
|
||||
} else if ((latin1 = get_latin1(line[actual] + head))) {
|
||||
state = ST_WORD;
|
||||
token = head;
|
||||
head += strlen(latin1);
|
||||
} else if (line[actual][head] == '&') {
|
||||
state = ST_CHAR_ENTITY;
|
||||
}
|
||||
break;
|
||||
case ST_WORD: // wordchar
|
||||
if ((latin1 = get_latin1(line[actual] + head))) {
|
||||
head += strlen(latin1);
|
||||
} else if (! is_wordchar(line[actual] + head)) {
|
||||
state = prevstate;
|
||||
char * t = alloc_token(token, &head);
|
||||
if (t) return t;
|
||||
}
|
||||
break;
|
||||
case ST_TAG: // comment, labels, etc
|
||||
int i;
|
||||
if ((checkattr == 1) && ((i = look_pattern(PATTERN2, PATTERN_LEN2, 1)) != -1)
|
||||
&& (strcmp(PATTERN2[i][0],PATTERN2[pattern2_num][0]) == 0)) {
|
||||
checkattr = 2;
|
||||
} else if ((checkattr > 0) && (line[actual][head] == '>')) {
|
||||
state = ST_NON_WORD;
|
||||
} else if (((i = look_pattern(PATTERN, PATTERN_LEN, 1)) != -1) &&
|
||||
(strcmp(PATTERN[i][1],PATTERN[pattern_num][1]) == 0)) {
|
||||
state = ST_NON_WORD;
|
||||
head += strlen(PATTERN[pattern_num][1]) - 1;
|
||||
} else if ( (strcmp(PATTERN[pattern_num][0], "<") == 0) &&
|
||||
((line[actual][head] == '"') || (line[actual][head] == '\''))) {
|
||||
quotmark = line[actual][head];
|
||||
state = ST_ATTRIB;
|
||||
}
|
||||
break;
|
||||
case ST_ATTRIB: // non word chars
|
||||
prevstate = ST_ATTRIB;
|
||||
if (line[actual][head] == quotmark) {
|
||||
state = ST_TAG;
|
||||
if (checkattr == 2) checkattr = 1;
|
||||
// for IMG ALT
|
||||
} else if (is_wordchar(line[actual] + head) && (checkattr == 2)) {
|
||||
state = ST_WORD;
|
||||
token = head;
|
||||
} else if (line[actual][head] == '&') {
|
||||
state = ST_CHAR_ENTITY;
|
||||
}
|
||||
break;
|
||||
case ST_CHAR_ENTITY: // SGML element
|
||||
if ((tolower(line[actual][head]) < 'a') || (tolower(line[actual][head]) > 'z')) {
|
||||
state = prevstate;
|
||||
head--;
|
||||
}
|
||||
}
|
||||
if (next_char(line[actual], &head)) return NULL;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* HTML parser class for MySpell
|
||||
*
|
||||
* implemented: text, HTML, TeX
|
||||
*
|
||||
* Copyright (C) 2002, Laszlo Nemeth
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HTMLPARSER_HXX_
|
||||
#define _HTMLPARSER_HXX_
|
||||
|
||||
|
||||
#include "textparser.hxx"
|
||||
|
||||
/*
|
||||
* HTML Parser
|
||||
*
|
||||
*/
|
||||
|
||||
class HTMLParser : public TextParser
|
||||
{
|
||||
public:
|
||||
|
||||
HTMLParser(const char * wc);
|
||||
HTMLParser(unsigned short * wordchars, int len);
|
||||
virtual ~HTMLParser();
|
||||
|
||||
virtual char * next_token();
|
||||
|
||||
private:
|
||||
|
||||
int look_pattern(char * p[][2], unsigned int len, int column);
|
||||
int pattern_num;
|
||||
int pattern2_num;
|
||||
int prevstate;
|
||||
int checkattr;
|
||||
char quotmark;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../hunspell/csutil.hxx"
|
||||
#include "latexparser.hxx"
|
||||
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
static struct {
|
||||
char * pat[2];
|
||||
int arg;
|
||||
} PATTERN[] = {
|
||||
{ { "\\(", "\\)" } , 0 },
|
||||
{ { "$$", "$$" } , 0 },
|
||||
{ { "$", "$" } , 0 },
|
||||
{ { "\\begin{math}", "\\end{math}" } , 0 },
|
||||
{ { "\\[", "\\]" } , 0 },
|
||||
{ { "\\begin{displaymath}", "\\end{displaymath}" } , 0 },
|
||||
{ { "\\begin{equation}", "\\end{equation}" } , 0 },
|
||||
{ { "\\cite", NULL } , 1 },
|
||||
{ { "\\nocite", NULL } , 1 },
|
||||
{ { "\\index", NULL } , 1 },
|
||||
{ { "\\label", NULL } , 1 },
|
||||
{ { "\\ref", NULL } , 1 },
|
||||
{ { "\\pageref", NULL } , 1 },
|
||||
{ { "\\parbox", NULL } , 1 },
|
||||
{ { "\\begin{verbatim}", "\\end{verbatim}" } , 0 },
|
||||
{ { "\\verb+", "+" } , 0 },
|
||||
{ { "\\verb|", "|" } , 0 },
|
||||
{ { "\\verb#", "#" } , 0 },
|
||||
{ { "\\verb*", "*" } , 0 },
|
||||
{ { "\\documentstyle", "\\begin{document}" } , 0 },
|
||||
{ { "\\documentclass", "\\begin{document}" } , 0 },
|
||||
// { { "\\documentclass", NULL } , 1 },
|
||||
{ { "\\usepackage", NULL } , 1 },
|
||||
{ { "\\includeonly", NULL } , 1 },
|
||||
{ { "\\include", NULL } , 1 },
|
||||
{ { "\\input", NULL } , 1 },
|
||||
{ { "\\vspace", NULL } , 1 },
|
||||
{ { "\\setlength", NULL } , 2 },
|
||||
{ { "\\addtolength", NULL } , 2 },
|
||||
{ { "\\settowidth", NULL } , 2 },
|
||||
{ { "\\rule", NULL } , 2 },
|
||||
{ { "\\hspace", NULL } , 1 } ,
|
||||
{ { "\\vspace", NULL } , 1 } ,
|
||||
{ { "\\\\[", "]" } , 0 },
|
||||
{ { "\\pagebreak[", "]" } , 0 } ,
|
||||
{ { "\\nopagebreak[", "]" } , 0 } ,
|
||||
{ { "\\enlargethispage", NULL } , 1 } ,
|
||||
{ { "\\begin{tabular}", NULL } , 1 } ,
|
||||
{ { "\\addcontentsline", NULL } , 2 } ,
|
||||
{ { "\\begin{thebibliography}", NULL } , 1 } ,
|
||||
{ { "\\bibliography", NULL } , 1 } ,
|
||||
{ { "\\bibliographystyle", NULL } , 1 } ,
|
||||
{ { "\\bibitem", NULL } , 1 } ,
|
||||
{ { "\\begin", NULL } , 1 } ,
|
||||
{ { "\\end", NULL } , 1 } ,
|
||||
{ { "\\pagestyle", NULL } , 1 } ,
|
||||
{ { "\\pagenumbering", NULL } , 1 } ,
|
||||
{ { "\\thispagestyle", NULL } , 1 } ,
|
||||
{ { "\\newtheorem", NULL } , 2 },
|
||||
{ { "\\newcommand", NULL } , 2 },
|
||||
{ { "\\renewcommand", NULL } , 2 },
|
||||
{ { "\\setcounter", NULL } , 2 },
|
||||
{ { "\\addtocounter", NULL } , 1 },
|
||||
{ { "\\stepcounter", NULL } , 1 },
|
||||
{ { "\\selectlanguage", NULL } , 1 },
|
||||
{ { "\\inputencoding", NULL } , 1 },
|
||||
{ { "\\hyphenation", NULL } , 1 },
|
||||
{ { "\\definecolor", NULL } , 3 },
|
||||
{ { "\\color", NULL } , 1 },
|
||||
{ { "\\textcolor", NULL } , 1 },
|
||||
{ { "\\pagecolor", NULL } , 1 },
|
||||
{ { "\\colorbox", NULL } , 2 },
|
||||
{ { "\\fcolorbox", NULL } , 2 },
|
||||
{ { "\\declaregraphicsextensions", NULL } , 1 },
|
||||
{ { "\\psfig", NULL } , 1 },
|
||||
{ { "\\url", NULL } , 1 }
|
||||
};
|
||||
|
||||
#define PATTERN_LEN (sizeof(PATTERN) / ((sizeof(char *) * 2) + sizeof(int)))
|
||||
|
||||
LaTeXParser::LaTeXParser(const char * wordchars)
|
||||
{
|
||||
init(wordchars);
|
||||
}
|
||||
|
||||
LaTeXParser::LaTeXParser(unsigned short * wordchars, int len)
|
||||
{
|
||||
init(wordchars, len);
|
||||
}
|
||||
|
||||
LaTeXParser::~LaTeXParser()
|
||||
{
|
||||
}
|
||||
|
||||
int LaTeXParser::look_pattern(int col)
|
||||
{
|
||||
for (unsigned int i = 0; i < PATTERN_LEN; i++) {
|
||||
char * j = line[actual] + head;
|
||||
char * k = PATTERN[i].pat[col];
|
||||
if (! k) continue;
|
||||
while ((*k != '\0') && (tolower(*j) == *k)) {
|
||||
j++;
|
||||
k++;
|
||||
}
|
||||
if (*k == '\0') return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* LaTeXParser
|
||||
*
|
||||
* state 0: not wordchar
|
||||
* state 1: wordchar
|
||||
* state 2: comments
|
||||
* state 3: commands
|
||||
* state 4: commands with arguments
|
||||
* state 5: % comment
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
char * LaTeXParser::next_token()
|
||||
{
|
||||
int i;
|
||||
int slash = 0;
|
||||
for (;;) {
|
||||
// fprintf(stderr,"depth: %d, state: %d, , arg: %d, token: %s\n",depth,state,arg,line[actual]+head);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case 0: // non word chars
|
||||
if ((pattern_num = look_pattern(0)) != -1) {
|
||||
if (PATTERN[pattern_num].pat[1]) {
|
||||
state = 2;
|
||||
} else {
|
||||
state = 4;
|
||||
depth = 0;
|
||||
arg = 0;
|
||||
opt = 1;
|
||||
}
|
||||
head += strlen(PATTERN[pattern_num].pat[0]) - 1;
|
||||
} else if ((line[actual][head] == '%')) {
|
||||
state = 5;
|
||||
} else if (is_wordchar(line[actual] + head)) {
|
||||
state = 1;
|
||||
token = head;
|
||||
} else if (line[actual][head] == '\\') {
|
||||
if (line[actual][head + 1] == '\\' || // \\ (linebreak)
|
||||
(line[actual][head + 1] == '$') || // \$ (dollar sign)
|
||||
(line[actual][head + 1] == '%')) { // \% (percent)
|
||||
head++;
|
||||
break;
|
||||
}
|
||||
state = 3;
|
||||
} else if (line[actual][head] == '%') {
|
||||
if ((head==0) || (line[actual][head - 1] != '\\')) state = 5;
|
||||
}
|
||||
break;
|
||||
case 1: // wordchar
|
||||
if (! is_wordchar(line[actual] + head)) {
|
||||
state = 0;
|
||||
char * t = alloc_token(token, &head);
|
||||
if (t) return t;
|
||||
}
|
||||
break;
|
||||
case 2: // comment, labels, etc
|
||||
if (((i = look_pattern(1)) != -1) &&
|
||||
(strcmp(PATTERN[i].pat[1],PATTERN[pattern_num].pat[1]) == 0)) {
|
||||
state = 0;
|
||||
head += strlen(PATTERN[pattern_num].pat[1]) - 1;
|
||||
}
|
||||
break;
|
||||
case 3: // command
|
||||
if ((tolower(line[actual][head]) < 'a') || (tolower(line[actual][head]) > 'z')) {
|
||||
state = 0;
|
||||
head--;
|
||||
}
|
||||
break;
|
||||
case 4: // command with arguments
|
||||
if (slash && (line[actual][head] != '\0')) {
|
||||
slash = 0;
|
||||
head++;
|
||||
break;
|
||||
} else if (line[actual][head]=='\\') {
|
||||
slash = 1;
|
||||
} else if ((line[actual][head] == '{') ||
|
||||
((opt) && (line[actual][head] == '['))) {
|
||||
depth++;
|
||||
opt = 0;
|
||||
} else if (line[actual][head] == '}') {
|
||||
depth--;
|
||||
if (depth == 0) {
|
||||
opt = 1;
|
||||
arg++;
|
||||
}
|
||||
if (((depth == 0) && (arg == PATTERN[pattern_num].arg)) ||
|
||||
(depth < 0) ) {
|
||||
state = 0; // XXX not handles the last optional arg.
|
||||
}
|
||||
} else if (line[actual][head] == ']') depth--;
|
||||
} // case
|
||||
if (next_char(line[actual], &head)) {
|
||||
if (state == 5) state = 0;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* parser classes for MySpell
|
||||
*
|
||||
* implemented: text, HTML, TeX
|
||||
*
|
||||
* Copyright (C) 2002, Laszlo Nemeth
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LATEXPARSER_HXX_
|
||||
#define _LATEXPARSER_HXX_
|
||||
|
||||
|
||||
#include "textparser.hxx"
|
||||
|
||||
/*
|
||||
* HTML Parser
|
||||
*
|
||||
*/
|
||||
|
||||
class LaTeXParser : public TextParser
|
||||
{
|
||||
int pattern_num; // number of comment
|
||||
int depth; // depth of blocks
|
||||
int arg; // arguments's number
|
||||
int opt; // optional argument attrib.
|
||||
|
||||
public:
|
||||
|
||||
LaTeXParser(const char * wc);
|
||||
LaTeXParser(unsigned short * wordchars, int len);
|
||||
virtual ~LaTeXParser();
|
||||
|
||||
virtual char * next_token();
|
||||
|
||||
private:
|
||||
|
||||
int look_pattern(int col);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../hunspell/csutil.hxx"
|
||||
#include "manparser.hxx"
|
||||
|
||||
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
ManParser::ManParser() {
|
||||
}
|
||||
|
||||
ManParser::ManParser(const char * wordchars)
|
||||
{
|
||||
init(wordchars);
|
||||
}
|
||||
|
||||
ManParser::ManParser(unsigned short * wordchars, int len)
|
||||
{
|
||||
init(wordchars, len);
|
||||
}
|
||||
|
||||
ManParser::~ManParser()
|
||||
{
|
||||
}
|
||||
|
||||
char * ManParser::next_token()
|
||||
{
|
||||
for (;;) {
|
||||
switch (state)
|
||||
{
|
||||
case 1: // command arguments
|
||||
if (line[actual][head] == ' ') state = 2;
|
||||
break;
|
||||
case 0: // dot in begin of line
|
||||
if (line[actual][0] == '.') {
|
||||
state = 1;
|
||||
break;
|
||||
} else {
|
||||
state = 2;
|
||||
}
|
||||
// no break
|
||||
case 2: // non word chars
|
||||
if (is_wordchar(line[actual] + head)) {
|
||||
state = 3;
|
||||
token = head;
|
||||
} else if ((line[actual][head] == '\\') &&
|
||||
(line[actual][head + 1] == 'f') &&
|
||||
(line[actual][head + 2] != '\0')) {
|
||||
head += 2;
|
||||
}
|
||||
break;
|
||||
case 3: // wordchar
|
||||
if (! is_wordchar(line[actual] + head)) {
|
||||
state = 2;
|
||||
char * t = alloc_token(token, &head);
|
||||
if (t) return t;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (next_char(line[actual], &head)) {
|
||||
state = 0;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* parser classes for MySpell
|
||||
*
|
||||
* implemented: text, HTML, TeX
|
||||
*
|
||||
* Copyright (C) 2002, Laszlo Nemeth
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _MANPARSER_HXX_
|
||||
#define _MANPARSER_HXX_
|
||||
|
||||
#include "textparser.hxx"
|
||||
|
||||
/*
|
||||
* Manparse Parser
|
||||
*
|
||||
*/
|
||||
|
||||
class ManParser : public TextParser
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
public:
|
||||
|
||||
ManParser();
|
||||
ManParser(const char * wc);
|
||||
ManParser(unsigned short * wordchars, int len);
|
||||
virtual ~ManParser();
|
||||
|
||||
virtual char * next_token();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
|
||||
#include "textparser.hxx"
|
||||
#include "htmlparser.hxx"
|
||||
#include "latexparser.hxx"
|
||||
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
FILE * f;
|
||||
/* first parse the command line options */
|
||||
|
||||
if (! argv[1]) {
|
||||
fprintf(stderr,"correct syntax is:\n");
|
||||
fprintf(stderr,"testparser file\n");
|
||||
fprintf(stderr,"example: testparser /dev/stdin\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* open the words to check list */
|
||||
f = fopen(argv[1],"r");
|
||||
if (!f) {
|
||||
fprintf(stderr,"Error - could not open file of words to check\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
TextParser * p = new LaTeXParser("qwertzuiopasdfghjklyxcvbnméáúõûóüöíQWERTZUIOPASDFGHJKLYXCVBNMÍÉÁÕÚÖÜÓÛ");
|
||||
|
||||
char buf[MAXLNLEN];
|
||||
char * next;
|
||||
|
||||
while(fgets(buf,MAXLNLEN,f)) {
|
||||
fprintf(stdout,"---------------------------------------\n");
|
||||
p->put_line(buf);
|
||||
fprintf(stderr, "x:%s\n", buf);
|
||||
p->set_url_checking(1);
|
||||
while ((next=p->next_token())) {
|
||||
fprintf(stdout,"token: %s\n",next);
|
||||
free(next);
|
||||
}
|
||||
}
|
||||
|
||||
delete p;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,291 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "../hunspell/csutil.hxx"
|
||||
#include "textparser.hxx"
|
||||
|
||||
#ifndef W32
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
// ISO-8859-1 HTML character entities
|
||||
|
||||
static char * LATIN1[] = {
|
||||
"À",
|
||||
"Ã",
|
||||
"Å",
|
||||
"Æ",
|
||||
"È",
|
||||
"Ê",
|
||||
"Ì",
|
||||
"Ï",
|
||||
"Ð",
|
||||
"Ñ",
|
||||
"Ò",
|
||||
"Ø",
|
||||
"Ù",
|
||||
"Þ",
|
||||
"à",
|
||||
"ã",
|
||||
"å",
|
||||
"æ",
|
||||
"è",
|
||||
"ê",
|
||||
"ì",
|
||||
"ï",
|
||||
"ð",
|
||||
"ñ",
|
||||
"ò",
|
||||
"ø",
|
||||
"ù",
|
||||
"þ",
|
||||
"ÿ"
|
||||
};
|
||||
|
||||
#define LATIN1_LEN (sizeof(LATIN1) / sizeof(char *))
|
||||
|
||||
TextParser::TextParser() {
|
||||
init((char *) NULL);
|
||||
}
|
||||
|
||||
TextParser::TextParser(const char * wordchars)
|
||||
{
|
||||
init(wordchars);
|
||||
}
|
||||
|
||||
TextParser::TextParser(unsigned short * wordchars, int len)
|
||||
{
|
||||
init(wordchars, len);
|
||||
}
|
||||
|
||||
TextParser::~TextParser()
|
||||
{
|
||||
}
|
||||
|
||||
int TextParser::is_wordchar(char * w)
|
||||
{
|
||||
if (*w == '\0') return 0;
|
||||
if (utf8) {
|
||||
w_char wc;
|
||||
unsigned short idx;
|
||||
u8_u16(&wc, 1, w);
|
||||
idx = (wc.h << 8) + wc.l;
|
||||
return (unicodeisalpha(idx) || (wordchars_utf16 && flag_bsearch(wordchars_utf16, *((unsigned short *) &wc), wclen)));
|
||||
} else {
|
||||
return wordcharacters[(*w + 256) % 256];
|
||||
}
|
||||
}
|
||||
|
||||
char * TextParser::get_latin1(char * s)
|
||||
{
|
||||
if (s[0] == '&') {
|
||||
unsigned int i = 0;
|
||||
while ((i < LATIN1_LEN) &&
|
||||
strncmp(LATIN1[i], s, strlen(LATIN1[i]))) i++;
|
||||
if (i != LATIN1_LEN) return LATIN1[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void TextParser::init(const char * wordchars)
|
||||
{
|
||||
for (int i = 0; i < MAXPREVLINE; i++) {
|
||||
line[i][0] = '\0';
|
||||
}
|
||||
actual = 0;
|
||||
head = 0;
|
||||
token = 0;
|
||||
state = 0;
|
||||
utf8 = 0;
|
||||
checkurl = 0;
|
||||
unsigned int j;
|
||||
for (j = 0; j < 256; j++) {
|
||||
wordcharacters[j] = 0;
|
||||
}
|
||||
if (!wordchars) wordchars = "qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM";
|
||||
for (j = 0; j < strlen(wordchars); j++) {
|
||||
wordcharacters[(wordchars[j] + 256) % 256] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void TextParser::init(unsigned short * wc, int len)
|
||||
{
|
||||
for (int i = 0; i < MAXPREVLINE; i++) {
|
||||
line[i][0] = '\0';
|
||||
}
|
||||
actual = 0;
|
||||
head = 0;
|
||||
token = 0;
|
||||
state = 0;
|
||||
utf8 = 1;
|
||||
checkurl = 0;
|
||||
wordchars_utf16 = wc;
|
||||
wclen = len;
|
||||
}
|
||||
|
||||
int TextParser::next_char(char * line, int * pos) {
|
||||
if (*(line + *pos) == '\0') return 1;
|
||||
if (utf8) {
|
||||
if (*(line + *pos) >> 7) {
|
||||
// jump to next UTF-8 character
|
||||
for((*pos)++; (*(line + *pos) & 0xc0) == 0x80; (*pos)++);
|
||||
} else {
|
||||
(*pos)++;
|
||||
}
|
||||
} else (*pos)++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void TextParser::put_line(char * word)
|
||||
{
|
||||
actual = (actual + 1) % MAXPREVLINE;
|
||||
strcpy(line[actual], word);
|
||||
token = 0;
|
||||
head = 0;
|
||||
check_urls();
|
||||
}
|
||||
|
||||
char * TextParser::get_prevline(int n)
|
||||
{
|
||||
return mystrdup(line[(actual + MAXPREVLINE - n) % MAXPREVLINE]);
|
||||
}
|
||||
|
||||
char * TextParser::get_line()
|
||||
{
|
||||
return get_prevline(0);
|
||||
}
|
||||
|
||||
char * TextParser::next_token()
|
||||
{
|
||||
char * latin1;
|
||||
|
||||
for (;;) {
|
||||
switch (state)
|
||||
{
|
||||
case 0: // non word chars
|
||||
if (is_wordchar(line[actual] + head)) {
|
||||
state = 1;
|
||||
token = head;
|
||||
} else if ((latin1 = get_latin1(line[actual] + head))) {
|
||||
state = 1;
|
||||
token = head;
|
||||
head += strlen(latin1);
|
||||
}
|
||||
break;
|
||||
case 1: // wordchar
|
||||
if ((latin1 = get_latin1(line[actual] + head))) {
|
||||
head += strlen(latin1);
|
||||
} else if (! is_wordchar(line[actual] + head)) {
|
||||
state = 0;
|
||||
char * t = alloc_token(token, &head);
|
||||
if (t) return t;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (next_char(line[actual], &head)) return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int TextParser::get_tokenpos()
|
||||
{
|
||||
return token;
|
||||
}
|
||||
|
||||
int TextParser::change_token(const char * word)
|
||||
{
|
||||
if (word) {
|
||||
char * r = mystrdup(line[actual] + head);
|
||||
strcpy(line[actual] + token, word);
|
||||
strcat(line[actual], r);
|
||||
head = token;
|
||||
free(r);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void TextParser::check_urls()
|
||||
{
|
||||
int url_state = 0;
|
||||
int url_head = 0;
|
||||
int url_token = 0;
|
||||
int url = 0;
|
||||
for (;;) {
|
||||
switch (url_state)
|
||||
{
|
||||
case 0: // non word chars
|
||||
if (is_wordchar(line[actual] + url_head)) {
|
||||
url_state = 1;
|
||||
url_token = url_head;
|
||||
// Unix path
|
||||
} else if (*(line[actual] + url_head) == '/') {
|
||||
url_state = 1;
|
||||
url_token = url_head;
|
||||
url = 1;
|
||||
}
|
||||
break;
|
||||
case 1: // wordchar
|
||||
char ch = *(line[actual] + url_head);
|
||||
// e-mail address
|
||||
if ((ch == '@') ||
|
||||
// MS-DOS, Windows path
|
||||
(strncmp(line[actual] + url_head, ":\\", 2) == 0) ||
|
||||
// URL
|
||||
(strncmp(line[actual] + url_head, "://", 3) == 0)) {
|
||||
url = 1;
|
||||
} else if (! (is_wordchar(line[actual] + url_head) ||
|
||||
(ch == '-') || (ch == '_') || (ch == '\\') ||
|
||||
(ch == '.') || (ch == ':') || (ch == '/') ||
|
||||
(ch == '~') || (ch == '%') || (ch == '*') ||
|
||||
(ch == '$') || (ch == '[') || (ch == ']') ||
|
||||
(ch == '?') || (ch == '!') ||
|
||||
((ch >= '0') && (ch <= '9')))) {
|
||||
url_state = 0;
|
||||
if (url == 1) {
|
||||
for (int i = url_token; i < url_head; i++) {
|
||||
*(urlline + i) = 1;
|
||||
}
|
||||
}
|
||||
url = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
*(urlline + url_head) = 0;
|
||||
if (next_char(line[actual], &url_head)) return;
|
||||
}
|
||||
}
|
||||
|
||||
int TextParser::get_url(int token_pos, int * head)
|
||||
{
|
||||
for (int i = *head; urlline[i] && *(line[actual]+i); i++, (*head)++);
|
||||
return checkurl ? 0 : urlline[token_pos];
|
||||
}
|
||||
|
||||
void TextParser::set_url_checking(int check)
|
||||
{
|
||||
checkurl = check;
|
||||
}
|
||||
|
||||
|
||||
char * TextParser::alloc_token(int token, int * head)
|
||||
{
|
||||
if (get_url(token, head)) return NULL;
|
||||
char * t = (char *) malloc(*head - token + 1);
|
||||
if (t) {
|
||||
t[*head - token] = '\0';
|
||||
strncpy(t, line[actual] + token, *head - token);
|
||||
// remove colon for Finnish and Swedish language
|
||||
if (t[*head - token - 1] == ':') {
|
||||
t[*head - token - 1] = '\0';
|
||||
if (!t[0]) {
|
||||
free(t);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
fprintf(stderr,"Error - Insufficient Memory\n");
|
||||
return NULL;
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* parser classes for MySpell
|
||||
*
|
||||
* implemented: text, HTML, TeX
|
||||
*
|
||||
* Copyright (C) 2002, Laszlo Nemeth
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TEXTPARSER_HXX_
|
||||
#define _TEXTPARSER_HXX_
|
||||
|
||||
// set sum of actual and previous lines
|
||||
#define MAXPREVLINE 4
|
||||
|
||||
#ifndef MAXLNLEN
|
||||
#define MAXLNLEN 8192
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Base Text Parser
|
||||
*
|
||||
*/
|
||||
|
||||
class TextParser
|
||||
{
|
||||
|
||||
protected:
|
||||
void init(const char *);
|
||||
void init(unsigned short * wordchars, int len);
|
||||
int wordcharacters[256]; // for detection of the word boundaries
|
||||
char line[MAXPREVLINE][MAXLNLEN]; // parsed and previous lines
|
||||
char urlline[MAXLNLEN]; // mask for url detection
|
||||
int checkurl;
|
||||
int actual; // actual line
|
||||
int head; // head position
|
||||
int token; // begin of token
|
||||
int state; // state of automata
|
||||
int utf8; // UTF-8 character encoding
|
||||
int next_char(char * line, int * pos);
|
||||
unsigned short * wordchars_utf16;
|
||||
int wclen;
|
||||
|
||||
public:
|
||||
|
||||
TextParser();
|
||||
TextParser(unsigned short * wordchars, int len);
|
||||
TextParser(const char * wc);
|
||||
virtual ~TextParser();
|
||||
|
||||
void put_line(char * line);
|
||||
char * get_line();
|
||||
char * get_prevline(int n);
|
||||
virtual char * next_token();
|
||||
int change_token(const char * word);
|
||||
void set_url_checking(int check);
|
||||
|
||||
int get_tokenpos();
|
||||
int is_wordchar(char * w);
|
||||
char * get_latin1(char * s);
|
||||
char * next_char();
|
||||
int tokenize_urls();
|
||||
void check_urls();
|
||||
int get_url(int token_pos, int * head);
|
||||
char * alloc_token(int token, int * head);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,2,1,0
|
||||
PRODUCTVERSION 1,2,1,0
|
||||
FILEFLAGSMASK 0x17L
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Hunspell (http://hunspell.sourceforge.net/) by László Németh"
|
||||
VALUE "CompanyName", "http://hunspell.sourceforge.net/"
|
||||
VALUE "FileDescription", "libhunspell"
|
||||
VALUE "FileVersion", "1.2.1"
|
||||
VALUE "InternalName", "libhunspell"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2007"
|
||||
VALUE "OriginalFilename", "libhunspell.dll"
|
||||
VALUE "ProductName", "Hunspell Dynamic Link Library"
|
||||
VALUE "ProductVersion", "1.2.1"
|
||||
END
|
||||
END
|
||||
END
|
|
@ -0,0 +1,215 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
#define CRAY_STACKSEG_END 1
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#define C_ALLOCA 1
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the <argz.h> header file. */
|
||||
#define HAVE_ARGZ_H 1
|
||||
|
||||
/* "Define if you have the <curses.h> header" */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
#define HAVE_DCGETTEXT 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the <error.h> header file. */
|
||||
#define HAVE_ERROR_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the `feof_unlocked' function. */
|
||||
#define HAVE_FEOF_UNLOCKED 1
|
||||
|
||||
/* Define to 1 if you have the `fgets_unlocked' function. */
|
||||
#define HAVE_FGETS_UNLOCKED 1
|
||||
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the `getc_unlocked' function. */
|
||||
#define HAVE_GETC_UNLOCKED 1
|
||||
|
||||
/* Define to 1 if you have the `getegid' function. */
|
||||
#define HAVE_GETEGID 1
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define to 1 if you have the `getgid' function. */
|
||||
#define HAVE_GETGID 1
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#define HAVE_GETTEXT 1
|
||||
|
||||
/* Define to 1 if you have the `getuid' function. */
|
||||
#define HAVE_GETUID 1
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
#define HAVE_LANGINFO_CODESET 1
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#define HAVE_LC_MESSAGES 1
|
||||
|
||||
/* Define to 1 if you have the <libintl.h> header file. */
|
||||
#define HAVE_LIBINTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#define HAVE_MALLOC 1
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the `memchr' function. */
|
||||
#define HAVE_MEMCHR 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mempcpy' function. */
|
||||
#define HAVE_MEMPCPY 1
|
||||
|
||||
/* Define to 1 if you have a working `mmap' system call. */
|
||||
#define HAVE_MMAP 1
|
||||
|
||||
/* Define to 1 if you have the `munmap' function. */
|
||||
#define HAVE_MUNMAP 1
|
||||
|
||||
/* "Define if you have the <ncursesw/curses.h> header" */
|
||||
#define HAVE_NCURSESW_H 1
|
||||
|
||||
/* Define to 1 if you have the <nl_types.h> header file. */
|
||||
#define HAVE_NL_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#define HAVE_PUTENV 1
|
||||
|
||||
/* "Define if you have fancy command input editing with Readline" */
|
||||
#undef HAVE_READLINE
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#define HAVE_SETENV 1
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `stpcpy' function. */
|
||||
#define HAVE_STPCPY 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the `strtoul' function. */
|
||||
#define HAVE_STRTOUL 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `tsearch' function. */
|
||||
#define HAVE_TSEARCH 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `__argz_count' function. */
|
||||
#define HAVE___ARGZ_COUNT 1
|
||||
|
||||
/* Define to 1 if you have the `__argz_next' function. */
|
||||
#define HAVE___ARGZ_NEXT 1
|
||||
|
||||
/* Define to 1 if you have the `__argz_stringify' function. */
|
||||
#define HAVE___ARGZ_STRINGIFY 1
|
||||
|
||||
/* "Define if you use exterimental functions" */
|
||||
#undef HUNSPELL_EXPERIMENTAL
|
||||
|
||||
/* "Define if you need warning messages" */
|
||||
#undef HUNSPELL_WARNING_ON
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#define ICONV_CONST 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.1.11"
|
||||
#define VERSION "1.1.11"
|
|
@ -0,0 +1,112 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* Copyright (C) 2006
|
||||
* Miha Vrhovnik (http://simail.sf.net, http://xcollect.sf.net)
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** **/
|
||||
#include "hunspelldll.h"
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef BORLAND
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
DLLEXPORT void * hunspell_initialize(char *aff_file, char *dict_file)
|
||||
{
|
||||
Hunspell * pMS = new Hunspell(aff_file, dict_file);
|
||||
return pMS;
|
||||
}
|
||||
|
||||
DLLEXPORT void hunspell_uninitialize(Hunspell *pMS)
|
||||
{
|
||||
delete pMS;
|
||||
}
|
||||
|
||||
DLLEXPORT int hunspell_spell(Hunspell *pMS, char *word)
|
||||
{
|
||||
return pMS->spell(word);
|
||||
}
|
||||
|
||||
DLLEXPORT int hunspell_suggest(Hunspell *pMS, char *word, char ***slst)
|
||||
{
|
||||
return pMS->suggest(slst, word);
|
||||
}
|
||||
|
||||
#ifdef HUNSPELL_EXPERIMENTAL
|
||||
DLLEXPORT int hunspell_suggest_auto(Hunspell *pMS, char *word, char ***slst)
|
||||
{
|
||||
return pMS->suggest_auto(slst, word);
|
||||
}
|
||||
#endif
|
||||
|
||||
DLLEXPORT void hunspell_suggest_free(Hunspell *pMS, char **slst, int len)
|
||||
{
|
||||
for (int i = 0; i < len; i++) {
|
||||
free(slst[i]);
|
||||
}
|
||||
}
|
||||
|
||||
DLLEXPORT char * hunspell_get_dic_encoding(Hunspell *pMS)
|
||||
{
|
||||
return pMS->get_dic_encoding();
|
||||
}
|
||||
|
||||
DLLEXPORT int hunspell_put_word(Hunspell *pMS, char *word)
|
||||
{
|
||||
return pMS->add(word);
|
||||
}
|
||||
|
||||
|
||||
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
|
||||
DWORD reason /* Reason this function is being called. */ ,
|
||||
LPVOID reserved /* Not used. */ )
|
||||
{
|
||||
switch (reason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
}
|
||||
|
||||
/* Returns TRUE on success, FALSE on failure */
|
||||
return TRUE;
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* Copyright (C) 2006
|
||||
* Miha Vrhovnik (http://simail.sf.net, http://xcollect.sf.net)
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** **/
|
||||
#include "hunspell.hxx"
|
||||
|
||||
#ifndef _DLL_H_
|
||||
#define _DLL_H_
|
||||
|
||||
#ifdef HUNSPELL_STATIC
|
||||
#define DLLEXPORT
|
||||
#else
|
||||
#ifdef HUNSPELL_EXPORTS
|
||||
#define DLLEXPORT __declspec( dllexport )
|
||||
#else
|
||||
#define DLLEXPORT __declspec( dllimport )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//returns pointer to spell object, params are aff file name and dict file name
|
||||
DLLEXPORT void *hunspell_initialize(char *aff_file, char *dict_file);
|
||||
//frees spell object
|
||||
DLLEXPORT void hunspell_uninitialize(Hunspell *pMS);
|
||||
//spellcheck word, returns 1 if word ok otherwise 0
|
||||
DLLEXPORT int hunspell_spell(Hunspell *pMS, char *word);
|
||||
//suggest words for word, returns number of words in slst
|
||||
// YOU NEED TO CALL hunspell_suggest_free after you've done with words
|
||||
DLLEXPORT int hunspell_suggest(Hunspell *pMS, char *word, char ***slst);
|
||||
DLLEXPORT int hunspell_suggest_auto(Hunspell *pMS, char *word, char ***slst);
|
||||
//free slst array
|
||||
DLLEXPORT void hunspell_suggest_free(Hunspell *pMS, char **slst, int len);
|
||||
//make local copy of returned string!!
|
||||
DLLEXPORT char * hunspell_get_dic_encoding(Hunspell *pMS);
|
||||
//add word to dict (word is valid until spell object is not destroyed)
|
||||
DLLEXPORT int hunspell_put_word(Hunspell *pMS, char *word);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DLL_H_ */
|
|
@ -0,0 +1,292 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="libhunspell"
|
||||
ProjectGUID="{53609BB3-D874-465C-AF7B-DF626DB0D89B}"
|
||||
RootNamespace="Hunspell"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(ProjectName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\hunspell;."
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\lib\libhunspell_d.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(ProjectName)"
|
||||
IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
InlineFunctionExpansion="2"
|
||||
AdditionalIncludeDirectories="..\hunspell;."
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
|
||||
WarningLevel="4"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\..\..\lib\libhunspell.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
SuppressStartupBanner="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="_Main"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Hunspell.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hunspelldll.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hunspelldll.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="hunspell"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\hunspell\affentry.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\affentry.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\affixmgr.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\affixmgr.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\atypes.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\baseaffix.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\csutil.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\csutil.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\dictmgr.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\dictmgr.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\hashmgr.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\hashmgr.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\htypes.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\hunspell.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\hunspell.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\hunspell.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\langnum.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\phonet.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\phonet.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\suggestmgr.cxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\suggestmgr.hxx"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\hunspell\utf_info.cxx"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
Loading…
Reference in New Issue