--- /dev/null
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2010 Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#include <string.h>
+#include "functions.h"
+
+#include "gensrc/functions.table"
+
+const char *get_function_name(unsigned short func)
+{
+ if(func<N_FUNCS)
+ return func_names[func];
+
+ return NULL;
+}
+
+unsigned short get_function(const char *name)
+{
+ unsigned i;
+ for(i=1; i<N_FUNCS; ++i)
+ if(!strcmp(func_names[i], name))
+ return i;
+
+ return 0;
+}