2002-07-10 Florian Shrack <florian.schrack@freenet.de>

* libc/sys/mmixware/read.c: Use SYS_Fgets syscall if dealing with
        a terminal.
        * libc/sys/mmixware/sys/syscall.h (SYS_Fgets): Definition added.
This commit is contained in:
Jeff Johnston 2002-07-10 22:15:49 +00:00
parent ef8c6116b3
commit 2a8b4ea32b
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2002-07-10 Florian Shrack <florian.schrack@freenet.de>
* libc/sys/mmixware/read.c: Use SYS_Fgets syscall if dealing with
a terminal.
* libc/sys/mmixware/sys/syscall.h (SYS_Fgets): Definition added.
2002-07-08 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (MAXFLOAT): Added.

View File

@ -30,6 +30,16 @@ _read (int file,
return -1;
}
if (isatty(file))
{
ret = TRAP3f (SYS_Fgets, file, ptr, len);
if (ret == -1)
return 0;
return ret;
}
ret = TRAP3f (SYS_Fread, file, ptr, len);
/* Map the return codes:

View File

@ -17,6 +17,7 @@
#define SYS_Fopen 1
#define SYS_Fclose 2
#define SYS_Fread 3
#define SYS_Fgets 4
#define SYS_Fwrite 6
#define SYS_Fseek 9
#define SYS_Ftell 10