                    BLAND - A WordStar 4/5 Utility
            To Remove The Information Content Of A Document


                           Version 1.3
                          April 17, 1989
            

        Copyright (C) 1989 by G Systems.  All rights reserved.

           Direct inquiries and comments to Gary M. Gibson,
                     Compuserve UID 76616,3643


-----------

NOTE: This program and its supporting documentation, while protected
by copyright, is freely available to be used at no charge to anyone who
is a licensed user of MicroPro's WordStar 4.0, 5.0, or 5.5.

-----------


BLAND is a WordStar 4/5 support utility to "blandify" documents. A
blandified document is one where the information content has been
reduced to near zero while retaining all the font, line format, page
format, footnote, note, dot command, etc. information intact.  BLAND
also has the ability to blandify an ASCII text file.

Why blandify a document? Well, suppose you are working on a report that
is confidential, but you are having trouble with it.  In conversations
with MicroPro, it appears as though your problem may be caused by a bug
in WordStar. Normally, the best thing to do would be to send the
document to MicroPro so they can examine it and find the bug, if one
exists, or tell you what you did wrong.

Unfortunately, you cannot send the document (it's confidential,
remember?) so you have to try to recreate the problem using another
document; one that you can send to MicroPro. Alas, this is often
unsuccessful for many reasons.  What you'd like to do is retain the
exact structure of your original document (fonts, footnotes, dot
commands, etc.) but scramble the text so no one can understand it.
In other words, remove the sensitive meaning and render the document
bland enough for MicroPro's eyes. But to do that by hand for even a
short document is unrealistic.

Enter BLAND.

Bland gives you two ways to create a bland version of a WordStar 5
document. Both ways reduce the information content to near zero.  The
difference is only in how the document's text appears after blandifying
is complete.

The first, or "scramble", method, replaces lower case letters, upper
case letters, and digits, with a repeating series of corresponding
letters or digits without regard for the actual letter or digit being
translated. In other words, the first lower case letter might become an
"a", the second lower case letter a "b", and so forth.  This is the
default method.

The second, or "X", method, replaces all lower case letters with "x",
all upper case letters with "X", and all digits with "9".  This method
must be requested by the /X option on the BLAND command line.

Either method cannot be reversed.  A blandified document CANNOT be
reversed back into its original text.  This is simply because (in
the language of cryptography) the bland output is created from the
input using a "one time pad."  There is absolutely no statistical
correlation between input letters and digits and the output letters
and digits assigned by BLAND.

For those who really care, some information content remains. Upper
and lower case letters can be distinguished, as can digits.  Word
lengths and sentence structure can also be determined. Some additional
information might be obtained from noting the use (if any) of fonts,
footnotes, columns, etc.  In other words, any information which is
obtainable from the physical layout of the document is preserved by
BLAND (indeed, that's its whole purpose.)  It's meaning is totally
gone, however.

When "scramble" blandifying is used, you may notice that the same or
a similar letter pattern repeats often throughout the document. This
pattern bears absolutely no relationship to the original characters
in the document.  The original "plaintext" cannot be regenerated from
a blandified document regardless of the blandify method used.

To execute BLAND, use the command:

    BLAND [options] input [output]

The options, if specified, must begin with a slash (/) or a dash (-)
and be separated by at least one blank.  Available options are as
follows:

    /4      Blandify only WordStar 4 files.
    /5      Blandify only WordStar 5 files. This is the default.
    /A      Blandify only ASCII files.
    /X      Select the "X" method of blandifying.

The 'input' parameter may be a single file specification (including
drive, path, and extension if required), or it may use a wildcard
specification in the filename or extension part.  If a single filename
(no wildcard characters) is specified, an 'output' file
specification may be given.  If no output file is specified,
BLAND uses the input file name with an extension of '.BLD'.  If
an output file is specified, but no '.' appears, BLAND will also
use an extension of '.BLD'.

If the 'input' parameter uses wildcard character(s), no 'output'
parameter can be specified.  BLAND writes its output using the name of
each input file with an extenion of .BLD.

BLAND checks the file format against the type selected (or WordStar 5 as
a default.)  BLAND will skip any files which are not in the correct
format.  Therefore, all WordStar 5 documents in a directory could be
blandified by the command:

        bland *.*

BLAND never alters its input file.  Your original WordStar document
remains intact.  BLAND simply makes a bland copy of it.  BLAND will
also never blandify a file with one of the following extensions:

    .COM, .EXE, .OBJ, .OVR, .ARC, .ZIP, or .BLD

During a WordStar 4 or WordStar 5 blandify process, most dot commands
are retained as-is in the output file.  The exceptions are those which
contain some information which might indicate the meaning or purpose of
the document.  These are:

    Heading commands:       .HE, .H1, .H2, .H3
    Footing commands:       .FO, .F1, .F2, .F3
    Comments:               .IG, and ..
    Index entries:          .IX
    Table of contents:      .TC

For these, the dot command name remains intact, but all text is
scrambled except for .TC commands where the first non-blank after the
command name is a dot, when it is assumed to be an imbedded dot command
and treated accordingly.  That is,

    .TC .HE Redefine heading

would be "X" blandified to look like:

    .TC .HE Xxxxxxxx xxxxxxx

but

    .TC .AW OFF

would not be altered.

One consequence of this is that indexing related problems will probably
not be able to be demonstrated on a blandified document. Embedded index
entries (created by ^ONI) are also blandified, of course. If there's
enough interest in doing so, a future BLAND version may offer an option
to pass index entries through as-is.

Furthermore, problems involving spelling checks and/or the thesaurus
will obviously not benefit from BLAND's ministrations.

There are three dot commands which are not blandified, although they
could be.  These are:

    .AV, .CS, and .DM

Because these involve a dialogue with the user during print, they
were left intact although some information about the document may
be discernable from them.  Again, if enough interest exists, a future
BLAND may allow these to be optionally blandified, as well.

Finally, blandifying a WordStar 5 document which uses proportionally
spaced fonts may result in the blandified document appearing
mis-formatted when it is printed.  This is because the character
substitution will change the character widths on the line. You may need
to enter a ^QU (global reformat) command before printing, and this may
alter or mask the nature of the problem.  Due to the purpose of BLAND,
this situation cannot be avoided.  This problem will not occur if fixed
spacing fonts are used.


Blandifying Wordstar 4 Files
============================

Files created by WordStar 4 cannot be recognized as WordStar 4 files
using any simple set of heuristics such as is possible for WordStar 5
files.  Consequently, BLAND senses a WordStar file by checking to ensure
it is not a WordStar 5 file, and that it starts with a dot command
(a ".." style dot command comment will suffice.)

If a single file is being blandified, the /4 option (WordStar 4) has
been specified, and the file does not start with a dot command, BLAND
will ask you if it's OK to proceed, as in:

    TEST.FILE does not look like a WordStar 4 file.
    Accept as WordStar 4 file? [Y/n]:

Entering a "Y" (case doesn't matter) or just pressing Return will accept
the file as a WordStar 4 file, an "N" response (either case) will reject
the file.  Any other character will repeat the question.


Using BLAND
===========

If you are having a problem with a document, and you suspect it's a
WordStar problem, try running the document through BLAND. Then see if
you can recreate the problem with the blandifed version.  If so,
you can then send the blandified document to MicroPro to aid them in
finding the problem without worrying that you are sending anyone's
secrets along with it.


BLAND RELEASE LOG
=================

1.3     17 April 1989 - First general release

        1. Added message to ask user for "go ahead" if blandifying a
           single WordStar 4 file (/4 option) which doesn't appear to be
           a WordStar 4 file.

1.2a    15 April 1989 - Bug fix; limited release

        1. Changed WordStar 4 format sensing to not check for soft CR's
           but just ensure that 1st line looks like a dot command.  Test
           was failing if all lines ended with a hard CR, as seemed to
           happen.

1.2     14 April 1989 - Expansion of scope; limited release.

        1. Added support for blandifying ASCII and WordStar 4 files.

        2. Added options /4, /5, and /A to select file types to be
           blandified.

        3. Added diagnostic if no files were selected.

        4. Changed the "Blandifying" message to indicate the file type.

        5. Removed the "Skipping" message.

        6. Changed so WordStar 4/5 letters and digits preserve the
           high order bit when being blandified.


1.1     11 April 1989 - Minor enhancements.

        1. Fixed bug which was blandifying .TC text even if the text was
           itself a dot command.

        2. Updated documentation to note that BLAND is no help with
           spelling and/or thesaurus problems.

        3. Added display of output file name and extension to the
           "Blandifying" console message.


1.0     10 April, 1989 - Initial release for limited distribution on
        CompuServe's WordStar Forum.

