fpredir.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Unit to redirect output and error to files
  6. Adapted from code donated to public domain by Schwartz Gabriel 20/03/1993
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. Unit FPRedir;
  14. Interface
  15. {$R-}
  16. {$ifndef Unix}
  17. {$S-}
  18. {$endif}
  19. {$ifdef TP}
  20. {$define implemented}
  21. {$endif TP}
  22. {$ifdef Go32v2}
  23. {$define implemented}
  24. {$endif}
  25. {$ifdef Win32}
  26. {$define implemented}
  27. {$endif}
  28. {$ifdef Unix}
  29. {$define implemented}
  30. {$endif}
  31. { be sure msdos is not set for FPC compiler }
  32. {$ifdef FPC}
  33. {$UnDef MsDos}
  34. {$endif FPC}
  35. Var
  36. IOStatus : Integer;
  37. RedirErrorOut,RedirErrorIn,
  38. RedirErrorError : Integer;
  39. ExecuteResult : Word;
  40. {------------------------------------------------------------------------------}
  41. procedure InitRedir;
  42. function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
  43. procedure DosExecute(ProgName, ComLine : String);
  44. function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
  45. procedure RestoreRedirOut;
  46. procedure DisableRedirOut;
  47. procedure EnableRedirOut;
  48. function ChangeRedirIn(Const Redir : String) : Boolean;
  49. procedure RestoreRedirIn;
  50. procedure DisableRedirIn;
  51. procedure EnableRedirIn;
  52. function ChangeRedirError(Const Redir : String; AppendToFile : Boolean) : Boolean;
  53. procedure RestoreRedirError;
  54. procedure DisableRedirError;
  55. procedure EnableRedirError;
  56. procedure RedirDisableAll;
  57. procedure RedirEnableAll;
  58. Implementation
  59. Uses
  60. {$ifdef go32v2}
  61. go32,
  62. {$endif go32v2}
  63. {$ifdef win32}
  64. windows,
  65. {$endif win32}
  66. {$ifdef Unix}
  67. linux,
  68. {$endif Unix}
  69. dos;
  70. var
  71. FIN,FOUT,FERR : ^File;
  72. RedirChangedOut,
  73. RedirChangedIn : Boolean;
  74. RedirChangedError : Boolean;
  75. InRedirDisabled,OutRedirDisabled,ErrorRedirDisabled : Boolean;
  76. {*****************************************************************************
  77. Dos
  78. *****************************************************************************}
  79. {$ifdef implemented}
  80. {$ifdef TP}
  81. {$ifndef win32}
  82. const
  83. UnusedHandle = -1;
  84. StdInputHandle = 0;
  85. StdOutputHandle = 1;
  86. StdErrorHandle = 2;
  87. {$endif win32}
  88. Type
  89. PtrRec = packed record
  90. Ofs, Seg : Word;
  91. end;
  92. PHandles = ^THandles;
  93. THandles = Array [Byte] of Byte;
  94. PWord = ^Word;
  95. Var
  96. MinBlockSize : Word;
  97. MyBlockSize : Word;
  98. Handles : PHandles;
  99. PrefSeg : Word;
  100. OldHandleOut,OldHandleIn,OldHandleError : Byte;
  101. {$endif TP}
  102. var
  103. TempHOut, TempHIn,TempHError : longint;
  104. { For Unix the following functions exist
  105. Function Dup(oldfile:longint;var newfile:longint):Boolean;
  106. Function Dup2(oldfile,newfile:longint):Boolean;
  107. Function fdClose(fd:longint):boolean;
  108. }
  109. {$ifdef go32v2}
  110. function dup(fh : longint;var nh : longint) : boolean;
  111. var
  112. Regs : Registers;
  113. begin
  114. Regs.ah:=$45;
  115. Regs.bx:=fh;
  116. MsDos (Regs);
  117. Dup:=true;
  118. If (Regs.Flags and fCarry)=0 then
  119. nh:=Regs.Ax
  120. else
  121. Dup:=false;
  122. end;
  123. function dup2(fh,nh : longint) : boolean;
  124. var
  125. Regs : Registers;
  126. begin
  127. Dup2:=true;
  128. If fh=nh then
  129. exit;
  130. Regs.ah:=$46;
  131. Regs.bx:=fh;
  132. Regs.cx:=nh;
  133. MsDos (Regs);
  134. If (Regs.Flags and fCarry)<>0 then
  135. Dup2:=false;
  136. end;
  137. Function FdClose (Handle : Longint) : boolean;
  138. var Regs: registers;
  139. begin
  140. Regs.Eax := $3e00;
  141. Regs.Ebx := Handle;
  142. MsDos(Regs);
  143. FdClose:=(Regs.Flags and fCarry)=0;
  144. end;
  145. {$endif def go32v2}
  146. {$ifdef win32}
  147. Function FdClose (Handle : Longint) : boolean;
  148. begin
  149. { Do we need this ?? }
  150. FdClose:=true;
  151. end;
  152. {$endif}
  153. {$ifdef TP}
  154. Function FdClose (Handle : Longint) : boolean;
  155. begin
  156. { if executed as under GO32 this hangs the DOS-prompt }
  157. FdClose:=true;
  158. end;
  159. {$endif}
  160. {$I-}
  161. function FileExist(const FileName : PathStr) : Boolean;
  162. var
  163. f : file;
  164. Attr : word;
  165. begin
  166. Assign(f, FileName);
  167. GetFAttr(f, Attr);
  168. FileExist := DosError = 0;
  169. end;
  170. {............................................................................}
  171. function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
  172. begin
  173. ChangeRedirOut:=False;
  174. If Redir = '' then Exit;
  175. Assign (FOUT^, Redir);
  176. If AppendToFile and FileExist(Redir) then
  177. Begin
  178. Reset(FOUT^,1);
  179. Seek(FOUT^,FileSize(FOUT^));
  180. End else Rewrite (FOUT^);
  181. RedirErrorOut:=IOResult;
  182. IOStatus:=RedirErrorOut;
  183. If IOStatus <> 0 then Exit;
  184. {$ifndef FPC}
  185. Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
  186. OldHandleOut:=Handles^[StdOutputHandle];
  187. Handles^[StdOutputHandle]:=Handles^[FileRec (FOUT^).Handle];
  188. ChangeRedirOut:=True;
  189. OutRedirDisabled:=False;
  190. {$else}
  191. {$ifdef win32}
  192. if SetStdHandle(Std_Output_Handle,FileRec(FOUT^).Handle) then
  193. {$else not win32}
  194. if dup(StdOutputHandle,TempHOut) and
  195. dup2(FileRec(FOUT^).Handle,StdOutputHandle) then
  196. {$endif not win32}
  197. begin
  198. ChangeRedirOut:=True;
  199. OutRedirDisabled:=False;
  200. end;
  201. {$endif def FPC}
  202. RedirChangedOut:=True;
  203. end;
  204. function ChangeRedirIn(Const Redir : String) : Boolean;
  205. begin
  206. ChangeRedirIn:=False;
  207. If Redir = '' then Exit;
  208. Assign (FIN^, Redir);
  209. Reset(FIN^,1);
  210. RedirErrorIn:=IOResult;
  211. IOStatus:=RedirErrorIn;
  212. If IOStatus <> 0 then Exit;
  213. {$ifndef FPC}
  214. Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
  215. OldHandleIn:=Handles^[StdInputHandle];
  216. Handles^[StdInputHandle]:=Handles^[FileRec (FIN^).Handle];
  217. ChangeRedirIn:=True;
  218. InRedirDisabled:=False;
  219. {$else}
  220. {$ifdef win32}
  221. if SetStdHandle(Std_Input_Handle,FileRec(FIN^).Handle) then
  222. {$else not win32}
  223. if dup(StdInputHandle,TempHIn) and
  224. dup2(FileRec(FIN^).Handle,StdInputHandle) then
  225. {$endif not win32}
  226. begin
  227. ChangeRedirIn:=True;
  228. InRedirDisabled:=False;
  229. end;
  230. {$endif def FPC}
  231. RedirChangedIn:=True;
  232. end;
  233. function ChangeRedirError(Const Redir : String; AppendToFile : Boolean) : Boolean;
  234. begin
  235. ChangeRedirError:=False;
  236. If Redir = '' then Exit;
  237. Assign (FERR^, Redir);
  238. If AppendToFile and FileExist(Redir) then
  239. Begin
  240. Reset(FERR^,1);
  241. Seek(FERR^,FileSize(FERR^));
  242. End else Rewrite (FERR^);
  243. RedirErrorError:=IOResult;
  244. IOStatus:=RedirErrorError;
  245. If IOStatus <> 0 then Exit;
  246. {$ifndef FPC}
  247. Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
  248. OldHandleError:=Handles^[StdErrorHandle];
  249. Handles^[StdErrorHandle]:=Handles^[FileRec (FERR^).Handle];
  250. ChangeRedirError:=True;
  251. ErrorRedirDisabled:=False;
  252. {$else}
  253. {$ifdef win32}
  254. if SetStdHandle(Std_Error_Handle,FileRec(FERR^).Handle) then
  255. {$else not win32}
  256. if dup(StdErrorHandle,TempHError) and
  257. dup2(FileRec(FERR^).Handle,StdErrorHandle) then
  258. {$endif not win32}
  259. begin
  260. ChangeRedirError:=True;
  261. ErrorRedirDisabled:=False;
  262. end;
  263. {$endif}
  264. RedirChangedError:=True;
  265. end;
  266. {$IfDef MsDos}
  267. {Set HeapEnd Pointer to Current Used Heapsize}
  268. Procedure SmallHeap;assembler;
  269. asm
  270. mov bx,word ptr HeapPtr
  271. shr bx,4
  272. inc bx
  273. add bx,word ptr HeapPtr+2
  274. mov ax,PrefixSeg
  275. sub bx,ax
  276. mov es,ax
  277. mov ah,4ah
  278. int 21h
  279. end;
  280. {Set HeapEnd Pointer to Full Heapsize}
  281. Procedure FullHeap;assembler;
  282. asm
  283. mov bx,word ptr HeapEnd
  284. shr bx,4
  285. inc bx
  286. add bx,word ptr HeapEnd+2
  287. mov ax,PrefixSeg
  288. sub bx,ax
  289. mov es,ax
  290. mov ah,4ah
  291. int 21h
  292. end;
  293. {$EndIf MsDos}
  294. procedure RestoreRedirOut;
  295. begin
  296. If not RedirChangedOut then Exit;
  297. {$ifndef FPC}
  298. Handles^[StdOutputHandle]:=OldHandleOut;
  299. OldHandleOut:=StdOutputHandle;
  300. {$else}
  301. {$ifdef win32}
  302. SetStdHandle(Std_Output_Handle,StdOutputHandle);
  303. {$else not win32}
  304. dup2(TempHOut,StdOutputHandle);
  305. {$endif not win32}
  306. {$endif FPC}
  307. Close (FOUT^);
  308. fdClose(TempHOut);
  309. RedirChangedOut:=false;
  310. end;
  311. {............................................................................}
  312. procedure RestoreRedirIn;
  313. begin
  314. If not RedirChangedIn then Exit;
  315. {$ifndef FPC}
  316. Handles^[StdInputHandle]:=OldHandleIn;
  317. OldHandleIn:=StdInputHandle;
  318. {$else}
  319. {$ifdef win32}
  320. SetStdHandle(Std_Input_Handle,StdInputHandle);
  321. {$else not win32}
  322. dup2(TempHIn,StdInputHandle);
  323. {$endif not win32}
  324. {$endif}
  325. Close (FIn^);
  326. fdClose(TempHIn);
  327. RedirChangedIn:=false;
  328. end;
  329. {............................................................................}
  330. procedure DisableRedirIn;
  331. begin
  332. If not RedirChangedIn then Exit;
  333. If InRedirDisabled then Exit;
  334. {$ifndef FPC}
  335. Handles^[StdInputHandle]:=OldHandleIn;
  336. {$else}
  337. {$ifdef win32}
  338. SetStdHandle(Std_Input_Handle,StdInputHandle);
  339. {$else not win32}
  340. dup2(TempHIn,StdInputHandle);
  341. {$endif not win32}
  342. {$endif}
  343. InRedirDisabled:=True;
  344. end;
  345. {............................................................................}
  346. procedure EnableRedirIn;
  347. begin
  348. If not RedirChangedIn then Exit;
  349. If not InRedirDisabled then Exit;
  350. {$ifndef FPC}
  351. Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
  352. Handles^[StdInputHandle]:=Handles^[FileRec (FIn^).Handle];
  353. {$else}
  354. {$ifdef win32}
  355. SetStdHandle(Std_Input_Handle,FileRec(FIn^).Handle);
  356. {$else not win32}
  357. dup2(FileRec(FIn^).Handle,StdInputHandle);
  358. {$endif not win32}
  359. {$endif}
  360. InRedirDisabled:=False;
  361. end;
  362. {............................................................................}
  363. procedure DisableRedirOut;
  364. begin
  365. If not RedirChangedOut then Exit;
  366. If OutRedirDisabled then Exit;
  367. {$ifndef FPC}
  368. Handles^[StdOutputHandle]:=OldHandleOut;
  369. {$else}
  370. {$ifdef win32}
  371. SetStdHandle(Std_Output_Handle,StdOutputHandle);
  372. {$else not win32}
  373. dup2(TempHOut,StdOutputHandle);
  374. {$endif not win32}
  375. {$endif}
  376. OutRedirDisabled:=True;
  377. end;
  378. {............................................................................}
  379. procedure EnableRedirOut;
  380. begin
  381. If not RedirChangedOut then Exit;
  382. If not OutRedirDisabled then Exit;
  383. {$ifndef FPC}
  384. Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
  385. Handles^[StdOutputHandle]:=Handles^[FileRec (FOut^).Handle];
  386. {$else}
  387. {$ifdef win32}
  388. SetStdHandle(Std_Output_Handle,FileRec(FOut^).Handle);
  389. {$else not win32}
  390. dup2(FileRec(FOut^).Handle,StdOutputHandle);
  391. {$endif not win32}
  392. {$endif}
  393. OutRedirDisabled:=False;
  394. end;
  395. {............................................................................}
  396. procedure RestoreRedirError;
  397. begin
  398. If not RedirChangedError then Exit;
  399. {$ifndef FPC}
  400. Handles^[StdErrorHandle]:=OldHandleError;
  401. OldHandleError:=StdErrorHandle;
  402. {$else}
  403. {$ifdef win32}
  404. SetStdHandle(Std_Error_Handle,StdErrorHandle);
  405. {$else not win32}
  406. dup2(TempHError,StdErrorHandle);
  407. {$endif not win32}
  408. {$endif}
  409. Close (FERR^);
  410. fdClose(TempHError);
  411. RedirChangedError:=false;
  412. end;
  413. {............................................................................}
  414. procedure DisableRedirError;
  415. begin
  416. If not RedirChangedError then Exit;
  417. If ErrorRedirDisabled then Exit;
  418. {$ifndef FPC}
  419. Handles^[StdErrorHandle]:=OldHandleError;
  420. {$else}
  421. {$ifdef win32}
  422. SetStdHandle(Std_Error_Handle,StdErrorHandle);
  423. {$else not win32}
  424. dup2(TempHError,StdErrorHandle);
  425. {$endif not win32}
  426. {$endif}
  427. ErrorRedirDisabled:=True;
  428. end;
  429. {............................................................................}
  430. procedure EnableRedirError;
  431. begin
  432. If not RedirChangedError then Exit;
  433. If not ErrorRedirDisabled then Exit;
  434. {$ifndef FPC}
  435. Handles:=Ptr (prefseg, PWord (Ptr (prefseg, $34))^);
  436. Handles^[StdErrorHandle]:=Handles^[FileRec (FErr^).Handle];
  437. {$else}
  438. {$ifdef win32}
  439. SetStdHandle(Std_Error_Handle,FileRec(FErr^).Handle);
  440. {$else not win32}
  441. dup2(FileRec(FERR^).Handle,StdErrorHandle);
  442. {$endif not win32}
  443. {$endif}
  444. ErrorRedirDisabled:=False;
  445. end;
  446. {............................................................................}
  447. function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
  448. Begin
  449. RedirErrorOut:=0; RedirErrorIn:=0; RedirErrorError:=0;
  450. ExecuteResult:=0;
  451. IOStatus:=0;
  452. if RedirStdIn<>'' then
  453. ChangeRedirIn(RedirStdIn);
  454. if RedirStdOut<>'' then
  455. ChangeRedirOut(RedirStdOut,false);
  456. if RedirStdErr<>'stderr' then
  457. ChangeRedirError(RedirStdErr,false);
  458. DosExecute(ProgName,ComLine);
  459. RestoreRedirOut;
  460. RestoreRedirIn;
  461. RestoreRedirError;
  462. ExecuteRedir:=(IOStatus=0) and (RedirErrorOut=0) and
  463. (RedirErrorIn=0) and (RedirErrorError=0) and
  464. (ExecuteResult=0);
  465. End;
  466. {............................................................................}
  467. procedure RedirDisableAll;
  468. begin
  469. If RedirChangedIn and not InRedirDisabled then
  470. DisableRedirIn;
  471. If RedirChangedOut and not OutRedirDisabled then
  472. DisableRedirOut;
  473. If RedirChangedError and not ErrorRedirDisabled then
  474. DisableRedirError;
  475. end;
  476. {............................................................................}
  477. procedure RedirEnableAll;
  478. begin
  479. If RedirChangedIn and InRedirDisabled then
  480. EnableRedirIn;
  481. If RedirChangedOut and OutRedirDisabled then
  482. EnableRedirOut;
  483. If RedirChangedError and ErrorRedirDisabled then
  484. EnableRedirError;
  485. end;
  486. procedure InitRedir;
  487. begin
  488. {$ifndef FPC}
  489. PrefSeg:=PrefixSeg;
  490. {$endif FPC}
  491. end;
  492. {$else not implemented}
  493. {*****************************************************************************
  494. Fake
  495. *****************************************************************************}
  496. function ExecuteRedir (Const ProgName, ComLine, RedirStdIn, RedirStdOut, RedirStdErr : String) : boolean;
  497. begin
  498. ExecuteRedir:=false;
  499. end;
  500. function ChangeRedirOut(Const Redir : String; AppendToFile : Boolean) : Boolean;
  501. begin
  502. ChangeRedirOut:=false;
  503. end;
  504. procedure RestoreRedirOut;
  505. begin
  506. end;
  507. procedure DisableRedirOut;
  508. begin
  509. end;
  510. procedure EnableRedirOut;
  511. begin
  512. end;
  513. function ChangeRedirIn(Const Redir : String) : Boolean;
  514. begin
  515. ChangeRedirIn:=false;
  516. end;
  517. procedure RestoreRedirIn;
  518. begin
  519. end;
  520. procedure DisableRedirIn;
  521. begin
  522. end;
  523. procedure EnableRedirIn;
  524. begin
  525. end;
  526. function ChangeRedirError(Const Redir : String; AppendToFile : Boolean) : Boolean;
  527. begin
  528. ChangeRedirError:=false;
  529. end;
  530. procedure RestoreRedirError;
  531. begin
  532. end;
  533. procedure DisableRedirError;
  534. begin
  535. end;
  536. procedure EnableRedirError;
  537. begin
  538. end;
  539. procedure RedirDisableAll;
  540. begin
  541. end;
  542. procedure RedirEnableAll;
  543. begin
  544. end;
  545. procedure InitRedir;
  546. begin
  547. end;
  548. {$endif not implemented}
  549. {............................................................................}
  550. procedure DosExecute(ProgName, ComLine : String);
  551. {$ifdef win32}
  552. var
  553. StoreInherit : BOOL;
  554. {$endif win32}
  555. Begin
  556. {$IfDef MsDos}
  557. SmallHeap;
  558. {$EndIf MsDos}
  559. SwapVectors;
  560. { Must use shell() for linux for the wildcard expansion (PFV) }
  561. {$ifdef Unix}
  562. IOStatus:=0;
  563. ExecuteResult:=Shell(Progname+' '+Comline);
  564. { Signal that causes the stop of the shell }
  565. IOStatus:=ExecuteResult and $7F;
  566. { Exit Code seems to be in the second byte,
  567. is this also true for BSD ??
  568. $80 bit is a CoreFlag apparently }
  569. ExecuteResult:=(ExecuteResult and $ff00) shr 8;
  570. {$else}
  571. {$ifdef win32}
  572. StoreInherit:=ExecInheritsHandles;
  573. ExecInheritsHandles:=true;
  574. {$endif win32}
  575. DosError:=0;
  576. Dos.Exec (ProgName, ComLine);
  577. {$ifdef win32}
  578. ExecInheritsHandles:=StoreInherit;
  579. {$endif win32}
  580. IOStatus:=DosError;
  581. ExecuteResult:=DosExitCode;
  582. {$endif}
  583. SwapVectors;
  584. {$IfDef MsDos}
  585. Fullheap;
  586. {$EndIf MsDos}
  587. End;
  588. {*****************************************************************************
  589. Initialize
  590. *****************************************************************************}
  591. var oldexit : pointer;
  592. procedure RedirExit; {$ifndef FPC}far;{$endif}
  593. begin
  594. exitproc:=oldexit;
  595. Dispose(FIn); Dispose(FOut); Dispose(FErr);
  596. end;
  597. Begin
  598. oldexit:=exitproc;
  599. exitproc:=@RedirExit;
  600. New(FIn); New(FOut); New(FErr);
  601. End.
  602. {
  603. $Log$
  604. Revision 1.3 2000-11-15 00:14:10 pierre
  605. new merge
  606. Revision 1.1.2.2 2000/11/14 09:40:35 marco
  607. * Third batch renamefest
  608. Revision 1.2 2000/10/31 22:35:54 pierre
  609. * New big merge from fixes branch
  610. Revision 1.1.2.1 2000/10/04 13:29:59 pierre
  611. * Get ExitCode for DosExecute in linux
  612. Revision 1.1 2000/07/13 09:48:35 michael
  613. + Initial import
  614. Revision 1.25 2000/05/17 10:19:53 pierre
  615. * Reset DosError to zero !
  616. Revision 1.24 1999/11/10 17:10:59 pierre
  617. + DosExecute to interface
  618. Revision 1.23 1999/09/22 13:03:27 pierre
  619. * Win32 ExecInheritsHandles typo problem
  620. Revision 1.22 1999/09/22 09:03:58 peter
  621. * typo fixed for win32
  622. Revision 1.21 1999/09/21 11:28:22 pierre
  623. + Redir for win32
  624. Revision 1.20 1999/08/05 16:54:36 peter
  625. * win32 fixes
  626. Revision 1.19 1999/08/03 20:22:36 peter
  627. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  628. + Desktop saving should work now
  629. - History saved
  630. - Clipboard content saved
  631. - Desktop saved
  632. - Symbol info saved
  633. * syntax-highlight bug fixed, which compared special keywords case sensitive
  634. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  635. * with 'whole words only' set, the editor didn't found occourences of the
  636. searched text, if the text appeared previously in the same line, but didn't
  637. satisfied the 'whole-word' condition
  638. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  639. (ie. the beginning of the selection)
  640. * when started typing in a new line, but not at the start (X=0) of it,
  641. the editor inserted the text one character more to left as it should...
  642. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  643. * Shift shouldn't cause so much trouble in TCodeEditor now...
  644. * Syntax highlight had problems recognizing a special symbol if it was
  645. prefixed by another symbol character in the source text
  646. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  647. Revision 1.17 1999/05/01 23:45:07 pierre
  648. * FIn FOut FErr dispsoed at exit
  649. Revision 1.16 1999/04/29 22:57:09 pierre
  650. + added code for temporary disabling of redirection
  651. Revision 1.15 1999/04/07 21:55:52 peter
  652. + object support for browser
  653. * html help fixes
  654. * more desktop saving things
  655. * NODEBUG directive to exclude debugger
  656. Revision 1.14 1999/03/20 00:04:49 pierre
  657. * handle loss fixed
  658. Revision 1.13 1999/03/09 01:34:35 peter
  659. * linux unit
  660. Revision 1.12 1999/03/08 14:58:10 peter
  661. + prompt with dialogs for tools
  662. Revision 1.11 1999/03/01 15:42:01 peter
  663. + Added dummy entries for functions not yet implemented
  664. * MenuBar didn't update itself automatically on command-set changes
  665. * Fixed Debugging/Profiling options dialog
  666. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is set
  667. * efBackSpaceUnindents works correctly
  668. + 'Messages' window implemented
  669. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  670. + Added TP message-filter support (for ex. you can call GREP thru
  671. GREP2MSG and view the result in the messages window - just like in TP)
  672. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  673. so topic search didn't work...
  674. * In FPHELP.PAS there were still context-variables defined as word instead
  675. of THelpCtx
  676. * StdStatusKeys() was missing from the statusdef for help windows
  677. + Topic-title for index-table can be specified when adding a HTML-files
  678. Revision 1.10 1999/02/22 12:46:58 peter
  679. * small fixes for linux and grep
  680. Revision 1.9 1999/02/22 11:12:33 pierre
  681. * dup and dup2 work for go32v2
  682. + also should work for linux (after linux.pp patch)
  683. Revision 1.8 1999/02/22 02:15:18 peter
  684. + default extension for save in the editor
  685. + Separate Text to Find for the grep dialog
  686. * fixed redir crash with tp7
  687. Revision 1.7 1999/02/20 15:18:32 peter
  688. + ctrl-c capture with confirm dialog
  689. + ascii table in the tools menu
  690. + heapviewer
  691. * empty file fixed
  692. * fixed callback routines in fpdebug to have far for tp7
  693. Revision 1.6 1999/02/05 13:51:43 peter
  694. * unit name of FPSwitches -> FPSwitch which is easier to use
  695. * some fixes for tp7 compiling
  696. }