clean up and standardize types across the codebase, unify atomic operations, improve UTF-8 handling throughout the system, remove obsolete input and named queue interfaces, redesign process preparation and creation, tighten IPC and service boundaries, improve error handling and reliability, minor documentation cleanup, fix doom surfaces, fix panic in ini parsing.

This commit is contained in:
maksw committed 2026-10-12 18:17:43 +02:00
1 parent 899225f551
commit c0ad63c27f
226 files changed
+6562 -4147

No files matched your search

+17 -13
View File
@@ -42,6 +42,10 @@ static void readLine(char* buf, int len) {
ReadConsoleA(hIn, &c, 1, &nRead, 0);
if (!nRead) continue;
if (c == '\r' || c == '\n') { print("\n"); break; }
if (c == '\x1B') {
while (pos > 0) { --pos; print("\b \b"); }
continue;
}
if ((c == '\b' || c == 127) && pos > 0) { pos--; print("\b \b"); continue; }
if (c < 0x20 || c == 127) continue;
if (pos < len - 1) {
@@ -205,18 +209,18 @@ static void cmd_type(const char* filename) {
}
// Runs command.
static int runCommand(const char* cmd) {
if (!cmd || *cmd == '\0') return 0;
if (strcmp(cmd, "exit") == 0) return 1;
if (strcmp(cmd, "help") == 0) { cmd_help(); return 0; }
if (strcmp(cmd, "clear") == 0) { ClearConsoleScreenBuffer(hOut); return 0; }
if (strcmp(cmd, "crash") == 0) { *(int*)0 = 42; return 0; }
if (strcmp(cmd, "dir") == 0) { cmd_dir("."); return 0; }
if (strncmp(cmd, "dir ", 4) == 0) { cmd_dir(cmd + 4); return 0; }
if (strncmp(cmd, "cd ", 3) == 0) { if (!SetCurrentDirectoryA(cmd + 3)) print("cd: failed\n"); return 0; }
if (strncmp(cmd, "del ", 4) == 0) { DeleteFileA(cmd + 4); return 0; }
if (strncmp(cmd, "type ", 5) == 0) { cmd_type(cmd + 5); return 0; }
if (strncmp(cmd, "write ", 6) == 0) { cmd_write(cmd + 6); return 0; }
static bool runCommand(const char* cmd) {
if (!cmd || *cmd == '\0') return false;
if (strcmp(cmd, "exit") == 0) return true;
if (strcmp(cmd, "help") == 0) { cmd_help(); return false; }
if (strcmp(cmd, "clear") == 0) { ClearConsoleScreenBuffer(hOut); return false; }
if (strcmp(cmd, "crash") == 0) { *(int*)0 = 42; return false; }
if (strcmp(cmd, "dir") == 0) { cmd_dir("."); return false; }
if (strncmp(cmd, "dir ", 4) == 0) { cmd_dir(cmd + 4); return false; }
if (strncmp(cmd, "cd ", 3) == 0) { if (!SetCurrentDirectoryA(cmd + 3)) print("cd: failed\n"); return false; }
if (strncmp(cmd, "del ", 4) == 0) { DeleteFileA(cmd + 4); return false; }
if (strncmp(cmd, "type ", 5) == 0) { cmd_type(cmd + 5); return false; }
if (strncmp(cmd, "write ", 6) == 0) { cmd_write(cmd + 6); return false; }
PROCESS_INFORMATION pi;
char cmdBuf[MAX_CMD];
@@ -232,7 +236,7 @@ static int runCommand(const char* cmd) {
} else {
print("shell: launch failed\n");
}
return 0;
return false;
}
// Runs the requested operation.