libreadline. (, libreadline, )
Debian/Ubuntu, apt install libreadline-dev ( libreadline6, , - 6 )
readline, ,
#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>
...
char cprefill[] = {"You may edit this line"};
add_history(cprefill);
char *buf = readline("Line: ");
printf("Edited line is %s\n", buf);
free(buf);
":", UP ARROW, , .. cprefill.
, / -lreadline
readline , , , , .
char *, readline, ( malloc()).