Michal Lenc
529c0f1fc9
system: use fileno to get stream file descriptor
...
There is a POSIX defined interface to get file descriptor from file_struct
stream. Applications should use it and not access the structure directly.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-10-10 01:03:42 +08:00
Huang Qi
0af64dc045
system/cle: Remove cle_getcursor()
...
Fix https://github.com/apache/nuttx/issues/8731 , don't rely on the vt100 to report
the cursor position.
This avoid the implicit input (response of get cursor command) during the user inputs.
Notice: This assume that the nsh prompt is always shown at line start.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-17 12:08:04 -03:00
Huang Qi
fd8ce46060
system/cle: Don't echo extra '\n'
...
Before:
```
NuttShell (NSH) NuttX-12.0.0
nsh> free
/* Extra line here */
total used free largest nused nfree
Umem: 33154512 33584 33120928 33120928 96 1
```
After:
```
NuttShell (NSH) NuttX-12.0.0
nsh> free
total used free largest nused nfree
Umem: 33154512 33584 33120928 33120928 96 1
```
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-04 13:50:08 +08:00
Huang Qi
db22e07d07
stdio: Remove CONFIG_EOL_IS_XXX
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-23 17:21:19 +08:00
Ville Juven
a38c23f557
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
2023-02-14 00:19:24 +08:00
Xiang Xiao
d1e46c2d3e
compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
...
align with other macro naming style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:12 +02:00
Xiang Xiao
c252ec1481
Add printflike to all printf like functions
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:09:10 +03:00
Xiang Xiao
58586f86e3
system/cle: Make it work without CONFIG_FILE_STREAM
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-30 22:06:03 -06:00
Alin Jerpelea
84e0ca1310
system: update licenses to Apache
...
Gregory Nutt is has submitted the SGA
Ken Pettit has submitted the ICLA
David S. Alessio has submitted the ICLA
as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Gustavo Henrique Nihei
771d19b94a
system/cle: Remove column offset for cursor position
2021-02-19 10:39:21 -08:00
Gustavo Henrique Nihei
08c29110a6
system/cle: Fix cle application build
2021-02-19 10:39:21 -08:00
YAMAMOTO Takashi
69da172c5f
system/cle/cle.c: Fix syslog formats
2020-11-23 18:23:24 -08:00
Xiang Xiao
8a1f5ee34c
debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-06 07:31:10 -06:00
Xiang Xiao
ef19ca0243
cle.c: Fix warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-27 15:29:37 +02:00
Gregory Nutt
c742373efc
apps/system/cle: Fix error when compiling with C89 compiler.
2020-03-13 20:14:14 +01:00
Adam Feuer
7fd1b9065b
delete all characters from char to EOL
...
- more like GNU readline or emacs - can delete entire line with
ctrl-A ctrl-K
2020-01-08 15:40:04 -06:00
Dave Marples
dbd4e67241
apps/system/cle/cle.c: This commit modifies the cle to use the streams file interface more consistently and has removed the observed race conditions. It was previously a mix of streams and fileio. It also simplifies the VT100 cursor position handling.
2019-11-04 11:35:18 -06:00
Xiang Xiao
fa0aded666
apps/system/cle/cle.c: Fix warning, re-order to follow coding standard.
2019-10-17 11:20:20 -06:00
Dave Marples
b4134a674d
nshlib/ and system/cle: Add basic color support to the CLE editor.
2019-10-12 00:47:29 +08:00
Dave Marples
bf9a5180cd
apps/system/cle/cle.c: ASCII DEL should be treated by Delete-Left.
2019-08-01 15:26:49 -06:00
mst
62134a0419
apps/system/cle: Usage improvements including command line history (taken from readline) and support for addition control characters.
2018-08-05 16:05:59 -06:00
Sebastien Lorquet
2cbad44f1d
This is the Pokemon patch to change all includes fronm <apps/bla/bla.h> to "bla/bla.h"
2016-07-11 10:11:18 -06:00
Gregory Nutt
cd741c82cf
apps/include: Move all header files associated with modules in apps/system to apps/include/system
2016-07-01 06:48:22 -06:00
Gregory Nutt
344c92e2a4
Replace all occurrences of vdbg with vinfo
2016-06-11 11:55:38 -06:00
Gregory Nutt
2719815dd9
Update everything under apps/ to use the corrected syslog interfaces
2014-10-08 11:34:22 -06:00
Gregory Nutt
e6743f8370
CLE: Last bugfix commit was insufficient
2014-05-23 07:59:17 -06:00
Gregory Nutt
f1fc923199
CLE: Was not returning the terminating newline character
2014-05-23 07:19:21 -06:00
Gregory Nutt
2b0f1ed109
Change all variadic macros to C99 style
2014-05-22 09:01:51 -06:00
Gregory Nutt
281332cedf
Update documentation, mostly related to the command line editor
2014-02-03 10:56:52 -06:00
Gregory Nutt
55ea1ef68e
VI and CLE: Fix lots of typos in comments
2014-02-02 16:13:40 -06:00
Gregory Nutt
76a94e541d
CLE: Remove some un-used constant data definitions
2014-02-02 13:22:11 -06:00
Gregory Nutt
3fbce9ed5e
CLE: Forgot to NUL terminate the command line
2014-02-02 12:53:58 -06:00
Gregory Nutt
9d49d3969f
Fix bugs in EMACS command line editor, primarily errors in the VT100 commands
2014-02-02 12:24:45 -06:00
Gregory Nutt
82d71bb439
Add an EMACS-like command line editor that can be used wit NSH
2014-02-02 10:25:53 -06:00