More A38 stuff see WHATSNEW
This commit is contained in:
parent
8d8193c7a8
commit
0f72b01e12
|
@ -20,6 +20,7 @@ Function CurDateDos : LongInt;
|
||||||
Function CurDateJulian : LongInt;
|
Function CurDateJulian : LongInt;
|
||||||
Function CurDateDT : DateTime;
|
Function CurDateDT : DateTime;
|
||||||
Function DateDos2Str (Date: LongInt; Format: Byte) : String;
|
Function DateDos2Str (Date: LongInt; Format: Byte) : String;
|
||||||
|
Function DateDos2DT (Date: LongInt) : DateTime;
|
||||||
Function DateJulian2Str (Date: LongInt; Format: Byte) : String;
|
Function DateJulian2Str (Date: LongInt; Format: Byte) : String;
|
||||||
Function DateStr2Dos (Str: String) : LongInt;
|
Function DateStr2Dos (Str: String) : LongInt;
|
||||||
Function DateStr2Julian (Str: String) : LongInt;
|
Function DateStr2Julian (Str: String) : LongInt;
|
||||||
|
@ -153,6 +154,11 @@ Begin
|
||||||
GetTime (Result.Hour, Result.Min, Result.Sec, Temp);
|
GetTime (Result.Hour, Result.Min, Result.Sec, Temp);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Function DateDos2DT (Date: LongInt) : DateTime;
|
||||||
|
Begin
|
||||||
|
UnPackTime (Date, Result);
|
||||||
|
End;
|
||||||
|
|
||||||
Function TimerSeconds : LongInt;
|
Function TimerSeconds : LongInt;
|
||||||
Var
|
Var
|
||||||
Hour,
|
Hour,
|
||||||
|
|
|
@ -68,7 +68,7 @@ Begin
|
||||||
|
|
||||||
If Client.FSocketHandle = -1 Then Exit;
|
If Client.FSocketHandle = -1 Then Exit;
|
||||||
|
|
||||||
// WriteLn ('DEBUG SEND ' + Str);
|
WriteLn ('DEBUG SENT ' + Str);
|
||||||
|
|
||||||
Client.PurgeInputData(1);
|
Client.PurgeInputData(1);
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ Begin
|
||||||
ResponseType := strS2I(Copy(ResponseStr, 1, 3));
|
ResponseType := strS2I(Copy(ResponseStr, 1, 3));
|
||||||
Result := ResponseType;
|
Result := ResponseType;
|
||||||
|
|
||||||
// WriteLn ('DEBUG RECV ' + ResponseStr);
|
WriteLn ('DEBUG RECV ' + ResponseStr);
|
||||||
|
|
||||||
If ResponseStr[4] = '-' Then Begin
|
If ResponseStr[4] = '-' Then Begin
|
||||||
{$IFDEF USESTRINGLIST}
|
{$IFDEF USESTRINGLIST}
|
||||||
|
|
|
@ -12,6 +12,7 @@ Const
|
||||||
ftpResOK = 0;
|
ftpResOK = 0;
|
||||||
ftpResFailed = 1;
|
ftpResFailed = 1;
|
||||||
ftpResBadData = 2;
|
ftpResBadData = 2;
|
||||||
|
ftpResNoFile = 3;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
WordRec = Record
|
WordRec = Record
|
||||||
|
@ -174,9 +175,10 @@ Begin
|
||||||
|
|
||||||
Client.WriteLine ('STOR ' + JustFile(FileName));
|
Client.WriteLine ('STOR ' + JustFile(FileName));
|
||||||
|
|
||||||
OK := OpenDataSession;
|
OK := OpenDataSession;
|
||||||
|
Res := GetResponse;
|
||||||
|
|
||||||
If OK and (GetResponse = 150) Then Begin
|
If OK and (Res = 150) Then Begin
|
||||||
Assign (F, FileName);
|
Assign (F, FileName);
|
||||||
|
|
||||||
If ioReset(F, 1, fmRWDN) Then Begin
|
If ioReset(F, 1, fmRWDN) Then Begin
|
||||||
|
@ -197,7 +199,10 @@ Begin
|
||||||
If GetResponse = 226 Then
|
If GetResponse = 226 Then
|
||||||
Result := ftpResOK;
|
Result := ftpResOK;
|
||||||
End Else Begin
|
End Else Begin
|
||||||
Result := ftpResBadData;
|
If Res = 550 Then
|
||||||
|
Result := ftpResNoFile
|
||||||
|
Else
|
||||||
|
Result := ftpResBadData;
|
||||||
|
|
||||||
CloseDataSession;
|
CloseDataSession;
|
||||||
End;
|
End;
|
||||||
|
@ -218,9 +223,10 @@ Begin
|
||||||
|
|
||||||
Client.WriteLine('RETR ' + JustFile(FileName));
|
Client.WriteLine('RETR ' + JustFile(FileName));
|
||||||
|
|
||||||
OK := OpenDataSession;
|
OK := OpenDataSession;
|
||||||
|
Res := GetResponse;
|
||||||
|
|
||||||
If OK And (GetResponse = 150) Then Begin
|
If OK And (Res = 150) Then Begin
|
||||||
Assign (F, FileName);
|
Assign (F, FileName);
|
||||||
|
|
||||||
If ioReWrite(F, 1, fmRWDW) Then Begin
|
If ioReWrite(F, 1, fmRWDW) Then Begin
|
||||||
|
@ -241,7 +247,10 @@ Begin
|
||||||
If GetResponse = 226 Then
|
If GetResponse = 226 Then
|
||||||
Result := ftpResOK;
|
Result := ftpResOK;
|
||||||
End Else Begin
|
End Else Begin
|
||||||
Result := ftpResBadData;
|
If Res = 550 Then
|
||||||
|
Result := ftpResNoFile
|
||||||
|
Else
|
||||||
|
Result := ftpResBadData;
|
||||||
|
|
||||||
CloseDataSession;
|
CloseDataSession;
|
||||||
End;
|
End;
|
||||||
|
|
Loading…
Reference in New Issue