Commit 0c846685 authored by ROOL's avatar ROOL 🤖
Browse files

CLib and rlib header updates

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'
parent 2f520d7e
......@@ -160,6 +160,7 @@ HEADERS =\
CLIB:h.complex \
CLIB:h.ctype \
CLIB:h.errno \
CLIB:h.fenv \
CLIB:h.float \
CLIB:h.inttypes \
CLIB:h.iso646 \
......
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.99"
Module_Version SETA 599
Module_MajorVersion SETS "6.00"
Module_Version SETA 600
Module_MinorVersion SETS ""
Module_Date SETS "09 Feb 2019"
Module_ApplicationDate SETS "09-Feb-19"
Module_Date SETS "16 Mar 2019"
Module_ApplicationDate SETS "16-Mar-19"
Module_ComponentName SETS "RISC_OSLib"
Module_ComponentPath SETS "apache/RiscOS/Sources/Lib/RISC_OSLib"
Module_FullVersion SETS "5.99"
Module_HelpVersion SETS "5.99 (09 Feb 2019)"
Module_FullVersion SETS "6.00"
Module_HelpVersion SETS "6.00 (16 Mar 2019)"
END
/* (5.99)
/* (6.00)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.99
#define Module_MajorVersion_CMHG 6.00
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Feb 2019
#define Module_Date_CMHG 16 Mar 2019
#define Module_MajorVersion "5.99"
#define Module_Version 599
#define Module_MajorVersion "6.00"
#define Module_Version 600
#define Module_MinorVersion ""
#define Module_Date "09 Feb 2019"
#define Module_Date "16 Mar 2019"
#define Module_ApplicationDate "09-Feb-19"
#define Module_ApplicationDate "16-Mar-19"
#define Module_ComponentName "RISC_OSLib"
#define Module_ComponentPath "apache/RiscOS/Sources/Lib/RISC_OSLib"
#define Module_FullVersion "5.99"
#define Module_HelpVersion "5.99 (09 Feb 2019)"
#define Module_LibraryVersionInfo "5:99"
#define Module_FullVersion "6.00"
#define Module_HelpVersion "6.00 (16 Mar 2019)"
#define Module_LibraryVersionInfo "6:0"
......@@ -73,9 +73,17 @@ extern const double HUGE_VAL;
/* the mutually exclusive kinds of floating-point values for fpclassify */
#endif
#ifdef __FP_FAST_FMA
#define FP_FAST_FMA 1
#endif
#ifdef __FP_FAST_FMAF
#define FP_FAST_FMAF 1
/* indicates that the fmaf function generally executes about as fast as */
/* a multiply and an add of float operands. fma and fmal are slow. */
#endif
#ifdef __FP_FAST_FMAL
#define FP_FAST_FMAL 1
#endif
/* indicates that the fmaf/fmaf/fmal functions generally execute about */
/* as fast, or faster than, a multiply and an add of the operands. */
#define FP_ILOGB0 (-0x7FFFFFFF) /* -INT_MAX */
#define FP_ILOGBNAN (~0x7FFFFFFF) /* INT_MIN */
......@@ -578,6 +586,7 @@ double __d_trunc(double);
double __d_rint(double);
long int __d_lrint(double);
double __d_rem(double,double);
double __d_fma(double,double,double);
#ifdef __MATH_FORCE_INLINING
# if __STDC_VERSION__ >= 199901
#define acos(x) __d_acos(x)
......@@ -603,6 +612,7 @@ double __d_rem(double,double);
#define rint(x) __d_rint(x)
#define lrint(x) __d_lrint(x)
#define remainder(x,y) __d_rem(x,y)
#define fma(x,y,z) __d_fma(x,y,z)
#ifndef __cplusplus
__caller_narrow float __r_acos(float);
__caller_narrow float __r_asin(float);
......
......@@ -79,6 +79,7 @@
#define CloseDown 0x000400DD
#define StartTask 0x000400DE
#define ReportError 0x000400DF
#define AutoScroll 0x000400FD
#define GetWindowOutline (0x000400c0+32)
#define PollIdle (0x000400c0+33)
#define PlotIcon (0x000400c0+34)
......@@ -668,6 +669,24 @@ os_error *wimp_blockcopy(wimp_w w, wimp_box *source, int x, int y)
return os_swix(BlockCopy, &r);
}
os_error *wimp_autoscroll(int flags, wimp_autoscrollblk *block, int *status)
{
os_regset r;
os_error *e;
r.r[0] = flags;
r.r[1] = (int) block;
e = os_swix(AutoScroll, &r);
if (status && e == NULL)
{
*status = r.r[0];
}
return(e);
}
os_error *wimp_reporterror(os_error* er, wimp_errflags flags, char *name)
{
return os_swi3(os_X | ReportError, (int) er, flags, (int) name);
......
......@@ -298,6 +298,23 @@ typedef struct {
int index; /* position within icon */
} wimp_caretstr;
typedef void (*wimp_autoscroll_proc)(int newstate, int oldstate);
typedef struct {
wimp_w w;
int left_pausezonewidth;
int bottom_pausezoneheight;
int right_pausezonewidth;
int top_pausezoneheight;
int pause; /* delay in cs or none or useconfigduration */
#define wimp_AUTOSCROLL_pause_useconfigduration (-1)
#define wimp_AUTOSCROLL_pause_none (0)
wimp_autoscroll_proc handler;
#define wimp_AUTOSCROLL_handler_none ((wimp_autoscroll_proc)0)
#define wimp_AUTOSCROLL_handler_wimp ((wimp_autoscroll_proc)1)
int handle; /* R12 value to pass to handler if applicable */
} wimp_autoscrollblk;
/* Message action codes are allocated just like SWI codes. */
typedef enum {
wimp_MCLOSEDOWN = 0, /* Reply if any dialogue with the user is required,
......@@ -821,6 +838,34 @@ os_error *wimp_blockcopy(wimp_w, wimp_box *source, int x, int y);
(in window coords). Invalidate any portions of the destination that cannot be
updated using on-screen copy. */
#define wimp_AUTOSCROLL_flags_enablehorizontal (1<<0)
#define wimp_AUTOSCROLL_flags_enablevertical (1<<1)
#define wimp_AUTOSCROLL_flags_enablescrollrequests (1<<2)
#define wimp_AUTOSCROLL_flags_readstate (1<<7)
#define wimp_AUTOSCROLL_status_horizontalenabled (1<<0)
#define wimp_AUTOSCROLL_status_verticalenabled (1<<1)
#define wimp_AUTOSCROLL_status_scrollrequestsenabled (1<<2)
#define wimp_AUTOSCROLL_status_autoscrolling (1<<8)
#define wimp_AUTOSCROLL_status_pointeroutsidewindow (1<<9)
#define wimp_AUTOSCROLL_status_pointerinpausezone (1<<10)
#define wimp_AUTOSCROLL_status_pointercentrezone (1<<11)
#define wimp_AUTOSCROLL_status_pointerleftcentre (1<<12)
#define wimp_AUTOSCROLL_status_pointerbelowcentre (1<<13)
#define wimp_AUTOSCROLL_status_pointerrightcentre (1<<14)
#define wimp_AUTOSCROLL_status_pointerabovecentre (1<<15)
#define wimp_AUTOSCROLL_status_workarealeft (1<<16)
#define wimp_AUTOSCROLL_status_workareabelow (1<<17)
#define wimp_AUTOSCROLL_status_workarearight (1<<18)
#define wimp_AUTOSCROLL_status_workareaabove (1<<19)
os_error *wimp_autoscroll(int flags /*in*/,
wimp_autoscrollblk *block /*in*/,
int *status /*out*/);
/* Start or stop an autoscroll operation.
* If status is non-null, return the status flags from the call also.
*/
typedef enum {
wimp_EOK = 1, /* put in "OK" box */
wimp_ECANCEL = 2, /* put in "CANCEL" box */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment