Browse Source

Restored ReadCString/WriteCString.

Mark Sibly 9 years ago
parent
commit
78798086cf
2 changed files with 6 additions and 4 deletions
  1. 2 0
      VERSIONS.TXT
  2. 4 4
      modules/std/stream/stream.monkey2

+ 2 - 0
VERSIONS.TXT

@@ -1,4 +1,6 @@
 
 
+Restored Stream.ReadCString and Stream.WriteCString.
+
 ***** v1.0.91 *****
 ***** v1.0.91 *****
 
 
 Made reflection optional. You now need to #Import "<reflection>" to activate it, and the first build of an app will be SLOW. Reflection is still 'all or nothing' for now.
 Made reflection optional. You now need to #Import "<reflection>" to activate it, and the first build of an app will be SLOW. Reflection is still 'all or nothing' for now.

+ 4 - 4
modules/std/stream/stream.monkey2

@@ -314,12 +314,12 @@ Class Stream
 		Return str
 		Return str
 	End
 	End
 	
 	
-	#rem monkeydoc Reads a null terminated string from the stream.
+	#rem monkeydoc Reads a null terminated cstring from the stream.
 	
 	
 	@return the string read.
 	@return the string read.
 	
 	
 	#end
 	#end
-	Method ReadNullTerminatedString:String()
+	Method ReadCString:String()
 		Local buf:=New Stack<Byte>
 		Local buf:=New Stack<Byte>
 		While Not Eof
 		While Not Eof
 			Local chr:=ReadByte()
 			Local chr:=ReadByte()
@@ -451,12 +451,12 @@ Class Stream
 		WriteString( str )
 		WriteString( str )
 	End
 	End
 	
 	
-	#rem monkeydoc Writes a null terminate string to the stream.
+	#rem monkeydoc Writes a null terminated cstring to the stream.
 	
 	
 	@param str The string to write.
 	@param str The string to write.
 	
 	
 	#end
 	#end
-	Method WriteNullTerminatedString( str:String )
+	Method WriteCString( str:String )
 		WriteString( str )
 		WriteString( str )
 		WriteByte( 0 )
 		WriteByte( 0 )
 	End
 	End