summaryrefslogtreecommitdiffstats
path: root/moon-abe/pbc-0.5.14/pbc/pbc_getline.readline.c
blob: 8d5e8f5a33b35a0e7b519f0530f85d20c6dbdff1 (plain)
1
2
3
4
5
6
7
8
9
10
#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>

char *pbc_getline(const char *prompt)
{
    char *line = readline(prompt);
    if (line && *line) add_history(line);
    return line;
}