--- old/main.c 2004-05-28 18:35:54.000000000 +0200 +++ patch/main.c 2005-01-12 19:52:54.000000000 +0100 @@ -159,6 +159,94 @@ unsigned char **mainenv; + +void compareCommand(char *command, char *toCompareWith[],int compareCount, int result[]) +{ + int i; + + for (i=0; icurwin->kbd, first); + + if (m == NULL) + { + m = dokey(maint->curwin->kbd, second); + + if (m != NULL) + { + compareCommand(m->cmd->name, toCompare, toCompareCount, result); + } + second++; + } + else + { + compareCommand(m->cmd->name, toCompare, toCompareCount, result); + first++; + } + } + + for (i=0; i= messageLength) + break; + messagePos += sprintf(message+messagePos, "No key binding to command %s exists!\n", toCompare[i]); + } + } + + if (messagePos) + return message; + else + { + joe_free(message); + return NULL; + } +} + int main(int argc, unsigned char **argv, unsigned char **envv) { CAP *cap; @@ -378,7 +466,18 @@ exemac(bw->o.mnew); } maint->curwin = maint->topwin; - + + exmsg = checkBindings(); + + if (exmsg) + { + vclose(vmem); + nclose(n); + fprintf(stderr, "\n%s\n", exmsg); + joe_free(exmsg); + return 1; + } + if (help) { help_on(maint); }