1. 06 May, 2020 2 commits
    • ROOL's avatar
      Add C11/C18 library functions · eef62ec8
      ROOL authored
      Detail:
        alloc.c - Add aligned_alloc(). Since softloaded versions of the C library can't rely on OS_Module 24 being available there is a fallback implementation for older kernels.
        stdlib.c - Add quick_exit() and at_quick_exit(). Also fix bug in _Exit; a missing loop pre-decrement led to only checking a single (out of array bounds!) vector.
        time.c - Add timespec_get().
        cl_entry2 - 4 new functions added to the stubs.
        Reduce spare CLib static workspace to absorb the quick_exit() handlers, remove the unused words from armsys.c so they're all accounted for in one space.
      Admin:
        In order that the functions can be defined in the stubs now (despite not having a compiler to support C11/C18) they are enabled when 'DDE' is defined so that C library builds work.
      eef62ec8
    • ROOL's avatar
      Add fopen's exclusive mode · 68fc9d43
      ROOL authored
      Detail:
        Remove undocumented 't' mode which forcibly timestamped files, since other operating systems use this to denote a text file (as opposed to 'b' binary mode).
        Add 'x' mode per ISO9899:2018
        * only applies to 'w' mode files (not 'r' or 'a')
        * file must not exist prior to creation
        * beyond that we rely on RISC OS' policy of only allowing a file to be opened once for writing as our exclusivity
        Also fix bug in check for 'Protected disc' error, which only trigged for fsnumber_ADFS (8).
      Admin:
        Tested in a ROM build with a simple test harness.
      68fc9d43
  2. 10 Jun, 2018 1 commit
    • Jeffrey Lee's avatar
      Try and avoid blocking callbacks · 73fd8884
      Jeffrey Lee authored
      Detail:
        The kernel has a 'callback postponement flag' which will be set whenever an X SWI, called from user mode, returns a pointer to an error (and the error block looks like it's in RAM).
        Although this flag will help prevent the error buffer from being overwritten by any errors generated by callbacks, it will also have the effect of blocking Alt-Break and CLib's Escape handler, due to them both being reliant on callbacks.
        Since the flag may persist for a long time, it can be dangerous to leave the OS in this state (the flag can only be cleared by a SWI call from user mode - which may never happen if the program is stuck in a bad state).
        So to combat this, CLib will now make some effort to try and avoid leaving the postponement flag in situations where it shouldn't be needed.
        File changes:
        - c/armsys:
          - Change _sys_flen to return 0 for TTY streams, since calling OS_Args for them isn't going to generate any useful result (previously it was generating an error, causing the postponement flag to be left set on entry to main())
          - Be extra vigilant when entering main() to make sure the callback postponement flag isn't set, just in case other checks don't resolve it
        - kernel/s/k_body:
          - Change CopyError to attempt to clear the callback postponement flag if we suspect it's set. We've just copied the error to our own buffer, so it should be our job to worry about preventing that buffer being prematurely overwritten, not the kernel's.
      Admin:
        Tested on BB-xM
        'while (1) {}' (and similar variants) now multitasks in task windows and is no longer unkillable
        Fixes issue reported on forums:
        https://www.riscosopen.org/forum/forums/4/topics/11542#posts-79767
      
      
      Version 5.96. Tagged as 'RISC_OSLib-5_96'
      73fd8884
  3. 14 May, 2016 1 commit
    • ROOL's avatar
      [391] localtime() ignores manual timezone configuration · 332c9e74
      ROOL authored
      Detail:
        When in the default C locale localtime() would return the wrong time for nonzero timezones.
      Admin:
        Tested with softloaded C library for each ROM release supported.
        Submission from Rick Murray.
      
      Version 5.90. Tagged as 'RISC_OSLib-5_90'
      332c9e74
  4. 29 Feb, 2016 1 commit
    • Ben Avison's avatar
      Support for ARMv8 · 9b78d05f
      Ben Avison authored
      Detail:
        The SWP and SWPB instructions have finally been removed in ARMv8, after
        having been deprecated for a very long time. This version adds alternative
        versions of code that used to use them with ones that use LDREX/STREX and
        LDREXB/STREXB instead. Soft-loadable C libraries will choose between
        implementations at runtime using OS_PlatformFeatures; ROM builds only
        include the appropriate version for the target hardware.
      Admin:
        Tested on Raspberry Pi 3.
      
      Version 5.88. Tagged as 'RISC_OSLib-5_88'
      9b78d05f
  5. 30 Jun, 2015 1 commit
    • Jeffrey Lee's avatar
      Fix null pointer dereference in stack backtrace code · 1aa3b81b
      Jeffrey Lee authored
      Detail:
        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
      Admin:
        Builds, untested
      
      
      Version 5.86. Tagged as 'RISC_OSLib-5_86'
      1aa3b81b
  6. 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>.
      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
  7. 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
  8. 24 Mar, 2013 1 commit
    • Robert Sprowson's avatar
      Build fix · 8e9a4e8e
      Robert Sprowson authored
      s/h_brazil: use Hdr:System instead of GETting them one at a time
      c/scanf: type cast
      
      Version 5.77. Tagged as 'RISC_OSLib-5_77'
      8e9a4e8e
  9. 20 Mar, 2013 1 commit
  10. 28 Aug, 2012 1 commit
  11. 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
  12. 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
  13. 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
  14. 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
  15. 31 May, 2009 1 commit
    • 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
  16. 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
  17. 07 Mar, 2005 1 commit
  18. 23 Jan, 2004 1 commit
    • Kevin Bracey's avatar
      <ctype.h> * isblank() added. · 8f9cfb8a
      Kevin Bracey authored
                * isprint() now true for non-breaking spaces
      <math.h>  * FP_INFINITY corrected to FP_INFINITE
                * fma(), fmal(), llrint(), llrintf(), llrintl(),
                  llround(), llroundf(), llroundl(),
                  remquo(), remquof(), remquol() added.
                * added inlining for remainder() and fmaf() and various
                  float functions.
                * math_errhandling removed pending overhaul - it was misleading.
                * expm1() and log1p() now provide decent (< 1 ulp) accuracy,
                  rather than only being marginally better than exp(x)-1 and
                  log(1+x).
                * new version of copysign() with standard calling conventions.
                * some C99 functions changed to use infinity/NaNs and exceptions
                  for error handling - see comments in header file about the
                  changes in progress.
      <stdio.h>  * output from %a now correctly rounded
      <stdlib.h> * strtof() and strtold() added.
      <string.h> * strerror() no longer clears _kernel_last_oserror().
      
      Version 5.49. Tagged as 'RISC_OSLib-5_49'
      8f9cfb8a
  19. 02 Dec, 2003 1 commit
    • Ben Avison's avatar
      Changes for Customer W; also suitable for building on an Iyonix. · 20ee3c3f
      Ben Avison authored
      Detail:
        * No longer uses aasm to build h.swis.
        * (Only) compatible with new C compilers: assumes const static data is
          placed in separate read-only areas, and suitable command-line switch
          is used to ensure that library static data is never placed in a zero-
          init area.
        * Stack extension code now thread-safe.
        * Heap thread-safety code (in clib) now uses SWP instruction test results
          from stack extension code (in kernel) - as a side effect, the exported
          symbol _swp_available now exists, if you need to use it elsewhere.
        * Slightly closer to having top-bit-set heap addresses working.
      Admin:
        Tested in a Tungsten build, and with Customer W's test suite.
      
      Version 5.48. Tagged as 'RISC_OSLib-5_48'
      20ee3c3f
  20. 03 Nov, 2003 1 commit
    • Ben Avison's avatar
      Ansilib improvements, and a bugfix to system() · 1c7c8124
      Ben Avison authored
      Detail:
        * _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
      Admin:
        Ansilib changes tested, DDE change not expected to cause problems.
      
      Version 5.47. Not tagged
      1c7c8124
  21. 13 Oct, 2003 1 commit
  22. 09 Oct, 2003 1 commit
    • Ben Avison's avatar
      Changes required for Customer W. · d08d7612
      Ben Avison authored
      Detail:
        * Implemented the thread-safety mutex macros for the user mode heap.
        * Created ansilibm, a version of ansilib suitable for building modules.
        * Fixed an overestimation of the size of the workspace passed to
          SharedCLibrary_LibInitModule[APCS_32] by the stubs.
        * Fixed bug in SharedCLibrary_LibInitModule[APCS_32] regarding handling of
          non-reentrant modules - if module code was at a higher address than the
          module data, then all the intervening data would be pointlessly copied
          back over itself with no allowance for volatility.
        * Removed the bsearch source file, since it was only required for APCS-A
          which the library has not supported since the year 2000, and which the
          compiler is now no longer able to build.
      Admin:
        ansilibm builds working modules, but thread safety has not been
        extensively tested.
      
      Version 5.47. Tagged as 'RISC_OSLib-5_47'
      d08d7612
  23. 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'
      f126a1ab
  24. 17 Jan, 2003 1 commit
  25. 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'
      f207fcb2
  26. 22 May, 2002 1 commit
    • Kevin Bracey's avatar
      * Added two new library chunks, 4 and 5, which contain extensions to the... · 89eac61e
      Kevin Bracey authored
      * Added two new library chunks, 4 and 5, which contain extensions to the kernel and C library respectively. These have no static data associated with them, just being extensions of the stub tables. The reason for this is to minimise wasted space in programs that don't use the C99 facilities; o.stubs is now a library split into 3 pieces - basic kernel and CLib, extra kernel and extra
      
        CLib; only the bits a program needs get included.
      
      * Previous extensions to the C library stubs revoked - they now stop at _swix;
        all the new C99 functions now live in chunk 4. Anyone using those new
        functions should relink with new stubs and ensure this C library version.
      
      * printf/scanf now support 64-bit types through "ll" and "j" length modifiers.
      
      * Run-time support for VLAs (__rt_allocauto and __rt_freeauto) added. No
        attempt is currently made to clear up on longjmp or to cope with someone
        changing the kernel allocator while a VLA is active. These would be a
        future enhancement.
      
      * Added complete 64-bit run-time support (48 functions) to kernel library;
        these functions are compatible with the ones used by the ARM ADS. Many of
        the simpler functions will not normally be used by the compiler, as it
        will generate inline code. There is scope for improvement by switching
        in MULL and CLZ-using forms of multiply and divide when possible.
      
      * llabs and lldiv added to C library.
      
      * Header files corrected in a few areas, and changed to match the C compiler.
        <stdint.h> and <stdbool.h> now require the compiler to be in C99 mode
        (as detected using __STDC_VERSION__).
      
      
      Version 5.41. Tagged as 'RISC_OSLib-5_41'
      89eac61e
  27. 11 Apr, 2002 1 commit
  28. 26 Mar, 2002 1 commit
    • Kevin Bracey's avatar
      * Added C99 extensions to strftime(). All basic specifiers supported, but "E"... · 84335a9f
      Kevin Bracey authored
      * Added C99 extensions to strftime(). All basic specifiers supported, but "E" and "O" modifiers ignored.
      
      * strftime specifiers %c, %X and %x for "C" locale changed to match C99.
      * Optimised hypot[f].
      * Missing hypotf() declaration added to <math.h>.
      * Fixed Shared C Library - inadvertent change to static data size meant it was
        incompatible with the stubs.
      
      Version 5.38. Tagged as 'RISC_OSLib-5_38'
      84335a9f
  29. 21 Mar, 2002 1 commit
    • Kevin Bracey's avatar
      Added the following C99 features: · f464cdae
      Kevin Bracey authored
        * snprintf(), vsnprintf(), vfscanf(), vscanf(), vsscanf()
        * hh, j, z and t printf length modifiers (indicating char, intmax_t, size_t
          and ptrdiff_t respectively)
        * Hexadecimal floating-point printing and scanning (%a/%A)
        * %F printf() specifier (upper-case form of %F)
        * Input/output of NaNs and Infinities
        * imaxdiv_t, imaxdiv(), strtoimax(), strtoumax() (simulated through macros)
        * <fenv.h>: feclearexcept(), fegetexceptflag(), feraiseexcept(),
                    fesetexceptflag(), fetestexcept(), fegetround(), fesetround(),
                    fegetenv(), feholdexcept(), fesetenv(), feupdateenv()
        * FLT_EVAL_METHOD, DECIMAL_DIG
        * hypot(), hypotf(), fabsf(), fdim(), fdimf(), fmax(), fmaxf(), fmin(),
          fminf()
        * INFINITY, NAN, fpclassify(), isfinite(), isinf(), isnan(), isnormal(),
          signbit(), copysign(), copysignf(), nan(), nanf(), nextafter(),
          nextafterf() isgreater(), isgreaterequal(), isless(), islessequal(),
          islessgreater(), isunordered()
      
      This...
      f464cdae
  30. 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'
      350370aa
  31. 23 Aug, 2001 1 commit
  32. 10 May, 2001 1 commit
    • Stewart Brodie's avatar
      Fix for strxfrm() · 8159da18
      Stewart Brodie authored
      Detail:
        strxfrm was passing the buffers to the Territory module SWI the wrong
          way around so Territory_TransformString copied the destination over
          the source rather than vice versa!
      Admin:
        Reported by <mailto:ian.foster@gps.tandb.co.uk>
        Fixes Bugzilla bug #4375
      
      
      Version 5.33. Tagged as 'RISC_OSLib-5_33'
      8159da18
  33. 17 Apr, 2001 1 commit
  34. 11 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      strcmp() fix was broken. · 534e1478
      Stewart Brodie authored
      Detail:
        This alternate implementation returned non-zero for equal strings,
          because the tidyup routine failed to stop examining the differing
          words when it found matching zero bytes.
      Admin:
        Tested in softload C library, and in Lazarus ROM image.  strcmp()
          appears to be working per spec now.
      
      Version 5.31. Tagged as 'RISC_OSLib-5_31'
      534e1478
  35. 06 Apr, 2001 1 commit
    • Stewart Brodie's avatar
      Fix for strcmp(). · 9d5bf66a
      Stewart Brodie authored
        Fix for RISC_OSLib res() function.
      Detail:
        Version 4.89 featured an improved strcmp() routine that didn't actually
          work properly (bug #4085).  The return values had the wrong sign if this
          optimised code was used and the string contained top-bit set chars.
        Removed that rlib.s.asmdefs hack as the comment in the makefile suggested.
          Nothing needs it any more as the assembler sources that require it now
          get via a -PD argument.
        res_ prefix function was still wrong as it failed to detect valid but wrong
          filenames, hence the "Make$Path not defined" errors in the latest tools
          release.
      Admin:
        Fixes Bugzilla bug #4085
        Should fix BaseSW's build problems too.
      
      Version 5.29. Tagged as 'RISC_OSLib-5_29'
      9d5bf66a
  36. 22 Feb, 2001 1 commit
    • Stewart Brodie's avatar
      fwrite performance improved significantly. · 0bb3e26a
      Stewart Brodie authored
        Another getenv() bug fixed.
      Detail:
        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.
      Admin:
        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'
      0bb3e26a
  37. 19 Oct, 2000 1 commit
    • Paul Skirrow's avatar
      Changed getenv to ensure it always allocates a buffer before calling · 9076880f
      Paul Skirrow authored
        OS_ReadVarVal.
      
      Detail:
        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.
      
      Admin:
        Untested.
      
      Version 5.20. Tagged as 'RISC_OSLib-5_20'
      9076880f
  38. 03 Oct, 2000 1 commit
  39. 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.
      Detail:
        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.
      Admin:
        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'
      5810d878