Changeset 350514c in mainline for libc/generic/io.c
- Timestamp:
- 2006-01-15T17:37:14Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12c6f2d
- Parents:
- ecfd7e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/io.c
recfd7e5 r350514c 31 31 #include <stdio.h> 32 32 33 static char nl = '\n'; 34 33 35 int puts(const char * str) 34 36 { … … 36 38 37 39 for (count = 0; str[count] != 0; count++); 38 if (write(1, (void * ) str, count) == count) 39 return 0; 40 else 41 return EOF; 40 if (write(1, (void * ) str, count) == count) { 41 if (write(1, &nl, 1) == 1) 42 return 0; 43 } 44 45 return EOF; 42 46 } 43 47
Note:
See TracChangeset
for help on using the changeset viewer.