A36
This commit is contained in:
parent
9909d064a5
commit
41316ef5a6
|
@ -51,7 +51,7 @@ Type
|
||||||
Procedure BufWriteStr (Str: String); Override;
|
Procedure BufWriteStr (Str: String); Override;
|
||||||
Function WriteLine (Str: String) : LongInt; Override;
|
Function WriteLine (Str: String) : LongInt; Override;
|
||||||
Function WriteStr (Str: String) : LongInt; Override;
|
Function WriteStr (Str: String) : LongInt; Override;
|
||||||
Function WriteFile (Str: String) : Boolean;
|
Function WriteFile (Prefix, FileName: String) : Boolean;
|
||||||
Function WriteBufEscaped (Var Buf: TIOBuffer; Var Len: LongInt) : LongInt;
|
Function WriteBufEscaped (Var Buf: TIOBuffer; Var Len: LongInt) : LongInt;
|
||||||
Procedure TelnetInBuffer (Var Buf: TIOBuffer; Var Len: LongInt);
|
Procedure TelnetInBuffer (Var Buf: TIOBuffer; Var Len: LongInt);
|
||||||
Function ReadBuf (Var Buf; Len: LongInt) : LongInt; Override;
|
Function ReadBuf (Var Buf; Len: LongInt) : LongInt; Override;
|
||||||
|
@ -228,6 +228,37 @@ Begin
|
||||||
Result := fpSend(FSocketHandle, @Str[1], Length(Str), FPSENDOPT);
|
Result := fpSend(FSocketHandle, @Str[1], Length(Str), FPSENDOPT);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Function TIOSocket.WriteFile (Prefix, FileName: String) : Boolean;
|
||||||
|
Var
|
||||||
|
T : Text;
|
||||||
|
S : String;
|
||||||
|
Begin
|
||||||
|
Result := False;
|
||||||
|
FileMode := 66;
|
||||||
|
|
||||||
|
Assign (T, FileName);
|
||||||
|
Reset (T);
|
||||||
|
|
||||||
|
If IoResult <> 0 Then Exit;
|
||||||
|
|
||||||
|
While Not Eof(T) Do Begin
|
||||||
|
ReadLn (T, S);
|
||||||
|
|
||||||
|
If Prefix <> '' Then
|
||||||
|
If EOF(T) Then
|
||||||
|
S := Prefix + ' ' + S
|
||||||
|
Else
|
||||||
|
S := Prefix + '- ' + S;
|
||||||
|
|
||||||
|
WriteLine(S);
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (T);
|
||||||
|
|
||||||
|
Result := True;
|
||||||
|
End;
|
||||||
|
|
||||||
|
(*
|
||||||
Function TIOSocket.WriteFile (Str: String) : Boolean;
|
Function TIOSocket.WriteFile (Str: String) : Boolean;
|
||||||
Var
|
Var
|
||||||
Buf : Array[1..4096] of Char;
|
Buf : Array[1..4096] of Char;
|
||||||
|
@ -255,6 +286,7 @@ Begin
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
End;
|
End;
|
||||||
|
*)
|
||||||
|
|
||||||
Function TIOSocket.WriteBufEscaped (Var Buf: TIOBuffer; Var Len: LongInt) : LongInt;
|
Function TIOSocket.WriteBufEscaped (Var Buf: TIOBuffer; Var Len: LongInt) : LongInt;
|
||||||
Var
|
Var
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
$LINUX : Set if target OS is linux
|
$LINUX : Set if target OS is linux
|
||||||
$WINDOWS : Set if target OS is windows
|
$WINDOWS : Set if target OS is windows
|
||||||
$DARWIN : Set if target OS is Mac OSX
|
$DARWIN : Set if target OS is Mac OSX
|
||||||
|
$OS2 : Set if target OS is OS2
|
||||||
|
|
||||||
FILE SYSTEMS:
|
FILE SYSTEMS:
|
||||||
$FS_SENSITIVE : Set if target file system is case sensitive
|
$FS_SENSITIVE : Set if target file system is case sensitive
|
||||||
|
@ -51,6 +52,10 @@
|
||||||
{$DEFINE FS_IGNORE}
|
{$DEFINE FS_IGNORE}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF OS2}
|
||||||
|
{$DEFINE FS_IGNORE}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{ ------------------------------------------------------------------------- }
|
{ ------------------------------------------------------------------------- }
|
||||||
|
|
||||||
{$MODE DELPHI}
|
{$MODE DELPHI}
|
||||||
|
|
|
@ -75,8 +75,10 @@ Begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
||||||
For Count := 1 to 80 Do
|
For Count := 1 to 80 Do
|
||||||
If (Buffer[Line][Count].UnicodeChar <> #0) and ((Buffer[Line][Count].UnicodeChar <> ' ') and (Buffer[Line][Count].Attributes <> 7)) Then Begin
|
// If (Buffer[Line][Count].UnicodeChar <> #0) and ((Buffer[Line][Count].UnicodeChar <> ' ') and (Buffer[Line][Count].Attributes <> 7)) Then Begin
|
||||||
|
If (Buffer[Line][Count].UnicodeChar <> #0) and ((Buffer[Line][Count].UnicodeChar <> ' ') or (Buffer[Line][Count].Attributes <> 7)) Then Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
Exit;
|
Exit;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -95,6 +97,7 @@ Begin
|
||||||
|
|
||||||
While Line > 0 Do Begin
|
While Line > 0 Do Begin
|
||||||
If Not IsBlankLine(Line) Then Break;
|
If Not IsBlankLine(Line) Then Break;
|
||||||
|
|
||||||
Dec(Line);
|
Dec(Line);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue