mirror of
https://github.com/glouw/tinn
synced 2024-11-21 22:11:21 +03:00
brackets
This commit is contained in:
parent
6c115010e5
commit
eb898b4c22
2
test.c
2
test.c
@ -36,7 +36,7 @@ static char* readln(FILE* const file)
|
|||||||
int ch = EOF;
|
int ch = EOF;
|
||||||
int reads = 0;
|
int reads = 0;
|
||||||
int size = 128;
|
int size = 128;
|
||||||
char* line = ((char*) malloc((size) * sizeof(char)));
|
char* line = (char*) malloc((size) * sizeof(char));
|
||||||
while((ch = getc(file)) != '\n' && ch != EOF)
|
while((ch = getc(file)) != '\n' && ch != EOF)
|
||||||
{
|
{
|
||||||
line[reads++] = ch;
|
line[reads++] = ch;
|
||||||
|
Loading…
Reference in New Issue
Block a user