summaryrefslogtreecommitdiff
path: root/includes/BReadline.h
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-11 22:58:53 -0700
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-11 22:58:53 -0700
commit1d30e5cc67dbf36c638cf6a089a2307cd7ac1e21 (patch)
tree08a6ddf2e93bb1d95f91e403a8a58f710b29019e /includes/BReadline.h
parent3fb346277f8fa4f0336e13689a4d9b1d9a7b4eaa (diff)
Skeleton of editline support.
Diffstat (limited to 'includes/BReadline.h')
-rw-r--r--includes/BReadline.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/includes/BReadline.h b/includes/BReadline.h
index 0d39f8b..31babd3 100644
--- a/includes/BReadline.h
+++ b/includes/BReadline.h
@@ -1,12 +1,28 @@
#pragma once
+#ifdef USE_EDITLINE
+#include <BString.h>
+#include <Handle.h>
+
+class Readline {
+ public:
+ Readline(const Balau::String & program);
+ ~Readline();
+ Balau::String gets();
+ bool gotEOF();
+ void setPrompt(const Balau::String & prompt);
+};
+
+#endif
+
+#ifdef USE_HISTEDIT
#include <histedit.h>
#include <BString.h>
#include <Handle.h>
class Readline {
public:
- Readline(const Balau::String & program, Balau::IO<Balau::Handle>);
+ Readline(const Balau::String & program);
~Readline();
Balau::String gets();
bool gotEOF() { return m_eof; }
@@ -23,3 +39,5 @@ class Readline {
static int elGetCFN(EditLine *, char * c);
int elGetCFN(char * c);
};
+
+#endif