scc

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

coff32type.c (271B)


      1 #include <stdio.h>
      2 #include <string.h>
      3 
      4 #include <scc/mach.h>
      5 
      6 #include "../libmach.h"
      7 #include "coff32.h"
      8 
      9 int
     10 coff32type(char *name)
     11 {
     12 	struct arch *ap;
     13 
     14 	for (ap = coff32archs; ap->name; ap++) {
     15 		if (strcmp(ap->name, name) == 0)
     16 			return ap->type;
     17 	}
     18 
     19 	return -1;
     20 }