illegal_slash(const char *name)
{
    if (name[0] == NUL)
	return FALSE;	    // no file name is not illegal
    if (name[strlen(name) - 1] != '/')
	return FALSE;	    // no trailing slash
    if (mch_isdir((char_u *)name))
	return FALSE;	    // trailing slash for a directory
    return TRUE;
}
illegal_slash(const char *name)
{
    if (name[0] == NUL)
	return FALSE;	     
    if (name[strlen(name) - 1] != '/')
	return FALSE;	     
    if (mch_isdir((char_u *)name))
	return FALSE;	     
    return TRUE;
}