full line comments skipped earlier: commens allowed before the first secion
This commit is contained in:
		
							parent
							
								
									f151fa56a7
								
							
						
					
					
						commit
						45abdd4c47
					
				| 
						 | 
					@ -107,6 +107,9 @@ Config :: addLine (  const char    * line )          throw ( Exception )
 | 
				
			||||||
        str.erase( ix + 1);
 | 
					        str.erase( ix + 1);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if ( !str.length() ) {
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    if ( str[0] == '[' && str[str.size()-1] == ']' ) {
 | 
					    if ( str[0] == '[' && str[str.size()-1] == ']' ) {
 | 
				
			||||||
        // a new section starts
 | 
					        // a new section starts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -161,6 +164,9 @@ Config :: read (    istream &     is  )                 throw ( Exception )
 | 
				
			||||||
  $Source$
 | 
					  $Source$
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $Log$
 | 
					  $Log$
 | 
				
			||||||
 | 
					  Revision 1.5  2001/09/09 11:26:43  darkeye
 | 
				
			||||||
 | 
					  full line comments skipped earlier: commens allowed before the first secion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Revision 1.4  2001/09/05 20:11:15  darkeye
 | 
					  Revision 1.4  2001/09/05 20:11:15  darkeye
 | 
				
			||||||
  removed dependency on locally stored SGI STL header files
 | 
					  removed dependency on locally stored SGI STL header files
 | 
				
			||||||
  now compiler-supplied C++ library STL header files are used
 | 
					  now compiler-supplied C++ library STL header files are used
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -140,6 +140,9 @@ ConfigSection :: addLine (  const char    * line )          throw ( Exception )
 | 
				
			||||||
    if ( (ix = str.find_last_not_of( ' ')) != str.npos ) {
 | 
					    if ( (ix = str.find_last_not_of( ' ')) != str.npos ) {
 | 
				
			||||||
        str.erase( ix + 1);
 | 
					        str.erase( ix + 1);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    if ( !str.length() ) {
 | 
				
			||||||
 | 
					        return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* find the '=' delimiter between key and value */
 | 
					    /* find the '=' delimiter between key and value */
 | 
				
			||||||
    if ( (ix = str.find( '=')) == str.npos ) {
 | 
					    if ( (ix = str.find( '=')) == str.npos ) {
 | 
				
			||||||
| 
						 | 
					@ -168,6 +171,9 @@ ConfigSection :: addLine (  const char    * line )          throw ( Exception )
 | 
				
			||||||
  $Source$
 | 
					  $Source$
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  $Log$
 | 
					  $Log$
 | 
				
			||||||
 | 
					  Revision 1.6  2001/09/09 11:26:43  darkeye
 | 
				
			||||||
 | 
					  full line comments skipped earlier: commens allowed before the first secion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Revision 1.5  2001/09/05 20:11:15  darkeye
 | 
					  Revision 1.5  2001/09/05 20:11:15  darkeye
 | 
				
			||||||
  removed dependency on locally stored SGI STL header files
 | 
					  removed dependency on locally stored SGI STL header files
 | 
				
			||||||
  now compiler-supplied C++ library STL header files are used
 | 
					  now compiler-supplied C++ library STL header files are used
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue