shithub: scc

ref: 2c7a34994ed9fcb63465f8e86de7b70b3a48f6f5
dir: /src/libmach/forsym.c/

View raw version
#include <stdio.h>

#include <scc/mach.h>

#include "libmach.h"

int
forsym(Obj *obj, int (*fn)(Objsym *, void *), void *data)
{
	Objsym *sym;

	for (sym = obj->head; sym; sym = sym->next) {
		 if (!(*fn)(sym, data))
			return 0;
	}
	return 1;
}