Split streams for warnings and status messages.
uentry ue = usymtab_lookupSafe (ye);
llassert (uentry_isEitherConstant (ue));
- llassertprint (ctype_match (uentry_getType (ue), rrep),
- ("Bad enum: %s / %s",
- uentry_unparse (ue),
- ctype_unparse (rrep)));
-
- uentry_setType (ue, at);
+
+ /* evans 2002-04-22 */
+ if (ctype_isBool (uentry_getType (ue)))
+ {
+ /*
+ ** If set using -booltrue or -boolfalse, don't change the type.
+ */
+ }
+ else
+ {
+ llassertprint (ctype_match (uentry_getType (ue), rrep),
+ ("Bad enum: %s / %s",
+ uentry_unparse (ue),
+ ctype_unparse (rrep)));
+
+ uentry_setType (ue, at);
+ }
}
} end_enumNameList_elements;
}
gc.flags[FLG_WARNSYSFILES] = TRUE;
/*
- ** On by default for Win32, but not Unix (to support MS/VC++ error message format).
+ ** On by default for Win32, but not Unix
*/
# ifdef WIN32
gc.flags[FLG_PARENFILEFORMAT] = TRUE;
+ gc.flags[FLG_CASEINSENSITIVEFILENAMES] = TRUE;
# endif
}
switch (flag)
{
+ /*
+ case FLG_BOOLTRUE:
+ usymtab_supGlobalEntry
+ (uentry_makeConstantValue (val, ctype_bool,
+ fileloc_getBuiltin (), TRUE,
+ multiVal_makeInt (1)));
+ break;
+ case FLG_BOOLFALSE:
+ usymtab_supGlobalEntry
+ (uentry_makeConstantValue (val, ctype_bool,
+ fileloc_getBuiltin (), FALSE,
+ multiVal_makeInt (0)));
+ break;
+ */
case FLG_MESSAGESTREAM:
case FLG_WARNINGSTREAM:
case FLG_ERRORSTREAM:
end_allFlagCodes ;
usymtab_initMod ();
-
context_resetAllFlags ();
assertSet (gc.flags); /* Can't use global in defines */
bool
ctype_isUA (ctype c)
{
- return (!ctype_isUnknown (c) && ctbase_isUA (ctype_getCtbase (c)));
+ return (!ctype_isUnknown (c)
+ && ctbase_isUA (ctype_getCtbase (c)));
}
bool
cstring abspath;
if (ft == NULL) return NOT_FOUND;
abspath = osd_absolutePath (cstring_undefined, s);
+
+ if (context_getFlag (FLG_CASEINSENSITIVEFILENAMES))
+ {
+ abspath = cstring_downcase (abspath);
+ }
+
DPRINTF (("Absolute path: %s: %s", s, abspath));
res = cstringTable_lookup (ft->htable, abspath);
cstring_free (abspath);
ft->nspace--;
DPRINTF (("Adding: %s", e->fname));
- cstringTable_insert (ft->htable, e->fname, ft->nentries);
+
+ if (context_getFlag (FLG_CASEINSENSITIVEFILENAMES))
+ {
+ cstring sd = cstring_downcase (e->fname);
+ cstringTable_insert (ft->htable, sd, ft->nentries);
+ cstring_free (e->fname);
+ }
+ else
+ {
+ cstringTable_insert (ft->htable, e->fname, ft->nentries);
+ }
+
ft->elements[ft->nentries] = e;
ft->nentries++;
fileId
fileTable_lookupBase (fileTable ft, cstring base)
{
- int tindex = fileTable_getIndex (ft, base);
+ int tindex;
+
+ if (context_getFlag (FLG_CASEINSENSITIVEFILENAMES))
+ {
+ cstring dbase = cstring_downcase (base);
+ tindex = fileTable_getIndex (ft, dbase);
+ cstring_free (dbase);
+ }
+ else
+ {
+ tindex = fileTable_getIndex (ft, base);
+ }
if (tindex == NOT_FOUND)
{
cstring s1 = fileloc_getBase (f1);
cstring s2 = fileloc_getBase (f2);
- return (cstring_equal (s1, s2));
+ return (cstring_equal (s1, s2));
}
}
}
"Should use <stdarg.h> instead.",
0, 0
},
+ {
+ FK_HEADERS, FK_FILES, plainFlag,
+ "caseinsensitivefilenames",
+ FLG_CASEINSENSITIVEFILENAMES,
+ "file names are case insensitive (file.h and FILE.H are the same file)",
+ NULL, 0, 0
+ },
/* 14.2 Generating Libraries */
/* start modification */
s->bufinfo.bufstate = BB_NULLTERMINATED;
/* end modification */
- if (ctype_isUA (ct))
+
+ /* evans 2002-04-22: added isManifestBool to avoid errors for -boolfalse initializations */
+ if (!ctype_isManifestBool (ct) && ctype_isUA (ct))
{
typeId uid = ctype_typeId (ct);
uentry te = usymtab_getTypeEntrySafe (uid);
}
}
-
s->oaliaskind = s->aliaskind;
s->oexpkind = s->expkind;
void
usymtab_initBool ()
{
+ DPRINTF (("Init bool!"));
+
if (context_getFlag (FLG_NOLIB))
{
ctype boolt = ctype_bool;
$(SPLINT) fink.c
driverstub:
- $(SPLINT) driverstub.c
+ $(SPLINT) driverstub.c -sysdirs "/usr/"
alignof:
$(SPLINT) alignof.c -expect 2