shithub: scc

ref: 1fc37685fd10a06a75bab2f6a147dd6e810b2b7f
dir: /src/libmach/setindex.c/

View raw version
#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);
}