forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TRCompletion.h
49 lines (44 loc) · 1.39 KB
/
TRCompletion.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// @(#)root/r:$Id$
// Author: Omar Zapata 29/08/2013
// The tab-completion interface was based in R's readline code.
#ifndef ROOT_R_TRCompletion
#define ROOT_R_TRCompletion
#include <RExports.h>
#if !defined(_READLINE_H_)
#if !defined (PARAMS)
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
# define PARAMS(protos) protos
# else
# define PARAMS(protos) ()
# endif
#endif
extern "C"
{
typedef char **rl_completion_func_t PARAMS((const char *, int, int));
typedef char *rl_compentry_func_t PARAMS((const char *, int));
extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *));
extern char *readline PARAMS((const char *));
extern void add_history PARAMS((const char *));
extern rl_completion_func_t *rl_attempted_completion_function;
extern char *rl_line_buffer;
extern int rl_completion_append_character;
extern int rl_attempted_completion_over;
}
#endif //_READLINE_H_
namespace ROOT {
namespace R {
char *R_completion_generator(const char *text, int state);
char **R_custom_completion(const char *text, int start, int end);
//Readline variables.
extern SEXP
RComp_assignBufferSym,
RComp_assignStartSym,
RComp_assignEndSym,
RComp_assignTokenSym,
RComp_completeTokenSym,
RComp_getFileCompSym,
RComp_retrieveCompsSym;
extern SEXP rcompgen_rho;
}
}
#endif