diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-10-29 18:27:46 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-10-29 18:31:49 +0700 |
commit | 2432be0c7f788270221b6f9eaf3f765b6118d8c2 (patch) | |
tree | b69df71ede09554c6c8792b96f598b486a982832 /src/misc.zig | |
parent | 6b871944a9b2df0f84cbe3682244e07cb415fe79 (diff) | |
download | blackshades-2.4.3.tar.gz |
Sort imports and clean up 2.4.3
Diffstat (limited to 'src/misc.zig')
-rw-r--r-- | src/misc.zig | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/misc.zig b/src/misc.zig index 678538b..359c914 100644 --- a/src/misc.zig +++ b/src/misc.zig @@ -25,22 +25,15 @@ usingnamespace @cImport({ const Dir = std.fs.Dir; const TokenIterator = std.mem.TokenIterator; -const Key = gf.Key; -const Window = gf.Window; -const al = @import("zeal"); const allocPrint = std.fmt.allocPrint; const allocator = std.heap.c_allocator; const assert = std.debug.assert; const count = std.mem.count; const cwd = std.fs.cwd; -const data_dir = @import("build_options").data_dir ++ [_]u8{ sep }; const endsWith = std.mem.endsWith; const eql = std.mem.eql; const free = std.c.free; -const gf = @import("gfz"); -const ini = @import("ini"); const join = std.fs.path.joinZ; -const hash = std.crypto.hash.Blake3.hash; const maxInt = std.math.maxInt; const parseFloat = std.fmt.parseFloat; const parseInt = std.fmt.parseInt; @@ -50,10 +43,16 @@ const startsWith = std.mem.startsWith; const std = @import("std"); const tokenize = std.mem.tokenize; +const al = @import("zeal"); +const gf = @import("gfz"); +const ini = @import("ini"); + +const data_dir = @import("build_options").data_dir ++ [_]u8{ sep }; + /// Return whether the given keyboard key is pressed. export fn keyPress(key: c_int) bool { - const window = (Window.getCurrent() catch unreachable).?; - return (window.getKey(@intToEnum(Key, key)) catch unreachable) == .press; + const window = (gf.Window.getCurrent() catch unreachable).?; + return (window.getKey(@intToEnum(gf.Key, key)) catch unreachable) == .press; } /// Read given file to heap, allocated by C allocator. |