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.210 2002/07/23 14:06:10 mast Exp $ + // $Id: master.pike.in,v 1.211 2002/07/28 23:54:31 nilsson 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:180:   //! <r><c>dirname("/")</c><c>"/"</c></r>   //! <r><c>dirname("")</c><c>""</c></r>   //! </matrix>@}   //!   //! @seealso   //! @[basename()], @[explode_path()]   string dirname(string x)   {    if(x=="") return "";    array(string) tmp=EXPLODE_PATH(x); -  if(sizeof(tmp)<3) return "/"; +  if(x[0]=='/' && sizeof(tmp)<3) return "/";    return tmp[..sizeof(tmp)-2]*"/";   }      //! @appears basename   //! Returns the last segment of a path.   //!   //! @seealso   //! @[dirname()], @[explode_path()]   string basename(string x)   {