model_server/xref/src/remove_modules.cxx
// flag to indicate whether we have displayed title yet
flag to indicate whether we have displayed title yet
flag to indicate whether we have displayed title yet
ForEachS(sym, arr) {
	if (sym->get_kind()==DD_MODULE && sym.get_has_def_file()) {
	    sym.get_name(logicalname);
#ifdef _PSET_DEBUG
	    cerr << "(Name is " << logicalname.str() << ")" << endl;
#endif
	    pr->ln_to_fn(logicalname, physicalname);  
	    if (physicalname.length()) {
		if (fileCache_access(physicalname, R_OK)) {
		    if (!title) {
			msg("Removing modules for files that do not exist:\n") << eom;
			title = 1;
		    }
		    char *pset_name = (char *)get_paraset_file_name(physicalname, pr);
		    if(pset_name)
			save_pset_name(pset_name);
		    msg("   $1\n") << (char*)physicalname << eom;
		    Xr->remove_module(logicalname);
		}
	    } else {
		if (!title) {
		    msg("Removing modules for files that do not exist:\n") << eom;
		    title = 1;
		}
		char *pset_name = (char *)get_paraset_file_name(physicalname, pr);
		if(pset_name)
		    save_pset_name(pset_name);
		msg("Error: File $1 not in project\n") << (char*)logicalname << eom;
		Xr->remove_module(logicalname);
	    }
	}
    }
ForEachS ( sym , arr ) { if ( sym -> get_kind ( ) == DD_MODULE && sym . get_has_def_file ( ) ) { sym . get_name ( logicalname ) ; #ifdef _PSET_DEBUG cerr << " " << logicalname . str ( ) << " " << endl ; #endif pr -> ln_to_fn ( logicalname , physicalname ) ; if ( physicalname . length ( ) ) { if ( fileCache_access ( physicalname , R_OK ) ) { if ( ! title ) { msg ( " \n " ) << eom ; title = 1 ; } char * pset_name = ( char * ) get_paraset_file_name ( physicalname , pr ) ; if ( pset_name ) save_pset_name ( pset_name ) ; msg ( " \n " ) << ( char * ) physicalname << eom ; Xr -> remove_module ( logicalname ) ; } } else { if ( ! title ) { msg ( " \n " ) << eom ; title = 1 ; } char * pset_name = ( char * ) get_paraset_file_name ( physicalname , pr ) ; if ( pset_name ) save_pset_name ( pset_name ) ; msg ( " \n " ) << ( char * ) logicalname << eom ; Xr -> remove_module ( logicalname ) ; } } }
flag to indicate whether we have displayed title yet
flag to indicate whether we have displayed title yet
// convert to physical // file belongs to this project