mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
232b3bddef | ||
|
5ac3e495b2 | ||
|
56153d6615 | ||
|
2a4f399593 | ||
|
160de4bb38 | ||
|
db77e29a23 | ||
|
fe9cefe6ef | ||
|
ea4c50ade0 | ||
|
7f72908b95 | ||
|
a547c36f0a | ||
|
1e2698b42d | ||
|
33815f49e6 | ||
|
732279bcc3 | ||
|
7f4e1eb68d | ||
|
1232b59949 | ||
|
90feefc622 | ||
|
c97ee188ad | ||
|
ae85846839 | ||
|
e096bd9ad8 | ||
|
884b1bc81b | ||
|
a30a518ba7 |
43
.github/workflows/codeql-analysis.yml
vendored
43
.github/workflows/codeql-analysis.yml
vendored
@@ -13,10 +13,10 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
branches: [ "master" ]
|
||||
schedule:
|
||||
- cron: '41 1 * * 6'
|
||||
|
||||
@@ -33,39 +33,48 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
# - run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
# echo "Run, Build Application using script"
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
|
12
.gitignore
vendored
12
.gitignore
vendored
@@ -4,8 +4,8 @@
|
||||
#
|
||||
*~
|
||||
*.BAK
|
||||
.DS_Store
|
||||
core*
|
||||
.DS_Store
|
||||
*.dSYM/
|
||||
*.exe
|
||||
*.[oa]
|
||||
@@ -21,8 +21,6 @@ core*
|
||||
#
|
||||
# We sort the list below via: sort -d -u
|
||||
#
|
||||
Makefile.our
|
||||
NOTES
|
||||
align32
|
||||
align32.h
|
||||
align32_tmp
|
||||
@@ -42,13 +40,13 @@ chk_c
|
||||
conf.h
|
||||
const_tmp
|
||||
cscript/4dsphere
|
||||
cscript/README
|
||||
cscript/.all
|
||||
cscript/fproduct
|
||||
cscript/mersenne
|
||||
cscript/piforever
|
||||
cscript/plus
|
||||
cscript/powerterm
|
||||
cscript/README
|
||||
cscript/simple
|
||||
cscript/square
|
||||
custom/.all
|
||||
@@ -128,8 +126,6 @@ have_urandom.h
|
||||
have_ustat
|
||||
have_ustat.h
|
||||
have_varvs
|
||||
help/COPYING
|
||||
help/COPYING-LGPL
|
||||
help/.all
|
||||
help/binding
|
||||
help/bindings
|
||||
@@ -140,6 +136,8 @@ help/change
|
||||
help/changes
|
||||
help/contrib
|
||||
help/copy
|
||||
help/COPYING
|
||||
help/COPYING-LGPL
|
||||
help/cscript
|
||||
help/custom_cal
|
||||
help/errorcode
|
||||
@@ -163,8 +161,10 @@ libcustcalc.*
|
||||
ll_tmp
|
||||
longbits
|
||||
longbits.h
|
||||
Makefile.our
|
||||
memmv_tmp
|
||||
newstr_tmp
|
||||
NOTES
|
||||
offscl_tmp
|
||||
outfile
|
||||
posscl_tmp
|
||||
|
26
CHANGES
26
CHANGES
@@ -1,3 +1,29 @@
|
||||
The following are the changes from calc version 2.15.0.7 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.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.15.0.6 to 2.15.0.7:
|
||||
|
||||
Thanks to GitHub user @bambooleafz a critical bug (GitHub issue
|
||||
#148 - https://github.com/lcn2/calc/issues/148) they identified
|
||||
was fixed.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.15.0.5 to 2.15.0.6:
|
||||
|
||||
Thanks to GitHub user @ashamedbit, a long standing memory leak in
|
||||
zrandom.c has been fixed.
|
||||
|
||||
|
||||
The following are the changes from calc version 2.15.0.4 to 2.15.0.5:
|
||||
|
||||
make clobber now removes the legacy files: have_fpos.h, help/man,
|
||||
|
@@ -1243,11 +1243,11 @@ EXT=
|
||||
|
||||
# The calc version in the form of x.y.z.w
|
||||
#
|
||||
VERSION= 2.15.0.5
|
||||
VERSION= 2.15.1.0
|
||||
|
||||
# The calc major version in the form of x.y.z
|
||||
#
|
||||
VER= 2.15.0
|
||||
VER= 2.15.1
|
||||
|
||||
# Names of shared libraries with versions
|
||||
#
|
||||
|
@@ -3030,6 +3030,24 @@ define test_2600()
|
||||
strcat(str(tnum++),
|
||||
': round(log(1.2+1.2i,1e-10),10) == ',
|
||||
'0.2296962439+0.3410940885i'));
|
||||
vrfy(log2(0.5) == -1,
|
||||
strcat(str(tnum++), ': log2(0.5) == -1'));
|
||||
vrfy(log2(0.5) == -1,
|
||||
strcat(str(tnum++), ': log2(0.5) == -1'));
|
||||
vrfy(log2(0.5) == log2(0.5),
|
||||
strcat(str(tnum++), ': log2(0.5) == log2(0.5)'));
|
||||
vrfy(0^0 == 1,
|
||||
strcat(str(tnum++), ': 0^0 == 1'));
|
||||
vrfy(1^0 == 1,
|
||||
strcat(str(tnum++), ': 1^0 == 1'));
|
||||
vrfy(1^1 == 1,
|
||||
strcat(str(tnum++), ': 1^1 == 1'));
|
||||
vrfy(2^0 == 1,
|
||||
strcat(str(tnum++), ': 2^0 == 1'));
|
||||
vrfy(log2(1) == 0,
|
||||
strcat(str(tnum++), ': log2(1) == 0'));
|
||||
vrfy(log2(1.0) == 0,
|
||||
strcat(str(tnum++), ': log2(1.0) == 0'));
|
||||
vrfy(log2(2) == 1,
|
||||
strcat(str(tnum++), ': log2(2) == 1'));
|
||||
vrfy(log2(4) == 2,
|
||||
|
2
calc.man
2
calc.man
@@ -1512,7 +1512,7 @@ the following GitHub repo:
|
||||
https://github.com/lcn2/calc
|
||||
.in -0.5i
|
||||
.sp
|
||||
The very latest calc souece is found at the top master branch.
|
||||
The very latest calc source is found at the top master branch.
|
||||
|
||||
.PP
|
||||
|
||||
|
@@ -13,7 +13,7 @@ following topics:
|
||||
config configuration parameters
|
||||
custom information about the custom builtin interface
|
||||
define how to define functions
|
||||
environment how environment variables effect calc
|
||||
environment how environment variables affect calc
|
||||
errorcodes calc generated error codes
|
||||
expression expression sequences
|
||||
file using files
|
||||
|
2
qfunc.c
2
qfunc.c
@@ -1953,7 +1953,7 @@ qispowerof2(NUMBER *q, NUMBER **qlog2)
|
||||
* Set *qlog2 to base 2 logarithm of q, which will be a negative value,
|
||||
* and return true.
|
||||
*/
|
||||
*qlog2 = utoq(log2);
|
||||
**qlog2 = *utoq(log2);
|
||||
(*qlog2)->num.sign = !(*qlog2)->num.sign; /* set *qlog2 to -log2 */
|
||||
return true;
|
||||
}
|
||||
|
33
trailblank
33
trailblank
@@ -182,8 +182,8 @@ PICKY_PHASE_1=$(
|
||||
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
|
||||
-name 'sample_many-static' -o -name 'sample_rand-static' -o \
|
||||
-name 'codeql-analysis.yml' -o -name tags -o -name '*.out' -o \
|
||||
-name '?' -o -iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
|
||||
-iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' \
|
||||
-iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
|
||||
-name '.lldbinit' -o -iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' \
|
||||
\) -prune -o -type f -print0 | \
|
||||
if [[ -x /usr/local/bin/picky ]]; then
|
||||
xargs -0 /usr/local/bin/picky -s -v -w132
|
||||
@@ -218,6 +218,35 @@ if [[ -n $BACKUP_MAKEILES ]]; then
|
||||
EXIT_CODE=7
|
||||
fi
|
||||
|
||||
|
||||
# look for ASCII tabs in non-Makefiles
|
||||
#
|
||||
TABS_FOUND=$(
|
||||
find . \( -path './NOTES' -o -path './calc' -o -path './ver_calc' -o \
|
||||
-name '*.o' -o -name '*.a' -o -name '*ptch*' -o -name 'core*' -o \
|
||||
-name '*.orig' -o -name '*.rej' -o -name '*.bak' -o \
|
||||
-name '*.ptch' -o -name 'core.*' -o \
|
||||
-name '*.so*' -o -name 'calc-static' -o -name 'libcalc.*' -o \
|
||||
-name 'sample_many' -o -name 'sample_rand' -o -name 'errcode' -o \
|
||||
-path './help/funclist' -o -path './have_stdvs' -o \
|
||||
-path './endian' -o -path './no_implicit' -o -name 'chk_c' -o \
|
||||
-path './longbits' -o -name '.*.swp' -o -name 'conf.h' -o \
|
||||
-name '.git' -o -path './custom/libcustcalc*' -o -path './libcustcalc*' -o \
|
||||
-name 'sample_many-static' -o -name 'sample_rand-static' -o \
|
||||
-name 'codeql-analysis.yml' -o -name tags -o -name '*.out' -o \
|
||||
-iname '*foo*' -o -iname '*bar*' -o -iname '*baz*' -o \
|
||||
-name '.lldbinit' -o -iname '*curds*' -o -iname '*whey*' -o -iname '*rmme*' -o \
|
||||
-iname 'Makefile*' -o -name rpm.mk -o -name 'trailblank' \
|
||||
\) -prune -o -type f -print0 | \
|
||||
xargs -0 grep -l -E ' '
|
||||
)
|
||||
if [[ -n $TABS_FOUND ]]; then
|
||||
echo
|
||||
echo '# ASCII TABs found in non-Makefiles:'
|
||||
echo "$TABS_FOUND"
|
||||
EXIT_CODE=8
|
||||
fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
exit "$EXIT_CODE"
|
||||
|
30
update_ver
30
update_ver
@@ -169,6 +169,7 @@ for i in $MK_SET1; do
|
||||
echo "$i: $VER_STRING"
|
||||
fi
|
||||
done
|
||||
echo
|
||||
if [[ -n $VER_ERR ]]; then
|
||||
echo "$0: FATAL: error in finding calc major version string"
|
||||
echo "$0: FATAL: exit 10"
|
||||
@@ -177,15 +178,36 @@ fi
|
||||
|
||||
# print other useful calc strings
|
||||
#
|
||||
export VER_CALC_OUTPUT=$(./ver_calc)
|
||||
echo 'Begin text strings used to produce this release:'
|
||||
echo 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv'
|
||||
echo
|
||||
echo "calc $(./ver_calc) release"
|
||||
echo
|
||||
echo 'calc-*'$(./ver_calc)'*'
|
||||
echo
|
||||
echo "Release v$(./ver_calc)"
|
||||
echo "$VER_CALC_OUTPUT"
|
||||
echo
|
||||
echo "v$VER_CALC_OUTPUT"
|
||||
echo
|
||||
echo "Release v$VER_CALC_OUTPUT"
|
||||
echo
|
||||
echo "calc $VER_CALC_OUTPUT release"
|
||||
echo
|
||||
echo 'For use with sourceforge.net:'
|
||||
echo
|
||||
echo 'cd /home/pfs/project/calc/calc'
|
||||
echo "mkdir $VER_CALC_OUTPUT"
|
||||
echo "cd $VER_CALC_OUTPUT"
|
||||
echo 'mput calc-*'"$VER_CALC_OUTPUT"'*'
|
||||
echo 'put /home/chongo/tmp/README.txt'
|
||||
echo 'ls'
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'
|
||||
echo 'End text strings used to produce this release:'
|
||||
echo
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
#
|
||||
echo
|
||||
echo "VERSION in Makefile.config is up to date"
|
||||
exit 0
|
||||
|
@@ -63,8 +63,8 @@
|
||||
*/
|
||||
#define MAJOR_VER 2 /* level 1: major library version */
|
||||
#define MINOR_VER 15 /* level 2: minor library version */
|
||||
#define MAJOR_PATCH 0 /* level 3: major software version level */
|
||||
#define MINOR_PATCH 5 /* level 4: minor software version level */
|
||||
#define MAJOR_PATCH 1 /* level 3: major software version level */
|
||||
#define MINOR_PATCH 0 /* level 4: minor software version level */
|
||||
|
||||
|
||||
#endif /* !INCLUDE_VERSION_H*/
|
||||
|
Reference in New Issue
Block a user