ref: 0a5224e17a101c6b0c1c7eb1e36dc9d3fd8ac120
dir: /src/libmach/setindex.c/
#include <errno.h>
#include <stdio.h>
#include <scc/mach.h>
#include "libmach.h"
int
setindex(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]->setidx)(nsyms, names, offs, fp);
}