scanclrmake/src/idcompiler.cxx
// ==========================================================================
// Check for user override of compiler identification in the compiler
// list prefs.
// Return true if the compiler is identified via overriding.
// If so, id is set with the name of the compiler.
//
Check for user override of compiler identification in the compiler
list prefs.
Return true if the compiler is identified via overriding.
If so, id is set with the name of the compiler.
Check for user override of compiler identification in the compiler list prefs . Return true if the compiler is identified via overriding . If so id is set with the name of the compiler .
bool CompilerIdentifier::userOverride(const string &compiler_name,
			    string &id)
{
    string cmpl_pat = "(^|/)";
    cmpl_pat.append(compiler_name);
    cmpl_pat.append(":");
    Regexp cmpl_re(cmpl_pat.c_str());
    string parser_name = "";
    bool have_parser = false;
    if (   compilerListPrefs
        && cmpl_re.Match(compilerListPrefs, strlen(compilerListPrefs), 0) >= 0) {
	int parser_start = cmpl_re.EndOfMatch(0); 
	const char *p = strchr(compilerListPrefs + parser_start, '/');
	int parser_end = (p == NULL ? strlen(compilerListPrefs) : p - compilerListPrefs);
	parser_name = string(compilerListPrefs + parser_start, parser_end - parser_start);
	have_parser = true;
    }
    id = parser_name;
    return have_parser;
}
bool CompilerIdentifier :: userOverride ( const string & compiler_name , string & id ) { string cmpl_pat = " " ; cmpl_pat . append ( compiler_name ) ; cmpl_pat . append ( " " ) ; Regexp cmpl_re ( cmpl_pat . c_str ( ) ) ; string parser_name = " " ; bool have_parser = false ; if ( compilerListPrefs && cmpl_re . Match ( compilerListPrefs , strlen ( compilerListPrefs ) , 0 ) >= 0 ) { int parser_start = cmpl_re . EndOfMatch ( 0 ) ; const char * p = strchr ( compilerListPrefs + parser_start , ' ' ) ; int parser_end = ( p == NULL ? strlen ( compilerListPrefs ) : p - compilerListPrefs ) ; parser_name = string ( compilerListPrefs + parser_start , parser_end - parser_start ) ; have_parser = true ; } id = parser_name ; return have_parser ; }
Check for user override of compiler identification in the compiler
list prefs.
Check for user override of compiler identification in the compiler list prefs .
// Translate the compiler_name to a parser, e.g. "ntcl". // The compiler list has the form: // <comp1>:<par1>/<comp2>:<par2>/.../<compn>:</parn> // Use the found compiler name to search the compiler list which came from // the command line. // the colon