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.157 1999/03/11 23:03:31 mast Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.158 1999/03/23 22:24:54 mast Exp $";   constant thread_safe=1;      #include <config.h>   #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0
Roxen.git/server/modules/graphics/graphic_text.pike:690:    call_out(clean_cache_dir, 3600);   }      void start(int|void val, object|void conf)   {    loaded = 1;       if(conf)    {    mkdirhier( query( "cache_dir" )+"/.foo" ); - #ifndef __NT__ - #if efun(chmod) -  // FIXME: Should this error be propagated? -  catch { chmod( query( "cache_dir" ), 0777 ); }; - #endif - #endif +     remove_call_out(clean_cache_dir);    call_out(clean_cache_dir, 10);    mc = conf;    base_key = "gtext:"+(conf?conf->name:roxen->current_configuration->name);    }   }      #ifdef QUANT_DEBUG   void print_colors(array from)   {
Roxen.git/server/modules/graphics/graphic_text.pike:782:    if(!fd) return 0;    catch {    array r = decode_value(fd->read());    if(r[0]==a && r[1]==b) return r[2];    };   }      void store_cache_file(string a, string b, array data)   {    object fd = open(FNAME(a,b), "wct"); - #ifndef __NT__ - #if efun(chmod) -  // FIXME: Should this error be propagated? -  catch { chmod( FNAME(a,b), 0666 ); }; - #endif - #endif +     if(!fd) return;    fd->write(encode_value(({a,b,data})));    destruct(fd);   }         array(int)|string write_text(int _args, string text, int size, object id)   {    string key = base_key+_args;    array err;
Roxen.git/server/modules/graphics/graphic_text.pike:1111:    NUMBER_UNLOCK();    }   }      void save_cached_args()   {    restore_cached_args();    object o = open(ARGHASH, "wct");    if(o)    { - #ifndef __NT__ - #if efun(chmod) -  // FIXME: Should this error be propagated? -  catch { chmod( ARGHASH, 0666 ); }; - #endif - #endif +     string data=encode_value(cached_args);    catch {    object q;    if(sizeof(indices(q=Gz)))    data=q->deflate()->deflate(data);    };    o->write(data);    }   }