version 1.17, 2016/03/16 15:36:26 |
version 1.18, 2016/09/17 15:06:41 |
|
|
char *repl; |
char *repl; |
int klen; |
int klen; |
|
|
for (fm = table; fm < table + len; ) { |
for (fm = table; fm < table + len; ) { |
/* |
/* |
* Rewrite each command in the table with any |
* Rewrite each command in the table with any |
* special key abbreviations expanded. |
* special key abbreviations expanded. |
*/ |
*/ |
for (to = fm; *fm != '\0'; ) { |
for (to = fm; *fm != '\0'; ) { |
if (*fm != SK_SPECIAL_KEY) { |
if (*fm != SK_SPECIAL_KEY) { |
*to++ = *fm++; |
*to++ = *fm++; |
continue; |
continue; |
|
|
int a; |
int a; |
|
|
*sp = NULL; |
*sp = NULL; |
for (p = table, q = cmd; p < endtable; p++, q++) { |
for (p = table, q = cmd; p < endtable; p++, q++) { |
if (*p == *q) { |
if (*p == *q) { |
/* |
/* |
* Current characters match. |
* Current characters match. |
|
|
* Search thru all the command tables. |
* Search thru all the command tables. |
* Stop when we find an action which is not A_INVALID. |
* Stop when we find an action which is not A_INVALID. |
*/ |
*/ |
for (t = tlist; t != NULL; t = t->t_next) { |
for (t = tlist; t != NULL; t = t->t_next) { |
action = cmd_search(cmd, t->t_start, t->t_end, sp); |
action = cmd_search(cmd, t->t_start, t->t_end, sp); |
if (action != A_INVALID) |
if (action != A_INVALID) |
break; |
break; |