diff options
Diffstat (limited to 'apps/system/readline/readline.c')
-rw-r--r-- | apps/system/readline/readline.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/apps/system/readline/readline.c b/apps/system/readline/readline.c index bdd39e67b..ec2dc1c0a 100644 --- a/apps/system/readline/readline.c +++ b/apps/system/readline/readline.c @@ -63,13 +63,32 @@ #define CONFIG_READLINE_ECHO 1 /* Some environments may return CR as end-of-line, others LF, and others - * both. The logic here assumes either but not both. + * both. If not specified, the logic here assumes either (but not both) as + * the default. */ -#undef CONFIG_EOL_IS_CR -#undef CONFIG_EOL_IS_LF -#undef CONFIG_EOL_IS_BOTH_CRLF -#define CONFIG_EOL_IS_EITHER_CRLF 1 +#if defined(CONFIG_EOL_IS_CR) +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_LF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_BOTH_CRLF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_BOTH_CRLF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_EITHER_CRLF +#elif defined(CONFIG_EOL_IS_EITHER_CRLF) +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +#else +# undef CONFIG_EOL_IS_CR +# undef CONFIG_EOL_IS_LF +# undef CONFIG_EOL_IS_BOTH_CRLF +# define CONFIG_EOL_IS_EITHER_CRLF 1 +#endif /**************************************************************************** * Private Type Declarations |