Branch: Tag:

2000-03-30

2000-03-30 19:04:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now defaults to warnings enabled.
Use -W or --woff or --no-warnings to disable warnings.

Rev: lib/master.pike.in:1.110

1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.109 2000/03/27 01:17:23 per Exp $ +  * $Id: master.pike.in,v 1.110 2000/03/30 19:04:50 grubba Exp $    *    * Master-file for Pike.    *
78:   array(string) pike_include_path=({});   array(string) pike_module_path=({});   array(string) pike_program_path=({}); - int want_warnings; + int want_warnings = 1;      #ifdef PIKE_AUTORELOAD   
274:    // FIXME: The catch is needed, since we might be called in    // a context when threads are disabled.    // (compile() disables threads). -  catch { +  mixed err = catch {    key=compilation_mutex->lock(2);    }; -  +  if (err) { +  werror(sprintf("low_findprog: Caught spurious error:\n" +  "%s\n", describe_backtrace(err))); +  }   #endif      #ifdef PIKE_AUTORELOAD
578:   {    string dirname;    mixed module; -  mapping cache=([]); -  array files; +  mapping(string:mixed) cache=([]); +  array(string) files;       void create(string name)    {
590:    module=tmp;    }    -  static object|program ind(string index) +  static mixed ind(string index)    {    if(module)    {
622:    return UNDEFINED;    }    -  object|program `[](string index) +  mixed `[](string index)    {    mixed ret;    if(!zero_type(ret=cache[index]))
633:    return cache[index]=ind(index);    }    -  int _cache_full; +  static int _cache_full;    void fill_cache()    {   #ifdef RESOLV_DEBUG
674:    }    array(string) _indices()    { +  // werror("indices(%O) called\n", dirname);    fill_cache();    return indices(filter(cache, lambda(mixed x){ return x!=0; }));    }    array(mixed) _values()    { -  +  // werror("values(%O) called\n", dirname);    fill_cache();    return values(cache)-({0});    }
689:   class joinnode   {    array(object|mapping) joined_modules; -  mapping cache=([]); +  mapping(string:mixed) cache=([]);       void create(array(object|mapping) _joined_modules)    {    joined_modules = _joined_modules;    }    -  static object|mapping|program ind(string index) +  static mixed ind(string index)    {    array(mixed) res = ({});    foreach(joined_modules, object|mapping o)
724:    return UNDEFINED;    }    -  object|mapping|program `[](string index) +  mixed `[](string index)    { -  object|mapping|program ret; +  mixed ret;    if (!zero_type(ret = cache[index])) {    if (ret != ZERO_TYPE) {    return ret;
741:    }    return ret;    } -  int _cache_full; +  static int _cache_full;    void fill_cache()    {   #ifdef RESOLV_DEBUG
935:    ({"ppath",tmp->HAS_ARG,({"-P","--program-path"})}),    ({"showpaths",tmp->NO_ARG,"--show-paths"}),    ({"warnings",tmp->NO_ARG,({"-w","--warnings"})}), +  ({"nowarnings",tmp->NO_ARG,({"-W", "--woff", "--no-warnings"})}),   #ifdef PIKE_AUTORELOAD    ({"autoreload",tmp->NO_ARG,({"--autoreload"})}),   #endif
993:    want_warnings++;    break;    +  case "no-warnings": +  want_warnings--; +  break; +     case "master":    _master_file_name = q[i][1];    break;