Changeset 566f4cfb in mainline for uspace/lib/libc/generic/io/io.c
- Timestamp:
- 2009-04-24T08:01:05Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 402de0c
- Parents:
- ab1861a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/io.c
rab1861a r566f4cfb 39 39 #include <string.h> 40 40 #include <errno.h> 41 #include <console.h> 41 42 42 43 const static char nl = '\n'; … … 50 51 51 52 for (count = 0; str[count] != 0; count++); 52 if (write_stdout((void *) str, count) == count) { 53 if (write_stdout(&nl, 1) == 1) 53 54 if (console_write((void *) str, count) == count) { 55 if (console_write(&nl, 1) == 1) 54 56 return 0; 55 57 } … … 65 67 int putnchars(const char *buf, size_t count) 66 68 { 67 if ( write_stdout((void *) buf, count) == count)69 if (console_write((void *) buf, count) == count) 68 70 return 0; 69 71 … … 82 84 83 85 for (count = 0; str[count] != 0; count++); 84 if ( write_stdout((void *) str, count) == count)86 if (console_write((void *) str, count) == count) 85 87 return 0; 86 88 … … 97 99 return EOF; 98 100 99 if ( write_stdout((void *) buf, offs) == offs)101 if (console_write((void *) buf, offs) == offs) 100 102 return c; 101 103 … … 106 108 { 107 109 unsigned char c; 108 109 flush_stdout();110 111 console_flush(); 110 112 if (read_stdin((void *) &c, 1) == 1) 111 113 return c; … … 116 118 int fflush(FILE *f) 117 119 { 120 /* Dummy implementation */ 118 121 (void) f; 119 return flush_stdout(); 122 console_flush(); 123 return 0; 120 124 } 121 125
Note:
See TracChangeset
for help on using the changeset viewer.