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]);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to