shithub: scc

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