scc

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

namindex.c (249B)


      1 #include <stdio.h>
      2 
      3 #include <scc/mach.h>
      4 
      5 #include "libmach.h"
      6 
      7 extern namidxfun_t namidxv[];
      8 
      9 char *
     10 namindex(int type)
     11 {
     12 	int fmt;
     13 	namidxfun_t fn;
     14 
     15 	fmt = FORMAT(type);
     16 	if (fmt >= NFORMATS)
     17 		return NULL;
     18 	fn = namidxv[fmt];
     19 	return (*fn)();
     20 }