Branch: Tag:

1998-11-18

1998-11-18 04:54:36 by Per Hedbor <ph@opera.com>

Better locale support, moved parse_rxml to the configuration object, started workd on the new configuration interface

Rev: server/base_server/cache.pike:1.22
Rev: server/base_server/config/describers.pike:1.58
Rev: server/base_server/config/low_describers.pike:1.28
Rev: server/base_server/configlocale.pike:1.1
Rev: server/base_server/configuration.pike:1.167
Rev: server/base_server/fonts.pike:1.25
Rev: server/base_server/mainconfig.pike:1.116
Rev: server/base_server/module.pike:1.36
Rev: server/base_server/module_support.pike:1.19
Rev: server/base_server/roxen.pike:1.252
Rev: server/base_server/roxenlib.pike:1.89
Rev: server/base_server/roxenloader.pike:1.80
Rev: server/base_server/rxml.pike:1.1
Rev: server/base_server/wizard.pike:1.77
Rev: server/config_actions/cachestatus.pike:1.4
Rev: server/config_actions/debuginformation.pike:1.16
Rev: server/config_actions/feature_list.pike:1.4
Rev: server/config_actions/flush.pike:1.7
Rev: server/config_actions/listfonts.pike:1.4
Rev: server/config_actions/problems.pike:1.12
Rev: server/config_actions/reloadconfiginterface.pike:1.9
Rev: server/etc/include/roxen.h:1.8
Rev: server/etc/roxen_master.pike:1.49
Rev: server/modules/directories/indexfiles.pike:1.7
Rev: server/modules/filters/auto_gzip.pike:1.5
Rev: server/modules/graphics/business_graphics/business.pike:1.110
Rev: server/modules/graphics/counter.pike:1.22
Rev: server/modules/graphics/graphic_text.pike:1.156
Rev: server/modules/graphics/pimage.pike:1.12
Rev: server/modules/graphics/rimage/rimage.pike:1.8
Rev: server/modules/logging/home_logger.pike:1.19
Rev: server/modules/misc/gtext_creator.pike:1.1
Rev: server/modules/misc/language.pike:1.17
Rev: server/modules/misc/mirrorserver.pike:1.14
Rev: server/modules/proxies/ftpgateway.pike:1.26
Rev: server/modules/proxies/gopher.pike:1.15
Rev: server/modules/proxies/wais.pike:1.12
Rev: server/modules/scripting/cgi.pike:1.106
Rev: server/modules/scripting/pikescript.pike:1.30
Rev: server/modules/tags/doc/graphic_text:1.5
Rev: server/modules/tags/htmlparse.pike:1.153
Rev: server/modules/tags/lpctag.pike:1.19
Rev: server/modules/tags/wizard_tag.pike:1.18
Rev: server/protocols/ftp.pike:1.97
Rev: server/protocols/http.pike:1.121
Rev: server/start:1.54

1: - constant cvs_version="$Id: graphic_text.pike,v 1.155 1998/11/06 15:22:50 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.156 1998/11/18 04:54:15 per Exp $";   constant thread_safe=1;      #include <module.h>
185:    object file;    object img;    -  if(!(data=roxen->try_get_file(fix_relative(f, id),id))) +  if(!(data=id->conf->try_get_file(f, id)))    if(!(file=open(f,"r")) || (!(data=file->read())))    return 0; - //werror("Read "+strlen(data)+" bytes.\n"); +  if(file) destruct(file);   #if constant(Image.GIF.decode)    catch { if(!img) img = Image.GIF.decode( data ); };   #endif
198: Inside #if constant(Image.PNG.decode)
  #if constant(Image.PNG.decode)    catch { if(!img) img = Image.PNG.decode( data ); };   #endif - #if constant(Image.PNM.decode) +     catch { if(!img) img = Image.PNM.decode( data ); }; - #endif +     if(!img) return 0;    last_image = img; last_image_name = f;    return img->copy();
704:    if(conf)    {    mkdirhier( query( "cache_dir" )+"/.foo" ); - #ifndef __NT__ - #if efun(chmod) + #if constant(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;
753:   void store_cache_file(string a, string b, array data)   {    object fd = open(FNAME(a,b), "wct"); - #ifndef __NT__ - #if efun(chmod) + #if constant(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);
869:    }      // Quantify -  int q = (int)args->quant||(args->background||args->texture?250:QUERY(cols)); +  int q=(int)args->quant||(args->background||args->texture?250:QUERY(cols));       if(q>255) q=255;    if(q<3) q=3;    - // if(!args->fs) - // img = img->map_closest(img->select_colors(q-1)+ - // ({parse_color(args->bg)})); +  if(!args->fs) +  img = img->map_closest(img->select_colors(q-1)+ +  ({parse_color(args->bg)}));       if(!args->scroll)    if(args->fadein)
1063:    object o = open(ARGHASH, "wct");    if(o)    { - #ifndef __NT__ - #if efun(chmod) + #if constant(chmod)    // FIXME: Should this error be propagated?    catch { chmod( ARGHASH, 0666 ); };   #endif - #endif +     string data=encode_value(cached_args);    catch {    object q;
1134:    " setTimeout(\"top.window.status = '\"+txt+\"'\", 100);\n"    "}\n"    "</script>\n"); -  +    }         string magic_image(string url, int xs, int ys, string sn,    string image_1, string image_2, string alt, -  string mess,object id,string input,string extra_args,string lp) +  string mess,object id,string input, +  string extra_args,string lp)   {    if(!id->supports->images) return (lp?lp:"")+alt+(lp?"</a>":"");    if(!id->supports->netscape_javascript)
1465:    ||args->background||args->vlink)    cols=1;    - #define FIX(Y,Z,X) do{if(!args->Y || args->Y==""){if(cols){defines->X=Z;args->Y=Z;changed=1;}}else{defines->X=args->Y;if(QUERY(colormode)&&args->Y[0]!='#'){args->Y=ns_color(parse_color(args->Y));changed=1;}}}while(0) + #define FIX(Y,Z,X) do{if(!args->Y || args->Y==""){if(cols){defines->X=Z;args->Y=Z;changed=1;}}else{defines->X=args->Y;catch{if(QUERY(colormode)&&args->Y[0]!='#'){args->Y=ns_color(parse_color(args->Y));changed=1;}};}}while(0)       if(!search((id->client||({}))*"","Mosaic"))    {
1512:   string|void pop_color(string tagname,mapping args,object id,object file,    mapping defines)   { -  if(args->help) return "This end-tag is parsed by &lt;gtext&gt; to get the document colors."; +  if(args->help) +  return "This end-tag is parsed by &lt;gtext&gt; to get the document colors.";    array c = id->misc->colors;    if(!c ||!sizeof(c))    return;
1527:    defines->bg = c[-i-1][1];    break;    } -  c = c[..sizeof(c)-i-2]; -  id->misc->colors = c; +  id->misc->colors = c[..sizeof(c)-i-2];   }      mapping query_tag_callers()