Do not initialize the code translation engine when only pre-processing
This commit is contained in:
parent
954e91a4d6
commit
265ed8f930
13
src/c99.c
13
src/c99.c
@ -55,15 +55,20 @@ C99 * c99_new(C99Prefs const * prefs, char const * pathname)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if((c99->outfile = _new_outfile(prefs->flags, prefs->outfile, pathname))
|
if((c99->outfile = _new_outfile(prefs->flags, prefs->outfile, pathname))
|
||||||
== NULL
|
== NULL)
|
||||||
|| (c99->code = code_new(prefs, c99->outfile)) == NULL)
|
|
||||||
{
|
{
|
||||||
c99_delete(c99);
|
c99_delete(c99);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* if not pre-processing we can already return */
|
if(!(prefs->flags & C99PREFS_E)) /* we're not pre-processing */
|
||||||
if(!(prefs->flags & C99PREFS_E))
|
{
|
||||||
|
if((c99->code = code_new(prefs, c99->outfile)) == NULL)
|
||||||
|
{
|
||||||
|
c99_delete(c99);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
return c99;
|
return c99;
|
||||||
|
}
|
||||||
if(c99->outfile[0] == '\0')
|
if(c99->outfile[0] == '\0')
|
||||||
{
|
{
|
||||||
c99->outfp = stdout;
|
c99->outfp = stdout;
|
||||||
|
Loading…
Reference in New Issue
Block a user