summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/command.h3
-rw-r--r--include/eval_arg.h19
2 files changed, 22 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h
index db469e3..9ca460d 100644
--- a/include/command.h
+++ b/include/command.h
@@ -15,6 +15,7 @@
#include "common.h"
#include "config.h"
+#include <setjmp.h>
#ifndef NULL
#define NULL 0
@@ -160,5 +161,7 @@ typedef command_ret_t (*do_cmd_t)(cmd_tbl_t *, int, int, char * const []);
extern cmd_tbl_t cmd_tbl[];
+extern jmp_buf cmd_jbuf;
+
#endif /* __COMMAND_H */
diff --git a/include/eval_arg.h b/include/eval_arg.h
new file mode 100644
index 0000000..a86b0d5
--- /dev/null
+++ b/include/eval_arg.h
@@ -0,0 +1,19 @@
+/*
+ * (C) Copyright 2016 Leo C. <erbl259-lmu@yahoo.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#ifndef EVAL_ARG_H
+#define EVAL_ARG_H
+
+/**
+ * eval_arg() - evaluate a command argument expression
+ *
+ * @arg: pointer to argument (usually argv[i])
+ * @end_ptr: pointer to position, where evaluation stopped. Points to '\0' if no error.
+ * @return evaluated argument
+ */
+long eval_arg(char *arg, char **end_ptr);
+
+#endif /* EVAL_ARG_H */