pike.git / lib / master.pike.in

version» Context lines:

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.432 2008/06/01 18:00:43 grubba Exp $ + // $Id: master.pike.in,v 1.433 2008/06/02 17:29:25 mast 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:938:   //! @endmapping   //!   //! @note   //! This mapping should not be accessed directly; use @[getenv()]   //! and @[putenv()] instead.   //!   //! @note   //! This mapping is not compatible with @[Process.create_process()];   //! use the mapping returned from calling @[getenv()] without arguments   //! instead. + //! + //! @bugs + //! This mapping is not the real environment; it is just a copy of + //! the environment made at startup. When this bug is fixed this + //! mapping might disappear altogether, which is another good reason + //! to not use it directly.   mapping(string:array(string)) environment=([]);         //! @decl string getenv(string varname)   //! @decl mapping(string:string) getenv()   //! @appears getenv   //!   //! When called with no arguments, a mapping with all current environment   //! variables will be returned. Destructive opreations on the mapping   //! will not affect the internal environment representation.   //!   //! If the @[varname] argument has been given, the value of the environment   //! variable with the name @[varname] will be returned. If no such   //! environment variable exists, @expr{0@} (zero) will be returned.   //!   //! On NT the environment variable name is case insensitive.   //! -  + //! @bugs + //! This function doesn't really query the environment, it only + //! accesses a pike internal mapping that is initialized from the + //! environment on startup and that @[putenv] updates.   string|mapping(string:string) getenv(string|void s)   {    if(!s) return [mapping(string:string)]aggregate_mapping( @(values(environment)*({}) ) );   #ifdef __NT__    s = lower_case(s);   #endif    return environment[s] && environment[s][1];   }      
pike.git/lib/master.pike.in:1030:      //! @appears putenv   //! Sets the environment variable @[varname] to @[value].   //!   //! If @[value] is omitted or zero, the environment variable   //! @[varname] will be removed.   //!   //! @note   //! On NT the environment variable name is case insensitive.   //! + //! @bugs + //! This function doesn't really update the environment, it just + //! updates a pike internal mapping that @[getenv] uses. + //!   //! @seealso   //! @[getenv()]   //!   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];