opts->warn_comments = 0;
opts->warnings_are_errors = 0;
+ /* Added 2003-07-10: */
+ opts->traditional = FALSE;
+ opts->c89 = TRUE;
initialize_char_syntax (opts);
}
cpplib_installBuiltin ("__REGISTER_PREFIX__", ctype_string, -1, T_REGISTER_PREFIX_TYPE, 0, NULL, -1);
cpplib_installBuiltin ("__TIME__", ctype_string, -1, T_TIME, 0, NULL, -1);
- /*
- ** No, don't define __STDC__
- **
-
if (!cppReader_isTraditional (pfile))
{
cpplib_installBuiltin ("__STDC__", ctype_int, -1, T_CONST, STDC_VALUE, NULL, -1);
}
- **
- */
-
# ifdef WIN32
cpplib_installBuiltin ("_WIN32", ctype_int, -1, T_CONST, STDC_VALUE, NULL, -1);
# endif
op2:
token = CPP_OTHER;
pfile->only_seen_white = 0;
- op2any:
+ op2any: /* jumped to for \ continuations */
cpplib_reserve(pfile, 3);
cppReader_putCharQ (pfile, c);
- cppReader_putCharQ (pfile, cppReader_getC (pfile));
+
+ /* evans 2003-08-24: This is a hack to fix line output for \
+ continuations. Someday I really should get a decent pre-processor!
+ */
+
+ if (c == '\\') {
+ (void) cppReader_getC (pfile); /* skip the newline to avoid extra lines */
+ } else {
+ cppReader_putCharQ (pfile, cppReader_getC (pfile));
+ }
+
cppReader_nullTerminateQ (pfile);
return token;
case '\\':
c2 = cppReader_peekC (pfile);
+ //! allow other stuff here if a flag is set?
+ DPRINTF (("Got continuation!"));
if (c2 != '\n')
goto randomchar;
token = CPP_HSPACE;