scc

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

coff32new.c (269B)


      1 #include <stdio.h>
      2 #include <stdlib.h>
      3 
      4 #include <scc/mach.h>
      5 
      6 #include "../libmach.h"
      7 #include "coff32.h"
      8 
      9 int
     10 coff32new(Obj *obj)
     11 {
     12 	struct coff32 *coff;
     13 
     14 	if ((coff = calloc(1, sizeof(*coff))) == NULL)
     15 		return -1;
     16 	obj->data = coff;
     17 	obj->index = "/";
     18 	return 0;
     19 }