scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

readobj.c (211B)


      1 #include <stdio.h>
      2 
      3 #include <scc/mach.h>
      4 
      5 #include "libmach.h"
      6 
      7 int
      8 readobj(Obj *obj, FILE *fp)
      9 {
     10 	long off;
     11 
     12 	if ((off = ftell(fp)) == EOF)
     13 		return -1;
     14 	obj->pos = off;
     15 
     16 	return (*obj->ops->read)(obj, fp);
     17 }