Changeset ff9244a in mainline for uspace/lib/libc/generic/io/io.c
- Timestamp:
- 2007-12-26T22:16:21Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2f02aa17
- Parents:
- 75ae31d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/io.c
r75ae31d rff9244a 48 48 49 49 for (count = 0; str[count] != 0; count++); 50 if (write (1,(void *) str, count) == count) {51 if (write (1,&nl, 1) == 1)50 if (write_stdout((void *) str, count) == count) { 51 if (write_stdout(&nl, 1) == 1) 52 52 return 0; 53 53 } … … 63 63 int putnchars(const char *buf, size_t count) 64 64 { 65 if (write (1,(void *) buf, count) == count)66 65 if (write_stdout((void *) buf, count) == count) 66 return 0; 67 67 68 68 return EOF; … … 80 80 81 81 for (count = 0; str[count] != 0; count++); 82 if (write (1,(void *) str, count) == count)83 82 if (write_stdout((void *) str, count) == count) 83 return 0; 84 84 85 85 return EOF; … … 89 89 { 90 90 unsigned char ch = c; 91 if (write (1,(void *) &ch, 1) == 1)92 91 if (write_stdout((void *) &ch, 1) == 1) 92 return c; 93 93 94 94 return EOF; … … 98 98 { 99 99 unsigned char c; 100 if (read (0,(void *) &c, 1) == 1)101 100 if (read_stdin((void *) &c, 1) == 1) 101 return c; 102 102 103 103 return EOF;
Note:
See TracChangeset
for help on using the changeset viewer.