[aquaskk-changes 381] CVS update: AquaSKK

Back to archive index

t-suw****@users***** t-suw****@users*****
2007年 9月 20日 (木) 00:10:20 JST


Index: AquaSKK/KotoeriDictionary.cpp
diff -u AquaSKK/KotoeriDictionary.cpp:1.5 AquaSKK/KotoeriDictionary.cpp:1.6
--- AquaSKK/KotoeriDictionary.cpp:1.5	Wed Sep 19 22:57:17 2007
+++ AquaSKK/KotoeriDictionary.cpp	Thu Sep 20 00:10:20 2007
@@ -1,5 +1,5 @@
 /*
-  $Id: KotoeriDictionary.cpp,v 1.5 2007/09/19 13:57:17 t-suwa Exp $
+  $Id: KotoeriDictionary.cpp,v 1.6 2007/09/19 15:10:20 t-suwa Exp $
 
   MacOS X implementation of the SKK input method.
 
@@ -124,13 +124,17 @@
 	if(status != noErr) break;
 
 	DescType actualType;
-	char dataBuffer[kMaxKanjiLengthInAppleJapaneseDictionary];
+	UInt8 dataBuffer[kMaxKanjiLengthInAppleJapaneseDictionary];
 	Size actualSize;
 
 	// Get one data from AERecord
 	status = AEGetParamPtr(&dataList, 
 			       kDCMJapaneseHyokiTag,
-			       'ut16', // typeUTF16ExternalRepresentation
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
+			       typeUTF16ExternalRepresentation,
+#else
+			       typeUnicodeText,
+#endif
 			       &actualType,
 			       dataBuffer,
 			       kMaxKanjiLengthInAppleJapaneseDictionary,
@@ -141,7 +145,13 @@
 
 	if(status != noErr) break;
 
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1040
 	CppCFString tmp(CppCFData(dataBuffer, actualSize).getData());
+#else
+	CFStringRef entry = CFStringCreateWithBytes(0, dataBuffer, actualSize, kCFStringEncodingUnicode, 0);
+	CppCFString tmp(entry);
+	CFRelease(entry);
+#endif
 
 	result += '/';
 	result += tmp.encode().toStdString(kCFStringEncodingUTF8);


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