summaryrefslogtreecommitdiffstats
path: root/src/line_printer.cc
Commit message (Collapse)AuthorAgeFilesLines
* win: Use full console width for status messages.Nico Weber2014-12-021-7/+4
| | | | | | | | | | The original overprinting code, added in 7b3d8c8e, used printf for printing the status. printf needs one column for the cursor, so the status message could only take up `width - 1` columns. fc554c22 changed Windows from printf to WriteConsoleOutput which doesn't move the cursor, so keeping one column empty is no longer needed. So stop doing that. Also remove a duplicate call to GetConsoleScreenBufferInfo.
* win/lineprinter: Use a vector instead of manual memory management.Nico Weber2014-12-021-8/+4
| | | | No behavior change. Based on a patch from gmisocpp@gmail.com!
* win: Let the "Pause" key or Ctrl-S pause output.Nico Weber2014-12-021-10/+5
| | | | | | | | | | | | In cmd.exe, hitting the "Pause" key or Ctrl-S will pause programs until a key is pressed. This is apparently implemented when stdout is writing to, so use printf instead of Console functions to reset the cursor to the start of the line. Also happens to simplify the code. (This already worked in -v mode since that already prints using printf.) Based on a patch from gmisocpp@gmail.com!
* Update line_printer.ccppbrown2014-10-271-0/+1
| | | Include POSIX termios.h
* Introduce the "console" poolPeter Collingbourne2014-02-031-6/+45
| | | | | | | This is a pre-defined pool with a depth of 1. It has the special property that any task in the pool has direct access to the console. This can be useful for interactive tasks or long-running tasks which produce status updates on the console (such as test suites).
* Use fwrite to print whatever the subcommand wroteReid Kleckner2013-07-021-1/+5
| | | | | | | | | | | | | | | | | Subcommands can write things like UTF-16, which some terminals can understand. printf() will interpret the null bytes as the end of the string. In particular, MSVC's assert() will print wide characters by default, and I can't find a way to disable it, leading to clang assertion failures looking like: FAILED: ...clang.exe ... Aninja: build stopped: subcommand failed. With this fix, I get the desired: FAILED: ...clang.exe ... Assertion failed: SymbolMap... ninja: build stopped: subcommand failed.
* drop std:: qualifiers on more stl datatypesEvan Martin2013-04-181-1/+1
| | | | We "using namespace std" anywhere we need a std::string or a std::vector.
* fix windows build after depslogScott Graham2013-04-091-4/+6
|
* Try to fix build on Linux.Nico Weber2013-04-091-0/+2
|
* move printing of new lines into LinePrinter.Nico Weber2013-04-091-0/+7
|
* move single-line printing to new classNico Weber2013-04-091-0/+98