objtype.c - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
       objtype.c (248B)
       ---
            1 #include <stdio.h>
            2 
            3 #include <scc/mach.h>
            4 
            5 #include "libmach.h"
            6 
            7 int
            8 objtype(char *name)
            9 {
           10         int t;
           11         Objops **opsp, *ops;
           12 
           13         for (opsp = objops; ops = *opsp; ++opsp) {
           14                 t = (*ops->type)(name);
           15                 if (t < 0)
           16                         continue;
           17                 return t;
           18         }
           19 
           20         return -1;
           21 }