Make more improvements

This change includes many bug fixes, for the NT polyfills, strings,
memory, boot, and math libraries which were discovered by adding more
tools for recreational programming, such as PC emulation. Lemon has also
been vendored because it works so well at parsing languages.
This commit is contained in:
Justine Tunney 2020-09-28 01:13:56 -07:00
parent 416fd86676
commit 23d333c090
201 changed files with 14558 additions and 3082 deletions

View file

@ -8,17 +8,22 @@
#define kMachinePtyBold 0x08
#define kMachinePtyFaint 0x10
#define kMachinePtyFlip 0x20
#define kMachinePtyBlink 0x40
#define kMachinePtyNocursor 0x01
#define kMachinePtyNocursor 0x01
#define kMachinePtyBlinkcursor 0x02
#define kMachinePtyNocanon 0x04
#define kMachinePtyNoecho 0x08
#define kMachinePtyNoopost 0x10
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
struct MachinePty {
uint32_t yn;
uint32_t xn;
uint32_t y;
uint32_t x;
int y;
int x;
int yn;
int xn;
uint32_t pr;
uint32_t fg;
uint32_t bg;
@ -38,12 +43,18 @@ struct MachinePty {
unsigned i;
char s[64];
} esc;
struct MachinePtyInput {
size_t i, n;
char *p;
} input;
};
void MachinePtyFree(struct MachinePty *);
struct MachinePty *MachinePtyNew(void) nodiscard;
void MachinePtyResize(struct MachinePty *, int, int);
ssize_t MachinePtyRead(struct MachinePty *, void *, size_t);
ssize_t MachinePtyWrite(struct MachinePty *, const void *, size_t);
ssize_t MachinePtyWriteInput(struct MachinePty *, const void *, size_t);
void MachinePtyAppendLine(struct MachinePty *, struct Buffer *, unsigned);
COSMOPOLITAN_C_END_