Minor fixes

This commit is contained in:
gingerBill
2021-03-18 13:25:41 +00:00
parent 04e0cacd30
commit 359ae29d98
7 changed files with 8 additions and 7 deletions
+1 -2
View File
@@ -149,7 +149,7 @@ scratch_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode,
scratch_allocator_init(s, DEFAULT_BACKING_SIZE);
}
size := size;
size := size;
switch mode {
case .Alloc:
@@ -673,7 +673,6 @@ dynamic_pool_alloc :: proc(using pool: ^Dynamic_Pool, bytes: int) -> rawptr {
current_block = new_block;
}
n := bytes;
extra := alignment - (n % alignment);
n += extra;
+2 -2
View File
@@ -503,7 +503,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
}
rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator);
path_ptr := _unix_realpath(rel_cstr, nil);
if path_ptr == nil {
return "", Errno(get_last_error());
@@ -566,7 +566,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
return ERROR_NONE;
}
exit :: proc(code: int) -> ! {
exit :: proc "contextless" (code: int) -> ! {
_unix_exit(code);
}
+1 -1
View File
@@ -421,7 +421,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
return ERROR_NONE;
}
exit :: proc(code: int) -> ! {
exit :: proc "contextless" (code: int) -> ! {
_unix_exit(c.int(code));
}
+1 -1
View File
@@ -590,7 +590,7 @@ set_current_directory :: proc(path: string) -> (err: Errno) {
return ERROR_NONE;
}
exit :: proc(code: int) -> ! {
exit :: proc "contextless" (code: int) -> ! {
_unix_exit(c.int(code));
}
+1 -1
View File
@@ -127,7 +127,7 @@ get_page_size :: proc() -> int {
exit :: proc(code: int) -> ! {
exit :: proc "contextless" (code: int) -> ! {
win32.ExitProcess(win32.DWORD(code));
}
+1
View File
@@ -496,4 +496,5 @@ default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code
}
print_byte('\n');
debug_trap();
// trap();
}
+1
View File
@@ -687,6 +687,7 @@ EXCEPTION_EXECUTE_HANDLER: LONG : 1;
EXCEPTION_MAXIMUM_PARAMETERS :: 15;
EXCEPTION_DATATYPE_MISALIGNMENT :: 0x80000002;
EXCEPTION_BREAKPOINT :: 0x80000003;
EXCEPTION_ACCESS_VIOLATION :: 0xC0000005;
EXCEPTION_ILLEGAL_INSTRUCTION :: 0xC000001D;
EXCEPTION_ARRAY_BOUNDS_EXCEEDED :: 0xC000008C;