1. 30 Jun, 2015 1 commit
    • Jeffrey Lee's avatar
      Fix null pointer dereference in stack backtrace code · 1aa3b81b
      Jeffrey Lee authored
        c/armsys - _kernel_language will return NULL if the PC was outside any known library language block, so make sure to check for that before dereferencing the pointer
        Builds, untested
      Version 5.86. Tagged as 'RISC_OSLib-5_86'
  2. 03 Apr, 2015 1 commit
    • 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>.
       Also add RTC to SWI exports, and remove redundant ones.
       Treat cmd_string as a pointer.
       New function xferrecv_last_ref.
      Version 5.84. Tagged as 'RISC_OSLib-5_84'
  3. 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'
  4. 28 Aug, 2012 1 commit
  5. 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.
        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().
        localtime() updated to respect locale selection.
        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'
  6. 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'
  7. 28 Oct, 2011 1 commit
    • Ben Avison's avatar
      File handling improvements · 8dcb6880
      Ben Avison authored
        * 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.
        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'
  8. 03 Nov, 2003 1 commit
    • Ben Avison's avatar
      Ansilib improvements, and a bugfix to system() · 1c7c8124
      Ben Avison authored
        * _kernel_irqs_disabled() is included in ansilib build, now needed for
          ARM 2 SWP replacement in c.alloc
        * _kernel_entrypoint() for ansilib now initialises relocation offsets in
          root stack chunk, necessary if linking with -zm object code
        * system() implementation now calls DDEUtils_FlushCL if starting a
          short command line - necessary in case previous system() call was a
          long command line directed at a DDE-unaware application
        Ansilib changes tested, DDE change not expected to cause problems.
      Version 5.47. Not tagged
  9. 15 Apr, 2003 1 commit
    • Kevin Bracey's avatar
      * __assert2() added to support for C99 assert(), which displays function name. · f126a1ab
      Kevin Bracey authored
      * _Exit() added.
      * Lots of new <math.h> functions (acosh, asinh, atanh, exp2, expm1,
        ilogb, log1p, log2, logb, scalbn, scalbln, cbrt, erf, erfc,
        lgamma, tgamma, nexttoward, fmaf). Float and long double forms
        of every function added; long double forms are included as another
        library object in the stubs rather than the shared library, as they
        just branch to the double form.
      * Subnormal/NaN/infinity cases in various <math.h> functions improved.
      * Added <tgmath.h>.
      * Headers brought into line with CC 5.54.
      * RMEnsures added to C library initialisation to try to load minimum
        CallASWI, FPEmulator, CLib. No errors reported if load fails.
      * A few pointless inter-file dependencies removed to reduce minimum
        size of included ANSILib.
      Version 5.46. Tagged as 'RISC_OSLib-5_46'
  10. 15 Nov, 2002 1 commit
    • Kevin Bracey's avatar
      ROM build fixed for 64-bit stuff. · f207fcb2
      Kevin Bracey authored
      PCI added to swis.h
      alloc.c updated to handle bigger slots (new code merged from ARM libraries)
      Various 32-bit fixes for backtracing, and general trap handling.
      Polite "Application is not 32-bit compatible" message.
      Headers <stdint.h> and <inttypes.h> fixed to work in non-C99 mode.
      txt changed to do new-style Delete behaviour
      Version 5.44. Tagged as 'RISC_OSLib-5_44'
  11. 29 Jan, 2002 1 commit
    • Kevin Bracey's avatar
      Abort and error handling massively overhauled: · 350370aa
      Kevin Bracey authored
        Aborts now give standard error messages (Abort on Data Transfer at... etc)
        *ShowRegs now filled in after aborts
        assert(), abort(), "free failed" and standard signal handlers now use Wimp
          error boxes if in the desktop
        Postmortem button on error boxes to view the postmortem
      Also, x$multiply, x$divide, __rt_sdiv, x$remainder, x$udivide, __rt_udiv and
      x$uremainder optimised.
      Version 5.35. Tagged as 'RISC_OSLib-5_35'
  12. 23 Aug, 2001 1 commit
  13. 22 Feb, 2001 1 commit
    • Stewart Brodie's avatar
      fwrite performance improved significantly. · 0bb3e26a
      Stewart Brodie authored
        Another getenv() bug fixed.
        stdio.c contains a vastly improved implementation of fwrite.
        hostsys.h declares _terminate_getenv to remove build warnings.
        armsys.c contains fix to getenv() to stop Omni dying.
        Tested on desktop machine for over a week without incident, including
          several heavy fwrite users (WebServe, C compiler)
        fwrite change is documented in Doc/fwrite
        getenv() bug is Bugzilla bug #28
      Version 5.27. Tagged as 'RISC_OSLib-5_27'
  14. 19 Oct, 2000 1 commit
    • Paul Skirrow's avatar
      Changed getenv to ensure it always allocates a buffer before calling · 9076880f
      Paul Skirrow authored
        getenv calls OS_ReadVarVal to read a system variable into a buffer.
        If the buffer is not big enough it increases the size of the buffer by
        256 bytes and tries again.
        However, the first time it was called, it would have no buffer and
        would call OS_ReadVarVal with r2=-1. The PRM says this "may" return an error
        which should be ignored, but if it did not return an error then getenv
        would not allocate a buffer and the call would fail.
        This change allocates a 256 byte buffer before OS_ReadVarVal is called.
      Version 5.20. Tagged as 'RISC_OSLib-5_20'
  15. 02 Oct, 2000 1 commit
    • Stewart Brodie's avatar
      Uses SYMDEFS files to avoid xtentries(app) and symgen. · 5810d878
      Stewart Brodie authored
        Fixed bug in getenv() relating to macro and numeric system variables.
        Uses SYMDEFS file to avoid messing around with generating little text
          files, generating assembler source, assembling it etc.  abssym et al
          are construct as symbol definition template files and then updated
          directly by the linker ready for export.  The linker can use these
          files directly without needing them to be assembled into AOF format.
        Fixed getenv so that it can read macro and numeric variables.  With these
          variable types, R2 does not equal -length of the variable value, so
          trying to obtain a variable with a larger value than any previously
          read variable would fail.  This is now fixed.
        This module will refuse to build without link 5.19 or later.
        Requires Library 0.54 or later.
        This component will not build with Library 0.53 or earlier.
      Version 5.16. Tagged as 'RISC_OSLib-5_16'
  16. 09 May, 2000 1 commit
  17. 07 Mar, 2000 1 commit
  18. 01 Oct, 1998 1 commit
    • Kevin Bracey's avatar
      Ursula branch merged. · 9081a0dc
      Kevin Bracey authored
      StrongARMfudge flag removed.
      StrongARM compatibility set according to AMBKernel flag in Hdr:RISCOS
      strftime %U and %W specifiers fixed for week 0.
      Version 4.89. Tagged as 'RISC_OSLib-4_89'
  19. 21 Aug, 1998 1 commit
    • Richard Manby's avatar
      Fixed an RMA leak. · 31ab84f2
      Richard Manby authored
      If a module written in C uses function getenv, buffer space
      is allocated in the RMA. This buffer was never freed, leading
      to RMA leakage when the module was 'RMKill'ed or 'RMReInit'ed.
         added function _terminate_getenv to free the buffer
         added flag getenv_finalised to the exit_s structure
         initialised getenv_finalised in function _exit_init
         atexit tests getenv_finalised, calls _terminate_getenv
         version string changed to 4.86 (27 Jul 1998)
  20. 21 Jan, 1997 1 commit
  21. 05 Nov, 1996 2 commits