16   static const std::string JPP_DIR = getenv(
"JPP_DIR");
 
   26   inline void include(
const std::string& file_name, 
const std::string& target, 
const std::string& path = 
"")
 
   30     ifstream in(file_name.c_str());
 
   36     for (
string buffer; 
getline(in, buffer); ) {
 
   38       const string::size_type ipos = buffer.find(
"\"");
 
   40       if (buffer.find(
"#include") == 0 && ipos != string::npos) {
 
   42         const string source = buffer.substr(ipos + 1, buffer.length() - ipos - 2);
 
   44         if (source.find(target) != string::npos) {
 
   45           cout << ((path.empty() ? file_name : path) + 
" -> " + source) << endl;
 
   49         include(JPP_DIR + 
"/software/" + source, target, ((path.empty() ? file_name : path) + 
" -> " + source));
 
   63 int main(
int argc, 
char **argv)
 
   73     JParser<> zap(
"Auxiliary program to recursively check for include file in Jpp repository.");
 
   75     zap[
'f'] = 
make_field(source,  
"name of source file to be inspected");
 
   76     zap[
'i'] = 
make_field(target,  
"name of include file to be searched");
 
   79     if (zap.
read(argc, argv) != 0)
 
   82   catch(
const exception& error) {
 
   83     FATAL(error.what() << endl);
 
   86   DEBUG(
"JPP_DIR" << 
' ' << JPP_DIR << endl);
 
   88   include(source, target);
 
General purpose messaging.
 
#define DEBUG(A)
Message macros.
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
int read(const int argc, const char *const argv[])
Parse the program's command line options.
 
int main(int argc, char **argv)
 
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.