Tomotaka SUWA
t-suw****@users*****
2007年 1月 27日 (土) 12:52:30 JST
Index: AquaSKK/AsciiConversionMode.cpp diff -u AquaSKK/AsciiConversionMode.cpp:1.8 AquaSKK/AsciiConversionMode.cpp:1.9 --- AquaSKK/AsciiConversionMode.cpp:1.8 Mon Dec 18 00:05:41 2006 +++ AquaSKK/AsciiConversionMode.cpp Sat Jan 27 12:52:30 2007 @@ -1,10 +1,10 @@ /* - $Id: AsciiConversionMode.cpp,v 1.8 2006/12/17 15:05:41 t-suwa Exp $ + $Id: AsciiConversionMode.cpp,v 1.9 2007/01/27 03:52:30 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2007 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -183,11 +183,10 @@ // ¤[hâóâIðæÊÈçfÊèB } - if(SKKConfig::AbbrevModeKey() == skkchar) { + if(SKKConfig::AbbrevModeKey() == skkchar || SKKConfig::SetHenkanPointKey() == skkchar) { if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { parent->fix(this->getStringToFix()); - parent->handleInput(skkchar); - return false; + return parent->handleInput(skkchar); } } @@ -242,22 +241,9 @@ index += skkchar; } else if(status == STATUS_BLACK) { - // »ÝÌóâðmèµ½ãAú»µÄI¹·éªA - // ¯É¡ñÌ\¦/fixª½f³êȢƢéÌÅ - // AXL[Ï·[hðI¹³¹Ä©çparentÌhandleInputÉn·B - // AsciiConversionModeÍSTATUS_NULLÌÉÍ - // íÉkIgnoreThisðÔ·B - - // IÉM - sendCurrentCandidateToServerToRegister(); - - // û³êÈ¢ªA§IÉmè³¹éB - parent->fix(convertNumeric(numconv_, candidates[current_candidate_index])); - - parent->setEnabledAsciiConversionMode(false); - initialize(); - - parent->handleInput(skkchar); + // »ÝÌóâðmèµÄðp± + parent->fix(getStringToFix()); + return parent->handleInput(skkchar); } else if(status == STATUS_BLACK_WITH_WINDOW) { // asdfjkli1t[½èÌóâª7æèȯêαêà¸éBj̶ŠêÎ @@ -310,19 +296,11 @@ } } else if(status == STATUS_BLACK) { - // »ÝÌóâðmèµÄ©çÅã̶ðíB - // »µÄú»µÄI¹B - CppCFString str_to_fix(convertNumeric(numconv_, candidates[current_candidate_index])); - str_to_fix.eraseLast(1); - - // IÉM - sendCurrentCandidateToServerToRegister(); - - // Ìè - parent->fix(str_to_fix); + // »ÝÌóâðmèµÄê¶í + CppCFString str(getStringToFix()); + str.eraseLast(1); + parent->fix(str); parent->display(CppCFString()); - parent->setEnabledAsciiConversionMode(false); - initialize(); } else if(status == STATUS_BLACK_WITH_WINDOW) { // ÅÌt[ÈçA¥[hÖßé @@ -399,16 +377,8 @@ } if(status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // IÉM - sendCurrentCandidateToServerToRegister(); - - // »ÝÌóâðmèB - parent->fix(convertNumeric(numconv_, candidates[current_candidate_index])); - - if(status == STATUS_BLACK_WITH_WINDOW) { - // EChEð¶éB - closeCandidatesWindow(); - } + // »ÝÌóâðmè·é + parent->fix(getStringToFix()); } // AXL[Ï·[hðI¹·éB Index: AquaSKK/BIM.cpp diff -u AquaSKK/BIM.cpp:1.14 AquaSKK/BIM.cpp:1.15 --- AquaSKK/BIM.cpp:1.14 Sat Jul 1 08:44:30 2006 +++ AquaSKK/BIM.cpp Sat Jan 27 12:52:30 2007 @@ -1,10 +1,10 @@ /* - $Id: BIM.cpp,v 1.14 2006/06/30 23:44:30 t-suwa Exp $ + $Id: BIM.cpp,v 1.15 2007/01/27 03:52:30 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2005-2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2005-2007 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,9 +24,8 @@ #define TARGET_API_MAC_CARBON 1 #include <Carbon/Carbon.h> -#include <vector> -#include <map> -#include <stdio.h> +#include <list> +#include <cstdio> #include "BIM.h" #include "BIMInputEvents.h" @@ -53,10 +52,15 @@ #include "SKKConfig.h" enum { - kAboutSKKMenuCommand = 'ABOU', - kPreferencesMenuCommand = 'PREF' + kAboutCommand = 'abou', + kPreferencesCommand = 'pref', + kProjectWebCommand = 'sfjp', + kTipsCommand = 'tips' }; +static CFStringRef project_web_url = CFSTR("http://aquaskk.sourceforge.jp/"); +static CFStringRef tips_url = CFSTR("http://aquaskk.sourceforge.jp/inside_aquaskk/"); + static MenuRef gPencilMenu; static pascal OSStatus BIMPencilMenuEventHandler(EventHandlerCallRef inEventHandlerCallRef, @@ -64,78 +68,36 @@ // ZbVÇpÌ[eBeBNX class ActiveSession { - CFMutableArrayRef sessions_; + std::list<BIMSessionHandle> sessions_; - ActiveSession() : sessions_(0) { - CFArrayCallBacks c; - c.version = 0; - c.retain = ActiveSession::retain; - c.release = ActiveSession::release; - c.copyDescription = NULL; - c.equal = ActiveSession::equal; - sessions_ = CFArrayCreateMutable(kCFAllocatorDefault, 0, &c); - } - - // ȺÌOÂÍ callback p - static const void* retain(CFAllocatorRef /* allocator */, const void* value) { - return (const void *)CFRetain((CFTypeRef)value); - } - - static void release(CFAllocatorRef /* allocator */, const void* value) { - return CFRelease((CFTypeRef)value); - } - - static Boolean equal(const void* value1, const void* value2) { - return CFEqual((CFTypeRef)value1, (CFTypeRef)value2); - } + ActiveSession() {} public: // VOg static ActiveSession& theInstance() { - static ActiveSession self; - return self; + static ActiveSession obj; + return obj; } - ~ActiveSession() { - CFRelease(sessions_); + void Add(BIMSessionHandle handle) { + Remove(handle); + sessions_.push_back(handle); } - void Add(CFIndex session) { - CFNumberRef h = CFNumberCreate(kCFAllocatorDefault, kCFNumberCFIndexType, &session); - CFRange r = {0, 0}; - CFIndex i = CFArrayGetFirstIndexOfValue(sessions_, r, h); - if(i != -1) { - CFArrayRemoveValueAtIndex(sessions_, i); - } - // Vµ¢ZbVðzñÌöÉÇÁ·é - CFArrayAppendValue(sessions_, h); - CFRelease(h); + void Remove(BIMSessionHandle handle) { + sessions_.remove(handle); } - void Remove(CFIndex session) { - CFNumberRef h = CFNumberCreate(kCFAllocatorDefault, kCFNumberCFIndexType, &session); - CFRange r = {0, 0}; - CFIndex i = CFArrayGetFirstIndexOfValue(sessions_, r, h); - if(i != -1) { - CFArrayRemoveValueAtIndex(sessions_, i); + BIMSessionHandle GetCurrent() const { + if(sessions_.empty()) { + return 0; } - CFRelease(h); - } - void* GetCurrent() const { - CFIndex i = Count(); - if(i >= 0) { - CFNumberRef n = (CFNumberRef)CFArrayGetValueAtIndex(sessions_, i - 1); - CFIndex h = 0; - if(CFNumberGetValue(n, kCFNumberCFIndexType, &h)) { - return (void*)h; - } - } - return NULL; + return sessions_.back(); } - int Count(void) const { - return CFArrayGetCount(sessions_); + int Count() const { + return sessions_.size(); } }; @@ -147,6 +109,14 @@ KLSetCurrentKeyboardLayout(kbd); } +void OpenURL(const CFStringRef str) { + CFURLRef url = CFURLCreateWithString(kCFAllocatorDefault, str, 0); + + LSOpenCFURLRef(url, 0); + + CFRelease(url); +} + // O[oÈlðú»µAMj [ð\z·éB ComponentResult BIMInitialize(ComponentInstance /* inComponentInstance */, MenuRef *outTextServiceMenu) { ComponentResult result; @@ -256,7 +226,7 @@ // ZbVªANeBuÉÈé ComponentResult BIMSessionActivate(BIMSessionHandle inSessionHandle) { - ActiveSession::theInstance().Add((CFIndex)inSessionHandle); + ActiveSession::theInstance().Add(inSessionHandle); // Ýèð[h ClientConfiguration::theInstance().reloadConfiguration(); @@ -272,7 +242,7 @@ // ZbVªANeBuÅÈÈéB ComponentResult BIMSessionDeactivate(BIMSessionHandle inSessionHandle) { - ActiveSession::theInstance().Remove((CFIndex)inSessionHandle); + ActiveSession::theInstance().Remove(inSessionHandle); // ANeBuÅÈÈÁ½ðIÉ`¦éB if(ActiveSession::theInstance().Count() == 0) { @@ -342,7 +312,7 @@ // ANeBuÈZbVðÔ·B BIMSessionHandle BIMGetActiveSession() { - return (BIMSessionHandle)ActiveSession::theInstance().GetCurrent(); + return ActiveSession::theInstance().GetCurrent(); } // ¶ÌüÍÉεÄÌB @@ -420,12 +390,18 @@ result = GetEventParameter(inEventRef, kEventParamDirectObject, typeHICommand, nil, sizeof(command), nil, &command); if(result == noErr) { switch(command.commandID) { - case kAboutSKKMenuCommand: + case kAboutCommand: ServerConnectionFactory::theInstance().newConnection().send(kSKKShowAboutBox); break; - case kPreferencesMenuCommand: + case kPreferencesCommand: ServerConnectionFactory::theInstance().newConnection().send(kSKKShowPreferencesBox); break; + case kProjectWebCommand: + OpenURL(project_web_url); + break; + case kTipsCommand: + OpenURL(tips_url); + break; default: BIMLog("unknown menu event[%d], index[%d]\n", command.commandID, command.menu.menuItemIndex); result = eventNotHandledErr; Index: AquaSKK/ChangeLog diff -u AquaSKK/ChangeLog:1.37 AquaSKK/ChangeLog:1.38 --- AquaSKK/ChangeLog:1.37 Fri Dec 29 09:57:18 2006 +++ AquaSKK/ChangeLog Sat Jan 27 12:52:30 2007 @@ -1,3 +1,22 @@ +2007-01-27 Tomotaka SUWA <t.suw****@mac*****> + + * Makefile: ãã§ãã¯ããªãªã¼ã¹ç¨ã®ã¿ã¼ã²ããã追å ã + + * BIM.cpp: OpenURL() é¢æ°ã追å ãWeb ãµã¤ãç¨ã®ã¡ãã¥ã¼é ç®å¦çãå® + è£ ãActiveSession ã¯ã©ã¹ããªãã¡ã¯ã¿ãªã³ã°ã + + * Japanese.lproj/Menu.nib: Web ãµã¤ãç¨ã®ãªã³ã¯é ç®ã追å ã + + * KanjiConversionMode.cpp, AsciiConversionMode.cpp: + SKKConfig::SetHenkanPointKey() ã®å¦çã追å ããªãã¡ã¯ã¿ãªã³ã°ã + +2007-01-25 Tomotaka SUWA <t.suw****@mac*****> + + * KanaTreeController.*: decode() ã¡ã½ããã追å ã"," â ","ã + "♯" â "#"ã"&space;" â " " ã«ãã³ã¼ãããã + + * skkserv.cpp: ãéããããã®å¤å®ãã¹ãä¿®æ£ã + 2006-12-29 Tomotaka SUWA <t.suw****@mac*****> * AquaSKK 3.3 ãªãªã¼ã¹ã Index: AquaSKK/Info-AquaSKKInputMethod.plist diff -u AquaSKK/Info-AquaSKKInputMethod.plist:1.13 AquaSKK/Info-AquaSKKInputMethod.plist:1.14 --- AquaSKK/Info-AquaSKKInputMethod.plist:1.13 Fri Dec 29 09:57:18 2006 +++ AquaSKK/Info-AquaSKKInputMethod.plist Sat Jan 27 12:52:30 2007 @@ -19,11 +19,11 @@ <key>CFBundlePackageType</key> <string>thng</string> <key>CFBundleShortVersionString</key> - <string>3.3</string> + <string>fix-skkserv 1.0</string> <key>CFBundleSignature</key> <string>askk</string> <key>CFBundleVersion</key> - <string>2006-12-29</string> + <string>2007-01-27</string> <key>CSResourcesFileMapped</key> <true/> <key>tsInputMethodIconFileKey</key> Index: AquaSKK/Info-AquaSKKServer.plist diff -u AquaSKK/Info-AquaSKKServer.plist:1.13 AquaSKK/Info-AquaSKKServer.plist:1.14 --- AquaSKK/Info-AquaSKKServer.plist:1.13 Fri Dec 29 09:57:18 2006 +++ AquaSKK/Info-AquaSKKServer.plist Sat Jan 27 12:52:30 2007 @@ -7,7 +7,7 @@ <key>CFBundleExecutable</key> <string>AquaSKKServer</string> <key>CFBundleGetInfoString</key> - <string>Copyright 息 2005-2006, AquaSKK Project</string> + <string>Copyright 息 2005-2007, AquaSKK Project</string> <key>CFBundleIconFile</key> <string></string> <key>CFBundleIdentifier</key> @@ -19,11 +19,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>3.3</string> + <string>fix-skkserv 1.0</string> <key>CFBundleSignature</key> <string>askk</string> <key>CFBundleVersion</key> - <string>2006-12-29</string> + <string>2007-01-27</string> <key>NSMainNibFile</key> <string>Principal</string> <key>NSPrincipalClass</key> Index: AquaSKK/KanaTreeController.cpp diff -u AquaSKK/KanaTreeController.cpp:1.4 AquaSKK/KanaTreeController.cpp:1.5 --- AquaSKK/KanaTreeController.cpp:1.4 Wed May 17 01:13:10 2006 +++ AquaSKK/KanaTreeController.cpp Sat Jan 27 12:52:30 2007 @@ -1,10 +1,10 @@ /* - $Id: KanaTreeController.cpp,v 1.4 2006/05/16 16:13:10 t-suwa Exp $ + $Id: KanaTreeController.cpp,v 1.5 2007/01/27 03:52:30 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2007 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,6 +55,14 @@ // empty } +void KanaTreeController::decode(std::vector<CppCFString>& items) const { + for(unsigned i = 0; i < items.size(); ++ i) { + items[i].replace(",", ","); + items[i].replace("♯", "#"); + items[i].replace("&space;", " "); + } +} + void KanaTreeController::load(istream& is) { CppCFString empty; @@ -66,6 +74,7 @@ CppCFString line(str_line.c_str(),kCFStringEncodingEUC_JP); vector<CppCFString> items = line.split(','); + decode(items); if (items.size() < 4) { // ÙíÈsB @@ -75,7 +84,7 @@ } // ÊuðßéÚðlocationÆ·éÆAlocationÌ檩çÅã-1ÔÚÜÅÌ}ªSĶݷé±ÆðmFµA൳¯êÎìéB - CppCFString location = items[0].replace(",",","); + CppCFString location = items[0]; unsigned len_location = location.length(); KanaTreeElement* current_branch = &root; for (unsigned i = 0;i < len_location - 1;i++) { Index: AquaSKK/KanaTreeController.h diff -u AquaSKK/KanaTreeController.h:1.4 AquaSKK/KanaTreeController.h:1.5 --- AquaSKK/KanaTreeController.h:1.4 Wed May 17 01:13:10 2006 +++ AquaSKK/KanaTreeController.h Sat Jan 27 12:52:30 2007 @@ -1,10 +1,10 @@ /* - $Id: KanaTreeController.h,v 1.4 2006/05/16 16:13:10 t-suwa Exp $ + $Id: KanaTreeController.h,v 1.5 2007/01/27 03:52:30 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2007 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,6 +32,8 @@ class CppCFString; class KanaTreeController { + void decode(std::vector<CppCFString>& items) const; + protected: KanaTreeElement root; Index: AquaSKK/KanjiConversionMode.cpp diff -u AquaSKK/KanjiConversionMode.cpp:1.9 AquaSKK/KanjiConversionMode.cpp:1.10 --- AquaSKK/KanjiConversionMode.cpp:1.9 Mon Dec 18 00:05:41 2006 +++ AquaSKK/KanjiConversionMode.cpp Sat Jan 27 12:52:30 2007 @@ -1,10 +1,10 @@ /* - $Id: KanjiConversionMode.cpp,v 1.9 2006/12/17 15:05:41 t-suwa Exp $ + $Id: KanjiConversionMode.cpp,v 1.10 2007/01/27 03:52:30 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2007 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -322,11 +322,46 @@ // Ï·|CgL[ª¨³ê½Ì®ì if(SKKConfig::SetHenkanPointKey() == skkchar) { - if(status == STATUS_NULL || status == STATUS_WHITE_ROOT && root.length() == 0) { + if(status == STATUS_NULL || (status == STATUS_WHITE_ROOT && root.length() == 0)) { status = STATUS_WHITE_ROOT; // ¤[hÖB // æÊ\¦p root_to_display.clear().append(root).append(parent->getCurrentInputMode().getStringToDisplay()); + return false; + } + + // mèµÄp± + if(status == STATUS_WHITE_ROOT || status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { + parent->fix(getStringToFix()); + parent->setEnabledKanjiMode(true); + return handleInput(skkchar); + } + } + + // vvgÉÇÁ + if(status == STATUS_PROMPT) { + prompt_input += skkchar; + return false; + } + + // »ÝÌóâðmèµÄp± + if(status == STATUS_BLACK) { + parent->fix(getStringToFix()); + return parent->handleInput(skkchar); + } + + // Ið³ê½óâÅmè·é + if(status == STATUS_BLACK_WITH_WINDOW) { + CppCFString labels = CppCFString("asdfjkl").substring(0, candidates_window_cands_per_frame); + int cand_index = labels.indexOf(std::tolower(skkchar)); + + if(cand_index != -1) { + unsigned new_index = current_candidate_index + cand_index; + if(new_index < candidates.size()) { + // ±ÌCfBbNXª³êéÈçmèB + current_candidate_index = new_index; + return true; + } } return false; } @@ -399,38 +434,6 @@ return handleInput(' '); // ÄËüBÓ¡IÉÍÄAÅÍÈcontinueB } } - else if(status == STATUS_BLACK) { - // »ÝÌóâðmèµ½ãAêUú»µÄ©çÄËü·éB - // EͳêÈ¢ªdûÈ¢B - - // IÉM - sendCurrentCandidateToServerToRegister(); - - // mè - parent->fix(convertNumeric(numconv_, candidates[current_candidate_index])); - - initialize(); - return handleInput(skkchar); // ÄËü - } - else if(status == STATUS_BLACK_WITH_WINDOW) { - // ASDFJKLi1t[½èÌóâª7æèȯêαêà¸éBj̶ŠêÎ - // »Ìóâð½¾mè·éB - // »¤ÅȯêλÝÌóâð½¾mè·éB - int cand_index = CppCFString("ASDFJKL").substring(0, candidates_window_cands_per_frame).indexOf(skkchar); - if(cand_index != -1) { - unsigned new_index = current_candidate_index + cand_index; - if(new_index < candidates.size()) { - // ±ÌCfBbNXª³êéÈçmèB - current_candidate_index = new_index; - return true; - } - } - return false; - } - else if(status == STATUS_PROMPT) { - // »ÌÜÜprompt_inputÉÇÁB - prompt_input += skkchar; - } } else { if(status == STATUS_WHITE_ROOT) { // ¼¼üÍðÀsB @@ -460,44 +463,8 @@ return handleInput(' '); // ÄËüBÓ¡IÉÍÄAÅÍÈcontinueB } } - else if(status == STATUS_BLACK) { - // »ÝÌóâðmèµ½ãAú»µÄI¹·éªA - // ¯É¡ñÌ\¦/fixª½f³êȢƢéÌÅ - // ¿Ï·[hðI¹³¹Ä©çparentÌhandleInputÉn·B - // KanjiConversionModeÍSTATUS_NULLÌÉÍ - // íÉkIgnoreThisðÔ·B - - // IÉM - sendCurrentCandidateToServerToRegister(); - - // §³êÈ¢ªA§IÉmè³¹éB - parent->fix(convertNumeric(numconv_, candidates[current_candidate_index])); - - parent->setEnabledKanjiMode(false); - initialize(); - - parent->handleInput(skkchar); - } - else if(status == STATUS_BLACK_WITH_WINDOW) { - // asdfjkli1t[½èÌóâª7æèȯêαêà¸éBj̶ŠêÎ - // »Ìóâð½¾mè·éB - // »¤ÅȯêλÝÌóâð½¾mè·éB - int cand_index = CppCFString("asdfjkl").substring(0, candidates_window_cands_per_frame).indexOf(skkchar); - if(cand_index != -1) { - unsigned new_index = current_candidate_index + cand_index; - if(new_index < candidates.size()) { - // ±ÌCfBbNXª³êéÈçmèB - current_candidate_index = new_index; - return true; - } - } - return false; - } - else if(status == STATUS_PROMPT) { - // prompt_inputÉ»ÌÜÜÁ¦éB - prompt_input += skkchar; - } } + return false; } @@ -574,19 +541,11 @@ } } else if (status == STATUS_BLACK) { - // »ÝÌóâðmèµÄ©çÅã̶ðíB - // »µÄú»µÄI¹B - CppCFString str_to_fix(convertNumeric(numconv_, candidates[current_candidate_index])); - str_to_fix.eraseLast(1); - - // IÉM - sendCurrentCandidateToServerToRegister(); - - // Ìè - parent->fix(str_to_fix); + // »ÝÌóâðmèµÄê¶í + CppCFString str(getStringToFix()); + str.eraseLast(1); + parent->fix(str); parent->display(CppCFString()); - parent->setEnabledKanjiMode(false); - initialize(); } else if (status == STATUS_BLACK_WITH_WINDOW) { // ÅÌt[Èç¥[hÖßéB @@ -678,16 +637,8 @@ parent->getCurrentInputMode().getStringToFix(); if (status == STATUS_BLACK || status == STATUS_BLACK_WITH_WINDOW) { - // IÉM - sendCurrentCandidateToServerToRegister(); - - // »ÝÌóâðmèB - parent->fix(convertNumeric(numconv_, candidates[current_candidate_index])); - - if (status == STATUS_BLACK_WITH_WINDOW) { - // EChEð¶éB - closeCandidatesWindow(); - } + // »ÝÌóâðmè + parent->fix(getStringToFix()); } // ¿Ï·[hðI¹·éB Index: AquaSKK/Makefile diff -u AquaSKK/Makefile:1.3 AquaSKK/Makefile:1.4 --- AquaSKK/Makefile:1.3 Wed Apr 26 22:36:12 2006 +++ AquaSKK/Makefile Sat Jan 27 12:52:30 2007 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.3 2006/04/26 13:36:12 t-suwa Exp $ +# $Id: Makefile,v 1.4 2007/01/27 03:52:30 t-suwa Exp $ DARWIN = $(firstword $(subst ., ,$(shell uname -r))) TARGET = AquaSKKInputMethod.component @@ -26,5 +26,14 @@ sudo mkdir -p $(DEST) sudo cp -r $(BUILD)/$(TARGET) $(DEST) +check: all + cd tests; make check; cd .. + +beta: check + cd Package; make beta; cd .. + +release: check + cd Package; make release; cd .. + tar: tar zcf ../AquaSKK.tar.gz . --exclude="./build" --exclude="./Package/contents" Index: AquaSKK/skkserv.cpp diff -u AquaSKK/skkserv.cpp:1.4 AquaSKK/skkserv.cpp:1.5 --- AquaSKK/skkserv.cpp:1.4 Mon Dec 18 00:05:41 2006 +++ AquaSKK/skkserv.cpp Sat Jan 27 12:52:30 2007 @@ -1,10 +1,10 @@ /* - $Id: skkserv.cpp,v 1.4 2006/12/17 15:05:41 t-suwa Exp $ + $Id: skkserv.cpp,v 1.5 2007/01/27 03:52:30 t-suwa Exp $ MacOS X implementation of the SKK input method. Copyright (C) 2002-2004 phonohawk - Copyright (C) 2006 Tomotaka SUWA <t.suw****@mac*****> + Copyright (C) 2006-2007 Tomotaka SUWA <t.suw****@mac*****> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -104,7 +104,7 @@ jconv::convert_eucj_to_utf8(word, key); // æ¤ç´¢æååã®æå¾ã [a-z] ãªããéãããã - if(key.size() > 0 && std::isalpha(key[key.size() - 1])) { + if(1 < key.size() && 0x7f < (unsigned)key[0] && std::isalpha(key[key.size() - 1])) { result = DictionarySet::theInstance().FindOkuriAri(key, std::string(), '/'); } else { result = DictionarySet::theInstance().FindOkuriNasi(key, '/');