home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / drc20.zip / README.SRC < prev    next >
Text File  |  1992-08-16  |  23KB  |  628 lines

  1. %%*
  2. %%*  README.SRC
  3. %%*  User's guide for David's Readme Compiler v2.0
  4. %%*  (c) 1991, 1992, David Harris, all rights reserved.
  5. %%*
  6. %%*  Compile an executable readme from this file using
  7. %%*  the command 'RCOM README.SRC'.
  8. %%*
  9. %%*
  10. %%*      This line is a comment.
  11. %%*      Note that because of the particular way this file is
  12. %%*      parsed, blank lines ARE significant.
  13. %%*
  14. %%*      The next line is the title for the main screen.
  15. %%*
  16. %%Title             0, David's Readme Compiler v2.0 - User's Guide
  17. %%*
  18. %%*
  19. %%*      The next statement specifies an opening screen, which is 
  20. %%*      presented to the user when the program is run.
  21. %%*
  22. %%Opening_screen    2000
  23. %%*
  24. %%*      Now we'll actually declare the opening screen. For
  25. %%*      performance reasons, it should be placed as close
  26. %%*      to the start of the file as possible.
  27. %%*
  28. %% 2000, 0, 0, 0, 8, Welcome to David's Readme Compiler v2
  29.  
  30. David's Readme Compiler allows you to create standalone guides,
  31. readme files, and other textual references.
  32.  
  33. Version 2 of DRC supports many new features: if you currently
  34. use DRC v1, please examine the section "What's new in DRC v2"
  35. on the main menu.
  36. %%*
  37. %%*
  38. %%*      Now we'll define a status line for the main screen:
  39. %%*
  40. %%Status_line       2001
  41. %%*
  42. %% 2001, 0, 7, Status line
  43.             David's Readme Compiler, (c) 1991, 1992, David Harris.
  44. %%*
  45. %%*
  46. %%*      Next, define a screen which DRC can present when the
  47. %%*      user asks to edit a topic using the <F10> menu
  48. %%*
  49. %%Edit_screen   2002
  50. %%*
  51. %% 2002, 0, 87, 87, Editing a topic
  52.  
  53. While you edit this topic, the following keys are
  54. available for your use:
  55.  
  56.    Arrows:       move in the indicated direction
  57.    Ctrl-Arrows:  move a word at a time
  58.    PgUp/PgDn:    move a screen at a time
  59.    Tab:          moves to the next field on the screen:
  60.                  a field is anything starting with a
  61.                  left square bracket ([). This feature
  62.                  is handy for designing forms which the
  63.                  user is to complete.
  64.    Ctrl-Y:       delete the current line
  65.    Del, Bks:     delete char right, delete char left
  66.    Ins:          toggle insert mode (defaults to OFF)
  67.  
  68. %%*
  69. %%*
  70. %%*      And lastly we'll set the default flags values for
  71. %%*      the whole script. We'll use the value 7, which indicates
  72. %%*      that the user can Edit, Save, and Print the readme screens.
  73. %%*
  74. %%Default_flags     7
  75. %%*
  76. %%*
  77. %%*      The next line is the first top-level entry in the file (note
  78. %%*      the type of 0). The second integer means that this entry leads
  79. %%*      to a sub-menu of items of type 100 in the file.
  80. %%*
  81. %% 0, 100, About the Readme Compiler
  82. %%*
  83. %%*
  84. %%*      The next entry is a top level item with no sub-entries: when
  85. %%*      selected, its associated text will display at once.
  86. %%*
  87. %% 0, 0, Installing the Readme Compiler
  88.  
  89. To install David's Readme Compiler, place the files
  90. README.BIN and RCOM.EXE in a directory somewhere.
  91. Actual location doesn't matter, so long as both are
  92. in the same place. If you intend to use the -s switch
  93. to RCOM to create simple readmes (ie, readmes without
  94. extended searching and formatting features) then you
  95. should also copy README1.BIN to the same location.
  96.  
  97. The programs can be on the path if you wish, but
  98. they don't have to be, provided they are all in
  99. the same directory.
  100. %%*
  101. %%*
  102. %%*      The next line is an index entry for items of
  103. %%*      type 300: when it is selected, all the items
  104. %%*      of type 300 in the file will be collected into
  105. %%*      a menu and displayed. Notice that the index
  106. %%*      entry itself has no associated text.
  107. %%*
  108. %% 0, 300, Creating a Readme source file
  109. %%*
  110. %% 0, 25, Using David's Readme Compiler
  111. %%*
  112. %% 25, 0, Compiling the source file
  113.  
  114. To create a standalone guide, enter the command
  115.  
  116.          RCOM <filename>
  117.  
  118. where <filename> is the name of the source file you
  119. have created. RCOM will make a temporary file, and
  120. will then bind it to README.BIN as a .EXE file with
  121. the same name as the input file. That's all there 
  122. is to it!
  123. %%*
  124. %% 25, 0, Simplified Readmes
  125.  
  126. David's Readme Compiler allows you to create two types of
  127. readme; the usual readme has full searching capabilities,
  128. a number of extra formatting features, and enhanced print
  129. facilities, including PostScript printing.
  130.  
  131. If the size of the final readme is critical, or you don't
  132. need the extra capabilities, you can have DRC create a
  133. simplified readme by using the -S switch on the command
  134. line. A Simplified readme is about 10KB smaller than a
  135. standard readme, but is much less capable.
  136.  
  137.     Example:  RCOM -s <filename>
  138.  
  139. Standard and simplified readmes can be created from the
  140. same file - the syntax is common.
  141. %%*
  142. %% 25, 0, To clear or not to clear...
  143.  
  144. By default, DRC clears and paints the screen, but you can
  145. force it to come up over the top of the current screen by
  146. by invoking it with a /S switch: when it terminates, the
  147. screen will be left as it was on entry. This is useful if
  148. you want to use DRC to generate a help system which is
  149. spawned by a parent program.
  150. %%*
  151. %% 25, 0, Running the compiled readme
  152.  
  153. Once you have compiled and bound your readme, you can use
  154. it at once simply by typing its name. 
  155. %%*
  156. %% 25, 0, Using the compiled readme
  157.  
  158. When your readme is running, the user will normally use it like
  159. a simple menu-driven application. When the user hightlights an
  160. option in a topic list and presses <Enter>, either another list
  161. will appear, or the actual text of the entry. Pressing <Esc>
  162. steps back to the previous list.
  163.  
  164. At any time the user can press <F10>, which will popup a menu
  165. containing the options which are available at the time. From
  166. a list, only the search options are ever available. From the
  167. text of a topic, the search options and any others you have
  168. enabled will be present in the menu. By default, options other
  169. than the search options are disabled, but you can enable them
  170. on a case-by-case basis, or globally, using the %%D operator
  171. in the source file.
  172. %%*
  173. %% 25, 0, Searching for text
  174.  
  175. The user can search for text in the readme either by selecting
  176. Find text from the option menu, or by pressing <F7>. The
  177. search options cannot be disabled - they are always available.
  178. The Find text operation always starts at the beginning of the
  179. readme, while the Find again option starts after the last
  180. find. A short-cut for Find again is the <F8> key.
  181.  
  182. Searches are case-insensitive - so NETWare is matched the same
  183. as NetWare.
  184. %%*
  185. %% 25, 0, Printing a topic's text
  186.  
  187. If you have enabled printing on an option, then the user can
  188. select Print from the options menu. A small dialog will
  189. appear allowing the user to choose a printer port, and to
  190. indicate whether the printer is a PostScript printer. The
  191. values for each setting can be changed by pressing <Space>,
  192. and the user can move between fields using the arrow keys.
  193.  
  194. DRC's printing is not fancy, but it's functional.
  195. %%*
  196. %% 25, 0, Editing a topic's text
  197.  
  198. If you have enabled editing for an option, then the user
  199. can choose Edit from the options menu. If you have defined
  200. an edit-mode screen using the %%E operator, it will appear
  201. as soon as the choice is made.
  202.  
  203. DRC's editing facilities are not extensive, but they are
  204. perfectly adequate for allowing a user to fill in an order
  205. form or a questionnaire. While editing, the following
  206. keys are available:
  207.  
  208.    Arrows:       move in the indicated direction
  209.    Ctrl-Arrows:  move a word at a time
  210.    PgUp/PgDn:    move a screen at a time
  211.    Tab:          moves to the next field on the screen:
  212.                  a field is anything starting with a
  213.                  left square bracket ([). This feature
  214.                  is handy for designing forms which the
  215.                  user is to complete.
  216.    Ctrl-Y:       delete the current line
  217.    Del, Bks:     delete char right, delete char left
  218.    Ins:          toggle insert mode (defaults to OFF)
  219. %%*
  220. %% 25, 0, Saving a topic's text
  221.  
  222. If you have enabled saving for an entry, this choice on
  223. the option menu will allow the user to save the contents
  224. of the current topic to a text file.
  225.  
  226. If editing is enabled, and the user has made changes to
  227. the text, then the changes will also be saved into the
  228. text file.
  229.  
  230. NOTE: The Save command does NOT allow the user to alter
  231. the actual readme file itself.
  232. %%*
  233. %% 25, 0, A sample form
  234.  
  235. This is an example of DRC's forms capability: select
  236. Edit from the <F10> menu, then press <Tab> to move
  237. to the first field. Note that you got an instruction
  238. screen when you selected Edit - a %%Edit_screen
  239. keyword in the field defined that.
  240.  
  241. Try moving from field to field entering data and 
  242. editing the text. Don't worry, you can't alter the
  243. actual readme file itself. Press <Tab> a few times.
  244.  
  245.     Name:       [                             ]
  246.     Address:    [                             ]
  247.     Phone:      [                             ]
  248.  
  249. %%*
  250. %%*      Next, we have the first entry of type 100: this
  251. %%*      and the other type 100 entries will be displayed
  252. %%*      as a submenu when the index entry (above,
  253. %%*      "About the readme compiler") is chosen.
  254. %%*
  255. %% 100, 0, What the Readme compiler is...
  256.  
  257. It's a very rare PC software package indeed these days which
  258. doesn't have a profusion of readme files associated with it.
  259. Readme files can get lost, and it's not immediately intuitive
  260. what you do with them. What's more, it's almost impossible to
  261. create a Readme file which presents the necessary information
  262. in an accessible way.
  263.  
  264. David's Readme Compiler attempts to provide a better way of
  265. creating readme files. It's a set of programs which allow
  266. you to create executable user guides - one program contains
  267. it all, no need for extra files. You create a simple text
  268. file which tells DRC how to present your guide, run it
  269. through the compiler (RCOM.EXE), and violà! All done!
  270. %%*
  271. %% 100, 0, And what it can do ...
  272.  
  273. DRC allows you to "nest" text, effectively creating a
  274. hierarchical menu structure. You can do this to an
  275. arbitrarily deep level.
  276.  
  277. DRC supports colour, and allows printing and extracting 
  278. of text. You can highlight words in a message.
  279.  
  280. DRC has a search command which can look through a file
  281. in a free-text form for keywords.
  282. %% 100, 0, Then, some applications ...
  283.  
  284. You can use DRC for more than just readme files: here are
  285. some ideas I've come up with.
  286.  
  287.     On-line manuals for software.
  288.     Help systems, maybe for your LAN.
  289.     Presentations
  290.     Reference systems
  291.  
  292.    ... and so on. Pretty much anything which involves
  293.    organizing text for reference.
  294. %%*
  295. %% 100, 0, Licensing (good news!)...
  296.  
  297. The good news about DRC is that it is totally free. You
  298. may use it in any way you wish, without restriction,
  299. obligation, liability or responsibility. Commercial
  300. organizations may distribute all, or any part of David's
  301. Readme Compiler and derivatives with products if they wish.
  302.  
  303. The ONLY restrictions on David's Readme Compiler, are that
  304. you may not sell it directly (although it's OK to include
  305. it as part of another system) and you may not alter the
  306. .BIN files in any way without explicit written permission
  307. from the author.
  308.  
  309. If you would care to include a small credit in any readme
  310. you create using DRC, I'd always be grateful, but I don't
  311. even require this.
  312.  
  313. I hope you enjoy using DRC!
  314. %%*
  315. %% 100, 0, Some technical details...
  316.  
  317. DRC is written in C, using Borland C++ v3.1. It consists
  318. of about 2,500 lines of C and Assembler for the actual
  319. system, and another 12,000 lines for the user interface
  320. code, which is a routine library (if you are familiar with
  321. Pegasus Mail, you'll probably recognize much of the user
  322. interface of DRC).
  323.  
  324. If would have been impossible to create DRC without the
  325. help of the best editor ever written, Brief, by Solution
  326. Systems.
  327. %%*
  328. %% 100, 0, And contacting the author.
  329.  
  330. DRC is written by David Harris, P.O. Box 5451, Dunedin,
  331. New Zealand. If you have problems or questions, I can
  332. be reached by e-mail as david@pmail.gen.nz (or from
  333. CompuServe, >internet:david@pmail.gen.nz).
  334.  
  335. I can also be reached as david@otago.ac.nz.
  336.  
  337. Cheers!
  338.  
  339. -- David --
  340. 15 Aug '92
  341. %%*
  342. %% 300, 0, 94, 90, The sample file
  343.  
  344. The source file used to create this readme file
  345. is supplied with the system as README.SRC.
  346.  
  347. You can refer to it to get a general feel for
  348. how the source file needs to be prepared.
  349.  
  350. (Note, the horrible colours are deliberate!)
  351. %% 300, 0, The general format
  352.  
  353. The source file for DRC is a single relatively simple
  354. text file, which contains special markers to indicate
  355. topics and section headings. Marker lines are always
  356. introduced by two percentage signs (%%) at the start
  357. of a line. Some marker lines require a character in
  358. the third position - these are described in detail
  359. in the next section.
  360.  
  361. Lines beginning with %%* are comments, and are ignored.
  362.  
  363. The other type of marker line is a topic heading: this
  364. consists of 2 mandatory integers, 3 optional integers
  365. and a title. 
  366.  
  367.   The first integer is a type field, which is simply
  368.    a numeric tag for the entry. A file can have several
  369.    entries with the same type number, which will make 
  370.    up a menu. Type 0 entries are always the top-level 
  371.    entries, and a file must have at least one of these.
  372.  
  373.   The second integer is either 0, in which case the
  374.    entry has text which should be displayed when the
  375.    item is selected, or a positive value. If it is
  376.    the latter then it indicates that the entry is an
  377.    index for another type of entry: when the item is
  378.    chosen, DRC scans the file for all other entries
  379.    of the type specified and creates a sub-menu from
  380.    them, which it presents to the user.
  381.  
  382.   The first two optional integers specify the video
  383.    attributes for text in a the window, and the window
  384.    frame respectively. A table of values is provided in
  385.    the menu (see Colour changes in Windows). You can
  386.    omit one or both of these, in which case DRC will 
  387.    assume default values.
  388.  
  389.   The third optional integer is a flags field, which
  390.    is a bit pattern describing the characteristics of
  391.    the topic, and the options which should be available
  392.    in the <F10> menu. This field is described in detail
  393.    later in this menu. You can set default flag values
  394.    which will apply to all topics with no explicit
  395.    flag field using a %%Default_flag keyword.
  396.  
  397.   The title is displayed in the text window, and as
  398.    the choice in the menu.
  399.  
  400. Example: the line used to create the entry The Sample
  401. File in this menu:
  402. %% 300, 0, 94, 90, 6, The sample file
  403. ^   ^   ^  ^   ^   ^  ^─  The title
  404. │   │   │  │   │   └────  Flags: (Save and Print only)
  405. │   │   │  │   └────────  Frame colour (Lt Green/Magenta)
  406. │   │   │  └────────────  Text colour (Yellow/Magenta)
  407. │   │   └───────────────  Entry is not an index field
  408. │   └───────────────────  The type for this entry
  409. └───────────────────────  The marker line prefix  
  410. %%*
  411. %% 300, 325, Keyword markers
  412. %% 325, 0, Keyword markers
  413.  
  414. The marker lines described in this section have special 
  415. meanings in DRC: they are used to alter aspects of DRC's
  416. behaviour, or to enable or disable special features.
  417.  
  418. DRC actually only examines the first letter of the key-
  419. word, but you can use descriptive names for clarity,
  420. provided they don't contain spaces or tabs.
  421. %%*
  422. %% 325, 0, %%* - Comment
  423.  
  424. Any line beginning with %%* is a comment, and is
  425. ignored.
  426. %%*
  427. %% 325, 0, %%Title_bar
  428.  
  429. Use a %%Title_bar line to define a title bar for the
  430. main screen. An optional integer can be included
  431. which sets the video attribute of the title bar. For
  432. a list of values, see the section Setting Colour in
  433. Windows.
  434.  
  435. Example:  %%Title_bar 31, Sample title bar
  436.     - defines a title bar in white on blue, with
  437.       the text "Sample title bar".
  438.  
  439. Only the last %%Title_bar option encountered in a
  440. source file will be used.
  441. %%*
  442. %% 325, 0, %%Opening_screen
  443.  
  444. If you want to define a screen which is presented only
  445. when the readme file is run, use a %%Opening_screen 
  446. keyword. This takes one mandatory integer value - the
  447. ID of the screen to present. The screen is just a normal
  448. topic like any other, except that no options are available.
  449.  
  450. The screen ID should be unique - there should be only
  451. one topic in the file with the number you provide. If
  452. there is more than one, DRC will use the first one it
  453. encounters.
  454.  
  455. For performance reasons, the opening screen should be
  456. declared early in the source file.
  457.  
  458.    Example:  Opening_screen     2000
  459.       - tells DRC to present the screen with the
  460.         ID tag 2000 at startup.
  461. %%*
  462. %% 325, 0, %%Status_line
  463.  
  464. This keyword declares a status line - text which DRC
  465. will draw along the bottom of the screen. It takes one
  466. mandatory integer parameter - the ID of the topic which
  467. contains the text to display. The topic is just like any
  468. other topic - you can set colours and other attributes.
  469. The status line can be multi-line if you wish, but I
  470. suggest you keep to one or two lines.
  471.  
  472. This is useful for a help line or a copyright notice.
  473. %%*
  474. %% 325, 0, %%Default_flags
  475.  
  476. Topics have a flag field which allows you to specify
  477. border values for the window, and what options should
  478. be available in the <F10> menu for the topic.
  479.  
  480. Use a %%Default_flags keyword to define a default flag
  481. value for all successive topic definitions. The default
  482. will be used for definitions without an explicit flag
  483. field of their own. One integer parameter is required,
  484. the value to use as a default. A full list of possible
  485. flag field values is provided elsewhere in this guide.
  486.  
  487. You can use %%Default_flags repeatedly throughout the
  488. source file. The value assigned lasts until either the
  489. end of the source, or until another %%Default_flags
  490. keyword is encountered.
  491. %%*
  492. %% 325, 0, %%Edit_screen
  493.  
  494. You can allow the user to edit screens in your readme
  495. files. If you do, you may want to provide the user
  496. with some help on the keys available while editing,
  497. or other instructions: you can do this using this
  498. keyword.
  499.  
  500. If an editing screen has been defined using this key-
  501. word, DRC will present it when the user chooses Edit
  502. from the <F10> menu. Once the user has closed the
  503. edit screen, he or she can begin editing the text.
  504.  
  505. Only one %%Edit_screen can be declared in a file.
  506. %%*
  507. %% 300, 0, Flag fields for topics
  508.  
  509. The flag field for a topic controls what type of window
  510. border DRC will use, and what features should be made
  511. available in the <F10> menu. It is a bit pattern which
  512. uses the following values:
  513.  
  514.    Value │ Meaning
  515.    ──────┼───────────────────────────────────────
  516.      1   │ The user may EDIT this topic
  517.      2   │ The user may PRINT this topic
  518.      4   │ The user may SAVE this topic
  519.      8   │ Draw NO border around the topic window
  520.      16  │ Draw a DOUBLE border around the window
  521.      32  │ Draw a THICK border around the window
  522.  
  523. Add these values to combine effects: so, to have a topic
  524. which the user can EDIT and PRINT, with a thick border,
  525. add 1 + 2 + 32 = 35.
  526. %%*
  527. %% 300, 0, Highlighting text
  528.  
  529. DRC automatically sizes the window for text according to
  530. the maximum line width, and the number of lines. If there
  531. are more lines than will fit in the Window, the user can
  532. scroll using the arrow and page keys.
  533.  
  534. You can highlight text in a topic by enclosing it in ^A
  535. characters (the IBM smiley face). You can reverse text
  536. by enclosing it in ^B characters.
  537. %% 300, 0, Colour changes in windows
  538.  
  539. The colour fields in entry headers are numeric values
  540. which represent IBM screen attributes, according to 
  541. the following table:
  542.  
  543.       Colour          │   Text   │ Background
  544.      ─────────────────┼──────────┼───────────
  545.       Blue            │    1     │  add 16
  546.       Green           │    2     │  add 32
  547.       Cyan            │    3     │  add 48
  548.       Red             │    4     │  add 64
  549.       Magenta         │    5     │  add 80
  550.       Brown           │    6     │  add 96
  551.       Light grey      │    7     │  add 112
  552.       Dark grey       │    8     │  --na--
  553.       Light blue      │    9     │  --na--
  554.       Light green     │    10    │  --na--
  555.       Light cyan      │    11    │  --na--
  556.       Light red       │    12    │  --na--
  557.       Light magenta   │    13    │  --na--
  558.       Yellow          │    14    │  --na--
  559.       White           │    15    │  --na--
  560.      ─────────────────┴──────────┴─────────
  561.  
  562.       Example: 
  563.          Yellow text on Magenta background
  564.          = 14 + 80 
  565.          = 94
  566. %% 300, 0, Colour changes in text
  567.  
  568. Colour changes in text are a little more tricky, and
  569. may not work satisfactorily on monochrome systems.
  570. To imbed a colour change, enter a ^C character in the
  571. text, followed immediately by one of the following
  572. characters:
  573.  
  574.     A   Blue text             B   Green text
  575.     C   Cyan text             D   Red text
  576.     E   Magenta text          F   Brown text
  577.     G   Light grey text       H   Dark grey text
  578.     I   Light Blue text       J   Light Green text
  579.     K   Light Cyan text       L   Light Red text
  580.     M   Light Magenta text    N   Yellow text
  581.     O   Bright white text
  582.  
  583.    Example: CCyan, DRed, NYellow, JLight-Green@
  584.  
  585.    ^C@ has a special meaning - it means "change to
  586.    whatever the original video colour was".
  587. %%*
  588. %% 300, 0, Limitations and notes
  589.  
  590. No single entry may be larger than about 16KB and
  591. the file cannot at this stage have more than 640
  592. total entries.
  593.  
  594. The source file MUST end with a single '%%' pair
  595. on a line of its own.
  596.  
  597. If running under Novell NetWare, a guide compiled
  598. with DRC must not be flagged Execute-only, although
  599. it can be set to read only.
  600. %%*
  601. %% 0, 0, What's new in DRC v2.0
  602. DRC v2.0 is a considerable enhancement over v1.0. The
  603. following new features are provided:
  604.  
  605.     Free-text searching (promised, but not delivered
  606.      in version 1.0)
  607.     Enhanced printing, including PostScript support
  608.     User can save the text of a topic to a file
  609.     User can edit the text of a topic
  610.     Forms mode input (using the <Tab> key
  611.     Options menu on <F10> replaces the <P>-Print
  612.      command of v1.0. You have control over which
  613.      options are made available on the menu.
  614.     Startup screen can be specified
  615.     Edit screen: a topic which DRC will present
  616.      when the user asks to edit a topic.
  617.     Status line - you can define text which DRC
  618.      will display along the bottom of the screen.
  619.     Control over window borders
  620.     Simplified readme support - the .BIN file from
  621.      DRC 1.0 is provided with this release, since
  622.      it generates readmes which are about 10KB
  623.      smaller than the default mode. Create a sim-
  624.      plified readme using the -S switch to RCOM.
  625. %%*
  626. %%*  Note that the file MUST end with a blank '%%' pair.
  627. %%
  628.