/*   FILE: %(FILE) -- 
 * AUTHOR: %(FULLNAME) <%(EMAIL)>
 *   DATE: %(DAY) %(MONTH) %(YEAR)
 *
 * Copyright (C) %(YEAR) %(FULLNAME) <%(EMAIL)>
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>

extern char *usage_%(PROJ_NAME:FIXME);

/* ============================ settings_t ================================= */
typedef struct settings_t {

} settings_t;

/* ============================ usage () ==================================== */
void usage(const int exitcode, const char *error, const char *more)
{
    fprintf(stderr, "%s\n", usage_%(PROJ_NAME:FIXME));
    if (error)
	fprintf(stderr, "%s: %s.\n\n", error, more);
    exit(exitcode);
}

/* ============================ set_defaults () ============================= */
void set_defaults(settings_t * settings)
{
}

/* ============================ parse_args () =============================== */
void parse_args(int argc, char *argv[], settings_t * settings)
{
    char c;
    int opt_index = 0;
    struct option opts[] = {
	{"help", 0, 0, 'h'},
	{0, 0, 0, 0}
    };
    while ((c = getopt_long(argc, argv, "hflgt:s:y:p:", opts, &opt_index))
	   >= 0) {
	switch (c) {
	case 'h':
	    usage(EXIT_SUCCESS, NULL, NULL);
	default:
	    usage(EXIT_FAILURE, NULL, NULL);
	}
    }
}

/* ============================ main () ===================================== */
int main(int argc, char *argv[], char *env[])
{
    settings_t settings;
    set_defaults (&settings);
    parse_args(argc, argv, &settings);

    exit(EXIT_SUCCESS);
}
