43 #define LIBEDIT_MAJOR 2
44 #define LIBEDIT_MINOR 11
47 #if defined(__sun) || defined(__sun__)
48 #include <sys/inttypes.h>
53 #include <sys/types.h>
87 #define CC_REDISPLAY 8
88 #define CC_REFRESH_BEEP 9
93 EditLine *el_init(
const char *, FILE *, FILE *, FILE *);
100 const char *el_gets(
EditLine *,
int *);
102 void el_push(
EditLine *,
const char *);
113 int el_parse(
EditLine *,
int,
const char **);
120 unsigned char _el_fn_complete(
EditLine *,
int);
140 #define EL_TERMINAL 1
151 #define EL_EDITMODE 11
152 #define EL_RPROMPT 12
154 #define EL_CLIENTDATA 14
155 #define EL_UNBUFFERED 15
156 #define EL_PREP_TERM 16
160 #define EL_REFRESH 20
161 #define EL_PROMPT_ESC 21
162 #define EL_RPROMPT_ESC 22
165 #define EL_BUILTIN_GETCFN (NULL)
170 int el_source(
EditLine *,
const char *);
183 int el_insertstr(
EditLine *,
const char *);
191 typedef struct history History;
201 History * history_init(
void);
202 void history_end(History *);
204 int history(History *,
HistEvent *,
int, ...);
219 #define H_NEXT_STR 13
220 #define H_PREV_STR 14
221 #define H_NEXT_EVENT 15
222 #define H_PREV_EVENT 16
226 #define H_SETUNIQUE 20
227 #define H_GETUNIQUE 21
229 #define H_NEXT_EVDATA 23
239 typedef struct tokenizer Tokenizer;
244 Tokenizer *tok_init(
const char *);
245 void tok_end(Tokenizer *);
246 void tok_reset(Tokenizer *);
247 int tok_line(Tokenizer *,
const LineInfo *,
248 int *,
const char ***,
int *,
int *);
249 int tok_str(Tokenizer *,
const char *,
250 int *,
const char ***);
264 const wchar_t *buffer;
265 const wchar_t *cursor;
266 const wchar_t *lastchar;
269 const wchar_t *el_wgets(
EditLine *,
int *);
270 int el_wgetc(
EditLine *,
wchar_t *);
271 void el_wpush(
EditLine *,
const wchar_t *);
273 int el_wparse(
EditLine *,
int,
const wchar_t **);
279 int el_winsertstr(
EditLine *,
const wchar_t *);
280 #define el_wdeletestr el_deletestr
290 typedef struct historyW HistoryW;
292 HistoryW * history_winit(
void);
293 void history_wend(HistoryW *);
295 int history_w(HistoryW *,
HistEventW *,
int, ...);
300 typedef struct tokenizerW TokenizerW;
303 TokenizerW *tok_winit(
const wchar_t *);
304 void tok_wend(TokenizerW *);
305 void tok_wreset(TokenizerW *);
306 int tok_wline(TokenizerW *,
const LineInfoW *,
307 int *,
const wchar_t ***,
int *,
int *);
308 int tok_wstr(TokenizerW *,
const wchar_t *,
309 int *,
const wchar_t ***);