pike.git / bin / mkxml.pike

version» Context lines:

pike.git/bin/mkxml.pike:1: - /* $Id: mkxml.pike,v 1.12 2001/05/06 16:07:55 grubba Exp $ */ + /* $Id: mkxml.pike,v 1.13 2001/05/06 18:52:04 grubba Exp $ */      import Stdio;   import Array;      mapping parse=([]);   int illustration_counter;      mapping manpage_suffix=   ([    "Image":"i",
pike.git/bin/mkxml.pike:286:    t=v;    }    if (search(t,"<ref")!=-1)    {    werror("%O\n",t);    error("buu\n");    }       s+=htmlify(t);    +  // Paragraph handling.    t=s; s="";    for (;;)    {    string a,b,c;    if (sscanf(t,"%s<%s>%s",a,b,c)<3) break;       if (b[..11]=="illustration" &&    sscanf(t,"%s<illustration%s>%s</illustration>%s",t,q,u,v)==4)    { -  s+=replace(t,"\n\n","\n\n<p>")+ +  s+="<p>"+replace(t,"\n\n","\n\n</p><p>")+    "<illustration __from__='"+where+"' src=image_ill.pnm"+q+">\n"    +replace(u,"lena()","src")+"</illustration>";    t=v;    }    else if (b[..2]=="pre" &&    sscanf(t,"%s<pre%s>%s</pre>%s",t,q,u,v)==4)    { -  s+=replace(t,"\n\n","\n\n<p>")+ -  "<pre"+q+">\n"+u+"</pre>"; +  s+="<p>"+replace(t,"\n\n","\n\n</p><p>")+ +  "<pre"+q+">\n"+u+"</pre></p>";    t=v;    }    else    { -  s+=replace(a,"\n\n","\n\n<p>")+"<"+b+">"; +  s+="<p>"+replace(a,"\n\n","\n\n</p><p>")+"<"+b+"></p>";    t=c;    }    } -  s+=replace(t,"\n\n","\n\n<p>"); +  s+="<p>"+replace(t,"\n\n","\n\n</p><p>")+"</p>";    -  return s; +  return replace(s, "<p></p>", "");   }         multiset(string) get_method_names(string *decls)   {    string decl,name;    multiset(string) names=(<>);    foreach (decls,decl)    {    sscanf(decl,"%*s%*[\t ]%s%*[\t (]%*s",name);