home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff302.lzh / QuickHelp / Help.doc < prev    next >
Text File  |  1990-01-15  |  19KB  |  463 lines

  1. ==============================================================================
  2.  
  3.         Quick HELP                      V1.2
  4.         © J.Tyberghein                  Sun Dec 10 16:44:25 1989
  5.  
  6. ==============================================================================
  7.  
  8.  
  9.  
  10. Preface
  11. -------
  12.   These programs are intended for every (CLI-)user. They are extremely useful
  13.   if you are, for example, a programmer and you have some help-files.
  14.  
  15.   Suppose that you want to know the syntax of the ARP Gads command.
  16.   Normally you would start an editor (or use the one which is already in
  17.   memory) and load the corresponding help-file. (You can of course 'type'
  18.   them, but this can be very timeconsuming if the help-file is big)
  19.   Then you must search the right entry in this help-file.
  20.   This may look easy to you, but sometimes it's just difficult enough to
  21.   refrain you from using such help-files.
  22.  
  23.   These three utilites (MakeHelp, Help and ArcFiles) allow you to
  24.   make your own help-files. When this is done you simply type
  25.   'Help Gads' and there comes your information !
  26.  
  27.   To guarantee maximum flexibility these programs are able to read files
  28.   crunched with the PowerPacker (Author Nico François).
  29.   You can crunch each help-file individually and then archive them in
  30.   one big file. The advantage of this is that the resulting file will
  31.   be smaller than the sum of the original files (although a bit bigger
  32.   than if you had crunched them all together), but it will only be necessary
  33.   to decrunch the individual files when needed (of course this will be
  34.   done automatically for you).
  35.   To guarantee an even greater amount of flexibility you can show the
  36.   information you want in every editor you like. (The ouput will be
  37.   put in a temporary file and the editor will automatically be
  38.   invoked with this file)
  39.   And in case you have PPMore (also by Nico François), the biggest
  40.   amount of flexibility is likely to be yours. For in that case there
  41.   is no additional overhead for using a temporary file.
  42.  
  43.   These programs (Help, MakeHelp and ArcFiles V1.2) are shareware.
  44.   If you like and/or use these programs a lot I would appreciate it
  45.   very much if you'd send me a contribution of $10 US ($15 if you want
  46.   to get a new update (when one is available)).
  47.   Please send money by international money order, EuroCheck (in Belgian
  48.   Francs (BF) !) or cash, because it's very difficult for me to cash in
  49.   other checks.
  50.   If you want an update please state your current version.
  51.   If you want to use any of these programs for commercial purposes please
  52.   write for permission !
  53.  
  54.   If you have any suggestions or remarks you can write to (Bug reports are
  55.   welcome too)
  56.  
  57.                             Jorrit  Tyberghein
  58.                              Hepmansbossen 31
  59.                            3990 Meerhout BELGIUM
  60.  
  61.  
  62.  
  63.   WARNING:
  64.     If you want to use this utilities you must have Arp 1.3 or later.
  65.     If you want to use the MEMORY option with PPMore (explained later) you
  66.     need PPMore version 1.3 or later.
  67.     These programs accept crunched DATA-files made by PowerPacker 1.1 or
  68.     later.
  69.     Only use Help, MakeHelp and ArcFiles if they have the same
  70.     version number (unless stated otherwise).
  71.     If you use the PROG option (in HELP), you must assign T:.
  72.  
  73.  
  74.   At the end of this document you find a global example.
  75.  
  76.  
  77. ArcFiles
  78. --------
  79.  
  80.   +---------------------------------------------+
  81.   | Commandline template:                       |
  82.   |   Files/...,TO=ARC/a,ADD/s,LIST/s:          |
  83.   |---------------------------------------------|
  84.   | Usage:                                      |
  85.   |   ArcFiles { <Files>... } <TO Dest> [ADD]   |
  86.   | or                                          |
  87.   |   ArcFiles <ARC Dest> LIST                  |
  88.   +---------------------------------------------+
  89.  
  90.   This program is a small archiver. It is made especially for the
  91.   help utilities. You can use it for your own purposes if you like
  92.   (but not commercially).
  93.   At the moment it is not possible to extract files. This will of course
  94.   be possible in future releases.
  95.  
  96.     <Files>      : files to archive
  97.                    you can use all arp wildcards
  98.                    (see the arp documentation for more information)
  99.     <Dest>       : this is the destination for the archive
  100.     ADD          : if this option is used the <Files> will be appended
  101.                    to an existing archive <Dest>
  102.     LIST         : generate a listing of this archive
  103.                    if this option is specified <Dest> must be an
  104.                    existing archive file
  105.  
  106.  
  107.   examples:
  108.  
  109.     ArcFiles dh0:docs/*.docs to dh0:DocArc.ppa
  110.       will archive all files in 'dh0:docs' with extension '.docs' in the file
  111.       'dh0:DocArc.ppa'. If this destination file was there already it
  112.       will be deleted.
  113.  
  114.     ArcFiles dh0:docs/*.docs to dh0:DocArc.ppa add
  115.       will add the files in 'dh0:docs' with extension '.docs' to the
  116.       existing archive file dh0:DocArc.ppa
  117.  
  118.     ArcFiles arc dh0:DocArc.ppa list
  119.       will generate a listing of all the files in 'dh0:DocArc.ppa'.
  120.  
  121.     ArcFiles dh0:docs/Arp.doc df0:sources/*.c to df0:ArpAndSources.ppa
  122.       will archive the file 'dh0:docs/Arp.doc' and all files in
  123.       'df0:sources' with extension '.c' in 'df0:ArpAndSources.ppa'.
  124.       Note that ArcFiles will give no warning if 'dh0:docs/Arp.doc'
  125.       does not exist. It will simply not archive it (rather obvious
  126.       isn't it ?).
  127.  
  128.   Arc format (V1.2):
  129.  
  130.     I will give a description of the Arc format, so you can use it for
  131.     your own purposes.
  132.  
  133.     The file starts with two longwords. The first is equal to 'PPA1'.
  134.     The second is the offset in the file to where the Archive descriptor
  135.     table is located.
  136.     After these two longwords the files begin.
  137.     The archive descriptor (at the end of the file) contains the following:
  138.       A null terminated string  : the name and path name of the sub-file
  139.       A long word indicating the offset of the sub-file in this archive
  140.       A long word indicating the length of the sub-file
  141.     And this is repeated for every sub-file in the archive.
  142.     Simply check for EOF to stop scanning.
  143.  
  144.  
  145. MakeHelp
  146. --------
  147.  
  148.   +---------------------------------------------+
  149.   | Commandline template:                       |
  150.   |   From,CtrlFile,ADD/s,WORD/k,CLASS/k:       |
  151.   |---------------------------------------------|
  152.   | Usage:                                      |
  153.   |   MakeHelp <Help file> <Ctrl file> [ADD]    |
  154.   |            [WORD num] [CLASS class]         |
  155.   +---------------------------------------------+
  156.  
  157.   This program makes the help control files for you. These control
  158.   files are plain ASCII so you can add or delete lines as you wish.
  159.  
  160.     <Help file>   : the file containing the help (in a special format,
  161.                     explained below)
  162.     <Ctrl file>   : the control file to make or to adjust
  163.     ADD           : specify this option if you want to add help items
  164.                     to the control file (adjusting)
  165.     WORD num      : normally the parser searches for the first word in
  166.                     the text. This word will be the keyword for you to
  167.                     use with the help utility (see below for an example).
  168.                     With this option you can specify which word you want
  169.                     as the keyword
  170.     CLASS class   : to make the Quick Help utilities more flexible, you
  171.                     can group your help items in classes. When you use
  172.                     this option the newly added help items will be of
  173.                     class <class>. If you omit this option they will have
  174.                     class 'Misc' (from miscellaneous).
  175.  
  176.   The help-file must have the following format:
  177.  
  178.     If the help-file is a crunched or normal file:
  179.  
  180.       When you place a marker ('@') in the beginning of a line, MakeHelp
  181.       will search for the next (depending on the WORD option) word and
  182.       will start a new help item entry here. This word is then the keyword
  183.       for the Help utility.
  184.       This marker is not necessary in the beginning of the file.
  185.       At the end of the help text for this item you place '===' in the
  186.       beginning of the line. This is not necessary at the end of the file.
  187.  
  188.     If the help-file is an archive (each individual file may
  189.     be crunched):
  190.  
  191.       If each individual file in the help-file corresponds with one help
  192.       item, you need not place markers. The items are selected automatically.
  193.       In fact you can think about each individual file as a real file.
  194.       With this in your mind you can reread the previous paragraph.
  195.       If there are multiple help items in each individual file you must
  196.       place the corresponding markers (read the previous paragraph for
  197.       for more information)
  198.  
  199.   examples:
  200.  
  201.     MakeHelp dh0:docs/arp.ppa s:help.file
  202.       will make a new file 's:help.file' and add all marked help items in
  203.       the archive file 'dh0:docs/arp.ppa'. If every individual file in
  204.       the archive corresponds with one help-item, no markers are needed.
  205.  
  206.     MakeHelp dh0:docs/arexx.doc s:help.file add
  207.       will add all marked help items in the normal file 'dh0:docs/arexx.doc'
  208.       to 's:help.file'. The file 's:help.file' must already exist.
  209.  
  210.     MakeHelp dh0:docs/arexx.doc s:help.file add word 2
  211.       same as previous but we now take the second word after the marker '@'
  212.       as our keyword.
  213.  
  214.     MakeHelp dh0:docs/arp.ppa s:help.file class arp
  215.       same as the first example, but now the items will have class 'arp'
  216.       in stead of 'Misc'.
  217.  
  218.   Control file format (V1.2):
  219.  
  220.     There are two possible lines in a control file: an option line or
  221.     a normal line.
  222.     - An option line starts with '#'. The following options are supported:
  223.           PROG prog
  224.             When Help selects a help item after this option, the help text
  225.             will be directed to the program 'prog' (most likely an editor).
  226.             While prog is executing you can find the help text in the
  227.             file t:HelpTemp.
  228.           MEMORY prog
  229.             Same as previous option, but now there is no temporary file
  230.             needed. The help text is loaded directly in memory. At the moment
  231.             only PPMore (version 1.3) supports this option (MEMORY PPMore),
  232.             but you can write your own programs to support this option if you
  233.             like. You could, for example, use this option to make an efficient
  234.             ARexx interface.
  235.             When prog is executed it will have the following argument line:
  236.               -@<Hex address memory>,<Hex length>,<Hex options>,<Title string>
  237.             The first three hex integers are all longwords.
  238.             If the first bit (bit 0) of the last hex integer (Hex options) is
  239.             1, you must free the memory when you are ready (With Help this
  240.             is always the case).
  241.             for example:
  242.               -@C02310,12C0,1,Title
  243.               must be interpreted as:
  244.                 on address 0xC02310 you find my text. It is 0x12C0 bytes long
  245.                 and you must free it after you are ready. The title is
  246.                 'Title'.
  247.           RUN
  248.             Use this option if you want to run <prog> (from MEMORY or PROG)
  249.             instead of executing. (executing is the default)
  250.           NORUN
  251.             Use this option if you want to execute <prog>. (default)
  252.           STDO
  253.             When this option is used, the help text will go to the
  254.             standard Output (the CLI window).
  255.             This option overrides PROG and MEMORY and is the default.
  256.           CLASS <class>
  257.             All following help items will be of class <class>.
  258.           FILE <file>
  259.             Default file for help text (explained below).
  260.     - All other lines are help item lines.
  261.         They have the following format:
  262.           <KeyWord> '|' <File> or '*' '|' <Offset> [ '|' <individual file> ]
  263.           <KeyWord> is obvious.
  264.           <File> is the file where the help text can be found.
  265.             If <File> is a '*' the current file is taken (FILE option).
  266.           <Offset> is the offset in the file where the help text starts
  267.             if the file is not archived, and the offset in the individual
  268.             file if the file is archived.
  269.           <individual file> (only for archived files) is the individual
  270.             file where the help text can be found.
  271.         This control file format implies that:
  272.           - If you change the help-file you must change the control file,
  273.             because some offsets could change.
  274.           - If you add individual files to the help-file (an archive file in
  275.             this case) you need not change the offsets because the offsets are
  276.             relative in the individual files, and you only add another
  277.             individual file.
  278.           - If a help-file is not an archive you may freely crunch or
  279.             decrunch this file (with PowerPacker), because the offsets will
  280.             not change
  281.             (the offsets are always the offsets in the decrunched file).
  282.           - Crunched archive files are not supported (and not very useful).
  283.           - If you rename the help-file, you must change the corresponding
  284.             FILE option in the control file.
  285.  
  286.  
  287. Help
  288. ----
  289.  
  290.   +---------------------------------------------------------+
  291.   | Commandline template:                                   |
  292.   |   Name/a,CtrlFile,RUN/s,NORUN/s,MEMORY/k,PROG/k,STDO/s: |
  293.   |---------------------------------------------------------|
  294.   | Usage:                                                  |
  295.   |   Help [<Class>,]<Name> [<File>] [RUN | NORUN]          |
  296.   |        [STDO | (MEMORY | PROG) prog]                    |
  297.   +---------------------------------------------------------+
  298.  
  299.   This utility gives you the help you want.
  300.  
  301.     <Name>        : this is the help item you want help about
  302.                     You will get the first corresponding help item
  303.                     HELP finds.
  304.                     Note that it is not necessary to give the full
  305.                     help item name. Case is not important either.
  306.     <Class>       : if <Class> is specified HELP will look for the
  307.                     help item in this Class.
  308.                     Note that it is not necessary to give the full
  309.                     class name. Case is not important.
  310.     <File>        : control file (made by MakeHelp). 's:help.file' is
  311.                     the default.
  312.     RUN NORUN STDO MEMORY PROG RUN
  313.                   : these options are the same as the equivalent options
  314.                     in the control file. When one of these options is
  315.                     given, the corresponding control file options are
  316.                     ignored.
  317.  
  318.   examples:
  319.  
  320.     Help Gads
  321.       gives help about the ARP function 'Gads' (if your help-files and
  322.       control file are correct)
  323.  
  324.     Help NewArp,Gads
  325.       will give help about the ARP function 'Gads' in class 'NewArp'.
  326.       (class 'NewArp' could for example contain all additions to the
  327.       'Gads' function in 1.3)
  328.  
  329.     Help Gads run memory ppmore
  330.       gives help about 'Gads'. HELP will run 'PPMore'. Because we used
  331.       the 'memory' option, there will be no temporary file.
  332.       Note that you can only use the 'memory' option if you have PPMore
  333.       1.3 or later.
  334.  
  335.  
  336. Global example
  337. --------------
  338.  
  339.   Suppose that I have 3 help-files, each one containing 2 help items.
  340.  
  341.     Helpfile1:
  342.       | command list
  343.       |    ... (help for list command)
  344.       | command dir
  345.       |    ... (help for dir command)
  346.  
  347.     Helpfile2:
  348.       | command copy
  349.       |    ... (help for copy)
  350.       | move
  351.       |    ... (help for move)
  352.  
  353.     Helpfile3:
  354.       | command delete
  355.       |    ... (help for delete)
  356.       | command format
  357.       |    ... (help for format)
  358.  
  359.   Fine,... I notice that each help item (like 'list','dir','copy',...) is
  360.   the second word, but I didn't realize this wasn't the case with 'move' !
  361.   I must add marks to the help-files because every help-file contains 2
  362.   help items.
  363.  
  364.     Helpfile1:
  365.       | @command list
  366.       |    ... (help for list command)
  367.       | ===
  368.       | @command dir
  369.       |    ... (help for dir command)
  370.       | ===
  371.  
  372.     Helpfile2:
  373.       | @command copy
  374.       |    ... (help for copy)
  375.       | ===
  376.       | @move
  377.       |    ... (help for move)
  378.       | ===
  379.  
  380.     Helpfile3:
  381.       | @command delete
  382.       |    ... (help for delete)
  383.       | ===
  384.       | @command format
  385.       |    ... (help for format)
  386.       | ===
  387.  
  388.   (Strange, I still didn't see that 'move' is not the second word !)
  389.   First I am going to crunch all help-files with the PowerPacker CLI
  390.   command.
  391.   So I type:
  392.  
  393.     1> crunch HelpFile* ram:
  394.  
  395.   All my help-files are on the ram disk.
  396.  
  397.     1> dir ram:
  398.       |     t (dir)
  399.       |  helpfile1.pp                   helpfile2.pp
  400.       |  helpfile3.pp
  401.  
  402.   Now I archive them.
  403.  
  404.     1> arcfiles ram:* to ram:HelpFiles.ppa
  405.     1> delete ram:*.pp
  406.     1> dir ram:
  407.       |     t (dir)
  408.       |  HelpFiles.ppa
  409.  
  410.   Everything is going fine. Let's make a control file.
  411.  
  412.     1> makehelp ram:HelpFiles.ppa s:Help.File word 2 class Commands
  413.  
  414.   I have made 6 help items in class 'Commands'
  415.  
  416.     1> type s:Help.File
  417.       | #FILE ram:HelpFiles.ppa
  418.       | #CLASS Commands
  419.       | delete | * | 1 | ram:helpfile3.pp
  420.       | format | * | 80 | ram:helpfile3.pp
  421.       | list | * | 138 | ram:helpfile1.pp
  422.       | dir | * | 81 | ram:helpfile1.pp
  423.       | copy | * | 125 | ram:helpfile2.pp
  424.       | this | * | 98 | ram:helpfile2.pp
  425.  
  426.   Oops ! Something went wrong ! I didn't need a help-item named 'this' !
  427.   But this is no problem. Simply edit 's:Help.File' and change
  428.   'this' to 'move'.
  429.   So everything is allright. Let's try it.
  430.  
  431.     1> help del
  432.       | command delete
  433.       |    ... (help for delete)
  434.  
  435.   There are still two things I have to do. First I want to put the archive
  436.   'HelpFiles.ppa' on my disk, because it won't live very long on my ram disk.
  437.  
  438.     1> copy ram:HelpFiles.ppa df0:
  439.  
  440.   Now I change the FILE option in 's:Help.File'.
  441.   I add two other lines because I want the help output in the PPMore window.
  442.  
  443.     1> type s:Help.File
  444.       | #FILE df0:HelpFiles.ppa                <<<
  445.       | #MEMORY PPMore                         <<<
  446.       | #RUN                                   <<<
  447.       | #CLASS Commands
  448.       | delete | * | 1 | ram:helpfile3.pp
  449.       | format | * | 80 | ram:helpfile3.pp
  450.       | list | * | 138 | ram:helpfile1.pp
  451.       | dir | * | 81 | ram:helpfile1.pp
  452.       | copy | * | 125 | ram:helpfile2.pp
  453.       | this | * | 98 | ram:helpfile2.pp
  454.  
  455.   Everything is ready !
  456.  
  457.  
  458. ==============================================================================
  459.  
  460.                        End of Quick HELP 1.2 document
  461.  
  462. ==============================================================================
  463.