1. 22 Apr, 2020 1 commit
  2. 20 Jul, 2019 1 commit
  3. 29 Jun, 2019 2 commits
  4. 09 Jun, 2019 1 commit
    • ROOL's avatar
      Build fix · 20984a33
      ROOL authored
      Detail:
        Add missing function draw_create_diag() to the ROM version of RISC_OSLib, required by Paint-2_24 and later.
        To keep ROM footprint to a minimum, export only that function; this also avoids adding static workspace and needing to increase RlibSpace.
      
      Version 6.01. Tagged as 'RISC_OSLib-6_01'
      20984a33
  5. 17 Mar, 2019 1 commit
    • ROOL's avatar
      Build fix · 6982f5cc
      ROOL authored
      Detail:
        Add wimp_autoscroll to rlib entries.
      
      Version 6.00. Not tagged
      6982f5cc
  6. 16 Mar, 2019 1 commit
    • ROOL's avatar
      CLib and rlib header updates · 0c846685
      ROOL authored
      Detail:
        Export fenv.h (omitted in error).
        Add FP_FAST_FMAL and FP_FAST_FMA defines per C standard
        Submission for ARMv7 Compiler bounty.
      
        Add Wimp_AutoScroll supporting function to rlib.
        Export various related defines for autoscroll use.
        Submission for Clipboard Support bounty.
      
      Version 6.00. Tagged as 'RISC_OSLib-6_00'
      0c846685
  7. 09 Feb, 2019 1 commit
    • ROOL's avatar
      Fix to iconbar menu X offset · 2f520d7e
      ROOL authored
      Detail:
        The fix applied to all menus in event.c revision 4.6 didn't take into account the offset of -16 already applied to iconbar menus.
      Admin:
        Tested with Draw-1_31.
      
      Version 5.99. Tagged as 'RISC_OSLib-5_99'
      2f520d7e
  8. 26 Jan, 2019 1 commit
    • Robert Sprowson's avatar
      Various fixes · a8f233bb
      Robert Sprowson authored
      colourtran.c: Swap round arg names to colourtran_colournumbertoGCOL to match prototype.
      txtar.c: Avoid incorrect use of strncat buffer limit, and possible unterminated string after strncpy, by reexpressing using snprintf.
      txtedit.c: Avoid incorrect use of strncat buffer limit by reexpressing using snprintf. Avoid potential NULL pointer dereference by moving the filename copy inside the 'if' which confirms it's non-NULL.
      txtfind.c: Remove repeated check of repls being valid. Free repls on error. Free pat on error.
      xfersend.c: Fix potential out of bounds array access (of leaf[]) if the leafname length exceeds the space in the Wimp message.
      Found by cppcheck static analysis.
      
      txtopt.c/h: Sprinkle in some consts.
      event.c: Open menu at the Style Guide approved offset of 64.
      xfersend.c: Remove redundant check of xfersend__filename being NULL in xfersend__suggest_leaf() as all paths leading to it being called ensure the allocation exists (also, it would have strcpy'd garbage due to malloc not clearing the allocation).
      
      Removed unused header txtover.h.
      
      Version 5.98. Tagged as 'RISC_OSLib-5_98'
      a8f233bb
  9. 29 Oct, 2017 1 commit
    • Robert Sprowson's avatar
      Put ctl in the attic · 91926745
      Robert Sprowson authored
      The ctl part of rlib has various memory leaks (ref https://www.riscosopen.org/forum/forums/4/topics/9503) reflecting its abandoned state. See the FrontEnd module for a more flexible implementation of the same GUI-in-a-text-file scripting language.
      The ctl API was not in C release 3 (it post dates that) nor in C release 4 manual, and the whole of rlib was removed from C release 5 in favour of the Toolbox.
      The change log at the top of rlib/s/rl_spare shows it was briefly added in early 1990 then removed in April 1991. 26 years later, cull it from the Makefile too.
      
      Version 5.94. Tagged as 'RISC_OSLib-5_94'
      91926745
  10. 26 Feb, 2016 1 commit
  11. 13 Feb, 2016 1 commit
    • ROOL's avatar
      Remove arbitrary limits on menu sizes · 758802b2
      ROOL authored
      Detail:
        When RISC_OSLib is used to generate menus using menu_new and menu_extend
        there are two (undocumented?) limits on the total menu size:
        - 64 items on a menu. Any more are silently ignored.
        - 1024 bytes of indirect text. Above this, any items have
          several bytes of random rubbish displayed in the menu entry.
      
        rlib.c.menu (r4.6) has been changed to:
        - remove menu_workarea which was on the stack, and caused limits.
        - only use malloc'd storage areas for the menu.
        - reduce the data copied by at least 50% by changing processing
          from: copy; update; copy
          to  : realloc extend (& copy?); update; realloc shrink (no copy).
        - remove the limits by adding more storage dynamically.
        - simplify code, which reduces the object code size by about 7%.
      Admin:
        The changes have been tested on an Iyonix running RO5.23, and VRPC
        running RO4.39, with a large C program with about 80 menus.
        The only noticeable effects were beneficial.
        It has also been tested with artificially low ADDITEMS and ADDBYTES.
        Submission from Martin Avison.
      
      Version 5.87. Tagged as 'RISC_OSLib-5_87'
      758802b2
  12. 07 Feb, 2016 2 commits
    • Robert Sprowson's avatar
      Open colour picker menus in the right place · ec3972c5
      Robert Sprowson authored
      Function dboxtcol() always opens colour pickers as transient submenus (in the flags to ColourPicker_OpenDialogue, plus listening for the menus deleted message) but chose to open the dialogue at the current mouse pointer, so obscuring part of the menu rather than opening it where the Style Guide wants it.
      wimp.h:
        Add a struct definition of menuwarn messages.
      txtedit.c/dbox.c/ctl.c:
        Use the menuwarn struct rather than indexing the words[].
      dboxtcol.c:
        Provided the last wimp event was the menu warning, use the x/y coordinates from that instead of the mouse pointer.
        Remove some local defines in favour of central ones.
        Make sure we use 0x80000000/0x7F000000 like the PRM says for the other 2 corners of the dialogue, not 0,0.
      Tested in a disc build of !Draw.
      
      Version 5.86. Not tagged
      ec3972c5
    • Robert Sprowson's avatar
      Non ANSI include warning fix · 3c9cbec2
      Robert Sprowson authored
      3c9cbec2
  13. 30 Jan, 2016 1 commit
    • ROOL's avatar
      Extra menu comments · 3ef629da
      ROOL authored
      Admin:
        Part of submission from Martin Avison. Not tagged.
      3ef629da
  14. 01 Aug, 2015 1 commit
  15. 15 May, 2015 1 commit
  16. 04 Apr, 2015 1 commit
  17. 03 Apr, 2015 3 commits
    • Robert Sprowson's avatar
      Clean up pass · fa35f348
      Robert Sprowson authored
      Trim any #if FALSE switches over a decade old, and keep #if TRUE.
      Accept EDIT2 and FMTTEXT1 bracketed code.
      Remove unused internal functions txt1_dooaction txt1_dosetoaction.
      Retagged as RISC_OSLib-5_85.
      fa35f348
    • 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
    • Robert Sprowson's avatar
      Extend rlib xferrecv API · 97c92ee5
      Robert Sprowson authored
      Add xferrecv_last_ref to get hold of the Wimp message id of the request for a scrap file data save, when the RAM transfer gets no reply. This is useful to allow the data save to be distinguished from a file being dragged to an application, without having to resort to string compares against <wimp$scrap>.
      SWIOptions:
       Also add RTC to SWI exports, and remove redundant ones.
      armsys.c:
       Treat cmd_string as a pointer.
      xferrecv.c/.h/rl_entries:
       New function xferrecv_last_ref.
      
      Version 5.84. Tagged as 'RISC_OSLib-5_84'
      97c92ee5
  18. 23 Aug, 2014 1 commit
    • Robert Sprowson's avatar
      Minor rlib cleanups · dc7ea073
      Robert Sprowson authored
      dbox.c: address of cancelled by dereference
      event.c: spelling
      txtar.c: don't grab the caret when clicking toggle size
      txtedit.c: use BOOL for a boolean
      win.c: when looking at the behind window handle we want -1 not 'DUD' (which happens to be -1)
      wimp.h: add comment about window handle -3
      Retagged as RISC_OSLib-5_83.
      
      Version 5.83. Not tagged
      dc7ea073
  19. 01 Aug, 2014 1 commit
    • Jeffrey Lee's avatar
      Fix rlib static data size · 917098cb
      Jeffrey Lee authored
      Detail:
        rlib/s/rlibdata - Reduce RlibSpace by 1, to take into account the removal of a static from rlib/c/xfersend
      Admin:
        Tested on BB-xM
        Fixes 'Static data size in library and stub disagree' error when running ROM apps
      
      
      Version 5.83. Retagged as 'RISC_OSLib-5_83'
      917098cb
  20. 31 Jul, 2014 1 commit
    • Robert Sprowson's avatar
      Some RISC_OSLib rlib enhancements · 5b7cef10
      Robert Sprowson authored
      menu.c/menu.h:
      Add a new menu_setcolours() function to allow the fore/background colour bits to be set on a menu entry.
      colourmenu.c:
      Use the new menu_setcolours() function instead of making assumptions about menu's internal structure layout.
      dbox.c/dbox.h:
      New functions dbox_hidefield and dbox_unhidefield added to complement the fade/unfade ones.
      As dbox_findicon/findiconbefore are only ever used to find writables, rename them as such. Also, make them find writable (type 15) AND writable draggable (type 14) icons.
      Allow navigation by tab/shift tab through icons like the Style Guide chapter 16 says we should. In fact it's a little odd that dbox is emulating 'Ktar' validation itself manually when the Wimp has done this since version 2.92, but maintaining it is less effort than going and checking all the templates.
      Fix bug when looking for leading capital letter matches to complete a dbox, the previous code was looking at the cached copy of the icon flags in d->window rather than the ones the Wimp is actually showing on screen (as might have been modified by dbox_fadefield() for example), so it was possible to complete a dbox for an icon which wasn't visible or selectable.
      Fix bug when looking for leading capital letter matches when the icon doesn't have any text - the template file format is defined as being 0x0D terminated. This would then lead to 'R' and 'S' being accepted as matches having run off the end of the text buffer and into the validation string (which usually contains an 'R' or 'S' validation first). Changed to accept any control terminator.
      event.c:
      When force closing the current menu, don't forget to set the two state variables back to 0.
      fileicon.c/resspr.c/txt1.c/txtundo.c/wimp.c:
      Use existing pointer type definitions.
      flex.c:
      Treat bools as bools and pointers as pointers.
      Say something useful in an error box if flex fails its internal consistency check, rather than just data aborting.
      font.c:
      Remove ROM conditionals from around font_readdef() function, always include the function.
      fontselect.c:
      Use font_readdef() rather than local copies of the exact same function.
      txtedit.c/txtfile.c/txtfind.c/txtedit.h:
      Remove redundant 'deletepending' state variable, and confusion over 'selectrecent' being a bool.
      Call os_byte directly rather than passing to os_cli("*FX").
      Other minor tidy ups.
      wimpt.c:
      Mark messages list as a constant.
      xferrecv.c:
      Also preserve the size member while recycling the xferrecv_ack message block, rather than corrupting it as 256.
      xfersend.c/xfersend.h:
      Take out the leaf name formulator as a common function for the two places to use it. This also allows the function to return the length of the leaf name so the correct message block size can be used. Inspection with MsgMon/!Reporter was showing that all xfersend initiated saves were passing the leaf name padded to 256 with garbage.
      Reindent a few functions.
      Make the draggable sprite replacement follow the same validation string rules as the Wimp, previously only ";s" was accepted, so upper case 'S' and validation strings that start with the sprite validation didn't work.
      xfersend_pipe() function prototype changed to match xfersend() more closely - not being able to respond to the context of a wimp_eventstr made this function practically unusable.
      akbd.h:
      Windows logo and menu keys defined.
      flex.h/help.h/wimpt.h
      Some typos in comments.
      wimp.h:
      Missing wimp message action codes and structure defs added for completeness.
      
      
      Version 5.83. Not tagged
      5b7cef10
  21. 08 Jul, 2014 1 commit
  22. 08 May, 2014 1 commit
    • Robert Sprowson's avatar
      Check for NULL pointers before finding the syshandle · da9f2a03
      Robert Sprowson authored
      menu.c: if NULL return -1, this has the added advantage that a menu maker (see event_attachmenumaker) can return NULL to mean "no menu thanks" and not data abort in event.c
      dbox.c: if NULL return 0, this is somewhat consistent with template_syshandle()
      menu.h: typo in comment corrected
      
      Version 5.82. Tagged as 'RISC_OSLib-5_82'
      da9f2a03
  23. 21 Jan, 2014 1 commit
    • Robert Sprowson's avatar
      Permit wildcards in RISC_OSLib application's messages files · 76d1dff4
      Robert Sprowson authored
      msgs.c: includes a MessageTrans parser that duplicates MessageTrans_Lookup (needed because the lookup function returns pointers to static C strings). However, did not allow '?' wildcards in the message token names.
      
      Version 5.80. Tagged as 'RISC_OSLib-5_80'
      76d1dff4
  24. 24 Oct, 2013 1 commit
    • Robert Sprowson's avatar
      Some library fixes · c9b6d7f3
      Robert Sprowson authored
      Fix for problem passing long command lines via system(), while there are good arguments to leave the threshold at 255, non DDEUtils aware programs get brutally truncated command strings, and since the old threshold of 255 applied when the kernel handled 256 command lines, upping the limit to 1k is no worse than before.
      Fix for Edit failing to draw lines of text longer than 192 characters (ticket #350). Several factors were conspiring here: on a mode change the window width in characters wasn't being clamped, whereas user entered limits in the menu were, then the internal buffer ("PAINTBUFSIZE") was too short so lines got truncated, and when larger than 256 got wrapped modulo 256 due to the use of an array of chars. Now set at compile time with BIG_WINDOW_SIZE_LIMIT with a new theoretical maximum of 8192. Currently limited to 480 since it uses stack variables.
      
      In the C library:
       armsys.c: adapt the threshold at which to use DDEUtils based on the kernel version number
       scanf.c: squash a warning
       time.c: mark the table of month lengths as constant so we can claw back 13 words of static workspace without having to change the stubs
      
      In RISC OS lib:
       bbc.c: remove local definitions of some SWI numbers
       template.c: squash a warning
       txt.c: delete Modula-2 support
       txt1.c: compare pointer with NULL not an integer
       txtar.c: introduce BIG_WINDOW_SIZE_LIMIT, rationalise a few sprintf's, mark private functions as static
       txtundo.c/txtedit.c: squash old style function warnings
       txtoptmenu.c: clamp the window width read from Edit$Options properly, delete long disabled code
       txtscrap.c: dead function deleted
      
      
      Version 5.78. Tagged as 'RISC_OSLib-5_78'
      c9b6d7f3
  25. 30 Jun, 2013 1 commit
    • Robert Sprowson's avatar
      Added some missing font_paint() flags · 3842fca0
      Robert Sprowson authored
      font.h: missing flags defined (those flags that can be used without needing to change the prototype of font_paint()
      fontlist.h: comment typo
      No code changes, retagged as RISC_OSLib-5_77
      3842fca0
  26. 25 Sep, 2012 1 commit
    • Robert Sprowson's avatar
      Style guide ammendment · 6fbe9ace
      Robert Sprowson authored
      While the txtedit part of RISC_OSLib has never been famed for its adherence this brings the delete operation (^K ref Style Guide p38, !ResEd, and the drag & drop protocol specification) into line.
      
      Version 5.73. Tagged as 'RISC_OSLib-5_73'
      6fbe9ace
  27. 21 Aug, 2012 1 commit
  28. 13 Nov, 2011 1 commit
  29. 28 Oct, 2011 1 commit
    • Ben Avison's avatar
      File handling improvements · 8dcb6880
      Ben Avison authored
      Detail:
        * Added 64-bit file pointer API support, following the LFS spec v1.5
          (see Docs directory). Internally, now uses 64-bit file pointers
          exclusively. For now, the backend still limits you to 4GB-1 files, but
          clients of the C library won't need recompiling again to support larger
          files than this once they use the new API.
        * Fixed a large number of warnings produced in compilation, assembly and
          linking, many of them new and resulting from the improved checks in the
          latest toolchain.
        * Increased the maximum stream buffer size from 16MB to 1GB.
        * Added Hdr:SDFS and Hdr:SDIO to the list of headers used to build swis.h
          if they are present.
      Admin:
        Verified that the new 64-bit file pointer buffering code works using a
        ROM build (since the toolchain makes extensive use of reading, writing
        and seeking internally).
      
      Version 5.64. Tagged as 'RISC_OSLib-5_64'
      8dcb6880
  30. 06 Aug, 2011 1 commit
    • Jeffrey Lee's avatar
      Update to work with zero page relocation · 14a49538
      Jeffrey Lee authored
      Detail:
        clib/s/cl_stub, kernel/s/k_body, s/initmodule - Use OS_ReadSysInfo 6 to look up CLibWord/RISCOSLibWord/CLibCounter location each time it's needed instead of using hardcoded addresses. SWI overhead shouldn't be too bad since the zero page areas are rarely used.
        rlib/c/menu - Fix null pointer access when attempting to clear a submenu pointer via menu_submenu(...,...,NULL)
        s/h_workspc - Remove old local definitions of CLibCounter, RISCOSLibWorkSpace and CLibWorkSpace. Use Hdr:PublicWS instead.
      Admin:
        Tested on rev A2 BB-xM
      
      
      Version 5.60. Tagged as 'RISC_OSLib-5_60'
      14a49538
  31. 11 Dec, 2010 1 commit
  32. 06 Dec, 2010 1 commit
    • Robert Sprowson's avatar
      Import of JPEG support code to RISC_OSLib. · 95424385
      Robert Sprowson authored
      Functionality to query, plot, and transform a JPEG file modelled on the functions provided in 'sprite.c/h'.
      To be used to share more code between !Paint and !Draw.
      
      Version 5.59. Tagged as 'RISC_OSLib-5_59'
      95424385
  33. 30 Nov, 2010 1 commit
    • Robert Sprowson's avatar
      Enable 2 functions in RISC_OSLib shared entry table. · 7d3fe675
      Robert Sprowson authored
      Needed by !Paint 2.02.
      Fix some easy warnings in wimp.c/sprite.c.
      Add new function (not in the ROM version) 'wimp_baseofromsprites()'.
      bbc_adval fixed to return -1 when no ADC fitted to match Electron behaviour.
      Note: the 2 reenabled functions haven't been appended to the table, so anyone who linked a RAM application against 'romastubs' would need to relink.
      
      Version 5.58. Tagged as 'RISC_OSLib-5_58'
      7d3fe675
  34. 26 Nov, 2010 1 commit
    • Jeffrey Lee's avatar
      Fix alignment fault when reporting the "This file doesn't contain a BASIC program" error · 38fd341c
      Jeffrey Lee authored
      Detail:
        rlib/c/txtedit - Rather than generating a proper error block to send to Wimp_ReportError, txtedit__validbasicfile was just subtracting 4 from the pointer to the error string.
        The resulting address isn't guaranteed to be aligned properly, resulting in an alignment fault on ARMv7 when Wimp_ReportError examines the error number.
        The new code just reuses the 'buff' array to build a temporary error block.
      Admin:
        Fixes alignment fault on beagleboard when attempting to load a detokenized BASIC file into !Edit.
      
      
      Version 5.57. Tagged as 'RISC_OSLib-5_57'
      38fd341c
  35. 31 May, 2009 2 commits
    • Peter Naulls's avatar
      Normalise include paths · 6e15bfa0
      Peter Naulls authored
      Detail:
       Fix missed change from last commit
      Admin:
       None
      
      Version 5.54. Not tagged
      6e15bfa0
    • Peter Naulls's avatar
      Normalise C and assembler include paths · ca954eea
      Peter Naulls authored
      Detail:
       This changes all the C and assembler includes to be a canoncial Unix format.
       Also match include paths to previous commit for EditIntern/DrawIntern/VerIntern
       Finally, also include some minor type fixes (NULL vs 0)
      Admin:
       May be some other paths elsewhere in the source I'm not immediately able to fix.  Will address any issues ASAP, since this is a huge change.
      
      Version 5.54. Not tagged
      ca954eea