summaryrefslogtreecommitdiffstats
path: root/eurephiadm/argparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'eurephiadm/argparser.h')
-rw-r--r--eurephiadm/argparser.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/eurephiadm/argparser.h b/eurephiadm/argparser.h
new file mode 100644
index 0000000..56ef01e
--- /dev/null
+++ b/eurephiadm/argparser.h
@@ -0,0 +1,34 @@
+/* argparser.c -- Simple argument parser - inspired by getopt, but simpler
+ *
+ * GPLv2 - Copyright (C) 2008 David Sommerseth <dazo@users.sourceforge.net>
+ *
+ * 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; version 2
+ * of the License.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef EUREPHIA__ARGPARSE_H
+#define EUREPHIA__ARGPARSE_H
+
+typedef struct {
+ char *longarg;
+ char *shortarg;
+ int param;
+} e_options;
+
+extern char *optarg;
+
+int eurephia_getopt(int curarg, int argc, char **argv, e_options *argopts);
+
+#endif