Annotation of parser3/src/types/pa_venv.C, revision 1.1.2.2
1.1.2.1 paf 1: /** @file
2: Parser: @b env class.
3:
4: Copyright(c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com)
5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
6: */
7:
1.1.2.2 ! paf 8: static const char * const IDENT="$Date: 2005/11/21 09:22:17 $";
1.1.2.1 paf 9:
10: #include "pa_venv.h"
11: #include "pa_vstring.h"
12: #include "pa_version.h"
13:
14: static const String parser_version(PARSER_VERSION);
15:
16: Value* VEnv::get_element(const String& aname, Value& /*aself*/, bool /*looking_up*/) {
17: // $env:PARSER_VERSION
18: if(aname=="PARSER_VERSION")
19: return new VString(parser_version);
20:
21: // getenv
22: String& result=*new String;
23: if(const char* local_value=SAPI::get_env(finfo, aname.cstr()))
24: result.append_help_length(strdup(local_value), 0, String::L_TAINTED);
25: return new VString(result);
1.1.2.2 ! paf 26: }
E-mail: