Changeset 350514c in mainline for libc/generic


Ignore:
Timestamp:
2006-01-15T17:37:14Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12c6f2d
Parents:
ecfd7e5
Message:

some fancy stuff

Location:
libc/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/io.c

    recfd7e5 r350514c  
    3131#include <stdio.h>
    3232
     33static char nl = '\n';
     34
    3335int puts(const char * str)
    3436{
     
    3638       
    3739        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;
    4246}
    4347
  • libc/generic/libc.c

    recfd7e5 r350514c  
    3030#include <unistd.h>
    3131
     32void _exit(int status) {
     33        __SYSCALL0(SYS_CTL);
     34}
     35
    3236void __main(void) {
    3337}
    3438
    3539void __exit(void) {
     40        _exit(0);
    3641}
Note: See TracChangeset for help on using the changeset viewer.