aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Io/File/Writer.zig
AgeCommit message (Collapse)Author
5 daysstd.Io.Threaded: prevent 0-byte file writesAndrew Kelley
these cause EINVAL on darwin and are generally a wasted syscall. and remove a bogus error from File.Writer.Error.
5 daysstd: fix compilation errors on FreeBSDAndrew Kelley
5 daysstd: update remaining unit tests for std.Io API changesAndrew Kelley
5 daysfix more fallout from locking stderrAndrew Kelley
5 daysstd: rework locking stderrAndrew Kelley
5 daysstd: update tty config references in the build systemAndrew Kelley
5 daysstd: save terminal escape stripping for laterAndrew Kelley
5 daysstd.Io: add ResetEvent based on futexesAndrew Kelley
and add futex to the vtable. A future commit may make the other sync primitives based on futexes.
5 daysstd: rework TTY detection and printingAndrew Kelley
This commit sketches an idea for how to deal with detection of file streams as being terminals. When a File stream is a terminal, writes through the stream should have their escapes stripped unless the programmer explicitly enables terminal escapes. Furthermore, the programmer needs a convenient API for intentionally outputting escapes into the stream. In particular it should be possible to set colors that are silently discarded when the stream is not a terminal. This commit makes `Io.File.Writer` track the terminal mode in the already-existing `mode` field, making it the appropriate place to implement escape stripping. `Io.lockStderrWriter` returns a `*Io.File.Writer` with terminal detection already done by default. This is a higher-level application layer stream for writing to stderr. Meanwhile, `std.debug.lockStderrWriter` also returns a `*Io.File.Writer` but a lower-level one that is hard-coded to use a static single-threaded `std.Io.Threaded` instance. This is the same instance that is used for collecting debug information and iterating the unwind info.
5 daysbuild_runner compiling againAndrew Kelley
5 daysstd.heap.DebugAllocator: never detect TTY configAndrew Kelley
instead, allow the user to set it as a field. this fixes a bug where leak printing and error printing would run tty config detection for stderr, and then emit a log, which is not necessary going to print to stderr. however, the nice defaults are gone; the user must explicitly assign the tty_config field during initialization or else the logging will not have color. related: https://github.com/ziglang/zig/issues/24510
5 daystests: close() -> close(io)Andrew Kelley
5 daysstd: fix some surface level compilation errorsAndrew Kelley
And boldly remove preadv, pwritev, readv, writev, pread, pwrite from std.posix.
5 daysstd: extract sendfile/copy_file_range from Io.File.WriterAndrew Kelley
and move it into std.Io.Threaded (below the VTable)
5 daysstd: all File functions moved to std.IoAndrew Kelley