summaryrefslogtreecommitdiffstats
path: root/chrome/tools/convert_dict
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 20:19:35 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 20:19:35 +0000
commit37c2f16b1138c430f804428c9f0ea038f1f0a186 (patch)
treecf26558e227a7a0fc99983b2be8a77a605a35ad8 /chrome/tools/convert_dict
parent226f045e5149fce5b8296b2f79c2b015628ebf62 (diff)
downloadchromium_src-37c2f16b1138c430f804428c9f0ea038f1f0a186.zip
chromium_src-37c2f16b1138c430f804428c9f0ea038f1f0a186.tar.gz
chromium_src-37c2f16b1138c430f804428c9f0ea038f1f0a186.tar.bz2
Dictionary-related Linux porting.
- build convert_dict tool - compile & pass hunspell tests - misc gcc cleanups Review URL: http://codereview.chromium.org/20462 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools/convert_dict')
-rw-r--r--chrome/tools/convert_dict/aff_reader.cc16
-rw-r--r--chrome/tools/convert_dict/convert_dict.scons7
2 files changed, 12 insertions, 11 deletions
diff --git a/chrome/tools/convert_dict/aff_reader.cc b/chrome/tools/convert_dict/aff_reader.cc
index ea797fb..2e0d8b3 100644
--- a/chrome/tools/convert_dict/aff_reader.cc
+++ b/chrome/tools/convert_dict/aff_reader.cc
@@ -91,20 +91,24 @@ bool AffReader::Read() {
// Affix. The first one is the number of ones following which we don't
// bother with.
has_indexed_affixes_ = true;
- if (got_first_af)
- AddAffixGroup(&line.substr(3));
- else
+ if (got_first_af) {
+ std::string group(line.substr(3));
+ AddAffixGroup(&group);
+ } else {
got_first_af = true;
+ }
} else if (StringBeginsWith(line, "SFX ") ||
StringBeginsWith(line, "PFX ")) {
AddAffix(&line);
} else if (StringBeginsWith(line, "REP ")) {
// The first rep line is the number of ones following which we don't
// bother with.
- if (got_first_rep)
- AddReplacement(&line.substr(4));
- else
+ if (got_first_rep) {
+ std::string replacement(line.substr(4));
+ AddReplacement(&replacement);
+ } else {
got_first_rep = true;
+ }
} else if (StringBeginsWith(line, "TRY ") ||
StringBeginsWith(line, "MAP ")) {
HandleEncodedCommand(line);
diff --git a/chrome/tools/convert_dict/convert_dict.scons b/chrome/tools/convert_dict/convert_dict.scons
index 07b7027..0026ca7 100644
--- a/chrome/tools/convert_dict/convert_dict.scons
+++ b/chrome/tools/convert_dict/convert_dict.scons
@@ -30,7 +30,7 @@ input_files = ChromeFileList([
'$CHROME_DIR/third_party/hunspell/google/bdict.h',
'$CHROME_DIR/third_party/hunspell/google/bdict_reader$OBJSUFFIX',
'$CHROME_DIR/third_party/hunspell/google/bdict_reader.h',
- '$CHROME_DIR/third_party/hunspell/google/bdict_writer.cc',
+ '$CHROME_DIR/third_party/hunspell/google/bdict_writer$OBJSUFFIX',
'$CHROME_DIR/third_party/hunspell/google/bdict_writer.h',
'convert_dict.cc',
'dic_reader.cc',
@@ -39,10 +39,7 @@ input_files = ChromeFileList([
'hunspell_reader.h',
])
-
-# TODO(port):
-if env.Bit('windows'):
- env.ChromeProgram('convert_dict', input_files)
+env.ChromeProgram('convert_dict', input_files)
p = env.ChromeMSVSProject('convert_dict.vcproj',
dest=('$CHROME_SRC_DIR/chrome/'