Lines Matching refs:stream
20 /* ported from SPIE, section2/filesuite/stream.c, by Airong Zhang */
29 >HOW: < 1) open a stream and immediately execute ferror
31 < written with stream - compare actual vs expected.
32 < 3) open stream and ensure feof returns zero, read to end of
57 FILE *stream;
76 if ((stream = fopen(tempfile, "a+")) == NULL) {
81 fprintf(stream, "a");
82 fclose(stream);
84 if ((stream = fopen(tempfile, "r+")) == NULL) {
91 if (ferror(stream) != 0) {
109 fd = fileno(stream);
133 fclose(stream);
135 if ((stream = fopen(tempfile, "r+")) == NULL) {
140 if (feof(stream) != 0) {
146 fread(buf, 1, 2, stream); /* read to EOF */
147 if (feof(stream) == 0) {
164 clearerr(stream);
165 if (feof(stream) != 0) {
180 (void)fclose(stream);
182 if ((stream = fopen(tempfile, "rb")) == NULL) {
187 (void)fclose(stream);
189 if ((stream = fopen(tempfile, "wb")) == NULL) {
194 (void)fclose(stream);
196 if ((stream = fopen(tempfile, "ab")) == NULL) {
201 (void)fclose(stream);
203 if ((stream = fopen(tempfile, "rb+")) == NULL) {
208 (void)fclose(stream);
210 if ((stream = fopen(tempfile, "wb+")) == NULL) {
215 (void)fclose(stream);
217 if ((stream = fopen(tempfile, "ab+")) == NULL) {
222 (void)fclose(stream);