Neil Hodgson
unread,Mar 29, 2017, 5:59:42 AM3/29/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Scintilla mailing list
In 2015, a LargePos branch was made to experiment with documents larger that 2GB. One part of this was using a typedef Sci::Position for positions and line numbers within Scintilla. This appears to me to have value separate from large document support as it makes it easier to understand which elements refer to positions. Adding a Sci::Line type separately for line numbers enhances this further.
The attached patch defines both Sci::Position and Sci::Line as int and removes the old Position type from Document.h. It redefines variables of type int (and a couple of unsigned int) to be Sci::Position when they represent document byte or character positions, lengths of text in bytes or characters or similar. Variables that represent lines or numbers of lines or similar become Sci::Line. Don’t worry, I haven’t become a Pascal zealot as C++ typedefs don’t really allow strong numeric subtypes. This should be quite safe as, apart from a couple of unsigned ints becoming signed ints, the types have not changed - they’ve merely been given new names.
The patch is very large and there is a good chance I have made mistakes.
This change may be used for later work on large documents but that is uncertain.
Neil