Roxen.git / server / base_server / configuration.pike

version» Context lines:

Roxen.git/server/base_server/configuration.pike:1:   // A vitual server's main configuration   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: configuration.pike,v 1.369 2000/09/13 14:09:35 jonasw Exp $"; + constant cvs_version = "$Id: configuration.pike,v 1.370 2000/09/13 14:16:01 per Exp $";   constant is_configuration = 1;   #include <module.h>   #include <module_constants.h>   #include <roxen.h>   #include <request_trace.h>      inherit "basic_defvar";      mapping enabled_modules = ([]);   mapping(string:array(int)) error_log=([]);
Roxen.git/server/base_server/configuration.pike:1543:    TRACE_LEAVE("");    }    }    TRACE_LEAVE("Returned 'no such file'.");   }      class StringFile   {    string data;    int offset; +  mixed _st;       string _sprintf()    {    return "StringFile("+strlen(data)+","+offset+")";    }       string read(int nbytes)    {    if(!nbytes)    {    offset = strlen(data);    return data;    }    string d = data[offset..offset+nbytes-1];    offset += strlen(d);    return d;    }    -  +  array|mixed stat() +  { +  if( _st ) return _st; +  return ({ 0, strlen(data), time(), time(), time(), 0, 0, 0 }); +  } +     void write(mixed ... args)    {    throw( ({ "File not open for write\n", backtrace() }) );    }       void seek(int to)    {    offset = to;    }    -  void create(string d) +  void create(string d, mixed|void __st)    {    data = d; -  +  _st = __st;    }      }         // this is not as trivial as it sounds. Consider gtext. :-)   public array open_file(string fname, string mode, RequestID id, void|int internal_get)   {    object oc = id->conf;    string oq = id->not_query;