Branch: Tag:

1998-08-17

1998-08-17 04:24:00 by Peter Bortas <zino@lysator.liu.se>

Fixed not to damage defines->line. Now uses id->misc->line.

Rev: server/modules/tags/htmlparse.pike:1.131
Rev: server/modules/tags/wizard_tag.pike:1.14

3:    * made by Per Hedbor    */    - constant cvs_version = "$Id: wizard_tag.pike,v 1.13 1998/08/05 14:38:54 grubba Exp $"; + constant cvs_version = "$Id: wizard_tag.pike,v 1.14 1998/08/17 04:24:00 peter Exp $";   constant thread_safe=1;   #include <module.h>   inherit "module";
41:   string tag_wizard(string t, mapping args, string contents, object id,    object file, mapping defines)   { -  if(!defines->line) -  defines->line=-1; +  if(!id->misc->line) +  id->misc->line=-1;    mapping f = ([ "pages":({}) ]);    string pike = ("inherit \"wizard\";\n" +   #if (__VERSION__ >= 0.6) -  sprintf("# "+defines->line+" %O\n" +  sprintf("# "+id->misc->line+" %O\n"    "string name = %O;\n",    id->not_query, (args->name||"unnamed"))   #else -  "# "+defines->line+" \""+id->not_query+"\"\n" +  "# "+id->misc->line+" \""+id->not_query+"\"\n"    "string name=\""+(args->name||"unnamed") + "\";\n"   #endif /* __VERSION__ >= 0.6 */    );
58:    foreach(glob("*-label", indices(args)), string a)    {   #if __VERSION__ >= 0.6 -  pike += sprintf("# "+defines->line+" %O\n", +  pike += sprintf("# "+id->misc->line+" %O\n",    id->not_query);    pike += sprintf(" string "+replace(replace(a,"-","_"),({"(",")","+",">"}),    ({"","","",""}))+    " = %O;\n", args[a]);   #else -  pike += ("# "+defines->line+" \""+id->not_query+"\"\n"); +  pike += ("# "+id->misc->line+" \""+id->not_query+"\"\n");    pike += " string "+replace(replace(a,"-","_"),({"(",")","+",">"}),    ({"","","",""}))+    " = \""+replace(args[a], ({"\"","\n","\r", "\\"}),
76:    if(args->ok)    {   #if __VERSION__ >= 0.6 -  pike += sprintf("# "+defines->line+" %O\n", id->not_query); +  pike += sprintf("# "+id->misc->line+" %O\n", id->not_query);    pike += sprintf("mixed wizard_done(object id)\n"    "{\n"    " id->not_query = %O;\n\""+
84: Inside #if __VERSION__ >= 0.6
   "}\n\n",    fix_relative(args->ok, id));   #else -  pike += ("# "+defines->line+" \""+id->not_query+"\"\n"); +  pike += ("# "+id->misc->line+" \""+id->not_query+"\"\n");    pike += ("mixed wizard_done(object id)\n"    "{\n"    " id->not_query = \""+
99:    ([]),    ([ "page":internal_page,    "done":internal_done ]), -  (int)defines->line,f); +  (int)id->misc->line,f);    if (f->done && !args->ok) {   #if __VERSION__ >= 0.6    pike += sprintf("mixed wizard_done(object id)\n"