00001
00002
00003
00004 #ifndef _el_builtins_h_included
00005 #define _el_builtins_h_included 1
00006
00007 // This file is part of the liblineedit code. See el.fH for the
00008
00009
00010
00011
00012 #include "el.h"
00013
00014
00015
00016
00017
00018 el_public struct ElBuiltin_t {
00019 typedef int (* handler_func)(EditLine_t*, int, const char**);
00020 const char* fName;
00021 handler_func fFunc;
00022 const char* fHelp;
00023 ElBuiltin_t(): fName(0),
00024 fFunc(0),
00025 fHelp(0) {}
00026
00027 ElBuiltin_t(const char* n, handler_func f, const char* h): fName(n),
00028 fFunc(f),
00029 fHelp(h) {}
00030
00031 };
00032
00033
00034
00035
00036
00037
00038 void el_register_function(const char* name, ElBuiltin_t::handler_func f, const char* help = NULL);
00039
00040
00041
00042
00043
00044
00045
00046 int el_func_show_function_list(EditLine_t* el, int, const char**);
00047
00048
00049
00050
00051
00052
00053
00054 int el_func_readline_reinit(EditLine_t*, int, const char**);
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 ElBuiltin_t** el_builtins_list(int* count);
00066
00067
00068
00069
00070
00071
00072
00073
00074 ElBuiltin_t* el_builtin_by_name(const char*);
00075
00076 #endif // _el_builtins_h_included