summaryrefslogtreecommitdiff
path: root/src/user/mkpopup/main.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-11 22:00:22 -0500
commit5fcf57739e68a8b5053e03778aaee0eed445babd (patch)
treee7a8bab18668d112e58b1b48190195035c71fa8a /src/user/mkpopup/main.c
parent0f2398d1f622cce37925f52d978d92e6cce1c7a9 (diff)
downloadportland-os-5fcf57739e68a8b5053e03778aaee0eed445babd.tar.gz
settings editor, and lots of changes in service of that
Diffstat (limited to 'src/user/mkpopup/main.c')
-rw-r--r--src/user/mkpopup/main.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/user/mkpopup/main.c b/src/user/mkpopup/main.c
deleted file mode 100644
index 05ea4e3..0000000
--- a/src/user/mkpopup/main.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <popups/info.h>
-
-#include <knob/heap.h>
-
-#include <stdbool.h>
-#include <stdint.h>
-
-void main(const char *text) {
- uint32_t required_new_length = 0;
- bool needs_new = false;
- for (const char *c = text; c[0]; ++c) {
- ++required_new_length;
- if ((c[0] == '\\') && (c[1] == 'n')) {
- ++c;
- needs_new = true;
- }
- }
-
- if (needs_new) {
- char *new_text = get_block(required_new_length);
- const char *ci;
- char *co;
- for (ci = text, co = new_text; *ci; ++ci, ++co)
- if ((ci[0] == '\\') && (ci[1] == 'n')) {
- *co = '\n';
- ++ci;
- }
- else
- *co = *ci;
- text = new_text;
- }
-
- struct popup p;
- info_popup(&p, text, (_pixel_t){.r = 0, .g = 0, .b = 0}, (_pixel_t){.r = 0xbf, .g = 0xbf, .b = 0xbf});
- make_modal(&p);
-} \ No newline at end of file