pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || 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_functions.c,v 1.522 2003/12/06 10:08:55 nilsson Exp $ + || $Id: builtin_functions.c,v 1.523 2003/12/18 21:22:23 marcus Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.522 2003/12/06 10:08:55 nilsson Exp $"); + RCSID("$Id: builtin_functions.c,v 1.523 2003/12/18 21:22:23 marcus Exp $");   #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"
pike.git/src/builtin_functions.c:1241:    low_add_efun(Pike_sp[-args].u.string, Pike_sp-args+1);    }else{    low_add_efun(Pike_sp[-args].u.string, 0);    }    pop_n_elems(args);   }      /*! @decl string combine_path(string absolute, string ... relative)    *! @decl string combine_path_unix(string absolute, string ... relative)    *! @decl string combine_path_nt(string absolute, string ... relative) +  *! @decl string combine_path_amigaos(string absolute, string ... relative)    *!    *! Concatenate a relative path to an absolute path and remove any    *! @expr{"//"@}, @expr{"/.."@} or @expr{"/."@} to produce a    *! straightforward absolute path as result.    *!    *! @[combine_path_nt()] concatenates according to NT-filesystem conventions,    *! while @[combine_path_unix()] concatenates according to UNIX-style. -  +  *! @[combine_path_amigaos()] concatenates according to AmigaOS filesystem +  *! conventions.    *!    *! @[combine_path()] is equvivalent to @[combine_path_unix()] on UNIX-like -  *! operating systems, and equvivalent to @[combine_path_nt()] on NT-like -  *! operating systems. +  *! operating systems, and equivalent to @[combine_path_nt()] on NT-like +  *! operating systems, and equivalent to @[combine_path_amigaos()] on +  *! AmigaOS-like operating systems.    *!    *! @seealso    *! @[getcwd()], @[Stdio.append_path()]    */      #define NT_COMBINE_PATH   #include "combine_path.h"      #define UNIX_COMBINE_PATH   #include "combine_path.h"    -  + #define AMIGAOS_COMBINE_PATH + #include "combine_path.h"       -  +    /*! @decl int zero_type(mixed a)    *!    *! Return the type of zero.    *!    *! There are many types of zeros out there, or at least there are two.    *! One is returned by normal functions, and one returned by mapping    *! lookups and @[find_call_out()] when what you looked for wasn't there.    *! The only way to separate these two kinds of zeros is @[zero_type()].    *!    *! @returns
pike.git/src/builtin_functions.c:7990:   /* function(int,void|0=mixed:array(0)) */    ADD_EFUN("allocate", f_allocate,    tFunc(tInt tOr(tVoid,tSetvar(0,tMix)),tArr(tVar(0))), 0);      /* function(mixed:int) */    ADD_EFUN("arrayp", f_arrayp,tFunc(tMix,tInt),0);      /* function(string...:string) */    ADD_EFUN("combine_path_nt",f_combine_path_nt,tFuncV(tNone,tStr,tStr),0);    ADD_EFUN("combine_path_unix",f_combine_path_unix,tFuncV(tNone,tStr,tStr),0); +  ADD_EFUN("combine_path_amigaos",f_combine_path_amigaos,tFuncV(tNone,tStr,tStr),0);   #ifdef __NT__    ADD_EFUN("combine_path",f_combine_path_nt,tFuncV(tNone,tStr,tStr),0);   #else -  + #ifdef __amigaos__ +  ADD_EFUN("combine_path",f_combine_path_amigaos,tFuncV(tNone,tStr,tStr),0); + #else    ADD_EFUN("combine_path",f_combine_path_unix,tFuncV(tNone,tStr,tStr),0);   #endif -  + #endif       ADD_EFUN("compile", f_compile,    tFunc(tStr tOr(tObj, tVoid) tOr(tInt, tVoid) tOr(tInt, tVoid) tOr(tPrg(tObj), tVoid) tOr(tObj, tVoid) ,tPrg(tObj)),    OPT_EXTERNAL_DEPEND);      /* function(1=mixed:1) */    ADD_EFUN("copy_value",f_copy_value,tFunc(tSetvar(1,tMix),tVar(1)),0);      /* function(string:string)|function(string,string:int) */    ADD_EFUN("crypt",f_crypt,