if (func == NULL) return 0; if (strlen(key) == 1) c = *key; else if (strlen(key) == 2 && *key == '^') c = key[1] & 037; else if (strlen(key) >= 2 && isdigit(*key)) if (sscanf(key, "%i", &c) != 1) return 0; for (i = 0, mp = revmap; (*mp).name != NULL; mp++, i++) { if (strcmp((*mp).name, func) == 0) { keymap[c+1] = i; return c; } } return 0;
PUBLIC int remap ARGS2(	char *,	key,	char *,	func){       int i;       struct rmap *mp;       int c = 0;       if (func == NULL)	       return 0;       if (strlen(key) == 1)               c = *key;       else if (strlen(key) == 2 && *key == '^')               c = key[1] & 037;       else if (strlen(key) >= 2 && isdigit(*key))               if (sscanf(key, "%i", &c) != 1)                       return 0;       for (i = 0, mp = revmap; (*mp).name != NULL; mp++, i++) {               if (strcmp((*mp).name, func) == 0) {                       keymap[c+1] = i;                       return c;               }       }       return 0;}