Home
       getindex.c - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
       getindex.c (310B)
       ---
            1 #include <errno.h>
            2 #include <stdio.h>
            3 
            4 #include <scc/mach.h>
            5 
            6 #include "libmach.h"
            7 
            8 int
            9 getindex(int type, long *nsyms, char ***names, long **offs, FILE *fp)
           10 {
           11         int fmt;
           12 
           13         fmt = FORMAT(type);
           14         if (fmt >= NFORMATS) {
           15                 errno = ERANGE;
           16                 return -1;
           17         }
           18 
           19         return (*objops[fmt]->getidx)(nsyms, names, offs, fp);
           20 }
           21