Branch: Tag:

2010-11-11

2010-11-11 10:10:17 by Erik Dahl <erikd@roxen.com>

Fix Parser.Tabular to support Stdio.File objects. Fixes [bug 5792].

Pike v7.8 release 468 running Hilfe v3.5 (Incremental Pike Frontend)
> Parser.Tabular(Stdio.File("data.csv"), Stdio.File("format.csv"));

Does not work.

If you change those into Stdio.FILE objects everything is fine.

666:    input="";    if(stringp(input))    input=Stdio.FakeFile(input); -  if(!input->unread) -  (input=Stdio.FILE())->assign(input); +  if(!input->unread) { +  Stdio.FILE tmpf = Stdio.FILE(); +  tmpf->assign(input); +  input = tmpf; +  }    int started=0;    int lineno=0;    string beginend="Tabular description ";