ref: e12a1007fa3b9df81e20951314a1fc93f0707382
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; }