12 Commits

Author SHA256 Message Date
5408092592 Accepting request 1301218 from utilities
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1301218
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/calc?expand=0&rev=43
2025-08-25 18:39:02 +00:00
0a49d100a6 - Update to 2.16.0.0:
* Starting with calc version 2.16.0.0, the ability to perform arithmetic
    on addresses of values in calc objects has been greatly restricted.
  * Most arithmetic on of value addresses could easily cause calc to
    crash.  For example, prior to calc version 2.16.0.0, the following
    command was likely to crash calc: calc '*((&.)+1e9)'
  * Subtracting two value addresses is permitted, however there is NO
    guarantee that the address of a value will remain consistent across
    calc runs.  Addresses of values depend on the circumstances of when
    the calc values were formed.
  * The above restrictions and caveats apply to addresses of values.
    Such restrictions and caveats to NOT apply to the addresses of
    octets, NOR to the addresses within strings.  If isptr(x) == 2, then
    x is value-pointer and the above mentioned restrictions and caveats apply.
  * See "help address" for more information on value address arithmetic.
  * Added E_INVALID_DEREF (10610) error code to indicate the invalid
    dereferencing a non-variable.
  * Added E_INVALID_ADDR_OP (10611) error code to indicate an invalid
    arithmetic address operation.

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=104
2025-08-18 07:46:15 +00:00
55d46f745f - Update to 2.15.1.2:
* Removed use of HAVE_MEMMOVE as well have_memmv.c.
  * Removed the building and including of have_memmv.h.
  * Removed the memmove() function in blkcpy.c, used when HAVE_MEMMOVE was NOT defined.
  * The libc memmove(3) function as defined by <string.h> is now
    required to compile calc because the replacement code in
    blkcpy.c q was problematic, especially when regions overlap.
  * The HAVE_MEMMOVE make symbol was removed from Makefile.config.

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=103
2025-08-14 05:34:43 +00:00
1b89b164b3 - Update to 2.15.1.1:
* Change Makefile.config to, if not using not HomeBrew, then try to
    detect macports and/or using /opt/local/{lib,include}.
  * Put full date range (1989-2025) of calc source into version.h.

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=102
2025-04-25 13:35:39 +00:00
3a527f7b62 Accepting request 1226199 from utilities
OBS-URL: https://build.opensuse.org/request/show/1226199
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/calc?expand=0&rev=42
2024-11-25 22:21:50 +00:00
fe50a2a450 - Workaorund %attr(644…) setting this attribute also on the doc
directory if this is the first statement to copy docs over. The
  intention was clearly to set the files non-executable. Simply
  letting RPM copy the correct doc files first, using default
  attributes, results in the doc-dir having proper access modes.

Fixes that weird build error in Factory

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=100
2024-11-25 08:24:21 +00:00
521e631893 - Update to 2.15.1.0:
* Converted all ASCII tabs to ASCII spaces using a 8 character
    tab stop, for all files, except for all Makefiles (plus rpm.mk).
    The command `git diff -w` reports no changes.  There is no
    functionality change in calc: only ASCII tabs to ASCII spaces.
  * Fixed trailblank.  It was pruning . in its find search.
  * Added check for ASCII tabs is non-Makefiles.
  * This version will form the basis for the calc v2 to calc v3 fork.

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=99
2024-07-12 07:03:44 +00:00
2dc34209dd - Update to 2.15.0.7:
Fix bug regarding log2(x) #148

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=98
2024-05-29 05:05:19 +00:00
86e67ba632 - Update to 2.15.0.6:
* A long standing memory leak in zrandom.c has been fixed.

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=97
2024-02-13 06:51:23 +00:00
b0ee0008e7 - Update to 2.15.0.5:
* make clobber now removes the legacy files: have_fpos.h, help/man,
    and help/usage.  The latter 2 are now managed as help aliases
    in help.c.
  * make install now removes the legacy files: ${HELPDIR}/man
    and ${HELPDIR}/usage.
  * Fixed a problem where, when calc was linked with and uses GNU
    readline then for any multi-line copy-and-paste, only the first
    line is executed.  Thanks to GitHub user @malfisya for reporting
    this problem, and thanks to GitHub user @gromit1811 for doing
    the research needed to overcome deficiencies in the GNU readline
    documentation, and for supplying the work-a-round to allow
    multi-line copy-and-paste to work as expected!

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=96
2024-02-02 11:46:59 +00:00
a816528cfc - Update to 2.15.0.4:
* Fixed bug that caused calc to fail to compile filepos2z() in file.c
   on little endian machines for the Debian apcalc package.
  * Removed unused macros from zmath.h:
    + SWAP_B32_IN_HASH(dest, src)
    + SWAP_B16_IN_HASH(dest, src)
    + SWAP_B8_IN_HASH(dest, src)
    + SWAP_B32_IN_FLAG(dest, src)
    + SWAP_B16_IN_FLAG(dest, src)
    + SWAP_B8_IN_FLAG(dest, src)
  * When SWAP_HALF_IN_B32(dest, src), SWAP_B32_IN_FULL(dest, src),
    SWAP_B16_IN_HALF(dest, src), SWAP_B32_IN_bool(dest, src),
    or SWAP_B32_IN_LEN(dest, src), SWAP_HALF_IN_FILEPOS(dest, src)
    is an assignment such as:
    (*(dest) = *(src))
    We now case the dest and src pointers to the proper type before
    referencing and performing the assignment.
  * Documented unexpected behavior when calc is running in
    "shell script mode" and the prompt builtin function is used
    without the -p flag.  Updated help/prompt, help/unexpected
    and the calc man page accordingly.
  * Unless calc is given the -p command line option, calc will reopen
    stdin as /dev/null instead of just closing stdin.  This prevents
    subsequent opens grabbing the 1st file descriptor.
  * Disable regress tests 4709, 4710, and 7763 because they print
    multi-byte sequences, which are just fine for calc, the awk
    used to evaluate the regression suite output in some legacy
    systems report a "multibyte conversion failure".
  * Added a number of missing Makefile variables to the "make env" rule.
  * The man command is used to format the calc.1 man page into calc.usage.

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=95
2023-12-22 06:57:09 +00:00
409057c2a9 - Update to 2.15.0.2:
* Added ${FSANITIZE} make variable to Makefile.config to hold
    common Address Sanitizer (ASAN) optins to modern Linux and macOS.
    The Address Sanitizer is NOT enabled not compiled in by default.
    Improved comments in Makefile.local for RHEL9.2 (Linux) and for
    macOS 14.0 that, when uncommented and calc is recompiled (i.e.,
    make clobber all) will enable the Address Sanitizer (ASAN) for calc.
  * Fixed memory leaks in the logn, aversin, acoversin, avercos,
    acovercos, ahaversin, ahavercos, ahacovercos, aexsec,
    aexcsc, and acrd.
  * Fixed a compile error in zmath.h that impacted legacy 32-bit Big
    Endian machines.
  * Fixed the check for <sys/mount.h> when forming have_sys_mount.h.
  * Added "STATIC bool blum_initialized = false" to zrandom.c to improve
    how the code detects if the Blum-Blum-Shub pseudo-random number
    generator is seeded or not, and how to free the state correctly.

OBS-URL: https://build.opensuse.org/package/show/utilities/calc?expand=0&rev=94
2023-12-10 14:17:15 +00:00
4 changed files with 167 additions and 7 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bbf9adf72e3cd392166037441f3f7874f6f857e778615aeb873cfcbf707eab6e
size 1026332

3
calc-2.16.0.0.tar.bz2 Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4de95d3655ac5a0e1a2bacacb869ba7d63451894ee9915e4533315fd71d92ba8
size 1033588

View File

@@ -1,3 +1,162 @@
-------------------------------------------------------------------
Mon Aug 18 07:43:30 UTC 2025 - Michael Vetter <mvetter@suse.com>
- Update to 2.16.0.0:
* Starting with calc version 2.16.0.0, the ability to perform arithmetic
on addresses of values in calc objects has been greatly restricted.
* Most arithmetic on of value addresses could easily cause calc to
crash. For example, prior to calc version 2.16.0.0, the following
command was likely to crash calc: calc '*((&.)+1e9)'
* Subtracting two value addresses is permitted, however there is NO
guarantee that the address of a value will remain consistent across
calc runs. Addresses of values depend on the circumstances of when
the calc values were formed.
* The above restrictions and caveats apply to addresses of values.
Such restrictions and caveats to NOT apply to the addresses of
octets, NOR to the addresses within strings. If isptr(x) == 2, then
x is value-pointer and the above mentioned restrictions and caveats apply.
* See "help address" for more information on value address arithmetic.
* Added E_INVALID_DEREF (10610) error code to indicate the invalid
dereferencing a non-variable.
* Added E_INVALID_ADDR_OP (10611) error code to indicate an invalid
arithmetic address operation.
-------------------------------------------------------------------
Thu Aug 14 05:33:26 UTC 2025 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.1.2:
* Removed use of HAVE_MEMMOVE as well have_memmv.c.
* Removed the building and including of have_memmv.h.
* Removed the memmove() function in blkcpy.c, used when HAVE_MEMMOVE was NOT defined.
* The libc memmove(3) function as defined by <string.h> is now
required to compile calc because the replacement code in
blkcpy.c q was problematic, especially when regions overlap.
* The HAVE_MEMMOVE make symbol was removed from Makefile.config.
-------------------------------------------------------------------
Fri Apr 25 13:32:08 UTC 2025 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.1.1:
* Change Makefile.config to, if not using not HomeBrew, then try to
detect macports and/or using /opt/local/{lib,include}.
* Put full date range (1989-2025) of calc source into version.h.
-------------------------------------------------------------------
Mon Nov 18 13:06:32 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Workaorund %attr(644…) setting this attribute also on the doc
directory if this is the first statement to copy docs over. The
intention was clearly to set the files non-executable. Simply
letting RPM copy the correct doc files first, using default
attributes, results in the doc-dir having proper access modes.
-------------------------------------------------------------------
Fri Jul 12 07:02:27 UTC 2024 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.1.0:
* Converted all ASCII tabs to ASCII spaces using a 8 character
tab stop, for all files, except for all Makefiles (plus rpm.mk).
The command `git diff -w` reports no changes. There is no
functionality change in calc: only ASCII tabs to ASCII spaces.
* Fixed trailblank. It was pruning . in its find search.
* Added check for ASCII tabs is non-Makefiles.
* This version will form the basis for the calc v2 to calc v3 fork.
-------------------------------------------------------------------
Wed May 29 05:04:00 UTC 2024 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.0.7:
Fix bug regarding log2(x) #148
-------------------------------------------------------------------
Tue Feb 13 06:50:46 UTC 2024 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.0.6:
* A long standing memory leak in zrandom.c has been fixed.
-------------------------------------------------------------------
Fri Feb 2 11:42:57 UTC 2024 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.0.5:
* make clobber now removes the legacy files: have_fpos.h, help/man,
and help/usage. The latter 2 are now managed as help aliases
in help.c.
* make install now removes the legacy files: ${HELPDIR}/man
and ${HELPDIR}/usage.
* Fixed a problem where, when calc was linked with and uses GNU
readline then for any multi-line copy-and-paste, only the first
line is executed. Thanks to GitHub user @malfisya for reporting
this problem, and thanks to GitHub user @gromit1811 for doing
the research needed to overcome deficiencies in the GNU readline
documentation, and for supplying the work-a-round to allow
multi-line copy-and-paste to work as expected!
-------------------------------------------------------------------
Fri Dec 22 06:53:37 UTC 2023 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.0.4:
* Fixed bug that caused calc to fail to compile filepos2z() in file.c
on little endian machines for the Debian apcalc package.
* Removed unused macros from zmath.h:
+ SWAP_B32_IN_HASH(dest, src)
+ SWAP_B16_IN_HASH(dest, src)
+ SWAP_B8_IN_HASH(dest, src)
+ SWAP_B32_IN_FLAG(dest, src)
+ SWAP_B16_IN_FLAG(dest, src)
+ SWAP_B8_IN_FLAG(dest, src)
* When SWAP_HALF_IN_B32(dest, src), SWAP_B32_IN_FULL(dest, src),
SWAP_B16_IN_HALF(dest, src), SWAP_B32_IN_bool(dest, src),
or SWAP_B32_IN_LEN(dest, src), SWAP_HALF_IN_FILEPOS(dest, src)
is an assignment such as:
(*(dest) = *(src))
We now case the dest and src pointers to the proper type before
referencing and performing the assignment.
* Documented unexpected behavior when calc is running in
"shell script mode" and the prompt builtin function is used
without the -p flag. Updated help/prompt, help/unexpected
and the calc man page accordingly.
* Unless calc is given the -p command line option, calc will reopen
stdin as /dev/null instead of just closing stdin. This prevents
subsequent opens grabbing the 1st file descriptor.
* Disable regress tests 4709, 4710, and 7763 because they print
multi-byte sequences, which are just fine for calc, the awk
used to evaluate the regression suite output in some legacy
systems report a "multibyte conversion failure".
* Added a number of missing Makefile variables to the "make env" rule.
* The man command is used to format the calc.1 man page into calc.usage.
* The "help calc" command now prints the formatted calc man page (calc.usage).
* The "help man" command now prints the formatted calc man page (calc.usage).
* The "help usage" command now prints the formatted calc man page (calc.usage).
* The file, calc.cat1, is formed by gzipping the calc.usage
formatted man page. The calc.cat1 is installed as the calc
cat section 1 man page.
* Avoiding use of modern [[ and ]] in Makefile for those legacy systems
whose shell do not support them. Be sure to use ||'s between []'s
to avoid problems with legacy shell such as the Bourne shell. *sigh*
* Fixed the order of "help full" to match the order of topics listed
buy the "help help" command.
* Sorted the halias[] help topics table in help.c using sort -d -u.
-------------------------------------------------------------------
Sun Dec 10 14:15:52 UTC 2023 - Michael Vetter <mvetter@suse.com>
- Update to 2.15.0.2:
* Added ${FSANITIZE} make variable to Makefile.config to hold
common Address Sanitizer (ASAN) optins to modern Linux and macOS.
The Address Sanitizer is NOT enabled not compiled in by default.
Improved comments in Makefile.local for RHEL9.2 (Linux) and for
macOS 14.0 that, when uncommented and calc is recompiled (i.e.,
make clobber all) will enable the Address Sanitizer (ASAN) for calc.
* Fixed memory leaks in the logn, aversin, acoversin, avercos,
acovercos, ahaversin, ahavercos, ahacovercos, aexsec,
aexcsc, and acrd.
* Fixed a compile error in zmath.h that impacted legacy 32-bit Big
Endian machines.
* Fixed the check for <sys/mount.h> when forming have_sys_mount.h.
* Added "STATIC bool blum_initialized = false" to zrandom.c to improve
how the code detects if the Blum-Blum-Shub pseudo-random number
generator is seeded or not, and how to free the state correctly.
-------------------------------------------------------------------
Thu Oct 5 12:38:15 UTC 2023 - Michael Vetter <mvetter@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package calc
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,10 @@
#
%define soname 2_15_0_1
%define soname 2_16_0_0
%define libname libcalc%{soname}
Name: calc
Version: 2.15.0.1
Version: 2.16.0.0
Release: 0
Summary: C-style arbitrary precision calculator
License: LGPL-2.1-only
@@ -28,6 +28,7 @@ URL: http://www.isthe.com/chongo/tech/comp/calc/index.html
Source0: http://www.isthe.com/chongo/src/calc/%{name}-%{version}.tar.bz2
Source1: README.openSUSE
BuildRequires: fdupes
BuildRequires: man
BuildRequires: ncurses-devel >= 5.5
BuildRequires: readline-devel >= 5.1
Requires: %{libname} = %{version}-%{release}
@@ -146,8 +147,8 @@ ln -sf %{_datadir}/%{name}/help/intro \
%files devel
%license COPYING COPYING-LGPL
%doc %attr(644, root, root) BUGS LIBRARY
%doc sample_many.c sample_rand.c sample.README README.md README.openSUSE
%doc %attr(644, root, root) BUGS LIBRARY
%{_includedir}/%{name}
%{_libdir}/libcalc.so
%{_libdir}/libcustcalc.so