shithub: scc

ref: a901b27da57ae3df5a05f29b958104a55a10282b
dir: /src/libmach/getindex.c/

View raw version
#include <errno.h>
#include <stdio.h>

#include <scc/mach.h>

#include "libmach.h"

int
getindex(int type, long *nsyms, char ***names, long **offs, FILE *fp)
{
	int fmt;

	fmt = FORMAT(type);
	if (fmt >= NFORMATS) {
		errno = ERANGE;
		return -1;
	}

	return (*objops[fmt]->getidx)(nsyms, names, offs, fp);
}