Fix rendering of whitespace, continue wasm porting

This commit is contained in:
Krzosa Karol
2025-11-25 09:47:03 +01:00
parent fcefe9f827
commit 38a20bd97a
13 changed files with 43 additions and 23 deletions

View File

@@ -1721,10 +1721,10 @@ thread_local Arena *ScratchArenaPool[4];
#if OS_WASM
void InitScratch() {
Allocator sys_allocator = GetSystemAllocator();
ScratchArenaPool[0] = AllocArena(sys_allocator, MiB(8));
ScratchArenaPool[1] = AllocArena(sys_allocator, MiB(2));
ScratchArenaPool[0] = AllocArena(sys_allocator, MiB(16));
ScratchArenaPool[1] = AllocArena(sys_allocator, MiB(8));
ScratchArenaPool[3] = AllocArena(sys_allocator, MiB(2));
ScratchArenaPool[3] = AllocArena(sys_allocator, MiB(1));
ScratchArenaPool[3] = AllocArena(sys_allocator, KiB(512));
}
#else
void InitScratch() {

View File

@@ -147,13 +147,11 @@ bool IsAbsolute(String path) {
}
String GetWorkingDir(Allocator al) {
char *buffer = AllocArray(al, char, PATH_MAX);
char *cwd = getcwd(buffer, PATH_MAX);
return cwd;
return Copy(al, "/workingdir");
}
String GetExePath(Allocator al) {
return "/text_editor";
return Copy(al, "/text_editor");
}
String GetExeDir(Allocator al) {

View File

@@ -312,7 +312,6 @@ void Win32CloseProcess(Process *process) {
}
static void Win32ProcessError(Process *process, String msg, String cmd) {
Win32Process *p = (Win32Process *)process->platform;
Win32ReportError(msg, cmd);
Win32CloseProcess(process);
}