diff options
author | Peng Wu <alexepico@gmail.com> | 2010-09-08 18:13:51 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-09-08 18:13:51 +0800 |
commit | 3662fa38302b6b75fe1b03dfb68edfa641e4f13c (patch) | |
tree | 884221510ab29f7724aa2724971bd17b67cdd6e0 /src | |
parent | 3c97ae50df5022d82671982f86ad94c946f0c22d (diff) | |
download | libpinyin-3662fa38302b6b75fe1b03dfb68edfa641e4f13c.tar.gz libpinyin-3662fa38302b6b75fe1b03dfb68edfa641e4f13c.tar.xz libpinyin-3662fa38302b6b75fe1b03dfb68edfa641e4f13c.zip |
fixes compile errors
Diffstat (limited to 'src')
-rw-r--r-- | src/segment/Makefile.am | 2 | ||||
-rw-r--r-- | src/segment/spseg.cpp | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/segment/Makefile.am b/src/segment/Makefile.am index b411e46..69db06c 100644 --- a/src/segment/Makefile.am +++ b/src/segment/Makefile.am @@ -29,4 +29,4 @@ mmseg_LDADD = @GLIB2_LDFLAGS@ spseg_SOURCES = spseg.cpp -spseg_LDADD = @GLIB2_LDFLAGS@ +spseg_LDADD = @GLIB2_LDFLAGS@ ../storage/libstorage.la diff --git a/src/segment/spseg.cpp b/src/segment/spseg.cpp index 6fdb234..a710d47 100644 --- a/src/segment/spseg.cpp +++ b/src/segment/spseg.cpp @@ -20,6 +20,7 @@ */ #include <stdio.h> +#include <locale.h> #include <glib.h> #include "novel_types.h" #include "phrase_large_table.h" @@ -40,6 +41,11 @@ struct SegmentStep{ size_t m_nword; //backtrace information, -1 one step backward. gint m_backword_nstep; +}; + +void print_help(){ + printf("Usage: mmseg [--generate-extra-enter]\n"); + exit(1); } int main(int argc, char * argv[]){ @@ -64,7 +70,7 @@ int main(int argc, char * argv[]){ fprintf(stderr, "can't open gb_char.table!\n"); exit(1); } - g_phrases.load_text(gb_file); + g_phrases->load_text(gb_file); fclose(gb_file); FILE * gbk_file = fopen("../../data/gbk_char.table", "r"); @@ -72,12 +78,12 @@ int main(int argc, char * argv[]){ fprintf(stderr, "can't open gbk_char.table!\n"); exit(1); } - g_phrases.load_text(gbk_file); + g_phrases->load_text(gbk_file); fclose(gbk_file); MemoryChunk * chunk = new MemoryChunk; - g_phrases.store(chunk); - g_phrases.load(chunk); + g_phrases->store(chunk); + g_phrases->load(chunk); return 0; } |