mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 19:50:06 +00:00 
			
		
		
		
	Text product message fixes to support IEM
This commit is contained in:
		
							parent
							
								
									2720ad6a38
								
							
						
					
					
						commit
						e6cfef06a7
					
				
					 2 changed files with 34 additions and 28 deletions
				
			
		|  | @ -1,8 +1,7 @@ | |||
| #include <scwx/util/streams.hpp> | ||||
| #include <scwx/common/characters.hpp> | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace util | ||||
| namespace scwx::util | ||||
| { | ||||
| 
 | ||||
| std::istream& getline(std::istream& is, std::string& t) | ||||
|  | @ -17,7 +16,8 @@ std::istream& getline(std::istream& is, std::string& t) | |||
|       int c = sb->sbumpc(); | ||||
|       switch (c) | ||||
|       { | ||||
|       case '\n': return is; | ||||
|       case '\n': | ||||
|          return is; | ||||
| 
 | ||||
|       case '\r': | ||||
|          while (sb->sgetc() == '\r') | ||||
|  | @ -30,6 +30,10 @@ std::istream& getline(std::istream& is, std::string& t) | |||
|          } | ||||
|          return is; | ||||
| 
 | ||||
|       case common::Characters::ETX: | ||||
|          sb->sungetc(); | ||||
|          return is; | ||||
| 
 | ||||
|       case std::streambuf::traits_type::eof(): | ||||
|          if (t.empty()) | ||||
|          { | ||||
|  | @ -37,10 +41,10 @@ std::istream& getline(std::istream& is, std::string& t) | |||
|          } | ||||
|          return is; | ||||
| 
 | ||||
|       default: t += static_cast<char>(c); | ||||
|       default: | ||||
|          t += static_cast<char>(c); | ||||
|       } | ||||
|    } | ||||
| } | ||||
| 
 | ||||
| } // namespace util
 | ||||
| } // namespace scwx
 | ||||
| } // namespace scwx::util
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat