fphelp.pas 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. {
  2. $Id$
  3. This file is part of the Free Pascal Integrated Development Environment
  4. Copyright (c) 1998 by Berczi Gabor
  5. Help routines for the IDE
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit FPHelp;
  13. interface
  14. uses
  15. Drivers,HelpCtx,
  16. WHelp,WHlpView,WHTML,
  17. {$ifdef EDITORS}
  18. Editors,
  19. {$else}
  20. WEditor,
  21. {$endif}
  22. WViews,FPViews;
  23. type
  24. PIDEStatusLine = ^TIDEStatusLine;
  25. TIDEStatusLine = object(TAdvancedStatusLine)
  26. function Hint(AHelpCtx: Word): String; virtual;
  27. procedure HandleEvent(var Event: TEvent); virtual;
  28. end;
  29. procedure Help(FileID, Context: THelpCtx; Modal: boolean);
  30. procedure HelpIndex(Keyword: string);
  31. procedure HelpTopicSearch(Editor: PEditor);
  32. procedure HelpTopic(const S: string);
  33. procedure CloseHelpWindows;
  34. procedure InitHelpSystem;
  35. procedure DoneHelpSystem;
  36. procedure InitHelpFiles;
  37. procedure DoneHelpFiles;
  38. procedure PushStatus(S: string);
  39. procedure SetStatus(S: string);
  40. procedure ClearStatus;
  41. procedure PopStatus;
  42. const
  43. HelpWindow : PFPHelpWindow = nil;
  44. HelpInited : boolean = false;
  45. implementation
  46. uses Objects,Views,App,MsgBox,Commands,
  47. WHTMLHlp,
  48. FPConst,FPVars,FPUtils;
  49. const
  50. MaxStatusLevel = {$ifdef FPC}10{$else}1{$endif};
  51. var StatusStack : array[0..MaxStatusLevel] of string[MaxViewWidth];
  52. const
  53. StatusStackPtr : integer = 0;
  54. procedure TIDEStatusLine.HandleEvent(var Event: TEvent);
  55. begin
  56. case Event.What of
  57. evBroadcast :
  58. case Event.Command of
  59. cmUpdate : Update;
  60. end;
  61. end;
  62. inherited HandleEvent(Event);
  63. end;
  64. function TIDEStatusLine.Hint(AHelpCtx: Word): String;
  65. var S: string;
  66. begin
  67. case AHelpCtx of
  68. hcNoContext : S:='';
  69. hcSourceWindow : S:='';
  70. hcHelpWindow : S:='';
  71. hcCalcWindow : S:='';
  72. hcInfoWindow : S:='';
  73. hcClipboardWindow:S:='';
  74. hcBrowserWindow : S:='';
  75. hcMessagesWindow: S:='';
  76. hcASCIITableWindow: S:='';
  77. hcGDBWindow : S:='Raw GDB communication window';
  78. hcBreakpointListWindow : S:='All current breakpoints';
  79. hcSystemMenu : S:='System menu';
  80. hcUpdate : S:='Refresh and redraw display';
  81. hcAbout : S:='Show version and copyright information';
  82. hcFileMenu : S:='File managment commands (Open, New, Save, etc.)';
  83. hcNew : S:='Create a new file in a new edit window';
  84. hcNewFromTemplate:S:='Create a new file using a code template';
  85. hcOpen : S:='Locate and open a file in an edit window';
  86. hcSave : S:='Save the file in the active edit window';
  87. hcSaveAs : S:='Save the current file under a different name, directory or drive';
  88. hcSaveAll : S:='Save all modified files';
  89. hcChangeDir : S:='Choose a new default directory';
  90. hcDOSShell : S:='Temporarily exit to DOS';
  91. hcQuit : S:='Exit the IDE';
  92. hcRecentFileBase..hcRecentFileBase+10
  93. : S:='Open indicated file in a new editor window';
  94. hcEditMenu : S:='Clipboard editing commands';
  95. hcUndo : S:='Undo the previous editor operation';
  96. hcRedo : S:='Redo the previously undone editor operation';
  97. hcCut : S:='Remove the selected text and put it in the clipboard';
  98. hcCopy : S:='Copy the selected text in the clipboard';
  99. hcPaste : S:='Insert selected text from the clipboard at the cursor position';
  100. hcCopyWin : S:='Copy the selected text in windows clipboard';
  101. hcPasteWin : S:='Insert selected text from windows clipboard at the cursor position';
  102. hcClear : S:='Delete the selected text';
  103. hcShowClipboard : S:='Open then clipboard window';
  104. hcSearchMenu : S:='Text and symbols search commands';
  105. hcFind : S:='Search for text';
  106. hcReplace : S:='Search for text and replace it with new text';
  107. hcSearchAgain : S:='Repeat the last Search or Replace command';
  108. hcGotoLine : S:='Move the cursor to a specified line number';
  109. hcObjects : S:='Open a browser displaying all objects in the program';
  110. hcModules : S:='Open a browser displaying all modules of the program';
  111. hcGlobals : S:='Open a browser displaying all global symbols in the program';
  112. hcSymbol : S:='Open a browser a current word (not yet scope sensitive)';
  113. hcRunMenu : S:='Execution and parameters';
  114. hcRun : S:='Run the current program';
  115. hcParameters : S:='Set command-line parameters passed to program at execution';
  116. hcResetDebugger : S:='Reset Program';
  117. hcContToCursor : S:='Go on until Cursor position';
  118. hcUntilReturn : S:='Go on until end of current function';
  119. hcUserScreen : S:='Switch to the full-screen user output';
  120. hcCompileMenu : S:='Compile, build & make';
  121. hcCompile : S:='Compile the current source file';
  122. hcMake : S:='Rebuild source file and all other files that have been modified';
  123. hcBuild : S:='Rebuild program and all available source files';
  124. hcTarget : S:='Select target platform to compile for';
  125. hcPrimaryFile : S:='Define then file that is the focus of Make and Build';
  126. hcClearPrimary : S:='Clear the file previously set to Primary';
  127. hcInformation : S:='Show compiler messages and program information';
  128. hcCompilerMessages:S:='Show compiler messages window';
  129. hcDebugMenu : S:='Debug Program';
  130. hcToggleBreakpoint : S:='Toggles Breakpoint';
  131. hcNewBreakpoint : S:='Create a new breakpoint';
  132. hcEditBreakpoint : S:='Edit focused breakpoint';
  133. hcDeleteBreakpoint : S:='Delete focused breakpoint';
  134. hcOpenGDBWindow : S:='Open direct window to GDB';
  135. hcAddWatch : S:='Add a new expression to watch';
  136. hcWatches : S:='Open the Watches Window';
  137. hcStack : S:='Show call stack';
  138. hcBreakpointList : S:='Edit breakpoints';
  139. hcToolsMenu : S:='User installed tools';
  140. hcCalculator : S:='Show calculator';
  141. hcGrep : S:='Run grep';
  142. hcMsgGotoSource : S:='Edit source';
  143. hcToolsMessages : S:='Open the message window';
  144. hcToolsBase..
  145. hcToolsBase+MaxToolCount
  146. : S:='User installed tool';
  147. hcASCIITable : S:='Show ASCII table';
  148. hcOptionsMenu : S:='Setting for compiler, editor, mouse, etc.';
  149. hcSwitchesMode : S:='Select settings for normal, debug or release version';
  150. hcCompiler : S:='Set default compiler directives and conditional defines';
  151. hcMemorySizes : S:='Set default stack and heap sizes for generated programs';
  152. hcLinker : S:='Set linker options';
  153. hcDebugger : S:='Set debug information options';
  154. hcDirectories : S:='Set paths for units, include, object and generated files';
  155. hcBrowser : S:='Specify global browser settings';
  156. hcTools : S:='Create or change tools';
  157. hcEnvironmentMenu:S:='Specify environment settins';
  158. hcPreferences : S:='Specify desktop settings';
  159. hcEditor : S:='Specify default editor settings';
  160. hcMouse : S:='Specify mouse settings';
  161. hcDesktopOptions: S:='Specify desktop settings';
  162. hcStartup : S:='Permanently change default startup options';
  163. hcColors : S:='Customize IDE colors for windows, menus, editors, etc.';
  164. hcOpenINI : S:='Load a previously saved options file';
  165. hcSaveINI : S:='Save all the changes made in the options menu';
  166. hcSaveAsINI : S:='Save all the changes made under a different name';
  167. hcWindowMenu : S:='Windows managment commands';
  168. hcTile : S:='Arrange windows on desktop by tiling';
  169. hcCascade : S:='Arrange windows on desktop by cascading';
  170. hcCloseAll : S:='Close all windows on the desktop';
  171. hcResize : S:='Change the size/postion of the active window';
  172. hcZoom : S:='Enlarge or restore the size of the active window';
  173. hcNext : S:='Make the next window active';
  174. hcPrev : S:='Make the previous window active';
  175. hcClose : S:='Close the active window';
  176. hcWindowList : S:='Show a list of all open windows';
  177. hcUserScreenWindow:S:='Show contents of user screen in a window';
  178. hcHelpMenu : S:='Get online help';
  179. hcHelpContents : S:='Show table of contents for Online Help';
  180. hcHelpIndex : S:='Show index for Online Help';
  181. hcHelpTopicSearch:S:='Display help on the word at cursor';
  182. hcHelpPrevTopic : S:='Redisplay the last-viewed Online Help screen';
  183. hcHelpUsingHelp : S:='How to use Online Help';
  184. hcHelpFiles : S:='Install or remove installed help files';
  185. hcOpenAtCursor : S:='Attempt to open the file indicated by the word at cursor';
  186. hcBrowseAtCursor: S:='Attempt to browse the symbol at cursor';
  187. hcEditorOptions : S:='Specify editor settings';
  188. else S:='???';
  189. end;
  190. Hint:=S;
  191. end;
  192. procedure InitHelpSystem;
  193. procedure AddOAFile(HelpFile: string);
  194. begin
  195. {$IFDEF DEBUG}SetStatus(strLoadingHelp+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  196. HelpFacility^.AddOAHelpFile(HelpFile);
  197. {$IFDEF DEBUG}SetStatus(strLoadingHelp);{$ENDIF}
  198. end;
  199. procedure AddHTMLFile(TOCEntry,HelpFile: string);
  200. begin
  201. {$IFDEF DEBUG}SetStatus(strLoadingHelp+' ('+SmartPath(HelpFile)+')');{$ENDIF}
  202. HelpFacility^.AddHTMLHelpFile(HelpFile, TOCEntry);
  203. {$IFDEF DEBUG}SetStatus(strLoadingHelp);{$ENDIF}
  204. end;
  205. var I,P: sw_integer;
  206. S: string;
  207. TopicTitle: string;
  208. begin
  209. New(HelpFacility, Init);
  210. PushStatus(strLoadingHelp);
  211. { AddHTMLFile('User''s guide','C:\FP\USER\USER.HTM');}
  212. for I:=0 to HelpFiles^.Count-1 do
  213. begin
  214. S:=HelpFiles^.At(I)^; TopicTitle:='';
  215. P:=Pos('|',S);
  216. if P>0 then
  217. begin TopicTitle:=copy(S,P+1,255); S:=copy(S,1,P-1); end;
  218. if TopicTitle='' then TopicTitle:=S;
  219. if copy(UpcaseStr(ExtOf(S)),1,4)='.HTM' then { this recognizes both .htm and .html }
  220. AddHTMLFile(TopicTitle,S)
  221. else
  222. AddOAFile(S);
  223. end;
  224. PopStatus;
  225. end;
  226. procedure CheckHelpSystem;
  227. begin
  228. if HelpInited then Exit;
  229. InitHelpSystem;
  230. HelpInited:=true;
  231. end;
  232. procedure DoneHelpSystem;
  233. begin
  234. if assigned(HelpFacility) then
  235. begin
  236. Dispose(HelpFacility, Done);
  237. HelpFacility:=nil;
  238. end;
  239. HelpInited:=false;
  240. end;
  241. procedure HelpCreateWindow;
  242. var R: TRect;
  243. begin
  244. CheckHelpSystem;
  245. if HelpWindow=nil then
  246. begin
  247. Desktop^.GetExtent(R); R.Grow(-15,-3); Dec(R.A.Y);
  248. New(HelpWindow, Init(R, 'Help', 0, 0, SearchFreeWindowNo));
  249. if HelpWindow<>nil then
  250. begin
  251. HelpWindow^.Hide;
  252. Desktop^.Insert(HelpWindow);
  253. end;
  254. end;
  255. end;
  256. procedure Help(FileID, Context: THelpCtx; Modal: boolean);
  257. begin
  258. if Modal then
  259. begin MessageBox('Sorry, modal help not yet implemented.',nil,mfInformation+mfInsertInApp+mfOKButton); Exit; end;
  260. HelpCreateWindow;
  261. with HelpWindow^ do
  262. begin
  263. HelpWindow^.ShowTopic(0,Context);
  264. if GetState(sfVisible)=false then Show;
  265. MakeFirst;
  266. end;
  267. Message(Application,evCommand,cmUpdate,nil);
  268. end;
  269. procedure HelpTopicSearch(Editor: PEditor);
  270. var S: string;
  271. begin
  272. if Editor=nil then S:='' else
  273. S:=GetEditorCurWord(Editor);
  274. HelpTopic(S);
  275. end;
  276. procedure HelpTopic(const S: string);
  277. var FileID: word;
  278. Ctx : THelpCtx;
  279. var Found: boolean;
  280. begin
  281. CheckHelpSystem;
  282. PushStatus(strLocatingTopic);
  283. Found:=HelpFacility^.TopicSearch(S,FileID,Ctx);
  284. PopStatus;
  285. if Found then
  286. Help(FileID,Ctx,false)
  287. else
  288. HelpIndex(S);
  289. end;
  290. procedure HelpIndex(Keyword: string);
  291. begin
  292. HelpCreateWindow;
  293. with HelpWindow^ do
  294. begin
  295. PushStatus(strBuildingHelpIndex);
  296. HelpWindow^.ShowIndex;
  297. if Keyword<>'' then
  298. HelpWindow^.HelpView^.Lookup(Keyword);
  299. PopStatus;
  300. if GetState(sfVisible)=false then Show;
  301. MakeFirst;
  302. end;
  303. Message(Application,evCommand,cmUpdate,nil);
  304. end;
  305. procedure PushStatus(S: string);
  306. begin
  307. if StatusLine=nil then
  308. Exit;
  309. If StatusStackPtr<=MaxStatusLevel then
  310. StatusStack[StatusStackPtr]:=PAdvancedStatusLine(StatusLine)^.GetStatusText
  311. else
  312. StatusStack[MaxStatusLevel]:=PAdvancedStatusLine(StatusLine)^.GetStatusText;
  313. SetStatus(S);
  314. Inc(StatusStackPtr);
  315. end;
  316. procedure PopStatus;
  317. begin
  318. if StatusLine=nil then
  319. Exit;
  320. Dec(StatusStackPtr);
  321. If StatusStackPtr<=MaxStatusLevel then
  322. SetStatus(StatusStack[StatusStackPtr])
  323. else
  324. SetStatus(StatusStack[MaxStatusLevel]);
  325. end;
  326. procedure SetStatus(S: string);
  327. begin
  328. if StatusLine=nil then
  329. Exit;
  330. PAdvancedStatusLine(StatusLine)^.SetStatusText(S);
  331. end;
  332. procedure ClearStatus;
  333. begin
  334. PAdvancedStatusLine(StatusLine)^.ClearStatusText;
  335. end;
  336. procedure InitHelpFiles;
  337. begin
  338. New(HelpFiles, Init(10,10));
  339. end;
  340. procedure DoneHelpFiles;
  341. begin
  342. if assigned(HelpFiles) then
  343. Dispose(HelpFiles, Done);
  344. end;
  345. procedure CloseHelpWindows;
  346. procedure CloseIfHelpWindow(P: PView); {$ifndef FPC}far;{$endif}
  347. begin
  348. if P^.HelpCtx=hcHelpWindow then
  349. begin
  350. Message(P,evCommand,cmClose,nil);
  351. Dispose(P, Done); { help windows are only hidden on close so we've
  352. to destroy them manually }
  353. end;
  354. end;
  355. begin
  356. Desktop^.ForEach(@CloseIfHelpWindow);
  357. end;
  358. END.
  359. {
  360. $Log$
  361. Revision 1.25 2000-01-05 17:25:26 pierre
  362. * typo error corrected
  363. Revision 1.24 2000/01/03 11:38:33 michael
  364. Changes from Gabor
  365. Revision 1.23 1999/09/09 16:31:45 pierre
  366. * some breakpoint related fixes and Help contexts
  367. Revision 1.22 1999/09/09 14:15:27 pierre
  368. + cmCopyWin,cmPasteWin
  369. Revision 1.21 1999/08/16 18:25:17 peter
  370. * Adjusting the selection when the editor didn't contain any line.
  371. * Reserved word recognition redesigned, but this didn't affect the overall
  372. syntax highlight speed remarkably (at least not on my Amd-K6/350).
  373. The syntax scanner loop is a bit slow but the main problem is the
  374. recognition of special symbols. Switching off symbol processing boosts
  375. the performance up to ca. 200%...
  376. * The editor didn't allow copying (for ex to clipboard) of a single character
  377. * 'File|Save as' caused permanently run-time error 3. Not any more now...
  378. * Compiler Messages window (actually the whole desktop) did not act on any
  379. keypress when compilation failed and thus the window remained visible
  380. + Message windows are now closed upon pressing Esc
  381. + At 'Run' the IDE checks whether any sources are modified, and recompiles
  382. only when neccessary
  383. + BlockRead and BlockWrite (Ctrl+K+R/W) implemented in TCodeEditor
  384. + LineSelect (Ctrl+K+L) implemented
  385. * The IDE had problems closing help windows before saving the desktop
  386. Revision 1.20 1999/08/03 20:22:31 peter
  387. + TTab acts now on Ctrl+Tab and Ctrl+Shift+Tab...
  388. + Desktop saving should work now
  389. - History saved
  390. - Clipboard content saved
  391. - Desktop saved
  392. - Symbol info saved
  393. * syntax-highlight bug fixed, which compared special keywords case sensitive
  394. (for ex. 'asm' caused asm-highlighting, while 'ASM' didn't)
  395. * with 'whole words only' set, the editor didn't found occourences of the
  396. searched text, if the text appeared previously in the same line, but didn't
  397. satisfied the 'whole-word' condition
  398. * ^QB jumped to (SelStart.X,SelEnd.X) instead of (SelStart.X,SelStart.Y)
  399. (ie. the beginning of the selection)
  400. * when started typing in a new line, but not at the start (X=0) of it,
  401. the editor inserted the text one character more to left as it should...
  402. * TCodeEditor.HideSelection (Ctrl-K+H) didn't update the screen
  403. * Shift shouldn't cause so much trouble in TCodeEditor now...
  404. * Syntax highlight had problems recognizing a special symbol if it was
  405. prefixed by another symbol character in the source text
  406. * Auto-save also occours at Dos shell, Tool execution, etc. now...
  407. Revision 1.19 1999/07/12 13:14:17 pierre
  408. * LineEnd bug corrected, now goes end of text even if selected
  409. + Until Return for debugger
  410. + Code for Quit inside GDB Window
  411. Revision 1.18 1999/07/10 01:24:16 pierre
  412. + First implementation of watches window
  413. Revision 1.17 1999/06/30 23:58:14 pierre
  414. + BreakpointsList Window implemented
  415. with Edit/New/Delete functions
  416. + Individual breakpoint dialog with support for all types
  417. ignorecount and conditions
  418. (commands are not yet implemented, don't know if this wolud be useful)
  419. awatch and rwatch have problems because GDB does not annotate them
  420. I fixed v4.16 for this
  421. Revision 1.16 1999/06/28 19:32:19 peter
  422. * fixes from gabor
  423. Revision 1.15 1999/06/25 00:39:58 pierre
  424. help for cmSymbol,cmAddWatch,cmStack and cmBreakpoint list
  425. Revision 1.14 1999/04/07 21:55:46 peter
  426. + object support for browser
  427. * html help fixes
  428. * more desktop saving things
  429. * NODEBUG directive to exclude debugger
  430. Revision 1.13 1999/03/23 15:11:28 peter
  431. * desktop saving things
  432. * vesa mode
  433. * preferences dialog
  434. Revision 1.12 1999/03/16 12:38:09 peter
  435. * tools macro fixes
  436. + tph writer
  437. + first things for resource files
  438. Revision 1.11 1999/03/01 15:41:53 peter
  439. + Added dummy entries for functions not yet implemented
  440. * MenuBar didn't update itself automatically on command-set changes
  441. * Fixed Debugging/Profiling options dialog
  442. * TCodeEditor converts spaces to tabs at save only if efUseTabChars is set
  443. * efBackSpaceUnindents works correctly
  444. + 'Messages' window implemented
  445. + Added '$CAP MSG()' and '$CAP EDIT' to available tool-macros
  446. + Added TP message-filter support (for ex. you can call GREP thru
  447. GREP2MSG and view the result in the messages window - just like in TP)
  448. * A 'var' was missing from the param-list of THelpFacility.TopicSearch,
  449. so topic search didn't work...
  450. * In FPHELP.PAS there were still context-variables defined as word instead
  451. of THelpCtx
  452. * StdStatusKeys() was missing from the statusdef for help windows
  453. + Topic-title for index-table can be specified when adding a HTML-files
  454. Revision 1.10 1999/02/22 11:51:35 peter
  455. * browser updates from gabor
  456. Revision 1.9 1999/02/19 18:43:45 peter
  457. + open dialog supports mask list
  458. Revision 1.8 1999/02/11 19:07:21 pierre
  459. * GDBWindow redesigned :
  460. normal editor apart from
  461. that any kbEnter will send the line (for begin to cursor)
  462. to GDB command !
  463. GDBWindow opened in Debugger Menu
  464. still buggy :
  465. -echo should not be present if at end of text
  466. -GDBWindow becomes First after each step (I don't know why !)
  467. Revision 1.7 1999/02/08 17:40:01 pierre
  468. + cmContToCursor added
  469. Revision 1.6 1999/02/08 10:37:43 peter
  470. + html helpviewer
  471. Revision 1.5 1999/02/04 12:23:44 pierre
  472. + cmResetDebugger and cmGrep
  473. * Avoid StatusStack overflow
  474. Revision 1.4 1999/01/21 11:54:13 peter
  475. + tools menu
  476. + speedsearch in symbolbrowser
  477. * working run command
  478. Revision 1.3 1999/01/04 11:49:44 peter
  479. * 'Use tab characters' now works correctly
  480. + Syntax highlight now acts on File|Save As...
  481. + Added a new class to syntax highlight: 'hex numbers'.
  482. * There was something very wrong with the palette managment. Now fixed.
  483. + Added output directory (-FE<xxx>) support to 'Directories' dialog...
  484. * Fixed some possible bugs in Running/Compiling, and the compilation/run
  485. process revised
  486. Revision 1.2 1998/12/28 15:47:44 peter
  487. + Added user screen support, display & window
  488. + Implemented Editor,Mouse Options dialog
  489. + Added location of .INI and .CFG file
  490. + Option (INI) file managment implemented (see bottom of Options Menu)
  491. + Switches updated
  492. + Run program
  493. Revision 1.3 1998/12/22 10:39:42 peter
  494. + options are now written/read
  495. + find and replace routines
  496. }