mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Implement basic canonical mode for Windows
The `cat` command now works properly, when run by itself on the bash command prompt. It's working beautifully so far, and is only missing a few keystrokes for clearing words and lines. Definitely works more well than the one that ships with WIN32 :-)
This commit is contained in:
parent
4825737509
commit
f26a280cda
36 changed files with 320 additions and 231 deletions
|
@ -38,6 +38,7 @@
|
|||
#include "libc/nexgen32e/kcpuids.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/nexgen32e/x86info.h"
|
||||
#include "libc/nt/console.h"
|
||||
#include "libc/nt/enum/startf.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/nt/startupinfo.h"
|
||||
|
@ -651,13 +652,20 @@ textstartup void __printargs(const char *prologue) {
|
|||
PRINT(" ☼ %s = %ld", "hStdError", startinfo.hStdError);
|
||||
|
||||
PRINT("");
|
||||
uint32_t cm;
|
||||
PRINT("STANDARD HANDLES");
|
||||
PRINT(" ☼ %s = %ld", "GetStdHandle(kNtStdInputHandle)",
|
||||
GetStdHandle(kNtStdInputHandle));
|
||||
if (GetConsoleMode(GetStdHandle(kNtStdInputHandle), &cm))
|
||||
PRINT(" %s", DescribeNtConsoleInFlags(cm));
|
||||
PRINT(" ☼ %s = %ld", "GetStdHandle(kNtStdOutputHandle)",
|
||||
GetStdHandle(kNtStdOutputHandle));
|
||||
if (GetConsoleMode(GetStdHandle(kNtStdOutputHandle), &cm))
|
||||
PRINT(" %s", DescribeNtConsoleOutFlags(cm));
|
||||
PRINT(" ☼ %s = %ld", "GetStdHandle(kNtStdErrorHandle)",
|
||||
GetStdHandle(kNtStdErrorHandle));
|
||||
if (GetConsoleMode(GetStdHandle(kNtStdErrorHandle), &cm))
|
||||
PRINT(" %s", DescribeNtConsoleOutFlags(cm));
|
||||
|
||||
PRINT("");
|
||||
PRINT("TEB");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue