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.318 2003/12/18 23:23:39 marcus Exp $ + // $Id: master.pike.in,v 1.319 2003/12/19 20:37:03 marcus Exp $      #pike __REAL_VERSION__      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif      // --- Some configurable parameters
pike.git/lib/master.pike.in:247:   //!   //! @seealso   //! @[basename()], @[explode_path()]   string dirname(string x)   {    if(x=="") return "";   #ifdef __amigaos__    array(string) tmp=x/":";    array(string) tmp2=tmp[-1]/"/";    tmp[-1]=tmp2[..sizeof(tmp2)-2]*"/"; +  if(sizeof(tmp2) >= 2 && tmp2[-2]=="") tmp[-1]+="/";    return tmp*":";   #else    array(string) tmp=EXPLODE_PATH(x);    if(x[0]=='/' && sizeof(tmp)<3) return "/";    return tmp[..sizeof(tmp)-2]*"/";   #endif   }      //! @appears basename   //! Returns the last segment of a path.