dot, funvar(dot), dot->id_name, lib);
}
if (ext) {
- report("%L: %s %s also %s at %L",
- dot, funvar(dot), dot->id_name,
- defdec(ext), ext);
+ if (!streq(dot->id_file, ext->id_file)) {
+ report("%L: %s %s also %s at %L",
+ dot, funvar(dot), dot->id_name,
+ defdec(ext), ext);
+ }
}
sta = dot;
dot = new_inpdef();
#include <ctype.h>
-#define INP_NPUSHBACK 2
+#define INP_NPUSHBACK 1
#include <inp_pkg.spec>
#include <inp_pkg.body>
if (!ReadString(id->id_file, '\n', FNAMESIZE))
return 0;
- { extern char loptions[];
- if (loptions['X'])
- print_id("read", id);/*???*/
- }
return (1);
}
*/
int i;
int charcount = 1;
- int n;
if (nrargs < 0) {
/* variable # of args */
}
*buf = '\0';
for (i = 0; i < nrargs; i++) {
+ int n;
+
if (!ReadString(buf, ':', ARGTPSSIZE-charcount-1))
return 0;
n = strlen(buf) + 1;
#include <varargs.h>
#include <system.h>
+#include "private.h"
+#include "class.h"
#include "inpdef.h"
#define MSGOUT STDERR /* filedes on which to write the messages */
#define ERROUT STDERR /* filedes on which to write the panics */
+PRIVATE rep_loc();
+
/* VARARGS */
report(va_alist)
va_dcl
register char fc;
/* First see if the first arg is an inpdef with
- a global file name; if so, skip this message.
+ a global file name not ending in .c; if so,
+ skip this message.
*/
if (f[0] == '%' && f[1] == 'L') {
/* it is an inpdef */
register int i;
case 'L': /* a location item */
id = va_arg(ap, struct inpdef *);
- fprint(MSGOUT, "\"%s\", line %d",
- id->id_file, id->id_line);
+ rep_loc(id);
break;
case 's': /* a string item */
s = va_arg(ap, char *);
va_end(ap);
}
+PRIVATE
+rep_loc(id)
+ struct inpdef *id;
+{
+ if (is_class(id, CL_LIB)) {
+ fprint(MSGOUT, "library file %s", id->id_file);
+ }
+ else {
+ fprint(MSGOUT, "\"%s\", line %d",
+ id->id_file, id->id_line);
+ }
+}
+
/* VARARGS1 */
panic(fmt, args)
char *fmt;