mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-14 09:48:40 -09:00
Compare commits
No commits in common. "zig" and "v2.9.1" have entirely different histories.
3 changed files with 3 additions and 17 deletions
|
|
@ -1,10 +1,6 @@
|
||||||
# SPDX-FileCopyrightText: Yorhel <projects@yorhel.nl>
|
# SPDX-FileCopyrightText: Yorhel <projects@yorhel.nl>
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
2.9.2 - 2025-10-24
|
|
||||||
- Still requires Zig 0.14 or 0.15
|
|
||||||
- Fix hang on loading config file when compiled with Zig 0.15.2
|
|
||||||
|
|
||||||
2.9.1 - 2025-08-21
|
2.9.1 - 2025-08-21
|
||||||
- Add support for building with Zig 0.15
|
- Add support for building with Zig 0.15
|
||||||
- Zig 0.14 is still supported
|
- Zig 0.14 is still supported
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: Yorhel <projects@yorhel.nl>
|
// SPDX-FileCopyrightText: Yorhel <projects@yorhel.nl>
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
pub const program_version = "2.9.2";
|
pub const program_version = "2.9.1";
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const model = @import("model.zig");
|
const model = @import("model.zig");
|
||||||
|
|
|
||||||
14
src/util.zig
14
src/util.zig
|
|
@ -231,19 +231,9 @@ pub const LineReader = if (@hasDecl(std.io, "bufferedReader")) struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read(s: *@This()) !?[]u8 {
|
pub fn read(s: *@This()) !?[]u8 {
|
||||||
// Can't use takeDelimiter() because that's not available in 0.15.1,
|
return s.rd.interface.takeDelimiterExclusive('\n') catch |err| switch (err) {
|
||||||
// Can't use takeDelimiterExclusive() because that changed behavior in 0.15.2.
|
error.EndOfStream => null,
|
||||||
const r = &s.rd.interface;
|
|
||||||
const result = r.peekDelimiterInclusive('\n') catch |err| switch (err) {
|
|
||||||
error.EndOfStream => {
|
|
||||||
const remaining = r.buffer[r.seek..r.end];
|
|
||||||
if (remaining.len == 0) return null;
|
|
||||||
r.toss(remaining.len);
|
|
||||||
return remaining;
|
|
||||||
},
|
|
||||||
else => |e| return e,
|
else => |e| return e,
|
||||||
};
|
};
|
||||||
r.toss(result.len);
|
|
||||||
return result[0 .. result.len - 1];
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue