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.240 2002/12/09 22:19:13 mast Exp $ + // $Id: master.pike.in,v 1.241 2002/12/14 04:34:55 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:1353:    predefines[name] = value;    }       //! Remove a define from the set that are implicitly defined in    //! @[cpp] calls.    void remove_predefine (string name)    {    m_delete (predefines, name);    }    -  //! +  //! Returns a mapping with the current predefines.    mapping get_predefines()    {    return predefines;    }       //!    mapping get_default_module()    {    /* This is an ugly kluge to avoid an infinite recursion.    * The infinite recursion occurs because this function is
pike.git/lib/master.pike.in:1849:    w("Features......"+    main_resolv( "Tools.Install.features"/"." )()*"\n "+    "\n");    exit(0);    }       random_seed(time() ^ (getpid()<<8));       if(sizeof(argv)==1)    { -  if(run_tool) -  _error( "Pike: -x specified without tool name.\n"); +  if(run_tool) { +  werror("Pike -x specificed without tool name.\n" +  "Available tools:\n"); +  mapping t = ([]); +  int i; +  object ts = main_resolv(({ "Tools", "Standalone" })); +  foreach(indices(ts), string s) { +  object o = ts[s](); +  if(!o->main) continue; +  t[s] = o->description || ""; +  i = max(i, sizeof(s)); +  } +  foreach(sort(indices(t)), string s) +  werror(" %-"+i+"s %s\n", s, t[s]); +  exit(1); +  }    main_resolv( ({ "Tools", "Hilfe" }) )->StdinHilfe();    exit(0);    }    else    argv=argv[1..];       program prog;       if(run_tool) {    mixed err = catch {