Changeset c9857c6 in mainline for libc/generic/io/io.c
- Timestamp:
- 2006-04-12T10:21:01Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f30e6a0b
- Parents:
- fcd10af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/io/io.c
rfcd10af rc9857c6 38 38 size_t count; 39 39 40 if (str == NULL) { 41 return putnchars("(NULL)",6 ); 42 } 43 40 44 for (count = 0; str[count] != 0; count++); 41 45 if (write(1, (void * ) str, count) == count) { … … 48 52 49 53 /** Put count chars from buffer to stdout without adding newline 50 * @param buf Buffer with size at least count bytes 54 * @param buf Buffer with size at least count bytes - NULL pointer NOT allowed! 51 55 * @param count 52 56 * @return 0 on succes, EOF on fail … … 80 84 } 81 85 86 int putchar(int c) 87 { 88 unsigned char ch = c; 89 if (write(1, (void *)&ch , 1) == 1) { 90 return c; 91 } 92 93 return EOF; 94 } 95 82 96 ssize_t write(int fd, const void * buf, size_t count) 83 97 {
Note:
See TracChangeset
for help on using the changeset viewer.