summaryrefslogtreecommitdiff
path: root/apps/system/readline
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-08 13:56:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-08 13:56:21 +0000
commitb4420923cb149a5a8164bb06794e12b88203d97c (patch)
tree0622029fef5305661e1a27dbc8a8d6b7db1cf79a /apps/system/readline
parenta386a5f0c85cd610b0d8a952c2a28f4038094fa4 (diff)
downloadpx4-nuttx-b4420923cb149a5a8164bb06794e12b88203d97c.tar.gz
px4-nuttx-b4420923cb149a5a8164bb06794e12b88203d97c.tar.bz2
px4-nuttx-b4420923cb149a5a8164bb06794e12b88203d97c.zip
Shenzhou board is first to use ONLY Kconfig for configuration
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5114 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/system/readline')
-rw-r--r--apps/system/readline/Kconfig17
-rw-r--r--apps/system/readline/readline.c29
2 files changed, 24 insertions, 22 deletions
diff --git a/apps/system/readline/Kconfig b/apps/system/readline/Kconfig
index 2ed9cafd6..6482b1204 100644
--- a/apps/system/readline/Kconfig
+++ b/apps/system/readline/Kconfig
@@ -19,21 +19,4 @@ config READLINE_ECHO
already has local echo support or you need to suppress the back-channel
responses for any other reason.
-choice
- prompt "Newline Options"
- default EOL_IS_EITHER_CRLF
-
-config EOL_IS_CR
- bool "EOL is CR"
-
-config EOL_IS_LF
- bool "EOL is LF"
-
-config EOL_IS_BOTH_CRLF
- bool "EOL is CR and LF"
-
-config EOL_IS_EITHER_CRLF
- bool "EOL is CR or LF"
-
-endchoice
endif
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