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