From 28059de4efa18062184a3fdbb0f607809fa55eda Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Mon, 10 Jul 2000 19:07:19 +0000 Subject: [PATCH] when a master file ends in a place where a newline is expected, make the warning message say 'file does not end with newline' instead of 'unexpected end of file' to lead the user on the right tracks to fixing the most likely cause. Also, don't include the function name in the message. --- lib/dns/master.c | 8 ++++---- lib/dns/rdata.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/dns/master.c b/lib/dns/master.c index 52d8e79825..6ac1e20531 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: master.c,v 1.57 2000/07/10 05:15:04 marka Exp $ */ +/* $Id: master.c,v 1.58 2000/07/10 19:07:18 gson Exp $ */ #include @@ -126,9 +126,9 @@ on_list(dns_rdatalist_t *this, dns_rdata_t *rdata); do { \ if (isc_lex_isfile(lexer)) \ (*callbacks->warn)(callbacks, \ - "dns_master_load: %s:%lu: unexpected end of file", \ - isc_lex_getsourcename(lexer), \ - isc_lex_getsourceline(lexer)); \ + "%s:%lu: file does not end with newline", \ + isc_lex_getsourcename(lexer), \ + isc_lex_getsourceline(lexer)); \ } while (0) static inline isc_result_t diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index 60f47e3dc8..a13831aaee 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: rdata.c,v 1.102 2000/07/10 05:15:03 marka Exp $ */ +/* $Id: rdata.c,v 1.103 2000/07/10 19:07:19 gson Exp $ */ #include #include @@ -1675,7 +1675,7 @@ static void fromtext_warneof(isc_lex_t *lexer, dns_rdatacallbacks_t *callbacks) { if (isc_lex_isfile(lexer) && callbacks != NULL) (*callbacks->warn)(callbacks, - "dns_rdata_fromtext: %s:%lu: unexpected end of file", + "%s:%lu: file does not end with newline", isc_lex_getsourcename(lexer), isc_lex_getsourceline(lexer)); }