Beispiel #1
0
static const unsigned char *asmReadLineFromInputFile (void)
{
	static vString *line;
	int c;

	line = vStringNewOrClear (line);

	while ((c = cppGetc()) != EOF)
	{
		if (c == '\n')
			break;
		vStringPut (line, c);
	}

	if ((vStringLength (line) == 0)&& (c == EOF))
		return NULL;
	else
		return (unsigned char *)vStringValue (line);
}
Beispiel #2
0
extern void cppInit (const bool state, const bool hasAtLiteralStrings,
                     const bool hasCxxRawLiteralStrings,
                     const kindOption *defineMacroKind)
{
	BraceFormat = state;

	Cpp.ungetch         = '\0';
	Cpp.ungetch2        = '\0';
	Cpp.resolveRequired = false;
	Cpp.hasAtLiteralStrings = hasAtLiteralStrings;
	Cpp.hasCxxRawLiteralStrings = hasCxxRawLiteralStrings;
	Cpp.defineMacroKind = defineMacroKind;

	Cpp.directive.state     = DRCTV_NONE;
	Cpp.directive.accept    = true;
	Cpp.directive.nestLevel = 0;

	Cpp.directive.ifdef [0].ignoreAllBranches = false;
	Cpp.directive.ifdef [0].singleBranch = false;
	Cpp.directive.ifdef [0].branchChosen = false;
	Cpp.directive.ifdef [0].ignoring     = false;

	Cpp.directive.name = vStringNewOrClear (Cpp.directive.name);
}