summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-04-13 12:43:23 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-04-13 12:43:23 +0200
commitb202c4e9385ec4d9a9f67a006ee363a2618051d9 (patch)
tree951c39156708772acad15731b438903051fe0428
parentfef86ad797cbb240c05dd1e5930a7c82a724806f (diff)
downloadratpoison-b202c4e9385ec4d9a9f67a006ee363a2618051d9.zip
Make our fallback getline implementation re-usable
-rw-r--r--src/history.c2
-rw-r--r--src/history.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/history.c b/src/history.c
index 82c94fe..a63658c 100644
--- a/src/history.c
+++ b/src/history.c
@@ -74,7 +74,7 @@ static struct history {
} histories[hist_COUNT];
#ifndef HAVE_GETLINE
-static ssize_t
+ssize_t
getline(char **lineptr, size_t *n, FILE *f)
{
size_t ofs;
diff --git a/src/history.h b/src/history.h
index 308e212..193874d 100644
--- a/src/history.h
+++ b/src/history.h
@@ -29,6 +29,10 @@ enum { hist_NONE=0, hist_COMMAND, hist_SHELLCMD,
/* must be last, do not use, for length only: */
hist_COUNT};
+#ifndef HAVE_GETLINE
+ssize_t getline (char **lineptr, size_t *n, FILE *f);
+#endif
+
void history_load (void);
void history_save (void);
void history_resize (int size);