diff options
Diffstat (limited to 'moon-abe/pbc-0.5.14/pbc/pbc_getline.c')
-rw-r--r-- | moon-abe/pbc-0.5.14/pbc/pbc_getline.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/moon-abe/pbc-0.5.14/pbc/pbc_getline.c b/moon-abe/pbc-0.5.14/pbc/pbc_getline.c deleted file mode 100644 index dc44cc40..00000000 --- a/moon-abe/pbc-0.5.14/pbc/pbc_getline.c +++ /dev/null @@ -1,17 +0,0 @@ -#include <stdio.h> -#include <string.h> - -#include "pbc_memory.h" - -char *pbc_getline(const char *prompt) { - char s[1024]; - if (prompt) fputs(prompt, stdout); - if (!fgets(s, 1024, stdin)) return NULL; - if (feof(stdin)) return NULL; - /* use strdup rather than pbc_strdup. because - * 1. readline version of this function uses malloc. - * 2. pbc_malloc called by pbc_strdup may differ from malloc. - * here we keep consistency. - */ - return strdup(s); -} |