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.112 1998/03/01 02:42:14 per Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.113 1998/03/06 11:12:10 per 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:1209:    break;    }    }    return s;   }      string tag_gtext_id(string t, mapping arg,    object id, object foo, mapping defines)   {    int short=!!arg->short; +  if(arg->help) return "Arguments are identical to the argumets to &lt;gtext&gt;. This tag returns a url-prefix that can be used to generate gtexts.";    m_delete(arg, "short"); m_delete(arg, "maxlen");    m_delete(arg,"magic"); m_delete(arg,"submit");    extra_args(arg); m_delete(arg,"split");    if(defines->fg && !arg->fg) arg->fg=defines->fg;    if(defines->bg && !arg->bg) arg->bg=defines->bg;   #if efun(get_font)    if(!arg->nfont) arg->nfont=defines->nfont;   #endif    if(!arg->font) arg->font=defines->font   #if !efun(get_font)
Roxen.git/server/modules/graphics/graphic_text.pike:1235:    if(!short)    return query_location()+num+"/";    else    return (string)num;   }      string tag_graphicstext(string t, mapping arg, string contents,    object id, object foo, mapping defines)   {   //Allow <accessed> and others inside <gtext>. -  if(arg->help) -  return register_module()[2]; +     -  +  if(t=="gtext" && arg->help) +  return register_module()[2]; +  else if(arg->help) +  return "This tag calls &lt;gtext&gt; with different default values.";    if(arg->background)    arg->background = fix_relative(arg->background,id);    if(arg->texture)    arg->texture = fix_relative(arg->texture,id);    if(arg->magic_texture)    arg->magic_texture=fix_relative(arg->magic_texture,id);    if(arg->magic_background)    arg->magic_background=fix_relative(arg->magic_background,id);    if(arg->magicbg)    arg->magicbg = fix_relative(arg->magicbg,id);
Roxen.git/server/modules/graphics/graphic_text.pike:1485:    array a=indices(in), b=values(in);    for(int i=0; i<sizeof(a); i++)    if(lower_case(b[i])!=a[i])    if(search(b,"\"")==-1)    a[i]+="=\""+b[i]+"\"";    else    a[i]+="='"+b[i]+"'";    return a*" ";   }    - array (string) tag_body(string t, mapping args, object id, object file, + string|array (string) tag_body(string t, mapping args, object id, object file,    mapping defines)   {    int cols,changed; -  +  if(args->help) return "This tag is parsed by &lt;gtext&gt; to get the document colors.";    if(args->bgcolor||args->text||args->link||args->alink    ||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(args->Y[0]!='#'){args->Y=ns_color(parse_color(args->Y));changed=1;}}}while(0)       if(!search(id->client*"","Mosaic"))    {    FIX(bgcolor,"#bfbfbf",bg);    FIX(text, "#000000",fg);
Roxen.git/server/modules/graphics/graphic_text.pike:1513:    FIX(bgcolor,"#c0c0c0",bg);    FIX(text, "#000000",fg);    FIX(link, "#0000ee",link);    FIX(alink, "#ff0000",alink);    FIX(vlink, "#551a8b",vlink);    }    if(changed) return ({make_tag("body", args) });   }       - array (string) tag_fix_color(string tagname, mapping args, object id, object file, -  mapping defines) + string|array(string) tag_fix_color(string tagname, mapping args, object id, +  object file, mapping defines)   {    int changed;    -  +  if(args->help) return "This tag is parsed by &lt;gtext&gt; to get the document colors.";    if(!id->misc->colors)    id->misc->colors = ({ ({ defines->fg, defines->bg, tagname }) });    else    id->misc->colors += ({ ({ defines->fg, defines->bg, tagname }) });   #undef FIX   #define FIX(X,Y) if(args->X && 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)+">"});    return 0;   }    - void pop_color(string tagname,mapping args,object id,object file, + string|void pop_color(string tagname,mapping args,object id,object file,    mapping defines)   {    array c = id->misc->colors; -  +  if(args->help) return "This end-tag is parsed by &lt;gtext&gt; to get the document colors.";    if(!c ||!sizeof(c)) return;    int i;    tagname = tagname[1..];       for(i=0;i<sizeof(c);i++)    if(c[-i-1][2]==tagname)    {    defines->fg = c[-i-1][0];    defines->bg = c[-i-1][1];    break;