void chcmd (void)
{
+ char buffer[48 + 1] = {0};
+ char *desc[] = {"New command", NULL};
+ char *buf[] = {buffer, NULL};
+ int c = getstrings (desc, buf, 48);
+ VERBOSE (DEBUG, fprintf (stdout, "return: 0x%04x (%c)\n", c, (c >= 32) ? c : '.'));
}
void chfile (void)
break;
case KEY_ESC:
- case ':':
strcpy(buf, org); /* restore original */
stop = TRUE;
break;
case '\n':
case KEY_UP:
- case 'i':
case KEY_DOWN:
- case 'k':
stop = TRUE;
break;
case KEY_LEFT:
- case 'j':
if (bp > buf)
bp--;
break;
case KEY_RIGHT:
- case 'l':
defdisp = FALSE;
if (bp - buf < (int)strlen(buf))
bp++;
switch (c = mvweditstr(winput, i+1, mmax+3, buf[i], field))
{
case KEY_ESC:
- case ':':
stop = TRUE;
break;
case KEY_UP:
- case 'i':
i = (i + n - 1) % n;
break;
case '\n':
case '\t':
case KEY_DOWN:
- case 'k':
if (++i == n)
stop = TRUE; /* all passed? */
}