blob: b59545bd830ebd369f17413b24efd06ba6b91d15 (
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;
}
|