mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:29:39 +02:00
parent
6f0861e666
commit
2213b67134
@ -109,9 +109,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
|
const FREAD = 1; // marked "BSD visible"
|
||||||
|
FWRITE = 2;
|
||||||
|
|
||||||
|
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
|
||||||
|
var comval : cint;
|
||||||
begin
|
begin
|
||||||
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel));
|
case qsel of
|
||||||
|
TCIFlush : comval:=FREAD;
|
||||||
|
TCOFlush : comval:=FWRITE;
|
||||||
|
TCIOFlush : comval:=FREAD or FWRITE;
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
errno:=ESysEINVAL;
|
||||||
|
exit(-1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(@comval));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function IsATTY (Handle:cint):cint;
|
Function IsATTY (Handle:cint):cint;
|
||||||
|
@ -105,9 +105,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TCFlush(fd,qsel:cint):cint;
|
const FREAD = 1; // marked "BSD visible"
|
||||||
|
FWRITE = 2;
|
||||||
|
|
||||||
|
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
|
||||||
|
var comval : cint;
|
||||||
begin
|
begin
|
||||||
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel));
|
case qsel of
|
||||||
|
TCIFlush : comval:=FREAD;
|
||||||
|
TCOFlush : comval:=FWRITE;
|
||||||
|
TCIOFlush : comval:=FREAD or FWRITE;
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
errno:=ESysEINVAL;
|
||||||
|
exit(-1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(@comval));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function IsATTY (Handle:cint):cint;
|
Function IsATTY (Handle:cint):cint;
|
||||||
|
@ -105,9 +105,23 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
const FREAD = 1; // marked "BSD visible"
|
||||||
|
FWRITE = 2;
|
||||||
|
|
||||||
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
|
Function TCFlush(fd,qsel:cint):cint; {$ifdef VER2_0}inline;{$endif}
|
||||||
|
var comval : cint;
|
||||||
begin
|
begin
|
||||||
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel));
|
case qsel of
|
||||||
|
TCIFlush : comval:=FREAD;
|
||||||
|
TCOFlush : comval:=FWRITE;
|
||||||
|
TCIOFlush : comval:=FREAD or FWRITE;
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
errno:=ESysEINVAL;
|
||||||
|
exit(-1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(@comval));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function IsATTY (Handle:cint):cint;
|
Function IsATTY (Handle:cint):cint;
|
||||||
|
Loading…
Reference in New Issue
Block a user