Lines Matching refs:temp
72 char *temp; in fn_tilde_expand() local
78 temp = strchr(txt + 1, '/'); in fn_tilde_expand()
79 if (temp == NULL) { in fn_tilde_expand()
80 temp = strdup(txt + 1); in fn_tilde_expand()
81 if (temp == NULL) in fn_tilde_expand()
85 len = (size_t)(temp - txt + 1); in fn_tilde_expand()
86 temp = el_calloc(len, sizeof(*temp)); in fn_tilde_expand()
87 if (temp == NULL) in fn_tilde_expand()
89 (void)strlcpy(temp, txt + 1, len - 1); in fn_tilde_expand()
91 if (temp[0] == 0) { in fn_tilde_expand()
103 if (getpwnam_r(temp, &pwres, pwbuf, sizeof(pwbuf), &pass) != 0) in fn_tilde_expand()
106 pass = getpwnam_r(temp, &pwres, pwbuf, sizeof(pwbuf)); in fn_tilde_expand()
108 pass = getpwnam(temp); in fn_tilde_expand()
111 el_free(temp); /* value no more needed */ in fn_tilde_expand()
120 temp = el_calloc(len, sizeof(*temp)); in fn_tilde_expand()
121 if (temp == NULL) in fn_tilde_expand()
123 (void)snprintf(temp, len, "%s/%s", pass->pw_dir, txt); in fn_tilde_expand()
125 return temp; in fn_tilde_expand()
206 wchar_t *temp = el->el_line.buffer; in escape_filename() local
212 while (temp != el->el_line.cursor) { in escape_filename()
217 if (temp[0] == '\'' && !d_quoted) in escape_filename()
222 else if (temp[0] == '"' && !s_quoted) in escape_filename()
224 temp++; in escape_filename()
329 char *temp; in fn_filename_completion_function() local
333 temp = strrchr(text, '/'); in fn_filename_completion_function()
334 if (temp) { in fn_filename_completion_function()
336 temp++; in fn_filename_completion_function()
337 nptr = el_realloc(filename, (strlen(temp) + 1) * in fn_filename_completion_function()
345 (void)strcpy(filename, temp); in fn_filename_completion_function()
346 len = (size_t)(temp - text); /* including last slash */ in fn_filename_completion_function()
429 temp = el_calloc(len, sizeof(*temp)); in fn_filename_completion_function()
430 if (temp == NULL) in fn_filename_completion_function()
432 (void)snprintf(temp, len, "%s%s", dirname, entry->d_name); in fn_filename_completion_function()
436 temp = NULL; in fn_filename_completion_function()
439 return temp; in fn_filename_completion_function()
591 wchar_t *temp; in find_word_to_complete() local
636 temp = el_malloc((len + 1) * sizeof(*temp)); in find_word_to_complete()
637 (void) wcsncpy(temp, ctemp, len); in find_word_to_complete()
638 temp[len] = '\0'; in find_word_to_complete()
639 return temp; in find_word_to_complete()
664 wchar_t *temp; in fn_complete2() local
685 temp = find_word_to_complete(li->cursor, in fn_complete2()
687 if (temp == NULL) in fn_complete2()
700 ct_encode_string(temp, &el->el_scratch), in fn_complete2()
707 ct_encode_string(temp, &el->el_scratch), complete_func); in fn_complete2()
819 el_free(temp); in fn_complete2()