#ifdef CONFIG_FEATURE_GETUSERNAME_AND_HOMEDIR
# ifndef TEST
-# include "pwd.h"
+# include "pwd_.h"
# else
# include <pwd.h>
# endif /* TEST */
handlers_sets &= ~SET_WCHG_HANDLERS;
}
fflush(stdout);
-#ifdef CONFIG_FEATURE_CLEAN_UP
+#if 0
+//#ifdef CONFIG_FEATURE_CLEAN_UP
if (his_front) {
struct history *n;
goto cont;
str_found = add_quote_for_spec_chars(found);
if (type == FIND_FILE_ONLY ||
- (type == FIND_EXE_ONLY && is_execute(&st) == TRUE))
+ (type == FIND_EXE_ONLY && is_execute(&st)))
strcat(str_found, " ");
}
/* Add it to the list */
#define QUOT (UCHAR_MAX+1)
#define collapse_pos(is, in) { \
- memcpy(int_buf+is, int_buf+in, (BUFSIZ+1-is-in)*sizeof(int)); \
- memcpy(pos_buf+is, pos_buf+in, (BUFSIZ+1-is-in)*sizeof(int)); }
+ memcpy(int_buf+(is), int_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); \
+ memcpy(pos_buf+(is), pos_buf+(in), (BUFSIZ+1-(is)-(in))*sizeof(int)); }
static int find_match(char *matchBuf, int *len_with_quotes)
{
}
return;
}
- if (*lastWasTab == FALSE) {
+ if (! *lastWasTab) {
char *tmp;
int len_found;
input_tab(&lastWasTab);
#endif
break;
+ case 11:
+ /* Control-k -- clear to end of line */
+ *(command + cursor) = 0;
+ len = cursor;
+ printf("\033[J");
+ break;
+ case 12:
+ {
+ /* Control-l -- clear screen */
+ int old_cursor = cursor;
+ printf("\033[H");
+ redraw(0, len-old_cursor);
+ }
+ break;
case 14:
/* Control-n -- Get next command in history */
if (hp && hp->n && hp->n->s) {
redraw(cmdedit_y, len -= cursor);
}
break;
-
case ESC:{
/* escape sequence follows */
if (safe_read(0, &c, 1) < 1)