Tomotaka SUWA
t-suw****@users*****
2006年 3月 10日 (金) 00:33:20 JST
Index: AquaSKK/ChangeLog diff -u AquaSKK/ChangeLog:1.20.2.12 AquaSKK/ChangeLog:1.20.2.13 --- AquaSKK/ChangeLog:1.20.2.12 Wed Mar 8 22:02:07 2006 +++ AquaSKK/ChangeLog Fri Mar 10 00:33:20 2006 @@ -1,3 +1,16 @@ +2006-03-10 Tomotaka SUWA <t.suw****@mac*****> + + * skkserv.cpp: OñÌC³ð³Éß·BÀSDZë©ë¯ÈC³¾Á½B + + * PreferencesController.mm: IconFamily ð byte swap ·éæ¤ÉC³B + + * SKKDictionary.cpp: ©®XV«Ì`FbNÔuðC³BOS ªX[ + vµÄ¢éÔÍAsleep(2) ÌoßÔÉÁZ³êÈ¢B±Ì½ßA10 + ªÔuÅoßÔð`FbNµAßlÅ^CAEg·éæ¤Éµ½B + + * ServerConnectionFactory.cpp: è³Å^CAEgªpµ½½ßAT[ + o[ÌN®^CAEgð 10 b ¨ 20 bÉÏXB + 2006-03-08 Tomotaka SUWA <t.suw****@mac*****> * SKKDictionary.cpp: ©®XVªêñµ©Å«È¢sïðC³B Index: AquaSKK/PreferencesController.mm diff -u AquaSKK/PreferencesController.mm:1.6.2.10 AquaSKK/PreferencesController.mm:1.6.2.11 --- AquaSKK/PreferencesController.mm:1.6.2.10 Mon Mar 6 21:03:00 2006 +++ AquaSKK/PreferencesController.mm Fri Mar 10 00:33:20 2006 @@ -1,5 +1,5 @@ /* -*- objc -*- - $Id: PreferencesController.mm,v 1.6.2.10 2006/03/06 12:03:00 t-suwa Exp $ + $Id: PreferencesController.mm,v 1.6.2.11 2006/03/09 15:33:20 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -78,6 +78,12 @@ NSData* iconData; IconRefToIconFamily(icon, kSelectorAllSmallData, &iconFamily); + +#define Swap32(val) val = CFSwapInt32BigToHost(val); + Swap32(iconFamily[0]->resourceType); + Swap32(iconFamily[0]->resourceSize); + Swap32(iconFamily[0]->elements[0].elementType); + Swap32(iconFamily[0]->elements[0].elementSize); iconData = [NSData dataWithBytes: *iconFamily length: iconFamily[0]->resourceSize]; image = [[[NSImage alloc] initWithData:iconData] autorelease]; } Index: AquaSKK/SKKDictionary.cpp diff -u AquaSKK/SKKDictionary.cpp:1.6.2.4 AquaSKK/SKKDictionary.cpp:1.6.2.5 --- AquaSKK/SKKDictionary.cpp:1.6.2.4 Wed Mar 8 22:02:07 2006 +++ AquaSKK/SKKDictionary.cpp Fri Mar 10 00:33:20 2006 @@ -1,5 +1,5 @@ /* - $Id: SKKDictionary.cpp,v 1.6.2.4 2006/03/08 13:02:07 t-suwa Exp $ + $Id: SKKDictionary.cpp,v 1.6.2.5 2006/03/09 15:33:20 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -317,8 +317,10 @@ std::cerr << "SKKAutoUpdateDictionary: can't connect to [" << obj->host_ << "]" << std::endl; } - // 6 ÔÒ - sleep(60 * 60 * 6); + // 10 ªÔuÅA6 Ôoß·éÌð`FbN·é + for(time_t nextTime = time(0) + (60 * 60 * 6); time(0) < nextTime; sleep(60 * 10)) { + // ±¤µÈ¢ÆAOS ªX[v[h©çAµ½É~¦È¢ + } } } Index: AquaSKK/ServerConnectionFactory.cpp diff -u AquaSKK/ServerConnectionFactory.cpp:1.2.2.2 AquaSKK/ServerConnectionFactory.cpp:1.2.2.3 --- AquaSKK/ServerConnectionFactory.cpp:1.2.2.2 Sun Feb 19 13:50:54 2006 +++ AquaSKK/ServerConnectionFactory.cpp Fri Mar 10 00:33:20 2006 @@ -1,5 +1,5 @@ /* - $Id: ServerConnectionFactory.cpp,v 1.2.2.2 2006/02/19 04:50:54 t-suwa Exp $ + $Id: ServerConnectionFactory.cpp,v 1.2.2.3 2006/03/09 15:33:20 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -47,20 +47,20 @@ prepareServer(); if(!serverIsRunning) { - // 10 bÒÁÄàÚ±Â\ÉÈçȯêÎ^CAEg + // 20 bÒÁÄàÚ±Â\ÉÈçȯêÎ^CAEg CppCFString server_port_name(kBasicServerPortName); - unsigned long timeout = TickCount() + (10 * 60); + time_t timeout = time(0) + 20; while(true) { try { ServerConnection connection(server_port_name); serverIsRunning = true; break; } catch (std::exception& e) { - if(TickCount() > timeout) { + if(time(0) > timeout) { fprintf(stderr, "*** Timed out. AquaSKKServer.app didn\'t get online.\n"); break; // ^CAEg } else { - sleep(2); // 2 bÒÁÄÄÚ± + sleep(5); // 5 bÒÁÄÄÚ± } } } Index: AquaSKK/skkserv.cpp diff -u AquaSKK/skkserv.cpp:1.1.2.6 AquaSKK/skkserv.cpp:1.1.2.7 --- AquaSKK/skkserv.cpp:1.1.2.6 Mon Mar 6 21:03:00 2006 +++ AquaSKK/skkserv.cpp Fri Mar 10 00:33:20 2006 @@ -1,5 +1,5 @@ /* -*- c++ -*- - $Id: skkserv.cpp,v 1.1.2.6 2006/03/06 12:03:00 t-suwa Exp $ + $Id: skkserv.cpp,v 1.1.2.7 2006/03/09 15:33:20 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -53,12 +53,12 @@ } void skkserv::stop() { - server_.close(); if(pth_) { pthread_cancel(pth_); pthread_join(pth_, NULL); pth_ = 0; } + server_.close(); } void* skkserv::engine(void* param) {