authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-31 14:03:20-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-31 16:57:42-07:00
loga7029496d153bd2ba4e91ef561a399cad6d77307
tree29303e2708ab86d31c2070ad96939e6aa58d7a67
parent377e8579f9539c56fc5988c9a452a01438af89f3

remove hard tabs from source code

these are illegal according to the spec

7 files changed, 107 insertions(+), 111 deletions(-)

lib/std/crypto/ml_kem.zig+3-3
......@@ -677,10 +677,10 @@ fn montReduce(x: i32) i16 {
677677 // Note gcd(2¹⁶, q) = 1 as q is prime. Write q' := 62209 = q⁻¹ mod R.
678678 // First we compute
679679 //
680 // m := ((x mod R) q') mod R
680 // m := ((x mod R) q') mod R
681681 // = x q' mod R
682 // = int16(x q')
683 // = int16(int32(x) * int32(q'))
682 // = int16(x q')
683 // = int16(int32(x) * int32(q'))
684684 //
685685 // Note that x q' might be as big as 2³² and could overflow the int32
686686 // multiplication in the last line. However for any int32s a and b,
lib/std/macho.zig+4-5
......@@ -203,8 +203,7 @@ pub const symtab_command = extern struct {
203203/// local symbols (static and debugging symbols) - grouped by module
204204/// defined external symbols - grouped by module (sorted by name if not lib)
205205/// undefined external symbols (sorted by name if MH_BINDATLOAD is not set,
206/// and in order the were seen by the static
207/// linker if MH_BINDATLOAD is set)
206/// and in order the were seen by the static linker if MH_BINDATLOAD is set)
208207/// In this load command there are offsets and counts to each of the three groups
209208/// of symbols.
210209///
......@@ -219,9 +218,9 @@ pub const symtab_command = extern struct {
219218/// shared library. For executable and object modules, which are files
220219/// containing only one module, the information that would be in these three
221220/// tables is determined as follows:
222/// table of contents - the defined external symbols are sorted by name
223/// module table - the file contains only one module so everything in the
224/// file is part of the module.
221/// table of contents - the defined external symbols are sorted by name
222/// module table - the file contains only one module so everything in the file
223/// is part of the module.
225224/// reference symbol table - is the defined and undefined external symbols
226225///
227226/// For dynamically linked shared library files this load command also contains
lib/std/zig/system/darwin/macos.zig+46-46
......@@ -303,16 +303,16 @@ test "detect" {
303303 \\<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
304304 \\<plist version="1.0">
305305 \\<dict>
306 \\ <key>ProductBuildVersion</key>
307 \\ <string>7W98</string>
308 \\ <key>ProductCopyright</key>
309 \\ <string>Apple Computer, Inc. 1983-2004</string>
310 \\ <key>ProductName</key>
311 \\ <string>Mac OS X</string>
312 \\ <key>ProductUserVisibleVersion</key>
313 \\ <string>10.3.9</string>
314 \\ <key>ProductVersion</key>
315 \\ <string>10.3.9</string>
306 \\ <key>ProductBuildVersion</key>
307 \\ <string>7W98</string>
308 \\ <key>ProductCopyright</key>
309 \\ <string>Apple Computer, Inc. 1983-2004</string>
310 \\ <key>ProductName</key>
311 \\ <string>Mac OS X</string>
312 \\ <key>ProductUserVisibleVersion</key>
313 \\ <string>10.3.9</string>
314 \\ <key>ProductVersion</key>
315 \\ <string>10.3.9</string>
316316 \\</dict>
317317 \\</plist>
318318 ,
......@@ -323,18 +323,18 @@ test "detect" {
323323 \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
324324 \\<plist version="1.0">
325325 \\<dict>
326 \\ <key>ProductBuildVersion</key>
327 \\ <string>19G68</string>
328 \\ <key>ProductCopyright</key>
329 \\ <string>1983-2020 Apple Inc.</string>
330 \\ <key>ProductName</key>
331 \\ <string>Mac OS X</string>
332 \\ <key>ProductUserVisibleVersion</key>
333 \\ <string>10.15.6</string>
334 \\ <key>ProductVersion</key>
335 \\ <string>10.15.6</string>
336 \\ <key>iOSSupportVersion</key>
337 \\ <string>13.6</string>
326 \\ <key>ProductBuildVersion</key>
327 \\ <string>19G68</string>
328 \\ <key>ProductCopyright</key>
329 \\ <string>1983-2020 Apple Inc.</string>
330 \\ <key>ProductName</key>
331 \\ <string>Mac OS X</string>
332 \\ <key>ProductUserVisibleVersion</key>
333 \\ <string>10.15.6</string>
334 \\ <key>ProductVersion</key>
335 \\ <string>10.15.6</string>
336 \\ <key>iOSSupportVersion</key>
337 \\ <string>13.6</string>
338338 \\</dict>
339339 \\</plist>
340340 ,
......@@ -345,18 +345,18 @@ test "detect" {
345345 \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
346346 \\<plist version="1.0">
347347 \\<dict>
348 \\ <key>ProductBuildVersion</key>
349 \\ <string>20A2408</string>
350 \\ <key>ProductCopyright</key>
351 \\ <string>1983-2020 Apple Inc.</string>
352 \\ <key>ProductName</key>
353 \\ <string>macOS</string>
354 \\ <key>ProductUserVisibleVersion</key>
355 \\ <string>11.0</string>
356 \\ <key>ProductVersion</key>
357 \\ <string>11.0</string>
358 \\ <key>iOSSupportVersion</key>
359 \\ <string>14.2</string>
348 \\ <key>ProductBuildVersion</key>
349 \\ <string>20A2408</string>
350 \\ <key>ProductCopyright</key>
351 \\ <string>1983-2020 Apple Inc.</string>
352 \\ <key>ProductName</key>
353 \\ <string>macOS</string>
354 \\ <key>ProductUserVisibleVersion</key>
355 \\ <string>11.0</string>
356 \\ <key>ProductVersion</key>
357 \\ <string>11.0</string>
358 \\ <key>iOSSupportVersion</key>
359 \\ <string>14.2</string>
360360 \\</dict>
361361 \\</plist>
362362 ,
......@@ -367,18 +367,18 @@ test "detect" {
367367 \\<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
368368 \\<plist version="1.0">
369369 \\<dict>
370 \\ <key>ProductBuildVersion</key>
371 \\ <string>20C63</string>
372 \\ <key>ProductCopyright</key>
373 \\ <string>1983-2020 Apple Inc.</string>
374 \\ <key>ProductName</key>
375 \\ <string>macOS</string>
376 \\ <key>ProductUserVisibleVersion</key>
377 \\ <string>11.1</string>
378 \\ <key>ProductVersion</key>
379 \\ <string>11.1</string>
380 \\ <key>iOSSupportVersion</key>
381 \\ <string>14.3</string>
370 \\ <key>ProductBuildVersion</key>
371 \\ <string>20C63</string>
372 \\ <key>ProductCopyright</key>
373 \\ <string>1983-2020 Apple Inc.</string>
374 \\ <key>ProductName</key>
375 \\ <string>macOS</string>
376 \\ <key>ProductUserVisibleVersion</key>
377 \\ <string>11.1</string>
378 \\ <key>ProductVersion</key>
379 \\ <string>11.1</string>
380 \\ <key>iOSSupportVersion</key>
381 \\ <string>14.3</string>
382382 \\</dict>
383383 \\</plist>
384384 ,
lib/std/zig/system/linux.zig+30-30
......@@ -109,12 +109,12 @@ const RiscvCpuinfoParser = CpuinfoParser(RiscvCpuinfoImpl);
109109
110110test "cpuinfo: RISC-V" {
111111 try testParser(RiscvCpuinfoParser, .riscv64, &Target.riscv.cpu.sifive_u74,
112 \\processor : 0
113 \\hart : 1
114 \\isa : rv64imafdc
115 \\mmu : sv39
116 \\isa-ext :
117 \\uarch : sifive,u74-mc
112 \\processor : 0
113 \\hart : 1
114 \\isa : rv64imafdc
115 \\mmu : sv39
116 \\isa-ext :
117 \\uarch : sifive,u74-mc
118118 );
119119}
120120
......@@ -177,16 +177,16 @@ const PowerpcCpuinfoParser = CpuinfoParser(PowerpcCpuinfoImpl);
177177
178178test "cpuinfo: PowerPC" {
179179 try testParser(PowerpcCpuinfoParser, .powerpc, &Target.powerpc.cpu.@"970",
180 \\processor : 0
181 \\cpu : PPC970MP, altivec supported
182 \\clock : 1250.000000MHz
183 \\revision : 1.1 (pvr 0044 0101)
180 \\processor : 0
181 \\cpu : PPC970MP, altivec supported
182 \\clock : 1250.000000MHz
183 \\revision : 1.1 (pvr 0044 0101)
184184 );
185185 try testParser(PowerpcCpuinfoParser, .powerpc64le, &Target.powerpc.cpu.pwr8,
186 \\processor : 0
187 \\cpu : POWER8 (raw), altivec supported
188 \\clock : 2926.000000MHz
189 \\revision : 2.0 (pvr 004d 0200)
186 \\processor : 0
187 \\cpu : POWER8 (raw), altivec supported
188 \\clock : 2926.000000MHz
189 \\revision : 2.0 (pvr 004d 0200)
190190 );
191191}
192192
......@@ -304,25 +304,25 @@ test "cpuinfo: ARM" {
304304 \\CPU revision : 7
305305 );
306306 try testParser(ArmCpuinfoParser, .arm, &Target.arm.cpu.cortex_a7,
307 \\processor : 0
308 \\model name : ARMv7 Processor rev 3 (v7l)
309 \\BogoMIPS : 18.00
310 \\Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
311 \\CPU implementer : 0x41
307 \\processor : 0
308 \\model name : ARMv7 Processor rev 3 (v7l)
309 \\BogoMIPS : 18.00
310 \\Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
311 \\CPU implementer : 0x41
312312 \\CPU architecture: 7
313 \\CPU variant : 0x0
314 \\CPU part : 0xc07
315 \\CPU revision : 3
313 \\CPU variant : 0x0
314 \\CPU part : 0xc07
315 \\CPU revision : 3
316316 \\
317 \\processor : 4
318 \\model name : ARMv7 Processor rev 3 (v7l)
319 \\BogoMIPS : 90.00
320 \\Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
321 \\CPU implementer : 0x41
317 \\processor : 4
318 \\model name : ARMv7 Processor rev 3 (v7l)
319 \\BogoMIPS : 90.00
320 \\Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
321 \\CPU implementer : 0x41
322322 \\CPU architecture: 7
323 \\CPU variant : 0x2
324 \\CPU part : 0xc0f
325 \\CPU revision : 3
323 \\CPU variant : 0x2
324 \\CPU part : 0xc0f
325 \\CPU revision : 3
326326 );
327327 try testParser(ArmCpuinfoParser, .aarch64, &Target.aarch64.cpu.cortex_a72,
328328 \\processor : 0
src/link/tapi/yaml/test.zig+1-4
......@@ -237,10 +237,7 @@ test "double quoted string" {
237237 try testing.expectEqualStrings(
238238 \\"here" are some escaped quotes
239239 , arr[1]);
240 try testing.expectEqualStrings(
241 \\newlines and tabs
242 \\are supported
243 , arr[2]);
240 try testing.expectEqualStrings("newlines and tabs\nare\tsupported", arr[2]);
244241 try testing.expectEqualStrings(
245242 \\let's have
246243 \\some fun!
test/run_translated_c.zig+6-6
......@@ -26,17 +26,17 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void {
2626 \\void baz(void);
2727 \\struct foo { int x; };
2828 \\void bar() {
29 \\ struct foo tmp;
29 \\ struct foo tmp;
3030 \\}
3131 \\
3232 \\void baz() {
33 \\ struct foo tmp;
33 \\ struct foo tmp;
3434 \\}
3535 \\
3636 \\int main(void) {
37 \\ bar();
38 \\ baz();
39 \\ return 0;
37 \\ bar();
38 \\ baz();
39 \\ return 0;
4040 \\}
4141 , "");
4242
......@@ -53,7 +53,7 @@ pub fn addCases(cases: *tests.RunTranslatedCContext) void {
5353 cases.add("parenthesized string literal",
5454 \\void foo(const char *s) {}
5555 \\int main(void) {
56 \\ foo(("bar"));
56 \\ foo(("bar"));
5757 \\}
5858 , "");
5959
test/translate_c.zig+17-17
......@@ -133,20 +133,20 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
133133
134134 cases.add("scoped typedef",
135135 \\void foo() {
136 \\ typedef union {
137 \\ int A;
138 \\ int B;
139 \\ int C;
140 \\ } Foo;
141 \\ Foo a = {0};
142 \\ {
143 \\ typedef union {
144 \\ int A;
145 \\ int B;
146 \\ int C;
147 \\ } Foo;
148 \\ Foo a = {0};
149 \\ }
136 \\ typedef union {
137 \\ int A;
138 \\ int B;
139 \\ int C;
140 \\ } Foo;
141 \\ Foo a = {0};
142 \\ {
143 \\ typedef union {
144 \\ int A;
145 \\ int B;
146 \\ int C;
147 \\ } Foo;
148 \\ Foo a = {0};
149 \\ }
150150 \\}
151151 , &[_][]const u8{
152152 \\pub export fn foo() void {
......@@ -2043,18 +2043,18 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
20432043 \\ break;
20442044 \\ }
20452045 \\ case 4:
2046 \\ case 5:
2046 \\ case 5:
20472047 \\ res = 69;
20482048 \\ {
20492049 \\ res = 5;
2050 \\ return;
2050 \\ return;
20512051 \\ }
20522052 \\ case 6:
20532053 \\ switch (res) {
20542054 \\ case 9: break;
20552055 \\ }
20562056 \\ res = 1;
2057 \\ return;
2057 \\ return;
20582058 \\ }
20592059 \\}
20602060 , &[_][]const u8{