- 05 Sep, 2020 1 commit
-
-
Ben Avison authored
This utilises a weak symbol import so that if the symbol `Resources` resolves at link time, it is called to discover the address of the resource file data block(s) to be installed in ResourceFS. If this fails, it drops back to using the `s.ResFiles` source file as previously, thereby ensuring compatibility with components that have not yet been converted to use ResGen. Since `Resources` is the default area name (and thus discovery function name) used for ResGen in the shared makefiles, this makes it as simple as possible to utilise it. Version 6.08. Tagged as 'RISC_OSLib-6_08'
-
- 06 Jul, 2020 1 commit
-
-
Jeffrey Lee authored
As noted in https://www.riscosopen.org/forum/forums/9/topics/15359, MRS instructions which are executed in user mode may return unknown values for the CPSR E, A, I, F and M fields on ARMv8 CPUs. At the moment the only observed deviation from normal behaviour is that CPUs which lack AArch32 privileged-mode support may return zero for the fields. This was found to confuse some 26 vs. 32 bit mode checks in CLib. Clearly we're a long way away from having a version of RISC OS which can run on a CPU that lacks AArch32 privileged mode support, but we can still try and make sure user-mode applications are compatible with them. So this change adjusts the mode checks in the stubs and overlay manager so that programs linked with them should function correctly (TEQ is now used instead of MRS) Note that once we do start porting RISC OS to one of the troublesome CPUs, there are many more potentially troublesome MRS's within the module code that will need adjusting, especially if CPUs start returning values other than zero. Version 6.07. Tagged as 'RISC_OSLib-6_07'
-
- 09 May, 2020 2 commits
-
-
Jeffrey Lee authored
Use extended scroll requests to handle mouse wheel scrolling, to avoid the "thumbing" code getting confused and thinking the user is dragging the scrollbar (the "thumbing" mode of scrolling isn't desirable for the mouse wheel, because it largely ignores the requested scroll distance) This change allows Edit & SrcEdit (and anything else using txtar) to handle the scroll wheel better, now that the WindowScroll module is controlling things. Version 6.06. Tagged as 'RISC_OSLib-6_06'
-
ROOL authored
Detail: Export sprite_put_mask_scaled when UROM. Also, delete sprite_put_greyscaled() which has been unimplemented in SpriteExtend since RISC OS 3.60. Admin: Required by Paint bounty. Version 6.05. Not tagged
-
- 06 May, 2020 4 commits
-
-
ROOL authored
Detail: Was (trying to) clear the M32 flag in {CONFIG}=32. Ref: https://www.riscosopen.org/forum/forums/1/topics/15080?page=1#posts-99441 Makefile updated to only pass rlib's txt switch when building rlib. Version 6.05. Tagged as 'RISC_OSLib-6_05'
-
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.
-
ROOL authored
Detail: assert.h - definition of static_assert complex.h - definition of CMPLX[F|L] float.h - various implementation defines stdio.h - hide gets() as it's been withdrawn wchar.h - guard mbstate_t as it can also be in uchar.h, fix missing __valist definition 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.
-
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.
-
- 22 Apr, 2020 1 commit
-
-
Robert Sprowson authored
The spec of os_byte() requires 2 valid pointers, since the return values are unconditionally written to them. Use a dummy pointer for the unwanted result, not 0. Fixes application crash https://www.riscosopen.org/forum/forums/1/topics/15189#posts-101073. Version 6.04. Tagged as 'RISC_OSLib-6_04'
-
- 20 Jul, 2019 1 commit
-
-
Robert Sprowson authored
The change of MIN() to a macro in RISC_OSLib-6_02 tripped up as it called the argument number parse function twice, which advances the parsing offset as a sideeffect. Read it once, then evaluate MIN(). Mark the string argument to txtar__readoptnum() as const. Ref: https://www.riscosopen.org/forum/forums/11/topics/14632 Version 6.03. Tagged as 'RISC_OSLib-6_03'
-
- 29 Jun, 2019 2 commits
-
-
Robert Sprowson authored
Share a (macro) definition with txt1 rather than having lots of local functions scattered around. Version 6.02. Tagged as 'RISC_OSLib-6_02'
-
Robert Sprowson authored
Only suppress the '*' when an existing file is dropped into an empty window, not if via scrap (ie. an application supporting the clipboard, but not the ram fetch protocol). Fixes ticket #461.
-
- 09 Jun, 2019 1 commit
-
-
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'
-
- 17 Mar, 2019 1 commit
-
-
ROOL authored
Detail: Add wimp_autoscroll to rlib entries. Version 6.00. Not tagged
-
- 16 Mar, 2019 1 commit
-
-
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'
-
- 09 Feb, 2019 1 commit
-
-
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'
-
- 26 Jan, 2019 1 commit
-
-
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'
-
- 11 Jun, 2018 1 commit
-
-
Jeffrey Lee authored
Detail: kernel/s/k_body - CPSR_f is the correct field for the NZCV flags, not _c Admin: Untested Version 5.97. Tagged as 'RISC_OSLib-5_97'
-
- 10 Jun, 2018 1 commit
-
-
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'
-
- 14 Apr, 2018 1 commit
-
-
Jeffrey Lee authored
Detail: kernel/s/k_body - Update AbortFindHandler to check that SP & SL are both word aligned, especially because the code will attempt to load from SL to check for the stack chunk magic marker. Admin: Tested on BB-xM Avoids some "abort while in abort handler" type scenarios if an abort occurs while SP/SL are invalid Version 5.95. Tagged as 'RISC_OSLib-5_95'
-
- 29 Oct, 2017 1 commit
-
-
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'
-
- 03 Sep, 2017 1 commit
-
-
Jeffrey Lee authored
Detail: kernel/s/k_body - Eliminate a couple of global OS_SynchroniseCodeAreas calls in _kernel_init and _kernel_system s/initmodule - Eliminate a global OS_SynchroniseCodeAreas call in _Shared_Lib_Module_SWI_Code Admin: Tested on iMx6 Improves performance with SMP ROMs, where global D-cache clean isn't really possible Version 5.93. Tagged as 'RISC_OSLib-5_93'
-
- 28 May, 2016 1 commit
-
-
Jeffrey Lee authored
Detail: kernel/s/k_body, s/initmodule - Remove NOPs from after PSR manipulation macros; the macros now fully take care of ARM2 & StrongARM compatibility for us Admin: Tested PlingSystem build on (ARM3) RISC OS 3.1 Requires HdrSrc-2_63 for ARM2 compatibility Version 5.92. Tagged as 'RISC_OSLib-5_92'
-
- 25 May, 2016 1 commit
-
-
Jeffrey Lee authored
Detail: s/longlong - Copy-paste error led to conditional being on wrong line Admin: Tested with Raspberry Pi ROM build Version 5.91. Retagged as 'RISC_OSLib-5_91'
-
- 24 May, 2016 1 commit
-
-
Jeffrey Lee authored
When multiple CPU architectures are supported, allow dynamically linked clients to be given optimal versions of routines where possible Detail: This set of changes adds support for representing architecture-specific variants of routines within the export tables which the shared C library uses to fill in the client's stubs. This allows builds of the module which target multiple architectures (e.g. IOMD, Raspberry Pi, or softloads) to offer the most optimal versions of routines to clients wherever multiple variants exist. If only one architecture is supported, only one version of each routine will be built, and no variant tables will be generated. Currently routine selection for staticly linked clients isn't supported - staticly linked targets will only use the most backwards-compatible version of the routines, as before. Also not all routines are catered for yet (e.g. _ll_udiv) File changes: - s/h_common - New file containing macros used during variant table construction - Makefile - Set SHAR...
-
- 14 May, 2016 1 commit
-
-
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'
-
- 08 May, 2016 1 commit
-
-
Jeffrey Lee authored
Prefer CPS over MSR for PSR manipulation. Use UDIV/SDIV for general-purpose division, and UMULL for /10. Detail: s/k_body: - _kernel_irqs_off and _kernel_irqs_on now use CPS for disabling/enabling IRQs as opposed to MSR. Apart from being shorter code sequences, it's generally a faster instruction. - __rt_udiv and __rt_sdiv (and aliases) now use the UDIV and SDIV instructions if building for ARMv7VE - __rt_udiv10 and __rt_sdiv10 (and aliases) now use UMULL to multiply by 1/10 when building for targets with long multiply support, as this is faster than the old method. UDIV/SDIV can be fast too, but only for small numbers, making UMULL the best for the general case. Admin: Tested on Cortex-A15 Prototyping of division routines on assorted CPUs shows that UDIV/SDIV is generally between 20% and 400% faster than the old routine (Cortex-A7, Cortex-A53), or up to 1300% faster on Cortex-A15 (the CPU does not like the old routine!) Division by 10 is now about 20% faster across all appropriate CPUs Version 5.89. Tagged as 'RISC_OSLib-5_89'
-
- 01 Mar, 2016 2 commits
-
-
Ben Avison authored
Detail: AcquireMutex doesn't have the same functionality as Arm2Swp, best not to make people think they might do. Also add an extra literal pool because otherwise some instructions don't reach when doing APCS-32 softload builds. Retagged as 'RISC_OSLib-5_88'
-
Robert Sprowson authored
Retagged as RISC_OSLib-5_88.
-
- 29 Feb, 2016 1 commit
-
-
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'
-
- 26 Feb, 2016 1 commit
-
-
Robert Sprowson authored
C version of the definition from Hdr:Messages. Retagged as RISC_OSLib-5_87.
-
- 13 Feb, 2016 1 commit
-
-
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'
-
- 07 Feb, 2016 2 commits
-
-
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
-
Robert Sprowson authored
-
- 30 Jan, 2016 1 commit
-
-
ROOL authored
Admin: Part of submission from Martin Avison. Not tagged.
-
- 08 Nov, 2015 1 commit
-
-
ROOL authored
Detail: Export Hdr:ATA if present. Admin: Tagged as RISC_OSLib-5_86-1 since existing binaries unchanged.
-
- 08 Aug, 2015 1 commit
-
-
Robert Sprowson authored
See ISO9899:1999 7.25.3.2.1. Retagged as RISC_OSLib-5_86.
-
- 01 Aug, 2015 1 commit
-
-
Robert Sprowson authored
Retagged as RISC_OSLib-5_86
-
- 30 Jun, 2015 1 commit
-
-
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'
-
- 15 May, 2015 1 commit
-
-
Robert Sprowson authored
Not tagged.
-