- for (TC = &TC_Ascii[TC_LOWEST-TC_LOWEST];
- TC < &TC_Ascii[TC_LOWEST_USER-TC_LOWEST]; TC++, asciicode++) {
- printf("\t{ cantdo, 0 },\t");
- printf("\t/* 0x%x */\n", asciicode);
- }
- for (TC = &TC_Ascii[TC_LOWEST_USER-TC_LOWEST];
- TC <= &TC_Ascii[TC_HIGHEST-TC_LOWEST]; TC++, asciicode++) {
- /* Hack for "PFK" names (which should be "PF") */
- if (memcmp(TC->tc_name, "PFK", 3) == 0) {
- static char PFonly[100] = "PF";
-
- strcpy(PFonly+2, TC->tc_name+3);
- TC->tc_name = PFonly;
- }
- found = 0;
- for (this = firstentry(TC->tc_name); (!found) && this;
- this = this->next) {
- if ((this->name[4] == TC->tc_name[0])
- && (strcmp(this->name+4, TC->tc_name) == 0)) {
- /* this is the entry */
- /* What we have is a TC entry matching a scancode entry */
- Ph = this->hits; /* now, get hits */
- if (Ph == 0) {
- continue;
- }
- for (i = 0; i < 4; i++) {
- if ((Ph->name[i][4] == TC->tc_name[0])
- && (strcmp(Ph->name[i]+4, TC->tc_name) == 0)) {
- /* This is THE hit! */
- found = 1;
- printf("\t{ ");
- switch (i) {
- case 0:
- printf("normal, ");
- break;
- case 1:
- printf("shifted, ");
- break;
- case 2:
- printf("alted, ");
- break;
- case 3:
- printf("shitfalted, ");
- break;
- }
- printf("0x%02x },", Ph-Hits);
- break;
+ for (attable = &table[0]; attable <= &table[highestof(table)]; attable++) {
+ for (this = *attable; this; this = this->next) {
+ Ph = this->hits;
+ if (Ph == 0) {
+ continue;
+ }
+ for (i = 0; i < 4; i++) {
+ if ((Ph->name[i] != 0) &&
+ (Ph->name[i][0] == this->name[0]) &&
+ (strcmp(Ph->name[i], this->name) == 0)) {
+ printf("\t{ 0x%02x, %s, ",
+ Ph-Hits, shiftof[i]);
+ if (memcmp("AID_", this->name, 4) == 0) { /* AID key */
+ printf("FCN_AID, ");
+ } else {
+ printf("%s, ", Ph->name[i]);
+ }
+ if (memcmp("PF", this->name+4, 2) == 0) {
+ printf("\"PFK%s\" },\n", Ph->name[i]+4+2);
+ } else {
+ printf("\"%s\" },\n", Ph->name[i]+4);