mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 20:58:15 +00:00
convert spaces to tabs
This commit is contained in:
+45
-45
@@ -29,7 +29,7 @@ where
|
||||
size_of(p2) <= size_of(uintptr)
|
||||
{
|
||||
return cast(int) intrinsics.syscall(nr,
|
||||
cast(uintptr) p1, cast(uintptr) p2)
|
||||
cast(uintptr) p1, cast(uintptr) p2)
|
||||
}
|
||||
|
||||
@(private)
|
||||
@@ -40,9 +40,9 @@ where
|
||||
size_of(p3) <= size_of(uintptr)
|
||||
{
|
||||
return cast(int) intrinsics.syscall(nr,
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3)
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3)
|
||||
}
|
||||
|
||||
@(private)
|
||||
@@ -54,10 +54,10 @@ where
|
||||
size_of(p4) <= size_of(uintptr)
|
||||
{
|
||||
return cast(int) intrinsics.syscall(nr,
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3,
|
||||
cast(uintptr) p4)
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3,
|
||||
cast(uintptr) p4)
|
||||
}
|
||||
|
||||
@(private)
|
||||
@@ -70,11 +70,11 @@ where
|
||||
size_of(p5) <= size_of(uintptr)
|
||||
{
|
||||
return cast(int) intrinsics.syscall(nr,
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3,
|
||||
cast(uintptr) p4,
|
||||
cast(uintptr) p5)
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3,
|
||||
cast(uintptr) p4,
|
||||
cast(uintptr) p5)
|
||||
}
|
||||
|
||||
@(private)
|
||||
@@ -88,12 +88,12 @@ where
|
||||
size_of(p6) <= size_of(uintptr)
|
||||
{
|
||||
return cast(int) intrinsics.syscall(nr,
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3,
|
||||
cast(uintptr) p4,
|
||||
cast(uintptr) p5,
|
||||
cast(uintptr) p6)
|
||||
cast(uintptr) p1,
|
||||
cast(uintptr) p2,
|
||||
cast(uintptr) p3,
|
||||
cast(uintptr) p4,
|
||||
cast(uintptr) p5,
|
||||
cast(uintptr) p6)
|
||||
}
|
||||
|
||||
syscall :: proc {syscall0, syscall1, syscall2, syscall3, syscall4, syscall5, syscall6}
|
||||
@@ -106,24 +106,24 @@ syscall :: proc {syscall0, syscall1, syscall2, syscall3, syscall4, syscall5, sys
|
||||
@(private)
|
||||
errno_unwrap3 :: #force_inline proc "contextless" (ret: $P, $T: typeid, $U: typeid) -> (T, Errno)
|
||||
where
|
||||
intrinsics.type_is_ordered_numeric(P)
|
||||
intrinsics.type_is_ordered_numeric(P)
|
||||
{
|
||||
if ret < 0 {
|
||||
default_value: T
|
||||
return default_value, Errno(-ret)
|
||||
} else {
|
||||
return cast(T) transmute(U) ret, Errno(.NONE)
|
||||
}
|
||||
if ret < 0 {
|
||||
default_value: T
|
||||
return default_value, Errno(-ret)
|
||||
} else {
|
||||
return cast(T) transmute(U) ret, Errno(.NONE)
|
||||
}
|
||||
}
|
||||
|
||||
@(private)
|
||||
errno_unwrap2 :: #force_inline proc "contextless" (ret: $P, $T: typeid) -> (T, Errno) {
|
||||
if ret < 0 {
|
||||
default_value: T
|
||||
return default_value, Errno(-ret)
|
||||
} else {
|
||||
return cast(T) ret, Errno(.NONE)
|
||||
}
|
||||
if ret < 0 {
|
||||
default_value: T
|
||||
return default_value, Errno(-ret)
|
||||
} else {
|
||||
return cast(T) ret, Errno(.NONE)
|
||||
}
|
||||
}
|
||||
|
||||
@(private)
|
||||
@@ -132,19 +132,19 @@ errno_unwrap :: proc {errno_unwrap2, errno_unwrap3}
|
||||
// Note(flysand): 32-bit architectures sometimes take in a 64-bit argument in a
|
||||
// register pair. This function should help me avoid typing the same code a few times..
|
||||
when size_of(int) == 4 {
|
||||
// xxx64 system calls take some parameters as pairs of ulongs rather than a single pointer
|
||||
@(private)
|
||||
compat64_arg_pair :: #force_inline proc "contextless" (a: i64) -> (hi: uint, lo: uint) {
|
||||
no_sign := uint(a)
|
||||
hi = uint(no_sign >> 32)
|
||||
lo = uint(no_sign & 0xffff_ffff)
|
||||
return
|
||||
}
|
||||
// xxx64 system calls take some parameters as pairs of ulongs rather than a single pointer
|
||||
@(private)
|
||||
compat64_arg_pair :: #force_inline proc "contextless" (a: i64) -> (hi: uint, lo: uint) {
|
||||
no_sign := uint(a)
|
||||
hi = uint(no_sign >> 32)
|
||||
lo = uint(no_sign & 0xffff_ffff)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
// ... and on 64-bit architectures it's just a long
|
||||
@(private)
|
||||
compat64_arg_pair :: #force_inline proc "contextless" (a: i64) -> (uint) {
|
||||
return uint(a)
|
||||
}
|
||||
// ... and on 64-bit architectures it's just a long
|
||||
@(private)
|
||||
compat64_arg_pair :: #force_inline proc "contextless" (a: i64) -> (uint) {
|
||||
return uint(a)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user