Skip to content
Snippets Groups Projects
Commit e23177f7 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

better trace of included file (kind-of ad hoc)

Rev: tutorial/Sgml.pmod:1.11
parent 399cf460
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,19 @@ class Tag
if(f->open(file,"r"))
{
string *x=f->read(pos-1)/"\n";
string f;
int i=0,l;
foreach (reverse(x),string s)
if (sscanf(s,"<!-- %s line %d -->",f,l))
return
sprintf("line %d col %d in file %s "
"/ generated from %s line %d (start line %d)",
sizeof(x)+1,strlen(x[-1])+1,file,
f,l+i,l);
else
if (i++ > 50) break;
return sprintf("line %d col %d in file %s",sizeof(x)+1,strlen(x[-1])+1,file);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment