


!
1 TABBER
! General purpose tab adder/deleter
!
TABBER is a general-purpose  tool  designed  to  facilitate  the
addition  or  deletion  of  tabs in text files.  TABBER is quite
versatile and can handle tabs set in any position, not just  the
standard  one  tab  per eight space default.  In addition TABBER
can be used to optimally set the tab stops in a file to minimize
print time on a tab-supporting terminal.
2 Author
TABBER was written by Ned Freed of the OMNIGRAPH  project.   The
optimal  tab selection algorithm is due to Peterson, Bitner, and
Howard, CACM Vol.  21 No.  12.  Some of the tab code is  loosely
based  on  that of Kernighan and Plaugher in their book Software
Tools.  TABBER  is  supplied  and  supported  by  the  OMNIGRAPH
project  (where  all  good things happen).  Any problems with or
questions about TABBER should be reported by MAIL to OMNIGRAPH.
2 Execution
TABBER can be executed by typing:

        $ R TOOLS:TABBER

TABBER  will  then  prompt  for  command  input.   The  commands
available  are described in the section on commands.  The source
to TABBER is the file:

        DEV:[OMNIGRAPH.UTILITY]TABBER.FOR
2 Concepts
It  is  important  to  understand  some  basic  concepts  before
attempting  to  use TABBER.  First of all, TABBER is primarily a
file processor.  This means that it  reads  an  input  file  and
writes  an  output file.  In between, TABBER can do various nice
conversions for you.

TABBER thinks of tabs in much the same way as they appear  on  a
typewriter.   Each character position across the page may or may
not be a tab stop.  A tab at a  given  position  will  move  the
carriage  to  the  next  tab  stop  that  is set.  There are two
different sets of tab stops in TABBER, one for input and one for
output.  There are commands to set the stops in both sets.

In addition to pure conversion work,  TABBER  contains  code  to
read  a file and select optimum tab stops for that file in order
to minimize total character count.

The default setting for TABBER on startup is for the usual  tabs
set once every eight characters on both input and output.  It is
important to note that this may be easily changed and  that  the
input and output stops can be quite different.
2 Commands
TABBER has quite a variety of commands,  all  of  which  can  be
abbreviated  to  two  characters.   TABBER  signifies that it is
ready for another command by typing "Command:" on the  terminal.
Only  the  command  name  should be input to this prompt, TABBER
will ask for any arguments later.

The most basic commands are to  specify  the  input  and  output
files.   To  specify the input file, type "INPUT" to the command
prompt.  TABBER will then ask for the file name.   This  may  be
any  legal  VAX/VMS  filespec.  The output file is specified via
the "OUTPUT" command in  the  same  fashion.   TABBER  will  not
permit any commands that do file I/O until the needed files have
been specified.

TABBER's has three basic commands that do  actual  work.   These
are  ENTAB,  BENTA, and DETAB.  ENTAB directs TABBER to read the
input file line by line, remove all the tabs from a  given  line
according  to  the tab stops set for input (spaces are placed in
the line instead), and then add tabs to minimize the  number  of
characters  using  the  output settings as a guide.  This is the
fundamental operation of TABBER.

DETAB is very similiar except it  is  assumed  that  the  output
media  has no tab capability.  Thus all tabs are removed but new
tabs are put back in the line.

BENTA  is  identical  to  ENTAB  except  that  tabs   are   only
substituted  at  the beginning of lines.  Spaces imbedded in the
line will not be converted.   This  is  primarily  intended  for
Pascal programs.

There is a whole family of commands to set the tab stops.  These
are best summarized in a table:

     IWIPE - Wipe out all stops set for input.
     OWIPE - Wipe out all stops set for output.
     ICLEA - Clear a specific stop for input. TABBER will then
             prompt for the column to clear.
     OCLEA - Clear a specific stop for output. Same as ICLEA.
     IREG  - Set stops at regular intervals for input. TABBER
             will ask for the interval.
     OREG  - Same as IREG, but for output.
     ISET  - Set a specific tab stop for input.
     OSET  - Set a specific tab stop for output.

These set commands should be versatile  enough  for  most  work.
However, TABBER does contain a facility to select the output tab
settings by reading a file and choosing  the  optimal  stops  to
minimize  output.   This  is  only useful when an extremely long
file  is  being  printed  on  a  slow  terminal  with  tab  stop
capability.   To  use  this,  select  an  input file and use the
command "OPTIM".  This will read the file and select the  output
tab stops optimally.

TABBER may be exited at any time either via the EXIT command  or
by typing Control-Z to any prompt.
