diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/Makefile | 2 | ||||
-rw-r--r-- | libc/bios/bios_vid.c | 2 | ||||
-rw-r--r-- | libc/msdos/conio.c | 66 | ||||
-rw-r--r-- | libc/termios/ttyname.c | 2 |
4 files changed, 62 insertions, 10 deletions
diff --git a/libc/Makefile b/libc/Makefile index 0494400..640c468 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -11,7 +11,7 @@ endif VERMAJOR=0 VERMINOR=14 -VERPATCH=3 +VERPATCH=5 VER=$(VERMAJOR).$(VERMINOR).$(VERPATCH) CC=bcc diff --git a/libc/bios/bios_vid.c b/libc/bios/bios_vid.c index ec3c603..cc49736 100644 --- a/libc/bios/bios_vid.c +++ b/libc/bios/bios_vid.c @@ -108,6 +108,7 @@ static int vidcnt = 0; static int ansi_2 = 0; static int ansi_argc = 0; static int ansi_argv[MAX_ARGS]; +static void do_ansi(); bios_putc(c) int c; @@ -169,6 +170,7 @@ int c; } } +void do_ansi(ctrl, argc, argv) int ctrl, argc, *argv; { diff --git a/libc/msdos/conio.c b/libc/msdos/conio.c index 3c51c92..1abfa40 100644 --- a/libc/msdos/conio.c +++ b/libc/msdos/conio.c @@ -1,23 +1,73 @@ /* Is this BIOS keyboard io ? */ -cgets() - -cputs() - getch() +{ +#asm + xor ax,ax + int $16 +#endasm +} getche() +{ + int i = getch(); + if( i & 0xFF) putch(i); + return i; +} + +kbhit() +{ +#asm + mov ah,#1 + int $16 + jz nokey + cmp ax,#0 + jnz dort + mov ax,#3 +dort: + ret +nokey: + xor ax,ax +#endasm +} + +putch() +{ +#asm +#if !__FIRST_ARG_IN_AX__ + mov bx,sp + mov ax,[bx+2] +#endif + mov ah,#$0E + mov bx,#7 + int $10 +#endasm +} + +cputs(str) +char * str; +{ + while(*str) putch(*str++); +} + +cgets() +{ +} cprintf() +{ +} cscanf() +{ +} getpass() +{ +} gotoxy() - -kbhit() - -putch() +{ +} diff --git a/libc/termios/ttyname.c b/libc/termios/ttyname.c index 5993a2a..f3c05b6 100644 --- a/libc/termios/ttyname.c +++ b/libc/termios/ttyname.c @@ -30,7 +30,7 @@ int fd; while ((d = readdir(fp)) != 0) { - if( strlen(d->d_name) > sizeof(name) - sizeof(dev) - 1); + if( strlen(d->d_name) > sizeof(name) - sizeof(dev) - 1) continue; strcpy(name + sizeof(dev), d->d_name); if (stat(name, &dst) == 0 |