/****************************************************************************/
/*                                                                          */
/*                                  Usage.h                                 */
/*                                                                          */
/****************************************************************************/
/****************************************************************************/
/*                                                                          */
/* This is a C language header file that defines a routine for displaying   */
/* information about current program and about the program's parameters.    */
/*                                                                          */
/****************************************************************************/
/****************************************************************************/
/*                            Lasse Hakkinen                                */
/*                    Finnish Meteorological Institute                      */
/*                        Department of Geophysics                          */
/*                              P.O.Box 503                                 */
/*                      FIN-00101, Helsinki, Finland                        */
/*                      e-mail: Lasse.Hakkinen@fmi.fi                       */
/*                      phone : (+358)-9-19294634                           */
/*                      fax   : (+358)-9-19294603                           */
/*                                                                          */
/*                      version 1.0     26.02.1996                          */
/****************************************************************************/
/****************************************************************************/
/*  Version history:                                                        */
/*                                                                          */
/*  1.0  26.02.1996 First official release                                  */
/****************************************************************************/
extern char *HeaderText[];
extern char *UsageText[];
extern char *version;
extern char *date;

/*--------------------------------------------------------------------------*/
/*  Print information about the program and proper usage.                   */
/*--------------------------------------------------------------------------*/

void PrintUsage(char *Command,int parameter,int HeaderLines,int UsageLines)
{
    int i;
    
    if (parameter == 0) {
        fprintf(stderr,"\n");
        for (i=0;i<HeaderLines;i++) fprintf(stderr,"%s\n",HeaderText[i]);
        fprintf(stderr,"\n               ");
        fprintf(stderr,"%s - version %s - %s\n\n",Command,version,date);
    }
    
    fprintf(stderr,"%s",Command);
    for (i=0;i<UsageLines;i++) fprintf(stderr,"%s\n",UsageText[i]);
    fprintf(stderr,"\n");
}


