scanclrmake/src/crparser.cxx
// ===========================================================================
// Track the host name.  Warn if it's not the same as the current host.
//
Track the host name.  Warn if it's not the same as the current host.
Track the host name . Warn if it ' s not the same as the current host .
void CRParser::trackHost(ParseLine &line)
{
    if (currentSection == intro_sct) {
	const char *l = line.getLine().c_str();
	Regexp hst("^ *(H|h)ost (\".*\"|[^ \"]*)( |$)");
	if (hst.Match(l, strlen(l), 0) >= 0) {
	    int bom = hst.BeginningOfMatch(2);
	    const char *b = l + bom;
	    int len = hst.EndOfMatch(2) - bom;
            if (l[bom] == '"') {
	        b -= 1;
	        len -= 1;
	    }
	    string t(b, len);
    	    char *buf = new char[len + 30];
            scanclrmake::gethostname(buf, len + 29);
	    if (t != string(buf)) {
		msg("Host of ClearMake build, $1, differs from current host $2.\n",
                    warning_sev) << t << eoarg << buf << eoarg << eom;
	    }
	    delete [] buf;
	}
    }
}
void CRParser :: trackHost ( ParseLine & line ) { if ( currentSection == intro_sct ) { const char * l = line . getLine ( ) . c_str ( ) ; Regexp hst ( " \" \" \" " ) ; if ( hst . Match ( l , strlen ( l ) , 0 ) >= 0 ) { int bom = hst . BeginningOfMatch ( 2 ) ; const char * b = l + bom ; int len = hst . EndOfMatch ( 2 ) - bom ; if ( l [ bom ] == ' ' ) { b -= 1 ; len -= 1 ; } string t ( b , len ) ; char * buf = new char [ len + 30 ] ; scanclrmake :: gethostname ( buf , len + 29 ) ; if ( t != string ( buf ) ) { msg ( " \n " , warning_sev ) << t << eoarg << buf << eoarg << eom ; } delete [ ] buf ; } } }
Track the host name.
Track the host name .