00001
00002
00003
00004
00005
00006 #define MININT (1 << (sizeof(int) * 8 - 1))
00007 #define MAXCHUNK (~MININT)
00008
00009
00010
00011
00012 static int maxchunk = MAXCHUNK;
00013
00014
00015
00016
00017
00018 int
00019 rd_bytes(fd, string, cnt)
00020 register char *string;
00021 register long cnt;
00022 {
00023
00024 while (cnt) {
00025 register int n = cnt >= maxchunk ? maxchunk : cnt;
00026
00027 if (read(fd, string, n) != n)
00028 rd_fatal();
00029 string += n;
00030 cnt -= n;
00031 }
00032 }