Skip to content

Commit

Permalink
Imported from svn tag fireworkz__2020_03_27__2_24_02
Browse files Browse the repository at this point in the history
  • Loading branch information
skswales committed Aug 21, 2022
1 parent 402e569 commit 73a5a5b
Show file tree
Hide file tree
Showing 18 changed files with 71 additions and 33 deletions.
2 changes: 1 addition & 1 deletion t5/Build/windows/OUTx86/BLDCD2.BAT
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
pushd %~dp0
IF NOT EXIST BLDCD2.BAT EXIT

set OUT_DIR=fwin-22401
set OUT_DIR=fwin-22402

rmdir /s /q %OUT_DIR%
mkdir %OUT_DIR%\
Expand Down
4 changes: 2 additions & 2 deletions t5/Build/windows/OUTx86/firewrkz-x86.iss
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ MinVersion=5.1sp3
; Require XP SP3
; AppVersion=2.xx.yy
; AppVerName=Colton Software Fireworkz 2.xx.yy
AppVersion=2.24.01
AppVerName=Colton Software Fireworkz 2.24.01
AppVersion=2.24.02
AppVerName=Colton Software Fireworkz 2.24.02
AppCopyright=Copyright (C) 1992-2020 Colton Software
AppId=Colton Fireworkz for Windows (32-bit)
AppName=Colton Software Fireworkz for Windows (32-bit)
Expand Down
2 changes: 2 additions & 0 deletions t5/cmodules/aligator.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ _al_array_alloc(
return((P_BYTE) (uintptr_t) 1); /* handle allocated, but pointer unusable */

assert(num_elements < 0xF0000000U); /* check possible -ve client */
assert(num_elements < 0x80000000U); /* sanity for debug */

if(status_fail(*p_status = realloc_array(p_array_block, num_elements, &array_index /*filled*/)))
{
Expand Down Expand Up @@ -1276,6 +1277,7 @@ _al_array_extend_by(
*p_status = STATUS_OK;

assert(add_elements < 0xF0000000U); /* check possible -ve client */
assert(add_elements < 0x80000000U); /* sanity for debug */

/* NB. don't use realloc with 0 elements to allocate a handle without memory - use alloc. this realloc simply returns the current pointer, if any */
if(0 == add_elements)
Expand Down
2 changes: 1 addition & 1 deletion t5/cmodules/ev_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,11 +1078,11 @@ proc_custom_argument(
}

outidx += uchars_char_encode_off(name_out, EV_INTNAMLEN, outidx, ident_ch);
assert(outidx < EV_INTNAMLEN);

used_in += bytes_of_char;
}

assert(outidx < BUF_EV_INTNAMLEN);
PtrPutByteOff(name_out, outidx, CH_NULL);

ustr_IncBytes(ci, used_in);
Expand Down
3 changes: 3 additions & 0 deletions t5/cmodules/numform.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,9 @@ numform(
numform_section_extract_numeric(&numform_info, ustr_bptr(own_numform), sizeof32(own_numform), p_numform_parms->ustr_numform_numeric, ustr_bptr(num_ustr_buf), sizeof32(num_ustr_buf));
break;

case DATA_ID_LOGICAL:
/*break;*/

case DATA_ID_WORD8:
case DATA_ID_WORD16:
case DATA_ID_WORD32:
Expand Down
2 changes: 2 additions & 0 deletions t5/cmodules/quickblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ quick_block_extend_by(
return((P_BYTE) (uintptr_t) 1);

assert(extend_by < 0xF0000000U); /* real world use always +ve; check possible -ve client */
assert(extend_by < 0x80000000U); /* sanity for debug */

#if 0
if((S32) extend_by < 0)
Expand Down Expand Up @@ -232,6 +233,7 @@ quick_block_bytes_add(
P_BYTE p_byte;

assert(n_bytes < 0xF0000000U); /* check possible -ve client */
assert(n_bytes < 0x80000000U); /* sanity for debug */

if(NULL == (p_byte = quick_block_extend_by(p_quick_block, n_bytes, &status)))
return(status);
Expand Down
1 change: 1 addition & 0 deletions t5/cmodules/quicktblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ quick_tblock_extend_by(
return((PTCH) (uintptr_t) 1);

assert(extend_by < 0xF0000000U); /* real world use always +ve; check possible -ve client */
assert(extend_by < 0x80000000U); /* sanity for debug */

#if 0
if((S32) extend_by < 0)
Expand Down
1 change: 1 addition & 0 deletions t5/cmodules/quickwblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ quick_wblock_extend_by(
return((PWCH) (uintptr_t) 2);

assert(extend_by < 0xF0000000U); /* real world use always +ve; check possible -ve client */
assert(extend_by < 0x80000000U); /* sanity for debug */

#if 0
if((S32) extend_by < 0)
Expand Down
57 changes: 38 additions & 19 deletions t5/cmodules/ss_const.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,33 +359,52 @@ ss_data_set_error(
/* this one rounds at the given significant place before floor-ing */

_Check_return_
extern F64
real_floor(
static F64
adjust_value_for_additional_rounding(
_InVal_ F64 f64)
{
F64 floor_value;
int exponent;
F64 mantissa = frexp(f64, &exponent); /* yields mantissa in ±[0.5,1.0) */
const int mantissa_digits_minus_n = DBL_MANT_DIG - 3;
const int exponent_minus_mdmn = exponent - mantissa_digits_minus_n;

if(global_preferences.ss_calc_additional_rounding)
if(exponent >= 0) /* no need to do more for negative exponents here */
{
int exponent;
F64 mantissa = frexp(f64, &exponent); /* yields mantissa in ±[0.5,1.0) */
const int mantissa_digits_minus_n = DBL_MANT_DIG - 3;
const int exponent_minus_mdmn = exponent - mantissa_digits_minus_n;
const F64 rounding_value = copysign(pow(2.0, exponent_minus_mdmn), mantissa);
const F64 adjusted_value = f64 + rounding_value;

if(exponent >= 0) /* no need to do more for negative exponents here */
{
const F64 rounding_value = copysign(pow(2.0, exponent_minus_mdmn), mantissa);
const F64 adjusted_value = f64 + rounding_value;

/* adjusted result */
floor_value = floor(adjusted_value);
return(floor_value);
}
/* adjusted result */
return(adjusted_value);
}

/* standard result */
floor_value = floor(f64);
return(floor_value);
return(f64);
}

_Check_return_
static inline_when_fast_fp F64
real_floor_try_additional_rounding(
_In_ F64 f64)
{
return(floor(adjust_value_for_additional_rounding(f64)));
}

_Check_return_
extern F64
real_floor(
_InVal_ F64 f64)
{
const F64 floor_value = floor(f64);

/* first do the cheap step to see if we're already at an integer (or ±inf) */
if(floor_value == f64)
return(f64);

if(!global_preferences.ss_calc_additional_rounding)
return(floor_value); /* standard result */

/* if not already an integer, and allowed, then do the more expensive bit */
return(real_floor_try_additional_rounding(f64));
}

#else
Expand Down
4 changes: 2 additions & 2 deletions t5/common/mf_mid
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#TEXTUAL_VERSION_NUMBER=2.xx.yy (yy usually 00)
TEXTUAL_VERSION_NUMBER=2.24
TEXTUAL_VERSION_NUMBER=2.24.01
TEXTUAL_VERSION_NUMBER=2.24.02
# this goes in !Boot/!Run/Config files

STUBS_VERSION_NUMBER=22400
STUBS_VERSION_NUMBER=22402
# when changing version number for release, remember:
# common.gflags.h
# common.mf_mid
Expand Down
5 changes: 5 additions & 0 deletions t5/firewrkz/RelNotes.htm
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ <h2 id="ReleaseHistory">Release History</h2>
</p>


<h3>2.24.02 (27 Mar 2020)</h3>

<p>Fixed a floating point rounding issue that caused problems with subtraction of dates.</p>


<h3>2.24.01 (26 Mar 2020)</h3>

<p>Fixed the WEEKDAY() spreadsheet function (broken in 2.24 when mode parameter added).</p>
Expand Down
5 changes: 5 additions & 0 deletions t5/firewrkz/RelNotesW.htm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ <h2 id="ReleaseHistory">Release History</h2>
</p>


<h3>2.24.02 (27 Mar 2020)</h3>

<p>Fixed a floating point rounding issue that caused problems with subtraction of dates.</p>


<h3>2.24.01 (26 Mar 2020)</h3>

<p>Fixed the WEEKDAY() spreadsheet function (broken in 2.24 when mode parameter added).</p>
Expand Down
2 changes: 1 addition & 1 deletion t5/firewrkz/r/RiscPkg/Control
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Priority: Optional
Licence: Free
Maintainer: Colton Software <[email protected]>
Standards-Version: 0.4.0
Version: 2.24.1
Version: 2.24.2
Recommends: Fireworkz-Manuals,Fireworkz-Examples
Description: Word Processor & Spreadsheet
You can use Fireworkz as a word processor to write letters, reports, books, invitations, shopping lists, schedules and other documents.
Expand Down
2 changes: 1 addition & 1 deletion t5/firewrkz/r32b/MakeRiscPkg,fd7
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| Copyright (C) 1998-2015 R W Colton

Set t5$Release 2_24
Set t5$Release 2_24_01
Set t5$Release 2_24_02

Set t5$Disc $.Temp.Fire.Fireworkz_<t5$Release>
Set t5$Zip $.Temp.Fire.Fireworkz_<t5$Release>/zip
Expand Down
2 changes: 1 addition & 1 deletion t5/firewrkz/resource/windows/UK/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{Version:2.24.01;26 Mar 2020;Fireworkz for Windows (UK);Colton Software;Windows-1252}
{Version:2.24.02;27 Mar 2020;Fireworkz for Windows (UK);Colton Software;Windows-1252}
{RowTable:1}
{#:ObjectBindConstruct:object-id;command-suffix-character}
{ObjectBindConstruct:0;*}
Expand Down
4 changes: 2 additions & 2 deletions t5/firewrkz/resource/windows/UK/res00.rci
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ BEGIN
// The definitive list of files is in common.mf_mid
//1:2.xx.yy
//1:2.xx
0x1, "2.24.01"
0x2, "26 Mar 2020"
0x1, "2.24.02"
0x2, "27 Mar 2020"
//
// update date and version in the corresponding RelNotes HTML files too
//
Expand Down
4 changes: 2 additions & 2 deletions t5/ob_skel/resource/UK/msg
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# The definitive list of files is in common.mf_mid
#1:2.xx.yy
#1:2.xx
1:2.24.01
2:26 Mar 2020
1:2.24.02
2:27 Mar 2020
#
# update date and version in the corresponding RelNotes HTML files too
#
Expand Down
2 changes: 1 addition & 1 deletion t5/ob_skel/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/* NB keep in step with other files (definitive list in common.mf_mid) */

#define HEX_VERSION_NUMBER 0x22401
#define HEX_VERSION_NUMBER 0x22402

/* for Windows RC file */

Expand Down

0 comments on commit 73a5a5b

Please sign in to comment.