FreeBSD/contrib/ntp/ntpd/ntp_scanner.c
/* Note: lex_ungetch will fail to track more than one line of push
 * back. But since it guarantees only one char of back storage anyway,
 * this should not be a problem.
 */
lex_ungetch will fail to track more than one line of push
back. But since it guarantees only one char of back storage anyway,
this should not be a problem.
lex_ungetch will fail to track more than one line of push back . But since it guarantees only one char of back storage anyway this should not be a problem .
static int
lex_ungetch(
	int ch,
	struct FILE_INFO *stream
	)
{
	if (NULL == stream || stream->force_eof)
		return EOF;
	if (EOF != stream->backch || EOF == ch)
		return EOF;
	stream->backch = (u_char)ch;
	if (stream->fpi)
		conf_file_sum -= stream->backch;
	if (stream->backch == '\n') {
	    stream->curpos = stream->bakpos;
	    stream->bakpos.ncol = -1;
	}
	stream->curpos.ncol--;
	return stream->backch;
}
static int lex_ungetch ( int ch , struct FILE_INFO * stream ) { if ( NULL == stream || stream -> force_eof ) return EOF ; if ( EOF != stream -> backch || EOF == ch ) return EOF ; stream -> backch = ( u_char ) ch ; if ( stream -> fpi ) conf_file_sum -= stream -> backch ; if ( stream -> backch == ' \n ' ) { stream -> curpos = stream -> bakpos ; stream -> bakpos . ncol = -1 ; } stream -> curpos . ncol -- ; return stream -> backch ; }
Note: lex_ungetch will fail to track more than one line of push
 back.
Note : lex_ungetch will fail to track more than one line of push back .
/* check preconditions */ /* keep for later reference and update checksum */ /* update position */