]> git.tdb.fi Git - gldbg.git/blob - source/functions.c
Replace per-file license notices with License.txt
[gldbg.git] / source / functions.c
1 #include <string.h>
2 #include "functions.h"
3
4 #include "gensrc/functions.table"
5
6 const char *get_function_name(unsigned short func)
7 {
8         if(func<N_FUNCS)
9                 return func_names[func];
10
11         return NULL;
12 }
13
14 unsigned short get_function(const char *name)
15 {
16         unsigned i;
17         for(i=1; i<N_FUNCS; ++i)
18                 if(!strcmp(func_names[i], name))
19                         return i;
20
21         return 0;
22 }