;
                                  LBRHLP 
                                Version 2.2

                               May 10, 1992


LBRHLP is a ZCPR3 utility to display Z-System help files.  The targeted 
help files can be members of libraries or stand-alone, compressed or not.  
Two versions of LBRHLP are supplied:  LHC handles GEL crunched files and 
LHQ handles squeezed files.  Either version will handle uncompressed files.



           U  Usage                         E  Errors
           D  Display Details               C  Configuration
           S  Security                      H  History
:U

                                   USAGE 


     LBRHLP {-{dir:}library} {{dir:}hlpfile}


If no DIR or DU specification is given, the current drive and user are 
assumed.  If a library name is given, a leading hyphen ("-") is required.  
If only the name of a help file is given, and that name is preceded by a 
directory specification, LBRHLP searches for a matching stand-alone help 
file.  The directory specification may be in the form D:, U:, DU:, DIR:, or 
a colon alone for the current directory.

The library name and the help file name default to internally configured 
names.  The default filetype for help files is H?P.  If a matching file or 
library is not found in the given or current directory, the configured 
alternate named directory will also be searched.  If no named directory 
with that name is found, the configured alternate drive/user will be 
searched.

USAGE (continued):

Access to stand-alone files can be simplified by use of a simple ARUNZ 
alias:

     HLP  lbrhlp $td1$tu1:$tf1

Via this alias, no directory specification is needed if the help file is in 
the current directory.  Just "HLP filename" will do it.

For easy access to the usage screen, the alias could be expanded:

     HLP  if nu $1;lbrhlp //;else;if eq $1 //;lbrhlp //
               ;else;libhlp $td1$tu1:$tf1;fi;fi

With this alias, "HLP" with no command line parameters bypasses the 
internal file and directory defaults of LBRHLP.
:D

                              DISPLAY DETAILS 

                           HELP System Commands 

From a menu, pressing a letter or number will take you to the appropriate 
information section.

    CR    Display next information screen.  Also returns to the menu from 
          the end of an information section.
   Space  Next screen (same as CR).
     L    Return to previous information screen.
     S    Return to start of current information section.
     M    Return to previous menu.
     ,    Return to menu for previous level.
     ^    Return to previous level (same as ",").
     .    Return to root (main) menu (level 0).
     P    Send current screen to printer.
    ^P    Send current information section to printer.
    ESC   Exit HELP system.
    ^C    Exit (same as ESC).

DISPLAY DETAILS (continued):

                            Navigation Markers 

The current level in the HELP system hierarchy is displayed in the lower- 
left corner of the screen (except at the root level, level 0).  While in 
information sections, the current screen number is also displayed.

For example:

      1:       Screen 1 of level 0 information section.

   Level 2     Level 2 menu screen.

   Level 1/2   Screen 2 of a level 1 information section.

The last screen of an information section will have the initials "EOI" (end 
of information) immediately preceding the level and screen numbers.
:S

                                 SECURITY 

For remote access systems, security is assured by using the directory 
specification as parsed by the command processor, or the internally 
configured alternate directory.

In addition, the printer cannot be accessed unless the wheel byte is set.  
Non-wheels do not even see the "P" option displayed.
:E

                                  ERRORS 

The ZCPR3 program error flag is set to FFh for most errors, including the 
following:

     File not found.
     Ambiguous filename.
     Help file level limit (25) reached.
     Memory overflow (help file too large).*
     Unsupported filetype (middle character not "L", "Z", or "Q").
     Uncrunch errors, such as invalid crunched file (LHC only).
     Unsqueeze errors, such as unexpected end-of-file (LHQ only).

*LBRHLP can handle larger files if they are already uncompressed.
:C

                               CONFIGURATION 

Several configuration options are available:

     Alternate named directory to search (as distributed: HELP)
     Alternate drive and user to search (as distributed: A15)
     Default library name (as distributed: HLPFILES)
     Default help file name (as distributed: MENU)
     Library filetype (as distributed: LBR)
     Help file filetype (as distributed: H?P)
     Check BIOS for "printer ready" before accessing printer

Configuration changes are made with ZCNFG and the accompanying LBRHLPnn.CFG 
file.  If the name of the configuration file is not changed, ZCNFG will 
always be able to find it, even if the names LHC or LHQ are changed to 
something else, such as HELP or LBRHLP.  Full explanations for the various 
configuration options are available on the ZCNFG help screens.
:H

                                  HISTORY 

Version: 2.2 (05/10/92 by Gene Pizzetta)
     My main gripe about the HELP interface was that two hands were 
     required to exit (^C) and to go up a level (^).  These commands still 
     work, but I have added alternates: ESC to exit and a comma to go up a 
     level.  I thought the comma was a logical choice, since the period is 
     used to go to the root level.  To ease maintenance I have consolidated 
     into the main module all the library routines except the decompression 
     modules, which are conditionally loaded and have been renamed LH- 
     UNCR.LIB and LH-UNSQ.LIB.  The consolidated main module has been 
     renamed LBRHLPnn.Z80.  The environment address is now set to 00h, 
     which might be important when dropping out of NZCOM.  I also replaced 
     the PRTNAME routine with the smaller and more reliable GCOMNAM routine 
     from ZSLIB.  The method of decompression the program uses is now 
     identified on the usage screen, which was heavily modified to save a 
     few bytes.  As a result, LHC is (barely) under 5K.  Video highlighting 
     added to CFG file.

Version: 2.1 (02/21/92 by Bruce Morgen)
     Major update that allows LBRHLP to access stand-alone help files if no 
     library is specified and a directory specification is prepended to the 
     helpfile name.  VLIB references have been deleted in favor of shorter 
     ZSLIB calls and although the program is slightly larger its buffer 
     address is the same as v2.0 -- in other words, any crunched help file 
     that the previous LHC.COM could use can be read by the new one. 
     Production has been simplified: it is no longer necessary to specify 
     the buffer address at assembly time due to modifications made to the 
     uncrunch and unsqueeze code (LBRHLP5.LIB/LBRHLP6.LIB). With minimal 
     ALIAS/ARUNZ support, LBRHLP can now replace HELPC and HELP5x as well 
     as LHELP.  Howard Goldstein provided extensive coaching and did a 
     final bug-squishing/display-refining code tune-up as well as revising 
     the .CFG file.  As usual, Howard's assistance was invaluable and very 
     much appreciated.

Version: 2.0 (09/16/91 by Howard Goldstein)
     Modified the clear screen routine to print a CRLF if the CLS function 
     is not available, e.g., no TCAP loaded.  Thanks to Al Hawley for 
     suggesting this change.  Made CIN routine public.

Version: 1.9 (08/07/91 by Howard Goldstein)
     Fixed a navigation problem discovered by Gene Pizzetta.  The M command 
     would not return to the menu if the menu was in a higher level file.  
     Also added code to cause the program to exit if not running under Z- 
     System and fixed a potential problem in the unsqueeze routine.

Version: 1.8 (02/20/91 by Terry Hazen)
     Added printer-ready test and configuration byte so it can be turned 
     off using ZCNFG.  Added .request line for libraries.

Version: 1.7 (02/08/91 by Howard Goldstein)
     Modified file loading routines to clear the high bit on all 
     characters.  This enables LBRHLP to work correctly with files created 
     in Wordstar Document Mode.  Added wheel byte control of print options. 
     Made a few changes to the built-in help message.  The two COM files in 
     this LBR can be configured using ZCNFG and THE CFG file which is also 
     contained here.

Version: 1.6 (08/27/90 by Howard Goldstein)
     Fixed an initialization problem in the uncrunch routine.  This problem 
     didn't manifest itself very often, but when it did the results were 
     strange indeed!  Thanks to Carson Wilson for bringing it to my 
     attention.  This version was linked with the latest test version of 
     the libraries, 4.3.

Version: 1.5 (06/20/90 by Howard Goldstein)
     Fixed a problem that caused the program to search the wrong drive for 
     the help library under certain conditions.

Version: 1.4 (06/18/90 by Howard Goldstein)
     Improved buffer allocation.  Uncrunched files in libraries may now be 
     24k larger than previously.  (If a crunched file is too large for the 
     program, put it in the LBR uncrunched.) A colon, (:), is no longer 
     dispayed at the beginning of each info section in help-inexed files.  
     Terminal de-init routine now called on program exit.  Print routines 
     improved:  tabs expanded; stack bug fixed.  Screen-full logic 
     improved.  Can now handle one more line per screen.  Lines per screen 
     and lines per page now obtained from environment.  Built-in usage 
     message reflects patchable values for file names, etc.  Linked with 
     latest versions of libraries.

Version: 1.3 (02-13-88)
     Fixed a CtrlC bug, still sets error flag on errors and resets error 
     flag when you type ctrlc.

Version: 1.2 (02-10-88)
     Renamed file to LHC (the 'C' stands for cruncehed files).  Fixed a bug 
     that was introduced in ver 1.1 also created a file that will unsqueeze 
     library files, (this is similar to lhelp), but has more versatility.  
     The name is LHQ.COM (the 'Q' stands for squeezed files).

     I will be soon releasing a new help file one that handles crunched 
     files, this will be based on HELP53.

Version: 1.1
     Program now sets the error flag on most errors, so that a different 
     program can be called.

Version: 1.0
Program: LBRHLP
Author:  Bob Peddicord
Date:    02-06-88

This program derives from the use of Help53 by R. Conn.  I also want to 
thank Steve Greenburg for his uncrunch routines.

I along with alot of other people have been tired of not being able to use 
crunched files in help library's.

Lbrhlp can only be used with crunched files (sorry no squeezed) this is due 
to trying to keep the code size down, uncrunch uses 22k of buffer space. 
This leaves about 25k+ for files, so there are a few help files that cannot 
be used with this program.  The only way that I can figure to use bigger 
files with this would be to write the file to disk and then read it back 
in. This in itself, in my opinion would be to time consuming, and would not 
be good for Remote Bulletin Boards.

The default LBR name is HLPFILES
The default DIR name is HELP
The default DU is A15
The default filename is MENU

These  can  be  changed with Zpatch, patch  or  some  other  file editor.

The Locations are:
DIR - 116h (HELP)
DU  - 11Eh (disk) 0=A, 1=B etc.
DU  - 11Fh (user)
FILE  120h (MENU)
LBR - 128h (HLPFILES)

The program allows you to specify a different Library and or help file from 
the command line.

Example 1:
     lbrhlp -c15:special syslib
With this example we told the program that we wanted a different library on 
c15 and a help file called syslib.  The (-) must precede the drive/user or 
library name, if the default D/U is wanted.

Example 2:
     lbrhlp syslib
With this we told the program that we wanted the default LBR with the 
filename syslib.

Example 3:
     lbrhlp -helps
With this we are specifing just the library, using the default DU/DIR and 
default filename.

Any and all comments and or suggestions would be appreciated.  Please leave 
them on my system ZNODE #60 or Z-CENTRAL or LILLIPUTE #1 for I call them a 
couple of times a month.
