import changes from `dev' branch of rmottola/Arctic-Fox:

- bits of Bug 571294 - Part 1: Implement selection events (8af4ef3f65)
- Bug 1208885 - Remove mozGenericWordUtils; r=smaug (b1a529f772)
- fix nsRefPtr/RefPtr (c56979e04d)
- Bug 1243657 spellchecker should check if IME composition works as deleting whole text r=ehsan (8b4d4825b9)
- Bug 1137544 - New scripts to upgrade en-US.dic to the latest upstream version; r=ehsan (47150b3549)
- Bug 1137544 - Upgrade en-US.dic dictionary to upstream version 2015.02.15; r=ehsan (057540f06b)
- Bug 1137544 - Generate 5-mozilla-added and 5-mozilla-removed to aid in submitting changes upstream; r=ehsan (f0d6332df3)
- Bug 1137544 - Update the en-US dictionary based on the SCOWL 2015.04.24 wordlist using the new scripts (e87b0a0285)
- minor test alignment (f3e976adf2)
- Bug 1162823 - Do not treat non-Latin words as misspelled; r=ekanan (c298db7251)
- Bug 1160730 - Add composited, compositing and compositeness to the en-US dictionary. r=ehsan (7d62babbdb)
- Bug 1167912 - Add eldritch to the en-US dictionary. r=ehsan (4d1e08e03b)
- Bug 1168802 - Update the en-US dictionary to SCOWL 2015.05.18 (3daa6d0831)
- Bug 1183765 - Add crappiness to our en-US dictionary. r=ehsan (54ccd28fa2)
- Bug 1192054 - Add subsumption to the en-US dictionary. r=ehsan (8c5aaa92bc)
- Bug 1199540 - Update the en-US dictionary to SCOWL 2015.08.24 (cb21d0092d)
- Bug 1200508 - Add dialogs to the en-US dictionary. r=ehsan (1e69b4d574)
- Bug 1202600 - Add Fukushima to the en-US dictionary. r=ehsan (6ffca1c47b)
- Bug 1213765 - Add preliminarily to the en-US dictionary. r=ehsan (cb12d4979b)
- Bug 1228174 - Add validator to the en-US dictionary. r=ehsan (b356d7f5cb)
- Bug 1199532 - Add disassembly, disassembler to the en-US dictionary. r=ehsan (979bb4f997)
- Bug 1235506 - Correct 353 entries in the en-US dictionary. r=ehsan (efb2f4a890)
- Bug 1238031 - Fix make-new-dict to use a custom en_US dictionary that adds common variants and accented words. r=ehsan (39464a234f)
- Bug 301712 - Remove uncommon proper names, remove unneeded words. r=ehsan (a6ece3925f)
- Bug 1240916 - Part 2: Update the en-US dictionary to SCOWL 2016.01.19 (bb059318e5)
- Bug 1196784 - imageset will use permissions.default.image. r=jdm (9a5669f71f)
- Bug 1182727 - Part 16: Fix a bug in build_tar_package (1d8f444eba)
- Bug 1182727 - Part 19: Fix another stupid mistake in build_tar_package() (87bb241693)
- Bug 1261264 - Apply GCC PR64905 to fix miscompilation with -fomit-frame-pointer. r=froydnj (d746a0c878)
- missing option, for safety (6fba93dff9)
- Bug 1260605 - Remove hack from bug 967556. r=nalexander (9513dbcd26)
- Bug 1239789 - Add secondary buffers to zxx_stream::StaticAllocator to handle reentrancy. r=glandium (74b60ffaad)
- Bug 1260351 - MozGlue: Build: Add mips support. r=glandium (8a463032f6)
- Bug 1249849: Ensure that we can always reach malloc_decl.h even when MOZ_REPLACE_ALLOC is not defined; r=glandium (1a8d0356ac)
- Bug 1248915 - TSan: data race on global 'mozilla::net::CacheObserver::sDiskCacheCapacity'. r=honzab.moz, n.nethercote. (86769cd893)
- Bug 1249157 - prefapi enums into class enums, explicit conversion, cleanup. r=bsmedberg (1843c09593)
- Bug 1251393: Remove a duplicated line. r=me (c2bca1a4f4)
This commit is contained in:
2024-07-10 14:39:20 +08:00
parent d90bc03678
commit 2c8ca451b9
59 changed files with 21862 additions and 34771 deletions
-1
View File
@@ -16,7 +16,6 @@ dnl declares it, while the test itself is just expecting the function not to be
dnl declared at all, and declares it differently (which doesn't matter for the
dnl test itself).
dnl More recent versions of autoconf are essentially doing this.
define([ac_cv_func_], [ac_cv_func2_])dnl
define([_AC_CHECK_FUNC],defn([AC_CHECK_FUNC]))dnl
define([AC_CHECK_FUNC], [dnl
patsubst(_AC_CHECK_FUNC($@), [#include.*$], [#define $1 innocuous_$1
+5 -1
View File
@@ -52,7 +52,11 @@ def with_env(env, f):
def build_tar_package(tar, name, base, directory):
name = os.path.realpath(name)
run_in(base, [tar, "-cjf", name, directory])
run_in(base, [tar,
"-c",
"-%s" % ("J" if ".xz" in name else "j"),
"-f",
name, directory])
def svn_co(url, directory, revision):
+11
View File
@@ -0,0 +1,11 @@
--- trunk/gcc/lra-eliminations.c 2015/02/04 20:00:48 220415
+++ trunk/gcc/lra-eliminations.c 2015/02/04 20:02:21 220416
@@ -182,6 +182,8 @@
if (! value
&& ep->from == FRAME_POINTER_REGNUM && ep->to == STACK_POINTER_REGNUM)
frame_pointer_needed = 1;
+ if (!frame_pointer_needed)
+ REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = 0;
}
/* Map: eliminable "from" register -> its current elimination,
+2
View File
@@ -34,6 +34,8 @@ patch -p1 < $gcc_bt_patch || exit 1
patch -p0 < $gcc_pr55650_patch || exit 1
patch -p1 < "${this_path}/PR64905.patch" || exit 1
cd ..
mkdir gcc-objdir
cd gcc-objdir
+1
View File
@@ -21,6 +21,7 @@ export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-debug-symbols
ac_add_options --disable-install-strip
ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
ac_add_options --disable-elf-hack
# Avoid dependency on libstdc++ 4.7
+1 -1
View File
@@ -1026,7 +1026,7 @@ interface nsIDocShell : nsIDocShellTreeItem
* If deviceSizeIsPageSize is set to true, device-width/height media queries
* will be calculated from the page size, not the device size.
*
* Used by the Responsive Design View and B2G Simulator.
* Used by the Responsive Design Mode and B2G Simulator.
*
* Default is False.
* Default value can be overriden with
+1 -1
View File
@@ -28,6 +28,7 @@ namespace dom {
class DocumentFragment;
class DOMRect;
class DOMRectList;
class Selection;
} // namespace dom
} // namespace mozilla
@@ -346,7 +347,6 @@ protected:
bool mIsPositioned : 1;
bool mIsDetached : 1;
bool mMaySpanAnonymousSubtrees : 1;
bool mInSelection : 1;
bool mIsGenerated : 1;
bool mStartOffsetWasIncremented : 1;
bool mEndOffsetWasIncremented : 1;
+1
View File
@@ -156,6 +156,7 @@ partial interface Document {
[Pref="dom.select_events.enabled"]
attribute EventHandler onselectionchange;
/**
* True if this document is synthetic : stand alone image, video, audio file,
* etc.
+10 -4
View File
@@ -42,7 +42,7 @@ skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-input-property-d
skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== spellcheck-textarea-attr.html spellcheck-textarea-nofocus-ref.html
#the random-if(Android) tests pass on android native, but fail on android-xul, see bug 728942
skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) random-if(Android) needs-focus != spellcheck-textarea-attr.html spellcheck-textarea-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
needs-focus == spellcheck-textarea-focused.html spellcheck-textarea-ref.html
needs-focus == spellcheck-textarea-focused-reframe.html spellcheck-textarea-ref.html
needs-focus == spellcheck-textarea-focused-notreadonly.html spellcheck-textarea-ref2.html
@@ -74,10 +74,16 @@ skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-hyphen-invalid.h
skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-multiple-invalid-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== spellcheck-dotafterquote-valid.html spellcheck-dotafterquote-valid-ref.html
== spellcheck-url-valid.html spellcheck-url-valid-ref.html
needs-focus == spellcheck-non-latin-arabic.html spellcheck-non-latin-arabic-ref.html
needs-focus == spellcheck-non-latin-chinese-simplified.html spellcheck-non-latin-chinese-simplified-ref.html
needs-focus == spellcheck-non-latin-chinese-traditional.html spellcheck-non-latin-chinese-traditional-ref.html
needs-focus == spellcheck-non-latin-hebrew.html spellcheck-non-latin-hebrew-ref.html
needs-focus == spellcheck-non-latin-japanese.html spellcheck-non-latin-japanese-ref.html
needs-focus == spellcheck-non-latin-korean.html spellcheck-non-latin-korean-ref.html
== unneeded_scroll.html unneeded_scroll-ref.html
skip-if(B2G||Mulet) == caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
fuzzy-if(browserIsRemote,255,3) asserts-if(browserIsRemote,0-1) skip-if(B2G||Mulet) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) fuzzy-if(asyncPan&&!layersGPUAccelerated,102,2824) == 642800.html 642800-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
skip-if(B2G||Mulet) fuzzy-if(asyncPanZoom&&!layersGPUAccelerated,102,2824) == 642800.html 642800-ref.html # Initial mulet triage: parity with B2G/B2G Desktop
== selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html
!= selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html
!= selection_visibility_after_reframe-3.html selection_visibility_after_reframe-ref.html
@@ -99,7 +105,7 @@ skip-if(Android||B2G||Mulet) needs-focus == 462758-grabbers-resizers.html 462758
needs-focus == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
skip-if(B2G||Mulet) fails-if(Android) needs-focus != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658 # Initial mulet triage: parity with B2G/B2G Desktop
needs-focus pref(selectioncaret.enabled,false) == 824080-1.html 824080-1-ref.html
needs-focus == 824080-2.html 824080-2-ref.html
needs-focus pref(selectioncaret.enabled,false) == 824080-2.html 824080-2-ref.html
needs-focus pref(selectioncaret.enabled,false) == 824080-3.html 824080-3-ref.html
needs-focus != 824080-2.html 824080-3.html
needs-focus pref(selectioncaret.enabled,false) == 824080-4.html 824080-4-ref.html
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus spellcheck="false">سلام</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus>سلام</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus spellcheck="false">你好</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus>你好</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus spellcheck="false">你好</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus>你好</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus spellcheck="false">שלום</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus>שלום</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus spellcheck="false">こんにちは</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus>こんにちは</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus spellcheck="false">안녕하세요</textarea>
</body>
</html>
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<textarea autofocus>안녕하세요</textarea>
</body>
</html>
+1 -1
View File
@@ -44,7 +44,7 @@ static const char *kTypeString[] = {
"xslt",
"beacon",
"fetch",
"imageset",
"image",
"manifest",
"", // TYPE_INTERNAL_SCRIPT
"", // TYPE_INTERNAL_WORKER
@@ -1,35 +1,97 @@
2008-12-05 Release
en_US-mozilla Hunspell Dictionary
Generated from SCOWL Version 2016.01.19
Thu Jan 21 14:36:28 EST 2016
README file for en_US and en_CA Hunspell dictionaries
http://wordlist.sourceforge.net
README file for English Hunspell dictionaries derived from SCOWL.
These dictionaries are created using the speller/make-hunspell-dict
dictionary in SCOWL, SVN revision 74.
script in SCOWL.
The following dictionaries are available:
en_US (American)
en_CA (Canadian)
en_GB-ise (British with "ise" spelling)
en_GB-ize (British with "ize" spelling)
en_US-large
en_CA-large
en_GB-large (with both "ise" and "ize" spelling)
The normal (non-large) dictionaries correspond to SCOWL size 60 and,
to encourage consistent spelling, generally only include one spelling
variant for a word. The large dictionaries correspond to SCOWL size
70 and may include multiple spelling for a word when both variants are
considered almost equal. The larger dictionaries however (1) have not
been as carefully checked for errors as the normal dictionaries and
thus may contain misspelled or invalid words; and (2) contain
uncommon, yet valid, words that might cause problems as they are
likely to be misspellings of more common words (for example, "ort" and
"calender").
To get an idea of the difference in size, here are 25 random words
only found in the large dictionary for American English:
Bermejo Freyr's Guenevere Hatshepsut Nottinghamshire arrestment
crassitudes crural dogwatches errorless fetial flaxseeds godroon
incretion jalapeño's kelpie kishkes neuroglias pietisms pullulation
stemwinder stenoses syce thalassic zees
The en_US and en_CA are the official dictionaries for Hunspell. The
en_GB and large dictionaries are made available on an experimental
basis. If you find them useful please send me a quick email at
kevina@gnu.org.
If none of these dictionaries suite you (for example, maybe you want
the normal dictionary that also includes common variants) additional
dictionaries can be generated at http://app.aspell.net/create or by
modifying speller/make-hunspell-dict in SCOWL. Please do let me know
if you end up publishing a customized dictionary.
If a word is not found in the dictionary or a word is there you think
shouldn't be, you can lookup the word up at http://app.aspell.net/lookup
to help determine why that is.
General comments on these list can be sent directly to me at
kevina@gnu.org or to the wordlist-devel mailing lists
(https://lists.sourceforge.net/lists/listinfo/wordlist-devel). If you
have specific issues with any of these dictionaries please file a bug
report at https://github.com/kevina/wordlist/issues.
IMPORTANT CHANGES INTRODUCED IN 2015.04.24:
The dictionaries are now in UTF-8 format instead of ISO-8859-1. This
was required to handle smart quotes correctly.
IMPORTANT CHANGES INTRODUCED IN 2016.01.19:
"SET UTF8" was changes to "SET UTF-8" in the affix file as some
versions of Hunspell do not recognize "UTF8".
ADDITIONAL NOTES:
The NOSUGGEST flag was added to certain taboo words. While I made an
honest attempt to flag the strongest taboo words with the NOSUGGEST
flag, I MAKE NO GUARANTEE THAT I FLAGGED EVERY POSSIBLE TABOO WORD.
The list was originally derived from Németh László, however I removed
The list was originally derived from Németh László, however I removed
some words which, while being considered taboo by some dictionaries,
are not really considered swear words in today's society.
You can find SCOWL and friend at http://wordlist.sourceforge.net/.
Bug reports should go to the Issue Tracker found on the previously
mentioned web site. General discussion should go to the
wordlist-devel at sourceforge net mailing list.
COPYRIGHT, SOURCES, and CREDITS:
The en_US and en_CA dictionaries come directly from SCOWL (up to level
60) and is thus under the same copyright of SCOWL. The affix file is
The English dictionaries come directly from SCOWL
and is thus under the same copyright of SCOWL. The affix file is
a heavily modified version of the original english.aff file which was
released as part of Geoff Kuenning's Ispell and as such is covered by
his BSD license. Part of SCOWL is also based on Ispell thus the
Ispell copyright is included with the SCOWL copyright.
The collective work is Copyright 2000-2007 by Kevin Atkinson as well
The collective work is Copyright 2000-2015 by Kevin Atkinson as well
as any of the copyrights mentioned below:
Copyright 2000-2007 by Kevin Atkinson
Copyright 2000-2015 by Kevin Atkinson
Permission to use, copy, modify, distribute and sell these word
lists, the associated scripts, the output created from the scripts,
@@ -140,7 +202,7 @@ The 40 level includes words from Alan's 3esl list found in version 4.0
of his 12dicts package. Like his other stuff the 3esl list is also in the
public domain.
The 50 level includes Brian's frequency class 1, words words appearing
The 50 level includes Brian's frequency class 1, words appearing
in at least 5 of 12 of the dictionaries as indicated in the 12Dicts
package, and uppercase words in at least 4 of the previous 12
dictionaries. A decent number of proper names is also included: The
@@ -162,20 +224,18 @@ The 55 level includes words from Alan's 2of4brif list found in version
4.0 of his 12dicts package. Like his other stuff the 2of4brif is also
in the public domain.
The 60 level includes Brian's frequency class 0 and all words
appearing in at least 2 of the 12 dictionaries as indicated by the
12Dicts package. A large number of names are also included: The 4,946
female names and the 3,897 male names from the MWords package.
The 60 level includes all words appearing in at least 2 of the 12
dictionaries as indicated by the 12Dicts package.
The 70 level includes the 74,550 common dictionary words and the
21,986 names list from the MWords package The common dictionary words,
The 70 level includes Brian's frequency class 0 and the 74,550 common
dictionary words from the MWords package. The common dictionary words,
like those from the 12Dicts package, have had all likely inflections
added. The 70 level also included the 5desk list from version 4.0 of
the 12Dics package which is the public domain
the 12Dics package which is in the public domain.
The 80 level includes the ENABLE word list, all the lists in the
ENABLE supplement package (except for ABLE), the "UK Advanced Cryptics
Dictionary" (UKACD), the list of signature words in from YAWL package,
Dictionary" (UKACD), the list of signature words from the YAWL package,
and the 10,196 places list from the MWords package.
The ENABLE package, mainted by M\Cooper <thegrendel@theriver.com>,
@@ -211,17 +271,18 @@ following copyright:
There are no other restrictions: I would like to see the list
distributed as widely as possible.
The 95 level includes the 354,984 single words and 256,772 compound
words from the MWords package, ABLE.LST from the ENABLE Supplement,
and some additional words found in my part-of-speech database that
were not found anywhere else.
The 95 level includes the 354,984 single words, 256,772 compound
words, 4,946 female names and the 3,897 male names, and 21,986 names
from the MWords package, ABLE.LST from the ENABLE Supplement, and some
additional words found in my part-of-speech database that were not
found anywhere else.
Accent information was taken from UKACD.
My VARCON package was used to create the American, British, and
Canadian word list.
Since the original word lists used used in the VARCON package came
Since the original word lists used in the VARCON package came
from the Ispell distribution they are under the Ispell copyright:
Copyright 1993, Geoff Kuenning, Granada Hills, CA
@@ -257,3 +318,5 @@ from the Ispell distribution they are under the Ispell copyright:
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.
Build Date: Thu Jan 21 14:36:28 EST 2016
@@ -1,33 +1,6 @@
README_mozilla
The dictionary en-US.dic is generated by merging the following dictionaries, in the dictionary-sources subdirectory, using the merge-dictionaries bash script which
automatically patches, merges, sorts, and identifies duplicates.
To edit the dictionary use "dictionary-sources/edit-dictionary".
hunspell-en_US-20081205.dic:
2008-12-05 Release, en_US Hunspell dictionary from http://wordlist.sourceforge.net/
These dictionaries are created using the speller/make-hunspell-dict
dictionary in SCOWL, SVN revision 74.
upstream-hunspell.diff:
Mozilla-specific additions to the upstream Hunspell dictionary. Some of
these changes should be upstreamed, and others should probably just be removed
(bug 499444).
chromium_en_US.dic_delta:
Chromium wordlist autogenerated by Google,
svn - Revision 18580,
of http://src.chromium.org/svn/trunk/src/chrome/third_party/hunspell/dictionaries/en_US.dic_delta
upstream-chromium.diff:
Patches Chromium wordlist, to remove junk and words that are redundant with the
newer Hunspell dictionary we use.
mozilla-specific.txt:
Mozilla-specific words, separated out from Hunspell and Chromium word lists.
"Firefox" goes here. (See bug 237921)
For additional info see dictionary-sources/README.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,74 @@
Bespin
Bespin's
Bonsai
Bonsai's
Bugzilla
Bugzilla's
Camino
Camino's
ChatZilla
ChatZilla's
Composer
Composer's
Fennec
Fennec's
Firefox
Firefox's
Flock
Flock's
Gecko
Gecko's
JavaScript
JavaScript's
Lightning
Lightning's
Mozilla
Mozilla's
NSPR
NSPR's
NSS
NSS's
Necko
Necko's
Netscape
Netscape's
Penelope
Penelope's
Prism
Prism's
Rhino
Rhino's
SeaMonkey
SeaMonkey's
Snowl
Snowl's
Songbird
Songbird's
SpiderMonkey
SpiderMonkey's
Sunbird
Sunbird's
Tamarin
Tamarin's
Thunderbird
Thunderbird's
Tinderbox
Tinderbox's
Ubiquity
Ubiquity's
Venkman
Venkman's
Weave
Weave's
XBL
XBL's
XPCOM
XPCOM's
XPConnect
XPConnect's
XPInstall
XPInstall's
XUL
XUL's
XULRunner
XULRunner's
@@ -0,0 +1,56 @@
ADDING OR REMOVING ENTRIES IN THE DICTIONARY:
To edit the dictionary use "edit-dictionary" and than copy the
resulting "en-US.dic" file info place.
UPGRADING TO A NEW UPSTREAM VERSION:
In order to upgrade to the latest dictionary some scripts found in
SCOWL (the source of the en_US Hunspell dictionary) are used. The
en_US dictionary is also generated from the SCOWL source.
1) Unpack the tarball (tar.gz) version of the latest version of SCOWL
in the current directory and rename the directory from
"scowl-YYYY.MM.DD" to "scowl". You can find the latest version at
http://wordlist.aspell.net/ or
http://sourceforge.net/projects/wordlist/files/SCOWL/
2) Run the script "./make-new-dict" to generate a new dictionary and
make sure it runs without any errors.
3) Do a quick sanity check on the resulting dictionary
"en_US-mozilla.dic". For example make sure the size is about the same
(it should likely be slightly large) as the original dictionary.
4) Once everything is okay copy the new dictionary in place using
"./install-new-dict" and commit the changes.
NOTES ON UPGRADE PROCESS:
The dictionary upgrade scripts work by expanding (i.e. unmunching) the
affix compression dictionaries to create simple wordlists and use
those to generate a new dictionary.
The upgrade script expects the original upstream version to be kept in
the directory "orig".
The install script renames "orig" to "orig-bk" and copies the new
upstream version to "orig". The install script also copies the
original Mozilla dictionary to the "mozilla-bk".
SUBMITTING MOZILLA SPECIFIC CHANGES UPSTREAM:
The upgrade script creates two files that can be reviewed and possible
submitted upstream. The file "5-mozilla-removed" lists words that were
removed in the Mozilla dictionary and the file "5-mozilla-added"
contains the list of words that were added. When submitting new words
upstream Mozilla specific words that are found in "5-mozilla-specific"
(expanded from mozilla-specific.txt) should likely be removed from the list.
ABOUT mozilla-specific.txt:
This file contains Mozilla-specific words that should not be submitted
upstream. For example, "Firefox" goes here. (See bug 237921).
Note that the file 5-mozilla-specific is generated by expanding
mozilla-specific.txt and should not be edited directly.
@@ -1,674 +0,0 @@
Abbas/6
AbeBooks
ACAD/m
AcDbEntity
acetyl
acknowledgement
acknowledgement/7
actin
ActiveX/6
Acura/7
acyl
AddThis/6
adipex
admin/7
ageing
Agilent
agonist
ajax
Alibaba
aliphatic
alkoxy
altitudeMode
aluminium
Amapedia
ambien
america
american
amine
analyse
analysed
Andhra
Anglais
anglais
anime
antisense
antivirus/7
API/7
apoptoses
apoptosis
app/7
Arabidopsis
Arbre/6
arg/7
Arial/6
arXiv/6
aryl/7
Athlon/7
ATPase/6
aurei
aureus
auteur/7
Bacteriol
Bahasa/6
Bancorp
Beckham
Belkin/6
Bellevue/6
benzyl
BibSonomy/6
BibTeX/6
bio/7
biochem
bioinformatic/7
biophys
biosyntheses
biosynthesis
biotech/6
BizRate/6
BlackBerry/6
BlinkList/6
Bloglines/6
blogroll/7
blonde/7
Bloomberg/6
blowjob/30
Bluetooth/6
Bollywood/6
bool/7
Brabois/6
Bracknell
Brasil/6
Buenos
Burkina/6
Caicos/6
Cambridgeshire/6
cancelled
cancelling
carboxylic
CareerBuilder/6
carisoprodol
Carlisle/6
casa
Casio/6
Cassini/6
cDNA
celebs
centro/6
cerevisiae/7
charset/7
Chatham/6
ChemPort/6
Cheney/6
Chennai/6
chloro
Choi/6
Cialis/6
Cingular/6
Cisco/6
Citebase/6
CiteULike/6
Citysearch/6
Clarkson/6
codec/7
codon/7
ColdFusion/6
coli
Comcast/6
Computerworld/6
conf
config/7
Connotea/6
const/7
Coulter/6
Councillor/7
counselled
counselling
Courriel/6
craigslist/6
crore/7
CrossRef/6
cryonic/7
Ctrl
cultivar/7
Cumbria/6
cyber
cysteine/7
cytokine/7
cytokines/7
Dansk
Darfur/6
Dari/6
datasheet/7
datatype/7
Daytona/6
DealTime/6
Debian
dehydrogenase/6
Deloitte/6
Denton/6
desc
Deseret/6
designee
Deutsche/6
Deutschland/6
deze/7
Diaz/6
diff/7
diff/7
Digg/7
Digi
dihydro
Directgov/6
DivX/6
Dorset/6
downloadable
Dreamweaver/6
DSpace/6
DVDs
Easton/6
eBay/6
eBook/7
ECNext/6
eCommerce/6
EconPapers/6
Elsevier/6
Eminem/6
EndNote/6
Endocrinol
Engadget/6
Enron/6
Envirofacts/6
Epinions/6
Epson/6
Ericsson/6
Eukaryota/7
Euro/7
euro/7
eval/7
exon/7
expandera/7
Expedia/6
Facebook/6
Faso/6
Favorited
Feng/6
filmography
FilmSpot/6
financials
FindArticles/6
FindLaw/6
fioricet/7
Firefox/6
Flickr/6
Flickr/6
flyer/7
Forex/6
forma
FreeBSD/6
Freeware/6
freeware/7
FrontPage/6
fundraiser/7
fundraising
fundraising
GaAs
GameBase/6
GameCube/6
GameFAQs/6
GameSpot/6
Garmin/6
gastroenterology
GenBank/6
GeneID/6
genomic
genomic/7
gigabit/7
Giuliani/6
globalization
Gloucestershire/6
GmbH
Google/6
GrainGenes/6
grande
grantor/7
grey
Griffiths/7
guestbook/7
Guildford/6
Hamas/6
handheld/7
Hassan/6
healthcare
hentai
Hertfordshire/6
hexane/7
Hezbollah/6
HighBeam/6
Hillsborough/6
holdem
hotline/7
Hotmail/6
Houghton/6
howto/7
html
httpd/6
hydrocodone/7
IETF/6
IMDb/6
IMDbPro/6
IMDbTV/6
Immunol
inbox/6
indices
indie
Infotrieve/6
Ingenta/6
IngentaConnect/6
init/7
inkjet/7
InterPro/6
Intl
intl
intranet/7
iPhone/6
iPod/6
IPOs
ischemia
ischemic
Italia
Italiano
iTunes/6
Ivoire
Japonica/6
Jelsoft/6
Jiang
Joomla/6
jpeg
judgement
Juni/6
Karnataka/6
kbps
Kerala/6
keygen
Kijiji/6
kinase
Kitts/6
Klicka/6
Klicken/6
KnowledgeStorm/6
Kosovo/6
Kuala/6
labelled/12
Lakers/6
lang
langue/7
Lanka/6
learnt
LegCo/6
Leica/6
Lett/6
Levitra/6
LexisNexis/6
Lexmark/6
Libros/6
licence//101
licencee/7
licences/14
licencing/14
licencor/7
Lincolnshire/6
LinkedIn/6
Listmania/6
LiveJournal/6
localhost
localisation/7
locator/7
Logitech/6
LookSmart/6
Lycos/6
Macau/6
Macromedia/6
mailto
mammalia
manga
Manga/6
MapQuest/6
MasterCard/6
MathML/6
Mbps
McAfee/6
McCann/6
MediaWiki/6
Medline/6
meetup/7
memberlist/7
mesothelioma/6
Metacafe/6
metadata
metadata/7
meth
methoxy
mexico
mgmt/7
microbiol
milf
mins
mitochondria
mitochondrial
mmol
modelling
modelling
Mohammed/6
Motorola/6
Motorsport/7
Mozilla/6
mpeg
mRNA
msgid
msgs
msgstr
multicast
Mumbai/6
murine
musculus
Muze/6
MyCareerBuilder/6
mySimon
MySpace/6
Myspace/6
MySQL/6
MyYahoo/6
Nadu/6
namespace
namespace/7
nano
nanotechnology
Napa/6
Naruto/6
Nasdaq/6
Nederland/7
NetBSD/6
Neurol/6
neurosci
neuroscience/7
Newsvine/6
newswires
NexTag/6
Nextel/6
NGOs/6
nitro
Niue/6
Nokia/6
Norsk/6
Nortel/6
nowrap
Obama/6
offence
offences
offline
offline
offsite
Oleh/6
oligonucleotide
onsite
OpenBSD/6
opensource
OpenURL/6
OpenView/6
organisation
organisational
organisations
organised
Oryza/6
oxidase
Oxley/6
Palau/6
Panasonic/6
Papua/6
param
PARC
PatentStorm/6
Pathol/6
PDAs
PDFs
permalink
permalink/7
permittee
Peterborough/6
Pfam/6
pgSQL
pharma
pharmacol
phentermine
Phentermine/6
Philips/6
phonephone
phosphorylation
Photobucket/6
Photoshop/6
phpBB
physiol
pics
pics
pkgsrc
Placemark/7
playlist/7
playlist/7
PlayStation/6
plugin/7
plugin/7
Polska
Polski
poly
poly
polynucleotide/7
polypeptide/7
popup/7
portlet/7
portlet/7
PostgreSQL/6
PostScript/6
Poynter/6
prev
prev
Prix
PRNewswire/6
proc
proc
prog
Propecia/6
propyl
ProQuest/6
Pseudomonas/7
PubMed/6
Qaeda/6
Quicklinks/6
QuickList/6
QuickMix/6
QuickTime/6
Qwest/6
Rebecca/6
Reddit/6
reductase/6
RePEc/6
RetCode/6
Rhode/6
ringtone/7
Rolex/6
Rolex/6
rotatable
rotatably
Routledge/6
Rumsfeld/6
Saccharomyces/6
Sams/6
Samsung/6
sapiens
Sarbanes/6
sativa
savoir
sbjct
Schwarz/6
Scopus/6
Screenonline/6
screensaver
screenshot/7
searchable
Secunia/6
seleccionar
Sera
serine
setcmykcolor/7
sgml
SharePoint/6
Sharma/6
shemale/30
Shen/6
Shenzhen/6
Shopzilla/6
showtime/7
Shrek/6
Sigmer/7
signalling
signup/7
Simpson/7
Simpy/6
Singh/6
Sion
sitemap/7
sizeof
Skype/6
Slashdot/6
slideshow/7
smartphone/7
SMEs/6
SNPs/6
Solaris/6
Sony/6
Sparc
Spurl/6
spyware/6
spyware/7
Starbucks/6
stent/7
struct/7
StumbleUpon/6
substituent/7
Sunderland/6
Suomi/6
Svenska
Swindon/6
Symantec/6
Symbian/6
synthase/7
sysop/7
tagline/7
Taliban/6
taxa
taxon
Technic/7
techno
technol
Technorati/6
TechRepublic/6
telecom/7
telecom/7
Tesco/6
thaliana
therebetween
timeline/7
TimesSelect/6
Timor/6
titre/7
Topix/6
trackback/7
Tramadol/6
Tramadol/6
transcriptional
transfected
transgenic
travelling
Treo/6
TripAdvisor/6
tRNA/6
TrustPass/6
Tuto/6
TWiki/6
TWiki/6
Uitleg/6
Ultram/6
undef
UniProt/6
URLs
usergroup/7
username/7
username/7
userpic/6
util/7
Utvid/6
valitsemalla
Valium/6
Vandoeuvre/6
vBulletin/6
Vdata/6
Verizon/6
Verizon/6
vertebrata
vertices
Vgroup/6
vhosts
Viagra/6
Vicodin/6
Virol/6
Vodafone/6
VoIP
Warcraft/6
Warwickshire/6
Waterford/6
WebBoard
webcam/7
webcam/7
webcast/7
webcast/7
webdesign/7
weblog/7
weblog/7
webpage/7
Webshots/6
webshots/7
WebSphere/6
Welch/6
whitepaper/7
widescreen/7
WiFi/6
wiki/7
wiki/7
Wikibooks/6
Wikimedia/6
Wikinews/6
WikiPatents/6
Wikipedia/6
Wikiquote/6
Wikisource/6
Wiktionary/6
wildcard/7
Wiltshire/6
wishlist/7
wishlist/7
WordPress/6
workflow/7
workflow/7
WorldCat/6
Xanax/6
Xbox/6
YouTube/6
ZDNet/6
Zhang/6
Zhao/6
Zhou/6
Ziff/6
Zope/6
zShops/6
Zune/6
Zurich/6
@@ -1,38 +0,0 @@
#!/usr/bin/perl
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# dupe-dictionary.pl
#
# This will find all duplicate words in a myspell/hunspell format .dic file.
# It ignores affix rules, so 'One/ADG' = 'One' = 'One/12'
#
# Returns error if dupes are found
use strict;
use warnings;
my %seen;
my $bad = 0;
print "Duplicated entries:\n";
while (<>) {
my $key = (split /([\n\/])/)[0];
if (($key ne "") && (exists $seen{$key})) {
$seen{$key}++;
print "$key\n";
# print ord($key);
$bad++;
} else {
$seen{$key} = 1;
}
}
if ($bad == 0) {
print "None!\n";
} else {
die "Duplicates found!";
}
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -6,29 +6,26 @@
#
# edit-dictionary
# input files:
HUNSPELL_START=hunspell-en_US-20081205.dic
HUNSPELL_DIFF=upstream-hunspell.diff
HUNSPELL_PATCHED=$HUNSPELL_START-patched
HUNSPELL_PATCHED_STRIPPED=$HUNSPELL_PATCHED-stripped
set -e
if [ -z "$EDITOR" ]; then
echo 'Need to set the $EDITOR environment variable to your favorite editor!'
exit 1
fi
# Patch Hunspell ($HUNSPELL_START --> $HUNSPELL_PATCHED)
echo Patching Hunspell dictionary
cp $HUNSPELL_START $HUNSPELL_PATCHED
patch $HUNSPELL_PATCHED $HUNSPELL_DIFF
# Strip the first line that contains the count
tail -n +2 ../en-US.dic > en-US.stripped
# Open the patched hunspell editor and let the user edit it
echo "Now the dictionary is going to be opened for you to edit. When you're done, just quit the editor"
echo -n "Press Enter to begin."
read foo
$EDITOR $HUNSPELL_PATCHED
# Now, store the hunspell diff in the original diff file
diff $HUNSPELL_START $HUNSPELL_PATCHED > $HUNSPELL_DIFF
$EDITOR en-US.stripped
# Add back the line count
wc -l < en-US.stripped | tr -d '[:blank:]' > en-US.dic
LC_ALL=C sort en-US.stripped >> en-US.dic
# Clean up
rm -f $HUNSPELL_PATCHED
rm -f en-US.stripped
@@ -0,0 +1,39 @@
#!/bin/sh
#
# This script copies the new dictionary created by make-new-dict in
# place.
#
set -e
WKDIR="`pwd`"
export SCOWL="$WKDIR/scowl/"
SPELLER="$SCOWL/speller"
set -x
if [ -e orig-bk ]; then echo "$0: directory 'orig-bk' exists." 1>&2 ; exit 0; fi
mv orig orig-bk
mkdir orig
cp $SPELLER/en_US-custom.dic $SPELLER/en_US-custom.aff $SPELLER/README_en_US-custom.txt orig
mkdir mozilla-bk
mv ../en-US.dic ../en-US.aff ../README_en_US.txt mozilla-bk
# Convert the affix file to ISO8859-1
sed -i=bak -e '/^ICONV/d' -e 's/^SET UTF8$/SET ISO8859-1/' en_US-mozilla.aff
# Convert the dictionary to ISO8859-1
mv en_US-mozilla.dic en_US-mozilla-utf8.dic
iconv -f utf-8 -t iso-8859-1 < en_US-mozilla-utf8.dic > en_US-mozilla.dic
cp en_US-mozilla.aff ../en-US.aff
cp en_US-mozilla.dic ../en-US.dic
cp README_en_US-mozilla.txt ../README_en_US.txt
set +x
echo "New dictionary copied into place. Please commit the changes."
@@ -0,0 +1,69 @@
#!/bin/sh
#
# This script creates a new dictionary by expanding the original,
# Mozilla's, and the upstream dictionary to remove affix flags and
# then doing the wordlist equivalent of diff3 to create a new
# dictionary.
#
# The files 2-mozilla-add and 2-mozilla-rem contain words added and
# removed, receptively in the Mozilla dictionary. The final
# dictionary will be in hunspell-en_US-mozilla.zip.
#
set -e
export LANG=C
export LC_ALL=C
export LC_CTYPE=C
export LC_COLLATE=C
WKDIR="`pwd`"
export SCOWL="$WKDIR/scowl/"
ORIG="$WKDIR/orig/"
SPELLER="$SCOWL/speller"
expand() {
grep -v '^[0-9]\+$' | $SPELLER/munch-list expand $1 | sort -u
}
cd $SPELLER
MK_LIST="../mk-list -v1 --accents=both en_US 60"
cat <<EOF > params.txt
With Input Command: $MK_LIST
EOF
# note: output of make-hunspell-dict is utf-8
$MK_LIST | ./make-hunspell-dict -one en_US-custom params.txt > ./make-hunspell-dict.log
cd $WKDIR
# Note: Input and output of "expand" is always iso-8859-1.
# All expanded word list files are thus in iso-8859-1.
expand $SPELLER/en.aff < $SPELLER/en.dic.supp > 0-special # input: ASCII
# input in utf-8, expand expects iso-8859-1 so use iconv
iconv -f utf-8 -t iso-8859-1 $ORIG/en_US-custom.dic | expand $ORIG/en_US-custom.aff > 1-base.txt
expand ../en-US.aff < ../en-US.dic > 2-mozilla.txt # input: iso-8850-1
# input in utf-8, expand expects iso-8859-1 so use iconv
iconv -f utf-8 -t iso-8859-1 $SPELLER/en_US-custom.dic | expand $SPELLER/en_US-custom.aff > 3-upstream.txt
comm -23 1-base.txt 2-mozilla.txt > 2-mozilla-rem
comm -13 1-base.txt 2-mozilla.txt > 2-mozilla-add
comm -23 3-upstream.txt 2-mozilla-rem | cat - 2-mozilla-add | sort -u > 4-patched.txt
# note: output of make-hunspell-dict is utf-8
cat 4-patched.txt | comm -23 - 0-special | $SPELLER/make-hunspell-dict -one en_US-mozilla /dev/null
# sanity check should yield identical results
#comm -23 1-base.txt 3-upstream.txt > 3-upstream-rem
#comm -13 1-base.txt 3-upstream.txt > 3-upstream-add
#comm -23 2-mozilla.txt 3-upstream-rem | cat - 3-upstream-add | sort -u > 4-patched-v2.txt
expand ../en-US.aff < mozilla-specific.txt > 5-mozilla-specific
comm -12 3-upstream.txt 2-mozilla-rem > 5-mozilla-removed
comm -13 3-upstream.txt 2-mozilla-add > 5-mozilla-added
@@ -1,73 +0,0 @@
#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# merge-dictionaries
# 15/Apr/2010, Matt Caywood (caywood@gmail.com)
# input files:
CHROMIUM_START=chromium_en_US.dic_delta
CHROMIUM_DIFF=upstream-chromium.diff
CHROMIUM_PATCHED=$CHROMIUM_START-patched
CHROMIUM_AFFIX_CONVERTED=$CHROMIUM_START-affix-converted
HUNSPELL_START=hunspell-en_US-20081205.dic
HUNSPELL_DIFF=upstream-hunspell.diff
HUNSPELL_PATCHED=$HUNSPELL_START-patched
HUNSPELL_PATCHED_STRIPPED=$HUNSPELL_PATCHED-stripped
MOZILLA_START=mozilla-specific.txt
MERGED_SORTED=merged-list-sorted
MERGED_FINISH=en-US.dic
rm -f $CHROMIUM_PATCHED $CHROMIUM_AFFIX_CONVERTED $HUNSPELL_PATCHED $HUNSPELL_PATCHED_STRIPPED $MERGED_SORTED
rm -f $MERGED_FINISH
# Patch Chromium ($CHROMIUM_START --> $CHROMIUM_PATCHED)
echo Patching Chromium dictionary
cp $CHROMIUM_START $CHROMIUM_PATCHED
patch $CHROMIUM_PATCHED $CHROMIUM_DIFF
# Patch Hunspell ($HUNSPELL_START --> $HUNSPELL_PATCHED)
echo Patching Hunspell dictionary
cp $HUNSPELL_START $HUNSPELL_PATCHED
patch $HUNSPELL_PATCHED $HUNSPELL_DIFF
# Chromium's dictionary uses numeric shortcuts from en-US.aff, so that /7 stands in for /MS etc.
# We need to replace these with the full alphabetic affix rules.
#
# This line just does affix conversions for the 4 rules of over 800(!) they are currently using.
# If in the future more are added, those affixes will need to be converted or else they will not be handled.
echo Updating Chromium affixes
sed -e 's/6/M/g;s/7/MS/g;s/12/U/g;s/30/MS\!/g;s/251/\!/g' $CHROMIUM_PATCHED > $CHROMIUM_AFFIX_CONVERTED
# To check that conversion was correct, just search chromium-affix-converted for any numbers that are left over after conversion.
if (grep [0123456789] $CHROMIUM_AFFIX_CONVERTED); then
warn 'Some affix rules may not have been converted\n\n';
fi
# Strip old word count (first line) from $HUNSPELL_PATCHED
sed '1d' $HUNSPELL_PATCHED > $HUNSPELL_PATCHED_STRIPPED
# Combine dictionaries and sort
echo Combining dictionaries
export LC_ALL=C
sort $CHROMIUM_AFFIX_CONVERTED $HUNSPELL_PATCHED_STRIPPED $MOZILLA_START > $MERGED_SORTED
# Display any dupes.
perl dupe-dictionary.pl $MERGED_SORTED
# If that completed OK, add line count
if [ "$?" = "0" ]; then
linecount=`cat $MERGED_SORTED | wc -l`
echo Adding line count $linecount
echo $linecount | cat - $MERGED_SORTED > $MERGED_FINISH
fi
# Clean up
rm -f $CHROMIUM_PATCHED $CHROMIUM_AFFIX_CONVERTED $HUNSPELL_PATCHED $HUNSPELL_PATCHED_STRIPPED $MERGED_SORTED
@@ -0,0 +1,323 @@
en_US-custom Hunspell Dictionary
Generated from SCOWL Version 2016.01.19
Thu Jan 21 14:36:27 EST 2016
http://wordlist.sourceforge.net
README file for English Hunspell dictionaries derived from SCOWL.
These dictionaries are created using the speller/make-hunspell-dict
script in SCOWL.
The following dictionaries are available:
en_US (American)
en_CA (Canadian)
en_GB-ise (British with "ise" spelling)
en_GB-ize (British with "ize" spelling)
en_US-large
en_CA-large
en_GB-large (with both "ise" and "ize" spelling)
The normal (non-large) dictionaries correspond to SCOWL size 60 and,
to encourage consistent spelling, generally only include one spelling
variant for a word. The large dictionaries correspond to SCOWL size
70 and may include multiple spelling for a word when both variants are
considered almost equal. The larger dictionaries however (1) have not
been as carefully checked for errors as the normal dictionaries and
thus may contain misspelled or invalid words; and (2) contain
uncommon, yet valid, words that might cause problems as they are
likely to be misspellings of more common words (for example, "ort" and
"calender").
To get an idea of the difference in size, here are 25 random words
only found in the large dictionary for American English:
Bermejo Freyr's Guenevere Hatshepsut Nottinghamshire arrestment
crassitudes crural dogwatches errorless fetial flaxseeds godroon
incretion jalapeño's kelpie kishkes neuroglias pietisms pullulation
stemwinder stenoses syce thalassic zees
The en_US and en_CA are the official dictionaries for Hunspell. The
en_GB and large dictionaries are made available on an experimental
basis. If you find them useful please send me a quick email at
kevina@gnu.org.
If none of these dictionaries suite you (for example, maybe you want
the normal dictionary that also includes common variants) additional
dictionaries can be generated at http://app.aspell.net/create or by
modifying speller/make-hunspell-dict in SCOWL. Please do let me know
if you end up publishing a customized dictionary.
If a word is not found in the dictionary or a word is there you think
shouldn't be, you can lookup the word up at http://app.aspell.net/lookup
to help determine why that is.
General comments on these list can be sent directly to me at
kevina@gnu.org or to the wordlist-devel mailing lists
(https://lists.sourceforge.net/lists/listinfo/wordlist-devel). If you
have specific issues with any of these dictionaries please file a bug
report at https://github.com/kevina/wordlist/issues.
IMPORTANT CHANGES INTRODUCED IN 2015.04.24:
The dictionaries are now in UTF-8 format instead of ISO-8859-1. This
was required to handle smart quotes correctly.
IMPORTANT CHANGES INTRODUCED IN 2016.01.19:
"SET UTF8" was changes to "SET UTF-8" in the affix file as some
versions of Hunspell do not recognize "UTF8".
ADDITIONAL NOTES:
The NOSUGGEST flag was added to certain taboo words. While I made an
honest attempt to flag the strongest taboo words with the NOSUGGEST
flag, I MAKE NO GUARANTEE THAT I FLAGGED EVERY POSSIBLE TABOO WORD.
The list was originally derived from Németh László, however I removed
some words which, while being considered taboo by some dictionaries,
are not really considered swear words in today's society.
COPYRIGHT, SOURCES, and CREDITS:
The English dictionaries come directly from SCOWL
and is thus under the same copyright of SCOWL. The affix file is
a heavily modified version of the original english.aff file which was
released as part of Geoff Kuenning's Ispell and as such is covered by
his BSD license. Part of SCOWL is also based on Ispell thus the
Ispell copyright is included with the SCOWL copyright.
The collective work is Copyright 2000-2015 by Kevin Atkinson as well
as any of the copyrights mentioned below:
Copyright 2000-2015 by Kevin Atkinson
Permission to use, copy, modify, distribute and sell these word
lists, the associated scripts, the output created from the scripts,
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appears in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation. Kevin Atkinson makes no representations
about the suitability of this array for any purpose. It is provided
"as is" without express or implied warranty.
Alan Beale <biljir@pobox.com> also deserves special credit as he has,
in addition to providing the 12Dicts package and being a major
contributor to the ENABLE word list, given me an incredible amount of
feedback and created a number of special lists (those found in the
Supplement) in order to help improve the overall quality of SCOWL.
The 10 level includes the 1000 most common English words (according to
the Moby (TM) Words II [MWords] package), a subset of the 1000 most
common words on the Internet (again, according to Moby Words II), and
frequently class 16 from Brian Kelk's "UK English Wordlist
with Frequency Classification".
The MWords package was explicitly placed in the public domain:
The Moby lexicon project is complete and has
been place into the public domain. Use, sell,
rework, excerpt and use in any way on any platform.
Placing this material on internal or public servers is
also encouraged. The compiler is not aware of any
export restrictions so freely distribute world-wide.
You can verify the public domain status by contacting
Grady Ward
3449 Martha Ct.
Arcata, CA 95521-4884
grady@netcom.com
grady@northcoast.com
The "UK English Wordlist With Frequency Classification" is also in the
Public Domain:
Date: Sat, 08 Jul 2000 20:27:21 +0100
From: Brian Kelk <Brian.Kelk@cl.cam.ac.uk>
> I was wondering what the copyright status of your "UK English
> Wordlist With Frequency Classification" word list as it seems to
> be lacking any copyright notice.
There were many many sources in total, but any text marked
"copyright" was avoided. Locally-written documentation was one
source. An earlier version of the list resided in a filespace called
PUBLIC on the University mainframe, because it was considered public
domain.
Date: Tue, 11 Jul 2000 19:31:34 +0100
> So are you saying your word list is also in the public domain?
That is the intention.
The 20 level includes frequency classes 7-15 from Brian's word list.
The 35 level includes frequency classes 2-6 and words appearing in at
least 11 of 12 dictionaries as indicated in the 12Dicts package. All
words from the 12Dicts package have had likely inflections added via
my inflection database.
The 12Dicts package and Supplement is in the Public Domain.
The WordNet database, which was used in the creation of the
Inflections database, is under the following copyright:
This software and database is being provided to you, the LICENSEE,
by Princeton University under the following license. By obtaining,
using and/or copying this software and database, you agree that you
have read, understood, and will comply with these terms and
conditions.:
Permission to use, copy, modify and distribute this software and
database and its documentation for any purpose and without fee or
royalty is hereby granted, provided that you agree to comply with
the following copyright notice and statements, including the
disclaimer, and that the same appear on ALL copies of the software,
database and documentation, including modifications that you make
for internal use or for distribution.
WordNet 1.6 Copyright 1997 by Princeton University. All rights
reserved.
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE
LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT INFRINGE ANY
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
The name of Princeton University or Princeton may not be used in
advertising or publicity pertaining to distribution of the software
and/or database. Title to copyright in this software, database and
any associated documentation shall at all times remain with
Princeton University and LICENSEE agrees to preserve same.
The 40 level includes words from Alan's 3esl list found in version 4.0
of his 12dicts package. Like his other stuff the 3esl list is also in the
public domain.
The 50 level includes Brian's frequency class 1, words appearing
in at least 5 of 12 of the dictionaries as indicated in the 12Dicts
package, and uppercase words in at least 4 of the previous 12
dictionaries. A decent number of proper names is also included: The
top 1000 male, female, and Last names from the 1990 Census report; a
list of names sent to me by Alan Beale; and a few names that I added
myself. Finally a small list of abbreviations not commonly found in
other word lists is included.
The name files form the Census report is a government document which I
don't think can be copyrighted.
The file special-jargon.50 uses common.lst and word.lst from the
"Unofficial Jargon File Word Lists" which is derived from "The Jargon
File". All of which is in the Public Domain. This file also contain
a few extra UNIX terms which are found in the file "unix-terms" in the
special/ directory.
The 55 level includes words from Alan's 2of4brif list found in version
4.0 of his 12dicts package. Like his other stuff the 2of4brif is also
in the public domain.
The 60 level includes all words appearing in at least 2 of the 12
dictionaries as indicated by the 12Dicts package.
The 70 level includes Brian's frequency class 0 and the 74,550 common
dictionary words from the MWords package. The common dictionary words,
like those from the 12Dicts package, have had all likely inflections
added. The 70 level also included the 5desk list from version 4.0 of
the 12Dics package which is in the public domain.
The 80 level includes the ENABLE word list, all the lists in the
ENABLE supplement package (except for ABLE), the "UK Advanced Cryptics
Dictionary" (UKACD), the list of signature words from the YAWL package,
and the 10,196 places list from the MWords package.
The ENABLE package, mainted by M\Cooper <thegrendel@theriver.com>,
is in the Public Domain:
The ENABLE master word list, WORD.LST, is herewith formally released
into the Public Domain. Anyone is free to use it or distribute it in
any manner they see fit. No fee or registration is required for its
use nor are "contributions" solicited (if you feel you absolutely
must contribute something for your own peace of mind, the authors of
the ENABLE list ask that you make a donation on their behalf to your
favorite charity). This word list is our gift to the Scrabble
community, as an alternate to "official" word lists. Game designers
may feel free to incorporate the WORD.LST into their games. Please
mention the source and credit us as originators of the list. Note
that if you, as a game designer, use the WORD.LST in your product,
you may still copyright and protect your product, but you may *not*
legally copyright or in any way restrict redistribution of the
WORD.LST portion of your product. This *may* under law restrict your
rights to restrict your users' rights, but that is only fair.
UKACD, by J Ross Beresford <ross@bryson.demon.co.uk>, is under the
following copyright:
Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.
The following restriction is placed on the use of this publication:
if The UK Advanced Cryptics Dictionary is used in a software package
or redistributed in any form, the copyright notice must be
prominently displayed and the text of this document must be included
verbatim.
There are no other restrictions: I would like to see the list
distributed as widely as possible.
The 95 level includes the 354,984 single words, 256,772 compound
words, 4,946 female names and the 3,897 male names, and 21,986 names
from the MWords package, ABLE.LST from the ENABLE Supplement, and some
additional words found in my part-of-speech database that were not
found anywhere else.
Accent information was taken from UKACD.
My VARCON package was used to create the American, British, and
Canadian word list.
Since the original word lists used in the VARCON package came
from the Ispell distribution they are under the Ispell copyright:
Copyright 1993, Geoff Kuenning, Granada Hills, CA
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.
(clause 4 removed with permission from Geoff Kuenning)
5. The name of Geoff Kuenning may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING 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 GEOFF
KUENNING 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.
Build Date: Thu Jan 21 14:36:27 EST 2016
With Input Command: ../mk-list -v1 --accents=both en_US 60
@@ -0,0 +1,205 @@
SET UTF-8
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
ICONV 1
ICONV '
NOSUGGEST !
# ordinal numbers
COMPOUNDMIN 1
# only in compounds: 1th, 2th, 3th
ONLYINCOMPOUND c
# compound rules:
# 1. [0-9]*1[0-9]th (10th, 11th, 12th, 56714th, etc.)
# 2. [0-9]*[02-9](1st|2nd|3rd|[4-9]th) (21st, 22nd, 123rd, 1234th, etc.)
COMPOUNDRULE 2
COMPOUNDRULE n*1t
COMPOUNDRULE n*mp
WORDCHARS 0123456789
PFX A Y 1
PFX A 0 re .
PFX I Y 1
PFX I 0 in .
PFX U Y 1
PFX U 0 un .
PFX C Y 1
PFX C 0 de .
PFX E Y 1
PFX E 0 dis .
PFX F Y 1
PFX F 0 con .
PFX K Y 1
PFX K 0 pro .
SFX V N 2
SFX V e ive e
SFX V 0 ive [^e]
SFX N Y 3
SFX N e ion e
SFX N y ication y
SFX N 0 en [^ey]
SFX X Y 3
SFX X e ions e
SFX X y ications y
SFX X 0 ens [^ey]
SFX H N 2
SFX H y ieth y
SFX H 0 th [^y]
SFX Y Y 1
SFX Y 0 ly .
SFX G Y 2
SFX G e ing e
SFX G 0 ing [^e]
SFX J Y 2
SFX J e ings e
SFX J 0 ings [^e]
SFX D Y 4
SFX D 0 d e
SFX D y ied [^aeiou]y
SFX D 0 ed [^ey]
SFX D 0 ed [aeiou]y
SFX T N 4
SFX T 0 st e
SFX T y iest [^aeiou]y
SFX T 0 est [aeiou]y
SFX T 0 est [^ey]
SFX R Y 4
SFX R 0 r e
SFX R y ier [^aeiou]y
SFX R 0 er [aeiou]y
SFX R 0 er [^ey]
SFX Z Y 4
SFX Z 0 rs e
SFX Z y iers [^aeiou]y
SFX Z 0 ers [aeiou]y
SFX Z 0 ers [^ey]
SFX S Y 4
SFX S y ies [^aeiou]y
SFX S 0 s [aeiou]y
SFX S 0 es [sxzh]
SFX S 0 s [^sxzhy]
SFX P Y 3
SFX P y iness [^aeiou]y
SFX P 0 ness [aeiou]y
SFX P 0 ness [^y]
SFX M Y 1
SFX M 0 's .
SFX B Y 3
SFX B 0 able [^aeiou]
SFX B 0 able ee
SFX B e able [^aeiou]e
SFX L Y 1
SFX L 0 ment .
REP 90
REP a ei
REP ei a
REP a ey
REP ey a
REP ai ie
REP ie ai
REP alot a_lot
REP are air
REP are ear
REP are eir
REP air are
REP air ere
REP ere air
REP ere ear
REP ere eir
REP ear are
REP ear air
REP ear ere
REP eir are
REP eir ere
REP ch te
REP te ch
REP ch ti
REP ti ch
REP ch tu
REP tu ch
REP ch s
REP s ch
REP ch k
REP k ch
REP f ph
REP ph f
REP gh f
REP f gh
REP i igh
REP igh i
REP i uy
REP uy i
REP i ee
REP ee i
REP j di
REP di j
REP j gg
REP gg j
REP j ge
REP ge j
REP s ti
REP ti s
REP s ci
REP ci s
REP k cc
REP cc k
REP k qu
REP qu k
REP kw qu
REP o eau
REP eau o
REP o ew
REP ew o
REP oo ew
REP ew oo
REP ew ui
REP ui ew
REP oo ui
REP ui oo
REP ew u
REP u ew
REP oo u
REP u oo
REP u oe
REP oe u
REP u ieu
REP ieu u
REP ue ew
REP ew ue
REP uff ough
REP oo ieu
REP ieu oo
REP ier ear
REP ear ier
REP ear air
REP air ear
REP w qu
REP qu w
REP z ss
REP ss z
REP shun tion
REP shun sion
REP shun cion
REP size cise
@@ -1,696 +0,0 @@
--- chromium_en_US.dic_delta 2009-10-01 01:04:06.000000000 -0700
+++ edited_chromium_en_US.dic_delta 2009-10-01 01:01:32.000000000 -0700
@@ -1,674 +1,332 @@
Abbas/6
AbeBooks
-ACAD/m
-AcDbEntity
acetyl
-acknowledgement
-acknowledgement/7
actin
ActiveX/6
Acura/7
acyl
AddThis/6
-adipex
-admin/7
-ageing
Agilent
agonist
-ajax
Alibaba
-aliphatic
alkoxy
-altitudeMode
-aluminium
-Amapedia
-ambien
-america
-american
-amine
-analyse
-analysed
-Andhra
-Anglais
-anglais
anime
antisense
antivirus/7
API/7
-apoptoses
apoptosis
-app/7
Arabidopsis
-Arbre/6
-arg/7
Arial/6
arXiv/6
aryl/7
Athlon/7
ATPase/6
aurei
aureus
-auteur/7
-Bacteriol
-Bahasa/6
Bancorp
-Beckham
+Beckham/6
Belkin/6
Bellevue/6
benzyl
BibSonomy/6
BibTeX/6
-bio/7
-biochem
bioinformatic/7
-biophys
biosyntheses
biosynthesis
biotech/6
BizRate/6
BlackBerry/6
BlinkList/6
Bloglines/6
blogroll/7
-blonde/7
Bloomberg/6
blowjob/30
Bluetooth/6
-Bollywood/6
-bool/7
-Brabois/6
-Bracknell
-Brasil/6
-Buenos
Burkina/6
Caicos/6
Cambridgeshire/6
-cancelled
-cancelling
carboxylic
CareerBuilder/6
-carisoprodol
Carlisle/6
-casa
-Casio/6
Cassini/6
cDNA
celebs
-centro/6
+Centro/6
cerevisiae/7
-charset/7
Chatham/6
-ChemPort/6
-Cheney/6
-Chennai/6
-chloro
Choi/6
-Cialis/6
Cingular/6
-Cisco/6
-Citebase/6
-CiteULike/6
Citysearch/6
Clarkson/6
codec/7
codon/7
ColdFusion/6
coli
Comcast/6
Computerworld/6
-conf
config/7
Connotea/6
-const/7
-Coulter/6
Councillor/7
-counselled
-counselling
-Courriel/6
-craigslist/6
-crore/7
-CrossRef/6
-cryonic/7
-Ctrl
+Craigslist/6
+cryonic
cultivar/7
Cumbria/6
cyber
-cysteine/7
cytokine/7
-cytokines/7
-Dansk
-Darfur/6
-Dari/6
datasheet/7
-datatype/7
Daytona/6
DealTime/6
-Debian
dehydrogenase/6
Deloitte/6
Denton/6
-desc
Deseret/6
designee
-Deutsche/6
-Deutschland/6
-deze/7
-Diaz/6
-diff/7
-diff/7
Digg/7
-Digi
dihydro
-Directgov/6
DivX/6
-Dorset/6
downloadable
Dreamweaver/6
-DSpace/6
DVDs
Easton/6
-eBay/6
eBook/7
-ECNext/6
eCommerce/6
-EconPapers/6
Elsevier/6
-Eminem/6
EndNote/6
-Endocrinol
Engadget/6
-Enron/6
-Envirofacts/6
Epinions/6
-Epson/6
-Ericsson/6
Eukaryota/7
-Euro/7
-euro/7
-eval/7
exon/7
-expandera/7
Expedia/6
Facebook/6
Faso/6
Favorited
Feng/6
filmography
FilmSpot/6
financials
FindArticles/6
FindLaw/6
-fioricet/7
-Firefox/6
-Flickr/6
Flickr/6
flyer/7
Forex/6
forma
FreeBSD/6
-Freeware/6
-freeware/7
FrontPage/6
-fundraiser/7
-fundraising
fundraising
GaAs
-GameBase/6
GameCube/6
GameFAQs/6
GameSpot/6
Garmin/6
gastroenterology
GenBank/6
-GeneID/6
-genomic
-genomic/7
-gigabit/7
-Giuliani/6
-globalization
Gloucestershire/6
GmbH
-Google/6
-GrainGenes/6
grande
-grantor/7
-grey
-Griffiths/7
+Griffiths
guestbook/7
Guildford/6
Hamas/6
handheld/7
Hassan/6
-healthcare
-hentai
+hentai/251
Hertfordshire/6
-hexane/7
-Hezbollah/6
-HighBeam/6
Hillsborough/6
holdem
-hotline/7
Hotmail/6
Houghton/6
-howto/7
-html
-httpd/6
-hydrocodone/7
-IETF/6
IMDb/6
IMDbPro/6
-IMDbTV/6
-Immunol
inbox/6
-indices
-indie
-Infotrieve/6
-Ingenta/6
-IngentaConnect/6
-init/7
inkjet/7
-InterPro/6
-Intl
-intl
-intranet/7
iPhone/6
-iPod/6
-IPOs
+IPO/7
ischemia
ischemic
-Italia
-Italiano
-iTunes/6
Ivoire
-Japonica/6
-Jelsoft/6
-Jiang
-Joomla/6
-jpeg
-judgement
-Juni/6
+JPEG/7
Karnataka/6
kbps
Kerala/6
-keygen
Kijiji/6
kinase
Kitts/6
-Klicka/6
-Klicken/6
-KnowledgeStorm/6
Kosovo/6
Kuala/6
labelled/12
Lakers/6
-lang
-langue/7
Lanka/6
-learnt
-LegCo/6
Leica/6
-Lett/6
-Levitra/6
LexisNexis/6
Lexmark/6
-Libros/6
-licence//101
-licencee/7
-licences/14
-licencing/14
-licencor/7
Lincolnshire/6
LinkedIn/6
-Listmania/6
LiveJournal/6
-localhost
-localisation/7
-locator/7
Logitech/6
LookSmart/6
Lycos/6
Macau/6
Macromedia/6
-mailto
mammalia
manga
-Manga/6
MapQuest/6
-MasterCard/6
MathML/6
Mbps
McAfee/6
McCann/6
-MediaWiki/6
Medline/6
meetup/7
-memberlist/7
mesothelioma/6
Metacafe/6
-metadata
-metadata/7
+metadata/6
meth
methoxy
-mexico
-mgmt/7
-microbiol
-milf
-mins
-mitochondria
-mitochondrial
-mmol
-modelling
-modelling
-Mohammed/6
-Motorola/6
-Motorsport/7
-Mozilla/6
-mpeg
+modeller/7
+modelling/7
+motorsport/7
+MPEG/7
mRNA
-msgid
-msgs
-msgstr
multicast
-Mumbai/6
murine
musculus
-Muze/6
-MyCareerBuilder/6
mySimon
-MySpace/6
-Myspace/6
MySQL/6
-MyYahoo/6
Nadu/6
-namespace
namespace/7
nano
-nanotechnology
Napa/6
Naruto/6
-Nasdaq/6
-Nederland/7
NetBSD/6
-Neurol/6
-neurosci
-neuroscience/7
Newsvine/6
newswires
NexTag/6
Nextel/6
-NGOs/6
+NGO/7
nitro
Niue/6
-Nokia/6
-Norsk/6
Nortel/6
-nowrap
-Obama/6
-offence
-offences
-offline
-offline
offsite
-Oleh/6
oligonucleotide
onsite
OpenBSD/6
-opensource
-OpenURL/6
-OpenView/6
-organisation
-organisational
-organisations
-organised
Oryza/6
oxidase
Oxley/6
-Palau/6
-Panasonic/6
Papua/6
-param
-PARC
-PatentStorm/6
-Pathol/6
-PDAs
-PDFs
-permalink
+PDA/7
+PDF/7
permalink/7
permittee
Peterborough/6
-Pfam/6
-pgSQL
-pharma
-pharmacol
-phentermine
-Phentermine/6
Philips/6
-phonephone
-phosphorylation
-Photobucket/6
-Photoshop/6
-phpBB
-physiol
-pics
-pics
-pkgsrc
-Placemark/7
-playlist/7
+Photoshop/7
playlist/7
-PlayStation/6
-plugin/7
-plugin/7
-Polska
-Polski
-poly
-poly
polynucleotide/7
-polypeptide/7
popup/7
-portlet/7
-portlet/7
PostgreSQL/6
PostScript/6
Poynter/6
-prev
-prev
Prix
PRNewswire/6
-proc
-proc
-prog
-Propecia/6
propyl
ProQuest/6
Pseudomonas/7
PubMed/6
Qaeda/6
-Quicklinks/6
QuickList/6
-QuickMix/6
QuickTime/6
Qwest/6
Rebecca/6
Reddit/6
reductase/6
-RePEc/6
-RetCode/6
-Rhode/6
ringtone/7
-Rolex/6
-Rolex/6
rotatable
rotatably
Routledge/6
-Rumsfeld/6
Saccharomyces/6
-Sams/6
-Samsung/6
sapiens
Sarbanes/6
sativa
savoir
-sbjct
Schwarz/6
-Scopus/6
-Screenonline/6
-screensaver
+screensaver/7
screenshot/7
searchable
Secunia/6
-seleccionar
-Sera
serine
-setcmykcolor/7
-sgml
SharePoint/6
Sharma/6
shemale/30
Shen/6
Shenzhen/6
Shopzilla/6
-showtime/7
-Shrek/6
-Sigmer/7
signalling
signup/7
-Simpson/7
-Simpy/6
-Singh/6
Sion
sitemap/7
-sizeof
-Skype/6
-Slashdot/6
slideshow/7
smartphone/7
-SMEs/6
-SNPs/6
+SNP/7
Solaris/6
-Sony/6
Sparc
-Spurl/6
-spyware/6
spyware/7
-Starbucks/6
stent/7
-struct/7
StumbleUpon/6
substituent/7
Sunderland/6
-Suomi/6
-Svenska
Swindon/6
Symantec/6
Symbian/6
synthase/7
-sysop/7
tagline/7
-Taliban/6
taxa
taxon
-Technic/7
-techno
-technol
Technorati/6
TechRepublic/6
telecom/7
-telecom/7
Tesco/6
thaliana
therebetween
timeline/7
-TimesSelect/6
-Timor/6
-titre/7
-Topix/6
trackback/7
-Tramadol/6
-Tramadol/6
-transcriptional
-transfected
-transgenic
-travelling
Treo/6
TripAdvisor/6
tRNA/6
-TrustPass/6
-Tuto/6
-TWiki/6
-TWiki/6
-Uitleg/6
-Ultram/6
-undef
-UniProt/6
URLs
-usergroup/7
-username/7
username/7
-userpic/6
-util/7
-Utvid/6
-valitsemalla
-Valium/6
-Vandoeuvre/6
-vBulletin/6
-Vdata/6
-Verizon/6
-Verizon/6
vertebrata
-vertices
-Vgroup/6
-vhosts
-Viagra/6
Vicodin/6
-Virol/6
Vodafone/6
VoIP
Warcraft/6
Warwickshire/6
-Waterford/6
-WebBoard
webcam/7
-webcam/7
-webcast/7
webcast/7
webdesign/7
weblog/7
-weblog/7
webpage/7
-Webshots/6
-webshots/7
WebSphere/6
-Welch/6
whitepaper/7
widescreen/7
WiFi/6
-wiki/7
-wiki/7
Wikibooks/6
Wikimedia/6
Wikinews/6
WikiPatents/6
-Wikipedia/6
Wikiquote/6
Wikisource/6
Wiktionary/6
wildcard/7
Wiltshire/6
wishlist/7
-wishlist/7
WordPress/6
workflow/7
-workflow/7
WorldCat/6
Xanax/6
Xbox/6
-YouTube/6
ZDNet/6
Zhang/6
Zhao/6
Zhou/6
Ziff/6
-Zope/6
-zShops/6
Zune/6
-Zurich/6
@@ -1,7 +1,3 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SET ISO8859-1
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
NOSUGGEST !
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -5,9 +5,8 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include('/ipc/chromium/chromium-config.mozbuild')
UNIFIED_SOURCES += [
SOURCES += [
'mozEnglishWordUtils.cpp',
'mozGenericWordUtils.cpp',
'mozInlineSpellChecker.cpp',
'mozInlineSpellWordUtil.cpp',
'mozPersonalDictionary.cpp',
@@ -1,40 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozGenericWordUtils.h"
NS_IMPL_ISUPPORTS(mozGenericWordUtils, mozISpellI18NUtil)
// do something sensible but generic ... eventually. For now whine.
mozGenericWordUtils::mozGenericWordUtils()
{
/* member initializers and constructor code */
}
mozGenericWordUtils::~mozGenericWordUtils()
{
/* destructor code */
}
NS_IMETHODIMP mozGenericWordUtils::GetLanguage(char16_t * *aLanguage)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP mozGenericWordUtils::GetRootForm(const char16_t *word, uint32_t type, char16_t ***words, uint32_t *count)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP mozGenericWordUtils::FromRootForm(const char16_t *word, const char16_t **iwords, uint32_t icount, char16_t ***owords, uint32_t *ocount)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP mozGenericWordUtils::FindNextWord(const char16_t *word, uint32_t length, uint32_t offset, int32_t *begin, int32_t *end)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
@@ -1,24 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozGenericWordUtils_h__
#define mozGenericWordUtils_h__
#include "nsCOMPtr.h"
#include "mozISpellI18NUtil.h"
#include "nsCycleCollectionParticipant.h"
class mozGenericWordUtils : public mozISpellI18NUtil
{
protected:
virtual ~mozGenericWordUtils();
public:
NS_DECL_ISUPPORTS
NS_DECL_MOZISPELLI18NUTIL
mozGenericWordUtils();
};
#endif
@@ -134,7 +134,17 @@ mozInlineSpellStatus::InitForEditorChange(
getter_AddRefs(mAnchorRange));
NS_ENSURE_SUCCESS(rv, rv);
if (aAction == EditAction::deleteSelection) {
nsCOMPtr<nsINode> prevNode = do_QueryInterface(aPreviousNode);
NS_ENSURE_STATE(prevNode);
bool deleted = aAction == EditAction::deleteSelection;
if (aAction == EditAction::insertIMEText) {
// IME may remove the previous node if it cancels composition when
// there is no text around the composition.
deleted = !prevNode->IsInComposedDoc();
}
if (deleted) {
// Deletes are easy, the range is just the current anchor. We set the range
// to check to be empty, FinishInitOnEvent will fill in the range to be
// the current word.
@@ -146,9 +156,6 @@ mozInlineSpellStatus::InitForEditorChange(
mOp = eOpChange;
// range to check
nsCOMPtr<nsINode> prevNode = do_QueryInterface(aPreviousNode);
NS_ENSURE_STATE(prevNode);
mRange = new nsRange(prevNode);
// ...we need to put the start and end in the correct order
@@ -5,36 +5,28 @@
#include "mozSpellI18NManager.h"
#include "mozEnglishWordUtils.h"
#include "mozGenericWordUtils.h"
#include "nsString.h"
#include "mozilla/RefPtr.h"
NS_IMPL_ISUPPORTS(mozSpellI18NManager, mozISpellI18NManager)
mozSpellI18NManager::mozSpellI18NManager()
{
/* member initializers and constructor code */
}
mozSpellI18NManager::~mozSpellI18NManager()
{
/* destructor code */
}
NS_IMETHODIMP mozSpellI18NManager::GetUtil(const char16_t *aLanguage, mozISpellI18NUtil **_retval)
{
if( nullptr == _retval) {
if (!_retval) {
return NS_ERROR_NULL_POINTER;
}
*_retval = nullptr;
nsAutoString lang;
lang.Assign(aLanguage);
if(lang.EqualsLiteral("en")){
*_retval = new mozEnglishWordUtils;
}
else{
*_retval = new mozEnglishWordUtils;
}
NS_IF_ADDREF(*_retval);
// XXX TODO Actually handle multiple languages.
RefPtr<mozEnglishWordUtils> utils = new mozEnglishWordUtils;
utils.forget(_retval);
return NS_OK;
}
+35 -1
View File
@@ -1316,7 +1316,7 @@ static nsresult pref_InitInitialObjects()
// channel, telemetry is on by default, otherwise not. This is necessary
// so that beta users who are testing final release builds don't flipflop
// defaults.
if (Preferences::GetDefaultType(kTelemetryPref) == PREF_INVALID) {
if (Preferences::GetDefaultType(kTelemetryPref) == nsIPrefBranch::PREF_INVALID) {
bool prerelease = false;
#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
prerelease = true;
@@ -1789,6 +1789,40 @@ Preferences::AddUintVarCache(uint32_t* aCache,
return RegisterCallback(UintVarChanged, aPref, data);
}
template <MemoryOrdering Order>
static void AtomicUintVarChanged(const char* aPref, void* aClosure)
{
CacheData* cache = static_cast<CacheData*>(aClosure);
*((Atomic<uint32_t, Order>*)cache->cacheLocation) =
Preferences::GetUint(aPref, cache->defaultValueUint);
}
template <MemoryOrdering Order>
// static
nsresult
Preferences::AddAtomicUintVarCache(Atomic<uint32_t, Order>* aCache,
const char* aPref,
uint32_t aDefault)
{
NS_ASSERTION(aCache, "aCache must not be NULL");
#ifdef DEBUG
AssertNotAlreadyCached("uint", aPref, aCache);
#endif
*aCache = Preferences::GetUint(aPref, aDefault);
CacheData* data = new CacheData();
data->cacheLocation = aCache;
data->defaultValueUint = aDefault;
gCacheData->AppendElement(data);
return RegisterCallback(AtomicUintVarChanged<Order>, aPref, data);
}
// Since the definition of this template function is not in a header file,
// we need to explicitly specify the instantiations that are required.
// Currently only the order=Relaxed variant is needed.
template
nsresult Preferences::AddAtomicUintVarCache(Atomic<uint32_t,Relaxed>*,
const char*, uint32_t);
static void FloatVarChanged(const char* aPref, void* aClosure)
{
CacheData* cache = static_cast<CacheData*>(aClosure);
+4
View File
@@ -274,6 +274,10 @@ public:
static nsresult AddUintVarCache(uint32_t* aVariable,
const char* aPref,
uint32_t aDefault = 0);
template <MemoryOrdering Order>
static nsresult AddAtomicUintVarCache(Atomic<uint32_t, Order>* aVariable,
const char* aPref,
uint32_t aDefault = 0);
static nsresult AddFloatVarCache(float* aVariable,
const char* aPref,
float aDefault = 0.0f);
+15 -1
View File
@@ -127,7 +127,21 @@ NS_IMETHODIMP nsPrefBranch::GetPrefType(const char *aPrefName, int32_t *_retval)
{
NS_ENSURE_ARG(aPrefName);
const char *pref = getPrefName(aPrefName);
*_retval = PREF_GetPrefType(pref);
switch (PREF_GetPrefType(pref)) {
case PrefType::String:
*_retval = PREF_STRING;
break;
case PrefType::Int:
*_retval = PREF_INT;
break;
case PrefType::Bool:
*_retval = PREF_BOOL;
break;
case PrefType::Invalid:
default:
*_retval = PREF_INVALID;
break;
}
return NS_OK;
}
+101 -120
View File
@@ -40,7 +40,7 @@ static void
clearPrefEntry(PLDHashTable *table, PLDHashEntryHdr *entry)
{
PrefHashEntry *pref = static_cast<PrefHashEntry *>(entry);
if (pref->flags & PREF_STRING)
if (pref->prefFlags.IsTypeString())
{
if (pref->defaultPref.stringVal)
PL_strfree(pref->defaultPref.stringVal);
@@ -116,13 +116,7 @@ static char *ArenaStrDup(const char* str, PLArenaPool* aArena)
/*---------------------------------------------------------------------------*/
#define PREF_IS_LOCKED(pref) ((pref)->flags & PREF_LOCKED)
#define PREF_HAS_DEFAULT_VALUE(pref) ((pref)->flags & PREF_HAS_DEFAULT)
#define PREF_HAS_USER_VALUE(pref) ((pref)->flags & PREF_USERSET)
#define PREF_TYPE(pref) (PrefType)((pref)->flags & PREF_VALUETYPE_MASK)
static bool pref_ValueChanged(PrefValue oldValue, PrefValue newValue, PrefType type);
/* -- Privates */
struct CallbackNode {
char* domain;
@@ -248,7 +242,7 @@ PREF_SetCharPref(const char *pref_name, const char *value, bool set_default)
PrefValue pref;
pref.stringVal = (char*)value;
return pref_HashPref(pref_name, pref, PREF_STRING, set_default ? kPrefSetDefault : 0);
return pref_HashPref(pref_name, pref, PrefType::String, set_default ? kPrefSetDefault : 0);
}
nsresult
@@ -257,7 +251,7 @@ PREF_SetIntPref(const char *pref_name, int32_t value, bool set_default)
PrefValue pref;
pref.intVal = value;
return pref_HashPref(pref_name, pref, PREF_INT, set_default ? kPrefSetDefault : 0);
return pref_HashPref(pref_name, pref, PrefType::Int, set_default ? kPrefSetDefault : 0);
}
nsresult
@@ -266,7 +260,7 @@ PREF_SetBoolPref(const char *pref_name, bool value, bool set_default)
PrefValue pref;
pref.boolVal = value;
return pref_HashPref(pref_name, pref, PREF_BOOL, set_default ? kPrefSetDefault : 0);
return pref_HashPref(pref_name, pref, PrefType::Bool, set_default ? kPrefSetDefault : 0);
}
enum WhichValue { DEFAULT_VALUE, USER_VALUE };
@@ -334,12 +328,12 @@ pref_savePrefs(PLDHashTable* aTable)
// where we're getting our pref from
PrefValue* sourcePref;
if (PREF_HAS_USER_VALUE(pref) &&
if (pref->prefFlags.HasUserValue() &&
(pref_ValueChanged(pref->defaultPref,
pref->userPref,
(PrefType) PREF_TYPE(pref)) ||
!(pref->flags & PREF_HAS_DEFAULT) ||
pref->flags & PREF_STICKY_DEFAULT)) {
pref->prefFlags.GetPrefType()) ||
!(pref->prefFlags.HasDefault()) ||
pref->prefFlags.HasStickyDefault())) {
sourcePref = &pref->userPref;
} else {
// do not save default prefs that haven't changed
@@ -347,15 +341,15 @@ pref_savePrefs(PLDHashTable* aTable)
}
// strings are in quotes!
if (pref->flags & PREF_STRING) {
if (pref->prefFlags.IsTypeString()) {
prefValue = '\"';
str_escape(sourcePref->stringVal, prefValue);
prefValue += '\"';
} else if (pref->flags & PREF_INT) {
} else if (pref->prefFlags.IsTypeInt()) {
prefValue.AppendInt(sourcePref->intVal);
} else if (pref->flags & PREF_BOOL) {
} else if (pref->prefFlags.IsTypeBool()) {
prefValue = (sourcePref->boolVal) ? "true" : "false";
}
@@ -388,14 +382,14 @@ GetPrefValueFromEntry(PrefHashEntry *aHashEntry, dom::PrefSetting* aPref,
settingValue = &aPref->defaultValue().get_PrefValue();
}
switch (aHashEntry->flags & PREF_VALUETYPE_MASK) {
case PREF_STRING:
switch (aHashEntry->prefFlags.GetPrefType()) {
case PrefType::String:
*settingValue = nsDependentCString(value->stringVal);
return;
case PREF_INT:
case PrefType::Int:
*settingValue = value->intVal;
return;
case PREF_BOOL:
case PrefType::Bool:
*settingValue = !!value->boolVal;
return;
default:
@@ -407,12 +401,12 @@ void
pref_GetPrefFromEntry(PrefHashEntry *aHashEntry, dom::PrefSetting* aPref)
{
aPref->name() = aHashEntry->key;
if (PREF_HAS_DEFAULT_VALUE(aHashEntry)) {
if (aHashEntry->prefFlags.HasDefault()) {
GetPrefValueFromEntry(aHashEntry, aPref, DEFAULT_VALUE);
} else {
aPref->defaultValue() = null_t();
}
if (PREF_HAS_USER_VALUE(aHashEntry)) {
if (aHashEntry->prefFlags.HasUserValue()) {
GetPrefValueFromEntry(aHashEntry, aPref, USER_VALUE);
} else {
aPref->userValue() = null_t();
@@ -450,11 +444,7 @@ bool PREF_HasUserPref(const char *pref_name)
return false;
PrefHashEntry *pref = pref_HashTableLookup(pref_name);
if (!pref) return false;
/* convert PREF_HAS_USER_VALUE to bool */
return (PREF_HAS_USER_VALUE(pref) != 0);
return pref && pref->prefFlags.HasUserValue();
}
nsresult
@@ -467,12 +457,12 @@ PREF_CopyCharPref(const char *pref_name, char ** return_buffer, bool get_default
char* stringVal;
PrefHashEntry* pref = pref_HashTableLookup(pref_name);
if (pref && (pref->flags & PREF_STRING))
{
if (get_default || PREF_IS_LOCKED(pref) || !PREF_HAS_USER_VALUE(pref))
if (pref && (pref->prefFlags.IsTypeString())) {
if (get_default || pref->prefFlags.IsLocked() || !pref->prefFlags.HasUserValue()) {
stringVal = pref->defaultPref.stringVal;
else
} else {
stringVal = pref->userPref.stringVal;
}
if (stringVal) {
*return_buffer = NS_strdup(stringVal);
@@ -489,18 +479,17 @@ nsresult PREF_GetIntPref(const char *pref_name,int32_t * return_int, bool get_de
nsresult rv = NS_ERROR_UNEXPECTED;
PrefHashEntry* pref = pref_HashTableLookup(pref_name);
if (pref && (pref->flags & PREF_INT))
{
if (get_default || PREF_IS_LOCKED(pref) || !PREF_HAS_USER_VALUE(pref))
{
if (pref && (pref->prefFlags.IsTypeInt())) {
if (get_default || pref->prefFlags.IsLocked() || !pref->prefFlags.HasUserValue()) {
int32_t tempInt = pref->defaultPref.intVal;
/* check to see if we even had a default */
if (!(pref->flags & PREF_HAS_DEFAULT))
if (!pref->prefFlags.HasDefault()) {
return NS_ERROR_UNEXPECTED;
}
*return_int = tempInt;
}
else
} else {
*return_int = pref->userPref.intVal;
}
rv = NS_OK;
}
return rv;
@@ -514,18 +503,15 @@ nsresult PREF_GetBoolPref(const char *pref_name, bool * return_value, bool get_d
nsresult rv = NS_ERROR_UNEXPECTED;
PrefHashEntry* pref = pref_HashTableLookup(pref_name);
//NS_ASSERTION(pref, pref_name);
if (pref && (pref->flags & PREF_BOOL))
{
if (get_default || PREF_IS_LOCKED(pref) || !PREF_HAS_USER_VALUE(pref))
{
if (pref && (pref->prefFlags.IsTypeBool())) {
if (get_default || pref->prefFlags.IsLocked() || !pref->prefFlags.HasUserValue()) {
bool tempBool = pref->defaultPref.boolVal;
/* check to see if we even had a default */
if (pref->flags & PREF_HAS_DEFAULT) {
if (pref->prefFlags.HasDefault()) {
*return_value = tempBool;
rv = NS_OK;
}
}
else {
} else {
*return_value = pref->userPref.boolVal;
rv = NS_OK;
}
@@ -583,11 +569,10 @@ PREF_ClearUserPref(const char *pref_name)
return NS_ERROR_NOT_INITIALIZED;
PrefHashEntry* pref = pref_HashTableLookup(pref_name);
if (pref && PREF_HAS_USER_VALUE(pref))
{
pref->flags &= ~PREF_USERSET;
if (pref && pref->prefFlags.HasUserValue()) {
pref->prefFlags.SetHasUserValue(false);
if (!(pref->flags & PREF_HAS_DEFAULT)) {
if (!pref->prefFlags.HasDefault()) {
gHashTable->RemoveEntry(pref);
}
@@ -611,11 +596,11 @@ PREF_ClearAllUserPrefs()
for (auto iter = gHashTable->Iter(); !iter.Done(); iter.Next()) {
auto pref = static_cast<PrefHashEntry*>(iter.Get());
if (PREF_HAS_USER_VALUE(pref)) {
if (pref->prefFlags.HasUserValue()) {
prefStrings.push_back(std::string(pref->key));
pref->flags &= ~PREF_USERSET;
if (!(pref->flags & PREF_HAS_DEFAULT)) {
pref->prefFlags.SetHasUserValue(false);
if (!pref->prefFlags.HasDefault()) {
iter.Remove();
}
}
@@ -639,18 +624,14 @@ nsresult PREF_LockPref(const char *key, bool lockit)
return NS_ERROR_UNEXPECTED;
if (lockit) {
if (!PREF_IS_LOCKED(pref))
{
pref->flags |= PREF_LOCKED;
if (!pref->prefFlags.IsLocked()) {
pref->prefFlags.SetLocked(true);
gIsAnyPrefLocked = true;
pref_DoCallback(key);
}
}
else
{
if (PREF_IS_LOCKED(pref))
{
pref->flags &= ~PREF_LOCKED;
} else {
if (pref->prefFlags.IsLocked()) {
pref->prefFlags.SetLocked(false);
pref_DoCallback(key);
}
}
@@ -663,15 +644,23 @@ nsresult PREF_LockPref(const char *key, bool lockit)
static bool pref_ValueChanged(PrefValue oldValue, PrefValue newValue, PrefType type)
{
bool changed = true;
if (type & PREF_STRING)
{
if (oldValue.stringVal && newValue.stringVal)
switch(type) {
case PrefType::String:
if (oldValue.stringVal && newValue.stringVal) {
changed = (strcmp(oldValue.stringVal, newValue.stringVal) != 0);
}
else if (type & PREF_INT)
}
break;
case PrefType::Int:
changed = oldValue.intVal != newValue.intVal;
else if (type & PREF_BOOL)
break;
case PrefType::Bool:
changed = oldValue.boolVal != newValue.boolVal;
break;
case PrefType::Invalid:
default:
changed = false;
break;
}
return changed;
}
@@ -680,20 +669,21 @@ static bool pref_ValueChanged(PrefValue oldValue, PrefValue newValue, PrefType t
* ensure that they are not changing the type of a preference that has
* a default value.
*/
static void pref_SetValue(PrefValue* existingValue, uint16_t *existingFlags,
PrefValue newValue, PrefType newType)
static PrefTypeFlags pref_SetValue(PrefValue* existingValue, PrefTypeFlags flags,
PrefValue newValue, PrefType newType)
{
if ((*existingFlags & PREF_STRING) && existingValue->stringVal) {
if (flags.IsTypeString() && existingValue->stringVal) {
PL_strfree(existingValue->stringVal);
}
*existingFlags = (*existingFlags & ~PREF_VALUETYPE_MASK) | newType;
if (newType & PREF_STRING) {
flags.SetPrefType(newType);
if (flags.IsTypeString()) {
PR_ASSERT(newValue.stringVal);
existingValue->stringVal = newValue.stringVal ? PL_strdup(newValue.stringVal) : nullptr;
}
else {
*existingValue = newValue;
}
return flags;
}
PrefHashEntry* pref_HashTableLookup(const char *key)
@@ -722,63 +712,53 @@ nsresult pref_HashPref(const char *key, PrefValue value, PrefType type, uint32_t
if (!pref->key) {
// initialize the pref entry
pref->flags = type;
pref->prefFlags.Reset().SetPrefType(type);
pref->key = ArenaStrDup(key, &gPrefNameArena);
memset(&pref->defaultPref, 0, sizeof(pref->defaultPref));
memset(&pref->userPref, 0, sizeof(pref->userPref));
}
else if ((pref->flags & PREF_HAS_DEFAULT) && PREF_TYPE(pref) != type)
{
} else if (pref->prefFlags.HasDefault() && !pref->prefFlags.IsPrefType(type)) {
NS_WARNING(nsPrintfCString("Trying to overwrite value of default pref %s with the wrong type!", key).get());
return NS_ERROR_UNEXPECTED;
}
bool valueChanged = false;
if (flags & kPrefSetDefault)
{
if (!PREF_IS_LOCKED(pref))
{ /* ?? change of semantics? */
if (flags & kPrefSetDefault) {
if (!pref->prefFlags.IsLocked()) {
/* ?? change of semantics? */
if (pref_ValueChanged(pref->defaultPref, value, type) ||
!(pref->flags & PREF_HAS_DEFAULT))
{
pref_SetValue(&pref->defaultPref, &pref->flags, value, type);
pref->flags |= PREF_HAS_DEFAULT;
if (flags & kPrefStickyDefault)
pref->flags |= PREF_STICKY_DEFAULT;
if (!PREF_HAS_USER_VALUE(pref))
!pref->prefFlags.HasDefault()) {
pref->prefFlags = pref_SetValue(&pref->defaultPref, pref->prefFlags, value, type).SetHasDefault(true);
if (flags & kPrefStickyDefault) {
pref->prefFlags.SetHasStickyDefault(true);
}
if (!pref->prefFlags.HasUserValue()) {
valueChanged = true;
}
}
// What if we change the default to be the same as the user value?
// Should we clear the user value?
}
}
else
{
} else {
/* If new value is same as the default value and it's not a "sticky"
pref, then un-set the user value.
Otherwise, set the user value only if it has changed */
if ((pref->flags & PREF_HAS_DEFAULT) &&
!(pref->flags & PREF_STICKY_DEFAULT) &&
if ((pref->prefFlags.HasDefault()) &&
!(pref->prefFlags.HasStickyDefault()) &&
!pref_ValueChanged(pref->defaultPref, value, type) &&
!(flags & kPrefForceSet))
{
if (PREF_HAS_USER_VALUE(pref))
{
!(flags & kPrefForceSet)) {
if (pref->prefFlags.HasUserValue()) {
/* XXX should we free a user-set string value if there is one? */
pref->flags &= ~PREF_USERSET;
if (!PREF_IS_LOCKED(pref)) {
pref->prefFlags.SetHasUserValue(false);
if (!pref->prefFlags.IsLocked()) {
gDirty = true;
valueChanged = true;
}
}
}
else if (!PREF_HAS_USER_VALUE(pref) ||
PREF_TYPE(pref) != type ||
pref_ValueChanged(pref->userPref, value, type) )
{
pref_SetValue(&pref->userPref, &pref->flags, value, type);
pref->flags |= PREF_USERSET;
if (!PREF_IS_LOCKED(pref)) {
} else if (!pref->prefFlags.HasUserValue() ||
!pref->prefFlags.IsPrefType(type) ||
pref_ValueChanged(pref->userPref, value, type) ) {
pref->prefFlags = pref_SetValue(&pref->userPref, pref->prefFlags, value, type).SetHasUserValue(true);
if (!pref->prefFlags.IsLocked()) {
gDirty = true;
valueChanged = true;
}
@@ -807,17 +787,11 @@ PREF_GetPrefType(const char *pref_name)
{
if (gHashTable) {
PrefHashEntry* pref = pref_HashTableLookup(pref_name);
if (pref)
{
if (pref->flags & PREF_STRING)
return PREF_STRING;
else if (pref->flags & PREF_INT)
return PREF_INT;
else if (pref->flags & PREF_BOOL)
return PREF_BOOL;
if (pref) {
return pref->prefFlags.GetPrefType();
}
}
return PREF_INVALID;
return PrefType::Invalid;
}
/* -- */
@@ -828,8 +802,9 @@ PREF_PrefIsLocked(const char *pref_name)
bool result = false;
if (gIsAnyPrefLocked && gHashTable) {
PrefHashEntry* pref = pref_HashTableLookup(pref_name);
if (pref && PREF_IS_LOCKED(pref))
if (pref && pref->prefFlags.IsLocked()) {
result = true;
}
}
return result;
@@ -972,10 +947,16 @@ void PREF_ReaderCallback(void *closure,
PrefType type,
bool isDefault,
bool isStickyDefault)
{
uint32_t flags = isDefault ? kPrefSetDefault : kPrefForceSet;
if (isDefault && isStickyDefault) {
flags |= kPrefStickyDefault;
uint32_t flags = 0;
if (isDefault) {
flags |= kPrefSetDefault;
if (isStickyDefault) {
flags |= kPrefStickyDefault;
}
} else {
flags |= kPrefForceSet;
}
pref_HashPref(pref, value, type, flags);
}
+82 -25
View File
@@ -28,14 +28,6 @@ typedef union
bool boolVal;
} PrefValue;
struct PrefHashEntry : PLDHashEntryHdr
{
uint16_t flags; // This field goes first to minimize struct size on 64-bit.
const char *key;
PrefValue defaultPref;
PrefValue userPref;
};
/*
// <font color=blue>
// The Init function initializes the preference context and creates
@@ -45,7 +37,7 @@ struct PrefHashEntry : PLDHashEntryHdr
void PREF_Init();
/*
// Cleanup should be called at program exit to free the
// Cleanup should be called at program exit to free the
// list of registered callbacks.
*/
void PREF_Cleanup();
@@ -53,23 +45,88 @@ void PREF_CleanupPrefs();
/*
// <font color=blue>
// Preference flags, including the native type of the preference
// Preference flags, including the native type of the preference. Changing any of these
// values will require modifying the code inside of PrefTypeFlags class.
// </font>
*/
typedef enum { PREF_INVALID = 0,
PREF_LOCKED = 1, PREF_USERSET = 2, PREF_CONFIG = 4, PREF_REMOTE = 8,
PREF_LILOCAL = 16, PREF_STRING = 32, PREF_INT = 64, PREF_BOOL = 128,
PREF_HAS_DEFAULT = 256,
// pref is default pref with "sticky" semantics
PREF_STICKY_DEFAULT = 512,
PREF_VALUETYPE_MASK = (PREF_STRING | PREF_INT | PREF_BOOL)
} PrefType;
enum class PrefType {
Invalid = 0,
String = 1,
Int = 2,
Bool = 3,
};
// Keep the type of the preference, as well as the flags guiding its behaviour.
class PrefTypeFlags
{
public:
PrefTypeFlags() : mValue(AsInt(PrefType::Invalid)) {}
explicit PrefTypeFlags(PrefType aType) : mValue(AsInt(aType)) {}
PrefTypeFlags& Reset() { mValue = AsInt(PrefType::Invalid); return *this; }
bool IsTypeValid() const { return !IsPrefType(PrefType::Invalid); }
bool IsTypeString() const { return IsPrefType(PrefType::String); }
bool IsTypeInt() const { return IsPrefType(PrefType::Int); }
bool IsTypeBool() const { return IsPrefType(PrefType::Bool); }
bool IsPrefType(PrefType type) const { return GetPrefType() == type; }
PrefTypeFlags& SetPrefType(PrefType aType) {
mValue = mValue - AsInt(GetPrefType()) + AsInt(aType);
return *this;
}
PrefType GetPrefType() const {
return (PrefType)(mValue & (AsInt(PrefType::String) |
AsInt(PrefType::Int) |
AsInt(PrefType::Bool)));
}
bool HasDefault() const { return mValue & PREF_FLAG_HAS_DEFAULT; }
PrefTypeFlags& SetHasDefault(bool aSetOrUnset) { return SetFlag(PREF_FLAG_HAS_DEFAULT, aSetOrUnset); }
bool HasStickyDefault() const { return mValue & PREF_FLAG_STICKY_DEFAULT; }
PrefTypeFlags& SetHasStickyDefault(bool aSetOrUnset) { return SetFlag(PREF_FLAG_STICKY_DEFAULT, aSetOrUnset); }
bool IsLocked() const { return mValue & PREF_FLAG_LOCKED; }
PrefTypeFlags& SetLocked(bool aSetOrUnset) { return SetFlag(PREF_FLAG_LOCKED, aSetOrUnset); }
bool HasUserValue() const { return mValue & PREF_FLAG_USERSET; }
PrefTypeFlags& SetHasUserValue(bool aSetOrUnset) { return SetFlag(PREF_FLAG_USERSET, aSetOrUnset); }
private:
static uint16_t AsInt(PrefType aType) { return (uint16_t)aType; }
PrefTypeFlags& SetFlag(uint16_t aFlag, bool aSetOrUnset) {
mValue = aSetOrUnset ? mValue | aFlag : mValue & ~aFlag;
return *this;
}
// Pack both the value of type (PrefType) and flags into the same int. This is why
// the flag enum starts at 4, as PrefType occupies the bottom two bits.
enum {
PREF_FLAG_LOCKED = 4,
PREF_FLAG_USERSET = 8,
PREF_FLAG_CONFIG = 16,
PREF_FLAG_REMOTE = 32,
PREF_FLAG_LILOCAL = 64,
PREF_FLAG_HAS_DEFAULT = 128,
PREF_FLAG_STICKY_DEFAULT = 256,
};
uint16_t mValue;
};
struct PrefHashEntry : PLDHashEntryHdr
{
PrefTypeFlags prefFlags; // This field goes first to minimize struct size on 64-bit.
const char *key;
PrefValue defaultPref;
PrefValue userPref;
};
/*
// <font color=blue>
// Set the various types of preferences. These functions take a dotted
// notation of the preference name (e.g. "browser.startup.homepage").
// notation of the preference name (e.g. "browser.startup.homepage").
// Note that this will cause the preference to be saved to the file if
// it is different from the default. In other words, these are used
// to set the _user_ preferences.
@@ -103,8 +160,8 @@ bool PREF_HasUserPref(const char* pref_name);
// </font>
*/
nsresult PREF_GetIntPref(const char *pref,
int32_t * return_int, bool get_default);
nsresult PREF_GetBoolPref(const char *pref, bool * return_val, bool get_default);
int32_t * return_int, bool get_default);
nsresult PREF_GetBoolPref(const char *pref, bool * return_val, bool get_default);
/*
// <font color=blue>
// These functions are similar to the above "Get" version with the significant
@@ -173,10 +230,10 @@ typedef void (*PrefChangedFunc) (const char *, void *);
// matched all the parameters; otherwise it returns PREF_ERROR.
// </font>
*/
void PREF_RegisterCallback( const char* domain,
PrefChangedFunc callback, void* instance_data );
nsresult PREF_UnregisterCallback( const char* domain,
PrefChangedFunc callback, void* instance_data );
void PREF_RegisterCallback(const char* domain,
PrefChangedFunc callback, void* instance_data );
nsresult PREF_UnregisterCallback(const char* domain,
PrefChangedFunc callback, void* instance_data );
/*
* Used by nsPrefService as the callback function of the 'pref' parser
+19 -15
View File
@@ -114,17 +114,17 @@ pref_DoCallback(PrefParseState *ps)
PrefValue value;
switch (ps->vtype) {
case PREF_STRING:
case PrefType::String:
value.stringVal = ps->vb;
break;
case PREF_INT:
case PrefType::Int:
if ((ps->vb[0] == '-' || ps->vb[0] == '+') && ps->vb[1] == '\0') {
NS_WARNING("malformed integer value");
return false;
}
value.intVal = atoi(ps->vb);
break;
case PREF_BOOL:
case PrefType::Bool:
value.boolVal = (ps->vb == kTrue);
break;
default:
@@ -154,7 +154,7 @@ PREF_FinalizeParseState(PrefParseState *ps)
* Pseudo-BNF
* ----------
* function = LJUNK function-name JUNK function-args
* function-name = "user_pref" | "pref"
* function-name = "user_pref" | "pref" | "sticky_pref"
* function-args = "(" JUNK pref-name JUNK "," JUNK pref-value JUNK ")" JUNK ";"
* pref-name = quoted-string
* pref-value = quoted-string | "true" | "false" | integer-value
@@ -188,7 +188,7 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
if (ps->lbcur != ps->lb) { /* reset state */
ps->lbcur = ps->lb;
ps->vb = nullptr;
ps->vtype = PREF_INVALID;
ps->vtype = PrefType::Invalid;
ps->fdefault = false;
ps->fstickydefault = false;
}
@@ -200,10 +200,15 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
state = PREF_PARSE_UNTIL_EOL;
break;
case 'u': /* indicating user_pref */
case 'p': /* indicating pref */
case 's': /* indicating sticky_pref */
ps->smatch = (c == 'u' ? kUserPref :
(c == 's' ? kPrefSticky : kPref));
case 'p': /* indicating pref */
if (c == 'u') {
ps->smatch = kUserPref;
} else if (c == 's') {
ps->smatch = kPrefSticky;
} else {
ps->smatch = kPref;
}
ps->sindex = 1;
ps->nextstate = PREF_PARSE_UNTIL_OPEN_PAREN;
state = PREF_PARSE_MATCH_STRING;
@@ -284,21 +289,21 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
/* the pref value type is unknown. so, we scan for the first
* character of the value, and determine the type from that. */
if (c == '\"' || c == '\'') {
ps->vtype = PREF_STRING;
ps->vtype = PrefType::String;
ps->quotechar = c;
ps->nextstate = PREF_PARSE_UNTIL_CLOSE_PAREN;
state = PREF_PARSE_QUOTED_STRING;
}
else if (c == 't' || c == 'f') {
ps->vb = (char *) (c == 't' ? kTrue : kFalse);
ps->vtype = PREF_BOOL;
ps->vtype = PrefType::Bool;
ps->smatch = ps->vb;
ps->sindex = 1;
ps->nextstate = PREF_PARSE_UNTIL_CLOSE_PAREN;
state = PREF_PARSE_MATCH_STRING;
}
else if (isdigit(c) || (c == '-') || (c == '+')) {
ps->vtype = PREF_INT;
ps->vtype = PrefType::Int;
/* write c to line buffer... */
if (ps->lbcur == ps->lbend && !pref_GrowBuf(ps))
return false; /* out of memory */
@@ -511,13 +516,12 @@ PREF_ParseBuf(PrefParseState *ps, const char *buf, int bufLen)
break;
case PREF_PARSE_UNTIL_CLOSE_PAREN:
/* tolerate only whitespace and embedded comments */
if (c == ')')
if (c == ')') {
state = PREF_PARSE_UNTIL_SEMICOLON;
else if (c == '/') {
} else if (c == '/') {
ps->nextstate = state; /* return here when done with comment */
state = PREF_PARSE_COMMENT_MAYBE_START;
}
else if (!isspace(c)) {
} else if (!isspace(c)) {
NS_WARNING("malformed pref file");
return false;
}
+1 -1
View File
@@ -54,7 +54,7 @@ typedef struct PrefParseState {
char *lbend; /* line buffer end */
char *vb; /* value buffer (ptr into lb) */
PrefType vtype; /* PREF_STRING,INT,BOOL */
bool fdefault; /* true if (default) pref */
bool fdefault; /* true if (default) pref */
bool fstickydefault; /* true if (sticky) pref */
} PrefParseState;
+47
View File
@@ -0,0 +1,47 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* compile-time and runtime tests for whether to use MIPS-specific extensions */
#include "mips.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
enum{
MIPS_FLAG_LOONGSON3 = 1,
};
static unsigned
get_mips_cpu_flags(void)
{
unsigned flags = 0;
FILE *fin;
fin = fopen("/proc/cpuinfo","r");
if (fin != nullptr) {
char buf[1024];
memset(buf, 0, sizeof(buf));
fread(buf, sizeof(char), sizeof(buf) - 1, fin);
fclose(fin);
if (strstr(buf, "Loongson-3"))
flags |= MIPS_FLAG_LOONGSON3;
}
return flags;
}
static bool
check_loongson3(void)
{
// Cache a local copy so we only have to read /proc/cpuinfo once.
static unsigned mips_cpu_flags = get_mips_cpu_flags();
return (mips_cpu_flags & MIPS_FLAG_LOONGSON3) != 0;
}
namespace mozilla {
namespace mips_private {
bool isLoongson3 = check_loongson3();
} // namespace mips_private
} // namespace mozilla
+29
View File
@@ -0,0 +1,29 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* compile-time and runtime tests for whether to use MIPS-specific extensions */
#ifndef mozilla_mips_h_
#define mozilla_mips_h_
// for definition of MFBT_DATA
#include "mozilla/Types.h"
namespace mozilla {
namespace mips_private {
extern bool MFBT_DATA isLoongson3;
} // namespace mips_private
inline bool supports_mmi() {
#ifdef __mips__
return mips_private::isLoongson3;
#else
return false;
#endif
}
} // namespace mozilla
#endif /* !defined(mozilla_mips_h_) */
+9
View File
@@ -30,6 +30,9 @@ if CONFIG['OS_TARGET'] == 'Android':
]
if CONFIG['OS_TARGET'] == 'WINNT':
LOCAL_INCLUDES += [
'/memory/build',
]
SOURCES += [
'WindowsDllBlocklist.cpp',
]
@@ -53,6 +56,7 @@ if CONFIG['MOZ_NUWA_PROCESS']:
EXPORTS.mozilla += [
'arm.h',
'mips.h',
'SSE.h',
'WindowsDllBlocklist.h',
]
@@ -77,6 +81,11 @@ USE_LIBS += [
'mfbt',
]
if CONFIG['CPU_ARCH'].startswith('mips'):
SOURCES += [
'mips.cpp',
]
if CONFIG['MOZ_LINKER']:
USE_LIBS += [
'zlib',
+28 -14
View File
@@ -72,13 +72,14 @@ private:
public:
ZStreamBuf() : inUse(false) { }
char *get()
bool get(char*& out)
{
if (!inUse) {
inUse = true;
return buf;
out = buf;
return true;
} else {
MOZ_CRASH("ZStreamBuf already in use");
return false;
}
}
@@ -106,10 +107,18 @@ public:
public:
void *Alloc(uInt items, uInt size)
{
if (items == 1 && size <= stateBuf.size) {
return stateBuf.get();
} else if (items * size == windowBuf.size) {
return windowBuf.get();
if (items == 1 && size <= stateBuf1.size) {
char* res = nullptr;
if (stateBuf1.get(res) || stateBuf2.get(res)) {
return res;
}
MOZ_CRASH("ZStreamBuf already in use");
} else if (items * size == windowBuf1.size) {
char* res = nullptr;
if (windowBuf1.get(res) || windowBuf2.get(res)) {
return res;
}
MOZ_CRASH("ZStreamBuf already in use");
} else {
MOZ_CRASH("No ZStreamBuf for allocation");
}
@@ -117,17 +126,22 @@ public:
void Free(void *ptr)
{
if (stateBuf.Equals(ptr)) {
stateBuf.Release();
} else if (windowBuf.Equals(ptr)) {
windowBuf.Release();
if (stateBuf1.Equals(ptr)) {
stateBuf1.Release();
} else if (stateBuf2.Equals(ptr)) {
stateBuf2.Release();
}else if (windowBuf1.Equals(ptr)) {
windowBuf1.Release();
} else if (windowBuf2.Equals(ptr)) {
windowBuf2.Release();
} else {
MOZ_CRASH("Pointer doesn't match a ZStreamBuf");
}
}
ZStreamBuf<0x3000> stateBuf; // 0x3000 is an arbitrary size above 10K.
ZStreamBuf<1 << MAX_WBITS> windowBuf;
// 0x3000 is an arbitrary size above 10K.
ZStreamBuf<0x3000> stateBuf1, stateBuf2;
ZStreamBuf<1 << MAX_WBITS> windowBuf1, windowBuf2;
};
private:
@@ -335,7 +349,7 @@ private:
return reinterpret_cast<const char *>(this) + sizeof(*this)
+ filenameSize + extraFieldSize;
}
le_uint16 minVersion;
le_uint16 generalFlag;
le_uint16 compression;
+3 -2
View File
@@ -51,7 +51,8 @@ int32_t CacheObserver::sMemoryCacheCapacity = kDefaultMemoryCacheCapacity;
int32_t CacheObserver::sAutoMemoryCacheCapacity = -1;
static uint32_t const kDefaultDiskCacheCapacity = 250 * 1024; // 250 MB
uint32_t CacheObserver::sDiskCacheCapacity = kDefaultDiskCacheCapacity;
Atomic<uint32_t,Relaxed> CacheObserver::sDiskCacheCapacity
(kDefaultDiskCacheCapacity);
static uint32_t const kDefaultDiskFreeSpaceSoftLimit = 5 * 1024; // 5MB
uint32_t CacheObserver::sDiskFreeSpaceSoftLimit = kDefaultDiskFreeSpaceSoftLimit;
@@ -152,7 +153,7 @@ CacheObserver::AttachToPreferences()
mozilla::Preferences::AddUintVarCache(
&sMetadataMemoryLimit, "browser.cache.disk.metadata_memory_limit", kDefaultMetadataMemoryLimit);
mozilla::Preferences::AddUintVarCache(
mozilla::Preferences::AddAtomicUintVarCache(
&sDiskCacheCapacity, "browser.cache.disk.capacity", kDefaultDiskCacheCapacity);
mozilla::Preferences::AddBoolVarCache(
&sSmartCacheSizeEnabled, "browser.cache.disk.smart_size.enabled", kDefaultSmartCacheSizeEnabled);
+1 -1
View File
@@ -79,7 +79,7 @@ private:
static uint32_t sMetadataMemoryLimit;
static int32_t sMemoryCacheCapacity;
static int32_t sAutoMemoryCacheCapacity;
static uint32_t sDiskCacheCapacity;
static Atomic<uint32_t, Relaxed> sDiskCacheCapacity;
static uint32_t sDiskFreeSpaceSoftLimit;
static uint32_t sDiskFreeSpaceHardLimit;
static bool sSmartCacheSizeEnabled;