summaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-06 08:52:20 -0600
committerTom Rini <trini@konsulko.com>2023-01-16 14:14:11 -0500
commitb08e9d4b6632a72b91306690d552c125b071441e (patch)
tree948f27c1423537f8e46e78fc12352b51ec0a0294 /drivers/fpga/fpga.c
parent7d850f85aad74ae907290ba6f911d362a0478e61 (diff)
cli: Move readline character-processing to a state machine
The current cread_line() function is very long. It handles the escape processing inline. The menu command does similar processing but at the character level, so there is some duplication. Split the character processing into a new function cli_ch_process() which processes individual characters and returns the resulting input character, taking account of escape sequences. It requires the caller to set up and maintain its state. Update cread_line() to use this new function. The only intended functional change is that an invalid escape sequence does not add invalid/control characters into the input buffer, but instead discards these. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/fpga/fpga.c')
0 files changed, 0 insertions, 0 deletions