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.
This commit is contained in:
Andreas Gustafsson 2000-07-10 19:07:19 +00:00
parent 04d58db327
commit 28059de4ef
2 changed files with 6 additions and 6 deletions

View file

@ -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 <config.h>
@ -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

View file

@ -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 <config.h>
#include <ctype.h>
@ -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));
}