aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-08-21 20:28:37 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-08-21 20:31:50 -0400
commitea1b21dbdb3d5e680b133be68d174dcc0067fa1e (patch)
tree88114bd3c7235e8b0478a1e98ddc48b25d013a95 /doc
parent51852d2587b931767a12d42ce39d5c191eea10ea (diff)
downloadzig-ea1b21dbdb3d5e680b133be68d174dcc0067fa1e.tar.gz
zig-ea1b21dbdb3d5e680b133be68d174dcc0067fa1e.zip
fix linux
* error.BadFd is not a valid error code. it would always be a bug to get this error code. * merge error.Io with existing error.InputOutput * merge error.PathNotFound with existing error.FileNotFound. Not all OS's support both. * add os.File.openReadC * add error.BadPathName for windows file operations with invalid characters * add os.toPosixPath to help stack allocate a null terminating byte * add some TODOs for other functions to investigate removing the allocator requirement * optimize some implementations to use the alternate functions when a null byte is already available * add a missing error.SkipZigTest * os.selfExePath uses a non-allocating API * os.selfExeDirPath uses a non-allocating API * os.path.real uses a non-allocating API * add os.path.realAlloc and os.path.realC * convert many windows syscalls to use the W versions (See #534)
Diffstat (limited to 'doc')
-rw-r--r--doc/docgen.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/docgen.zig b/doc/docgen.zig
index 4d66b43efd..3145c4483e 100644
--- a/doc/docgen.zig
+++ b/doc/docgen.zig
@@ -34,10 +34,10 @@ pub fn main() !void {
const out_file_name = try (args_it.next(allocator) orelse @panic("expected output arg"));
defer allocator.free(out_file_name);
- var in_file = try os.File.openRead(allocator, in_file_name);
+ var in_file = try os.File.openRead(in_file_name);
defer in_file.close();
- var out_file = try os.File.openWrite(allocator, out_file_name);
+ var out_file = try os.File.openWrite(out_file_name);
defer out_file.close();
var file_in_stream = io.FileInStream.init(&in_file);
@@ -738,7 +738,7 @@ fn genHtml(allocator: *mem.Allocator, tokenizer: *Tokenizer, toc: *Toc, out: var
try out.print("<pre><code class=\"zig\">{}</code></pre>", escaped_source);
const name_plus_ext = try std.fmt.allocPrint(allocator, "{}.zig", code.name);
const tmp_source_file_name = try os.path.join(allocator, tmp_dir_name, name_plus_ext);
- try io.writeFile(allocator, tmp_source_file_name, trimmed_raw_source);
+ try io.writeFile(tmp_source_file_name, trimmed_raw_source);
switch (code.id) {
Code.Id.Exe => |expected_outcome| {