Esempio n. 1
0
File: ppproc.c Progetto: BR903/cppp
/* Partially preprocesses the contents of infile to outfile.
 */
void partialpreprocess(struct ppproc *ppp, void *infile, void *outfile)
{
    beginfile(ppp);
    seterrorline(1);
    while (readline(ppp, infile) && writeline(ppp, outfile))
	advanceline(ppp->line);
    seterrorline(0);
    endfile(ppp);
}
Esempio n. 2
0
File: pp.c Progetto: 0xroot/radare2
/* Partially preprocesses the contents of infile to outfile.
 */
void preprocess_file(CparsePP *pp, void *infile, void *outfile)
{
    begin_pp(pp);
    seterrorline(1);
    while (readline(pp, infile) && writeline(pp, outfile))
	advanceline(pp->line);
    seterrorline(0);
    end_pp(pp);
}
Esempio n. 3
0
File: pp.c Progetto: 0xroot/radare2
char* preprocess_buf(CparsePP *pp, const char *inbuf)
{
	// TODO: implement more dynamic allocation
	char* outbuf = malloc(4098);

	begin_pp(pp);
	seterrorline(1);
	while (readline_buf(pp, inbuf) && writeline_buf(pp, outbuf))
	advanceline(pp->line);
	seterrorline(0);
	end_pp(pp);
	return outbuf;
}