Commit Graph

5 Commits

Author SHA1 Message Date
Steffen Butzer
0d03145293 wincolor: migrate to winapi 0.3 2017-12-30 16:50:18 -05:00
Alex Crichton
7763c98188 wincolor: Re-fetch the console on all calls
The primary motivation for this commit was rust-lang/cargo#4189 where dropping a
`wincolor::Console` would call `CloseHandle` to close the console handle. Cargo
creates a few `Console` instances so it ended up closing stdout a little
earlier as intended!

The `GetStdHandle` function returns handles I believe aren't intended to be
closed (as there's no refcounting). I believe libstd doesn't close these
handles.

This commit also moves to calling `GetStdHandle` on demand which libstd changed
to doing so recently as well, preventing caching of stale handles that change
over time with calls to `SetStdHandle`.
2017-06-19 12:57:45 -04:00
Peter Williams
e573ab5c60 Add stderr support to wincolor. 2017-01-17 10:42:35 -05:00
Andrew Gallant
7a682f465e add docs to wincolor 2016-12-24 10:49:43 -05:00
Andrew Gallant
df72d8d1e0 Make wincolor crate compilable on non-Windows platforms. 2016-11-20 15:44:19 -05:00