#define _ISOC99_SOURCE
#include <stdio.h>
void usage( void )
{
    const char **p;
    static const char *help[] = {
                       "COSET is a program which performs left coset decompositions of",
                       "a metrically available supergroup pointgroup symmetry by the",
                       "point symmetry of a crystal in which (pseudo)merohedral twinning",
                       "is present.  The algorithms used in this program are described",
                       "in Howard Flack's paper: Acta Cryst. (1987), A43, 564-568.",
                       "",
                       "The usage is as follows:",
                       "",
                       "On the command line, type:",
                       "",
                       "coset <input_filename>",
                       "",
                       "where <input_filename> is the name of a plaintext file which contains",
                       "a number of directives and parameters used to govern the execution of",
                       "the program.  The program can process a number of coset analyses in a",
                       "given execution, which are designated as 'tasks'.  The directive and",
                       "parameters formats are:",
                       "",
                       "TITLE <character string data>  [mandatory]",
                       "ALGORITHM   <single character> [mandatory]",
                       "SUPERGROUP  <character string data> [mandatory]",
                       "SUBGROUP  <character string> < integer> [mandatory]",
                       "RMAT  r11 r12 r13 r21 r22 r23 r31 f32 r33 [mandatory]",
                       "TRANS t11 t12 t13 t21 t22 t23 t31 t32 t33 [optional]",
                       "INSFILE  <character string data> [optional but needs TRANS]",
                       "OUTFILE  <character string data> [optional]",
                       "NEWINS   <character string data> [optional but needs INSFILE and TRANS]",
                       "EXEC     <character string data> [optional but needs TRANS and NEWINS]",
                       "END     ",
                       "",
                       "The '#' character at the beginning of a line designates a comment and",
                       "is ignored by the program.",
                       "",
                       "Explanation of input directives and parameters:",
                       "* TITLE  must be the first directive for a given task.  The parameter",
                       "  for the this directive is a short description of less than 75 characters.",
                       "",
                       "* ALGORITHM allowed parameters are 'A' or 'B' (without quotes).",
                       "* SUPERGROUP parameter is one of the following character strings:",
                       "  -1",
                       "  2/m",
                       "  mmm",
                       "  4/mmm",
                       "  -3m",
                       "  6/mmm",
                       "  m-3m",
                       "",
                       "*SUBGROUP takes two parameters.  The first being a character string designation",
                       " for the crystal's point group, e.g. -3 or mm2.  The second parameter is",
                       " an integer which is equal to the number of symmetry operators for the",
                       " crystal's point group.",
                       "",
                       "*RMAT takes 9 numeric parameters, which are the matrix elements for the",
                       " symmetry operators for the point group.  Each symmetry operator takes a",
                       " separate RMAT statment.  The number of RMAT statements should equal the ",
                       " numeric value given in the SUBGROUP statement.  When constructing the",
                       " RMAT statements, simply translate the International Table's equivalent",
                       " positions (in direct space) to the matrix representation.  For example,",
                       " if the crystal's spacegroup is I 4(1)/a, then drop the lattice centering",
                       " symbol and convert the translation symmety elements to the non-translational",
                       " equivalents, so with I 4(1)/a one would use the equivalent positions for",
                       " P 4/m. ",
                       "",
                       "*TRANS takes 9 numeric elements which transform the crystal's unit cell ",
                       " parameters to the metrically available supergroup cell.  These elements",
                       " are normally obtained from a cell reduction program. If TRANS is omitted",
                       " then the identity matrix is used",
                       "",
                       "*INSFILE takes a single character string which is filename of the SHELX",
                       " .ins file for the structure.  This file is not altered by the program but",
                       " provides basis for new .ins file(s) used to do twinned refinements.",
                       "",
                       "*OUTFILE takes a single character string which is filename for the general",
                       " output from COSET.  If this directive is not specified, the program writes",
                       " these results to stdout ('standard output', i.e. the terminal).",
                       "",
                       "*NEWINS takes a single character string which is the basename for the",
                       " new set of .ins file which incorporate the SHELX BASF and TWIN instructions",
                       " for twinned refinement.",
                       "",
                       "*EXEC takes a single character string which is the full pathname of the",
                       " local system's SHELX(T)L executable.",
                       "",
                       "*END takes no paramters and should be the last line of the file.",
                       NULL
                    };
    p = help;
    while( NULL != *p ) {
        fprintf( stderr, "%s\n", *p );
        p++;
    }

    return;
}

