pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || 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: builtin.cmod,v 1.203 2008/06/05 14:44:08 mast Exp $ + || $Id: builtin.cmod,v 1.204 2008/06/10 12:16:17 mast Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"   #include "multiset.h"   #include "pike_types.h"   #include "pike_memory.h"   #include "threads.h" - #include <math.h> - #include <ctype.h> +    #include "module_support.h"   #include "cyclic.h"   #include "bignum.h"   #include "main.h"   #include "operators.h"   #include "builtin_functions.h"   #include "fsort.h"   #include "port.h"   #include "gc.h"   #include "block_alloc.h"   #include "pikecode.h" -  +    #include <assert.h> -  + #include <ctype.h> + #include <errno.h> + #include <math.h>      /*! @decl array(array(int|string|type)) describe_program(program p)    *! @belongs Debug    *!    *! Debug function for showing the symbol table of a program.    *!    *! @returns    *! Returns an array of arrays with the following information    *! for each symbol in @[p]:    *! @array
pike.git/src/builtin.cmod:1339:    init_string_builder (&sb, 0);    string_builder_shared_strcat (&sb, var);    string_builder_putchar (&sb, '=');    string_builder_shared_strcat (&sb, val);    putenv_str = finish_string_builder (&sb);    push_string (putenv_str); /* Let mega_apply pop. */    }    else    putenv_str = var;    -  if (putenv (putenv_str->str)) +  if (putenv (putenv_str->str)) { +  if (errno == ENOMEM)    SIMPLE_OUT_OF_MEMORY_ERROR ("putenv", 0); -  +  else +  Pike_error ("Error from putenv(3): %s\n", strerror (errno)); +  }      #ifdef __NT__    ref_push_string (var);    f_lower_case (1);    assert (Pike_sp[-1].type == T_STRING);    env_alloc_var = Pike_sp[-1].u.string;    /* Let mega_apply pop. */   #else    env_alloc_var = var;   #endif