[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

3761.0. "CONSOLE BUFFER (finally!)" by WJG::GUINEAU () Tue May 08 1990 17:09

WJG::AMIGA:CB.LZH

gives Shell/CLi windows a scroll bar and lots of previous screens saved... just
like a *real* workstation :-)

the docs:


                        Console Buffer by
                        William J. Fritz
                        4504 E. Yates Rd.
                        Bensalem, Pa. 19020
                        215-245-1584


CONDITIONS FOR USE AND DISTRIBUTION:

   CB is Copyright (c) 1990 by William J. Fritz

   CB is a copyrighted program that is provided "as is". There is no
warranty, either expressed or implied, as to the quality or usefullness
of the program. The user of the program accepts all risks associated with
it's use.

   CB is freely distributable provided:

   1. The files are all left intact.
   
   2. No charge is made for CB (other than a reasonable copy charge of $6.00
      or less)
   
   3. CB is not packaged as a part of a commercial product.

   4. CB may not be uploaded to any electronic service that claims
      a copyright to it's files and programs.

DESCRIPTION:

   Console Buffer is for CLI users who would like to have a history
and/or hardcopy (either file or device) of their console input and output.
It works with both CLI and shell windows. Console I/O is saved in a
buffer, the size of which is set by the user. The default buffer size is
100 lines.

   When the program is started a  proportional gadget is attached to the
console window that can be used to scroll through the console I/O just as
you would use a word processor vertical scroll gadget.

   The Console Buffer program consists of two modules.

   CB -              CB loads CB-handler if it is not loaded and
                     interprets the command line arguments. If CB-handler
                     is present the current status is reported.

   CB-handler -      CB-handler monitors the console that CB was started
                     from, builds the buffer in memory and displays the
                     buffer data. This module must be placed in either the
                     current directory or the L: directory of the system
                     disk in order for CB to find it.

CLI Argument Help:

   For command line argument help type <CB ?>.

START:

   To start CB type <CB> at the console you wish to monitor--this will
use the default of 100 lines. Do not "run" the program. (e.g. "run CB"). If
you wish another number of lines saved open with <CB -l###>, ### being the
number of lines to save. For a hard-copy of the Console I/O start with
<CB -hname>, the name being either a file name or device name. (e.g.<CB -hPRT:>
to have the printer as the hardcopy device)
   The -o, -q and -r options to output buffer, quit and reset cannot be used
at Console Buffer startup as they pertain to a currently active buffer only.

DISPLAY:

   To display the buffer click on the proportional gadget in the right
border of the console window. The title line of the console window will
be changed to indicate display mode is active.

   While in display mode use either the prop gadget or the up and down
arrow keys to view the buffer.

   up-arrow                scroll down one line
   down-arrow              scroll up one line
   shift-up-arrow          scroll down one window frame
   shift-down-arrow        scroll up one window frame
   control-up-arrow        scroll to top of buffer
   control-down-arrow      scroll to bottom of buffer

   Single line scrolling is also possible by clicking and holding the mouse
within the display window. The area that the mouse pointer occupies determines
the speed and direction of scrolling. The window is divided into five horizontal
zones of equal size. The center zone does no scrolling. The next zone out from
the center gives a slow scroll. If the pointer above the center zone you will
scroll down, if below you will scroll up. The top and bottom zones are for
fast scrolling.

   Scrolling up or down by a window frame will be inaccurate if any lines
within the displayed window frame contain more characters than can fit on
a single  window line. When the cursor reaches the right edge of the window
an automatic line feed is performed and the buffer line continues on the
following window line. The problem is that this is still considered the
same line to the program. Each time an automatic line feed is done the window
frame scroll will go one line too far and the top line in the window frame
will be scrolled off the display. If your buffer contains lines longer than
the console window use the single line scroll instead of the window frame
scroll.

   If another program sends something to the console window while in display
mode it will be suspended until you return from display mode. While in display
mode all keys will be ignored except for the arrow keys and the <q> key.

   To quit display mode and return to the normal console window enter a
<q> from the keyboard. The windows original title will re-appear.

COMMAND LINE OPTIONS:

   The command lines listed below facilitate:
      1. Setting the maximum number of lines to keep in memory.
      2. Specifying a hardcopy device or file for a permanent record of
         console IO.
      3. Setting the update frequency for the hardcopy device or file.
      4. Including time stamps on console prompts in the buffer data.
      5. Reseting the buffer - releasing the current data from memory.
      6. Sending the currently buffered data to a device or file.
      7. Exiting the Console Buffer program.

   The first time CB is called a buffer is started and whatever command
line options are specified are activated. After the buffer is started you
may alter any of these options by calling CB again with whatever changes
you desire on the command line. Only the options on the command line will
be changed.

   For example: if you are using a hardcopy and wish to delete it enter
<CB -h>, the lack of a name after the <h> switch will cause no hardcopy to
be used. Any remaining lines in the buffer that have not been copied to the
hardcopy will be flushed.

   SET MAX LINES:  <CB -l200>

      The -l option sets the maximum number of lines to keep in memory. If the
   number of lines is set after the program has been running and is lower than
   that being currently buffered by the program, excess lines in the buffer
   will be discarded.

      The above example would set the maximum number of lines that the buffer
   will hold at 200. At the 201st line the first line that went into the buffer
   would be discarded and the 201st line entered at the end.

      If you are using the hardcopy option the maximum number of lines that the
   buffer will hold must be set higher than the hardcopy update value. If you
   try to set it lower an error message will appear and the -l option will not
   be done.

   HARDCOPY:   <CB -hPRT: -u25>

      The -h option (hardcopy) allows you to make a permanent record of the
   console I/O. The buffer data can be directed to any AmigaDOS device or file.

      The format of the command line is <CB -hname> where name if the name of
   the file or device that you wish to receive the hardcopy data. Note that
   there must be no intervening spaces between the <h> and the <name>.

      The above example would send the hardcopy data to the printer, writing
   to the printer only after 25 lines have been accumulated, then sending
   all 25 lines.

      Care should be used with this option as using the printer for hardcopy
   will significantly slow down the console I/O, specifying a floppy disk file
   will require that disk be installed all the time the buffer is running.
   Having a hardcopy does not preclude the use of the buffer.

      The -u option (update) specifies the frequency of hardcopy access. For
   safety the hardcopy is opened and closed each time data is sent to it.
   Doing this can perceptibly slow down the console. Using the update command
   line option you can set the update value for writing to the hardcopy device
   or file. This value specifies the number of lines to accumulate in the
   buffer before sending them to the hardcopy. The update value, which
   defaults to 10 lines, must be less than the maximum number of lines to
   buffer.

   TIME STAMP:

      The -t option will mark all prompt lines in the buffer with the time that
   the command is entered. The time is in military format. This time stamp will
   only be in the buffer, not on the CLI display.
   
   RESET BUFFER:

      The -r option (reset buffer) releases all the lines currently being held
   in memory. Using the -r option does not change the maximum number of lines
   that the buffer can hold. This option is only valid on a running Console
   Buffer, it can not be specified at start-up.
   
   OUTPUT BUFFER:

      The -o option (output buffer) dumps all of the lines currently being held
   in memory to the specified file or device. The format is <CB -oname> where
   name if the file or device you wish to receive the data. Note that there
   must be no intervening spaces between the <o> and the <name>.
      This option only pertains to a running Console Buffer and cannot be
   specified on program start-up.

   QUIT:

      To quit and recover memory used by the buffer, type <CB -q>. If this
   hangs do to an error in the conbuf-handler module you can exit with a
   Control-C. Ending the CLI that the buffer is attached to will automatically
   end that Console Buffer, recovering all memory used.

MEMORY REQUIREMENTS:

   After the program is started the storage used is approximately 9 K, plus
the lines buffered. Each line buffered uses the size of the line plus eight
bytes. Running the program with a 100 line buffer will use about 14K of
storage. Using a 500 line buffer will require about 28K.

COMMENTS:

   Any comments, constructive criticism or useful additions to the program
may be directed to me at the above address or on GEnie mail address W.FRITZ1


T.RTitleUserPersonal
Name
DateLines