Branch: Tag:

1997-03-26

1997-03-26 05:54:17 by Per Hedbor <ph@opera.com>

Fixes to support the newest pike

Rev: server/base_server/cache.pike:1.11
Rev: server/base_server/config/builders.pike:1.5
Rev: server/base_server/config/describers.pike:1.21
Rev: server/base_server/config/low_describers.pike:1.6
Rev: server/base_server/configuration.pike:1.19
Rev: server/base_server/mainconfig.pike:1.36
Rev: server/base_server/module.pike:1.12
Rev: server/base_server/persistent.pike:1.16
Rev: server/base_server/roxen.pike:1.46
Rev: server/base_server/roxenlib.pike:1.19
Rev: server/base_server/roxenloader.pike:1.11
Rev: server/etc/extensions:1.4
Rev: server/etc/include/module.h:1.7
Rev: server/etc/roxen_master.pike:1.29
Rev: server/etc/supports:1.14
Rev: server/modules/directories/directories.pike:1.9
Rev: server/modules/directories/fastdir.pike:1.7
Rev: server/modules/filesystems/filesystem.pike:1.11
Rev: server/modules/filesystems/userfs.pike:1.11
Rev: server/modules/filters/hostredirect.pike:1.8
Rev: server/modules/filters/redirect.pike:1.7
Rev: server/modules/filters/relay.pike:1.6
Rev: server/modules/graphics/graphic_text.pike:1.39
Rev: server/modules/misc/userdb.pike:1.11
Rev: server/modules/scripting/cgi.pike:1.13
Rev: server/modules/scripting/pikescript.pike:1.9
Rev: server/modules/tags/htmlparse.pike:1.25
Rev: server/protocols/http.pike:1.21

70:    if (!stringp(name))    name = var;    +  if((search(name, "\"") != -1)) +  error("Please do not use \" in variable names"); +     if (!stringp(doc_str))    doc_str = "No documentation";       switch (type & VAR_TYPE_MASK)    { -  +  case TYPE_NODE: +  if(!arrayp(value)) +  error("TYPE_NODE variables should contain a list of variables to use as " +  "subnodes.\n"); +  break; +  case TYPE_CUSTOM: +  if(!misc +  && arrayp(misc) +  && (sizeof(misc)>=3) +  && functionp(misc[0]) +  && functionp(misc[1]) +  && functionp(misc[2])) +  error("When defining a TYPE_CUSTOM variable, the MISC " +  "field must be an array of functionpointers: \n" +  "({describe,describe_form,set_from_form})\n"); +  break; +     case TYPE_TEXT_FIELD:    case TYPE_FILE:    case TYPE_STRING:
215:    error( "Setting undefined variable.\n" );    else    if(variables[var][VAR_TYPE] == TYPE_MODULE && stringp(value)) -  roxen->register_module_load_hook( value, set, var ); +  roxenp()->register_module_load_hook( value, set, var );    else if(variables[var][VAR_TYPE] == TYPE_MODULE_LIST)    {    variables[var][VAR_VALUE]=value;    if(arrayp(value))    foreach(value, value)    if(stringp(value)) -  roxen->register_module_load_hook(value,set_module_list,var,value); +  roxenp()->register_module_load_hook(value,set_module_list,var,value);    }    else    variables[var][VAR_VALUE]=value;
287:    break;       case "allowuser": -  value = replace("(^"+(value/",")*"$)|(^"+"$)","(^any$)","(.*)"); -  if(this->proxy_auth_needed) { +  array(string) users = (value/"," - ({""})); +  int i; +  +  for(i=0; i < sizeof(users); i++) { +  if (users[i] == "any") { +  if(this->register_module()[0] & MODULE_PROXY) +  patterns += ({ ({ MOD_PROXY_USER, lambda(){ return 1; } }) }); +  else +  patterns += ({ ({ MOD_USER, lambda(){ return 1; } }) }); +  break; +  } else { +  users[i & 0x0f] = "(^"+users[i]+"$)"; +  } +  if ((i & 0x0f) == 0x0f) { +  value = users[0..0x0f]*"|"; +  if(this->register_module()[0] & MODULE_PROXY) {    patterns += ({ ({ MOD_PROXY_USER, Regexp(value)->match, }) });    } else {    patterns += ({ ({ MOD_USER, Regexp(value)->match, }) });    } -  +  } +  } +  if (i & 0x0f) { +  value = users[0..(i-1)&0x0f]*"|"; +  if(this->register_module()[0] & MODULE_PROXY) { +  patterns += ({ ({ MOD_PROXY_USER, Regexp(value)->match, }) }); +  } else { +  patterns += ({ ({ MOD_USER, Regexp(value)->match, }) }); +  } +  }    break;    }    }
300:    return patterns;   }    -  +    mixed stat_file(string f, object id){}   mixed find_dir(string f, object id){}   mixed real_file(string f, object id){}