aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/errmsg.zig
diff options
context:
space:
mode:
authorhryx <codroid@gmail.com>2019-05-27 17:24:21 -0700
committerhryx <codroid@gmail.com>2019-05-27 17:24:21 -0700
commite1f3eec9cc05535b3f3b81f2fb7cd65dd4d1e841 (patch)
tree5f408ed68a686491eaf759f9cbba02beac829b38 /src-self-hosted/errmsg.zig
parent2aa1c5da5dded6b1b346c3a1b57443f2c459ebe9 (diff)
parent3fccc0747903f0726d6cc8ee73832cb62f1304bb (diff)
downloadzig-e1f3eec9cc05535b3f3b81f2fb7cd65dd4d1e841.tar.gz
zig-e1f3eec9cc05535b3f3b81f2fb7cd65dd4d1e841.zip
Merge branch 'master' into translate-c-userland
Diffstat (limited to 'src-self-hosted/errmsg.zig')
-rw-r--r--src-self-hosted/errmsg.zig9
1 files changed, 5 insertions, 4 deletions
diff --git a/src-self-hosted/errmsg.zig b/src-self-hosted/errmsg.zig
index fc49fad410..eef5817d58 100644
--- a/src-self-hosted/errmsg.zig
+++ b/src-self-hosted/errmsg.zig
@@ -1,6 +1,7 @@
const std = @import("std");
const mem = std.mem;
-const os = std.os;
+const fs = std.fs;
+const process = std.process;
const Token = std.zig.Token;
const ast = std.zig.ast;
const TokenIndex = std.zig.ast.TokenIndex;
@@ -239,10 +240,10 @@ pub const Msg = struct {
const allocator = msg.getAllocator();
const tree = msg.getTree();
- const cwd = try os.getCwdAlloc(allocator);
+ const cwd = try process.getCwdAlloc(allocator);
defer allocator.free(cwd);
- const relpath = try os.path.relative(allocator, cwd, msg.realpath);
+ const relpath = try fs.path.relative(allocator, cwd, msg.realpath);
defer allocator.free(relpath);
const path = if (relpath.len < msg.realpath.len) relpath else msg.realpath;
@@ -276,7 +277,7 @@ pub const Msg = struct {
try stream.write("\n");
}
- pub fn printToFile(msg: *const Msg, file: os.File, color: Color) !void {
+ pub fn printToFile(msg: *const Msg, file: fs.File, color: Color) !void {
const color_on = switch (color) {
Color.Auto => file.isTty(),
Color.On => true,