diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-08-27 17:03:27 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-08-27 17:03:27 +0100 |
| commit | b9e347ef5072ac3d1f8dcc1ba2d678109f9ff016 (patch) | |
| tree | 5890f5aba3eaced5c85d6ca7b95d69df163397b5 /core | |
| parent | 6707c8750e951ed6533ab3d4240314cf0bba7147 (diff) | |
Replace `import_load` with `using import .`
Diffstat (limited to 'core')
| -rw-r--r-- | core/_preload.odin | 11 | ||||
| -rw-r--r-- | core/fmt.odin | 14 | ||||
| -rw-r--r-- | core/mem.odin | 9 | ||||
| -rw-r--r-- | core/opengl.odin | 8 | ||||
| -rw-r--r-- | core/os.odin | 8 | ||||
| -rw-r--r-- | core/strconv.odin | 2 | ||||
| -rw-r--r-- | core/sync.odin | 6 | ||||
| -rw-r--r-- | core/sync_linux.odin | 6 | ||||
| -rw-r--r-- | core/sync_windows.odin | 6 | ||||
| -rw-r--r-- | core/sys/wgl.odin | 2 | ||||
| -rw-r--r-- | core/sys/windows.odin | 4 |
11 files changed, 31 insertions, 45 deletions
diff --git a/core/_preload.odin b/core/_preload.odin index c7a4a9d33..f394ae0e5 100644 --- a/core/_preload.odin +++ b/core/_preload.odin @@ -1,11 +1,10 @@ #shared_global_scope; -import ( - "os.odin"; - "fmt.odin"; // TODO(bill): Remove the need for `fmt` here - "utf8.odin"; - "raw.odin"; -) +import "os.odin"; +import "fmt.odin"; // TODO(bill): Remove the need for `fmt` here +import "utf8.odin"; +import "raw.odin"; + // Naming Conventions: // In general, Ada_Case for types and snake_case for values // diff --git a/core/fmt.odin b/core/fmt.odin index a14c9056a..f962b8a95 100644 --- a/core/fmt.odin +++ b/core/fmt.odin @@ -1,11 +1,9 @@ -import ( - "os.odin"; - "mem.odin"; - "utf8.odin"; - "types.odin"; - "strconv.odin"; - "raw.odin"; -) +import "os.odin"; +import "mem.odin"; +import "utf8.odin"; +import "types.odin"; +import "strconv.odin"; +import "raw.odin"; _BUFFER_SIZE :: 1<<12; diff --git a/core/mem.odin b/core/mem.odin index bd1e6f6ed..cce8492f6 100644 --- a/core/mem.odin +++ b/core/mem.odin @@ -1,8 +1,7 @@ -import ( - "fmt.odin"; - "os.odin"; - "raw.odin"; -) +import "fmt.odin"; +import "os.odin"; +import "raw.odin"; + foreign __llvm_core { swap :: proc(b: u16) -> u16 #link_name "llvm.bswap.i16" ---; swap :: proc(b: u32) -> u32 #link_name "llvm.bswap.i32" ---; diff --git a/core/opengl.odin b/core/opengl.odin index 9ec29704f..a3c5217ce 100644 --- a/core/opengl.odin +++ b/core/opengl.odin @@ -2,11 +2,9 @@ foreign_system_library ( lib "opengl32.lib" when ODIN_OS == "windows"; lib "gl" when ODIN_OS == "linux"; ) -import ( - win32 "sys/windows.odin" when ODIN_OS == "windows"; - "sys/wgl.odin" when ODIN_OS == "windows"; -) -import_load "opengl_constants.odin"; +import win32 "sys/windows.odin" when ODIN_OS == "windows"; +import "sys/wgl.odin" when ODIN_OS == "windows"; +using import . "opengl_constants.odin"; _ := compile_assert(ODIN_OS != "osx"); diff --git a/core/os.odin b/core/os.odin index 1ae1c9e84..e9b854135 100644 --- a/core/os.odin +++ b/core/os.odin @@ -1,8 +1,6 @@ -import_load ( - "os_windows.odin" when ODIN_OS == "windows"; - "os_x.odin" when ODIN_OS == "osx"; - "os_linux.odin" when ODIN_OS == "linux"; -) +using import . "os_windows.odin" when ODIN_OS == "windows"; +using import . "os_x.odin" when ODIN_OS == "osx"; +using import . "os_linux.odin" when ODIN_OS == "linux"; write_string :: proc(fd: Handle, str: string) -> (int, Errno) { return write(fd, cast([]u8)str); diff --git a/core/strconv.odin b/core/strconv.odin index 789379a24..792835c8f 100644 --- a/core/strconv.odin +++ b/core/strconv.odin @@ -1,4 +1,4 @@ -import . "decimal.odin"; +using import "decimal.odin"; Int_Flag :: enum { Prefix = 1<<0, diff --git a/core/sync.odin b/core/sync.odin index ad08f0b18..46f210e9d 100644 --- a/core/sync.odin +++ b/core/sync.odin @@ -1,4 +1,2 @@ -import_load ( - "sync_windows.odin" when ODIN_OS == "windows"; - "sync_linux.odin" when ODIN_OS == "linux"; -) +using import . "sync_windows.odin" when ODIN_OS == "windows"; +using import . "sync_linux.odin" when ODIN_OS == "linux"; diff --git a/core/sync_linux.odin b/core/sync_linux.odin index 9e7f20d51..e38c80111 100644 --- a/core/sync_linux.odin +++ b/core/sync_linux.odin @@ -1,7 +1,5 @@ -import ( - "atomics.odin"; - "os.odin"; -) +import "atomics.odin"; +import "os.odin"; Semaphore :: struct { // _handle: win32.Handle; diff --git a/core/sync_windows.odin b/core/sync_windows.odin index 0b7477bc2..fa270edfe 100644 --- a/core/sync_windows.odin +++ b/core/sync_windows.odin @@ -1,7 +1,5 @@ -import ( - win32 "sys/windows.odin" when ODIN_OS == "windows"; - "atomics.odin"; -) +import win32 "sys/windows.odin" when ODIN_OS == "windows"; +import "atomics.odin"; Semaphore :: struct { _handle: win32.Handle; diff --git a/core/sys/wgl.odin b/core/sys/wgl.odin index 44d0df1a9..46e388057 100644 --- a/core/sys/wgl.odin +++ b/core/sys/wgl.odin @@ -1,5 +1,5 @@ foreign_system_library "opengl32.lib" when ODIN_OS == "windows"; -import . "windows.odin"; +using import "windows.odin"; CONTEXT_MAJOR_VERSION_ARB :: 0x2091; diff --git a/core/sys/windows.odin b/core/sys/windows.odin index 12b07ad63..53b8a1434 100644 --- a/core/sys/windows.odin +++ b/core/sys/windows.odin @@ -457,7 +457,7 @@ foreign gdi32 { stretch_dibits :: proc(hdc: Hdc, x_dst, y_dst, width_dst, height_dst: i32, x_src, y_src, width_src, header_src: i32, - bits: rawptr, bits_info: ^BitmapInfo, + bits: rawptr, bits_info: ^Bitmap_Info, usage: u32, rop: u32) -> i32 #cc_std #link_name "StretchDIBits" ---; @@ -572,7 +572,7 @@ Bitmap_Info_Header :: struct #ordered { clr_used: u32; clr_important: u32; } -BitmapInfo :: struct #ordered { +Bitmap_Info :: struct #ordered { using header: Bitmap_Info_Header; colors: [1]Rgb_Quad; } |