Loweynet
修訂 | f875ec4e76ad4a1dc913d1972f2c92a0ec46bed4 (tree) |
---|---|
時間 | 2011-09-16 19:53:00 |
作者 | hylom <hylom@user...> |
Commiter | hylom |
replace 'SUCCESS' and 'FAIL' macro to 'FFFTP_SUCCESS' and 'FFFTP_FAIL' to suppress warning
@@ -0,0 +1,8 @@ | ||
1 | +*~ | |
2 | +Release | |
3 | +Debug | |
4 | +FFFTP_Eng_Release | |
5 | +FFFTP_Eng_Debug | |
6 | +*.ncb | |
7 | +*.suo | |
8 | +*.user |
@@ -220,7 +220,7 @@ int ValidateMasterPassword(void) | ||
220 | 220 | int i; |
221 | 221 | |
222 | 222 | SetRegType(REGTYPE_INI); |
223 | - if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS) | |
223 | + if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS) | |
224 | 224 | { |
225 | 225 | if(AskForceIni() == NO) |
226 | 226 | { |
@@ -228,14 +228,14 @@ int ValidateMasterPassword(void) | ||
228 | 228 | i = OpenReg("FFFTP", &hKey3); |
229 | 229 | } |
230 | 230 | } |
231 | - if(i == SUCCESS){ | |
231 | + if(i == FFFTP_SUCCESS){ | |
232 | 232 | char checkbuf[48]; |
233 | 233 | int salt = 0; |
234 | 234 | |
235 | 235 | if( ReadIntValueFromReg(hKey3, "CredentialSalt", &salt)){ |
236 | 236 | SetHashSalt( salt ); |
237 | 237 | } |
238 | - if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == SUCCESS ){ | |
238 | + if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == FFFTP_SUCCESS ){ | |
239 | 239 | switch( CheckPasswordValidity( SecretKey, SecretKeyLength, checkbuf ) ){ |
240 | 240 | case 0: /* not match */ |
241 | 241 | IsMasterPasswordError = PASSWORD_UNMATCH; |
@@ -283,7 +283,7 @@ void SaveRegistory(void) | ||
283 | 283 | } |
284 | 284 | |
285 | 285 | SetRegType(RegType); |
286 | - if(CreateReg("FFFTP", &hKey3) == SUCCESS) | |
286 | + if(CreateReg("FFFTP", &hKey3) == FFFTP_SUCCESS) | |
287 | 287 | { |
288 | 288 | char buf[48]; |
289 | 289 | int salt = GetTickCount(); |
@@ -296,7 +296,7 @@ void SaveRegistory(void) | ||
296 | 296 | CreatePasswordHash( SecretKey, SecretKeyLength, buf ); |
297 | 297 | WriteStringToReg(hKey3, "CredentialCheck", buf); |
298 | 298 | |
299 | - if(CreateSubKey(hKey3, "Options", &hKey4) == SUCCESS) | |
299 | + if(CreateSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS) | |
300 | 300 | { |
301 | 301 | WriteIntValueToReg(hKey4, "NoSave", SuppressSave); |
302 | 302 |
@@ -412,10 +412,10 @@ void SaveRegistory(void) | ||
412 | 412 | n = 0; |
413 | 413 | for(i = AskHistoryNum(); i > 0; i--) |
414 | 414 | { |
415 | - if(GetHistoryByNum(i-1, &Hist) == SUCCESS) | |
415 | + if(GetHistoryByNum(i-1, &Hist) == FFFTP_SUCCESS) | |
416 | 416 | { |
417 | 417 | sprintf(Str, "History%d", n); |
418 | - if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
418 | + if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
419 | 419 | { |
420 | 420 | SaveStr(hKey5, "HostAdrs", Hist.HostAdrs, DefaultHist.HostAdrs); |
421 | 421 | SaveStr(hKey5, "UserName", Hist.UserName, DefaultHist.UserName); |
@@ -459,17 +459,17 @@ void SaveRegistory(void) | ||
459 | 459 | for(; n < 999; n++) |
460 | 460 | { |
461 | 461 | sprintf(Str, "History%d", n); |
462 | - if(DeleteSubKey(hKey4, Str) != SUCCESS) | |
462 | + if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS) | |
463 | 463 | break; |
464 | 464 | } |
465 | 465 | |
466 | 466 | /* ホストの設定を保存 */ |
467 | 467 | CopyDefaultHost(&DefaultHost); |
468 | 468 | i = 0; |
469 | - while(CopyHostFromList(i, &Host) == SUCCESS) | |
469 | + while(CopyHostFromList(i, &Host) == FFFTP_SUCCESS) | |
470 | 470 | { |
471 | 471 | sprintf(Str, "Host%d", i); |
472 | - if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
472 | + if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
473 | 473 | { |
474 | 474 | // SaveIntNum(hKey5, "Set", Host.Level, DefaultHost.Level); |
475 | 475 | WriteIntValueToReg(hKey5, "Set", Host.Level); |
@@ -526,7 +526,7 @@ void SaveRegistory(void) | ||
526 | 526 | for(; i < 998; i++) |
527 | 527 | { |
528 | 528 | sprintf(Str, "Host%d", i); |
529 | - if(DeleteSubKey(hKey4, Str) != SUCCESS) | |
529 | + if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS) | |
530 | 530 | break; |
531 | 531 | } |
532 | 532 |
@@ -571,7 +571,7 @@ int LoadRegistory(void) | ||
571 | 571 | Sts = NO; |
572 | 572 | |
573 | 573 | SetRegType(REGTYPE_INI); |
574 | - if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS) | |
574 | + if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS) | |
575 | 575 | { |
576 | 576 | if(AskForceIni() == NO) |
577 | 577 | { |
@@ -580,7 +580,7 @@ int LoadRegistory(void) | ||
580 | 580 | } |
581 | 581 | } |
582 | 582 | |
583 | - if(i == SUCCESS) | |
583 | + if(i == FFFTP_SUCCESS) | |
584 | 584 | { |
585 | 585 | char checkbuf[48]; |
586 | 586 | int salt = 0; |
@@ -588,7 +588,7 @@ int LoadRegistory(void) | ||
588 | 588 | |
589 | 589 | ReadIntValueFromReg(hKey3, "Version", &Version); |
590 | 590 | |
591 | - if(OpenSubKey(hKey3, "Options", &hKey4) == SUCCESS) | |
591 | + if(OpenSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS) | |
592 | 592 | { |
593 | 593 | ReadIntValueFromReg(hKey4, "WinPosX", &WinPosX); |
594 | 594 | ReadIntValueFromReg(hKey4, "WinPosY", &WinPosY); |
@@ -647,7 +647,7 @@ int LoadRegistory(void) | ||
647 | 647 | ReadIntValueFromReg(hKey4, "RegExp", &FindMode); |
648 | 648 | ReadIntValueFromReg(hKey4, "Reg", &RegType); |
649 | 649 | |
650 | - if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FAIL) | |
650 | + if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FFFTP_FAIL) | |
651 | 651 | { |
652 | 652 | /* 旧ASCIIモードの拡張子の設定を新しいものに変換 */ |
653 | 653 | ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1); |
@@ -679,9 +679,9 @@ int LoadRegistory(void) | ||
679 | 679 | ReadIntValueFromReg(hKey4, "MirUNot", &MirUpDelNotify); |
680 | 680 | ReadIntValueFromReg(hKey4, "MirDNot", &MirDownDelNotify); |
681 | 681 | |
682 | - if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == SUCCESS) | |
682 | + if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == FFFTP_SUCCESS) | |
683 | 683 | { |
684 | - if(RestoreFontData(Str, &ListLogFont) == SUCCESS) | |
684 | + if(RestoreFontData(Str, &ListLogFont) == FFFTP_SUCCESS) | |
685 | 685 | ListFont = CreateFontIndirect(&ListLogFont); |
686 | 686 | } |
687 | 687 | ReadIntValueFromReg(hKey4, "ListHide", &DispIgnoreHide); |
@@ -730,7 +730,7 @@ int LoadRegistory(void) | ||
730 | 730 | for(i = 0; i < Sets; i++) |
731 | 731 | { |
732 | 732 | sprintf(Str, "History%d", i); |
733 | - if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
733 | + if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
734 | 734 | { |
735 | 735 | CopyDefaultHistory(&Hist); |
736 | 736 |
@@ -778,7 +778,7 @@ int LoadRegistory(void) | ||
778 | 778 | for(i = 0; i < Sets; i++) |
779 | 779 | { |
780 | 780 | sprintf(Str, "Host%d", i); |
781 | - if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
781 | + if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
782 | 782 | { |
783 | 783 | CopyDefaultHost(&Host); |
784 | 784 | /* 下位互換性のため */ |
@@ -893,17 +893,17 @@ DWORD LoadHideDriveListRegistory(void) | ||
893 | 893 | DWORD Ret; |
894 | 894 | |
895 | 895 | 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) | |
897 | 897 | { |
898 | - if(RegOpenKeyEx(hKey1, "Microsoft", 0, KEY_READ, &hKey2) == ERROR_SUCCESS) | |
898 | + if(RegOpenKeyEx(hKey1, "Microsoft", 0, KEY_READ, &hKey2) == ERROR_FFFTP_SUCCESS) | |
899 | 899 | { |
900 | - if(RegOpenKeyEx(hKey2, "Windows", 0, KEY_READ, &hKey3) == ERROR_SUCCESS) | |
900 | + if(RegOpenKeyEx(hKey2, "Windows", 0, KEY_READ, &hKey3) == ERROR_FFFTP_SUCCESS) | |
901 | 901 | { |
902 | - if(RegOpenKeyEx(hKey3, "CurrentVersion", 0, KEY_READ, &hKey4) == ERROR_SUCCESS) | |
902 | + if(RegOpenKeyEx(hKey3, "CurrentVersion", 0, KEY_READ, &hKey4) == ERROR_FFFTP_SUCCESS) | |
903 | 903 | { |
904 | - if(RegOpenKeyEx(hKey4, "Policies", 0, KEY_READ, &hKey5) == ERROR_SUCCESS) | |
904 | + if(RegOpenKeyEx(hKey4, "Policies", 0, KEY_READ, &hKey5) == ERROR_FFFTP_SUCCESS) | |
905 | 905 | { |
906 | - if(RegOpenKeyEx(hKey5, "Explorer", 0, KEY_READ, &hKey6) == ERROR_SUCCESS) | |
906 | + if(RegOpenKeyEx(hKey5, "Explorer", 0, KEY_READ, &hKey6) == ERROR_FFFTP_SUCCESS) | |
907 | 907 | { |
908 | 908 | Size = sizeof(DWORD); |
909 | 909 | RegQueryValueEx(hKey6, "NoDrives", NULL, &Type, (BYTE *)&Ret, &Size); |
@@ -941,22 +941,22 @@ void ClearRegistory(void) | ||
941 | 941 | char Str[20]; |
942 | 942 | int i; |
943 | 943 | |
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) | |
945 | 945 | { |
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) | |
947 | 947 | { |
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) | |
949 | 949 | { |
950 | 950 | for(i = 0; ; i++) |
951 | 951 | { |
952 | 952 | sprintf(Str, "Host%d", i); |
953 | - if(RegDeleteKey(hKey4, Str) != ERROR_SUCCESS) | |
953 | + if(RegDeleteKey(hKey4, Str) != ERROR_FFFTP_SUCCESS) | |
954 | 954 | break; |
955 | 955 | } |
956 | 956 | for(i = 0; ; i++) |
957 | 957 | { |
958 | 958 | sprintf(Str, "History%d", i); |
959 | - if(RegDeleteKey(hKey4, Str) != ERROR_SUCCESS) | |
959 | + if(RegDeleteKey(hKey4, Str) != ERROR_FFFTP_SUCCESS) | |
960 | 960 | break; |
961 | 961 | } |
962 | 962 | RegCloseKey(hKey4); |
@@ -1141,7 +1141,7 @@ static void MakeFontData(LOGFONT Font, HFONT hFont, char *Buf) | ||
1141 | 1141 | * |
1142 | 1142 | * Return Value |
1143 | 1143 | * int ステータス |
1144 | -* SUCCESS/FAIL=変換できない | |
1144 | +* FFFTP_SUCCESS/FFFTP_FAIL=変換できない | |
1145 | 1145 | *----------------------------------------------------------------------------*/ |
1146 | 1146 | |
1147 | 1147 | static int RestoreFontData(char *Str, LOGFONT *Font) |
@@ -1149,7 +1149,7 @@ static int RestoreFontData(char *Str, LOGFONT *Font) | ||
1149 | 1149 | int i; |
1150 | 1150 | int Sts; |
1151 | 1151 | |
1152 | - Sts = FAIL; | |
1152 | + Sts = FFFTP_FAIL; | |
1153 | 1153 | if(sscanf(Str, "%d %d %d %d %d %d %d %d %d %d %d %d %d", |
1154 | 1154 | &(Font->lfHeight), &(Font->lfWidth), &(Font->lfEscapement), &(Font->lfOrientation), |
1155 | 1155 | &(Font->lfWeight), &(Font->lfItalic), &(Font->lfUnderline), &(Font->lfStrikeOut), |
@@ -1165,11 +1165,11 @@ static int RestoreFontData(char *Str, LOGFONT *Font) | ||
1165 | 1165 | if(i == 0) |
1166 | 1166 | { |
1167 | 1167 | strcpy(Font->lfFaceName, Str); |
1168 | - Sts = SUCCESS; | |
1168 | + Sts = FFFTP_SUCCESS; | |
1169 | 1169 | } |
1170 | 1170 | } |
1171 | 1171 | |
1172 | - if(Sts == FAIL) | |
1172 | + if(Sts == FFFTP_FAIL) | |
1173 | 1173 | memset(Font, NUL, sizeof(LOGFONT)); |
1174 | 1174 | |
1175 | 1175 | return(Sts); |
@@ -1445,7 +1445,7 @@ static int TmpRegType; | ||
1445 | 1445 | * |
1446 | 1446 | * Return Value |
1447 | 1447 | * int ステータス |
1448 | -* SUCCESS/FAIL | |
1448 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1449 | 1449 | *----------------------------------------------------------------------------*/ |
1450 | 1450 | |
1451 | 1451 | static void SetRegType(int Type) |
@@ -1463,7 +1463,7 @@ static void SetRegType(int Type) | ||
1463 | 1463 | * |
1464 | 1464 | * Return Value |
1465 | 1465 | * int ステータス |
1466 | -* SUCCESS/FAIL | |
1466 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1467 | 1467 | *----------------------------------------------------------------------------*/ |
1468 | 1468 | |
1469 | 1469 | static int OpenReg(char *Name, void **Handle) |
@@ -1471,17 +1471,17 @@ static int OpenReg(char *Name, void **Handle) | ||
1471 | 1471 | int Sts; |
1472 | 1472 | char Tmp[FMAX_PATH+1]; |
1473 | 1473 | |
1474 | - Sts = FAIL; | |
1474 | + Sts = FFFTP_FAIL; | |
1475 | 1475 | if(TmpRegType == REGTYPE_REG) |
1476 | 1476 | { |
1477 | 1477 | strcpy(Tmp, "Software\\Sota\\"); |
1478 | 1478 | 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; | |
1481 | 1481 | } |
1482 | 1482 | else |
1483 | 1483 | { |
1484 | - if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == SUCCESS) | |
1484 | + if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == FFFTP_SUCCESS) | |
1485 | 1485 | ((REGDATATBL *)(*Handle))->Mode = 0; |
1486 | 1486 | } |
1487 | 1487 | return(Sts); |
@@ -1496,7 +1496,7 @@ static int OpenReg(char *Name, void **Handle) | ||
1496 | 1496 | * |
1497 | 1497 | * Return Value |
1498 | 1498 | * int ステータス |
1499 | -* SUCCESS/FAIL | |
1499 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1500 | 1500 | *----------------------------------------------------------------------------*/ |
1501 | 1501 | |
1502 | 1502 | static int CreateReg(char *Name, void **Handle) |
@@ -1505,13 +1505,13 @@ static int CreateReg(char *Name, void **Handle) | ||
1505 | 1505 | char Tmp[FMAX_PATH+1]; |
1506 | 1506 | DWORD Dispos; |
1507 | 1507 | |
1508 | - Sts = FAIL; | |
1508 | + Sts = FFFTP_FAIL; | |
1509 | 1509 | if(TmpRegType == REGTYPE_REG) |
1510 | 1510 | { |
1511 | 1511 | strcpy(Tmp, "Software\\Sota\\"); |
1512 | 1512 | 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; | |
1515 | 1515 | } |
1516 | 1516 | else |
1517 | 1517 | { |
@@ -1521,7 +1521,7 @@ static int CreateReg(char *Name, void **Handle) | ||
1521 | 1521 | ((REGDATATBL *)(*Handle))->ValLen = 0; |
1522 | 1522 | ((REGDATATBL *)(*Handle))->Next = NULL; |
1523 | 1523 | ((REGDATATBL *)(*Handle))->Mode = 1; |
1524 | - Sts = SUCCESS; | |
1524 | + Sts = FFFTP_SUCCESS; | |
1525 | 1525 | } |
1526 | 1526 | } |
1527 | 1527 | return(Sts); |
@@ -1535,7 +1535,7 @@ static int CreateReg(char *Name, void **Handle) | ||
1535 | 1535 | * |
1536 | 1536 | * Return Value |
1537 | 1537 | * int ステータス |
1538 | -* SUCCESS/FAIL | |
1538 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1539 | 1539 | *----------------------------------------------------------------------------*/ |
1540 | 1540 | |
1541 | 1541 | static int CloseReg(void *Handle) |
@@ -1574,7 +1574,7 @@ static int CloseReg(void *Handle) | ||
1574 | 1574 | Pos = Next; |
1575 | 1575 | } |
1576 | 1576 | } |
1577 | - return(SUCCESS); | |
1577 | + return(FFFTP_SUCCESS); | |
1578 | 1578 | } |
1579 | 1579 | |
1580 | 1580 |
@@ -1627,7 +1627,7 @@ static BOOL WriteOutRegToFile(REGDATATBL *Pos) | ||
1627 | 1627 | * |
1628 | 1628 | * Return Value |
1629 | 1629 | * int ステータス |
1630 | -* SUCCESS/FAIL | |
1630 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1631 | 1631 | *----------------------------------------------------------------------------*/ |
1632 | 1632 | |
1633 | 1633 | static int ReadInReg(char *Name, REGDATATBL **Handle) |
@@ -1640,7 +1640,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle) | ||
1640 | 1640 | REGDATATBL *Pos; |
1641 | 1641 | int Sts; |
1642 | 1642 | |
1643 | - Sts = FAIL; | |
1643 | + Sts = FFFTP_FAIL; | |
1644 | 1644 | *Handle = NULL; |
1645 | 1645 | |
1646 | 1646 | if((Strm = fopen(AskIniFilePath(), "rt")) != NULL) |
@@ -1683,7 +1683,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle) | ||
1683 | 1683 | } |
1684 | 1684 | } |
1685 | 1685 | } |
1686 | - Sts = SUCCESS; | |
1686 | + Sts = FFFTP_SUCCESS; | |
1687 | 1687 | free(Buf); |
1688 | 1688 | } |
1689 | 1689 | fclose(Strm); |
@@ -1701,7 +1701,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle) | ||
1701 | 1701 | * |
1702 | 1702 | * Return Value |
1703 | 1703 | * int ステータス |
1704 | -* SUCCESS/FAIL | |
1704 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1705 | 1705 | *----------------------------------------------------------------------------*/ |
1706 | 1706 | |
1707 | 1707 | static int OpenSubKey(void *Parent, char *Name, void **Handle) |
@@ -1710,11 +1710,11 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle) | ||
1710 | 1710 | char Key[80]; |
1711 | 1711 | REGDATATBL *Pos; |
1712 | 1712 | |
1713 | - Sts = FAIL; | |
1713 | + Sts = FFFTP_FAIL; | |
1714 | 1714 | if(TmpRegType == REGTYPE_REG) |
1715 | 1715 | { |
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; | |
1718 | 1718 | } |
1719 | 1719 | else |
1720 | 1720 | { |
@@ -1727,7 +1727,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle) | ||
1727 | 1727 | if(strcmp(Pos->KeyName, Key) == 0) |
1728 | 1728 | { |
1729 | 1729 | *Handle = Pos; |
1730 | - Sts = SUCCESS; | |
1730 | + Sts = FFFTP_SUCCESS; | |
1731 | 1731 | break; |
1732 | 1732 | } |
1733 | 1733 | Pos = Pos->Next; |
@@ -1746,7 +1746,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle) | ||
1746 | 1746 | * |
1747 | 1747 | * Return Value |
1748 | 1748 | * int ステータス |
1749 | -* SUCCESS/FAIL | |
1749 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1750 | 1750 | *----------------------------------------------------------------------------*/ |
1751 | 1751 | |
1752 | 1752 | static int CreateSubKey(void *Parent, char *Name, void **Handle) |
@@ -1755,11 +1755,11 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle) | ||
1755 | 1755 | DWORD Dispos; |
1756 | 1756 | REGDATATBL *Pos; |
1757 | 1757 | |
1758 | - Sts = FAIL; | |
1758 | + Sts = FFFTP_FAIL; | |
1759 | 1759 | if(TmpRegType == REGTYPE_REG) |
1760 | 1760 | { |
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; | |
1763 | 1763 | } |
1764 | 1764 | else |
1765 | 1765 | { |
@@ -1776,7 +1776,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle) | ||
1776 | 1776 | while(Pos->Next != NULL) |
1777 | 1777 | Pos = Pos->Next; |
1778 | 1778 | Pos->Next = *Handle; |
1779 | - Sts = SUCCESS; | |
1779 | + Sts = FFFTP_SUCCESS; | |
1780 | 1780 | } |
1781 | 1781 | } |
1782 | 1782 | return(Sts); |
@@ -1790,7 +1790,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle) | ||
1790 | 1790 | * |
1791 | 1791 | * Return Value |
1792 | 1792 | * int ステータス |
1793 | -* SUCCESS/FAIL | |
1793 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1794 | 1794 | *----------------------------------------------------------------------------*/ |
1795 | 1795 | |
1796 | 1796 | static int CloseSubKey(void *Handle) |
@@ -1801,7 +1801,7 @@ static int CloseSubKey(void *Handle) | ||
1801 | 1801 | { |
1802 | 1802 | /* Nothing */ |
1803 | 1803 | } |
1804 | - return(SUCCESS); | |
1804 | + return(FFFTP_SUCCESS); | |
1805 | 1805 | } |
1806 | 1806 | |
1807 | 1807 |
@@ -1813,22 +1813,22 @@ static int CloseSubKey(void *Handle) | ||
1813 | 1813 | * |
1814 | 1814 | * Return Value |
1815 | 1815 | * int ステータス |
1816 | -* SUCCESS/FAIL | |
1816 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1817 | 1817 | *----------------------------------------------------------------------------*/ |
1818 | 1818 | |
1819 | 1819 | static int DeleteSubKey(void *Handle, char *Name) |
1820 | 1820 | { |
1821 | 1821 | int Sts; |
1822 | 1822 | |
1823 | - Sts = FAIL; | |
1823 | + Sts = FFFTP_FAIL; | |
1824 | 1824 | if(TmpRegType == REGTYPE_REG) |
1825 | 1825 | { |
1826 | - if(RegDeleteKey(Handle, Name) == ERROR_SUCCESS) | |
1827 | - Sts = SUCCESS; | |
1826 | + if(RegDeleteKey(Handle, Name) == ERROR_FFFTP_SUCCESS) | |
1827 | + Sts = FFFTP_SUCCESS; | |
1828 | 1828 | } |
1829 | 1829 | else |
1830 | 1830 | { |
1831 | - Sts = FAIL; | |
1831 | + Sts = FFFTP_FAIL; | |
1832 | 1832 | } |
1833 | 1833 | return(Sts); |
1834 | 1834 | } |
@@ -1842,22 +1842,22 @@ static int DeleteSubKey(void *Handle, char *Name) | ||
1842 | 1842 | * |
1843 | 1843 | * Return Value |
1844 | 1844 | * int ステータス |
1845 | -* SUCCESS/FAIL | |
1845 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1846 | 1846 | *----------------------------------------------------------------------------*/ |
1847 | 1847 | |
1848 | 1848 | static int DeleteValue(void *Handle, char *Name) |
1849 | 1849 | { |
1850 | 1850 | int Sts; |
1851 | 1851 | |
1852 | - Sts = FAIL; | |
1852 | + Sts = FFFTP_FAIL; | |
1853 | 1853 | if(TmpRegType == REGTYPE_REG) |
1854 | 1854 | { |
1855 | - if(RegDeleteValue(Handle, Name) == ERROR_SUCCESS) | |
1856 | - Sts = SUCCESS; | |
1855 | + if(RegDeleteValue(Handle, Name) == ERROR_FFFTP_SUCCESS) | |
1856 | + Sts = FFFTP_SUCCESS; | |
1857 | 1857 | } |
1858 | 1858 | else |
1859 | 1859 | { |
1860 | - Sts = FAIL; | |
1860 | + Sts = FFFTP_FAIL; | |
1861 | 1861 | } |
1862 | 1862 | return(Sts); |
1863 | 1863 | } |
@@ -1872,7 +1872,7 @@ static int DeleteValue(void *Handle, char *Name) | ||
1872 | 1872 | * |
1873 | 1873 | * Return Value |
1874 | 1874 | * int ステータス |
1875 | -* SUCCESS/FAIL | |
1875 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1876 | 1876 | *----------------------------------------------------------------------------*/ |
1877 | 1877 | |
1878 | 1878 | static int ReadIntValueFromReg(void *Handle, char *Name, int *Value) |
@@ -1881,19 +1881,19 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value) | ||
1881 | 1881 | DWORD Size; |
1882 | 1882 | char *Pos; |
1883 | 1883 | |
1884 | - Sts = FAIL; | |
1884 | + Sts = FFFTP_FAIL; | |
1885 | 1885 | if(TmpRegType == REGTYPE_REG) |
1886 | 1886 | { |
1887 | 1887 | 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; | |
1890 | 1890 | } |
1891 | 1891 | else |
1892 | 1892 | { |
1893 | 1893 | if((Pos = ScanValue(Handle, Name)) != NULL) |
1894 | 1894 | { |
1895 | 1895 | *Value = atoi(Pos); |
1896 | - Sts = SUCCESS; | |
1896 | + Sts = FFFTP_SUCCESS; | |
1897 | 1897 | } |
1898 | 1898 | } |
1899 | 1899 | return(Sts); |
@@ -1909,7 +1909,7 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value) | ||
1909 | 1909 | * |
1910 | 1910 | * Return Value |
1911 | 1911 | * int ステータス |
1912 | -* SUCCESS/FAIL | |
1912 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1913 | 1913 | *----------------------------------------------------------------------------*/ |
1914 | 1914 | |
1915 | 1915 | static int WriteIntValueToReg(void *Handle, char *Name, int Value) |
@@ -1930,7 +1930,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value) | ||
1930 | 1930 | strcat(Data, Tmp); |
1931 | 1931 | Pos->ValLen += strlen(Data) + 1; |
1932 | 1932 | } |
1933 | - return(SUCCESS); | |
1933 | + return(FFFTP_SUCCESS); | |
1934 | 1934 | } |
1935 | 1935 | |
1936 | 1936 |
@@ -1944,7 +1944,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value) | ||
1944 | 1944 | * |
1945 | 1945 | * Return Value |
1946 | 1946 | * int ステータス |
1947 | -* SUCCESS/FAIL | |
1947 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1948 | 1948 | *----------------------------------------------------------------------------*/ |
1949 | 1949 | |
1950 | 1950 | 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) | ||
1952 | 1952 | int Sts; |
1953 | 1953 | char *Pos; |
1954 | 1954 | |
1955 | - Sts = FAIL; | |
1955 | + Sts = FFFTP_FAIL; | |
1956 | 1956 | if(TmpRegType == REGTYPE_REG) |
1957 | 1957 | { |
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) | |
1959 | 1959 | { |
1960 | 1960 | if(*(Str + Size - 1) != NUL) |
1961 | 1961 | *(Str + Size) = NUL; |
1962 | - Sts = SUCCESS; | |
1962 | + Sts = FFFTP_SUCCESS; | |
1963 | 1963 | } |
1964 | 1964 | } |
1965 | 1965 | else |
@@ -1969,7 +1969,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size) | ||
1969 | 1969 | Size = min1(Size-1, strlen(Pos)); |
1970 | 1970 | Size = StrReadIn(Pos, Size, Str); |
1971 | 1971 | *(Str + Size) = NUL; |
1972 | - Sts = SUCCESS; | |
1972 | + Sts = FFFTP_SUCCESS; | |
1973 | 1973 | } |
1974 | 1974 | } |
1975 | 1975 | return(Sts); |
@@ -1985,7 +1985,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size) | ||
1985 | 1985 | * |
1986 | 1986 | * Return Value |
1987 | 1987 | * int ステータス |
1988 | -* SUCCESS/FAIL | |
1988 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1989 | 1989 | *----------------------------------------------------------------------------*/ |
1990 | 1990 | |
1991 | 1991 | static int WriteStringToReg(void *Handle, char *Name, char *Str) |
@@ -2005,7 +2005,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str) | ||
2005 | 2005 | Data = Pos->ValTbl + Pos->ValLen; |
2006 | 2006 | Pos->ValLen += StrCatOut(Str, strlen(Str), Data) + 1; |
2007 | 2007 | } |
2008 | - return(SUCCESS); | |
2008 | + return(FFFTP_SUCCESS); | |
2009 | 2009 | } |
2010 | 2010 | |
2011 | 2011 |
@@ -2019,7 +2019,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str) | ||
2019 | 2019 | * |
2020 | 2020 | * Return Value |
2021 | 2021 | * int ステータス |
2022 | -* SUCCESS/FAIL | |
2022 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2023 | 2023 | *----------------------------------------------------------------------------*/ |
2024 | 2024 | |
2025 | 2025 | 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 | ||
2027 | 2027 | int Sts; |
2028 | 2028 | char *Pos; |
2029 | 2029 | |
2030 | - Sts = FAIL; | |
2030 | + Sts = FFFTP_FAIL; | |
2031 | 2031 | if(TmpRegType == REGTYPE_REG) |
2032 | 2032 | { |
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) | |
2034 | 2034 | { |
2035 | 2035 | if(*(Str + Size - 1) != NUL) |
2036 | 2036 | *(Str + Size) = NUL; |
2037 | - Sts = SUCCESS; | |
2037 | + Sts = FFFTP_SUCCESS; | |
2038 | 2038 | } |
2039 | 2039 | } |
2040 | 2040 | else |
@@ -2044,7 +2044,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz | ||
2044 | 2044 | Size = min1(Size-1, strlen(Pos)); |
2045 | 2045 | Size = StrReadIn(Pos, Size, Str); |
2046 | 2046 | *(Str + Size) = NUL; |
2047 | - Sts = SUCCESS; | |
2047 | + Sts = FFFTP_SUCCESS; | |
2048 | 2048 | } |
2049 | 2049 | } |
2050 | 2050 | return(Sts); |
@@ -2060,7 +2060,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz | ||
2060 | 2060 | * |
2061 | 2061 | * Return Value |
2062 | 2062 | * int ステータス |
2063 | -* SUCCESS/FAIL | |
2063 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2064 | 2064 | *----------------------------------------------------------------------------*/ |
2065 | 2065 | |
2066 | 2066 | static int WriteMultiStringToReg(void *Handle, char *Name, char *Str) |
@@ -2080,7 +2080,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str) | ||
2080 | 2080 | Data = Pos->ValTbl + Pos->ValLen; |
2081 | 2081 | Pos->ValLen += StrCatOut(Str, StrMultiLen(Str), Data) + 1; |
2082 | 2082 | } |
2083 | - return(SUCCESS); | |
2083 | + return(FFFTP_SUCCESS); | |
2084 | 2084 | } |
2085 | 2085 | |
2086 | 2086 |
@@ -2094,7 +2094,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str) | ||
2094 | 2094 | * |
2095 | 2095 | * Return Value |
2096 | 2096 | * int ステータス |
2097 | -* SUCCESS/FAIL | |
2097 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2098 | 2098 | *----------------------------------------------------------------------------*/ |
2099 | 2099 | |
2100 | 2100 | 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) | ||
2102 | 2102 | int Sts; |
2103 | 2103 | char *Pos; |
2104 | 2104 | |
2105 | - Sts = FAIL; | |
2105 | + Sts = FFFTP_FAIL; | |
2106 | 2106 | if(TmpRegType == REGTYPE_REG) |
2107 | 2107 | { |
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; | |
2110 | 2110 | } |
2111 | 2111 | else |
2112 | 2112 | { |
@@ -2114,7 +2114,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size) | ||
2114 | 2114 | { |
2115 | 2115 | Size = min1(Size, strlen(Pos)); |
2116 | 2116 | Size = StrReadIn(Pos, Size, Bin); |
2117 | - Sts = SUCCESS; | |
2117 | + Sts = FFFTP_SUCCESS; | |
2118 | 2118 | } |
2119 | 2119 | } |
2120 | 2120 | return(Sts); |
@@ -2131,7 +2131,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size) | ||
2131 | 2131 | * |
2132 | 2132 | * Return Value |
2133 | 2133 | * int ステータス |
2134 | -* SUCCESS/FAIL | |
2134 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2135 | 2135 | *----------------------------------------------------------------------------*/ |
2136 | 2136 | |
2137 | 2137 | 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) | ||
2151 | 2151 | Data = Pos->ValTbl + Pos->ValLen; |
2152 | 2152 | Pos->ValLen += StrCatOut(Bin, Len, Data) + 1; |
2153 | 2153 | } |
2154 | - return(SUCCESS); | |
2154 | + return(FFFTP_SUCCESS); | |
2155 | 2155 | } |
2156 | 2156 | |
2157 | 2157 |
@@ -125,7 +125,7 @@ void AddCurDirToBookMark(int Win) | ||
125 | 125 | * |
126 | 126 | * Return Value |
127 | 127 | * int ステータス |
128 | -* SUCCESS/FAIL | |
128 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
129 | 129 | *----------------------------------------------------------------------------*/ |
130 | 130 | |
131 | 131 | static int AddBookMark(char *Path) |
@@ -134,11 +134,11 @@ static int AddBookMark(char *Path) | ||
134 | 134 | int MarkID; |
135 | 135 | int Sts; |
136 | 136 | |
137 | - Sts = FAIL; | |
137 | + Sts = FFFTP_FAIL; | |
138 | 138 | hMenu = GetSubMenu(GetMenu(GetMainHwnd()), BMARK_SUB_MENU); |
139 | 139 | MarkID = (GetMenuItemCount(hMenu) - DEFAULT_BMARK_ITEM) + MENU_BMARK_TOP; |
140 | 140 | if(AppendMenu(hMenu, MF_STRING, MarkID, Path) == TRUE) |
141 | - Sts = SUCCESS; | |
141 | + Sts = FFFTP_SUCCESS; | |
142 | 142 | return(Sts); |
143 | 143 | } |
144 | 144 |
@@ -74,7 +74,7 @@ static int ProgNum; /* FFFTPの起動番号 */ | ||
74 | 74 | * |
75 | 75 | * Return Value |
76 | 76 | * int ステータス |
77 | -* SUCCESS/FAIL | |
77 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
78 | 78 | *----------------------------------------------------------------------------*/ |
79 | 79 | |
80 | 80 | int MakeCacheBuf(int Num) |
@@ -82,16 +82,16 @@ int MakeCacheBuf(int Num) | ||
82 | 82 | int Sts; |
83 | 83 | int i; |
84 | 84 | |
85 | - Sts = SUCCESS; | |
85 | + Sts = FFFTP_SUCCESS; | |
86 | 86 | if(Num > 0) |
87 | 87 | { |
88 | - Sts = FAIL; | |
88 | + Sts = FFFTP_FAIL; | |
89 | 89 | if((RemoteCache = malloc(sizeof(CACHELIST) * Num)) != NULL) |
90 | 90 | { |
91 | 91 | TmpCacheEntry = Num; |
92 | 92 | for(i = 0; i < TmpCacheEntry; i++) |
93 | 93 | ClearCache(i); |
94 | - Sts = SUCCESS; | |
94 | + Sts = FFFTP_SUCCESS; | |
95 | 95 | } |
96 | 96 | } |
97 | 97 | return(Sts); |
@@ -54,7 +54,7 @@ int CopyStrToClipBoard(char *Str) | ||
54 | 54 | void *gBuf; |
55 | 55 | HGLOBAL hGlobal; |
56 | 56 | |
57 | - Sts = FAIL; | |
57 | + Sts = FFFTP_FAIL; | |
58 | 58 | if(OpenClipboard(GetMainHwnd())) |
59 | 59 | { |
60 | 60 | if(EmptyClipboard()) |
@@ -67,7 +67,7 @@ int CopyStrToClipBoard(char *Str) | ||
67 | 67 | |
68 | 68 | GlobalUnlock(hGlobal); |
69 | 69 | SetClipboardData(CF_TEXT, hGlobal); |
70 | - Sts = SUCCESS; | |
70 | + Sts = FFFTP_SUCCESS; | |
71 | 71 | } |
72 | 72 | } |
73 | 73 | } |
@@ -52,8 +52,9 @@ | ||
52 | 52 | #define ushort unsigned short |
53 | 53 | #define ulong unsigned long |
54 | 54 | |
55 | -#define FAIL 0 | |
56 | -#define SUCCESS 1 | |
55 | +#define FFFTP_FAIL 0 | |
56 | +#define FFFTP_SUCCESS 1 | |
57 | +#undef SUCCESS | |
57 | 58 | |
58 | 59 | #define NO 0 |
59 | 60 | #define YES 1 |
@@ -137,7 +137,7 @@ void ConnectProc(int Type, int Num) | ||
137 | 137 | InitPWDcommand(); |
138 | 138 | CopyHostFromList(AskCurrentHost(), &CurHost); |
139 | 139 | |
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) | |
141 | 141 | { |
142 | 142 | SetHostKanaCnvImm(CurHost.KanaCnv); |
143 | 143 | SetHostKanjiCodeImm(CurHost.KanjiCode); |
@@ -216,7 +216,7 @@ void QuickConnectProc(void) | ||
216 | 216 | |
217 | 217 | InitPWDcommand(); |
218 | 218 | 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) | |
220 | 220 | { |
221 | 221 | if(strlen(CurHost.UserName) == 0) |
222 | 222 | { |
@@ -304,7 +304,7 @@ static BOOL CALLBACK QuickConDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wPa | ||
304 | 304 | SendDlgItemMessage(hDlg, QHOST_PASV, BM_SETCHECK, PasvDefault, 0); |
305 | 305 | for(i = 0; i < HISTORY_MAX; i++) |
306 | 306 | { |
307 | - if(GetHistoryByNum(i, &Tmp) == SUCCESS) | |
307 | + if(GetHistoryByNum(i, &Tmp) == FFFTP_SUCCESS) | |
308 | 308 | { |
309 | 309 | //sprintf(Str, "%s (%s) %s", Tmp.HostAdrs, Tmp.UserName, Tmp.RemoteInitDir); |
310 | 310 | //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) | ||
373 | 373 | SetTaskMsg("----------------------------"); |
374 | 374 | |
375 | 375 | InitPWDcommand(); |
376 | - if(SplitUNCpath(unc, Host, Path, File, User, Pass, &Port) == SUCCESS) | |
376 | + if(SplitUNCpath(unc, Host, Path, File, User, Pass, &Port) == FFFTP_SUCCESS) | |
377 | 377 | { |
378 | 378 | if(strlen(User) == 0) |
379 | 379 | { |
@@ -453,7 +453,7 @@ void HistoryConnectProc(int MenuCmd) | ||
453 | 453 | int RFSort; |
454 | 454 | int RDSort; |
455 | 455 | |
456 | - if(GetHistoryByCmd(MenuCmd, &Hist) == SUCCESS) | |
456 | + if(GetHistoryByCmd(MenuCmd, &Hist) == FFFTP_SUCCESS) | |
457 | 457 | { |
458 | 458 | SaveBookMark(); |
459 | 459 | SaveCurrentSetToHost(); |
@@ -467,7 +467,7 @@ void HistoryConnectProc(int MenuCmd) | ||
467 | 467 | InitPWDcommand(); |
468 | 468 | CopyHistoryToHost(&Hist, &CurHost); |
469 | 469 | |
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) | |
471 | 471 | { |
472 | 472 | SetCurrentHost(HOSTNUM_NOENTRY); |
473 | 473 | SetHostKanaCnvImm(CurHost.KanaCnv); |
@@ -574,7 +574,7 @@ static void AskUseFireWall(char *Host, int *Fire, int *Pasv, int *List) | ||
574 | 574 | *List = NO; |
575 | 575 | |
576 | 576 | i = 0; |
577 | - while(CopyHostFromList(i, &Tmp) == SUCCESS) | |
577 | + while(CopyHostFromList(i, &Tmp) == FFFTP_SUCCESS) | |
578 | 578 | { |
579 | 579 | if(strcmp(Host, Tmp.HostAdrs) == 0) |
580 | 580 | { |
@@ -905,7 +905,7 @@ static void SaveCurrentSetToHistory(void) | ||
905 | 905 | * |
906 | 906 | * Return Value |
907 | 907 | * int ステータス |
908 | -* SUCCESS/FAIL | |
908 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
909 | 909 | *----------------------------------------------------------------------------*/ |
910 | 910 | |
911 | 911 | int ReConnectCmdSkt(void) |
@@ -931,7 +931,7 @@ int ReConnectCmdSkt(void) | ||
931 | 931 | * |
932 | 932 | * Return Value |
933 | 933 | * int ステータス |
934 | -* SUCCESS/FAIL | |
934 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
935 | 935 | *----------------------------------------------------------------------------*/ |
936 | 936 | |
937 | 937 | //int ReConnectTrnSkt(void) |
@@ -947,7 +947,7 @@ int ReConnectCmdSkt(void) | ||
947 | 947 | * |
948 | 948 | * Return Value |
949 | 949 | * int ステータス |
950 | -* SUCCESS/FAIL | |
950 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
951 | 951 | *----------------------------------------------------------------------------*/ |
952 | 952 | |
953 | 953 | static int ReConnectSkt(SOCKET *Skt) |
@@ -955,7 +955,7 @@ static int ReConnectSkt(SOCKET *Skt) | ||
955 | 955 | char Path[FMAX_PATH+1]; |
956 | 956 | int Sts; |
957 | 957 | |
958 | - Sts = FAIL; | |
958 | + Sts = FFFTP_FAIL; | |
959 | 959 | |
960 | 960 | SetTaskMsg(MSGJPN003); |
961 | 961 |
@@ -968,7 +968,7 @@ static int ReConnectSkt(SOCKET *Skt) | ||
968 | 968 | { |
969 | 969 | AskRemoteCurDir(Path, FMAX_PATH); |
970 | 970 | DoCWD(Path, YES, YES, YES); |
971 | - Sts = SUCCESS; | |
971 | + Sts = FFFTP_SUCCESS; | |
972 | 972 | } |
973 | 973 | else |
974 | 974 | SoundPlay(SND_ERROR); |
@@ -1221,7 +1221,7 @@ static SOCKET DoConnect(char *Host, char *User, char *Pass, char *Acct, int Port | ||
1221 | 1221 | Flg = 1; |
1222 | 1222 | if(setsockopt(ContSock, SOL_SOCKET, SO_OOBINLINE, (LPSTR)&Flg, sizeof(Flg)) == SOCKET_ERROR) |
1223 | 1223 | ReportWSError("setsockopt", WSAGetLastError()); |
1224 | -#pragma aaa | |
1224 | +/* #pragma aaa */ | |
1225 | 1225 | Flg = 1; |
1226 | 1226 | if(setsockopt(ContSock, SOL_SOCKET, SO_KEEPALIVE, (LPSTR)&Flg, sizeof(Flg)) == SOCKET_ERROR) |
1227 | 1227 | ReportWSError("setsockopt", WSAGetLastError()); |
@@ -1402,7 +1402,7 @@ static SOCKET DoConnect(char *Host, char *User, char *Pass, char *Acct, int Port | ||
1402 | 1402 | * |
1403 | 1403 | * Return Value |
1404 | 1404 | * int ステータス |
1405 | -* SUCCESS/FAIL | |
1405 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1406 | 1406 | * |
1407 | 1407 | * Note |
1408 | 1408 | * ワンタイムパスワードでない時はPassをそのままReplyにコピー |
@@ -1416,7 +1416,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type) | ||
1416 | 1416 | char Seed[MAX_SEED_LEN+1]; |
1417 | 1417 | int i; |
1418 | 1418 | |
1419 | - Sts = SUCCESS; | |
1419 | + Sts = FFFTP_SUCCESS; | |
1420 | 1420 | Pos = NULL; |
1421 | 1421 | |
1422 | 1422 | if(Type == SECURITY_AUTO) |
@@ -1445,7 +1445,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type) | ||
1445 | 1445 | /* シーケンス番号を見つけるループ */ |
1446 | 1446 | DoPrintf("Analize OTP"); |
1447 | 1447 | DoPrintf("%s", Pos); |
1448 | - Sts = FAIL; | |
1448 | + Sts = FFFTP_FAIL; | |
1449 | 1449 | while((Pos = GetNextField(Pos)) != NULL) |
1450 | 1450 | { |
1451 | 1451 | if(IsDigit(*Pos)) |
@@ -1456,7 +1456,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type) | ||
1456 | 1456 | /* Seed */ |
1457 | 1457 | if((Pos = GetNextField(Pos)) != NULL) |
1458 | 1458 | { |
1459 | - if(GetOneField(Pos, Seed, MAX_SEED_LEN) == SUCCESS) | |
1459 | + if(GetOneField(Pos, Seed, MAX_SEED_LEN) == FFFTP_SUCCESS) | |
1460 | 1460 | { |
1461 | 1461 | /* Seedは英数字のみ有効とする */ |
1462 | 1462 | for(i = strlen(Seed)-1; i >= 0; i--) |
@@ -1474,7 +1474,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type) | ||
1474 | 1474 | if(Seq <= 10) |
1475 | 1475 | DialogBox(GetFtpInst(), MAKEINTRESOURCE(otp_notify_dlg), GetMainHwnd(), ExeEscDialogProc); |
1476 | 1476 | |
1477 | - Sts = SUCCESS; | |
1477 | + Sts = FFFTP_SUCCESS; | |
1478 | 1478 | } |
1479 | 1479 | } |
1480 | 1480 | } |
@@ -1482,7 +1482,7 @@ static int CheckOneTimePassword(char *Pass, char *Reply, int Type) | ||
1482 | 1482 | } |
1483 | 1483 | } |
1484 | 1484 | |
1485 | - if(Sts == FAIL) | |
1485 | + if(Sts == FFFTP_FAIL) | |
1486 | 1486 | SetTaskMsg(MSGJPN015); |
1487 | 1487 | } |
1488 | 1488 | else |
@@ -1636,8 +1636,8 @@ SOCKET connectsock(char *host, int port, char *PreMsg, int *CancelCheckWork) | ||
1636 | 1636 | if(Fwall == FWALL_SOCKS4) |
1637 | 1637 | { |
1638 | 1638 | 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) || | |
1641 | 1641 | (Socks4Reply.Result != SOCKS4_RES_OK)) |
1642 | 1642 | { |
1643 | 1643 | SetTaskMsg(MSGJPN023, Socks4Reply.Result); |
@@ -1647,15 +1647,15 @@ SOCKET connectsock(char *host, int port, char *PreMsg, int *CancelCheckWork) | ||
1647 | 1647 | } |
1648 | 1648 | else if((Fwall == FWALL_SOCKS5_NOAUTH) || (Fwall == FWALL_SOCKS5_USER)) |
1649 | 1649 | { |
1650 | - if(Socks5SelMethod(sSocket, CancelCheckWork) == FAIL) | |
1650 | + if(Socks5SelMethod(sSocket, CancelCheckWork) == FFFTP_FAIL) | |
1651 | 1651 | { |
1652 | 1652 | DoClose(sSocket); |
1653 | 1653 | sSocket = INVALID_SOCKET; |
1654 | 1654 | } |
1655 | 1655 | |
1656 | 1656 | 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) || | |
1659 | 1659 | (Socks5Reply.Result != SOCKS5_RES_OK)) |
1660 | 1660 | { |
1661 | 1661 | SetTaskMsg(MSGJPN024, Socks5Reply.Result); |
@@ -1727,8 +1727,8 @@ SOCKET GetFTPListenSocket(SOCKET ctrl_skt, int *CancelCheckWork) | ||
1727 | 1727 | Len = offsetof(SOCKS4CMD, UserID) + strlen(FwallUser) + 1; |
1728 | 1728 | |
1729 | 1729 | 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) || | |
1732 | 1732 | (Socks4Reply.Result != SOCKS4_RES_OK)) |
1733 | 1733 | { |
1734 | 1734 | SetTaskMsg(MSGJPN028, Socks4Reply.Result); |
@@ -1749,7 +1749,7 @@ SOCKET GetFTPListenSocket(SOCKET ctrl_skt, int *CancelCheckWork) | ||
1749 | 1749 | DoPrintf("Use SOCKS5 BIND"); |
1750 | 1750 | if(do_connect(listen_skt, (struct sockaddr *)&SocksSockAddr, sizeof(SocksSockAddr), CancelCheckWork) != SOCKET_ERROR) |
1751 | 1751 | { |
1752 | - if(Socks5SelMethod(listen_skt, CancelCheckWork) == FAIL) | |
1752 | + if(Socks5SelMethod(listen_skt, CancelCheckWork) == FFFTP_FAIL) | |
1753 | 1753 | { |
1754 | 1754 | DoClose(listen_skt); |
1755 | 1755 | listen_skt = INVALID_SOCKET; |
@@ -1759,8 +1759,8 @@ SOCKET GetFTPListenSocket(SOCKET ctrl_skt, int *CancelCheckWork) | ||
1759 | 1759 | Len = Socks5MakeCmdPacket(&Socks5Cmd, SOCKS5_CMD_BIND, UseIPadrs, CurSockAddr.sin_addr.s_addr, DomainName, CurSockAddr.sin_port); |
1760 | 1760 | |
1761 | 1761 | 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) || | |
1764 | 1764 | (Socks5Reply.Result != SOCKS5_RES_OK)) |
1765 | 1765 | { |
1766 | 1766 | SetTaskMsg(MSGJPN029, Socks5Reply.Result); |
@@ -1945,7 +1945,7 @@ static int Socks5MakeCmdPacket(SOCKS5REQUEST *Packet, char Cmd, int ValidIP, ulo | ||
1945 | 1945 | * int Size : サイズ |
1946 | 1946 | * |
1947 | 1947 | * Return Value |
1948 | -* int ステータス (SUCCESS/FAIL) | |
1948 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
1949 | 1949 | *----------------------------------------------------------------------------*/ |
1950 | 1950 | |
1951 | 1951 | 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 | ||
1954 | 1954 | |
1955 | 1955 | Ret = SendData(Socket, (char *)Data, Size, 0, CancelCheckWork); |
1956 | 1956 | |
1957 | - if(Ret != SUCCESS) | |
1957 | + if(Ret != FFFTP_SUCCESS) | |
1958 | 1958 | SetTaskMsg(MSGJPN033, *((short *)Data)); |
1959 | 1959 | |
1960 | 1960 | return(Ret); |
@@ -1968,7 +1968,7 @@ static int SocksSendCmd(SOCKET Socket, void *Data, int Size, int *CancelCheckWor | ||
1968 | 1968 | * SOCKS5REPLY *Packet : パケット |
1969 | 1969 | * |
1970 | 1970 | * Return Value |
1971 | -* int ステータス (SUCCESS/FAIL) | |
1971 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
1972 | 1972 | *----------------------------------------------------------------------------*/ |
1973 | 1973 | |
1974 | 1974 | static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet) |
@@ -1980,7 +1980,7 @@ static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet) | ||
1980 | 1980 | Pos = (uchar *)Packet; |
1981 | 1981 | Pos += SOCKS5REPLY_SIZE; |
1982 | 1982 | |
1983 | - if((Ret = ReadNchar(Socket, (char *)Packet, SOCKS5REPLY_SIZE, &CancelFlg)) == SUCCESS) | |
1983 | + if((Ret = ReadNchar(Socket, (char *)Packet, SOCKS5REPLY_SIZE, &CancelFlg)) == FFFTP_SUCCESS) | |
1984 | 1984 | { |
1985 | 1985 | if(Packet->Type == SOCKS5_ADRS_IPV4) |
1986 | 1986 | Len = 4 + 2; |
@@ -1988,18 +1988,18 @@ static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet) | ||
1988 | 1988 | Len = 6 + 2; |
1989 | 1989 | else |
1990 | 1990 | { |
1991 | - if((Ret = ReadNchar(Socket, (char *)Pos, 1, &CancelFlg)) == SUCCESS) | |
1991 | + if((Ret = ReadNchar(Socket, (char *)Pos, 1, &CancelFlg)) == FFFTP_SUCCESS) | |
1992 | 1992 | { |
1993 | 1993 | Len = *Pos + 2; |
1994 | 1994 | Pos++; |
1995 | 1995 | } |
1996 | 1996 | } |
1997 | 1997 | |
1998 | - if(Ret == SUCCESS) | |
1998 | + if(Ret == FFFTP_SUCCESS) | |
1999 | 1999 | Ret = ReadNchar(Socket, (char *)Pos, Len, &CancelFlg); |
2000 | 2000 | } |
2001 | 2001 | |
2002 | - if(Ret != SUCCESS) | |
2002 | + if(Ret != FFFTP_SUCCESS) | |
2003 | 2003 | SetTaskMsg(MSGJPN034); |
2004 | 2004 | |
2005 | 2005 | return(Ret); |
@@ -2013,7 +2013,7 @@ static int Socks5GetCmdReply(SOCKET Socket, SOCKS5REPLY *Packet) | ||
2013 | 2013 | * SOCKS5REPLY *Packet : パケット |
2014 | 2014 | * |
2015 | 2015 | * Return Value |
2016 | -* int ステータス (SUCCESS/FAIL) | |
2016 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
2017 | 2017 | *----------------------------------------------------------------------------*/ |
2018 | 2018 | |
2019 | 2019 | static int Socks4GetCmdReply(SOCKET Socket, SOCKS4REPLY *Packet) |
@@ -2022,7 +2022,7 @@ static int Socks4GetCmdReply(SOCKET Socket, SOCKS4REPLY *Packet) | ||
2022 | 2022 | |
2023 | 2023 | Ret = ReadNchar(Socket, (char *)Packet, SOCKS4REPLY_SIZE, &CancelFlg); |
2024 | 2024 | |
2025 | - if(Ret != SUCCESS) | |
2025 | + if(Ret != FFFTP_SUCCESS) | |
2026 | 2026 | DoPrintf(MSGJPN035); |
2027 | 2027 | |
2028 | 2028 | return(Ret); |
@@ -2035,7 +2035,7 @@ static int Socks4GetCmdReply(SOCKET Socket, SOCKS4REPLY *Packet) | ||
2035 | 2035 | * SOCKET Socket : ソケット |
2036 | 2036 | * |
2037 | 2037 | * Return Value |
2038 | -* int ステータス (SUCCESS/FAIL) | |
2038 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
2039 | 2039 | *----------------------------------------------------------------------------*/ |
2040 | 2040 | |
2041 | 2041 | static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork) |
@@ -2048,7 +2048,7 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork) | ||
2048 | 2048 | int Len; |
2049 | 2049 | int Len2; |
2050 | 2050 | |
2051 | - Ret = SUCCESS; | |
2051 | + Ret = FFFTP_SUCCESS; | |
2052 | 2052 | Socks5Method.Ver = SOCKS5_VER; |
2053 | 2053 | Socks5Method.Num = 1; |
2054 | 2054 | if(FwallType == FWALL_SOCKS5_NOAUTH) |
@@ -2056,12 +2056,12 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork) | ||
2056 | 2056 | else |
2057 | 2057 | Socks5Method.Methods[0] = SOCKS5_AUTH_USER; |
2058 | 2058 | |
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) || | |
2061 | 2061 | (Socks5MethodReply.Method == (uchar)0xFF)) |
2062 | 2062 | { |
2063 | 2063 | SetTaskMsg(MSGJPN036); |
2064 | - Ret = FAIL; | |
2064 | + Ret = FFFTP_FAIL; | |
2065 | 2065 | } |
2066 | 2066 | else if(Socks5MethodReply.Method == SOCKS5_AUTH_USER) |
2067 | 2067 | { |
@@ -2074,12 +2074,12 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork) | ||
2074 | 2074 | Buf[2 + Len] = Len2; |
2075 | 2075 | strcpy(Buf+3+Len, FwallPass); |
2076 | 2076 | |
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) || | |
2079 | 2079 | (Socks5Status.Status != 0)) |
2080 | 2080 | { |
2081 | 2081 | SetTaskMsg(MSGJPN037); |
2082 | - Ret = FAIL; | |
2082 | + Ret = FFFTP_FAIL; | |
2083 | 2083 | } |
2084 | 2084 | } |
2085 | 2085 | else |
@@ -2096,7 +2096,7 @@ static int Socks5SelMethod(SOCKET Socket, int *CancelCheckWork) | ||
2096 | 2096 | * SOCKET *Data : データソケットを返すワーク |
2097 | 2097 | * |
2098 | 2098 | * Return Value |
2099 | -* int ステータス (SUCCESS/FAIL) | |
2099 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
2100 | 2100 | *----------------------------------------------------------------------------*/ |
2101 | 2101 | |
2102 | 2102 | int SocksGet2ndBindReply(SOCKET Socket, SOCKET *Data) |
@@ -2104,19 +2104,19 @@ int SocksGet2ndBindReply(SOCKET Socket, SOCKET *Data) | ||
2104 | 2104 | int Ret; |
2105 | 2105 | char Buf[300]; |
2106 | 2106 | |
2107 | - Ret = FAIL; | |
2107 | + Ret = FFFTP_FAIL; | |
2108 | 2108 | if((AskHostFireWall() == YES) && (FwallType == FWALL_SOCKS4)) |
2109 | 2109 | { |
2110 | 2110 | Socks4GetCmdReply(Socket, (SOCKS4REPLY *)Buf); |
2111 | 2111 | *Data = Socket; |
2112 | - Ret = SUCCESS; | |
2112 | + Ret = FFFTP_SUCCESS; | |
2113 | 2113 | } |
2114 | 2114 | else if((AskHostFireWall() == YES) && |
2115 | 2115 | ((FwallType == FWALL_SOCKS5_NOAUTH) || (FwallType == FWALL_SOCKS5_USER))) |
2116 | 2116 | { |
2117 | 2117 | Socks5GetCmdReply(Socket, (SOCKS5REPLY *)Buf); |
2118 | 2118 | *Data = Socket; |
2119 | - Ret = SUCCESS; | |
2119 | + Ret = FFFTP_SUCCESS; | |
2120 | 2120 | } |
2121 | 2121 | return(Ret); |
2122 | 2122 | } |
@@ -157,7 +157,7 @@ static char remoteFileDir[FMAX_PATH + 1]; | ||
157 | 157 | * |
158 | 158 | * Return Value |
159 | 159 | * int ステータス |
160 | -* SUCCESS/FAIL | |
160 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
161 | 161 | *----------------------------------------------------------------------------*/ |
162 | 162 | |
163 | 163 | int MakeListWin(HWND hWnd, HINSTANCE hInst) |
@@ -275,11 +275,11 @@ int MakeListWin(HWND hWnd, HINSTANCE hInst) | ||
275 | 275 | SendMessage(hWndListRemote, LVM_INSERTCOLUMN, 5, (LPARAM)&LvCol); |
276 | 276 | } |
277 | 277 | |
278 | - Sts = SUCCESS; | |
278 | + Sts = FFFTP_SUCCESS; | |
279 | 279 | if((hWndListLocal == NULL) || |
280 | 280 | (hWndListRemote == NULL)) |
281 | 281 | { |
282 | - Sts = FAIL; | |
282 | + Sts = FFFTP_FAIL; | |
283 | 283 | } |
284 | 284 | return(Sts); |
285 | 285 | } |
@@ -1198,7 +1198,7 @@ void GetRemoteDirForWnd(int Mode, int *CancelCheckWork) | ||
1198 | 1198 | { |
1199 | 1199 | ListType = LIST_UNKNOWN; |
1200 | 1200 | |
1201 | - while(GetListOneLine(Str, FMAX_PATH, fd) == SUCCESS) | |
1201 | + while(GetListOneLine(Str, FMAX_PATH, fd) == FFFTP_SUCCESS) | |
1202 | 1202 | { |
1203 | 1203 | if((ListType = AnalizeFileInfo(Str)) != LIST_UNKNOWN) |
1204 | 1204 | { |
@@ -1705,7 +1705,7 @@ void SelectFileInList(HWND hWnd, int Type) | ||
1705 | 1705 | LvItem.state = 0; |
1706 | 1706 | if(GetNodeType(Win, i) != NODE_DRIVE) |
1707 | 1707 | { |
1708 | - if(((FindMode == 0) && (CheckFname(Name, RegExp) == SUCCESS)) || | |
1708 | + if(((FindMode == 0) && (CheckFname(Name, RegExp) == FFFTP_SUCCESS)) || | |
1709 | 1709 | ((FindMode != 0) && (JreGetStrMatchInfo(Name, 0) != NULL))) |
1710 | 1710 | { |
1711 | 1711 | LvItem.state = LVIS_SELECTED; |
@@ -1859,7 +1859,7 @@ void FindFileInList(HWND hWnd, int Type) | ||
1859 | 1859 | _mbslwr(Name); |
1860 | 1860 | |
1861 | 1861 | LvItem.state = 0; |
1862 | - if(((FindMode == 0) && (CheckFname(Name, RegExp) == SUCCESS)) || | |
1862 | + if(((FindMode == 0) && (CheckFname(Name, RegExp) == FFFTP_SUCCESS)) || | |
1863 | 1863 | ((FindMode != 0) && (JreGetStrMatchInfo(Name, 0) != NULL))) |
1864 | 1864 | { |
1865 | 1865 | LvItem.mask = LVIF_STATE; |
@@ -1883,7 +1883,7 @@ void FindFileInList(HWND hWnd, int Type) | ||
1883 | 1883 | _mbslwr(Name); |
1884 | 1884 | |
1885 | 1885 | LvItem.state = 0; |
1886 | - if(((FindMode == 0) && (CheckFname(Name, RegExp) == SUCCESS)) || | |
1886 | + if(((FindMode == 0) && (CheckFname(Name, RegExp) == FFFTP_SUCCESS)) || | |
1887 | 1887 | ((FindMode != 0) && (JreGetStrMatchInfo(Name, 0) != NULL))) |
1888 | 1888 | { |
1889 | 1889 | LvItem.mask = LVIF_STATE; |
@@ -2775,11 +2775,11 @@ void AddRemoteTreeToFileList(int Num, char *Path, int IncDir, FILELIST **Base) | ||
2775 | 2775 | |
2776 | 2776 | ListType = LIST_UNKNOWN; |
2777 | 2777 | |
2778 | - while(GetListOneLine(Str, FMAX_PATH, fd) == SUCCESS) | |
2778 | + while(GetListOneLine(Str, FMAX_PATH, fd) == FFFTP_SUCCESS) | |
2779 | 2779 | { |
2780 | 2780 | if((ListType = AnalizeFileInfo(Str)) == LIST_UNKNOWN) |
2781 | 2781 | { |
2782 | - if(MakeDirPath(Str, ListType, Path, Dir) == SUCCESS) | |
2782 | + if(MakeDirPath(Str, ListType, Path, Dir) == FFFTP_SUCCESS) | |
2783 | 2783 | { |
2784 | 2784 | if(IncDir == RDIR_NLST) |
2785 | 2785 | { |
@@ -2830,7 +2830,7 @@ void AddRemoteTreeToFileList(int Num, char *Path, int IncDir, FILELIST **Base) | ||
2830 | 2830 | * FILE *Fd : ストリーム |
2831 | 2831 | * |
2832 | 2832 | * Return Value |
2833 | -* int ステータス (SUCCESS/FAIL) | |
2833 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
2834 | 2834 | * |
2835 | 2835 | * Note |
2836 | 2836 | * VAX VMS以外の時は fgets(Buf, Max, Fd) と同じ |
@@ -2842,10 +2842,10 @@ static int GetListOneLine(char *Buf, int Max, FILE *Fd) | ||
2842 | 2842 | char Tmp[FMAX_PATH+1]; |
2843 | 2843 | int Sts; |
2844 | 2844 | |
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)) | |
2847 | 2847 | { |
2848 | - Sts = SUCCESS; | |
2848 | + Sts = FFFTP_SUCCESS; | |
2849 | 2849 | RemoveReturnCode(Buf); |
2850 | 2850 | ReplaceAll(Buf, '\x08', ' '); |
2851 | 2851 |
@@ -2854,7 +2854,7 @@ static int GetListOneLine(char *Buf, int Max, FILE *Fd) | ||
2854 | 2854 | if(AskHostType() == HTYPE_VMS) |
2855 | 2855 | { |
2856 | 2856 | if(strchr(Buf, ';') == NULL) /* ファイル名以外の行 */ |
2857 | - Sts = FAIL; | |
2857 | + Sts = FFFTP_FAIL; | |
2858 | 2858 | else |
2859 | 2859 | { |
2860 | 2860 | Max -= strlen(Buf); |
@@ -2892,14 +2892,14 @@ static int GetListOneLine(char *Buf, int Max, FILE *Fd) | ||
2892 | 2892 | * |
2893 | 2893 | * Return Value |
2894 | 2894 | * int ステータス |
2895 | -* SUCCESS/FAIL=ディレクトリ情報でない | |
2895 | +* FFFTP_SUCCESS/FFFTP_FAIL=ディレクトリ情報でない | |
2896 | 2896 | *----------------------------------------------------------------------------*/ |
2897 | 2897 | |
2898 | 2898 | static int MakeDirPath(char *Str, int ListType, char *Path, char *Dir) |
2899 | 2899 | { |
2900 | 2900 | int Sts; |
2901 | 2901 | |
2902 | - Sts = FAIL; | |
2902 | + Sts = FFFTP_FAIL; | |
2903 | 2903 | switch(ListType) |
2904 | 2904 | { |
2905 | 2905 | case LIST_ACOS : |
@@ -2929,7 +2929,7 @@ static int MakeDirPath(char *Str, int ListType, char *Path, char *Dir) | ||
2929 | 2929 | ReplaceAll(Dir, '\\', '/'); |
2930 | 2930 | } |
2931 | 2931 | } |
2932 | - Sts = SUCCESS; | |
2932 | + Sts = FFFTP_SUCCESS; | |
2933 | 2933 | } |
2934 | 2934 | break; |
2935 | 2935 | } |
@@ -3177,13 +3177,13 @@ static int AnalizeFileInfo(char *Str) | ||
3177 | 3177 | /* LIST_UNIX_10, LIST_UNIX_20, LIST_UNIX_12, LIST_UNIX_22, LIST_UNIX_50, LIST_UNIX_60 */ |
3178 | 3178 | /* MELCOM80 */ |
3179 | 3179 | |
3180 | - if(FindField(Str, Tmp, 0, NO) == SUCCESS) | |
3180 | + if(FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) | |
3181 | 3181 | { |
3182 | 3182 | /* MELCOM80は "d rwxrwxrwx" のようにスペースが空いている */ |
3183 | 3183 | Flag1 = NO; |
3184 | 3184 | if((strlen(Tmp) == 1) && (strchr("-dDlL", Tmp[0]) != NULL)) |
3185 | 3185 | { |
3186 | - if(FindField(Str, Tmp, 1, NO) == SUCCESS) | |
3186 | + if(FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) | |
3187 | 3187 | { |
3188 | 3188 | if((strlen(Tmp) == 9) || |
3189 | 3189 | ((strlen(Tmp) > 9) && (IsDigit(Tmp[9]) != 0))) |
@@ -3207,7 +3207,7 @@ static int AnalizeFileInfo(char *Str) | ||
3207 | 3207 | |
3208 | 3208 | //////////// |
3209 | 3209 | // LIST_UNIX_60 support |
3210 | - if(FindField(Str, Tmp, 7+Add1, NO) == SUCCESS) | |
3210 | + if(FindField(Str, Tmp, 7+Add1, NO) == FFFTP_SUCCESS) | |
3211 | 3211 | { |
3212 | 3212 | GetMonth(Tmp, &Month, &Day); |
3213 | 3213 | if(Month != 0) |
@@ -3220,7 +3220,7 @@ static int AnalizeFileInfo(char *Str) | ||
3220 | 3220 | //////////// |
3221 | 3221 | // LIST_UNIX_12 support |
3222 | 3222 | if((Ret == LIST_UNKNOWN) && |
3223 | - (FindField(Str, Tmp, 6+Add1, NO) == SUCCESS)) | |
3223 | + (FindField(Str, Tmp, 6+Add1, NO) == FFFTP_SUCCESS)) | |
3224 | 3224 | { |
3225 | 3225 | GetMonth(Tmp, &Month, &Day); |
3226 | 3226 | if(Month != 0) |
@@ -3233,7 +3233,7 @@ static int AnalizeFileInfo(char *Str) | ||
3233 | 3233 | //////////// |
3234 | 3234 | // LIST_UNIX_70 support |
3235 | 3235 | if((Ret == LIST_UNKNOWN) && |
3236 | - (FindField(Str, Tmp, 6+Add1, NO) == SUCCESS)) | |
3236 | + (FindField(Str, Tmp, 6+Add1, NO) == FFFTP_SUCCESS)) | |
3237 | 3237 | { |
3238 | 3238 | GetMonth(Tmp, &Month, &Day); |
3239 | 3239 | if(Month != 0) |
@@ -3244,7 +3244,7 @@ static int AnalizeFileInfo(char *Str) | ||
3244 | 3244 | /////////// |
3245 | 3245 | |
3246 | 3246 | if((Ret == LIST_UNKNOWN) && |
3247 | - (FindField(Str, Tmp, 5+Add1, NO) == SUCCESS)) | |
3247 | + (FindField(Str, Tmp, 5+Add1, NO) == FFFTP_SUCCESS)) | |
3248 | 3248 | { |
3249 | 3249 | GetMonth(Tmp, &Month, &Day); |
3250 | 3250 | if(Month != 0) |
@@ -3254,7 +3254,7 @@ static int AnalizeFileInfo(char *Str) | ||
3254 | 3254 | } |
3255 | 3255 | |
3256 | 3256 | if((Ret == LIST_UNKNOWN) && |
3257 | - (FindField(Str, Tmp, 4+Add1, NO) == SUCCESS)) | |
3257 | + (FindField(Str, Tmp, 4+Add1, NO) == FFFTP_SUCCESS)) | |
3258 | 3258 | { |
3259 | 3259 | GetMonth(Tmp, &Month, &Day); |
3260 | 3260 | if(Month != 0) |
@@ -3264,7 +3264,7 @@ static int AnalizeFileInfo(char *Str) | ||
3264 | 3264 | } |
3265 | 3265 | |
3266 | 3266 | if((Ret == LIST_UNKNOWN) && |
3267 | - (FindField(Str, Tmp, 3+Add1, NO) == SUCCESS)) | |
3267 | + (FindField(Str, Tmp, 3+Add1, NO) == FFFTP_SUCCESS)) | |
3268 | 3268 | { |
3269 | 3269 | GetMonth(Tmp, &Month, &Day); |
3270 | 3270 | if(Month != 0) |
@@ -3283,16 +3283,16 @@ static int AnalizeFileInfo(char *Str) | ||
3283 | 3283 | |
3284 | 3284 | if(Ret == LIST_UNKNOWN) |
3285 | 3285 | { |
3286 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3286 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3287 | 3287 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3288 | 3288 | { |
3289 | - if((FindField(Str, Tmp, 3, NO) == SUCCESS) && | |
3289 | + if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) && | |
3290 | 3290 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3291 | 3291 | { |
3292 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3292 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3293 | 3293 | (IsDigit(Tmp[0]) != 0)) |
3294 | 3294 | { |
3295 | - if(FindField(Str, Tmp, 5, NO) == SUCCESS) | |
3295 | + if(FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) | |
3296 | 3296 | { |
3297 | 3297 | Ret = LIST_AS400; |
3298 | 3298 | } |
@@ -3306,19 +3306,19 @@ static int AnalizeFileInfo(char *Str) | ||
3306 | 3306 | |
3307 | 3307 | if(Ret == LIST_UNKNOWN) |
3308 | 3308 | { |
3309 | - if((FindField(Str, Tmp, 5, NO) == SUCCESS) && | |
3309 | + if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) && | |
3310 | 3310 | (CheckYYMMDDformat(Tmp, '*', NO) != 0)) |
3311 | 3311 | { |
3312 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3312 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3313 | 3313 | ((IsDigit(Tmp[0]) != 0) || (StrAllSameChar(Tmp, '*') == YES))) |
3314 | 3314 | { |
3315 | - if((FindField(Str, Tmp, 3, NO) == SUCCESS) && | |
3315 | + if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) && | |
3316 | 3316 | ((IsDigit(Tmp[0]) != 0) || (StrAllSameChar(Tmp, '*') == YES))) |
3317 | 3317 | { |
3318 | - if((FindField(Str, Tmp, 0, NO) == SUCCESS) && | |
3318 | + if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) && | |
3319 | 3319 | (strlen(Tmp) == 4)) |
3320 | 3320 | { |
3321 | - if(FindField(Str, Tmp, 6, NO) == SUCCESS) | |
3321 | + if(FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS) | |
3322 | 3322 | { |
3323 | 3323 | Ret = LIST_M1800; |
3324 | 3324 | } |
@@ -3333,16 +3333,16 @@ static int AnalizeFileInfo(char *Str) | ||
3333 | 3333 | |
3334 | 3334 | if(Ret == LIST_UNKNOWN) |
3335 | 3335 | { |
3336 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3336 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3337 | 3337 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3338 | 3338 | { |
3339 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3339 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3340 | 3340 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3341 | 3341 | { |
3342 | - if((FindField(Str, Tmp, 5, NO) == SUCCESS) && | |
3342 | + if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) && | |
3343 | 3343 | (IsDigit(Tmp[0]) != 0)) |
3344 | 3344 | { |
3345 | - if(FindField(Str, Tmp, 6, NO) == SUCCESS) | |
3345 | + if(FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS) | |
3346 | 3346 | { |
3347 | 3347 | Ret = LIST_GP6000; |
3348 | 3348 | } |
@@ -3356,15 +3356,15 @@ static int AnalizeFileInfo(char *Str) | ||
3356 | 3356 | |
3357 | 3357 | if(Ret == LIST_UNKNOWN) |
3358 | 3358 | { |
3359 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3359 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3360 | 3360 | (CheckHHMMformat(Tmp) == YES)) |
3361 | 3361 | { |
3362 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3362 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3363 | 3363 | ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0))) |
3364 | 3364 | { |
3365 | - if(FindField(Str, Tmp, 3, NO) == SUCCESS) | |
3365 | + if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) | |
3366 | 3366 | { |
3367 | - if((FindField(Str, Tmp, 0, NO) == SUCCESS) && | |
3367 | + if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) && | |
3368 | 3368 | (CheckYYMMDDformat(Tmp, NUL, YES) != 0)) |
3369 | 3369 | { |
3370 | 3370 | TmpInt = atoi(Tmp); |
@@ -3383,13 +3383,13 @@ static int AnalizeFileInfo(char *Str) | ||
3383 | 3383 | |
3384 | 3384 | if(Ret == LIST_UNKNOWN) |
3385 | 3385 | { |
3386 | - if((FindField(Str, Tmp, 3, NO) == SUCCESS) && | |
3386 | + if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) && | |
3387 | 3387 | (CheckHHMMformat(Tmp) == YES)) |
3388 | 3388 | { |
3389 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3389 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3390 | 3390 | ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0))) |
3391 | 3391 | { |
3392 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3392 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3393 | 3393 | (CheckYYMMDDformat(Tmp, NUL, YES) != 0)) |
3394 | 3394 | { |
3395 | 3395 | Ret = LIST_DOS_3; |
@@ -3403,16 +3403,16 @@ static int AnalizeFileInfo(char *Str) | ||
3403 | 3403 | |
3404 | 3404 | if(Ret == LIST_UNKNOWN) |
3405 | 3405 | { |
3406 | - if((FindField(Str, Tmp, 0, NO) == SUCCESS) && | |
3406 | + if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) && | |
3407 | 3407 | (CheckYYYYMMDDformat(Tmp, NUL) == YES)) |
3408 | 3408 | { |
3409 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3409 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3410 | 3410 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3411 | 3411 | { |
3412 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3412 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3413 | 3413 | ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0))) |
3414 | 3414 | { |
3415 | - if(FindField(Str, Tmp, 3, NO) == SUCCESS) | |
3415 | + if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) | |
3416 | 3416 | { |
3417 | 3417 | Ret = LIST_DOS_4; |
3418 | 3418 | } |
@@ -3426,15 +3426,15 @@ static int AnalizeFileInfo(char *Str) | ||
3426 | 3426 | |
3427 | 3427 | if(Ret == LIST_UNKNOWN) |
3428 | 3428 | { |
3429 | - if(FindField(Str, Tmp, 2, NO) == SUCCESS) | |
3429 | + if(FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) | |
3430 | 3430 | { |
3431 | 3431 | GetMonth(Tmp, &Month, &Day); |
3432 | 3432 | if((Month != 0) && (Day == 0)) |
3433 | 3433 | { |
3434 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3434 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3435 | 3435 | ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0))) |
3436 | 3436 | { |
3437 | - if((FindField(Str, Tmp, 5, NO) == SUCCESS) && | |
3437 | + if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) && | |
3438 | 3438 | (CheckHHMMformat(Tmp) == YES)) |
3439 | 3439 | { |
3440 | 3440 | Ret = LIST_CHAMELEON; |
@@ -3449,16 +3449,16 @@ static int AnalizeFileInfo(char *Str) | ||
3449 | 3449 | |
3450 | 3450 | if(Ret == LIST_UNKNOWN) |
3451 | 3451 | { |
3452 | - if((FindField(Str, Tmp, 3, NO) == SUCCESS) && | |
3452 | + if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) && | |
3453 | 3453 | (CheckHHMMformat(Tmp) == YES)) |
3454 | 3454 | { |
3455 | - if((FindField(Str, Tmp, 0, NO) == SUCCESS) && | |
3455 | + if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) && | |
3456 | 3456 | (IsDigit(Tmp[0]) != 0)) |
3457 | 3457 | { |
3458 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3458 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3459 | 3459 | (CheckYYMMDDformat(Tmp, NUL, YES) != 0)) |
3460 | 3460 | { |
3461 | - if(FindField(Str, Tmp, 4, NO) == SUCCESS) | |
3461 | + if(FindField(Str, Tmp, 4, NO) == FFFTP_SUCCESS) | |
3462 | 3462 | { |
3463 | 3463 | Ret = LIST_OS2; |
3464 | 3464 | } |
@@ -3472,32 +3472,32 @@ static int AnalizeFileInfo(char *Str) | ||
3472 | 3472 | |
3473 | 3473 | if(Ret == LIST_UNKNOWN) |
3474 | 3474 | { |
3475 | - if((FindField(Str, Tmp, 0, NO) == SUCCESS) && | |
3475 | + if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) && | |
3476 | 3476 | (strlen(Tmp) == 10)) |
3477 | 3477 | { |
3478 | - if((FindField(Str, Tmp, 3, NO) == SUCCESS) && | |
3478 | + if((FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) && | |
3479 | 3479 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3480 | 3480 | { |
3481 | - if((FindField(Str, Tmp, 4, NO) == SUCCESS) && | |
3481 | + if((FindField(Str, Tmp, 4, NO) == FFFTP_SUCCESS) && | |
3482 | 3482 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3483 | 3483 | { |
3484 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3484 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3485 | 3485 | (IsDigit(Tmp[0]) != 0)) |
3486 | 3486 | { |
3487 | - if(FindField(Str, Tmp, 5, NO) == SUCCESS) | |
3487 | + if(FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) | |
3488 | 3488 | { |
3489 | 3489 | Ret = LIST_OS7_2; |
3490 | 3490 | } |
3491 | 3491 | } |
3492 | 3492 | } |
3493 | 3493 | } |
3494 | - else if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3494 | + else if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3495 | 3495 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3496 | 3496 | { |
3497 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3497 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3498 | 3498 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3499 | 3499 | { |
3500 | - if(FindField(Str, Tmp, 3, NO) == SUCCESS) | |
3500 | + if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) | |
3501 | 3501 | { |
3502 | 3502 | Ret = LIST_OS7_1; |
3503 | 3503 | } |
@@ -3511,18 +3511,18 @@ static int AnalizeFileInfo(char *Str) | ||
3511 | 3511 | |
3512 | 3512 | if(Ret == LIST_UNKNOWN) |
3513 | 3513 | { |
3514 | - if((FindField(Str, Tmp, 0, NO) == SUCCESS) && | |
3514 | + if((FindField(Str, Tmp, 0, NO) == FFFTP_SUCCESS) && | |
3515 | 3515 | ((Tmp[0] == '<') || (IsDigit(Tmp[0]) != 0))) |
3516 | 3516 | { |
3517 | - if((FindField(Str, Tmp, 5, NO) == SUCCESS) && | |
3517 | + if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) && | |
3518 | 3518 | (CheckHHMMformat(Tmp) == YES)) |
3519 | 3519 | { |
3520 | - if(FindField(Str, Tmp, 3, NO) == SUCCESS) | |
3520 | + if(FindField(Str, Tmp, 3, NO) == FFFTP_SUCCESS) | |
3521 | 3521 | { |
3522 | 3522 | GetMonth(Tmp, &Month, &Day); |
3523 | 3523 | if(Month != 0) |
3524 | 3524 | { |
3525 | - if((FindField(Str, Tmp, 6, NO) == SUCCESS) && | |
3525 | + if((FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS) && | |
3526 | 3526 | (IsDigit(Tmp[0]) != 0)) |
3527 | 3527 | { |
3528 | 3528 | Ret = LIST_ALLIED; |
@@ -3538,16 +3538,16 @@ static int AnalizeFileInfo(char *Str) | ||
3538 | 3538 | |
3539 | 3539 | if(Ret == LIST_UNKNOWN) |
3540 | 3540 | { |
3541 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && | |
3541 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && | |
3542 | 3542 | (CheckYYMMDDformat(Tmp, NUL, NO) != 0)) |
3543 | 3543 | { |
3544 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3544 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3545 | 3545 | (IsDigit(Tmp[0]) != 0) && (strlen(Tmp) == 4)) |
3546 | 3546 | { |
3547 | - if((FindField(Str, Tmp, 5, NO) == SUCCESS) && | |
3547 | + if((FindField(Str, Tmp, 5, NO) == FFFTP_SUCCESS) && | |
3548 | 3548 | (IsDigit(Tmp[0]) != 0)) |
3549 | 3549 | { |
3550 | - if(FindField(Str, Tmp, 6, NO) == SUCCESS) | |
3550 | + if(FindField(Str, Tmp, 6, NO) == FFFTP_SUCCESS) | |
3551 | 3551 | { |
3552 | 3552 | Ret = LIST_OS9; |
3553 | 3553 | } |
@@ -3561,14 +3561,14 @@ static int AnalizeFileInfo(char *Str) | ||
3561 | 3561 | |
3562 | 3562 | if(Ret == LIST_UNKNOWN) |
3563 | 3563 | { |
3564 | - if((FindField(Str, Tmp, 2, NO) == SUCCESS) && | |
3564 | + if((FindField(Str, Tmp, 2, NO) == FFFTP_SUCCESS) && | |
3565 | 3565 | (CheckYYYYMMDDformat(Tmp, NUL) == YES)) |
3566 | 3566 | { |
3567 | - if((FindField(Str, Tmp, 1, NO) == SUCCESS) && IsDigit(Tmp[0])) | |
3567 | + if((FindField(Str, Tmp, 1, NO) == FFFTP_SUCCESS) && IsDigit(Tmp[0])) | |
3568 | 3568 | { |
3569 | - if((FindField(Str, Tmp, 7, NO) == SUCCESS) && IsDigit(Tmp[0])) | |
3569 | + if((FindField(Str, Tmp, 7, NO) == FFFTP_SUCCESS) && IsDigit(Tmp[0])) | |
3570 | 3570 | { |
3571 | - if(FindField(Str, Tmp, 9, NO) == SUCCESS) | |
3571 | + if(FindField(Str, Tmp, 9, NO) == FFFTP_SUCCESS) | |
3572 | 3572 | { |
3573 | 3573 | Ret = LIST_IBM; |
3574 | 3574 | } |
@@ -3617,13 +3617,13 @@ static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day) | ||
3617 | 3617 | |
3618 | 3618 | // unix系チェック |
3619 | 3619 | if((Day != 0) || |
3620 | - ((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == SUCCESS) && | |
3620 | + ((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) && | |
3621 | 3621 | ((atoi(Tmp) >= 1) && (atoi(Tmp) <= 31)))) |
3622 | 3622 | { |
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))) | |
3625 | 3625 | { |
3626 | - if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == SUCCESS) | |
3626 | + if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) | |
3627 | 3627 | { |
3628 | 3628 | Flag = 1; |
3629 | 3629 | } |
@@ -3633,13 +3633,13 @@ static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day) | ||
3633 | 3633 | // 中国語Solaris専用 |
3634 | 3634 | if(Flag == 0) |
3635 | 3635 | { |
3636 | - if((FindField(Str, Tmp, 7+Add1+Add2+Add3, NO) == SUCCESS) && | |
3636 | + if((FindField(Str, Tmp, 7+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) && | |
3637 | 3637 | ((atoi(Tmp) >= 1) && (atoi(Tmp) <= 31))) |
3638 | 3638 | { |
3639 | - if((FindField(Str, Tmp, 5+Add1+Add2+Add3, NO) == SUCCESS) && | |
3639 | + if((FindField(Str, Tmp, 5+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) && | |
3640 | 3640 | (atoi(Tmp) >= 1900)) |
3641 | 3641 | { |
3642 | - if((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == SUCCESS) && | |
3642 | + if((FindField(Str, Tmp, 6+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) && | |
3643 | 3643 | (((atoi(Tmp) >= 1) && (atoi(Tmp) <= 9) && |
3644 | 3644 | ((unsigned char)Tmp[1] == 0xD4) && |
3645 | 3645 | ((unsigned char)Tmp[2] == 0xC2)) || |
@@ -3647,7 +3647,7 @@ static int CheckUnixType(char *Str, char *Tmp, int Add1, int Add2, int Day) | ||
3647 | 3647 | ((unsigned char)Tmp[2] == 0xD4) && |
3648 | 3648 | ((unsigned char)Tmp[3] == 0xC2)))) |
3649 | 3649 | { |
3650 | - if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == SUCCESS) | |
3650 | + if(FindField(Str, Tmp, 8+Add1+Add2+Add3, NO) == FFFTP_SUCCESS) | |
3651 | 3651 | { |
3652 | 3652 | Flag = 2; |
3653 | 3653 | } |
@@ -3967,7 +3967,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
3967 | 3967 | *Size = _atoi64(Buf); |
3968 | 3968 | |
3969 | 3969 | /* 名前 */ |
3970 | - if(FindField(Str, Fname, DosPos[offs][3], DosLongFname[offs]) == SUCCESS) | |
3970 | + if(FindField(Str, Fname, DosPos[offs][3], DosLongFname[offs]) == FFFTP_SUCCESS) | |
3971 | 3971 | { |
3972 | 3972 | Ret = NODE_FILE; |
3973 | 3973 | if(Buf[0] == '<') |
@@ -3999,7 +3999,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
3999 | 3999 | *Size = _atoi64(Buf); |
4000 | 4000 | |
4001 | 4001 | /* 名前 */ |
4002 | - if(FindField(Str, Fname, 3, YES) == SUCCESS) | |
4002 | + if(FindField(Str, Fname, 3, YES) == FFFTP_SUCCESS) | |
4003 | 4003 | { |
4004 | 4004 | Ret = NODE_FILE; |
4005 | 4005 | if(Buf[0] == '<') |
@@ -4034,7 +4034,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4034 | 4034 | *Size = _atoi64(Buf); |
4035 | 4035 | |
4036 | 4036 | /* 名前 */ |
4037 | - if(FindField(Str, Fname, 4, YES) == SUCCESS) | |
4037 | + if(FindField(Str, Fname, 4, YES) == FFFTP_SUCCESS) | |
4038 | 4038 | { |
4039 | 4039 | FindField(Str, Buf, 1, NO); |
4040 | 4040 | Ret = NODE_FILE; |
@@ -4073,7 +4073,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4073 | 4073 | *Size = _atoi64(Buf); |
4074 | 4074 | |
4075 | 4075 | /* 名前 */ |
4076 | - if(FindField(Str, Fname, 0, NO) == SUCCESS) | |
4076 | + if(FindField(Str, Fname, 0, NO) == FFFTP_SUCCESS) | |
4077 | 4077 | { |
4078 | 4078 | Ret = NODE_FILE; |
4079 | 4079 | if(Buf[0] == '<') |
@@ -4108,7 +4108,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4108 | 4108 | *Size = _atoi64(Buf); |
4109 | 4109 | |
4110 | 4110 | /* 名前 */ |
4111 | - if(FindField(Str, Fname, 5, YES) == SUCCESS) | |
4111 | + if(FindField(Str, Fname, 5, YES) == FFFTP_SUCCESS) | |
4112 | 4112 | { |
4113 | 4113 | Ret = NODE_FILE; |
4114 | 4114 | if((Pos = strchr(Fname, '/')) != NULL) |
@@ -4147,7 +4147,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4147 | 4147 | } |
4148 | 4148 | |
4149 | 4149 | /* 名前 */ |
4150 | - if(FindField(Str, Fname, 6, YES) == SUCCESS) | |
4150 | + if(FindField(Str, Fname, 6, YES) == FFFTP_SUCCESS) | |
4151 | 4151 | { |
4152 | 4152 | RemoveTailingSpaces(Fname); |
4153 | 4153 | Ret = NODE_FILE; |
@@ -4190,7 +4190,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4190 | 4190 | *Attr = AttrString2Value(Buf+1); |
4191 | 4191 | |
4192 | 4192 | /* 名前 */ |
4193 | - if(FindField(Str, Fname, 6, YES) == SUCCESS) | |
4193 | + if(FindField(Str, Fname, 6, YES) == FFFTP_SUCCESS) | |
4194 | 4194 | { |
4195 | 4195 | Ret = NODE_FILE; |
4196 | 4196 | if(strchr("dl", Buf[0]) != NULL) |
@@ -4274,7 +4274,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4274 | 4274 | *Attr = AttrString2Value(Buf+1); |
4275 | 4275 | |
4276 | 4276 | /* 名前 */ |
4277 | - if(FindField(Str, Fname, 3+offs, YES) == SUCCESS) | |
4277 | + if(FindField(Str, Fname, 3+offs, YES) == FFFTP_SUCCESS) | |
4278 | 4278 | { |
4279 | 4279 | RemoveTailingSpaces(Fname); |
4280 | 4280 | Ret = NODE_FILE; |
@@ -4284,7 +4284,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4284 | 4284 | break; |
4285 | 4285 | |
4286 | 4286 | case LIST_STRATUS : |
4287 | - if(FindField(Str, Buf, 0, NO) != SUCCESS) | |
4287 | + if(FindField(Str, Buf, 0, NO) != FFFTP_SUCCESS) | |
4288 | 4288 | break; |
4289 | 4289 | if(_strnicmp(Buf, "Files:", 6) == 0) |
4290 | 4290 | StratusMode = 0; |
@@ -4304,14 +4304,14 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4304 | 4304 | *InfoExist |= (FINFO_TIME | FINFO_DATE); |
4305 | 4305 | |
4306 | 4306 | /* 日付 */ |
4307 | - if(FindField(Str, Buf, 2+offs, NO) != SUCCESS) | |
4307 | + if(FindField(Str, Buf, 2+offs, NO) != FFFTP_SUCCESS) | |
4308 | 4308 | break; |
4309 | 4309 | sTime.wYear = Assume1900or2000(atoi(Buf)); |
4310 | 4310 | sTime.wMonth = atoi(Buf + 3); |
4311 | 4311 | sTime.wDay = atoi(Buf + 6); |
4312 | 4312 | |
4313 | 4313 | /* 時刻 */ |
4314 | - if(FindField(Str, Buf, 3+offs, NO) != SUCCESS) | |
4314 | + if(FindField(Str, Buf, 3+offs, NO) != FFFTP_SUCCESS) | |
4315 | 4315 | break; |
4316 | 4316 | sTime.wHour = atoi(Buf); |
4317 | 4317 | sTime.wMinute = atoi(Buf+3); |
@@ -4321,7 +4321,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4321 | 4321 | SpecificLocalFileTime2FileTime(Time, AskHostTimeZone()); |
4322 | 4322 | |
4323 | 4323 | /* 名前 */ |
4324 | - if(FindField(Str, Fname, 4+offs, YES) != SUCCESS) | |
4324 | + if(FindField(Str, Fname, 4+offs, YES) != FFFTP_SUCCESS) | |
4325 | 4325 | break; |
4326 | 4326 | |
4327 | 4327 | if(StratusMode == 0) |
@@ -4329,12 +4329,12 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4329 | 4329 | *InfoExist |= FINFO_SIZE; |
4330 | 4330 | |
4331 | 4331 | /* サイズ */ |
4332 | - if(FindField(Str, Buf, 1, NO) != SUCCESS) | |
4332 | + if(FindField(Str, Buf, 1, NO) != FFFTP_SUCCESS) | |
4333 | 4333 | break; |
4334 | 4334 | *Size = _atoi64(Buf) * 4096; |
4335 | 4335 | |
4336 | 4336 | /* 種類(オーナ名のフィールドにいれる) */ |
4337 | - if(FindField(Str, Buf, 2, NO) != SUCCESS) | |
4337 | + if(FindField(Str, Buf, 2, NO) != FFFTP_SUCCESS) | |
4338 | 4338 | break; |
4339 | 4339 | strncpy(Owner, Buf, OWNER_NAME_LEN); |
4340 | 4340 |
@@ -4351,18 +4351,18 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4351 | 4351 | /* 日付 */ |
4352 | 4352 | for(offs = 11; offs > 7; offs--) |
4353 | 4353 | { |
4354 | - if((err = FindField(Str, Buf, offs, NO)) == SUCCESS) | |
4354 | + if((err = FindField(Str, Buf, offs, NO)) == FFFTP_SUCCESS) | |
4355 | 4355 | break; |
4356 | 4356 | } |
4357 | - if(err != SUCCESS) | |
4357 | + if(err != FFFTP_SUCCESS) | |
4358 | 4358 | break; |
4359 | 4359 | if(IsDigit(*Buf) == 0) |
4360 | 4360 | break; |
4361 | 4361 | sTime.wYear = Assume1900or2000(atoi(Buf)); |
4362 | - if(FindField(Str, Buf, --offs, NO) != SUCCESS) | |
4362 | + if(FindField(Str, Buf, --offs, NO) != FFFTP_SUCCESS) | |
4363 | 4363 | break; |
4364 | 4364 | GetMonth(Buf, &sTime.wMonth, &sTime.wDay); |
4365 | - if(FindField(Str, Buf, --offs, NO) != SUCCESS) | |
4365 | + if(FindField(Str, Buf, --offs, NO) != FFFTP_SUCCESS) | |
4366 | 4366 | break; |
4367 | 4367 | if(IsDigit(*Buf) == 0) |
4368 | 4368 | break; |
@@ -4375,35 +4375,35 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4375 | 4375 | SpecificLocalFileTime2FileTime(Time, AskHostTimeZone()); |
4376 | 4376 | |
4377 | 4377 | /* オーナ名 */ |
4378 | - if(FindField(Str, Buf, --offs, NO) != SUCCESS) | |
4378 | + if(FindField(Str, Buf, --offs, NO) != FFFTP_SUCCESS) | |
4379 | 4379 | break; |
4380 | 4380 | strncpy(Owner, Buf, OWNER_NAME_LEN); |
4381 | 4381 | |
4382 | 4382 | /* サイズ */ |
4383 | 4383 | do |
4384 | 4384 | { |
4385 | - if((err = FindField(Str, Buf, --offs, NO)) != SUCCESS) | |
4385 | + if((err = FindField(Str, Buf, --offs, NO)) != FFFTP_SUCCESS) | |
4386 | 4386 | break; |
4387 | 4387 | } |
4388 | 4388 | while(IsDigit(*Buf) == 0); |
4389 | 4389 | --offs; |
4390 | - if((err = FindField(Str, Buf, --offs, NO)) != SUCCESS) | |
4390 | + if((err = FindField(Str, Buf, --offs, NO)) != FFFTP_SUCCESS) | |
4391 | 4391 | break; |
4392 | 4392 | RemoveComma(Buf); |
4393 | 4393 | *Size = _atoi64(Buf); |
4394 | - if((err = FindField(Str, Buf, --offs, NO)) != SUCCESS) | |
4394 | + if((err = FindField(Str, Buf, --offs, NO)) != FFFTP_SUCCESS) | |
4395 | 4395 | break; |
4396 | 4396 | if(IsDigit(*Buf) == 0) |
4397 | 4397 | break; |
4398 | 4398 | /* 名前 */ |
4399 | - if(FindField(Str, Fname, 0, NO) != SUCCESS) | |
4399 | + if(FindField(Str, Fname, 0, NO) != FFFTP_SUCCESS) | |
4400 | 4400 | break; |
4401 | 4401 | /* 種類 */ |
4402 | 4402 | if(offs == 0) |
4403 | 4403 | Ret = NODE_FILE; |
4404 | 4404 | else |
4405 | 4405 | { |
4406 | - if((FindField(Str, Buf, 1, NO) == SUCCESS) && | |
4406 | + if((FindField(Str, Buf, 1, NO) == FFFTP_SUCCESS) && | |
4407 | 4407 | (strcmp(Buf, "DR") == 0)) |
4408 | 4408 | Ret = NODE_DIR; |
4409 | 4409 | else |
@@ -4436,7 +4436,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4436 | 4436 | *Size = _atoi64(Buf); |
4437 | 4437 | |
4438 | 4438 | /* 名前 */ |
4439 | - if(FindField(Str, Fname, 1, NO) == SUCCESS) | |
4439 | + if(FindField(Str, Fname, 1, NO) == FFFTP_SUCCESS) | |
4440 | 4440 | { |
4441 | 4441 | Ret = NODE_FILE; |
4442 | 4442 | if(Buf[0] == '<') |
@@ -4476,7 +4476,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4476 | 4476 | FindField(Str, Buf, 3, NO); |
4477 | 4477 | |
4478 | 4478 | /* 名前 */ |
4479 | - if(FindField(Str, Fname, 6, NO) == SUCCESS) | |
4479 | + if(FindField(Str, Fname, 6, NO) == FFFTP_SUCCESS) | |
4480 | 4480 | { |
4481 | 4481 | if((Buf[0] == 'd') || (Buf[0] == 'D')) |
4482 | 4482 | Ret = NODE_DIR; |
@@ -4503,7 +4503,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4503 | 4503 | |
4504 | 4504 | /* 名前 */ |
4505 | 4505 | FindField(Str, Buf, 8, NO); |
4506 | - if(FindField(Str, Fname, 9, NO) == SUCCESS) | |
4506 | + if(FindField(Str, Fname, 9, NO) == FFFTP_SUCCESS) | |
4507 | 4507 | { |
4508 | 4508 | if(strcmp(Buf, "PO") == 0) |
4509 | 4509 | Ret = NODE_DIR; |
@@ -4528,7 +4528,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4528 | 4528 | *Attr = AttrString2Value(Buf+1); |
4529 | 4529 | |
4530 | 4530 | /* 名前 */ |
4531 | - if(FindField(Str, Fname, 5, YES) == SUCCESS) | |
4531 | + if(FindField(Str, Fname, 5, YES) == FFFTP_SUCCESS) | |
4532 | 4532 | { |
4533 | 4533 | Ret = NODE_FILE; |
4534 | 4534 | if(strchr("dl", Buf[0]) != NULL) |
@@ -4566,7 +4566,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4566 | 4566 | |
4567 | 4567 | /* 種類 */ |
4568 | 4568 | Ret = NODE_FILE; |
4569 | - if(FindField(Str, Buf, 4, NO) == SUCCESS) | |
4569 | + if(FindField(Str, Buf, 4, NO) == FFFTP_SUCCESS) | |
4570 | 4570 | { |
4571 | 4571 | if(strcmp(Buf, "<DIR>") == 0) |
4572 | 4572 | Ret = NODE_DIR; |
@@ -4715,12 +4715,12 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4715 | 4715 | |
4716 | 4716 | FindField(Str, Buf, 5+offs, NO); |
4717 | 4717 | /* 日付が 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) | |
4719 | 4719 | { |
4720 | 4720 | sTime.wYear = Assume1900or2000(sTime.wYear); |
4721 | 4721 | |
4722 | 4722 | 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) | |
4724 | 4724 | *InfoExist |= FINFO_TIME; |
4725 | 4725 | } |
4726 | 4726 | else |
@@ -4733,7 +4733,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4733 | 4733 | } |
4734 | 4734 | |
4735 | 4735 | 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) | |
4737 | 4737 | { |
4738 | 4738 | sTime.wYear = atoi(Buf); |
4739 | 4739 | } |
@@ -4780,7 +4780,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4780 | 4780 | SpecificLocalFileTime2FileTime(Time, AskHostTimeZone()); |
4781 | 4781 | |
4782 | 4782 | /* 名前 */ |
4783 | - if(FindField(Str, Fname, 8+offs+offs2, YES) == SUCCESS) | |
4783 | + if(FindField(Str, Fname, 8+offs+offs2, YES) == FFFTP_SUCCESS) | |
4784 | 4784 | { |
4785 | 4785 | Flag = 'B'; |
4786 | 4786 | if(OrgListType & LIST_MELCOM) |
@@ -4836,7 +4836,7 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
4836 | 4836 | * |
4837 | 4837 | * Return Value |
4838 | 4838 | * int ステータス |
4839 | -* SUCCESS/FAIL | |
4839 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
4840 | 4840 | *----------------------------------------------------------------------------*/ |
4841 | 4841 | |
4842 | 4842 | 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) | ||
4844 | 4844 | char *Pos; |
4845 | 4845 | int Sts; |
4846 | 4846 | |
4847 | - Sts = FAIL; | |
4847 | + Sts = FFFTP_FAIL; | |
4848 | 4848 | *Buf = NUL; |
4849 | 4849 | if(Num >= 0) |
4850 | 4850 | { |
@@ -4879,7 +4879,7 @@ static int FindField(char *Str, char *Buf, int Num, int ToLast) | ||
4879 | 4879 | strncpy(Buf, Str, Pos - Str); |
4880 | 4880 | *(Buf + (Pos - Str)) = NUL; |
4881 | 4881 | } |
4882 | - Sts = SUCCESS; | |
4882 | + Sts = FFFTP_SUCCESS; | |
4883 | 4883 | } |
4884 | 4884 | return(Sts); |
4885 | 4885 | } |
@@ -4977,18 +4977,18 @@ static void GetMonth(char *Str, WORD *Month, WORD *Day) | ||
4977 | 4977 | * WORD *Day : 日 |
4978 | 4978 | * |
4979 | 4979 | * Return Value |
4980 | -* int ステータス (SUCCESS/FAIL=日付を表す文字ではない) | |
4980 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL=日付を表す文字ではない) | |
4981 | 4981 | * |
4982 | 4982 | * Note |
4983 | 4983 | * 以下の形式をサポート |
4984 | 4984 | * 01/07/25 |
4985 | -* FAILを返す時は *Year = 0; *Month = 0; *Day = 0 | |
4985 | +* FFFTP_FAILを返す時は *Year = 0; *Month = 0; *Day = 0 | |
4986 | 4986 | *----------------------------------------------------------------------------*/ |
4987 | 4987 | static int GetYearMonthDay(char *Str, WORD *Year, WORD *Month, WORD *Day) |
4988 | 4988 | { |
4989 | 4989 | int Sts; |
4990 | 4990 | |
4991 | - Sts = FAIL; | |
4991 | + Sts = FFFTP_FAIL; | |
4992 | 4992 | if(strlen(Str) == 8) |
4993 | 4993 | { |
4994 | 4994 | 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) | ||
4998 | 4998 | *Year = atoi(&Str[0]); |
4999 | 4999 | *Month = atoi(&Str[3]); |
5000 | 5000 | *Day = atoi(&Str[6]); |
5001 | - Sts = SUCCESS; | |
5001 | + Sts = FFFTP_SUCCESS; | |
5002 | 5002 | } |
5003 | 5003 | } |
5004 | 5004 | return(Sts); |
@@ -5013,13 +5013,13 @@ static int GetYearMonthDay(char *Str, WORD *Year, WORD *Month, WORD *Day) | ||
5013 | 5013 | * WORD *Minute : 分 |
5014 | 5014 | * |
5015 | 5015 | * Return Value |
5016 | -* int ステータス (SUCCESS/FAIL=時刻を表す文字ではない) | |
5016 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL=時刻を表す文字ではない) | |
5017 | 5017 | * |
5018 | 5018 | * Note |
5019 | 5019 | * 以下の形式をサポート |
5020 | 5020 | * HH:MM |
5021 | 5021 | * HH時MM分 |
5022 | -* FAILを返す時は *Hour = 0; *Minute = 0 | |
5022 | +* FFFTP_FAILを返す時は *Hour = 0; *Minute = 0 | |
5023 | 5023 | *----------------------------------------------------------------------------*/ |
5024 | 5024 | |
5025 | 5025 | static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute) |
@@ -5027,7 +5027,7 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute) | ||
5027 | 5027 | int Ret; |
5028 | 5028 | char *Pos; |
5029 | 5029 | |
5030 | - Ret = FAIL; | |
5030 | + Ret = FFFTP_FAIL; | |
5031 | 5031 | if((_mbslen(Str) >= 3) && (isdigit(Str[0]) != 0)) |
5032 | 5032 | { |
5033 | 5033 | *Hour = atoi(Str); |
@@ -5040,7 +5040,7 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute) | ||
5040 | 5040 | { |
5041 | 5041 | *Minute = atoi(Pos); |
5042 | 5042 | if(*Minute < 60) |
5043 | - Ret = SUCCESS; | |
5043 | + Ret = FFFTP_SUCCESS; | |
5044 | 5044 | } |
5045 | 5045 | } |
5046 | 5046 | else |
@@ -5061,7 +5061,7 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute) | ||
5061 | 5061 | { |
5062 | 5062 | *Minute = atoi(Pos); |
5063 | 5063 | if(*Minute < 60) |
5064 | - Ret = SUCCESS; | |
5064 | + Ret = FFFTP_SUCCESS; | |
5065 | 5065 | } |
5066 | 5066 | } |
5067 | 5067 | break; |
@@ -5075,10 +5075,10 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute) | ||
5075 | 5075 | { |
5076 | 5076 | *Hour = 0; |
5077 | 5077 | *Minute = 0; |
5078 | - Ret = SUCCESS; | |
5078 | + Ret = FFFTP_SUCCESS; | |
5079 | 5079 | } |
5080 | 5080 | |
5081 | - if(Ret == FAIL) | |
5081 | + if(Ret == FFFTP_FAIL) | |
5082 | 5082 | { |
5083 | 5083 | *Hour = 0; |
5084 | 5084 | *Minute = 0; |
@@ -5096,12 +5096,12 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute) | ||
5096 | 5096 | * WORD *Day : 日 |
5097 | 5097 | * |
5098 | 5098 | * Return Value |
5099 | -* int ステータス (SUCCESS/FAIL=日付を表す文字ではない) | |
5099 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL=日付を表す文字ではない) | |
5100 | 5100 | * |
5101 | 5101 | * Note |
5102 | 5102 | * 以下の形式をサポート |
5103 | 5103 | * 18-SEP-1998 |
5104 | -* FAILを返す時は *Year = 0; *Month = 0; *Day = 0 | |
5104 | +* FFFTP_FAILを返す時は *Year = 0; *Month = 0; *Day = 0 | |
5105 | 5105 | *----------------------------------------------------------------------------*/ |
5106 | 5106 | |
5107 | 5107 | 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) | ||
5111 | 5111 | WORD Tmp; |
5112 | 5112 | char Buf[4]; |
5113 | 5113 | |
5114 | - Ret = FAIL; | |
5114 | + Ret = FFFTP_FAIL; | |
5115 | 5115 | *Day = atoi(Str); |
5116 | 5116 | if((Pos = strchr(Str, '-')) != NULL) |
5117 | 5117 | { |
@@ -5123,11 +5123,11 @@ static int GetVMSdate(char *Str, WORD *Year, WORD *Month, WORD *Day) | ||
5123 | 5123 | { |
5124 | 5124 | Pos++; |
5125 | 5125 | *Year = atoi(Pos); |
5126 | - Ret = SUCCESS; | |
5126 | + Ret = FFFTP_SUCCESS; | |
5127 | 5127 | } |
5128 | 5128 | } |
5129 | 5129 | |
5130 | - if(Ret == FAIL) | |
5130 | + if(Ret == FFFTP_FAIL) | |
5131 | 5131 | { |
5132 | 5132 | *Year = 0; |
5133 | 5133 | *Month = 0; |
@@ -5216,7 +5216,7 @@ static int AskFilterStr(char *Fname, int Type) | ||
5216 | 5216 | if((Pos = strchr(Tmp, ';')) != NULL) |
5217 | 5217 | *Pos = NUL; |
5218 | 5218 | |
5219 | - if(CheckFname(Fname, Tmp) == SUCCESS) | |
5219 | + if(CheckFname(Fname, Tmp) == FFFTP_SUCCESS) | |
5220 | 5220 | { |
5221 | 5221 | Ret = YES; |
5222 | 5222 | break; |
@@ -118,7 +118,7 @@ void DownLoadProc(int ChName, int ForceFile, int All) | ||
118 | 118 | FILELIST *Pos; |
119 | 119 | TRANSPACKET Pkt; |
120 | 120 | |
121 | - if(CheckClosedAndReconnect() == SUCCESS) | |
121 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
122 | 122 | { |
123 | 123 | DisableUserOpe(); |
124 | 124 |
@@ -148,7 +148,7 @@ void DownLoadProc(int ChName, int ForceFile, int All) | ||
148 | 148 | else if(FnameCnv == FNAME_UPPER) |
149 | 149 | _mbsupr(TmpString); |
150 | 150 | RemoveAfterSemicolon(TmpString); |
151 | - if(RenameUnuseableName(TmpString) == FAIL) | |
151 | + if(RenameUnuseableName(TmpString) == FFFTP_FAIL) | |
152 | 152 | break; |
153 | 153 | } |
154 | 154 | else |
@@ -156,7 +156,7 @@ void DownLoadProc(int ChName, int ForceFile, int All) | ||
156 | 156 | CurWin = WIN_REMOTE; |
157 | 157 | if(DialogBox(GetFtpInst(), MAKEINTRESOURCE(updown_as_dlg), GetMainHwnd(), UpDownAsDialogCallBack) == YES) |
158 | 158 | { |
159 | - if(RenameUnuseableName(TmpString) == FAIL) | |
159 | + if(RenameUnuseableName(TmpString) == FFFTP_FAIL) | |
160 | 160 | break; |
161 | 161 | } |
162 | 162 | else |
@@ -244,7 +244,7 @@ void DirectDownLoadProc(char *Fname) | ||
244 | 244 | { |
245 | 245 | TRANSPACKET Pkt; |
246 | 246 | |
247 | - if(CheckClosedAndReconnect() == SUCCESS) | |
247 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
248 | 248 | { |
249 | 249 | DisableUserOpe(); |
250 | 250 |
@@ -269,7 +269,7 @@ void DirectDownLoadProc(char *Fname) | ||
269 | 269 | _mbsupr(TmpString); |
270 | 270 | RemoveAfterSemicolon(TmpString); |
271 | 271 | |
272 | - if(RenameUnuseableName(TmpString) == SUCCESS) | |
272 | + if(RenameUnuseableName(TmpString) == FFFTP_SUCCESS) | |
273 | 273 | { |
274 | 274 | strcat(Pkt.LocalFile, TmpString); |
275 | 275 | ReplaceAll(Pkt.LocalFile, '/', '\\'); |
@@ -378,7 +378,7 @@ void MirrorDownloadProc(int Notify) | ||
378 | 378 | int Level; |
379 | 379 | int Mode; |
380 | 380 | |
381 | - if(CheckClosedAndReconnect() == SUCCESS) | |
381 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
382 | 382 | { |
383 | 383 | DisableUserOpe(); |
384 | 384 |
@@ -844,7 +844,7 @@ void UpLoadListProc(int ChName, int All) | ||
844 | 844 | char Tmp[FMAX_PATH+1]; |
845 | 845 | int FirstAdd; |
846 | 846 | |
847 | - if(CheckClosedAndReconnect() == SUCCESS) | |
847 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
848 | 848 | { |
849 | 849 | DisableUserOpe(); |
850 | 850 |
@@ -1007,7 +1007,7 @@ void UpLoadDragProc(WPARAM wParam) | ||
1007 | 1007 | int FirstAdd; |
1008 | 1008 | char Cur[FMAX_PATH+1]; |
1009 | 1009 | |
1010 | - if(CheckClosedAndReconnect() == SUCCESS) | |
1010 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
1011 | 1011 | { |
1012 | 1012 | DisableUserOpe(); |
1013 | 1013 |
@@ -1161,7 +1161,7 @@ void MirrorUploadProc(int Notify) | ||
1161 | 1161 | FILETIME TmpFtimeL; |
1162 | 1162 | FILETIME TmpFtimeR; |
1163 | 1163 | |
1164 | - if(CheckClosedAndReconnect() == SUCCESS) | |
1164 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
1165 | 1165 | { |
1166 | 1166 | DisableUserOpe(); |
1167 | 1167 |
@@ -1570,7 +1570,7 @@ static BOOL CALLBACK MirrorDispListCallBack(HWND hDlg, UINT iMessage, WPARAM wPa | ||
1570 | 1570 | Num = SendDlgItemMessage(hDlg, MIRROR_LIST, LB_GETSELITEMS, Num, (LPARAM)List); |
1571 | 1571 | for(Num--; Num >= 0; Num--) |
1572 | 1572 | { |
1573 | - if(RemoveTmpTransFileListItem(Base, List[Num]) == SUCCESS) | |
1573 | + if(RemoveTmpTransFileListItem(Base, List[Num]) == FFFTP_SUCCESS) | |
1574 | 1574 | SendDlgItemMessage(hDlg, MIRROR_LIST, LB_DELETESTRING, List[Num], 0); |
1575 | 1575 | else |
1576 | 1576 | MessageBeep(-1); |
@@ -1698,7 +1698,7 @@ static int AskMirrorNoTrn(char *Fname, int Mode) | ||
1698 | 1698 | Fname = GetFileName(Fname); |
1699 | 1699 | while(*Tbl != NUL) |
1700 | 1700 | { |
1701 | - if(CheckFname(Fname, Tbl) == SUCCESS) | |
1701 | + if(CheckFname(Fname, Tbl) == FFFTP_SUCCESS) | |
1702 | 1702 | { |
1703 | 1703 | Ret = YES; |
1704 | 1704 | break; |
@@ -1733,7 +1733,7 @@ static int AskUpLoadFileAttr(char *Fname) | ||
1733 | 1733 | Sts = CheckFname(Fname, Tbl); |
1734 | 1734 | Tbl += strlen(Tbl) + 1; |
1735 | 1735 | |
1736 | - if((Sts == SUCCESS) && (*Tbl != NUL)) | |
1736 | + if((Sts == FFFTP_SUCCESS) && (*Tbl != NUL)) | |
1737 | 1737 | { |
1738 | 1738 | Ret = xtoi(Tbl); |
1739 | 1739 | break; |
@@ -1937,7 +1937,7 @@ void DeleteProc(void) | ||
1937 | 1937 | else |
1938 | 1938 | { |
1939 | 1939 | Win = WIN_REMOTE; |
1940 | - if(CheckClosedAndReconnect() == SUCCESS) | |
1940 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
1941 | 1941 | MakeSelectedFileList(Win, YES, NO, &FileListBase, &CancelFlg); |
1942 | 1942 | else |
1943 | 1943 | Sts = NO; |
@@ -2075,7 +2075,7 @@ static void DelNotifyAndDo(FILELIST *Dt, int Win, int *Sw, int *Flg, char *CurDi | ||
2075 | 2075 | else |
2076 | 2076 | { |
2077 | 2077 | /* フルパスを使わない時のための処理 */ |
2078 | - if(ProcForNonFullpath(Path, CurDir, GetMainHwnd(), 0) == FAIL) | |
2078 | + if(ProcForNonFullpath(Path, CurDir, GetMainHwnd(), 0) == FFFTP_FAIL) | |
2079 | 2079 | *Sw = NO_ALL; |
2080 | 2080 | |
2081 | 2081 | if(*Sw != NO_ALL) |
@@ -2159,7 +2159,7 @@ void RenameProc(void) | ||
2159 | 2159 | int RenFlg; |
2160 | 2160 | int Sts; |
2161 | 2161 | |
2162 | - Sts = SUCCESS; | |
2162 | + Sts = FFFTP_SUCCESS; | |
2163 | 2163 | if(GetFocus() == GetLocalHwnd()) |
2164 | 2164 | Win = WIN_LOCAL; |
2165 | 2165 | else |
@@ -2168,7 +2168,7 @@ void RenameProc(void) | ||
2168 | 2168 | Sts = CheckClosedAndReconnect(); |
2169 | 2169 | } |
2170 | 2170 | |
2171 | - if(Sts == SUCCESS) | |
2171 | + if(Sts == FFFTP_SUCCESS) | |
2172 | 2172 | { |
2173 | 2173 | DisableUserOpe(); |
2174 | 2174 |
@@ -2252,7 +2252,7 @@ void MoveRemoteFileProc(int drop_index) | ||
2252 | 2252 | } |
2253 | 2253 | } |
2254 | 2254 | |
2255 | - Sts = SUCCESS; | |
2255 | + Sts = FFFTP_SUCCESS; | |
2256 | 2256 | #if 0 |
2257 | 2257 | if(GetFocus() == GetLocalHwnd()) |
2258 | 2258 | Win = WIN_LOCAL; |
@@ -2266,7 +2266,7 @@ void MoveRemoteFileProc(int drop_index) | ||
2266 | 2266 | Sts = CheckClosedAndReconnect(); |
2267 | 2267 | #endif |
2268 | 2268 | |
2269 | - if(Sts == SUCCESS) | |
2269 | + if(Sts == FFFTP_SUCCESS) | |
2270 | 2270 | { |
2271 | 2271 | DisableUserOpe(); |
2272 | 2272 |
@@ -2428,7 +2428,7 @@ void MkdirProc(void) | ||
2428 | 2428 | } |
2429 | 2429 | else |
2430 | 2430 | { |
2431 | - if(CheckClosedAndReconnect() == SUCCESS) | |
2431 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
2432 | 2432 | { |
2433 | 2433 | DisableUserOpe(); |
2434 | 2434 | DoMKD(Path); |
@@ -2468,7 +2468,7 @@ void ChangeDirComboProc(HWND hWnd) | ||
2468 | 2468 | } |
2469 | 2469 | else |
2470 | 2470 | { |
2471 | - if(CheckClosedAndReconnect() == SUCCESS) | |
2471 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
2472 | 2472 | { |
2473 | 2473 | DisableUserOpe(); |
2474 | 2474 | if(DoCWD(Tmp, YES, NO, YES) < FTP_RETRY) |
@@ -2500,14 +2500,14 @@ void ChangeDirBmarkProc(int MarkID) | ||
2500 | 2500 | if((Sts == BMARK_TYPE_LOCAL) || (Sts == BMARK_TYPE_BOTH)) |
2501 | 2501 | { |
2502 | 2502 | DisableUserOpe(); |
2503 | - if(DoLocalCWD(Local) == SUCCESS) | |
2503 | + if(DoLocalCWD(Local) == FFFTP_SUCCESS) | |
2504 | 2504 | GetLocalDirForWnd(); |
2505 | 2505 | EnableUserOpe(); |
2506 | 2506 | } |
2507 | 2507 | |
2508 | 2508 | if((Sts == BMARK_TYPE_REMOTE) || (Sts == BMARK_TYPE_BOTH)) |
2509 | 2509 | { |
2510 | - if(CheckClosedAndReconnect() == SUCCESS) | |
2510 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
2511 | 2511 | { |
2512 | 2512 | DisableUserOpe(); |
2513 | 2513 | if(DoCWD(Remote, YES, NO, YES) < FTP_RETRY) |
@@ -2557,7 +2557,7 @@ void ChangeDirDirectProc(int Win) | ||
2557 | 2557 | } |
2558 | 2558 | else |
2559 | 2559 | { |
2560 | - if(CheckClosedAndReconnect() == SUCCESS) | |
2560 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
2561 | 2561 | { |
2562 | 2562 | DisableUserOpe(); |
2563 | 2563 | if(DoCWD(Path, YES, NO, YES) < FTP_RETRY) |
@@ -2613,7 +2613,7 @@ void ChmodProc(void) | ||
2613 | 2613 | |
2614 | 2614 | if(GetFocus() == GetRemoteHwnd()) |
2615 | 2615 | { |
2616 | - if(CheckClosedAndReconnect() == SUCCESS) | |
2616 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
2617 | 2617 | { |
2618 | 2618 | DisableUserOpe(); |
2619 | 2619 | FileListBase = NULL; |
@@ -2836,7 +2836,7 @@ void SomeCmdProc(void) | ||
2836 | 2836 | |
2837 | 2837 | if(GetFocus() == GetRemoteHwnd()) |
2838 | 2838 | { |
2839 | - if(CheckClosedAndReconnect() == SUCCESS) | |
2839 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
2840 | 2840 | { |
2841 | 2841 | DisableUserOpe(); |
2842 | 2842 | FileListBase = NULL; |
@@ -2880,7 +2880,7 @@ void CalcFileSizeProc(void) | ||
2880 | 2880 | |
2881 | 2881 | if((All = DialogBox(GetFtpInst(), MAKEINTRESOURCE(filesize_notify_dlg), GetMainHwnd(), SizeNotifyDlgWndProc)) != NO_ALL) |
2882 | 2882 | { |
2883 | - Sts = SUCCESS; | |
2883 | + Sts = FFFTP_SUCCESS; | |
2884 | 2884 | if(GetFocus() == GetLocalHwnd()) |
2885 | 2885 | Win = WIN_LOCAL; |
2886 | 2886 | else |
@@ -2889,7 +2889,7 @@ void CalcFileSizeProc(void) | ||
2889 | 2889 | Sts = CheckClosedAndReconnect(); |
2890 | 2890 | } |
2891 | 2891 | |
2892 | - if(Sts == SUCCESS) | |
2892 | + if(Sts == FFFTP_SUCCESS) | |
2893 | 2893 | { |
2894 | 2894 | ListBase = NULL; |
2895 | 2895 | MakeSelectedFileList(Win, YES, All, &ListBase, &CancelFlg); |
@@ -3093,7 +3093,7 @@ void CopyURLtoClipBoard(void) | ||
3093 | 3093 | * 0=コマンドソケット, 1=転送ソケット |
3094 | 3094 | * |
3095 | 3095 | * Return Value |
3096 | -* int ステータス(SUCCESS/FAIL) | |
3096 | +* int ステータス(FFFTP_SUCCESS/FFFTP_FAIL) | |
3097 | 3097 | * |
3098 | 3098 | * Note |
3099 | 3099 | * フルパスを使わない時は、 |
@@ -3107,7 +3107,7 @@ int ProcForNonFullpath(char *Path, char *CurDir, HWND hWnd, int Type) | ||
3107 | 3107 | int Cmd; |
3108 | 3108 | char Tmp[FMAX_PATH+1]; |
3109 | 3109 | |
3110 | - Sts = SUCCESS; | |
3110 | + Sts = FFFTP_SUCCESS; | |
3111 | 3111 | if(AskNoFullPathMode() == YES) |
3112 | 3112 | { |
3113 | 3113 | strcpy(Tmp, Path); |
@@ -3131,7 +3131,7 @@ int ProcForNonFullpath(char *Path, char *CurDir, HWND hWnd, int Type) | ||
3131 | 3131 | if(Cmd/100 != FTP_COMPLETE) |
3132 | 3132 | { |
3133 | 3133 | DispCWDerror(hWnd); |
3134 | - Sts = FAIL; | |
3134 | + Sts = FFFTP_FAIL; | |
3135 | 3135 | } |
3136 | 3136 | else |
3137 | 3137 | strcpy(CurDir, Tmp); |
@@ -3245,7 +3245,7 @@ void ReformVMSDirName(char *DirName, int Flg) | ||
3245 | 3245 | * |
3246 | 3246 | * Return Value |
3247 | 3247 | * int ステータス |
3248 | -* SUCCESS/FAIL=中止する | |
3248 | +* FFFTP_SUCCESS/FFFTP_FAIL=中止する | |
3249 | 3249 | * |
3250 | 3250 | * Note |
3251 | 3251 | * Fnameを直接書きかえる |
@@ -3256,7 +3256,7 @@ static int RenameUnuseableName(char *Fname) | ||
3256 | 3256 | int Tmp; |
3257 | 3257 | int Ret; |
3258 | 3258 | |
3259 | - Ret = SUCCESS; | |
3259 | + Ret = FFFTP_SUCCESS; | |
3260 | 3260 | while(1) |
3261 | 3261 | { |
3262 | 3262 | if((_mbschr(Fname, ':') != NULL) || |
@@ -3270,7 +3270,7 @@ static int RenameUnuseableName(char *Fname) | ||
3270 | 3270 | { |
3271 | 3271 | if(InputDialogBox(forcerename_dlg, GetMainHwnd(), NULL, Fname, FMAX_PATH+1, &Tmp, IDH_HELP_TOPIC_0000001) == NO) |
3272 | 3272 | { |
3273 | - Ret = FAIL; | |
3273 | + Ret = FFFTP_FAIL; | |
3274 | 3274 | break; |
3275 | 3275 | } |
3276 | 3276 | } |
@@ -161,9 +161,9 @@ int MakeTransferThread(void) | ||
161 | 161 | fTransferThreadExit = FALSE; |
162 | 162 | hTransferThread = (HANDLE)_beginthreadex(NULL, 0, TransferThread, 0, 0, &dwID); |
163 | 163 | if (hTransferThread == NULL) |
164 | - return(FAIL); /* XXX */ | |
164 | + return(FFFTP_FAIL); /* XXX */ | |
165 | 165 | |
166 | - return(SUCCESS); | |
166 | + return(FFFTP_SUCCESS); | |
167 | 167 | } |
168 | 168 | |
169 | 169 |
@@ -206,7 +206,7 @@ void CloseTransferThread(void) | ||
206 | 206 | * |
207 | 207 | * Return Value |
208 | 208 | * int ステータス |
209 | -* SUCCESS/FAIL | |
209 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
210 | 210 | *----------------------------------------------------------------------------*/ |
211 | 211 | |
212 | 212 | int AddTmpTransFileList(TRANSPACKET *Pkt, TRANSPACKET **Base) |
@@ -215,7 +215,7 @@ int AddTmpTransFileList(TRANSPACKET *Pkt, TRANSPACKET **Base) | ||
215 | 215 | TRANSPACKET *Prev; |
216 | 216 | int Sts; |
217 | 217 | |
218 | - Sts = FAIL; | |
218 | + Sts = FFFTP_FAIL; | |
219 | 219 | if((Pos = malloc(sizeof(TRANSPACKET))) != NULL) |
220 | 220 | { |
221 | 221 | memcpy(Pos, Pkt, sizeof(TRANSPACKET)); |
@@ -230,7 +230,7 @@ int AddTmpTransFileList(TRANSPACKET *Pkt, TRANSPACKET **Base) | ||
230 | 230 | Prev = Prev->Next; |
231 | 231 | Prev->Next = Pos; |
232 | 232 | } |
233 | - Sts = SUCCESS; | |
233 | + Sts = FFFTP_SUCCESS; | |
234 | 234 | } |
235 | 235 | return(Sts); |
236 | 236 | } |
@@ -270,7 +270,7 @@ void EraseTmpTransFileList(TRANSPACKET **Base) | ||
270 | 270 | * |
271 | 271 | * Return Value |
272 | 272 | * int ステータス |
273 | -* SUCCESS/FAIL | |
273 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
274 | 274 | *----------------------------------------------------------------------------*/ |
275 | 275 | |
276 | 276 | int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num) |
@@ -279,13 +279,13 @@ int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num) | ||
279 | 279 | TRANSPACKET *Prev; |
280 | 280 | int Sts; |
281 | 281 | |
282 | - Sts = FAIL; | |
282 | + Sts = FFFTP_FAIL; | |
283 | 283 | Pos = *Base; |
284 | 284 | if(Num == 0) |
285 | 285 | { |
286 | 286 | *Base = Pos->Next; |
287 | 287 | free(Pos); |
288 | - Sts = SUCCESS; | |
288 | + Sts = FFFTP_SUCCESS; | |
289 | 289 | } |
290 | 290 | else |
291 | 291 | { |
@@ -297,7 +297,7 @@ int RemoveTmpTransFileListItem(TRANSPACKET **Base, int Num) | ||
297 | 297 | { |
298 | 298 | Prev->Next = Pos->Next; |
299 | 299 | free(Pos); |
300 | - Sts = SUCCESS; | |
300 | + Sts = FFFTP_SUCCESS; | |
301 | 301 | break; |
302 | 302 | } |
303 | 303 | } |
@@ -321,7 +321,7 @@ void AddTransFileList(TRANSPACKET *Pkt) | ||
321 | 321 | |
322 | 322 | WaitForSingleObject(hListAccMutex, INFINITE); |
323 | 323 | |
324 | - if(AddTmpTransFileList(Pkt, &TransPacketBase) == SUCCESS) | |
324 | + if(AddTmpTransFileList(Pkt, &TransPacketBase) == FFFTP_SUCCESS) | |
325 | 325 | { |
326 | 326 | if((strncmp(Pkt->Cmd, "RETR", 4) == 0) || |
327 | 327 | (strncmp(Pkt->Cmd, "STOR", 4) == 0)) |
@@ -615,7 +615,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
615 | 615 | if(CheckPathViolation(TransPacketBase) == NO) |
616 | 616 | { |
617 | 617 | /* フルパスを使わないための処理 */ |
618 | - if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS) | |
618 | + if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS) | |
619 | 619 | { |
620 | 620 | if(strncmp(TransPacketBase->Cmd, "RETR-S", 6) == 0) |
621 | 621 | { |
@@ -628,7 +628,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
628 | 628 | Down = YES; |
629 | 629 | // if(DoDownLoad(AskTrnCtrlSkt(), TransPacketBase, NO) == 429) |
630 | 630 | // { |
631 | -// if(ReConnectTrnSkt() == SUCCESS) | |
631 | +// if(ReConnectTrnSkt() == FFFTP_SUCCESS) | |
632 | 632 | DoDownLoad(AskTrnCtrlSkt(), TransPacketBase, NO, &Canceled); |
633 | 633 | // } |
634 | 634 | } |
@@ -638,12 +638,12 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
638 | 638 | else if(strncmp(TransPacketBase->Cmd, "STOR", 4) == 0) |
639 | 639 | { |
640 | 640 | /* フルパスを使わないための処理 */ |
641 | - if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS) | |
641 | + if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS) | |
642 | 642 | { |
643 | 643 | Up = YES; |
644 | 644 | // if(DoUpLoad(AskTrnCtrlSkt(), TransPacketBase) == 429) |
645 | 645 | // { |
646 | -// if(ReConnectTrnSkt() == SUCCESS) | |
646 | +// if(ReConnectTrnSkt() == FFFTP_SUCCESS) | |
647 | 647 | DoUpLoad(AskTrnCtrlSkt(), TransPacketBase); |
648 | 648 | // } |
649 | 649 | } |
@@ -659,7 +659,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
659 | 659 | CwdSts = FTP_COMPLETE; |
660 | 660 | |
661 | 661 | strcpy(Tmp, TransPacketBase->RemoteFile); |
662 | - if(ProcForNonFullpath(Tmp, CurDir, hWndTrans, 1) == FAIL) | |
662 | + if(ProcForNonFullpath(Tmp, CurDir, hWndTrans, 1) == FFFTP_FAIL) | |
663 | 663 | { |
664 | 664 | ClearAll = YES; |
665 | 665 | CwdSts = FTP_ERROR; |
@@ -688,7 +688,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
688 | 688 | DispTransFileInfo(TransPacketBase, MSGJPN079, FALSE, YES); |
689 | 689 | |
690 | 690 | /* フルパスを使わないための処理 */ |
691 | - if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS) | |
691 | + if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS) | |
692 | 692 | { |
693 | 693 | Up = YES; |
694 | 694 | CommandProcTrn(NULL, "%s%s", TransPacketBase->Cmd+2, TransPacketBase->RemoteFile); |
@@ -706,7 +706,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
706 | 706 | if((DelNotify == YES) || (DelNotify == YES_ALL)) |
707 | 707 | { |
708 | 708 | /* フルパスを使わないための処理 */ |
709 | - if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS) | |
709 | + if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS) | |
710 | 710 | { |
711 | 711 | Up = YES; |
712 | 712 | CommandProcTrn(NULL, "%s%s", TransPacketBase->Cmd+2, TransPacketBase->RemoteFile); |
@@ -722,7 +722,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
722 | 722 | if((DelNotify == YES) || (DelNotify == YES_ALL)) |
723 | 723 | { |
724 | 724 | /* フルパスを使わないための処理 */ |
725 | - if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == SUCCESS) | |
725 | + if(MakeNonFullPath(TransPacketBase, CurDir, Tmp) == FFFTP_SUCCESS) | |
726 | 726 | { |
727 | 727 | Up = YES; |
728 | 728 | CommandProcTrn(NULL, "%s%s", TransPacketBase->Cmd+2, TransPacketBase->RemoteFile); |
@@ -872,7 +872,7 @@ static ULONG WINAPI TransferThread(void *Dummy) | ||
872 | 872 | * char *Tmp : 作業用エリア |
873 | 873 | * |
874 | 874 | * Return Value |
875 | -* int ステータス(SUCCESS/FAIL) | |
875 | +* int ステータス(FFFTP_SUCCESS/FFFTP_FAIL) | |
876 | 876 | * |
877 | 877 | * Note |
878 | 878 | * フルパスを使わない時は、 |
@@ -885,7 +885,7 @@ static int MakeNonFullPath(TRANSPACKET *Pkt, char *Cur, char *Tmp) | ||
885 | 885 | int Sts; |
886 | 886 | |
887 | 887 | Sts = ProcForNonFullpath(Pkt->RemoteFile, Cur, Pkt->hWndTrans, 1); |
888 | - if(Sts == FAIL) | |
888 | + if(Sts == FFFTP_FAIL) | |
889 | 889 | ClearAll = YES; |
890 | 890 | |
891 | 891 | return(Sts); |
@@ -990,7 +990,7 @@ static int DownLoadNonPassive(TRANSPACKET *Pkt, int *CancelCheckWork) | ||
990 | 990 | iRetCode = command(Pkt->ctrl_skt, Reply, CancelCheckWork, "%s", Buf); |
991 | 991 | if(iRetCode/100 == FTP_PRELIM) |
992 | 992 | { |
993 | - if(SocksGet2ndBindReply(listen_socket, &data_socket) == FAIL) | |
993 | + if(SocksGet2ndBindReply(listen_socket, &data_socket) == FFFTP_FAIL) | |
994 | 994 | { |
995 | 995 | iLength = sizeof(saSockAddr1); |
996 | 996 | data_socket = do_accept(listen_socket, (struct sockaddr *)&saSockAddr1, (int *)&iLength); |
@@ -1060,7 +1060,7 @@ static int DownLoadPassive(TRANSPACKET *Pkt, int *CancelCheckWork) | ||
1060 | 1060 | iRetCode = command(Pkt->ctrl_skt, Buf, CancelCheckWork, "PASV"); |
1061 | 1061 | if(iRetCode/100 == FTP_COMPLETE) |
1062 | 1062 | { |
1063 | - if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == SUCCESS) | |
1063 | + if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == FFFTP_SUCCESS) | |
1064 | 1064 | { |
1065 | 1065 | if((data_socket = connectsock(Adrs, Port, MSGJPN091, CancelCheckWork)) != INVALID_SOCKET) |
1066 | 1066 | { |
@@ -1568,7 +1568,7 @@ static int DoUpLoad(SOCKET cSkt, TRANSPACKET *Pkt) | ||
1568 | 1568 | |
1569 | 1569 | if(Pkt->Mode != EXIST_IGNORE) |
1570 | 1570 | { |
1571 | - if(CheckFileReadable(Pkt->LocalFile) == SUCCESS) | |
1571 | + if(CheckFileReadable(Pkt->LocalFile) == FFFTP_SUCCESS) | |
1572 | 1572 | { |
1573 | 1573 | if(Pkt->Type == TYPE_I) |
1574 | 1574 | Pkt->KanjiCode = KANJI_NOCNV; |
@@ -1649,7 +1649,7 @@ static int UpLoadNonPassive(TRANSPACKET *Pkt) | ||
1649 | 1649 | iRetCode = command(Pkt->ctrl_skt, Reply, &Canceled, "%s", Buf); |
1650 | 1650 | if((iRetCode/100) == FTP_PRELIM) |
1651 | 1651 | { |
1652 | - if(SocksGet2ndBindReply(listen_socket, &data_socket) == FAIL) | |
1652 | + if(SocksGet2ndBindReply(listen_socket, &data_socket) == FFFTP_FAIL) | |
1653 | 1653 | { |
1654 | 1654 | iLength=sizeof(saSockAddr1); |
1655 | 1655 | data_socket = do_accept(listen_socket,(struct sockaddr *)&saSockAddr1, (int *)&iLength); |
@@ -1716,7 +1716,7 @@ static int UpLoadPassive(TRANSPACKET *Pkt) | ||
1716 | 1716 | iRetCode = command(Pkt->ctrl_skt, Buf, &Canceled, "PASV"); |
1717 | 1717 | if(iRetCode/100 == FTP_COMPLETE) |
1718 | 1718 | { |
1719 | - if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == SUCCESS) | |
1719 | + if(GetAdrsAndPort(Buf, Adrs, &Port, 19) == FFFTP_SUCCESS) | |
1720 | 1720 | { |
1721 | 1721 | if((data_socket = connectsock(Adrs, Port, MSGJPN109, &Canceled)) != INVALID_SOCKET) |
1722 | 1722 | { |
@@ -1865,7 +1865,7 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt) | ||
1865 | 1865 | else |
1866 | 1866 | Continue = ConvSJIStoEUC(&cInfo); |
1867 | 1867 | |
1868 | - if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FAIL) | |
1868 | + if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FFFTP_FAIL) | |
1869 | 1869 | { |
1870 | 1870 | Pkt->Abort = ABORT_ERROR; |
1871 | 1871 | break; |
@@ -1875,7 +1875,7 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt) | ||
1875 | 1875 | } |
1876 | 1876 | else |
1877 | 1877 | { |
1878 | - if(TermCodeConvAndSend(&tInfo, dSkt, Buf, iNumBytes, Pkt->Type) == FAIL) | |
1878 | + if(TermCodeConvAndSend(&tInfo, dSkt, Buf, iNumBytes, Pkt->Type) == FFFTP_FAIL) | |
1879 | 1879 | Pkt->Abort = ABORT_ERROR; |
1880 | 1880 | } |
1881 | 1881 |
@@ -1899,14 +1899,14 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt) | ||
1899 | 1899 | cInfo.BufSize = BUFSIZE+3; |
1900 | 1900 | FlushRestData(&cInfo); |
1901 | 1901 | |
1902 | - if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FAIL) | |
1902 | + if(TermCodeConvAndSend(&tInfo, dSkt, Buf2, cInfo.OutLen, Pkt->Type) == FFFTP_FAIL) | |
1903 | 1903 | Pkt->Abort = ABORT_ERROR; |
1904 | 1904 | } |
1905 | 1905 | |
1906 | 1906 | tInfo.Buf = Buf2; |
1907 | 1907 | tInfo.BufSize = BUFSIZE+3; |
1908 | 1908 | FlushRestTermCodeConvData(&tInfo); |
1909 | - if(SendData(dSkt, Buf2, tInfo.OutLen, 0, &Canceled) == FAIL) | |
1909 | + if(SendData(dSkt, Buf2, tInfo.OutLen, 0, &Canceled) == FFFTP_FAIL) | |
1910 | 1910 | Pkt->Abort = ABORT_ERROR; |
1911 | 1911 | } |
1912 | 1912 |
@@ -1969,7 +1969,7 @@ static int TermCodeConvAndSend(TERMCODECONVINFO *tInfo, SOCKET Skt, char *Data, | ||
1969 | 1969 | int Continue; |
1970 | 1970 | int Ret; |
1971 | 1971 | |
1972 | - Ret = SUCCESS; | |
1972 | + Ret = FFFTP_SUCCESS; | |
1973 | 1973 | |
1974 | 1974 | // CR-LF以外の改行コードを変換しないモードはここへ追加 |
1975 | 1975 | if(Ascii == TYPE_A) |
@@ -1981,7 +1981,7 @@ static int TermCodeConvAndSend(TERMCODECONVINFO *tInfo, SOCKET Skt, char *Data, | ||
1981 | 1981 | do |
1982 | 1982 | { |
1983 | 1983 | 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) | |
1985 | 1985 | break; |
1986 | 1986 | } |
1987 | 1987 | while(Continue == YES); |
@@ -2292,7 +2292,7 @@ static void DispTransFileInfo(TRANSPACKET *Pkt, char *Title, int SkipButton, int | ||
2292 | 2292 | * |
2293 | 2293 | * Return Value |
2294 | 2294 | * int ステータス |
2295 | -* SUCCESS/FAIL | |
2295 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2296 | 2296 | *----------------------------------------------------------------------------*/ |
2297 | 2297 | |
2298 | 2298 | 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) | ||
2301 | 2301 | char *Btm; |
2302 | 2302 | int Sts; |
2303 | 2303 | |
2304 | - Sts = FAIL; | |
2304 | + Sts = FFFTP_FAIL; | |
2305 | 2305 | |
2306 | 2306 | Pos = strchr(Str, '('); |
2307 | 2307 | if(Pos != NULL) |
@@ -2334,7 +2334,7 @@ static int GetAdrsAndPort(char *Str, char *Adrs, int *Port, int Max) | ||
2334 | 2334 | { |
2335 | 2335 | Btm++; |
2336 | 2336 | *Port = (atoi(Pos) * 0x100) + atoi(Btm); |
2337 | - Sts = SUCCESS; | |
2337 | + Sts = FFFTP_SUCCESS; | |
2338 | 2338 | } |
2339 | 2339 | } |
2340 | 2340 | } |
@@ -389,7 +389,7 @@ static void RemoveAllHistoryFromMenu(void) | ||
389 | 389 | * |
390 | 390 | * Return Value |
391 | 391 | * int ステータス |
392 | -* SUCCESS/FAIL | |
392 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
393 | 393 | *----------------------------------------------------------------------------*/ |
394 | 394 | |
395 | 395 | int GetHistoryByCmd(int MenuCmd, HISTORYDATA *Buf) |
@@ -398,14 +398,14 @@ int GetHistoryByCmd(int MenuCmd, HISTORYDATA *Buf) | ||
398 | 398 | int i; |
399 | 399 | HISTORYDATA *Pos; |
400 | 400 | |
401 | - Sts = FAIL; | |
401 | + Sts = FFFTP_FAIL; | |
402 | 402 | Pos = HistoryBase; |
403 | 403 | for(i = 0; i < HistoryNum; i++) |
404 | 404 | { |
405 | 405 | if(MenuHistId[i] == MenuCmd) |
406 | 406 | { |
407 | 407 | memcpy(Buf, Pos, sizeof(HISTORYDATA)); |
408 | - Sts = SUCCESS; | |
408 | + Sts = FFFTP_SUCCESS; | |
409 | 409 | } |
410 | 410 | Pos = Pos->Next; |
411 | 411 | } |
@@ -421,7 +421,7 @@ int GetHistoryByCmd(int MenuCmd, HISTORYDATA *Buf) | ||
421 | 421 | * |
422 | 422 | * Return Value |
423 | 423 | * int ステータス |
424 | -* SUCCESS/FAIL | |
424 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
425 | 425 | *----------------------------------------------------------------------------*/ |
426 | 426 | |
427 | 427 | int GetHistoryByNum(int Num, HISTORYDATA *Buf) |
@@ -757,7 +757,7 @@ static int SetNodeLevelAll(void) | ||
757 | 757 | Pos->Set.Level |= GetNodeLevelByData(Pos); |
758 | 758 | Pos = GetNextNode(Pos); |
759 | 759 | } |
760 | - return(SUCCESS); | |
760 | + return(FFFTP_SUCCESS); | |
761 | 761 | } |
762 | 762 | |
763 | 763 |
@@ -770,7 +770,7 @@ static int SetNodeLevelAll(void) | ||
770 | 770 | * |
771 | 771 | * Return Value |
772 | 772 | * int ステータス |
773 | -* SUCCESS/FAIL | |
773 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
774 | 774 | *----------------------------------------------------------------------------*/ |
775 | 775 | |
776 | 776 | int AddHostToList(HOSTDATA *Set, int Pos, int Level) |
@@ -780,7 +780,7 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level) | ||
780 | 780 | HOSTLISTDATA *Last; |
781 | 781 | int Cur; |
782 | 782 | |
783 | - Sts = FAIL; | |
783 | + Sts = FFFTP_FAIL; | |
784 | 784 | if((Pos >= -1) && (Pos <= Hosts)) |
785 | 785 | { |
786 | 786 | if(Pos == -1) |
@@ -838,7 +838,7 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level) | ||
838 | 838 | } |
839 | 839 | } |
840 | 840 | Hosts++; |
841 | - Sts = SUCCESS; | |
841 | + Sts = FFFTP_SUCCESS; | |
842 | 842 | } |
843 | 843 | } |
844 | 844 | return(Sts); |
@@ -853,7 +853,7 @@ int AddHostToList(HOSTDATA *Set, int Pos, int Level) | ||
853 | 853 | * |
854 | 854 | * Return Value |
855 | 855 | * int ステータス |
856 | -* SUCCESS/FAIL | |
856 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
857 | 857 | *----------------------------------------------------------------------------*/ |
858 | 858 | |
859 | 859 | static int UpdateHostToList(int Num, HOSTDATA *Set) |
@@ -861,12 +861,12 @@ static int UpdateHostToList(int Num, HOSTDATA *Set) | ||
861 | 861 | int Sts; |
862 | 862 | HOSTLISTDATA *Pos; |
863 | 863 | |
864 | - Sts = FAIL; | |
864 | + Sts = FFFTP_FAIL; | |
865 | 865 | if((Num >= 0) && (Num < Hosts)) |
866 | 866 | { |
867 | 867 | Pos = GetNodeByNum(Num); |
868 | 868 | memcpy(&Pos->Set, Set, sizeof(HOSTDATA)); |
869 | - Sts = SUCCESS; | |
869 | + Sts = FFFTP_SUCCESS; | |
870 | 870 | } |
871 | 871 | return(Sts); |
872 | 872 | } |
@@ -879,7 +879,7 @@ static int UpdateHostToList(int Num, HOSTDATA *Set) | ||
879 | 879 | * |
880 | 880 | * Return Value |
881 | 881 | * int ステータス |
882 | -* SUCCESS/FAIL | |
882 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
883 | 883 | *----------------------------------------------------------------------------*/ |
884 | 884 | |
885 | 885 | static int DelHostFromList(int Num) |
@@ -887,7 +887,7 @@ static int DelHostFromList(int Num) | ||
887 | 887 | int Sts; |
888 | 888 | HOSTLISTDATA *Pos; |
889 | 889 | |
890 | - Sts = FAIL; | |
890 | + Sts = FFFTP_FAIL; | |
891 | 891 | if((Num >= 0) && (Num < Hosts)) |
892 | 892 | { |
893 | 893 | if(Num == 0) |
@@ -912,7 +912,7 @@ static int DelHostFromList(int Num) | ||
912 | 912 | } |
913 | 913 | free(Pos); |
914 | 914 | Hosts--; |
915 | - Sts = SUCCESS; | |
915 | + Sts = FFFTP_SUCCESS; | |
916 | 916 | } |
917 | 917 | return(Sts); |
918 | 918 | } |
@@ -925,7 +925,7 @@ static int DelHostFromList(int Num) | ||
925 | 925 | * |
926 | 926 | * Return Value |
927 | 927 | * int ステータス |
928 | -* SUCCESS/FAIL | |
928 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
929 | 929 | * |
930 | 930 | * Note |
931 | 931 | * Pos->Next, Pos->Childの全てのノードを削除する |
@@ -945,7 +945,7 @@ static int DeleteChildAndNext(HOSTLISTDATA *Pos) | ||
945 | 945 | Hosts--; |
946 | 946 | Pos = Next; |
947 | 947 | } |
948 | - return(SUCCESS); | |
948 | + return(FFFTP_SUCCESS); | |
949 | 949 | } |
950 | 950 | |
951 | 951 |
@@ -957,7 +957,7 @@ static int DeleteChildAndNext(HOSTLISTDATA *Pos) | ||
957 | 957 | * |
958 | 958 | * Return Value |
959 | 959 | * int ステータス |
960 | -* SUCCESS/FAIL | |
960 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
961 | 961 | * |
962 | 962 | * Note |
963 | 963 | * 現在ホストに接続中の時は、CopyHostFromListInConnect() を使う事 |
@@ -968,12 +968,12 @@ int CopyHostFromList(int Num, HOSTDATA *Set) | ||
968 | 968 | int Sts; |
969 | 969 | HOSTLISTDATA *Pos; |
970 | 970 | |
971 | - Sts = FAIL; | |
971 | + Sts = FFFTP_FAIL; | |
972 | 972 | if((Num >= 0) && (Num < Hosts)) |
973 | 973 | { |
974 | 974 | Pos = GetNodeByNum(Num); |
975 | 975 | memcpy(Set, &Pos->Set, sizeof(HOSTDATA)); |
976 | - Sts = SUCCESS; | |
976 | + Sts = FFFTP_SUCCESS; | |
977 | 977 | } |
978 | 978 | return(Sts); |
979 | 979 | } |
@@ -987,7 +987,7 @@ int CopyHostFromList(int Num, HOSTDATA *Set) | ||
987 | 987 | * |
988 | 988 | * Return Value |
989 | 989 | * int ステータス |
990 | -* SUCCESS/FAIL | |
990 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
991 | 991 | * |
992 | 992 | * Note |
993 | 993 | * 現在ホストに接続中の時に使う |
@@ -998,7 +998,7 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set) | ||
998 | 998 | int Sts; |
999 | 999 | HOSTLISTDATA *Pos; |
1000 | 1000 | |
1001 | - Sts = FAIL; | |
1001 | + Sts = FFFTP_FAIL; | |
1002 | 1002 | if((Num >= 0) && (Num < Hosts)) |
1003 | 1003 | { |
1004 | 1004 | Pos = GetNodeByNum(Num); |
@@ -1015,7 +1015,7 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set) | ||
1015 | 1015 | Set->UseNLST_R = Pos->Set.UseNLST_R; |
1016 | 1016 | Set->LastDir = Pos->Set.LastDir; |
1017 | 1017 | Set->TimeZone = Pos->Set.TimeZone; |
1018 | - Sts = SUCCESS; | |
1018 | + Sts = FFFTP_SUCCESS; | |
1019 | 1019 | } |
1020 | 1020 | return(Sts); |
1021 | 1021 | } |
@@ -1030,7 +1030,7 @@ int CopyHostFromListInConnect(int Num, HOSTDATA *Set) | ||
1030 | 1030 | * |
1031 | 1031 | * Return Value |
1032 | 1032 | * int ステータス |
1033 | -* SUCCESS/FAIL | |
1033 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1034 | 1034 | *----------------------------------------------------------------------------*/ |
1035 | 1035 | |
1036 | 1036 | int SetHostBookMark(int Num, char *Bmask, int Len) |
@@ -1038,12 +1038,12 @@ int SetHostBookMark(int Num, char *Bmask, int Len) | ||
1038 | 1038 | int Sts; |
1039 | 1039 | HOSTLISTDATA *Pos; |
1040 | 1040 | |
1041 | - Sts = FAIL; | |
1041 | + Sts = FFFTP_FAIL; | |
1042 | 1042 | if((Num >= 0) && (Num < Hosts)) |
1043 | 1043 | { |
1044 | 1044 | Pos = GetNodeByNum(Num); |
1045 | 1045 | memcpy(Pos->Set.BookMark, Bmask, Len); |
1046 | - Sts = SUCCESS; | |
1046 | + Sts = FFFTP_SUCCESS; | |
1047 | 1047 | } |
1048 | 1048 | return(Sts); |
1049 | 1049 | } |
@@ -1082,7 +1082,7 @@ char *AskHostBookMark(int Num) | ||
1082 | 1082 | * |
1083 | 1083 | * Return Value |
1084 | 1084 | * int ステータス |
1085 | -* SUCCESS/FAIL | |
1085 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1086 | 1086 | *----------------------------------------------------------------------------*/ |
1087 | 1087 | |
1088 | 1088 | int SetHostDir(int Num, char *LocDir, char *HostDir) |
@@ -1090,13 +1090,13 @@ int SetHostDir(int Num, char *LocDir, char *HostDir) | ||
1090 | 1090 | int Sts; |
1091 | 1091 | HOSTLISTDATA *Pos; |
1092 | 1092 | |
1093 | - Sts = FAIL; | |
1093 | + Sts = FFFTP_FAIL; | |
1094 | 1094 | if((Num >= 0) && (Num < Hosts)) |
1095 | 1095 | { |
1096 | 1096 | Pos = GetNodeByNum(Num); |
1097 | 1097 | strcpy(Pos->Set.LocalInitDir, LocDir); |
1098 | 1098 | strcpy(Pos->Set.RemoteInitDir, HostDir); |
1099 | - Sts = SUCCESS; | |
1099 | + Sts = FFFTP_SUCCESS; | |
1100 | 1100 | } |
1101 | 1101 | return(Sts); |
1102 | 1102 | } |
@@ -1110,7 +1110,7 @@ int SetHostDir(int Num, char *LocDir, char *HostDir) | ||
1110 | 1110 | * |
1111 | 1111 | * Return Value |
1112 | 1112 | * int ステータス |
1113 | -* SUCCESS/FAIL | |
1113 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1114 | 1114 | *----------------------------------------------------------------------------*/ |
1115 | 1115 | |
1116 | 1116 | int SetHostPassword(int Num, char *Pass) |
@@ -1118,12 +1118,12 @@ int SetHostPassword(int Num, char *Pass) | ||
1118 | 1118 | int Sts; |
1119 | 1119 | HOSTLISTDATA *Pos; |
1120 | 1120 | |
1121 | - Sts = FAIL; | |
1121 | + Sts = FFFTP_FAIL; | |
1122 | 1122 | if((Num >= 0) && (Num < Hosts)) |
1123 | 1123 | { |
1124 | 1124 | Pos = GetNodeByNum(Num); |
1125 | 1125 | strcpy(Pos->Set.PassWord, Pass); |
1126 | - Sts = SUCCESS; | |
1126 | + Sts = FFFTP_SUCCESS; | |
1127 | 1127 | } |
1128 | 1128 | return(Sts); |
1129 | 1129 | } |
@@ -1171,7 +1171,7 @@ int SearchHostName(char *Name) | ||
1171 | 1171 | * |
1172 | 1172 | * Return Value |
1173 | 1173 | * int ステータス |
1174 | -* SUCCESS/FAIL | |
1174 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1175 | 1175 | *----------------------------------------------------------------------------*/ |
1176 | 1176 | |
1177 | 1177 | 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) | ||
1179 | 1179 | int Sts; |
1180 | 1180 | HOSTLISTDATA *Pos; |
1181 | 1181 | |
1182 | - Sts = FAIL; | |
1182 | + Sts = FFFTP_FAIL; | |
1183 | 1183 | if((Num >= 0) && (Num < Hosts)) |
1184 | 1184 | { |
1185 | 1185 | Pos = GetNodeByNum(Num); |
1186 | 1186 | Pos->Set.Sort = LFSort * 0x1000000 | LDSort * 0x10000 | RFSort * 0x100 | RDSort; |
1187 | - Sts = SUCCESS; | |
1187 | + Sts = FFFTP_SUCCESS; | |
1188 | 1188 | } |
1189 | 1189 | return(Sts); |
1190 | 1190 | } |
@@ -47,19 +47,19 @@ | ||
47 | 47 | * |
48 | 48 | * Return Value |
49 | 49 | * int ステータス |
50 | -* SUCCESS/FAIL | |
50 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
51 | 51 | *----------------------------------------------------------------------------*/ |
52 | 52 | |
53 | 53 | int DoLocalCWD(char *Path) |
54 | 54 | { |
55 | 55 | int Sts; |
56 | 56 | |
57 | - Sts = SUCCESS; | |
57 | + Sts = FFFTP_SUCCESS; | |
58 | 58 | SetTaskMsg(">>CD %s", Path); |
59 | 59 | if(SetCurrentDirectory(Path) != TRUE) |
60 | 60 | { |
61 | 61 | SetTaskMsg(MSGJPN145); |
62 | - Sts = FAIL; | |
62 | + Sts = FFFTP_FAIL; | |
63 | 63 | } |
64 | 64 | return(Sts); |
65 | 65 | } |
@@ -61,7 +61,7 @@ static HWND hWndTips; /* tipsのウインドウハンドル */ | ||
61 | 61 | * |
62 | 62 | * Return Value |
63 | 63 | * int ステータス |
64 | -* SUCCESS/FAIL | |
64 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
65 | 65 | *----------------------------------------------------------------------------*/ |
66 | 66 | |
67 | 67 | int InitListViewTips(HWND hWnd, HINSTANCE hInst) |
@@ -69,7 +69,7 @@ int InitListViewTips(HWND hWnd, HINSTANCE hInst) | ||
69 | 69 | WNDCLASSEX wClass; |
70 | 70 | int Ret; |
71 | 71 | |
72 | - Ret = FAIL; | |
72 | + Ret = FFFTP_FAIL; | |
73 | 73 | |
74 | 74 | wClass.cbSize = sizeof(WNDCLASSEX); |
75 | 75 | wClass.style = 0; |
@@ -92,7 +92,7 @@ int InitListViewTips(HWND hWnd, HINSTANCE hInst) | ||
92 | 92 | hWnd, NULL, hInst, NULL); |
93 | 93 | |
94 | 94 | if(hWndTips != NULL) |
95 | - Ret = SUCCESS; | |
95 | + Ret = FFFTP_SUCCESS; | |
96 | 96 | |
97 | 97 | return(Ret); |
98 | 98 | } |
@@ -235,7 +235,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi | ||
235 | 235 | Ret = FALSE; |
236 | 236 | hWndFtp = NULL; |
237 | 237 | hInstFtp = hInstance; |
238 | - if(InitApp(lpszCmdLine, cmdShow) == SUCCESS) | |
238 | + if(InitApp(lpszCmdLine, cmdShow) == FFFTP_SUCCESS) | |
239 | 239 | { |
240 | 240 | for(;;) |
241 | 241 | { |
@@ -276,7 +276,7 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi | ||
276 | 276 | * |
277 | 277 | * Return Value |
278 | 278 | * int ステータス |
279 | -* SUCCESS/FAIL | |
279 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
280 | 280 | *----------------------------------------------------------------------------*/ |
281 | 281 | |
282 | 282 | static int InitApp(LPSTR lpszCmdLine, int cmdShow) |
@@ -288,7 +288,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow) | ||
288 | 288 | int useDefautPassword = 0; /* 警告文表示用 */ |
289 | 289 | int masterpass; |
290 | 290 | |
291 | - sts = FAIL; | |
291 | + sts = FFFTP_FAIL; | |
292 | 292 | |
293 | 293 | aes_init(); |
294 | 294 | srand(GetTickCount()); |
@@ -381,7 +381,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow) | ||
381 | 381 | |
382 | 382 | CountPrevFfftpWindows(); |
383 | 383 | |
384 | - if(MakeAllWindows(cmdShow) == SUCCESS) | |
384 | + if(MakeAllWindows(cmdShow) == FFFTP_SUCCESS) | |
385 | 385 | { |
386 | 386 | hWndCurFocus = GetLocalHwnd(); |
387 | 387 |
@@ -401,7 +401,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow) | ||
401 | 401 | if(CacheSave == YES) |
402 | 402 | LoadCache(); |
403 | 403 | |
404 | - if(MakeTransferThread() == SUCCESS) | |
404 | + if(MakeTransferThread() == FFFTP_SUCCESS) | |
405 | 405 | { |
406 | 406 | DoPrintf("DEBUG MESSAGE ON ! ##"); |
407 | 407 |
@@ -430,7 +430,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow) | ||
430 | 430 | DispTransferFiles(); |
431 | 431 | |
432 | 432 | StartupProc(lpszCmdLine); |
433 | - sts = SUCCESS; | |
433 | + sts = FFFTP_SUCCESS; | |
434 | 434 | |
435 | 435 | /* セキュリティ警告文の表示 */ |
436 | 436 | if( useDefautPassword ){ |
@@ -453,7 +453,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow) | ||
453 | 453 | } |
454 | 454 | } |
455 | 455 | |
456 | - if(sts == FAIL) | |
456 | + if(sts == FFFTP_FAIL) | |
457 | 457 | DeleteAllObject(); |
458 | 458 | |
459 | 459 | return(sts); |
@@ -467,7 +467,7 @@ static int InitApp(LPSTR lpszCmdLine, int cmdShow) | ||
467 | 467 | * |
468 | 468 | * Return Value |
469 | 469 | * int ステータス |
470 | -* SUCCESS/FAIL | |
470 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
471 | 471 | *----------------------------------------------------------------------------*/ |
472 | 472 | |
473 | 473 | static int MakeAllWindows(int cmdShow) |
@@ -552,19 +552,19 @@ static int MakeAllWindows(int cmdShow) | ||
552 | 552 | StsLvtips = InitListViewTips(hWndFtp, hInstFtp); |
553 | 553 | } |
554 | 554 | |
555 | - Sts = SUCCESS; | |
555 | + Sts = FFFTP_SUCCESS; | |
556 | 556 | 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)) | |
563 | 563 | { |
564 | - Sts = FAIL; | |
564 | + Sts = FFFTP_FAIL; | |
565 | 565 | } |
566 | 566 | |
567 | - if(Sts == SUCCESS) | |
567 | + if(Sts == FFFTP_SUCCESS) | |
568 | 568 | SetListViewType(); |
569 | 569 | |
570 | 570 | return(Sts); |
@@ -1034,7 +1034,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA | ||
1034 | 1034 | case MENU_REFRESH : |
1035 | 1035 | SuppressRefresh = 1; |
1036 | 1036 | GetLocalDirForWnd(); |
1037 | - if(CheckClosedAndReconnect() == SUCCESS) | |
1037 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
1038 | 1038 | GetRemoteDirForWnd(CACHE_REFRESH, &CancelFlg); |
1039 | 1039 | SuppressRefresh = 0; |
1040 | 1040 | break; |
@@ -1057,7 +1057,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA | ||
1057 | 1057 | |
1058 | 1058 | case REFRESH_REMOTE : |
1059 | 1059 | SuppressRefresh = 1; |
1060 | - if(CheckClosedAndReconnect() == SUCCESS) | |
1060 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
1061 | 1061 | GetRemoteDirForWnd(CACHE_REFRESH, &CancelFlg); |
1062 | 1062 | SuppressRefresh = 0; |
1063 | 1063 | break; |
@@ -1842,7 +1842,7 @@ void DoubleClickProc(int Win, int Mode, int App) | ||
1842 | 1842 | else |
1843 | 1843 | ChangeDir(WIN_LOCAL, Tmp); |
1844 | 1844 | } |
1845 | - else if(CheckClosedAndReconnect() == SUCCESS) | |
1845 | + else if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
1846 | 1846 | { |
1847 | 1847 | if((App != -1) || (Type == NODE_FILE)) |
1848 | 1848 | { |
@@ -1967,13 +1967,13 @@ static void ChangeDir(int Win, char *Path) | ||
1967 | 1967 | |
1968 | 1968 | if((Win == WIN_LOCAL) || (Sync == YES)) |
1969 | 1969 | { |
1970 | - if(DoLocalCWD(Path) == SUCCESS) | |
1970 | + if(DoLocalCWD(Path) == FFFTP_SUCCESS) | |
1971 | 1971 | GetLocalDirForWnd(); |
1972 | 1972 | } |
1973 | 1973 | |
1974 | 1974 | if((Win == WIN_REMOTE) || (Sync == YES)) |
1975 | 1975 | { |
1976 | - if(CheckClosedAndReconnect() == SUCCESS) | |
1976 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
1977 | 1977 | { |
1978 | 1978 | #if defined(HAVE_OPENVMS) |
1979 | 1979 | /* OpenVMSの場合、".DIR;?"を取る */ |
@@ -500,7 +500,7 @@ char *GetNextField(char *Str) | ||
500 | 500 | * |
501 | 501 | * Return Value |
502 | 502 | * int ステータス |
503 | -* SUCCESS/FAIL=長さが長すぎる | |
503 | +* FFFTP_SUCCESS/FFFTP_FAIL=長さが長すぎる | |
504 | 504 | *----------------------------------------------------------------------------*/ |
505 | 505 | |
506 | 506 | int GetOneField(char *Str, char *Buf, int Max) |
@@ -508,13 +508,13 @@ int GetOneField(char *Str, char *Buf, int Max) | ||
508 | 508 | int Sts; |
509 | 509 | char *Pos; |
510 | 510 | |
511 | - Sts = FAIL; | |
511 | + Sts = FFFTP_FAIL; | |
512 | 512 | if((Pos = strchr(Str, ' ')) == NULL) |
513 | 513 | { |
514 | 514 | if((int)strlen(Str) <= Max) |
515 | 515 | { |
516 | 516 | strcpy(Buf, Str); |
517 | - Sts = SUCCESS; | |
517 | + Sts = FFFTP_SUCCESS; | |
518 | 518 | } |
519 | 519 | } |
520 | 520 | else |
@@ -523,7 +523,7 @@ int GetOneField(char *Str, char *Buf, int Max) | ||
523 | 523 | { |
524 | 524 | strncpy(Buf, Str, Pos - Str); |
525 | 525 | *(Buf + (Pos - Str)) = NUL; |
526 | - Sts = SUCCESS; | |
526 | + Sts = FFFTP_SUCCESS; | |
527 | 527 | } |
528 | 528 | } |
529 | 529 | return(Sts); |
@@ -942,7 +942,7 @@ int hex2bin(char Ch) | ||
942 | 942 | * |
943 | 943 | * Return Value |
944 | 944 | * int ステータス |
945 | -* SUCCESS/FAIL | |
945 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
946 | 946 | * |
947 | 947 | * "\"は全て"/"に置き換える |
948 | 948 | *----------------------------------------------------------------------------*/ |
@@ -1011,9 +1011,9 @@ int SplitUNCpath(char *unc, char *Host, char *Path, char *File, char *User, char | ||
1011 | 1011 | strncpy(Host, Pos1, HOST_ADRS_LEN); |
1012 | 1012 | } |
1013 | 1013 | |
1014 | - Sts = FAIL; | |
1014 | + Sts = FFFTP_FAIL; | |
1015 | 1015 | if(strlen(Host) > 0) |
1016 | - Sts = SUCCESS; | |
1016 | + Sts = FFFTP_SUCCESS; | |
1017 | 1017 | |
1018 | 1018 | return(Sts); |
1019 | 1019 | } |
@@ -1479,7 +1479,7 @@ int xtoi(char *Str) | ||
1479 | 1479 | * |
1480 | 1480 | * Return Value |
1481 | 1481 | * int ステータス |
1482 | -* SUCCESS/FAIL | |
1482 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1483 | 1483 | *----------------------------------------------------------------------------*/ |
1484 | 1484 | |
1485 | 1485 | int CheckFileReadable(char *Fname) |
@@ -1488,7 +1488,7 @@ int CheckFileReadable(char *Fname) | ||
1488 | 1488 | HANDLE iFileHandle; |
1489 | 1489 | SECURITY_ATTRIBUTES Sec; |
1490 | 1490 | |
1491 | - Sts = FAIL; | |
1491 | + Sts = FFFTP_FAIL; | |
1492 | 1492 | |
1493 | 1493 | Sec.nLength = sizeof(SECURITY_ATTRIBUTES); |
1494 | 1494 | Sec.lpSecurityDescriptor = NULL; |
@@ -1497,7 +1497,7 @@ int CheckFileReadable(char *Fname) | ||
1497 | 1497 | if((iFileHandle = CreateFile(Fname, GENERIC_READ, |
1498 | 1498 | FILE_SHARE_READ|FILE_SHARE_WRITE, &Sec, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE) |
1499 | 1499 | { |
1500 | - Sts = SUCCESS; | |
1500 | + Sts = FFFTP_SUCCESS; | |
1501 | 1501 | CloseHandle(iFileHandle); |
1502 | 1502 | } |
1503 | 1503 | return(Sts); |
@@ -268,7 +268,7 @@ static DWORD RasHangUpWait(HRASCONN hRasConn) | ||
268 | 268 | * int Num : 個数 |
269 | 269 | * |
270 | 270 | * Return Value |
271 | -* int ステータス (SUCCESS/FAIL) | |
271 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
272 | 272 | *----------------------------------------------------------------------------*/ |
273 | 273 | |
274 | 274 | static int DoDisconnect(RASCONN *RasConn, int Num) |
@@ -276,14 +276,14 @@ static int DoDisconnect(RASCONN *RasConn, int Num) | ||
276 | 276 | int i; |
277 | 277 | int Sts; |
278 | 278 | |
279 | - Sts = SUCCESS; | |
279 | + Sts = FFFTP_SUCCESS; | |
280 | 280 | if(Num > 0) |
281 | 281 | { |
282 | 282 | SetTaskMsg(MSGJPN220); |
283 | 283 | for(i = 0; i < Num; i++) |
284 | 284 | { |
285 | 285 | if(RasHangUpWait(RasConn[i].hrasconn) != 0) |
286 | - Sts = FAIL; | |
286 | + Sts = FFFTP_FAIL; | |
287 | 287 | } |
288 | 288 | } |
289 | 289 | return(Sts); |
@@ -383,7 +383,7 @@ int SetRasEntryToComboBox(HWND hDlg, int Item, char *CurName) | ||
383 | 383 | * char *Name : 接続先 |
384 | 384 | * |
385 | 385 | * Return Value |
386 | -* int ステータス (SUCCESS/FAIL) | |
386 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
387 | 387 | *----------------------------------------------------------------------------*/ |
388 | 388 | |
389 | 389 | int ConnectRas(int Dialup, int UseThis, int Notify, char *Name) |
@@ -398,7 +398,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name) | ||
398 | 398 | BOOL Flg; |
399 | 399 | OSVERSIONINFO VerInfo; |
400 | 400 | |
401 | - Sts = SUCCESS; | |
401 | + Sts = FFFTP_SUCCESS; | |
402 | 402 | if(Dialup == YES) |
403 | 403 | { |
404 | 404 | if(m_hDll != NULL) |
@@ -438,7 +438,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name) | ||
438 | 438 | { |
439 | 439 | /* 接続する */ |
440 | 440 | SetTaskMsg(MSGJPN221); |
441 | - Sts = FAIL; | |
441 | + Sts = FFFTP_FAIL; | |
442 | 442 | |
443 | 443 | Num = 0; |
444 | 444 | VerInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); |
@@ -460,7 +460,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name) | ||
460 | 460 | DlgParam.reserved = 0; |
461 | 461 | DlgParam.reserved2 = 0; |
462 | 462 | if((*m_RasDialDlg)(NULL, Name, NULL, &DlgParam) != 0) |
463 | - Sts = SUCCESS; | |
463 | + Sts = FFFTP_SUCCESS; | |
464 | 464 | } |
465 | 465 | else |
466 | 466 | SetTaskMsg(MSGJPN222); |
@@ -478,7 +478,7 @@ int ConnectRas(int Dialup, int UseThis, int Notify, char *Name) | ||
478 | 478 | (DialogBoxParam(GetFtpInst(), MAKEINTRESOURCE(dial_password_dlg), GetMainHwnd(), (DLGPROC)DialPassCallBackProc, (LPARAM)&Param) == YES)) |
479 | 479 | { |
480 | 480 | if(DialogBoxParam(GetFtpInst(), MAKEINTRESOURCE(dial_dlg), GetMainHwnd(), (DLGPROC)DialCallBackProc, (LPARAM)&Param) == YES) |
481 | - Sts = SUCCESS; | |
481 | + Sts = FFFTP_SUCCESS; | |
482 | 482 | } |
483 | 483 | } |
484 | 484 | } |
@@ -235,7 +235,7 @@ int ValidateMasterPassword(void) | ||
235 | 235 | int i; |
236 | 236 | |
237 | 237 | SetRegType(REGTYPE_INI); |
238 | - if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS) | |
238 | + if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS) | |
239 | 239 | { |
240 | 240 | if(AskForceIni() == NO) |
241 | 241 | { |
@@ -243,14 +243,14 @@ int ValidateMasterPassword(void) | ||
243 | 243 | i = OpenReg("FFFTP", &hKey3); |
244 | 244 | } |
245 | 245 | } |
246 | - if(i == SUCCESS){ | |
246 | + if(i == FFFTP_SUCCESS){ | |
247 | 247 | char checkbuf[48]; |
248 | 248 | int salt = 0; |
249 | 249 | |
250 | 250 | if( ReadIntValueFromReg(hKey3, "CredentialSalt", &salt)){ |
251 | 251 | SetHashSalt( salt ); |
252 | 252 | } |
253 | - if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == SUCCESS ){ | |
253 | + if( ReadStringFromReg(hKey3, "CredentialCheck", checkbuf, sizeof( checkbuf )) == FFFTP_SUCCESS ){ | |
254 | 254 | switch( CheckPasswordValidity( SecretKey, SecretKeyLength, checkbuf ) ){ |
255 | 255 | case 0: /* not match */ |
256 | 256 | IsMasterPasswordError = PASSWORD_UNMATCH; |
@@ -298,7 +298,7 @@ void SaveRegistory(void) | ||
298 | 298 | } |
299 | 299 | |
300 | 300 | SetRegType(RegType); |
301 | - if(CreateReg("FFFTP", &hKey3) == SUCCESS) | |
301 | + if(CreateReg("FFFTP", &hKey3) == FFFTP_SUCCESS) | |
302 | 302 | { |
303 | 303 | char buf[48]; |
304 | 304 | int salt = GetTickCount(); |
@@ -311,7 +311,7 @@ void SaveRegistory(void) | ||
311 | 311 | CreatePasswordHash( SecretKey, SecretKeyLength, buf ); |
312 | 312 | WriteStringToReg(hKey3, "CredentialCheck", buf); |
313 | 313 | |
314 | - if(CreateSubKey(hKey3, "Options", &hKey4) == SUCCESS) | |
314 | + if(CreateSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS) | |
315 | 315 | { |
316 | 316 | WriteIntValueToReg(hKey4, "NoSave", SuppressSave); |
317 | 317 |
@@ -427,10 +427,10 @@ void SaveRegistory(void) | ||
427 | 427 | n = 0; |
428 | 428 | for(i = AskHistoryNum(); i > 0; i--) |
429 | 429 | { |
430 | - if(GetHistoryByNum(i-1, &Hist) == SUCCESS) | |
430 | + if(GetHistoryByNum(i-1, &Hist) == FFFTP_SUCCESS) | |
431 | 431 | { |
432 | 432 | sprintf(Str, "History%d", n); |
433 | - if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
433 | + if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
434 | 434 | { |
435 | 435 | SaveStr(hKey5, "HostAdrs", Hist.HostAdrs, DefaultHist.HostAdrs); |
436 | 436 | SaveStr(hKey5, "UserName", Hist.UserName, DefaultHist.UserName); |
@@ -474,17 +474,17 @@ void SaveRegistory(void) | ||
474 | 474 | for(; n < 999; n++) |
475 | 475 | { |
476 | 476 | sprintf(Str, "History%d", n); |
477 | - if(DeleteSubKey(hKey4, Str) != SUCCESS) | |
477 | + if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS) | |
478 | 478 | break; |
479 | 479 | } |
480 | 480 | |
481 | 481 | /* ホストの設定を保存 */ |
482 | 482 | CopyDefaultHost(&DefaultHost); |
483 | 483 | i = 0; |
484 | - while(CopyHostFromList(i, &Host) == SUCCESS) | |
484 | + while(CopyHostFromList(i, &Host) == FFFTP_SUCCESS) | |
485 | 485 | { |
486 | 486 | sprintf(Str, "Host%d", i); |
487 | - if(CreateSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
487 | + if(CreateSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
488 | 488 | { |
489 | 489 | // SaveIntNum(hKey5, "Set", Host.Level, DefaultHost.Level); |
490 | 490 | WriteIntValueToReg(hKey5, "Set", Host.Level); |
@@ -541,7 +541,7 @@ void SaveRegistory(void) | ||
541 | 541 | for(; i < 998; i++) |
542 | 542 | { |
543 | 543 | sprintf(Str, "Host%d", i); |
544 | - if(DeleteSubKey(hKey4, Str) != SUCCESS) | |
544 | + if(DeleteSubKey(hKey4, Str) != FFFTP_SUCCESS) | |
545 | 545 | break; |
546 | 546 | } |
547 | 547 |
@@ -586,7 +586,7 @@ int LoadRegistory(void) | ||
586 | 586 | Sts = NO; |
587 | 587 | |
588 | 588 | SetRegType(REGTYPE_INI); |
589 | - if((i = OpenReg("FFFTP", &hKey3)) != SUCCESS) | |
589 | + if((i = OpenReg("FFFTP", &hKey3)) != FFFTP_SUCCESS) | |
590 | 590 | { |
591 | 591 | if(AskForceIni() == NO) |
592 | 592 | { |
@@ -595,15 +595,15 @@ int LoadRegistory(void) | ||
595 | 595 | } |
596 | 596 | } |
597 | 597 | |
598 | - if(i == SUCCESS) | |
598 | + if(i == FFFTP_SUCCESS) | |
599 | 599 | { |
600 | - char checkbuf[48]; | |
600 | + /* char checkbuf[48]; */ | |
601 | 601 | int salt = 0; |
602 | 602 | Sts = YES; |
603 | 603 | |
604 | 604 | ReadIntValueFromReg(hKey3, "Version", &Version); |
605 | 605 | |
606 | - if(OpenSubKey(hKey3, "Options", &hKey4) == SUCCESS) | |
606 | + if(OpenSubKey(hKey3, "Options", &hKey4) == FFFTP_SUCCESS) | |
607 | 607 | { |
608 | 608 | ReadIntValueFromReg(hKey4, "WinPosX", &WinPosX); |
609 | 609 | ReadIntValueFromReg(hKey4, "WinPosY", &WinPosY); |
@@ -662,7 +662,7 @@ int LoadRegistory(void) | ||
662 | 662 | ReadIntValueFromReg(hKey4, "RegExp", &FindMode); |
663 | 663 | ReadIntValueFromReg(hKey4, "Reg", &RegType); |
664 | 664 | |
665 | - if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FAIL) | |
665 | + if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FFFTP_FAIL) | |
666 | 666 | { |
667 | 667 | /* 旧ASCIIモードの拡張子の設定を新しいものに変換 */ |
668 | 668 | ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1); |
@@ -694,9 +694,9 @@ int LoadRegistory(void) | ||
694 | 694 | ReadIntValueFromReg(hKey4, "MirUNot", &MirUpDelNotify); |
695 | 695 | ReadIntValueFromReg(hKey4, "MirDNot", &MirDownDelNotify); |
696 | 696 | |
697 | - if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == SUCCESS) | |
697 | + if(ReadStringFromReg(hKey4, "ListFont", Str, 256) == FFFTP_SUCCESS) | |
698 | 698 | { |
699 | - if(RestoreFontData(Str, &ListLogFont) == SUCCESS) | |
699 | + if(RestoreFontData(Str, &ListLogFont) == FFFTP_SUCCESS) | |
700 | 700 | ListFont = CreateFontIndirect(&ListLogFont); |
701 | 701 | } |
702 | 702 | ReadIntValueFromReg(hKey4, "ListHide", &DispIgnoreHide); |
@@ -745,7 +745,7 @@ int LoadRegistory(void) | ||
745 | 745 | for(i = 0; i < Sets; i++) |
746 | 746 | { |
747 | 747 | sprintf(Str, "History%d", i); |
748 | - if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
748 | + if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
749 | 749 | { |
750 | 750 | CopyDefaultHistory(&Hist); |
751 | 751 |
@@ -793,7 +793,7 @@ int LoadRegistory(void) | ||
793 | 793 | for(i = 0; i < Sets; i++) |
794 | 794 | { |
795 | 795 | sprintf(Str, "Host%d", i); |
796 | - if(OpenSubKey(hKey4, Str, &hKey5) == SUCCESS) | |
796 | + if(OpenSubKey(hKey4, Str, &hKey5) == FFFTP_SUCCESS) | |
797 | 797 | { |
798 | 798 | CopyDefaultHost(&Host); |
799 | 799 | /* 下位互換性のため */ |
@@ -1156,7 +1156,7 @@ static void MakeFontData(LOGFONT Font, HFONT hFont, char *Buf) | ||
1156 | 1156 | * |
1157 | 1157 | * Return Value |
1158 | 1158 | * int ステータス |
1159 | -* SUCCESS/FAIL=変換できない | |
1159 | +* FFFTP_SUCCESS/FFFTP_FAIL=変換できない | |
1160 | 1160 | *----------------------------------------------------------------------------*/ |
1161 | 1161 | |
1162 | 1162 | static int RestoreFontData(char *Str, LOGFONT *Font) |
@@ -1164,7 +1164,7 @@ static int RestoreFontData(char *Str, LOGFONT *Font) | ||
1164 | 1164 | int i; |
1165 | 1165 | int Sts; |
1166 | 1166 | |
1167 | - Sts = FAIL; | |
1167 | + Sts = FFFTP_FAIL; | |
1168 | 1168 | if(sscanf(Str, "%d %d %d %d %d %d %d %d %d %d %d %d %d", |
1169 | 1169 | &(Font->lfHeight), &(Font->lfWidth), &(Font->lfEscapement), &(Font->lfOrientation), |
1170 | 1170 | &(Font->lfWeight), &(Font->lfItalic), &(Font->lfUnderline), &(Font->lfStrikeOut), |
@@ -1180,11 +1180,11 @@ static int RestoreFontData(char *Str, LOGFONT *Font) | ||
1180 | 1180 | if(i == 0) |
1181 | 1181 | { |
1182 | 1182 | strcpy(Font->lfFaceName, Str); |
1183 | - Sts = SUCCESS; | |
1183 | + Sts = FFFTP_SUCCESS; | |
1184 | 1184 | } |
1185 | 1185 | } |
1186 | 1186 | |
1187 | - if(Sts == FAIL) | |
1187 | + if(Sts == FFFTP_FAIL) | |
1188 | 1188 | memset(Font, NUL, sizeof(LOGFONT)); |
1189 | 1189 | |
1190 | 1190 | return(Sts); |
@@ -1390,7 +1390,7 @@ static void EncodePassword3(char *Str, char *Buf, const char *Key) | ||
1390 | 1390 | } |
1391 | 1391 | *Put++ = ':'; |
1392 | 1392 | |
1393 | - if(CreateAesKey(AesKey, Key) == SUCCESS) | |
1393 | + if(CreateAesKey(AesKey, Key) == FFFTP_SUCCESS) | |
1394 | 1394 | { |
1395 | 1395 | aes_encrypt_key(AesKey, 32, &Ctx); |
1396 | 1396 |
@@ -1578,7 +1578,7 @@ static void DecodePassword3(char *Str, char *Buf, const char *Key) | ||
1578 | 1578 | |
1579 | 1579 | if(*Get++ == ':') |
1580 | 1580 | { |
1581 | - if(CreateAesKey(AesKey, Key) == SUCCESS) | |
1581 | + if(CreateAesKey(AesKey, Key) == FFFTP_SUCCESS) | |
1582 | 1582 | { |
1583 | 1583 | aes_decrypt_key(AesKey, 32, &Ctx); |
1584 | 1584 |
@@ -1606,7 +1606,7 @@ static void DecodePassword3(char *Str, char *Buf, const char *Key) | ||
1606 | 1606 | * const char *Key : 暗号化キー |
1607 | 1607 | * |
1608 | 1608 | * Return Value |
1609 | -* int ステータス (SUCCESS/FAIL) | |
1609 | +* int ステータス (FFFTP_SUCCESS/FFFTP_FAIL) | |
1610 | 1610 | * Note |
1611 | 1611 | * SHA-1をもちいて32Byte鍵を生成する |
1612 | 1612 | *----------------------------------------------------------------------------*/ |
@@ -1622,7 +1622,7 @@ static int CreateAesKey(unsigned char *AesKey, const char* Key) | ||
1622 | 1622 | |
1623 | 1623 | HashKeyLen = strlen(Key) + 16; |
1624 | 1624 | if((HashKey = malloc(HashKeyLen + 1)) == NULL){ |
1625 | - return (FAIL); | |
1625 | + return (FFFTP_FAIL); | |
1626 | 1626 | } |
1627 | 1627 | |
1628 | 1628 | strcpy(HashKey, Key); |
@@ -1643,7 +1643,7 @@ static int CreateAesKey(unsigned char *AesKey, const char* Key) | ||
1643 | 1643 | } |
1644 | 1644 | free(HashKey); |
1645 | 1645 | |
1646 | - return (SUCCESS); | |
1646 | + return (FFFTP_SUCCESS); | |
1647 | 1647 | } |
1648 | 1648 | |
1649 | 1649 |
@@ -1682,7 +1682,7 @@ static int TmpRegType; | ||
1682 | 1682 | * |
1683 | 1683 | * Return Value |
1684 | 1684 | * int ステータス |
1685 | -* SUCCESS/FAIL | |
1685 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1686 | 1686 | *----------------------------------------------------------------------------*/ |
1687 | 1687 | |
1688 | 1688 | static void SetRegType(int Type) |
@@ -1700,7 +1700,7 @@ static void SetRegType(int Type) | ||
1700 | 1700 | * |
1701 | 1701 | * Return Value |
1702 | 1702 | * int ステータス |
1703 | -* SUCCESS/FAIL | |
1703 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1704 | 1704 | *----------------------------------------------------------------------------*/ |
1705 | 1705 | |
1706 | 1706 | static int OpenReg(char *Name, void **Handle) |
@@ -1708,17 +1708,17 @@ static int OpenReg(char *Name, void **Handle) | ||
1708 | 1708 | int Sts; |
1709 | 1709 | char Tmp[FMAX_PATH+1]; |
1710 | 1710 | |
1711 | - Sts = FAIL; | |
1711 | + Sts = FFFTP_FAIL; | |
1712 | 1712 | if(TmpRegType == REGTYPE_REG) |
1713 | 1713 | { |
1714 | 1714 | strcpy(Tmp, "Software\\Sota\\"); |
1715 | 1715 | strcat(Tmp, Name); |
1716 | 1716 | if(RegOpenKeyEx(HKEY_CURRENT_USER, Tmp, 0, KEY_READ, (HKEY *)Handle) == ERROR_SUCCESS) |
1717 | - Sts = SUCCESS; | |
1717 | + Sts = FFFTP_SUCCESS; | |
1718 | 1718 | } |
1719 | 1719 | else |
1720 | 1720 | { |
1721 | - if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == SUCCESS) | |
1721 | + if((Sts = ReadInReg(Name, (REGDATATBL **)Handle)) == FFFTP_SUCCESS) | |
1722 | 1722 | ((REGDATATBL *)(*Handle))->Mode = 0; |
1723 | 1723 | } |
1724 | 1724 | return(Sts); |
@@ -1733,7 +1733,7 @@ static int OpenReg(char *Name, void **Handle) | ||
1733 | 1733 | * |
1734 | 1734 | * Return Value |
1735 | 1735 | * int ステータス |
1736 | -* SUCCESS/FAIL | |
1736 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1737 | 1737 | *----------------------------------------------------------------------------*/ |
1738 | 1738 | |
1739 | 1739 | static int CreateReg(char *Name, void **Handle) |
@@ -1742,13 +1742,13 @@ static int CreateReg(char *Name, void **Handle) | ||
1742 | 1742 | char Tmp[FMAX_PATH+1]; |
1743 | 1743 | DWORD Dispos; |
1744 | 1744 | |
1745 | - Sts = FAIL; | |
1745 | + Sts = FFFTP_FAIL; | |
1746 | 1746 | if(TmpRegType == REGTYPE_REG) |
1747 | 1747 | { |
1748 | 1748 | strcpy(Tmp, "Software\\Sota\\"); |
1749 | 1749 | strcat(Tmp, Name); |
1750 | 1750 | 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; | |
1752 | 1752 | } |
1753 | 1753 | else |
1754 | 1754 | { |
@@ -1758,7 +1758,7 @@ static int CreateReg(char *Name, void **Handle) | ||
1758 | 1758 | ((REGDATATBL *)(*Handle))->ValLen = 0; |
1759 | 1759 | ((REGDATATBL *)(*Handle))->Next = NULL; |
1760 | 1760 | ((REGDATATBL *)(*Handle))->Mode = 1; |
1761 | - Sts = SUCCESS; | |
1761 | + Sts = FFFTP_SUCCESS; | |
1762 | 1762 | } |
1763 | 1763 | } |
1764 | 1764 | return(Sts); |
@@ -1772,7 +1772,7 @@ static int CreateReg(char *Name, void **Handle) | ||
1772 | 1772 | * |
1773 | 1773 | * Return Value |
1774 | 1774 | * int ステータス |
1775 | -* SUCCESS/FAIL | |
1775 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1776 | 1776 | *----------------------------------------------------------------------------*/ |
1777 | 1777 | |
1778 | 1778 | static int CloseReg(void *Handle) |
@@ -1811,7 +1811,7 @@ static int CloseReg(void *Handle) | ||
1811 | 1811 | Pos = Next; |
1812 | 1812 | } |
1813 | 1813 | } |
1814 | - return(SUCCESS); | |
1814 | + return(FFFTP_SUCCESS); | |
1815 | 1815 | } |
1816 | 1816 | |
1817 | 1817 |
@@ -1864,7 +1864,7 @@ static BOOL WriteOutRegToFile(REGDATATBL *Pos) | ||
1864 | 1864 | * |
1865 | 1865 | * Return Value |
1866 | 1866 | * int ステータス |
1867 | -* SUCCESS/FAIL | |
1867 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1868 | 1868 | *----------------------------------------------------------------------------*/ |
1869 | 1869 | |
1870 | 1870 | static int ReadInReg(char *Name, REGDATATBL **Handle) |
@@ -1877,7 +1877,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle) | ||
1877 | 1877 | REGDATATBL *Pos; |
1878 | 1878 | int Sts; |
1879 | 1879 | |
1880 | - Sts = FAIL; | |
1880 | + Sts = FFFTP_FAIL; | |
1881 | 1881 | *Handle = NULL; |
1882 | 1882 | |
1883 | 1883 | if((Strm = fopen(AskIniFilePath(), "rt")) != NULL) |
@@ -1920,7 +1920,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle) | ||
1920 | 1920 | } |
1921 | 1921 | } |
1922 | 1922 | } |
1923 | - Sts = SUCCESS; | |
1923 | + Sts = FFFTP_SUCCESS; | |
1924 | 1924 | free(Buf); |
1925 | 1925 | } |
1926 | 1926 | fclose(Strm); |
@@ -1938,7 +1938,7 @@ static int ReadInReg(char *Name, REGDATATBL **Handle) | ||
1938 | 1938 | * |
1939 | 1939 | * Return Value |
1940 | 1940 | * int ステータス |
1941 | -* SUCCESS/FAIL | |
1941 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1942 | 1942 | *----------------------------------------------------------------------------*/ |
1943 | 1943 | |
1944 | 1944 | static int OpenSubKey(void *Parent, char *Name, void **Handle) |
@@ -1947,11 +1947,11 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle) | ||
1947 | 1947 | char Key[80]; |
1948 | 1948 | REGDATATBL *Pos; |
1949 | 1949 | |
1950 | - Sts = FAIL; | |
1950 | + Sts = FFFTP_FAIL; | |
1951 | 1951 | if(TmpRegType == REGTYPE_REG) |
1952 | 1952 | { |
1953 | 1953 | if(RegOpenKeyEx(Parent, Name, 0, KEY_READ, (HKEY *)Handle) == ERROR_SUCCESS) |
1954 | - Sts = SUCCESS; | |
1954 | + Sts = FFFTP_SUCCESS; | |
1955 | 1955 | } |
1956 | 1956 | else |
1957 | 1957 | { |
@@ -1964,7 +1964,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle) | ||
1964 | 1964 | if(strcmp(Pos->KeyName, Key) == 0) |
1965 | 1965 | { |
1966 | 1966 | *Handle = Pos; |
1967 | - Sts = SUCCESS; | |
1967 | + Sts = FFFTP_SUCCESS; | |
1968 | 1968 | break; |
1969 | 1969 | } |
1970 | 1970 | Pos = Pos->Next; |
@@ -1983,7 +1983,7 @@ static int OpenSubKey(void *Parent, char *Name, void **Handle) | ||
1983 | 1983 | * |
1984 | 1984 | * Return Value |
1985 | 1985 | * int ステータス |
1986 | -* SUCCESS/FAIL | |
1986 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1987 | 1987 | *----------------------------------------------------------------------------*/ |
1988 | 1988 | |
1989 | 1989 | static int CreateSubKey(void *Parent, char *Name, void **Handle) |
@@ -1992,11 +1992,11 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle) | ||
1992 | 1992 | DWORD Dispos; |
1993 | 1993 | REGDATATBL *Pos; |
1994 | 1994 | |
1995 | - Sts = FAIL; | |
1995 | + Sts = FFFTP_FAIL; | |
1996 | 1996 | if(TmpRegType == REGTYPE_REG) |
1997 | 1997 | { |
1998 | 1998 | 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; | |
2000 | 2000 | } |
2001 | 2001 | else |
2002 | 2002 | { |
@@ -2013,7 +2013,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle) | ||
2013 | 2013 | while(Pos->Next != NULL) |
2014 | 2014 | Pos = Pos->Next; |
2015 | 2015 | Pos->Next = *Handle; |
2016 | - Sts = SUCCESS; | |
2016 | + Sts = FFFTP_SUCCESS; | |
2017 | 2017 | } |
2018 | 2018 | } |
2019 | 2019 | return(Sts); |
@@ -2027,7 +2027,7 @@ static int CreateSubKey(void *Parent, char *Name, void **Handle) | ||
2027 | 2027 | * |
2028 | 2028 | * Return Value |
2029 | 2029 | * int ステータス |
2030 | -* SUCCESS/FAIL | |
2030 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2031 | 2031 | *----------------------------------------------------------------------------*/ |
2032 | 2032 | |
2033 | 2033 | static int CloseSubKey(void *Handle) |
@@ -2038,7 +2038,7 @@ static int CloseSubKey(void *Handle) | ||
2038 | 2038 | { |
2039 | 2039 | /* Nothing */ |
2040 | 2040 | } |
2041 | - return(SUCCESS); | |
2041 | + return(FFFTP_SUCCESS); | |
2042 | 2042 | } |
2043 | 2043 | |
2044 | 2044 |
@@ -2050,22 +2050,22 @@ static int CloseSubKey(void *Handle) | ||
2050 | 2050 | * |
2051 | 2051 | * Return Value |
2052 | 2052 | * int ステータス |
2053 | -* SUCCESS/FAIL | |
2053 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2054 | 2054 | *----------------------------------------------------------------------------*/ |
2055 | 2055 | |
2056 | 2056 | static int DeleteSubKey(void *Handle, char *Name) |
2057 | 2057 | { |
2058 | 2058 | int Sts; |
2059 | 2059 | |
2060 | - Sts = FAIL; | |
2060 | + Sts = FFFTP_FAIL; | |
2061 | 2061 | if(TmpRegType == REGTYPE_REG) |
2062 | 2062 | { |
2063 | 2063 | if(RegDeleteKey(Handle, Name) == ERROR_SUCCESS) |
2064 | - Sts = SUCCESS; | |
2064 | + Sts = FFFTP_SUCCESS; | |
2065 | 2065 | } |
2066 | 2066 | else |
2067 | 2067 | { |
2068 | - Sts = FAIL; | |
2068 | + Sts = FFFTP_FAIL; | |
2069 | 2069 | } |
2070 | 2070 | return(Sts); |
2071 | 2071 | } |
@@ -2079,22 +2079,22 @@ static int DeleteSubKey(void *Handle, char *Name) | ||
2079 | 2079 | * |
2080 | 2080 | * Return Value |
2081 | 2081 | * int ステータス |
2082 | -* SUCCESS/FAIL | |
2082 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2083 | 2083 | *----------------------------------------------------------------------------*/ |
2084 | 2084 | |
2085 | 2085 | static int DeleteValue(void *Handle, char *Name) |
2086 | 2086 | { |
2087 | 2087 | int Sts; |
2088 | 2088 | |
2089 | - Sts = FAIL; | |
2089 | + Sts = FFFTP_FAIL; | |
2090 | 2090 | if(TmpRegType == REGTYPE_REG) |
2091 | 2091 | { |
2092 | 2092 | if(RegDeleteValue(Handle, Name) == ERROR_SUCCESS) |
2093 | - Sts = SUCCESS; | |
2093 | + Sts = FFFTP_SUCCESS; | |
2094 | 2094 | } |
2095 | 2095 | else |
2096 | 2096 | { |
2097 | - Sts = FAIL; | |
2097 | + Sts = FFFTP_FAIL; | |
2098 | 2098 | } |
2099 | 2099 | return(Sts); |
2100 | 2100 | } |
@@ -2109,7 +2109,7 @@ static int DeleteValue(void *Handle, char *Name) | ||
2109 | 2109 | * |
2110 | 2110 | * Return Value |
2111 | 2111 | * int ステータス |
2112 | -* SUCCESS/FAIL | |
2112 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2113 | 2113 | *----------------------------------------------------------------------------*/ |
2114 | 2114 | |
2115 | 2115 | static int ReadIntValueFromReg(void *Handle, char *Name, int *Value) |
@@ -2118,19 +2118,19 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value) | ||
2118 | 2118 | DWORD Size; |
2119 | 2119 | char *Pos; |
2120 | 2120 | |
2121 | - Sts = FAIL; | |
2121 | + Sts = FFFTP_FAIL; | |
2122 | 2122 | if(TmpRegType == REGTYPE_REG) |
2123 | 2123 | { |
2124 | 2124 | Size = sizeof(int); |
2125 | 2125 | if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Value, &Size) == ERROR_SUCCESS) |
2126 | - Sts = SUCCESS; | |
2126 | + Sts = FFFTP_SUCCESS; | |
2127 | 2127 | } |
2128 | 2128 | else |
2129 | 2129 | { |
2130 | 2130 | if((Pos = ScanValue(Handle, Name)) != NULL) |
2131 | 2131 | { |
2132 | 2132 | *Value = atoi(Pos); |
2133 | - Sts = SUCCESS; | |
2133 | + Sts = FFFTP_SUCCESS; | |
2134 | 2134 | } |
2135 | 2135 | } |
2136 | 2136 | return(Sts); |
@@ -2146,7 +2146,7 @@ static int ReadIntValueFromReg(void *Handle, char *Name, int *Value) | ||
2146 | 2146 | * |
2147 | 2147 | * Return Value |
2148 | 2148 | * int ステータス |
2149 | -* SUCCESS/FAIL | |
2149 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2150 | 2150 | *----------------------------------------------------------------------------*/ |
2151 | 2151 | |
2152 | 2152 | static int WriteIntValueToReg(void *Handle, char *Name, int Value) |
@@ -2167,7 +2167,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value) | ||
2167 | 2167 | strcat(Data, Tmp); |
2168 | 2168 | Pos->ValLen += strlen(Data) + 1; |
2169 | 2169 | } |
2170 | - return(SUCCESS); | |
2170 | + return(FFFTP_SUCCESS); | |
2171 | 2171 | } |
2172 | 2172 | |
2173 | 2173 |
@@ -2181,7 +2181,7 @@ static int WriteIntValueToReg(void *Handle, char *Name, int Value) | ||
2181 | 2181 | * |
2182 | 2182 | * Return Value |
2183 | 2183 | * int ステータス |
2184 | -* SUCCESS/FAIL | |
2184 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2185 | 2185 | *----------------------------------------------------------------------------*/ |
2186 | 2186 | |
2187 | 2187 | 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) | ||
2189 | 2189 | int Sts; |
2190 | 2190 | char *Pos; |
2191 | 2191 | |
2192 | - Sts = FAIL; | |
2192 | + Sts = FFFTP_FAIL; | |
2193 | 2193 | if(TmpRegType == REGTYPE_REG) |
2194 | 2194 | { |
2195 | 2195 | if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_SUCCESS) |
2196 | 2196 | { |
2197 | 2197 | if(*(Str + Size - 1) != NUL) |
2198 | 2198 | *(Str + Size) = NUL; |
2199 | - Sts = SUCCESS; | |
2199 | + Sts = FFFTP_SUCCESS; | |
2200 | 2200 | } |
2201 | 2201 | } |
2202 | 2202 | else |
@@ -2206,7 +2206,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size) | ||
2206 | 2206 | Size = min1(Size-1, strlen(Pos)); |
2207 | 2207 | Size = StrReadIn(Pos, Size, Str); |
2208 | 2208 | *(Str + Size) = NUL; |
2209 | - Sts = SUCCESS; | |
2209 | + Sts = FFFTP_SUCCESS; | |
2210 | 2210 | } |
2211 | 2211 | } |
2212 | 2212 | return(Sts); |
@@ -2222,7 +2222,7 @@ static int ReadStringFromReg(void *Handle, char *Name, char *Str, DWORD Size) | ||
2222 | 2222 | * |
2223 | 2223 | * Return Value |
2224 | 2224 | * int ステータス |
2225 | -* SUCCESS/FAIL | |
2225 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2226 | 2226 | *----------------------------------------------------------------------------*/ |
2227 | 2227 | |
2228 | 2228 | static int WriteStringToReg(void *Handle, char *Name, char *Str) |
@@ -2242,7 +2242,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str) | ||
2242 | 2242 | Data = Pos->ValTbl + Pos->ValLen; |
2243 | 2243 | Pos->ValLen += StrCatOut(Str, strlen(Str), Data) + 1; |
2244 | 2244 | } |
2245 | - return(SUCCESS); | |
2245 | + return(FFFTP_SUCCESS); | |
2246 | 2246 | } |
2247 | 2247 | |
2248 | 2248 |
@@ -2256,7 +2256,7 @@ static int WriteStringToReg(void *Handle, char *Name, char *Str) | ||
2256 | 2256 | * |
2257 | 2257 | * Return Value |
2258 | 2258 | * int ステータス |
2259 | -* SUCCESS/FAIL | |
2259 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2260 | 2260 | *----------------------------------------------------------------------------*/ |
2261 | 2261 | |
2262 | 2262 | 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 | ||
2264 | 2264 | int Sts; |
2265 | 2265 | char *Pos; |
2266 | 2266 | |
2267 | - Sts = FAIL; | |
2267 | + Sts = FFFTP_FAIL; | |
2268 | 2268 | if(TmpRegType == REGTYPE_REG) |
2269 | 2269 | { |
2270 | 2270 | if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Str, &Size) == ERROR_SUCCESS) |
2271 | 2271 | { |
2272 | 2272 | if(*(Str + Size - 1) != NUL) |
2273 | 2273 | *(Str + Size) = NUL; |
2274 | - Sts = SUCCESS; | |
2274 | + Sts = FFFTP_SUCCESS; | |
2275 | 2275 | } |
2276 | 2276 | } |
2277 | 2277 | else |
@@ -2281,7 +2281,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz | ||
2281 | 2281 | Size = min1(Size-1, strlen(Pos)); |
2282 | 2282 | Size = StrReadIn(Pos, Size, Str); |
2283 | 2283 | *(Str + Size) = NUL; |
2284 | - Sts = SUCCESS; | |
2284 | + Sts = FFFTP_SUCCESS; | |
2285 | 2285 | } |
2286 | 2286 | } |
2287 | 2287 | return(Sts); |
@@ -2297,7 +2297,7 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz | ||
2297 | 2297 | * |
2298 | 2298 | * Return Value |
2299 | 2299 | * int ステータス |
2300 | -* SUCCESS/FAIL | |
2300 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2301 | 2301 | *----------------------------------------------------------------------------*/ |
2302 | 2302 | |
2303 | 2303 | static int WriteMultiStringToReg(void *Handle, char *Name, char *Str) |
@@ -2317,7 +2317,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str) | ||
2317 | 2317 | Data = Pos->ValTbl + Pos->ValLen; |
2318 | 2318 | Pos->ValLen += StrCatOut(Str, StrMultiLen(Str), Data) + 1; |
2319 | 2319 | } |
2320 | - return(SUCCESS); | |
2320 | + return(FFFTP_SUCCESS); | |
2321 | 2321 | } |
2322 | 2322 | |
2323 | 2323 |
@@ -2331,7 +2331,7 @@ static int WriteMultiStringToReg(void *Handle, char *Name, char *Str) | ||
2331 | 2331 | * |
2332 | 2332 | * Return Value |
2333 | 2333 | * int ステータス |
2334 | -* SUCCESS/FAIL | |
2334 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2335 | 2335 | *----------------------------------------------------------------------------*/ |
2336 | 2336 | |
2337 | 2337 | 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) | ||
2339 | 2339 | int Sts; |
2340 | 2340 | char *Pos; |
2341 | 2341 | |
2342 | - Sts = FAIL; | |
2342 | + Sts = FFFTP_FAIL; | |
2343 | 2343 | if(TmpRegType == REGTYPE_REG) |
2344 | 2344 | { |
2345 | 2345 | if(RegQueryValueEx(Handle, Name, NULL, NULL, (BYTE *)Bin, &Size) == ERROR_SUCCESS) |
2346 | - Sts = SUCCESS; | |
2346 | + Sts = FFFTP_SUCCESS; | |
2347 | 2347 | } |
2348 | 2348 | else |
2349 | 2349 | { |
@@ -2351,7 +2351,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size) | ||
2351 | 2351 | { |
2352 | 2352 | Size = min1(Size, strlen(Pos)); |
2353 | 2353 | Size = StrReadIn(Pos, Size, Bin); |
2354 | - Sts = SUCCESS; | |
2354 | + Sts = FFFTP_SUCCESS; | |
2355 | 2355 | } |
2356 | 2356 | } |
2357 | 2357 | return(Sts); |
@@ -2368,7 +2368,7 @@ static int ReadBinaryFromReg(void *Handle, char *Name, void *Bin, DWORD Size) | ||
2368 | 2368 | * |
2369 | 2369 | * Return Value |
2370 | 2370 | * int ステータス |
2371 | -* SUCCESS/FAIL | |
2371 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
2372 | 2372 | *----------------------------------------------------------------------------*/ |
2373 | 2373 | |
2374 | 2374 | 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) | ||
2388 | 2388 | Data = Pos->ValTbl + Pos->ValLen; |
2389 | 2389 | Pos->ValLen += StrCatOut(Bin, Len, Data) + 1; |
2390 | 2390 | } |
2391 | - return(SUCCESS); | |
2391 | + return(FFFTP_SUCCESS); | |
2392 | 2392 | } |
2393 | 2393 | |
2394 | 2394 |
@@ -652,7 +652,7 @@ int CommandProcCmd(char *Reply, char *fmt, ...) | ||
652 | 652 | |
653 | 653 | // if((Sts = command(AskCmdCtrlSkt(), Reply, "%s", Cmd)) == 429) |
654 | 654 | // { |
655 | -// if(ReConnectCmdSkt() == SUCCESS) | |
655 | +// if(ReConnectCmdSkt() == FFFTP_SUCCESS) | |
656 | 656 | // { |
657 | 657 | Sts = command(AskCmdCtrlSkt(), Reply, &CheckCancelFlg, "%s", Cmd); |
658 | 658 | // } |
@@ -690,7 +690,7 @@ int CommandProcTrn(char *Reply, char *fmt, ...) | ||
690 | 690 | |
691 | 691 | // if((Sts = command(AskTrnCtrlSkt(), Reply, "%s", Cmd)) == 429) |
692 | 692 | // { |
693 | -// if(ReConnectTrnSkt() == SUCCESS) | |
693 | +// if(ReConnectTrnSkt() == FFFTP_SUCCESS) | |
694 | 694 | Sts = command(AskTrnCtrlSkt(), Reply, &CheckCancelFlg, "%s", Cmd); |
695 | 695 | // } |
696 | 696 | return(Sts); |
@@ -749,7 +749,7 @@ int command(SOCKET cSkt, char *Reply, int *CancelCheckWork, char *fmt, ...) | ||
749 | 749 | strcpy(Reply, ""); |
750 | 750 | |
751 | 751 | Sts = 429; |
752 | - if(SendData(cSkt, Cmd, strlen(Cmd), 0, CancelCheckWork) == SUCCESS) | |
752 | + if(SendData(cSkt, Cmd, strlen(Cmd), 0, CancelCheckWork) == FFFTP_SUCCESS) | |
753 | 753 | { |
754 | 754 | Sts = ReadReplyMessage(cSkt, Reply, 1024, CancelCheckWork, TmpBuf); |
755 | 755 | } |
@@ -779,7 +779,7 @@ int command(SOCKET cSkt, char *Reply, int *CancelCheckWork, char *fmt, ...) | ||
779 | 779 | * |
780 | 780 | * Return Value |
781 | 781 | * int ステータス |
782 | -* SUCCESS/FAIL | |
782 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
783 | 783 | *----------------------------------------------------------------------------*/ |
784 | 784 | |
785 | 785 | 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) | ||
791 | 791 | // struct timeval *ToutPtr; |
792 | 792 | int TimeOutErr; |
793 | 793 | |
794 | - Sts = FAIL; | |
794 | + Sts = FFFTP_FAIL; | |
795 | 795 | if(Skt != INVALID_SOCKET) |
796 | 796 | { |
797 | - Sts = SUCCESS; | |
797 | + Sts = FFFTP_SUCCESS; | |
798 | 798 | while(Size > 0) |
799 | 799 | { |
800 | 800 | // FD_ZERO(&SendFds); |
@@ -809,13 +809,13 @@ int SendData(SOCKET Skt, char *Data, int Size, int Mode, int *CancelCheckWork) | ||
809 | 809 | // Tmp = select(0, NULL, &SendFds, NULL, ToutPtr); |
810 | 810 | // if(Tmp == SOCKET_ERROR) |
811 | 811 | // { |
812 | -// Sts = FAIL; | |
812 | +// Sts = FFFTP_FAIL; | |
813 | 813 | // ReportWSError("select", WSAGetLastError()); |
814 | 814 | // break; |
815 | 815 | // } |
816 | 816 | // else if(Tmp == 0) |
817 | 817 | // { |
818 | -// Sts = FAIL; | |
818 | +// Sts = FFFTP_FAIL; | |
819 | 819 | // SetTaskMsg(MSGJPN241); |
820 | 820 | // break; |
821 | 821 | // } |
@@ -823,13 +823,13 @@ int SendData(SOCKET Skt, char *Data, int Size, int Mode, int *CancelCheckWork) | ||
823 | 823 | Tmp = do_send(Skt, Data, Size, Mode, &TimeOutErr, CancelCheckWork); |
824 | 824 | if(TimeOutErr == YES) |
825 | 825 | { |
826 | - Sts = FAIL; | |
826 | + Sts = FFFTP_FAIL; | |
827 | 827 | SetTaskMsg(MSGJPN241); |
828 | 828 | break; |
829 | 829 | } |
830 | 830 | else if(Tmp == SOCKET_ERROR) |
831 | 831 | { |
832 | - Sts = FAIL; | |
832 | + Sts = FFFTP_FAIL; | |
833 | 833 | ReportWSError("send", WSAGetLastError()); |
834 | 834 | break; |
835 | 835 | } |
@@ -1056,7 +1056,7 @@ static int ReadOneLine(SOCKET cSkt, char *Buf, int Max, int *CancelCheckWork) | ||
1056 | 1056 | * |
1057 | 1057 | * Return Value |
1058 | 1058 | * int ステータス |
1059 | -* SUCCESS/FAIL | |
1059 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1060 | 1060 | *----------------------------------------------------------------------------*/ |
1061 | 1061 | |
1062 | 1062 | int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork) |
@@ -1069,10 +1069,10 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork) | ||
1069 | 1069 | int Sts; |
1070 | 1070 | int TimeOutErr; |
1071 | 1071 | |
1072 | - Sts = FAIL; | |
1072 | + Sts = FFFTP_FAIL; | |
1073 | 1073 | if(cSkt != INVALID_SOCKET) |
1074 | 1074 | { |
1075 | - Sts = SUCCESS; | |
1075 | + Sts = FFFTP_SUCCESS; | |
1076 | 1076 | while(Size > 0) |
1077 | 1077 | { |
1078 | 1078 | // FD_ZERO(&ReadFds); |
@@ -1088,13 +1088,13 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork) | ||
1088 | 1088 | // if(i == SOCKET_ERROR) |
1089 | 1089 | // { |
1090 | 1090 | // ReportWSError("select", WSAGetLastError()); |
1091 | -// Sts = FAIL; | |
1091 | +// Sts = FFFTP_FAIL; | |
1092 | 1092 | // break; |
1093 | 1093 | // } |
1094 | 1094 | // else if(i == 0) |
1095 | 1095 | // { |
1096 | 1096 | // SetTaskMsg(MSGJPN243); |
1097 | -// Sts = FAIL; | |
1097 | +// Sts = FFFTP_FAIL; | |
1098 | 1098 | // break; |
1099 | 1099 | // } |
1100 | 1100 |
@@ -1102,7 +1102,7 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork) | ||
1102 | 1102 | { |
1103 | 1103 | if(TimeOutErr == YES) |
1104 | 1104 | SetTaskMsg(MSGJPN243); |
1105 | - Sts = FAIL; | |
1105 | + Sts = FFFTP_FAIL; | |
1106 | 1106 | break; |
1107 | 1107 | } |
1108 | 1108 |
@@ -1111,7 +1111,7 @@ int ReadNchar(SOCKET cSkt, char *Buf, int Size, int *CancelCheckWork) | ||
1111 | 1111 | } |
1112 | 1112 | } |
1113 | 1113 | |
1114 | - if(Sts == FAIL) | |
1114 | + if(Sts == FFFTP_FAIL) | |
1115 | 1115 | SetTaskMsg(MSGJPN244); |
1116 | 1116 | |
1117 | 1117 | return(Sts); |
@@ -1287,7 +1287,7 @@ void ReportWSError(char *Msg, UINT Error) | ||
1287 | 1287 | * |
1288 | 1288 | * Return Value |
1289 | 1289 | * int ステータス |
1290 | -* SUCCESS/FAIL | |
1290 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1291 | 1291 | *----------------------------------------------------------------------------*/ |
1292 | 1292 | |
1293 | 1293 | int ChangeFnameRemote2Local(char *Fname, int Max) |
@@ -1297,7 +1297,7 @@ int ChangeFnameRemote2Local(char *Fname, int Max) | ||
1297 | 1297 | char *Pos; |
1298 | 1298 | CODECONVINFO cInfo; |
1299 | 1299 | |
1300 | - Sts = FAIL; | |
1300 | + Sts = FFFTP_FAIL; | |
1301 | 1301 | if((Buf = malloc(Max)) != NULL) |
1302 | 1302 | { |
1303 | 1303 | InitCodeConvInfo(&cInfo); |
@@ -1351,7 +1351,7 @@ int ChangeFnameRemote2Local(char *Fname, int Max) | ||
1351 | 1351 | break; |
1352 | 1352 | } |
1353 | 1353 | free(Buf); |
1354 | - Sts = SUCCESS; | |
1354 | + Sts = FFFTP_SUCCESS; | |
1355 | 1355 | } |
1356 | 1356 | return(Sts); |
1357 | 1357 | } |
@@ -1365,7 +1365,7 @@ int ChangeFnameRemote2Local(char *Fname, int Max) | ||
1365 | 1365 | * |
1366 | 1366 | * Return Value |
1367 | 1367 | * int ステータス |
1368 | -* SUCCESS/FAIL | |
1368 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1369 | 1369 | *----------------------------------------------------------------------------*/ |
1370 | 1370 | |
1371 | 1371 | int ChangeFnameLocal2Remote(char *Fname, int Max) |
@@ -1375,7 +1375,7 @@ int ChangeFnameLocal2Remote(char *Fname, int Max) | ||
1375 | 1375 | char *Pos; |
1376 | 1376 | CODECONVINFO cInfo; |
1377 | 1377 | |
1378 | - Sts = FAIL; | |
1378 | + Sts = FFFTP_FAIL; | |
1379 | 1379 | if((Buf = malloc(Max)) != NULL) |
1380 | 1380 | { |
1381 | 1381 | InitCodeConvInfo(&cInfo); |
@@ -1438,7 +1438,7 @@ int ChangeFnameLocal2Remote(char *Fname, int Max) | ||
1438 | 1438 | break; |
1439 | 1439 | } |
1440 | 1440 | free(Buf); |
1441 | - Sts = SUCCESS; | |
1441 | + Sts = FFFTP_SUCCESS; | |
1442 | 1442 | } |
1443 | 1443 | return(Sts); |
1444 | 1444 | } |
@@ -69,8 +69,8 @@ | ||
69 | 69 | #define TRUE 1 |
70 | 70 | #define FALSE 0 |
71 | 71 | |
72 | -#define SUCCESS 0 | |
73 | -#define FAILURE -1 | |
72 | +#define FFFTP_SUCCESS 0 | |
73 | +#define FFFTP_FAILURE -1 | |
74 | 74 | |
75 | 75 | int sha_file(); /* External entries */ |
76 | 76 | void sha_stream(), sha_memory(); |
@@ -121,7 +121,7 @@ char **argv; | ||
121 | 121 | if (verbose) printf("%s:", *argv); |
122 | 122 | file_args = TRUE; /* Whether or not we could read it */ |
123 | 123 | |
124 | - if (sha_file(*argv, hbuf) == FAILURE) | |
124 | + if (sha_file(*argv, hbuf) == FFFTP_FAILURE) | |
125 | 125 | printf("Can't open file %s.\n", *argv); |
126 | 126 | else |
127 | 127 | if (terse) printf("%08lx%08lx%08lx%08lx%08lx\n", |
@@ -187,11 +187,11 @@ uint32 *buffer; | ||
187 | 187 | |
188 | 188 | for (i = 0; i < 5; i++) |
189 | 189 | buffer[i] = 0xdeadbeef; |
190 | - return FAILURE; | |
190 | + return FFFTP_FAILURE; | |
191 | 191 | } |
192 | 192 | (void) sha_stream(infile, buffer); |
193 | 193 | fclose(infile); |
194 | - return SUCCESS; | |
194 | + return FFFTP_SUCCESS; | |
195 | 195 | } |
196 | 196 | |
197 | 197 | void sha_memory(mem, length, buffer) /* Hash a memory block */ |
@@ -296,7 +296,7 @@ static const char Wp[2048][4] = { | ||
296 | 296 | * |
297 | 297 | * Return Value |
298 | 298 | * int ステータス |
299 | -* SUCCESS/FAIL | |
299 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
300 | 300 | *----------------------------------------------------------------------------*/ |
301 | 301 | |
302 | 302 | 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) | ||
305 | 305 | int i; |
306 | 306 | int Sts; |
307 | 307 | |
308 | - Sts = FAIL; | |
309 | - if(keycrunch(key, seed, pass, type) != FAIL) | |
308 | + Sts = FFFTP_FAIL; | |
309 | + if(keycrunch(key, seed, pass, type) != FFFTP_FAIL) | |
310 | 310 | { |
311 | 311 | for(i = 0; i < seq; i++) |
312 | 312 | secure_hash(key, type); |
313 | 313 | btoe(key, buf); |
314 | - Sts = SUCCESS; | |
314 | + Sts = FFFTP_SUCCESS; | |
315 | 315 | } |
316 | 316 | return(Sts); |
317 | 317 | } |
@@ -328,7 +328,7 @@ static int keycrunch(char *result, char *seed, char *passwd, int Type) | ||
328 | 328 | |
329 | 329 | buflen = strlen(seed) + strlen(passwd); |
330 | 330 | if((buf = malloc(buflen + 1)) == NULL) |
331 | - return(FAIL); | |
331 | + return(FFFTP_FAIL); | |
332 | 332 | strcpy(buf, seed); |
333 | 333 | strcat(buf, passwd); |
334 | 334 |
@@ -361,7 +361,7 @@ static int keycrunch(char *result, char *seed, char *passwd, int Type) | ||
361 | 361 | /* Only works on byte-addressed little-endian machines!! */ |
362 | 362 | memcpy(result, (char *)results, 8); |
363 | 363 | |
364 | - return(SUCCESS); | |
364 | + return(FFFTP_SUCCESS); | |
365 | 365 | } |
366 | 366 | |
367 | 367 |
@@ -115,7 +115,7 @@ static ASYNCSIGNALDATABASE SignalDbase[MAX_SIGNAL_ENTRY_DBASE]; | ||
115 | 115 | * |
116 | 116 | * Return Value |
117 | 117 | * int ステータス |
118 | -* SUCCESS/FAIL | |
118 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
119 | 119 | *----------------------------------------------------------------------------*/ |
120 | 120 | |
121 | 121 | int MakeSocketWin(HWND hWnd, HINSTANCE hInst) |
@@ -138,7 +138,7 @@ int MakeSocketWin(HWND hWnd, HINSTANCE hInst) | ||
138 | 138 | wClass.hIconSm = NULL; |
139 | 139 | RegisterClassEx(&wClass); |
140 | 140 | |
141 | - Sts = FAIL; | |
141 | + Sts = FFFTP_FAIL; | |
142 | 142 | hWndSocket = CreateWindowEx(0, SocketWndClass, NULL, |
143 | 143 | WS_BORDER | WS_POPUP, |
144 | 144 | 0, 0, 0, 0, |
@@ -152,7 +152,7 @@ int MakeSocketWin(HWND hWnd, HINSTANCE hInst) | ||
152 | 152 | Signal[i].Socket = INVALID_SOCKET; |
153 | 153 | for(i = 0; i < MAX_SIGNAL_ENTRY_DBASE; i++) |
154 | 154 | SignalDbase[i].Async = 0; |
155 | - Sts = SUCCESS; | |
155 | + Sts = FFFTP_SUCCESS; | |
156 | 156 | } |
157 | 157 | return(Sts); |
158 | 158 | } |
@@ -1015,7 +1015,7 @@ int do_send(SOCKET s, const char *buf, int len, int flags, int *TimeOutErr, int | ||
1015 | 1015 | * |
1016 | 1016 | * Return Value |
1017 | 1017 | * int ステータス |
1018 | -* SUCCESS/FAIL | |
1018 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
1019 | 1019 | *----------------------------------------------------------------------------*/ |
1020 | 1020 | |
1021 | 1021 | int CheckClosedAndReconnect(void) |
@@ -1025,7 +1025,7 @@ int CheckClosedAndReconnect(void) | ||
1025 | 1025 | |
1026 | 1026 | //SetTaskMsg("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); |
1027 | 1027 | |
1028 | - Sts = SUCCESS; | |
1028 | + Sts = FFFTP_SUCCESS; | |
1029 | 1029 | if(AskAsyncDone(AskCmdCtrlSkt(), &Error, FD_CLOSE_BIT) == YES) |
1030 | 1030 | { |
1031 | 1031 | Sts = ReConnectCmdSkt(); |
@@ -58,14 +58,14 @@ static int SbarColWidth[5] = { 70, 230, 410, 570, -1 }; | ||
58 | 58 | * |
59 | 59 | * Return Value |
60 | 60 | * int ステータス |
61 | -* SUCCESS/FAIL | |
61 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
62 | 62 | *----------------------------------------------------------------------------*/ |
63 | 63 | |
64 | 64 | int MakeStatusBarWindow(HWND hWnd, HINSTANCE hInst) |
65 | 65 | { |
66 | 66 | int Sts; |
67 | 67 | |
68 | - Sts = FAIL; | |
68 | + Sts = FFFTP_FAIL; | |
69 | 69 | hWndSbar = CreateWindowEx(0, |
70 | 70 | STATUSCLASSNAME, NULL, |
71 | 71 | WS_CHILD | SBS_SIZEGRIP | WS_CLIPSIBLINGS | SBT_NOBORDERS, |
@@ -76,7 +76,7 @@ int MakeStatusBarWindow(HWND hWnd, HINSTANCE hInst) | ||
76 | 76 | { |
77 | 77 | SendMessage(hWndSbar, SB_SETPARTS, sizeof(SbarColWidth)/sizeof(int), (LPARAM)SbarColWidth); |
78 | 78 | ShowWindow(hWndSbar, SW_SHOW); |
79 | - Sts = SUCCESS; | |
79 | + Sts = FFFTP_SUCCESS; | |
80 | 80 | } |
81 | 81 | return(Sts); |
82 | 82 | } |
@@ -74,14 +74,14 @@ static HANDLE DispLogSemaphore2; | ||
74 | 74 | * |
75 | 75 | * Return Value |
76 | 76 | * int ステータス |
77 | -* SUCCESS/FAIL | |
77 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
78 | 78 | *----------------------------------------------------------------------------*/ |
79 | 79 | |
80 | 80 | int MakeTaskWindow(HWND hWnd, HINSTANCE hInst) |
81 | 81 | { |
82 | 82 | int Sts; |
83 | 83 | |
84 | - Sts = FAIL; | |
84 | + Sts = FFFTP_FAIL; | |
85 | 85 | hWndTask = CreateWindowEx(/*WS_EX_STATICEDGE*/WS_EX_CLIENTEDGE, |
86 | 86 | "EDIT", NULL, |
87 | 87 | WS_CHILD | WS_BORDER | ES_AUTOVSCROLL | WS_VSCROLL | ES_MULTILINE | ES_READONLY | WS_CLIPSIBLINGS, |
@@ -96,7 +96,7 @@ int MakeTaskWindow(HWND hWnd, HINSTANCE hInst) | ||
96 | 96 | SendMessage(hWndTask, WM_SETFONT, (WPARAM)ListFont, MAKELPARAM(TRUE, 0)); |
97 | 97 | |
98 | 98 | ShowWindow(hWndTask, SW_SHOW); |
99 | - Sts = SUCCESS; | |
99 | + Sts = FFFTP_SUCCESS; | |
100 | 100 | |
101 | 101 | DispLogSemaphore = CreateSemaphore(NULL, 1, 1, NULL); |
102 | 102 | DispLogSemaphore2 = CreateSemaphore(NULL, 1, 1, NULL); |
@@ -211,7 +211,7 @@ void SetTaskMsg(char *szFormat, ...) | ||
211 | 211 | * |
212 | 212 | * Return Value |
213 | 213 | * int ステータス |
214 | -* SUCCESS/FAIL | |
214 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
215 | 215 | *----------------------------------------------------------------------------*/ |
216 | 216 | |
217 | 217 | int SaveTaskMsg(char *Fname) |
@@ -222,7 +222,7 @@ int SaveTaskMsg(char *Fname) | ||
222 | 222 | int Sts; |
223 | 223 | |
224 | 224 | |
225 | - Sts = FAIL; | |
225 | + Sts = FFFTP_FAIL; | |
226 | 226 | Size = SendMessage(GetTaskWnd(), WM_GETTEXTLENGTH, 0, 0); |
227 | 227 | if((Buf = malloc(Size)) != NULL) |
228 | 228 | { |
@@ -230,10 +230,10 @@ int SaveTaskMsg(char *Fname) | ||
230 | 230 | { |
231 | 231 | SendMessage(GetTaskWnd(), WM_GETTEXT, Size, (LPARAM)Buf); |
232 | 232 | if(fwrite(Buf, strlen(Buf), 1, Strm) == 1) |
233 | - Sts = SUCCESS; | |
233 | + Sts = FFFTP_SUCCESS; | |
234 | 234 | fclose(Strm); |
235 | 235 | |
236 | - if(Sts == FAIL) | |
236 | + if(Sts == FFFTP_FAIL) | |
237 | 237 | _unlink(Fname); |
238 | 238 | } |
239 | 239 | free(Buf); |
@@ -259,7 +259,7 @@ void DispTaskMsg(void) | ||
259 | 259 | SetYenTail(Buf); |
260 | 260 | strcat(Buf, "_ffftp.tsk"); |
261 | 261 | |
262 | - if(SaveTaskMsg(Buf) == SUCCESS) | |
262 | + if(SaveTaskMsg(Buf) == FFFTP_SUCCESS) | |
263 | 263 | { |
264 | 264 | AddTempFileList(Buf); |
265 | 265 | ExecViewer(Buf, 0); |
@@ -122,7 +122,7 @@ static BOOL CALLBACK OtpCalcWinProc(HWND hDlg, UINT message, WPARAM wParam, LPAR | ||
122 | 122 | /* Seed */ |
123 | 123 | if((Pos = GetNextField(Pos)) != NULL) |
124 | 124 | { |
125 | - if(GetOneField(Pos, Seed, MAX_SEED_LEN) == SUCCESS) | |
125 | + if(GetOneField(Pos, Seed, MAX_SEED_LEN) == FFFTP_SUCCESS) | |
126 | 126 | { |
127 | 127 | Make6WordPass(Seq, Seed, Pass, Type, Tmp); |
128 | 128 | } |
@@ -206,7 +206,7 @@ static const int HideMenus[] = { | ||
206 | 206 | * |
207 | 207 | * Return Value |
208 | 208 | * int ステータス |
209 | -* SUCCESS/FAIL | |
209 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
210 | 210 | *----------------------------------------------------------------------------*/ |
211 | 211 | |
212 | 212 | int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst) |
@@ -351,14 +351,14 @@ int MakeToolBarWindow(HWND hWnd, HINSTANCE hInst) | ||
351 | 351 | } |
352 | 352 | } |
353 | 353 | |
354 | - Sts = SUCCESS; | |
354 | + Sts = FFFTP_SUCCESS; | |
355 | 355 | if((hWndTbarMain == NULL) || |
356 | 356 | (hWndTbarLocal == NULL) || |
357 | 357 | (hWndTbarRemote == NULL) || |
358 | 358 | (hWndDirLocal == NULL) || |
359 | 359 | (hWndDirRemote == NULL)) |
360 | 360 | { |
361 | - Sts = FAIL; | |
361 | + Sts = FFFTP_FAIL; | |
362 | 362 | } |
363 | 363 | return(Sts); |
364 | 364 | } |
@@ -385,7 +385,7 @@ static LRESULT CALLBACK HistEditBoxWndProc(HWND hWnd, UINT message, WPARAM wPara | ||
385 | 385 | else |
386 | 386 | { |
387 | 387 | SendMessage(hWndDirRemoteEdit, WM_GETTEXT, FMAX_PATH+1, (LPARAM)Tmp); |
388 | - if(CheckClosedAndReconnect() == SUCCESS) | |
388 | + if(CheckClosedAndReconnect() == FFFTP_SUCCESS) | |
389 | 389 | { |
390 | 390 | if(DoCWD(Tmp, YES, NO, YES) < FTP_RETRY) |
391 | 391 | GetRemoteDirForWnd(CACHE_NORMAL, &CancelFlg); |
@@ -925,7 +925,7 @@ int AskTransferTypeAssoc(char *Fname, int Type) | ||
925 | 925 | Pos = AsciiExt; |
926 | 926 | while(*Pos != NUL) |
927 | 927 | { |
928 | - if(CheckFname(Name, Pos) == SUCCESS) | |
928 | + if(CheckFname(Name, Pos) == FFFTP_SUCCESS) | |
929 | 929 | { |
930 | 930 | Ret = TYPE_A; |
931 | 931 | break; |
@@ -51,7 +51,7 @@ static int CheckNameMatch(char *str, char *regexp); | ||
51 | 51 | * |
52 | 52 | * Return Value |
53 | 53 | * int ステータス |
54 | -* SUCCESS/FAIL | |
54 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
55 | 55 | * |
56 | 56 | * Note |
57 | 57 | * VAX VMSの時は ; 以降は無視する |
@@ -84,14 +84,14 @@ int CheckFname(char *str, char *regexp) | ||
84 | 84 | if((strcmp(p1, "*.*") == 0) || (strcmp(p1, "????????.???") == 0)) |
85 | 85 | strcpy(p1, "*"); |
86 | 86 | |
87 | - Sts = SUCCESS; | |
87 | + Sts = FFFTP_SUCCESS; | |
88 | 88 | if(strcmp(p1, "*") != 0) |
89 | 89 | { |
90 | 90 | if(strcmp(p1, "*.") == 0) |
91 | 91 | { |
92 | 92 | p = strchr(p2, '.'); |
93 | 93 | if((p != NULL) && (*(p+1) != NUL)) |
94 | - Sts = FAIL; | |
94 | + Sts = FFFTP_FAIL; | |
95 | 95 | } |
96 | 96 | else |
97 | 97 | Sts = CheckNameMatch(p2, p1); |
@@ -108,7 +108,7 @@ int CheckFname(char *str, char *regexp) | ||
108 | 108 | * |
109 | 109 | * Return Value |
110 | 110 | * int ステータス |
111 | -* SUCCESS/FAIL | |
111 | +* FFFTP_SUCCESS/FFFTP_FAIL | |
112 | 112 | *----------------------------------------------------------------------------*/ |
113 | 113 | |
114 | 114 | static int CheckNameMatch(char *str, char *regexp) |
@@ -128,23 +128,23 @@ static int CheckNameMatch(char *str, char *regexp) | ||
128 | 128 | /* Look for a character matching the one after the '*' */ |
129 | 129 | p++; |
130 | 130 | if(*p == NUL) |
131 | - return SUCCESS; /* Automatic match */ | |
131 | + return FFFTP_SUCCESS; /* Automatic match */ | |
132 | 132 | while(*str != NUL) |
133 | 133 | { |
134 | 134 | while((*str != NUL) && (toupper(*p)!=toupper(*str))) |
135 | 135 | str++; |
136 | 136 | if(CheckNameMatch(str, p)) |
137 | - return SUCCESS; | |
137 | + return FFFTP_SUCCESS; | |
138 | 138 | if(*str == NUL) |
139 | - return FAIL; | |
139 | + return FFFTP_FAIL; | |
140 | 140 | else |
141 | 141 | str++; |
142 | 142 | } |
143 | - return FAIL; | |
143 | + return FFFTP_FAIL; | |
144 | 144 | |
145 | 145 | default: |
146 | 146 | if(toupper(*str) != toupper(*p)) |
147 | - return FAIL; | |
147 | + return FFFTP_FAIL; | |
148 | 148 | str++; |
149 | 149 | p++; |
150 | 150 | break; |
@@ -152,10 +152,10 @@ static int CheckNameMatch(char *str, char *regexp) | ||
152 | 152 | } |
153 | 153 | |
154 | 154 | if((*p == NUL) && (*str == NUL)) |
155 | - return SUCCESS; | |
155 | + return FFFTP_SUCCESS; | |
156 | 156 | |
157 | 157 | if ((*p != NUL) && (str[0] == '.') && (str[1] == 0)) |
158 | - return(SUCCESS); | |
158 | + return(FFFTP_SUCCESS); | |
159 | 159 | |
160 | 160 | if ((*str == NUL) && (*p == '?')) |
161 | 161 | { |
@@ -165,8 +165,8 @@ static int CheckNameMatch(char *str, char *regexp) | ||
165 | 165 | } |
166 | 166 | |
167 | 167 | if((*str == NUL) && (*p == '*') && (p[1] == '\0')) |
168 | - return SUCCESS; | |
168 | + return FFFTP_SUCCESS; | |
169 | 169 | |
170 | - return FAIL; | |
170 | + return FFFTP_FAIL; | |
171 | 171 | } |
172 | 172 |