Browse Source

* IOCheck/InOutRes check for mkdir,chdir and rmdir like in TP
+ do_isdevice implemented

carl 27 years ago
parent
commit
02a7a189cb
1 changed files with 16 additions and 3 deletions
  1. 16 3
      rtl/os2/sysos2.pas

+ 16 - 3
rtl/os2/sysos2.pas

@@ -264,6 +264,16 @@ begin
         if p[i]='/' then p[i]:='\';
 end;
 
+function do_isdevice(handle:longint):boolean;
+begin
+  if (handle=stdoutputhandle) or (handle=stdinputhandle) or
+  (handle=stderrorhandle) then
+    do_isdevice:=FALSE;
+  else
+    do_isdevice:=TRUE;
+end;
+
+
 procedure do_close(h:longint);
 
 begin
@@ -565,22 +575,25 @@ begin
 end;
 
 
-procedure mkdir(const s : string);
+procedure mkdir(const s : string);[IOCheck];
 
 begin
+    If InOutRes <> 0 then exit;
     DosDir($39,s);
 end;
 
 
-procedure rmdir(const s : string);
+procedure rmdir(const s : string);[IOCheck];
 
 begin
+    If InOutRes <> 0 then exit;
     DosDir($3a,s);
 end;
 
-procedure chdir(const s : string);
+procedure chdir(const s : string);[IOCheck];
 
 begin
+    If InOutRes <> 0 then exit;
     DosDir($3b,s);
 end;