| author | |
| committer | |
| log | 93d1c2d6d4092bd17dc27298294581b77fa68881 |
| tree | 40332a8d4cecbfb70e4296a4d6b953dedc0fbd77 |
| parent | 8dd737801355427c558876bbcb299926d47b8269 |
Follow-up from 507a8096d2f9624bafaf963c3e189a477ef6b7bf17 files changed, 38 insertions(+), 36 deletions(-)
lib/std/c/darwin.zig+1-1| ... | ... | @@ -121,7 +121,7 @@ pub const AI_NUMERICHOST = 0x00000004; |
| 121 | 121 | /// prevent service name resolution |
| 122 | 122 | pub const AI_NUMERICSERV = 0x00001000; |
| 123 | 123 | |
| 124 | pub const EAI = extern enum(c_int) { | |
| 124 | pub const EAI = enum(c_int) { | |
| 125 | 125 | /// address family for hostname not supported |
| 126 | 126 | ADDRFAMILY = 1, |
| 127 | 127 |
lib/std/c/freebsd.zig+1-1| ... | ... | @@ -62,7 +62,7 @@ pub const sem_t = extern struct { |
| 62 | 62 | _padding: u32, |
| 63 | 63 | }; |
| 64 | 64 | |
| 65 | pub const EAI = extern enum(c_int) { | |
| 65 | pub const EAI = enum(c_int) { | |
| 66 | 66 | /// address family for hostname not supported |
| 67 | 67 | ADDRFAMILY = 1, |
| 68 | 68 |
lib/std/c/linux.zig+1-1| ... | ... | @@ -39,7 +39,7 @@ pub const NI_NAMEREQD = 0x08; |
| 39 | 39 | pub const NI_DGRAM = 0x10; |
| 40 | 40 | pub const NI_NUMERICSCOPE = 0x100; |
| 41 | 41 | |
| 42 | pub const EAI = extern enum(c_int) { | |
| 42 | pub const EAI = enum(c_int) { | |
| 43 | 43 | BADFLAGS = -1, |
| 44 | 44 | NONAME = -2, |
| 45 | 45 | AGAIN = -3, |
lib/std/crypto/25519/curve25519.zig+1-1| ... | ... | @@ -98,7 +98,7 @@ pub const Curve25519 = struct { |
| 98 | 98 | /// key is a low-order point. |
| 99 | 99 | pub fn mul(p: Curve25519, s: [32]u8) Error!Curve25519 { |
| 100 | 100 | const cofactor = [_]u8{8} ++ [_]u8{0} ** 31; |
| 101 | _ = ladder(p, cofactor, 4) catch |_| return error.WeakPublicKey; | |
| 101 | _ = ladder(p, cofactor, 4) catch return error.WeakPublicKey; | |
| 102 | 102 | return try ladder(p, s, 256); |
| 103 | 103 | } |
| 104 | 104 |
lib/std/fmt.zig+1-1| ... | ... | @@ -900,7 +900,7 @@ pub fn formatBuf( |
| 900 | 900 | ) !void { |
| 901 | 901 | if (options.width) |min_width| { |
| 902 | 902 | // In case of error assume the buffer content is ASCII-encoded |
| 903 | const width = unicode.utf8CountCodepoints(buf) catch |_| buf.len; | |
| 903 | const width = unicode.utf8CountCodepoints(buf) catch buf.len; | |
| 904 | 904 | const padding = if (width < min_width) min_width - width else 0; |
| 905 | 905 | |
| 906 | 906 | if (padding == 0) |
lib/std/os/linux/bpf.zig+4-4| ... | ... | @@ -854,7 +854,7 @@ test "opcodes" { |
| 854 | 854 | expect_opcode(0x95, Insn.exit()); |
| 855 | 855 | } |
| 856 | 856 | |
| 857 | pub const Cmd = extern enum(usize) { | |
| 857 | pub const Cmd = enum(usize) { | |
| 858 | 858 | /// Create a map and return a file descriptor that refers to the map. The |
| 859 | 859 | /// close-on-exec file descriptor flag is automatically enabled for the new |
| 860 | 860 | /// file descriptor. |
| ... | ... | @@ -977,7 +977,7 @@ pub const Cmd = extern enum(usize) { |
| 977 | 977 | _, |
| 978 | 978 | }; |
| 979 | 979 | |
| 980 | pub const MapType = extern enum(u32) { | |
| 980 | pub const MapType = enum(u32) { | |
| 981 | 981 | unspec, |
| 982 | 982 | hash, |
| 983 | 983 | array, |
| ... | ... | @@ -1044,7 +1044,7 @@ pub const MapType = extern enum(u32) { |
| 1044 | 1044 | _, |
| 1045 | 1045 | }; |
| 1046 | 1046 | |
| 1047 | pub const ProgType = extern enum(u32) { | |
| 1047 | pub const ProgType = enum(u32) { | |
| 1048 | 1048 | unspec, |
| 1049 | 1049 | |
| 1050 | 1050 | /// context type: __sk_buff |
| ... | ... | @@ -1139,7 +1139,7 @@ pub const ProgType = extern enum(u32) { |
| 1139 | 1139 | _, |
| 1140 | 1140 | }; |
| 1141 | 1141 | |
| 1142 | pub const AttachType = extern enum(u32) { | |
| 1142 | pub const AttachType = enum(u32) { | |
| 1143 | 1143 | cgroup_inet_ingress, |
| 1144 | 1144 | cgroup_inet_egress, |
| 1145 | 1145 | cgroup_inet_sock_create, |
lib/std/os/uefi/protocols/device_path_protocol.zig+7-7| ... | ... | @@ -90,7 +90,7 @@ pub const DevicePath = union(DevicePathType) { |
| 90 | 90 | End: EndDevicePath, |
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | pub const DevicePathType = extern enum(u8) { | |
| 93 | pub const DevicePathType = enum(u8) { | |
| 94 | 94 | Hardware = 0x01, |
| 95 | 95 | Acpi = 0x02, |
| 96 | 96 | Messaging = 0x03, |
| ... | ... | @@ -108,7 +108,7 @@ pub const HardwareDevicePath = union(Subtype) { |
| 108 | 108 | Controller: *const ControllerDevicePath, |
| 109 | 109 | Bmc: *const BmcDevicePath, |
| 110 | 110 | |
| 111 | pub const Subtype = extern enum(u8) { | |
| 111 | pub const Subtype = enum(u8) { | |
| 112 | 112 | Pci = 1, |
| 113 | 113 | PcCard = 2, |
| 114 | 114 | MemoryMapped = 3, |
| ... | ... | @@ -167,7 +167,7 @@ pub const AcpiDevicePath = union(Subtype) { |
| 167 | 167 | Adr: void, // TODO |
| 168 | 168 | Nvdimm: void, // TODO |
| 169 | 169 | |
| 170 | pub const Subtype = extern enum(u8) { | |
| 170 | pub const Subtype = enum(u8) { | |
| 171 | 171 | Acpi = 1, |
| 172 | 172 | ExpandedAcpi = 2, |
| 173 | 173 | Adr = 3, |
| ... | ... | @@ -196,7 +196,7 @@ pub const MessagingDevicePath = union(Subtype) { |
| 196 | 196 | Uart: void, // TODO |
| 197 | 197 | Vendor: void, // TODO |
| 198 | 198 | |
| 199 | pub const Subtype = extern enum(u8) { | |
| 199 | pub const Subtype = enum(u8) { | |
| 200 | 200 | Atapi = 1, |
| 201 | 201 | Scsi = 2, |
| 202 | 202 | FibreChannel = 3, |
| ... | ... | @@ -230,7 +230,7 @@ pub const MediaDevicePath = union(Subtype) { |
| 230 | 230 | RelativeOffsetRange: *const RelativeOffsetRangeDevicePath, |
| 231 | 231 | RamDisk: *const RamDiskDevicePath, |
| 232 | 232 | |
| 233 | pub const Subtype = extern enum(u8) { | |
| 233 | pub const Subtype = enum(u8) { | |
| 234 | 234 | HardDrive = 1, |
| 235 | 235 | Cdrom = 2, |
| 236 | 236 | Vendor = 3, |
| ... | ... | @@ -316,7 +316,7 @@ pub const MediaDevicePath = union(Subtype) { |
| 316 | 316 | pub const BiosBootSpecificationDevicePath = union(Subtype) { |
| 317 | 317 | BBS101: *const BBS101DevicePath, |
| 318 | 318 | |
| 319 | pub const Subtype = extern enum(u8) { | |
| 319 | pub const Subtype = enum(u8) { | |
| 320 | 320 | BBS101 = 1, |
| 321 | 321 | _, |
| 322 | 322 | }; |
| ... | ... | @@ -338,7 +338,7 @@ pub const EndDevicePath = union(Subtype) { |
| 338 | 338 | EndEntire: *const EndEntireDevicePath, |
| 339 | 339 | EndThisInstance: *const EndThisInstanceDevicePath, |
| 340 | 340 | |
| 341 | pub const Subtype = extern enum(u8) { | |
| 341 | pub const Subtype = enum(u8) { | |
| 342 | 342 | EndEntire = 0xff, |
| 343 | 343 | EndThisInstance = 0x01, |
| 344 | 344 | _, |
lib/std/os/uefi/protocols/graphics_output_protocol.zig+2-2| ... | ... | @@ -57,7 +57,7 @@ pub const GraphicsOutputModeInformation = extern struct { |
| 57 | 57 | pixels_per_scan_line: u32 = undefined, |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | pub const GraphicsPixelFormat = extern enum(u32) { | |
| 60 | pub const GraphicsPixelFormat = enum(u32) { | |
| 61 | 61 | PixelRedGreenBlueReserved8BitPerColor, |
| 62 | 62 | PixelBlueGreenRedReserved8BitPerColor, |
| 63 | 63 | PixelBitMask, |
| ... | ... | @@ -79,7 +79,7 @@ pub const GraphicsOutputBltPixel = extern struct { |
| 79 | 79 | reserved: u8 = undefined, |
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | pub const GraphicsOutputBltOperation = extern enum(u32) { | |
| 82 | pub const GraphicsOutputBltOperation = enum(u32) { | |
| 83 | 83 | BltVideoFill, |
| 84 | 84 | BltVideoToBltBuffer, |
| 85 | 85 | BltBufferToVideo, |
lib/std/os/uefi/protocols/hii_popup_protocol.zig+3-3| ... | ... | @@ -28,20 +28,20 @@ pub const HIIPopupProtocol = extern struct { |
| 28 | 28 | }; |
| 29 | 29 | }; |
| 30 | 30 | |
| 31 | pub const HIIPopupStyle = extern enum(u32) { | |
| 31 | pub const HIIPopupStyle = enum(u32) { | |
| 32 | 32 | Info, |
| 33 | 33 | Warning, |
| 34 | 34 | Error, |
| 35 | 35 | }; |
| 36 | 36 | |
| 37 | pub const HIIPopupType = extern enum(u32) { | |
| 37 | pub const HIIPopupType = enum(u32) { | |
| 38 | 38 | Ok, |
| 39 | 39 | Cancel, |
| 40 | 40 | YesNo, |
| 41 | 41 | YesNoCancel, |
| 42 | 42 | }; |
| 43 | 43 | |
| 44 | pub const HIIPopupSelection = extern enum(u32) { | |
| 44 | pub const HIIPopupSelection = enum(u32) { | |
| 45 | 45 | Ok, |
| 46 | 46 | Cancel, |
| 47 | 47 | Yes, |
lib/std/os/uefi/protocols/ip6_config_protocol.zig+1-1| ... | ... | @@ -40,7 +40,7 @@ pub const Ip6ConfigProtocol = extern struct { |
| 40 | 40 | }; |
| 41 | 41 | }; |
| 42 | 42 | |
| 43 | pub const Ip6ConfigDataType = extern enum(u32) { | |
| 43 | pub const Ip6ConfigDataType = enum(u32) { | |
| 44 | 44 | InterfaceInfo, |
| 45 | 45 | AltInterfaceId, |
| 46 | 46 | Policy, |
lib/std/os/uefi/protocols/ip6_protocol.zig+1-1| ... | ... | @@ -123,7 +123,7 @@ pub const Ip6RouteTable = extern struct { |
| 123 | 123 | prefix_length: u8, |
| 124 | 124 | }; |
| 125 | 125 | |
| 126 | pub const Ip6NeighborState = extern enum(u32) { | |
| 126 | pub const Ip6NeighborState = enum(u32) { | |
| 127 | 127 | Incomplete, |
| 128 | 128 | Reachable, |
| 129 | 129 | Stale, |
lib/std/os/uefi/protocols/simple_network_protocol.zig+1-1| ... | ... | @@ -134,7 +134,7 @@ pub const SimpleNetworkReceiveFilter = packed struct { |
| 134 | 134 | _pad: u27 = undefined, |
| 135 | 135 | }; |
| 136 | 136 | |
| 137 | pub const SimpleNetworkState = extern enum(u32) { | |
| 137 | pub const SimpleNetworkState = enum(u32) { | |
| 138 | 138 | Stopped, |
| 139 | 139 | Started, |
| 140 | 140 | Initialized, |
lib/std/os/uefi/tables/boot_services.zig+4-4| ... | ... | @@ -156,13 +156,13 @@ pub const BootServices = extern struct { |
| 156 | 156 | pub const tpl_high_level: usize = 31; |
| 157 | 157 | }; |
| 158 | 158 | |
| 159 | pub const TimerDelay = extern enum(u32) { | |
| 159 | pub const TimerDelay = enum(u32) { | |
| 160 | 160 | TimerCancel, |
| 161 | 161 | TimerPeriodic, |
| 162 | 162 | TimerRelative, |
| 163 | 163 | }; |
| 164 | 164 | |
| 165 | pub const MemoryType = extern enum(u32) { | |
| 165 | pub const MemoryType = enum(u32) { | |
| 166 | 166 | ReservedMemoryType, |
| 167 | 167 | LoaderCode, |
| 168 | 168 | LoaderData, |
| ... | ... | @@ -206,7 +206,7 @@ pub const MemoryDescriptor = extern struct { |
| 206 | 206 | }, |
| 207 | 207 | }; |
| 208 | 208 | |
| 209 | pub const LocateSearchType = extern enum(u32) { | |
| 209 | pub const LocateSearchType = enum(u32) { | |
| 210 | 210 | AllHandles, |
| 211 | 211 | ByRegisterNotify, |
| 212 | 212 | ByProtocol, |
| ... | ... | @@ -229,7 +229,7 @@ pub const ProtocolInformationEntry = extern struct { |
| 229 | 229 | open_count: u32, |
| 230 | 230 | }; |
| 231 | 231 | |
| 232 | pub const AllocateType = extern enum(u32) { | |
| 232 | pub const AllocateType = enum(u32) { | |
| 233 | 233 | AllocateAnyPages, |
| 234 | 234 | AllocateMaxAddress, |
| 235 | 235 | AllocateAddress, |
lib/std/os/uefi/tables/runtime_services.zig+1-1| ... | ... | @@ -51,7 +51,7 @@ pub const RuntimeServices = extern struct { |
| 51 | 51 | pub const signature: u64 = 0x56524553544e5552; |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | pub const ResetType = extern enum(u32) { | |
| 54 | pub const ResetType = enum(u32) { | |
| 55 | 55 | ResetCold, |
| 56 | 56 | ResetWarm, |
| 57 | 57 | ResetShutdown, |
lib/std/special/compiler_rt/compareXf2.zig+7-5| ... | ... | @@ -10,18 +10,20 @@ |
| 10 | 10 | const std = @import("std"); |
| 11 | 11 | const builtin = @import("builtin"); |
| 12 | 12 | |
| 13 | const LE = extern enum(i32) { | |
| 13 | const LE = enum(i32) { | |
| 14 | 14 | Less = -1, |
| 15 | 15 | Equal = 0, |
| 16 | 16 | Greater = 1, |
| 17 | Unordered = 1, | |
| 17 | ||
| 18 | const Unordered: LE = .Greater; | |
| 18 | 19 | }; |
| 19 | 20 | |
| 20 | const GE = extern enum(i32) { | |
| 21 | const GE = enum(i32) { | |
| 21 | 22 | Less = -1, |
| 22 | 23 | Equal = 0, |
| 23 | 24 | Greater = 1, |
| 24 | Unordered = -1, | |
| 25 | ||
| 26 | const Unordered: GE = .Less; | |
| 25 | 27 | }; |
| 26 | 28 | |
| 27 | 29 | pub fn cmp(comptime T: type, comptime RT: type, a: T, b: T) RT { |
| ... | ... | @@ -43,7 +45,7 @@ pub fn cmp(comptime T: type, comptime RT: type, a: T, b: T) RT { |
| 43 | 45 | const bAbs = @bitCast(rep_t, bInt) & absMask; |
| 44 | 46 | |
| 45 | 47 | // If either a or b is NaN, they are unordered. |
| 46 | if (aAbs > infRep or bAbs > infRep) return .Unordered; | |
| 48 | if (aAbs > infRep or bAbs > infRep) return RT.Unordered; | |
| 47 | 49 | |
| 48 | 50 | // If a and b are both zeros, they are equal. |
| 49 | 51 | if ((aAbs | bAbs) == 0) return .Equal; |
lib/std/special/compiler_rt/sparc.zig+1-1| ... | ... | @@ -11,7 +11,7 @@ const builtin = @import("builtin"); |
| 11 | 11 | |
| 12 | 12 | // The SPARC Architecture Manual, Version 9: |
| 13 | 13 | // A.13 Floating-Point Compare |
| 14 | const FCMP = extern enum(i32) { | |
| 14 | const FCMP = enum(i32) { | |
| 15 | 15 | Equal = 0, |
| 16 | 16 | Less = 1, |
| 17 | 17 | Greater = 2, |
src/BuiltinFn.zig+1-1| ... | ... | @@ -506,7 +506,7 @@ pub const list = list: { |
| 506 | 506 | "@intToFloat", |
| 507 | 507 | .{ |
| 508 | 508 | .tag = .int_to_float, |
| 509 | .param_count = 1, | |
| 509 | .param_count = 2, | |
| 510 | 510 | }, |
| 511 | 511 | }, |
| 512 | 512 | .{ |