tnftp  20200705
About: tnftp is an enhanced ftp client (prior name "lukemftp").
  Fossies Dox: tnftp-20200705.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

histedit.h File Reference
#include <wchar.h>
#include <wctype.h>
Include dependency graph for histedit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lineinfo
 
struct  HistEvent
 
struct  lineinfow
 
struct  histeventW
 

Macros

#define LIBEDIT_MAJOR   2
 
#define LIBEDIT_MINOR   11
 
#define CC_NORM   0
 
#define CC_NEWLINE   1
 
#define CC_EOF   2
 
#define CC_ARGHACK   3
 
#define CC_REFRESH   4
 
#define CC_CURSOR   5
 
#define CC_ERROR   6
 
#define CC_FATAL   7
 
#define CC_REDISPLAY   8
 
#define CC_REFRESH_BEEP   9
 
#define EL_PROMPT   0 /* , prompt_func); set/get */
 
#define EL_TERMINAL   1 /* , const char *); set/get */
 
#define EL_EDITOR   2 /* , const Char *); set/get */
 
#define EL_SIGNAL   3 /* , int); set/get */
 
#define EL_BIND   4 /* , const Char *, ..., NULL); set */
 
#define EL_TELLTC   5 /* , const Char *, ..., NULL); set */
 
#define EL_SETTC   6 /* , const Char *, ..., NULL); set */
 
#define EL_ECHOTC   7 /* , const Char *, ..., NULL); set */
 
#define EL_SETTY   8 /* , const Char *, ..., NULL); set */
 
#define EL_ADDFN   9 /* , const Char *, const Char, set */
 
#define EL_HIST   10 /* , hist_fun_t, const void *); set */
 
#define EL_EDITMODE   11 /* , int); set/get */
 
#define EL_RPROMPT   12 /* , prompt_func); set/get */
 
#define EL_GETCFN   13 /* , el_rfunc_t); set/get */
 
#define EL_CLIENTDATA   14 /* , void *); set/get */
 
#define EL_UNBUFFERED   15 /* , int); set/get */
 
#define EL_PREP_TERM   16 /* , int); set */
 
#define EL_GETTC   17 /* , const Char *, ..., NULL); get */
 
#define EL_GETFP   18 /* , int, FILE **); get */
 
#define EL_SETFP   19 /* , int, FILE *); set */
 
#define EL_REFRESH   20 /* , void); set */
 
#define EL_PROMPT_ESC   21 /* , prompt_func, Char); set/get */
 
#define EL_RPROMPT_ESC   22 /* , prompt_func, Char); set/get */
 
#define EL_RESIZE   23 /* , el_zfunc_t, void *); set */
 
#define EL_ALIAS_TEXT   24 /* , el_afunc_t, void *); set */
 
#define EL_BUILTIN_GETCFN   (NULL)
 
#define H_FUNC   0 /* , UTSL */
 
#define H_SETSIZE   1 /* , const int); */
 
#define H_GETSIZE   2 /* , void); */
 
#define H_FIRST   3 /* , void); */
 
#define H_LAST   4 /* , void); */
 
#define H_PREV   5 /* , void); */
 
#define H_NEXT   6 /* , void); */
 
#define H_CURR   8 /* , const int); */
 
#define H_SET   7 /* , int); */
 
#define H_ADD   9 /* , const wchar_t *); */
 
#define H_ENTER   10 /* , const wchar_t *); */
 
#define H_APPEND   11 /* , const wchar_t *); */
 
#define H_END   12 /* , void); */
 
#define H_NEXT_STR   13 /* , const wchar_t *); */
 
#define H_PREV_STR   14 /* , const wchar_t *); */
 
#define H_NEXT_EVENT   15 /* , const int); */
 
#define H_PREV_EVENT   16 /* , const int); */
 
#define H_LOAD   17 /* , const char *); */
 
#define H_SAVE   18 /* , const char *); */
 
#define H_CLEAR   19 /* , void); */
 
#define H_SETUNIQUE   20 /* , int); */
 
#define H_GETUNIQUE   21 /* , void); */
 
#define H_DEL   22 /* , int); */
 
#define H_NEXT_EVDATA   23 /* , const int, histdata_t *); */
 
#define H_DELDATA   24 /* , int, histdata_t *);*/
 
#define H_REPLACE   25 /* , const char *, histdata_t); */
 
#define H_SAVE_FP   26 /* , FILE *); */
 
#define H_NSAVE_FP   27 /* , size_t, FILE *); */
 
#define el_wdeletestr   el_deletestr
 

Typedefs

typedef struct editline EditLine
 
typedef struct lineinfo LineInfo
 
typedef struct history History
 
typedef struct HistEvent HistEvent
 
typedef struct tokenizer Tokenizer
 
typedef struct lineinfow LineInfoW
 
typedef int(* el_rfunc_t) (EditLine *, wchar_t *)
 
typedef struct histeventW HistEventW
 
typedef struct historyW HistoryW
 
typedef struct tokenizerW TokenizerW
 

Functions

EditLineel_init (const char *, FILE *, FILE *, FILE *)
 
EditLineel_init_fd (const char *, FILE *, FILE *, FILE *, int, int, int)
 
void el_end (EditLine *)
 
void el_reset (EditLine *)
 
const char * el_gets (EditLine *, int *)
 
int el_getc (EditLine *, char *)
 
void el_push (EditLine *, const char *)
 
void el_beep (EditLine *)
 
int el_parse (EditLine *, int, const char **)
 
int el_set (EditLine *, int,...)
 
int el_get (EditLine *, int,...)
 
unsigned char _el_fn_complete (EditLine *, int)
 
int el_source (EditLine *, const char *)
 
void el_resize (EditLine *)
 
const LineInfoel_line (EditLine *)
 
int el_insertstr (EditLine *, const char *)
 
void el_deletestr (EditLine *, int)
 
Historyhistory_init (void)
 
void history_end (History *)
 
int history (History *, HistEvent *, int,...)
 
Tokenizertok_init (const char *)
 
void tok_end (Tokenizer *)
 
void tok_reset (Tokenizer *)
 
int tok_line (Tokenizer *, const LineInfo *, int *, const char ***, int *, int *)
 
int tok_str (Tokenizer *, const char *, int *, const char ***)
 
const wchar_t * el_wgets (EditLine *, int *)
 
int el_wgetc (EditLine *, wchar_t *)
 
void el_wpush (EditLine *, const wchar_t *)
 
int el_wparse (EditLine *, int, const wchar_t **)
 
int el_wset (EditLine *, int,...)
 
int el_wget (EditLine *, int,...)
 
int el_cursor (EditLine *, int)
 
const LineInfoWel_wline (EditLine *)
 
int el_winsertstr (EditLine *, const wchar_t *)
 
HistoryWhistory_winit (void)
 
void history_wend (HistoryW *)
 
int history_w (HistoryW *, HistEventW *, int,...)
 
TokenizerWtok_winit (const wchar_t *)
 
void tok_wend (TokenizerW *)
 
void tok_wreset (TokenizerW *)
 
int tok_wline (TokenizerW *, const LineInfoW *, int *, const wchar_t ***, int *, int *)
 
int tok_wstr (TokenizerW *, const wchar_t *, int *, const wchar_t ***)
 

Macro Definition Documentation

◆ CC_ARGHACK

#define CC_ARGHACK   3

Definition at line 78 of file histedit.h.

◆ CC_CURSOR

#define CC_CURSOR   5

Definition at line 80 of file histedit.h.

◆ CC_EOF

#define CC_EOF   2

Definition at line 77 of file histedit.h.

◆ CC_ERROR

#define CC_ERROR   6

Definition at line 81 of file histedit.h.

◆ CC_FATAL

#define CC_FATAL   7

Definition at line 82 of file histedit.h.

◆ CC_NEWLINE

#define CC_NEWLINE   1

Definition at line 76 of file histedit.h.

◆ CC_NORM

#define CC_NORM   0

Definition at line 75 of file histedit.h.

◆ CC_REDISPLAY

#define CC_REDISPLAY   8

Definition at line 83 of file histedit.h.

◆ CC_REFRESH

#define CC_REFRESH   4

Definition at line 79 of file histedit.h.

◆ CC_REFRESH_BEEP

#define CC_REFRESH_BEEP   9

Definition at line 84 of file histedit.h.

◆ EL_ADDFN

#define EL_ADDFN   9 /* , const Char *, const Char, set */

Definition at line 146 of file histedit.h.

◆ EL_ALIAS_TEXT

#define EL_ALIAS_TEXT   24 /* , el_afunc_t, void *); set */

Definition at line 162 of file histedit.h.

◆ EL_BIND

#define EL_BIND   4 /* , const Char *, ..., NULL); set */

Definition at line 141 of file histedit.h.

◆ EL_BUILTIN_GETCFN

#define EL_BUILTIN_GETCFN   (NULL)

Definition at line 164 of file histedit.h.

◆ EL_CLIENTDATA

#define EL_CLIENTDATA   14 /* , void *); set/get */

Definition at line 152 of file histedit.h.

◆ EL_ECHOTC

#define EL_ECHOTC   7 /* , const Char *, ..., NULL); set */

Definition at line 144 of file histedit.h.

◆ EL_EDITMODE

#define EL_EDITMODE   11 /* , int); set/get */

Definition at line 149 of file histedit.h.

◆ EL_EDITOR

#define EL_EDITOR   2 /* , const Char *); set/get */

Definition at line 139 of file histedit.h.

◆ EL_GETCFN

#define EL_GETCFN   13 /* , el_rfunc_t); set/get */

Definition at line 151 of file histedit.h.

◆ EL_GETFP

#define EL_GETFP   18 /* , int, FILE **); get */

Definition at line 156 of file histedit.h.

◆ EL_GETTC

#define EL_GETTC   17 /* , const Char *, ..., NULL); get */

Definition at line 155 of file histedit.h.

◆ EL_HIST

#define EL_HIST   10 /* , hist_fun_t, const void *); set */

Definition at line 148 of file histedit.h.

◆ EL_PREP_TERM

#define EL_PREP_TERM   16 /* , int); set */

Definition at line 154 of file histedit.h.

◆ EL_PROMPT

#define EL_PROMPT   0 /* , prompt_func); set/get */

Definition at line 137 of file histedit.h.

◆ EL_PROMPT_ESC

#define EL_PROMPT_ESC   21 /* , prompt_func, Char); set/get */

Definition at line 159 of file histedit.h.

◆ EL_REFRESH

#define EL_REFRESH   20 /* , void); set */

Definition at line 158 of file histedit.h.

◆ EL_RESIZE

#define EL_RESIZE   23 /* , el_zfunc_t, void *); set */

Definition at line 161 of file histedit.h.

◆ EL_RPROMPT

#define EL_RPROMPT   12 /* , prompt_func); set/get */

Definition at line 150 of file histedit.h.

◆ EL_RPROMPT_ESC

#define EL_RPROMPT_ESC   22 /* , prompt_func, Char); set/get */

Definition at line 160 of file histedit.h.

◆ EL_SETFP

#define EL_SETFP   19 /* , int, FILE *); set */

Definition at line 157 of file histedit.h.

◆ EL_SETTC

#define EL_SETTC   6 /* , const Char *, ..., NULL); set */

Definition at line 143 of file histedit.h.

◆ EL_SETTY

#define EL_SETTY   8 /* , const Char *, ..., NULL); set */

Definition at line 145 of file histedit.h.

◆ EL_SIGNAL

#define EL_SIGNAL   3 /* , int); set/get */

Definition at line 140 of file histedit.h.

◆ EL_TELLTC

#define EL_TELLTC   5 /* , const Char *, ..., NULL); set */

Definition at line 142 of file histedit.h.

◆ EL_TERMINAL

#define EL_TERMINAL   1 /* , const char *); set/get */

Definition at line 138 of file histedit.h.

◆ EL_UNBUFFERED

#define EL_UNBUFFERED   15 /* , int); set/get */

Definition at line 153 of file histedit.h.

◆ el_wdeletestr

#define el_wdeletestr   el_deletestr

Definition at line 282 of file histedit.h.

◆ H_ADD

#define H_ADD   9 /* , const wchar_t *); */

Definition at line 214 of file histedit.h.

◆ H_APPEND

#define H_APPEND   11 /* , const wchar_t *); */

Definition at line 216 of file histedit.h.

◆ H_CLEAR

#define H_CLEAR   19 /* , void); */

Definition at line 224 of file histedit.h.

◆ H_CURR

#define H_CURR   8 /* , const int); */

Definition at line 212 of file histedit.h.

◆ H_DEL

#define H_DEL   22 /* , int); */

Definition at line 227 of file histedit.h.

◆ H_DELDATA

#define H_DELDATA   24 /* , int, histdata_t *);*/

Definition at line 229 of file histedit.h.

◆ H_END

#define H_END   12 /* , void); */

Definition at line 217 of file histedit.h.

◆ H_ENTER

#define H_ENTER   10 /* , const wchar_t *); */

Definition at line 215 of file histedit.h.

◆ H_FIRST

#define H_FIRST   3 /* , void); */

Definition at line 208 of file histedit.h.

◆ H_FUNC

#define H_FUNC   0 /* , UTSL */

Definition at line 205 of file histedit.h.

◆ H_GETSIZE

#define H_GETSIZE   2 /* , void); */

Definition at line 207 of file histedit.h.

◆ H_GETUNIQUE

#define H_GETUNIQUE   21 /* , void); */

Definition at line 226 of file histedit.h.

◆ H_LAST

#define H_LAST   4 /* , void); */

Definition at line 209 of file histedit.h.

◆ H_LOAD

#define H_LOAD   17 /* , const char *); */

Definition at line 222 of file histedit.h.

◆ H_NEXT

#define H_NEXT   6 /* , void); */

Definition at line 211 of file histedit.h.

◆ H_NEXT_EVDATA

#define H_NEXT_EVDATA   23 /* , const int, histdata_t *); */

Definition at line 228 of file histedit.h.

◆ H_NEXT_EVENT

#define H_NEXT_EVENT   15 /* , const int); */

Definition at line 220 of file histedit.h.

◆ H_NEXT_STR

#define H_NEXT_STR   13 /* , const wchar_t *); */

Definition at line 218 of file histedit.h.

◆ H_NSAVE_FP

#define H_NSAVE_FP   27 /* , size_t, FILE *); */

Definition at line 232 of file histedit.h.

◆ H_PREV

#define H_PREV   5 /* , void); */

Definition at line 210 of file histedit.h.

◆ H_PREV_EVENT

#define H_PREV_EVENT   16 /* , const int); */

Definition at line 221 of file histedit.h.

◆ H_PREV_STR

#define H_PREV_STR   14 /* , const wchar_t *); */

Definition at line 219 of file histedit.h.

◆ H_REPLACE

#define H_REPLACE   25 /* , const char *, histdata_t); */

Definition at line 230 of file histedit.h.

◆ H_SAVE

#define H_SAVE   18 /* , const char *); */

Definition at line 223 of file histedit.h.

◆ H_SAVE_FP

#define H_SAVE_FP   26 /* , FILE *); */

Definition at line 231 of file histedit.h.

◆ H_SET

#define H_SET   7 /* , int); */

Definition at line 213 of file histedit.h.

◆ H_SETSIZE

#define H_SETSIZE   1 /* , const int); */

Definition at line 206 of file histedit.h.

◆ H_SETUNIQUE

#define H_SETUNIQUE   20 /* , int); */

Definition at line 225 of file histedit.h.

◆ LIBEDIT_MAJOR

#define LIBEDIT_MAJOR   2

Definition at line 44 of file histedit.h.

◆ LIBEDIT_MINOR

#define LIBEDIT_MINOR   11

Definition at line 45 of file histedit.h.

Typedef Documentation

◆ EditLine

typedef struct editline EditLine

Definition at line 1 of file histedit.h.

◆ el_rfunc_t

typedef int(* el_rfunc_t) (EditLine *, wchar_t *)

Definition at line 268 of file histedit.h.

◆ HistEvent

typedef struct HistEvent HistEvent

◆ HistEventW

typedef struct histeventW HistEventW

◆ History

typedef struct history History

Definition at line 183 of file histedit.h.

◆ HistoryW

typedef struct historyW HistoryW

Definition at line 281 of file histedit.h.

◆ LineInfo

typedef struct lineinfo LineInfo

◆ LineInfoW

typedef struct lineinfow LineInfoW

◆ Tokenizer

typedef struct tokenizer Tokenizer

Definition at line 203 of file histedit.h.

◆ TokenizerW

typedef struct tokenizerW TokenizerW

Definition at line 297 of file histedit.h.

Function Documentation

◆ _el_fn_complete()

unsigned char _el_fn_complete ( EditLine ,
int   
)

Definition at line 829 of file filecomplete.c.

References break_chars, el, and fn_complete().

◆ el_beep()

void el_beep ( EditLine )

Definition at line 618 of file el.c.

References el, and terminal_beep().

Referenced by _rl_abort_internal(), and fn_complete().

◆ el_cursor()

int el_cursor ( EditLine ,
int   
)

Definition at line 637 of file chared.c.

References el_line_t::buffer, el_line_t::cursor, el, editline::el_line, and el_line_t::lastchar.

◆ el_deletestr()

void el_deletestr ( EditLine ,
int   
)

Definition at line 619 of file chared.c.

References el_line_t::buffer, c_delbefore(), el_line_t::cursor, el, and editline::el_line.

Referenced by fn_complete().

◆ el_end()

◆ el_get()

◆ el_getc()

int el_getc ( EditLine ,
char *   
)

Definition at line 45 of file eln.c.

References el, and el_wgetc().

Referenced by rl_read_key(), and vi_alias().

◆ el_gets()

const char* el_gets ( EditLine ,
int *   
)

Definition at line 75 of file eln.c.

References ct_enc_width(), ct_encode_string(), el, editline::el_lgcyconv, and el_wgets().

Referenced by cmdscanner(), readline(), and rl_callback_read_char().

◆ el_init()

EditLine* el_init ( const char *  ,
FILE *  ,
FILE *  ,
FILE *   
)

Definition at line 70 of file el.c.

References el_init_fd(), and fileno().

Referenced by controlediting().

◆ el_init_fd()

EditLine* el_init_fd ( const char *  ,
FILE *  ,
FILE *  ,
FILE *  ,
int  ,
int  ,
int   
)

Definition at line 127 of file el.c.

References el_init_internal().

Referenced by el_init().

◆ el_insertstr()

int el_insertstr ( EditLine ,
const char *   
)

◆ el_line()

◆ el_parse()

int el_parse ( EditLine ,
int  ,
const char **   
)

◆ el_push()

void el_push ( EditLine ,
const char *   
)

Definition at line 66 of file eln.c.

References ct_decode_string(), el, editline::el_lgcyconv, and el_wpush().

Referenced by rl_get_previous_history(), rl_insert(), and rl_redisplay().

◆ el_reset()

void el_reset ( EditLine )

Definition at line 173 of file el.c.

References ch_reset(), el, and tty_cookedmode().

Referenced by el_end(), and rl_reset_terminal().

◆ el_resize()

void el_resize ( EditLine )

Definition at line 597 of file el.c.

References el, terminal_change_size(), terminal_get_size(), and void.

Referenced by read_prepare(), rl_resize_terminal(), and sig_handler().

◆ el_set()

◆ el_source()

int el_source ( EditLine ,
const char *   
)

◆ el_wget()

◆ el_wgetc()

◆ el_wgets()

◆ el_winsertstr()

int el_winsertstr ( EditLine ,
const wchar_t *   
)

◆ el_wline()

const LineInfoW* el_wline ( EditLine )

Definition at line 507 of file el.c.

References el, and editline::el_line.

Referenced by el_line(), and fn_complete().

◆ el_wparse()

int el_wparse ( EditLine ,
int  ,
const wchar_t **   
)

Referenced by el_parse().

◆ el_wpush()

void el_wpush ( EditLine ,
const wchar_t *   
)

◆ el_wset()

◆ history()

◆ history_end()

void history_end ( History )

Referenced by controlediting(), and rl_initialize().

◆ history_init()

History* history_init ( void  )

Referenced by controlediting(), and rl_initialize().

◆ history_w()

◆ history_wend()

void history_wend ( HistoryW )

Definition at line 643 of file history.c.

References h, h_free, history_def_clear(), history_def_next(), and TYPE.

◆ history_winit()

◆ tok_end()

void tok_end ( Tokenizer )

Referenced by rl_parse_and_bind().

◆ tok_init()

Tokenizer* tok_init ( const char *  )

Referenced by rl_parse_and_bind().

◆ tok_line()

int tok_line ( Tokenizer ,
const LineInfo ,
int *  ,
const char ***  ,
int *  ,
int *   
)

◆ tok_reset()

void tok_reset ( Tokenizer )

◆ tok_str()

int tok_str ( Tokenizer ,
const char *  ,
int *  ,
const char ***   
)

Referenced by rl_parse_and_bind().

◆ tok_wend()

void tok_wend ( TokenizerW )

Definition at line 183 of file tokenizer.c.

References tok_free.

Referenced by parse_line().

◆ tok_winit()

TokenizerW* tok_winit ( const wchar_t *  )

Definition at line 127 of file tokenizer.c.

References AINCR, IFS, Q_none, tok_free, tok_malloc, tok_strdup, TYPE, and WINCR.

Referenced by parse_line().

◆ tok_wline()

int tok_wline ( TokenizerW ,
const LineInfoW ,
int *  ,
const wchar_t ***  ,
int *  ,
int *   
)

Definition at line 212 of file tokenizer.c.

References AINCR, FUN, line, Q_double, Q_doubleone, Q_none, Q_one, Q_single, STR, Strchr, TOK_EAT, TOK_KEEP, tok_realloc, and WINCR.

◆ tok_wreset()

void tok_wreset ( TokenizerW )

Definition at line 168 of file tokenizer.c.

References Q_none.

◆ tok_wstr()

int tok_wstr ( TokenizerW ,
const wchar_t *  ,
int *  ,
const wchar_t ***   
)

Definition at line 463 of file tokenizer.c.

References FUN, line, Strchr, and TYPE.

Referenced by parse_line().