io.cpp.rej

mud++0.33/src/io.cpp.rej · 1.2 KB

From the archive mud++0.33.tar.gz

Download the archive   « Back to the archive contents

***************
*** 95,107 ****
  
  	start = ptr;
  
- 	if ( !isdigit( *ptr) && *ptr != '-' && *ptr != '+' )
  	{
  		error("Input::getfloat() - non-numeric character");
  		return 0;
  	}
  
- 	while( isdigit( getch() ) || *(ptr-1) != '.')
  		;
  
  	if( !eof() )
--- 95,107 ----
  
  	start = ptr;
  
+ 	if ( !isdigit( *ptr) && (*ptr != '-') && (*ptr != '+') )
  	{
  		error("Input::getfloat() - non-numeric character");
  		return 0;
  	}
  
+ 	while( isdigit( getch() ) || *(ptr-1) == '.')
  		;
  
  	if( !eof() )
***************
*** 569,590 ****
  	active = true;
  }
  
  void OutputFile::close()
  {
  	if ( fd == -1 )
  		return;
  	if ( !systemfd )
  		::close(fd);
  	active = false;
- }
- 
- 
- void OutputFile::flush()
- {
- 	if ( ptr == buf )
- 		return;
- 	::write( fd, buf, ptr - buf );
- 	ptr = buf;
  }
  
  void OutputFile::largewrite( const void *x, size_t len )
--- 569,590 ----
  	active = true;
  }
  
+ void OutputFile::flush()
+ {
+ 	if ( ptr == buf )
+ 		return;
+ 	::write( fd, buf, ptr - buf );
+ 	ptr = buf;
+ }
+ 
  void OutputFile::close()
  {
+ 	flush();
  	if ( fd == -1 )
  		return;
  	if ( !systemfd )
  		::close(fd);
  	active = false;
  }
  
  void OutputFile::largewrite( const void *x, size_t len )

Site Stats

Snippets: 1791
Codebases: 571