Browse Source

* Make dosshell work under Unix

git-svn-id: trunk@3452 -
daniel 19 years ago
parent
commit
2cbd7fddcd
1 changed files with 14 additions and 0 deletions
  1. 14 0
      fv/app.pas

+ 14 - 0
fv/app.pas

@@ -1022,16 +1022,30 @@ END;
 {  DosShell -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 25Oct99 LdB          }
 {  DosShell -> Platforms DOS/DPMI/WIN/NT/OS2 - Updated 25Oct99 LdB          }
 {---------------------------------------------------------------------------}
 {---------------------------------------------------------------------------}
 PROCEDURE TApplication.DosShell;
 PROCEDURE TApplication.DosShell;
+
+{$ifdef unix}
+var s:string;
+{$endif}
+
 BEGIN                                                 { Compatability only }
 BEGIN                                                 { Compatability only }
   DoneSysError;
   DoneSysError;
   DoneEvents;
   DoneEvents;
   drivers.donevideo;
   drivers.donevideo;
+  drivers.donekeyboard;
 {  DoneDosMem;}
 {  DoneDosMem;}
   WriteShellMsg;
   WriteShellMsg;
+{$ifdef Unix}
+  s:=getenv('SHELL');
+  if s='' then
+    s:='/bin/sh';
+  exec(s,'');
+{$else}
   SwapVectors;
   SwapVectors;
   Exec(GetEnv('COMSPEC'), '');
   Exec(GetEnv('COMSPEC'), '');
   SwapVectors;
   SwapVectors;
+{$endif}
 {  InitDosMem;}
 {  InitDosMem;}
+  drivers.initkeyboard;
   drivers.initvideo;
   drivers.initvideo;
   InitEvents;
   InitEvents;
   InitSysError;
   InitSysError;