Changeset 221afc9e in mainline for uspace/lib/posix/stdio.c
- Timestamp:
- 2011-07-12T02:43:56Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2346e78
- Parents:
- 46ac986
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/stdio.c
r46ac986 r221afc9e 86 86 s[0] = '\0'; 87 87 return s; 88 } 89 90 /** 91 * Put a string on the stream. 92 * 93 * @param s String to be written. 94 * @param stream Output stream. 95 * @return Non-negative on success, EOF on failure. 96 */ 97 int posix_fputs(const char *restrict s, FILE *restrict stream) 98 { 99 int rc = fputs(s, stream); 100 if (rc == 0) { 101 return EOF; 102 } else { 103 return 0; 104 } 88 105 } 89 106 … … 394 411 395 412 /** 413 * Discard prefetched data or write unwritten data. 414 * 415 * @param stream Stream that shall be flushed. 416 * @return Zero on success, EOF on failure. 417 */ 418 int posix_fflush(FILE *stream) 419 { 420 int rc = fflush(stream); 421 if (rc < 0) { 422 errno = -rc; 423 return EOF; 424 } else { 425 return 0; 426 } 427 } 428 429 /** 396 430 * Print formatted output to the opened file. 397 431 *
Note:
See TracChangeset
for help on using the changeset viewer.