/*****************************************************************************/
/*                                                                           */
/*                                                                           */
/*              XXXX   XXXXX   XXX   XXXXX   XXX   XXXX   XXXXX              */
/*              X   X  X      X   X    X    X   X  X   X  X                  */
/*              X   X  X      X        X    X   X  X   X  X                  */
/*              XXXX   XXX     XXX     X    X   X  XXXX   XXX                */
/*              X X    X          X    X    X   X  X X    X                  */
/*              X  X   X      X   X    X    X   X  X  X   X                  */
/*              X   X  XXXXX   XXX     X     XXX   X   X  XXXXX              */
/*                                                                           */
/*                                                                           */
/*                 Restore Master Roll from Production Roll                  */
/*                         Program by Wayne Stahnke                          */
/*                                                                           */
/*****************************************************************************/

/*  Given a reduced scan of a production music roll this program restores the
    master roll from which it was created. It is invoked by a command line of
    the form:

            RESTORE [arg1 [arg2 [arg3 [...]]]]

    where the command line arguments may be filenames (with or without paths
    and with or without extensions) or keywords.

    The first filename (which must be present) specifies the source file; its
    extension defaults to ".raw" if not provided.  When a second filename is
    present it specifies the target file; its extension defaults to ".web" if
    not provided.  If the second filename is omitted, the source filename is
    the default target filename.

    The annotation filename and extension default to the source filename and
    ".ann" respectively.  Either or both of these defaults may be overridden
    by explicitly giving the desired annotation filename and extension.  The
    syntax is as follows:

            /ann:<filename>[.<extension>].

    Similarly, the log filename and extension default to the source filename
    and ".log" respectively.  These defaults may be overridden by explicitly
    giving the log filname and extension, as follows:

            /log:<filename>[.<extension>],

    and consequently all four relevant filenames and extensions are under the
    control of the operator.  Here is a complete list of the keywords that are
    supported:

    Syntax              Function                         Argument
    -------------------------------------------------------------------------
    /ann:<string>       override annotation filename     filename/extension
    /log:<string>       override log filename            filename/extension

    /m:<real>           override default margin          minimum margin, rows
    /ps:<real>          accommodate paper slip           paper slip, rows
    /s:<integer>        override default slot length     slot length, rows
    /w:<real>           override default weighting       weighting factor
    /x:<integer>        exclude specified port           excluded port number

    The keywords are not normally used for a well-made roll in good condition.
    For exceptional rolls, the keywords that are most often used are "/ps" for
    rolls with an irregular punch advance, and "/x" to ignore falsely placed
    holes, inserted by hand or caused by tears in the paper.  The "/x" keyword
    may be present more than once in a command line, allowing multiple ports
    to be excluded. */

/*****************************************************************************/