svn commit: r367204 - head/usr.bin/calendar
Stefan Eßer
se at FreeBSD.org
Sat Oct 31 13:55:10 UTC 2020
Author: se
Date: Sat Oct 31 13:55:10 2020
New Revision: 367204
URL: https://svnweb.freebsd.org/changeset/base/367204
Log:
Add file names and line numbers to debug messages
MFC after: 3 days
Modified:
head/usr.bin/calendar/io.c
Modified: head/usr.bin/calendar/io.c
==============================================================================
--- head/usr.bin/calendar/io.c Sat Oct 31 13:32:08 2020 (r367203)
+++ head/usr.bin/calendar/io.c Sat Oct 31 13:55:10 2020 (r367204)
@@ -448,7 +448,8 @@ cal_parse(FILE *in, FILE *out)
if (count < 0) {
/* Show error status based on return value */
if (debug)
- fprintf(stderr, "Ignored: %s\n", buf);
+ fprintf(stderr, "Ignored: \"%s\" in %s/%s/%s line %d\n",
+ buf, cal_home, cal_dir, cal_file, cal_line);
if (count == -1)
continue;
count = -count + 1;
@@ -468,7 +469,8 @@ cal_parse(FILE *in, FILE *out)
(void)strftime(dbuf, sizeof(dbuf),
d_first ? "%e %b" : "%b %e", &tm);
if (debug)
- fprintf(stderr, "got %s\n", pp);
+ fprintf(stderr, "got \"%s\" in %s/%s/%s line %d\n",
+ pp, cal_home, cal_dir, cal_file, cal_line);
events[i] = event_add(year[i], month[i], day[i], dbuf,
((flags &= F_VARIABLE) != 0) ? 1 : 0, pp,
extradata[i]);
More information about the svn-src-head
mailing list