Joseph Redmon
2015-03-06 2313a8eb54d703323279c0fb9b2c9c52d26f0cf9
src/utils.c
@@ -9,6 +9,22 @@
#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;