Mercurial > hg > xemacs-beta
comparison src/fileio.c @ 647:b39c14581166
[xemacs-hg @ 2001-08-13 04:45:47 by ben]
removal of unsigned, size_t, etc.
author | ben |
---|---|
date | Mon, 13 Aug 2001 04:46:48 +0000 |
parents | 023b83f4e54b |
children | ce0b3f2eff35 |
comparison
equal
deleted
inserted
replaced
646:00c54252fe4f | 647:b39c14581166 |
---|---|
206 signal handler) because that's way too losing. | 206 signal handler) because that's way too losing. |
207 | 207 |
208 (#### Actually, longjmp()ing out of the signal handler may not be | 208 (#### Actually, longjmp()ing out of the signal handler may not be |
209 as losing as I thought. See qxe_reliable_signal() in sysdep.c.) */ | 209 as losing as I thought. See qxe_reliable_signal() in sysdep.c.) */ |
210 | 210 |
211 ssize_t | 211 Memory_Count |
212 read_allowing_quit (int fildes, void *buf, size_t size) | 212 read_allowing_quit (int fildes, void *buf, Memory_Count size) |
213 { | 213 { |
214 QUIT; | 214 QUIT; |
215 return sys_read_1 (fildes, buf, size, 1); | 215 return sys_read_1 (fildes, buf, size, 1); |
216 } | 216 } |
217 | 217 |
218 ssize_t | 218 Memory_Count |
219 write_allowing_quit (int fildes, const void *buf, size_t size) | 219 write_allowing_quit (int fildes, const void *buf, Memory_Count size) |
220 { | 220 { |
221 QUIT; | 221 QUIT; |
222 return sys_write_1 (fildes, buf, size, 1); | 222 return sys_write_1 (fildes, buf, size, 1); |
223 } | 223 } |
224 | 224 |
2766 match the text at the beginning of the buffer. */ | 2766 match the text at the beginning of the buffer. */ |
2767 while (1) | 2767 while (1) |
2768 { | 2768 { |
2769 int nread; | 2769 int nread; |
2770 Bufpos bufpos; | 2770 Bufpos bufpos; |
2771 nread = read_allowing_quit (fd, buffer, sizeof buffer); | 2771 nread = read_allowing_quit (fd, buffer, sizeof (buffer)); |
2772 if (nread < 0) | 2772 if (nread < 0) |
2773 report_file_error ("Reading", filename); | 2773 report_file_error ("Reading", filename); |
2774 else if (nread == 0) | 2774 else if (nread == 0) |
2775 break; | 2775 break; |
2776 bufpos = 0; | 2776 bufpos = 0; |
2902 /* No need to limit the amount of stuff we attempt to read. (It would | 2902 /* No need to limit the amount of stuff we attempt to read. (It would |
2903 be incorrect, anyway, when Mule is enabled.) Instead, the limiting | 2903 be incorrect, anyway, when Mule is enabled.) Instead, the limiting |
2904 occurs inside of the filedesc stream. */ | 2904 occurs inside of the filedesc stream. */ |
2905 while (1) | 2905 while (1) |
2906 { | 2906 { |
2907 Lstream_data_count this_len; | 2907 Lstream_Data_Count this_len; |
2908 Charcount cc_inserted; | 2908 Charcount cc_inserted; |
2909 | 2909 |
2910 QUIT; | 2910 QUIT; |
2911 this_len = Lstream_read (XLSTREAM (stream), read_buf, | 2911 this_len = Lstream_read (XLSTREAM (stream), read_buf, |
2912 sizeof (read_buf)); | 2912 sizeof (read_buf)); |