seek(ran->ran_pos);
get_archive_header(&arhdr);
modulname = arhdr.ar_name;
- debug("%s defines %s\n", modulname, string, 0, 0);
+ verbose("defines %s", string, 0, 0, 0);
resolved = TRUE;
/*
* This archive member is going to be linked,
#define debug(s, a1, a2, a3, a4) (DEB && printf(s, a1, a2, a3, a4))
#endif
+
+extern int Verbose;
+#define verbose(s, a1, a2, a3, a4) (Verbose && do_verbose(s, a1, a2, a3, a4))
diag("error", format, a1, a2, a3, a4);
}
+/* VARARGS1 */
+do_verbose(format, a1, a2, a3, a4)
+ char *format;
+{
+ diag((char *) 0, format, a1, a2, a3, a4);
+}
+
static
diag(tail, format, a1, a2, a3, a4)
char *tail;
extern char *progname, *archname, *modulname;
fprintf(stderr, "%s: ", progname);
- if (archname)
+ if (archname && modulname)
+ fprintf(stderr, "%s(%s): ", archname, modulname);
+ else if (archname)
fprintf(stderr, "%s: ", archname);
- if (modulname)
+ else if (modulname)
fprintf(stderr, "%s: ", modulname);
fprintf(stderr, format, a1, a2, a3, a4);
- fprintf(stderr, " (%s)\n", tail);
+ if (tail) fprintf(stderr, " (%s)\n", tail);
+ else putc('\n', stderr);
}
since initially the name table is empty
and an unresolved reference is needed
to force the loading of the first routine.
+.TP
+.B \-v
+For each member of a library that is linked, give a message on standard
+error telling why
+.I led
+chose to link it (which unresolved reference it resolves).
+This option is useful if you have 'multiply defined' problems.
.SH FILES
~em/lib/em_led
a.out output file