temp commit

This commit is contained in:
2026-05-22 13:40:03 +02:00
parent bc66e673fa
commit edb5384f0e
23 changed files with 848 additions and 621 deletions
+13
View File
@@ -5,6 +5,7 @@
#include "../include/data.h"
#include "../include/define.h"
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
@@ -85,6 +86,7 @@ int editorReadKey() {
char c;
/* read first byte — may be start of UTF-8 or escape */
while (read(STDIN_FILENO, &c, 1) != 1);
appDebug("f : %X\r\n", c);
if (c == '\x1b') {
char seq[6];
@@ -179,3 +181,14 @@ int getWindowSize(int *rows, int *cols) {
return 0;
}
}
void appDebug(const char *fmt, ...) {
#ifdef APP_DEBUG
va_list ap;
char message[256];
va_start(ap, fmt);
vsnprintf(message, 256, fmt, ap);
va_end(ap);
fprintf(stderr, "%s\n", message);
#endif
}