mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 08:29:27 +02:00
* fd's now walk from 0..maxset again. IDE/unit kbd works again.
This commit is contained in:
parent
4c771c1b8e
commit
5538700c8a
@ -18,18 +18,18 @@
|
|||||||
function fpFD_SET(fdno:cint;var nset : TFDSet): cint;
|
function fpFD_SET(fdno:cint;var nset : TFDSet): cint;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
if (fdno<=0) or (fdno > FD_MAXFDSET) Then
|
if (fdno<0) or (fdno > FD_MAXFDSET) Then
|
||||||
exit(-1);
|
exit(-1);
|
||||||
nset[(fdno-1) shr ln2bitsinword]:=nset[(fdno-1) shr ln2bitsinword] OR (1 shl ((fdno-1) and ln2bitmask));
|
nset[fdno shr ln2bitsinword]:=nset[(fdno) shr ln2bitsinword] OR (1 shl ((fdno) and ln2bitmask));
|
||||||
fpFD_SET:=0;
|
fpFD_SET:=0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
function fpFD_CLR(fdno:cint;var nset : TFDSet): cint;
|
function fpFD_CLR(fdno:cint;var nset : TFDSet): cint;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
if (fdno<=0) or (fdno > FD_MAXFDSET) Then
|
if (fdno<0) or (fdno > FD_MAXFDSET) Then
|
||||||
exit(-1);
|
exit(-1);
|
||||||
nset[(fdno-1) shr ln2bitsinword]:=nset[(fdno-1) shr ln2bitsinword] AND Cardinal(NOT (1 shl ((fdno-1) and ln2bitmask)));
|
nset[(fdno) shr ln2bitsinword]:=nset[(fdno) shr ln2bitsinword] AND Cardinal(NOT (1 shl ((fdno) and ln2bitmask)));
|
||||||
fpFD_CLR:=0;
|
fpFD_CLR:=0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
@ -54,9 +54,9 @@ End;
|
|||||||
function fpFD_ISSET(fdno:cint;const nset : TFDSet): cint;
|
function fpFD_ISSET(fdno:cint;const nset : TFDSet): cint;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
if (fdno<=0) or (fdno > FD_MAXFDSET) Then
|
if (fdno<0) or (fdno > FD_MAXFDSET) Then
|
||||||
exit(-1);
|
exit(-1);
|
||||||
if ((nset[(fdno-1) shr ln2bitsinword]) and (1 shl ((fdno-1) and ln2bitmask)))>0 Then
|
if ((nset[(fdno) shr ln2bitsinword]) and (1 shl ((fdno) and ln2bitmask)))>0 Then
|
||||||
fpFD_ISSET:=1
|
fpFD_ISSET:=1
|
||||||
else
|
else
|
||||||
fpFD_ISSET:=0;
|
fpFD_ISSET:=0;
|
||||||
@ -64,7 +64,10 @@ End;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2003-09-22 19:43:22 peter
|
Revision 1.4 2003-10-23 12:06:14 marco
|
||||||
|
* fd's now walk from 0..maxset again. IDE/unit kbd works again.
|
||||||
|
|
||||||
|
Revision 1.3 2003/09/22 19:43:22 peter
|
||||||
* Fix range check error for Not 0
|
* Fix range check error for Not 0
|
||||||
* Fix loop in fdfillfdset
|
* Fix loop in fdfillfdset
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user