# | Line 167 | Line 167 | extern int | |
---|---|---|
167 | lu_doall( /* loop through all valid table entries */ | |
168 | register LUTAB *tbl, | |
169 | //int (*f)(LUENT *) | |
170 | < | lut_doallf_t *f |
170 | > | lut_doallf_t *f, |
171 | > | void *p |
172 | ) | |
173 | { | |
174 | int rval = 0; | |
# | Line 175 | Line 176 | lu_doall( /* loop through all valid table entries */ | |
176 | ||
177 | for (tp = tbl->tabl + tbl->tsiz; tp-- > tbl->tabl; ) | |
178 | if (tp->data != NULL) { | |
179 | < | if (f != NULL) |
180 | < | rval += (*f)(tp); |
181 | < | else |
179 | > | if (f != NULL) { |
180 | > | int r = (*f)(tp, p); |
181 | > | if (r < 0) |
182 | > | return(-1); |
183 | > | rval += r; |
184 | > | } else |
185 | rval++; | |
186 | } | |
187 | return(rval); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |