[aquaskk-changes 380] CVS update: AquaSKK

Back to archive index

t-suw****@users***** t-suw****@users*****
2007年 9月 19日 (水) 22:57:17 JST


Index: AquaSKK/BIMInputEvents.cpp
diff -u AquaSKK/BIMInputEvents.cpp:1.3 AquaSKK/BIMInputEvents.cpp:1.4
--- AquaSKK/BIMInputEvents.cpp:1.3	Wed Apr 26 22:36:12 2006
+++ AquaSKK/BIMInputEvents.cpp	Wed Sep 19 22:57:17 2007
@@ -1,5 +1,5 @@
 /*
-  $Id: BIMInputEvents.cpp,v 1.3 2006/04/26 13:36:12 t-suwa Exp $
+  $Id: BIMInputEvents.cpp,v 1.4 2007/09/19 13:57:17 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -228,10 +228,7 @@
 
 // ƒCƒ“ƒvƒbƒgƒGƒŠƒA‚ÌŠeŽíî•ñ‚𓾂éB
 void BIMHandleOffsetToPos(struct OffsetToPosParams *offsetToPosParams) {
-    BIMHandleOffsetToPos(BIMGetActiveSession(), offsetToPosParams);
-}
-
-void BIMHandleOffsetToPos(BIMSessionHandle inSessionHandle, struct OffsetToPosParams *offsetToPosParams) {
+    BIMSessionHandle inSessionHandle = BIMGetActiveSession();
     OSStatus		status;
     ComponentInstance	componentInstance;
     EventRef		event;
Index: AquaSKK/ChangeLog
diff -u AquaSKK/ChangeLog:1.43 AquaSKK/ChangeLog:1.44
--- AquaSKK/ChangeLog:1.43	Fri Jun 15 22:18:28 2007
+++ AquaSKK/ChangeLog	Wed Sep 19 22:57:17 2007
@@ -1,3 +1,18 @@
+2007-09-19  Tomotaka SUWA  <t.suw****@mac*****>
+
+	* BIMInputEvents.cpp (BIMHandleOffsetToPos): セッションハンドルを要
+	求するオーバーロードを廃止。
+
+	* skkserv.cpp: サーバー補完要求時には明示的に無視するように修正。
+
+	* SKKDictionary.cpp: 単語削除時の不要な検索を除去。
+
+	* KotoeriDictionary.cpp: 検索できない不具合を修正。また、検索結果の
+	エンコードを忘れていたため追加。
+
+	* KanjiConversionMode.cpp: 削除対象候補をエンコードし忘れていたため
+	に削除できなかった不具合を修正。
+
 2007-06-15  Tomotaka SUWA  <t.suw****@mac*****>
 
 	* AquaSKK.pbproj/project.pbxproj: Panther でビルドできるように修
Index: AquaSKK/Info-AquaSKKInputMethod.plist
diff -u AquaSKK/Info-AquaSKKInputMethod.plist:1.16 AquaSKK/Info-AquaSKKInputMethod.plist:1.17
--- AquaSKK/Info-AquaSKKInputMethod.plist:1.16	Sat Jun  9 10:53:53 2007
+++ AquaSKK/Info-AquaSKKInputMethod.plist	Wed Sep 19 22:57:17 2007
@@ -19,11 +19,11 @@
 	<key>CFBundlePackageType</key>
 	<string>thng</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.4</string>
+	<string>modest-learning 1.1</string>
 	<key>CFBundleSignature</key>
 	<string>askk</string>
 	<key>CFBundleVersion</key>
-	<string>2007-06-09</string>
+	<string>2007-09-18</string>
 	<key>CSResourcesFileMapped</key>
 	<true/>
 	<key>tsInputMethodIconFileKey</key>
Index: AquaSKK/Info-AquaSKKServer.plist
diff -u AquaSKK/Info-AquaSKKServer.plist:1.16 AquaSKK/Info-AquaSKKServer.plist:1.17
--- AquaSKK/Info-AquaSKKServer.plist:1.16	Sat Jun  9 10:53:53 2007
+++ AquaSKK/Info-AquaSKKServer.plist	Wed Sep 19 22:57:17 2007
@@ -19,11 +19,11 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.4</string>
+	<string>modest-learning 1.1</string>
 	<key>CFBundleSignature</key>
 	<string>askk</string>
 	<key>CFBundleVersion</key>
-	<string>2007-06-09</string>
+	<string>2007-09-18</string>
 	<key>NSMainNibFile</key>
 	<string>Principal</string>
 	<key>NSPrincipalClass</key>
Index: AquaSKK/KanjiConversionMode.cpp
diff -u AquaSKK/KanjiConversionMode.cpp:1.13 AquaSKK/KanjiConversionMode.cpp:1.14
--- AquaSKK/KanjiConversionMode.cpp:1.13	Thu Jun 14 21:00:16 2007
+++ AquaSKK/KanjiConversionMode.cpp	Wed Sep 19 22:57:17 2007
@@ -1,5 +1,5 @@
 /*
-  $Id: KanjiConversionMode.cpp,v 1.13 2007/06/14 12:00:16 t-suwa Exp $
+  $Id: KanjiConversionMode.cpp,v 1.14 2007/09/19 13:57:17 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -1028,7 +1028,7 @@
 	// かな 仮名 → -かな 仮名
 	// 読みについては全角仮名と半角仮名を平仮名に変換
 	query.append('-').append(HiraganaInputMode::convert(root)).append(SKK_MSG_DELIMITER);
-	query.append(candidates[current_candidate_index]);
+	query.append(candidates[current_candidate_index].encode());
     }
 
     // 鯖に渡す
Index: AquaSKK/KotoeriDictionary.cpp
diff -u AquaSKK/KotoeriDictionary.cpp:1.4 AquaSKK/KotoeriDictionary.cpp:1.5
--- AquaSKK/KotoeriDictionary.cpp:1.4	Mon Dec 18 00:05:41 2006
+++ AquaSKK/KotoeriDictionary.cpp	Wed Sep 19 22:57:17 2007
@@ -1,5 +1,5 @@
 /*
-  $Id: KotoeriDictionary.cpp,v 1.4 2006/12/17 15:05:41 t-suwa Exp $
+  $Id: KotoeriDictionary.cpp,v 1.5 2007/09/19 13:57:17 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -24,10 +24,11 @@
     Directory Maneger対応 2002.09.25 Shin_ichi Abe.
 */
 
-#include <Carbon/Carbon.h>
 #include <iostream>
 #include <vector>
 #include "KotoeriDictionary.h"
+#include "CppCFData.h"
+#include "CppCFString.h"
 
 KotoeriDictionary::KotoeriDictionary() : path_(0), isRegistered_(false), id_(0) {
     // empty
@@ -129,7 +130,7 @@
 	// Get one data from AERecord
 	status = AEGetParamPtr(&dataList, 
 			       kDCMJapaneseHyokiTag,
-			       typeUTF8Text,
+			       'ut16', // typeUTF16ExternalRepresentation
 			       &actualType,
 			       dataBuffer,
 			       kMaxKanjiLengthInAppleJapaneseDictionary,
@@ -140,8 +141,10 @@
 
 	if(status != noErr) break;
 
+	CppCFString tmp(CppCFData(dataBuffer, actualSize).getData());
+
 	result += '/';
-	result.append(dataBuffer, actualSize);
+	result += tmp.encode().toStdString(kCFStringEncodingUTF8);
     }
     DCMDisposeRecordIterator(iterator);
 
@@ -162,12 +165,13 @@
     // レコードを検索
     OSStatus status;
     DCMFieldTag	dataFieldTagList[] = { kDCMJapaneseHyokiTag };
-    CFStringRef keydata = CFStringCreateWithCString(NULL, key.c_str(), kCFStringEncodingUTF8);
+    CFStringRef keydata = CppCFString(key.c_str(), kCFStringEncodingUTF8).toBigEndianCFString();
+
     status = DCMFindRecords(ref, // Dictionary reference
-			    kDCMJapaneseYomiTag,  // key field tag
-			    CFStringGetLength(keydata) * sizeof(UInt16), // key data length
+			    kDCMJapaneseYomiTag,      // key field tag
+			    CFStringGetLength(keydata) * sizeof(UniChar), // key data length
 			    CFStringGetCharactersPtr(keydata), // key data
-			    kDCMFindMethodExactMatch,  // find method
+			    kDCMFindMethodExactMatch, // find method
 			    1,		      // number of data field
 			    dataFieldTagList, // data field tag list
 			    0, 0,	      // search all records
Index: AquaSKK/KotoeriDictionary.h
diff -u AquaSKK/KotoeriDictionary.h:1.3 AquaSKK/KotoeriDictionary.h:1.4
--- AquaSKK/KotoeriDictionary.h:1.3	Mon Dec 18 00:05:41 2006
+++ AquaSKK/KotoeriDictionary.h	Wed Sep 19 22:57:17 2007
@@ -1,5 +1,5 @@
 /*
-  $Id: KotoeriDictionary.h,v 1.3 2006/12/17 15:05:41 t-suwa Exp $
+  $Id: KotoeriDictionary.h,v 1.4 2007/09/19 13:57:17 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -27,6 +27,7 @@
 #ifndef INC__KotoeriDictionary__
 #define INC__KotoeriDictionary__
 
+#include <Carbon/Carbon.h>
 #include "Dictionary.h"
 
 class KotoeriDictionary: public Dictionary {
Index: AquaSKK/SKKDictionary.cpp
diff -u AquaSKK/SKKDictionary.cpp:1.15 AquaSKK/SKKDictionary.cpp:1.16
--- AquaSKK/SKKDictionary.cpp:1.15	Fri Dec 29 00:37:03 2006
+++ AquaSKK/SKKDictionary.cpp	Wed Sep 19 22:57:17 2007
@@ -1,5 +1,5 @@
 /*
-  $Id: SKKDictionary.cpp,v 1.15 2006/12/28 15:37:03 t-suwa Exp $
+  $Id: SKKDictionary.cpp,v 1.16 2007/09/19 13:57:17 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -462,7 +462,7 @@
     // 見つかった?
     if(i != okuriAri_.end()) {
 	entry = SKKEntry::ParseOkuriAri(i->first, i->second);
-	okuriAri_.erase(std::remove(okuriAri_.begin(), okuriAri_.end(), *i), okuriAri_.end());
+	okuriAri_.erase(i);
     }
 
     entry.Update(SKKCandidate(kanji), okuri);
@@ -479,7 +479,7 @@
     // 見つかった?
     if(i != okuriNasi_.end()) {
 	entry = SKKEntry::ParseOkuriNasi(i->first, i->second);
-	okuriNasi_.erase(std::remove(okuriNasi_.begin(), okuriNasi_.end(), *i), okuriNasi_.end());
+	okuriNasi_.erase(i);
     }
 
     entry.Update(SKKCandidate(kanji));
@@ -506,7 +506,7 @@
 	*i = SKKPair(entry.Key(), entry.Candidate());
     } else {
 	// このエントリを消してしまう
-	okuriAri_.erase(std::remove(okuriAri_.begin(), okuriAri_.end(), *i), okuriAri_.end());
+	okuriAri_.erase(i);
     }
 
     // 保存する
@@ -530,7 +530,7 @@
 	*i = SKKPair(entry.Key(), entry.Candidate());
     } else {
 	// このエントリを消してしまう
-	okuriNasi_.erase(std::remove(okuriNasi_.begin(), okuriNasi_.end(), *i), okuriNasi_.end());
+	okuriNasi_.erase(i);
     }
 
     // 保存する
Index: AquaSKK/skkserv.cpp
diff -u AquaSKK/skkserv.cpp:1.5 AquaSKK/skkserv.cpp:1.6
--- AquaSKK/skkserv.cpp:1.5	Sat Jan 27 12:52:30 2007
+++ AquaSKK/skkserv.cpp	Wed Sep 19 22:57:17 2007
@@ -1,5 +1,5 @@
 /*
-  $Id: skkserv.cpp,v 1.5 2007/01/27 03:52:30 t-suwa Exp $
+  $Id: skkserv.cpp,v 1.6 2007/09/19 13:57:17 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -93,6 +93,7 @@
         switch(cmd) {
         case '0':		// 切断
             break;
+
 	case '1': {		// 検索
 	    std::string word;
             sock >> word;
@@ -114,23 +115,32 @@
 	    if(result != "//") {
 		std::string candidates;
 		jconv::convert_utf8_to_eucj(result, candidates);
-		sock << "1" << candidates << "\n";
+		sock << '1' << candidates << std::endl;
 	    } else {
-		sock << "4" << word << "\n";
+		sock << '4' << word << ' ';
 	    }
 	    sock.flush();
 	}
             break;
+
         case '2':		// バージョン
-	    sock << "AquaSKKServer (skkserv emulation)" << std::endl;
+	    sock << "AquaSKKServer1.0 ";
             sock.flush();
             break;
+
         case '3':		// ホスト情報
-	    sock << ip_address::getsockname(sock.socket()) << ":0.0.0.0:" << std::endl;
+	    sock << ip_address::getsockname(sock.socket()) << ":0.0.0.0: ";
             sock.flush();
             break;
+
+	case '4':		// サーバー補完
+	    // 今のところ未対応
+	    sock.ignore(0xff, ' ');
+
         default:		// 無効なコマンド
 	    fprintf(stderr, "AquaSKK(skkserv): Unknown command[0x%02x]\n", cmd);
+	    sock << '0';
+            sock.flush();
             break;
 	}
     } while(sock.good() && cmd != '0');


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