diff options
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/facade_phrase_table3.h | 4 | ||||
-rw-r--r-- | src/storage/phrase_large_table3_bdb.h | 5 | ||||
-rw-r--r-- | src/storage/phrase_large_table3_kyotodb.h | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/storage/facade_phrase_table3.h b/src/storage/facade_phrase_table3.h index c9f597c..f7b3c80 100644 --- a/src/storage/facade_phrase_table3.h +++ b/src/storage/facade_phrase_table3.h @@ -79,8 +79,8 @@ public: bool result = false; if (system_filename) { m_system_phrase_table = new PhraseLargeTable3; - result = m_system_phrase_table->load - (system_filename) || result; + result = m_system_phrase_table->attach + (system_filename, ATTACH_READONLY) || result; } if (user_filename) { m_user_phrase_table = new PhraseLargeTable3; diff --git a/src/storage/phrase_large_table3_bdb.h b/src/storage/phrase_large_table3_bdb.h index e3ebb2b..8610607 100644 --- a/src/storage/phrase_large_table3_bdb.h +++ b/src/storage/phrase_large_table3_bdb.h @@ -45,13 +45,16 @@ public: reset(); } + /* attach method */ + bool attach(const char * dbfile, guint32 flags); + /* load/store method */ /* use in-memory DBM here, for better performance. */ bool load(const char * filename); bool store(const char * new_filename); - bool load_text(FILE * file); + bool load_text(FILE * infile); /* search method */ int search(int phrase_length, /* in */ const ucs4_t phrase[], diff --git a/src/storage/phrase_large_table3_kyotodb.h b/src/storage/phrase_large_table3_kyotodb.h index deb83e8..fa76ffe 100644 --- a/src/storage/phrase_large_table3_kyotodb.h +++ b/src/storage/phrase_large_table3_kyotodb.h @@ -45,13 +45,16 @@ public: reset(); } + /* attach method */ + bool attach(const char * dbfile, guint32 flags); + /* load/store method */ /* use in-memory DBM here, for better performance. */ bool load(const char * filename); bool store(const char * new_filename); - bool load_text(FILE * file); + bool load_text(FILE * infile); /* search method */ int search(int phrase_length, /* in */ const ucs4_t phrase[], |