25 std::vector<ALIFileIn*>::const_iterator vfcite;
51 std::ifstream*
fin =
new std::ifstream(filename);
61 if( !fin->is_open()) {
62 std::cerr <<
"!!!! Input file does not exist: " << filename << std::endl;
77 std::cerr <<
"Error: file not opened yet " << filename << std::endl;
97 ALIint wsiz = wordlist.size();
99 for (ii = 0; ii < wsiz; ii++) {
104 const ALIint NMAXLIN = 1000;
108 for( ii = 0; ii < NMAXLIN; ii++) ltemp[ii] =
' ';
112 for ( ii=0; ii < NMAXLIN; ii++) {
113 if ( ltemp[ii] ==
'\0' )
break;
115 if ( ii == NMAXLIN-1 ) {
117 std::cerr <<
"!!!! line longer than " << NMAXLIN <<
" characters" <<
118 std::endl <<
" please split it putting a '\\' at the end of line" << std::endl;
130 std::istrstream istr_line(ltemp);
137 if( *tt !=
' ' && *(tt) !=
'\0' ) {
141 }
else if( *(tt-1) ==
' ' || *(tt-1) ==
'\015' || *(tt-1) ==
'\t') {
147 }
while(*tt !=
'\0' && stemp.length()!=0);
149 if(stempt.length() == 0) NoWords = 0;
153 for( ii=0; ii < NoWords; ii++) {
156 if ( stemp.length() == 0 )
break;
159 if ( comment == 0 ) {
161 }
else if ( comment > 0 ) {
162 stemp = stemp.substr( 0, comment );
163 wordlist.push_back(stemp);
167 wordlist.push_back(stemp);
177 if ( wordlist.size() != 0 ) {
178 if( (*(wordlist.end()-1)).compare(
"\\") == 0 ) {
192 if( wordlist[0] ==
"#include" ) {
193 if( wordlist.size() != 2 ) {
195 std::cerr <<
"'#include' should have as second argument the filename " << std::endl;
std::vector< ALIstring > theNames
static ALIFileIn & getInstance(const ALIstring &name)
static std::vector< ALIFileIn * > theInstances
static PFTauRenderPlugin instance
static ALIFileIn & getInstanceOpened(const ALIstring &name)
std::vector< ALIint > theLineNo
ALIint getWordsInLine(std::vector< ALIstring > &wl)
void openNewFile(const char *filename)
std::vector< std::ifstream * > theFiles