scanclrmake/src/crparser.cxx
// ==========================================================================
// The extension of the source file is OK if it's anything that we've ever
// heard is used with Code Rover.
//
The extension of the source file is OK if it's anything that we've ever
heard is used with Code Rover.
The extension of the source file is OK if it ' s anything that we ' ve ever heard is used with Code Rover .
bool CRParser::extensionOK(const string &file)
{
    Regexp extx("\\.([^\\./\\\\]*)$");
    string ext;
    if (extx.Match(file.c_str(), file.size(), 0) >= 0) {
	int bom = extx.BeginningOfMatch(1);
	int len = extx.EndOfMatch(1) - bom;
	ext = file.substr(bom, len);
    }
    bool ok = extOK(ext);
    if (!ok && !checkExtension) {
	printf("allowing unrecognized extension \"%s\" in \"%s\".",
		ext.c_str(), file.c_str());
    }
    return ok || !checkExtension;
}
bool CRParser :: extensionOK ( const string & file ) { Regexp extx ( " \\ \\ \\ \\ " ) ; string ext ; if ( extx . Match ( file . c_str ( ) , file . size ( ) , 0 ) >= 0 ) { int bom = extx . BeginningOfMatch ( 1 ) ; int len = extx . EndOfMatch ( 1 ) - bom ; ext = file . substr ( bom , len ) ; } bool ok = extOK ( ext ) ; if ( ! ok && ! checkExtension ) { printf ( " \" \" \" \" " , ext . c_str ( ) , file . c_str ( ) ) ; } return ok || ! checkExtension ; }
The extension of the source file is OK if it's anything that we've ever
heard is used with Code Rover.
The extension of the source file is OK if it ' s anything that we ' ve ever heard is used with Code Rover .
// At the end of a filename, a . followed by an extension which // contains no dot, slash, or backslash.