diff options
Diffstat (limited to 'lib/isc/lex.c')
-rw-r--r-- | lib/isc/lex.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/isc/lex.c b/lib/isc/lex.c index aa3a6c9ffd59..ce1c5599412f 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2013, 2014 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2013-2015 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -41,6 +41,7 @@ typedef struct inputsource { isc_boolean_t is_file; isc_boolean_t need_close; isc_boolean_t at_eof; + isc_boolean_t last_was_eol; isc_buffer_t * pushback; unsigned int ignored; void * input; @@ -202,6 +203,7 @@ new_source(isc_lex_t *lex, isc_boolean_t is_file, isc_boolean_t need_close, source->is_file = is_file; source->need_close = need_close; source->at_eof = ISC_FALSE; + source->last_was_eol = lex->last_was_eol; source->input = input; source->name = isc_mem_strdup(lex->mctx, name); if (source->name == NULL) { @@ -289,6 +291,7 @@ isc_lex_close(isc_lex_t *lex) { return (ISC_R_NOMORE); ISC_LIST_UNLINK(lex->sources, source, link); + lex->last_was_eol = source->last_was_eol; if (source->is_file) { if (source->need_close) (void)fclose((FILE *)(source->input)); |