Branch: Tag:

2000-03-10

2000-03-10 03:36:49 by Martin Nilsson <mani@lysator.liu.se>

Newstyled crypt. Fixed expr bug.

Rev: server/modules/tags/rxmltags.pike:1.93

7:   #define _rettext id->misc->defines[" _rettext"]   #define _ok id->misc->defines[" _ok"]    - constant cvs_version="$Id: rxmltags.pike,v 1.92 2000/03/10 00:40:29 nilsson Exp $"; + constant cvs_version="$Id: rxmltags.pike,v 1.93 2000/03/10 03:36:49 nilsson Exp $";   constant thread_safe=1;   constant language = roxen->language;   
886:   #undef HASH   }    - string|array(string) container_crypt( string s, mapping m, -  string c, RequestID id ) - { -  if(m->compare) return crypt(c,m->compare)?"<true />":"<false />"; -  return ({ crypt(c) }); + class TagCrypt { +  inherit RXML.Tag; +  constant name = "crypt"; +  +  class Frame { +  inherit RXML.Frame; +  +  array do_return(RequestID id) { +  if(args->compare) { +  _ok=crypt(content,args->compare); +  return 0;    } -  +  result=crypt(content); +  return 0; +  } +  } + }      class TagFor {    inherit RXML.Tag;
918:    to=from;    return diff;    } -  werror("%d\n",count); +     count+=step;    RXML.user_set_var(args->variable, count, args->scope);    if(to<from) return count>=to;
1296:   {    multiset value=(<>);    if(m->value) value=mkmultiset((m->value||"")/(m->separator||",")); -  if(m->variable) value+=mkmultiset(({id->variables[m->variable]})); +  if(m->variable) value+=(<RXML.user_get_var(m->variable, m->scope)>);    c = parse_rxml(c, id );    if(value==(<>)) return ({c});   
1459:    inherit RXML.Tag;    constant name = "if";    constant plugin_name = "expr"; -  int `() (string u) { +  int eval(string u) {    return (int)sexpr_eval(u);    }   }
1473:    return tag_modified("modified", m, id, id);   }    +    // --------------------- Documentation -----------------------      TAGDOCUMENTATION;