src/log.c
static char *clean_name(const char *name, size_t len, char *namebuf, size_t buflen)
{
    char *p = namebuf;
    char *start = namebuf;
    if (buflen <= len)
        len = buflen-1;
    strncpy(namebuf, name, len);
    namebuf[len] = '\0';
    while ((p = strchr(start, '/')))
        start = p+1;
    if ((p = strrchr(start, '.')))
        *p = '\0';
    return start;
}
/** cleans a loglevel name from leading paths and suffixes */
cleans a loglevel name from leading paths and suffixes
cleans a loglevel name from leading paths and suffixes
static char *clean_name(const char *name, size_t len, char *namebuf, size_t buflen)
{
    char *p = namebuf;
    char *start = namebuf;
    if (buflen <= len)
        len = buflen-1;
    strncpy(namebuf, name, len);
    namebuf[len] = '\0';
    while ((p = strchr(start, '/')))
        start = p+1;
    if ((p = strrchr(start, '.')))
        *p = '\0';
    return start;
}
static char * clean_name ( const char * name , size_t len , char * namebuf , size_t buflen ) { char * p = namebuf ; char * start = namebuf ; if ( buflen <= len ) len = buflen - 1 ; strncpy ( namebuf , name , len ) ; namebuf [ len ] = ' \0 ' ; while ( ( p = strchr ( start , ' ' ) ) ) start = p + 1 ; if ( ( p = strrchr ( start , ' ' ) ) ) * p = ' \0 ' ; return start ; }
cleans a loglevel name from leading paths and suffixes
cleans a loglevel name from leading paths and suffixes