How to run the STACK program:

Here's how STACK works.  It runs (right now) on a PC.  It uses Gene
Stark's individual HTMLs as input, and it uses them right out of his
Dxxxxxxx directories.  Since my PEDIGREE program produces output into
the same directory structure, the program can use these pedigree HTMLs
as input too.  It must be executed from the directory that contains
the Dxxxxxxx sub-directories (same as PEDIGREE.)

I decided that since we would end up with fewer files, I would put them
all into just one directory.  So the program creates a directory HTMFILES
and builds the resulting files there.  A new INDEX file (INDEX.html) is
also produced and put in this same HTMFILES directory.  Thus none of the
input files, including the original INDEX, are disturbed.  The program
is named STACK.EXE.

There is an input parameter to STACK which is a maximum byte size.
Individual HTMLs are stacked so the new file sizes are equal to or less
than byte size bytes.  The default is 4096 bytes.  So if you just say
STACK, it runs with 4096.  If you say STACK 8192, it uses 8192, etc.
If an individual HTML file is bigger than byte size, then this
file is just copied to a new file by itself.  So in this case it is
possible to get an output file bigger than byte size.  (So if you
have lots of text on aunt Maude and her file is 5000 bytes, she won't
store as efficiently.  Oh well.)  On the other hand, if you run with a
really big byte size, you will end up with your whole database
in one big file.

----------------------------------------------------------------

Here is a brief summary of the operation of STACK:

1)  Check for valid input parameter or set default to 4096.
2)  Build a set of "normalized" files with .HTN extensions in the Dxxxxxxx
    directories.  These files have all ../Dxxxxxxx/Iyy.html references
    changed to Fxxxx.html#Iyy.  Also added at the top of the file is
    <A NAME="Iyy">, and a separater <HR> is put at the bottom of the file.
    These files are now exactly the size they will be when stacked.
3)  Go through and get the file size of each of these new .HTN files and
    save them in a table.
4)  Make new file assignments.  This is done by starting at the beginning
    and totaling the size until it gets over byte size, then making a new
    file out of all but the one that put it over.  Also, a search is made
    through all the rest of the .HTN files to see if another slightly
    smaller file can be used.  Not too complex, but it does a really nice
    job.  This could be a VERY difficult problem, but not worth making it
    into one just to improve a few Kbytes overall.
5)  Write the new files in the HTMFILES directory.  The new files start
    with "F".  So files are F0001.htm, F0002.htm, etc.  Note I only use
    four digits in the names, so I'm limited to 9999 files.  Included in
    this step is the task of calculating all the new links and changing
    all the Fxxxx.html#Iyy references to their actual values.
6)  Create a new INDEX file with all the proper links.
7)  Build a new FILES.LST file in the HTMFILES directory which is simply
    a list of files created.  This can be used by the TAR program (same
    as with PEDIGREE.)
8)  Delete all the normalized (.HTN) files.

A couple other notes.  First, since your entire database is recopied into
the .HTN files, you need enough disc space for this as well as your new
output files.  So you need about 2 * database size discspace available.
If you rerun the program, it will automatically clean out the HTMFILES
directory of any "old" files so you don't need to worry about that.  Also,
there isn't any I/O checking built into STACK, so if you have a problem
like running out of disc space, the program will just crash with an I/O
error.
