Split CE code into multiple files
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m38s

This commit is contained in:
2026-03-03 20:59:21 +01:00
parent aa32f2374f
commit 2a891fcdd1
16 changed files with 726 additions and 593 deletions

27
ce/mprintf.c Normal file
View File

@@ -0,0 +1,27 @@
#include "mprintf.h"
#include "self.h"
#include <liballoc.h>
#include <printf.h>
#include <stdarg.h>
#include <system.h>
void putchar_ (char ch) { (void)ch; }
void mprintf (const char* fmt, ...) {
va_list args;
va_start (args, fmt);
char* buf = malloc (MPRINTF_BUF_MAX);
if (buf == NULL) {
va_end (args);
return;
}
int len = vsnprintf (buf, MPRINTF_BUF_MAX, fmt, args);
va_end (args);
mail_send (e_pgid, buf, len);
free (buf);
}