You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/18 04:13:03 UTC
[incubator-nuttx-apps] branch master updated: app/system/readline:
fix compile break
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 6189a8d app/system/readline: fix compile break
6189a8d is described below
commit 6189a8df4be5c0c9e28ea91593a153a2abd915a5
Author: dongjiuzhu <do...@xiaomi.com>
AuthorDate: Sun Nov 15 20:29:57 2020 +0800
app/system/readline: fix compile break
N/A
Change-Id: I562b96492be9976611199e6215c55c03f1e154c8
Signed-off-by: dongjiuzhu <do...@xiaomi.com>
---
system/readline/readline.h | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/system/readline/readline.h b/system/readline/readline.h
index 020a4bd..9707821 100644
--- a/system/readline/readline.h
+++ b/system/readline/readline.h
@@ -77,8 +77,11 @@
/* Helper macros */
#define RL_GETC(v) ((v)->rl_getc(v))
-#define RL_PUTC(v,ch) ((v)->rl_putc(v,ch))
-#define RL_WRITE(v,b,s) ((v)->rl_write(v,b,s))
+
+#ifdef CONFIG_READLINE_ECHO
+# define RL_PUTC(v,ch) ((v)->rl_putc(v,ch))
+# define RL_WRITE(v,b,s) ((v)->rl_write(v,b,s))
+#endif
/****************************************************************************
* Public Type Declarations
@@ -86,11 +89,11 @@
struct rl_common_s
{
- int (*rl_getc)(FAR struct rl_common_s *vtbl);
+ int (*rl_getc)(FAR struct rl_common_s *vtbl);
#ifdef CONFIG_READLINE_ECHO
- void (*rl_putc)(FAR struct rl_common_s *vtbl, int ch);
- void (*rl_write)(FAR struct rl_common_s *vtbl, FAR const char *buffer,
- size_t buflen);
+ void (*rl_putc)(FAR struct rl_common_s *vtbl, int ch);
+ void (*rl_write)(FAR struct rl_common_s *vtbl, FAR const char *buffer,
+ size_t buflen);
#endif
};
@@ -121,6 +124,7 @@ struct rl_common_s
*
****************************************************************************/
-ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf, int buflen);
+ssize_t readline_common(FAR struct rl_common_s *vtbl,
+ FAR char *buf, int buflen);
#endif /* __APPS_SYSTEM_READLINE_READLINE_H */