Revert "[FL-3909] CLI improvements, part I (#3928)" --nobuild

This reverts commit 0f831412fa.

This was reverted by OFW right after it was made, back in October 2024.
They are now getting back to implementing these features differently.
Thus, a revert is in order. But neofetch is staying :)
This commit is contained in:
Willy-JL
2025-04-03 01:51:47 +01:00
parent d93ff9bdb0
commit 858526cae1
11 changed files with 108 additions and 377 deletions

View File

@@ -3,7 +3,6 @@
#include <lib/toolbox/args.h>
#include <cli/cli.h>
#include <cli/cli_ansi.h>
void crypto_cli_print_usage(void) {
printf("Usage:\r\n");
@@ -46,14 +45,14 @@ void crypto_cli_encrypt(Cli* cli, FuriString* args) {
input = furi_string_alloc();
char c;
while(cli_read(cli, (uint8_t*)&c, 1) == 1) {
if(c == CliKeyETX) {
if(c == CliSymbolAsciiETX) {
printf("\r\n");
break;
} else if(c >= 0x20 && c < 0x7F) {
putc(c, stdout);
fflush(stdout);
furi_string_push_back(input, c);
} else if(c == CliKeyCR) {
} else if(c == CliSymbolAsciiCR) {
printf("\r\n");
furi_string_cat(input, "\r\n");
}
@@ -121,14 +120,14 @@ void crypto_cli_decrypt(Cli* cli, FuriString* args) {
hex_input = furi_string_alloc();
char c;
while(cli_read(cli, (uint8_t*)&c, 1) == 1) {
if(c == CliKeyETX) {
if(c == CliSymbolAsciiETX) {
printf("\r\n");
break;
} else if(c >= 0x20 && c < 0x7F) {
putc(c, stdout);
fflush(stdout);
furi_string_push_back(hex_input, c);
} else if(c == CliKeyCR) {
} else if(c == CliSymbolAsciiCR) {
printf("\r\n");
}
}