scandsp/src/dspparser.cxx
// ===========================================================================
// Scan the string containing a file path for an extra path prefix, 
// e.g. C:\WINNT\Profiles\sturner.003\Desktop\F:\devstudio\vc\include
// becomes f:\devstudio\vc\include.
//
Scan the string containing a file path for an extra path prefix,
e.g.
Scan the string containing a file path for an extra path prefix e . g .
void DSPParser::dropExtraPrefix(string &s)
{
    const char *p = s.c_str();
    const char *found = NULL;
    for (p = s.c_str(); *p != '\0'; p += 1) {
	if (p[0] == '\\' && p[1] != '\0' && p[2] == ':') {
	    found = p + 1;
	}
    }
    if (found != NULL) {
	string temp = found;
	s = temp;
    }
}
void DSPParser :: dropExtraPrefix ( string & s ) { const char * p = s . c_str ( ) ; const char * found = NULL ; for ( p = s . c_str ( ) ; * p != ' \0 ' ; p += 1 ) { if ( p [ 0 ] == ' \\ ' && p [ 1 ] != ' \0 ' && p [ 2 ] == ' ' ) { found = p + 1 ; } } if ( found != NULL ) { string temp = found ; s = temp ; } }
Scan the string containing a file path for an extra path prefix,
e.g.
Scan the string containing a file path for an extra path prefix e . g .
// Scan the contents of s for the last drive letter prefix, // preceded by \  // Drop everything up to 'found'.