Branch: Tag:

2003-12-18

2003-12-18 21:22:24 by Marcus Comstedt <marcus@mc.pp.se>

combine_path_amigaos().

Rev: src/builtin_functions.c:1.523
Rev: src/combine_path.h:1.13

2:   || 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"
1248:   /*! @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
1255:    *!    *! @[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()]
1270:   #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.
7997:   /* 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)),