ref: d69a87fbbe610e26cc16b25ef694a3d4ec985edd
dir: /src/libmach/forsym.c/
#include <stdio.h>
#include <scc/mach.h>
#include "libmach.h"
int
forsym(Obj *obj, int (*fn)(Objsym *, void *), void *data)
{
int r;
Objsym *sym;
for (sym = obj->head; sym; sym = sym->next) {
r = (*fn)(sym, data);
if (r <= 0)
return r;
}
return 1;
}