فهرست منبع

* ioctl fixes. IDE now starts, but

marco 22 سال پیش
والد
کامیت
3d6bb07cd2
1فایلهای تغییر یافته به همراه19 افزوده شده و 16 حذف شده
  1. 19 16
      rtl/unix/unix.pp

+ 19 - 16
rtl/unix/unix.pp

@@ -1278,9 +1278,9 @@ end;
 Function TCGetAttr(fd:longint;var tios:TermIOS):boolean;
 Function TCGetAttr(fd:longint;var tios:TermIOS):boolean;
 begin
 begin
  {$ifndef BSD}
  {$ifndef BSD}
-  TCGetAttr:=fpIOCtl(fd,TCGETS,@tios)>0;
+  TCGetAttr:=fpIOCtl(fd,TCGETS,@tios)=0;
  {$else}
  {$else}
-  TCGETAttr:=fpIoCtl(Fd,TIOCGETA,@tios)>0;
+  TCGETAttr:=fpIoCtl(Fd,TIOCGETA,@tios)=0;
  {$endif}
  {$endif}
 end;
 end;
 
 
@@ -1307,7 +1307,7 @@ begin
      exit;
      exit;
    end;
    end;
   end;
   end;
-  TCSetAttr:=fpIOCtl(fd,nr,@Tios)>0;
+  TCSetAttr:=fpIOCtl(fd,nr,@Tios)=0;
 end;
 end;
 
 
 
 
@@ -1363,30 +1363,30 @@ end;
 Function TCSendBreak(fd,duration:longint):boolean;
 Function TCSendBreak(fd,duration:longint):boolean;
 begin
 begin
   {$ifndef BSD}
   {$ifndef BSD}
-  TCSendBreak:=fpIOCtl(fd,TCSBRK,pointer(duration))>0;
+  TCSendBreak:=fpIOCtl(fd,TCSBRK,pointer(duration))=0;
   {$else}
   {$else}
-  TCSendBreak:=fpIOCtl(fd,TIOCSBRK,0)>0;
+  TCSendBreak:=fpIOCtl(fd,TIOCSBRK,0)=0;
   {$endif}
   {$endif}
 end;
 end;
 
 
 
 
 Function TCSetPGrp(fd,id:longint):boolean;
 Function TCSetPGrp(fd,id:longint):boolean;
 begin
 begin
-  TCSetPGrp:=fpIOCtl(fd,TIOCSPGRP,pointer(id))>0;
+  TCSetPGrp:=fpIOCtl(fd,TIOCSPGRP,pointer(id))=0;
 end;
 end;
 
 
 
 
 Function TCGetPGrp(fd:longint;var id:longint):boolean;
 Function TCGetPGrp(fd:longint;var id:longint):boolean;
 begin
 begin
-  TCGetPGrp:=fpIOCtl(fd,TIOCGPGRP,@id)>0;
+  TCGetPGrp:=fpIOCtl(fd,TIOCGPGRP,@id)=0;
 end;
 end;
 
 
 Function TCDrain(fd:longint):boolean;
 Function TCDrain(fd:longint):boolean;
 begin
 begin
  {$ifndef BSD}
  {$ifndef BSD}
-  TCDrain:=fpIOCtl(fd,TCSBRK,pointer(1))>0;
+  TCDrain:=fpIOCtl(fd,TCSBRK,pointer(1))=0;
  {$else}
  {$else}
-  TCDrain:=fpIOCtl(fd,TIOCDRAIN,0)>0; {Should set timeout to 1 first?}
+  TCDrain:=fpIOCtl(fd,TIOCDRAIN,0)=0; {Should set timeout to 1 first?}
  {$endif}
  {$endif}
 end;
 end;
 
 
@@ -1394,11 +1394,11 @@ end;
 Function TCFlow(fd,act:longint):boolean;
 Function TCFlow(fd,act:longint):boolean;
 begin
 begin
   {$ifndef BSD}
   {$ifndef BSD}
-   TCFlow:=fpIOCtl(fd,TCXONC,pointer(act))>0;
+   TCFlow:=fpIOCtl(fd,TCXONC,pointer(act))=0;
   {$else}
   {$else}
     case act OF
     case act OF
-     TCOOFF :  TCFlow:=fpIoctl(fd,TIOCSTOP,0)>0;
-     TCOOn  :  TCFlow:=fpIOctl(Fd,TIOCStart,0)>0;
+     TCOOFF :  TCFlow:=fpIoctl(fd,TIOCSTOP,0)=0;
+     TCOOn  :  TCFlow:=fpIOctl(Fd,TIOCStart,0)=0;
      TCIOFF :  {N/I}
      TCIOFF :  {N/I}
     end;
     end;
   {$endif}
   {$endif}
@@ -1407,13 +1407,13 @@ end;
 Function TCFlush(fd,qsel:longint):boolean;
 Function TCFlush(fd,qsel:longint):boolean;
 begin
 begin
  {$ifndef BSD}
  {$ifndef BSD}
-  TCFlush:=fpIOCtl(fd,TCFLSH,pointer(qsel))>0;
+  TCFlush:=fpIOCtl(fd,TCFLSH,pointer(qsel))=0;
  {$else}
  {$else}
-  TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel))>0;
+  TCFlush:=fpIOCtl(fd,TIOCFLUSH,pointer(qsel))=0;
  {$endif}
  {$endif}
 end;
 end;
 
 
-Function IsATTY(Handle:Longint):Boolean;
+Function IsATTY (Handle:Longint):Boolean;
 {
 {
   Check if the filehandle described by 'handle' is a TTY (Terminal)
   Check if the filehandle described by 'handle' is a TTY (Terminal)
 }
 }
@@ -1714,7 +1714,10 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.40  2003-09-29 14:36:06  peter
+  Revision 1.41  2003-10-12 19:40:43  marco
+   * ioctl fixes. IDE now starts, but
+
+  Revision 1.40  2003/09/29 14:36:06  peter
     * fixed for stricter compiler
     * fixed for stricter compiler
 
 
   Revision 1.39  2003/09/27 12:51:33  peter
   Revision 1.39  2003/09/27 12:51:33  peter