From a38c23f5575f9b1b0ebc71503241b18074aaa4d6 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Mon, 13 Feb 2023 16:02:25 +0200 Subject: [PATCH] system/cle.c: Fix configuration for CONFIG_EOL_IS_EITHER_CRLF=y The old flagging was insufficient, only '\r' was accepted as a line terminator if CONFIG_EOL_IS_EITHER_CRLF was set. I noticed this regression after: https://github.com/apache/nuttx/pull/8454 --- system/cle/cle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system/cle/cle.c b/system/cle/cle.c index fb2f7e433..0bcff8d6c 100644 --- a/system/cle/cle.c +++ b/system/cle/cle.c @@ -1077,12 +1077,12 @@ static int cle_editloop(FAR struct cle_s *priv) /* Newline terminates editing. But what is a newline? */ -#if defined(CONFIG_EOL_IS_CR) || defined(CONFIG_EOL_IS_EITHER_CRLF) +#if defined(CONFIG_EOL_IS_EITHER_CRLF) case '\r': /* CR terminates line */ - -#elif defined(CONFIG_EOL_IS_LF) || defined(CONFIG_EOL_IS_BOTH_CRLF) || \ - defined(CONFIG_EOL_IS_EITHER_CRLF) - + case '\n': /* LF terminates line */ +#elif defined(CONFIG_EOL_IS_CR) + case '\r': /* CR terminates line */ +#elif defined(CONFIG_EOL_IS_LF) || defined(CONFIG_EOL_IS_BOTH_CRLF) case '\n': /* LF terminates line */ #endif {