2009-01-21 10:21:57 -05:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2003-2007 Jim Paris <jim@jtan.com>
|
|
|
|
*
|
|
|
|
* This is free software; you can redistribute it and/or modify it and
|
|
|
|
* it is provided under the terms of version 2 of the GNU General Public
|
|
|
|
* License as published by the Free Software Foundation; see COPYING.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OPT_H
|
|
|
|
#define OPT_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2010-02-08 16:23:12 -05:00
|
|
|
struct options {
|
|
|
|
char shortopt;
|
|
|
|
char *longopt;
|
|
|
|
char *arg;
|
|
|
|
char *help;
|
2009-01-21 10:21:57 -05:00
|
|
|
};
|
|
|
|
|
2010-02-08 16:23:12 -05:00
|
|
|
void opt_init(int *optind);
|
2009-01-21 10:21:57 -05:00
|
|
|
|
2010-02-08 16:23:12 -05:00
|
|
|
char opt_parse(int argc, char **argv, int *optind, char **optarg,
|
|
|
|
struct options *opt);
|
2009-01-21 10:21:57 -05:00
|
|
|
|
2010-02-08 16:23:12 -05:00
|
|
|
void opt_help(struct options *opt, FILE * out);
|
2009-01-21 10:21:57 -05:00
|
|
|
|
|
|
|
#endif
|