--- parser3/src/main/pa_exec.C 2004/12/23 16:34:50 1.65 +++ parser3/src/main/pa_exec.C 2007/04/23 10:30:31 1.69 @@ -1,13 +1,13 @@ /** @file Parser: program executing for different OS-es. - Copyright(c) 2000,2001-2004 ArtLebedev Group(http://www.artlebedev.com) + Copyright(c) 2000,2001-2005 ArtLebedev Group(http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) @todo setrlimit */ -static const char * const IDENT_EXEC_C="$Date: 2004/12/23 16:34:50 $"; +static const char * const IDENT_EXEC_C="$Date: 2007/04/23 10:30:31 $"; #include "pa_config_includes.h" @@ -134,7 +134,7 @@ static const char* buildCommand(const ch const char* begin=buf+2; while(*begin==' ') // alx: were an old magic for some linux-es begin++; - if(char *end=strchr(begin, '\n')) { + if(const char *end=strchr(begin, '\n')) { String string(pa_strdup(begin, end-begin)); string << " " << file_spec_cstr; result=string.cstr(); @@ -330,7 +330,7 @@ PA_exec_result pa_exec( #ifdef NO_PA_EXECS if(!forced_allow) - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, &file_spec, "parser execs are disabled [recompile parser without --disable-execs configure option]"); #endif @@ -345,7 +345,7 @@ PA_exec_result pa_exec( if(env) { String::Body body; Append_env_pair_info info(body); - env->for_each(append_env_pair, &info); + env->for_each(append_env_pair, &info); env_cstr=info.body.cstrm(); for(char* replacer=env_cstr; *replacer; replacer++) if(*replacer=='\1') @@ -408,11 +408,11 @@ from http://www.apache.org/websrc/cvsweb } #endif - char* argv_cstrs[1+10+1]={file_spec_cstr, 0}; + char* argv_cstrs[1+50+1]={file_spec_cstr, 0}; const int argv_size=argv.count(); const int argv_max=sizeof(argv_cstrs)/sizeof(argv_cstrs[0])-1-1; if(argv_size>argv_max) - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, &file_spec, "too many arguments (%d > max %d)", argv_size, argv_max); for(int i=0; i