| /NextBSD/lib/libedit/ |
| HD | vi.c | 63 cv_action(EditLine *el, Int c) in cv_action() argument 66 if (el->el_chared.c_vcmd.action != NOP) { in cv_action() 68 if (c != (Int)el->el_chared.c_vcmd.action) in cv_action() 72 cv_undo(el); in cv_action() 73 cv_yank(el, el->el_line.buffer, in cv_action() 74 (int)(el->el_line.lastchar - el->el_line.buffer)); in cv_action() 75 el->el_chared.c_vcmd.action = NOP; in cv_action() 76 el->el_chared.c_vcmd.pos = 0; in cv_action() 78 el->el_line.lastchar = el->el_line.buffer; in cv_action() 79 el->el_line.cursor = el->el_line.buffer; in cv_action() [all …]
|
| HD | common.c | 57 ed_end_of_file(EditLine *el, Int c __attribute__((__unused__))) in ed_end_of_file() argument 60 re_goto_bottom(el); in ed_end_of_file() 61 *el->el_line.lastchar = '\0'; in ed_end_of_file() 71 ed_insert(EditLine *el, Int c) in ed_insert() argument 73 int count = el->el_state.argument; in ed_insert() 78 if (el->el_line.lastchar + el->el_state.argument >= in ed_insert() 79 el->el_line.limit) { in ed_insert() 81 if (!ch_enlargebufs(el, (size_t) count)) in ed_insert() 86 if (el->el_state.inputmode == MODE_INSERT in ed_insert() 87 || el->el_line.cursor >= el->el_line.lastchar) in ed_insert() [all …]
|
| HD | search.c | 60 #define EL_CURSOR(el) \ argument 61 ((el)->el_line.cursor + (((el)->el_map.type == MAP_VI) && \ 62 ((el)->el_map.current == (el)->el_map.alt))) 68 search_init(EditLine *el) in search_init() argument 71 el->el_search.patbuf = el_malloc(EL_BUFSIZ * in search_init() 72 sizeof(*el->el_search.patbuf)); in search_init() 73 if (el->el_search.patbuf == NULL) in search_init() 75 el->el_search.patlen = 0; in search_init() 76 el->el_search.patdir = -1; in search_init() 77 el->el_search.chacha = '\0'; in search_init() [all …]
|
| HD | chared.c | 61 cv_undo(EditLine *el) in cv_undo() argument 63 c_undo_t *vu = &el->el_chared.c_undo; in cv_undo() 64 c_redo_t *r = &el->el_chared.c_redo; in cv_undo() 68 size = (size_t)(el->el_line.lastchar - el->el_line.buffer); in cv_undo() 70 vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer); in cv_undo() 71 (void)memcpy(vu->buf, el->el_line.buffer, size * sizeof(*vu->buf)); in cv_undo() 74 r->count = el->el_state.doingarg ? el->el_state.argument : 0; in cv_undo() 75 r->action = el->el_chared.c_vcmd.action; in cv_undo() 77 r->cmd = el->el_state.thiscmd; in cv_undo() 78 r->ch = el->el_state.thisch; in cv_undo() [all …]
|
| HD | emacs.c | 57 em_delete_or_list(EditLine *el, Int c) in em_delete_or_list() argument 60 if (el->el_line.cursor == el->el_line.lastchar) { in em_delete_or_list() 62 if (el->el_line.cursor == el->el_line.buffer) { in em_delete_or_list() 64 terminal_writec(el, c); /* then do an EOF */ in em_delete_or_list() 71 terminal_beep(el); in em_delete_or_list() 75 if (el->el_state.doingarg) in em_delete_or_list() 76 c_delafter(el, el->el_state.argument); in em_delete_or_list() 78 c_delafter1(el); in em_delete_or_list() 79 if (el->el_line.cursor > el->el_line.lastchar) in em_delete_or_list() 80 el->el_line.cursor = el->el_line.lastchar; in em_delete_or_list() [all …]
|
| HD | read.c | 69 read_init(EditLine *el) in read_init() argument 72 el->el_read.read_char = read_char; in read_init() 82 el_read_setfn(EditLine *el, el_rfunc_t rc) in el_read_setfn() argument 84 el->el_read.read_char = (rc == EL_BUILTIN_GETCFN) ? read_char : rc; in el_read_setfn() 94 el_read_getfn(EditLine *el) in el_read_getfn() argument 96 return el->el_read.read_char == read_char ? in el_read_getfn() 97 EL_BUILTIN_GETCFN : el->el_read.read_char; in el_read_getfn() 107 read_debug(EditLine *el) in read_debug() argument 110 if (el->el_line.cursor > el->el_line.lastchar) in read_debug() 111 (void) fprintf(el->el_errfile, "cursor > lastchar\r\n"); in read_debug() [all …]
|
| HD | refresh.c | 68 #define __F el->el_errfile 81 re_printstr(EditLine *el, const char *str, char *f, char *t) in re_printstr() argument 98 re_nextline(EditLine *el) in re_nextline() argument 100 el->el_refresh.r_cursor.h = 0; /* reset it. */ in re_nextline() 108 if (el->el_refresh.r_cursor.v + 1 >= el->el_terminal.t_size.v) { in re_nextline() 109 int i, lins = el->el_terminal.t_size.v; in re_nextline() 110 Char *firstline = el->el_vdisplay[0]; in re_nextline() 113 el->el_vdisplay[i - 1] = el->el_vdisplay[i]; in re_nextline() 116 el->el_vdisplay[i - 1] = firstline; in re_nextline() 118 el->el_refresh.r_cursor.v++; in re_nextline() [all …]
|
| HD | hist.c | 56 hist_init(EditLine *el) in hist_init() argument 59 el->el_history.fun = NULL; in hist_init() 60 el->el_history.ref = NULL; in hist_init() 61 el->el_history.buf = el_malloc(EL_BUFSIZ * sizeof(*el->el_history.buf)); in hist_init() 62 el->el_history.sz = EL_BUFSIZ; in hist_init() 63 if (el->el_history.buf == NULL) in hist_init() 65 el->el_history.last = el->el_history.buf; in hist_init() 74 hist_end(EditLine *el) in hist_end() argument 77 el_free(el->el_history.buf); in hist_end() 78 el->el_history.buf = NULL; in hist_end() [all …]
|
| HD | el.c | 73 EditLine *el = el_malloc(sizeof(*el)); in el_init_fd() local 75 if (el == NULL) in el_init_fd() 78 memset(el, 0, sizeof(EditLine)); in el_init_fd() 80 el->el_infile = fin; in el_init_fd() 81 el->el_outfile = fout; in el_init_fd() 82 el->el_errfile = ferr; in el_init_fd() 84 el->el_infd = fdin; in el_init_fd() 85 el->el_outfd = fdout; in el_init_fd() 86 el->el_errfd = fderr; in el_init_fd() 88 el->el_prog = Strdup(ct_decode_string(prog, &el->el_scratch)); in el_init_fd() [all …]
|
| HD | terminal.c | 89 #define GoodStr(a) (el->el_terminal.t_str[a] != NULL && \ 90 el->el_terminal.t_str[a][0] != '\0') 91 #define Str(a) el->el_terminal.t_str[a] 92 #define Val(a) el->el_terminal.t_val[a] 226 terminal_setflags(EditLine *el) in terminal_setflags() argument 229 if (el->el_tty.t_tabs) in terminal_setflags() 253 (void) fprintf(el->el_errfile, in terminal_setflags() 255 (void) fprintf(el->el_errfile, in terminal_setflags() 259 (void) fprintf(el->el_errfile, "no clear EOL capability.\n"); in terminal_setflags() 261 (void) fprintf(el->el_errfile, "no delete char capability.\n"); in terminal_setflags() [all …]
|
| HD | keymacro.c | 106 keymacro_init(EditLine *el) in keymacro_init() argument 109 el->el_keymacro.buf = el_malloc(KEY_BUFSIZ * in keymacro_init() 110 sizeof(*el->el_keymacro.buf)); in keymacro_init() 111 if (el->el_keymacro.buf == NULL) in keymacro_init() 113 el->el_keymacro.map = NULL; in keymacro_init() 114 keymacro_reset(el); in keymacro_init() 122 keymacro_end(EditLine *el) in keymacro_end() argument 125 el_free(el->el_keymacro.buf); in keymacro_end() 126 el->el_keymacro.buf = NULL; in keymacro_end() 127 node__free(el->el_keymacro.map); in keymacro_end() [all …]
|
| HD | map.c | 893 map_init(EditLine *el) in map_init() argument 901 EL_ABORT((el->errfile, "Emacs map incorrect\n")); in map_init() 903 EL_ABORT((el->errfile, "Vi command map incorrect\n")); in map_init() 905 EL_ABORT((el->errfile, "Vi insert map incorrect\n")); in map_init() 908 el->el_map.alt = el_malloc(sizeof(*el->el_map.alt) * N_KEYS); in map_init() 909 if (el->el_map.alt == NULL) in map_init() 911 el->el_map.key = el_malloc(sizeof(*el->el_map.key) * N_KEYS); in map_init() 912 if (el->el_map.key == NULL) in map_init() 914 el->el_map.emacs = el_map_emacs; in map_init() 915 el->el_map.vic = el_map_vi_command; in map_init() [all …]
|
| HD | tty.c | 473 tty_getty(EditLine *el, struct termios *t) in tty_getty() argument 476 while ((rv = tcgetattr(el->el_infd, t)) == -1 && errno == EINTR) in tty_getty() 485 tty_setty(EditLine *el, int action, const struct termios *t) in tty_setty() argument 488 while ((rv = tcsetattr(el->el_infd, action, t)) == -1 && errno == EINTR) in tty_setty() 497 tty_setup(EditLine *el) in tty_setup() argument 501 if (el->el_flags & EDIT_DISABLED) in tty_setup() 504 if (!isatty(el->el_outfd)) { in tty_setup() 506 (void) fprintf(el->el_errfile, "%s: isatty: %s\n", __func__, in tty_setup() 511 if (tty_getty(el, &el->el_tty.t_or) == -1) { in tty_setup() 513 (void) fprintf(el->el_errfile, "%s: tty_getty: %s\n", __func__, in tty_setup() [all …]
|
| HD | eln.c | 50 el_getc(EditLine *el, char *cp) in el_getc() argument 55 if (!(el->el_flags & CHARSET_IS_UTF8)) in el_getc() 56 el->el_flags |= IGNORE_EXTCHARS; in el_getc() 57 num_read = el_wgetc (el, &wc); in el_getc() 58 if (!(el->el_flags & CHARSET_IS_UTF8)) in el_getc() 59 el->el_flags &= ~IGNORE_EXTCHARS; in el_getc() 68 el_push(EditLine *el, const char *str) in el_push() argument 72 el_wpush(el, ct_decode_string(str, &el->el_lgcyconv)); in el_push() 77 el_gets(EditLine *el, int *nread) in el_gets() argument 81 if (!(el->el_flags & CHARSET_IS_UTF8)) in el_gets() [all …]
|
| HD | hist.h | 58 #define HIST_FUN_INTERNAL(el, fn, arg) \ argument 59 ((((*(el)->el_history.fun) ((el)->el_history.ref, &(el)->el_history.ev, \ 60 fn, arg)) == -1) ? NULL : (el)->el_history.ev.str) 62 #define HIST_FUN(el, fn, arg) \ argument 63 (((el)->el_flags & NARROW_HISTORY) ? hist_convert(el, fn, arg) : \ 64 HIST_FUN_INTERNAL(el, fn, arg)) 66 #define HIST_FUN(el, fn, arg) HIST_FUN_INTERNAL(el, fn, arg) argument 70 #define HIST_NEXT(el) HIST_FUN(el, H_NEXT, NULL) argument 71 #define HIST_FIRST(el) HIST_FUN(el, H_FIRST, NULL) argument 72 #define HIST_LAST(el) HIST_FUN(el, H_LAST, NULL) argument [all …]
|
| HD | prompt.c | 60 prompt_default(EditLine *el __attribute__((__unused__))) in prompt_default() argument 73 prompt_default_r(EditLine *el __attribute__((__unused__))) in prompt_default_r() argument 85 prompt_print(EditLine *el, int op) in prompt_print() argument 92 elp = &el->el_prompt; in prompt_print() 94 elp = &el->el_rprompt; in prompt_print() 97 p = (*elp->p_func)(el); in prompt_print() 99 p = ct_decode_string((char *)(void *)(*elp->p_func)(el), in prompt_print() 100 &el->el_scratch); in prompt_print() 108 terminal__putc(el, *p); in prompt_print() 110 re_putc(el, *p, 1); in prompt_print() [all …]
|
| HD | sig.c | 116 sig_init(EditLine *el) in sig_init() argument 121 el->el_signal = el_malloc(sizeof(*el->el_signal)); in sig_init() 122 if (el->el_signal == NULL) in sig_init() 125 nset = &el->el_signal->sig_set; in sig_init() 133 el->el_signal->sig_action[i].sa_handler = SIG_ERR; in sig_init() 134 el->el_signal->sig_action[i].sa_flags = 0; in sig_init() 135 sigemptyset(&el->el_signal->sig_action[i].sa_mask); in sig_init() 148 sig_end(EditLine *el) in sig_end() argument 151 el_free(el->el_signal); in sig_end() 152 el->el_signal = NULL; in sig_end() [all …]
|
| /NextBSD/contrib/netbsd-tests/lib/libcurses/check_files/ |
| HD | clear5.chk | 2 el 3 el 4 el 5 el 6 el 7 el 8 el 9 el 10 el 11 el [all …]
|
| /NextBSD/contrib/tcsh/nls/spanish/ |
| HD | set3 | 5 2 Borrar el carácter detrás del cursor 6 3 Cortar desde el comienzo de la palabra hasta el cursor - se guarda en el buffer 7 4 Cortar desde el comienzo de la línea hasta el cursor - se guarda en el buffer 8 5 Ir hasta el comienzo de la palabra 9 6 Ir hasta el comienzo de la línea 10 7 Convertir en mayúsculas los caracteres desde el cursor hasta el final de la palabra 11 8 Vi: cambiar a mayúsculas o minúsculas el carácter bajo el cursor y avanza una posición 12 9 Vi: cambia hasta el final de la línea 18 15 Copia la palabra hasta el cursor 19 16 Copia el área entre la marca y el cursor al buffer [all …]
|
| /NextBSD/contrib/libucl/uthash/ |
| HD | utlist.h | 419 #define LL_COUNT(head,el,counter) \ argument 420 LL_COUNT2(head,el,counter,next) \ 422 #define LL_COUNT2(head,el,counter,next) \ argument 425 LL_FOREACH2(head,el,next){ ++counter; } \ 428 #define LL_FOREACH(head,el) \ argument 429 LL_FOREACH2(head,el,next) 431 #define LL_FOREACH2(head,el,next) \ argument 432 for(el=head;el;el=(el)->next) 434 #define LL_FOREACH_SAFE(head,el,tmp) \ argument 435 LL_FOREACH_SAFE2(head,el,tmp,next) [all …]
|
| /NextBSD/crypto/heimdal/lib/asn1/ |
| HD | template.c | 50 #define el(name, type) { \ macro 66 el(integer, int), 67 el(heim_integer, heim_integer), 68 el(integer, int), 69 el(unsigned, unsigned), 70 el(general_string, heim_general_string), 71 el(octet_string, heim_octet_string), 73 el(ia5_string, heim_ia5_string), 74 el(bmp_string, heim_bmp_string), 75 el(universal_string, heim_universal_string), [all …]
|
| /NextBSD/cddl/contrib/opensolaris/tools/ctf/cvt/ |
| HD | alist.c | 57 alist_el_t *el = arg; in alist_hash() local 58 uintptr_t num = (uintptr_t)el->ale_name; in alist_hash() 96 alist_el_t *el = arg1; in alist_free_cb() local 99 alist->al_namefree(el->ale_name); in alist_free_cb() 101 alist->al_valfree(el->ale_name); in alist_free_cb() 102 free(el); in alist_free_cb() 115 alist_el_t *el; in alist_add() local 117 el = xmalloc(sizeof (alist_el_t)); in alist_add() 118 el->ale_name = name; in alist_add() 119 el->ale_value = value; in alist_add() [all …]
|
| /NextBSD/lib/libedit/TEST/ |
| HD | tc1.c | 74 prompt(EditLine *el) in prompt() argument 89 complete(EditLine *el, int ch) in complete() argument 94 const LineInfo *lf = el_line(el); in complete() 110 if (el_insertstr(el, &dp->d_name[len]) == -1) in complete() 125 EditLine *el = NULL; in main() local 149 el = el_init(*argv, stdin, stdout, stderr); in main() 151 el_set(el, EL_EDITOR, "vi"); /* Default editor is vi */ in main() 152 el_set(el, EL_SIGNAL, 1); /* Handle signals gracefully */ in main() 153 el_set(el, EL_PROMPT_ESC, prompt, '\1');/* Set the prompt function */ in main() 156 el_set(el, EL_HIST, history, hist); in main() [all …]
|
| HD | wtc1.c | 24 prompt(EditLine *el) in prompt() argument 60 complete(EditLine *el, int ch) in complete() argument 66 const LineInfoW *lf = el_wline(el); in complete() 96 if (el_winsertstr(el, dir) == -1) in complete() 113 EditLine *el = NULL; in main() local 136 el = el_init(argv[0], stdin, stdout, stderr); in main() 138 el_wset(el, EL_EDITOR, L"vi"); /* Default editor is vi */ in main() 139 el_wset(el, EL_SIGNAL, 1); /* Handle signals gracefully */ in main() 140 el_wset(el, EL_PROMPT_ESC, prompt, '\1'); /* Set the prompt function */ in main() 142 el_wset(el, EL_HIST, history_w, hist); /* FIXME - history_w? */ in main() [all …]
|
| /NextBSD/bin/sh/ |
| HD | histedit.c | 68 EditLine *el; /* editline cookie */ variable 100 if (editing && !el && isatty(0)) { /* && isatty(2) ??? */ in histedit() 120 el = el_init(arg0, el_in, el_out, el_err); in histedit() 121 if (el != NULL) { in histedit() 123 el_set(el, EL_HIST, history, hist); in histedit() 124 el_set(el, EL_PROMPT, getprompt); in histedit() 125 el_set(el, EL_ADDFN, "sh-complete", in histedit() 133 } else if (!editing && el) { in histedit() 135 el_end(el); in histedit() 136 el = NULL; in histedit() [all …]
|