Some initial work towards making DECRQCRA less wrong#513
Draft
Some initial work towards making DECRQCRA less wrong#513
Conversation
Right now it should correctly compute the checksum for any region of the display that the host has written to completely. If any cells in the DECRQCRA region are erased, then the checksum will be incorrect as erased cells should not be included. Additionally, colour information is not currently included in the checksum - that still needs to be done too. And lastly, the checksum is only valid for the latin1 charset - for other VT420/520 charsets further work will need to be done.
This is required for DECCARA and DECRARA which do not affect erased cells when in stream mode, and also by DECRQCRA which excludes erased cells from the checksum. As it's only the three VT420 control sequences that pay attention to whether a cell is in the erased state or not, this change hasn't been fully rolled out to other emulations which all ignore this attribute and may or may not always clear it appropriately when a cell is written. Mostly its the protected field stuff that may still need further work.
It wasn't checking that the character specified was within the valid range, and it wasn't translating from the currently selected remote character set to the local one. When in UTF-8, no translation is applied and the entire base multilingual plane is allowed. Also adjusted DECERA so that it only erases non-erased cells.
rtolxlat normally masks off the 8th bit if the bytesize is set to 7 bits, but we don't want to do that here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now it should correctly compute the VT420 checksum for any region of the display that the host has written to completely. If any cells in the DECRQCRA region are erased, then the checksum will be incorrect as erased cells should not be included. Additionally, colour information is not currently included in the checksum - that still needs to be done too. And lastly, the checksum is only valid for the latin1 charset - for other VT420/520 charsets further work will need to be done.
So, still to be done: