[aquaskk-changes 162] CVS update: AquaSKK

Back to archive index

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ˆÀ‘S‚Ç‚±‚ë‚©ŠëŒ¯‚ȏC³‚¾‚Á‚½B
+
+	* PreferencesController.mm: IconFamily ‚ð byte swap ‚·‚é‚悤‚ɏC³B
+
+	* SKKDictionary.cpp: Ž©“®XVŽ«‘‚̃`ƒFƒbƒNŠÔŠu‚ðC³BOS ‚ªƒXƒŠ[
+	ƒv‚µ‚Ä‚¢‚鎞ŠÔ‚́Asleep(2) ‚ÌŒo‰ßŽžŠÔ‚ɉÁŽZ‚³‚ê‚È‚¢B‚±‚Ì‚½‚߁A10
+	•ªŠÔŠu‚ÅŒo‰ßŽžŠÔ‚ðƒ`ƒFƒbƒN‚µA‹ßŽ—’l‚Ń^ƒCƒ€ƒAƒEƒg‚·‚é‚悤‚É‚µ‚½B
+
+	* ServerConnectionFactory.cpp: ŽèŒ³‚Ń^ƒCƒ€ƒAƒEƒg‚ª•p”­‚µ‚½‚½‚߁AƒT[
+	ƒo[‚Ì‹N“®ƒ^ƒCƒ€ƒAƒEƒg‚ð 10 •b ¨ 20 •b‚ɕύXB
+
 2006-03-08  Tomotaka SUWA  <t.suw****@mac*****>
 
 	* SKKDictionary.cpp: Ž©“®XV‚ªˆê‰ñ‚µ‚©‚Å‚«‚È‚¢•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‰ß‚·‚é‚Ì‚ðƒ`ƒFƒbƒN‚·‚é
+	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‘Ò‚Á‚Ä‚àÚ‘±‰Â”\‚É‚È‚ç‚È‚¯‚ê‚΃^ƒCƒ€ƒAƒEƒg
+	// 20 •b‘Ò‚Á‚Ä‚àÚ‘±‰Â”\‚É‚È‚ç‚È‚¯‚ê‚΃^ƒCƒ€ƒAƒEƒg
 	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; // ƒ^ƒCƒ€ƒAƒEƒg
 		} 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) {


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