Tomotaka SUWA
t-suw****@users*****
2006年 11月 28日 (火) 23:36:08 JST
Index: AquaSKK/ChangeLog diff -u AquaSKK/ChangeLog:1.33.2.1 AquaSKK/ChangeLog:1.33.2.2 --- AquaSKK/ChangeLog:1.33.2.1 Mon Nov 27 15:16:27 2006 +++ AquaSKK/ChangeLog Tue Nov 28 23:36:08 2006 @@ -1,3 +1,12 @@ +2006-11-28 Tomotaka SUWA <t.suw****@mac*****> + + * Japanese.lproj/Preferences.nib: [U[«ÌxðC³B + + * WordRegisterMode.cpp (handleReturn): EUC Ï·`FbNðB + + * skkserv.cpp: ʶñÌ UTF-8 ¨ EUC Ï·É jconv ðg¤æ¤É + C³B + 2006-11-27 Tomotaka SUWA <t.suw****@mac*****> * Package/Makefile: rh^[Qbgð beta Æ release ɪ¯AC Index: AquaSKK/DictionarySet.cpp diff -u AquaSKK/DictionarySet.cpp:1.5.2.1 AquaSKK/DictionarySet.cpp:1.5.2.2 --- AquaSKK/DictionarySet.cpp:1.5.2.1 Mon Nov 27 15:16:27 2006 +++ AquaSKK/DictionarySet.cpp Tue Nov 28 23:36:08 2006 @@ -1,5 +1,5 @@ /* - $Id: DictionarySet.cpp,v 1.5.2.1 2006/11/27 06:16:27 t-suwa Exp $ + $Id: DictionarySet.cpp,v 1.5.2.2 2006/11/28 14:36:08 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -23,6 +23,7 @@ #include <iostream> #include <set> +#include <sstream> #include "BIMClientServer.h" #include "CppCFString.h" #include "OkuriganaEntry.h" @@ -98,31 +99,15 @@ }; // Null è¾æ¸ - - class NullDictionary: public Dictionary { public: - NullDictionary() { - // empty - } - virtual ~NullDictionary() { - // empty - } - virtual void load(const std::string& /* location */) { - // empty - } - virtual int countOkuriAri() { - return 0; - } - virtual int countOkuriNasi() { - return 0; - } - virtual std::string findOkuriAri(const std::string& /* query */) { - return std::string(); - } - virtual std::string findOkuriNasi(const std::string& /* query */) { - return std::string(); - } + NullDictionary() {} + virtual ~NullDictionary() {} + virtual void load(const std::string& /* location */) {} + virtual int countOkuriAri() { return 0; } + virtual int countOkuriNasi() { return 0; } + virtual std::string findOkuriAri(const std::string& /* query */) { return std::string(); } + virtual std::string findOkuriNasi(const std::string& /* query */) { return std::string(); } }; // ãã¡ã¯ããªã¡ã½ãã @@ -181,7 +166,7 @@ // å¤ãæ å ±ãã¯ãªã¢ãã prefs_.clear(); - // å人è¾æ¸ãå é ã«å ¥ãã + // ã¦ã¼ã¶ã¼è¾æ¸ãå é ã«å ¥ãã entry.active = true; entry.type = SKKDictionaryType; entry.location = SKKConfig::LibraryDirectory() + SKK_USER_DICT_PATH; @@ -439,7 +424,7 @@ } void DictionarySet::registerToUserDic(const CppCFString& query) { - // éãä»®åããï¼ã+ããr ã èµ°ã + // éãä»®åããï¼ã+ããr ã éã if(query[0] == '+') { int pos_first_space = query.indexOf(SKK_MSG_DELIMITER); int pos_second_space = query.indexOf(SKK_MSG_DELIMITER, pos_first_space + 1); @@ -473,7 +458,7 @@ } void DictionarySet::removeFromUserDic(const CppCFString& query) { - // éãä»®åããï¼ã+ããr ã èµ°ã + // éãä»®åããï¼ã+ããr ã éã if(query[0] == '+') { int pos_first_space = query.indexOf(SKK_MSG_DELIMITER); int pos_second_space = query.indexOf(SKK_MSG_DELIMITER, pos_first_space + 1); Index: AquaSKK/DictionarySet.h diff -u AquaSKK/DictionarySet.h:1.2.2.1 AquaSKK/DictionarySet.h:1.2.2.2 --- AquaSKK/DictionarySet.h:1.2.2.1 Mon Nov 27 15:16:27 2006 +++ AquaSKK/DictionarySet.h Tue Nov 28 23:36:08 2006 @@ -1,5 +1,5 @@ /* -*- c++ -*- - $Id: DictionarySet.h,v 1.2.2.1 2006/11/27 06:16:27 t-suwa Exp $ + $Id: DictionarySet.h,v 1.2.2.2 2006/11/28 14:36:08 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -21,10 +21,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#pragma once +#ifndef INC__DictionarySet__ +#define INC__DictionarySet__ #include <string> -#include <sstream> #include <vector> #include <map> @@ -78,3 +78,5 @@ void removeFromUserDic(const CppCFString& query); CppCFString searchCompletions(const CppCFString& query); }; + +#endif Index: AquaSKK/Info-AquaSKKInputMethod.plist diff -u AquaSKK/Info-AquaSKKInputMethod.plist:1.10.2.1 AquaSKK/Info-AquaSKKInputMethod.plist:1.10.2.2 --- AquaSKK/Info-AquaSKKInputMethod.plist:1.10.2.1 Mon Nov 27 15:16:27 2006 +++ AquaSKK/Info-AquaSKKInputMethod.plist Tue Nov 28 23:36:08 2006 @@ -23,7 +23,7 @@ <key>CFBundleSignature</key> <string>askk</string> <key>CFBundleVersion</key> - <string>2006-11-27</string> + <string>2006-11-28</string> <key>CSResourcesFileMapped</key> <true/> <key>tsInputMethodIconFileKey</key> Index: AquaSKK/Info-AquaSKKServer.plist diff -u AquaSKK/Info-AquaSKKServer.plist:1.10.2.1 AquaSKK/Info-AquaSKKServer.plist:1.10.2.2 --- AquaSKK/Info-AquaSKKServer.plist:1.10.2.1 Mon Nov 27 15:16:27 2006 +++ AquaSKK/Info-AquaSKKServer.plist Tue Nov 28 23:36:08 2006 @@ -23,7 +23,7 @@ <key>CFBundleSignature</key> <string>askk</string> <key>CFBundleVersion</key> - <string>2006-11-27</string> + <string>2006-11-28</string> <key>NSMainNibFile</key> <string>Principal</string> <key>NSPrincipalClass</key> Index: AquaSKK/WordRegisterMode.cpp diff -u AquaSKK/WordRegisterMode.cpp:1.5 AquaSKK/WordRegisterMode.cpp:1.5.2.1 --- AquaSKK/WordRegisterMode.cpp:1.5 Wed May 17 01:13:10 2006 +++ AquaSKK/WordRegisterMode.cpp Tue Nov 28 23:36:08 2006 @@ -1,5 +1,5 @@ /* - $Id: WordRegisterMode.cpp,v 1.5 2006/05/16 16:13:10 t-suwa Exp $ + $Id: WordRegisterMode.cpp,v 1.5.2.1 2006/11/28 14:36:08 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -64,12 +64,6 @@ fix(input_mode.getStringToFix()); if(buffer.length() > 0) { - // EUC ÉÏ·Å«È¢H - CFDataRef euc = CFStringCreateExternalRepresentation(NULL, buffer.getString(), kCFStringEncodingEUC_JP, 0); - if(!euc) { - return true; - } - CFRelease(euc); (dynamic_cast<RegistrationStarter*>(owner))->wordRegistrationFinished(); // Pêo^I¹B } else { (dynamic_cast<RegistrationStarter*>(owner))->wordRegistrationCanceled(); // Pêo^fB Index: AquaSKK/skkserv.cpp diff -u AquaSKK/skkserv.cpp:1.3 AquaSKK/skkserv.cpp:1.3.2.1 --- AquaSKK/skkserv.cpp:1.3 Sat Jun 3 10:23:18 2006 +++ AquaSKK/skkserv.cpp Tue Nov 28 23:36:08 2006 @@ -1,5 +1,5 @@ -/* -*- c++ -*- - $Id: skkserv.cpp,v 1.3 2006/06/03 01:23:18 t-suwa Exp $ +/* + $Id: skkserv.cpp,v 1.3.2.1 2006/11/28 14:36:08 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -26,6 +26,7 @@ #include <unistd.h> #include "CppCFString.h" #include "DictionarySet.h" +#include "jconv.h" #include "skkserv.h" skkserv::skkserv() : pth_(0), server_(server_stream_socket()), localonly_(true) { @@ -90,9 +91,9 @@ do { cmd = sock.get(); switch(cmd) { - case '0': // Øf + case '0': // åæ break; - case '1': { // õ + case '1': { // æ¤ç´¢ std::string word; sock >> word; sock.get(); @@ -100,9 +101,10 @@ CppCFString query(word.c_str(), kCFStringEncodingEUC_JP); CppCFString reply(DictionarySet::theInstance().skkserv_style_search(query)); - // ©Â©Á½H + // è¦ã¤ãã£ãï¼ if(reply.length() > 0) { - std::string candidates = reply.toStdString(); + std::string candidates; + jconv::convert_utf8_to_eucj(reply.toStdString(kCFStringEncodingUTF8), candidates); sock << "1" << candidates << "\n"; } else { sock << "4" << word << "\n"; @@ -110,15 +112,15 @@ sock.flush(); } break; - case '2': // o[W + case '2': // ãã¼ã¸ã§ã³ sock << "AquaSKKServer (skkserv emulation)" << std::endl; sock.flush(); break; - case '3': // zXgîñ + case '3': // ãã¹ãæ å ± sock << ip_address::getsockname(sock.socket()) << ":0.0.0.0:" << std::endl; sock.flush(); break; - default: // ³øÈR}h + default: // ç¡å¹ãªã³ãã³ã fprintf(stderr, "AquaSKK(skkserv): Unknown command[0x%02x]\n", cmd); break; }