Update Zig (#164)

* update zig

* pkg/fontconfig: clean up @as

* pkg/freetype,harfbuzz: clean up @as

* pkg/imgui: clean up @as

* pkg/macos: clean up @as

* pkg/pixman,utf8proc: clean up @as

* clean up @as

* lots more @as cleanup

* undo flatpak changes

* clean up @as
This commit is contained in:
Mitchell Hashimoto
2023-06-30 12:15:31 -07:00
committed by GitHub
parent 0c632e7345
commit 314f9287b1
110 changed files with 892 additions and 1022 deletions

View File

@@ -186,7 +186,7 @@ pub const Parser = struct {
29 => return Attribute{ .reset_strikethrough = {} },
30...37 => return Attribute{
.@"8_fg" = @enumFromInt(color.Name, slice[0] - 30),
.@"8_fg" = @enumFromInt(slice[0] - 30),
},
38 => if (slice.len >= 5 and slice[1] == 2) {
@@ -199,22 +199,22 @@ pub const Parser = struct {
// it isn't, the behavior is undefined so we just... truncate it.
return Attribute{
.direct_color_fg = .{
.r = @truncate(u8, rgb[0]),
.g = @truncate(u8, rgb[1]),
.b = @truncate(u8, rgb[2]),
.r = @truncate(rgb[0]),
.g = @truncate(rgb[1]),
.b = @truncate(rgb[2]),
},
};
} else if (slice.len >= 2 and slice[1] == 5) {
self.idx += 2;
return Attribute{
.@"256_fg" = @truncate(u8, slice[2]),
.@"256_fg" = @truncate(slice[2]),
};
},
39 => return Attribute{ .reset_fg = {} },
40...47 => return Attribute{
.@"8_bg" = @enumFromInt(color.Name, slice[0] - 40),
.@"8_bg" = @enumFromInt(slice[0] - 40),
},
48 => if (slice.len >= 5 and slice[1] == 2) {
@@ -231,15 +231,15 @@ pub const Parser = struct {
// it isn't, the behavior is undefined so we just... truncate it.
return Attribute{
.direct_color_bg = .{
.r = @truncate(u8, rgb[0]),
.g = @truncate(u8, rgb[1]),
.b = @truncate(u8, rgb[2]),
.r = @truncate(rgb[0]),
.g = @truncate(rgb[1]),
.b = @truncate(rgb[2]),
},
};
} else if (slice.len >= 2 and slice[1] == 5) {
self.idx += 2;
return Attribute{
.@"256_bg" = @truncate(u8, slice[2]),
.@"256_bg" = @truncate(slice[2]),
};
},
@@ -259,9 +259,9 @@ pub const Parser = struct {
// it isn't, the behavior is undefined so we just... truncate it.
return Attribute{
.underline_color = .{
.r = @truncate(u8, rgb[0]),
.g = @truncate(u8, rgb[1]),
.b = @truncate(u8, rgb[2]),
.r = @truncate(rgb[0]),
.g = @truncate(rgb[1]),
.b = @truncate(rgb[2]),
},
};
},
@@ -270,11 +270,11 @@ pub const Parser = struct {
90...97 => return Attribute{
// 82 instead of 90 to offset to "bright" colors
.@"8_bright_fg" = @enumFromInt(color.Name, slice[0] - 82),
.@"8_bright_fg" = @enumFromInt(slice[0] - 82),
},
100...107 => return Attribute{
.@"8_bright_bg" = @enumFromInt(color.Name, slice[0] - 92),
.@"8_bright_bg" = @enumFromInt(slice[0] - 92),
},
else => {},