pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*- -  * $Id: builtin.cmod,v 1.83 2002/04/08 01:17:05 mast Exp $ +  * $Id: builtin.cmod,v 1.84 2002/04/24 12:29:45 grubba Exp $    */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "opcodes.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"
pike.git/src/builtin.cmod:21:   #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 "fd_control.h"    -  + /*! @decl int(0..1) set_close_on_exec(int fd, int which) +  *! +  *! Raw set_close_on_exec(). +  *! +  *! @seealso +  *! @[Stdio.File()->set_close_on_exec() +  */ + PIKEFUN int set_close_on_exec(int fd, int which) + { +  int retval = set_close_on_exec(fd, which); +  RETURN retval; + }      /*! @decl array(array(int|string)) _describe_program(program p)    *!    *! Debug function for showing the symbol table of a program.    */   PIKEFUN array(array(int|string)) _describe_program(mixed x)    efun;   {    struct program *p;    struct array *res;    int i;       if (!(p = program_from_svalue(sp - args))) {    Pike_error("_describe_program(): Bad argument 1 (expected program).\n");    }       for (i=0; i < (int)p->num_identifier_references;i++) {    struct reference *ref = p->identifier_references + i;    struct identifier *id = ID_FROM_PTR(p, ref); -  +  struct inherit *inh = INHERIT_FROM_PTR(p, ref);    push_int(ref->id_flags);    ref_push_string(id->name); -  f_aggregate(2); +  push_int(id->identifier_flags); +  if (id->identifier_flags & IDENTIFIER_C_FUNCTION) { +  push_int(-2); +  } else { +  push_int(id->func.offset);    } -  +  push_int(ref->inherit_offset); +  push_int(inh->inherit_level); +  f_aggregate(6); +  }    f_aggregate(p->num_identifier_references);    res = sp[-1].u.array;    sp--;    pop_n_elems(args);    push_array(res);   }      /*! @decl string basetype(mixed x)    *!    *! Same as sprintf("%t",x);