--- parser3/src/include/pa_exec.h 2001/05/17 10:22:24 1.2 +++ parser3/src/include/pa_exec.h 2003/07/24 11:31:21 1.13 @@ -1,25 +1,34 @@ /** @file Parser: program executing for different OS-es decls. - Copyright (c) 2000,2001 ArtLebedev Group (http://www.artlebedev.com) - - Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: pa_exec.h,v 1.2 2001/05/17 10:22:24 parser Exp $ + Copyright (c) 2000,2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_EXEC_H #define PA_EXEC_H -#include "pa_config_includes.h" +static const char* IDENT_EXEC_H="$Date: 2003/07/24 11:31:21 $"; + #include "pa_string.h" #include "pa_hash.h" #include "pa_array.h" +#include "pa_value.h" +#include "pa_charset.h" -/// @return exit code -int pa_exec(const String& file_spec, - const Hash *env, ///< 0 | Hash of String - const Array *argv, ///< 0 | Array of command line arguments - const String& in, String& out, String& err); +struct PA_exec_result { + int status; ///< exit code + String out; + String err; + + PA_exec_result(): status(0) {} +}; + +PA_exec_result pa_exec( + bool forced_allow, ///< allow execution regardles of --disable-execs + const String& file_spec, + const HashStringString* env, ///< 0 | Hash of String + const ArrayString& argv, ///< 0 | Array of command line arguments + String& in); #endif