Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 16 of 16) sorted by relevance

/libedit-20250104-3.1/src/
Dkeymacro.c288 if (ptr->next) { in node_trav()
381 ptr = *inptr; in node__delete()
426 if (ptr == NULL) in node__put()
446 el_free(ptr); in node__put()
458 ptr = el_malloc(sizeof(*ptr)); in node__get()
459 if (ptr == NULL) in node__get()
461 ptr->ch = ch; in node__get()
466 return ptr; in node__get()
489 if (ptr == NULL) in node_lookup()
515 &ptr->val, ptr->type); in node_lookup()
[all …]
Dtokenizer.c212 const Char *ptr; in FUN() local
216 ptr = line->buffer; in FUN()
217 for (ptr = line->buffer; ;ptr++) { in FUN()
219 ptr = STR(""); in FUN()
224 switch (*ptr) { in FUN()
240 *tok->wptr++ = *ptr; in FUN()
244 *tok->wptr++ = *ptr; in FUN()
249 *tok->wptr++ = *ptr; in FUN()
271 *tok->wptr++ = *ptr; in FUN()
275 *tok->wptr++ = *ptr; in FUN()
[all …]
Dgetline.c50 char *ptr, *eptr; in getdelim() local
59 for (ptr = *buf, eptr = *buf + *bufsiz;;) { in getdelim()
63 ssize_t diff = (ssize_t)(ptr - *buf); in getdelim()
65 *ptr = '\0'; in getdelim()
71 *ptr++ = c; in getdelim()
73 *ptr = '\0'; in getdelim()
74 return ptr - *buf; in getdelim()
76 if (ptr + 2 >= eptr) { in getdelim()
79 ssize_t d = ptr - *buf; in getdelim()
85 ptr = nbuf + d; in getdelim()
Dparse.c102 const wchar_t *ptr; in el_wparse() local
107 ptr = wcschr(argv[0], L':'); in el_wparse()
108 if (ptr != NULL) { in el_wparse()
112 if (ptr == argv[0]) in el_wparse()
114 l = (size_t)(ptr - argv[0]); in el_wparse()
120 ptr++; in el_wparse()
126 ptr = argv[0]; in el_wparse()
129 if (wcscmp(cmds[i].name, ptr) == 0) { in el_wparse()
142 parse__escape(const wchar_t **ptr) in parse__escape() argument
147 p = *ptr; in parse__escape()
[all …]
Dcommon.c749 wchar_t *ptr; in ed_prev_line() local
756 ptr--; in ed_prev_line()
758 for (; ptr >= el->el_line.buffer; ptr--) in ed_prev_line()
768 for (ptr--; ptr >= el->el_line.buffer && *ptr != '\n'; ptr--) in ed_prev_line()
774 for (ptr++; in ed_prev_line()
775 nchars-- > 0 && ptr < el->el_line.lastchar && *ptr != '\n'; in ed_prev_line()
776 ptr++) in ed_prev_line()
792 wchar_t *ptr; in ed_next_line() local
798 for (ptr = el->el_line.cursor; ptr < el->el_line.lastchar; ptr++) in ed_next_line()
808 for (ptr++; in ed_next_line()
[all …]
Dreallocarr.c58 reallocarr(void *ptr, size_t number, size_t size) in __weak_alias()
65 memcpy(&optr, ptr, sizeof(ptr)); in __weak_alias()
69 memcpy(ptr, &nptr, sizeof(ptr)); in __weak_alias()
91 memcpy(ptr, &nptr, sizeof(ptr)); in __weak_alias()
Del.c321 void *ptr = va_arg(ap, void *); in el_wset() local
323 rv = hist_set(el, func, ptr); in el_wset()
556 char *ptr; in el_source() local
573 plen += strlen(ptr); in el_source()
576 (void)snprintf(path, plen, "%s%s", ptr, in el_source()
577 elpath + (*ptr == '\0')); in el_source()
592 ptr = NULL; in el_source()
595 if (*ptr == '\n') in el_source()
597 if (slen > 0 && ptr[--slen] == '\n') in el_source()
598 ptr[slen] = '\0'; in el_source()
[all …]
Dhist.c87 hist_set(EditLine *el, hist_fun_t fun, void *ptr) in hist_set() argument
90 el->el_history.ref = ptr; in hist_set()
183 char *ptr = in hist_command() local
185 size_t len = strlen(ptr); in hist_command()
186 if (len > 0 && ptr[len - 1] == '\n') in hist_command()
187 ptr[--len] = '\0'; in hist_command()
198 strvis(buf, ptr, VIS_NL); in hist_command()
Dhistory.c781 char *ptr; in history_load() local
800 ptr = h_malloc((max_size = 1024) * sizeof(*ptr)); in history_load()
801 if (ptr == NULL) in history_load()
809 nptr = h_realloc(ptr, max_size * sizeof(*ptr)); in history_load()
814 ptr = nptr; in history_load()
826 h_free(ptr); in history_load()
843 char *ptr; in history_save_fp() local
851 ptr = h_malloc((max_size = 1024) * sizeof(*ptr)); in history_save_fp()
870 nptr = h_realloc(ptr, max_size * sizeof(*ptr)); in history_save_fp()
875 ptr = nptr; in history_save_fp()
[all …]
Dchared.c86 cv_yank(EditLine *el, const wchar_t *ptr, int size) in cv_yank() argument
90 (void)memcpy(k->buf, ptr, (size_t)size * sizeof(*k->buf)); in cv_yank()
785 wchar_t *ptr; in c_hpos() local
793 for (ptr = el->el_line.cursor - 1; in c_hpos()
794 ptr >= el->el_line.buffer && *ptr != '\n'; in c_hpos()
795 ptr--) in c_hpos()
797 return (int)(el->el_line.cursor - ptr - 1); in c_hpos()
Dreadline.c822 const char *ptr, *cmd; in _history_expand_command() local
829 ptr = NULL; in _history_expand_command()
843 ptr = get_history_event(str, &idx, 0); in _history_expand_command()
859 ptr = get_history_event(command + offs, &idx, qchar); in _history_expand_command()
864 if (ptr == NULL && aptr == NULL) in _history_expand_command()
868 *result = strdup(aptr ? aptr : ptr); in _history_expand_command()
913 tmp = history_arg_extract(start, end, aptr? aptr:ptr); in _history_expand_command()
922 tmp = strdup(aptr? aptr:ptr); in _history_expand_command()
Deln.c235 void *ptr = va_arg(ap, void *); in el_set() local
236 ret = hist_set(el, fun, ptr); in el_set()
Dsys.h100 int reallocarr(void *ptr, size_t number, size_t size);
Dterminal.c377 char *ptr; in terminal_alloc() local
379 for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++) in terminal_alloc()
/libedit-20250104-3.1/examples/
Dtc1.c97 const char* ptr; in complete() local
105 for (ptr = lf->cursor - 1; in complete()
106 !isspace((unsigned char)*ptr) && ptr > lf->buffer; ptr--) in complete()
108 len = lf->cursor - ++ptr; in complete()
113 if (strncmp(dp->d_name, ptr, len) == 0) { in complete()
Dwtc1.c61 const wchar_t *ptr; in complete() local
70 for (ptr = lf->cursor -1; !iswspace(*ptr) && ptr > lf->buffer; --ptr) in complete()
72 len = lf->cursor - ++ptr; in complete()
85 bptr += wctomb(bptr, ptr[i]); in complete()