# M A K E F I L E F O R L P A S S 2
# Machine and environ dependent definitions
-EMHOME = /usr/em
+EMHOME = /usr/proj/em/Work
LPASS1 = $(EMHOME)/lang/cem/cemcom
# Libraries and EM interface definitions
OBJ = lpass2.o checkargs.o read.o report.o class.o l_print3ack.o
test: lpass2
- lpass2 -xh <.i
-# make lint.test
+ make lint.test
+# lpass2 -xh <.i
lpass2: $(OBJ) Makefile next.o
PRIVATE chk_argtps();
PRIVATE char *next_atype();
PRIVATE int type_match();
+PRIVATE form_type();
int
type_equal(act, form)
(*nrargs)++;
if (!type_match(id, act_start, form_start)) {
- report("%L: arg %d of %s differs from that in %L",
- id, *nrargs, id->id_name, def);
+ char act_form[100];
+ char form_form[100];
+
+ form_type(act_form, act_start);
+ form_type(form_form, form_start);
+ report("%L: arg %d of %s (%s) differs from that in %L (%s)",
+ id, *nrargs, id->id_name,
+ act_form, def, form_form);
}
act_tp[-1] = ':';
form_tp[-1] = ':';
*fmt++ = '\0';
}
+PRIVATE form_type(buff, tp)
+ char buff[];
+ char *tp;
+{ /* store a formatted version of tp in buff
+ */
+ if (tp[0] == '"') {
+ strcpy(buff, "char*");
+ }
+ else if (tp[0] == '+') {
+ sprintf(buff, "[unsigned] %s", &tp[1]);
+ }
+ else {
+ strcpy(buff, tp);
+ }
+}
+
PATH=/bin:/usr/bin
-EMLINT=/usr/dick/lint
+EMLINT=/home/top/dick/lint
LPASS1="$EMLINT/lpass1/lnt -Dmc68000" # pass 1 program
LPASS2="$EMLINT/lpass2/lpass2" # pass 2 program
switch (ch) {
case 'u':
/* don't report situations like
- "defined/declared but not used"
+ "not used anywhere"
*/
case 'X': /* ??? prints incoming inpdefs */
default: /* and any other */
{
if (same_obj(0) && is_class(dot, CL_EXT|CL_DEF)) {
if (lib) {
- report("%L: %s %s also defined in library %L",
+ report("%L: %s %s also defined in %L",
dot, funvar(dot), dot->id_name, lib);
}
ext = dot;
{
if (same_obj(stnr) && is_class(dot, CL_STAT|CL_DEF)) {
if (lib) {
- report("%L: %s %s also defined in library %L",
+ report("%L: %s %s also defined in %L",
dot, funvar(dot), dot->id_name, lib);
}
if (ext) {
}
else {
if (!loptions['u']) {
- report("%L: %s %s %s but not used",
- def, funvar(def), def->id_name,
- defdec(def));
+ report("%L: %s %s not used anywhere",
+ def, funvar(def), def->id_name);
}
}
}
}
else
if (is_class(id, CL_LIB)) {
- fprint(MSGOUT, "library file %s", id->id_file);
+ fprint(MSGOUT, "library");
}
else {
fprint(MSGOUT, "\"%s\", line %d",