t-suw****@users*****
t-suw****@users*****
2007年 9月 16日 (日) 09:21:44 JST
Index: AquaSKK/src/component/SKKComponent.cpp
diff -u AquaSKK/src/component/SKKComponent.cpp:1.1.2.2 AquaSKK/src/component/SKKComponent.cpp:1.1.2.3
--- AquaSKK/src/component/SKKComponent.cpp:1.1.2.2 Sun Aug 26 01:34:45 2007
+++ AquaSKK/src/component/SKKComponent.cpp Sun Sep 16 09:21:44 2007
@@ -1,5 +1,5 @@
/* -*- C++ -*-
- $Id: SKKComponent.cpp,v 1.1.2.2 2007/08/25 16:34:45 t-suwa Exp $
+ $Id: SKKComponent.cpp,v 1.1.2.3 2007/09/16 00:21:44 t-suwa Exp $
MacOS X implementation of the SKK input method.
@@ -21,6 +21,7 @@
*/
#include <iostream>
+#include <fstream>
#include <map>
#include <sstream>
#include <algorithm>
@@ -36,6 +37,7 @@
#include "SKKComponent.h"
#include "SKKSession.h"
#include "SKKPreProcessor.h"
+#include "SKKRomanKanaConverter.h"
enum {
kAboutCommand = 'abou',
@@ -108,6 +110,16 @@
// ãã¼ãããã®åæå
SKKPreProcessor::theInstance().Initialize();
+
+ // ãã¼ãåããªå¤æã«ã¼ã«ã®åæå
+ std::string path(SKKConfig::LibraryDirectory() + "kana-rule-list");
+ std::ifstream ifs(path.c_str());
+ if(ifs) {
+ SKKRomanKanaConverter::theInstance().Initialize(path);
+ } else {
+ SKKRomanKanaConverter::theInstance().Initialize(SKKConfig::ResourceDirectory() + "kana-rule-list");
+ }
+
}
SKKComponent::~SKKComponent() {