Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.142 1998/08/14 12:20:02 neotron Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.143 1998/08/14 12:33:29 neotron Exp $";   constant thread_safe=1;      #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0   #endif /* VAR_MORE */
Roxen.git/server/modules/graphics/graphic_text.pike:1099:    if(sizeof(indices(q=Gz)))    data=q->deflate()->deflate(data);    };    o->write(data);   }      mapping find_cached_args(int num)   {    if(!args_restored) restore_cached_args();    if(cached_args[num]) return cached_args[num]; + #if 0 +  This can be really slow. If the args are restored, we should be happy anyway.    restore_cached_args();    if(cached_args[num]) return cached_args[num]; -  + #endif    return 0;   }            int find_or_insert(mapping find)   {    mapping f2 = copy_value(find);    foreach(glob("magic_*", indices(f2)), string q) m_delete(f2,q);    if(!args_restored) restore_cached_args();    array a = indices(cached_args);    array b = values(cached_args);    int i;    for(i=0; i<sizeof(a); i++) if(equal(f2, b[i])) return a[i]; -  + #if 0 +  Again often a bad idea. Maybe should be a configurable option +  (could be useful if you run several servers against the same cache fiel, +  which you 2    restore_cached_args();    for(i=0; i<sizeof(a); i++) if(equal(f2, b[i])) return a[i]; -  + #endif    cached_args[number]=f2; // Save the same that you try to restore, please.    remove_call_out(save_cached_args);    call_out(save_cached_args, 10);    return number++;   }         string magic_javascript_header(object id)   {    if(!id->supports->netscape_javascript || !id->supports->images) return "";