Alpha 20 dev begins

This commit is contained in:
mysticbbs 2012-09-22 17:39:15 -04:00
parent 9b0339662e
commit 8164f855e8
5 changed files with 18 additions and 11 deletions

View File

@ -19,7 +19,7 @@ Type
Constructor Create; Virtual; Constructor Create; Virtual;
Destructor Destroy; Override; Destructor Destroy; Override;
Procedure PurgeInputData; Procedure PurgeInputData (Drain: Boolean);
Procedure PurgeOutputData; Procedure PurgeOutputData;
Function DataWaiting : Boolean; Virtual; Function DataWaiting : Boolean; Virtual;
Function WriteBuf (Var Buf; Len: LongInt) : LongInt; Virtual; Function WriteBuf (Var Buf; Len: LongInt) : LongInt; Virtual;
@ -56,15 +56,16 @@ Begin
FOutBufPos := 0; FOutBufPos := 0;
End; End;
Procedure TIOBase.PurgeInputData; Procedure TIOBase.PurgeInputData (Drain: Boolean);
//Var Var
// Buf : Array[1..2048] of Char; Buf : Array[1..2048] of Char;
Begin Begin
FInBufPos := 0; FInBufPos := 0;
FInBufEnd := 0; FInBufEnd := 0;
// While DataWaiting Do If Drain Then
// ReadBuf(Buf, SizeOf(Buf)); While DataWaiting Do
ReadBuf(Buf, SizeOf(Buf));
End; End;
Function TIOBase.DataWaiting : Boolean; Function TIOBase.DataWaiting : Boolean;

View File

@ -10,8 +10,8 @@ Interface
{$ENDIF} {$ENDIF}
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
Uses m_Pipe_Disk; Uses m_Pipe_Windows;
Type TPipe = Class(TPipeDisk); Type TPipe = Class(TPipeWindows);
{$ENDIF} {$ENDIF}
{$IFDEF OS2} {$IFDEF OS2}

View File

@ -39,7 +39,7 @@ Type
// General functions // General functions
Procedure DeleteFiles; Procedure DeleteFiles;
Procedure SendToPipe (Var Buf; Len: Longint); Procedure SendToPipe (Var Buf; Len: Longint);
Procedure ReadFromPipe (Var Buf; Len: LongInt; Var bRead: LongInt); Procedure ReadFromPipe (Var Buf; Len: LongInt; Var bRead: LongWord);
Procedure Disconnect; Procedure Disconnect;
End; End;
@ -125,7 +125,7 @@ Begin
BlockWrite (PipeOutput, Buf, Len, bWrite); BlockWrite (PipeOutput, Buf, Len, bWrite);
End; End;
Procedure TPipeDisk.ReadFromPipe (Var Buf; Len: LongInt; Var bRead: LongInt); Procedure TPipeDisk.ReadFromPipe (Var Buf; Len: LongInt; Var bRead: LongWord);
Var Var
Buffer : TPipeDiskBuffer Absolute Buf; Buffer : TPipeDiskBuffer Absolute Buf;
Ch : Char; Ch : Char;

View File

@ -1774,7 +1774,7 @@ Begin
{$IFDEF ZDEBUG} ZLog('DoAbortSequence -> begin'); {$ENDIF} {$IFDEF ZDEBUG} ZLog('DoAbortSequence -> begin'); {$ENDIF}
Client.PurgeInputData; Client.PurgeInputData(False);
Client.PurgeOutputData; Client.PurgeOutputData;
Client.BufWriteStr(Attn); Client.BufWriteStr(Attn);

View File

@ -17,6 +17,7 @@ Function strH2I (Str: String) : LongInt;
Function strI2H (Num: LongInt) : String; Function strI2H (Num: LongInt) : String;
Function strS2I (Str: String) : LongInt; Function strS2I (Str: String) : LongInt;
Function strI2O (Num: LongInt) : String; Function strI2O (Num: LongInt) : String;
Function strR2S (Num: Real; Deci: Byte) : String;
Function strWordGet (Num: Byte; Str: String; Ch: Char) : String; Function strWordGet (Num: Byte; Str: String; Ch: Char) : String;
Function strWordPos (Num: Byte; Str: String; Ch: Char) : Byte; Function strWordPos (Num: Byte; Str: String; Ch: Char) : Byte;
Function strWordCount (Str: String; Ch: Char) : Byte; Function strWordCount (Str: String; Ch: Char) : Byte;
@ -205,6 +206,11 @@ Begin
Str(Num, Result); Str(Num, Result);
End; End;
Function strR2S (Num: Real; Deci: Byte) : String;
Begin
Str (Num:0:Deci, Result);
End;
Function strS2I (Str: String) : LongInt; Function strS2I (Str: String) : LongInt;
Var Var
Res : LongInt; Res : LongInt;