shithub: scc

ref: b843da74b79d585a30bd2b3f13e7c63d105baf94
dir: /src/libmach/readobj.c/

View raw version
#include <stdio.h>

#include <scc/mach.h>

#include "libmach.h"

int
readobj(Obj *obj, FILE *fp)
{
	long off;

	if ((off = ftell(fp)) == EOF)
		return -1;
	obj->pos = off;

	return (*obj->ops->read)(obj, fp);
}