Dan Pasanen | c6e3786 | 2014-10-02 14:08:59 -0500 | [diff] [blame] | 1 | /* eval.c, created from eval.def. */ |
| 2 | #line 22 "./eval.def" |
| 3 | |
| 4 | #line 34 "./eval.def" |
| 5 | |
| 6 | #include <config.h> |
| 7 | #if defined (HAVE_UNISTD_H) |
| 8 | # ifdef _MINIX |
| 9 | # include <sys/types.h> |
| 10 | # endif |
| 11 | # include <unistd.h> |
| 12 | #endif |
| 13 | |
| 14 | #include "../shell.h" |
| 15 | #include "bashgetopt.h" |
| 16 | #include "common.h" |
| 17 | |
| 18 | /* Parse the string that these words make, and execute the command found. */ |
| 19 | int |
| 20 | eval_builtin (list) |
| 21 | WORD_LIST *list; |
| 22 | { |
| 23 | if (no_options (list)) |
| 24 | return (EX_USAGE); |
| 25 | list = loptend; /* skip over possible `--' */ |
| 26 | |
| 27 | return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS); |
| 28 | } |