Branch: Tag:

1997-09-12

1997-09-12 06:14:41 by Per Hedbor <ph@opera.com>

'Privs' introduced

Rev: server/base_server/configuration.pike:1.77
Rev: server/base_server/disk_cache.pike:1.28
Rev: server/base_server/hosts.pike:1.13
Rev: server/base_server/neighborhood.pike:1.26
Rev: server/base_server/read_config.pike:1.14
Rev: server/base_server/roxen.pike:1.130
Rev: server/base_server/roxenloader.pike:1.41
Rev: server/modules/filesystems/filesystem.pike:1.22
Rev: server/modules/graphics/graphic_text.pike:1.71
Rev: server/modules/logging/home_logger.pike:1.11
Rev: server/modules/misc/mirrorserver.pike:1.6
Rev: server/modules/misc/userdb.pike:1.16
Rev: server/modules/scripting/cgi.pike:1.37
Rev: server/modules/scripting/pikescript.pike:1.15
Rev: server/modules/tags/htmlparse.pike:1.43
Rev: server/modules/tags/killframe.pike:1.10
Rev: server/protocols/http.pike:1.43

1: - constant cvs_version="$Id: graphic_text.pike,v 1.70 1997/09/11 21:15:17 js Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.71 1997/09/12 06:14:32 per Exp $";   constant thread_safe=1;      #include <module.h>
25:    "graphical one. Not all that useful, really.<br>\n"    "<br>\n"    "<b>Common arguments:</b>\n <pre>" +  " verbatim Do not try to be typographically correct\n"    " bg=color Use this background, default taken from the\n"    " &lt;body&gt; tag, if any\n"    " fg=color Use this foreground, default taken from the\n"
801:   void restore_cached_args()   {    args_restored = 1; +  object privs = Privs("Reading gtext argument list");    object o = open(".gtext_args_"+hash(mc->name), "r");    if(o)    {
824:      void save_cached_args()   { +  int on; +  on = number;    restore_cached_args(); -  +  object privs = Privs("Saving gtext argument list"); +  if(on > number) number=on;    object o = open(".gtext_args_"+hash(mc->name), "wct");    string data=encode_value(cached_args);    catch {
1099:    }       array size = write_text(num,gt,1,id); +  if(!size) { +  return ("<font size=+1><b>Missing font or other similar error -- " +  "failed to render text</b></font>"); +  }    if(magic)    {    string res = "";
1196:    id->misc->colors = ({ ({ defines->fg, defines->bg, tagname }) });    else    id->misc->colors += ({ ({ defines->fg, defines->bg, tagname }) }); - // perror("Push color "+tagname+"\n"); + #undef FIX   #define FIX(X,Y) if(args->X){defines->Y=args->X;if(args->X[0]!='#'){args->X=ns_color(parse_color(args->X));changed = 1;}}       FIX(bgcolor,bg);    FIX(text,fg);    FIX(color,fg); -  if(changed)return ("<"+tagname+" "+make_args(args)+">"); +  if(changed) return ("<"+tagname+" "+make_args(args)+">");    return 0;   }   
1217:    {    defines->fg = c[-1][0];    defines->bg = c[-1][1]; - // perror("Pop color "+tagname+" ("+ - // (sizeof(id->misc->colors)-sizeof(c)+1)+")\n"); +     break;    }    c = c[..sizeof(c)-2];
1242:    "/body":pop_color,    "/table":pop_color,    "/layer":pop_color, -  "/ilayer":pop_color, ])); +  "/ilayer":pop_color, +  ]));   }      
1255:    "gh5":tag_graphicstext, "gh6":tag_graphicstext,    "gtext":tag_graphicstext, ]);   } -  -  -  -  +