Changeset 350514c in mainline for libc/generic
- Timestamp:
- 2006-01-15T17:37:14Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12c6f2d
- Parents:
- ecfd7e5
- Location:
- libc/generic
- Files:
-
- 2 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 -
libc/generic/libc.c
recfd7e5 r350514c 30 30 #include <unistd.h> 31 31 32 void _exit(int status) { 33 __SYSCALL0(SYS_CTL); 34 } 35 32 36 void __main(void) { 33 37 } 34 38 35 39 void __exit(void) { 40 _exit(0); 36 41 }
Note:
See TracChangeset
for help on using the changeset viewer.
