summaryrefslogtreecommitdiff
path: root/src/user/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/include')
-rw-r--r--src/user/include/knob/block.h3
-rw-r--r--src/user/include/knob/user.h7
-rw-r--r--src/user/include/pland/syscall.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/user/include/knob/block.h b/src/user/include/knob/block.h
index 43137e1..56d3740 100644
--- a/src/user/include/knob/block.h
+++ b/src/user/include/knob/block.h
@@ -10,4 +10,7 @@ bool blockequ(const void *a, const void *b, uint32_t size) __attribute__ ((__pur
//returns length without null-terminator
uint32_t strcpy(char *to, const char *from);
+//allocates new memory
+char *strdup(const char *from);
+
#endif \ No newline at end of file
diff --git a/src/user/include/knob/user.h b/src/user/include/knob/user.h
index cd7676c..fb11c9b 100644
--- a/src/user/include/knob/user.h
+++ b/src/user/include/knob/user.h
@@ -4,6 +4,8 @@
#include <stdint.h>
#include <pland/syscall.h>
+struct history;
+
char key_to_char(_key_code_t key) __attribute__ ((const));
void tell_user_sz(const char *sz);
@@ -12,4 +14,9 @@ void tell_user_sz(const char *sz);
//returns the real length of the string
uint32_t ask_user_line_sz(char *sz, uint32_t max_length);
+struct history *new_history(uint32_t max_entries);
+void del_history(struct history *hs);
+
+uint32_t ask_user_line_sz_with_history(char *sz, uint32_t max_length, struct history *hs);
+
#endif \ No newline at end of file
diff --git a/src/user/include/pland/syscall.h b/src/user/include/pland/syscall.h
index 331002e..14164aa 100644
--- a/src/user/include/pland/syscall.h
+++ b/src/user/include/pland/syscall.h
@@ -73,7 +73,7 @@ typedef enum {
_KEY_NDOT,
_KEY_NSLASH,
/* 0xc0 unassigned */
- _KEY_DELETE,
+ _KEY_DELETE = 0xc1,
_KEY_HOME,
_KEY_END,
_KEY_PUP,