aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.h
diff options
context:
space:
mode:
authorverdant <im@verdant.ee>2026-08-03 15:51:39 +0800
committerverdant <im@verdant.ee>2026-08-03 15:51:39 +0800
commit4e7e1e21b3eb29a5505dc69f668cf5f9481bd7d5 (patch)
treef53a7a31bf322ea1f731ada2a57a087c9e1eb01b /src/utils.h
parentb1a3208e940f5fa5c4693c04ca2a423efbda2917 (diff)
downloadsf-4e7e1e21b3eb29a5505dc69f668cf5f9481bd7d5.tar.gz
sf-4e7e1e21b3eb29a5505dc69f668cf5f9481bd7d5.zip
Add utils.h utils.c to provide get_input()
Print the prompt at the status bar, handle character, backspace, enter and escape. Modify the variable buf in place.
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
new file mode 100644
index 0000000..2e99a21
--- /dev/null
+++ b/src/utils.h
@@ -0,0 +1,9 @@
+#ifndef SF_UTILS_H
+#define SF_UTILS_H
+
+#include "fm.h"
+#include "wm.h"
+
+int get_input(const char *prompt, char *buf);
+
+#endif /* SF_UTILS_H */