X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=builtins%2Feval.def;h=5e824c92d28585fe6d924af772cf06b3294df0d3;hb=ac50fbac377e32b98d2de396f016ea81e8ee9961;hp=62db7127e31af0f6b791720756f6722a32113b63;hpb=d166f048818e10cf3799aa24a174fb22835f1acc;p=platform%2Fupstream%2Fbash.git
diff --git a/builtins/eval.def b/builtins/eval.def
index 62db712..5e824c9 100644
--- a/builtins/eval.def
+++ b/builtins/eval.def
@@ -1,35 +1,43 @@
This file is eval.def, from which is created eval.c.
It implements the builtin "eval" in Bash.
-Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
-Bash 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 1, or (at your option) any later
-version.
+Bash 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 3 of the License, or
+(at your option) any later version.
-Bash 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.
+Bash 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 Bash; see the file COPYING. If not, write to the Free Software
-Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see .
$PRODUCES eval.c
$BUILTIN eval
$FUNCTION eval_builtin
$SHORT_DOC eval [arg ...]
-Read ARGs as input to the shell and execute the resulting command(s).
+Execute arguments as a shell command.
+
+Combine ARGs into a single string, use the result as input to the shell,
+and execute the resulting commands.
+
+Exit Status:
+Returns exit status of command or success if command is null.
$END
#include
#if defined (HAVE_UNISTD_H)
-#include
+# ifdef _MINIX
+# include
+# endif
+# include
#endif
#include "../shell.h"
@@ -43,7 +51,7 @@ eval_builtin (list)
{
if (no_options (list))
return (EX_USAGE);
+ list = loptend; /* skip over possible `--' */
- /* Note that parse_and_execute () frees the string it is passed. */
- return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
+ return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
}