summaryrefslogtreecommitdiff
path: root/common/cli_readline.c
AgeCommit message (Collapse)Author
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-16cli_readline: Only insert printable charsSteve Bennett
There should be no need to insert non-printable characters and this prevents line editing getting confused. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2020-10-22common: rename getc() to getchar()Heinrich Schuchardt
The sandbox is built with the SDL2 library with invokes the X11 library which in turn calls getc(). But getc() in glibc is defined as int getc(FILE *) This does not match our definition. int getc(void) The sandbox crashes when called with parameter -l. Rename our library symbol getc() to getchar(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-12-02common: Move get_ticks() function out of common.hSimon Glass
This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02Drop CONFIG_SHOW_ACTIVITYSimon Glass
This feature is not enabled by any board. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-10cli: handle getch errorPatrick Delaunay
Handle getch error (when getch return 0x0) to avoid display issue in the console. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2016-08-20common: cli_readline: Improve command line editingJames Byrne
This improves the cread_line() function so that it will correctly process the 'Home', 'End', 'Delete' and arrow key escape sequences produced by various terminal emulators. This makes command line editing a more pleasant experience. The previous code only supported the cursor keys and the 'Home' key, and only for certain terminal emulator configurations. This adds support for the 'End and 'Delete' keys, and recognises a wider range of escape sequences. For example, the left arrow key can be 'ESC O D' instead of 'ESC [ D', and the 'Home' key can be 'ESC [ H', 'ESC O H', 'ESC 1 ~' or 'ESC 7 ~', depending on what terminal emulator you use and how it is configured. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Changes for v2 - Explicitly initialize variable to avoid spurious compiler warning. Changes for v3 - Remove unnecessary setting of 'act' to ESC_REJECT (now its default value).
2015-08-12spl, common, serial: build SPL without serial supportHeiko Schocher
This patch enables building SPL without CONFIG_SPL_SERIAL_SUPPORT support. Signed-off-by: Heiko Schocher <hs@denx.de> [trini: Ensure we build arch/arm/imx-common on mx28] Signed-off-by: Tom Rini <trini@konsulko.com>
2014-05-29Move bootretry code into bootretry.c and clean upSimon Glass
This code is only used by one board, so it seems a shame to clutter up the readline code with it. Move it into its own file. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-05-29Add cli_ prefix to readline functionsSimon Glass
This makes it clear where the code resides. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-05-29Split out simple parser and readline into separate filesSimon Glass
It doesn't make sense to have the simple parser and the readline code all in main. Split them out into separate files. Signed-off-by: Simon Glass <sjg@chromium.org>