I want to read from user's input string of size 16000bytes. fgets
only reads 1024 bytes. What can I use instead? I am writing in c and this is my code right now. Is it that I am not using malloc?
char str[16392];
while(fprintf(stderr, "> "), fgets(str, 16392, stdin), !feof(stdin)) { }
Also, readline seems to work.
while(line = readline("> "), !feof(stdin)) {
printf("You entered: %s\n", line);
free(line);
}