Branch: Tag:

1997-04-28

1997-04-28 20:06:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Optimized find_dir() by a tiny amount.

Rev: server/base_server/configuration.pike:1.24

1: - string cvs_version = "$Id: configuration.pike,v 1.23 1997/04/28 16:48:20 grubba Exp $"; + string cvs_version = "$Id: configuration.pike,v 1.24 1997/04/28 20:06:42 grubba Exp $";   #include <module.h>   #include <roxen.h>   /* A configuration.. */    -  +    inherit "roxenlib";      import Array;
689: Inside #if defined(MODULE_LEVEL_SECURITY)
   if(slevel && (seclevels[1] > slevel)) // "Trustlevel" to low.    return 1;    -  +     if(!sizeof(seclevels[0]))    return 0; // Ok if there are no patterns.   
1023:       file=replace(file, "//", "/");    +  if(file[0] != '/') +  file = "/" + file; +     foreach(location_modules(id), tmp)    {    loc = tmp[0]; -  if(file[0] != '/') -  file = "/" + file; +        if(!search(file, loc))    {