ref: 75f3f829eaa2e72575b9e5c802b290a17d837e54
dir: /src/libmach/getindex.c/
#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);
}