rem: ext = strrchr(file, '.');
add: start = strrchr(file, '/'); if (start == NULL) { start = file; }  ext = strrchr(start, '.');
context: Ns_GetMimeType(char *file){    char          *ext;    Ns_DString     ds;    Tcl_HashEntry *hePtr;    ext = strrchr(file, '.');    if (ext == NULL) {	return noextType;    }    Ns_DStringInit(&ds);    ext = LowerDString(&ds, ext);    hePtr = Tcl_FindHashEntry(&types, ext);    if (hePtr == NULL) {	return defaultType;    }    return Tcl_GetHashValue(hePtr);}