| author | |
| committer | |
| log | 89d24825ecd05fb81e5fb8cc33a15f0ee1fd14c1 |
| tree | 50feca710a190d6a78370ef8eb17c1d07beea16c |
| parent | 806e5f4c6994e43f07d32c856db7722c75063332 |
closes #917 files changed, 22 insertions(+), 24 deletions(-)
src/cmd/fetch.zig+6-6| ... | ... | @@ -314,7 +314,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul |
| 314 | 314 | try w.writeAll(" &.{} },\n"); |
| 315 | 315 | } else { |
| 316 | 316 | try w.writeAll(" &.{"); |
| 317 | for (mod.deps) |moddep, j| { | |
| 317 | for (mod.deps, 0..) |moddep, j| { | |
| 318 | 318 | if (moddep.main.len == 0) continue; |
| 319 | 319 | try w.print(" _{s}.pkg.?", .{moddep.id[0..12]}); |
| 320 | 320 | if (j != mod.deps.len - 1) try w.writeAll(","); |
| ... | ... | @@ -324,7 +324,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul |
| 324 | 324 | } |
| 325 | 325 | if (mod.c_include_dirs.len > 0) { |
| 326 | 326 | try w.writeAll(" .c_include_dirs = &.{"); |
| 327 | for (mod.c_include_dirs) |item, j| { | |
| 327 | for (mod.c_include_dirs, 0..) |item, j| { | |
| 328 | 328 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)}); |
| 329 | 329 | if (j != mod.c_include_dirs.len - 1) try w.writeAll(","); |
| 330 | 330 | } |
| ... | ... | @@ -332,7 +332,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul |
| 332 | 332 | } |
| 333 | 333 | if (mod.c_source_files.len > 0) { |
| 334 | 334 | try w.writeAll(" .c_source_files = &.{"); |
| 335 | for (mod.c_source_files) |item, j| { | |
| 335 | for (mod.c_source_files, 0..) |item, j| { | |
| 336 | 336 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)}); |
| 337 | 337 | if (j != mod.c_source_files.len - 1) try w.writeAll(","); |
| 338 | 338 | } |
| ... | ... | @@ -340,7 +340,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul |
| 340 | 340 | } |
| 341 | 341 | if (mod.c_source_flags.len > 0) { |
| 342 | 342 | try w.writeAll(" .c_source_flags = &.{"); |
| 343 | for (mod.c_source_flags) |item, j| { | |
| 343 | for (mod.c_source_flags, 0..) |item, j| { | |
| 344 | 344 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)}); |
| 345 | 345 | if (j != mod.c_source_flags.len - 1) try w.writeAll(","); |
| 346 | 346 | } |
| ... | ... | @@ -348,7 +348,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul |
| 348 | 348 | } |
| 349 | 349 | if (mod.has_syslib_deps()) { |
| 350 | 350 | try w.writeAll(" .system_libs = &.{"); |
| 351 | for (mod.deps) |item, j| { | |
| 351 | for (mod.deps, 0..) |item, j| { | |
| 352 | 352 | if (!(item.type == .system_lib)) continue; |
| 353 | 353 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)}); |
| 354 | 354 | if (j != mod.deps.len - 1) try w.writeAll(","); |
| ... | ... | @@ -357,7 +357,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul |
| 357 | 357 | } |
| 358 | 358 | if (mod.has_framework_deps()) { |
| 359 | 359 | try w.writeAll(" .frameworks = &.{"); |
| 360 | for (mod.deps) |item, j| { | |
| 360 | for (mod.deps, 0..) |item, j| { | |
| 361 | 361 | if (!(item.type == .system_lib)) continue; |
| 362 | 362 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)}); |
| 363 | 363 | if (j != mod.deps.len - 1) try w.writeAll(","); |
src/cmd/generate.zig+8-8| ... | ... | @@ -167,7 +167,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D |
| 167 | 167 | \\ |
| 168 | 168 | \\ pub fn zp(self: *const Package, b: *std.build.Builder) ModuleDependency { |
| 169 | 169 | \\ var temp: [100]ModuleDependency = undefined; |
| 170 | \\ for (self.deps) |item, i| { | |
| 170 | \\ for (self.deps, 0..) |item, i| { | |
| 171 | 171 | \\ temp[i] = item.zp(b); |
| 172 | 172 | \\ } |
| 173 | 173 | \\ return .{ |
| ... | ... | @@ -245,7 +245,7 @@ fn print_deps(w: std.fs.File.Writer, m: zigmod.Module) !void { |
| 245 | 245 | fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: string, notdone: *std.ArrayList(zigmod.Module), done: *std.ArrayList(zigmod.Module)) !void { |
| 246 | 246 | var len: usize = notdone.items.len; |
| 247 | 247 | while (notdone.items.len > 0) { |
| 248 | for (notdone.items) |mod, i| { | |
| 248 | for (notdone.items, 0..) |mod, i| { | |
| 249 | 249 | if (contains_all(mod.deps, done.items)) { |
| 250 | 250 | try w.print( |
| 251 | 251 | \\ pub var _{s} = Package{{ |
| ... | ... | @@ -267,7 +267,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: |
| 267 | 267 | |
| 268 | 268 | if (!mod.has_no_zig_deps()) { |
| 269 | 269 | try w.writeAll(" .deps = &[_]*Package{"); |
| 270 | for (mod.deps) |moddep, j| { | |
| 270 | for (mod.deps, 0..) |moddep, j| { | |
| 271 | 271 | if (moddep.main.len == 0) continue; |
| 272 | 272 | try w.print(" &_{s}", .{moddep.id[0..12]}); |
| 273 | 273 | if (j != mod.deps.len - 1) try w.writeAll(","); |
| ... | ... | @@ -277,7 +277,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: |
| 277 | 277 | } |
| 278 | 278 | if (mod.c_include_dirs.len > 0) { |
| 279 | 279 | try w.writeAll(" .c_include_dirs = &.{"); |
| 280 | for (mod.c_include_dirs) |item, j| { | |
| 280 | for (mod.c_include_dirs, 0..) |item, j| { | |
| 281 | 281 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)}); |
| 282 | 282 | if (j != mod.c_include_dirs.len - 1) try w.writeAll(","); |
| 283 | 283 | } |
| ... | ... | @@ -285,7 +285,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: |
| 285 | 285 | } |
| 286 | 286 | if (mod.c_source_files.len > 0) { |
| 287 | 287 | try w.writeAll(" .c_source_files = &.{"); |
| 288 | for (mod.c_source_files) |item, j| { | |
| 288 | for (mod.c_source_files, 0..) |item, j| { | |
| 289 | 289 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)}); |
| 290 | 290 | if (j != mod.c_source_files.len - 1) try w.writeAll(","); |
| 291 | 291 | } |
| ... | ... | @@ -293,7 +293,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: |
| 293 | 293 | } |
| 294 | 294 | if (mod.c_source_flags.len > 0) { |
| 295 | 295 | try w.writeAll(" .c_source_flags = &.{"); |
| 296 | for (mod.c_source_flags) |item, j| { | |
| 296 | for (mod.c_source_flags, 0..) |item, j| { | |
| 297 | 297 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item)}); |
| 298 | 298 | if (j != mod.c_source_flags.len - 1) try w.writeAll(","); |
| 299 | 299 | } |
| ... | ... | @@ -301,7 +301,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: |
| 301 | 301 | } |
| 302 | 302 | if (mod.has_syslib_deps()) { |
| 303 | 303 | try w.writeAll(" .system_libs = &.{"); |
| 304 | for (mod.deps) |item, j| { | |
| 304 | for (mod.deps, 0..) |item, j| { | |
| 305 | 305 | if (!(item.type == .system_lib)) continue; |
| 306 | 306 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)}); |
| 307 | 307 | if (j != mod.deps.len - 1) try w.writeAll(","); |
| ... | ... | @@ -310,7 +310,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, alloc: std.mem.Allocator, cachepath: |
| 310 | 310 | } |
| 311 | 311 | if (mod.has_framework_deps()) { |
| 312 | 312 | try w.writeAll(" .frameworks = &.{"); |
| 313 | for (mod.deps) |item, j| { | |
| 313 | for (mod.deps, 0..) |item, j| { | |
| 314 | 314 | if (!(item.type == .system_lib)) continue; |
| 315 | 315 | try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)}); |
| 316 | 316 | if (j != mod.deps.len - 1) try w.writeAll(","); |
src/cmd/zpm/search.zig+1-2| ... | ... | @@ -1,7 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | const extras = @import("extras"); |
| 4 | const range = extras.range; | |
| 5 | 4 | |
| 6 | 5 | const zpm = @import("./../zpm.zig"); |
| 7 | 6 | |
| ... | ... | @@ -57,7 +56,7 @@ pub fn execute(args: [][]u8) !void { |
| 57 | 56 | } |
| 58 | 57 | |
| 59 | 58 | fn print_c_n(out: anytype, c: u8, n: usize) !void { |
| 60 | for (range(n)) |_| { | |
| 59 | for (0..n) |_| { | |
| 61 | 60 | try out.writeAll(&.{c}); |
| 62 | 61 | } |
| 63 | 62 | } |
src/cmd/zpm/tags.zig+1-2| ... | ... | @@ -1,7 +1,6 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const gpa = std.heap.c_allocator; |
| 3 | 3 | const extras = @import("extras"); |
| 4 | const range = extras.range; | |
| 5 | 4 | |
| 6 | 5 | const zpm = @import("./../zpm.zig"); |
| 7 | 6 | |
| ... | ... | @@ -41,7 +40,7 @@ pub fn execute(args: [][]u8) !void { |
| 41 | 40 | } |
| 42 | 41 | |
| 43 | 42 | fn print_c_n(out: anytype, c: u8, n: usize) !void { |
| 44 | for (range(n)) |_| { | |
| 43 | for (0..n) |_| { | |
| 45 | 44 | try out.writeAll(&.{c}); |
| 46 | 45 | } |
| 47 | 46 | } |
src/util/funcs.zig+1-1| ... | ... | @@ -244,7 +244,7 @@ pub fn indexOfN(haystack: string, needle: u8, n: usize) ?usize { |
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | pub fn indexOfAfter(haystack: string, needle: u8, after: usize) ?usize { |
| 247 | for (haystack) |c, i| { | |
| 247 | for (haystack, 0..) |c, i| { | |
| 248 | 248 | if (i <= after) continue; |
| 249 | 249 | if (c == needle) return i; |
| 250 | 250 | } |
src/util/module.zig+1-1| ... | ... | @@ -151,7 +151,7 @@ pub const Module = struct { |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | pub fn lessThan(_: void, lhs: Module, rhs: Module) bool { |
| 154 | for (lhs.clean_path) |_, i| { | |
| 154 | for (lhs.clean_path, 0..) |_, i| { | |
| 155 | 155 | if (i == rhs.clean_path.len) return false; |
| 156 | 156 | if (lhs.clean_path[i] < rhs.clean_path[i]) return true; |
| 157 | 157 | if (lhs.clean_path[i] > rhs.clean_path[i]) return false; |
zigmod.lock+4-4| ... | ... | @@ -1,20 +1,20 @@ |
| 1 | 1 | 2 |
| 2 | 2 | git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae2 |
| 3 | git https://github.com/marlersoft/zigwin32 commit-56cf335ddcdb72a6d7059c5b6f131263830b3eca | |
| 3 | git https://github.com/marlersoft/zigwin32 commit-79c0144225dc015a5c0253b5af30356aa6dc6426 | |
| 4 | 4 | git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b1 |
| 5 | 5 | git https://github.com/nektro/iguanaTLS commit-5dee3ead2b289319080834add91b5f35dfdb1847 |
| 6 | 6 | git https://github.com/nektro/zig-ansi commit-8d6fdb4983a616940c1d5137110292a7862f6a7e |
| 7 | 7 | git https://github.com/nektro/zig-detect-license commit-de5c285d999eea68b9189b48bb000243fef0a689 |
| 8 | git https://github.com/nektro/zig-extras commit-b45c99e2e747e3bb8df5e1051078cacb1470a430 | |
| 8 | git https://github.com/nektro/zig-extras commit-d34ac633f0a0af8d348b66a38e7497d031f027b1 | |
| 9 | 9 | git https://github.com/nektro/zig-inquirer commit-25e35a46400cfa1d7278436c0b7d14d314889d7c |
| 10 | 10 | git https://github.com/nektro/zig-json commit-0e7d026b0d3889ed7f96e1b24566a66cd9df6cb3 |
| 11 | 11 | git https://github.com/nektro/zig-leven commit-ab852cf74fa0b4edc530d925f0654b62c60365bf |
| 12 | 12 | git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680 |
| 13 | 13 | git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c |
| 14 | 14 | git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992 |
| 15 | git https://github.com/nektro/zig-time commit-aff2df866eb16ad781e26a25f8b664d498e2211a | |
| 16 | git https://github.com/truemedian/hzzp commit-2d2ab34b666e6806a6f6c98cc50ca94e606c9103 | |
| 15 | git https://github.com/nektro/zig-time commit-bfb7da7b8ee92b6c07f90a14b044a9b8f4df182c | |
| 17 | 16 | git https://github.com/nektro/zig-yaml commit-3f3641e90697546e7f8aeef365815c4ccab168b0 |
| 17 | git https://github.com/truemedian/hzzp commit-9b5de4d8626ddedf925bf82dbe49610513485b9d | |
| 18 | 18 | git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee417 |
| 19 | 19 | git https://github.com/ziglibs/known-folders commit-6b37490ac7285133bf09441850b8102c9728a776 |
| 20 | 20 | git https://github.com/yaml/libyaml tag-0.2.5 |