@ -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.
@ -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:
@ -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