This commit is contained in:
~d6 2023-02-04 18:16:29 -05:00
parent 33d2c21792
commit fd5afa4833
2 changed files with 3 additions and 2 deletions

4
term.c
View File

@ -13,14 +13,14 @@ int main(int argc, char **argv) {
int fdm = -1; // allocate file descriptor
// allocate a pty, fork, inititialize file descriptor
pid_t pid = forkpty(&fdm, NULL, NULL, NULL);
pid_t pid = forkpty(&fdm, NULL, NULL, NULL);
if (pid < 0) { // failure
perror("fork failed");
return 1;
} else if (pid == 0) { // child
setenv("TERM", "ansi", 1);
execlp("bash", "bash", NULL); // exec bash
execlp("bash", "bash", NULL); // exec bash
perror("exec bash failed");
} else { // parent
struct winsize ws = {23, 80, 8, 12}; // rows, cols, xps, ypx

View File

@ -11,6 +11,7 @@
( c. etc. )
( 6. add more ansi control seqs )
( 7. stop hard coding terminal size in both term.py and term.tal )
( 8. key repeat - not possible in general though )
( ANSI sequences )
( )