Changeset 080ad7f in mainline
- Timestamp:
- 2009-06-09T11:10:00Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ebe70f1
- Parents:
- bd8bfcbd
- Location:
- uspace/lib/libc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/io.c
rbd8bfcbd r080ad7f 193 193 } 194 194 195 FILE *fdopen(int fd, const char *mode) 196 { 197 /* Open file. */ 198 FILE *stream = malloc(sizeof(FILE)); 199 if (stream == NULL) { 200 errno = ENOMEM; 201 return NULL; 202 } 203 204 stream->fd = fd; 205 stream->error = false; 206 stream->eof = false; 207 stream->klog = false; 208 stream->phone = -1; 209 210 list_append(&stream->link, &files); 211 212 return stream; 213 } 214 195 215 FILE *fopen_node(fdi_node_t *node, const char *mode) 196 216 { … … 379 399 } 380 400 401 void rewind(FILE *stream) 402 { 403 (void) fseek(stream, 0, SEEK_SET); 404 } 405 381 406 int fflush(FILE *stream) 382 407 { -
uspace/lib/libc/include/stdio.h
rbd8bfcbd r080ad7f 107 107 /* File stream functions */ 108 108 extern FILE *fopen(const char *, const char *); 109 extern FILE *fdopen(int, const char *); 109 110 extern int fclose(FILE *); 110 111 … … 113 114 114 115 extern int fseek(FILE *, long, int); 116 extern void rewind(FILE *); 115 117 extern int ftell(FILE *); 116 118 extern int feof(FILE *);
Note:
See TracChangeset
for help on using the changeset viewer.