| 98 | } |
| 99 | |
| 100 | int |
| 101 | collect_obj_classes(char ilets[], struct obj *otmp, boolean here, |
| 102 | boolean (*filter)(OBJ_P), int *itemcount) |
| 103 | { |
| 104 | int iletct = 0; |
| 105 | char c; |
| 106 | |
| 107 | *itemcount = 0; |
| 108 | ilets[iletct] = '\0'; /* terminate ilets so that strchr() will work */ |
| 109 | while (otmp) { |
| 110 | c = def_oc_syms[(int) otmp->oclass].sym; |
| 111 | if (!strchr(ilets, c) && (!filter || (*filter)(otmp))) |
| 112 | ilets[iletct++] = c, ilets[iletct] = '\0'; |
| 113 | *itemcount += 1; |
| 114 | otmp = here ? otmp->nexthere : otmp->nobj; |
| 115 | } |
| 116 | |
| 117 | return iletct; |
| 118 | } |
| 119 | |
| 120 | /* |
| 121 | * For menustyle:Traditional and menustyle:Combination. |
no outgoing calls
no test coverage detected