bug in pp-c ( or possibly parse-c )

eg on parse-prolog.c from the prolog tools :-

parse-c -i parse-prolog.c | pp-c > pp_parse_prolog.c

turns this :-

>>>>

ATerm last_0_0 (ATerm t)
{
ATerm i_2 = NULL,j_2 = NULL;
if(((ATgetType(t) == AT_LIST) && !(ATisEmpty(t))))
{
i_2 = ATgetFirst((ATermList) t);
j_2 = (ATerm) ATgetNext((ATermList) t);
}
else
_fail(t);
t = j_2;
if(((ATgetType(t) == AT_LIST) && ATisEmpty(t)))
{
t = i_2;
}
else
{
t = j_2;
t = last_0_0(t);
}
return(t);
}

<<<<

into this :-

>>>>

ATerm last_0_0 (ATerm t)
{
ATerm i_2 = NULL,j_2 = NULL;
if(((ATgetType(t) == AT_LIST) & &(!(ATisEmpty(t)))))
{
i_2 = ATgetFirst((ATermList) t);
j_2 = (ATerm) ATgetNext((ATermList) t);
}
else
_fail(t);
t = j_2;
if(((ATgetType(t) == AT_LIST) & &(ATisEmpty(t))))
{
t = i_2;
}
else
{
t = j_2;
t = last_0_0(t);
}
return(t);
}

<<<<

Submitted on 31 May 2005 at 16:52

On 19 October 2005 at 15:56 Jira commented:

STR-308, rbvermaa:
was already fixed by visser in r. 12409

Log in to post comments