Roxen.git / server / modules / scripting / piketag.pike

version» Context lines:

Roxen.git/server/modules/scripting/piketag.pike:1:   // This is a roxen module. Copyright © 1996 - 2000, Roxen IS.   //   // Adds support for inline pike in documents.   //   // Example:   // <pike>   // return "Hello world!\n";   // </pike>    - constant cvs_version = "$Id: piketag.pike,v 2.28 2000/10/18 01:50:38 mast Exp $"; + constant cvs_version = "$Id: piketag.pike,v 2.29 2001/01/26 18:53:23 mast Exp $";   constant thread_safe=1;      inherit "module";   #include <module.h>      constant module_type = MODULE_TAG;   constant module_name = "Pike tag";   constant module_doc = #"   <p>This module adds a processing instruction tag, <code>&lt;?pike ...   ?&gt;</code>, for evaluating Pike code directly in the document.</p>
Roxen.git/server/modules/scripting/piketag.pike:286:    add_constant( "____ih_"+cnt, ipc );    pre += SPLIT("inherit ____ih_"+cnt++ + ";\n",PREFN);    }       if (dom)    pre += SPLIT("void parse(RequestID id)\n{\n",PREFN) +    data + SPLIT("}",POSTFN);    else    pre += data;    program p = compile_string(R(pre), fn); +  if (query ("program_cache_limit") > 0)    program_cache[ s ] = p;       cnt=0;    foreach( ip, program ipc ) add_constant( "____ih_"+cnt++, 0 );    destruct( key );    return p;   }      program handle_inherit( string what, RequestID id )   {
Roxen.git/server/modules/scripting/piketag.pike:468:    request_id->misc->line+")");    if (sizeof(program_cache) > query("program_cache_limit"))    {    array a = indices(program_cache);    int i;       // Zap somewhere between 25 & 50% of the cache.    for(i = query("program_cache_limit")/2; i > 0; i--)    m_delete(program_cache, a[random(sizeof(a))]);    } +  if (query ("program_cache_limit") > 0)    program_cache[s] = p;    }    })    {    master()->set_inhibit_compile_errors(0);    if (e->get())    {    RXML.parse_error ("Error compiling Pike code:\n%s", e->get());    }    else