extern bool flags_isModeName (cstring p_s) /*@*/ ;
extern /*@only@*/ cstring describeModes (void) /*@modifies g_messagestream@*/ ;
+extern /*@only@*/ cstring describeMode (/*@observer@*/ cstring mode) /*@*/ ;
extern void summarizeErrors (void) /*@modifies g_messagestream@*/ ;
extern bool flagcode_isNameChecksFlag (flagcode p_f) /*@*/ ;
} end_allFlags ;
}
+cstring
+describeMode (cstring mode)
+{
+ cstringSList sflags = sortedFlags ();
+ cstring res = message ("Predefined mode %s sets: ", mode);
+
+ llassert (flags_isModeName (mode));
+
+ context_setMode (mode);
+
+ cstringSList_elements (sflags, flagname)
+ {
+ flagcode code = flags_identifyFlag (flagname);
+ fflag currentflag = flags[code];
+
+ if (mstring_isDefined (currentflag.desc) && flagcode_isModeFlag (code))
+ {
+ if (context_getFlag (code))
+ {
+ res = message ("%q\n +%s", res, cstring_fromChars (currentflag.flag));
+ }
+ else
+ {
+ res = message ("%q\n -%s", res, cstring_fromChars (currentflag.flag));
+ }
+ }
+ } end_cstringSList_elements;
+
+ cstringSList_free (sflags);
+
+ res = cstring_appendChar (res, '\n');
+ return (res);
+}
+
cstring
describeFlagCode (flagcode flag)
{
return (cstring_makeLiteral ("<invalid>"));
}
+ if (flagcode_isModeName (flag))
+ {
+ return (cstring_makeLiteral ("<mode flag>"));
+ }
+
context_resetAllFlags ();
f = flags[flag];
if (flags_isModeName (flagname))
{
cstring_free (oflagname);
-
- return
- (message ("%s: predefined mode (see Manual for information)",
- flagname));
+ return describeMode (flagname);
}
else
{
{
printMaintainer ();
}
+ else if (flags_isModeName (thisarg))
+ {
+ llmsg (describeMode (thisarg));
+ }
else if (mstring_equal (thisarg, "flags"))
{
if (i + 1 < argc)
message
("Name %s is reserved for future library extensions. "
"Functions that begin with \"mem\" or \"wcs\" and a "
- "lowercase letter letter may be added to <string.h>. (ISO:7.26.11)",
+ "lowercase letter may be added to <string.h>. (ISO:7.26.11)",
name),
uentry_whereLast (ue));
}
names of all existing functions in <math.h> suffixed with 'f' or 'l' may be
added to <math.h>. (ISO:7.26.1)
ansireserved.c:7:13: Name wcst is reserved for future library extensions.
- Functions that begin with "mem" or "wcs" and a lowercase letter letter may
- be added to <string.h>. (ISO:7.26.11)
+ Functions that begin with "mem" or "wcs" and a lowercase letter may be
+ added to <string.h>. (ISO:7.26.11)
ansireserved.c:11:5: Name isaFish is reserved for future library extensions.
Functions beginning with "is" or "to" and a lowercase letter may be added
to <ctype.h>. (ISO99:7.26.2)
names of all existing functions in <math.h> suffixed with 'f' or 'l' may be
added to <math.h>. (ISO:7.26.1)
ansireserved.c:7:13: Name wcst is reserved for future library extensions.
- Functions that begin with "mem" or "wcs" and a lowercase letter letter may
- be added to <string.h>. (ISO:7.26.11)
+ Functions that begin with "mem" or "wcs" and a lowercase letter may be
+ added to <string.h>. (ISO:7.26.11)
ansireserved.c:11:5: Name isaFish is reserved for future library extensions.
Functions beginning with "is" or "to" and a lowercase letter may be added
to <ctype.h>. (ISO99:7.26.2)
names of all existing functions in <math.h> suffixed with 'f' or 'l' may be
added to <math.h>. (ISO:7.26.1)
ansireserved.c:15:22: Name memory is reserved for future library extensions.
- Functions that begin with "mem" or "wcs" and a lowercase letter letter may
- be added to <string.h>. (ISO:7.26.11)
+ Functions that begin with "mem" or "wcs" and a lowercase letter may be
+ added to <string.h>. (ISO:7.26.11)
ansireserved.c:16:20: Name wctomb is reserved for the standard library
Finished checking --- 11 code warnings, as expected
names of all existing functions in <math.h> suffixed with 'f' or 'l' may be
added to <math.h>. (ISO:7.26.1)
ansireserved.c:7:13: Name wcst is reserved for future library extensions.
- Functions that begin with "mem" or "wcs" and a lowercase letter letter may
- be added to <string.h>. (ISO:7.26.11)
+ Functions that begin with "mem" or "wcs" and a lowercase letter may be
+ added to <string.h>. (ISO:7.26.11)
ansireserved.c:11:5: Name isaFish is reserved for future library extensions.
Functions beginning with "is" or "to" and a lowercase letter may be added
to <ctype.h>. (ISO99:7.26.2)
all: testalt boolt uconstants badcomment hoof boolbad booltest ull baz immutable impabsmodule
testalt:
- ${SPLINT} -dump newlint.lcd testalt.c
+ -${SPLINT} -dump newlint.lcd testalt.c
boolt:
- ${SPLINT} -expect 1 +partial +booltype pan_bool_t +booltrue PAN_TRUE +boolfalse PAN_FALSE boolt.c
+ -${SPLINT} -expect 1 +partial +booltype pan_bool_t +booltrue PAN_TRUE +boolfalse PAN_FALSE boolt.c
uconstants:
- ${SPLINT} uconstants.c -expect 2
+ -${SPLINT} uconstants.c -expect 2
badcomment:
- ${SPLINT} badcomment.c -expect 3
+ -${SPLINT} badcomment.c -expect 3
hoof:
- ${SPLINT} hoof.c -expect 1
- ${SPLINT} hoof.c +ignorequals
+ -${SPLINT} hoof.c -expect 1
+ -${SPLINT} hoof.c +ignorequals
ignorecmd:
- ${SPLINT} +ignorecommand -we
+ -${SPLINT} +ignorecommand -we
booltest:
- ${SPLINT} booltest.c -booltype bool -expect 2
- ${SPLINT} booltest.c -booltype bool +boolint
- ${SPLINT} booltest.c -booltype bool -predboolint -expect 1
+ -${SPLINT} booltest.c -booltype bool -expect 2
+ -${SPLINT} booltest.c -booltype bool +boolint
+ -${SPLINT} booltest.c -booltype bool -predboolint -expect 1
boolbad:
- ${SPLINT} -weak -booltype BOOLEAN -booltrue TRUE -boolfalse FALSE boolbad.c
+ -${SPLINT} -weak -booltype BOOLEAN -booltrue TRUE -boolfalse FALSE boolbad.c
ull:
- ${SPLINT} ull.c
+ -${SPLINT} ull.c
baz:
- ${SPLINT} baz.h bimbim.h -I.
+ -${SPLINT} baz.h bimbim.h -I.
immutable:
- ${SPLINT} immutable.c testimmutable.c -expect 2
+ -${SPLINT} immutable.c testimmutable.c -expect 2
impabsmodule:
- ${SPLINT} +impabstract impabsmodule.c -expect 2
+ -${SPLINT} +impabstract impabsmodule.c -expect 2