pike.git / bin / mkxml.pike

version» Context lines:

pike.git/bin/mkxml.pike:1: - /* $Id: mkxml.pike,v 1.32 2001/07/27 00:48:38 nilsson Exp $ */ + /* $Id: mkxml.pike,v 1.33 2001/07/28 06:46:07 nilsson Exp $ */      string IMAGE_DIR = "../autodoc/src_images/";   string makepic1;   string makepic2;   string execute;      mapping parse=([ " appendix":([]) ]);   int illustration_counter;      #define error(X) throw( ({ (X), backtrace()[0..sizeof(backtrace())-2] }) )
pike.git/bin/mkxml.pike:409:    "`>=":"`&gt;=",    "`<=":"`&lt;=",    "`&":"`&amp;",   ]);      void docdecl(string enttype,    string decl,    object f)   {    string rv,name,params=0; -  sscanf(decl,"%s %s(%s",rv,name,params); +  sscanf(decl,"%s %s(%s",rv,name,params) == 3 || +  sscanf(decl+"\n","%s %s\n",rv,name);       if (convname[name]) name=convname[name];       f->write("<"+enttype+" name="+S(name)+">");       if (params)    {          string paramlist(string in) {
pike.git/bin/mkxml.pike:543:    f->write("<docgroup homogen-type="+S(enttype));    if(huh->decl) {    lambda() {    string m,n;       array decl;    if(!arrayp(huh->decl))    decl = ({ huh->decl });    else    decl = huh->decl; -  +     foreach(decl, string prot) { -  sscanf(prot, "%*s %s(", n); +  sscanf(prot, "%*s %s(", n)==2 || +  sscanf(prot, "%*s %s ", n)==2 || +  sscanf(prot+"\n", "%*s %s\n", n);    if(!m) { m=n; continue; }    if(n!=m) return;    }    if(convname[m]) m=convname[m];    f->write(" homogen-name="+S(m));    }();    }    f->write(">\n");    -  if (huh->decl) -  { +  if (huh->decl) {    foreach (arrayp(huh->decl)?huh->decl:({huh->decl}),string decl) -  { +     docdecl(enttype,decl,f);    } -  } +     else -  foreach (names,string name) -  { +  foreach (names,string name) {    if (convname[name]) name=convname[name];    f->write("<"+enttype+" name="+S(name)+">\n");    f->write("</"+enttype+">");    }    break;    }    f->write("<source-position " + huh->_line + "/>\n");      // [DESCRIPTION]   
pike.git/bin/mkxml.pike:688:    f->write("<doc>\n"+res+"\n</doc>\n");    }      // ---childs----       if (huh->constants)    {    foreach(huh->constants,mapping m)    {    sscanf(m->decl,"%s %s",string type,string name); -  sscanf(name,"%s=%s",name,string value); +  sscanf(name,"%s=",name);    document("constant",m,prefix+name,prefix+name+".",f);    }    }       if (huh->variables)    {    foreach(huh->variables,mapping m)    {    sscanf(m->decl,"%s %s",string type,string name);    if (!name) name=m->decl,type="mixed";