pike.git
/
lib
/
master.pike.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/master.pike.in:1:
// -*- Pike -*- // // Master Control Program for Pike. // // This file is part of Pike. For copyright information see COPYRIGHT. // Pike is distributed under GPL, LGPL and MPL. See the file COPYING // for more information. //
-
// $Id: master.pike.in,v 1.
356
2004/07/
04
17
:
23
:
02
srb
Exp $
+
// $Id: master.pike.in,v 1.
357
2004/07/
14
11
:
01
:
48
grubba
Exp $
#pike __REAL_VERSION__ //#pragma strict_types // Some programs destroys character pairs beginning with the currency // symbol when running in chinese locale. #if "ยค/" != "\244/" #error "master.pike.in is corrupted." #endif
pike.git/lib/master.pike.in:534:
string getenv(string s) { if(!s) return environment + ([]); return environment[s]; } #endif /* 0 */ //! @appears putenv //! Sets the environment variable @[varname] to @[value]. //!
-
//!
On
NT
the environment variable
name
is
case
insensitive
.
+
//!
If
@[value]
is omitted or zero,
the environment variable
+
//!
@[varname]
will
be
removed
.
//!
-
+
//! @note
+
//! On NT the environment variable name is case insensitive.
+
//!
//! @seealso //! @[getenv()] //!
-
void putenv(string varname, string value)
+
void putenv(string varname, string
|void
value)
{ string index = varname; #ifdef __NT__ index = lower_case(varname); if (environment[index] && environment[index][0]) varname = environment[index][0]; #endif
-
+
if (value) {
environment[index] = ({ varname, value });
-
+
} else {
+
m_delete(environment, index);
}
-
+
}
//! @appears normalize_path //! Replaces "\" with "/" if runing on MS Windows. It is //! adviced to use @[System.normalize_path] instead. string normalize_path( string path ) { #ifndef __NT__ return path; #else return replace(path,"\\","/");
pike.git/lib/master.pike.in:1146:
object low_cast_to_object(string oname, string current_file, object|void current_handler) { program p; object o; p = low_cast_to_program(oname, current_file, current_handler, 1); if(!p) return 0; // NB: p might be a function in a fake_object... if(!objectp (o=objects[p])) o=objects[p]=p();
+
if (has_suffix(oname, "Identifiers.pmod")) {
+
werror(sprintf("short_name_ids:%O\n", o["short_name_ids"]));
+
}
return o; } //! This function is called when the drivers wants to cast a string //! to an object because of an implict or explicit cast. This function //! may also receive more arguments in the future. object cast_to_object(string oname, string current_file, object|void current_handler) { resolv_debug ("cast_to_object(%O, %O)\n", oname, current_file);