• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

FFFTPのソースコードです。


Commit MetaInfo

Revisiónf875ec4e76ad4a1dc913d1972f2c92a0ec46bed4 (tree)
Tiempo2011-09-16 19:53:00
Autorhylom <hylom@user...>
Commiterhylom

Log Message

replace 'SUCCESS' and 'FAIL' macro to 'FFFTP_SUCCESS' and 'FFFTP_FAIL' to suppress warning

Cambiar Resumen

Diferencia incremental

--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
1+*~
2+Release
3+Debug
4+FFFTP_Eng_Release
5+FFFTP_Eng_Debug
6+*.ncb
7+*.suo
8+*.user
--- a/OLDregistory.c
+++ b/OLDregistory.c
@@ -220,7 +220,7 @@ int ValidateMasterPassword(void)
220220 int i;
221221
222222 SetRegType(REGTYPE_INI);
223- if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS)
223+ if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS)
224224 {
225225 if(AskForceIni() == NO)
226226 {
@@ -228,14 +228,14 @@ int ValidateMasterPassword(void)
228228 i = OpenReg("FFFTP", &hKey3);
229229 }
230230 }
231- if(i == SUCCESS){
231+ if(i == FFFTP_SUCCESS){
232232 char checkbuf[48];
233233 int salt = 0;
234234
235235 if( ReadIntValueFromReg(hKey3, "CredentialSalt", &salt)){
236236 SetHashSalt( salt );
237237 }
238- if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == SUCCESS ){
238+ if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == FFFTP_SUCCESS ){
239239 switch( CheckPasswordValidity( SecretKey, SecretKeyLength, checkbuf ) ){
240240 case 0: /* not match */
241241 IsMasterPasswordError = PASSWORD_UNMATCH;
@@ -283,7 +283,7 @@ void SaveRegistory(void)
283283 }
284284
285285 SetRegType(RegType);
286- if(CreateReg("FFFTP", &hKey3) == SUCCESS)
286+ if(CreateReg("FFFTP", &hKey3) == FFFTP_SUCCESS)
287287 {
288288 char buf[48];
289289 int salt = GetTickCount();
@@ -296,7 +296,7 @@ void SaveRegistory(void)
296296 CreatePasswordHash( SecretKey, SecretKeyLength, buf );
297297 WriteStringToReg(hKey3, "CredentialCheck", buf);
298298
299- if(CreateSubKey(hKey3, "Options", &hKey4) == SUCCESS)
299+ if(CreateSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS)
300300 {
301301 WriteIntValueToReg(hKey4, "NoSave", SuppressSave);
302302
@@ -412,10 +412,10 @@ void SaveRegistory(void)
412412 n = 0;
413413 for(i = AskHistoryNum(); i > 0; i--)
414414 {
415- if(GetHistoryByNum(i-1, &Hist) == SUCCESS)
415+ if(GetHistoryByNum(i-1, &Hist) == FFFTP_SUCCESS)
416416 {
417417 sprintf(Str, "History%d", n);
418- if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS)
418+ if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
419419 {
420420 SaveStr(hKey5, "HostAdrs", Hist.HostAdrs, DefaultHist.HostAdrs);
421421 SaveStr(hKey5, "UserName", Hist.UserName, DefaultHist.UserName);
@@ -459,17 +459,17 @@ void SaveRegistory(void)
459459 for(; n < 999; n++)
460460 {
461461 sprintf(Str, "History%d", n);
462- if(DeleteSubKey(hKey4, Str) != SUCCESS)
462+ if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS)
463463 break;
464464 }
465465
466466 /* ホストの設定を保存 */
467467 CopyDefaultHost(&DefaultHost);
468468 i = 0;
469- while(CopyHostFromList(i, &Host) == SUCCESS)
469+ while(CopyHostFromList(i, &Host) == FFFTP_SUCCESS)
470470 {
471471 sprintf(Str, "Host%d", i);
472- if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS)
472+ if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
473473 {
474474 // SaveIntNum(hKey5, "Set", Host.Level, DefaultHost.Level);
475475 WriteIntValueToReg(hKey5, "Set", Host.Level);
@@ -526,7 +526,7 @@ void SaveRegistory(void)
526526 for(; i < 998; i++)
527527 {
528528 sprintf(Str, "Host%d", i);
529- if(DeleteSubKey(hKey4, Str) != SUCCESS)
529+ if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS)
530530 break;
531531 }
532532
@@ -571,7 +571,7 @@ int LoadRegistory(void)
571571 Sts = NO;
572572
573573 SetRegType(REGTYPE_INI);
574- if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS)
574+ if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS)
575575 {
576576 if(AskForceIni() == NO)
577577 {
@@ -580,7 +580,7 @@ int LoadRegistory(void)
580580 }
581581 }
582582
583- if(i == SUCCESS)
583+ if(i == FFFTP_SUCCESS)
584584 {
585585 char checkbuf[48];
586586 int salt = 0;
@@ -588,7 +588,7 @@ int LoadRegistory(void)
588588
589589 ReadIntValueFromReg(hKey3, "Version", &Version);
590590
591- if(OpenSubKey(hKey3, "Options", &hKey4) == SUCCESS)
591+ if(OpenSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS)
592592 {
593593 ReadIntValueFromReg(hKey4, "WinPosX", &WinPosX);
594594 ReadIntValueFromReg(hKey4, "WinPosY", &WinPosY);
@@ -647,7 +647,7 @@ int LoadRegistory(void)
647647 ReadIntValueFromReg(hKey4, "RegExp", &FindMode);
648648 ReadIntValueFromReg(hKey4, "Reg", &RegType);
649649
650- if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FAIL)
650+ if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FFFTP_FAIL)
651651 {
652652 /* 旧ASCIIモードの拡張子の設定を新しいものに変換 */
653653 ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1);
@@ -679,9 +679,9 @@ int LoadRegistory(void)
679679 ReadIntValueFromReg(hKey4, "MirUNot", &MirUpDelNotify);
680680 ReadIntValueFromReg(hKey4, "MirDNot", &MirDownDelNotify);
681681
682- if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == SUCCESS)
682+ if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == FFFTP_SUCCESS)
683683 {
684- if(RestoreFontData(Str, &ListLogFont) == SUCCESS)
684+ if(RestoreFontData(Str, &ListLogFont) == FFFTP_SUCCESS)
685685 ListFont = CreateFontIndirect(&ListLogFont);
686686 }
687687 ReadIntValueFromReg(hKey4, "ListHide", &DispIgnoreHide);
@@ -730,7 +730,7 @@ int LoadRegistory(void)
730730 for(i = 0; i < Sets; i++)
731731 {
732732 sprintf(Str, "History%d", i);
733- if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS)
733+ if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
734734 {
735735 CopyDefaultHistory(&Hist);
736736
@@ -778,7 +778,7 @@ int LoadRegistory(void)
778778 for(i = 0; i < Sets; i++)
779779 {
780780 sprintf(Str, "Host%d", i);
781- if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS)
781+ if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
782782 {
783783 CopyDefaultHost(&Host);
784784 /* 下位互換性のため */
@@ -893,17 +893,17 @@ DWORD LoadHideDriveListRegistory(void)
893893 DWORD Ret;
894894
895895 Ret = 0;
896- if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hKey1) == ERROR_SUCCESS)
896+ if(RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hKey1) == ERROR_FFFTP_SUCCESS)
897897 {
898- if(RegOpenKeyEx(hKey1, "Microsoft", 0, KEY_READ, &hKey2) == ERROR_SUCCESS)
898+ if(RegOpenKeyEx(hKey1, "Microsoft", 0, KEY_READ, &hKey2) == ERROR_FFFTP_SUCCESS)
899899 {
900- if(RegOpenKeyEx(hKey2, "Windows", 0, KEY_READ, &hKey3) == ERROR_SUCCESS)
900+ if(RegOpenKeyEx(hKey2, "Windows", 0, KEY_READ, &hKey3) == ERROR_FFFTP_SUCCESS)
901901 {
902- if(RegOpenKeyEx(hKey3, "CurrentVersion", 0, KEY_READ, &hKey4) == ERROR_SUCCESS)
902+ if(RegOpenKeyEx(hKey3, "CurrentVersion", 0, KEY_READ, &hKey4) == ERROR_FFFTP_SUCCESS)
903903 {
904- if(RegOpenKeyEx(hKey4, "Policies", 0, KEY_READ, &hKey5) == ERROR_SUCCESS)
904+ if(RegOpenKeyEx(hKey4, "Policies", 0, KEY_READ, &hKey5) == ERROR_FFFTP_SUCCESS)
905905 {
906- if(RegOpenKeyEx(hKey5, "Explorer", 0, KEY_READ, &hKey6) == ERROR_SUCCESS)
906+ if(RegOpenKeyEx(hKey5, "Explorer", 0, KEY_READ, &hKey6) == ERROR_FFFTP_SUCCESS)
907907 {
908908 Size = sizeof(DWORD);
909909 RegQueryValueEx(hKey6, "NoDrives", NULL, &Type, (BYTE *)&Ret, &Size);
@@ -941,22 +941,22 @@ void ClearRegistory(void)
941941 char Str[20];
942942 int i;
943943
944- if(RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Sota", 0, "", REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hKey2, &Dispos) == ERROR_SUCCESS)
944+ if(RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Sota", 0, "", REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hKey2, &Dispos) == ERROR_FFFTP_SUCCESS)
945945 {
946- if(RegCreateKeyEx(hKey2, "FFFTP", 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey3, &Dispos) == ERROR_SUCCESS)
946+ if(RegCreateKeyEx(hKey2, "FFFTP", 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey3, &Dispos) == ERROR_FFFTP_SUCCESS)
947947 {
948- if(RegCreateKeyEx(hKey3, "Options", 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey4, &Dispos) == ERROR_SUCCESS)
948+ if(RegCreateKeyEx(hKey3, "Options", 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey4, &Dispos) == ERROR_FFFTP_SUCCESS)
949949 {
950950 for(i = 0; ; i++)
951951 {
952952 sprintf(Str, "Host%d", i);
953- if(RegDeleteKey(hKey4, Str) != ERROR_SUCCESS)
953+ if(RegDeleteKey(hKey4, Str) != ERROR_FFFTP_SUCCESS)
954954 break;
955955 }
956956 for(i = 0; ; i++)
957957 {
958958 sprintf(Str, "History%d", i);
959- if(RegDeleteKey(hKey4, Str) != ERROR_SUCCESS)
959+ if(RegDeleteKey(hKey4, Str) != ERROR_FFFTP_SUCCESS)
960960 break;
961961 }
962962 RegCloseKey(hKey4);
@@ -1141,7 +1141,7 @@ static void MakeFontData(LOGFONT Font, HFONT hFont, char *Buf)
11411141 *
11421142 * Return Value
11431143 * int ステータス
1144-* SUCCESS/FAIL=変換できない
1144+* FFFTP_SUCCESS/FFFTP_FAIL=変換できない
11451145 *----------------------------------------------------------------------------*/
11461146
11471147 static int RestoreFontData(char *Str, LOGFONT *Font)
@@ -1149,7 +1149,7 @@ static int RestoreFontData(char *Str, LOGFONT *Font)
11491149 int i;
11501150 int Sts;
11511151
1152- Sts = FAIL;
1152+ Sts = FFFTP_FAIL;
11531153 if(sscanf(Str, "%d %d %d %d %d %d %d %d %d %d %d %d %d",
11541154 &(Font->lfHeight), &(Font->lfWidth), &(Font->lfEscapement), &(Font->lfOrientation),
11551155 &(Font->lfWeight), &(Font->lfItalic), &(Font->lfUnderline), &(Font->lfStrikeOut),
@@ -1165,11 +1165,11 @@ static int RestoreFontData(char *Str, LOGFONT *Font)
11651165 if(i == 0)
11661166 {
11671167 strcpy(Font->lfFaceName, Str);
1168- Sts = SUCCESS;
1168+ Sts = FFFTP_SUCCESS;
11691169 }
11701170 }
11711171
1172- if(Sts == FAIL)
1172+ if(Sts == FFFTP_FAIL)
11731173 memset(Font, NUL, sizeof(LOGFONT));
11741174
11751175 return(Sts);
@@ -1445,7 +1445,7 @@ static int TmpRegType;
14451445 *
14461446 * Return Value
14471447 * int ステータス
1448-* SUCCESS/FAIL
1448+* FFFTP_SUCCESS/FFFTP_FAIL
14491449 *----------------------------------------------------------------------------*/
14501450
14511451 static void SetRegType(int Type)
@@ -1463,7 +1463,7 @@ static void SetRegType(int Type)
14631463 *
14641464 * Return Value
14651465 * int ステータス
1466-* SUCCESS/FAIL
1466+* FFFTP_SUCCESS/FFFTP_FAIL
14671467 *----------------------------------------------------------------------------*/
14681468
14691469 static int OpenReg(char *Name, void **Handle)
@@ -1471,17 +1471,17 @@ static int OpenReg(char *Name, void **Handle)
14711471 int Sts;
14721472 char Tmp[FMAX_PATH+1];
14731473
1474- Sts = FAIL;
1474+ Sts = FFFTP_FAIL;
14751475 if(TmpRegType == REGTYPE_REG)
14761476 {
14771477 strcpy(Tmp, "Software\\Sota\\");
14781478 strcat(Tmp, Name);
1479- if(RegOpenKeyEx(HKEY_CURRENT_USER, Tmp, 0, KEY_READ, (HKEY *)Handle) == ERROR_SUCCESS)
1480- Sts = SUCCESS;
1479+ if(RegOpenKeyEx(HKEY_CURRENT_USER, Tmp, 0, KEY_READ, (HKEY *)Handle) == ERROR_FFFTP_SUCCESS)
1480+ Sts = FFFTP_SUCCESS;
14811481 }
14821482 else
14831483 {
1484- if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == SUCCESS)
1484+ if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == FFFTP_SUCCESS)
14851485 ((REGDATATBL *)(*Handle))->Mode = 0;
14861486 }
14871487 return(Sts);
@@ -1496,7 +1496,7 @@ static int OpenReg(char *Name, void **Handle)
14961496 *
14971497 * Return Value
14981498 * int ステータス
1499-* SUCCESS/FAIL
1499+* FFFTP_SUCCESS/FFFTP_FAIL
15001500 *----------------------------------------------------------------------------*/
15011501
15021502 static int CreateReg(char *Name, void **Handle)
@@ -1505,13 +1505,13 @@ static int CreateReg(char *Name, void **Handle)
15051505 char Tmp[FMAX_PATH+1];
15061506 DWORD Dispos;
15071507
1508- Sts = FAIL;
1508+ Sts = FFFTP_FAIL;
15091509 if(TmpRegType == REGTYPE_REG)
15101510 {
15111511 strcpy(Tmp, "Software\\Sota\\");
15121512 strcat(Tmp, Name);
1513- if(RegCreateKeyEx(HKEY_CURRENT_USER, Tmp, 0, "", REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY | KEY_SET_VALUE, NULL, (HKEY *)Handle, &Dispos) == ERROR_SUCCESS)
1514- Sts = SUCCESS;
1513+ if(RegCreateKeyEx(HKEY_CURRENT_USER, Tmp, 0, "", REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY | KEY_SET_VALUE, NULL, (HKEY *)Handle, &Dispos) == ERROR_FFFTP_SUCCESS)
1514+ Sts = FFFTP_SUCCESS;
15151515 }
15161516 else
15171517 {
@@ -1521,7 +1521,7 @@ static int CreateReg(char *Name, void **Handle)
15211521 ((REGDATATBL *)(*Handle))->ValLen = 0;
15221522 ((REGDATATBL *)(*Handle))->Next = NULL;
15231523 ((REGDATATBL *)(*Handle))->Mode = 1;
1524- Sts = SUCCESS;
1524+ Sts = FFFTP_SUCCESS;
15251525 }
15261526 }
15271527 return(Sts);
@@ -1535,7 +1535,7 @@ static int CreateReg(char *Name, void **Handle)
15351535 *
15361536 * Return Value
15371537 * int ステータス
1538-* SUCCESS/FAIL
1538+* FFFTP_SUCCESS/FFFTP_FAIL
15391539 *----------------------------------------------------------------------------*/
15401540
15411541 static int CloseReg(void *Handle)
@@ -1574,7 +1574,7 @@ static int CloseReg(void *Handle)
15741574 Pos = Next;
15751575 }
15761576 }
1577- return(SUCCESS);
1577+ return(FFFTP_SUCCESS);
15781578 }
15791579
15801580
@@ -1627,7 +1627,7 @@ static BOOL WriteOutRegToFile(REGDATATBL *Pos)
16271627 *
16281628 * Return Value
16291629 * int ステータス
1630-* SUCCESS/FAIL
1630+* FFFTP_SUCCESS/FFFTP_FAIL
16311631 *----------------------------------------------------------------------------*/
16321632
16331633 static int ReadInReg(char *Name, REGDATATBL **Handle)
@@ -1640,7 +1640,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle)
16401640 REGDATATBL *Pos;
16411641 int Sts;
16421642
1643- Sts = FAIL;
1643+ Sts = FFFTP_FAIL;
16441644 *Handle = NULL;
16451645
16461646 if((Strm = fopen(AskIniFilePath(), "rt")) != NULL)
@@ -1683,7 +1683,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle)
16831683 }
16841684 }
16851685 }
1686- Sts = SUCCESS;
1686+ Sts = FFFTP_SUCCESS;
16871687 free(Buf);
16881688 }
16891689 fclose(Strm);
@@ -1701,7 +1701,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle)
17011701 *
17021702 * Return Value
17031703 * int ステータス
1704-* SUCCESS/FAIL
1704+* FFFTP_SUCCESS/FFFTP_FAIL
17051705 *----------------------------------------------------------------------------*/
17061706
17071707 static int OpenSubKey(void *Parent, char *Name, void **Handle)
@@ -1710,11 +1710,11 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle)
17101710 char Key[80];
17111711 REGDATATBL *Pos;
17121712
1713- Sts = FAIL;
1713+ Sts = FFFTP_FAIL;
17141714 if(TmpRegType == REGTYPE_REG)
17151715 {
1716- if(RegOpenKeyEx(Parent, Name, 0, KEY_READ, (HKEY *)Handle) == ERROR_SUCCESS)
1717- Sts = SUCCESS;
1716+ if(RegOpenKeyEx(Parent, Name, 0, KEY_READ, (HKEY *)Handle) == ERROR_FFFTP_SUCCESS)
1717+ Sts = FFFTP_SUCCESS;
17181718 }
17191719 else
17201720 {
@@ -1727,7 +1727,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle)
17271727 if(strcmp(Pos->KeyName, Key) == 0)
17281728 {
17291729 *Handle = Pos;
1730- Sts = SUCCESS;
1730+ Sts = FFFTP_SUCCESS;
17311731 break;
17321732 }
17331733 Pos = Pos->Next;
@@ -1746,7 +1746,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle)
17461746 *
17471747 * Return Value
17481748 * int ステータス
1749-* SUCCESS/FAIL
1749+* FFFTP_SUCCESS/FFFTP_FAIL
17501750 *----------------------------------------------------------------------------*/
17511751
17521752 static int CreateSubKey(void *Parent, char *Name, void **Handle)
@@ -1755,11 +1755,11 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle)
17551755 DWORD Dispos;
17561756 REGDATATBL *Pos;
17571757
1758- Sts = FAIL;
1758+ Sts = FFFTP_FAIL;
17591759 if(TmpRegType == REGTYPE_REG)
17601760 {
1761- if(RegCreateKeyEx(Parent, Name, 0, "", REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, (HKEY *)Handle, &Dispos) == ERROR_SUCCESS)
1762- Sts = SUCCESS;
1761+ if(RegCreateKeyEx(Parent, Name, 0, "", REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, (HKEY *)Handle, &Dispos) == ERROR_FFFTP_SUCCESS)
1762+ Sts = FFFTP_SUCCESS;
17631763 }
17641764 else
17651765 {
@@ -1776,7 +1776,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle)
17761776 while(Pos->Next != NULL)
17771777 Pos = Pos->Next;
17781778 Pos->Next = *Handle;
1779- Sts = SUCCESS;
1779+ Sts = FFFTP_SUCCESS;
17801780 }
17811781 }
17821782 return(Sts);
@@ -1790,7 +1790,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle)
17901790 *
17911791 * Return Value
17921792 * int ステータス
1793-* SUCCESS/FAIL
1793+* FFFTP_SUCCESS/FFFTP_FAIL
17941794 *----------------------------------------------------------------------------*/
17951795
17961796 static int CloseSubKey(void *Handle)
@@ -1801,7 +1801,7 @@ static int CloseSubKey(void *Handle)
18011801 {
18021802 /* Nothing */
18031803 }
1804- return(SUCCESS);
1804+ return(FFFTP_SUCCESS);
18051805 }
18061806
18071807
@@ -1813,22 +1813,22 @@ static int CloseSubKey(void *Handle)
18131813 *
18141814 * Return Value
18151815 * int ステータス
1816-* SUCCESS/FAIL
1816+* FFFTP_SUCCESS/FFFTP_FAIL
18171817 *----------------------------------------------------------------------------*/
18181818
18191819 static int DeleteSubKey(void *Handle, char *Name)
18201820 {
18211821 int Sts;
18221822
1823- Sts = FAIL;
1823+ Sts = FFFTP_FAIL;
18241824 if(TmpRegType == REGTYPE_REG)
18251825 {
1826- if(RegDeleteKey(Handle, Name) == ERROR_SUCCESS)
1827- Sts = SUCCESS;
1826+ if(RegDeleteKey(Handle, Name) == ERROR_FFFTP_SUCCESS)
1827+ Sts = FFFTP_SUCCESS;
18281828 }
18291829 else
18301830 {
1831- Sts = FAIL;
1831+ Sts = FFFTP_FAIL;
18321832 }
18331833 return(Sts);
18341834 }
@@ -1842,22 +1842,22 @@ static int DeleteSubKey(void *Handle, char *Name)
18421842 *
18431843 * Return Value
18441844 * int ステータス
1845-* SUCCESS/FAIL
1845+* FFFTP_SUCCESS/FFFTP_FAIL
18461846 *----------------------------------------------------------------------------*/
18471847
18481848 static int DeleteValue(void *Handle, char *Name)
18491849 {
18501850 int Sts;
18511851
1852- Sts = FAIL;
1852+ Sts = FFFTP_FAIL;
18531853 if(TmpRegType == REGTYPE_REG)
18541854 {
1855- if(RegDeleteValue(Handle, Name) == ERROR_SUCCESS)
1856- Sts = SUCCESS;
1855+ if(RegDeleteValue(Handle, Name) == ERROR_FFFTP_SUCCESS)
1856+ Sts = FFFTP_SUCCESS;
18571857 }
18581858 else
18591859 {
1860- Sts = FAIL;
1860+ Sts = FFFTP_FAIL;
18611861 }
18621862 return(Sts);
18631863 }
@@ -1872,7 +1872,7 @@ static int DeleteValue(void *Handle, char *Name)
18721872 *
18731873 * Return Value
18741874 * int ステータス
1875-* SUCCESS/FAIL
1875+* FFFTP_SUCCESS/FFFTP_FAIL
18761876 *----------------------------------------------------------------------------*/
18771877
18781878 static int ReadIntValueFromReg(void *Handle, char *Name, int *Value)
@@ -1881,19 +1881,19 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value)
18811881 DWORD Size;
18821882 char *Pos;
18831883
1884- Sts = FAIL;
1884+ Sts = FFFTP_FAIL;
18851885 if(TmpRegType == REGTYPE_REG)
18861886 {
18871887 Size = sizeof(int);
1888- if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Value, &Size) == ERROR_SUCCESS)
1889- Sts = SUCCESS;
1888+ if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Value, &Size) == ERROR_FFFTP_SUCCESS)
1889+ Sts = FFFTP_SUCCESS;
18901890 }
18911891 else
18921892 {
18931893 if((Pos = ScanValue(Handle, Name)) != NULL)
18941894 {
18951895 *Value = atoi(Pos);
1896- Sts = SUCCESS;
1896+ Sts = FFFTP_SUCCESS;
18971897 }
18981898 }
18991899 return(Sts);
@@ -1909,7 +1909,7 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value)
19091909 *
19101910 * Return Value
19111911 * int ステータス
1912-* SUCCESS/FAIL
1912+* FFFTP_SUCCESS/FFFTP_FAIL
19131913 *----------------------------------------------------------------------------*/
19141914
19151915 static int WriteIntValueToReg(void *Handle, char *Name, int Value)
@@ -1930,7 +1930,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value)
19301930 strcat(Data, Tmp);
19311931 Pos->ValLen += strlen(Data) + 1;
19321932 }
1933- return(SUCCESS);
1933+ return(FFFTP_SUCCESS);
19341934 }
19351935
19361936
@@ -1944,7 +1944,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value)
19441944 *
19451945 * Return Value
19461946 * int ステータス
1947-* SUCCESS/FAIL
1947+* FFFTP_SUCCESS/FFFTP_FAIL
19481948 *----------------------------------------------------------------------------*/
19491949
19501950 static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
@@ -1952,14 +1952,14 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
19521952 int Sts;
19531953 char *Pos;
19541954
1955- Sts = FAIL;
1955+ Sts = FFFTP_FAIL;
19561956 if(TmpRegType == REGTYPE_REG)
19571957 {
1958- if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_SUCCESS)
1958+ if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_FFFTP_SUCCESS)
19591959 {
19601960 if(*(Str + Size - 1) != NUL)
19611961 *(Str + Size) = NUL;
1962- Sts = SUCCESS;
1962+ Sts = FFFTP_SUCCESS;
19631963 }
19641964 }
19651965 else
@@ -1969,7 +1969,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
19691969 Size = min1(Size-1, strlen(Pos));
19701970 Size = StrReadIn(Pos, Size, Str);
19711971 *(Str + Size) = NUL;
1972- Sts = SUCCESS;
1972+ Sts = FFFTP_SUCCESS;
19731973 }
19741974 }
19751975 return(Sts);
@@ -1985,7 +1985,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
19851985 *
19861986 * Return Value
19871987 * int ステータス
1988-* SUCCESS/FAIL
1988+* FFFTP_SUCCESS/FFFTP_FAIL
19891989 *----------------------------------------------------------------------------*/
19901990
19911991 static int WriteStringToReg(void *Handle, char *Name, char *Str)
@@ -2005,7 +2005,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str)
20052005 Data = Pos->ValTbl + Pos->ValLen;
20062006 Pos->ValLen += StrCatOut(Str, strlen(Str), Data) + 1;
20072007 }
2008- return(SUCCESS);
2008+ return(FFFTP_SUCCESS);
20092009 }
20102010
20112011
@@ -2019,7 +2019,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str)
20192019 *
20202020 * Return Value
20212021 * int ステータス
2022-* SUCCESS/FAIL
2022+* FFFTP_SUCCESS/FFFTP_FAIL
20232023 *----------------------------------------------------------------------------*/
20242024
20252025 static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
@@ -2027,14 +2027,14 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz
20272027 int Sts;
20282028 char *Pos;
20292029
2030- Sts = FAIL;
2030+ Sts = FFFTP_FAIL;
20312031 if(TmpRegType == REGTYPE_REG)
20322032 {
2033- if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_SUCCESS)
2033+ if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_FFFTP_SUCCESS)
20342034 {
20352035 if(*(Str + Size - 1) != NUL)
20362036 *(Str + Size) = NUL;
2037- Sts = SUCCESS;
2037+ Sts = FFFTP_SUCCESS;
20382038 }
20392039 }
20402040 else
@@ -2044,7 +2044,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz
20442044 Size = min1(Size-1, strlen(Pos));
20452045 Size = StrReadIn(Pos, Size, Str);
20462046 *(Str + Size) = NUL;
2047- Sts = SUCCESS;
2047+ Sts = FFFTP_SUCCESS;
20482048 }
20492049 }
20502050 return(Sts);
@@ -2060,7 +2060,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz
20602060 *
20612061 * Return Value
20622062 * int ステータス
2063-* SUCCESS/FAIL
2063+* FFFTP_SUCCESS/FFFTP_FAIL
20642064 *----------------------------------------------------------------------------*/
20652065
20662066 static int WriteMultiStringToReg(void *Handle, char *Name, char *Str)
@@ -2080,7 +2080,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str)
20802080 Data = Pos->ValTbl + Pos->ValLen;
20812081 Pos->ValLen += StrCatOut(Str, StrMultiLen(Str), Data) + 1;
20822082 }
2083- return(SUCCESS);
2083+ return(FFFTP_SUCCESS);
20842084 }
20852085
20862086
@@ -2094,7 +2094,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str)
20942094 *
20952095 * Return Value
20962096 * int ステータス
2097-* SUCCESS/FAIL
2097+* FFFTP_SUCCESS/FFFTP_FAIL
20982098 *----------------------------------------------------------------------------*/
20992099
21002100 static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
@@ -2102,11 +2102,11 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
21022102 int Sts;
21032103 char *Pos;
21042104
2105- Sts = FAIL;
2105+ Sts = FFFTP_FAIL;
21062106 if(TmpRegType == REGTYPE_REG)
21072107 {
2108- if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Bin, &Size) == ERROR_SUCCESS)
2109- Sts = SUCCESS;
2108+ if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Bin, &Size) == ERROR_FFFTP_SUCCESS)
2109+ Sts = FFFTP_SUCCESS;
21102110 }
21112111 else
21122112 {
@@ -2114,7 +2114,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
21142114 {
21152115 Size = min1(Size, strlen(Pos));
21162116 Size = StrReadIn(Pos, Size, Bin);
2117- Sts = SUCCESS;
2117+ Sts = FFFTP_SUCCESS;
21182118 }
21192119 }
21202120 return(Sts);
@@ -2131,7 +2131,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
21312131 *
21322132 * Return Value
21332133 * int ステータス
2134-* SUCCESS/FAIL
2134+* FFFTP_SUCCESS/FFFTP_FAIL
21352135 *----------------------------------------------------------------------------*/
21362136
21372137 static int WriteBinaryToReg(void *Handle, char *Name, void *Bin, int Len)
@@ -2151,7 +2151,7 @@ static int WriteBinaryToReg(void *Handle, char *Name, void *Bin, int Len)
21512151 Data = Pos->ValTbl + Pos->ValLen;
21522152 Pos->ValLen += StrCatOut(Bin, Len, Data) + 1;
21532153 }
2154- return(SUCCESS);
2154+ return(FFFTP_SUCCESS);
21552155 }
21562156
21572157
--- a/bookmark.c
+++ b/bookmark.c
@@ -125,7 +125,7 @@ void AddCurDirToBookMark(int Win)
125125 *
126126 * Return Value
127127 * int ステータス
128-* SUCCESS/FAIL
128+* FFFTP_SUCCESS/FFFTP_FAIL
129129 *----------------------------------------------------------------------------*/
130130
131131 static int AddBookMark(char *Path)
@@ -134,11 +134,11 @@ static int AddBookMark(char *Path)
134134 int MarkID;
135135 int Sts;
136136
137- Sts = FAIL;
137+ Sts = FFFTP_FAIL;
138138 hMenu = GetSubMenu(GetMenu(GetMainHwnd()), BMARK_SUB_MENU);
139139 MarkID = (GetMenuItemCount(hMenu) - DEFAULT_BMARK_ITEM) + MENU_BMARK_TOP;
140140 if(AppendMenu(hMenu, MF_STRING, MarkID, Path) == TRUE)
141- Sts = SUCCESS;
141+ Sts = FFFTP_SUCCESS;
142142 return(Sts);
143143 }
144144
--- a/cache.c
+++ b/cache.c
@@ -74,7 +74,7 @@ static int ProgNum; /* FFFTPの起動番号 */
7474 *
7575 * Return Value
7676 * int ステータス
77-* SUCCESS/FAIL
77+* FFFTP_SUCCESS/FFFTP_FAIL
7878 *----------------------------------------------------------------------------*/
7979
8080 int MakeCacheBuf(int Num)
@@ -82,16 +82,16 @@ int MakeCacheBuf(int Num)
8282 int Sts;
8383 int i;
8484
85- Sts = SUCCESS;
85+ Sts = FFFTP_SUCCESS;
8686 if(Num > 0)
8787 {
88- Sts = FAIL;
88+ Sts = FFFTP_FAIL;
8989 if((RemoteCache = malloc(sizeof(CACHELIST) * Num)) != NULL)
9090 {
9191 TmpCacheEntry = Num;
9292 for(i = 0; i < TmpCacheEntry; i++)
9393 ClearCache(i);
94- Sts = SUCCESS;
94+ Sts = FFFTP_SUCCESS;
9595 }
9696 }
9797 return(Sts);
--- a/clipboard.c
+++ b/clipboard.c
@@ -54,7 +54,7 @@ int CopyStrToClipBoard(char *Str)
5454 void *gBuf;
5555 HGLOBAL hGlobal;
5656
57- Sts = FAIL;
57+ Sts = FFFTP_FAIL;
5858 if(OpenClipboard(GetMainHwnd()))
5959 {
6060 if(EmptyClipboard())
@@ -67,7 +67,7 @@ int CopyStrToClipBoard(char *Str)
6767
6868 GlobalUnlock(hGlobal);
6969 SetClipboardData(CF_TEXT, hGlobal);
70- Sts = SUCCESS;
70+ Sts = FFFTP_SUCCESS;
7171 }
7272 }
7373 }
--- a/common.h
+++ b/common.h
@@ -52,8 +52,9 @@
5252 #define ushort unsigned short
5353 #define ulong unsigned long
5454
55-#define FAIL 0
56-#define SUCCESS 1
55+#define FFFTP_FAIL 0
56+#define FFFTP_SUCCESS 1
57+#undef SUCCESS
5758
5859 #define NO 0
5960 #define YES 1
--- a/connect.c
+++ b/connect.c
@@ -137,7 +137,7 @@ void ConnectProc(int Type, int Num)
137137 InitPWDcommand();
138138 CopyHostFromList(AskCurrentHost(), &CurHost);
139139
140- if(ConnectRas(CurHost.Dialup, CurHost.DialupAlways, CurHost.DialupNotify, CurHost.DialEntry) == SUCCESS)
140+ if(ConnectRas(CurHost.Dialup, CurHost.DialupAlways, CurHost.DialupNotify, CurHost.DialEntry) == FFFTP_SUCCESS)
141141 {
142142 SetHostKanaCnvImm(CurHost.KanaCnv);
143143 SetHostKanjiCodeImm(CurHost.KanjiCode);
@@ -216,7 +216,7 @@ void QuickConnectProc(void)
216216
217217 InitPWDcommand();
218218 CopyDefaultHost(&CurHost);
219- if(SplitUNCpath(Tmp, CurHost.HostAdrs, CurHost.RemoteInitDir, File, CurHost.UserName, CurHost.PassWord, &CurHost.Port) == SUCCESS)
219+ if(SplitUNCpath(Tmp, CurHost.HostAdrs, CurHost.RemoteInitDir, File, CurHost.UserName, CurHost.PassWord, &CurHost.Port) == FFFTP_SUCCESS)
220220 {
221221 if(strlen(CurHost.UserName) == 0)
222222 {
@@ -304,7 +304,7 @@ static BOOL CALLBACK QuickConDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wPa
304304 SendDlgItemMessage(hDlg, QHOST_PASV, BM_SETCHECK, PasvDefault, 0);
305305 for(i = 0; i < HISTORY_MAX; i++)
306306 {
307- if(GetHistoryByNum(i, &Tmp) == SUCCESS)
307+ if(GetHistoryByNum(i, &Tmp) == FFFTP_SUCCESS)
308308 {
309309 //sprintf(Str, "%s (%s) %s", Tmp.HostAdrs, Tmp.UserName, Tmp.RemoteInitDir);
310310 //SendDlgItemMessage(hDlg, QHOST_HOST, CB_ADDSTRING, 0, (LPARAM)Str);
@@ -373,7 +373,7 @@ void DirectConnectProc(char *unc, int Kanji, int Kana, int Fkanji, int TrMode)
373373 SetTaskMsg("----------------------------");
374374
375375 InitPWDcommand();
376- if(SplitUNCpath(unc, Host, Path, File, User, Pass, &Port) == SUCCESS)
376+ if(SplitUNCpath(unc, Host, Path, File, User, Pass, &Port) == FFFTP_SUCCESS)
377377 {
378378 if(strlen(User) == 0)
379379 {
@@ -453,7 +453,7 @@ void HistoryConnectProc(int MenuCmd)
453453 int RFSort;
454454 int RDSort;
455455
456- if(GetHistoryByCmd(MenuCmd, &Hist) == SUCCESS)
456+ if(GetHistoryByCmd(MenuCmd, &Hist) == FFFTP_SUCCESS)
457457 {
458458 SaveBookMark();
459459 SaveCurrentSetToHost();
@@ -467,7 +467,7 @@ void HistoryConnectProc(int MenuCmd)
467467 InitPWDcommand();
468468 CopyHistoryToHost(&Hist, &CurHost);
469469
470- if(ConnectRas(CurHost.Dialup, CurHost.DialupAlways, CurHost.DialupNotify, CurHost.DialEntry) == SUCCESS)
470+ if(ConnectRas(CurHost.Dialup, CurHost.DialupAlways, CurHost.DialupNotify, CurHost.DialEntry) == FFFTP_SUCCESS)
471471 {
472472 SetCurrentHost(HOSTNUM_NOENTRY);
473473 SetHostKanaCnvImm(CurHost.KanaCnv);
@@ -574,7 +574,7 @@ static void AskUseFireWall(char *Host, int *Fire, int *Pasv, int *List)
574574 *List = NO;
575575
576576 i = 0;
577- while(CopyHostFromList(i, &Tmp) == SUCCESS)
577+ while(CopyHostFromList(i, &Tmp) == FFFTP_SUCCESS)
578578 {
579579 if(strcmp(Host, Tmp.HostAdrs) == 0)
580580 {
@@ -905,7 +905,7 @@ static void SaveCurrentSetToHistory(void)
905905 *
906906 * Return Value
907907 * int ステータス
908-* SUCCESS/FAIL
908+* FFFTP_SUCCESS/FFFTP_FAIL
909909 *----------------------------------------------------------------------------*/
910910
911911 int ReConnectCmdSkt(void)
@@ -931,7 +931,7 @@ int ReConnectCmdSkt(void)
931931 *
932932 * Return Value
933933 * int ステータス
934-* SUCCESS/FAIL
934+* FFFTP_SUCCESS/FFFTP_FAIL
935935 *----------------------------------------------------------------------------*/
936936
937937 //int ReConnectTrnSkt(void)
@@ -947,7 +947,7 @@ int ReConnectCmdSkt(void)
947947 *
948948 * Return Value
949949 * int ステータス
950-* SUCCESS/FAIL
950+* FFFTP_SUCCESS/FFFTP_FAIL
951951 *----------------------------------------------------------------------------*/
952952
953953 static int ReConnectSkt(SOCKET *Skt)
@@ -955,7 +955,7 @@ static int ReConnectSkt(SOCKET *Skt)
955955 char Path[FMAX_PATH+1];
956956 int Sts;
957957
958- Sts = FAIL;
958+ Sts = FFFTP_FAIL;
959959
960960 SetTaskMsg(MSGJPN003);
961961
@@ -968,7 +968,7 @@ static int ReConnectSkt(SOCKET *Skt)
968968 {
969969 AskRemoteCurDir(Path, FMAX_PATH);
970970 DoCWD(Path, YES, YES, YES);
971- Sts = SUCCESS;
971+ Sts = FFFTP_SUCCESS;
972972 }
973973 else
974974 SoundPlay(SND_ERROR);
@@ -1221,7 +1221,7 @@ static SOCKET DoConnect(char *Host, char *User, char *Pass, char *Acct, int Port
12211221 Flg = 1;
12221222 if(setsockopt(ContSock, SOL_SOCKET, SO_OOBINLINE, (LPSTR)&Flg, sizeof(Flg)) == SOCKET_ERROR)
12231223 ReportWSError("setsockopt", WSAGetLastError());
1224-#pragma aaa
1224+/* #pragma aaa */
12251225 Flg = 1;
12261226 if(setsockopt(ContSock, SOL_SOCKET, SO_KEEPALIVE, (LPSTR)&Flg, sizeof(Flg)) == SOCKET_ERROR)
12271227 ReportWSError("setsockopt", WSAGetLastError());
@@ -1402,7 +1402,7 @@ static SOCKET DoConnect(char *Host, char *User, char *Pass, char *Acct, int Port
14021402 *
14031403 * Return Value
14041404 * int ステータス
1405-* SUCCESS/FAIL
1405+* FFFTP_SUCCESS/FFFTP_FAIL
14061406 *
14071407 * Note
14081408 * ワンタイムパスワードでない時はPassをそのままReplyにコピー
@@ -1416,7 +1416,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type)
14161416 char Seed[MAX_SEED_LEN+1];
14171417 int i;
14181418
1419- Sts = SUCCESS;
1419+ Sts = FFFTP_SUCCESS;
14201420 Pos = NULL;
14211421
14221422 if(Type == SECURITY_AUTO)
@@ -1445,7 +1445,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type)
14451445 /* シーケンス番号を見つけるループ */
14461446 DoPrintf("Analize OTP");
14471447 DoPrintf("%s", Pos);
1448- Sts = FAIL;
1448+ Sts = FFFTP_FAIL;
14491449 while((Pos = GetNextField(Pos)) != NULL)
14501450 {
14511451 if(IsDigit(*Pos))
@@ -1456,7 +1456,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type)
14561456 /* Seed */
14571457 if((Pos = GetNextField(Pos)) != NULL)
14581458 {
1459- if(GetOneField(Pos, Seed, MAX_SEED_LEN) == SUCCESS)
1459+ if(GetOneField(Pos, Seed, MAX_SEED_LEN) == FFFTP_SUCCESS)
14601460 {
14611461 /* Seedは英数字のみ有効とする */
14621462 for(i = strlen(Seed)-1; i >= 0; i--)
@@ -1474,7 +1474,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type)
14741474 if(Seq <= 10)
14751475 DialogBox(GetFtpInst(), MAKEINTRESOURCE(otp_notify_dlg), GetMainHwnd(), ExeEscDialogProc);
14761476
1477- Sts = SUCCESS;
1477+ Sts = FFFTP_SUCCESS;
14781478 }
14791479 }
14801480 }
@@ -1482,7 +1482,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type)
14821482 }
14831483 }
14841484
1485- if(Sts == FAIL)
1485+ if(Sts == FFFTP_FAIL)
14861486 SetTaskMsg(MSGJPN015);
14871487 }
14881488 else
@@ -1636,8 +1636,8 @@ SOCKET connectsock(char *host, int port, char *PreMsg, int *CancelCheckWork)
16361636 if(Fwall == FWALL_SOCKS4)
16371637 {
16381638 Socks4Reply.Result = -1;
1639- if((SocksSendCmd(sSocket, &Socks4Cmd, Len, CancelCheckWork) != SUCCESS) ||
1640- (Socks4GetCmdReply(sSocket, &Socks4Reply) != SUCCESS) ||
1639+ if((SocksSendCmd(sSocket, &Socks4Cmd, Len, CancelCheckWork) != FFFTP_SUCCESS) ||
1640+ (Socks4GetCmdReply(sSocket, &Socks4Reply) != FFFTP_SUCCESS) ||
16411641 (Socks4Reply.Result != SOCKS4_RES_OK))
16421642 {
16431643 SetTaskMsg(MSGJPN023, Socks4Reply.Result);
@@ -1647,15 +1647,15 @@ SOCKET connectsock(char *host, int port, char *PreMsg, int *CancelCheckWork)
16471647 }
16481648 else if((Fwall == FWALL_SOCKS5_NOAUTH) || (Fwall == FWALL_SOCKS5_USER))
16491649 {
1650- if(Socks5SelMethod(sSocket, CancelCheckWork) == FAIL)
1650+ if(Socks5SelMethod(sSocket, CancelCheckWork) == FFFTP_FAIL)
16511651 {
16521652 DoClose(sSocket);
16531653 sSocket = INVALID_SOCKET;
16541654 }
16551655
16561656 Socks5Reply.Result = -1;
1657- if((SocksSendCmd(sSocket, &Socks5Cmd, Len, CancelCheckWork) != SUCCESS) ||
1658- (Socks5GetCmdReply(sSocket, &Socks5Reply) != SUCCESS) ||
1657+ if((SocksSendCmd(sSocket, &Socks5Cmd, Len, CancelCheckWork) != FFFTP_SUCCESS) ||
1658+ (Socks5GetCmdReply(sSocket, &Socks5Reply) != FFFTP_SUCCESS) ||
16591659 (Socks5Reply.Result != SOCKS5_RES_OK))
16601660 {
16611661 SetTaskMsg(MSGJPN024, Socks5Reply.Result);
@@ -1727,8 +1727,8 @@ SOCKET GetFTPListenSocket(SOCKET ctrl_skt, int *CancelCheckWork)
17271727 Len = offsetof(SOCKS4CMD, UserID) + strlen(FwallUser) + 1;
17281728
17291729 Socks4Reply.Result = -1;
1730- if((SocksSendCmd(listen_skt, &Socks4Cmd, Len, CancelCheckWork) != SUCCESS) ||
1731- (Socks4GetCmdReply(listen_skt, &Socks4Reply) != SUCCESS) ||
1730+ if((SocksSendCmd(listen_skt, &Socks4Cmd, Len, CancelCheckWork) != FFFTP_SUCCESS) ||
1731+ (Socks4GetCmdReply(listen_skt, &Socks4Reply) != FFFTP_SUCCESS) ||
17321732 (Socks4Reply.Result != SOCKS4_RES_OK))
17331733 {
17341734 SetTaskMsg(MSGJPN028, Socks4Reply.Result);
@@ -1749,7 +1749,7 @@ SOCKET GetFTPListenSocket(SOCKET ctrl_skt, int *CancelCheckWork)
17491749 DoPrintf("Use SOCKS5 BIND");
17501750 if(do_connect(listen_skt, (struct sockaddr *)&SocksSockAddr, sizeof(SocksSockAddr), CancelCheckWork) != SOCKET_ERROR)
17511751 {
1752- if(Socks5SelMethod(listen_skt, CancelCheckWork) == FAIL)
1752+ if(Socks5SelMethod(listen_skt, CancelCheckWork) == FFFTP_FAIL)
17531753 {
17541754 DoClose(listen_skt);
17551755 listen_skt = INVALID_SOCKET;
@@ -1759,8 +1759,8 @@ SOCKET GetFTPListenSocket(SOCKET ctrl_skt, int *CancelCheckWork)
17591759 Len = Socks5MakeCmdPacket(&Socks5Cmd, SOCKS5_CMD_BIND, UseIPadrs, CurSockAddr.sin_addr.s_addr, DomainName, CurSockAddr.sin_port);
17601760
17611761 Socks5Reply.Result = -1;
1762- if((SocksSendCmd(listen_skt, &Socks5Cmd, Len, CancelCheckWork) != SUCCESS) ||
1763- (Socks5GetCmdReply(listen_skt, &Socks5Reply) != SUCCESS) ||
1762+ if((SocksSendCmd(listen_skt, &Socks5Cmd, Len, CancelCheckWork) != FFFTP_SUCCESS) ||
1763+ (Socks5GetCmdReply(listen_skt, &Socks5Reply) != FFFTP_SUCCESS) ||
17641764 (Socks5Reply.Result != SOCKS5_RES_OK))
17651765 {
17661766 SetTaskMsg(MSGJPN029, Socks5Reply.Result);
@@ -1945,7 +1945,7 @@ static int Socks5MakeCmdPacket(SOCKS5REQUEST *Packet, char Cmd, int ValidIP, ulo
19451945 * int Size : サイズ
19461946 *
19471947 * Return Value
1948-* int ステータス (SUCCESS/FAIL)
1948+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
19491949 *----------------------------------------------------------------------------*/
19501950
19511951 static int SocksSendCmd(SOCKET Socket, void *Data, int Size, int *CancelCheckWork)
@@ -1954,7 +1954,7 @@ static int SocksSendCmd(SOCKET Socket, void *Data, int Size, int *CancelCheckWor
19541954
19551955 Ret = SendData(Socket, (char *)Data, Size, 0, CancelCheckWork);
19561956
1957- if(Ret != SUCCESS)
1957+ if(Ret != FFFTP_SUCCESS)
19581958 SetTaskMsg(MSGJPN033, *((short *)Data));
19591959
19601960 return(Ret);
@@ -1968,7 +1968,7 @@ static int SocksSendCmd(SOCKET Socket, void *Data, int Size, int *CancelCheckWor
19681968 * SOCKS5REPLY *Packet : パケット
19691969 *
19701970 * Return Value
1971-* int ステータス (SUCCESS/FAIL)
1971+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
19721972 *----------------------------------------------------------------------------*/
19731973
19741974 static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet)
@@ -1980,7 +1980,7 @@ static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet)
19801980 Pos = (uchar *)Packet;
19811981 Pos += SOCKS5REPLY_SIZE;
19821982
1983- if((Ret = ReadNchar(Socket, (char *)Packet, SOCKS5REPLY_SIZE, &CancelFlg)) == SUCCESS)
1983+ if((Ret = ReadNchar(Socket, (char *)Packet, SOCKS5REPLY_SIZE, &CancelFlg)) == FFFTP_SUCCESS)
19841984 {
19851985 if(Packet->Type == SOCKS5_ADRS_IPV4)
19861986 Len = 4 + 2;
@@ -1988,18 +1988,18 @@ static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet)
19881988 Len = 6 + 2;
19891989 else
19901990 {
1991- if((Ret = ReadNchar(Socket, (char *)Pos, 1, &CancelFlg)) == SUCCESS)
1991+ if((Ret = ReadNchar(Socket, (char *)Pos, 1, &CancelFlg)) == FFFTP_SUCCESS)
19921992 {
19931993 Len = *Pos + 2;
19941994 Pos++;
19951995 }
19961996 }
19971997
1998- if(Ret == SUCCESS)
1998+ if(Ret == FFFTP_SUCCESS)
19991999 Ret = ReadNchar(Socket, (char *)Pos, Len, &CancelFlg);
20002000 }
20012001
2002- if(Ret != SUCCESS)
2002+ if(Ret != FFFTP_SUCCESS)
20032003 SetTaskMsg(MSGJPN034);
20042004
20052005 return(Ret);
@@ -2013,7 +2013,7 @@ static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet)
20132013 * SOCKS5REPLY *Packet : パケット
20142014 *
20152015 * Return Value
2016-* int ステータス (SUCCESS/FAIL)
2016+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
20172017 *----------------------------------------------------------------------------*/
20182018
20192019 static int Socks4GetCmdReply(SOCKET Socket, SOCKS4REPLY *Packet)
@@ -2022,7 +2022,7 @@ static int Socks4GetCmdReply(SOCKET Socket, SOCKS4REPLY *Packet)
20222022
20232023 Ret = ReadNchar(Socket, (char *)Packet, SOCKS4REPLY_SIZE, &CancelFlg);
20242024
2025- if(Ret != SUCCESS)
2025+ if(Ret != FFFTP_SUCCESS)
20262026 DoPrintf(MSGJPN035);
20272027
20282028 return(Ret);
@@ -2035,7 +2035,7 @@ static int Socks4GetCmdReply(SOCKET Socket, SOCKS4REPLY *Packet)
20352035 * SOCKET Socket : ソケット
20362036 *
20372037 * Return Value
2038-* int ステータス (SUCCESS/FAIL)
2038+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
20392039 *----------------------------------------------------------------------------*/
20402040
20412041 static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork)
@@ -2048,7 +2048,7 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork)
20482048 int Len;
20492049 int Len2;
20502050
2051- Ret = SUCCESS;
2051+ Ret = FFFTP_SUCCESS;
20522052 Socks5Method.Ver = SOCKS5_VER;
20532053 Socks5Method.Num = 1;
20542054 if(FwallType == FWALL_SOCKS5_NOAUTH)
@@ -2056,12 +2056,12 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork)
20562056 else
20572057 Socks5Method.Methods[0] = SOCKS5_AUTH_USER;
20582058
2059- if((SocksSendCmd(Socket, &Socks5Method, SOCKS5METHODREQUEST_SIZE, CancelCheckWork) != SUCCESS) ||
2060- (ReadNchar(Socket, (char *)&Socks5MethodReply, SOCKS5METHODREPLY_SIZE, &CancelFlg) != SUCCESS) ||
2059+ if((SocksSendCmd(Socket, &Socks5Method, SOCKS5METHODREQUEST_SIZE, CancelCheckWork) != FFFTP_SUCCESS) ||
2060+ (ReadNchar(Socket, (char *)&Socks5MethodReply, SOCKS5METHODREPLY_SIZE, &CancelFlg) != FFFTP_SUCCESS) ||
20612061 (Socks5MethodReply.Method == (uchar)0xFF))
20622062 {
20632063 SetTaskMsg(MSGJPN036);
2064- Ret = FAIL;
2064+ Ret = FFFTP_FAIL;
20652065 }
20662066 else if(Socks5MethodReply.Method == SOCKS5_AUTH_USER)
20672067 {
@@ -2074,12 +2074,12 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork)
20742074 Buf[2 + Len] = Len2;
20752075 strcpy(Buf+3+Len, FwallPass);
20762076
2077- if((SocksSendCmd(Socket, &Buf, Len+Len2+3, CancelCheckWork) != SUCCESS) ||
2078- (ReadNchar(Socket, (char *)&Socks5Status, SOCKS5USERPASSSTATUS_SIZE, &CancelFlg) != SUCCESS) ||
2077+ if((SocksSendCmd(Socket, &Buf, Len+Len2+3, CancelCheckWork) != FFFTP_SUCCESS) ||
2078+ (ReadNchar(Socket, (char *)&Socks5Status, SOCKS5USERPASSSTATUS_SIZE, &CancelFlg) != FFFTP_SUCCESS) ||
20792079 (Socks5Status.Status != 0))
20802080 {
20812081 SetTaskMsg(MSGJPN037);
2082- Ret = FAIL;
2082+ Ret = FFFTP_FAIL;
20832083 }
20842084 }
20852085 else
@@ -2096,7 +2096,7 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork)
20962096 * SOCKET *Data : データソケットを返すワーク
20972097 *
20982098 * Return Value
2099-* int ステータス (SUCCESS/FAIL)
2099+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
21002100 *----------------------------------------------------------------------------*/
21012101
21022102 int SocksGet2ndBindReply(SOCKET Socket, SOCKET *Data)
@@ -2104,19 +2104,19 @@ int SocksGet2ndBindReply(SOCKET Socket, SOCKET *Data)
21042104 int Ret;
21052105 char Buf[300];
21062106
2107- Ret = FAIL;
2107+ Ret = FFFTP_FAIL;
21082108 if((AskHostFireWall() == YES) && (FwallType == FWALL_SOCKS4))
21092109 {
21102110 Socks4GetCmdReply(Socket, (SOCKS4REPLY *)Buf);
21112111 *Data = Socket;
2112- Ret = SUCCESS;
2112+ Ret = FFFTP_SUCCESS;
21132113 }
21142114 else if((AskHostFireWall() == YES) &&
21152115 ((FwallType == FWALL_SOCKS5_NOAUTH) || (FwallType == FWALL_SOCKS5_USER)))
21162116 {
21172117 Socks5GetCmdReply(Socket, (SOCKS5REPLY *)Buf);
21182118 *Data = Socket;
2119- Ret = SUCCESS;
2119+ Ret = FFFTP_SUCCESS;
21202120 }
21212121 return(Ret);
21222122 }
--- a/filelist.c
+++ b/filelist.c
@@ -157,7 +157,7 @@ static char remoteFileDir[FMAX_PATH + 1];
157157 *
158158 * Return Value
159159 * int ステータス
160-* SUCCESS/FAIL
160+* FFFTP_SUCCESS/FFFTP_FAIL
161161 *----------------------------------------------------------------------------*/
162162
163163 int MakeListWin(HWND hWnd, HINSTANCE hInst)
@@ -275,11 +275,11 @@ int MakeListWin(HWND hWnd, HINSTANCE hInst)
275275 SendMessage(hWndListRemote, LVM_INSERTCOLUMN, 5, (LPARAM)&LvCol);
276276 }
277277
278- Sts = SUCCESS;
278+ Sts = FFFTP_SUCCESS;
279279 if((hWndListLocal == NULL) ||
280280 (hWndListRemote == NULL))
281281 {
282- Sts = FAIL;
282+ Sts = FFFTP_FAIL;
283283 }
284284 return(Sts);
285285 }
@@ -1198,7 +1198,7 @@ void GetRemoteDirForWnd(int Mode, int *CancelCheckWork)
11981198 {
11991199 ListType = LIST_UNKNOWN;
12001200
1201- while(GetListOneLine(Str, FMAX_PATH, fd) == SUCCESS)
1201+ while(GetListOneLine(Str, FMAX_PATH, fd) == FFFTP_SUCCESS)
12021202 {
12031203 if((ListType = AnalizeFileInfo(Str)) != LIST_UNKNOWN)
12041204 {
@@ -1705,7 +1705,7 @@ void SelectFileInList(HWND hWnd, int Type)
17051705 LvItem.state = 0;
17061706 if(GetNodeType(Win, i) != NODE_DRIVE)
17071707 {
1708- if(((FindMode == 0) && (CheckFname(Name, RegExp) == SUCCESS)) ||
1708+ if(((FindMode == 0) && (CheckFname(Name, RegExp) == FFFTP_SUCCESS)) ||
17091709 ((FindMode != 0) && (JreGetStrMatchInfo(Name, 0) != NULL)))
17101710 {
17111711 LvItem.state = LVIS_SELECTED;
@@ -1859,7 +1859,7 @@ void FindFileInList(HWND hWnd, int Type)
18591859 _mbslwr(Name);
18601860
18611861 LvItem.state = 0;
1862- if(((FindMode == 0) && (CheckFname(Name, RegExp) == SUCCESS)) ||
1862+ if(((FindMode == 0) && (CheckFname(Name, RegExp) == FFFTP_SUCCESS)) ||
18631863 ((FindMode != 0) && (JreGetStrMatchInfo(Name, 0) != NULL)))
18641864 {
18651865 LvItem.mask = LVIF_STATE;
@@ -1883,7 +1883,7 @@ void FindFileInList(HWND hWnd, int Type)
18831883 _mbslwr(Name);
18841884
18851885 LvItem.state = 0;
1886- if(((FindMode == 0) && (CheckFname(Name, RegExp) == SUCCESS)) ||
1886+ if(((FindMode == 0) && (CheckFname(Name, RegExp) == FFFTP_SUCCESS)) ||
18871887 ((FindMode != 0) && (JreGetStrMatchInfo(Name, 0) != NULL)))
18881888 {
18891889 LvItem.mask = LVIF_STATE;
@@ -2775,11 +2775,11 @@ void AddRemoteTreeToFileList(int Num, char *Path, int IncDir, FILELIST **Base)
27752775
27762776 ListType = LIST_UNKNOWN;
27772777
2778- while(GetListOneLine(Str, FMAX_PATH, fd) == SUCCESS)
2778+ while(GetListOneLine(Str, FMAX_PATH, fd) == FFFTP_SUCCESS)
27792779 {
27802780 if((ListType = AnalizeFileInfo(Str)) == LIST_UNKNOWN)
27812781 {
2782- if(MakeDirPath(Str, ListType, Path, Dir) == SUCCESS)
2782+ if(MakeDirPath(Str, ListType, Path, Dir) == FFFTP_SUCCESS)
27832783 {
27842784 if(IncDir == RDIR_NLST)
27852785 {
@@ -2830,7 +2830,7 @@ void AddRemoteTreeToFileList(int Num, char *Path, int IncDir, FILELIST **Base)
28302830 * FILE *Fd : ストリーム
28312831 *
28322832 * Return Value
2833-* int ステータス (SUCCESS/FAIL)
2833+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
28342834 *
28352835 * Note
28362836 * VAX VMS以外の時は fgets(Buf, Max, Fd) と同じ
@@ -2842,10 +2842,10 @@ static int GetListOneLine(char *Buf, int Max, FILE *Fd)
28422842 char Tmp[FMAX_PATH+1];
28432843 int Sts;
28442844
2845- Sts = FAIL;
2846- while((Sts == FAIL) && (fgets(Buf, Max, Fd) != NULL))
2845+ Sts = FFFTP_FAIL;
2846+ while((Sts == FFFTP_FAIL) && (fgets(Buf, Max, Fd) != NULL))
28472847 {
2848- Sts = SUCCESS;
2848+ Sts = FFFTP_SUCCESS;
28492849 RemoveReturnCode(Buf);
28502850 ReplaceAll(Buf, '\x08', ' ');
28512851
@@ -2854,7 +2854,7 @@ static int GetListOneLine(char *Buf, int Max, FILE *Fd)
28542854 if(AskHostType() == HTYPE_VMS)
28552855 {
28562856 if(strchr(Buf, ';') == NULL) /* ファイル名以外の行 */
2857- Sts = FAIL;
2857+ Sts = FFFTP_FAIL;
28582858 else
28592859 {
28602860 Max -= strlen(Buf);
@@ -2892,14 +2892,14 @@ static int GetListOneLine(char *Buf, int Max, FILE *Fd)
28922892 *
28932893 * Return Value
28942894 * int ステータス
2895-* SUCCESS/FAIL=ディレクトリ情報でない
2895+* FFFTP_SUCCESS/FFFTP_FAIL=ディレクトリ情報でない
28962896 *----------------------------------------------------------------------------*/
28972897
28982898 static int MakeDirPath(char *Str, int ListType, char *Path, char *Dir)
28992899 {
29002900 int Sts;
29012901
2902- Sts = FAIL;
2902+ Sts = FFFTP_FAIL;
29032903 switch(ListType)
29042904 {
29052905 case LIST_ACOS :
@@ -2929,7 +2929,7 @@ static int MakeDirPath(char *Str, int ListType, char *Path, char *Dir)
29292929 ReplaceAll(Dir, '\\', '/');
29302930 }
29312931 }
2932- Sts = SUCCESS;
2932+ Sts = FFFTP_SUCCESS;
29332933 }
29342934 break;
29352935 }
@@ -3177,13 +3177,13 @@ static int AnalizeFileInfo(char *Str)
31773177 /* LIST_UNIX_10, LIST_UNIX_20, LIST_UNIX_12, LIST_UNIX_22, LIST_UNIX_50, LIST_UNIX_60 */
31783178 /* MELCOM80 */
31793179
3180- if(FindField(Str, Tmp, 0, NO) == SUCCESS)
3180+ if(FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS)
31813181 {
31823182 /* MELCOM80は "d rwxrwxrwx" のようにスペースが空いている */
31833183 Flag1 = NO;
31843184 if((strlen(Tmp) == 1) && (strchr("-dDlL", Tmp[0]) != NULL))
31853185 {
3186- if(FindField(Str, Tmp, 1, NO) == SUCCESS)
3186+ if(FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS)
31873187 {
31883188 if((strlen(Tmp) == 9) ||
31893189 ((strlen(Tmp) > 9) && (IsDigit(Tmp[9]) != 0)))
@@ -3207,7 +3207,7 @@ static int AnalizeFileInfo(char *Str)
32073207
32083208 ////////////
32093209 // LIST_UNIX_60 support
3210- if(FindField(Str, Tmp, 7+Add1, NO) == SUCCESS)
3210+ if(FindField(Str, Tmp, 7+Add1, NO) == FFFTP_SUCCESS)
32113211 {
32123212 GetMonth(Tmp, &Month, &Day);
32133213 if(Month != 0)
@@ -3220,7 +3220,7 @@ static int AnalizeFileInfo(char *Str)
32203220 ////////////
32213221 // LIST_UNIX_12 support
32223222 if((Ret == LIST_UNKNOWN) &&
3223- (FindField(Str, Tmp, 6+Add1, NO) == SUCCESS))
3223+ (FindField(Str, Tmp, 6+Add1, NO) == FFFTP_SUCCESS))
32243224 {
32253225 GetMonth(Tmp, &Month, &Day);
32263226 if(Month != 0)
@@ -3233,7 +3233,7 @@ static int AnalizeFileInfo(char *Str)
32333233 ////////////
32343234 // LIST_UNIX_70 support
32353235 if((Ret == LIST_UNKNOWN) &&
3236- (FindField(Str, Tmp, 6+Add1, NO) == SUCCESS))
3236+ (FindField(Str, Tmp, 6+Add1, NO) == FFFTP_SUCCESS))
32373237 {
32383238 GetMonth(Tmp, &Month, &Day);
32393239 if(Month != 0)
@@ -3244,7 +3244,7 @@ static int AnalizeFileInfo(char *Str)
32443244 ///////////
32453245
32463246 if((Ret == LIST_UNKNOWN) &&
3247- (FindField(Str, Tmp, 5+Add1, NO) == SUCCESS))
3247+ (FindField(Str, Tmp, 5+Add1, NO) == FFFTP_SUCCESS))
32483248 {
32493249 GetMonth(Tmp, &Month, &Day);
32503250 if(Month != 0)
@@ -3254,7 +3254,7 @@ static int AnalizeFileInfo(char *Str)
32543254 }
32553255
32563256 if((Ret == LIST_UNKNOWN) &&
3257- (FindField(Str, Tmp, 4+Add1, NO) == SUCCESS))
3257+ (FindField(Str, Tmp, 4+Add1, NO) == FFFTP_SUCCESS))
32583258 {
32593259 GetMonth(Tmp, &Month, &Day);
32603260 if(Month != 0)
@@ -3264,7 +3264,7 @@ static int AnalizeFileInfo(char *Str)
32643264 }
32653265
32663266 if((Ret == LIST_UNKNOWN) &&
3267- (FindField(Str, Tmp, 3+Add1, NO) == SUCCESS))
3267+ (FindField(Str, Tmp, 3+Add1, NO) == FFFTP_SUCCESS))
32683268 {
32693269 GetMonth(Tmp, &Month, &Day);
32703270 if(Month != 0)
@@ -3283,16 +3283,16 @@ static int AnalizeFileInfo(char *Str)
32833283
32843284 if(Ret == LIST_UNKNOWN)
32853285 {
3286- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3286+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
32873287 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
32883288 {
3289- if((FindField(Str, Tmp, 3, NO) == SUCCESS) &&
3289+ if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) &&
32903290 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
32913291 {
3292- if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3292+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
32933293 (IsDigit(Tmp[0]) != 0))
32943294 {
3295- if(FindField(Str, Tmp, 5, NO) == SUCCESS)
3295+ if(FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS)
32963296 {
32973297 Ret = LIST_AS400;
32983298 }
@@ -3306,19 +3306,19 @@ static int AnalizeFileInfo(char *Str)
33063306
33073307 if(Ret == LIST_UNKNOWN)
33083308 {
3309- if((FindField(Str, Tmp, 5, NO) == SUCCESS) &&
3309+ if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) &&
33103310 (CheckYYMMDDformat(Tmp, '*', NO) != 0))
33113311 {
3312- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3312+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
33133313 ((IsDigit(Tmp[0]) != 0) || (StrAllSameChar(Tmp, '*') == YES)))
33143314 {
3315- if((FindField(Str, Tmp, 3, NO) == SUCCESS) &&
3315+ if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) &&
33163316 ((IsDigit(Tmp[0]) != 0) || (StrAllSameChar(Tmp, '*') == YES)))
33173317 {
3318- if((FindField(Str, Tmp, 0, NO) == SUCCESS) &&
3318+ if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) &&
33193319 (strlen(Tmp) == 4))
33203320 {
3321- if(FindField(Str, Tmp, 6, NO) == SUCCESS)
3321+ if(FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS)
33223322 {
33233323 Ret = LIST_M1800;
33243324 }
@@ -3333,16 +3333,16 @@ static int AnalizeFileInfo(char *Str)
33333333
33343334 if(Ret == LIST_UNKNOWN)
33353335 {
3336- if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3336+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
33373337 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
33383338 {
3339- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3339+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
33403340 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
33413341 {
3342- if((FindField(Str, Tmp, 5, NO) == SUCCESS) &&
3342+ if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) &&
33433343 (IsDigit(Tmp[0]) != 0))
33443344 {
3345- if(FindField(Str, Tmp, 6, NO) == SUCCESS)
3345+ if(FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS)
33463346 {
33473347 Ret = LIST_GP6000;
33483348 }
@@ -3356,15 +3356,15 @@ static int AnalizeFileInfo(char *Str)
33563356
33573357 if(Ret == LIST_UNKNOWN)
33583358 {
3359- if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3359+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
33603360 (CheckHHMMformat(Tmp) == YES))
33613361 {
3362- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3362+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
33633363 ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0)))
33643364 {
3365- if(FindField(Str, Tmp, 3, NO) == SUCCESS)
3365+ if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS)
33663366 {
3367- if((FindField(Str, Tmp, 0, NO) == SUCCESS) &&
3367+ if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) &&
33683368 (CheckYYMMDDformat(Tmp, NUL, YES) != 0))
33693369 {
33703370 TmpInt = atoi(Tmp);
@@ -3383,13 +3383,13 @@ static int AnalizeFileInfo(char *Str)
33833383
33843384 if(Ret == LIST_UNKNOWN)
33853385 {
3386- if((FindField(Str, Tmp, 3, NO) == SUCCESS) &&
3386+ if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) &&
33873387 (CheckHHMMformat(Tmp) == YES))
33883388 {
3389- if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3389+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
33903390 ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0)))
33913391 {
3392- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3392+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
33933393 (CheckYYMMDDformat(Tmp, NUL, YES) != 0))
33943394 {
33953395 Ret = LIST_DOS_3;
@@ -3403,16 +3403,16 @@ static int AnalizeFileInfo(char *Str)
34033403
34043404 if(Ret == LIST_UNKNOWN)
34053405 {
3406- if((FindField(Str, Tmp, 0, NO) == SUCCESS) &&
3406+ if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) &&
34073407 (CheckYYYYMMDDformat(Tmp, NUL) == YES))
34083408 {
3409- if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3409+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
34103410 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
34113411 {
3412- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3412+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
34133413 ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0)))
34143414 {
3415- if(FindField(Str, Tmp, 3, NO) == SUCCESS)
3415+ if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS)
34163416 {
34173417 Ret = LIST_DOS_4;
34183418 }
@@ -3426,15 +3426,15 @@ static int AnalizeFileInfo(char *Str)
34263426
34273427 if(Ret == LIST_UNKNOWN)
34283428 {
3429- if(FindField(Str, Tmp, 2, NO) == SUCCESS)
3429+ if(FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS)
34303430 {
34313431 GetMonth(Tmp, &Month, &Day);
34323432 if((Month != 0) && (Day == 0))
34333433 {
3434- if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3434+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
34353435 ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0)))
34363436 {
3437- if((FindField(Str, Tmp, 5, NO) == SUCCESS) &&
3437+ if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) &&
34383438 (CheckHHMMformat(Tmp) == YES))
34393439 {
34403440 Ret = LIST_CHAMELEON;
@@ -3449,16 +3449,16 @@ static int AnalizeFileInfo(char *Str)
34493449
34503450 if(Ret == LIST_UNKNOWN)
34513451 {
3452- if((FindField(Str, Tmp, 3, NO) == SUCCESS) &&
3452+ if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) &&
34533453 (CheckHHMMformat(Tmp) == YES))
34543454 {
3455- if((FindField(Str, Tmp, 0, NO) == SUCCESS) &&
3455+ if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) &&
34563456 (IsDigit(Tmp[0]) != 0))
34573457 {
3458- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3458+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
34593459 (CheckYYMMDDformat(Tmp, NUL, YES) != 0))
34603460 {
3461- if(FindField(Str, Tmp, 4, NO) == SUCCESS)
3461+ if(FindField(Str, Tmp, 4, NO) == FFFTP_SUCCESS)
34623462 {
34633463 Ret = LIST_OS2;
34643464 }
@@ -3472,32 +3472,32 @@ static int AnalizeFileInfo(char *Str)
34723472
34733473 if(Ret == LIST_UNKNOWN)
34743474 {
3475- if((FindField(Str, Tmp, 0, NO) == SUCCESS) &&
3475+ if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) &&
34763476 (strlen(Tmp) == 10))
34773477 {
3478- if((FindField(Str, Tmp, 3, NO) == SUCCESS) &&
3478+ if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) &&
34793479 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
34803480 {
3481- if((FindField(Str, Tmp, 4, NO) == SUCCESS) &&
3481+ if((FindField(Str, Tmp, 4, NO) == FFFTP_SUCCESS) &&
34823482 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
34833483 {
3484- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3484+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
34853485 (IsDigit(Tmp[0]) != 0))
34863486 {
3487- if(FindField(Str, Tmp, 5, NO) == SUCCESS)
3487+ if(FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS)
34883488 {
34893489 Ret = LIST_OS7_2;
34903490 }
34913491 }
34923492 }
34933493 }
3494- else if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3494+ else if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
34953495 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
34963496 {
3497- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3497+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
34983498 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
34993499 {
3500- if(FindField(Str, Tmp, 3, NO) == SUCCESS)
3500+ if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS)
35013501 {
35023502 Ret = LIST_OS7_1;
35033503 }
@@ -3511,18 +3511,18 @@ static int AnalizeFileInfo(char *Str)
35113511
35123512 if(Ret == LIST_UNKNOWN)
35133513 {
3514- if((FindField(Str, Tmp, 0, NO) == SUCCESS) &&
3514+ if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) &&
35153515 ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0)))
35163516 {
3517- if((FindField(Str, Tmp, 5, NO) == SUCCESS) &&
3517+ if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) &&
35183518 (CheckHHMMformat(Tmp) == YES))
35193519 {
3520- if(FindField(Str, Tmp, 3, NO) == SUCCESS)
3520+ if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS)
35213521 {
35223522 GetMonth(Tmp, &Month, &Day);
35233523 if(Month != 0)
35243524 {
3525- if((FindField(Str, Tmp, 6, NO) == SUCCESS) &&
3525+ if((FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS) &&
35263526 (IsDigit(Tmp[0]) != 0))
35273527 {
35283528 Ret = LIST_ALLIED;
@@ -3538,16 +3538,16 @@ static int AnalizeFileInfo(char *Str)
35383538
35393539 if(Ret == LIST_UNKNOWN)
35403540 {
3541- if((FindField(Str, Tmp, 1, NO) == SUCCESS) &&
3541+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) &&
35423542 (CheckYYMMDDformat(Tmp, NUL, NO) != 0))
35433543 {
3544- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3544+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
35453545 (IsDigit(Tmp[0]) != 0) && (strlen(Tmp) == 4))
35463546 {
3547- if((FindField(Str, Tmp, 5, NO) == SUCCESS) &&
3547+ if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) &&
35483548 (IsDigit(Tmp[0]) != 0))
35493549 {
3550- if(FindField(Str, Tmp, 6, NO) == SUCCESS)
3550+ if(FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS)
35513551 {
35523552 Ret = LIST_OS9;
35533553 }
@@ -3561,14 +3561,14 @@ static int AnalizeFileInfo(char *Str)
35613561
35623562 if(Ret == LIST_UNKNOWN)
35633563 {
3564- if((FindField(Str, Tmp, 2, NO) == SUCCESS) &&
3564+ if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) &&
35653565 (CheckYYYYMMDDformat(Tmp, NUL) == YES))
35663566 {
3567- if((FindField(Str, Tmp, 1, NO) == SUCCESS) && IsDigit(Tmp[0]))
3567+ if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && IsDigit(Tmp[0]))
35683568 {
3569- if((FindField(Str, Tmp, 7, NO) == SUCCESS) && IsDigit(Tmp[0]))
3569+ if((FindField(Str, Tmp, 7, NO) == FFFTP_SUCCESS) && IsDigit(Tmp[0]))
35703570 {
3571- if(FindField(Str, Tmp, 9, NO) == SUCCESS)
3571+ if(FindField(Str, Tmp, 9, NO) == FFFTP_SUCCESS)
35723572 {
35733573 Ret = LIST_IBM;
35743574 }
@@ -3617,13 +3617,13 @@ static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day)
36173617
36183618 // unix系チェック
36193619 if((Day != 0) ||
3620- ((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == SUCCESS) &&
3620+ ((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) &&
36213621 ((atoi(Tmp) >= 1) && (atoi(Tmp) <= 31))))
36223622 {
3623- if((FindField(Str, Tmp, 7+Add1+Add2+Add3, NO) == SUCCESS) &&
3624- ((atoi(Tmp) >= 1900) || (GetHourAndMinute(Tmp, &Hour, &Minute) == SUCCESS)))
3623+ if((FindField(Str, Tmp, 7+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) &&
3624+ ((atoi(Tmp) >= 1900) || (GetHourAndMinute(Tmp, &Hour, &Minute) == FFFTP_SUCCESS)))
36253625 {
3626- if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == SUCCESS)
3626+ if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == FFFTP_SUCCESS)
36273627 {
36283628 Flag = 1;
36293629 }
@@ -3633,13 +3633,13 @@ static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day)
36333633 // 中国語Solaris専用
36343634 if(Flag == 0)
36353635 {
3636- if((FindField(Str, Tmp, 7+Add1+Add2+Add3, NO) == SUCCESS) &&
3636+ if((FindField(Str, Tmp, 7+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) &&
36373637 ((atoi(Tmp) >= 1) && (atoi(Tmp) <= 31)))
36383638 {
3639- if((FindField(Str, Tmp, 5+Add1+Add2+Add3, NO) == SUCCESS) &&
3639+ if((FindField(Str, Tmp, 5+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) &&
36403640 (atoi(Tmp) >= 1900))
36413641 {
3642- if((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == SUCCESS) &&
3642+ if((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) &&
36433643 (((atoi(Tmp) >= 1) && (atoi(Tmp) <= 9) &&
36443644 ((unsigned char)Tmp[1] == 0xD4) &&
36453645 ((unsigned char)Tmp[2] == 0xC2)) ||
@@ -3647,7 +3647,7 @@ static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day)
36473647 ((unsigned char)Tmp[2] == 0xD4) &&
36483648 ((unsigned char)Tmp[3] == 0xC2))))
36493649 {
3650- if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == SUCCESS)
3650+ if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == FFFTP_SUCCESS)
36513651 {
36523652 Flag = 2;
36533653 }
@@ -3967,7 +3967,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
39673967 *Size = _atoi64(Buf);
39683968
39693969 /* 名前 */
3970- if(FindField(Str, Fname, DosPos[offs][3], DosLongFname[offs]) == SUCCESS)
3970+ if(FindField(Str, Fname, DosPos[offs][3], DosLongFname[offs]) == FFFTP_SUCCESS)
39713971 {
39723972 Ret = NODE_FILE;
39733973 if(Buf[0] == '<')
@@ -3999,7 +3999,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
39993999 *Size = _atoi64(Buf);
40004000
40014001 /* 名前 */
4002- if(FindField(Str, Fname, 3, YES) == SUCCESS)
4002+ if(FindField(Str, Fname, 3, YES) == FFFTP_SUCCESS)
40034003 {
40044004 Ret = NODE_FILE;
40054005 if(Buf[0] == '<')
@@ -4034,7 +4034,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
40344034 *Size = _atoi64(Buf);
40354035
40364036 /* 名前 */
4037- if(FindField(Str, Fname, 4, YES) == SUCCESS)
4037+ if(FindField(Str, Fname, 4, YES) == FFFTP_SUCCESS)
40384038 {
40394039 FindField(Str, Buf, 1, NO);
40404040 Ret = NODE_FILE;
@@ -4073,7 +4073,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
40734073 *Size = _atoi64(Buf);
40744074
40754075 /* 名前 */
4076- if(FindField(Str, Fname, 0, NO) == SUCCESS)
4076+ if(FindField(Str, Fname, 0, NO) == FFFTP_SUCCESS)
40774077 {
40784078 Ret = NODE_FILE;
40794079 if(Buf[0] == '<')
@@ -4108,7 +4108,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
41084108 *Size = _atoi64(Buf);
41094109
41104110 /* 名前 */
4111- if(FindField(Str, Fname, 5, YES) == SUCCESS)
4111+ if(FindField(Str, Fname, 5, YES) == FFFTP_SUCCESS)
41124112 {
41134113 Ret = NODE_FILE;
41144114 if((Pos = strchr(Fname, '/')) != NULL)
@@ -4147,7 +4147,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
41474147 }
41484148
41494149 /* 名前 */
4150- if(FindField(Str, Fname, 6, YES) == SUCCESS)
4150+ if(FindField(Str, Fname, 6, YES) == FFFTP_SUCCESS)
41514151 {
41524152 RemoveTailingSpaces(Fname);
41534153 Ret = NODE_FILE;
@@ -4190,7 +4190,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
41904190 *Attr = AttrString2Value(Buf+1);
41914191
41924192 /* 名前 */
4193- if(FindField(Str, Fname, 6, YES) == SUCCESS)
4193+ if(FindField(Str, Fname, 6, YES) == FFFTP_SUCCESS)
41944194 {
41954195 Ret = NODE_FILE;
41964196 if(strchr("dl", Buf[0]) != NULL)
@@ -4274,7 +4274,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
42744274 *Attr = AttrString2Value(Buf+1);
42754275
42764276 /* 名前 */
4277- if(FindField(Str, Fname, 3+offs, YES) == SUCCESS)
4277+ if(FindField(Str, Fname, 3+offs, YES) == FFFTP_SUCCESS)
42784278 {
42794279 RemoveTailingSpaces(Fname);
42804280 Ret = NODE_FILE;
@@ -4284,7 +4284,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
42844284 break;
42854285
42864286 case LIST_STRATUS :
4287- if(FindField(Str, Buf, 0, NO) != SUCCESS)
4287+ if(FindField(Str, Buf, 0, NO) != FFFTP_SUCCESS)
42884288 break;
42894289 if(_strnicmp(Buf, "Files:", 6) == 0)
42904290 StratusMode = 0;
@@ -4304,14 +4304,14 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
43044304 *InfoExist |= (FINFO_TIME | FINFO_DATE);
43054305
43064306 /* 日付 */
4307- if(FindField(Str, Buf, 2+offs, NO) != SUCCESS)
4307+ if(FindField(Str, Buf, 2+offs, NO) != FFFTP_SUCCESS)
43084308 break;
43094309 sTime.wYear = Assume1900or2000(atoi(Buf));
43104310 sTime.wMonth = atoi(Buf + 3);
43114311 sTime.wDay = atoi(Buf + 6);
43124312
43134313 /* 時刻 */
4314- if(FindField(Str, Buf, 3+offs, NO) != SUCCESS)
4314+ if(FindField(Str, Buf, 3+offs, NO) != FFFTP_SUCCESS)
43154315 break;
43164316 sTime.wHour = atoi(Buf);
43174317 sTime.wMinute = atoi(Buf+3);
@@ -4321,7 +4321,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
43214321 SpecificLocalFileTime2FileTime(Time, AskHostTimeZone());
43224322
43234323 /* 名前 */
4324- if(FindField(Str, Fname, 4+offs, YES) != SUCCESS)
4324+ if(FindField(Str, Fname, 4+offs, YES) != FFFTP_SUCCESS)
43254325 break;
43264326
43274327 if(StratusMode == 0)
@@ -4329,12 +4329,12 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
43294329 *InfoExist |= FINFO_SIZE;
43304330
43314331 /* サイズ */
4332- if(FindField(Str, Buf, 1, NO) != SUCCESS)
4332+ if(FindField(Str, Buf, 1, NO) != FFFTP_SUCCESS)
43334333 break;
43344334 *Size = _atoi64(Buf) * 4096;
43354335
43364336 /* 種類(オーナ名のフィールドにいれる) */
4337- if(FindField(Str, Buf, 2, NO) != SUCCESS)
4337+ if(FindField(Str, Buf, 2, NO) != FFFTP_SUCCESS)
43384338 break;
43394339 strncpy(Owner, Buf, OWNER_NAME_LEN);
43404340
@@ -4351,18 +4351,18 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
43514351 /* 日付 */
43524352 for(offs = 11; offs > 7; offs--)
43534353 {
4354- if((err = FindField(Str, Buf, offs, NO)) == SUCCESS)
4354+ if((err = FindField(Str, Buf, offs, NO)) == FFFTP_SUCCESS)
43554355 break;
43564356 }
4357- if(err != SUCCESS)
4357+ if(err != FFFTP_SUCCESS)
43584358 break;
43594359 if(IsDigit(*Buf) == 0)
43604360 break;
43614361 sTime.wYear = Assume1900or2000(atoi(Buf));
4362- if(FindField(Str, Buf, --offs, NO) != SUCCESS)
4362+ if(FindField(Str, Buf, --offs, NO) != FFFTP_SUCCESS)
43634363 break;
43644364 GetMonth(Buf, &sTime.wMonth, &sTime.wDay);
4365- if(FindField(Str, Buf, --offs, NO) != SUCCESS)
4365+ if(FindField(Str, Buf, --offs, NO) != FFFTP_SUCCESS)
43664366 break;
43674367 if(IsDigit(*Buf) == 0)
43684368 break;
@@ -4375,35 +4375,35 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
43754375 SpecificLocalFileTime2FileTime(Time, AskHostTimeZone());
43764376
43774377 /* オーナ名 */
4378- if(FindField(Str, Buf, --offs, NO) != SUCCESS)
4378+ if(FindField(Str, Buf, --offs, NO) != FFFTP_SUCCESS)
43794379 break;
43804380 strncpy(Owner, Buf, OWNER_NAME_LEN);
43814381
43824382 /* サイズ */
43834383 do
43844384 {
4385- if((err = FindField(Str, Buf, --offs, NO)) != SUCCESS)
4385+ if((err = FindField(Str, Buf, --offs, NO)) != FFFTP_SUCCESS)
43864386 break;
43874387 }
43884388 while(IsDigit(*Buf) == 0);
43894389 --offs;
4390- if((err = FindField(Str, Buf, --offs, NO)) != SUCCESS)
4390+ if((err = FindField(Str, Buf, --offs, NO)) != FFFTP_SUCCESS)
43914391 break;
43924392 RemoveComma(Buf);
43934393 *Size = _atoi64(Buf);
4394- if((err = FindField(Str, Buf, --offs, NO)) != SUCCESS)
4394+ if((err = FindField(Str, Buf, --offs, NO)) != FFFTP_SUCCESS)
43954395 break;
43964396 if(IsDigit(*Buf) == 0)
43974397 break;
43984398 /* 名前 */
4399- if(FindField(Str, Fname, 0, NO) != SUCCESS)
4399+ if(FindField(Str, Fname, 0, NO) != FFFTP_SUCCESS)
44004400 break;
44014401 /* 種類 */
44024402 if(offs == 0)
44034403 Ret = NODE_FILE;
44044404 else
44054405 {
4406- if((FindField(Str, Buf, 1, NO) == SUCCESS) &&
4406+ if((FindField(Str, Buf, 1, NO) == FFFTP_SUCCESS) &&
44074407 (strcmp(Buf, "DR") == 0))
44084408 Ret = NODE_DIR;
44094409 else
@@ -4436,7 +4436,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
44364436 *Size = _atoi64(Buf);
44374437
44384438 /* 名前 */
4439- if(FindField(Str, Fname, 1, NO) == SUCCESS)
4439+ if(FindField(Str, Fname, 1, NO) == FFFTP_SUCCESS)
44404440 {
44414441 Ret = NODE_FILE;
44424442 if(Buf[0] == '<')
@@ -4476,7 +4476,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
44764476 FindField(Str, Buf, 3, NO);
44774477
44784478 /* 名前 */
4479- if(FindField(Str, Fname, 6, NO) == SUCCESS)
4479+ if(FindField(Str, Fname, 6, NO) == FFFTP_SUCCESS)
44804480 {
44814481 if((Buf[0] == 'd') || (Buf[0] == 'D'))
44824482 Ret = NODE_DIR;
@@ -4503,7 +4503,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
45034503
45044504 /* 名前 */
45054505 FindField(Str, Buf, 8, NO);
4506- if(FindField(Str, Fname, 9, NO) == SUCCESS)
4506+ if(FindField(Str, Fname, 9, NO) == FFFTP_SUCCESS)
45074507 {
45084508 if(strcmp(Buf, "PO") == 0)
45094509 Ret = NODE_DIR;
@@ -4528,7 +4528,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
45284528 *Attr = AttrString2Value(Buf+1);
45294529
45304530 /* 名前 */
4531- if(FindField(Str, Fname, 5, YES) == SUCCESS)
4531+ if(FindField(Str, Fname, 5, YES) == FFFTP_SUCCESS)
45324532 {
45334533 Ret = NODE_FILE;
45344534 if(strchr("dl", Buf[0]) != NULL)
@@ -4566,7 +4566,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
45664566
45674567 /* 種類 */
45684568 Ret = NODE_FILE;
4569- if(FindField(Str, Buf, 4, NO) == SUCCESS)
4569+ if(FindField(Str, Buf, 4, NO) == FFFTP_SUCCESS)
45704570 {
45714571 if(strcmp(Buf, "<DIR>") == 0)
45724572 Ret = NODE_DIR;
@@ -4715,12 +4715,12 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
47154715
47164716 FindField(Str, Buf, 5+offs, NO);
47174717 /* 日付が yy/mm/dd の場合に対応 */
4718- if(GetYearMonthDay(Buf, &sTime.wYear, &sTime.wMonth, &sTime.wDay) == SUCCESS)
4718+ if(GetYearMonthDay(Buf, &sTime.wYear, &sTime.wMonth, &sTime.wDay) == FFFTP_SUCCESS)
47194719 {
47204720 sTime.wYear = Assume1900or2000(sTime.wYear);
47214721
47224722 FindField(Str, Buf, 7+offs+offs2, NO);
4723- if(GetHourAndMinute(Buf, &sTime.wHour, &sTime.wMinute) == SUCCESS)
4723+ if(GetHourAndMinute(Buf, &sTime.wHour, &sTime.wMinute) == FFFTP_SUCCESS)
47244724 *InfoExist |= FINFO_TIME;
47254725 }
47264726 else
@@ -4733,7 +4733,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
47334733 }
47344734
47354735 FindField(Str, Buf, 7+offs+offs2, NO);
4736- if(GetHourAndMinute(Buf, &sTime.wHour, &sTime.wMinute) == FAIL)
4736+ if(GetHourAndMinute(Buf, &sTime.wHour, &sTime.wMinute) == FFFTP_FAIL)
47374737 {
47384738 sTime.wYear = atoi(Buf);
47394739 }
@@ -4780,7 +4780,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
47804780 SpecificLocalFileTime2FileTime(Time, AskHostTimeZone());
47814781
47824782 /* 名前 */
4783- if(FindField(Str, Fname, 8+offs+offs2, YES) == SUCCESS)
4783+ if(FindField(Str, Fname, 8+offs+offs2, YES) == FFFTP_SUCCESS)
47844784 {
47854785 Flag = 'B';
47864786 if(OrgListType & LIST_MELCOM)
@@ -4836,7 +4836,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size,
48364836 *
48374837 * Return Value
48384838 * int ステータス
4839-* SUCCESS/FAIL
4839+* FFFTP_SUCCESS/FFFTP_FAIL
48404840 *----------------------------------------------------------------------------*/
48414841
48424842 static int FindField(char *Str, char *Buf, int Num, int ToLast)
@@ -4844,7 +4844,7 @@ static int FindField(char *Str, char *Buf, int Num, int ToLast)
48444844 char *Pos;
48454845 int Sts;
48464846
4847- Sts = FAIL;
4847+ Sts = FFFTP_FAIL;
48484848 *Buf = NUL;
48494849 if(Num >= 0)
48504850 {
@@ -4879,7 +4879,7 @@ static int FindField(char *Str, char *Buf, int Num, int ToLast)
48794879 strncpy(Buf, Str, Pos - Str);
48804880 *(Buf + (Pos - Str)) = NUL;
48814881 }
4882- Sts = SUCCESS;
4882+ Sts = FFFTP_SUCCESS;
48834883 }
48844884 return(Sts);
48854885 }
@@ -4977,18 +4977,18 @@ static void GetMonth(char *Str, WORD *Month, WORD *Day)
49774977 * WORD *Day : 日
49784978 *
49794979 * Return Value
4980-* int ステータス (SUCCESS/FAIL=日付を表す文字ではない)
4980+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL=日付を表す文字ではない)
49814981 *
49824982 * Note
49834983 * 以下の形式をサポート
49844984 * 01/07/25
4985-* FAILを返す時は *Year = 0; *Month = 0; *Day = 0
4985+* FFFTP_FAILを返す時は *Year = 0; *Month = 0; *Day = 0
49864986 *----------------------------------------------------------------------------*/
49874987 static int GetYearMonthDay(char *Str, WORD *Year, WORD *Month, WORD *Day)
49884988 {
49894989 int Sts;
49904990
4991- Sts = FAIL;
4991+ Sts = FFFTP_FAIL;
49924992 if(strlen(Str) == 8)
49934993 {
49944994 if(IsDigit(Str[0]) && IsDigit(Str[1]) && !IsDigit(Str[2]) &&
@@ -4998,7 +4998,7 @@ static int GetYearMonthDay(char *Str, WORD *Year, WORD *Month, WORD *Day)
49984998 *Year = atoi(&Str[0]);
49994999 *Month = atoi(&Str[3]);
50005000 *Day = atoi(&Str[6]);
5001- Sts = SUCCESS;
5001+ Sts = FFFTP_SUCCESS;
50025002 }
50035003 }
50045004 return(Sts);
@@ -5013,13 +5013,13 @@ static int GetYearMonthDay(char *Str, WORD *Year, WORD *Month, WORD *Day)
50135013 * WORD *Minute : 分
50145014 *
50155015 * Return Value
5016-* int ステータス (SUCCESS/FAIL=時刻を表す文字ではない)
5016+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL=時刻を表す文字ではない)
50175017 *
50185018 * Note
50195019 * 以下の形式をサポート
50205020 * HH:MM
50215021 * HH時MM分
5022-* FAILを返す時は *Hour = 0; *Minute = 0
5022+* FFFTP_FAILを返す時は *Hour = 0; *Minute = 0
50235023 *----------------------------------------------------------------------------*/
50245024
50255025 static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute)
@@ -5027,7 +5027,7 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute)
50275027 int Ret;
50285028 char *Pos;
50295029
5030- Ret = FAIL;
5030+ Ret = FFFTP_FAIL;
50315031 if((_mbslen(Str) >= 3) && (isdigit(Str[0]) != 0))
50325032 {
50335033 *Hour = atoi(Str);
@@ -5040,7 +5040,7 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute)
50405040 {
50415041 *Minute = atoi(Pos);
50425042 if(*Minute < 60)
5043- Ret = SUCCESS;
5043+ Ret = FFFTP_SUCCESS;
50445044 }
50455045 }
50465046 else
@@ -5061,7 +5061,7 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute)
50615061 {
50625062 *Minute = atoi(Pos);
50635063 if(*Minute < 60)
5064- Ret = SUCCESS;
5064+ Ret = FFFTP_SUCCESS;
50655065 }
50665066 }
50675067 break;
@@ -5075,10 +5075,10 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute)
50755075 {
50765076 *Hour = 0;
50775077 *Minute = 0;
5078- Ret = SUCCESS;
5078+ Ret = FFFTP_SUCCESS;
50795079 }
50805080
5081- if(Ret == FAIL)
5081+ if(Ret == FFFTP_FAIL)
50825082 {
50835083 *Hour = 0;
50845084 *Minute = 0;
@@ -5096,12 +5096,12 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute)
50965096 * WORD *Day : 日
50975097 *
50985098 * Return Value
5099-* int ステータス (SUCCESS/FAIL=日付を表す文字ではない)
5099+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL=日付を表す文字ではない)
51005100 *
51015101 * Note
51025102 * 以下の形式をサポート
51035103 * 18-SEP-1998
5104-* FAILを返す時は *Year = 0; *Month = 0; *Day = 0
5104+* FFFTP_FAILを返す時は *Year = 0; *Month = 0; *Day = 0
51055105 *----------------------------------------------------------------------------*/
51065106
51075107 static int GetVMSdate(char *Str, WORD *Year, WORD *Month, WORD *Day)
@@ -5111,7 +5111,7 @@ static int GetVMSdate(char *Str, WORD *Year, WORD *Month, WORD *Day)
51115111 WORD Tmp;
51125112 char Buf[4];
51135113
5114- Ret = FAIL;
5114+ Ret = FFFTP_FAIL;
51155115 *Day = atoi(Str);
51165116 if((Pos = strchr(Str, '-')) != NULL)
51175117 {
@@ -5123,11 +5123,11 @@ static int GetVMSdate(char *Str, WORD *Year, WORD *Month, WORD *Day)
51235123 {
51245124 Pos++;
51255125 *Year = atoi(Pos);
5126- Ret = SUCCESS;
5126+ Ret = FFFTP_SUCCESS;
51275127 }
51285128 }
51295129
5130- if(Ret == FAIL)
5130+ if(Ret == FFFTP_FAIL)
51315131 {
51325132 *Year = 0;
51335133 *Month = 0;
@@ -5216,7 +5216,7 @@ static int AskFilterStr(char *Fname, int Type)
52165216 if((Pos = strchr(Tmp, ';')) != NULL)
52175217 *Pos = NUL;
52185218
5219- if(CheckFname(Fname, Tmp) == SUCCESS)
5219+ if(CheckFname(Fname, Tmp) == FFFTP_SUCCESS)
52205220 {
52215221 Ret = YES;
52225222 break;
--- a/ftpproc.c
+++ b/ftpproc.c
@@ -118,7 +118,7 @@ void DownLoadProc(int ChName, int ForceFile, int All)
118118 FILELIST *Pos;
119119 TRANSPACKET Pkt;
120120
121- if(CheckClosedAndReconnect() == SUCCESS)
121+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
122122 {
123123 DisableUserOpe();
124124
@@ -148,7 +148,7 @@ void DownLoadProc(int ChName, int ForceFile, int All)
148148 else if(FnameCnv == FNAME_UPPER)
149149 _mbsupr(TmpString);
150150 RemoveAfterSemicolon(TmpString);
151- if(RenameUnuseableName(TmpString) == FAIL)
151+ if(RenameUnuseableName(TmpString) == FFFTP_FAIL)
152152 break;
153153 }
154154 else
@@ -156,7 +156,7 @@ void DownLoadProc(int ChName, int ForceFile, int All)
156156 CurWin = WIN_REMOTE;
157157 if(DialogBox(GetFtpInst(), MAKEINTRESOURCE(updown_as_dlg), GetMainHwnd(), UpDownAsDialogCallBack) == YES)
158158 {
159- if(RenameUnuseableName(TmpString) == FAIL)
159+ if(RenameUnuseableName(TmpString) == FFFTP_FAIL)
160160 break;
161161 }
162162 else
@@ -244,7 +244,7 @@ void DirectDownLoadProc(char *Fname)
244244 {
245245 TRANSPACKET Pkt;
246246
247- if(CheckClosedAndReconnect() == SUCCESS)
247+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
248248 {
249249 DisableUserOpe();
250250
@@ -269,7 +269,7 @@ void DirectDownLoadProc(char *Fname)
269269 _mbsupr(TmpString);
270270 RemoveAfterSemicolon(TmpString);
271271
272- if(RenameUnuseableName(TmpString) == SUCCESS)
272+ if(RenameUnuseableName(TmpString) == FFFTP_SUCCESS)
273273 {
274274 strcat(Pkt.LocalFile, TmpString);
275275 ReplaceAll(Pkt.LocalFile, '/', '\\');
@@ -378,7 +378,7 @@ void MirrorDownloadProc(int Notify)
378378 int Level;
379379 int Mode;
380380
381- if(CheckClosedAndReconnect() == SUCCESS)
381+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
382382 {
383383 DisableUserOpe();
384384
@@ -844,7 +844,7 @@ void UpLoadListProc(int ChName, int All)
844844 char Tmp[FMAX_PATH+1];
845845 int FirstAdd;
846846
847- if(CheckClosedAndReconnect() == SUCCESS)
847+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
848848 {
849849 DisableUserOpe();
850850
@@ -1007,7 +1007,7 @@ void UpLoadDragProc(WPARAM wParam)
10071007 int FirstAdd;
10081008 char Cur[FMAX_PATH+1];
10091009
1010- if(CheckClosedAndReconnect() == SUCCESS)
1010+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
10111011 {
10121012 DisableUserOpe();
10131013
@@ -1161,7 +1161,7 @@ void MirrorUploadProc(int Notify)
11611161 FILETIME TmpFtimeL;
11621162 FILETIME TmpFtimeR;
11631163
1164- if(CheckClosedAndReconnect() == SUCCESS)
1164+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
11651165 {
11661166 DisableUserOpe();
11671167
@@ -1570,7 +1570,7 @@ static BOOL CALLBACK MirrorDispListCallBack(HWND hDlg, UINT iMessage, WPARAM wPa
15701570 Num = SendDlgItemMessage(hDlg, MIRROR_LIST, LB_GETSELITEMS, Num, (LPARAM)List);
15711571 for(Num--; Num >= 0; Num--)
15721572 {
1573- if(RemoveTmpTransFileListItem(Base, List[Num]) == SUCCESS)
1573+ if(RemoveTmpTransFileListItem(Base, List[Num]) == FFFTP_SUCCESS)
15741574 SendDlgItemMessage(hDlg, MIRROR_LIST, LB_DELETESTRING, List[Num], 0);
15751575 else
15761576 MessageBeep(-1);
@@ -1698,7 +1698,7 @@ static int AskMirrorNoTrn(char *Fname, int Mode)
16981698 Fname = GetFileName(Fname);
16991699 while(*Tbl != NUL)
17001700 {
1701- if(CheckFname(Fname, Tbl) == SUCCESS)
1701+ if(CheckFname(Fname, Tbl) == FFFTP_SUCCESS)
17021702 {
17031703 Ret = YES;
17041704 break;
@@ -1733,7 +1733,7 @@ static int AskUpLoadFileAttr(char *Fname)
17331733 Sts = CheckFname(Fname, Tbl);
17341734 Tbl += strlen(Tbl) + 1;
17351735
1736- if((Sts == SUCCESS) && (*Tbl != NUL))
1736+ if((Sts == FFFTP_SUCCESS) && (*Tbl != NUL))
17371737 {
17381738 Ret = xtoi(Tbl);
17391739 break;
@@ -1937,7 +1937,7 @@ void DeleteProc(void)
19371937 else
19381938 {
19391939 Win = WIN_REMOTE;
1940- if(CheckClosedAndReconnect() == SUCCESS)
1940+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
19411941 MakeSelectedFileList(Win, YES, NO, &FileListBase, &CancelFlg);
19421942 else
19431943 Sts = NO;
@@ -2075,7 +2075,7 @@ static void DelNotifyAndDo(FILELIST *Dt, int Win, int *Sw, int *Flg, char *CurDi
20752075 else
20762076 {
20772077 /* フルパスを使わない時のための処理 */
2078- if(ProcForNonFullpath(Path, CurDir, GetMainHwnd(), 0) == FAIL)
2078+ if(ProcForNonFullpath(Path, CurDir, GetMainHwnd(), 0) == FFFTP_FAIL)
20792079 *Sw = NO_ALL;
20802080
20812081 if(*Sw != NO_ALL)
@@ -2159,7 +2159,7 @@ void RenameProc(void)
21592159 int RenFlg;
21602160 int Sts;
21612161
2162- Sts = SUCCESS;
2162+ Sts = FFFTP_SUCCESS;
21632163 if(GetFocus() == GetLocalHwnd())
21642164 Win = WIN_LOCAL;
21652165 else
@@ -2168,7 +2168,7 @@ void RenameProc(void)
21682168 Sts = CheckClosedAndReconnect();
21692169 }
21702170
2171- if(Sts == SUCCESS)
2171+ if(Sts == FFFTP_SUCCESS)
21722172 {
21732173 DisableUserOpe();
21742174
@@ -2252,7 +2252,7 @@ void MoveRemoteFileProc(int drop_index)
22522252 }
22532253 }
22542254
2255- Sts = SUCCESS;
2255+ Sts = FFFTP_SUCCESS;
22562256 #if 0
22572257 if(GetFocus() == GetLocalHwnd())
22582258 Win = WIN_LOCAL;
@@ -2266,7 +2266,7 @@ void MoveRemoteFileProc(int drop_index)
22662266 Sts = CheckClosedAndReconnect();
22672267 #endif
22682268
2269- if(Sts == SUCCESS)
2269+ if(Sts == FFFTP_SUCCESS)
22702270 {
22712271 DisableUserOpe();
22722272
@@ -2428,7 +2428,7 @@ void MkdirProc(void)
24282428 }
24292429 else
24302430 {
2431- if(CheckClosedAndReconnect() == SUCCESS)
2431+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
24322432 {
24332433 DisableUserOpe();
24342434 DoMKD(Path);
@@ -2468,7 +2468,7 @@ void ChangeDirComboProc(HWND hWnd)
24682468 }
24692469 else
24702470 {
2471- if(CheckClosedAndReconnect() == SUCCESS)
2471+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
24722472 {
24732473 DisableUserOpe();
24742474 if(DoCWD(Tmp, YES, NO, YES) < FTP_RETRY)
@@ -2500,14 +2500,14 @@ void ChangeDirBmarkProc(int MarkID)
25002500 if((Sts == BMARK_TYPE_LOCAL) || (Sts == BMARK_TYPE_BOTH))
25012501 {
25022502 DisableUserOpe();
2503- if(DoLocalCWD(Local) == SUCCESS)
2503+ if(DoLocalCWD(Local) == FFFTP_SUCCESS)
25042504 GetLocalDirForWnd();
25052505 EnableUserOpe();
25062506 }
25072507
25082508 if((Sts == BMARK_TYPE_REMOTE) || (Sts == BMARK_TYPE_BOTH))
25092509 {
2510- if(CheckClosedAndReconnect() == SUCCESS)
2510+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
25112511 {
25122512 DisableUserOpe();
25132513 if(DoCWD(Remote, YES, NO, YES) < FTP_RETRY)
@@ -2557,7 +2557,7 @@ void ChangeDirDirectProc(int Win)
25572557 }
25582558 else
25592559 {
2560- if(CheckClosedAndReconnect() == SUCCESS)
2560+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
25612561 {
25622562 DisableUserOpe();
25632563 if(DoCWD(Path, YES, NO, YES) < FTP_RETRY)
@@ -2613,7 +2613,7 @@ void ChmodProc(void)
26132613
26142614 if(GetFocus() == GetRemoteHwnd())
26152615 {
2616- if(CheckClosedAndReconnect() == SUCCESS)
2616+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
26172617 {
26182618 DisableUserOpe();
26192619 FileListBase = NULL;
@@ -2836,7 +2836,7 @@ void SomeCmdProc(void)
28362836
28372837 if(GetFocus() == GetRemoteHwnd())
28382838 {
2839- if(CheckClosedAndReconnect() == SUCCESS)
2839+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
28402840 {
28412841 DisableUserOpe();
28422842 FileListBase = NULL;
@@ -2880,7 +2880,7 @@ void CalcFileSizeProc(void)
28802880
28812881 if((All = DialogBox(GetFtpInst(), MAKEINTRESOURCE(filesize_notify_dlg), GetMainHwnd(), SizeNotifyDlgWndProc)) != NO_ALL)
28822882 {
2883- Sts = SUCCESS;
2883+ Sts = FFFTP_SUCCESS;
28842884 if(GetFocus() == GetLocalHwnd())
28852885 Win = WIN_LOCAL;
28862886 else
@@ -2889,7 +2889,7 @@ void CalcFileSizeProc(void)
28892889 Sts = CheckClosedAndReconnect();
28902890 }
28912891
2892- if(Sts == SUCCESS)
2892+ if(Sts == FFFTP_SUCCESS)
28932893 {
28942894 ListBase = NULL;
28952895 MakeSelectedFileList(Win, YES, All, &ListBase, &CancelFlg);
@@ -3093,7 +3093,7 @@ void CopyURLtoClipBoard(void)
30933093 * 0=コマンドソケット, 1=転送ソケット
30943094 *
30953095 * Return Value
3096-* int ステータス(SUCCESS/FAIL)
3096+* int ステータス(FFFTP_SUCCESS/FFFTP_FAIL)
30973097 *
30983098 * Note
30993099 * フルパスを使わない時は、
@@ -3107,7 +3107,7 @@ int ProcForNonFullpath(char *Path, char *CurDir, HWND hWnd, int Type)
31073107 int Cmd;
31083108 char Tmp[FMAX_PATH+1];
31093109
3110- Sts = SUCCESS;
3110+ Sts = FFFTP_SUCCESS;
31113111 if(AskNoFullPathMode() == YES)
31123112 {
31133113 strcpy(Tmp, Path);
@@ -3131,7 +3131,7 @@ int ProcForNonFullpath(char *Path, char *CurDir, HWND hWnd, int Type)
31313131 if(Cmd/100 != FTP_COMPLETE)
31323132 {
31333133 DispCWDerror(hWnd);
3134- Sts = FAIL;
3134+ Sts = FFFTP_FAIL;
31353135 }
31363136 else
31373137 strcpy(CurDir, Tmp);
@@ -3245,7 +3245,7 @@ void ReformVMSDirName(char *DirName, int Flg)
32453245 *
32463246 * Return Value
32473247 * int ステータス
3248-* SUCCESS/FAIL=中止する
3248+* FFFTP_SUCCESS/FFFTP_FAIL=中止する
32493249 *
32503250 * Note
32513251 * Fnameを直接書きかえる
@@ -3256,7 +3256,7 @@ static int RenameUnuseableName(char *Fname)
32563256 int Tmp;
32573257 int Ret;
32583258
3259- Ret = SUCCESS;
3259+ Ret = FFFTP_SUCCESS;
32603260 while(1)
32613261 {
32623262 if((_mbschr(Fname, ':') != NULL) ||
@@ -3270,7 +3270,7 @@ static int RenameUnuseableName(char *Fname)
32703270 {
32713271 if(InputDialogBox(forcerename_dlg, GetMainHwnd(), NULL, Fname, FMAX_PATH+1, &Tmp, IDH_HELP_TOPIC_0000001) == NO)
32723272 {
3273- Ret = FAIL;
3273+ Ret = FFFTP_FAIL;
32743274 break;
32753275 }
32763276 }
--- a/getput.c
+++ b/getput.c
@@ -161,9 +161,9 @@ int MakeTransferThread(void)
161161 fTransferThreadExit = FALSE;
162162 hTransferThread = (HANDLE)_beginthreadex(NULL, 0, TransferThread, 0, 0, &dwID);
163163 if (hTransferThread == NULL)
164- return(FAIL); /* XXX */
164+ return(FFFTP_FAIL); /* XXX */
165165
166- return(SUCCESS);
166+ return(FFFTP_SUCCESS);
167167 }
168168
169169
@@ -206,7 +206,7 @@ void CloseTransferThread(void)
206206 *
207207 * Return Value
208208 * int ステータス
209-* SUCCESS/FAIL
209+* FFFTP_SUCCESS/FFFTP_FAIL
210210 *----------------------------------------------------------------------------*/
211211
212212 int AddTmpTransFileList(TRANSPACKET *Pkt, TRANSPACKET **Base)
@@ -215,7 +215,7 @@ int AddTmpTransFileList(TRANSPACKET *Pkt, TRANSPACKET **Base)
215215 TRANSPACKET *Prev;
216216 int Sts;
217217
218- Sts = FAIL;
218+ Sts = FFFTP_FAIL;
219219 if((Pos = malloc(sizeof(TRANSPACKET))) != NULL)
220220 {
221221 memcpy(Pos, Pkt, sizeof(TRANSPACKET));
@@ -230,7 +230,7 @@ int AddTmpTransFileList(TRANSPACKET *Pkt, TRANSPACKET **Base)
230230 Prev = Prev->Next;
231231 Prev->Next = Pos;
232232 }
233- Sts = SUCCESS;
233+ Sts = FFFTP_SUCCESS;
234234 }
235235 return(Sts);
236236 }
@@ -270,7 +270,7 @@ void EraseTmpTransFileList(TRANSPACKET **Base)
270270 *
271271 * Return Value
272272 * int ステータス
273-* SUCCESS/FAIL
273+* FFFTP_SUCCESS/FFFTP_FAIL
274274 *----------------------------------------------------------------------------*/
275275
276276 int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num)
@@ -279,13 +279,13 @@ int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num)
279279 TRANSPACKET *Prev;
280280 int Sts;
281281
282- Sts = FAIL;
282+ Sts = FFFTP_FAIL;
283283 Pos = *Base;
284284 if(Num == 0)
285285 {
286286 *Base = Pos->Next;
287287 free(Pos);
288- Sts = SUCCESS;
288+ Sts = FFFTP_SUCCESS;
289289 }
290290 else
291291 {
@@ -297,7 +297,7 @@ int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num)
297297 {
298298 Prev->Next = Pos->Next;
299299 free(Pos);
300- Sts = SUCCESS;
300+ Sts = FFFTP_SUCCESS;
301301 break;
302302 }
303303 }
@@ -321,7 +321,7 @@ void AddTransFileList(TRANSPACKET *Pkt)
321321
322322 WaitForSingleObject(hListAccMutex, INFINITE);
323323
324- if(AddTmpTransFileList(Pkt, &TransPacketBase) == SUCCESS)
324+ if(AddTmpTransFileList(Pkt, &TransPacketBase) == FFFTP_SUCCESS)
325325 {
326326 if((strncmp(Pkt->Cmd, "RETR", 4) == 0) ||
327327 (strncmp(Pkt->Cmd, "STOR", 4) == 0))
@@ -615,7 +615,7 @@ static ULONG WINAPI TransferThread(void *Dummy)
615615 if(CheckPathViolation(TransPacketBase) == NO)
616616 {
617617 /* フルパスを使わないための処理 */
618- if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS)
618+ if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS)
619619 {
620620 if(strncmp(TransPacketBase->Cmd, "RETR-S", 6) == 0)
621621 {
@@ -628,7 +628,7 @@ static ULONG WINAPI TransferThread(void *Dummy)
628628 Down = YES;
629629 // if(DoDownLoad(AskTrnCtrlSkt(), TransPacketBase, NO) == 429)
630630 // {
631-// if(ReConnectTrnSkt() == SUCCESS)
631+// if(ReConnectTrnSkt() == FFFTP_SUCCESS)
632632 DoDownLoad(AskTrnCtrlSkt(), TransPacketBase, NO, &Canceled);
633633 // }
634634 }
@@ -638,12 +638,12 @@ static ULONG WINAPI TransferThread(void *Dummy)
638638 else if(strncmp(TransPacketBase->Cmd, "STOR", 4) == 0)
639639 {
640640 /* フルパスを使わないための処理 */
641- if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS)
641+ if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS)
642642 {
643643 Up = YES;
644644 // if(DoUpLoad(AskTrnCtrlSkt(), TransPacketBase) == 429)
645645 // {
646-// if(ReConnectTrnSkt() == SUCCESS)
646+// if(ReConnectTrnSkt() == FFFTP_SUCCESS)
647647 DoUpLoad(AskTrnCtrlSkt(), TransPacketBase);
648648 // }
649649 }
@@ -659,7 +659,7 @@ static ULONG WINAPI TransferThread(void *Dummy)
659659 CwdSts = FTP_COMPLETE;
660660
661661 strcpy(Tmp, TransPacketBase->RemoteFile);
662- if(ProcForNonFullpath(Tmp, CurDir, hWndTrans, 1) == FAIL)
662+ if(ProcForNonFullpath(Tmp, CurDir, hWndTrans, 1) == FFFTP_FAIL)
663663 {
664664 ClearAll = YES;
665665 CwdSts = FTP_ERROR;
@@ -688,7 +688,7 @@ static ULONG WINAPI TransferThread(void *Dummy)
688688 DispTransFileInfo(TransPacketBase, MSGJPN079, FALSE, YES);
689689
690690 /* フルパスを使わないための処理 */
691- if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS)
691+ if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS)
692692 {
693693 Up = YES;
694694 CommandProcTrn(NULL, "%s%s", TransPacketBase->Cmd+2, TransPacketBase->RemoteFile);
@@ -706,7 +706,7 @@ static ULONG WINAPI TransferThread(void *Dummy)
706706 if((DelNotify == YES) || (DelNotify == YES_ALL))
707707 {
708708 /* フルパスを使わないための処理 */
709- if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS)
709+ if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS)
710710 {
711711 Up = YES;
712712 CommandProcTrn(NULL, "%s%s", TransPacketBase->Cmd+2, TransPacketBase->RemoteFile);
@@ -722,7 +722,7 @@ static ULONG WINAPI TransferThread(void *Dummy)
722722 if((DelNotify == YES) || (DelNotify == YES_ALL))
723723 {
724724 /* フルパスを使わないための処理 */
725- if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS)
725+ if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS)
726726 {
727727 Up = YES;
728728 CommandProcTrn(NULL, "%s%s", TransPacketBase->Cmd+2, TransPacketBase->RemoteFile);
@@ -872,7 +872,7 @@ static ULONG WINAPI TransferThread(void *Dummy)
872872 * char *Tmp : 作業用エリア
873873 *
874874 * Return Value
875-* int ステータス(SUCCESS/FAIL)
875+* int ステータス(FFFTP_SUCCESS/FFFTP_FAIL)
876876 *
877877 * Note
878878 * フルパスを使わない時は、
@@ -885,7 +885,7 @@ static int MakeNonFullPath(TRANSPACKET *Pkt, char *Cur, char *Tmp)
885885 int Sts;
886886
887887 Sts = ProcForNonFullpath(Pkt->RemoteFile, Cur, Pkt->hWndTrans, 1);
888- if(Sts == FAIL)
888+ if(Sts == FFFTP_FAIL)
889889 ClearAll = YES;
890890
891891 return(Sts);
@@ -990,7 +990,7 @@ static int DownLoadNonPassive(TRANSPACKET *Pkt, int *CancelCheckWork)
990990 iRetCode = command(Pkt->ctrl_skt, Reply, CancelCheckWork, "%s", Buf);
991991 if(iRetCode/100 == FTP_PRELIM)
992992 {
993- if(SocksGet2ndBindReply(listen_socket, &data_socket) == FAIL)
993+ if(SocksGet2ndBindReply(listen_socket, &data_socket) == FFFTP_FAIL)
994994 {
995995 iLength = sizeof(saSockAddr1);
996996 data_socket = do_accept(listen_socket, (struct sockaddr *)&saSockAddr1, (int *)&iLength);
@@ -1060,7 +1060,7 @@ static int DownLoadPassive(TRANSPACKET *Pkt, int *CancelCheckWork)
10601060 iRetCode = command(Pkt->ctrl_skt, Buf, CancelCheckWork, "PASV");
10611061 if(iRetCode/100 == FTP_COMPLETE)
10621062 {
1063- if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == SUCCESS)
1063+ if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == FFFTP_SUCCESS)
10641064 {
10651065 if((data_socket = connectsock(Adrs, Port, MSGJPN091, CancelCheckWork)) != INVALID_SOCKET)
10661066 {
@@ -1568,7 +1568,7 @@ static int DoUpLoad(SOCKET cSkt, TRANSPACKET *Pkt)
15681568
15691569 if(Pkt->Mode != EXIST_IGNORE)
15701570 {
1571- if(CheckFileReadable(Pkt->LocalFile) == SUCCESS)
1571+ if(CheckFileReadable(Pkt->LocalFile) == FFFTP_SUCCESS)
15721572 {
15731573 if(Pkt->Type == TYPE_I)
15741574 Pkt->KanjiCode = KANJI_NOCNV;
@@ -1649,7 +1649,7 @@ static int UpLoadNonPassive(TRANSPACKET *Pkt)
16491649 iRetCode = command(Pkt->ctrl_skt, Reply, &Canceled, "%s", Buf);
16501650 if((iRetCode/100) == FTP_PRELIM)
16511651 {
1652- if(SocksGet2ndBindReply(listen_socket, &data_socket) == FAIL)
1652+ if(SocksGet2ndBindReply(listen_socket, &data_socket) == FFFTP_FAIL)
16531653 {
16541654 iLength=sizeof(saSockAddr1);
16551655 data_socket = do_accept(listen_socket,(struct sockaddr *)&saSockAddr1, (int *)&iLength);
@@ -1716,7 +1716,7 @@ static int UpLoadPassive(TRANSPACKET *Pkt)
17161716 iRetCode = command(Pkt->ctrl_skt, Buf, &Canceled, "PASV");
17171717 if(iRetCode/100 == FTP_COMPLETE)
17181718 {
1719- if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == SUCCESS)
1719+ if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == FFFTP_SUCCESS)
17201720 {
17211721 if((data_socket = connectsock(Adrs, Port, MSGJPN109, &Canceled)) != INVALID_SOCKET)
17221722 {
@@ -1865,7 +1865,7 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
18651865 else
18661866 Continue = ConvSJIStoEUC(&cInfo);
18671867
1868- if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FAIL)
1868+ if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FFFTP_FAIL)
18691869 {
18701870 Pkt->Abort = ABORT_ERROR;
18711871 break;
@@ -1875,7 +1875,7 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
18751875 }
18761876 else
18771877 {
1878- if(TermCodeConvAndSend(&tInfo, dSkt, Buf, iNumBytes, Pkt->Type) == FAIL)
1878+ if(TermCodeConvAndSend(&tInfo, dSkt, Buf, iNumBytes, Pkt->Type) == FFFTP_FAIL)
18791879 Pkt->Abort = ABORT_ERROR;
18801880 }
18811881
@@ -1899,14 +1899,14 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
18991899 cInfo.BufSize = BUFSIZE+3;
19001900 FlushRestData(&cInfo);
19011901
1902- if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FAIL)
1902+ if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FFFTP_FAIL)
19031903 Pkt->Abort = ABORT_ERROR;
19041904 }
19051905
19061906 tInfo.Buf = Buf2;
19071907 tInfo.BufSize = BUFSIZE+3;
19081908 FlushRestTermCodeConvData(&tInfo);
1909- if(SendData(dSkt, Buf2, tInfo.OutLen, 0, &Canceled) == FAIL)
1909+ if(SendData(dSkt, Buf2, tInfo.OutLen, 0, &Canceled) == FFFTP_FAIL)
19101910 Pkt->Abort = ABORT_ERROR;
19111911 }
19121912
@@ -1969,7 +1969,7 @@ static int TermCodeConvAndSend(TERMCODECONVINFO *tInfo, SOCKET Skt, char *Data,
19691969 int Continue;
19701970 int Ret;
19711971
1972- Ret = SUCCESS;
1972+ Ret = FFFTP_SUCCESS;
19731973
19741974 // CR-LF以外の改行コードを変換しないモードはここへ追加
19751975 if(Ascii == TYPE_A)
@@ -1981,7 +1981,7 @@ static int TermCodeConvAndSend(TERMCODECONVINFO *tInfo, SOCKET Skt, char *Data,
19811981 do
19821982 {
19831983 Continue = ConvTermCodeToCRLF(tInfo);
1984- if((Ret = SendData(Skt, Buf3, tInfo->OutLen, 0, &Canceled)) == FAIL)
1984+ if((Ret = SendData(Skt, Buf3, tInfo->OutLen, 0, &Canceled)) == FFFTP_FAIL)
19851985 break;
19861986 }
19871987 while(Continue == YES);
@@ -2292,7 +2292,7 @@ static void DispTransFileInfo(TRANSPACKET *Pkt, char *Title, int SkipButton, int
22922292 *
22932293 * Return Value
22942294 * int ステータス
2295-* SUCCESS/FAIL
2295+* FFFTP_SUCCESS/FFFTP_FAIL
22962296 *----------------------------------------------------------------------------*/
22972297
22982298 static int GetAdrsAndPort(char *Str, char *Adrs, int *Port, int Max)
@@ -2301,7 +2301,7 @@ static int GetAdrsAndPort(char *Str, char *Adrs, int *Port, int Max)
23012301 char *Btm;
23022302 int Sts;
23032303
2304- Sts = FAIL;
2304+ Sts = FFFTP_FAIL;
23052305
23062306 Pos = strchr(Str, '(');
23072307 if(Pos != NULL)
@@ -2334,7 +2334,7 @@ static int GetAdrsAndPort(char *Str, char *Adrs, int *Port, int Max)
23342334 {
23352335 Btm++;
23362336 *Port = (atoi(Pos) * 0x100) + atoi(Btm);
2337- Sts = SUCCESS;
2337+ Sts = FFFTP_SUCCESS;
23382338 }
23392339 }
23402340 }
--- a/history.c
+++ b/history.c
@@ -389,7 +389,7 @@ static void RemoveAllHistoryFromMenu(void)
389389 *
390390 * Return Value
391391 * int ステータス
392-* SUCCESS/FAIL
392+* FFFTP_SUCCESS/FFFTP_FAIL
393393 *----------------------------------------------------------------------------*/
394394
395395 int GetHistoryByCmd(int MenuCmd, HISTORYDATA *Buf)
@@ -398,14 +398,14 @@ int GetHistoryByCmd(int MenuCmd, HISTORYDATA *Buf)
398398 int i;
399399 HISTORYDATA *Pos;
400400
401- Sts = FAIL;
401+ Sts = FFFTP_FAIL;
402402 Pos = HistoryBase;
403403 for(i = 0; i < HistoryNum; i++)
404404 {
405405 if(MenuHistId[i] == MenuCmd)
406406 {
407407 memcpy(Buf, Pos, sizeof(HISTORYDATA));
408- Sts = SUCCESS;
408+ Sts = FFFTP_SUCCESS;
409409 }
410410 Pos = Pos->Next;
411411 }
@@ -421,7 +421,7 @@ int GetHistoryByCmd(int MenuCmd, HISTORYDATA *Buf)
421421 *
422422 * Return Value
423423 * int ステータス
424-* SUCCESS/FAIL
424+* FFFTP_SUCCESS/FFFTP_FAIL
425425 *----------------------------------------------------------------------------*/
426426
427427 int GetHistoryByNum(int Num, HISTORYDATA *Buf)
--- a/hostman.c
+++ b/hostman.c
@@ -757,7 +757,7 @@ static int SetNodeLevelAll(void)
757757 Pos->Set.Level |= GetNodeLevelByData(Pos);
758758 Pos = GetNextNode(Pos);
759759 }
760- return(SUCCESS);
760+ return(FFFTP_SUCCESS);
761761 }
762762
763763
@@ -770,7 +770,7 @@ static int SetNodeLevelAll(void)
770770 *
771771 * Return Value
772772 * int ステータス
773-* SUCCESS/FAIL
773+* FFFTP_SUCCESS/FFFTP_FAIL
774774 *----------------------------------------------------------------------------*/
775775
776776 int AddHostToList(HOSTDATA *Set, int Pos, int Level)
@@ -780,7 +780,7 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level)
780780 HOSTLISTDATA *Last;
781781 int Cur;
782782
783- Sts = FAIL;
783+ Sts = FFFTP_FAIL;
784784 if((Pos >= -1) && (Pos <= Hosts))
785785 {
786786 if(Pos == -1)
@@ -838,7 +838,7 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level)
838838 }
839839 }
840840 Hosts++;
841- Sts = SUCCESS;
841+ Sts = FFFTP_SUCCESS;
842842 }
843843 }
844844 return(Sts);
@@ -853,7 +853,7 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level)
853853 *
854854 * Return Value
855855 * int ステータス
856-* SUCCESS/FAIL
856+* FFFTP_SUCCESS/FFFTP_FAIL
857857 *----------------------------------------------------------------------------*/
858858
859859 static int UpdateHostToList(int Num, HOSTDATA *Set)
@@ -861,12 +861,12 @@ static int UpdateHostToList(int Num, HOSTDATA *Set)
861861 int Sts;
862862 HOSTLISTDATA *Pos;
863863
864- Sts = FAIL;
864+ Sts = FFFTP_FAIL;
865865 if((Num >= 0) && (Num < Hosts))
866866 {
867867 Pos = GetNodeByNum(Num);
868868 memcpy(&Pos->Set, Set, sizeof(HOSTDATA));
869- Sts = SUCCESS;
869+ Sts = FFFTP_SUCCESS;
870870 }
871871 return(Sts);
872872 }
@@ -879,7 +879,7 @@ static int UpdateHostToList(int Num, HOSTDATA *Set)
879879 *
880880 * Return Value
881881 * int ステータス
882-* SUCCESS/FAIL
882+* FFFTP_SUCCESS/FFFTP_FAIL
883883 *----------------------------------------------------------------------------*/
884884
885885 static int DelHostFromList(int Num)
@@ -887,7 +887,7 @@ static int DelHostFromList(int Num)
887887 int Sts;
888888 HOSTLISTDATA *Pos;
889889
890- Sts = FAIL;
890+ Sts = FFFTP_FAIL;
891891 if((Num >= 0) && (Num < Hosts))
892892 {
893893 if(Num == 0)
@@ -912,7 +912,7 @@ static int DelHostFromList(int Num)
912912 }
913913 free(Pos);
914914 Hosts--;
915- Sts = SUCCESS;
915+ Sts = FFFTP_SUCCESS;
916916 }
917917 return(Sts);
918918 }
@@ -925,7 +925,7 @@ static int DelHostFromList(int Num)
925925 *
926926 * Return Value
927927 * int ステータス
928-* SUCCESS/FAIL
928+* FFFTP_SUCCESS/FFFTP_FAIL
929929 *
930930 * Note
931931 * Pos->Next, Pos->Childの全てのノードを削除する
@@ -945,7 +945,7 @@ static int DeleteChildAndNext(HOSTLISTDATA *Pos)
945945 Hosts--;
946946 Pos = Next;
947947 }
948- return(SUCCESS);
948+ return(FFFTP_SUCCESS);
949949 }
950950
951951
@@ -957,7 +957,7 @@ static int DeleteChildAndNext(HOSTLISTDATA *Pos)
957957 *
958958 * Return Value
959959 * int ステータス
960-* SUCCESS/FAIL
960+* FFFTP_SUCCESS/FFFTP_FAIL
961961 *
962962 * Note
963963 * 現在ホストに接続中の時は、CopyHostFromListInConnect() を使う事
@@ -968,12 +968,12 @@ int CopyHostFromList(int Num, HOSTDATA *Set)
968968 int Sts;
969969 HOSTLISTDATA *Pos;
970970
971- Sts = FAIL;
971+ Sts = FFFTP_FAIL;
972972 if((Num >= 0) && (Num < Hosts))
973973 {
974974 Pos = GetNodeByNum(Num);
975975 memcpy(Set, &Pos->Set, sizeof(HOSTDATA));
976- Sts = SUCCESS;
976+ Sts = FFFTP_SUCCESS;
977977 }
978978 return(Sts);
979979 }
@@ -987,7 +987,7 @@ int CopyHostFromList(int Num, HOSTDATA *Set)
987987 *
988988 * Return Value
989989 * int ステータス
990-* SUCCESS/FAIL
990+* FFFTP_SUCCESS/FFFTP_FAIL
991991 *
992992 * Note
993993 * 現在ホストに接続中の時に使う
@@ -998,7 +998,7 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set)
998998 int Sts;
999999 HOSTLISTDATA *Pos;
10001000
1001- Sts = FAIL;
1001+ Sts = FFFTP_FAIL;
10021002 if((Num >= 0) && (Num < Hosts))
10031003 {
10041004 Pos = GetNodeByNum(Num);
@@ -1015,7 +1015,7 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set)
10151015 Set->UseNLST_R = Pos->Set.UseNLST_R;
10161016 Set->LastDir = Pos->Set.LastDir;
10171017 Set->TimeZone = Pos->Set.TimeZone;
1018- Sts = SUCCESS;
1018+ Sts = FFFTP_SUCCESS;
10191019 }
10201020 return(Sts);
10211021 }
@@ -1030,7 +1030,7 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set)
10301030 *
10311031 * Return Value
10321032 * int ステータス
1033-* SUCCESS/FAIL
1033+* FFFTP_SUCCESS/FFFTP_FAIL
10341034 *----------------------------------------------------------------------------*/
10351035
10361036 int SetHostBookMark(int Num, char *Bmask, int Len)
@@ -1038,12 +1038,12 @@ int SetHostBookMark(int Num, char *Bmask, int Len)
10381038 int Sts;
10391039 HOSTLISTDATA *Pos;
10401040
1041- Sts = FAIL;
1041+ Sts = FFFTP_FAIL;
10421042 if((Num >= 0) && (Num < Hosts))
10431043 {
10441044 Pos = GetNodeByNum(Num);
10451045 memcpy(Pos->Set.BookMark, Bmask, Len);
1046- Sts = SUCCESS;
1046+ Sts = FFFTP_SUCCESS;
10471047 }
10481048 return(Sts);
10491049 }
@@ -1082,7 +1082,7 @@ char *AskHostBookMark(int Num)
10821082 *
10831083 * Return Value
10841084 * int ステータス
1085-* SUCCESS/FAIL
1085+* FFFTP_SUCCESS/FFFTP_FAIL
10861086 *----------------------------------------------------------------------------*/
10871087
10881088 int SetHostDir(int Num, char *LocDir, char *HostDir)
@@ -1090,13 +1090,13 @@ int SetHostDir(int Num, char *LocDir, char *HostDir)
10901090 int Sts;
10911091 HOSTLISTDATA *Pos;
10921092
1093- Sts = FAIL;
1093+ Sts = FFFTP_FAIL;
10941094 if((Num >= 0) && (Num < Hosts))
10951095 {
10961096 Pos = GetNodeByNum(Num);
10971097 strcpy(Pos->Set.LocalInitDir, LocDir);
10981098 strcpy(Pos->Set.RemoteInitDir, HostDir);
1099- Sts = SUCCESS;
1099+ Sts = FFFTP_SUCCESS;
11001100 }
11011101 return(Sts);
11021102 }
@@ -1110,7 +1110,7 @@ int SetHostDir(int Num, char *LocDir, char *HostDir)
11101110 *
11111111 * Return Value
11121112 * int ステータス
1113-* SUCCESS/FAIL
1113+* FFFTP_SUCCESS/FFFTP_FAIL
11141114 *----------------------------------------------------------------------------*/
11151115
11161116 int SetHostPassword(int Num, char *Pass)
@@ -1118,12 +1118,12 @@ int SetHostPassword(int Num, char *Pass)
11181118 int Sts;
11191119 HOSTLISTDATA *Pos;
11201120
1121- Sts = FAIL;
1121+ Sts = FFFTP_FAIL;
11221122 if((Num >= 0) && (Num < Hosts))
11231123 {
11241124 Pos = GetNodeByNum(Num);
11251125 strcpy(Pos->Set.PassWord, Pass);
1126- Sts = SUCCESS;
1126+ Sts = FFFTP_SUCCESS;
11271127 }
11281128 return(Sts);
11291129 }
@@ -1171,7 +1171,7 @@ int SearchHostName(char *Name)
11711171 *
11721172 * Return Value
11731173 * int ステータス
1174-* SUCCESS/FAIL
1174+* FFFTP_SUCCESS/FFFTP_FAIL
11751175 *----------------------------------------------------------------------------*/
11761176
11771177 int SetHostSort(int Num, int LFSort, int LDSort, int RFSort, int RDSort)
@@ -1179,12 +1179,12 @@ int SetHostSort(int Num, int LFSort, int LDSort, int RFSort, int RDSort)
11791179 int Sts;
11801180 HOSTLISTDATA *Pos;
11811181
1182- Sts = FAIL;
1182+ Sts = FFFTP_FAIL;
11831183 if((Num >= 0) && (Num < Hosts))
11841184 {
11851185 Pos = GetNodeByNum(Num);
11861186 Pos->Set.Sort = LFSort * 0x1000000 | LDSort * 0x10000 | RFSort * 0x100 | RDSort;
1187- Sts = SUCCESS;
1187+ Sts = FFFTP_SUCCESS;
11881188 }
11891189 return(Sts);
11901190 }
--- a/local.c
+++ b/local.c
@@ -47,19 +47,19 @@
4747 *
4848 * Return Value
4949 * int ステータス
50-* SUCCESS/FAIL
50+* FFFTP_SUCCESS/FFFTP_FAIL
5151 *----------------------------------------------------------------------------*/
5252
5353 int DoLocalCWD(char *Path)
5454 {
5555 int Sts;
5656
57- Sts = SUCCESS;
57+ Sts = FFFTP_SUCCESS;
5858 SetTaskMsg(">>CD %s", Path);
5959 if(SetCurrentDirectory(Path) != TRUE)
6060 {
6161 SetTaskMsg(MSGJPN145);
62- Sts = FAIL;
62+ Sts = FFFTP_FAIL;
6363 }
6464 return(Sts);
6565 }
--- a/lvtips.c
+++ b/lvtips.c
@@ -61,7 +61,7 @@ static HWND hWndTips; /* tipsのウインドウハンドル */
6161 *
6262 * Return Value
6363 * int ステータス
64-* SUCCESS/FAIL
64+* FFFTP_SUCCESS/FFFTP_FAIL
6565 *----------------------------------------------------------------------------*/
6666
6767 int InitListViewTips(HWND hWnd, HINSTANCE hInst)
@@ -69,7 +69,7 @@ int InitListViewTips(HWND hWnd, HINSTANCE hInst)
6969 WNDCLASSEX wClass;
7070 int Ret;
7171
72- Ret = FAIL;
72+ Ret = FFFTP_FAIL;
7373
7474 wClass.cbSize = sizeof(WNDCLASSEX);
7575 wClass.style = 0;
@@ -92,7 +92,7 @@ int InitListViewTips(HWND hWnd, HINSTANCE hInst)
9292 hWnd, NULL, hInst, NULL);
9393
9494 if(hWndTips != NULL)
95- Ret = SUCCESS;
95+ Ret = FFFTP_SUCCESS;
9696
9797 return(Ret);
9898 }
--- a/main.c
+++ b/main.c
@@ -235,7 +235,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
235235 Ret = FALSE;
236236 hWndFtp = NULL;
237237 hInstFtp = hInstance;
238- if(InitApp(lpszCmdLine, cmdShow) == SUCCESS)
238+ if(InitApp(lpszCmdLine, cmdShow) == FFFTP_SUCCESS)
239239 {
240240 for(;;)
241241 {
@@ -276,7 +276,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
276276 *
277277 * Return Value
278278 * int ステータス
279-* SUCCESS/FAIL
279+* FFFTP_SUCCESS/FFFTP_FAIL
280280 *----------------------------------------------------------------------------*/
281281
282282 static int InitApp(LPSTR lpszCmdLine, int cmdShow)
@@ -288,7 +288,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
288288 int useDefautPassword = 0; /* 警告文表示用 */
289289 int masterpass;
290290
291- sts = FAIL;
291+ sts = FFFTP_FAIL;
292292
293293 aes_init();
294294 srand(GetTickCount());
@@ -381,7 +381,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
381381
382382 CountPrevFfftpWindows();
383383
384- if(MakeAllWindows(cmdShow) == SUCCESS)
384+ if(MakeAllWindows(cmdShow) == FFFTP_SUCCESS)
385385 {
386386 hWndCurFocus = GetLocalHwnd();
387387
@@ -401,7 +401,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
401401 if(CacheSave == YES)
402402 LoadCache();
403403
404- if(MakeTransferThread() == SUCCESS)
404+ if(MakeTransferThread() == FFFTP_SUCCESS)
405405 {
406406 DoPrintf("DEBUG MESSAGE ON ! ##");
407407
@@ -430,7 +430,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
430430 DispTransferFiles();
431431
432432 StartupProc(lpszCmdLine);
433- sts = SUCCESS;
433+ sts = FFFTP_SUCCESS;
434434
435435 /* セキュリティ警告文の表示 */
436436 if( useDefautPassword ){
@@ -453,7 +453,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
453453 }
454454 }
455455
456- if(sts == FAIL)
456+ if(sts == FFFTP_FAIL)
457457 DeleteAllObject();
458458
459459 return(sts);
@@ -467,7 +467,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow)
467467 *
468468 * Return Value
469469 * int ステータス
470-* SUCCESS/FAIL
470+* FFFTP_SUCCESS/FFFTP_FAIL
471471 *----------------------------------------------------------------------------*/
472472
473473 static int MakeAllWindows(int cmdShow)
@@ -552,19 +552,19 @@ static int MakeAllWindows(int cmdShow)
552552 StsLvtips = InitListViewTips(hWndFtp, hInstFtp);
553553 }
554554
555- Sts = SUCCESS;
555+ Sts = FFFTP_SUCCESS;
556556 if((hWndFtp == NULL) ||
557- (StsTbar == FAIL) ||
558- (StsList == FAIL) ||
559- (StsSbar == FAIL) ||
560- (StsTask == FAIL) ||
561- (StsLvtips == FAIL) ||
562- (StsSocket == FAIL))
557+ (StsTbar == FFFTP_FAIL) ||
558+ (StsList == FFFTP_FAIL) ||
559+ (StsSbar == FFFTP_FAIL) ||
560+ (StsTask == FFFTP_FAIL) ||
561+ (StsLvtips == FFFTP_FAIL) ||
562+ (StsSocket == FFFTP_FAIL))
563563 {
564- Sts = FAIL;
564+ Sts = FFFTP_FAIL;
565565 }
566566
567- if(Sts == SUCCESS)
567+ if(Sts == FFFTP_SUCCESS)
568568 SetListViewType();
569569
570570 return(Sts);
@@ -1034,7 +1034,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
10341034 case MENU_REFRESH :
10351035 SuppressRefresh = 1;
10361036 GetLocalDirForWnd();
1037- if(CheckClosedAndReconnect() == SUCCESS)
1037+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
10381038 GetRemoteDirForWnd(CACHE_REFRESH, &CancelFlg);
10391039 SuppressRefresh = 0;
10401040 break;
@@ -1057,7 +1057,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
10571057
10581058 case REFRESH_REMOTE :
10591059 SuppressRefresh = 1;
1060- if(CheckClosedAndReconnect() == SUCCESS)
1060+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
10611061 GetRemoteDirForWnd(CACHE_REFRESH, &CancelFlg);
10621062 SuppressRefresh = 0;
10631063 break;
@@ -1842,7 +1842,7 @@ void DoubleClickProc(int Win, int Mode, int App)
18421842 else
18431843 ChangeDir(WIN_LOCAL, Tmp);
18441844 }
1845- else if(CheckClosedAndReconnect() == SUCCESS)
1845+ else if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
18461846 {
18471847 if((App != -1) || (Type == NODE_FILE))
18481848 {
@@ -1967,13 +1967,13 @@ static void ChangeDir(int Win, char *Path)
19671967
19681968 if((Win == WIN_LOCAL) || (Sync == YES))
19691969 {
1970- if(DoLocalCWD(Path) == SUCCESS)
1970+ if(DoLocalCWD(Path) == FFFTP_SUCCESS)
19711971 GetLocalDirForWnd();
19721972 }
19731973
19741974 if((Win == WIN_REMOTE) || (Sync == YES))
19751975 {
1976- if(CheckClosedAndReconnect() == SUCCESS)
1976+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
19771977 {
19781978 #if defined(HAVE_OPENVMS)
19791979 /* OpenVMSの場合、".DIR;?"を取る */
--- a/misc.c
+++ b/misc.c
@@ -500,7 +500,7 @@ char *GetNextField(char *Str)
500500 *
501501 * Return Value
502502 * int ステータス
503-* SUCCESS/FAIL=長さが長すぎる
503+* FFFTP_SUCCESS/FFFTP_FAIL=長さが長すぎる
504504 *----------------------------------------------------------------------------*/
505505
506506 int GetOneField(char *Str, char *Buf, int Max)
@@ -508,13 +508,13 @@ int GetOneField(char *Str, char *Buf, int Max)
508508 int Sts;
509509 char *Pos;
510510
511- Sts = FAIL;
511+ Sts = FFFTP_FAIL;
512512 if((Pos = strchr(Str, ' ')) == NULL)
513513 {
514514 if((int)strlen(Str) <= Max)
515515 {
516516 strcpy(Buf, Str);
517- Sts = SUCCESS;
517+ Sts = FFFTP_SUCCESS;
518518 }
519519 }
520520 else
@@ -523,7 +523,7 @@ int GetOneField(char *Str, char *Buf, int Max)
523523 {
524524 strncpy(Buf, Str, Pos - Str);
525525 *(Buf + (Pos - Str)) = NUL;
526- Sts = SUCCESS;
526+ Sts = FFFTP_SUCCESS;
527527 }
528528 }
529529 return(Sts);
@@ -942,7 +942,7 @@ int hex2bin(char Ch)
942942 *
943943 * Return Value
944944 * int ステータス
945-* SUCCESS/FAIL
945+* FFFTP_SUCCESS/FFFTP_FAIL
946946 *
947947 * "\"は全て"/"に置き換える
948948 *----------------------------------------------------------------------------*/
@@ -1011,9 +1011,9 @@ int SplitUNCpath(char *unc, char *Host, char *Path, char *File, char *User, char
10111011 strncpy(Host, Pos1, HOST_ADRS_LEN);
10121012 }
10131013
1014- Sts = FAIL;
1014+ Sts = FFFTP_FAIL;
10151015 if(strlen(Host) > 0)
1016- Sts = SUCCESS;
1016+ Sts = FFFTP_SUCCESS;
10171017
10181018 return(Sts);
10191019 }
@@ -1479,7 +1479,7 @@ int xtoi(char *Str)
14791479 *
14801480 * Return Value
14811481 * int ステータス
1482-* SUCCESS/FAIL
1482+* FFFTP_SUCCESS/FFFTP_FAIL
14831483 *----------------------------------------------------------------------------*/
14841484
14851485 int CheckFileReadable(char *Fname)
@@ -1488,7 +1488,7 @@ int CheckFileReadable(char *Fname)
14881488 HANDLE iFileHandle;
14891489 SECURITY_ATTRIBUTES Sec;
14901490
1491- Sts = FAIL;
1491+ Sts = FFFTP_FAIL;
14921492
14931493 Sec.nLength = sizeof(SECURITY_ATTRIBUTES);
14941494 Sec.lpSecurityDescriptor = NULL;
@@ -1497,7 +1497,7 @@ int CheckFileReadable(char *Fname)
14971497 if((iFileHandle = CreateFile(Fname, GENERIC_READ,
14981498 FILE_SHARE_READ|FILE_SHARE_WRITE, &Sec, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE)
14991499 {
1500- Sts = SUCCESS;
1500+ Sts = FFFTP_SUCCESS;
15011501 CloseHandle(iFileHandle);
15021502 }
15031503 return(Sts);
--- a/ras.c
+++ b/ras.c
@@ -268,7 +268,7 @@ static DWORD RasHangUpWait(HRASCONN hRasConn)
268268 * int Num : 個数
269269 *
270270 * Return Value
271-* int ステータス (SUCCESS/FAIL)
271+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
272272 *----------------------------------------------------------------------------*/
273273
274274 static int DoDisconnect(RASCONN *RasConn, int Num)
@@ -276,14 +276,14 @@ static int DoDisconnect(RASCONN *RasConn, int Num)
276276 int i;
277277 int Sts;
278278
279- Sts = SUCCESS;
279+ Sts = FFFTP_SUCCESS;
280280 if(Num > 0)
281281 {
282282 SetTaskMsg(MSGJPN220);
283283 for(i = 0; i < Num; i++)
284284 {
285285 if(RasHangUpWait(RasConn[i].hrasconn) != 0)
286- Sts = FAIL;
286+ Sts = FFFTP_FAIL;
287287 }
288288 }
289289 return(Sts);
@@ -383,7 +383,7 @@ int SetRasEntryToComboBox(HWND hDlg, int Item, char *CurName)
383383 * char *Name : 接続先
384384 *
385385 * Return Value
386-* int ステータス (SUCCESS/FAIL)
386+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
387387 *----------------------------------------------------------------------------*/
388388
389389 int ConnectRas(int Dialup, int UseThis, int Notify, char *Name)
@@ -398,7 +398,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name)
398398 BOOL Flg;
399399 OSVERSIONINFO VerInfo;
400400
401- Sts = SUCCESS;
401+ Sts = FFFTP_SUCCESS;
402402 if(Dialup == YES)
403403 {
404404 if(m_hDll != NULL)
@@ -438,7 +438,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name)
438438 {
439439 /* 接続する */
440440 SetTaskMsg(MSGJPN221);
441- Sts = FAIL;
441+ Sts = FFFTP_FAIL;
442442
443443 Num = 0;
444444 VerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
@@ -460,7 +460,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name)
460460 DlgParam.reserved = 0;
461461 DlgParam.reserved2 = 0;
462462 if((*m_RasDialDlg)(NULL, Name, NULL, &DlgParam) != 0)
463- Sts = SUCCESS;
463+ Sts = FFFTP_SUCCESS;
464464 }
465465 else
466466 SetTaskMsg(MSGJPN222);
@@ -478,7 +478,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name)
478478 (DialogBoxParam(GetFtpInst(), MAKEINTRESOURCE(dial_password_dlg), GetMainHwnd(), (DLGPROC)DialPassCallBackProc, (LPARAM)&Param) == YES))
479479 {
480480 if(DialogBoxParam(GetFtpInst(), MAKEINTRESOURCE(dial_dlg), GetMainHwnd(), (DLGPROC)DialCallBackProc, (LPARAM)&Param) == YES)
481- Sts = SUCCESS;
481+ Sts = FFFTP_SUCCESS;
482482 }
483483 }
484484 }
--- a/registory.c
+++ b/registory.c
@@ -235,7 +235,7 @@ int ValidateMasterPassword(void)
235235 int i;
236236
237237 SetRegType(REGTYPE_INI);
238- if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS)
238+ if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS)
239239 {
240240 if(AskForceIni() == NO)
241241 {
@@ -243,14 +243,14 @@ int ValidateMasterPassword(void)
243243 i = OpenReg("FFFTP", &hKey3);
244244 }
245245 }
246- if(i == SUCCESS){
246+ if(i == FFFTP_SUCCESS){
247247 char checkbuf[48];
248248 int salt = 0;
249249
250250 if( ReadIntValueFromReg(hKey3, "CredentialSalt", &salt)){
251251 SetHashSalt( salt );
252252 }
253- if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == SUCCESS ){
253+ if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == FFFTP_SUCCESS ){
254254 switch( CheckPasswordValidity( SecretKey, SecretKeyLength, checkbuf ) ){
255255 case 0: /* not match */
256256 IsMasterPasswordError = PASSWORD_UNMATCH;
@@ -298,7 +298,7 @@ void SaveRegistory(void)
298298 }
299299
300300 SetRegType(RegType);
301- if(CreateReg("FFFTP", &hKey3) == SUCCESS)
301+ if(CreateReg("FFFTP", &hKey3) == FFFTP_SUCCESS)
302302 {
303303 char buf[48];
304304 int salt = GetTickCount();
@@ -311,7 +311,7 @@ void SaveRegistory(void)
311311 CreatePasswordHash( SecretKey, SecretKeyLength, buf );
312312 WriteStringToReg(hKey3, "CredentialCheck", buf);
313313
314- if(CreateSubKey(hKey3, "Options", &hKey4) == SUCCESS)
314+ if(CreateSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS)
315315 {
316316 WriteIntValueToReg(hKey4, "NoSave", SuppressSave);
317317
@@ -427,10 +427,10 @@ void SaveRegistory(void)
427427 n = 0;
428428 for(i = AskHistoryNum(); i > 0; i--)
429429 {
430- if(GetHistoryByNum(i-1, &Hist) == SUCCESS)
430+ if(GetHistoryByNum(i-1, &Hist) == FFFTP_SUCCESS)
431431 {
432432 sprintf(Str, "History%d", n);
433- if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS)
433+ if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
434434 {
435435 SaveStr(hKey5, "HostAdrs", Hist.HostAdrs, DefaultHist.HostAdrs);
436436 SaveStr(hKey5, "UserName", Hist.UserName, DefaultHist.UserName);
@@ -474,17 +474,17 @@ void SaveRegistory(void)
474474 for(; n < 999; n++)
475475 {
476476 sprintf(Str, "History%d", n);
477- if(DeleteSubKey(hKey4, Str) != SUCCESS)
477+ if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS)
478478 break;
479479 }
480480
481481 /* ホストの設定を保存 */
482482 CopyDefaultHost(&DefaultHost);
483483 i = 0;
484- while(CopyHostFromList(i, &Host) == SUCCESS)
484+ while(CopyHostFromList(i, &Host) == FFFTP_SUCCESS)
485485 {
486486 sprintf(Str, "Host%d", i);
487- if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS)
487+ if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
488488 {
489489 // SaveIntNum(hKey5, "Set", Host.Level, DefaultHost.Level);
490490 WriteIntValueToReg(hKey5, "Set", Host.Level);
@@ -541,7 +541,7 @@ void SaveRegistory(void)
541541 for(; i < 998; i++)
542542 {
543543 sprintf(Str, "Host%d", i);
544- if(DeleteSubKey(hKey4, Str) != SUCCESS)
544+ if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS)
545545 break;
546546 }
547547
@@ -586,7 +586,7 @@ int LoadRegistory(void)
586586 Sts = NO;
587587
588588 SetRegType(REGTYPE_INI);
589- if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS)
589+ if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS)
590590 {
591591 if(AskForceIni() == NO)
592592 {
@@ -595,15 +595,15 @@ int LoadRegistory(void)
595595 }
596596 }
597597
598- if(i == SUCCESS)
598+ if(i == FFFTP_SUCCESS)
599599 {
600- char checkbuf[48];
600+ /* char checkbuf[48]; */
601601 int salt = 0;
602602 Sts = YES;
603603
604604 ReadIntValueFromReg(hKey3, "Version", &Version);
605605
606- if(OpenSubKey(hKey3, "Options", &hKey4) == SUCCESS)
606+ if(OpenSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS)
607607 {
608608 ReadIntValueFromReg(hKey4, "WinPosX", &WinPosX);
609609 ReadIntValueFromReg(hKey4, "WinPosY", &WinPosY);
@@ -662,7 +662,7 @@ int LoadRegistory(void)
662662 ReadIntValueFromReg(hKey4, "RegExp", &FindMode);
663663 ReadIntValueFromReg(hKey4, "Reg", &RegType);
664664
665- if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FAIL)
665+ if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FFFTP_FAIL)
666666 {
667667 /* 旧ASCIIモードの拡張子の設定を新しいものに変換 */
668668 ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1);
@@ -694,9 +694,9 @@ int LoadRegistory(void)
694694 ReadIntValueFromReg(hKey4, "MirUNot", &MirUpDelNotify);
695695 ReadIntValueFromReg(hKey4, "MirDNot", &MirDownDelNotify);
696696
697- if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == SUCCESS)
697+ if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == FFFTP_SUCCESS)
698698 {
699- if(RestoreFontData(Str, &ListLogFont) == SUCCESS)
699+ if(RestoreFontData(Str, &ListLogFont) == FFFTP_SUCCESS)
700700 ListFont = CreateFontIndirect(&ListLogFont);
701701 }
702702 ReadIntValueFromReg(hKey4, "ListHide", &DispIgnoreHide);
@@ -745,7 +745,7 @@ int LoadRegistory(void)
745745 for(i = 0; i < Sets; i++)
746746 {
747747 sprintf(Str, "History%d", i);
748- if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS)
748+ if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
749749 {
750750 CopyDefaultHistory(&Hist);
751751
@@ -793,7 +793,7 @@ int LoadRegistory(void)
793793 for(i = 0; i < Sets; i++)
794794 {
795795 sprintf(Str, "Host%d", i);
796- if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS)
796+ if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS)
797797 {
798798 CopyDefaultHost(&Host);
799799 /* 下位互換性のため */
@@ -1156,7 +1156,7 @@ static void MakeFontData(LOGFONT Font, HFONT hFont, char *Buf)
11561156 *
11571157 * Return Value
11581158 * int ステータス
1159-* SUCCESS/FAIL=変換できない
1159+* FFFTP_SUCCESS/FFFTP_FAIL=変換できない
11601160 *----------------------------------------------------------------------------*/
11611161
11621162 static int RestoreFontData(char *Str, LOGFONT *Font)
@@ -1164,7 +1164,7 @@ static int RestoreFontData(char *Str, LOGFONT *Font)
11641164 int i;
11651165 int Sts;
11661166
1167- Sts = FAIL;
1167+ Sts = FFFTP_FAIL;
11681168 if(sscanf(Str, "%d %d %d %d %d %d %d %d %d %d %d %d %d",
11691169 &(Font->lfHeight), &(Font->lfWidth), &(Font->lfEscapement), &(Font->lfOrientation),
11701170 &(Font->lfWeight), &(Font->lfItalic), &(Font->lfUnderline), &(Font->lfStrikeOut),
@@ -1180,11 +1180,11 @@ static int RestoreFontData(char *Str, LOGFONT *Font)
11801180 if(i == 0)
11811181 {
11821182 strcpy(Font->lfFaceName, Str);
1183- Sts = SUCCESS;
1183+ Sts = FFFTP_SUCCESS;
11841184 }
11851185 }
11861186
1187- if(Sts == FAIL)
1187+ if(Sts == FFFTP_FAIL)
11881188 memset(Font, NUL, sizeof(LOGFONT));
11891189
11901190 return(Sts);
@@ -1390,7 +1390,7 @@ static void EncodePassword3(char *Str, char *Buf, const char *Key)
13901390 }
13911391 *Put++ = ':';
13921392
1393- if(CreateAesKey(AesKey, Key) == SUCCESS)
1393+ if(CreateAesKey(AesKey, Key) == FFFTP_SUCCESS)
13941394 {
13951395 aes_encrypt_key(AesKey, 32, &Ctx);
13961396
@@ -1578,7 +1578,7 @@ static void DecodePassword3(char *Str, char *Buf, const char *Key)
15781578
15791579 if(*Get++ == ':')
15801580 {
1581- if(CreateAesKey(AesKey, Key) == SUCCESS)
1581+ if(CreateAesKey(AesKey, Key) == FFFTP_SUCCESS)
15821582 {
15831583 aes_decrypt_key(AesKey, 32, &Ctx);
15841584
@@ -1606,7 +1606,7 @@ static void DecodePassword3(char *Str, char *Buf, const char *Key)
16061606 * const char *Key : 暗号化キー
16071607 *
16081608 * Return Value
1609-* int ステータス (SUCCESS/FAIL)
1609+* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL)
16101610 * Note
16111611 * SHA-1をもちいて32Byte鍵を生成する
16121612 *----------------------------------------------------------------------------*/
@@ -1622,7 +1622,7 @@ static int CreateAesKey(unsigned char *AesKey, const char* Key)
16221622
16231623 HashKeyLen = strlen(Key) + 16;
16241624 if((HashKey = malloc(HashKeyLen + 1)) == NULL){
1625- return (FAIL);
1625+ return (FFFTP_FAIL);
16261626 }
16271627
16281628 strcpy(HashKey, Key);
@@ -1643,7 +1643,7 @@ static int CreateAesKey(unsigned char *AesKey, const char* Key)
16431643 }
16441644 free(HashKey);
16451645
1646- return (SUCCESS);
1646+ return (FFFTP_SUCCESS);
16471647 }
16481648
16491649
@@ -1682,7 +1682,7 @@ static int TmpRegType;
16821682 *
16831683 * Return Value
16841684 * int ステータス
1685-* SUCCESS/FAIL
1685+* FFFTP_SUCCESS/FFFTP_FAIL
16861686 *----------------------------------------------------------------------------*/
16871687
16881688 static void SetRegType(int Type)
@@ -1700,7 +1700,7 @@ static void SetRegType(int Type)
17001700 *
17011701 * Return Value
17021702 * int ステータス
1703-* SUCCESS/FAIL
1703+* FFFTP_SUCCESS/FFFTP_FAIL
17041704 *----------------------------------------------------------------------------*/
17051705
17061706 static int OpenReg(char *Name, void **Handle)
@@ -1708,17 +1708,17 @@ static int OpenReg(char *Name, void **Handle)
17081708 int Sts;
17091709 char Tmp[FMAX_PATH+1];
17101710
1711- Sts = FAIL;
1711+ Sts = FFFTP_FAIL;
17121712 if(TmpRegType == REGTYPE_REG)
17131713 {
17141714 strcpy(Tmp, "Software\\Sota\\");
17151715 strcat(Tmp, Name);
17161716 if(RegOpenKeyEx(HKEY_CURRENT_USER, Tmp, 0, KEY_READ, (HKEY *)Handle) == ERROR_SUCCESS)
1717- Sts = SUCCESS;
1717+ Sts = FFFTP_SUCCESS;
17181718 }
17191719 else
17201720 {
1721- if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == SUCCESS)
1721+ if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == FFFTP_SUCCESS)
17221722 ((REGDATATBL *)(*Handle))->Mode = 0;
17231723 }
17241724 return(Sts);
@@ -1733,7 +1733,7 @@ static int OpenReg(char *Name, void **Handle)
17331733 *
17341734 * Return Value
17351735 * int ステータス
1736-* SUCCESS/FAIL
1736+* FFFTP_SUCCESS/FFFTP_FAIL
17371737 *----------------------------------------------------------------------------*/
17381738
17391739 static int CreateReg(char *Name, void **Handle)
@@ -1742,13 +1742,13 @@ static int CreateReg(char *Name, void **Handle)
17421742 char Tmp[FMAX_PATH+1];
17431743 DWORD Dispos;
17441744
1745- Sts = FAIL;
1745+ Sts = FFFTP_FAIL;
17461746 if(TmpRegType == REGTYPE_REG)
17471747 {
17481748 strcpy(Tmp, "Software\\Sota\\");
17491749 strcat(Tmp, Name);
17501750 if(RegCreateKeyEx(HKEY_CURRENT_USER, Tmp, 0, "", REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY | KEY_SET_VALUE, NULL, (HKEY *)Handle, &Dispos) == ERROR_SUCCESS)
1751- Sts = SUCCESS;
1751+ Sts = FFFTP_SUCCESS;
17521752 }
17531753 else
17541754 {
@@ -1758,7 +1758,7 @@ static int CreateReg(char *Name, void **Handle)
17581758 ((REGDATATBL *)(*Handle))->ValLen = 0;
17591759 ((REGDATATBL *)(*Handle))->Next = NULL;
17601760 ((REGDATATBL *)(*Handle))->Mode = 1;
1761- Sts = SUCCESS;
1761+ Sts = FFFTP_SUCCESS;
17621762 }
17631763 }
17641764 return(Sts);
@@ -1772,7 +1772,7 @@ static int CreateReg(char *Name, void **Handle)
17721772 *
17731773 * Return Value
17741774 * int ステータス
1775-* SUCCESS/FAIL
1775+* FFFTP_SUCCESS/FFFTP_FAIL
17761776 *----------------------------------------------------------------------------*/
17771777
17781778 static int CloseReg(void *Handle)
@@ -1811,7 +1811,7 @@ static int CloseReg(void *Handle)
18111811 Pos = Next;
18121812 }
18131813 }
1814- return(SUCCESS);
1814+ return(FFFTP_SUCCESS);
18151815 }
18161816
18171817
@@ -1864,7 +1864,7 @@ static BOOL WriteOutRegToFile(REGDATATBL *Pos)
18641864 *
18651865 * Return Value
18661866 * int ステータス
1867-* SUCCESS/FAIL
1867+* FFFTP_SUCCESS/FFFTP_FAIL
18681868 *----------------------------------------------------------------------------*/
18691869
18701870 static int ReadInReg(char *Name, REGDATATBL **Handle)
@@ -1877,7 +1877,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle)
18771877 REGDATATBL *Pos;
18781878 int Sts;
18791879
1880- Sts = FAIL;
1880+ Sts = FFFTP_FAIL;
18811881 *Handle = NULL;
18821882
18831883 if((Strm = fopen(AskIniFilePath(), "rt")) != NULL)
@@ -1920,7 +1920,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle)
19201920 }
19211921 }
19221922 }
1923- Sts = SUCCESS;
1923+ Sts = FFFTP_SUCCESS;
19241924 free(Buf);
19251925 }
19261926 fclose(Strm);
@@ -1938,7 +1938,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle)
19381938 *
19391939 * Return Value
19401940 * int ステータス
1941-* SUCCESS/FAIL
1941+* FFFTP_SUCCESS/FFFTP_FAIL
19421942 *----------------------------------------------------------------------------*/
19431943
19441944 static int OpenSubKey(void *Parent, char *Name, void **Handle)
@@ -1947,11 +1947,11 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle)
19471947 char Key[80];
19481948 REGDATATBL *Pos;
19491949
1950- Sts = FAIL;
1950+ Sts = FFFTP_FAIL;
19511951 if(TmpRegType == REGTYPE_REG)
19521952 {
19531953 if(RegOpenKeyEx(Parent, Name, 0, KEY_READ, (HKEY *)Handle) == ERROR_SUCCESS)
1954- Sts = SUCCESS;
1954+ Sts = FFFTP_SUCCESS;
19551955 }
19561956 else
19571957 {
@@ -1964,7 +1964,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle)
19641964 if(strcmp(Pos->KeyName, Key) == 0)
19651965 {
19661966 *Handle = Pos;
1967- Sts = SUCCESS;
1967+ Sts = FFFTP_SUCCESS;
19681968 break;
19691969 }
19701970 Pos = Pos->Next;
@@ -1983,7 +1983,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle)
19831983 *
19841984 * Return Value
19851985 * int ステータス
1986-* SUCCESS/FAIL
1986+* FFFTP_SUCCESS/FFFTP_FAIL
19871987 *----------------------------------------------------------------------------*/
19881988
19891989 static int CreateSubKey(void *Parent, char *Name, void **Handle)
@@ -1992,11 +1992,11 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle)
19921992 DWORD Dispos;
19931993 REGDATATBL *Pos;
19941994
1995- Sts = FAIL;
1995+ Sts = FFFTP_FAIL;
19961996 if(TmpRegType == REGTYPE_REG)
19971997 {
19981998 if(RegCreateKeyEx(Parent, Name, 0, "", REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, (HKEY *)Handle, &Dispos) == ERROR_SUCCESS)
1999- Sts = SUCCESS;
1999+ Sts = FFFTP_SUCCESS;
20002000 }
20012001 else
20022002 {
@@ -2013,7 +2013,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle)
20132013 while(Pos->Next != NULL)
20142014 Pos = Pos->Next;
20152015 Pos->Next = *Handle;
2016- Sts = SUCCESS;
2016+ Sts = FFFTP_SUCCESS;
20172017 }
20182018 }
20192019 return(Sts);
@@ -2027,7 +2027,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle)
20272027 *
20282028 * Return Value
20292029 * int ステータス
2030-* SUCCESS/FAIL
2030+* FFFTP_SUCCESS/FFFTP_FAIL
20312031 *----------------------------------------------------------------------------*/
20322032
20332033 static int CloseSubKey(void *Handle)
@@ -2038,7 +2038,7 @@ static int CloseSubKey(void *Handle)
20382038 {
20392039 /* Nothing */
20402040 }
2041- return(SUCCESS);
2041+ return(FFFTP_SUCCESS);
20422042 }
20432043
20442044
@@ -2050,22 +2050,22 @@ static int CloseSubKey(void *Handle)
20502050 *
20512051 * Return Value
20522052 * int ステータス
2053-* SUCCESS/FAIL
2053+* FFFTP_SUCCESS/FFFTP_FAIL
20542054 *----------------------------------------------------------------------------*/
20552055
20562056 static int DeleteSubKey(void *Handle, char *Name)
20572057 {
20582058 int Sts;
20592059
2060- Sts = FAIL;
2060+ Sts = FFFTP_FAIL;
20612061 if(TmpRegType == REGTYPE_REG)
20622062 {
20632063 if(RegDeleteKey(Handle, Name) == ERROR_SUCCESS)
2064- Sts = SUCCESS;
2064+ Sts = FFFTP_SUCCESS;
20652065 }
20662066 else
20672067 {
2068- Sts = FAIL;
2068+ Sts = FFFTP_FAIL;
20692069 }
20702070 return(Sts);
20712071 }
@@ -2079,22 +2079,22 @@ static int DeleteSubKey(void *Handle, char *Name)
20792079 *
20802080 * Return Value
20812081 * int ステータス
2082-* SUCCESS/FAIL
2082+* FFFTP_SUCCESS/FFFTP_FAIL
20832083 *----------------------------------------------------------------------------*/
20842084
20852085 static int DeleteValue(void *Handle, char *Name)
20862086 {
20872087 int Sts;
20882088
2089- Sts = FAIL;
2089+ Sts = FFFTP_FAIL;
20902090 if(TmpRegType == REGTYPE_REG)
20912091 {
20922092 if(RegDeleteValue(Handle, Name) == ERROR_SUCCESS)
2093- Sts = SUCCESS;
2093+ Sts = FFFTP_SUCCESS;
20942094 }
20952095 else
20962096 {
2097- Sts = FAIL;
2097+ Sts = FFFTP_FAIL;
20982098 }
20992099 return(Sts);
21002100 }
@@ -2109,7 +2109,7 @@ static int DeleteValue(void *Handle, char *Name)
21092109 *
21102110 * Return Value
21112111 * int ステータス
2112-* SUCCESS/FAIL
2112+* FFFTP_SUCCESS/FFFTP_FAIL
21132113 *----------------------------------------------------------------------------*/
21142114
21152115 static int ReadIntValueFromReg(void *Handle, char *Name, int *Value)
@@ -2118,19 +2118,19 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value)
21182118 DWORD Size;
21192119 char *Pos;
21202120
2121- Sts = FAIL;
2121+ Sts = FFFTP_FAIL;
21222122 if(TmpRegType == REGTYPE_REG)
21232123 {
21242124 Size = sizeof(int);
21252125 if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Value, &Size) == ERROR_SUCCESS)
2126- Sts = SUCCESS;
2126+ Sts = FFFTP_SUCCESS;
21272127 }
21282128 else
21292129 {
21302130 if((Pos = ScanValue(Handle, Name)) != NULL)
21312131 {
21322132 *Value = atoi(Pos);
2133- Sts = SUCCESS;
2133+ Sts = FFFTP_SUCCESS;
21342134 }
21352135 }
21362136 return(Sts);
@@ -2146,7 +2146,7 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value)
21462146 *
21472147 * Return Value
21482148 * int ステータス
2149-* SUCCESS/FAIL
2149+* FFFTP_SUCCESS/FFFTP_FAIL
21502150 *----------------------------------------------------------------------------*/
21512151
21522152 static int WriteIntValueToReg(void *Handle, char *Name, int Value)
@@ -2167,7 +2167,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value)
21672167 strcat(Data, Tmp);
21682168 Pos->ValLen += strlen(Data) + 1;
21692169 }
2170- return(SUCCESS);
2170+ return(FFFTP_SUCCESS);
21712171 }
21722172
21732173
@@ -2181,7 +2181,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value)
21812181 *
21822182 * Return Value
21832183 * int ステータス
2184-* SUCCESS/FAIL
2184+* FFFTP_SUCCESS/FFFTP_FAIL
21852185 *----------------------------------------------------------------------------*/
21862186
21872187 static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
@@ -2189,14 +2189,14 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
21892189 int Sts;
21902190 char *Pos;
21912191
2192- Sts = FAIL;
2192+ Sts = FFFTP_FAIL;
21932193 if(TmpRegType == REGTYPE_REG)
21942194 {
21952195 if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_SUCCESS)
21962196 {
21972197 if(*(Str + Size - 1) != NUL)
21982198 *(Str + Size) = NUL;
2199- Sts = SUCCESS;
2199+ Sts = FFFTP_SUCCESS;
22002200 }
22012201 }
22022202 else
@@ -2206,7 +2206,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
22062206 Size = min1(Size-1, strlen(Pos));
22072207 Size = StrReadIn(Pos, Size, Str);
22082208 *(Str + Size) = NUL;
2209- Sts = SUCCESS;
2209+ Sts = FFFTP_SUCCESS;
22102210 }
22112211 }
22122212 return(Sts);
@@ -2222,7 +2222,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
22222222 *
22232223 * Return Value
22242224 * int ステータス
2225-* SUCCESS/FAIL
2225+* FFFTP_SUCCESS/FFFTP_FAIL
22262226 *----------------------------------------------------------------------------*/
22272227
22282228 static int WriteStringToReg(void *Handle, char *Name, char *Str)
@@ -2242,7 +2242,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str)
22422242 Data = Pos->ValTbl + Pos->ValLen;
22432243 Pos->ValLen += StrCatOut(Str, strlen(Str), Data) + 1;
22442244 }
2245- return(SUCCESS);
2245+ return(FFFTP_SUCCESS);
22462246 }
22472247
22482248
@@ -2256,7 +2256,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str)
22562256 *
22572257 * Return Value
22582258 * int ステータス
2259-* SUCCESS/FAIL
2259+* FFFTP_SUCCESS/FFFTP_FAIL
22602260 *----------------------------------------------------------------------------*/
22612261
22622262 static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Size)
@@ -2264,14 +2264,14 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz
22642264 int Sts;
22652265 char *Pos;
22662266
2267- Sts = FAIL;
2267+ Sts = FFFTP_FAIL;
22682268 if(TmpRegType == REGTYPE_REG)
22692269 {
22702270 if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_SUCCESS)
22712271 {
22722272 if(*(Str + Size - 1) != NUL)
22732273 *(Str + Size) = NUL;
2274- Sts = SUCCESS;
2274+ Sts = FFFTP_SUCCESS;
22752275 }
22762276 }
22772277 else
@@ -2281,7 +2281,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz
22812281 Size = min1(Size-1, strlen(Pos));
22822282 Size = StrReadIn(Pos, Size, Str);
22832283 *(Str + Size) = NUL;
2284- Sts = SUCCESS;
2284+ Sts = FFFTP_SUCCESS;
22852285 }
22862286 }
22872287 return(Sts);
@@ -2297,7 +2297,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz
22972297 *
22982298 * Return Value
22992299 * int ステータス
2300-* SUCCESS/FAIL
2300+* FFFTP_SUCCESS/FFFTP_FAIL
23012301 *----------------------------------------------------------------------------*/
23022302
23032303 static int WriteMultiStringToReg(void *Handle, char *Name, char *Str)
@@ -2317,7 +2317,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str)
23172317 Data = Pos->ValTbl + Pos->ValLen;
23182318 Pos->ValLen += StrCatOut(Str, StrMultiLen(Str), Data) + 1;
23192319 }
2320- return(SUCCESS);
2320+ return(FFFTP_SUCCESS);
23212321 }
23222322
23232323
@@ -2331,7 +2331,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str)
23312331 *
23322332 * Return Value
23332333 * int ステータス
2334-* SUCCESS/FAIL
2334+* FFFTP_SUCCESS/FFFTP_FAIL
23352335 *----------------------------------------------------------------------------*/
23362336
23372337 static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
@@ -2339,11 +2339,11 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
23392339 int Sts;
23402340 char *Pos;
23412341
2342- Sts = FAIL;
2342+ Sts = FFFTP_FAIL;
23432343 if(TmpRegType == REGTYPE_REG)
23442344 {
23452345 if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Bin, &Size) == ERROR_SUCCESS)
2346- Sts = SUCCESS;
2346+ Sts = FFFTP_SUCCESS;
23472347 }
23482348 else
23492349 {
@@ -2351,7 +2351,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
23512351 {
23522352 Size = min1(Size, strlen(Pos));
23532353 Size = StrReadIn(Pos, Size, Bin);
2354- Sts = SUCCESS;
2354+ Sts = FFFTP_SUCCESS;
23552355 }
23562356 }
23572357 return(Sts);
@@ -2368,7 +2368,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size)
23682368 *
23692369 * Return Value
23702370 * int ステータス
2371-* SUCCESS/FAIL
2371+* FFFTP_SUCCESS/FFFTP_FAIL
23722372 *----------------------------------------------------------------------------*/
23732373
23742374 static int WriteBinaryToReg(void *Handle, char *Name, void *Bin, int Len)
@@ -2388,7 +2388,7 @@ static int WriteBinaryToReg(void *Handle, char *Name, void *Bin, int Len)
23882388 Data = Pos->ValTbl + Pos->ValLen;
23892389 Pos->ValLen += StrCatOut(Bin, Len, Data) + 1;
23902390 }
2391- return(SUCCESS);
2391+ return(FFFTP_SUCCESS);
23922392 }
23932393
23942394
--- a/remote.c
+++ b/remote.c
@@ -652,7 +652,7 @@ int CommandProcCmd(char *Reply, char *fmt, ...)
652652
653653 // if((Sts = command(AskCmdCtrlSkt(), Reply, "%s", Cmd)) == 429)
654654 // {
655-// if(ReConnectCmdSkt() == SUCCESS)
655+// if(ReConnectCmdSkt() == FFFTP_SUCCESS)
656656 // {
657657 Sts = command(AskCmdCtrlSkt(), Reply, &CheckCancelFlg, "%s", Cmd);
658658 // }
@@ -690,7 +690,7 @@ int CommandProcTrn(char *Reply, char *fmt, ...)
690690
691691 // if((Sts = command(AskTrnCtrlSkt(), Reply, "%s", Cmd)) == 429)
692692 // {
693-// if(ReConnectTrnSkt() == SUCCESS)
693+// if(ReConnectTrnSkt() == FFFTP_SUCCESS)
694694 Sts = command(AskTrnCtrlSkt(), Reply, &CheckCancelFlg, "%s", Cmd);
695695 // }
696696 return(Sts);
@@ -749,7 +749,7 @@ int command(SOCKET cSkt, char *Reply, int *CancelCheckWork, char *fmt, ...)
749749 strcpy(Reply, "");
750750
751751 Sts = 429;
752- if(SendData(cSkt, Cmd, strlen(Cmd), 0, CancelCheckWork) == SUCCESS)
752+ if(SendData(cSkt, Cmd, strlen(Cmd), 0, CancelCheckWork) == FFFTP_SUCCESS)
753753 {
754754 Sts = ReadReplyMessage(cSkt, Reply, 1024, CancelCheckWork, TmpBuf);
755755 }
@@ -779,7 +779,7 @@ int command(SOCKET cSkt, char *Reply, int *CancelCheckWork, char *fmt, ...)
779779 *
780780 * Return Value
781781 * int ステータス
782-* SUCCESS/FAIL
782+* FFFTP_SUCCESS/FFFTP_FAIL
783783 *----------------------------------------------------------------------------*/
784784
785785 int SendData(SOCKET Skt, char *Data, int Size, int Mode, int *CancelCheckWork)
@@ -791,10 +791,10 @@ int SendData(SOCKET Skt, char *Data, int Size, int Mode, int *CancelCheckWork)
791791 // struct timeval *ToutPtr;
792792 int TimeOutErr;
793793
794- Sts = FAIL;
794+ Sts = FFFTP_FAIL;
795795 if(Skt != INVALID_SOCKET)
796796 {
797- Sts = SUCCESS;
797+ Sts = FFFTP_SUCCESS;
798798 while(Size > 0)
799799 {
800800 // FD_ZERO(&SendFds);
@@ -809,13 +809,13 @@ int SendData(SOCKET Skt, char *Data, int Size, int Mode, int *CancelCheckWork)
809809 // Tmp = select(0, NULL, &SendFds, NULL, ToutPtr);
810810 // if(Tmp == SOCKET_ERROR)
811811 // {
812-// Sts = FAIL;
812+// Sts = FFFTP_FAIL;
813813 // ReportWSError("select", WSAGetLastError());
814814 // break;
815815 // }
816816 // else if(Tmp == 0)
817817 // {
818-// Sts = FAIL;
818+// Sts = FFFTP_FAIL;
819819 // SetTaskMsg(MSGJPN241);
820820 // break;
821821 // }
@@ -823,13 +823,13 @@ int SendData(SOCKET Skt, char *Data, int Size, int Mode, int *CancelCheckWork)
823823 Tmp = do_send(Skt, Data, Size, Mode, &TimeOutErr, CancelCheckWork);
824824 if(TimeOutErr == YES)
825825 {
826- Sts = FAIL;
826+ Sts = FFFTP_FAIL;
827827 SetTaskMsg(MSGJPN241);
828828 break;
829829 }
830830 else if(Tmp == SOCKET_ERROR)
831831 {
832- Sts = FAIL;
832+ Sts = FFFTP_FAIL;
833833 ReportWSError("send", WSAGetLastError());
834834 break;
835835 }
@@ -1056,7 +1056,7 @@ static int ReadOneLine(SOCKET cSkt, char *Buf, int Max, int *CancelCheckWork)
10561056 *
10571057 * Return Value
10581058 * int ステータス
1059-* SUCCESS/FAIL
1059+* FFFTP_SUCCESS/FFFTP_FAIL
10601060 *----------------------------------------------------------------------------*/
10611061
10621062 int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork)
@@ -1069,10 +1069,10 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork)
10691069 int Sts;
10701070 int TimeOutErr;
10711071
1072- Sts = FAIL;
1072+ Sts = FFFTP_FAIL;
10731073 if(cSkt != INVALID_SOCKET)
10741074 {
1075- Sts = SUCCESS;
1075+ Sts = FFFTP_SUCCESS;
10761076 while(Size > 0)
10771077 {
10781078 // FD_ZERO(&ReadFds);
@@ -1088,13 +1088,13 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork)
10881088 // if(i == SOCKET_ERROR)
10891089 // {
10901090 // ReportWSError("select", WSAGetLastError());
1091-// Sts = FAIL;
1091+// Sts = FFFTP_FAIL;
10921092 // break;
10931093 // }
10941094 // else if(i == 0)
10951095 // {
10961096 // SetTaskMsg(MSGJPN243);
1097-// Sts = FAIL;
1097+// Sts = FFFTP_FAIL;
10981098 // break;
10991099 // }
11001100
@@ -1102,7 +1102,7 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork)
11021102 {
11031103 if(TimeOutErr == YES)
11041104 SetTaskMsg(MSGJPN243);
1105- Sts = FAIL;
1105+ Sts = FFFTP_FAIL;
11061106 break;
11071107 }
11081108
@@ -1111,7 +1111,7 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork)
11111111 }
11121112 }
11131113
1114- if(Sts == FAIL)
1114+ if(Sts == FFFTP_FAIL)
11151115 SetTaskMsg(MSGJPN244);
11161116
11171117 return(Sts);
@@ -1287,7 +1287,7 @@ void ReportWSError(char *Msg, UINT Error)
12871287 *
12881288 * Return Value
12891289 * int ステータス
1290-* SUCCESS/FAIL
1290+* FFFTP_SUCCESS/FFFTP_FAIL
12911291 *----------------------------------------------------------------------------*/
12921292
12931293 int ChangeFnameRemote2Local(char *Fname, int Max)
@@ -1297,7 +1297,7 @@ int ChangeFnameRemote2Local(char *Fname, int Max)
12971297 char *Pos;
12981298 CODECONVINFO cInfo;
12991299
1300- Sts = FAIL;
1300+ Sts = FFFTP_FAIL;
13011301 if((Buf = malloc(Max)) != NULL)
13021302 {
13031303 InitCodeConvInfo(&cInfo);
@@ -1351,7 +1351,7 @@ int ChangeFnameRemote2Local(char *Fname, int Max)
13511351 break;
13521352 }
13531353 free(Buf);
1354- Sts = SUCCESS;
1354+ Sts = FFFTP_SUCCESS;
13551355 }
13561356 return(Sts);
13571357 }
@@ -1365,7 +1365,7 @@ int ChangeFnameRemote2Local(char *Fname, int Max)
13651365 *
13661366 * Return Value
13671367 * int ステータス
1368-* SUCCESS/FAIL
1368+* FFFTP_SUCCESS/FFFTP_FAIL
13691369 *----------------------------------------------------------------------------*/
13701370
13711371 int ChangeFnameLocal2Remote(char *Fname, int Max)
@@ -1375,7 +1375,7 @@ int ChangeFnameLocal2Remote(char *Fname, int Max)
13751375 char *Pos;
13761376 CODECONVINFO cInfo;
13771377
1378- Sts = FAIL;
1378+ Sts = FFFTP_FAIL;
13791379 if((Buf = malloc(Max)) != NULL)
13801380 {
13811381 InitCodeConvInfo(&cInfo);
@@ -1438,7 +1438,7 @@ int ChangeFnameLocal2Remote(char *Fname, int Max)
14381438 break;
14391439 }
14401440 free(Buf);
1441- Sts = SUCCESS;
1441+ Sts = FFFTP_SUCCESS;
14421442 }
14431443 return(Sts);
14441444 }
--- a/sha.c
+++ b/sha.c
@@ -69,8 +69,8 @@
6969 #define TRUE 1
7070 #define FALSE 0
7171
72-#define SUCCESS 0
73-#define FAILURE -1
72+#define FFFTP_SUCCESS 0
73+#define FFFTP_FAILURE -1
7474
7575 int sha_file(); /* External entries */
7676 void sha_stream(), sha_memory();
@@ -121,7 +121,7 @@ char **argv;
121121 if (verbose) printf("%s:", *argv);
122122 file_args = TRUE; /* Whether or not we could read it */
123123
124- if (sha_file(*argv, hbuf) == FAILURE)
124+ if (sha_file(*argv, hbuf) == FFFTP_FAILURE)
125125 printf("Can't open file %s.\n", *argv);
126126 else
127127 if (terse) printf("%08lx%08lx%08lx%08lx%08lx\n",
@@ -187,11 +187,11 @@ uint32 *buffer;
187187
188188 for (i = 0; i < 5; i++)
189189 buffer[i] = 0xdeadbeef;
190- return FAILURE;
190+ return FFFTP_FAILURE;
191191 }
192192 (void) sha_stream(infile, buffer);
193193 fclose(infile);
194- return SUCCESS;
194+ return FFFTP_SUCCESS;
195195 }
196196
197197 void sha_memory(mem, length, buffer) /* Hash a memory block */
--- a/skey.c
+++ b/skey.c
@@ -296,7 +296,7 @@ static const char Wp[2048][4] = {
296296 *
297297 * Return Value
298298 * int ステータス
299-* SUCCESS/FAIL
299+* FFFTP_SUCCESS/FFFTP_FAIL
300300 *----------------------------------------------------------------------------*/
301301
302302 int Make6WordPass(int seq, char *seed, char *pass, int type, char *buf)
@@ -305,13 +305,13 @@ int Make6WordPass(int seq, char *seed, char *pass, int type, char *buf)
305305 int i;
306306 int Sts;
307307
308- Sts = FAIL;
309- if(keycrunch(key, seed, pass, type) != FAIL)
308+ Sts = FFFTP_FAIL;
309+ if(keycrunch(key, seed, pass, type) != FFFTP_FAIL)
310310 {
311311 for(i = 0; i < seq; i++)
312312 secure_hash(key, type);
313313 btoe(key, buf);
314- Sts = SUCCESS;
314+ Sts = FFFTP_SUCCESS;
315315 }
316316 return(Sts);
317317 }
@@ -328,7 +328,7 @@ static int keycrunch(char *result, char *seed, char *passwd, int Type)
328328
329329 buflen = strlen(seed) + strlen(passwd);
330330 if((buf = malloc(buflen + 1)) == NULL)
331- return(FAIL);
331+ return(FFFTP_FAIL);
332332 strcpy(buf, seed);
333333 strcat(buf, passwd);
334334
@@ -361,7 +361,7 @@ static int keycrunch(char *result, char *seed, char *passwd, int Type)
361361 /* Only works on byte-addressed little-endian machines!! */
362362 memcpy(result, (char *)results, 8);
363363
364- return(SUCCESS);
364+ return(FFFTP_SUCCESS);
365365 }
366366
367367
--- a/socket.c
+++ b/socket.c
@@ -115,7 +115,7 @@ static ASYNCSIGNALDATABASE SignalDbase[MAX_SIGNAL_ENTRY_DBASE];
115115 *
116116 * Return Value
117117 * int ステータス
118-* SUCCESS/FAIL
118+* FFFTP_SUCCESS/FFFTP_FAIL
119119 *----------------------------------------------------------------------------*/
120120
121121 int MakeSocketWin(HWND hWnd, HINSTANCE hInst)
@@ -138,7 +138,7 @@ int MakeSocketWin(HWND hWnd, HINSTANCE hInst)
138138 wClass.hIconSm = NULL;
139139 RegisterClassEx(&wClass);
140140
141- Sts = FAIL;
141+ Sts = FFFTP_FAIL;
142142 hWndSocket = CreateWindowEx(0, SocketWndClass, NULL,
143143 WS_BORDER | WS_POPUP,
144144 0, 0, 0, 0,
@@ -152,7 +152,7 @@ int MakeSocketWin(HWND hWnd, HINSTANCE hInst)
152152 Signal[i].Socket = INVALID_SOCKET;
153153 for(i = 0; i < MAX_SIGNAL_ENTRY_DBASE; i++)
154154 SignalDbase[i].Async = 0;
155- Sts = SUCCESS;
155+ Sts = FFFTP_SUCCESS;
156156 }
157157 return(Sts);
158158 }
@@ -1015,7 +1015,7 @@ int do_send(SOCKET s, const char *buf, int len, int flags, int *TimeOutErr, int
10151015 *
10161016 * Return Value
10171017 * int ステータス
1018-* SUCCESS/FAIL
1018+* FFFTP_SUCCESS/FFFTP_FAIL
10191019 *----------------------------------------------------------------------------*/
10201020
10211021 int CheckClosedAndReconnect(void)
@@ -1025,7 +1025,7 @@ int CheckClosedAndReconnect(void)
10251025
10261026 //SetTaskMsg("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
10271027
1028- Sts = SUCCESS;
1028+ Sts = FFFTP_SUCCESS;
10291029 if(AskAsyncDone(AskCmdCtrlSkt(), &Error, FD_CLOSE_BIT) == YES)
10301030 {
10311031 Sts = ReConnectCmdSkt();
--- a/statuswin.c
+++ b/statuswin.c
@@ -58,14 +58,14 @@ static int SbarColWidth[5] = { 70, 230, 410, 570, -1 };
5858 *
5959 * Return Value
6060 * int ステータス
61-* SUCCESS/FAIL
61+* FFFTP_SUCCESS/FFFTP_FAIL
6262 *----------------------------------------------------------------------------*/
6363
6464 int MakeStatusBarWindow(HWND hWnd, HINSTANCE hInst)
6565 {
6666 int Sts;
6767
68- Sts = FAIL;
68+ Sts = FFFTP_FAIL;
6969 hWndSbar = CreateWindowEx(0,
7070 STATUSCLASSNAME, NULL,
7171 WS_CHILD | SBS_SIZEGRIP | WS_CLIPSIBLINGS | SBT_NOBORDERS,
@@ -76,7 +76,7 @@ int MakeStatusBarWindow(HWND hWnd, HINSTANCE hInst)
7676 {
7777 SendMessage(hWndSbar, SB_SETPARTS, sizeof(SbarColWidth)/sizeof(int), (LPARAM)SbarColWidth);
7878 ShowWindow(hWndSbar, SW_SHOW);
79- Sts = SUCCESS;
79+ Sts = FFFTP_SUCCESS;
8080 }
8181 return(Sts);
8282 }
--- a/taskwin.c
+++ b/taskwin.c
@@ -74,14 +74,14 @@ static HANDLE DispLogSemaphore2;
7474 *
7575 * Return Value
7676 * int ステータス
77-* SUCCESS/FAIL
77+* FFFTP_SUCCESS/FFFTP_FAIL
7878 *----------------------------------------------------------------------------*/
7979
8080 int MakeTaskWindow(HWND hWnd, HINSTANCE hInst)
8181 {
8282 int Sts;
8383
84- Sts = FAIL;
84+ Sts = FFFTP_FAIL;
8585 hWndTask = CreateWindowEx(/*WS_EX_STATICEDGE*/WS_EX_CLIENTEDGE,
8686 "EDIT", NULL,
8787 WS_CHILD | WS_BORDER | ES_AUTOVSCROLL | WS_VSCROLL | ES_MULTILINE | ES_READONLY | WS_CLIPSIBLINGS,
@@ -96,7 +96,7 @@ int MakeTaskWindow(HWND hWnd, HINSTANCE hInst)
9696 SendMessage(hWndTask, WM_SETFONT, (WPARAM)ListFont, MAKELPARAM(TRUE, 0));
9797
9898 ShowWindow(hWndTask, SW_SHOW);
99- Sts = SUCCESS;
99+ Sts = FFFTP_SUCCESS;
100100
101101 DispLogSemaphore = CreateSemaphore(NULL, 1, 1, NULL);
102102 DispLogSemaphore2 = CreateSemaphore(NULL, 1, 1, NULL);
@@ -211,7 +211,7 @@ void SetTaskMsg(char *szFormat, ...)
211211 *
212212 * Return Value
213213 * int ステータス
214-* SUCCESS/FAIL
214+* FFFTP_SUCCESS/FFFTP_FAIL
215215 *----------------------------------------------------------------------------*/
216216
217217 int SaveTaskMsg(char *Fname)
@@ -222,7 +222,7 @@ int SaveTaskMsg(char *Fname)
222222 int Sts;
223223
224224
225- Sts = FAIL;
225+ Sts = FFFTP_FAIL;
226226 Size = SendMessage(GetTaskWnd(), WM_GETTEXTLENGTH, 0, 0);
227227 if((Buf = malloc(Size)) != NULL)
228228 {
@@ -230,10 +230,10 @@ int SaveTaskMsg(char *Fname)
230230 {
231231 SendMessage(GetTaskWnd(), WM_GETTEXT, Size, (LPARAM)Buf);
232232 if(fwrite(Buf, strlen(Buf), 1, Strm) == 1)
233- Sts = SUCCESS;
233+ Sts = FFFTP_SUCCESS;
234234 fclose(Strm);
235235
236- if(Sts == FAIL)
236+ if(Sts == FFFTP_FAIL)
237237 _unlink(Fname);
238238 }
239239 free(Buf);
@@ -259,7 +259,7 @@ void DispTaskMsg(void)
259259 SetYenTail(Buf);
260260 strcat(Buf, "_ffftp.tsk");
261261
262- if(SaveTaskMsg(Buf) == SUCCESS)
262+ if(SaveTaskMsg(Buf) == FFFTP_SUCCESS)
263263 {
264264 AddTempFileList(Buf);
265265 ExecViewer(Buf, 0);
--- a/tool.c
+++ b/tool.c
@@ -122,7 +122,7 @@ static BOOL CALLBACK OtpCalcWinProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
122122 /* Seed */
123123 if((Pos = GetNextField(Pos)) != NULL)
124124 {
125- if(GetOneField(Pos, Seed, MAX_SEED_LEN) == SUCCESS)
125+ if(GetOneField(Pos, Seed, MAX_SEED_LEN) == FFFTP_SUCCESS)
126126 {
127127 Make6WordPass(Seq, Seed, Pass, Type, Tmp);
128128 }
--- a/toolmenu.c
+++ b/toolmenu.c
@@ -206,7 +206,7 @@ static const int HideMenus[] = {
206206 *
207207 * Return Value
208208 * int ステータス
209-* SUCCESS/FAIL
209+* FFFTP_SUCCESS/FFFTP_FAIL
210210 *----------------------------------------------------------------------------*/
211211
212212 int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
@@ -351,14 +351,14 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst)
351351 }
352352 }
353353
354- Sts = SUCCESS;
354+ Sts = FFFTP_SUCCESS;
355355 if((hWndTbarMain == NULL) ||
356356 (hWndTbarLocal == NULL) ||
357357 (hWndTbarRemote == NULL) ||
358358 (hWndDirLocal == NULL) ||
359359 (hWndDirRemote == NULL))
360360 {
361- Sts = FAIL;
361+ Sts = FFFTP_FAIL;
362362 }
363363 return(Sts);
364364 }
@@ -385,7 +385,7 @@ static LRESULT CALLBACK HistEditBoxWndProc(HWND hWnd, UINT message, WPARAM wPara
385385 else
386386 {
387387 SendMessage(hWndDirRemoteEdit, WM_GETTEXT, FMAX_PATH+1, (LPARAM)Tmp);
388- if(CheckClosedAndReconnect() == SUCCESS)
388+ if(CheckClosedAndReconnect() == FFFTP_SUCCESS)
389389 {
390390 if(DoCWD(Tmp, YES, NO, YES) < FTP_RETRY)
391391 GetRemoteDirForWnd(CACHE_NORMAL, &CancelFlg);
@@ -925,7 +925,7 @@ int AskTransferTypeAssoc(char *Fname, int Type)
925925 Pos = AsciiExt;
926926 while(*Pos != NUL)
927927 {
928- if(CheckFname(Name, Pos) == SUCCESS)
928+ if(CheckFname(Name, Pos) == FFFTP_SUCCESS)
929929 {
930930 Ret = TYPE_A;
931931 break;
--- a/wildcard.c
+++ b/wildcard.c
@@ -51,7 +51,7 @@ static int CheckNameMatch(char *str, char *regexp);
5151 *
5252 * Return Value
5353 * int ステータス
54-* SUCCESS/FAIL
54+* FFFTP_SUCCESS/FFFTP_FAIL
5555 *
5656 * Note
5757 * VAX VMSの時は ; 以降は無視する
@@ -84,14 +84,14 @@ int CheckFname(char *str, char *regexp)
8484 if((strcmp(p1, "*.*") == 0) || (strcmp(p1, "????????.???") == 0))
8585 strcpy(p1, "*");
8686
87- Sts = SUCCESS;
87+ Sts = FFFTP_SUCCESS;
8888 if(strcmp(p1, "*") != 0)
8989 {
9090 if(strcmp(p1, "*.") == 0)
9191 {
9292 p = strchr(p2, '.');
9393 if((p != NULL) && (*(p+1) != NUL))
94- Sts = FAIL;
94+ Sts = FFFTP_FAIL;
9595 }
9696 else
9797 Sts = CheckNameMatch(p2, p1);
@@ -108,7 +108,7 @@ int CheckFname(char *str, char *regexp)
108108 *
109109 * Return Value
110110 * int ステータス
111-* SUCCESS/FAIL
111+* FFFTP_SUCCESS/FFFTP_FAIL
112112 *----------------------------------------------------------------------------*/
113113
114114 static int CheckNameMatch(char *str, char *regexp)
@@ -128,23 +128,23 @@ static int CheckNameMatch(char *str, char *regexp)
128128 /* Look for a character matching the one after the '*' */
129129 p++;
130130 if(*p == NUL)
131- return SUCCESS; /* Automatic match */
131+ return FFFTP_SUCCESS; /* Automatic match */
132132 while(*str != NUL)
133133 {
134134 while((*str != NUL) && (toupper(*p)!=toupper(*str)))
135135 str++;
136136 if(CheckNameMatch(str, p))
137- return SUCCESS;
137+ return FFFTP_SUCCESS;
138138 if(*str == NUL)
139- return FAIL;
139+ return FFFTP_FAIL;
140140 else
141141 str++;
142142 }
143- return FAIL;
143+ return FFFTP_FAIL;
144144
145145 default:
146146 if(toupper(*str) != toupper(*p))
147- return FAIL;
147+ return FFFTP_FAIL;
148148 str++;
149149 p++;
150150 break;
@@ -152,10 +152,10 @@ static int CheckNameMatch(char *str, char *regexp)
152152 }
153153
154154 if((*p == NUL) && (*str == NUL))
155- return SUCCESS;
155+ return FFFTP_SUCCESS;
156156
157157 if ((*p != NUL) && (str[0] == '.') && (str[1] == 0))
158- return(SUCCESS);
158+ return(FFFTP_SUCCESS);
159159
160160 if ((*str == NUL) && (*p == '?'))
161161 {
@@ -165,8 +165,8 @@ static int CheckNameMatch(char *str, char *regexp)
165165 }
166166
167167 if((*str == NUL) && (*p == '*') && (p[1] == '\0'))
168- return SUCCESS;
168+ return FFFTP_SUCCESS;
169169
170- return FAIL;
170+ return FFFTP_FAIL;
171171 }
172172