scanjpr/Windows/JprParseMain.cpp
// Looks in the .java file for the package statement,
// and verifies that it matches the path given by pkgs.
Looks in the .java file for the package statement,
and verifies that it matches the path given by pkgs.
Looks in the . java file for the package statement and verifies that it matches the path given by pkgs .
static bool is_of_pkg(string file, vector<string> &pkgs, bool dflt)
{
    vector<string> file_pkgs;
    if (get_package(file, file_pkgs)) {
	if (pkgs.size() != file_pkgs.size()) {
	    return false;
	}
	else {
	    vector<string>::iterator iter;
	    vector<string>::iterator file_iter = file_pkgs.begin();
	    for (iter = pkgs.begin(); iter != pkgs.end();  ++iter, ++file_iter) {
		if (_stricmp(iter->c_str(), file_iter->c_str()) != 0) {
		    return false;
		}
	    }
	    return true;
	}
    }
    else {
	return dflt;
    }
}
static bool is_of_pkg ( string file , vector < string > & pkgs , bool dflt ) { vector < string > file_pkgs ; if ( get_package ( file , file_pkgs ) ) { if ( pkgs . size ( ) != file_pkgs . size ( ) ) { return false ; } else { vector < string > :: iterator iter ; vector < string > :: iterator file_iter = file_pkgs . begin ( ) ; for ( iter = pkgs . begin ( ) ; iter != pkgs . end ( ) ; ++ iter , ++ file_iter ) { if ( _stricmp ( iter -> c_str ( ) , file_iter -> c_str ( ) ) != 0 ) { return false ; } } return true ; } } else { return dflt ; } }
Looks in the .java file for the package statement,
and verifies that it matches the path given by pkgs.
Looks in the . java file for the package statement and verifies that it matches the path given by pkgs .