model_server/driver_mb/src/disbuild.h.cxx
// chops all slashes at the end, returns: the slash - delemeter 
chops all slashes at the end, returns: the slash - delemeter
chops all slashes at the end returns : the slash - delemeter
void chop_slashes (char *val, char& del)
{
    if ( val && val[0] ) {
	del = '/';
	int state = INIT;
	for (int i = strlen(val) - 1 ; i >= 0 && state < BOTH; i --) {
	    char c = val[i];
	    switch (state) {
	    case INIT:
		if (c == '/' || c == '\\') {
		    state = SLASH;
		    del = c;
		    val[i] = '\0';
		} else
		    state = CHAR;
		break;
	    case SLASH:
		if (c == '/' || c == '\\') {
		    val[i] = '\0';
		} else
		    state = BOTH;
		break;
	    case CHAR:
		if (c == '/' || c == '\\') {
		    del = c;
		    state = BOTH;
		}
		break;
	    case BOTH:
		break;
	    }
	}
    } 
}
void chop_slashes ( char * val , char & del ) { if ( val && val [ 0 ] ) { del = ' ' ; int state = INIT ; for ( int i = strlen ( val ) - 1 ; i >= 0 && state < BOTH ; i -- ) { char c = val [ i ] ; switch ( state ) { case INIT : if ( c == ' ' || c == ' \\ ' ) { state = SLASH ; del = c ; val [ i ] = ' \0 ' ; } else state = CHAR ; break ; case SLASH : if ( c == ' ' || c == ' \\ ' ) { val [ i ] = ' \0 ' ; } else state = BOTH ; break ; case CHAR : if ( c == ' ' || c == ' \\ ' ) { del = c ; state = BOTH ; } break ; case BOTH : break ; } } } }
chops all slashes at the end, returns: the slash - delemeter
chops all slashes at the end returns : the slash - delemeter
// find first '/' or '\\' in the tmp directory name, in order 