-
- //check if a .Gate directory can be found
- if (!getenv("GC_DOT_GATE_DIR")) {
- cout<<"Environment variable GC_DOT_GATE_DIR not set !"<<endl;
- exit(1);
- }
- m_dir=getenv("GC_DOT_GATE_DIR");
- if (m_dir.substr(m_dir.length()-1,m_dir.length())=="/") m_dir=m_dir+".Gate/";
- else m_dir=m_dir+"/.Gate/";
- ifstream dirstream(m_dir.c_str());
- if (!dirstream) {
- cout<<"Failed to open .Gate directory"<<endl;
- exit(1);
- }
- dirstream.close();
-