@database ADHelp.guide

@Index INDEXNODE

@Node Main "ADHelp.guide"


                   ADHelp - a help system for programmers

                                 Version 1.0

                   Written from Gerhard Müller 1992/1993/1994

                            @{"ADHelp is SHAREWARE" Link "About ADHelp"}

                            Sat Jun 11 11:19:10 1994


     @{"    If you use GoldED     " LINK "Read me before installing ADHelp with GoldED"}  - PLEASE read this before installing ADHelp with GoldED

     @{"    System requirements   " Link "System requirements"}  - What does ADHelp need?
     @{"       Introduction       " Link "Introduction"}  - What for may I use ADHelp?
     @{"         Overview         " Link "Overview"}  - Small overview over ADHelp
     @{"       Installation       " Link "Installation"}  - How to install ADHelp on your system
     @{"    Working with ADHelp   " Link "Working with ADHelp"}  - A few examples show you how to use ADHelp
     @{"     Starting ADHelp      " Link "Starting ADHelp"}  - all startup options of ADHelp
     @{"   Some more information  " Link "Some more information"}  - if you want to know everything in detail
     @{" Supported ARexx-commands " Link "Supported ARexx-commands"}  - List of supported ARexx commands
     @{"Structure of the indexfile" Link "Structure of the indexfile"}  - Explains the structure of the indexfile
     @{"     Acknowledgements     " Link "Acknowledgements"}  - Thanks to some people
     @{"      Program history     " Link "Program history"}  - what are the differences of each version
     @{"        Legal stuff       " Link "Legal stuff"}  - read this!
     @{"How to contact the author " Link "How to contact the author"}  - my address etc.

@EndNode



@Node "Read me before installing ADHelp with GoldED" "ADHelp.guide/Read me before installing ADHelp with GoldED"

GoldED still has some problems with real TABs.  So GoldED has problems with
"jumping to a byte" if real TABs are in the file that should be loaded.

The  best  solution  is to convert all TABs to spaces in the related files.
For this I wrote the command "ConvertTabsToSpaces".

Use ConvertTabsToSpaces like this:

   ConvertTabsToSpaces filename(or dir) [number of spaces per TAB,
                                                             default is 8]

e.g.

   ConvertTabsToSpaces gcc:os-include 4


In  all  matching files (and supdirectories!) the tabs are replaced through
spaces.

@EndNode



@Node "System requirements" "ADHelp.guide/System requirements"

System requirements:

        Editor with ARexx-Interface (e.g. CygnusEd, EDGE or GoldED)

        @{"Includes & Autodocs" Link "Includes & Autodocs"}

        Kick 2.04+ (Works on a A4000/40 3.1)

        Commodore's Installer

        some memory

        enough harddisk space

        ARexx

@EndNode




@Node "Introduction" "ADHelp.guide/Introduction"
@Toc "Main"

Every programmer knows the problem:

                  - which arguements does function xyz need?
                  - where is symbol XYZ defined?
                  - which value does it have?
                  - what components has struct abc?
                  - I know there is a function in dos.library with the name
                    Get*, but I can't remember the exact name.

All these problems are gone if you use ADHelp!

@EndNode



@Node "Overview" "ADHelp.guide/Overview"
@Toc "Main"

ADHelp is a small program that should be launched at computer startup, e.g.
in  s:user-startup, or from WBStartup.  The program reads in an index-file,
where  all  necessary  information  are  stored.  The following sources for
the indexfile are supported by ADHelp:

  - Commodore Autodocs
  - C Include files
  - Assembler include files
  - SAS/C's sc_lib.guide
  - unix manpages (e.g. from gcc)

ADHelp  has an ARexx-interface, which can be used by nearly any editor that
has  an Arexx-interface.  Arexx-scripts are provided for CygnusEd, EDGE and
GoldED.  Modifying an ARexx-script for other editors should be very easy.

The  Arexx-script should be started by the editor.  It provides ADHelp with
the  necessary  information  about  the  required help.  ADHelp returns the
location  of the help text.  The ARexx-script may open a new window/view to
show the information, start a text-viewer etc.

The ADHelp-package contains the following files:

adhelp                   - the main program


Install ADHelp           - install script
Install ADHelp.info


adhelp.guide             - you are reading this file at the moment
adhelp.guide.info


GetAutodocOffsets        - builds indexfile from autodocs
                             see also @{"Includes & Autodocs" Link "Includes & Autodocs"}
GetIncludeStructsOffsets - builds indexfile from C-includes
                             see also @{"Includes & Autodocs" Link "Includes & Autodocs"}
GetAsmIncludeIndex       - builds indexfile from Assembler-includes
                             see also @{"Includes & Autodocs" Link "Includes & Autodocs"}
GetSCLibOffsets          - builds indexfile from SAS/C sc_lib.guide

GetManPagesOffsets       - builds indexfile from manpages


RemoveAnsiFromManpages   - removes some unwanted characters from unix
                           manpages, needed before you can use
                           GetManPagesOffsets.

ConvertTabsToSpaces      - small utility for GoldED user, converts tabs to a
                           user-definable number of spaces

rexx/
rexx/ADHelp.ged          - ARexx-scripts, called from the editor,
rexx/ADHelpask.ged
rexx/ADHelp.ced            communicates with ADHelp
rexx/ADHelp.edge

rexx/enhanced/
rexx/ADHelp.ged          - Two enhanced ARexx-scripts for GoldED, try them
rexx/ADHelpask.ged         if you want

@EndNode



@Node "Installation" "ADHelp.guide/Installation"

Installation is mainly done with Commodore's Installer.  But if you want to
know  what  is  going  on, or if you want to change something later, I will
just outline the @{"basic points" Link "detailed installation"}.

For the the scanner programs look directly at @{"GetAutodocOffsets" Link "GetAutodocOffsets"},
@{"GetIncludeStructsOffsets" LINK "GetIncludeStructsOffsets"}, @{"GetAsmIncludeIndex" LINK "GetAsmIncludeIndex"}, @{"GetManPagesOffsets" LINK "GetManPagesOffsets"}
and @{"GetSCLibOffsets" LINK "GetSCLibOffsets"}.

There   is   one   thing   Installer   can't   do  for  you:   install  the
ADHelp-ARexx-script  in  your editor.  If you use CygnusEd, EDGE or GoldED,
you  can  use  the  provided  Arexx-scripts.   If  not,  look at one of the
provided scriptfiles and modify it.

The Arexx-scriptfiles are designed to be called from the editor. To install
the ADHelp-script, start your editor.


CygnusEd:
---------

We    will    install    ADHelp    on    "F    9".    To   do   this,   use
"Special/Dos/Arexx-Interface/  Install DOS/Arexx command..." from the menu.
Enter   "9"   as   command   number   for   function   key.   Enter  "<your
ADHelp-director>/rexx/adhelp.ced"   as   Arexx-command.    Now   save   the
definition  of  our  "search  key"  with  "Special/Dos/Arexx-Interface/Save
DOS/Arexx commands...".  That's all!


EDGE:
-----

We will install ADHelp on "F 9". To do this, we add our command to a menu.
Add the line

    ITEM "Help"   KEY="f9" COMMAND RX STOP SYNC <your ADHelp-directory>/rexx/ADHelp.edge

at the end of the Tools-Menu by saving this line in the file
"Edgeprg:UserTools.Menus". That's all!


GoldED
------

@{"(Don't forget to convert all TABS to Spaces in your files !)" LINK "Read me before installing ADHelp with GoldED"}
Since  GoldED has a similar feature to ADHelp we will install it to replace
the existing menu items

    <Find/reference> and
    <Find/reference...>

To  do  this,  select  "Config/menus..." .  Then select the "Find" menu and
double-click  on  "reference".  Replace the internal command "XREF CURRENT"
by the ARexx-Script

    "<your ADHelp-directory/rexx/adhelp.ged"

Now do the same with the menu-item "reference..." and replace it by

    <your ADHelp-directory/rexx/adhelpask.ged>

That's all!


If  you  made  an  Arexx-script working with another editor, please send me
your modified ARexx-script!

@EndNode



@Node "detailed installation" "ADHelp.guide/detailed installation"

The   first  problem  is  to  generate  an  indexfile  which  contains  all
information ADHelp should know about.

In order to do this I wrote five different programs:

    @{"GetAutodocOffsets" Link "GetAutodocOffsets"},

    @{"GetIncludeStructsOffsets" LINK "GetIncludeStructsOffsets"}

    @{"GetAsmIncludeIndex" LINK "GetAsmIncludeIndex"}

and

    @{"GetSCLibOffsets" LINK "GetSCLibOffsets"}

    @{"GetManPagesOffsets" LINK "GetManPagesOffsets"}


The  first one scans the autodocs, the secound one the C-include-files, the
third  one  the  Assembler-include-files,  the fourth one sc_lib.guide from
SAS/C  6.5x and GetManPagesOffsets the gcc/unix manpages (converted to real
ascii documents by @{"RemoveAnsiFromManpages" LINK "RemoveAnsiFromManpages"}.


The second problem is to start ADHelp. If you use ADHelp only sometimes,
enter

    run adhelp <name of indexfile> <options>

    (e.g.) run adhelp s:IndexFile

from  the  Shell  before  you use ADHelp from within your editor, or with a
double-click on the Workbench.

Please look at @{"Starting ADHelp" LINK "Starting ADHelp"} for all startup-options.

@EndNode



@Node "GetAutodocOffsets" "ADHelp.guide/GetAutodocOffsets"

GetAutodocOffsets

GetAutodocOffsets  looks for all files which end with ".doc" in the current
directory and writes the generated indexfile to stdout.

As  you  surely  don't  want to have stdout to display your autodocs, it is
necessary to redirect the output to a file which ADHelp can use.

    Example:

        RAM:> GetAutodocOffsets >s:Indexfile


You can, if you want, define a directory:

    Example:


        RAM:> GetAutodocOffsets Dh0:Help/Autodocs >s:Indexfile


All files have to end with ".doc", otherwise it is assumed that the file is
no  autodoc  file.  Please note that the pathname to the autodocs has to be
absolute, otherwise ADHelp won't find the autodoc-files.

The Autodoc files may be XPK-packed.

@EndNode



@Node "GetIncludeStructsOffsets" "ADHelp.guide/GetIncludeStructsOffsets"

GetIncludeStructsOffsets

GetIncludeStructsOffsets   works  like  @{"GetAutodocOffsets" Link "GetAutodocOffsets"},  but  scans  the
C-include  files for all necessary information.

    Example:

        ram:> GetIncludeStructsOffsets dh0:prg/os-include >>s:IndexFile

The program needs its time, so please be a little patient.

All  files have to end with ".h" or ".hP", otherwise it is assumed that the
file is no include file.  Please note that the pathname to the includes has
to be absolute, otherwise ADHelp won't find the includes.

The Include files may be XPK-packed.

@EndNode



@Node "GetAsmIncludeIndex" "ADHelp.guide/GetAsmIncludeIndex"

GetAsmIncludeIndex

GetAsmIncludeIndex was written by Stefan Hochmuth.  Thanks, Stefan!

GetAsmIncludeIndex  works  like  @{"GetAutodocOffsets" Link "GetAutodocOffsets"}, but scans the Assembler
include  files for all necessary information.

    Example:

        ram:> GetAsmIncludeIndex dh0:prg/os-asm-include >>s:IndexFile

You can, if you want, use a directory together with a pattern:

    Example:

        ram:> GetAsmIncludeIndex dh0:prg/os-asm-include/*/*.i >>s:IndexFile

The program needs its time, so please be a little patient.

Please note that the pathname to the includes has to be absolute, otherwise
ADHelp won't find the includes.

GetAsmIncludeIndex  is slightly different from GetIncludeStructsOffsets, as
it  outputs  ALL  found things, even all the names in a structure, not only
the structure name.  I think this is more useful for Assembler programmers.

@EndNode




@Node "GetSCLibOffsets" "ADHelp.guide/GetSCLibOffsets"

GetSCLibOffsets

GetSCLibOffsets  works  like  @{"GetAutodocOffsets" Link "GetAutodocOffsets"},  but  scans  the help file
sc_lib.guide  from  SAS  6.5x  for all necessary information.

    Example:

        ram:> GetSCLibOffsets sc:help/sc_lib.guide >>s:IndexFile

You   can   also  try  to  use  GetSCLibOffsets  with  other  .guide-files.
GetSCLibOffsets  needs the same structure as in the file sc_lib.guide.  You
can, if you want, use a directory together with a pattern:

    Example:

        ram:> GetSCLibOffsets sc:help/*.guide >>s:IndexFile

The program needs its time, so please be a little patient.

Please  note  that  the  pathname  to  the  guide files has to be absolute,
otherwise ADHelp won't find the .guide-files.

As  GetSCLibOffsets  tries  to  be as clever as it can be :-//, it produces
some name clashes.

These are defined twice and such can't be used:

sc_lib/abs
sc_lib/cosh
sc_lib/exp
sc_lib/log
sc_lib/pow
sc_lib/sin
sc_lib/sinh
sc_lib/sqrt


This  entry  can  only be reached if the ADHelp Variable NICEHELP is set to
FALSE:

"sc_lib/<<, >>"


These entries contain spaces and can't be used:

"sc_lib/ios, enum format_state"
"sc_lib/ios, enum io_state"
"sc_lib/ios, enum open_mode"
"sc_lib/ios, enum seek_dir"

You  can  change the enties in your indexfile to something else so you gain
access to these entries.

@EndNode



@Node "GetManPagesOffsets" "ADHelp.guide/GetManPagesOffsets"

GetManPagesOffsets

GetManPagesOffsets works like @{"GetAutodocOffsets" Link "GetAutodocOffsets"}, but scans the gcc/unix
manpages (converted  to  normal  ascii-documents  by @{"RemoveAnsiFromManpages" Link "RemoveAnsiFromManpages"})
for all necessary information.

    Example:

        ram:> GetManPagesOffsets gcc:man2/cat2 >>s:IndexFile

You can, if you want, use a directory together with a pattern:

    Example:

        ram:> GetManPagesOffsets gcc:man2/#?/#?.0 >>s:IndexFile

The program needs its time, so please be a little patient.

Please note that the pathname to the includes has to be absolute, otherwise
ADHelp won't find the manpages.

The man pages may be XPK-packed.

@EndNode


@Node "RemoveAnsiFromManpages" "ADHelp.guide/RemoveAnsiFromManpages"

RemoveAnsiFromManpages

RemoveAnsiFromManpages  is  a small program that removes all the characters
which  underline  or  doublestrike  some  parts  of  the manpages.  This is
necessary, as all editors I know can't handle these extra characters -> the
manpages are not readable.

RemoveAnsiFromManpages is called like this:

    RemoveAnsiFromManpages <directory_or_file_to_convert>

You  can  give  a  pattern to RemoveAnsiFromManpages.  Please note that all
subdirectories are converted as well.

Please make a backup of your manpages if you still want to see all the bold
and understrike characters, as the original files are overwritten!

The  man  pages  may  be XPK-packed, the resulting files are not.  (You can
pack them again of course if you want).

@EndNode


@Node "Working with ADHelp" "ADHelp.guide/Working with ADHelp"

Working with ADHelp

Using  ADHelp  it  becomes  quite  comfortable  to work with the @{"Includes & Autodocs" Link "Includes & Autodocs"}
How to use ADHelp is explained best with a few examples.


Example 1:

     -  Hmm, with what parameters is AllocMem() called?

Solution:

     -  Move  the  cursor to the beginning of the word AllocMem (or type it
        in,  if  it  is  not  somewhere where you see it, and then move the
        cursor to the beginning of AllocMem).  Now use the installed search
        key  to  invoke the ARexx-Script.  A new window/view of your editor
        is opened, and the autodoc-page to AllocMem is shown.



Example 2:

      - There  should  be a function in intuition-library which begins with
        Add, but I can't remeber the full name.

Solution:

      - position cursor on "intuition.library/Add*" or "int*/Add*" (without
        '"'  !)  and  press  the  search  key (* is a Synonym for "#?", not
        available  by  default  in 2.0.  Available as an option that can be
        turned  on  by  "SetStar"  or  equal  programs).  The new file/view
        contains the following:

            intuition.library/AddClass(intuition.doc)
            intuition.library/AddGadget(intuition.doc)
            intuition.library/AddGList(intuition.doc)

        Move  the  the  cursor  to  the  beginning  of the function you are
        interested  in  and  press  the  search  key  again - voila!  A new
        window/view with this function is opened.  Easy, isn't it?



Example 3:

     -  in which devices is CMD_READ supported?

Solution:

        type in: CMD_READ, press the search key. The following appears:

            trackdisk.device/CMD_READ(trackdisk.doc)
            serial.device/CMD_READ(serial.doc)
            parallel.device/CMD_READ(parallel.doc)
            ...



Example 4:

     -  Show all autodoc-functions, definitions, structs etc.

Solution:

     -  type  in:   *  and  press  the  search  key.   After  a few seconds
        (depends  on  your Amiga :-) ), and, if you have enough memory, the
        following appears:

            workbench.library/AddAppIconA(wb.doc)
            workbench.library/AddAppMenuItemA(wb.doc)
            workbench.library/AddAppWindowA(wb.doc)
                       ...
            startup.h/WBArg(g:os-include/workbench/startup.h)
            workbench/icon.h(g:os-include/workbench/icon.h)
            icon.h/WORKBENCH_ICON_H(g:os-include/workbench/icon.h)

        On  my  system  this file contains more than 9000 lines and is over
        560 K long!



Example 5:

     -  show all autodoc-functions of libraries which contain a small "z"

Solution:

        type in: *.library/*z* -> search key. It appears:

            layers.library/MoveSizeLayer(layers.doc)
            layers.library/SizeLayer(layers.doc)
            intuition.library/SizeWindow(intuition.doc)
            dos.library/SetFileSize(dos.doc)

        if  you  would  also like to look at functions with a captial z,
        you could have used *.library/*[zZ]*



Example 6:

     -  Show all autodoc-functions of libraries which begin with "Z"

Solution:

        type  in:  *.library/Z* -> search key.  It appears the autodoc-page
        to intuition.library/ZipWindow from file intuition.doc



Example 7:

      - How and where is MODE_READWRITE defined?

Solution:

        type in: MODE_READWRITE -> search key

        A new window/view will be opened which contains the file dos/dos.h.
        The cursor is moved to the line where MODE_READWRITE is DEFINEd.

@EndNode




@Node "Starting ADHelp" "ADHelp.guide/Starting ADHelp"

ADHelp  may  be  started from CLI or from Workbench.  You can put ADHelp in
the  user-startup or in the SYS:WBStartup-drawer to start ADHelp every time
you start your computer.

ADHelp  has  several options that can be entered as commandline or added as
tooltypes in the icon (Workbench/Icon/Information...).

Here is a list of all options:


  ADHelp INDEXFILE/A [CURRENTDIR] [RELOAD/S] [ADD_A/S] [NONICEHELP]
         [NOMINDCASE/S] [WILDMINDNOCASE] [NOMEMHANDLER] [XPK/S] [PORTNAME]
         [TEMPFILE]


INDEXFILE         - name of indexfile generated in installation
                    (has to be an absolute path name)

CURRENTDIR        - name of your current directory. This directory is
                    used for finding the help files if the path names
                    are not absolute

RELOAD            - after each use the indexfile is flushed out of memory
                    and read in again if neccessary. Use this only under
                    OS 2.04 and OS 2.1, as the automatic installed memory
                    handler unter V39 does this for you more efficient.
                    The indexfile is only flushed out of memory if necessary.

ADD_A             - if search is not successful, try again with *A added
                    to search string.

NONICEHELP        - here you can define which chars should be delimiters if
                    you don't want to use the default delimiter chars
                    (look at the Arexx description for details)

NOMINDCASE        - if you want case insensitive search, define this switch.
                    Default is case senstitive search

WILDMINDNOCASE    - if you want case insensitive search if a wildcard is
                    in the search string.

NOMEMHANDLER      - if ADHelp runs under 3.0+ (V39+), an LowMemHandler
                    is initialized that frees the indexfile-buffer if
                    not enough memory is available. If you don't like this
                    behaviour, select this option.

XPK               - if you have xpk packed .doc, include or other files,
                    use this option to use them. Default is only to load
                    an xpk-packed indexfile, as loading a file with
                    xpk support takes a little bit more time than without,
                    as xpk doesn't support seeking in files. If a file
                    is not packed, it is of course read in as usual.

PORTNAME          - ARexx port name of ADHelp. Default is "ADHELP"

TEMPFILE          - The name of temporaryly created files. Useful if you
                    don't have much memory and you want to generate the
                    temporary files on hard disk. Default is T:adhelp.temp


For a more detailed description please look at the @{"supported ARexx-commands" LINK "Supported ARexx-commands"}.

ADHelp  can  be stopped with CTRL-C, Break <ADHelp's CLI nr> or by starting
ADHelp again with the same Arexx port name.

ADHelp  does  not read in the indexfile directly after its start.  It waits
until you need help - so you safe memory if you don't need ADHelp.

If you select the "RELOAD" switch, the indexfile is read in only if needed.
This  means  if someone needs help, the indexfile is read in, the search is
processed,  and then the indexfile is flushed out of memory again.  This is
extreamly useful if you are short of memory, and 170KB for an indexfile are
read  in  quite  fast.   Normally,  the indexfile stays in memory after the
first use.

If  you  use ADhelp under OS3.0 or above, ADHelp has a build-in "low memory
handler".   This handler flushes the indexfile out of memory if memory gets
short  on  your  system.   So  the  indexfile can stay in memory as long as
possible,  and  you don't have to wait until the indexfile is read in again
and  again.   So,  under V39 it is not useful to use RELOAD.  To switch off
this  behaviour,  use the option NOMEMHANDLER, and no low memory handler is
installed.

If you are short of hard disk storage, you can crunch your indexfile with a
xpk  packer  of your choice.  ADHelp automatically decrunches the indexfile
(You don't need xfh or xData installed).

You  can  save  even  some  more  hard  disk  storage  if  you  crunch your
autodoc-files, and perhaps even the include files with xpk.  Please use the
option XPK, or ADHelp won't recognize your files.


@EndNode






@Node "Some more information" "ADHelp.guide/Some more information"

Some more information:

Except  for  "("  and  ")"  all  regular  patterns  that  can  be used with
ParsePattern()  are  possible as search patterns.  The characters ",", ";",
"{",  "}",  "§", "(", ")", "=", " "(SPACE), "&", "+", "<", ">", """ and TAB
are  skipped  at the beginning of each search string.  They also define the
end of a search pattern.

There  are  two  search  modi.   If  the  search pattern contains a "/", an
extended search is executed.

In  the normal search (without "/" in the sarch pattern), only the function
name/define etc.  is checked against the search pattern.

In the extended search both parts are checked seperately.  The first one is
checked  against  the  name of the library etc., the second one like in the
normal  search  (look  above).  Only if both tests are successful, the hole
search is succesful.

If  you  really  want  to  have full pattern matching, you can set ADHelp's
variable  "NICEHELP" to FALSE with the following Arexx-script (this can be,
of course, build in in any other ADHelp-Arexx-script):

/* do full pattern matching */

OPTIONS results

ADDRESS ADHELP

SETAHVAR NICEHELP FALSE

But, this is not always user friendly. Imagine you have a source text, and
there the line:

    if(mem=(char *)AllocVec(1024,MEMF_ANY))

If  you go now to the AllocMem() function, you won't get AllocMem's autodoc
page, as the '(' are not handled as end of search string.

Only  "§",  (TAB),  (LINE  FEED)  and  (SPACE)  are  now  recognized as end
characters.

If you want to change the characters that are recognised as delimiters, you
can do this with

    SETAHVAR NICEHELP "<your delimiter characters>"

e.g.

    SETAHVAR NICEHELP '"'||".,|{}: "||'09'x||'"'


Be  sure  you  have  somewhere  the  command  "SETAHVAR NICEHELP FALSE", as
otherwise the default delimiters would be used.

The  normal "GETWORD"-funcion of most editors is not useable for ADHelp, as
they don't recognize the search pattern as ONE word.  So best is to get the
whole  line  and  the  position in the string (!!!  not only cursor-x, TABs
would not be handled with very well...)

If the cursor is positioned behind the line, the cursor position is treated
as if the cursor was at the beginning of the line.

Sometimes a temporary file (see option TEMPFILE) is used.  Be prepared that
this  file  could  be  quite  long!   If you search for "*", over 400 K are
written to this file (depends on your installation)!

The  programm  "ADHelp  can  be  terminated  through "QUIT" from ARexx or a
"CTRL-C"-Signal.   From  WB  just  start  ADHelp  again (with the same port
name).

From the shell it works like this

Example:

     > status
       Process  1: Loaded as command: Status
       Process  2: Loaded as command: dh1:c/conclip
       Process  3: Loaded as command: u:Screenblanker/Spliner
       Process  4: Loaded as command: dh1:Tools/Commodities/exchange
       Process  5: Loaded as command: Workbench
       Process  6: Loaded as command: ADHelp

     > Break 6

@EndNode




@Node "Supported ARexx-commands" "ADHelp.guide/Supported ARexx-commands"

Supported ARexx-commands

The following ARexx commands are supported:


CLEAR               Flushes the indexfile out of memory. If needed again,
                    the indexfile is reloaded


GETAHVAR            Gets one variable from AdocHelp. The following
                    variables are supported:

    INDEXFILE/S     the name of the indexfile in use

    CURRENDIR/S     the name of the current directory of ADHelp

    ADDA/S          "TRUE" if ADHelp retries the search with an *A
                    added to the end in case a search has been unsuccessful;
                    otherwise "FALSE"

    RELOAD/S        "TRUE" if the indexfile is flushed out of memory
                    after every search; otherwise "FALSE"

    NICEHELP/S      If set to "FALSE" (see SETAHVAR) the actual delimiter
                    characters are returned.
                    Otherwise "TRUE" is returned, this means the standard
                    delimiters are used. For normal use NICEHELP should be
                    FALSE

    MINDCASE/S      "TRUE" if ADHelp does case sensitive searches (default),
                    otherwise "FALSE"

   WILDMINDNOCASE/S "TRUE" if searching is case insensitive if wildcards
                    are used

    XPK/S           If TRUE (default is FALSE), you can use XPK packed
                    autodoc-files, include files or all the other help
                    files.

    TEMPFILE/S      Get the filename for temporary files.


                    !Only one option at a time is supported!


      RESULT:       the desired variable

                    Remember to compare RC with 0 before using the result!



HELP                is the main function of ADHelp. This function provides
                    you with help to a string

    BYTEOFFS/K      is the position of the help-requiring word in STRING
                    (often the cursor position in the line). Default is 0

    STRING/K/A/F    the contents of the line for which help is needed.
                    This option should be the last one in the command line,
                    as otherwise BYTEOFFS would not be recognized


      RESULT:       a string. These are the possible return strings:

                    "FILE <filename>"

                    for a filename that should be loaded directly in the
                    editor

                    "INCLUDE <byteoffs> <filename>"

                    for a filename that should be loaded in the editor.
                    The cursor should be set to byte <byteoffs>

                    "TEXT <text>"

                    for a text the user should acknowledge

                    "SELECT <filename>"

                    the same as FILE, but here the user gets a list of
                    possible choices, perhaps due to the use of wildcards

                    Remember to compare RC with 0 before using the result!


QUIT                Quits ADhelp


SETAHVAR            Sets one or more variables in ADHelp

    INDEXFILE/K     the name of the indexfile

    CURRENTDIR/K    the name of the current directory

    ADDA/K          Set this to "TRUE" if ADHelp should retry the search with
                    an *A added to the end in case a search has been
                    unsuccessful; otherwise "FALSE"

    RELOAD/K        Set this to "TRUE" if the indexfile should be flushed out
                    of memory after every search; otherwise "FALSE"

    NICEHELP/K      "TRUE" if the helpstring should not be processed further
                    (no stripping of '(' etc.). For normal use NICEHELP should be
                    FALSE. This option is useful if you want to use all features
                    of AmigaDOS-patternmatching in the search strings.

                    You can set the chars that should be treated as delimiters
                    with 'SETAHVAR NICEHELP "<your delimiter chars>'. Please
                    note that NICEHELP-delimiters should contain SPACE and TAB
                    if possible.
                    Default are: "§\t " (C-String-Syntax)
                    You have to switch NIHEHELP to FALSE, as otherwiese the
                    standard delimiters are used.

    MINDCASE/K      Set this to "TRUE" if you want case sensitive searches
                    (default), or set this to "FALSE" if you want case
                    insensitive searches.

   WILDMINDNOCASE/S Set this to "TRUE" if you want case insensitive search if
                    any wildcard character is in the search string

    XPK/K           Set this to "TRUE" if you want to use xpk-packed autodoc,
                    include etc. files. Look at GETAHVAR for a more detailed
                    description.

    TEMPFILE/K      Sets the filename for temporary created files. Useful if
                    you don't have much memory and you want to generate the
                    temporary files on hard disk. Default is T:adhelp.temp


      RESULT:       RC is set to 0 if no error occured, 5 otherwise

@EndNode




@Node "Structure of the indexfile" "ADHelp.guide/Structure of the indexfile"

Structure of the indexfile

1) header for a .doc-file, includefile etc.:

        §<name of file>                e.g  §autodocs:wb.doc
        <internal name>                     workbench.library


2) definition of a function, define etc.

        <name>                              AddAppIconA
        <byte_offset_start>                 218
        <byte_offset_end>                   4689

If    <byte_offset_end>    is   zero,   filename   <name   of   file>   and
<byte_offset_start>  are  returned.  <name o file> should be loaded and the
cursor should be moved to byte <byte_offset_start>.

If  <byte_offset_end>  is  not zero, the part of the <name of file> between
<byte_offset_start>  and  <byte_offset_end>  is  read  in  and  stored in a
temporary file in T:.  The filename of this temporary file is returned.

Hint:   If the filenames in the indexfile are rather long, it could be more
memory  friendly to make an assign to the directory of the include-files or
.doc-files  and  replace  the  absolute filenames in the indexfile with the
assignes.

On my system I replaced

    §Work:Prg/C/GCC/os-include/devices/audio.h

with

    §os-inc:devices/audio.h

which reduced the memory needed not only for the indexfile but also for the
generated temporary files drastically (from over 600K to 370K for "*")

@EndNode




@Node "Acknowledgements" "ADHelp.guide/Acknowledgements"
@ToC  "Main"

Acknowledgements
----------------

    Stefan Hochmuth    For his wonderful "Event!", very good
                       BETA-Testing, improvement ideas, and
                       GetAsmIncludeIndex (index scanner for
                       assembler include files)


    Alexander Görig    BETA-testing & improvement ideas


    Klaus Wissmann     for BETA-testing & improvement ideas
                       & GoldED-scripts

    My brother for some corrections of my terrible english ;-)

Additional thanks to:

    All the people in the Munich Amiga eXchange Net (MAX) who
    supported me with ideas and hints on programming the Amiga.

    Michael Balzer     for ArexxBox 1.12, I used it to generate
                       the initial ARexx implementation
                       (sorry, Michael, I don't have a "About"-
                        window :-/, and in the shareware reminder
                        window is not enough space :-( )

@EndNode

@Node "Program History" "ADHelp.guide/Program History"
@ToC  "Main"

Version 1.0 (11.6.94)
-----------

- first public release


@EndNode

@Node "Legal stuff" "ADHelp.guide/Legal stuff"

Legal stuff

ADHelp  & additional programs and the related documentation are copyrighted
(C)  by Gerhard Müller.  All rights are reserved.  This evaluation version,
not  the  keyfiles  may  be freely distributed, provided that the following
conditions are met:


The  distributor  may  not  ask  more  money for distributing ADHelp than a
nominal  fee  for  copying and media cost.  This fee may not be higher than
the  cost  of  ordering  an AmigaLibDisk from Fred Fish (except for CDs, of
course).

You may not alter the distribution archive in any way.

However,  you  may  distribute  a  repacked version of the original archive
provided  that  it  contains  all  files  the original distribution archive
contains.

You  may  under no circumstance include ADHelp, its documentation, or other
parts  of the distribution package in a commercial product.  If you want to
do so, please contact the author.

ADHelp  may  be  included  in  any PD disk series without the expressed and
explicit written permission of the author.

You may not disassemble, resource, or otherwise reverse engineer ADHelp.

Permission  to spread ADHelp on bulletin board systems (BBSs) and on public
file  nets is permitted, and highly encouraged, provided that the preceding
conditions are met.


    Warranty

THERE IS NO WARRANTY AT ALL.

This  package is provided for your use at your own risk.  If something goes
wrong,  it`s  your  fault,  not ours.  We provide this material "as is", no
warranties  of any kind are made with respect to the accuracy, reliability,
performance   or  operation  of  this  software  and  information,  neither
expressed  nor  implied.  All use is at your own risk.  The authors are not
responsible  for any loss of data, damages to software or hardware that may
result  directly  or  indirectly  from  the  use  or misuse of the programs
included in this package.

@EndNode



@Node "How to contact the author" "ADHelp.guide/How to contact the author"

    How to contact the author

    Feel free to write registration forms, bugs & comments to

    internet: muellerg@informatik.tu-muenchen.de
    Fido:     Gerhard Mueller % 2:2480/3508.38
    Z-Netz:   GANDALF@AMC.ZER

    or

    Gerhard Müller
    Klarweinstr. 32
    81247 München

    Germany


    I DO prefer email.

@EndNode




@Node "Includes & Autodocs" "ADHelp.guide/Includes & Autodocs"

Includes & Autodocs are available via CATS.  Sorry, I don't have an address
of them in the US.  I don't even know if CATS is still alive in the states.

In Europe Includes & Autodocs are available from:

                Hirsch & Wolf oHG
                Attn: Hans-Helmut Hirsch
                Mittelstr. 33
                D-56564 Neuwied
                Germany

                Fax: ++49-2631-839931
                Tel: ++49-2631-83990
                UUCP:hhhirsch@carla.adsp.sub.org  (Fax preferred)

Ask for "Native Deloper Update 3.1".  This new 5-disk must-have set includes:

    Docs - V40.15 Autodocs, and articles/notes about V38/V39/V40
    Includes & Libs - V40.15 C and assembler include files and linker libs
    Examples1 - General library examples including Locale, plus PCMCIA
    Examples2 - IFF modules and examples, Datatypes, AmigaGuide
    SWToolkit3 - The latest Amiga debugging tools


costs: 50 DM + VAT + shipping

@EndNode




@Node "About ADHelp" "ADHelp.guide/"About ADHelp"



                 Gerhard Müller proudly presents:
                 ================================

         _________   _____     __     __   _______    __        ____
        / _____  /  / __  \\   / /    / /  / ______)  / /       / __ \\
       / /    / /  / /  ) |  / /    / /  / /        / /       / /  | |
      / /____/ /  / /  / /  / /____/ /  / /___     / /       / /__/ /
     / _____/ /  / /  / /  / ____   /  / _____)   / /       / _____/
    / /    / /  / /  / /  / /    / /  / /        / /       / /
   / /    / /  / (__/ /  / /    / /  / /____    / /____   / /
  (_/    (_/  (______/  (_/    (_/  (_______)  (_______) (_/
  _________________________________________________________________
 (________________________________________________________________/

                    ====== Version 1.0 ======

        A help system for all programmers on  Commodore Amiga.
               copyright (C) 1994 by Gerhard Müller
                Shareware, OS 2.0 and higher only

Do  me  a  favour and register ADHelp.  It took many months of hard work to
create  this  program  of  this level of perfection you see in front of you
now.    Read   the   file   "Registration_Form"  for  further  information.
Additionally,  if  you  register  you  get  a  keyfile  which  prevents the
"Shareware reminder"-requester to pop up.

ADHelp does not cost much.  Please send me 15 DM (or US $10) if you want to
get  a  keyfile via email.  I know, email is not so save, but it is cheaper
for  you  and  me, as you don't have to pay for a disk and the postage.  If
you  want  your keyfile not via email, please add DM 5 or US $4, and I will
send you your keyfile with ADHelp on a disk.

Special prices are available for more than one keyfile:

   3             keyfiles ........ 13DM (or $9) each
   4 or 5        keyfiles ........ 11DM (or $8) each
   10 (and more) keyfiles ........ 10DM (or $7) each

If  you want your keyfiles on disk, you of course only have to pay once for
the disk and the postage.

To  register please fill in the @{"registration form" link "Registration Form"} (or file
"Registration_form) and send it to @{"me" link "How to contact the author"} (email prefered).

@EndNode

@Node "Registration Form" "ADHelp.guide/Registration Form"

Send to:

Gerhard Müller                internet: muellerg@informatik.tu-muenchen.de
Klarweinstr. 32               Fido:     Gerhard Mueller % 2:2480/3508.38
81247 München                 Z-Netz:   GANDALF@AMC.ZER

Germany



Dear Gerhard,


I  want to register the ADHelp package.  I have evaluated this
software  package  and  I  think that it is worth registering.
This  is  the  address to which you should send the keyfile as
soon as you receive the money:


Name:              __________________________________

Address:           __________________________________

City:              __________________________________

Country:           __________________________________

Telephone Number:  __________________________________

Telefax Number:    __________________________________

AmigaNet Address:  __________________________________

FidoNet Address:   __________________________________

Z-Net Address:     __________________________________

Internet-Address:  __________________________________


The  following entries can be filled in optionally and will be
used only for your personal statistics:

Computer:          __________________________________

Memory:            __________________________________

Harddisk Capacity: __________________________________

Processor:         __________________________________

Operating System:  __________________________________


 __
|__| The keyfile is sent to me via email (addresses
     see above) (saves money for you!). Please state
     clearly to which email address you want to have
     your keyfile sent! (Internet is safest)

 __
|__| The keyfile is sent to me via normal mail (you
     get a 880KB disk with ADHelp & keyfile). I will
     add DM 5 or US $4 for disk and shipping costs.
     (Safer,  but takes longer and is more expensive
     to me due to the disk and mailing costs).

 __
|__| A cheque over DM 15(+5) (or US $10(+4)) is
     included. (Delivery may take a while)
 __
|__| The payment is enclosed cash.
 __
|__| I let my bank transfer the money to your
     bank account:

      Bank:    Hypo-Bank, München, Germany
      BLZ:     700 200 01
      Account: 3.560.095.782
      Owner:   Gerhard Müller
      Re.:     ADHelp keyfile

I  will  receive  a  keyfile for ADHelp V1.0 that will stop it
from  displaying the shareware reminder.  I know that I am not
allowed to copy my ADHelp keyfile to anyone else.

Following  these  rules  my ADHelp keyfile will also work with
any future releases of ADHelp.

I   know  that  my  personal  data  are stored  and  processed
electronically  as  well as the transfer of the money is at my
own risk if I send cash or a cheque.



___________________________  _______________________
Place, Date                  Signature

                             (not neccesary if sent electronically)

@EndNode


@NODE INDEXNODE "Index"

 Index
 -----

 @{" About ADHelp                  " Link "About ADHelp"}
 @{" Overview                      " Link "Overview"}
 @{" Legal stuff                   " Link "Legal stuff"}
 @{" Installation                  " Link "Installation"}
 @{" Installing ADHelp with GoldED " LINK "Read me before installing ADHelp with GoldED"}
 @{" Introduction                  " Link "Introduction"}
 @{" Acknowledgements              " Link "Acknowledgements"}
 @{" Starting ADHelp               " Link "Starting ADHelp"}
 @{" System requirements           " Link "System requirements"}
 @{" Working with ADHelp           " Link "Working with ADHelp"}
 @{" Some more information         " Link "Some more information"}
 @{" Supported ARexx-commands      " Link "Supported ARexx-commands"}
 @{" detailed installation         " Link "detailed installation"}
 @{" GetAsmIncludeIndex            " LINK "GetAsmIncludeIndex"}
 @{" GetAutodocOffsets             " Link "GetAutodocOffsets"}
 @{" GetIncludeStructsOffsets      " LINK "GetIncludeStructsOffsets"}
 @{" GetSCLibOffsets               " LINK "GetSCLibOffsets"}
 @{" GetManPagesOffsets            " LINK "GetManPagesOffsets"}
 @{" RemoveAnsiFromManpages        " LINK "RemoveAnsiFromManpages"}
 @{" Includes & Autodocs           " Link "Includes & Autodocs"}
 @{" Structure of the indexfile    " Link "Structure of the indexfile"}
 @{" Program history               " Link "Program history"}
 @{" How to contact the author     " Link "How to contact the author"}
 @{" Registration Form             " link "Registration Form"}

@endnode
