aboutsummaryrefslogtreecommitdiff
path: root/std/os
AgeCommit message (Collapse)Author
2018-01-04self-hosted compiler works on windowsAndrew Kelley
* better error message for realpath failing * fix bug in std.io.readFileAllocExtra incorrectly returning error.EndOfStream * implement std.os.selfExePath and std.os.selfExeDirPath for windows
2018-01-03fix self-hosted build on windowsAndrew Kelley
2018-01-03fix self hosted compiler on windowsAndrew Kelley
2017-12-23move std/debug.zig to a subdirectoryAndrew Kelley
self hosted compiler parser tests do some fuzz testing
2017-12-23std.os.path.resolve handles an absolute path that is missing the driveAndrew Kelley
2017-12-23port most of main.cpp to self hosted compilerAndrew Kelley
2017-12-22bufPrint returns an errorJosh Wolfe
2017-12-22fix darwin and windows from previous commitAndrew Kelley
2017-12-22explicitly return from blocksAndrew Kelley
instead of last statement being expression value closes #629
2017-12-20add labeled loops, labeled break, labeled continue. remove gotoAndrew Kelley
closes #346 closes #630 regression: translate-c can no longer translate switch statements. after #629 we can ressurect and modify the code to utilize arbitrarily returning from blocks.
2017-12-18wip export rewriteAndrew Kelley
2017-12-12self-hosted: move code to std.os.ChildProcess.execAndrew Kelley
2017-12-06add higher level arg-parsing API + misc. changesAndrew Kelley
* add @noInlineCall - see #640 This fixes a crash in --release-safe and --release-fast modes where the optimizer inlines everything into _start and clobbers the command line argument data. If we were able to verify that the user's code never reads command line args, we could leave off this "no inline" attribute. * add i29 and u29 primitive types. u29 is the type of alignment, so it makes sense to be a primitive. probably in the future we'll make any `i` or `u` followed by digits into a primitive. * add `aligned` functions to Allocator interface * add `os.argsAlloc` and `os.argsFree` so that you can get a `[]const []u8`, do whatever arg parsing you want, and then free it. For now this uses the other API under the hood, but it could be reimplemented to do a single allocation. * add tests to make sure command line argument parsing works.
2017-12-04rename builtin.is_big_endian to builtin.endianAndrew Kelley
See #307
2017-12-04fix build on windowsAndrew Kelley
2017-12-03rework enums and unions and their relationship to each otherAndrew Kelley
* @enumTagName renamed to @tagName and it works on enums and union-enums * Remove the EnumTag type. Now there is only enum and union, and the tag type of a union is always an enum. * unions support specifying the tag enum type, and they support inferring an enum tag type. * Enums no longer support field types but they do support setting the tag values. Likewise union-enums when inferring an enum tag type support setting the tag values. * It is now an error for enums and unions to have 0 fields. * switch statements support union-enums closes #618
2017-11-29fix os.Dir compile errorsJosh Wolfe
2017-11-20move base64 functions into structsJosh Wolfe
2017-11-20rework std.base64 apiJosh Wolfe
* rename decode to decodeExactUnsafe. * add decodeExact, which checks for invalid chars and padding. * add decodeWithIgnore, which also allows ignoring chars. * alphabets are supplied to the decoders with their char-to-index mapping already built, which enables it to be done at comptime. * all decode/encode apis except decodeWithIgnore require dest to be the exactly correct length. This is calculated by a calc function corresponding to each api. These apis no longer return the dest parameter. * for decodeWithIgnore, an exact size cannot be known a priori. Instead, a calc function gives an upperbound, and a runtime error is returned in case of overflow. decodeWithIgnore returns the number of bytes written to dest. closes #611
2017-11-16Added DLL loading capability in windows to the std lib.dimenus
2017-11-10fix windows trying to run linux-only testsAndrew Kelley
2017-11-10rename testAndrew Kelley
2017-11-10add epoll and timerfd support on linuxBrendon Scheinman
2017-11-10add windows implementation of io.File.getEndPosAndrew Kelley
2017-11-10add a std lib test for reading and writing filesAndrew Kelley
* fix fstat wrong on darwin * move std.debug.global_allocator to std.debug.global_allocator_state and make it private * add std.debug.global_allocator as a pointer (to upgrade your zig code remove the '&')
2017-11-09Fix Stat include in darwin land (#605)Jeff Fowler
2017-11-09fix typo on darwin lseek (#602)Jeff Fowler
2017-11-07std.io: introduce buffered I/O and change APIAndrew Kelley
I started working on #465 and made some corresponding std.io API changes. New structs: * std.io.FileInStream * std.io.FileOutStream * std.io.BufferedOutStream * std.io.BufferedInStream Removed: * std.io.File.in_stream * std.io.File.out_stream Now instead of &file.out_stream or &file.in_stream to get access to the stream API for a file, you get it like this: var file_in_stream = io.FileInStream.init(&file); const in_stream = &file_in_stream.stream; var file_out_stream = io.FileOutStream.init(&file); const out_stream = &file_out_stream.stream; This is evidence that we might not need any OOP features - See #130.
2017-10-31fix windows build from previous commitAndrew Kelley
2017-10-31breaking change to std.io APIAndrew Kelley
* Merge io.InStream and io.OutStream into io.File * Introduce io.OutStream and io.InStream interfaces - io.File implements both of these * Move mem.IncrementingAllocator to heap.IncrementingAllocator Instead of: ``` %return std.io.stderr.printf("hello\n"); ``` now do: ``` std.debug.warn("hello\n"); ``` To print to stdout, see `io.getStdOut()`. * Rename std.ArrayList.resizeDown to std.ArrayList.shrink.
2017-10-16std.os.ChildProcess: on windows cwd affects exe search pathAndrew Kelley
to match posix semantics disabling non-passing build-examples tests. See #538
2017-10-15fix windows argument parsingAndrew Kelley
2017-10-15fix posix from previous commitAndrew Kelley
2017-10-15fix std.io.InStream for windowsAndrew Kelley
now we handle PIPE_BROKEN as an EOF also set up framework for debugging unexpected posix/windows errors
2017-10-15fix child process stdio piping behavior on windowsAndrew Kelley
2017-10-15use correct integer type for windows BOOLAndrew Kelley
2017-10-15fix regression on posix from previous commitAndrew Kelley
2017-10-15implement environment variables for windowsAndrew Kelley
2017-10-14implement std.os.rename for windowsAndrew Kelley
2017-10-14implement std.os.symLink for windowsAndrew Kelley
2017-10-14fix regressions from previous commit on windowsAndrew Kelley
2017-10-14organize windows utility functionsAndrew Kelley
2017-10-14fix os.makeDir for posixAndrew Kelley
2017-10-14implement os.makeDir for windowsAndrew Kelley
2017-10-14implement std.os.ChildProcess for windowsAndrew Kelley
2017-10-11fix std.os.getRandomBytes for windowsAndrew Kelley
2017-10-11implement command line argument parsing for windowsAndrew Kelley
See #302
2017-10-10better abort() implementation for windowsAndrew Kelley
in debug mode, it spawns the debugger
2017-10-10use allocator.shrink instead of realloc in os.path.realAndrew Kelley
2017-10-09implement std.io.InStream for windowsAndrew Kelley
See #302