summaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-22 16:16:01 -0700
committerGerrit <chrome-bot@google.com>2012-07-23 11:03:33 -0700
commite27e2f02292bc825379ba914e43e13569ec738eb (patch)
treefa9fdae3658f4614bb24395126349597539d963c /include/util.h
parent085b31222b9f34e5470031fe1e957804beded69d (diff)
downloadchrome-ec-e27e2f02292bc825379ba914e43e13569ec738eb.tar.gz
Add console functionality
Keys I keep hitting should work like I expect them to. Home or Ctrl+A = move to beginning of line End or Ctrl+E = move to end of line Del = delete-right Ctrl+K = delete to end of line Ctrl+L = clear screen and reprint current line Ctrl+N = next command Ctrl+P = previous command Also, improve filtering of escape sequences and non-printable characters, so hitting unsupported keys or control codes doesn't mess up the current line of input. BUG=chrome-os-partner:11666 TEST=manual type 'fhelpbar' home -> cursor moves to beginning of line Ctrl+E -> cursor moves to end of line Ctrl+A -> cursor moves to beginning of line (of course, if you're using Minicom, you'll need to type Ctrl+A A, since Minicom uses Ctrl+A as its control key) del -> 'helpbar' end -> cursor moves to end of line left-arrow 3 times -> cursor moves under 'b' Ctrl+L -> screen clears, cursor still under 'b' Ctrl+K -> 'help' Ctrl+Y Page-Up Page-Down -> nothing printed enter -> prints known commands (output of 'help' command) Ctrl+P -> 'help' Ctrl+N -> empty command line Change-Id: Id893c93b26db8f3deed6ea8be5aab88a3daaead4 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28143
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index 423408a45c..2c6affddde 100644
--- a/include/util.h
+++ b/include/util.h
@@ -66,6 +66,7 @@ int atoi(const char *nptr);
int isdigit(int c);
int isspace(int c);
int isalpha(int c);
+int isprint(int c);
void *memcpy(void *dest, const void *src, int len);
void *memset(void *dest, int c, int len);
void *memmove(void *dest, const void *src, int len);