blob: 68e849963f34f2845ada2e77a3a533feb3677d10 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <mlibc/stdlib.h>
#include <mlibc/stdio.h>
char *readline()
{
char *ret = malloc(256);
char buf = 0;
while (buf != '\n') {
buf = getch();
writec(buf);
strcpy(ret, &buf);
}
return ret;
}
|