summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/main.c13
-rw-r--r--src/main/welcome.h45
-rw-r--r--src/main/welcome.inc9
3 files changed, 63 insertions, 4 deletions
diff --git a/src/main/main.c b/src/main/main.c
index 8e3e862..45f72cb 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -34,6 +34,12 @@
#include "completion.h"
#include "version.h"
+/* welcome.h is generated from welcome.inc with
+ * xxd -n welcome_text -i <path-to-welcome.inc> <path-to-welcome.h>
+ * or similar.
+ */
+#include "welcome.h"
+
static struct frame_allocator frame_allocator;
void *frame_alloc(size_t sz) {
@@ -311,10 +317,9 @@ int main(int argc, char *argv[]) {
free((void *)filename);
free((void *)absfile);
} else {
- const char *welcome_txt =
- "Welcome to the editor for datagubbar and datagummor 👴👵\n";
- buffer_set_text(&initial_buffer, (uint8_t *)welcome_txt,
- strlen(welcome_txt));
+ initial_buffer.force_show_ws_off = true;
+ buffer_set_readonly(&initial_buffer, true);
+ buffer_set_text(&initial_buffer, (uint8_t *)welcome_text, welcome_text_len);
}
struct buffer *ib = buffers_add(&buflist, initial_buffer);
diff --git a/src/main/welcome.h b/src/main/welcome.h
new file mode 100644
index 0000000..7f9b720
--- /dev/null
+++ b/src/main/welcome.h
@@ -0,0 +1,45 @@
+unsigned char welcome_text[] = {
+ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20,
+ 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0xe2, 0x96,
+ 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96,
+ 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96,
+ 0x88, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88,
+ 0xe2, 0x96, 0x88, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20,
+ 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88,
+ 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96,
+ 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20,
+ 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0xe2, 0x96,
+ 0x88, 0xe2, 0x96, 0x88, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88,
+ 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88,
+ 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0x20, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88,
+ 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x0a, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0x20, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96,
+ 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96,
+ 0x88, 0xe2, 0x96, 0x88, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2,
+ 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0x0a,
+ 0x0a, 0x0a, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x65, 0x64,
+ 0x69, 0x74, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x61, 0x74,
+ 0x61, 0x67, 0x75, 0x62, 0x62, 0x61, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20,
+ 0x64, 0x61, 0x74, 0x61, 0x67, 0x75, 0x6d, 0x6d, 0x6f, 0x72, 0x21, 0x20,
+ 0xf0, 0x9f, 0x91, 0xb4, 0xf0, 0x9f, 0x91, 0xb5, 0x0a
+};
+unsigned int welcome_text_len = 501;
diff --git a/src/main/welcome.inc b/src/main/welcome.inc
new file mode 100644
index 0000000..7acbd6b
--- /dev/null
+++ b/src/main/welcome.inc
@@ -0,0 +1,9 @@
+
+ ██████ ██████ ███████ ██████
+ ██ ██ ██ ██ ██ ██
+ ██ ██ ██ ███ █████ ██ ██
+ ██ ██ ██ ██ ██ ██ ██
+ ██████ ██████ ███████ ██████
+
+
+Welcome to the text editor for datagubbar and datagummor! 👴👵