#ifndef DEF_READLINE_H #define DEF_READLINE_H #include typedef struct _rdln_hist { int max; int n; char **str; } readline_history; #ifdef __cplusplus extern "C" { namespace libc { #endif char *readln(); char* freadln(FILE *f); // minimal line-reading function. user must free the returned value. char* freadline(FILE *f, readline_history *h); #ifdef __cplusplus } } #endif #endif