1. 12 Oct, 2012 1 commit
    • Ben Avison's avatar
      Merged in a fix to <math.h> from C compiler · 9fe4fc44
      Ben Avison authored
      Detail:
        This change was first applied to the inbuilt headers in the C compiler at
        version 5.59 (07 Apr 2005), but was accidentally not copied into the
        RISC_OSLib version of math.h. Fortunately, this would only have affected
        anyone compiling software with the -jC: switch.
      Admin:
        Untested, but should be a safe change.
      
      Version 5.74. Tagged as 'RISC_OSLib-5_74'
      9fe4fc44
  2. 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
  3. 01 Sep, 2012 1 commit
    • Jeffrey Lee's avatar
      Generate symbols file during ROM builds · 235e5e7d
      Jeffrey Lee authored
      Detail:
        Makefile - The symbols file that gets generated during the build now gets copied to the install folder for ROM builds. This allows it to be picked up easily by debugging tools.
      Admin:
        Tested with BCM2835, OMAP3 & Disc builds
      
      
      Version 5.72. Retagged as 'RISC_OSLib-5_72'
      235e5e7d
  4. 28 Aug, 2012 1 commit
  5. 21 Aug, 2012 1 commit
  6. 15 Aug, 2012 1 commit
    • Jeffrey Lee's avatar
      Add VCHIQ to SWIOptions · aaef61b3
      Jeffrey Lee authored
      Detail:
        SWIOptions,feb - Added VCHIQ to SWI header list
        Makefile - Add SWIOptions as a dependency to s.swioptions, so exported swis.h will rebuild correctly if SWIOptions is changed
      Admin:
        Tested briefly
      
      
      Version 5.71. Tagged as 'RISC_OSLib-5_71'
      aaef61b3
  7. 26 Jun, 2012 1 commit
    • Jeffrey Lee's avatar
      Improve sanity checks in default_unwind_handler · 7289ddae
      Jeffrey Lee authored
      Detail:
        kernel/s/k_body - Now ignores unaligned PC values, as they either indicate stack corruption or Thumb use (which the unwind handler doesn't support anyway)
      Admin:
        Tested on Raspberry Pi with high processor vectors
      
      
      Version 5.70. Tagged as 'RISC_OSLib-5_70'
      7289ddae
  8. 11 Jun, 2012 1 commit
    • Robert Sprowson's avatar
      Make mktime() correct for local time. · 27bebb79
      Robert Sprowson authored
      Following an earlier fix, the logic of mktime() has turned out to need reviewing too.
      To summarise
        time() -> a UTC time in seconds
        gmtime() -> breaks down a UTC time into components
        localtime() -> breaks down a UTC time into local components (tz + DST)
        mktime() -> converts local components back into UTC time, normalising
      In mktime(), the current locale (via setlocale()) is considered and used to choose the timezone, assuming an appropriate territory module is loaded.
      The value of the tm_isdst field is factored into the offset calculation.
      However, mktime() is also defined as normalising the components of time and updating the caller's block with normalised values, in local time, so the local offset is reapplied at the end.
      
      Moved time_to_tm up in the function so mktime() can use it.
      Corrected/lined up some comments.
      Also, mktime() no longer forces tm_isdst to -1, it preserves the user's value, so consecutive mktime()s are consistent.
      Added test to "test/tzones.c", results compared with Windows XP.
      
      Version 5.69. Tagged as 'RISC_OSLib-5_69'
      27bebb79
  9. 28 May, 2012 1 commit
    • Robert Sprowson's avatar
      Add locale support for selecting timezones from C armsys.c · 9fab6d08
      Robert Sprowson authored
        Ammended time() to match ISO9899 and just return UTC like it says.
        Inlined the single use of _bbctime() macro.
      locale.c
        The timezone within a territory can now be specified as part of the setlocale() function.
        This uses a qualifier to the already accepted territory name, for an example see test/tzones.c
        Shock addition of some comments to the locale parsing function.
        To avoid needing to mess about with C library workspace the timezone and territory are encoded internally into 1 word, with 10 bits allowing up to 1024 territories worldwide.
        Ripple through to strftime().
      time.c
        localtime() updated to respect locale selection.
      test/file,gen_inputs,test64
        Copyright headers added.
      
      Output compared with Windows XP using setlocale versus tzset to shift the program into Pacific time.
      
      Version 5.68. Tagged as 'RISC_OSLib-5_68'
      9fab6d08
  10. 27 Mar, 2012 1 commit
    • Jeffrey Lee's avatar
      Fix asasm 2.00 warnings · 98660885
      Jeffrey Lee authored
      Detail:
        clib/s/cl_entries - Symbol names containing $'s are now wrapped in |'s to prevent potential unintended variable expansion
        s/h_modmacro, s/h_stubs - Modify Entry/Entry2 to not add their own vertical bars to symbol names (causing two sets of bars that cancel each other out)
      Admin:
        Tungsten ROM version identical to before when built under objasm
        Needs Library-1_54 for ROM link symbol files to be generated correctly
      
      
      Version 5.67. Retagged as 'RISC_OSLib-5_67'
      98660885
  11. 16 Feb, 2012 1 commit
  12. 04 Feb, 2012 1 commit
    • Jeffrey Lee's avatar
      Add ZLib module to SWIOptions · 59236321
      Jeffrey Lee authored
      Detail:
        SWIOptions,feb - Now includes ZLib module SWIs
      Admin:
        SWI export tested, seems OK
      
      
      Version 5.66. Not tagged
      59236321
  13. 06 Dec, 2011 1 commit
    • Jeffrey Lee's avatar
      Use correct CLZ check · 23deb4ff
      Jeffrey Lee authored
      Detail:
        s/longlong - Only look for ARMv5 support when deciding if CLZ is available, not ARMv5T
      Admin:
        Tested in OMAP3 ROM
      
      
      Version 5.66. Tagged as 'RISC_OSLib-5_66'
      23deb4ff
  14. 26 Nov, 2011 1 commit
    • Robert Sprowson's avatar
      Review use of StrongARM switch. · 8988adae
      Robert Sprowson authored
      Was being used to conditionalise things which aren't really StrongARM related, now should be read as "support split I+D caches" switch.
      
      Version 5.65. Tagged as 'RISC_OSLib-5_65'
      8988adae
  15. 13 Nov, 2011 1 commit
  16. 12 Nov, 2011 1 commit
    • Ben Avison's avatar
      Fix stack imbalance in module stubs · faec85ad
      Ben Avison authored
      Detail:
        A minus sign was missing - this meant that any module built using stubs
        from the last 2 weeks would branch through zero at the end of initialisation.
      Admin:
        Modules now work again!
      
      Retagged as 'RISC_OSLib-5_64'
      
      Version 5.64. Not tagged
      faec85ad
  17. 28 Oct, 2011 2 commits
    • 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
    • Ben Avison's avatar
      Long long multiply bugfix · 3f057115
      Ben Avison authored
      Detail:
        Last revision broke _ll_mullu (the runtime support function for multiplying
        a 64-bit integer by an unsigned 32-bit integer) except for ROM builds that
        target CPUs with the M extension. So in practice, IOMD ROMs and softloadable
        C libraries both exhibited the bug.
      Admin:
        Verified that the compiler will now run against this C library (previously
        it reported many non-sensical errors).
      
      Version 5.63. Tagged as 'RISC_OSLib-5_63'
      3f057115
  18. 18 Oct, 2011 1 commit
    • Robert Sprowson's avatar
      Change to use StdTools. · 7f2ef214
      Robert Sprowson authored
      Be more quiet when cleaning.
      STM/LDM changed to Push/Pull.
      Moved an illegal instruction back into ARM's illegal instruction space.
      
      Version 5.62. Tagged as 'RISC_OSLib-5_62'
      7f2ef214
  19. 24 Sep, 2011 1 commit
    • Jeffrey Lee's avatar
      Fix objasm 4 warnings. Enable (S|U)MULL/CLZ in math code. · a6d65423
      Jeffrey Lee authored
      Detail:
        s/longlong - The code has always had the ability to use CLZ & long multiply instructions, but it's never been enabled. The nonfunctional code to detect the CPU architecture at runtime has been disabled, and instead a fixed configuration is selected at compile time with the help of Hdr:CPU.Arch. Also added lots of ROUT's for safety.
        s/objmacs - Updated push/pop macros to make use of LDR/STR when only one register is to be transferred. This fixes a few objasm 4 warnings and should result in a speed boost where applicable.
      Admin:
        Tested on rev A2 BB-xM.
        Different math code configurations tested briefly.
      
      
      Version 5.61. Tagged as 'RISC_OSLib-5_61'
      a6d65423
  20. 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
  21. 11 Dec, 2010 1 commit
  22. 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
  23. 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
  24. 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
  25. 28 Nov, 2009 1 commit
    • Jeffrey Lee's avatar
      Improve safety & reliability of callback handling in SharedCLibrary · 96b4a3c3
      Jeffrey Lee authored
      Detail:
        CallBackHandler in kernel.s.k_body now ensures that the stored 'sp' and 'sl' values are word-aligned before attempting to read from 'sl' to verify that it points to a stack chunk. This avoids an exception being triggered in certain situations when alignment exceptions are turned on and a piece of hand-written assembler is using the sl register to store data.
      Admin:
        Further checks should be added to check that 'fp' is valid before calling _kernel_unwind, as _kernel_unwind currently only performs minimal checks that are not always sufficient.
        Tested on rev C2 beagleboard with KinoAmp pre-release.
      
      
      Version 5.56. Tagged as 'RISC_OSLib-5_56'
      96b4a3c3
  26. 17 Jul, 2009 1 commit
  27. 26 Jun, 2009 1 commit
    • Ben Avison's avatar
      Build process changes · 6bfb6dbc
      Ben Avison authored
      Detail:
        Install rule now takes an optional INSTTYPE switch: if this is set to
        "libraries" then instead of installing the SCL module, we install the
        headers, stubs, ansilib, risc_oslib and overlay manager libraries. This is
        intended primarily for the tools CD disc image.
        The component is also now cleaned in the "clean" phase. Historically, the
        exception made for this component (and OSLib and Desk, both now binary
        imports) was made on the grounds of speed, and this is not such an issue
        these days. Moreover, we need cleaning to take place on desktop disc builds
        because the SCL must be built and installed in both APCS-R and APCS-32
        versions, which requires an intermediate clean.
      Admin:
        Tested in a Tools CD build.
      
      Retagged as 'RISC_OSLib-5_54'
      
      Version 5.54. Not tagged
      6bfb6dbc
  28. 14 Jun, 2009 1 commit
    • Ben Avison's avatar
      Build fix · e05a2099
      Ben Avison authored
      Detail:
        s.makehswis used to pull in various IO header files. There was no good
        reason for this, and doing so causes a dependency upon Hdr:Machine.<Machine>
        to define which generation of IOC/IOMD is in use - which is a problem if
        the C library is to be built where Machine=All.
      Admin:
        Tested in a Machine=All build.
      
      Version 5.54. Not tagged
      e05a2099
  29. 07 Jun, 2009 2 commits
    • Ben Avison's avatar
      Build fix · c676e8e6
      Ben Avison authored
      Detail:
        Some users reported problems building the sources if they had other
        installations of perl on their build machine. The build system was using a
        mixture of "perl" and "<Perl$Dir>.perl" to invoke the interpreter, and
        sometimes but not always using "do" to expand system variables on the
        command line. This has now been standardised to use "do <Perl$Dir>.perl in
        all cases, and where possible, to use the makefile macro ${PERL}.
      Admin:
        Checked that a Tungsten build still works on a build machine with no other
        perl installation. "perl" was aliased to an error to ensure it wasn't used.
      
      Version 5.54. Not tagged
      c676e8e6
    • Ben Avison's avatar
      Build fix · fecfa2d2
      Ben Avison authored
      Detail:
        Previous commit moved the location of the EditIntern directory within the
        sources but did not update the export rules in the Makefile to match.
        The result was that Edit no longer builds from clean, breaking Tungsten and
        IOMD ROM builds.
      Admin:
        Checked in a TungstenDev build.
      
      Version 5.54. Not tagged
      fecfa2d2
  30. 31 May, 2009 3 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
    • Peter Naulls's avatar
      Rationalize C include path usage · 34c122aa
      Peter Naulls authored
       Detail:
        Parts of RISCOS_Lib use non-standard paths that only really work on native RISC OS compilitation.
        This moves the relevant files into a more normalized dir.h.file format.
       Admin:
        Not tested yet.  #include path changes to follow.
      
      Version 5.54. Not tagged
      34c122aa
  31. 04 Oct, 2008 1 commit
    • Ben Avison's avatar
      Merged in changes from Castle · c4b59b37
      Ben Avison authored
      Detail:
        Added terminating null to clib messages file for tokens C53, C36, C37, C66,
        C70
        appears lost a while ago .. error in field suggested need for this.
        examination of r0 3.7 etc clib messages file showed NULLs here.. believe
        they are the only messages in clib that can emerge through a printf.. and
        this need a null terminator.
      Admin:
        Not tested
      
      Version 5.54. Tagged as 'RISC_OSLib-5_54'
      c4b59b37
  32. 17 Mar, 2005 1 commit
  33. 14 Mar, 2005 1 commit
    • Kevin Bracey's avatar
      * Improved stdio to allocate extra FILE objects beyond the static array of 16.... · 0d936eec
      Kevin Bracey authored
      * Improved stdio to allocate extra FILE objects beyond the static array of 16. Number of open files now only limited by memory and the OS.
      
      * FOPEN_MAX in <stdio.h> increased from 8 to 16 to reflect reality.
      * Minor corrections to comments in <stdio.h>.
      * Library shutdown tidied for modules. In particular, shutdown of I/O was
        broken for modules which had been entered as applications.
      
      Version 5.53. Tagged as 'RISC_OSLib-5_53'
      0d936eec
  34. 07 Mar, 2005 1 commit
  35. 09 Nov, 2004 1 commit
    • Ben Avison's avatar
      BBE-related changes: · aec3b552
      Ben Avison authored
      * clib.rom_link_v doesn't seem to have been kept in step with the changes
        to srcbuild as part of the cross-compilation work: it is no longer the
        job of the verbatim rom link makefie fragment to provide a rom_link rule.
        An appropriate alternative set of forwarding rules have been implemented
        instead.
      * clib.rom_link_v was never taught about the new C99 library chunks, and the
        relevant s files weren't being exported in the BBE phase either.
      
      Retagged since this won't affect code generation for existing builds.
      aec3b552
  36. 27 Oct, 2004 1 commit
    • Ben Avison's avatar
      Bugfix and system mode support. · 38e071b3
      Ben Avison authored
      Detail:
        * Fixed signed pointer comparison: most top-bit-set pointers passed to
          _kernel_raise_error() were being translated into "Exit called"
        * Stack extension is now permitted in SYS mode; includes support in longjmp()
      Admin:
        Verified that stack extension works.
      
      Version 5.51. Tagged as 'RISC_OSLib-5_51'
      38e071b3