• Robert Sprowson's avatar
    Switch from ArcEdit style model to clipboard cut & paste model · 99904b10
    Robert Sprowson authored
    The txt library part of RISC_OSLib was essentially contrary to everything Acorn was telling its developers, to use the global clipboard.
    Additionally, support is added for swap case within a selection.
    txt.h:
     Add a new charoption type 'txt_READONLY' to inform txt that the buffer is notionally read only, this is used to supress 'Paste' in the selection menu when appropriate.
     Correct some typos in the comments.
    txt1.h:
     Kill off modula 2 dummy structure member.
    txtar.h:
     Remove unused function export.
    txtfile.h:
     Rename basicimport to be consistent with the text version of the same function. We use 'import' to denote RAM transfers and 'insert' to denote file/scrap transfers throughout.
    txtmisc.h:
     Redundant internal functions removed.
    txtundo.h:
     Add a new undo operation type 't' for swap case, to avoid polluting the undo buffer with an entire copy of the text where only the case changed.
     Kill off modula 2 double pointer requirement.
    txtedit.h:
     Unused structure member 'selectctl' removed.
    txt.c:
     Kill off modula 2 double pointer requirement.
    txtar.c:
     Refactor message despatch with a switch statement so the save/load/open operations are explicitly checked for, in case the application enables other messages.
    txtedit.c:
     Adopt MOVERWRITE, been enabled since 1988 so is probably good to keep.
     Dynamically generate the Select menu by first sending a clipboard request, and fading Paste if no reply comes back.
     Implement changed mouse selection logic.
     Implement different hotkeys and caret navigation.
     Implement copy and paste/replace operations.
     Implement swap case operation.
    txtfile.c:
     Type corrections and function rename admin.
     Implement copy and paste/replace operation for detokenised BASIC.
    txtmisc.c:
     Supporting functions for clipboard added, supporting functions for ArcEdit removed.
    txtscrap.c:
     Make sure the caret is visible for programmatical zero sized selections.
    txtundo.c:
     Allow suspension of undo during known complex operations, such as import via RAM transmit. This was a longstanding bug where the import buffer was grabbed in ~4k chunks (even if only 1 byte was being transferred) which in turn resulted in a +4000 undo insertion and a -3999 removal, which given the default undo buffer is only 5k would result in it failing the reversibility test, so no undo was possible.
     Now, during a RAM transmit undo is suspended until the total transfer size is known, and only that data is placed in the undo buffer (subject to the same 5k reversibility limit).
     Add new undo type 't' for swap case operation.
    rlibdata.s:
     4 new ints and 1 new BOOL, so RlibSpace increases by 5.
    
    Version 5.85. Tagged as 'RISC_OSLib-5_85'
    99904b10
txtar 85.6 KB