mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Strip semicolons; Make odin strip-semicolon replace .. with ..= if used as a binary operator
This commit is contained in:
+28
-28
@@ -13,25 +13,25 @@ when ODIN_OS == "windows" {
|
||||
when ODIN_OS == "windows" {
|
||||
foreign libc {
|
||||
// 7.27.2 Time manipulation functions
|
||||
clock :: proc() -> clock_t ---;
|
||||
@(link_name="_difftime64") difftime :: proc(time1, time2: time_t) -> double ---;
|
||||
mktime :: proc(timeptr: ^tm) -> time_t ---;
|
||||
@(link_name="_time64") time :: proc(timer: ^time_t) -> time_t ---;
|
||||
@(link_name="_timespec64_get") timespec_get :: proc(ts: ^timespec, base: int) -> int ---;
|
||||
clock :: proc() -> clock_t ---
|
||||
@(link_name="_difftime64") difftime :: proc(time1, time2: time_t) -> double ---
|
||||
mktime :: proc(timeptr: ^tm) -> time_t ---
|
||||
@(link_name="_time64") time :: proc(timer: ^time_t) -> time_t ---
|
||||
@(link_name="_timespec64_get") timespec_get :: proc(ts: ^timespec, base: int) -> int ---
|
||||
|
||||
// 7.27.3 Time conversion functions
|
||||
asctime :: proc(timeptr: ^tm) -> ^char ---;
|
||||
@(link_name="_ctime64") ctime :: proc(timer: ^time_t) -> ^char ---;
|
||||
@(link_name="_gmtime64") gmtime :: proc(timer: ^time_t) -> ^tm ---;
|
||||
@(link_name="_localtime64") localtime :: proc(timer: ^time_t) -> ^tm ---;
|
||||
strftime :: proc(s: ^char, maxsize: size_t, format: cstring, timeptr: ^tm) -> size_t ---;
|
||||
asctime :: proc(timeptr: ^tm) -> ^char ---
|
||||
@(link_name="_ctime64") ctime :: proc(timer: ^time_t) -> ^char ---
|
||||
@(link_name="_gmtime64") gmtime :: proc(timer: ^time_t) -> ^tm ---
|
||||
@(link_name="_localtime64") localtime :: proc(timer: ^time_t) -> ^tm ---
|
||||
strftime :: proc(s: ^char, maxsize: size_t, format: cstring, timeptr: ^tm) -> size_t ---
|
||||
}
|
||||
|
||||
CLOCKS_PER_SEC :: 1000;
|
||||
TIME_UTC :: 1;
|
||||
CLOCKS_PER_SEC :: 1000
|
||||
TIME_UTC :: 1
|
||||
|
||||
clock_t :: distinct long;
|
||||
time_t :: distinct i64;
|
||||
clock_t :: distinct long
|
||||
time_t :: distinct i64
|
||||
|
||||
timespec :: struct #align 8 {
|
||||
tv_sec: time_t,
|
||||
@@ -47,26 +47,26 @@ when ODIN_OS == "linux" || ODIN_OS == "freebsd" {
|
||||
@(default_calling_convention="c")
|
||||
foreign libc {
|
||||
// 7.27.2 Time manipulation functions
|
||||
clock :: proc() -> clock_t ---;
|
||||
difftime :: proc(time1, time2: time_t) -> double ---;
|
||||
mktime :: proc(timeptr: ^tm) -> time_t ---;
|
||||
time :: proc(timer: ^time_t) -> time_t ---;
|
||||
timespec_get :: proc(ts: ^timespec, base: int) -> int ---;
|
||||
clock :: proc() -> clock_t ---
|
||||
difftime :: proc(time1, time2: time_t) -> double ---
|
||||
mktime :: proc(timeptr: ^tm) -> time_t ---
|
||||
time :: proc(timer: ^time_t) -> time_t ---
|
||||
timespec_get :: proc(ts: ^timespec, base: int) -> int ---
|
||||
|
||||
// 7.27.3 Time conversion functions
|
||||
asctime :: proc(timeptr: ^tm) -> ^char ---;
|
||||
ctime :: proc(timer: ^time_t) -> ^char ---;
|
||||
gmtime :: proc(timer: ^time_t) -> ^tm ---;
|
||||
localtime :: proc(timer: ^time_t) -> ^tm ---;
|
||||
strftime :: proc(s: ^char, maxsize: size_t, format: cstring, timeptr: ^tm) -> size_t ---;
|
||||
asctime :: proc(timeptr: ^tm) -> ^char ---
|
||||
ctime :: proc(timer: ^time_t) -> ^char ---
|
||||
gmtime :: proc(timer: ^time_t) -> ^tm ---
|
||||
localtime :: proc(timer: ^time_t) -> ^tm ---
|
||||
strftime :: proc(s: ^char, maxsize: size_t, format: cstring, timeptr: ^tm) -> size_t ---
|
||||
}
|
||||
|
||||
CLOCKS_PER_SEC :: 1000000;
|
||||
TIME_UTC :: 1;
|
||||
CLOCKS_PER_SEC :: 1000000
|
||||
TIME_UTC :: 1
|
||||
|
||||
time_t :: distinct i64;
|
||||
time_t :: distinct i64
|
||||
|
||||
clock_t :: long;
|
||||
clock_t :: long
|
||||
|
||||
timespec :: struct {
|
||||
tv_sec: time_t,
|
||||
|
||||
Reference in New Issue
Block a user