[aquaskk-changes 259] CVS update: AquaSKK

Back to archive index

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 •ÏŠ·ƒ`ƒFƒbƒN‚ðœ‹ŽB
+
+	* skkserv.cpp: Œ‹‰Ê•¶Žš—ñ‚Ì UTF-8 ¨ EUC •ÏŠ·‚É jconv ‚ðŽg‚¤‚悤‚É
+	C³B
+
 2006-11-27  Tomotaka SUWA  <t.suw****@mac*****>
 
 	* Package/Makefile: ƒrƒ‹ƒhƒ^[ƒQƒbƒg‚ð beta ‚Æ release ‚É•ª‚¯AƒCƒ“
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˜^’†’fB
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':		// ƒzƒXƒgî•ñ
+        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;
 	}


aquaskk-changes メーリングリストの案内
Back to archive index