working on macos
parent
43467690f3
commit
7e9be00924
|
|
@ -29,8 +29,8 @@
|
|||
},
|
||||
.zig_objc = .{
|
||||
// mitchellh/zig-objc
|
||||
.url = "https://github.com/mitchellh/zig-objc/archive/2329503f692fd5c8ff4c0528b066a22c40dc58e8.tar.gz",
|
||||
.hash = "zig_objc-0.0.0-Ir_Sp3TyAABFhwDzqDGShnFQmexkp4fHcSTafA9S_Lrh",
|
||||
.url = "https://github.com/mitchellh/zig-objc/archive/3ab0d37c7d6b933d6ded1b3a35b6b60f05590a98.tar.gz",
|
||||
.hash = "zig_objc-0.0.0-Ir_Sp3TyAADEVRTxXlScq3t_uKAM91MYNerZkHfbD0yt",
|
||||
},
|
||||
.zig_js = .{
|
||||
// mitchellh/zig-js
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ pub fn build(b: *std.Build) !void {
|
|||
var flags = std.ArrayList([]const u8).init(b.allocator);
|
||||
defer flags.deinit();
|
||||
lib.addCSourceFile(.{
|
||||
.file = b.path("os/log.c"),
|
||||
.file = b.path("os/zig_log.c"),
|
||||
.flags = flags.items,
|
||||
});
|
||||
lib.addCSourceFile(.{
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ pub fn expandPath(alloc: Allocator, cmd: []const u8) !?[]u8 {
|
|||
const PATH = switch (builtin.os.tag) {
|
||||
.windows => blk: {
|
||||
const win_path = std.process.getenvW(std.unicode.utf8ToUtf16LeStringLiteral("PATH")) orelse return null;
|
||||
const path = try std.unicode.utf16leToUtf8Alloc(alloc, win_path);
|
||||
const path = try std.unicode.utf16LeToUtf8Alloc(alloc, win_path);
|
||||
break :blk path;
|
||||
},
|
||||
else => std.posix.getenvZ("PATH") orelse return null,
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ pub fn translate(
|
|||
} else false;
|
||||
|
||||
// Convert the utf16 to utf8
|
||||
const len = try std.unicode.utf16leToUtf8(out, char[0..char_count]);
|
||||
const len = try std.unicode.utf16LeToUtf8(out, char[0..char_count]);
|
||||
return .{
|
||||
.text = out[0..len],
|
||||
.composing = composing,
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ fn renderScreenWindow(self: *Inspector) void {
|
|||
|
||||
if (kitty_flags.int() != 0) {
|
||||
const Flags = @TypeOf(kitty_flags);
|
||||
inline for (@typeInfo(Flags).Struct.fields) |field| {
|
||||
inline for (@typeInfo(Flags).@"struct".fields) |field| {
|
||||
{
|
||||
const value = @field(kitty_flags, field.name);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub fn render(page: *const terminal.Page) void {
|
|||
{
|
||||
_ = cimgui.c.igTableSetColumnIndex(1);
|
||||
cimgui.c.igText("%d bytes (%d KiB)", page.memory.len, units.toKibiBytes(page.memory.len));
|
||||
cimgui.c.igText("%d VM pages", page.memory.len / std.mem.page_size);
|
||||
cimgui.c.igText("%d VM pages", page.memory.len / std.heap.page_size_min);
|
||||
}
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ pub fn allocTmpDir(allocator: std.mem.Allocator) ?[]const u8 {
|
|||
if (builtin.os.tag == .windows) {
|
||||
// TODO: what is a good fallback path on windows?
|
||||
const v = std.process.getenvW(std.unicode.utf8ToUtf16LeStringLiteral("TMP")) orelse return null;
|
||||
return std.unicode.utf16leToUtf8Alloc(allocator, v) catch |e| {
|
||||
return std.unicode.utf16LeToUtf8Alloc(allocator, v) catch |e| {
|
||||
log.warn("failed to convert temp dir path from windows string: {}", .{e});
|
||||
return null;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue