# include <unistd.h>
#endif
-#include <sys/types.h>
+#include "../bashtypes.h"
#include "../posixstat.h"
#include "../filecntl.h"
#define FEVAL_UNWINDPROT 0x004
#define FEVAL_NONINT 0x008
#define FEVAL_LONGJMP 0x010
+#define FEVAL_HISTORY 0x020
extern int interactive, interactive_shell, posixly_correct;
extern int indirection_level, startup_state, subshell_environment;
{
volatile int old_interactive;
procenv_t old_return_catch;
- int return_val, fd, result;
+ int return_val, fd, result, pflags;
char *string;
struct stat finfo;
VFunction *errfunc;
return_catch_flag++;
sourcelevel++;
+ /* set the flags to be passed to parse_and_execute */
+ pflags = (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
+
if (flags & FEVAL_BUILTIN)
result = EXECUTION_SUCCESS;
result = return_catch_value;
}
else
- result = parse_and_execute (string, filename, -1);
+ result = parse_and_execute (string, filename, pflags);
if (flags & FEVAL_UNWINDPROT)
run_unwind_frame ("_evalfile");
return result;
}
+#if defined (HISTORY)
+int
+fc_execute_file (filename)
+ char *filename;
+{
+ int flags;
+
+ /* We want these commands to show up in the history list if
+ remember_on_history is set. */
+ flags = FEVAL_ENOENTOK|FEVAL_HISTORY;
+ return (_evalfile (filename, flags));
+}
+#endif /* HISTORY */
+
int
source_file (filename)
char *filename;