scc

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

getindex.c (306B)


      1 #include <stdio.h>
      2 
      3 #include <scc/mach.h>
      4 
      5 #include "libmach.h"
      6 
      7 extern getidxfun_t getidxv[];
      8 
      9 int
     10 getindex(int type, long *nsyms, Objsymdef **head, FILE *fp)
     11 {
     12 	int fmt;
     13 	getidxfun_t fn;
     14 
     15 	fmt = FORMAT(type);
     16 	if (fmt >= NFORMATS)
     17 		return -1;
     18 	fn = getidxv[fmt];
     19 	return (*fn)(type, nsyms, head, fp);
     20 }