• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Loweynet


Commit MetaInfo

Révisionc77292a7a46ba795cbc2a728f1ecdfbbc39811bc (tree)
l'heure2011-09-15 09:31:52
Auteurs_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Message de Log

Fix small bugs (they usually do not occur).

Change Summary

Modification

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/Package/FFFTP.exe and b/Package/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
--- a/main.c
+++ b/main.c
@@ -413,7 +413,9 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
413413 DispTransferType();
414414 SetHostKanaCnvImm(YES);
415415 SetHostKanjiCodeImm(KANJI_NOCNV);
416- SetLocalKanjiCodeImm(KANJI_UTF8N);
416+ // –{“–‚̓[ƒJƒ‹‚̃fƒtƒHƒ‹ƒg‚ðUTF-8‚É‚µ‚½‚¢‚ª‹Œƒo[ƒWƒ‡ƒ“‚Ƃ̌݊·«‚Ì‚½‚ßShift_JIS‚ɐݒè
417+// SetLocalKanjiCodeImm(KANJI_UTF8N);
418+ SetLocalKanjiCodeImm(KANJI_SJIS);
417419 DispListType();
418420 DispDotFileMode();
419421 DispSyncMoveMode();
--- a/mbswrapper.c
+++ b/mbswrapper.c
@@ -82,6 +82,22 @@ int TerminateStringW(LPWSTR lpString, int size)
8282 return i;
8383 }
8484
85+// Shift_JIS•¶Žš—ñƒoƒbƒtƒ@I’[‚ð‹­§“I‚ÉNULL‚Å’uŠ·
86+int TerminateStringA(LPSTR lpString, int size)
87+{
88+ int i;
89+ if(lpString < (LPSTR)0x00010000 || lpString == (LPSTR)~0)
90+ return 0;
91+ for(i = 0; i < size; i++)
92+ {
93+ if(lpString[i] == '\0')
94+ return i;
95+ }
96+ i--;
97+ lpString[i] = '\0';
98+ return i;
99+}
100+
85101 // NULL‹æØ‚è•¡”ƒ}ƒ‹ƒ`ƒoƒCƒg•¶Žš—ñ‚Ì’·‚³‚ðŽæ“¾
86102 size_t GetMultiStringLengthM(LPCSTR lpString)
87103 {
@@ -112,6 +128,21 @@ size_t GetMultiStringLengthW(LPCWSTR lpString)
112128 return i;
113129 }
114130
131+// NULL‹æØ‚è•¡”Shift_JIS•¶Žš—ñ‚Ì’·‚³‚ðŽæ“¾
132+size_t GetMultiStringLengthA(LPCSTR lpString)
133+{
134+ size_t i;
135+ if(lpString < (LPCSTR)0x00010000 || lpString == (LPCSTR)~0)
136+ return 0;
137+ i = 0;
138+ while(lpString[i] != '\0' || lpString[i + 1] != '\0')
139+ {
140+ i++;
141+ }
142+ i++;
143+ return i;
144+}
145+
115146 // NULL‹æØ‚èƒ}ƒ‹ƒ`ƒoƒCƒg•¶Žš—ñ‚©‚烏ƒCƒh•¶Žš—ñ‚Ö•ÏŠ·
116147 int MtoWMultiString(LPWSTR pDst, int size, LPCSTR pSrc)
117148 {
@@ -148,7 +179,7 @@ int WtoMMultiString(LPSTR pDst, int size, LPCWSTR pSrc)
148179 return i;
149180 }
150181
151-// NULL‹æØ‚胏ƒCƒh•¶Žš—ñ‚©‚çƒ}ƒ‹ƒ`ƒoƒCƒg•¶Žš—ñ‚Ö•ÏŠ·
182+// NULL‹æØ‚胏ƒCƒh•¶Žš—ñ‚©‚çShift_JIS•¶Žš—ñ‚Ö•ÏŠ·
152183 int WtoAMultiString(LPSTR pDst, int size, LPCWSTR pSrc)
153184 {
154185 int i;
--- a/mbswrapper.h
+++ b/mbswrapper.h
@@ -136,8 +136,13 @@ int WtoM(LPSTR pDst, int size, LPCWSTR pSrc, int count);
136136 int WtoA(LPSTR pDst, int size, LPCWSTR pSrc, int count);
137137 int TerminateStringM(LPSTR lpString, int size);
138138 int TerminateStringW(LPWSTR lpString, int size);
139+int TerminateStringA(LPWSTR lpString, int size);
139140 size_t GetMultiStringLengthM(LPCSTR lpString);
140141 size_t GetMultiStringLengthW(LPCWSTR lpString);
142+size_t GetMultiStringLengthA(LPCWSTR lpString);
143+int MtoWMultiString(LPWSTR pDst, int size, LPCSTR pSrc);
144+int WtoMMultiString(LPSTR pDst, int size, LPCWSTR pSrc);
145+int WtoAMultiString(LPSTR pDst, int size, LPCWSTR pSrc);
141146 char* AllocateStringM(int size);
142147 wchar_t* AllocateStringW(int size);
143148 char* AllocateStringA(int size);
--- a/remote.c
+++ b/remote.c
@@ -1340,8 +1340,8 @@ int ChangeFnameRemote2Local(char *Fname, int Max)
13401340 // TODO
13411341 InitCodeConvInfo(&cInfo);
13421342 cInfo.KanaCnv = NO;
1343- cInfo.Str = Pos;
1344- cInfo.StrLen = strlen(Pos);
1343+ cInfo.Str = Fname;
1344+ cInfo.StrLen = strlen(Fname);
13451345 cInfo.Buf = Buf;
13461346 cInfo.BufSize = Max - 1;
13471347 ConvSJIStoUTF8N(&cInfo);
@@ -1364,8 +1364,8 @@ int ChangeFnameRemote2Local(char *Fname, int Max)
13641364 // TODO
13651365 InitCodeConvInfo(&cInfo);
13661366 cInfo.KanaCnv = NO;
1367- cInfo.Str = Pos;
1368- cInfo.StrLen = strlen(Pos);
1367+ cInfo.Str = Fname;
1368+ cInfo.StrLen = strlen(Fname);
13691369 cInfo.Buf = Buf;
13701370 cInfo.BufSize = Max - 1;
13711371 ConvSJIStoUTF8N(&cInfo);
@@ -1389,8 +1389,8 @@ int ChangeFnameRemote2Local(char *Fname, int Max)
13891389 // TODO
13901390 InitCodeConvInfo(&cInfo);
13911391 cInfo.KanaCnv = NO;
1392- cInfo.Str = Pos;
1393- cInfo.StrLen = strlen(Pos);
1392+ cInfo.Str = Fname;
1393+ cInfo.StrLen = strlen(Fname);
13941394 cInfo.Buf = Buf;
13951395 cInfo.BufSize = Max - 1;
13961396 ConvSJIStoUTF8N(&cInfo);
@@ -1472,8 +1472,8 @@ int ChangeFnameLocal2Remote(char *Fname, int Max)
14721472 // TODO
14731473 InitCodeConvInfo(&cInfo);
14741474 cInfo.KanaCnv = NO;
1475- cInfo.Str = Pos;
1476- cInfo.StrLen = strlen(Pos);
1475+ cInfo.Str = Fname;
1476+ cInfo.StrLen = strlen(Fname);
14771477 cInfo.Buf = Buf;
14781478 cInfo.BufSize = Max - 1;
14791479 ConvSJIStoJIS(&cInfo);
@@ -1496,8 +1496,8 @@ int ChangeFnameLocal2Remote(char *Fname, int Max)
14961496 // TODO
14971497 InitCodeConvInfo(&cInfo);
14981498 cInfo.KanaCnv = NO;
1499- cInfo.Str = Pos;
1500- cInfo.StrLen = strlen(Pos);
1499+ cInfo.Str = Fname;
1500+ cInfo.StrLen = strlen(Fname);
15011501 cInfo.Buf = Buf;
15021502 cInfo.BufSize = Max - 1;
15031503 ConvSJIStoEUC(&cInfo);
@@ -1520,8 +1520,8 @@ int ChangeFnameLocal2Remote(char *Fname, int Max)
15201520 // TODO
15211521 InitCodeConvInfo(&cInfo);
15221522 cInfo.KanaCnv = NO;
1523- cInfo.Str = Pos;
1524- cInfo.StrLen = strlen(Pos);
1523+ cInfo.Str = Fname;
1524+ cInfo.StrLen = strlen(Fname);
15251525 cInfo.Buf = Buf;
15261526 cInfo.BufSize = Max - 1;
15271527 ConvSJIStoSMB_HEX(&cInfo);
@@ -1544,8 +1544,8 @@ int ChangeFnameLocal2Remote(char *Fname, int Max)
15441544 // TODO
15451545 InitCodeConvInfo(&cInfo);
15461546 cInfo.KanaCnv = NO;
1547- cInfo.Str = Pos;
1548- cInfo.StrLen = strlen(Pos);
1547+ cInfo.Str = Fname;
1548+ cInfo.StrLen = strlen(Fname);
15491549 cInfo.Buf = Buf;
15501550 cInfo.BufSize = Max - 1;
15511551 ConvSJIStoSMB_CAP(&cInfo);
--- a/socketwrapper.c
+++ b/socketwrapper.c
@@ -200,7 +200,11 @@ BOOL AttachSSL(SOCKET s)
200200 }
201201 }
202202 else
203+ {
204+ LeaveCriticalSection(&g_OpenSSLLock);
203205 DetachSSL(s);
206+ EnterCriticalSection(&g_OpenSSLLock);
207+ }
204208 }
205209 }
206210 }