/*  Command-Line Parser Declarations */

/*  From SUIF source code */

/*  Copyright (C) 1995 Stanford University

    All rights reserved.

    NOTICE:  This software is provided ``as is'', without any
    warranty, including any implied warranty for merchantability or
    fitness for a particular purpose.  Under no circumstances shall
    Stanford University or its agents be liable for any use of, misuse
    of, or inability to use this software, including incidental and
    consequential damages.

    License is hereby given to use, modify, and redistribute this
    software, in whole or in part, for any purpose, commercial or
    non-commercial, provided that the user agrees to the terms of this
    copyright notice, including disclaimer of warranty, and provided
    that this copyright notice, including disclaimer of warranty, is
    preserved in the source code and documentation of anything derived
    from this software.  Any redistributor of this software or
    anything derived from this software assumes responsibility for
    ensuring that any parties to whom such a redistribution is made
    are fully aware of the terms of this license and disclaimer.

    "SUIF" is a trademark of Stanford University.
*/

#ifndef CMDPARSE_H
#define CMDPARSE_H

/*
 *  The structure that defines an individual command line option.
 */

enum cmd_line_option_kind {
    CLO_NOARG,
    CLO_INT,
    CLO_DOUBLE,
    CLO_STRING,
    CLO_MULTI_STRING
};

struct cmd_line_option {
    cmd_line_option_kind knd;
    char *name;
    char *deflt;
    void *data;
    char *descr;
};


/*
 *  Parse command line options.  Returns TRUE if there are more things
 *  left on the command line.
 */

void cmd_line_option_usage(int nclo);
void parse_cmd_line(int &argc, char *argv[], cmd_line_option clos[],
		    int nclos);
extern cmd_line_option cmd_line_options[];

#endif /* CMDPARSE_H */
