scandsp/src/dspparser.cxx
// ===========================================================================
// Process the # ADD statement, which at least in some cases adds includes.
// # ADD is not yet completely understood.  From an OnDisplay example, it's
// known not to simply replace the previous value.  Another example led me
// to wait before seeking to combine the old with the new, but it has to be
// attempted.
//
// Now a couple of Foxboro examples in which the kind of merging attempted
// above is not appropriate, because the updates should just be added to the
// original.  I may have been misled on the OnDisplay, by another bug in 
// preprocessing, causing too many # ADD's to be interpreted.
//
Process the # ADD statement, which at least in some cases adds includes.
ADD is not yet completely understood.  From an OnDisplay example, it's
known not to simply replace the previous value.  Another example led me
to wait before seeking to combine the old with the new, but it has to be
attempted.

Now a couple of Foxboro examples in which the kind of merging attempted
above is not appropriate, because the updates should just be added to the
original.  I may have been misled on the OnDisplay, by another bug in
preprocessing, causing too many # ADD's to be interpreted.
Process the # ADD statement which at least in some cases adds includes . ADD is not yet completely understood . From an OnDisplay example it ' s known not to simply replace the previous value . Another example led me to wait before seeking to combine the old with the new but it has to be attempted . Now a couple of Foxboro examples in which the kind of merging attempted above is not appropriate because the updates should just be added to the original . I may have been misled on the OnDisplay by another bug in preprocessing causing too many # ADD ' s to be interpreted .
void DSPParser::addToEnvironment(DSPParser::an_env_map &env, const string &key, const string &value) {
    string updateVal = value;
    if (key == ";CPP") {
	noteOptionIncludeDirs(value);
	DSPParser::an_env_map::iterator it = env.find(key);
	if (it != env.end()) {
	    updateVal = (*it).second;
	    ostream &mos = msg("Updating from $1 >>>>>>>>>>>>>>> $2", normal_sev) << updateVal << eoarg;
	    updateVal.append(" ");
	    updateVal.append(value);
	    mos << updateVal << eoarg << eom;
	}
    }
    updateEnvironment(env, key, updateVal);
}
void DSPParser :: addToEnvironment ( DSPParser :: an_env_map & env , const string & key , const string & value ) { string updateVal = value ; if ( key == " " ) { noteOptionIncludeDirs ( value ) ; DSPParser :: an_env_map :: iterator it = env . find ( key ) ; if ( it != env . end ( ) ) { updateVal = ( * it ) . second ; ostream & mos = msg ( " " , normal_sev ) << updateVal << eoarg ; updateVal . append ( " " ) ; updateVal . append ( value ) ; mos << updateVal << eoarg << eom ; } } updateEnvironment ( env , key , updateVal ) ; }
Process the # ADD statement, which at least in some cases adds includes.
Process the # ADD statement which at least in some cases adds includes .
// Append all new options.