scc

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

objpos.c (209B)


      1 #include <stdio.h>
      2 
      3 #include <scc/mach.h>
      4 
      5 #include "libmach.h"
      6 
      7 int
      8 objpos(Obj *obj, FILE *fp, long pos)
      9 {
     10 	if (fsetpos(fp, &obj->pos))
     11 		return 0;
     12 	if (fseek(fp, pos, SEEK_CUR) < 0)
     13 		return 0;
     14 	return 1;
     15 }