src/utils.c
@@ -8,6 +8,33 @@ #include "utils.h" char *basecfg(char *cfgfile) { char *c = cfgfile; char *next; while((next = strchr(c, '/'))) { c = next+1; } c = copy_string(c); next = strchr(c, '_'); if (next) *next = 0; next = strchr(c, '.'); if (next) *next = 0; return c; } int alphanum_to_int(char c) { return (c < 58) ? c - 48 : c-87; } char int_to_alphanum(int i) { if (i == 36) return '.'; return (i < 10) ? i + 48 : i + 87; } void pm(int M, int N, float *A) { int i,j;