mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Split commands into different files
This commit is contained in:
16
src/utils.c
16
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;
|
||||
|
Reference in New Issue
Block a user