mirror of
https://gitlab.com/rnger/amath
synced 2025-12-08 14:58:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd7884bc22 | ||
|
|
65fafb750f | ||
|
|
2164e79aef | ||
|
|
87c65aa678 | ||
|
|
2c9e8bece3 | ||
|
|
ee26a57960 | ||
|
|
538ad4ac23 | ||
|
|
524f83f22f | ||
|
|
9e712377a4 | ||
|
|
6eb56b056e | ||
|
|
3a52c27a9c | ||
|
|
f8cf191a46 | ||
|
|
aeb7f2e92c | ||
|
|
49b36ce2a3 | ||
|
|
f7de7b1447 | ||
|
|
d4ad72d17f | ||
|
|
8632644b9d | ||
|
|
9c70be649b | ||
|
|
fb19bb560d | ||
|
|
527376a92a | ||
|
|
3ab6729951 | ||
|
|
9153e78be8 | ||
|
|
434d4a72e2 | ||
|
|
be4b1e7fd6 | ||
|
|
7a3cb4a2a1 | ||
|
|
b3d4d61e9d | ||
|
|
4c6ae02156 | ||
|
|
2a7b341c71 | ||
|
|
1f5cbf5176 | ||
|
|
8503f61eea | ||
|
|
970ae6456f | ||
|
|
56d9566000 | ||
|
|
16530a94d1 | ||
|
|
2e54fed094 | ||
|
|
882eb43a4f | ||
|
|
f7881bb3c9 | ||
|
|
7114efc1cc | ||
|
|
350a8d82b9 | ||
|
|
e64c56123d | ||
|
|
208a87640d | ||
|
|
2cdc5b8aae | ||
|
|
73d97e3229 | ||
|
|
b76a2dccc5 | ||
|
|
08f5d5d870 | ||
|
|
656038d482 | ||
|
|
8bf9f941ed | ||
|
|
c625ec29f7 | ||
|
|
e5e70b5247 | ||
|
|
4aae661801 | ||
|
|
a6d28448f6 | ||
|
|
3f75c41166 | ||
|
|
60df83a113 | ||
|
|
51e6ece52d | ||
|
|
b4f29dc2de | ||
|
|
1a2ef9b018 | ||
|
|
1eaf09fa56 | ||
|
|
012c0ee1a6 | ||
|
|
59d69ac760 | ||
|
|
f78304c8e1 | ||
|
|
5b6b5cc745 | ||
|
|
9e2d708eb7 | ||
|
|
d34de7e7b5 | ||
|
|
36fd6e090d | ||
|
|
f06a9a3421 | ||
|
|
49b6ecd09d | ||
|
|
140e74f3ce | ||
|
|
4b44d05953 | ||
|
|
f067ba8f80 | ||
|
|
263636bb04 | ||
|
|
683a382359 | ||
|
|
70c6ae9579 | ||
|
|
13141f8fd6 | ||
|
|
4085981ca7 | ||
|
|
484133b293 | ||
|
|
69377b26ed | ||
|
|
2f5a7f1a8e | ||
|
|
7431e61c3c | ||
|
|
d723292cc7 | ||
|
|
e73cce1894 | ||
|
|
f480dc1a19 | ||
|
|
2a00f9556d | ||
|
|
78f598d49b | ||
|
|
a1b521840a | ||
|
|
6cf752a257 | ||
|
|
30a23a4e0f | ||
|
|
3374eebd4d | ||
|
|
258188d994 | ||
|
|
44ea2ea898 | ||
|
|
bf39a0c868 | ||
|
|
5d69976c05 | ||
|
|
0118d94326 | ||
|
|
331a9141be | ||
|
|
f3dd6d8baa | ||
|
|
a301c85e15 | ||
|
|
87f0d88b26 | ||
|
|
dd6e11cdb4 | ||
|
|
9144b77c70 | ||
|
|
e7b46a06be | ||
|
|
8c1a88ebe7 | ||
|
|
217d70e23a | ||
|
|
28c1559ed0 | ||
|
|
dc26550dd5 | ||
|
|
397c6c37c9 | ||
|
|
dadd23aea8 | ||
|
|
34c843f2b5 | ||
|
|
3483dd5283 | ||
|
|
667fe2baeb | ||
|
|
88301bafc5 | ||
|
|
b896dab8a8 | ||
|
|
818df0fc87 | ||
|
|
d148be57b3 | ||
|
|
e988bbbd9f | ||
|
|
af7bf8a97a | ||
|
|
a56173487f | ||
|
|
62f29f1e0e | ||
|
|
aec499543d | ||
|
|
e10734c005 | ||
|
|
abd4bb8929 | ||
|
|
eb1d7f74e4 | ||
|
|
bd4baa277f | ||
|
|
3f94ebc6b0 | ||
|
|
11b4bdc70d | ||
|
|
83760eb15a | ||
|
|
57e74e12b0 | ||
|
|
1551700ec1 | ||
|
|
81ba8a83e2 | ||
|
|
5c041e7762 | ||
|
|
dc5d092c4e | ||
|
|
7a63687d4b | ||
|
|
86d5a56fa7 | ||
|
|
848b9f1987 | ||
|
|
8b81543eed | ||
|
|
2bbebe575f | ||
|
|
7d48450bbf | ||
|
|
b173f42b65 | ||
|
|
637b9396d9 | ||
|
|
3776c6e02e | ||
|
|
c53ef12905 | ||
|
|
b3ac61bae3 | ||
|
|
d134ad9765 | ||
|
|
9e2c66af53 | ||
|
|
1392de9ad7 | ||
|
|
7e218a1b70 | ||
|
|
4c25f8d2fb | ||
|
|
543f813251 | ||
|
|
bdae119905 | ||
|
|
a16a3b7419 | ||
|
|
9ebb77637f | ||
|
|
95057d82db | ||
|
|
75c588f51b | ||
|
|
462ea4ceba | ||
|
|
672712ab49 | ||
|
|
ab0c5db51d | ||
|
|
b85a008fb2 | ||
|
|
40cc850093 | ||
|
|
afbfd236a4 | ||
|
|
25c618d57f | ||
|
|
4aefa785ad | ||
|
|
957355545e | ||
|
|
927fc656dd | ||
|
|
f1e2979d7a | ||
|
|
d7eca35395 | ||
|
|
281317d503 | ||
|
|
3ae8e58f2b | ||
|
|
f4d99b69de | ||
|
|
bcb3611f14 | ||
|
|
ded1be8026 | ||
|
|
b402fff504 | ||
|
|
a1a5aea15e | ||
|
|
aff002dbda | ||
|
|
259f73d19e | ||
|
|
41ae34644d | ||
|
|
e83f879211 | ||
|
|
70fee59186 | ||
|
|
79c0de3575 | ||
|
|
441bed5c99 | ||
|
|
910b5a7cd9 | ||
|
|
a08d724997 | ||
|
|
bc94803f91 | ||
|
|
2b786bef20 | ||
|
|
cbb6c747f6 | ||
|
|
65f9d88562 | ||
|
|
4ea2b3af84 | ||
|
|
340a99d861 | ||
|
|
3ea3222b91 | ||
|
|
0651330e08 | ||
|
|
3010a67d7f | ||
|
|
4228b95303 | ||
|
|
bf8cc0b222 | ||
|
|
ffe9553471 | ||
|
|
b711e8aeab | ||
|
|
1752f2c546 | ||
|
|
2478847bd9 | ||
|
|
b26c5c81c9 | ||
|
|
e310c982d0 | ||
|
|
9780e8b1c5 | ||
|
|
617a418a91 | ||
|
|
0760eaa798 | ||
|
|
28b94bfaf4 | ||
|
|
e00ce964ae | ||
|
|
9d85d4c699 | ||
|
|
cba2829664 | ||
|
|
7bb7b4e955 | ||
|
|
f9a09c4bad | ||
|
|
390ff27017 | ||
|
|
b5ca35438d | ||
|
|
2adc0edd4c | ||
|
|
37d2ba4794 | ||
|
|
a633d5d06a | ||
|
|
be6681d3f0 | ||
|
|
b3753232f2 | ||
|
|
fa1f153127 | ||
|
|
4c512addad | ||
|
|
2f28be077b | ||
|
|
af1681cc87 | ||
|
|
9121566b52 | ||
|
|
26eb3d5cda | ||
|
|
385073a256 | ||
|
|
58121f8c01 | ||
|
|
b35b9acde3 | ||
|
|
f30729980e | ||
|
|
194830b64c | ||
|
|
12657aab90 | ||
|
|
6af581bbe4 | ||
|
|
c325bd29bc | ||
|
|
9cb7ef34a8 | ||
|
|
449e0c8473 | ||
|
|
4a0cba78cc | ||
|
|
048f20a717 | ||
|
|
9a7af719d6 | ||
|
|
76c315bfd0 | ||
|
|
6b4ae56c8a | ||
|
|
c647e003d2 | ||
|
|
c27ee67707 | ||
|
|
f1bcdda6dc | ||
|
|
5b851eee7c | ||
|
|
8624d62494 | ||
|
|
5886946f1d | ||
|
|
9d2de4b700 | ||
|
|
4efc38b6b8 | ||
|
|
f29f311ff6 | ||
|
|
05efc36c6f | ||
|
|
d7f8c6cbd3 | ||
|
|
c80e7c0101 | ||
|
|
f445eef190 | ||
|
|
e45fae685c | ||
|
|
2c2671df31 | ||
|
|
c918ff89e8 | ||
|
|
00acfc11e7 | ||
|
|
bcf936f4a8 | ||
|
|
280e020a20 | ||
|
|
5cc10f9e38 | ||
|
|
10860fb996 | ||
|
|
e73a42b69a | ||
|
|
e8b7ad9720 | ||
|
|
a99e32c5df | ||
|
|
bc4d88d894 | ||
|
|
da3ea85e80 | ||
|
|
d7b73eb2d2 | ||
|
|
7b88f3119c | ||
|
|
c19d50f03e | ||
|
|
89f78a5cdc | ||
|
|
3ab236f0b0 | ||
|
|
2ee6693905 | ||
|
|
cef3b88d61 | ||
|
|
1ca6893513 | ||
|
|
02deed1853 | ||
|
|
a60b55e01b | ||
|
|
904620e599 | ||
|
|
b077d77668 |
@@ -11,6 +11,10 @@ amath
|
||||
amath-test
|
||||
catalog/flexcat
|
||||
catalog/flexcat/flexcat
|
||||
build/flexcat/flexcat
|
||||
*_.3
|
||||
doxygen.warn
|
||||
*.deb
|
||||
*.zip
|
||||
Makefile
|
||||
/dist
|
||||
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "amiga",
|
||||
"includePath": [
|
||||
"/opt/amiga/m68k-amigaos/ndk-include/",
|
||||
"/opt/amiga/m68k-amigaos/clib2/include/",
|
||||
"${workspaceFolder}/src/lib/"
|
||||
],
|
||||
"defines": ["AMIGA"],
|
||||
"compilerPath": "/opt/amiga/bin/m68k-amigaos-gcc",
|
||||
"cStandard": "c99",
|
||||
"cppStandard": "c++98",
|
||||
"intelliSenseMode": "${default}",
|
||||
"compilerArgs": []
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
[
|
||||
{
|
||||
"key": "ctrl+shift+c",
|
||||
"command": "workbench.action.tasks.runTask",
|
||||
"args": "Clean all"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+t",
|
||||
"command": "workbench.action.tasks.runTask",
|
||||
"args": "Run tests"
|
||||
}
|
||||
]
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/amath",
|
||||
"args": ["--shell"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"amath",
|
||||
"carsten",
|
||||
"innolan",
|
||||
"sonne"
|
||||
],
|
||||
"files.associations": {
|
||||
"type_traits": "cpp",
|
||||
"cctype": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"exception": "cpp",
|
||||
"new": "cpp",
|
||||
"typeinfo": "cpp"
|
||||
}
|
||||
}
|
||||
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Open shell",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/amath --shell",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Build all",
|
||||
"command": "make",
|
||||
"args": [
|
||||
"all"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "Clean all",
|
||||
"command": "make",
|
||||
"args": [
|
||||
"clean"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "Run tests",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}/amath --test",
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "new"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +1,43 @@
|
||||
-------------------------------------------------------------------------------
|
||||
--- amath change history ---
|
||||
-------------------------------------------------------------------------------
|
||||
amath release history
|
||||
|
||||
v1.9.0 January 11 2021
|
||||
- AmigaOS ARexx interface.
|
||||
|
||||
v1.8.5 August 07 2018
|
||||
- Fix build on compilers with broken endian detection.
|
||||
|
||||
v1.8.4 August 05 2018
|
||||
- Ignore casing in hexadecimal numbers.
|
||||
|
||||
v1.8.3 July 21 2017
|
||||
- Updated help texts and man page.
|
||||
- Fixed bug in ANSI switch.
|
||||
|
||||
v1.8.2 July 14 2017
|
||||
- MIPS support.
|
||||
- Improved endianness detection.
|
||||
- Fixed configuration errors.
|
||||
|
||||
v1.8.1 April 22 2017
|
||||
- OpenBSD support.
|
||||
- Fixed Haiku bug.
|
||||
|
||||
v1.8.0 April 13 2017
|
||||
- Fixed bugs in numeral systems.
|
||||
- Fixed bugs related to infinity (Inf).
|
||||
- Fixed bugs related to Not a Number (NaN).
|
||||
- Updated and cleanup documentation.
|
||||
- Cleaned up code structure.
|
||||
- OpenLibm support.
|
||||
|
||||
v1.7.1 March 26 2017
|
||||
- Haiku support.
|
||||
- Unified ANSI console.
|
||||
- Code cleanup.
|
||||
|
||||
v1.7.0 March 12 2017
|
||||
- Introduce scientific notation.
|
||||
- Introduce Not a Number (NaN).
|
||||
- Introduced scientific notation.
|
||||
- Introduced Not a Number (NaN).
|
||||
- Fixed bugs related to infinity (Inf).
|
||||
- Fixed bugs in log of complex numbers.
|
||||
- Fixed bugs in numeral systems.
|
||||
@@ -29,7 +62,7 @@ v1.6.3 February 03 2017
|
||||
|
||||
v1.6.2 January 24 2017
|
||||
- Fixed bug in memory allocation.
|
||||
- Fixed bug in native keybord input.
|
||||
- Fixed bug in native keyboard input.
|
||||
- Included build options in executables.
|
||||
- ARM support.
|
||||
|
||||
@@ -78,7 +111,7 @@ v1.5.3 October 26 2014
|
||||
v1.5.2 October 11 2014
|
||||
- Modified character handling code to comply with licenses.
|
||||
- Modified complex math code to comply with licenses.
|
||||
- Modified code base to work with Kickstart 2.04.
|
||||
- Modified code base to work with Kickstart 2.04.
|
||||
- Square root of negative numbers now yields correct result.
|
||||
- Implemented scientific notation of numbers.
|
||||
- Infinity is now shown in division with 0.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
Copyright (c) 1990, 1993 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O2 -DWITHTEST -Wall -Isrc -Isrc/main
|
||||
CXXFLAGS = -O2 -DWITHTEST -Wall -Isrc -Isrc/main
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
LFLAGS = -lappsystem -lfunctions -lstatement -lappmain -lfunctions -lstatement -lappmain -lamathapp -lamathcplex -lamath -lamathc -lstdc++
|
||||
LPATH = -Lsrc/lib -Lsrc/clib -Lsrc/real -Lsrc/cplex -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system
|
||||
LPATHS = -Lsrc/lib/static -Lsrc/clib/static -Lsrc/real/static -Lsrc/cplex/static -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system
|
||||
FLXCAT = build/flexcat/flexcat
|
||||
MKDIR = mkdir -p
|
||||
DEL = rm -f
|
||||
INSTALLP = install -m 0755
|
||||
INSTALLM = install -m 0644
|
||||
PREFIX = /usr
|
||||
INSTDIRP = ${DESTDIR}${PREFIX}/bin
|
||||
INSTDIRM = ${DESTDIR}${PREFIX}/share/man/man1
|
||||
|
||||
all: shared-app
|
||||
app: appmain functions statement appsystem
|
||||
libs: amathapp amath amathc amathcplex
|
||||
|
||||
amath: static-app
|
||||
static: static-app
|
||||
|
||||
src/main.o: src/main.cpp
|
||||
${CXX} ${CXXFLAGS} -c src/main.cpp -o src/main.o
|
||||
|
||||
appmain:
|
||||
cd src/main && ${MAKE}
|
||||
|
||||
appsystem:
|
||||
cd src/system && ${MAKE}
|
||||
|
||||
functions:
|
||||
cd src/main/function && ${MAKE}
|
||||
|
||||
statement:
|
||||
cd src/main/statement && ${MAKE}
|
||||
|
||||
amathapp:
|
||||
cd src/lib && ${MAKE}
|
||||
|
||||
amath:
|
||||
cd src/real && ${MAKE}
|
||||
|
||||
amathc:
|
||||
cd src/clib && ${MAKE}
|
||||
|
||||
amathcplex:
|
||||
cd src/cplex && ${MAKE}
|
||||
|
||||
localize:
|
||||
cd build/flexcat && ${MAKE}
|
||||
${FLXCAT} text/keyword.cd src/localize/kword.h=text/keyword.sd
|
||||
${FLXCAT} text/help.cd src/localize/help.h=text/help.sd
|
||||
${FLXCAT} text/ident.cd src/localize/ident.h=text/ident.sd
|
||||
${FLXCAT} text/text.cd src/localize/text.h=text/text.sd
|
||||
|
||||
catalogs:
|
||||
cd build/flexcat && ${MAKE}
|
||||
${MKDIR} dist/catalog/english
|
||||
${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG dist/catalog/english/amath-help.catalog
|
||||
${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG dist/catalog/english/amath-ident.catalog
|
||||
${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG dist/catalog/english/amath-text.catalog
|
||||
${MKDIR} dist/catalog/dansk
|
||||
${FLXCAT} text/help.cd catalog/dansk/amath-help.ct CATALOG dist/catalog/dansk/amath-help.catalog
|
||||
${FLXCAT} text/ident.cd catalog/dansk/amath-ident.ct CATALOG dist/catalog/dansk/amath-ident.catalog
|
||||
${FLXCAT} text/text.cd catalog/dansk/amath-text.ct CATALOG dist/catalog/dansk/amath-text.catalog
|
||||
${FLXCAT} text/keyword.cd catalog/dansk/amath-keyword.ct CATALOG dist/catalog/dansk/amath-keyword.catalog
|
||||
|
||||
shared-app: app libs src/main.o
|
||||
${CC} ${CFLAGS} -s src/main.o -o amath ${LPATH} ${LFLAGS}
|
||||
|
||||
static-app: src/main.o
|
||||
cd src/lib && ${MAKE} static
|
||||
cd src/clib && ${MAKE} static
|
||||
cd src/real && ${MAKE} static
|
||||
cd src/cplex && ${MAKE} static
|
||||
cd src/main && ${MAKE} static
|
||||
cd src/system && ${MAKE} static
|
||||
cd src/main/function && ${MAKE} static
|
||||
cd src/main/statement && ${MAKE} static
|
||||
${CC} ${CFLAGS} -s src/main.o -o amath ${LPATHS} ${LFLAGS}
|
||||
|
||||
.PHONY: test
|
||||
test: amath
|
||||
LD_LIBRARY_PATH=src/clib/:src/lib:src/cplex:scr/real
|
||||
./amath test
|
||||
|
||||
.PHONY: install
|
||||
install: shared-app
|
||||
cd src/lib && ${MAKE} install
|
||||
cd src/clib && ${MAKE} install
|
||||
cd src/real && ${MAKE} install
|
||||
cd src/cplex && ${MAKE} install
|
||||
${INSTALLP} amath ${INSTDIRP}/amath
|
||||
${INSTALLM} amath.1 ${INSTDIRM}/amath.1
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
cd src/lib && ${MAKE} uninstall
|
||||
cd src/clib && ${MAKE} uninstall
|
||||
cd src/real && ${MAKE} uninstall
|
||||
cd src/cplex && ${MAKE} uninstall
|
||||
${DEL} ${INSTDIRP}/amath
|
||||
${DEL} ${INSTDIRM}/amath.1
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
cd src/lib && ${MAKE} clean
|
||||
cd src/clib && ${MAKE} clean
|
||||
cd src/real && ${MAKE} clean
|
||||
cd src/cplex && ${MAKE} clean
|
||||
cd src/main && ${MAKE} clean
|
||||
cd src/system && ${MAKE} clean
|
||||
cd src/main/function && ${MAKE} clean
|
||||
cd src/main/statement && ${MAKE} clean
|
||||
cd build/flexcat && ${MAKE} clean
|
||||
${DEL} src/main.o amath
|
||||
|
||||
@@ -26,4 +26,4 @@ Show version string:
|
||||
> amath version
|
||||
|
||||
Run regression tests:
|
||||
> amath test
|
||||
> amath --test
|
||||
|
||||
@@ -29,7 +29,4 @@ Install by copying the desired amath binary to C: or any other appropriate locat
|
||||
> amath version
|
||||
|
||||
Run regression tests:
|
||||
> amath-test test
|
||||
|
||||
Load amath into memory:
|
||||
> resident amath pure
|
||||
> amath --test
|
||||
|
||||
@@ -1,66 +1,63 @@
|
||||
.TH "amath" 1 "Wed Mar 1 2017" "Version 1.7.0" "amath" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.\" Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.TH amath 1 "Version 1.9.0" "January 11 2021"
|
||||
.SH NAME
|
||||
amath \- Statements and functions
|
||||
|
||||
amath \- Simple command line calculator
|
||||
.SH SYNOPSIS
|
||||
\fCamath [expression]\fP
|
||||
|
||||
.SH Description
|
||||
amath(1) features a case sensitive command line interface, internal
|
||||
\fC[ \fB--noansi\fR ] [ \fB--shell\fR |
|
||||
.IR expression
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
\fBamath\fP features a case sensitive command line interface, internal
|
||||
IEEE 754 calculations with 15 significant digits, calculations with
|
||||
real and complex numbers, variables and user defined functions,
|
||||
logarithmic and exponential functions, trigonometric and hyperbolic
|
||||
function and selected mathematical constants and rounding functions.
|
||||
|
||||
.SH "Statements"
|
||||
.PP
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.BR \-\-noansi
|
||||
Disable output of ANSI escape codes. Default is enable.
|
||||
.TP
|
||||
.BR \-\-shell
|
||||
Open an interactive shell.
|
||||
.SH OPERATORS
|
||||
.nf
|
||||
clear Clear console window
|
||||
def Define function
|
||||
delete Delete variable or function
|
||||
digits Set number of significant digits
|
||||
eval Evaluate arithmetic expression
|
||||
execute Execute statements in a file
|
||||
functions Show list of user defined functions
|
||||
input Change numeral input system
|
||||
help Show basic help text
|
||||
output Change numeral output system
|
||||
list Show content of a directory
|
||||
show Show content of a file
|
||||
load Load variable and functions from file
|
||||
save Save variable and functions to file
|
||||
variables Show list of variables
|
||||
version Show version string
|
||||
memory Show internal memory usage
|
||||
exit Exit program
|
||||
+ Mathematical addition
|
||||
- Mathematical subtraction
|
||||
* Mathematical multiplication
|
||||
/ Mathematical division
|
||||
^ Mathematical exponentiation
|
||||
= Assignment of variable values
|
||||
| Absolute value of number
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.SH "Operators"
|
||||
.PP
|
||||
.nf
|
||||
+ Mathematical addition.
|
||||
- Mathematical subtraction.
|
||||
* Mathematical multiplication.
|
||||
/ Mathematical division.
|
||||
^ Mathematical exponentiation.
|
||||
= Assignment of variable values.
|
||||
| Absolute value of number.
|
||||
|
||||
.SH "Variables and constant"
|
||||
.PP
|
||||
.SH VARIABLES AND CONSTANT
|
||||
.nf
|
||||
pi Trigonometric constant
|
||||
e Euler's number
|
||||
i Imaginary unit
|
||||
ins Result of last calculation
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.SH "Base functions"
|
||||
.PP
|
||||
.SH MISCELLANEOUS FUNCTIONS
|
||||
.nf
|
||||
abs Absolute value of number
|
||||
sgn Mathematical signum function
|
||||
@@ -74,10 +71,7 @@ lb Binary logarithm function (base 2)
|
||||
ln Natural logarithm function (base e)
|
||||
lg Common logarithm function (base 10)
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.SH "Trigonometric functions"
|
||||
.PP
|
||||
.SH TRIGONOMETRIC FUNCTIONS
|
||||
.nf
|
||||
sin Trigonometric sine function
|
||||
cos Trigonometric cosine function
|
||||
@@ -85,17 +79,20 @@ tan Trigonometric tangent function
|
||||
cot Trigonometric cotangent function
|
||||
sec Trigonometric secant function
|
||||
csc Trigonometric cosecant function
|
||||
crd Trigonometric chord function
|
||||
exsec Trigonometric exsecant function
|
||||
excsc Trigonometric excosecant function
|
||||
arcsin Inverse trigonometric sine function
|
||||
arccos Inverse trigonometric cosine function
|
||||
arctan Inverse trigonometric tangent function
|
||||
arccot Inverse trigonometric cotangent function
|
||||
arcsec Inverse trigonometric secant function
|
||||
arccsc Inverse trigonometric cosecant function
|
||||
arccrd Inverse trigonometric chord function
|
||||
arcexsec Inverse trigonometric exsecant function
|
||||
arcexcsc Inverse trigonometric excosecant function
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.SH "Hyperbolic functions"
|
||||
.PP
|
||||
.SH HYPERBOLIC FUNCTIONS
|
||||
.nf
|
||||
sinh Hyperbolic sine function
|
||||
cosh Hyperbolic cosine function
|
||||
@@ -110,10 +107,7 @@ arccoth Inverse hyperbolic cotangent function
|
||||
arcsech Inverse hyperbolic secant function
|
||||
arccsch Inverse hyperbolic cosecant function
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.SH "Early trigonometric functions"
|
||||
.PP
|
||||
.SH EARLY TRIGONOMETRIC FUNCTIONS
|
||||
.nf
|
||||
ver Versed sine function
|
||||
vcs Versed cosine function
|
||||
@@ -132,10 +126,54 @@ archvc Inverse haversed cosine function
|
||||
archcv Inverse hacoversed sine function
|
||||
archcc Inverse hacoversed cosine function
|
||||
.fi
|
||||
.SH STATEMENTS
|
||||
.nf
|
||||
about Show about text
|
||||
clear Clear console window
|
||||
def Define function
|
||||
delete Delete variable or function
|
||||
digits Set number of significant digits
|
||||
eval Evaluate arithmetic expression
|
||||
execute Execute statements in a file
|
||||
functions Show list of user defined functions
|
||||
input Change numeral input system
|
||||
help Show basic help text
|
||||
output Change numeral output system
|
||||
list Show content of a directory
|
||||
show Show content of a file
|
||||
load Load variable and functions from file
|
||||
save Save variable and functions to file
|
||||
variables Show list of variables
|
||||
version Show version string
|
||||
license Show copyright and license texts
|
||||
memory Show internal memory usage
|
||||
exit Exit program
|
||||
.fi
|
||||
.SH EXIT STATUS
|
||||
\fBamath\fP exits 0 on success and >0 if an error occurs.
|
||||
.SH EXAMPLES
|
||||
Add two numbers:
|
||||
.RS
|
||||
$ amath 1.3 + 2.6
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.SH "Example script"
|
||||
Find cosine of pi/2:
|
||||
.RS
|
||||
$ amath "cos(pi/2)"
|
||||
.RE
|
||||
.PP
|
||||
Find square root of minus 25:
|
||||
.RS
|
||||
$ amath "sqrt(-25)"
|
||||
.RE
|
||||
.PP
|
||||
Show only 5 digits in the result of a division:
|
||||
.RS
|
||||
$ amath "digits 5;34/11"
|
||||
.RE
|
||||
.PP
|
||||
Script block with functions:
|
||||
.RS
|
||||
.nf
|
||||
round(1.5461);round(-1.5461);
|
||||
ceil(43.5461);ceil(-43.5461);
|
||||
@@ -143,31 +181,34 @@ floor(39.9531);floor(-39.9531);
|
||||
trunc(23.827);trunc(-23.827);
|
||||
sqrt(100);sqrt(52.23);
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
|
||||
.SH "Example script with functions"
|
||||
.PP
|
||||
Script block with user defined functions:
|
||||
.RS
|
||||
.nf
|
||||
f(x)=x*2+1;
|
||||
g(y)=y^2+y*1.5+2;
|
||||
a=2;b=3;c=a+b;
|
||||
vars;funcs;
|
||||
f(2.2);c+1.1;
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.SH "Example script with complex numbers"
|
||||
.PP
|
||||
.nf
|
||||
cos(1+2i);
|
||||
sin(1+2i);
|
||||
tan(1+2i);
|
||||
coth(1+2i);
|
||||
sech(1+2i);
|
||||
csch(1+2i);
|
||||
.fi
|
||||
.PP
|
||||
|
||||
.SH "See also"
|
||||
.PP
|
||||
.RE
|
||||
.SH BUGS
|
||||
.IP \[bu] 2
|
||||
If \fBamath\fP is linked with system libraries (-lm) sometimes the real part
|
||||
of a result of arccosh of a complex number, is negative instead of positive.
|
||||
.IP \[bu]
|
||||
coth() with complex numbers is inaccurate on the 14th digit.
|
||||
.sp
|
||||
Please report any other bugs that you encounter via:
|
||||
.br
|
||||
\fIhttps://gitlab.com/rnger/amath/issues\fR.
|
||||
.SH HOMEPAGE
|
||||
https://amath.innolan.net/
|
||||
.SH SEE ALSO
|
||||
amathc(3), amathr(3), amathi(3)
|
||||
.SH AUTHORS
|
||||
Written by Carsten Sonne Larsen <cs@innolan.net>. Floating point to string
|
||||
conversion is based on software written by Ryan Juckett. The code in complex
|
||||
calculations is derived from software written by Stephen L. Moshier. The code
|
||||
in MemSet and MemCopy is derived from software contributed to Berkeley by
|
||||
Mike Hibler and Chris Torek.
|
||||
+8
-2212
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
/* Test program */
|
||||
Options RESULTS
|
||||
Address AMATH.1 '1.1+1.8'
|
||||
SAY (RESULT)
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
NAME
|
||||
amath - Simple command line calculator
|
||||
|
||||
SYNOPSIS
|
||||
[ --noansi ] [ --shell | expression ]
|
||||
|
||||
DESCRIPTION
|
||||
amath features a case sensitive command line interface, internal IEEE
|
||||
754 calculations with 15 significant digits, calculations with real and
|
||||
complex numbers, variables and user defined functions, logarithmic and
|
||||
exponential functions, trigonometric and hyperbolic function and
|
||||
selected mathematical constants and rounding functions.
|
||||
|
||||
OPTIONS
|
||||
--noansi
|
||||
Disable output of ANSI escape codes. Default is enable.
|
||||
|
||||
--shell
|
||||
Open an interactive shell.
|
||||
|
||||
OPERATORS
|
||||
+ Mathematical addition
|
||||
- Mathematical subtraction
|
||||
* Mathematical multiplication
|
||||
/ Mathematical division
|
||||
^ Mathematical exponentiation
|
||||
= Assignment of variable values
|
||||
| Absolute value of number
|
||||
|
||||
VARIABLES AND CONSTANT
|
||||
pi Trigonometric constant
|
||||
e Euler's number
|
||||
i Imaginary unit
|
||||
ins Result of last calculation
|
||||
|
||||
MISCELLANEOUS FUNCTIONS
|
||||
abs Absolute value of number
|
||||
sgn Mathematical signum function
|
||||
round Round to nearest integer number
|
||||
trunc Discard fraction part of number
|
||||
floor Mathematical floor function
|
||||
ceil Mathematical ceiling function
|
||||
sqrt Square root function (exp 1/2)
|
||||
cbrt Cube root function (exp 1/3)
|
||||
lb Binary logarithm function (base 2)
|
||||
ln Natural logarithm function (base e)
|
||||
lg Common logarithm function (base 10)
|
||||
|
||||
TRIGONOMETRIC FUNCTIONS
|
||||
sin Trigonometric sine function
|
||||
cos Trigonometric cosine function
|
||||
tan Trigonometric tangent function
|
||||
cot Trigonometric cotangent function
|
||||
sec Trigonometric secant function
|
||||
csc Trigonometric cosecant function
|
||||
crd Trigonometric chord function
|
||||
exsec Trigonometric exsecant function
|
||||
excsc Trigonometric excosecant function
|
||||
arcsin Inverse trigonometric sine function
|
||||
arccos Inverse trigonometric cosine function
|
||||
arctan Inverse trigonometric tangent function
|
||||
arccot Inverse trigonometric cotangent function
|
||||
arcsec Inverse trigonometric secant function
|
||||
arccsc Inverse trigonometric cosecant function
|
||||
arccrd Inverse trigonometric chord function
|
||||
arcexsec Inverse trigonometric exsecant function
|
||||
arcexcsc Inverse trigonometric excosecant function
|
||||
|
||||
HYPERBOLIC FUNCTIONS
|
||||
sinh Hyperbolic sine function
|
||||
cosh Hyperbolic cosine function
|
||||
tanh Hyperbolic tangent function
|
||||
coth Hyperbolic cotangent function
|
||||
sech Hyperbolic secant function
|
||||
csch Hyperbolic cosecant function
|
||||
arcsinh Inverse hyperbolic sine function
|
||||
arccosh Inverse hyperbolic cosine function
|
||||
arctanh Inverse hyperbolic tangent function
|
||||
arccoth Inverse hyperbolic cotangent function
|
||||
arcsech Inverse hyperbolic secant function
|
||||
arccsch Inverse hyperbolic cosecant function
|
||||
|
||||
EARLY TRIGONOMETRIC FUNCTIONS
|
||||
ver Versed sine function
|
||||
vcs Versed cosine function
|
||||
cvs Coversed sine function
|
||||
cvc Coversed cosine function
|
||||
hv Haversed sine function
|
||||
hvc Haversed cosine function
|
||||
hcv Hacoversed sine function
|
||||
hcc Hacoversed cosine function
|
||||
arcver Inverse versed sine function
|
||||
arcvcs Inverse versed cosine function
|
||||
arccvs Inverse coversed sine function
|
||||
arccvc Inverse coversed cosine function
|
||||
archv Inverse haversed sine function
|
||||
archvc Inverse haversed cosine function
|
||||
archcv Inverse hacoversed sine function
|
||||
archcc Inverse hacoversed cosine function
|
||||
|
||||
STATEMENTS
|
||||
about Show about text
|
||||
clear Clear console window
|
||||
def Define function
|
||||
delete Delete variable or function
|
||||
digits Set number of significant digits
|
||||
eval Evaluate arithmetic expression
|
||||
execute Execute statements in a file
|
||||
functions Show list of user defined functions
|
||||
input Change numeral input system
|
||||
help Show basic help text
|
||||
output Change numeral output system
|
||||
list Show content of a directory
|
||||
show Show content of a file
|
||||
load Load variable and functions from file
|
||||
save Save variable and functions to file
|
||||
variables Show list of variables
|
||||
version Show version string
|
||||
license Show copyright and license texts
|
||||
memory Show internal memory usage
|
||||
exit Exit program
|
||||
|
||||
EXIT STATUS
|
||||
amath exits 0 on success and >0 if an error occurs.
|
||||
|
||||
EXAMPLES
|
||||
Add two numbers:
|
||||
$ amath 1.3 + 2.6
|
||||
|
||||
Find cosine of pi/2:
|
||||
$ amath "cos(pi/2)"
|
||||
|
||||
Find square root of minus 25:
|
||||
$ amath "sqrt(-25)"
|
||||
|
||||
Show only 5 digits in the result of a division:
|
||||
$ amath "digits 5;34/11"
|
||||
|
||||
Script block with functions:
|
||||
round(1.5461);round(-1.5461);
|
||||
ceil(43.5461);ceil(-43.5461);
|
||||
floor(39.9531);floor(-39.9531);
|
||||
trunc(23.827);trunc(-23.827);
|
||||
sqrt(100);sqrt(52.23);
|
||||
|
||||
Script block with user defined functions:
|
||||
f(x)=x*2+1;
|
||||
g(y)=y^2+y*1.5+2;
|
||||
a=2;b=3;c=a+b;
|
||||
f(2.2);c+1.1;
|
||||
|
||||
BUGS
|
||||
Please report any other bugs that you encounter via:
|
||||
https://gitlab.com/rnger/amath/issues.
|
||||
|
||||
HOMEPAGE
|
||||
https://amath.innolan.net/
|
||||
|
||||
AUTHORS
|
||||
Written by Carsten Sonne Larsen <cs@innolan.net>. Floating point to
|
||||
string conversion is based on software written by Ryan Juckett. The
|
||||
code in complex calculations is derived from software written by
|
||||
Stephen L. Moshier. The code in MemSet and MemCopy is derived from
|
||||
software contributed to Berkeley by Mike Hibler and Chris Torek.
|
||||
|
||||
January 11 2021 Version 1.9.0
|
||||
@@ -0,0 +1,41 @@
|
||||
Short: Simple command line calculator
|
||||
Author: Carsten Larsen
|
||||
Uploader: carsten.larsen@mail.com
|
||||
Type: misc/math
|
||||
Version: 1.9.0
|
||||
Architecture: m68k-amigaos >= 2.04
|
||||
URL: https://amath.innolan.net
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
- Case sensitive command line interface
|
||||
- Native IEEE 754 with 15 significant digits
|
||||
- Calculations with real and complex numbers
|
||||
- Variables and user defined functions
|
||||
- Logarithmic and exponential functions
|
||||
- Trigonometric and hyperbolic functions
|
||||
- Mathematical constants and rounding functions
|
||||
- Disk functions to load, save and view content
|
||||
- Comprehensive and easy to use builtin help
|
||||
- Optimized 68000, 68020 and 68030 versions
|
||||
- Unlimited number of ARexx interfaces
|
||||
- Freely distributable sources (BSD license)
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Open amath in its own window:
|
||||
> amath
|
||||
|
||||
Do a calculation in shell:
|
||||
> amath 1.2+1.4
|
||||
|
||||
Get an interactive prompt in shell:
|
||||
> amath shell
|
||||
|
||||
Show version string:
|
||||
> amath version
|
||||
|
||||
Run regression tests:
|
||||
> amath --test
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
#! /bin/sh
|
||||
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
|
||||
GROFF_NO_SGR=1
|
||||
export GROFF_NO_SGR
|
||||
|
||||
echo ".am TH
|
||||
.hy 0
|
||||
.na
|
||||
..
|
||||
.rm }H
|
||||
.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
|
||||
binmode STDIN, '\'':encoding(utf8)'\'';
|
||||
binmode STDOUT, '\'':encoding(utf8)'\'';
|
||||
chomp;
|
||||
s/.\010//g;
|
||||
s/\s*$//;
|
||||
if (/^$/) {
|
||||
$sawblank = 1;
|
||||
next;
|
||||
} else {
|
||||
if ($sawblank && $didprint) {
|
||||
print "\n";
|
||||
$sawblank = 0;
|
||||
}
|
||||
print "$_\n";
|
||||
$didprint = 1;
|
||||
}
|
||||
'
|
||||
@@ -1,62 +0,0 @@
|
||||
all: flexcat
|
||||
|
||||
CFLAGS += -I. -Wall
|
||||
|
||||
asprintf.o: asprintf.c
|
||||
${CC} ${CFLAGS} -c asprintf.c
|
||||
|
||||
createcat.o: createcat.c
|
||||
${CC} ${CFLAGS} -c createcat.c
|
||||
|
||||
createcatsrc.o: createcatsrc.c
|
||||
${CC} ${CFLAGS} -c createcatsrc.c
|
||||
|
||||
createct.o: createct.c
|
||||
${CC} ${CFLAGS} -c createct.c
|
||||
|
||||
globals.o: globals.c
|
||||
${CC} ${CFLAGS} -c globals.c
|
||||
|
||||
locale_other.o: locale_other.c
|
||||
${CC} ${CFLAGS} -c locale_other.c
|
||||
|
||||
main.o: main.c
|
||||
${CC} ${CFLAGS} -c main.c
|
||||
|
||||
openlibs.o: openlibs.c
|
||||
${CC} ${CFLAGS} -c openlibs.c
|
||||
|
||||
readprefs.o: readprefs.c
|
||||
${CC} ${CFLAGS} -c readprefs.c
|
||||
|
||||
scancd.o: scancd.c
|
||||
${CC} ${CFLAGS} -c scancd.c
|
||||
|
||||
scanct.o: scanct.c
|
||||
${CC} ${CFLAGS} -c scanct.c
|
||||
|
||||
scanpo.o: scanpo.c
|
||||
${CC} ${CFLAGS} -c scanpo.c
|
||||
|
||||
showfuncs.o: showfuncs.c
|
||||
${CC} ${CFLAGS} -c showfuncs.c
|
||||
|
||||
strptime.o: strptime.c
|
||||
${CC} ${CFLAGS} -c strptime.c
|
||||
|
||||
swapfuncs.o: swapfuncs.c
|
||||
${CC} ${CFLAGS} -c swapfuncs.c
|
||||
|
||||
utils.o: utils.c
|
||||
${CC} ${CFLAGS} -c utils.c
|
||||
|
||||
vastubs.o: vastubs.c
|
||||
${CC} ${CFLAGS} -c vastubs.c
|
||||
|
||||
|
||||
flexcat: asprintf.o createcat.o createcatsrc.o createct.o globals.o locale_other.o main.o openlibs.o readprefs.o scancd.o scanct.o scanpo.o showfuncs.o strptime.o swapfuncs.o utils.o vastubs.o
|
||||
${CC} ${CFLAGS} -o flexcat asprintf.o createcat.o createcatsrc.o createct.o globals.o locale_other.o main.o openlibs.o readprefs.o scancd.o scanct.o scanpo.o showfuncs.o strptime.o swapfuncs.o utils.o vastubs.o -lm
|
||||
|
||||
clean:
|
||||
rm -f asprintf.o createcat.o createcatsrc.o createct.o globals.o locale_other.o main.o openlibs.o readprefs.o scancd.o scanct.o scanpo.o showfuncs.o strptime.o swapfuncs.o utils.o vastubs.o flexcat
|
||||
|
||||
@@ -1,8 +1,36 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright {c} 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES {INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION}
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT {INCLUDING NEGLIGENCE OR OTHERWISE} ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Project homepage:
|
||||
# https://amath.innolan.net
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
version="1.7.0"
|
||||
version="1.9.0"
|
||||
|
||||
build_package () {
|
||||
|
||||
@@ -12,7 +40,7 @@ sh configure CFLAGS=$2
|
||||
make clean
|
||||
|
||||
echo "Building $3 bit package of amath ${version} for Debian ..."
|
||||
make
|
||||
make static
|
||||
mv amath amath.tmp
|
||||
|
||||
# Create filesystem layout
|
||||
@@ -20,9 +48,6 @@ mkdir -m 755 amath
|
||||
mkdir -m 755 amath/DEBIAN
|
||||
mkdir -m 755 amath/usr/
|
||||
mkdir -m 755 amath/usr/bin
|
||||
mkdir -m 755 amath/usr/lib
|
||||
mkdir -m 755 amath/usr/lib/pkgconfig
|
||||
mkdir -m 755 amath/usr/include
|
||||
mkdir -m 755 amath/usr/share
|
||||
mkdir -m 755 amath/usr/share/amath
|
||||
mkdir -m 755 amath/usr/share/man
|
||||
@@ -34,56 +59,18 @@ mkdir -m 755 amath/usr/share/doc/amath
|
||||
# Copy binaries
|
||||
mv amath.tmp amath/usr/bin/amath
|
||||
chmod 0755 amath/usr/bin/amath
|
||||
mv src/lib/static/libamathapp.a amath/usr/lib/libamathapp.a
|
||||
chmod 0644 amath/usr/lib/libamathapp.a
|
||||
mv src/lib/libamathapp.so amath/usr/lib/libamathapp.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamathapp.so.${version}
|
||||
mv src/clib/static/libamathc.a amath/usr/lib/libamathc.a
|
||||
chmod 0644 amath/usr/lib/libamathc.a
|
||||
mv src/clib/libamathc.so amath/usr/lib/libamathc.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamathc.so.${version}
|
||||
mv src/real/static/libamath.a amath/usr/lib/libamath.a
|
||||
chmod 0644 amath/usr/lib/libamath.a
|
||||
mv src/real/libamath.so amath/usr/lib/libamath.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamath.so.${version}
|
||||
mv src/cplex/static/libamathcplex.a amath/usr/lib/libamathcplex.a
|
||||
chmod 0644 amath/usr/lib/libamathcplex.a
|
||||
mv src/cplex/libamathcplex.so amath/usr/lib/libamathcplex.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamathcplex.so.${version}
|
||||
|
||||
# Copy pkg-config files
|
||||
cp src/lib/amatha.pc amath/usr/lib/pkgconfig/amatha.pc
|
||||
cp src/clib/amathc.pc amath/usr/lib/pkgconfig/amathc.pc
|
||||
cp src/real/amathr.pc amath/usr/lib/pkgconfig/amathr.pc
|
||||
cp src/cplex/amathi.pc amath/usr/lib/pkgconfig/amathi.pc
|
||||
chmod 644 amath/usr/lib/pkgconfig/*
|
||||
|
||||
# Copy includes
|
||||
cp src/amath.h amath/usr/include/amath.h
|
||||
cp src/amathc.h amath/usr/include/amathc.h
|
||||
cp src/amatht.h amath/usr/include/amatht.h
|
||||
cp src/complex.h amath/usr/include/amathi.h
|
||||
chmod 644 amath/usr/include/*
|
||||
|
||||
# Copy documentation
|
||||
cp HISTORY amath/usr/share/doc/amath/
|
||||
gzip --best -n amath/usr/share/doc/amath/HISTORY
|
||||
cp HISTORY amath/usr/share/doc/amath/changelog
|
||||
gzip --best -n amath/usr/share/doc/amath/changelog
|
||||
cp README amath/usr/share/doc/amath/
|
||||
gzip --best -n amath/usr/share/doc/amath/README
|
||||
chmod 644 amath/usr/share/doc/amath/*
|
||||
|
||||
# Copy man pages
|
||||
cp amath.1 amath/usr/share/man/man1/amath.1
|
||||
cp src/clib/amathc.3 amath/usr/share/man/man3/amathc.3
|
||||
cp src/real/amathr.3 amath/usr/share/man/man3/amathr.3
|
||||
cp src/cplex/amathi.3 amath/usr/share/man/man3/amathi.3
|
||||
|
||||
cat amath.1 | sed '/SEE ALSO/,+1 d' > amath/usr/share/man/man1/amath.1
|
||||
gzip --best -n amath/usr/share/man/man1/amath.1
|
||||
gzip --best -n amath/usr/share/man/man3/amathc.3
|
||||
gzip --best -n amath/usr/share/man/man3/amathr.3
|
||||
gzip --best -n amath/usr/share/man/man3/amathi.3
|
||||
chmod 644 amath/usr/share/man/man1/*
|
||||
chmod 644 amath/usr/share/man/man3/*
|
||||
|
||||
# Copy scripts
|
||||
cp script/* amath/usr/share/amath/
|
||||
@@ -94,13 +81,13 @@ chmod 644 amath/usr/share/amath/*
|
||||
echo "Package: amath"
|
||||
echo "Version: ${version}"
|
||||
echo "Architecture: $1"
|
||||
echo "Maintainer: Carsten Larsen <cs@innolan.net>"
|
||||
echo "Maintainer: Carsten Sonne Larsen <cs@innolan.net>"
|
||||
echo "Installed-Size: $4"
|
||||
echo "Depends: libc6"
|
||||
echo "Section: math"
|
||||
echo "Priority: optional"
|
||||
echo "Homepage: http://amath.innolan.net"
|
||||
echo "Built-Using: gcc-5.4"
|
||||
echo "Homepage: https://amath.innolan.net"
|
||||
echo "Built-Using: gcc-7.3"
|
||||
echo "Description: Simple command line calculator"
|
||||
echo " Features a case sensitive command line interface, internal IEEE 754"
|
||||
echo " calculations with 15 significant digits, calculations with real and"
|
||||
@@ -110,14 +97,15 @@ echo " and selected mathematical constants and rounding functions."
|
||||
} >amath/DEBIAN/control
|
||||
chmod 0755 amath/DEBIAN/control
|
||||
|
||||
# Create license file
|
||||
# Create copyright file
|
||||
# Refer to https://www.debian.org/doc/debian-policy/ch-docs.html#s-copyrightfile
|
||||
{
|
||||
echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
|
||||
echo "Upstream-Name: amath"
|
||||
echo "Source: http://amath.innolan.net"
|
||||
echo
|
||||
echo "Source: https://amath.innolan.net"
|
||||
echo
|
||||
echo "Files: *"
|
||||
echo "Copyright: 2014-2017 Carsten Sonne Larsen <cs@innolan.net>"
|
||||
echo "Copyright: 2014-2021 Carsten Sonne Larsen <cs@innolan.net>"
|
||||
echo " 2007 The NetBSD Foundation, Inc."
|
||||
echo " 1990, 1993 The Regents of the University of California."
|
||||
echo "License: BSD-2-Clause"
|
||||
@@ -141,59 +129,13 @@ echo " SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVE
|
||||
echo " CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,"
|
||||
echo " OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE"
|
||||
echo " OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
} >amath/DEBIAN/copyright
|
||||
gzip --best -n amath/DEBIAN/copyright
|
||||
chmod 0755 amath/DEBIAN/copyright.gz
|
||||
|
||||
# Create change log
|
||||
{
|
||||
echo "amath (${version}) unstable; urgency=low"
|
||||
echo
|
||||
echo " * Initial Debian Release."
|
||||
echo
|
||||
echo " -- Carsten Larsen <cs@innolan.net> Sat, 04 Mar 2017 19:49:07 +0100"
|
||||
} >amath/DEBIAN/changelog.Debian
|
||||
gzip --best -n amath/DEBIAN/changelog.Debian
|
||||
chmod 0755 amath/DEBIAN/changelog.Debian.gz
|
||||
|
||||
{
|
||||
echo "libamath ${version}"
|
||||
echo "libamathc ${version}"
|
||||
echo "libamathcplex ${version}"
|
||||
echo "libamathapp ${version}"
|
||||
} >amath/DEBIAN/shlibs
|
||||
chmod 0644 amath/DEBIAN/shlibs
|
||||
|
||||
# Create post install script
|
||||
{
|
||||
echo "#!/bin/sh"
|
||||
echo "set -e"
|
||||
echo "ln -s /usr/lib/libamathapp.so.${version} /usr/lib/libamathapp.so"
|
||||
echo "ln -s /usr/lib/libamathc.so.${version} /usr/lib/libamathc.so"
|
||||
echo "ln -s /usr/lib/libamath.so.${version} /usr/lib/libamath.so"
|
||||
echo "ln -s /usr/lib/libamathcplex.so.${version} /usr/lib/libamathcplex.so"
|
||||
echo "ldconfig"
|
||||
} >amath/DEBIAN/postinst
|
||||
chmod 0755 amath/DEBIAN/postinst
|
||||
|
||||
# Create post remove script
|
||||
{
|
||||
echo "#!/bin/sh"
|
||||
echo "set -e"
|
||||
echo "if [ "\$1" = "remove" ]; then"
|
||||
echo "ldconfig"
|
||||
echo "fi"
|
||||
echo "rm -f /usr/lib/libamathapp.so.${version}"
|
||||
echo "rm -f /usr/lib/libamathc.so.${version}"
|
||||
echo "rm -f /usr/lib/libamath.so.${version}"
|
||||
echo "rm -f /usr/lib/libamathcplex.so.${version}"
|
||||
} >amath/DEBIAN/postrm
|
||||
chmod 0755 amath/DEBIAN/postrm
|
||||
} >amath/usr/share/doc/amath/copyright
|
||||
chmod 644 amath/usr/share/doc/amath/*
|
||||
|
||||
fakeroot dpkg-deb --build amath
|
||||
mv amath.deb amath-${version}_$1.deb
|
||||
rm -Rf amath
|
||||
}
|
||||
|
||||
build_package 'amd64' '' 64 980
|
||||
build_package 'i386' '-m32' 32 980
|
||||
build_package 'amd64' '' 64 320
|
||||
build_package 'i386' '-m32' 32 322
|
||||
|
||||
Executable
+219
@@ -0,0 +1,219 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright {c} 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES {INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION}
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT {INCLUDING NEGLIGENCE OR OTHERWISE} ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Project homepage:
|
||||
# https://amath.innolan.net
|
||||
#
|
||||
|
||||
# THIS SCRIPT IS NOT READY FOR PRODUCTION !
|
||||
|
||||
set -e
|
||||
|
||||
version="1.9.0"
|
||||
|
||||
build_package () {
|
||||
|
||||
rm -Rf amath
|
||||
rm -f amath.deb
|
||||
rm -f amath-dev-${version}_$1.deb
|
||||
sh configure CFLAGS=$2
|
||||
make clean
|
||||
|
||||
echo "Building $3 bit package of amath-dev ${version} for Debian ..."
|
||||
make
|
||||
mv amath amath.tmp
|
||||
|
||||
# Create filesystem layout
|
||||
mkdir -m 755 amath
|
||||
mkdir -m 755 amath/DEBIAN
|
||||
mkdir -m 755 amath/usr/
|
||||
mkdir -m 755 amath/usr/bin
|
||||
mkdir -m 755 amath/usr/lib
|
||||
mkdir -m 755 amath/usr/lib/pkgconfig
|
||||
mkdir -m 755 amath/usr/include
|
||||
mkdir -m 755 amath/usr/share
|
||||
mkdir -m 755 amath/usr/share/amath
|
||||
mkdir -m 755 amath/usr/share/man
|
||||
mkdir -m 755 amath/usr/share/man/man1
|
||||
mkdir -m 755 amath/usr/share/man/man3
|
||||
mkdir -m 755 amath/usr/share/doc
|
||||
mkdir -m 755 amath/usr/share/doc/amath-dev
|
||||
|
||||
# Copy binaries
|
||||
mv amath.tmp amath/usr/bin/amath
|
||||
chmod 0755 amath/usr/bin/amath
|
||||
mv src/lib/static/libamathapp.a amath/usr/lib/libamathapp.a
|
||||
chmod 0644 amath/usr/lib/libamathapp.a
|
||||
mv src/lib/libamathapp.so amath/usr/lib/libamathapp.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamathapp.so.${version}
|
||||
mv src/clib/static/libamathc.a amath/usr/lib/libamathc.a
|
||||
chmod 0644 amath/usr/lib/libamathc.a
|
||||
mv src/clib/libamathc.so amath/usr/lib/libamathc.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamathc.so.${version}
|
||||
mv src/real/static/libamath.a amath/usr/lib/libamath.a
|
||||
chmod 0644 amath/usr/lib/libamath.a
|
||||
mv src/real/libamath.so amath/usr/lib/libamath.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamath.so.${version}
|
||||
mv src/cplex/static/libamathcplex.a amath/usr/lib/libamathcplex.a
|
||||
chmod 0644 amath/usr/lib/libamathcplex.a
|
||||
mv src/cplex/libamathcplex.so amath/usr/lib/libamathcplex.so.${version}
|
||||
chmod 0644 amath/usr/lib/libamathcplex.so.${version}
|
||||
|
||||
# Copy pkg-config files
|
||||
cp src/lib/amatha.pc amath/usr/lib/pkgconfig/amatha.pc
|
||||
cp src/clib/amathc.pc amath/usr/lib/pkgconfig/amathc.pc
|
||||
cp src/real/amathr.pc amath/usr/lib/pkgconfig/amathr.pc
|
||||
cp src/cplex/amathi.pc amath/usr/lib/pkgconfig/amathi.pc
|
||||
chmod 644 amath/usr/lib/pkgconfig/*
|
||||
|
||||
# Copy includes
|
||||
cp src/amath.h amath/usr/include/amath.h
|
||||
cp src/amathc.h amath/usr/include/amathc.h
|
||||
cp src/amatht.h amath/usr/include/amatht.h
|
||||
cp src/mathi.h amath/usr/include/amathi.h
|
||||
cp src/mathr.h amath/usr/include/amathr.h
|
||||
chmod 644 amath/usr/include/*
|
||||
|
||||
# Copy documentation
|
||||
cp HISTORY amath/usr/share/doc/amath-dev/changelog
|
||||
gzip --best -n amath/usr/share/doc/amath-dev/changelog
|
||||
cp README amath/usr/share/doc/amath-dev/
|
||||
gzip --best -n amath/usr/share/doc/amath-dev/README
|
||||
chmod 644 amath/usr/share/doc/amath-dev/*
|
||||
|
||||
# Copy man pages
|
||||
cp amath.1 amath/usr/share/man/man1/amath.1
|
||||
cp src/clib/amathc.3 amath/usr/share/man/man3/amathc.3
|
||||
cp src/real/amathr.3 amath/usr/share/man/man3/amathr.3
|
||||
cp src/cplex/amathi.3 amath/usr/share/man/man3/amathi.3
|
||||
|
||||
gzip --best -n amath/usr/share/man/man1/amath.1
|
||||
gzip --best -n amath/usr/share/man/man3/amathc.3
|
||||
gzip --best -n amath/usr/share/man/man3/amathr.3
|
||||
gzip --best -n amath/usr/share/man/man3/amathi.3
|
||||
chmod 644 amath/usr/share/man/man1/*
|
||||
chmod 644 amath/usr/share/man/man3/*
|
||||
|
||||
# Copy scripts
|
||||
cp script/* amath/usr/share/amath/
|
||||
chmod 644 amath/usr/share/amath/*
|
||||
|
||||
# Create control file
|
||||
{
|
||||
echo "Package: amath-dev"
|
||||
echo "Version: ${version}"
|
||||
echo "Architecture: $1"
|
||||
echo "Maintainer: Carsten Sonne Larsen <cs@innolan.net>"
|
||||
echo "Installed-Size: $4"
|
||||
echo "Depends: libc6"
|
||||
echo "Section: math"
|
||||
echo "Priority: optional"
|
||||
echo "Homepage: https://amath.innolan.net"
|
||||
echo "Built-Using: gcc-5.4"
|
||||
echo "Description: Simple command line calculator"
|
||||
echo " Features a case sensitive command line interface, internal IEEE 754"
|
||||
echo " calculations with 15 significant digits, calculations with real and"
|
||||
echo " complex numbers, variables and user defined functions, logarithmic"
|
||||
echo " and exponential functions, trigonometric and hyperbolic function"
|
||||
echo " and selected mathematical constants and rounding functions."
|
||||
} >amath/DEBIAN/control
|
||||
chmod 0755 amath/DEBIAN/control
|
||||
|
||||
# Create license file
|
||||
{
|
||||
echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
|
||||
echo "Upstream-Name: amath-dev"
|
||||
echo "Source: https://amath.innolan.net"
|
||||
echo
|
||||
echo "Files: *"
|
||||
echo "Copyright: 2014-2021 Carsten Sonne Larsen <cs@innolan.net>"
|
||||
echo " 2007 The NetBSD Foundation, Inc."
|
||||
echo " 1990, 1993 The Regents of the University of California."
|
||||
echo "License: BSD-2-Clause"
|
||||
echo " Redistribution and use in source and binary forms, with or without"
|
||||
echo " modification, are permitted provided that the following conditions are met:"
|
||||
echo " ."
|
||||
echo " Redistributions of source code must retain the above copyright notice, this"
|
||||
echo " list of conditions and the following disclaimer."
|
||||
echo " ."
|
||||
echo " Redistributions in binary form must reproduce the above copyright notice,"
|
||||
echo " this list of conditions and the following disclaimer in the documentation"
|
||||
echo " and/or other materials provided with the distribution."
|
||||
echo " ."
|
||||
echo " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\""
|
||||
echo " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE"
|
||||
echo " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE"
|
||||
echo " DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE"
|
||||
echo " FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL"
|
||||
echo " DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR"
|
||||
echo " SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER"
|
||||
echo " CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,"
|
||||
echo " OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE"
|
||||
echo " OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
} >amath/usr/share/doc/amath-dev/copyright
|
||||
chmod 644 amath/usr/share/doc/amath-dev/copyright
|
||||
|
||||
{
|
||||
echo "libamath ${version}"
|
||||
echo "libamathc ${version}"
|
||||
echo "libamathcplex ${version}"
|
||||
echo "libamathapp ${version}"
|
||||
} >amath/DEBIAN/shlibs
|
||||
chmod 0644 amath/DEBIAN/shlibs
|
||||
|
||||
# Create post install script
|
||||
{
|
||||
echo "#!/bin/sh"
|
||||
echo "set -e"
|
||||
echo "ln -s /usr/lib/libamathapp.so.${version} /usr/lib/libamathapp.so"
|
||||
echo "ln -s /usr/lib/libamathc.so.${version} /usr/lib/libamathc.so"
|
||||
echo "ln -s /usr/lib/libamath.so.${version} /usr/lib/libamath.so"
|
||||
echo "ln -s /usr/lib/libamathcplex.so.${version} /usr/lib/libamathcplex.so"
|
||||
echo "ldconfig"
|
||||
} >amath/DEBIAN/postinst
|
||||
chmod 0755 amath/DEBIAN/postinst
|
||||
|
||||
# Create post remove script
|
||||
{
|
||||
echo "#!/bin/sh"
|
||||
echo "set -e"
|
||||
echo "if [ "\$1" = "remove" ]; then"
|
||||
echo "ldconfig"
|
||||
echo "fi"
|
||||
echo "rm -f /usr/lib/libamathapp.so.${version}"
|
||||
echo "rm -f /usr/lib/libamathc.so.${version}"
|
||||
echo "rm -f /usr/lib/libamath.so.${version}"
|
||||
echo "rm -f /usr/lib/libamathcplex.so.${version}"
|
||||
} >amath/DEBIAN/postrm
|
||||
chmod 0755 amath/DEBIAN/postrm
|
||||
|
||||
fakeroot dpkg-deb --build amath
|
||||
mv amath.deb amath-dev-${version}_$1.deb
|
||||
rm -Rf amath
|
||||
}
|
||||
|
||||
build_package 'amd64' '' 64 980
|
||||
build_package 'i386' '-m32' 32 980
|
||||
@@ -1,63 +1,128 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Build Classic AmigaOS distribtion package
|
||||
# This file is public domain
|
||||
#
|
||||
# Project homepage:
|
||||
# https://amath.innolan.net
|
||||
#
|
||||
|
||||
# Add compiler path before invoking. Fx:
|
||||
# export PATH="/opt/m68k-amigaos/bin/:$PATH"
|
||||
|
||||
set -e
|
||||
|
||||
rm -f amath.lha
|
||||
rm -Rf amath
|
||||
rm -Rf dist
|
||||
mkdir dist
|
||||
distdir="dist"
|
||||
builddir="tmp"
|
||||
bindir="bin"
|
||||
stamp="202101120000"
|
||||
|
||||
./configure --disable-test --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
|
||||
rm -Rf ${distdir}
|
||||
rm -Rf ${builddir}
|
||||
mkdir -p ${builddir}
|
||||
|
||||
# Build binaries
|
||||
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
|
||||
make clean
|
||||
make static
|
||||
mv amath dist/amath.000
|
||||
mv amath ${builddir}/amath
|
||||
make clean
|
||||
./configure --disable-test --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
|
||||
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
|
||||
make static
|
||||
mv amath dist/amath.020
|
||||
mv amath ${builddir}/amath.020
|
||||
make clean
|
||||
./configure --disable-test --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
|
||||
./configure --disable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
|
||||
make static
|
||||
mv amath dist/amath.030
|
||||
mv amath ${builddir}/amath.030
|
||||
make clean
|
||||
|
||||
./configure --enable-test --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
|
||||
# Build test binaries
|
||||
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68000 -noixemul"
|
||||
make static
|
||||
mv amath dist/amath-test.000
|
||||
mv amath ${builddir}/amath-test
|
||||
make clean
|
||||
./configure --enable-test --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
|
||||
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68020 -noixemul"
|
||||
make static
|
||||
mv amath dist/amath-test.020
|
||||
mv amath ${builddir}/amath-test.020
|
||||
make clean
|
||||
./configure --enable-test --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
|
||||
./configure --enable-test --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
|
||||
make static
|
||||
mv amath dist/amath-test.030
|
||||
mv amath ${builddir}/amath-test.030
|
||||
make clean
|
||||
|
||||
cd dist
|
||||
# Build catalogs
|
||||
make catalogs
|
||||
make clean
|
||||
|
||||
# Build documentation
|
||||
#./build/doc >${builddir}/amath.doc amath.1
|
||||
groff >${builddir}/amath.html amath.1 -mandoc -Thtml
|
||||
|
||||
# Generate hashkeys
|
||||
cd ${builddir}
|
||||
touch hashkeys
|
||||
sha1sum amath.000 >>hashkeys
|
||||
sha1sum amath >>hashkeys
|
||||
sha1sum amath.020 >>hashkeys
|
||||
sha1sum amath.030 >>hashkeys
|
||||
sha1sum amath-test.000 >>hashkeys
|
||||
sha1sum amath-test >>hashkeys
|
||||
sha1sum amath-test.020 >>hashkeys
|
||||
sha1sum amath-test.030 >>hashkeys
|
||||
sha256sum amath.000 >>hashkeys
|
||||
sha256sum amath >>hashkeys
|
||||
sha256sum amath.020 >>hashkeys
|
||||
sha256sum amath.030 >>hashkeys
|
||||
sha256sum amath-test.000 >>hashkeys
|
||||
sha256sum amath-test >>hashkeys
|
||||
sha256sum amath-test.020 >>hashkeys
|
||||
sha256sum amath-test.030 >>hashkeys
|
||||
cd ..
|
||||
|
||||
make catalogs
|
||||
cp LICENSE dist/
|
||||
cp HISTORY dist/
|
||||
# Build distribution directory structure
|
||||
mkdir -m 775 ${distdir}
|
||||
mkdir -m 775 ${distdir}/amath
|
||||
mkdir -m 775 ${distdir}/amath/ARexx
|
||||
mkdir -m 775 ${distdir}/amath/Catalog
|
||||
mkdir -m 775 ${distdir}/amath/Catalog/english
|
||||
mkdir -m 775 ${distdir}/amath/Script
|
||||
mkdir -m 775 ${distdir}/amath/Test
|
||||
|
||||
mkdir dist/script
|
||||
cp script/* dist/script/
|
||||
date -Ru >dist/build_date
|
||||
#uname -srmo >dist/build_host
|
||||
# Install icons
|
||||
install -m 664 ${bindir}/root/*.info ${distdir}/
|
||||
install -m 664 ${bindir}/prog/*.info ${distdir}/amath/
|
||||
install -m 664 ${bindir}/catalog/*.info ${distdir}/amath/Catalog/
|
||||
install -m 664 ${bindir}/script/*.info ${distdir}/amath/Script/
|
||||
|
||||
mv dist amath
|
||||
#lha-ac a amath.lha amath
|
||||
# Install documentation
|
||||
install -m 664 HISTORY ${distdir}/amath/
|
||||
install -m 664 LICENSE ${distdir}/amath/
|
||||
install -m 664 ${builddir}/hashkeys ${distdir}/amath/
|
||||
install -m 664 ${builddir}/amath.html ${distdir}/amath/
|
||||
install -m 664 ${bindir}/amath.doc ${distdir}/amath/
|
||||
install -m 664 ${bindir}/amath.readme ${distdir}/amath/
|
||||
|
||||
# Install scripts
|
||||
install -m 755 arexx/* ${distdir}/amath/ARexx/
|
||||
install -m 755 script/* ${distdir}/amath/Script/
|
||||
|
||||
# Install binaries
|
||||
install -m 755 ${builddir}/amath ${distdir}/amath/
|
||||
install -m 755 ${builddir}/amath.020 ${distdir}/amath/
|
||||
install -m 755 ${builddir}/amath.030 ${distdir}/amath/
|
||||
install -m 755 ${builddir}/amath-test ${distdir}/amath/Test/
|
||||
install -m 755 ${builddir}/amath-test.020 ${distdir}/amath/Test/
|
||||
install -m 755 ${builddir}/amath-test.030 ${distdir}/amath/Test/
|
||||
|
||||
# Install catalogs
|
||||
install -m 755 distcat/catalog/english/*.catalog ${distdir}/amath/Catalog/english/
|
||||
|
||||
# Sign build with date
|
||||
date -Ru >${distdir}/amath/build_date
|
||||
#uname -srmo >${distdir}/amath/build_host
|
||||
|
||||
for f in $(find ${distdir} -name '*'); do touch -amt ${stamp}.00 $f; done
|
||||
|
||||
# Cleanup
|
||||
rm -Rf distcat
|
||||
rm -Rf ${builddir}
|
||||
|
||||
# Install source
|
||||
./buildsrc
|
||||
mv amath-1.9.0 ${distdir}/
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Build source distribtion package
|
||||
# This file is public domain
|
||||
#
|
||||
# Project homepage:
|
||||
# https://amath.innolan.net
|
||||
#
|
||||
|
||||
# DO NOT USE THIS SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING !
|
||||
|
||||
version='1.9.0'
|
||||
stamp="202101120000"
|
||||
srcdir="."
|
||||
distdir="amath-${version}"
|
||||
|
||||
rm -f amath-${version}.tar.gz
|
||||
rm -Rf ${distdir}
|
||||
|
||||
mkdir -m 775 ${distdir}
|
||||
mkdir -m 775 ${distdir}/src/
|
||||
mkdir -m 775 ${distdir}/src/clib/
|
||||
mkdir -m 775 ${distdir}/src/cplex/
|
||||
mkdir -m 775 ${distdir}/src/lib/
|
||||
mkdir -m 775 ${distdir}/src/loc/
|
||||
mkdir -m 775 ${distdir}/src/real/
|
||||
mkdir -m 775 ${distdir}/src/system/
|
||||
mkdir -m 775 ${distdir}/src/main/
|
||||
mkdir -m 775 ${distdir}/src/main/function
|
||||
mkdir -m 775 ${distdir}/src/main/statement/
|
||||
mkdir -m 775 ${distdir}/script/
|
||||
mkdir -m 775 ${distdir}/text/
|
||||
mkdir -m 775 ${distdir}/catalog/
|
||||
mkdir -m 775 ${distdir}/catalog/english/
|
||||
mkdir -m 775 ${distdir}/build/
|
||||
mkdir -m 775 ${distdir}/build/flexcat/
|
||||
|
||||
install -m 664 ${srcdir}/src/*.h ${distdir}/src/
|
||||
install -m 664 ${srcdir}/src/*.cpp ${distdir}/src/
|
||||
install -m 664 ${srcdir}/src/clib/* ${distdir}/src/clib/
|
||||
install -m 664 ${srcdir}/src/cplex/* ${distdir}/src/cplex/
|
||||
install -m 664 ${srcdir}/src/lib/* ${distdir}/src/lib/
|
||||
install -m 664 ${srcdir}/src/loc/* ${distdir}/src/loc/
|
||||
install -m 664 ${srcdir}/src/real/* ${distdir}/src/real/
|
||||
install -m 664 ${srcdir}/src/system/* ${distdir}/src/system/
|
||||
install -m 664 ${srcdir}/src/main/*.h ${distdir}/src/main/
|
||||
install -m 664 ${srcdir}/src/main/*.cpp ${distdir}/src/main/
|
||||
install -m 664 ${srcdir}/src/main/function/* ${distdir}/src/main/function/
|
||||
install -m 664 ${srcdir}/src/main/statement/* ${distdir}/src/main/statement/
|
||||
install -m 664 ${srcdir}/script/* ${distdir}/script/
|
||||
install -m 664 ${srcdir}/text/* ${distdir}/text/
|
||||
install -m 664 ${srcdir}/catalog/english/* ${distdir}/catalog/english/
|
||||
install -m 664 ${srcdir}/build/flexcat/* ${distdir}/build/flexcat/
|
||||
install -m 664 ${srcdir}/HISTORY ${distdir}/
|
||||
install -m 664 ${srcdir}/LICENSE ${distdir}/
|
||||
install -m 664 ${srcdir}/README ${distdir}/
|
||||
install -m 664 ${srcdir}/amath.1 ${distdir}/
|
||||
install -m 775 ${srcdir}/configure ${distdir}/
|
||||
install -m 775 ${srcdir}/builddeb ${distdir}/
|
||||
install -m 775 ${srcdir}/builddist ${distdir}/
|
||||
install -m 775 ${srcdir}/buildwin ${distdir}/
|
||||
|
||||
chown -R 1000:1000 ${distdir}
|
||||
|
||||
for f in $(find ${distdir} -name '*'); do touch -amt ${stamp}.00 $f; done
|
||||
tar --numeric-owner -cvzf amath-${version}.tar.gz ${distdir}
|
||||
@@ -1,8 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This file is public domain
|
||||
#
|
||||
# Project homepage:
|
||||
# https://amath.innolan.net
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
version="1.7.0"
|
||||
version="1.9.0"
|
||||
|
||||
echo "Building amath ${version} for Windows ..."
|
||||
|
||||
@@ -11,45 +17,31 @@ rm -Rf amath
|
||||
rm -Rf dist
|
||||
mkdir dist
|
||||
|
||||
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-D_WIN32" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
||||
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-DWINDOWS" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
||||
make clean
|
||||
make static
|
||||
mv amath dist/amath-${version}-x86.exe
|
||||
make clean
|
||||
|
||||
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-D_WIN32" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
||||
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-DWINDOWS" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
||||
make static
|
||||
mv amath dist/amath-${version}-x64.exe
|
||||
make clean
|
||||
|
||||
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-D_WIN32 -DANSICONSOLE" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
||||
make static
|
||||
mv amath dist/amath-${version}-ansi-x86.exe
|
||||
make clean
|
||||
#cd dist
|
||||
#touch hashkeys.txt
|
||||
#sha1sum amath-${version}-x86.exe >>hashkeys.txt
|
||||
#sha1sum amath-${version}-x86.exe >>hashkeys.txt
|
||||
#sha256sum amath-${version}-x86.exe >>hashkeys.txt
|
||||
#sha256sum amath-${version}-x86.exe >>hashkeys.txt
|
||||
#cd ..
|
||||
|
||||
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-D_WIN32 -DANSICONSOLE" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
||||
make static
|
||||
mv amath dist/amath-${version}-ansi-x64.exe
|
||||
make clean
|
||||
|
||||
cd dist
|
||||
touch hashkeys
|
||||
sha1sum amath-${version}-x86.exe >>hashkeys
|
||||
sha1sum amath-${version}-x86.exe >>hashkeys
|
||||
sha1sum amath-${version}-ansi-x86.exe >>hashkeys
|
||||
sha1sum amath-${version}-ansi-x64.exe >>hashkeys
|
||||
sha256sum amath-${version}-x86.exe >>hashkeys
|
||||
sha256sum amath-${version}-x86.exe >>hashkeys
|
||||
sha256sum amath-${version}-ansi-x86.exe >>hashkeys
|
||||
sha256sum amath-${version}-ansi-x64.exe >>hashkeys
|
||||
cd ..
|
||||
|
||||
cp LICENSE dist/
|
||||
cp HISTORY dist/
|
||||
tr '\n' '\r' <LICENSE >dist/license.txt
|
||||
tr '\n' '\r' <HISTORY >dist/changes.txt
|
||||
|
||||
mkdir dist/script
|
||||
cp script/* dist/script/
|
||||
date -Ru >dist/build_date
|
||||
date -Ru >dist/build.txt
|
||||
|
||||
mv dist amath
|
||||
zip -r amath-${version}.zip amath/*
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
## version $VER: amath-help.catalog 1.60 (09.04.2015) Danish
|
||||
## language dansk
|
||||
## codeset 0
|
||||
; #############################################################################
|
||||
; Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
;
|
||||
; * Redistributions of source code must retain the above copyright notice, this
|
||||
; list of conditions and the following disclaimer.
|
||||
;
|
||||
; * Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation
|
||||
; and/or other materials provided with the distribution.
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
; #############################################################################
|
||||
; ### flexcat catalog/help.cd NEWCTFILE catalog/danish/amath-help.ct
|
||||
; flexcat catalog/help.cd catalog/danish/amath-help.ct CATALOG catalog/danish/amath-help.catalog
|
||||
; #############################################################################
|
||||
symzero
|
||||
Indtast kommando eller udtryk.#NEWLINE##SYNTAXHIGHLIGHT#Eksempel: 2+3-cos(3)#NORMALTEXT##NEWLINE# #NEWLINE#Mere hj�lp er tilg�ngelig i udvalgte omr�der#NEWLINE#-------------------------------------------------#NEWLINE#funktioner Grundl�ggende funktioner.#NEWLINE#trigo Trigonometriske funktioner.#NEWLINE#hyper Hyperbolske funktioner.#NEWLINE#kompleks Komplekse tal.#NEWLINE#kommandoer Underst�ttede kommondoer.#NEWLINE#operatorer Underst�ttede operatorer.#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Eksemple: hj�lp trigo#NEWLINE#
|
||||
symoperator
|
||||
-------------------------------------------------#NEWLINE# + Matematik addition.#NEWLINE# - Matematik subtraktion.#NEWLINE# * Matematik multiplikation.#NEWLINE# / Matematik division.#NEWLINE# ^ Matematik potensopl�ftning.#NEWLINE# = Tildeling af variabel v�rdi.#NEWLINE# | Absolutte eller numerisk v�rdi.#NEWLINE#-------------------------------------------------#NEWLINE#
|
||||
symfunction
|
||||
-------------------------------------------------#NEWLINE#abs Absolutte eller numerisk v�rdi.#NEWLINE#sgn Matematik signum funktion.#NEWLINE#round Afrund til n�rmeste heltal.#NEWLINE#trunc Fjern decimaler.#NEWLINE#floor Afrund i positiv retning.#NEWLINE#ceil Afrund i negativ retning.#NEWLINE#sqrt Kvadratrodsfunktion (exponent 1/2).#NEWLINE#cbrt Kubikrods (exponent 1/3).#NEWLINE#lb Bin�r logaritme funktion (grundtal 2).#NEWLINE#ln Naturlig logaritme funktion (grundtal e).#NEWLINE#lg 10-talslogaritme funktion (grundtal 10).#NEWLINE#-------------------------------------------------#NEWLINE##SYNTAXHIGHLIGHT#Eksempel: round(1.55)#NORMALTEXT##NEWLINE#
|
||||
symtrigon
|
||||
-------------------------------------------------#NEWLINE#sin Trigonometrisk sinus funktion.#NEWLINE#cos Trigonometrisk cosinus funktion.#NEWLINE#tan Trigonometrisk tangent funktion.#NEWLINE#cot Trigonometrisk cotangent funktion.#NEWLINE#sec Trigonometrisk secant funktion.#NEWLINE#csc Trigonometrisk cosecant funktion.#NEWLINE#asin Invers trigonometrisk sinus funktion.#NEWLINE#acos Invers trigonometrisk cosinus funktion.#NEWLINE#atan Invers trigonometrisk tangent funktion.#NEWLINE#acot Invers trigonometrisk cotangent funktion.#NEWLINE#asec Invers trigonometrisk secant funktion.#NEWLINE#acsc Invers trigonometrisk cosecant funktion.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse funktioner kan prefixes med ar eller arc #NEWLINE#i stedet for a.#NEWLINE#
|
||||
symhyper
|
||||
-------------------------------------------------#NEWLINE#sinh Hyperbolsk sinus funktion.#NEWLINE#cosh Hyperbolsk cosinus funktion.#NEWLINE#tanh Hyperbolsk tangent funktion.#NEWLINE#coth Hyperbolsk cotangent funktion.#NEWLINE#sech Hyperbolsk secant funktion.#NEWLINE#csch Hyperbolsk cosecant funktion. #NEWLINE#asinh Invers hyperbolsk sinus funktion.#NEWLINE#acosh Invers hyperbolsk cosinus funktion.#NEWLINE#atanh Invers hyperbolsk tangent funktion.#NEWLINE#acoth Invers hyperbolsk cotangent funktion.#NEWLINE#asech Invers hyperbolsk secant funktion.#NEWLINE#acsch Invers hyperbolsk cosecant funktion.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse funktioner kan prefixes med ar eller arc #NEWLINE#i stedet for a.#NEWLINE#
|
||||
symearly
|
||||
TODO-------------------------------------------------#NEWLINE#ver Versed sine function.#NEWLINE#vcs Versed cosine function.#NEWLINE#cvs Coversed sine function.#NEWLINE#cvc Coversed cosine function.#NEWLINE#hv Haversed sine function.#NEWLINE#hvc Haversed cosine function.#NEWLINE#hcv Hacoversed sine function.#NEWLINE#hcc Hacoversed cosine function.#NEWLINE#aver Inverse versed sine function.#NEWLINE#avcs Inverse versed cosine function.#NEWLINE#acvs Inverse coversed sine function.#NEWLINE#acvc Inverse coversed cosine function.#NEWLINE#ahv Inverse haversed sine function.#NEWLINE#ahvc Inverse haversed cosine function.#NEWLINE#ahcv Inverse hacoversed sine function.#NEWLINE#ahcc Inverse hacoversed cosine function.#NEWLINE#-------------------------------------------------#NEWLINE#Inverse functions can be prefixed with ar or arc #NEWLINE#instead of a.#NEWLINE#
|
||||
symcomplex
|
||||
Udtryk med komplekse tal skrives ved at angive i#NEWLINE#sammen med den imagin�re talv�rdi. Komplekse tal#NEWLINE#kan blandes med reelle tal.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: 2+3i#NEWLINE#Eksempel: 2+3.2i*cos(-1i)+5/7#NEWLINE#
|
||||
symclear
|
||||
Ryd kommandoen sletter alt tekst i konsol vinduet.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: ryd#NEWLINE#
|
||||
symdef
|
||||
Definer kommandoen bruges til at definere funktioner med. Det er ikke#NEWLINE#strengt n�dvendigt at angive kommandoen, n�r en funktion skal defineres.#NEWLINE#Allerede definerede funktioner kan vises med kommandoen #SYNTAXHIGHLIGHT#funtioner#NORMAL#.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: definer f(x)=2*x+3#NEWLINE#Alternativ syntaks: f(x)=2*x+3#NEWLINE#
|
||||
; Help for delete statement
|
||||
symdelete
|
||||
The delete statement can delete variable and funktions. To delete a#NEWLINE#single variable or funktions use the name of the funktion or variable.#NEWLINE#To delete all funktions or variables specify either the variable or#NEWLINE#funktion keyword.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: delete f(x)#NEWLINE#Syntaks: delete variables#NEWLINE#
|
||||
; Help for digits statement
|
||||
symdigits
|
||||
The digits statement defines the displayed number of significant digits.#NEWLINE#To show current configuration use the digits statement without specifying#NEWLINE#the number.#NEWLINE# #SYNTAXHIGHLIGHT#Syntaks: digits 7#NEWLINE#
|
||||
; Help for eval statement
|
||||
symeval
|
||||
The eval statement evaluates an expression. When evaluating an expression#NEWLINE#it is possible to omit the eval keyword.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: eval 2.4*x+3.2#NEWLINE#Optional syntax: 2.4*x+3.2#NEWLINE#
|
||||
; Help for execute statement
|
||||
symexecute
|
||||
The execute statement reads the content of a file and execute all statements.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: execute "savedfile"#NEWLINE#
|
||||
; Help for input statement
|
||||
syminput
|
||||
The input statement either changes or shows the how numeral input is interpreted.#NEWLINE#Possible input systems are: binary, octal, decimal and hexadecimal. Default is#NEWLINE#decimal. To use positional systems with other bases specify the base number.#NEWLINE#Numeral output system can be modified using the output statement.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: input hexadecimal#NEWLINE#Syntaks: input 4#NEWLINE#
|
||||
; Help for help statement
|
||||
symhelp
|
||||
The help statement can be used to display help about topics and statements.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: help variables#NEWLINE#
|
||||
; Help for output statement
|
||||
symoutput
|
||||
The output statement either changes or shows the how numeral output is shown.#NEWLINE#Possible output systems are: binary, octal, decimal and hexadecimal. Default#NEWLINE#is decimal. To use positional systems with other bases specify the base number.#NEWLINE#Numeral input system can be modified using the input statement.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: output octal#NEWLINE#
|
||||
; Help for list statement
|
||||
symlist
|
||||
No description is available for the list statement.#NEWLINE#
|
||||
symshow
|
||||
Vis kommandoen kan bruges til at vise indholdet af en fil, der �nskes k�rt.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: vis "mitscript"#NEWLINE#
|
||||
; Help for load statement
|
||||
symload
|
||||
The load statement retrieves a set of defined variables and funktions from#NEWLINE#a file. Variables and funktions can be saved using the save statement.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: load "savedwork"#NEWLINE#
|
||||
; Help for save statement
|
||||
symsave
|
||||
Med gem kommando kan variabler og funktioner i hukommelsen gemmes til en fil.#NEWLINE#Gemte variabler og funktion kan indl�stet igen med #SYNTAXHIGHLIGHT#hent#NORMAL# kommandoen.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: gem "mitarbejde"#NEWLINE#
|
||||
symversion
|
||||
Viser hvilken version af amath der k�rer.#NEWLINE#
|
||||
symabout
|
||||
TODOShow various information about the running version of amath.#NEWLINE#
|
||||
symlicense
|
||||
TODOShow license details.#NEWLINE#
|
||||
symmem
|
||||
Viser internt hukommelsesforbrug. Programkoden er ikke medregnet.#NEWLINE#
|
||||
; Help for prefs statement
|
||||
symprefs
|
||||
There is no help for prefs statement now.#NEWLINE#
|
||||
symvariable
|
||||
Variabler kommandoen viser en list af definerede variabler i hukommelsen.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: variabler#NEWLINE#Alternativ syntaks: var#NEWLINE#
|
||||
symexit
|
||||
Afslut kommandoen lukker amath programmet.#NEWLINE##SYNTAXHIGHLIGHT#Syntaks: afslut#NEWLINE#
|
||||
; Help for constant epsilon
|
||||
syme
|
||||
Euler's number is base of the exponential funktion which equals its own#NEWLINE#derivative. It is approximately equal to 2.71828.#NEWLINE##SYNTAXHIGHLIGHT#Example: ln(e)#NEWLINE#
|
||||
; Help for constant pi
|
||||
sympi
|
||||
Pi is the ratio of the circumference of a circle to its diameter. Being an#NEWLINE#irrational number, pi cannot be expressed exactly as a common fraction.#NEWLINE#The value of pi is commonly approximated as #SYNTAXHIGHLIGHT#3.14159#NORMALTEXT#.#NEWLINE#
|
||||
symi
|
||||
Den imagin�re enhen refereres og angives almindelig vis som i.#NEWLINE#Den imagin�re enhen et tal, som n�r det ganges med sig selv,#NEWLINE#giver resultatet -1.#NEWLINE#
|
||||
symins
|
||||
Den sidst udregnede v�rdi kan benyttes i n�ste udtryk ved hj�lp af #SYNTAXHIGHLIGHT#ins#NORMAL# variablen.#NEWLINE##SYNTAXHIGHLIGHT#Eksemple: ins*0,25#NEWLINE#
|
||||
symbin
|
||||
Der er ikke nogen hj�lp tilg�ngelig om bin�r n�gleordet.#NEWLINE
|
||||
symoct
|
||||
Der er ikke nogen hj�lp tilg�ngelig om oktal n�gleordet.#NEWLINE
|
||||
symdec
|
||||
Der er ikke nogen hj�lp tilg�ngelig om decimal n�gleordet.#NEWLINE
|
||||
symhex
|
||||
Der er ikke nogen hj�lp tilg�ngelig om hexadecimal n�gleordet.#NEWLINE
|
||||
@@ -1,121 +0,0 @@
|
||||
## version $VER: amath-ident.catalog 1.60 (08.04.2015) Danish
|
||||
## language dansk
|
||||
## codeset 0
|
||||
; #############################################################################
|
||||
; ## Help texts for built-in functions in amath
|
||||
; ## ------------------------------------------
|
||||
; ##
|
||||
; ## This file is published under Creative Common License. See:
|
||||
; ## http://creativecommons.org/licenses/by-sa/3.0/
|
||||
; ## Parts of the content came from wikipedia.org
|
||||
; #############################################################################
|
||||
abs
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
sgn
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
round
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
trunc
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
floor
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
ceil
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
sqr
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
cbr
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
lb
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
ln
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
lg
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
sin
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
cos
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
tan
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
cot
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
sec
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
csc
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
asin
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
acos
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
atan
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
acot
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
asec
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
acsc
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
sinh
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
cosh
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
tanh
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
coth
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
sech
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
csch
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
asinh
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
acosh
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
atanh
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
acoth
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
asech
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
acsch
|
||||
Der er ikke nogen hj�lp tilg�ngelig om den funktion.#NEWLINE#
|
||||
ver
|
||||
The versed sine is an early appearing trigonometric function.#NEWLINE#It is equal to one minus the cosine.#NEWLINE#ver(x) = 1 - cos(x)#NEWLINE#
|
||||
vcs
|
||||
The versed cosine is an early appearing trigonometric function.#NEWLINE#It is equal to one plus the cosine.#NEWLINE#ver(x) = 1 + cos(x)#NEWLINE#
|
||||
cvs
|
||||
The coversed sine is an early appearing trigonometric function.#NEWLINE#It is equal to one minus the sine.#NEWLINE#ver(x) = 1 - sin(x)#NEWLINE#
|
||||
cvc
|
||||
The coversed cosine is an early appearing trigonometric function.#NEWLINE#It is equal to one plus the sine.#NEWLINE#cvc(x) = 1 + sin(x)#NEWLINE#
|
||||
hv
|
||||
No help is available for the haversed sine function.#NEWLINE#
|
||||
hvc
|
||||
No help is available for the haversed cosine function.#NEWLINE#
|
||||
hcv
|
||||
No help is available for the hacoversed sine function.#NEWLINE#
|
||||
hcc
|
||||
No help is available for the hacoversed cosine function.#NEWLINE#
|
||||
aver
|
||||
No help is available for this function.#NEWLINE#
|
||||
avcs
|
||||
No help is available for this function.#NEWLINE#
|
||||
acvs
|
||||
No help is available for this function.#NEWLINE#
|
||||
acvc
|
||||
No help is available for this function.#NEWLINE#
|
||||
ahv
|
||||
No help is available for this function.#NEWLINE#
|
||||
ahvc
|
||||
No help is available for this function.#NEWLINE#
|
||||
ahcv
|
||||
No help is available for this function.#NEWLINE#
|
||||
ahcc
|
||||
No help is available for this function.#NEWLINE#
|
||||
exsec
|
||||
No help is available for this function.#NEWLINE#
|
||||
excsc
|
||||
No help is available for this function.#NEWLINE#
|
||||
aexsec
|
||||
No help is available for this function.#NEWLINE#
|
||||
aexcsc
|
||||
No help is available for this function.#NEWLINE#
|
||||
@@ -1,164 +0,0 @@
|
||||
## version $VER: amath-keyword.catalog 1.60 (08.04.2015) Danish
|
||||
## language dansk
|
||||
## codeset 0
|
||||
;#############################################################################
|
||||
; Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
;
|
||||
; * Redistributions of source code must retain the above copyright notice, this
|
||||
; list of conditions and the following disclaimer.
|
||||
;
|
||||
; * Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation
|
||||
; and/or other materials provided with the distribution.
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
;#############################################################################
|
||||
;######### ClearStatement
|
||||
clear
|
||||
ryd
|
||||
;######### FunctionDefinition statement
|
||||
def
|
||||
definer
|
||||
;######### DeleteStatement and keyword
|
||||
delete
|
||||
slet
|
||||
;######### Eulers Number keyword
|
||||
e
|
||||
e
|
||||
;######### Complex i keyword
|
||||
i
|
||||
i
|
||||
;######### pi keyword
|
||||
pi
|
||||
pi
|
||||
;######### ins variable keyword
|
||||
ins
|
||||
ins
|
||||
;######### EvalStatement
|
||||
eval
|
||||
beregn
|
||||
;######### DrawStatement
|
||||
draw
|
||||
tegn
|
||||
;######### PlotStatement
|
||||
plot
|
||||
plot
|
||||
;######### ExecuteStatement
|
||||
execute
|
||||
k�r
|
||||
;######### ExitStatement
|
||||
exit
|
||||
afslut
|
||||
quit
|
||||
slut
|
||||
;######### Statements keyword
|
||||
statements
|
||||
kommandoer
|
||||
;######### Operators keyword
|
||||
operators
|
||||
operatorer
|
||||
;######### Complex keyword
|
||||
complex
|
||||
kompleks
|
||||
;######### Function keyword
|
||||
funcs
|
||||
funk
|
||||
functions
|
||||
funktioner
|
||||
;######### Trigonometric keyword
|
||||
trigon
|
||||
trigo
|
||||
trigonometric
|
||||
trigonometri
|
||||
;######### Hyperbolic keyword
|
||||
hyper
|
||||
hyper
|
||||
hyperbolic
|
||||
hyperbolsk
|
||||
;######### Early keyword
|
||||
early
|
||||
tidlig
|
||||
;######### HelpStatement
|
||||
help
|
||||
hj�lp
|
||||
;######### PromptStatement
|
||||
prompt
|
||||
prompt
|
||||
;######### VersionStatement
|
||||
version
|
||||
version
|
||||
;######### MemoryStatement
|
||||
mem
|
||||
hukommelse
|
||||
memory
|
||||
hukommelse
|
||||
;######### PrefsStatement
|
||||
prefs
|
||||
pr�f
|
||||
preferences
|
||||
pr�ferencer
|
||||
;######### ListStatement and keyword
|
||||
list
|
||||
list
|
||||
;######### LoadStatement and keyword
|
||||
load
|
||||
hent
|
||||
;######### SaveStatement and keyword
|
||||
save
|
||||
gem
|
||||
;######### ShowStatement and keyword
|
||||
show
|
||||
vis
|
||||
;######### ListVariablesStatement and keyword
|
||||
vars
|
||||
var
|
||||
variables
|
||||
variabler
|
||||
;######### DigitsStatement
|
||||
digits
|
||||
cifre
|
||||
;######### InputStatement
|
||||
input
|
||||
ind
|
||||
;######### OutputStatement
|
||||
output
|
||||
ud
|
||||
;######### Binary keyword
|
||||
bin
|
||||
bin
|
||||
binary
|
||||
bin�r
|
||||
;######### Octal keyword
|
||||
oct
|
||||
okt
|
||||
octal
|
||||
oktal
|
||||
;######### Decimal keyword
|
||||
dec
|
||||
dec
|
||||
decimal
|
||||
decimal
|
||||
;######### Hexadecimal keyword
|
||||
hex
|
||||
hex
|
||||
hexadecimal
|
||||
hexadecimal
|
||||
;######### AboutStatement and keyword
|
||||
about
|
||||
om
|
||||
;######### LicenseStatement and keyword
|
||||
license
|
||||
lisens
|
||||
@@ -1,136 +0,0 @@
|
||||
## version $VER: amath-text.catalog 1.60 (08.04.2015) Danish
|
||||
## language dansk
|
||||
## codeset 0
|
||||
; #############################################################################
|
||||
; Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
;
|
||||
; * Redistributions of source code must retain the above copyright notice, this
|
||||
; list of conditions and the following disclaimer.
|
||||
;
|
||||
; * Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation
|
||||
; and/or other materials provided with the distribution.
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
; #############################################################################
|
||||
INTROMSG
|
||||
#NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02#Skriv hj�lp for at f� vist uddybende information.#NEWLINE#
|
||||
STATEMENTLINE
|
||||
---------------------------------------------------------#NEWLINE#
|
||||
STATEMENTCLEAR
|
||||
clear Clear console window.#NEWLINE#
|
||||
STATEMENTDEF
|
||||
def Define function.#NEWLINE#
|
||||
STATEMENTDELETE
|
||||
delete Delete variable or function.#NEWLINE#
|
||||
STATEMENTDIGITS
|
||||
digits Set number of significant digits.#NEWLINE#
|
||||
STATEMENTEVAL
|
||||
eval Evaluate arithmetic expression.#NEWLINE#
|
||||
STATEMENTEXECUTE
|
||||
execute Execute statements in a file.#NEWLINE#
|
||||
STATEMENTFUNCS
|
||||
functions Show list of user defined functions.#NEWLINE#
|
||||
STATEMENTINPUT
|
||||
input Change numeral input system.#NEWLINE#
|
||||
STATEMENTHELP
|
||||
help Show basic help text.#NEWLINE#
|
||||
STATEMENTOUTPUT
|
||||
output Change numeral output system.#NEWLINE#
|
||||
STATEMENTLIST
|
||||
list Show content of a directory.#NEWLINE#
|
||||
STATEMENTSHOW
|
||||
show Show content of a file.#NEWLINE#
|
||||
STATEMENTLOAD
|
||||
load Load variable and functions from file.#NEWLINE#
|
||||
STATEMENTSAVE
|
||||
save Save variable and functions to file.#NEWLINE#
|
||||
STATEMENTVARS
|
||||
variables Show list of variables.#NEWLINE#
|
||||
STATEMENTVERSION
|
||||
version Show version string.#NEWLINE#
|
||||
STATEMENTMEMORY
|
||||
memory Show internal memory usage.#NEWLINE#
|
||||
STATEMENTEXIT
|
||||
exit Exit program.#NEWLINE#
|
||||
STATEMENTFOOTER
|
||||
The def and eval statements are optional. Functions and#NEWLINE#variables statements can be shorten to funcs and vars.#NEWLINE#
|
||||
TXTLISTDIRHEADER
|
||||
Type Navn#NEWLINE#-----------------------------------------------#NEWLINE#
|
||||
TXTLISTDIRTFILE
|
||||
[fil]
|
||||
TXTLISTDIRTDIR
|
||||
[mappe]
|
||||
TXTLISTDIRTUNKNOWN
|
||||
[ukendt]
|
||||
TXTMEMBLOCKS
|
||||
Allokerede blokke: #SPACE#
|
||||
TXTMEMSIZE
|
||||
Hukommelsesforbrug:#SPACE#
|
||||
TXTMEMMAXSIZE
|
||||
H�jeste forbrug: #SPACE#
|
||||
HELPNOHELP
|
||||
Der er ingen hj�lp tilg�ngelig om det emne.#NEWLINE#
|
||||
HELPSYNTAX
|
||||
Syntaktiske fejl:#SPACE#
|
||||
HELPUERROR
|
||||
Uventet fejl:#SPACE#
|
||||
HELPVARNDEF
|
||||
Variablen er ikke defineret:#SPACE#
|
||||
HELPFUNNDEF
|
||||
Funktionen er ikke defineret:#SPACE#
|
||||
HELPFUNRDEF
|
||||
Funktionen er allerede defineret:#SPACE#
|
||||
HELPPNUMERA
|
||||
Grundtallet skal v�re mellem 2 og 32:#SPACE#
|
||||
HELPPDIGITS
|
||||
Antal betydende cifre skal v�re mellem 0 og 15:#SPACE#
|
||||
HELPINPUSHOW
|
||||
Talsystemet n�r computeren l�ser ind er#SPACE#
|
||||
HELPOUTPSHOW
|
||||
Talsystemet n�r computeren skriver ud er#SPACE#
|
||||
HELPINPUSETT
|
||||
Talsystemet ved indl�sning �ndret til#SPACE#
|
||||
HELPOUTPSETT
|
||||
Talsystemet ved udskrivning �ndret til#SPACE#
|
||||
HELPDIGISETT
|
||||
Antal betydende cifre �ndret til#SPACE#
|
||||
HELPDIGISHOW
|
||||
Antal betydende cifre der vises er#SPACE#
|
||||
HELPVARSNDEF
|
||||
Der er ikke defineret nogle variabler.#NEWLINE#
|
||||
HELPFUNCNDEF
|
||||
Der er ikke defineret nogle funktioner.#NEWLINE#
|
||||
HELPLOADSUCC
|
||||
Variabler og funktioner indl�st fra fil.#NEWLINE#
|
||||
HELPSAVESUCC
|
||||
Variabler og funktioner gemt til fil.#NEWLINE#
|
||||
HELPSAVEFAIL
|
||||
Kan ikke gemme fil.#NEWLINE#
|
||||
HELPSAVENOTH
|
||||
Der er ikke noget og gemme.#NEWLINE#
|
||||
HELPPREFLOAD
|
||||
Pr�ferencer blev indl�st.#NEWLINE#
|
||||
HELPPREFNOLO
|
||||
Kunne ikke indl�ses pr�ferencer.#NEWLINE#
|
||||
HELPPREFSAVE
|
||||
Pr�ferencer blev gemt.#NEWLINE#
|
||||
HELPPREFNOSA
|
||||
Kunne ikke gemme pr�ferencer.#NEWLINE#
|
||||
MSGNODIR
|
||||
Mappen kan ikke �bnes:#SPACE#
|
||||
MSGNOFILE
|
||||
Filen kan ikke �bnes.#NEWLINE#
|
||||
@@ -2,19 +2,19 @@
|
||||
## language english
|
||||
## codeset 0
|
||||
; #############################################################################
|
||||
; Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
; Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
; All rights reserved.
|
||||
;
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
;
|
||||
;
|
||||
; * Redistributions of source code must retain the above copyright notice, this
|
||||
; list of conditions and the following disclaimer.
|
||||
;
|
||||
;
|
||||
; * Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation
|
||||
; and/or other materials provided with the distribution.
|
||||
;
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
|
||||
@@ -31,38 +31,42 @@ No help is available for this function.#NEWLINE#
|
||||
cbr
|
||||
No help is available for this function.#NEWLINE#
|
||||
lb
|
||||
No help is available for this function.#NEWLINE#
|
||||
Binary logarithm function.#NEWLINE#
|
||||
ln
|
||||
No help is available for this function.#NEWLINE#
|
||||
Natural logarithm function.#NEWLINE#
|
||||
lg
|
||||
No help is available for this function.#NEWLINE#
|
||||
Common logarithm function.#NEWLINE#
|
||||
; Partly from https://wikipedia.org/wiki/Sine
|
||||
sin
|
||||
Sine is the trigonometric function that for an acute angle is the#NEWLINE#ratio between the leg opposite the angle when it is considered#NEWLINE#part of a right triangle and the hypotenuse.#NEWLINE#
|
||||
; Partly from https://wikipedia.org/wiki/Trigonometric_functions
|
||||
cos
|
||||
Cosine is the trigonometric function that for an acute angle is the#NEWLINE#ratio between the leg adjacent to the angle when it is considered#NEWLINE#part of a right triangle and the hypotenuse#NEWLINE#
|
||||
Cosine is the trigonometric function that for an acute angle is the#NEWLINE#ratio between the leg adjacent to the angle when it is considered#NEWLINE#part of a right triangle and the hypotenuse.#NEWLINE#
|
||||
; Partly from https://wikipedia.org/wiki/Trigonometric_functions
|
||||
tan
|
||||
Tangent is one of the trigonometry functions. In a right triangle,#NEWLINE#the tangent of an angle is the opposite side over the adjacent side.#NEWLINE#
|
||||
; Partly from https://wikipedia.org/wiki/Trigonometric_functions
|
||||
cot
|
||||
No help is available for this function.#NEWLINE#
|
||||
The cotangent cot(x), ctg(x) or ctn(x), is the reciprocal of tan(x).#NEWLINE#The cotangent is the ratio of the length of the adjacent side to the length of the opposite side.#NEWLINE#
|
||||
; Partly from https://wikipedia.org/wiki/Trigonometric_functions
|
||||
sec
|
||||
No help is available for this function.#NEWLINE#
|
||||
The secant sec(x) is the reciprocal of cos(x).#NEWLINE#The secant is the ratio of the length of the hypotenuse to the length of the adjacent side.#NEWLINE#So called because it is the tangent of the complementary or co-angle.#NEWLINE#
|
||||
; Partly from https://wikipedia.org/wiki/Trigonometric_functions
|
||||
csc
|
||||
No help is available for this function.#NEWLINE#
|
||||
The cosecant csc(x) or cosec(x), is the reciprocal of sin(x).#NEWLINE#The cosecant is the ratio of the length of the hypotenuse to the length of the opposite side.#NEWLINE#So called because it is the secant of the complementary or co-angle.#NEWLINE#
|
||||
; Partly from https://wikipedia.org/wiki/Trigonometric_functions
|
||||
asin
|
||||
No help is available for this function.#NEWLINE#
|
||||
arc sine function.#NEWLINE#
|
||||
acos
|
||||
No help is available for this function.#NEWLINE#
|
||||
arc cosine function.#NEWLINE#
|
||||
atan
|
||||
No help is available for this function.#NEWLINE#
|
||||
arc tangent function of one variable.#NEWLINE#
|
||||
acot
|
||||
No help is available for this function.#NEWLINE#
|
||||
arc cotangent function.#NEWLINE#
|
||||
asec
|
||||
No help is available for this function.#NEWLINE#
|
||||
arc secant function.#NEWLINE#
|
||||
acsc
|
||||
No help is available for this function.#NEWLINE#
|
||||
arc cosecant function.#NEWLINE#
|
||||
sinh
|
||||
No help is available for this function.#NEWLINE#
|
||||
cosh
|
||||
@@ -116,14 +120,14 @@ No help is available for this function.#NEWLINE#
|
||||
ahvc
|
||||
No help is available for this function.#NEWLINE#
|
||||
ahcv
|
||||
No help is available for this function.#NEWLINE#
|
||||
The inverse hacoversed sine is not implemented in this version of amath.#NEWLINE#
|
||||
ahcc
|
||||
No help is available for this function.#NEWLINE#
|
||||
The inverse hacoversed cosine is not implemented in this version of amath.#NEWLINE#
|
||||
exsec
|
||||
No help is available for this function.#NEWLINE#
|
||||
exsecant function.#NEWLINE#
|
||||
excsc
|
||||
No help is available for this function.#NEWLINE#
|
||||
excosecant function.#NEWLINE#
|
||||
aexsec
|
||||
No help is available for this function.#NEWLINE#
|
||||
inverse exsecant function.#NEWLINE#
|
||||
aexcsc
|
||||
No help is available for this function.#NEWLINE#
|
||||
inverse excosecant function.#NEWLINE#
|
||||
@@ -1,20 +1,20 @@
|
||||
## version $VER: amath-text.catalog 1.70 (28.02.2017) English
|
||||
## version $VER: amath-text.catalog 1.84 (05.08.2018) English
|
||||
## language english
|
||||
## codeset 0
|
||||
; #############################################################################
|
||||
; Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
; Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
; All rights reserved.
|
||||
;
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
;
|
||||
;
|
||||
; * Redistributions of source code must retain the above copyright notice, this
|
||||
; list of conditions and the following disclaimer.
|
||||
;
|
||||
;
|
||||
; * Redistributions in binary form must reproduce the above copyright notice,
|
||||
; this list of conditions and the following disclaimer in the documentation
|
||||
; and/or other materials provided with the distribution.
|
||||
;
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
@@ -33,6 +33,8 @@ INTROMSG
|
||||
#NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02#Type help to show info.#NEWLINE#
|
||||
STATEMENTLINE
|
||||
---------------------------------------------------------#NEWLINE#
|
||||
STATEMENTABOUT
|
||||
about Show about text#NEWLINE#
|
||||
STATEMENTCLEAR
|
||||
clear Clear console window.#NEWLINE#
|
||||
STATEMENTDEF
|
||||
@@ -65,6 +67,8 @@ STATEMENTVARS
|
||||
variables Show list of variables.#NEWLINE#
|
||||
STATEMENTVERSION
|
||||
version Show version string.#NEWLINE#
|
||||
STATEMENTLICENSE
|
||||
license Show copyright and license texts#NEWLINE#
|
||||
STATEMENTMEMORY
|
||||
memory Show internal memory usage.#NEWLINE#
|
||||
STATEMENTEXIT
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright {c} 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
#
|
||||
# Copyright {c} 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
# All rights reserved.
|
||||
#
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
@@ -11,7 +11,7 @@
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
@@ -23,72 +23,171 @@
|
||||
# LIABILITY, OR TORT {INCLUDING NEGLIGENCE OR OTHERWISE} ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
version="1.7.0"
|
||||
version="1.9.0"
|
||||
|
||||
clang=false
|
||||
debugsym=false
|
||||
regtest=true
|
||||
openlibm=false
|
||||
stdlibm=false
|
||||
stdlibc=false
|
||||
useldconfig=false
|
||||
fpic=false
|
||||
|
||||
prefix="/usr"
|
||||
pkgconfigdir="lib/pkgconfig"
|
||||
mandir="share/man"
|
||||
cflags=""
|
||||
cxxflags=""
|
||||
ldflags=""
|
||||
gcclib="-lstdc++"
|
||||
libm=""
|
||||
libc=""
|
||||
|
||||
for arg in "$@"; do
|
||||
unknown=true
|
||||
case "$arg" in
|
||||
--prefix=*)
|
||||
prefix=`echo $arg | sed 's/--prefix=//'`
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--pkgconfig=*)
|
||||
pkgconfigdir=`echo $arg | sed 's/--pkgconfig=//'`
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--mandir=*)
|
||||
mandir=`echo $arg | sed 's/--mandir=//'`
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--man-dir=*)
|
||||
mandir=`echo $arg | sed 's/--mandir=//'`
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--doc-dir=*)
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--cross-compile=*)
|
||||
crosscompile=`echo $arg | sed 's/--cross-compile=//'`
|
||||
crosscompile="${crosscompile}-"
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
CFLAGS=*)
|
||||
cflags=`echo $arg | sed 's/CFLAGS=//'`
|
||||
cflags="${cflags} "
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
CXXFLAGS=*)
|
||||
cxxflags=`echo $arg | sed 's/CXXFLAGS=//'`
|
||||
cxxflags="${cxxflags} "
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
LDFLAGS=*)
|
||||
ldflags=`echo $arg | sed 's/LDFLAGS=//'`
|
||||
ldflags="${ldflags} "
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--enable-clang)
|
||||
clang=true;;
|
||||
clang=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--disable-clang)
|
||||
clang=false;;
|
||||
clang=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--enable-ldconfig)
|
||||
useldconfig=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--disable-ldconfig)
|
||||
useldconfig=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--enable-pic)
|
||||
fpic=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--disable-pic)
|
||||
fpic=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--enable-debug)
|
||||
debugsym=true;;
|
||||
debugsym=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--disable-debug)
|
||||
debugsym=false;;
|
||||
debugsym=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--enable-test)
|
||||
regtest=true;;
|
||||
--disable-test)
|
||||
regtest=false;;
|
||||
regtest=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--enable-stdc++)
|
||||
gcclib="-lstdc++";;
|
||||
--disable-stdc++)
|
||||
gcclib="";;
|
||||
--disable-test)
|
||||
regtest=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--with-libm)
|
||||
stdlibm=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--without-libm)
|
||||
stdlibm=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--with-openlibm)
|
||||
openlibm=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--without-openlibm)
|
||||
openlibm=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--with-stdc++)
|
||||
gcclib="-lstdc++"
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--without-stdc++)
|
||||
gcclib=""
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--with-libc)
|
||||
stdlibc=true
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--without-libc)
|
||||
stdlibc=false
|
||||
unknown=false
|
||||
;;
|
||||
|
||||
--help)
|
||||
echo "amath configure script ${version}"
|
||||
@@ -97,24 +196,39 @@ for arg in "$@"; do
|
||||
echo 'options:'
|
||||
echo ' --prefix=<path>: installation prefix'
|
||||
echo ' --pkgconfig=<path>: pkg-config path (without prefix)'
|
||||
echo ' --mandir=<path>: manpage path (without prefix)'
|
||||
echo ' --cross-compile=<prefix>: cross compiler prefix'
|
||||
echo ' --enable-debug: include debug symbols'
|
||||
echo ' --disable-debug: do not include debug symbols'
|
||||
echo ' --enable-test: build code with regression tests'
|
||||
echo ' --disable-test: do not include regression test'
|
||||
echo ' --enable-clang: build with clang compiler'
|
||||
echo ' --disable-clang: do not build with clang compiler'
|
||||
echo ' --enable-stdc++: link with stdc++ library'
|
||||
echo ' --disable-stdc++: do not link with stdc++ library'
|
||||
echo ' --enable-clang: build explicit with clang compiler'
|
||||
echo ' --disable-clang: do not explicit build with clang compiler'
|
||||
echo ' --enable-ldconfig: use ldconfig to registre libraries'
|
||||
echo ' --disable-ldconfig: do not use ldconfig to registre libraries'
|
||||
echo ' --enable-pic: build with Position Independent Code (-fPIC)'
|
||||
echo ' --disable-pic: do not build static libraries with Position Independent Code'
|
||||
echo ' --with-libm: link with libm library (-lm)'
|
||||
echo ' --without-libm: do not link with libm library'
|
||||
echo ' --with-openlibm: link with openlibm library (-lopenlibm)'
|
||||
echo ' --without-openlibm: do not link with openlibm library'
|
||||
echo ' --with-stdc++: link with stdc++ library (-lstdc++)'
|
||||
echo ' --without-stdc++: do not link with stdc++ library'
|
||||
echo ' --with-libc: explicit link with libc library (-lc)'
|
||||
echo ' --without-libc: do not link with libc library'
|
||||
echo
|
||||
echo ' CFLAGS=<flags>: additional compiler flags'
|
||||
echo ' CXXFLAGS=<flags>: additional compiler flags'
|
||||
echo ' LDFLAGS=<flags>: additional linker flags'
|
||||
echo
|
||||
echo 'all invalid options are silently ignored'
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if $unknown; then
|
||||
echo "Invalid option $arg"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if $clang; then
|
||||
@@ -135,12 +249,46 @@ if $debugsym; then
|
||||
appop="-O0 -g"
|
||||
libop="-O0 -g"
|
||||
exestrip=""
|
||||
debugflag="-DDEBUG "
|
||||
else
|
||||
appop="-O2"
|
||||
libop="-O3"
|
||||
exestrip="-s"
|
||||
debugflag=""
|
||||
fi
|
||||
|
||||
dlibm=false
|
||||
mflags=""
|
||||
if $stdlibm; then
|
||||
libm="-lm "
|
||||
mflags="-DLIBM "
|
||||
dlibm=true
|
||||
fi
|
||||
|
||||
if $openlibm; then
|
||||
libm="-lopenlibm "
|
||||
mflags="-DLIBM "
|
||||
dlibm=true
|
||||
fi
|
||||
|
||||
if $useldconfig; then
|
||||
soverion=".${version}"
|
||||
else
|
||||
soverion=""
|
||||
fi
|
||||
|
||||
if $stdlibc; then
|
||||
gcclib="${gcclib} -lc"
|
||||
libc="-lc"
|
||||
fi
|
||||
|
||||
if $fpic; then
|
||||
fPIC=" -fPIC"
|
||||
else
|
||||
fPIC=""
|
||||
fi
|
||||
|
||||
cflags="${cflags}${debugflag}${mflags}"
|
||||
cxxflags="${cflags} ${cxxflags}"
|
||||
|
||||
APPSRCS='
|
||||
@@ -158,31 +306,33 @@ values.cpp
|
||||
viewer.cpp
|
||||
'
|
||||
SYSSRCS='
|
||||
amiga_arexx.cpp
|
||||
console.cpp
|
||||
console_amiga.cpp
|
||||
console_stdc.cpp
|
||||
console_termios.cpp
|
||||
console_windows.cpp
|
||||
filesystem_amiga.cpp
|
||||
filesystem_stdc.cpp
|
||||
language.cpp
|
||||
language_amiga.cpp
|
||||
language_posix.cpp
|
||||
language_stdc.cpp
|
||||
preferences.cpp
|
||||
preferences_amiga.cpp
|
||||
preferences_stdc.cpp
|
||||
proc_amiga.cpp
|
||||
program.cpp
|
||||
program_amiga.cpp
|
||||
program_haiku.cpp
|
||||
program_stdc.cpp
|
||||
program_test.cpp
|
||||
task_amiga.cpp
|
||||
task_stdc.cpp
|
||||
window_amiga.cpp
|
||||
window_haiku.cpp
|
||||
'
|
||||
FUNCTIONSRC='
|
||||
absolute.cpp
|
||||
aexcosecant.cpp
|
||||
aexsecant.cpp
|
||||
arcchord.cpp
|
||||
arccos.cpp
|
||||
arcsin.cpp
|
||||
arctan.cpp
|
||||
@@ -198,6 +348,7 @@ archaversine.cpp
|
||||
arcvercosine.cpp
|
||||
arcversine.cpp
|
||||
ceil.cpp
|
||||
chord.cpp
|
||||
cosecant.cpp
|
||||
cosine.cpp
|
||||
cotangent.cpp
|
||||
@@ -268,38 +419,34 @@ version.cpp
|
||||
'
|
||||
LIBAPPSRCS='
|
||||
aengine.cpp
|
||||
bigint.cpp
|
||||
charbuf.cpp
|
||||
integer.cpp
|
||||
cplex.cpp
|
||||
nnumb.cpp
|
||||
ntext.cpp
|
||||
ntextd.cpp
|
||||
ntextp.cpp
|
||||
real.cpp
|
||||
'
|
||||
LIBREALSRCS='
|
||||
acos.c
|
||||
acosh.c
|
||||
acvs.c
|
||||
ahv.c
|
||||
ahvc.c
|
||||
asin.c
|
||||
asinh.c
|
||||
atan.c
|
||||
atan2.c
|
||||
atanh.c
|
||||
aver.c
|
||||
cbrt.c
|
||||
ceil.c
|
||||
copysign.c
|
||||
csign.c
|
||||
cos.c
|
||||
cosh.c
|
||||
exp.c
|
||||
expm1.c
|
||||
fabs.c
|
||||
finite.c
|
||||
floor.c
|
||||
fmod.c
|
||||
hypot.c
|
||||
isnan.c
|
||||
kcos.c
|
||||
kremp2.c
|
||||
ksin.c
|
||||
@@ -318,39 +465,79 @@ tan.c
|
||||
tanh.c
|
||||
trunc.c
|
||||
'
|
||||
LIBREAL2SRCS='
|
||||
acot.c
|
||||
acoth.c
|
||||
acrd.c
|
||||
acsc.c
|
||||
acsch.c
|
||||
acvc.c
|
||||
acvs.c
|
||||
aexc.c
|
||||
aexs.c
|
||||
ahcc.c
|
||||
ahcv.c
|
||||
ahv.c
|
||||
ahvc.c
|
||||
asec.c
|
||||
asech.c
|
||||
avcs.c
|
||||
aver.c
|
||||
cot.c
|
||||
coth.c
|
||||
crd.c
|
||||
csc.c
|
||||
csch.c
|
||||
cvc.c
|
||||
cvs.c
|
||||
exc.c
|
||||
exs.c
|
||||
hcc.c
|
||||
hcv.c
|
||||
hv.c
|
||||
hvc.c
|
||||
log2i.c
|
||||
log2p.c
|
||||
sec.c
|
||||
sech.c
|
||||
vcs.c
|
||||
ver.c
|
||||
'
|
||||
LIBCPLEXSRCS='
|
||||
cacos.c
|
||||
cacosh.c
|
||||
casin.c
|
||||
casinh.c
|
||||
catan.c
|
||||
catanh.c
|
||||
ccos.c
|
||||
ccosh.c
|
||||
cexp.c
|
||||
clog.c
|
||||
cpow.c
|
||||
csin.c
|
||||
csinh.c
|
||||
csqrt.c
|
||||
ctan.c
|
||||
ctanh.c
|
||||
'
|
||||
LIBCPLEX2SRCS='
|
||||
cacot.c
|
||||
cacoth.c
|
||||
cacsc.c
|
||||
cacsch.c
|
||||
casec.c
|
||||
casech.c
|
||||
casin.c
|
||||
casinh.c
|
||||
catan.c
|
||||
catanh.c
|
||||
ccbrt.c
|
||||
ccos.c
|
||||
ccosh.c
|
||||
ccot.c
|
||||
ccoth.c
|
||||
ccsc.c
|
||||
ccsch.c
|
||||
cexp.c
|
||||
clog.c
|
||||
clog10.c
|
||||
clogb.c
|
||||
cpow.c
|
||||
clog10.c
|
||||
csec.c
|
||||
csech.c
|
||||
csgn.c
|
||||
csin.c
|
||||
csinh.c
|
||||
csqrt.c
|
||||
ctan.c
|
||||
ctanh.c
|
||||
prim.c
|
||||
'
|
||||
LIBC1SRCS='
|
||||
@@ -382,6 +569,18 @@ utils.c
|
||||
vastubs.c
|
||||
'
|
||||
|
||||
if $dlibm; then
|
||||
LIBREALSRCS="${LIBREAL2SRCS}"
|
||||
else
|
||||
LIBREALSRCS="${LIBREALSRCS}${LIBREAL2SRCS}"
|
||||
fi
|
||||
|
||||
if $dlibm; then
|
||||
LIBCPLEXSRCS="${LIBCPLEX2SRCS}"
|
||||
else
|
||||
LIBCPLEXSRCS="${LIBCPLEXSRCS}${LIBCPLEX2SRCS}"
|
||||
fi
|
||||
|
||||
amathc="amathc"
|
||||
amath="amath"
|
||||
amathcplex="amathcplex"
|
||||
@@ -393,10 +592,13 @@ appstatement="statement"
|
||||
appsystem="appsystem"
|
||||
program="src/main"
|
||||
|
||||
ldsysflags="-l${appsystem} -l${appfunction} -l${appstatement} -l${appmain} -l${appfunction} -l${appstatement} -l${appmain} "
|
||||
ldlibflags="-l${amathapp} ${libm}-l${amathcplex} ${libm}-l${amath} -l${amathc} ${gcclib}"
|
||||
|
||||
############################ Main Application ###########################
|
||||
{
|
||||
echo "CXX = ${crosscompile}${cxxcompiler}"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}-I. -I.. -Wall"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "DEL = rm -f"
|
||||
@@ -428,7 +630,7 @@ echo
|
||||
########################### Functions Library ###########################
|
||||
{
|
||||
echo "CXX = ${crosscompile}${cxxcompiler}"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}-I. -I../.. -Wall"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I../.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "DEL = rm -f"
|
||||
@@ -460,7 +662,7 @@ echo
|
||||
########################### Statement Library ###########################
|
||||
{
|
||||
echo "CXX = ${crosscompile}${cxxcompiler}"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}-I. -I../.. -Wall"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I../.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "DEL = rm -f"
|
||||
@@ -492,7 +694,7 @@ echo
|
||||
############################ System Library #############################
|
||||
{
|
||||
echo "CXX = ${crosscompile}${cxxcompiler}"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}-I. -I.. -Wall"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}${fPIC} -I. -I.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "DEL = rm -f"
|
||||
@@ -528,9 +730,11 @@ echo "CXXFLAGS = ${libop}${options} ${cxxflags}-I. -I.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "MKDIR = mkdir -p"
|
||||
echo "RMDIR = rm -Rf"
|
||||
echo "DEL = rm -f"
|
||||
echo "INSTALL = install -m 0644"
|
||||
echo "LDCONFIG = ldconfig"
|
||||
echo "DOXYGEN = doxygen"
|
||||
echo "PREFIX = ${prefix}"
|
||||
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
|
||||
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
|
||||
@@ -552,7 +756,7 @@ for f in ${LIBAPPSRCS}
|
||||
do
|
||||
b=`basename $f .cpp`
|
||||
echo "static/${b}.o: ${f}"
|
||||
echo " \${CXX} \${CXXFLAGS} -c ${f} -o static/${b}.o"
|
||||
echo " \${CXX} \${CXXFLAGS}${fPIC} -c ${f} -o static/${b}.o"
|
||||
echo
|
||||
echo "shared/${b}.o: ${f}"
|
||||
echo " \${CXX} \${CXXFLAGS} -fPIC -c ${f} -o shared/${b}.o"
|
||||
@@ -567,12 +771,16 @@ echo " \${MKDIR} static"
|
||||
echo " \${MKDIR} shared"
|
||||
echo
|
||||
echo "\${solib}: build ${files2}"
|
||||
echo " \${CXX} \${CXXFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${files2}"
|
||||
echo " \${CXX} \${CXXFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${files2}"
|
||||
echo
|
||||
echo "\${alib}: build ${files}"
|
||||
echo " \${AR} rcs static/\${alib} ${files}"
|
||||
echo " \${RANLIB} static/\${alib}"
|
||||
echo
|
||||
echo ".PHONY: doc"
|
||||
echo "doc:"
|
||||
echo " \${DOXYGEN} amatha.dox"
|
||||
echo
|
||||
echo ".PHONY: install"
|
||||
echo "install: \${alib} \${solib}"
|
||||
echo " \${MKDIR} \${INSTDIR}"
|
||||
@@ -582,14 +790,18 @@ echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
|
||||
echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
|
||||
echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
|
||||
echo " \${INSTALL} aengine.h \${INSTDIRI}/aengine.h"
|
||||
echo " \${INSTALL} bigint.h \${INSTDIRI}/bigint.h"
|
||||
echo " \${INSTALL} charbuf.h \${INSTDIRI}/charbuf.h"
|
||||
echo " \${INSTALL} cplex.h \${INSTDIRI}/cplex.h"
|
||||
echo " \${INSTALL} integer.h \${INSTDIRI}/integer.h"
|
||||
echo " \${INSTALL} nnumb.h \${INSTDIRI}/nnumb.h"
|
||||
echo " \${INSTALL} ntext.h \${INSTDIRI}/ntext.h"
|
||||
echo " \${INSTALL} ntext.h \${INSTDIRI}/ntextd.h"
|
||||
echo " \${INSTALL} ntext.h \${INSTDIRI}/ntextp.h"
|
||||
echo " \${INSTALL} numb.h \${INSTDIRI}/numb.h"
|
||||
echo " \${INSTALL} real.h \${INSTDIRI}/real.h"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG} \${INSTDIR}"
|
||||
fi
|
||||
echo
|
||||
echo ".PHONY: uninstall"
|
||||
echo "uninstall:"
|
||||
@@ -604,11 +816,19 @@ echo " \${DEL} \${INSTDIRI}/nnumb.h"
|
||||
echo " \${DEL} \${INSTDIRI}/ntext.h"
|
||||
echo " \${DEL} \${INSTDIRI}/numb.h"
|
||||
echo " \${DEL} \${INSTDIRI}/real.h"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG}"
|
||||
fi
|
||||
echo
|
||||
echo "clean:"
|
||||
echo " \${DEL} static/\${alib} \${solib} ${files} ${files2}"
|
||||
echo
|
||||
echo "very-clean: clean"
|
||||
echo " \${DEL} doxygen.warn"
|
||||
echo " \${RMDIR} man"
|
||||
echo " \${RMDIR} static"
|
||||
echo " \${RMDIR} shared"
|
||||
echo
|
||||
} > src/lib/Makefile
|
||||
#########################################################################
|
||||
|
||||
@@ -619,14 +839,16 @@ echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "MKDIR = mkdir -p"
|
||||
echo "RMDIR = rm -Rf"
|
||||
echo "DEL = rm -f"
|
||||
echo "INSTALL = install -m 0644"
|
||||
echo "LDCONFIG = ldconfig"
|
||||
echo "DOXYGEN = doxygen"
|
||||
echo "PREFIX = ${prefix}"
|
||||
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
|
||||
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
|
||||
echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man3"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man3"
|
||||
echo "alib = lib${amathc}.a"
|
||||
echo "solib = lib${amathc}.so"
|
||||
echo "pkgconfig = amathc.pc"
|
||||
@@ -645,7 +867,7 @@ for f in ${LIBC1SRCS}
|
||||
do
|
||||
b=`basename $f .c`
|
||||
echo "static/${b}.o: ${f}"
|
||||
echo " \${CC} \${CFLAGS} -fno-builtin -c ${f} -o static/${b}.o"
|
||||
echo " \${CC} \${CFLAGS}${fPIC} -fno-builtin -c ${f} -o static/${b}.o"
|
||||
echo
|
||||
echo "shared/${b}.o: ${f}"
|
||||
echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
|
||||
@@ -660,12 +882,16 @@ echo " \${MKDIR} static"
|
||||
echo " \${MKDIR} shared"
|
||||
echo
|
||||
echo "\${solib}: build ${libcs}"
|
||||
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${libcs} -lc"
|
||||
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libcs}"
|
||||
echo
|
||||
echo "\${alib}: build ${libc}"
|
||||
echo " \${AR} rcs static/\${alib} ${libc}"
|
||||
echo " \${RANLIB} static/\${alib}"
|
||||
echo
|
||||
echo ".PHONY: doc"
|
||||
echo "doc:"
|
||||
echo " \${DOXYGEN} amathc.dox"
|
||||
echo
|
||||
echo ".PHONY: install"
|
||||
echo "install: \${alib} \${solib}"
|
||||
echo " \${MKDIR} \${INSTDIR}"
|
||||
@@ -677,7 +903,9 @@ echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
|
||||
echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
|
||||
echo " \${INSTALL} ../amath.h \${INSTDIRI}"
|
||||
echo " \${INSTALL} ../amathc.h \${INSTDIRI}"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG} \${INSTDIR}"
|
||||
fi
|
||||
echo
|
||||
echo ".PHONY: uninstall"
|
||||
echo "uninstall:"
|
||||
@@ -687,13 +915,20 @@ echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
|
||||
echo " \${DEL} \${INSTDIRM}/\${manpage}"
|
||||
echo " \${DEL} \${INSTDIRI}/amath.h"
|
||||
echo " \${DEL} \${INSTDIRI}/amathc.h"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG}"
|
||||
fi
|
||||
echo
|
||||
echo "clean:"
|
||||
echo " \${DEL} static/\${alib} \${solib} ${libc} ${libcs}"
|
||||
echo
|
||||
echo "very-clean: clean"
|
||||
echo " \${DEL} doxygen.warn"
|
||||
echo " \${RMDIR} man"
|
||||
echo " \${RMDIR} static"
|
||||
echo " \${RMDIR} shared"
|
||||
echo
|
||||
} > src/clib/Makefile
|
||||
|
||||
#########################################################################
|
||||
|
||||
############################# Real Numbers ##############################
|
||||
@@ -703,14 +938,16 @@ echo "CFLAGS = -std=c9x ${libop}${options} ${cflags}-I. -I.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "MKDIR = mkdir -p"
|
||||
echo "RMDIR = rm -Rf"
|
||||
echo "DEL = rm -f"
|
||||
echo "INSTALL = install -m 0644"
|
||||
echo "LDCONFIG = ldconfig"
|
||||
echo "DOXYGEN = doxygen"
|
||||
echo "PREFIX = ${prefix}"
|
||||
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
|
||||
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
|
||||
echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man3"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man3"
|
||||
echo "alib = lib${amath}.a"
|
||||
echo "solib = lib${amath}.so"
|
||||
echo "pkgconfig = amathr.pc"
|
||||
@@ -729,7 +966,7 @@ for f in ${LIBREALSRCS}
|
||||
do
|
||||
b=`basename $f .c`
|
||||
echo "static/${b}.o: ${f}"
|
||||
echo " \${CC} \${CFLAGS} -fno-builtin -c ${f} -o static/${b}.o"
|
||||
echo " \${CC} \${CFLAGS}${fPIC} -fno-builtin -c ${f} -o static/${b}.o"
|
||||
echo
|
||||
echo "shared/${b}.o: ${f}"
|
||||
echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
|
||||
@@ -744,12 +981,16 @@ echo " \${MKDIR} static"
|
||||
echo " \${MKDIR} shared"
|
||||
echo
|
||||
echo "\${solib}: build ${libamaths}"
|
||||
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${libamaths}"
|
||||
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libamaths}"
|
||||
echo
|
||||
echo "\${alib}: build ${libamath}"
|
||||
echo " \${AR} rcs static/\${alib} ${libamath}"
|
||||
echo " \${RANLIB} static/\${alib}"
|
||||
echo
|
||||
echo ".PHONY: doc"
|
||||
echo "doc:"
|
||||
echo " \${DOXYGEN} amathr.dox"
|
||||
echo
|
||||
echo ".PHONY: install"
|
||||
echo "install: \${alib} \${solib}"
|
||||
echo " \${MKDIR} \${INSTDIR}"
|
||||
@@ -759,8 +1000,10 @@ echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
|
||||
echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
|
||||
echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
|
||||
echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
|
||||
echo " \${INSTALL} ../math.h \${INSTDIRI}/amathr.h"
|
||||
echo " \${INSTALL} ../mathr.h \${INSTDIRI}/mathr.h"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG} \${INSTDIR}"
|
||||
fi
|
||||
echo
|
||||
echo ".PHONY: uninstall"
|
||||
echo "uninstall:"
|
||||
@@ -768,12 +1011,20 @@ echo " \${DEL} \${INSTDIR}/\${alib}"
|
||||
echo " \${DEL} \${INSTDIR}/\${solib}"
|
||||
echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
|
||||
echo " \${DEL} \${INSTDIRM}/\${manpage}"
|
||||
echo " \${DEL} \${INSTDIRI}/amathr.h"
|
||||
echo " \${DEL} \${INSTDIRI}/mathr.h"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG}"
|
||||
fi
|
||||
echo
|
||||
echo "clean:"
|
||||
echo " \${DEL} static/\${alib} \${solib} ${libamath} ${libamaths}"
|
||||
echo
|
||||
echo "very-clean: clean"
|
||||
echo " \${DEL} doxygen.warn"
|
||||
echo " \${RMDIR} man"
|
||||
echo " \${RMDIR} static"
|
||||
echo " \${RMDIR} shared"
|
||||
echo
|
||||
} > src/real/Makefile
|
||||
#########################################################################
|
||||
|
||||
@@ -784,14 +1035,16 @@ echo "CFLAGS = -std=c9x ${libop}${options} ${cxxflags}-I. -I.. -Wall"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "MKDIR = mkdir -p"
|
||||
echo "RMDIR = rm -Rf"
|
||||
echo "DEL = rm -f"
|
||||
echo "INSTALL = install -m 0644"
|
||||
echo "LDCONFIG = ldconfig"
|
||||
echo "DOXYGEN = doxygen"
|
||||
echo "PREFIX = ${prefix}"
|
||||
echo "INSTDIR = \${DESTDIR}\${PREFIX}/lib/amath"
|
||||
echo "INSTDIRI = \${DESTDIR}\${PREFIX}/include/amath"
|
||||
echo "INSTDIRPC = \${DESTDIR}\${PREFIX}/${pkgconfigdir}"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man3"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man3"
|
||||
echo "alib = lib${amathcplex}.a"
|
||||
echo "solib = lib${amathcplex}.so"
|
||||
echo "pkgconfig = amathi.pc"
|
||||
@@ -810,7 +1063,7 @@ for f in ${LIBCPLEXSRCS}
|
||||
do
|
||||
b=`basename $f .c`
|
||||
echo "static/${b}.o: ${f}"
|
||||
echo " \${CC} \${CFLAGS} -fno-builtin -c ${f} -o static/${b}.o"
|
||||
echo " \${CC} \${CFLAGS}${fPIC} -fno-builtin -c ${f} -o static/${b}.o"
|
||||
echo
|
||||
echo "shared/${b}.o: ${f}"
|
||||
echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
|
||||
@@ -825,12 +1078,16 @@ echo " \${MKDIR} static"
|
||||
echo " \${MKDIR} shared"
|
||||
echo
|
||||
echo "\${solib}: build ${libcomplexs}"
|
||||
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}.${version} -o \${solib} ${libcomplexs}"
|
||||
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libcomplexs}"
|
||||
echo
|
||||
echo "\${alib}: build ${libcomplex}"
|
||||
echo " \${AR} rcs static/\${alib} ${libcomplex}"
|
||||
echo " \${RANLIB} static/\${alib}"
|
||||
echo
|
||||
echo ".PHONY: doc"
|
||||
echo "doc:"
|
||||
echo " \${DOXYGEN} amathi.dox"
|
||||
echo
|
||||
echo ".PHONY: install"
|
||||
echo "install: \${alib} \${solib}"
|
||||
echo " \${MKDIR} \${INSTDIR}"
|
||||
@@ -840,8 +1097,10 @@ echo " \${INSTALL} static/\${alib} \${INSTDIR}/\${alib}"
|
||||
echo " \${INSTALL} \${solib} \${INSTDIR}/\${solib}"
|
||||
echo " \${INSTALL} \${pkgconfig} \${INSTDIRPC}/\${pkgconfig}"
|
||||
echo " \${INSTALL} \${manpage} \${INSTDIRM}/\${manpage}"
|
||||
echo " \${INSTALL} ../complex.h \${INSTDIRI}/amathi.h"
|
||||
echo " \${INSTALL} ../mathi.h \${INSTDIRI}/mathi.h"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG} \${INSTDIR}"
|
||||
fi
|
||||
echo
|
||||
echo ".PHONY: uninstall"
|
||||
echo "uninstall:"
|
||||
@@ -850,12 +1109,20 @@ echo " \${DEL} \${INSTDIR}/\${solib}"
|
||||
echo " \${DEL} \${INSTDIRPC}/\${pkgconfig}"
|
||||
echo " \${DEL} \${INSTDIRM}/\${manpage}"
|
||||
echo " \${DEL} \${INSTDIRPC}/amathi.pc"
|
||||
echo " \${DEL} \${INSTDIRI}/amathi.h"
|
||||
echo " \${DEL} \${INSTDIRI}/mathi.h"
|
||||
if ${useldconfig}; then
|
||||
echo " \${LDCONFIG}"
|
||||
fi
|
||||
echo
|
||||
echo "clean:"
|
||||
echo " \${DEL} static/\${alib} \${solib} ${libcomplex} ${libcomplexs}"
|
||||
echo
|
||||
echo "very-clean: clean"
|
||||
echo " \${DEL} doxygen.warn"
|
||||
echo " \${RMDIR} man"
|
||||
echo " \${RMDIR} static"
|
||||
echo " \${RMDIR} shared"
|
||||
echo
|
||||
} > src/cplex/Makefile
|
||||
#########################################################################
|
||||
|
||||
@@ -868,7 +1135,7 @@ echo "CFLAGS = ${appop}${options} ${cflags}-Wall -Isrc -Isrc/main"
|
||||
echo "CXXFLAGS = ${appop}${options} ${cxxflags}-Wall -Isrc -Isrc/main"
|
||||
echo "AR = ${crosscompile}ar"
|
||||
echo "RANLIB = ${crosscompile}ranlib"
|
||||
echo "LFLAGS = ${ldflags}-l${appsystem} -l${appfunction} -l${appstatement} -l${appmain} -l${appfunction} -l${appstatement} -l${appmain} -l${amathapp} -l${amathcplex} -l${amath} -l${amathc} ${gcclib}"
|
||||
echo "LFLAGS = ${ldflags}${ldsysflags}${ldlibflags}"
|
||||
echo "LPATH = -Lsrc/lib -Lsrc/clib -Lsrc/real -Lsrc/cplex -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system"
|
||||
echo "LPATHS = -Lsrc/lib/static -Lsrc/clib/static -Lsrc/real/static -Lsrc/cplex/static -Lsrc/main/function -Lsrc/main/statement -Lsrc/main -Lsrc/system"
|
||||
echo "FLXCAT = build/flexcat/flexcat"
|
||||
@@ -878,15 +1145,14 @@ echo "INSTALLP = install -m 0755"
|
||||
echo "INSTALLM = install -m 0644"
|
||||
echo "PREFIX = ${prefix}"
|
||||
echo "INSTDIRP = \${DESTDIR}\${PREFIX}/bin"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/share/man/man1"
|
||||
echo "INSTDIRM = \${DESTDIR}\${PREFIX}/${mandir}/man1"
|
||||
echo
|
||||
echo "all: shared-app"
|
||||
echo "all: shared-libs static-libs static-app"
|
||||
echo "amath: shared-libs static-libs shared-app"
|
||||
echo "static: static-app"
|
||||
echo "app: ${appmain} ${appfunction} ${appstatement} ${appsystem}"
|
||||
echo "libs: ${amathapp} ${amath} ${amathc} ${amathcplex}"
|
||||
echo
|
||||
echo "amath: static-app"
|
||||
echo "static: static-app"
|
||||
echo
|
||||
echo "${program}.o: ${program}.cpp"
|
||||
echo " \${CXX} \${CXXFLAGS} -c ${program}.cpp -o ${program}.o"
|
||||
echo
|
||||
@@ -907,53 +1173,57 @@ echo " cd src/lib && \${MAKE}"
|
||||
echo
|
||||
echo "${amath}:"
|
||||
echo " cd src/real && \${MAKE}"
|
||||
echo
|
||||
echo
|
||||
echo "${amathc}:"
|
||||
echo " cd src/clib && \${MAKE}"
|
||||
echo
|
||||
echo
|
||||
echo "${amathcplex}:"
|
||||
echo " cd src/cplex && \${MAKE}"
|
||||
echo
|
||||
echo "localize:"
|
||||
echo
|
||||
echo "locale:"
|
||||
echo " cd build/flexcat && \${MAKE}"
|
||||
echo " \${FLXCAT} text/keyword.cd src/localize/kword.h=text/keyword.sd"
|
||||
echo " \${FLXCAT} text/help.cd src/localize/help.h=text/help.sd"
|
||||
echo " \${FLXCAT} text/ident.cd src/localize/ident.h=text/ident.sd"
|
||||
echo " \${FLXCAT} text/text.cd src/localize/text.h=text/text.sd"
|
||||
echo " \${FLXCAT} text/keyword.cd src/loc/kword.h=text/keyword.sd"
|
||||
echo " \${FLXCAT} text/help.cd src/loc/help.h=text/help.sd"
|
||||
echo " \${FLXCAT} text/ident.cd src/loc/ident.h=text/ident.sd"
|
||||
echo " \${FLXCAT} text/text.cd src/loc/text.h=text/text.sd"
|
||||
echo
|
||||
echo "doc:"
|
||||
echo " cd src/clib && \${MAKE} doc"
|
||||
echo " cd src/real && \${MAKE} doc"
|
||||
echo " cd src/cplex && \${MAKE} doc"
|
||||
echo
|
||||
echo "catalogs:"
|
||||
echo " cd build/flexcat && \${MAKE}"
|
||||
echo " \${MKDIR} dist/catalog/english"
|
||||
echo " \${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG dist/catalog/english/amath-help.catalog"
|
||||
echo " \${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG dist/catalog/english/amath-ident.catalog"
|
||||
echo " \${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG dist/catalog/english/amath-text.catalog"
|
||||
echo " \${MKDIR} dist/catalog/dansk"
|
||||
echo " \${FLXCAT} text/help.cd catalog/dansk/amath-help.ct CATALOG dist/catalog/dansk/amath-help.catalog"
|
||||
echo " \${FLXCAT} text/ident.cd catalog/dansk/amath-ident.ct CATALOG dist/catalog/dansk/amath-ident.catalog"
|
||||
echo " \${FLXCAT} text/text.cd catalog/dansk/amath-text.ct CATALOG dist/catalog/dansk/amath-text.catalog"
|
||||
echo " \${FLXCAT} text/keyword.cd catalog/dansk/amath-keyword.ct CATALOG dist/catalog/dansk/amath-keyword.catalog"
|
||||
echo " \${MKDIR} distcat/catalog/english"
|
||||
echo " \${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG distcat/catalog/english/amath-help.catalog"
|
||||
echo " \${FLXCAT} text/ident.cd catalog/english/amath-ident.ct CATALOG distcat/catalog/english/amath-ident.catalog"
|
||||
echo " \${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG distcat/catalog/english/amath-text.catalog"
|
||||
echo
|
||||
echo "shared-app: app libs ${program}.o"
|
||||
echo " \${CC} \${CFLAGS} ${exestrip} ${program}.o -o amath \${LPATH} \${LFLAGS}"
|
||||
echo "shared-libs:"
|
||||
echo " cd src/lib && \${MAKE} shared"
|
||||
echo " cd src/clib && \${MAKE} shared"
|
||||
echo " cd src/real && \${MAKE} shared"
|
||||
echo " cd src/cplex && \${MAKE} shared"
|
||||
echo
|
||||
echo "static-app: ${program}.o"
|
||||
echo "static-libs:"
|
||||
echo " cd src/lib && \${MAKE} static"
|
||||
echo " cd src/clib && \${MAKE} static"
|
||||
echo " cd src/real && \${MAKE} static"
|
||||
echo " cd src/cplex && \${MAKE} static"
|
||||
echo " cd src/main && \${MAKE} static"
|
||||
echo " cd src/system && \${MAKE} static"
|
||||
echo " cd src/main/function && \${MAKE} static"
|
||||
echo " cd src/main/statement && \${MAKE} static"
|
||||
echo
|
||||
echo "shared-app: app shared-libs ${program}.o"
|
||||
echo " \${CC} \${CFLAGS} ${exestrip} ${program}.o -o amath \${LPATH} \${LFLAGS}"
|
||||
echo
|
||||
echo "static-app: app static-libs ${program}.o"
|
||||
echo " \${CC} \${CFLAGS} ${exestrip} ${program}.o -o amath \${LPATHS} \${LFLAGS}"
|
||||
echo
|
||||
echo ".PHONY: test"
|
||||
echo "test: amath"
|
||||
echo " LD_LIBRARY_PATH=src/clib/:src/lib:src/cplex:scr/real"
|
||||
echo " ./amath test"
|
||||
echo " ./amath --test"
|
||||
echo
|
||||
echo ".PHONY: install"
|
||||
echo "install: shared-app"
|
||||
echo "install:"
|
||||
echo " cd src/lib && \${MAKE} install"
|
||||
echo " cd src/clib && \${MAKE} install"
|
||||
echo " cd src/real && \${MAKE} install"
|
||||
@@ -983,6 +1253,13 @@ echo " cd src/main/statement && \${MAKE} clean"
|
||||
echo " cd build/flexcat && \${MAKE} clean"
|
||||
echo " \${DEL} ${program}.o amath"
|
||||
echo
|
||||
echo ".PHONY: very-clean"
|
||||
echo "very-clean: clean"
|
||||
echo " cd src/lib && \${MAKE} very-clean"
|
||||
echo " cd src/clib && \${MAKE} very-clean"
|
||||
echo " cd src/real && \${MAKE} very-clean"
|
||||
echo " cd src/cplex && \${MAKE} very-clean"
|
||||
echo
|
||||
} > Makefile
|
||||
#########################################################################
|
||||
|
||||
|
||||
+98
-108
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,43 +23,104 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AMATH_H
|
||||
#define AMATH_H
|
||||
/******************************************************************************/
|
||||
#ifdef __AMIGA__
|
||||
# define SYS_NAME "AmigaOS 3"
|
||||
# ifndef AOS3
|
||||
# define AOS3
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __AROS__
|
||||
# define SYS_NAME "Aros"
|
||||
# ifndef AROS
|
||||
# define AROS
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __MORPHOS__
|
||||
# define SYS_NAME "MorphOS"
|
||||
# ifndef MORPHOS
|
||||
# define MORPHOS
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __amigaos4__
|
||||
# define SYS_NAME "AmigaOS 4"
|
||||
# ifndef AOS4
|
||||
# define AOS4
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __HAIKU__
|
||||
# define SYS_NAME "Haiku"
|
||||
# ifndef HAIKU
|
||||
# define HAIKU
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __APPLE__
|
||||
# define SYS_NAME "Apple"
|
||||
# ifndef APPLE
|
||||
# define APPLE
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __FreeBSD__
|
||||
# define SYS_NAME "FreeBSD"
|
||||
# ifndef FREEBSD
|
||||
# define FREEBSD
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __NetBSD__
|
||||
# define SYS_NAME "NetBSD"
|
||||
# ifndef NETBSD
|
||||
# define NETBSD
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __OpenBSD__
|
||||
# define SYS_NAME "OpenBSD"
|
||||
# ifndef OPENBSD
|
||||
# define OPENBSD
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __DragonFly__
|
||||
# define SYS_NAME "DragonFly BSD"
|
||||
# ifndef DRAGONFLY
|
||||
# define DRAGONFLY
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef __linux__
|
||||
# define SYS_NAME "Linux"
|
||||
# ifndef LINUX
|
||||
# define LINUX
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef _WIN32
|
||||
# define SYS_NAME "Windows"
|
||||
# ifndef WINDOWS
|
||||
# define WINDOWS
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef _WIN64
|
||||
# define SYS_NAME "Windows 64 bit"
|
||||
# ifndef WINDOWS
|
||||
# define WINDOWS
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if defined(AOS3) || defined(AOS4) || defined(AROS) || defined (MORPHOS)
|
||||
# ifndef AMIGA
|
||||
# define AMIGA
|
||||
@@ -70,32 +131,29 @@
|
||||
# ifndef UNIX
|
||||
# define UNIX
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if defined(AMIGA) || defined(HAIKU) || defined(UNIX)
|
||||
# ifndef ANSICONSOLE
|
||||
# define ANSICONSOLE
|
||||
# ifndef SYS_NAME
|
||||
# define SYS_NAME "Unix variant"
|
||||
# endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef HAIKU
|
||||
#if defined(HAIKU) || defined(UNIX) || defined(APPLE)
|
||||
# ifndef TERMIOS
|
||||
# define TERMIOS
|
||||
# endif
|
||||
# include <stdint.h>
|
||||
# include <unistd.h>
|
||||
# include <dirent.h>
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef UNIX
|
||||
# include <stdint.h>
|
||||
# include <unistd.h>
|
||||
# include <dirent.h>
|
||||
# include <termios.h>
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef _WIN32
|
||||
#if defined(WINDOWS)
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#ifdef AOS3
|
||||
#if defined(AROS) || defined(MORPHOS) || defined(AOS4)
|
||||
# include <stdint.h>
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if defined(AOS3)
|
||||
# include <sys/types.h>
|
||||
# define IPTR LONG*
|
||||
# define uintptr_t uint32_t
|
||||
@@ -105,17 +163,17 @@ typedef u_int32_t uint32_t;
|
||||
typedef u_int64_t uint64_t;
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if defined(AROS) || defined(MORPHOS) || defined(AOS4)
|
||||
# include <stdint.h>
|
||||
# include <sys/types.h>
|
||||
#if (__cplusplus <= 199711L && !defined(WINDOWS)) || !defined(__cplusplus)
|
||||
#ifndef nullptr
|
||||
#define nullptr 0
|
||||
#endif
|
||||
#elif (__cplusplus <= 199711L) && (defined(__GNUC__) || defined(__GNUG__))
|
||||
#ifndef nullptr
|
||||
#define nullptr 0
|
||||
#endif
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if (__cplusplus <= 199711L && !defined(_WIN32)) || !defined(__cplusplus)
|
||||
#define nullptr 0
|
||||
#endif
|
||||
#if defined(__GNUC__) || defined(__GNUG__)
|
||||
#define nullptr 0
|
||||
#endif
|
||||
#define assert(x)
|
||||
/******************************************************************************/
|
||||
/* Compilers*/
|
||||
#if defined(__clang__)
|
||||
@@ -208,8 +266,10 @@ typedef u_int64_t uint64_t;
|
||||
#define SPACE " "
|
||||
#define DOT "."
|
||||
/******************************************************************************/
|
||||
#ifdef _WIN32
|
||||
#if defined(WINDOWS)
|
||||
#define NEWLINE "\r\n"
|
||||
#elif defined(APPLE)
|
||||
#define NEWLINE "\n"
|
||||
#else
|
||||
#define NEWLINE "\n"
|
||||
#endif
|
||||
@@ -272,91 +332,21 @@ typedef int bool;
|
||||
# define TXTFPU EMPTYSTRING
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if defined(WITHTEST) && !defined(ANSICONSOLE)
|
||||
# define TXTOPTS "TEST"
|
||||
#endif
|
||||
#if !defined(WITHTEST) && defined(ANSICONSOLE)
|
||||
# define TXTOPTS "ANSI"
|
||||
#endif
|
||||
#if defined(WITHTEST) && defined(ANSICONSOLE)
|
||||
# define TXTOPTS "ANSI, TEST"
|
||||
#endif
|
||||
#ifdef TXTOPTS
|
||||
# define TXTOPTMSG SPACE "(OPT: " TXTOPTS ")"
|
||||
#else
|
||||
# define TXTOPTMSG EMPTYSTRING
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#define TXTARCH TXTCPU TXTFPU
|
||||
#define RELDATESTAMP "(12-03-2017)"
|
||||
#define TXTDOSVERSION "\0$VER: amath 1.70" SPACE RELDATESTAMP SPACE TXTARCH
|
||||
#define TXTTITLE "amath version 1.7.0"
|
||||
#define TXTCOPYRIGHT "(c) 2017 Carsten Sonne Larsen"
|
||||
#define RELDATESTAMP "(11-01-2021)"
|
||||
#define TXTDOSVERSION "\0$VER: amath 1.90" SPACE RELDATESTAMP SPACE TXTARCH
|
||||
#define TXTTITLE "amath version 1.9.0"
|
||||
#define TXTCOPYRIGHT "(c) 2021 Carsten Sonne Larsen"
|
||||
#define TXTSTARTMSG TXTTITLE SPACE TXTCOPYRIGHT
|
||||
/******************************************************************************/
|
||||
#define TXTVERSMSG TXTTITLE SPACE RELDATESTAMP SPACE TXTARCH
|
||||
#define TXTCOMPMSG "Compiled with " COMP_NAME SPACE COMP_VERS TXTOPTMSG
|
||||
#define TXTCOMPMSG "Compiled with " COMP_NAME SPACE COMP_VERS
|
||||
/******************************************************************************/
|
||||
#define CPROCNAME "amath_console"
|
||||
/******************************************************************************/
|
||||
#if defined(AMIGA)
|
||||
#define AMIGADOS_NAME "dos.library"
|
||||
#define AMIGADOS_REV 33L
|
||||
#define INTUITION_REV 37L
|
||||
#define INTUITION_NAME "intuition.library"
|
||||
#define GRAPHICS_REV 37L
|
||||
#define GRAPHICS_NAME "graphics.library"
|
||||
#define LOCALE_REV 38L
|
||||
#define LOCALE_NAME "locale.library"
|
||||
#define DEVCONSOLE "console.device"
|
||||
#define PORTCR "RKM.console.read"
|
||||
#define PORTCW "RKM.console.write"
|
||||
#define CATALOG_HELP "amath-help.catalog"
|
||||
#define CATALOG_IDEN "amath-ident.catalog"
|
||||
#define CATALOG_TEXT "amath-text.catalog"
|
||||
#define CATALOG_KEYW "amath-keyword.catalog"
|
||||
#define CATALOG_DEF OC_BuiltInLanguage, "english"
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#if defined(ANSICONSOLE)
|
||||
#define HEADLINE "\x1B[1m"
|
||||
#ifdef UNIX
|
||||
#define SYNTAXHIGHLIGHT "\x1B[3m\x1B[32m"
|
||||
#ifdef SYS_NAME
|
||||
# define TXTSYSMSG TXTCOMPMSG " for " SYS_NAME
|
||||
# define SYSKNOWN 1
|
||||
#else
|
||||
#define SYNTAXHIGHLIGHT "\x1B[32m"
|
||||
#endif
|
||||
#define NORMALTEXT "\x1B[0m"
|
||||
#define BOLD "\x1B[1m"
|
||||
#define ITALICS "\x1B[3m"
|
||||
#define UNDERLINE "\x1B[4m"
|
||||
#define COLOR01 "\x1B[31m"
|
||||
#define COLOR02 "\x1B[32m"
|
||||
#define COLOR03 "\x1B[33m"
|
||||
#define CURSORFORWARD "\x1B[1C"
|
||||
#define CURSORBACKWARD "\x1B[1D"
|
||||
#define ERASEINLINE "\x1B[K"
|
||||
#define INSERT1CHAR "\x1B[1@"
|
||||
#define DELETE1CHAR "\x1B[1P"
|
||||
#define DELETELINE "\x0D\x1B[K"
|
||||
#define CLEARWINDOW "\x1B[1;1H\x1B[J"
|
||||
/******************************************************************************/
|
||||
#else
|
||||
#define HEADLINE EMPTYSTRING
|
||||
#define SYNTAXHIGHLIGHT EMPTYSTRING
|
||||
#define NORMALTEXT EMPTYSTRING
|
||||
#define BOLD EMPTYSTRING
|
||||
#define ITALICS EMPTYSTRING
|
||||
#define UNDERLINE EMPTYSTRING
|
||||
#define COLOR01 EMPTYSTRING
|
||||
#define COLOR02 EMPTYSTRING
|
||||
#define COLOR03 EMPTYSTRING
|
||||
#define CURSORFORWARD EMPTYSTRING
|
||||
#define CURSORBACKWARD EMPTYSTRING
|
||||
#define ERASEINLINE EMPTYSTRING
|
||||
#define INSERT1CHAR EMPTYSTRING
|
||||
#define DELETE1CHAR EMPTYSTRING
|
||||
#define DELETELINE EMPTYSTRING
|
||||
#define CLEARWINDOW EMPTYSTRING
|
||||
# define TXTSYSMSG TXTCOMPMSG
|
||||
#endif
|
||||
/******************************************************************************/
|
||||
#endif
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26228.4
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "amath", "amath.vcxproj", "{834DBB3E-042B-41E5-9400-EEC16CF003C7}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x64.Build.0 = Debug|x64
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Debug|x86.Build.0 = Debug|Win32
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x64.ActiveCfg = Release|x64
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x64.Build.0 = Release|x64
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x86.ActiveCfg = Release|Win32
|
||||
{834DBB3E-042B-41E5-9400-EEC16CF003C7}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,146 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{834DBB3E-042B-41E5-9400-EEC16CF003C7}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>amath</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+5
-6
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,8 +23,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AMATHC_H
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
/**
|
||||
* @file amathc.h
|
||||
* @brief C functions for manipulating strings and memory.
|
||||
*
|
||||
* @brief C functions for manipulating strings and memory
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
@@ -51,9 +50,9 @@ typedef struct
|
||||
|
||||
void* AllocMemSafe(size_t);
|
||||
void FreeMemSafe(void*);
|
||||
void DetachMemSafe(void*);
|
||||
void FreeAllSafe();
|
||||
void MemUsage(long*, long*, long*);
|
||||
|
||||
int StrLen(const char* string);
|
||||
bool StrIsEqual(const char* s1, const char* s2);
|
||||
void MemSet(void* destination, int c0, unsigned int length);
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,8 +23,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef AMATHT_H
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
CC = gcc
|
||||
CFLAGS = -std=c9x -O3 -DWITHTEST -I. -I.. -Wall
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
MKDIR = mkdir -p
|
||||
DEL = rm -f
|
||||
INSTALL = install -m 0644
|
||||
LDCONFIG = ldconfig
|
||||
PREFIX = /usr
|
||||
INSTDIR = ${DESTDIR}${PREFIX}/lib/amath
|
||||
INSTDIRI = ${DESTDIR}${PREFIX}/include/amath
|
||||
INSTDIRPC = ${DESTDIR}${PREFIX}/lib/pkgconfig
|
||||
INSTDIRM = ${DESTDIR}${PREFIX}/share/man/man3
|
||||
alib = libamathc.a
|
||||
solib = libamathc.so
|
||||
pkgconfig = amathc.pc
|
||||
manpage = amathc.3
|
||||
|
||||
all: static shared
|
||||
|
||||
static: ${alib}
|
||||
|
||||
shared: ${solib}
|
||||
|
||||
static/alloccpy.o: alloccpy.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c alloccpy.c -o static/alloccpy.o
|
||||
|
||||
shared/alloccpy.o: alloccpy.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c alloccpy.c -o shared/alloccpy.o
|
||||
|
||||
static/mem.o: mem.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c mem.c -o static/mem.o
|
||||
|
||||
shared/mem.o: mem.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c mem.c -o shared/mem.o
|
||||
|
||||
static/memcpy.o: memcpy.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c memcpy.c -o static/memcpy.o
|
||||
|
||||
shared/memcpy.o: memcpy.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c memcpy.c -o shared/memcpy.o
|
||||
|
||||
static/memset.o: memset.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c memset.c -o static/memset.o
|
||||
|
||||
shared/memset.o: memset.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c memset.c -o shared/memset.o
|
||||
|
||||
static/strcmp.o: strcmp.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c strcmp.c -o static/strcmp.o
|
||||
|
||||
shared/strcmp.o: strcmp.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c strcmp.c -o shared/strcmp.o
|
||||
|
||||
static/strlen.o: strlen.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c strlen.c -o static/strlen.o
|
||||
|
||||
shared/strlen.o: strlen.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c strlen.c -o shared/strlen.o
|
||||
|
||||
static/untag.o: untag.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c untag.c -o static/untag.o
|
||||
|
||||
shared/untag.o: untag.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c untag.c -o shared/untag.o
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
${MKDIR} static
|
||||
${MKDIR} shared
|
||||
|
||||
${solib}: build shared/alloccpy.o shared/mem.o shared/memcpy.o shared/memset.o shared/strcmp.o shared/strlen.o shared/untag.o
|
||||
${CC} ${CFLAGS} -shared -s -fPIC -Wl,-soname,${solib}.1.7.0 -o ${solib} shared/alloccpy.o shared/mem.o shared/memcpy.o shared/memset.o shared/strcmp.o shared/strlen.o shared/untag.o -lc
|
||||
|
||||
${alib}: build static/alloccpy.o static/mem.o static/memcpy.o static/memset.o static/strcmp.o static/strlen.o static/untag.o
|
||||
${AR} rcs static/${alib} static/alloccpy.o static/mem.o static/memcpy.o static/memset.o static/strcmp.o static/strlen.o static/untag.o
|
||||
${RANLIB} static/${alib}
|
||||
|
||||
.PHONY: install
|
||||
install: ${alib} ${solib}
|
||||
${MKDIR} ${INSTDIR}
|
||||
${MKDIR} ${INSTDIRPC}
|
||||
${MKDIR} ${INSTDIRI}
|
||||
${INSTALL} static/${alib} ${INSTDIR}/${alib}
|
||||
${INSTALL} ${solib} ${INSTDIR}/${solib}
|
||||
${INSTALL} ${pkgconfig} ${INSTDIRPC}/${pkgconfig}
|
||||
${INSTALL} ${manpage} ${INSTDIRM}/${manpage}
|
||||
${INSTALL} ../amath.h ${INSTDIRI}
|
||||
${INSTALL} ../amathc.h ${INSTDIRI}
|
||||
${LDCONFIG} ${INSTDIR}
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
${DEL} ${INSTDIR}/${alib}
|
||||
${DEL} ${INSTDIR}/${solib}
|
||||
${DEL} ${INSTDIRPC}/${pkgconfig}
|
||||
${DEL} ${INSTDIRM}/${manpage}
|
||||
${DEL} ${INSTDIRI}/amath.h
|
||||
${DEL} ${INSTDIRI}/amathc.h
|
||||
${LDCONFIG}
|
||||
|
||||
clean:
|
||||
${DEL} static/${alib} ${solib} static/alloccpy.o static/mem.o static/memcpy.o static/memset.o static/strcmp.o static/strlen.o static/untag.o shared/alloccpy.o shared/mem.o shared/memcpy.o shared/memset.o shared/strcmp.o shared/strlen.o shared/untag.o
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,13 +23,13 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "amathc.h"
|
||||
|
||||
#ifdef AMIGA
|
||||
#if defined(AMIGA)
|
||||
#include <clib/exec_protos.h>
|
||||
#endif
|
||||
|
||||
@@ -58,7 +58,7 @@ unsigned int AllocAndCopy(char** destination, const char* source)
|
||||
*destination = AllocMemSafe(size);
|
||||
d = *destination;
|
||||
|
||||
#ifdef AMIGA // Take advantage of exec
|
||||
#if defined(AMIGA) // Take advantage of exec
|
||||
CopyMem(s, d, n);
|
||||
#else
|
||||
while (n--)
|
||||
|
||||
+247
-278
@@ -1,26 +1,39 @@
|
||||
.TH "amath/amathc.h" 3 "Wed Mar 1 2017" "Version 1.7.0" "amath" \" -*- nroff -*-
|
||||
.ad l
|
||||
.nh
|
||||
.\" Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.TH "amathc.h" 3 "Version 1.9.0" "January 11 2021"
|
||||
.SH NAME
|
||||
amathc.h \- C functions for manipulating strings and memory
|
||||
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.PP
|
||||
\fC#include <stddef\&.h>\fP
|
||||
.br
|
||||
\fC#include 'amath\&.h'\fP
|
||||
.br
|
||||
|
||||
.SS "Classes"
|
||||
|
||||
\fC#include \fB"amathc\&.h"\fP
|
||||
.SS "Data Structures"
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "struct \fBtexttag\fP"
|
||||
.br
|
||||
.in -1c
|
||||
.SS "Functions"
|
||||
|
||||
.in +1c
|
||||
.ti -1c
|
||||
.RI "void * \fBAllocMemSafe\fP (size_t)"
|
||||
@@ -31,6 +44,10 @@ amathc.h \- C functions for manipulating strings and memory
|
||||
.br
|
||||
.RI "\fIDeallocate memory from the global memory list\&. \fP"
|
||||
.ti -1c
|
||||
.RI "void \fBDetachMemSafe\fP (void *)"
|
||||
.br
|
||||
.RI "\fIDetach an allocated memory from the global memory list\&. \fP"
|
||||
.ti -1c
|
||||
.RI "void \fBFreeAllSafe\fP ()"
|
||||
.br
|
||||
.RI "\fIDeallocate all memory in the global memory list\&. \fP"
|
||||
@@ -43,7 +60,7 @@ amathc.h \- C functions for manipulating strings and memory
|
||||
.br
|
||||
.RI "\fIGet the length of a null terminated string\&. \fP"
|
||||
.ti -1c
|
||||
.RI "\fBbool\fP \fBStrIsEqual\fP (const char *s1, const char *s2)"
|
||||
.RI "bool \fBStrIsEqual\fP (const char *s1, const char *s2)"
|
||||
.br
|
||||
.RI "\fICompare two null terminated strings to each other\&. \fP"
|
||||
.ti -1c
|
||||
@@ -61,19 +78,9 @@ amathc.h \- C functions for manipulating strings and memory
|
||||
.ti -1c
|
||||
.RI "void \fBUntag\fP (char *destination, const char *source, \fBtexttag\fP tags[], unsigned int tagcount)"
|
||||
.br
|
||||
.in -1c
|
||||
.SH "Detailed Description"
|
||||
.PP
|
||||
C functions for manipulating strings and memory\&.
|
||||
|
||||
|
||||
.PP
|
||||
Definition in file \fBamathc\&.h\fP\&.
|
||||
.SH "Function Documentation"
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
.SS "unsigned int AllocAndCopy (char ** destination, const char * source)"
|
||||
.br
|
||||
.PP
|
||||
Allocate memory and copy a string into the array\&.
|
||||
.PP
|
||||
@@ -83,37 +90,32 @@ Definition at line 40 of file alloccpy\&.c\&.
|
||||
41 {
|
||||
42 char *i, *s, *d;
|
||||
43 unsigned int n, size;
|
||||
44
|
||||
44
|
||||
45 if (source == nullptr)
|
||||
46 {
|
||||
47 *destination = nullptr;
|
||||
48 return 0;
|
||||
49 }
|
||||
50
|
||||
50
|
||||
51 i = (char*)source;
|
||||
52 s = (char*)source;
|
||||
53 while (*i)
|
||||
54 i++;
|
||||
55
|
||||
55
|
||||
56 n = (unsigned int)(i - s + 1);
|
||||
57 size = n;
|
||||
58 *destination = AllocMemSafe(size);
|
||||
59 d = *destination;
|
||||
60
|
||||
61 #ifdef AMIGA // Take advantage of exec
|
||||
62 CopyMem(s, d, n);
|
||||
63 #else
|
||||
60
|
||||
64 while (n--)
|
||||
65 *d++ = *s++;
|
||||
66 #endif
|
||||
67
|
||||
67
|
||||
68 return size;
|
||||
69 }
|
||||
.fi
|
||||
.SS "void* AllocMemSafe (size_t)"
|
||||
|
||||
.PP
|
||||
Allocate memory and add it to the global memory list\&.
|
||||
Allocate memory and add it to the global memory list\&.
|
||||
.PP
|
||||
Definition at line 86 of file mem\&.c\&.
|
||||
.PP
|
||||
@@ -121,8 +123,8 @@ Definition at line 86 of file mem\&.c\&.
|
||||
87 {
|
||||
88 struct MemoryBlock* newblock;
|
||||
89 size_t allocsize;
|
||||
90
|
||||
91 if (list == NULL)
|
||||
90
|
||||
91 if (list == nullptr)
|
||||
92 {
|
||||
93 list = (struct MemoryList*)ALLOC_MEM(sizeof(struct MemoryList));
|
||||
94 if (!list)
|
||||
@@ -130,13 +132,13 @@ Definition at line 86 of file mem\&.c\&.
|
||||
96 alloc_error("list", sizeof(struct MemoryList));
|
||||
97 return 0;
|
||||
98 }
|
||||
99
|
||||
100 list->first = NULL;
|
||||
99
|
||||
100 list->first = nullptr;
|
||||
101 list->peak = 0;
|
||||
102 list->size = 0;
|
||||
103 list->count = 0;
|
||||
104 }
|
||||
105
|
||||
105
|
||||
106 #ifdef P64BIT
|
||||
107 // Align to bytes of 8
|
||||
108 allocsize = (size + 7) & ~0x07;
|
||||
@@ -144,14 +146,14 @@ Definition at line 86 of file mem\&.c\&.
|
||||
110 // Align to bytes of 4
|
||||
111 allocsize = (size + 3) & ~0x03;
|
||||
112 #endif
|
||||
113
|
||||
113
|
||||
114 newblock = (struct MemoryBlock*)ALLOC_MEM(sizeof(struct MemoryBlock));
|
||||
115 if (!newblock)
|
||||
116 {
|
||||
117 alloc_error("block", sizeof(struct MemoryBlock));
|
||||
118 return 0;
|
||||
119 }
|
||||
120
|
||||
120
|
||||
121 newblock->address = (struct MemoryBlock*)ALLOC_MEM(allocsize);
|
||||
122 if (!newblock->address)
|
||||
123 {
|
||||
@@ -159,292 +161,248 @@ Definition at line 86 of file mem\&.c\&.
|
||||
125 alloc_error("memory", allocsize);
|
||||
126 return 0;
|
||||
127 }
|
||||
128
|
||||
128
|
||||
129 newblock->size = allocsize;
|
||||
130 newblock->next = list->first;
|
||||
131 list->first = newblock;
|
||||
132 list->size += allocsize;
|
||||
133 list->count++;
|
||||
134
|
||||
134
|
||||
135 if (list->size > list->peak)
|
||||
136 {
|
||||
137 list->peak = list->size;
|
||||
138 }
|
||||
139
|
||||
139
|
||||
140 // Memory allocated
|
||||
141 return newblock->address;
|
||||
142 }
|
||||
.fi
|
||||
.SS "void FreeAllSafe ()"
|
||||
|
||||
.SS "void DetachMemSafe (void * block)"
|
||||
.PP
|
||||
Deallocate all memory in the global memory list\&.
|
||||
Detach an allocated memory from the global memory list\&. The memory block is only detached, not deallocated\&.
|
||||
.PP
|
||||
Definition at line 199 of file mem\&.c\&.
|
||||
Definition at line 209 of file mem\&.c\&.
|
||||
.PP
|
||||
.nf
|
||||
200 {
|
||||
201 struct MemoryBlock *current, *next;
|
||||
202
|
||||
203 if (list == NULL)
|
||||
204 {
|
||||
205 return;
|
||||
206 }
|
||||
207
|
||||
208 current = list->first;
|
||||
209 while (current != NULL)
|
||||
210 {
|
||||
211 next = current->next;
|
||||
212 FREE_MEM(current->address);
|
||||
213 FREE_MEM(current);
|
||||
214 current = next;
|
||||
215 }
|
||||
216
|
||||
217 FREE_MEM(list);
|
||||
218 list = NULL;
|
||||
219 }
|
||||
210 {
|
||||
211 RemoveMemSafe(block, false);
|
||||
212 }
|
||||
.fi
|
||||
.SS "void FreeAllSafe ()"
|
||||
.PP
|
||||
Deallocate all memory in the global memory list\&.
|
||||
.PP
|
||||
Definition at line 217 of file mem\&.c\&.
|
||||
.PP
|
||||
.nf
|
||||
218 {
|
||||
219 struct MemoryBlock *current, *next;
|
||||
220
|
||||
221 if (list == nullptr)
|
||||
222 {
|
||||
223 return;
|
||||
224 }
|
||||
225
|
||||
226 current = list->first;
|
||||
227 while (current != nullptr)
|
||||
228 {
|
||||
229 next = current->next;
|
||||
230 FREE_MEM(current->address);
|
||||
231 FREE_MEM(current);
|
||||
232 current = next;
|
||||
233 }
|
||||
234
|
||||
235 FREE_MEM(list);
|
||||
236 list = nullptr;
|
||||
237 }
|
||||
.fi
|
||||
.SS "void FreeMemSafe (void *)"
|
||||
|
||||
.PP
|
||||
Deallocate memory from the global memory list\&.
|
||||
Deallocate memory from the global memory list\&.
|
||||
.PP
|
||||
Definition at line 147 of file mem\&.c\&.
|
||||
Definition at line 200 of file mem\&.c\&.
|
||||
.PP
|
||||
.nf
|
||||
148 {
|
||||
149 struct MemoryBlock *current, *previous;
|
||||
150
|
||||
151 if (list == NULL || block == NULL)
|
||||
152 {
|
||||
153 dealloc_error("list", 0);
|
||||
154 return;
|
||||
155 }
|
||||
156
|
||||
157 if (block == NULL)
|
||||
158 {
|
||||
159 dealloc_error("memory", 0);
|
||||
160 return;
|
||||
161 }
|
||||
162
|
||||
163 previous = NULL;
|
||||
164 current = list->first;
|
||||
165 while (current != NULL && current->address != block)
|
||||
166 {
|
||||
167 previous = current;
|
||||
168 current = current->next;
|
||||
169 }
|
||||
170
|
||||
171 if (current == NULL)
|
||||
172 {
|
||||
173 dealloc_error("address not found", block);
|
||||
174 return;
|
||||
175 }
|
||||
176
|
||||
177 if (previous == NULL)
|
||||
178 {
|
||||
179 list->first = current->next;
|
||||
180 }
|
||||
181 else
|
||||
182 {
|
||||
183 previous->next = current->next;
|
||||
184 }
|
||||
185
|
||||
186 list->size -= current->size;
|
||||
187 list->count--;
|
||||
188
|
||||
189 FREE_MEM(current->address);
|
||||
190 current->address = NULL;
|
||||
191 current->next = NULL;
|
||||
192 current->size = 0;
|
||||
193 FREE_MEM(current);
|
||||
194 }
|
||||
201 {
|
||||
202 RemoveMemSafe(block, true);
|
||||
203 }
|
||||
.fi
|
||||
.SS "void MemCopy (void * destination, const void * source, unsigned int length)"
|
||||
|
||||
.PP
|
||||
Copy a block of memory, handling overlap\&.
|
||||
Copy a block of memory, handling overlap\&.
|
||||
.PP
|
||||
Definition at line 77 of file memcpy\&.c\&.
|
||||
Definition at line 75 of file memcpy\&.c\&.
|
||||
.PP
|
||||
.nf
|
||||
78 {
|
||||
79 char* dst = (char*) destination;
|
||||
80 const char* src = (const char*) source;
|
||||
81 unsigned int t;
|
||||
82
|
||||
83 if (length == 0 || dst == src) // nothing to do
|
||||
84 return;
|
||||
85
|
||||
86 if ((mem_ptr)dst < (mem_ptr)src)
|
||||
87 {
|
||||
88 // Copy forward
|
||||
89 #ifdef AMIGA // Take advantage of exec
|
||||
90 CopyMem((void*)source, destination, length);
|
||||
91 #else
|
||||
92 t = (mem_ptr)src; // only need low bits
|
||||
93 if ((t | (mem_ptr)dst) & wmask)
|
||||
94 {
|
||||
95 // Try to align operands\&. This cannot be done unless the low bits match\&.
|
||||
96 if ((t ^ (mem_ptr)dst) & wmask || length < wsize)
|
||||
97 t = length;
|
||||
98 else
|
||||
99 t = wsize - (t & wmask);
|
||||
100 length -= t;
|
||||
101
|
||||
102 TLOOP1(*dst++ = *src++);
|
||||
103 }
|
||||
104
|
||||
105 // Copy whole words, then mop up any trailing bytes\&.
|
||||
106 t = length / wsize;
|
||||
107 TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
|
||||
108
|
||||
109 t = length & wmask;
|
||||
110 TLOOP(*dst++ = *src++);
|
||||
111 #endif
|
||||
112 }
|
||||
113 else
|
||||
114 {
|
||||
115 // Copy backwards\&. Otherwise essentially the same\&.
|
||||
116 // Alignment works as before, except that it takes
|
||||
117 // (t&wmask) bytes to align, not wsize-(t&wmask)\&.
|
||||
118 src += length;
|
||||
119 dst += length;
|
||||
120 t = (mem_ptr)src;
|
||||
121 if ((t | (mem_ptr)dst) & wmask)
|
||||
122 {
|
||||
123 if ((t ^ (mem_ptr)dst) & wmask || length <= wsize)
|
||||
124 t = length;
|
||||
125 else
|
||||
126 t &= wmask;
|
||||
127 length -= t;
|
||||
128
|
||||
129 TLOOP1(*--dst = *--src);
|
||||
130 }
|
||||
131
|
||||
132 t = length / wsize;
|
||||
133 TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
|
||||
134
|
||||
135 t = length & wmask;
|
||||
136 TLOOP(*--dst = *--src);
|
||||
137 }
|
||||
138 }
|
||||
76 {
|
||||
77 char* dst = (char*) destination;
|
||||
78 const char* src = (const char*) source;
|
||||
79 unsigned int t;
|
||||
80
|
||||
81 if (length == 0 || dst == src) // nothing to do
|
||||
82 return;
|
||||
83
|
||||
84 if ((mem_ptr)dst < (mem_ptr)src)
|
||||
85 {
|
||||
86 // Copy forward
|
||||
90 t = (mem_ptr)src; // only need low bits
|
||||
91 if ((t | (mem_ptr)dst) & wmask)
|
||||
92 {
|
||||
93 // Try to align operands\&. This cannot be done unless the low bits match\&.
|
||||
94 if ((t ^ (mem_ptr)dst) & wmask || length < wsize)
|
||||
95 t = length;
|
||||
96 else
|
||||
97 t = wsize - (t & wmask);
|
||||
98 length -= t;
|
||||
99
|
||||
100 TLOOP1(*dst++ = *src++);
|
||||
101 }
|
||||
102
|
||||
103 // Copy whole words, then mop up any trailing bytes\&.
|
||||
104 t = length / wsize;
|
||||
105 TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
|
||||
106
|
||||
107 t = length & wmask;
|
||||
108 TLOOP(*dst++ = *src++);
|
||||
110 }
|
||||
111 else
|
||||
112 {
|
||||
113 // Copy backwards\&. Otherwise essentially the same\&.
|
||||
114 // Alignment works as before, except that it takes
|
||||
115 // (t&wmask) bytes to align, not wsize-(t&wmask)\&.
|
||||
116 src += length;
|
||||
117 dst += length;
|
||||
118 t = (mem_ptr)src;
|
||||
119 if ((t | (mem_ptr)dst) & wmask)
|
||||
120 {
|
||||
121 if ((t ^ (mem_ptr)dst) & wmask || length <= wsize)
|
||||
122 t = length;
|
||||
123 else
|
||||
124 t &= wmask;
|
||||
125 length -= t;
|
||||
126
|
||||
127 TLOOP1(*--dst = *--src);
|
||||
128 }
|
||||
129
|
||||
130 t = length / wsize;
|
||||
131 TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
|
||||
132
|
||||
133 t = length & wmask;
|
||||
134 TLOOP(*--dst = *--src);
|
||||
135 }
|
||||
136 }
|
||||
.fi
|
||||
.SS "void MemSet (void * destination, int c0, unsigned int length)"
|
||||
|
||||
.PP
|
||||
Fill block of memory with a constant value\&.
|
||||
Fill block of memory with a constant value\&.
|
||||
.PP
|
||||
Definition at line 60 of file memset\&.c\&.
|
||||
Definition at line 56 of file memset\&.c\&.
|
||||
.PP
|
||||
.nf
|
||||
61 {
|
||||
62 unsigned char* dst = (unsigned char*) dst0;
|
||||
63 unsigned int t;
|
||||
64 unsigned int c;
|
||||
65
|
||||
66 /*
|
||||
67 * If not enough words, just fill bytes\&. A length >= 2 words
|
||||
68 * guarantees that at least one of them is `complete' after
|
||||
69 * any necessary alignment\&. For instance:
|
||||
70 *
|
||||
71 * |-----------|-----------|-----------|
|
||||
72 * |00|01|02|03|04|05|06|07|08|09|0A|00|
|
||||
73 * ^---------------------^
|
||||
74 * dst dst+length-1
|
||||
75 *
|
||||
76 * but we use a minimum of 3 here since the overhead of the code
|
||||
77 * to do word writes is substantial\&.
|
||||
78 */
|
||||
79 if (length < 3 * wsize)
|
||||
80 {
|
||||
81 while (length != 0)
|
||||
82 {
|
||||
83 *dst++ = c0;
|
||||
84 --length;
|
||||
85 }
|
||||
86 }
|
||||
87
|
||||
88 if ((c = (unsigned char)c0) != 0)
|
||||
89 { /* Fill the word\&. */
|
||||
90 c = (c << 8) | c; /* u_int is 16 bits\&. */
|
||||
91 #if UINT_MAX > 0xffff
|
||||
92 c = (c << 16) | c; /* u_int is 32 bits\&. */
|
||||
93 #endif
|
||||
94 #if UINT_MAX > 0xffffffff
|
||||
95 c = (c << 32) | c; /* u_int is 64 bits\&. */
|
||||
96 #endif
|
||||
97 }
|
||||
98
|
||||
99 /* Align destination by filling in bytes\&. */
|
||||
100 if ((t = (mem_ptr)dst & wmask) != 0)
|
||||
101 {
|
||||
102 t = wsize - t;
|
||||
103 length -= t;
|
||||
104 do
|
||||
105 {
|
||||
106 *dst++ = c0;
|
||||
107 }
|
||||
108 while (--t != 0);
|
||||
109 }
|
||||
110
|
||||
111 /* Fill words\&. Length was >= 2*words so we know t >= 1 here\&. */
|
||||
112 t = length / wsize;
|
||||
113 do
|
||||
114 {
|
||||
115 *(unsigned int*)dst = c;
|
||||
116 dst += wsize;
|
||||
117 }
|
||||
118 while (--t != 0);
|
||||
119
|
||||
120 /* Mop up trailing bytes, if any\&. */
|
||||
121 t = length & wmask;
|
||||
122 if (t != 0)
|
||||
123 do
|
||||
124 {
|
||||
125 *dst++ = c0;
|
||||
126 }
|
||||
127 while (--t != 0);
|
||||
128 }
|
||||
57 {
|
||||
58 unsigned char* dst = (unsigned char*) dst0;
|
||||
59 unsigned int t;
|
||||
60 unsigned int c;
|
||||
61
|
||||
62 /*
|
||||
63 * If not enough words, just fill bytes\&. A length >= 2 words
|
||||
64 * guarantees that at least one of them is `complete' after
|
||||
65 * any necessary alignment\&. For instance:
|
||||
66 *
|
||||
67 * |-----------|-----------|-----------|
|
||||
68 * |00|01|02|03|04|05|06|07|08|09|0A|00|
|
||||
69 * ^---------------------^
|
||||
70 * dst dst+length-1
|
||||
71 *
|
||||
72 * but we use a minimum of 3 here since the overhead of the code
|
||||
73 * to do word writes is substantial\&.
|
||||
74 */
|
||||
75 if (length < 3 * wsize)
|
||||
76 {
|
||||
77 while (length != 0)
|
||||
78 {
|
||||
79 *dst++ = c0;
|
||||
80 --length;
|
||||
81 }
|
||||
82 }
|
||||
83
|
||||
84 if ((c = (unsigned char)c0) != 0)
|
||||
85 { /* Fill the word\&. */
|
||||
86 c = (c << 8) | c; /* u_int is 16 bits\&. */
|
||||
87 #if UINT_MAX > 0xffff
|
||||
88 c = (c << 16) | c; /* u_int is 32 bits\&. */
|
||||
89 #endif
|
||||
90 #if UINT_MAX > 0xffffffff
|
||||
91 c = (c << 32) | c; /* u_int is 64 bits\&. */
|
||||
92 #endif
|
||||
93 }
|
||||
94
|
||||
95 /* Align destination by filling in bytes\&. */
|
||||
96 if ((t = (mem_ptr)dst & wmask) != 0)
|
||||
97 {
|
||||
98 t = wsize - t;
|
||||
99 length -= t;
|
||||
100 do
|
||||
101 {
|
||||
102 *dst++ = c0;
|
||||
103 }
|
||||
104 while (--t != 0);
|
||||
105 }
|
||||
106
|
||||
107 /* Fill words\&. Length was >= 2*words so we know t >= 1 here\&. */
|
||||
108 t = length / wsize;
|
||||
109 do
|
||||
110 {
|
||||
111 *(unsigned int*)dst = c;
|
||||
112 dst += wsize;
|
||||
113 }
|
||||
114 while (--t != 0);
|
||||
115
|
||||
116 /* Mop up trailing bytes, if any\&. */
|
||||
117 t = length & wmask;
|
||||
118 if (t != 0)
|
||||
119 do
|
||||
120 {
|
||||
121 *dst++ = c0;
|
||||
122 }
|
||||
123 while (--t != 0);
|
||||
124 }
|
||||
.fi
|
||||
.SS "void MemUsage (long *, long *, long *)"
|
||||
|
||||
.PP
|
||||
Get memory usage in the global memory list\&.
|
||||
Get memory usage in the global memory list\&.
|
||||
.PP
|
||||
Definition at line 224 of file mem\&.c\&.
|
||||
Definition at line 242 of file mem\&.c\&.
|
||||
.PP
|
||||
.nf
|
||||
225 {
|
||||
226 *blocks = list->count;
|
||||
227 *size = (long)list->size;
|
||||
228 *peak = (long)list->peak;;
|
||||
229 }
|
||||
243 {
|
||||
244 *blocks = list->count;
|
||||
245 *size = (long)list->size;
|
||||
246 *peak = (long)list->peak;;
|
||||
247 }
|
||||
.fi
|
||||
.SS "\fBbool\fP StrIsEqual (const char * s1, const char * s2)"
|
||||
|
||||
.SS "bool StrIsEqual (const char * s1, const char * s2)"
|
||||
.PP
|
||||
Compare two null terminated strings to each other\&.
|
||||
Compare two null terminated strings to each other\&.
|
||||
.PP
|
||||
Definition at line 50 of file strcmp\&.c\&.
|
||||
.PP
|
||||
.nf
|
||||
51 {
|
||||
52 int r;
|
||||
53
|
||||
53
|
||||
54 while (*s1 == *s2++)
|
||||
55 if (*s1++ == '\0')
|
||||
56 return true;
|
||||
57
|
||||
57
|
||||
58 r = (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
|
||||
59
|
||||
59
|
||||
60 return r == 0;
|
||||
61 }
|
||||
.fi
|
||||
.SS "int StrLen (const char * string)"
|
||||
|
||||
.PP
|
||||
Get the length of a null terminated string\&.
|
||||
Get the length of a null terminated string\&.
|
||||
.PP
|
||||
Definition at line 34 of file strlen\&.c\&.
|
||||
.PP
|
||||
@@ -458,7 +416,6 @@ Definition at line 34 of file strlen\&.c\&.
|
||||
41 }
|
||||
.fi
|
||||
.SS "void Untag (char * destination, const char * source, \fBtexttag\fP tags[], unsigned int tagcount)"
|
||||
|
||||
.PP
|
||||
Definition at line 32 of file untag\&.c\&.
|
||||
.PP
|
||||
@@ -467,10 +424,10 @@ Definition at line 32 of file untag\&.c\&.
|
||||
34 const char *pos, *tmp, *tag;
|
||||
35 char* dest;
|
||||
36 int unsigned i, j, found;
|
||||
37
|
||||
37
|
||||
38 pos = source;
|
||||
39 dest = destination;
|
||||
40
|
||||
40
|
||||
41 while (*pos != '\0')
|
||||
42 {
|
||||
43 if (*pos != '#')
|
||||
@@ -492,7 +449,7 @@ Definition at line 32 of file untag\&.c\&.
|
||||
59 tag++;
|
||||
60 j++;
|
||||
61 }
|
||||
62
|
||||
62
|
||||
63 if (j > 1 && *(--tag) == '#')
|
||||
64 {
|
||||
65 // Tag found\&. Now replace\&.
|
||||
@@ -504,7 +461,7 @@ Definition at line 32 of file untag\&.c\&.
|
||||
71 break;
|
||||
72 }
|
||||
73 }
|
||||
74
|
||||
74
|
||||
75 if (!found)
|
||||
76 {
|
||||
77 (*dest++ = *pos++);
|
||||
@@ -514,6 +471,18 @@ Definition at line 32 of file untag\&.c\&.
|
||||
81 *dest = '\0';
|
||||
82 }
|
||||
.fi
|
||||
.SH "See also"
|
||||
.PP
|
||||
amath(1), amathr(3), amathi(3)
|
||||
.SH HOMEPAGE
|
||||
https://amath.innolan.net/
|
||||
.SH AUTHORS
|
||||
.PP
|
||||
Written by Carsten Sonne Larsen <cs@innolan.net>. The code in MemSet and
|
||||
MemCopy is derived from software contributed to Berkeley by Mike Hibler and
|
||||
Chris Torek.
|
||||
.SH COPYRIGHT
|
||||
Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
.br
|
||||
Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
.br
|
||||
Copyright (c) 1990, 1993 The Regents of the University of California
|
||||
.SH SEE ALSO
|
||||
amath(1), amathr(3), amathi(3)
|
||||
@@ -0,0 +1,154 @@
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "amathc"
|
||||
PROJECT_NUMBER = "1.9.0"
|
||||
PROJECT_BRIEF = "C functions for manipulating strings and memory"
|
||||
PROJECT_LOGO =
|
||||
OUTPUT_DIRECTORY =
|
||||
CREATE_SUBDIRS = NO
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 4
|
||||
ALIASES =
|
||||
TCL_SUBST =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
EXTENSION_MAPPING = C
|
||||
MARKDOWN_SUPPORT = YES
|
||||
AUTOLINK_SUPPORT = YES
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
GROUP_NESTED_COMPOUNDS = NO
|
||||
SUBGROUPING = YES
|
||||
INLINE_GROUPED_CLASSES = NO
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_PACKAGE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
SHOW_GROUPED_MEMB_INC = NO
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_MEMBERS_CTORS_1ST = NO
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = YES
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
GENERATE_TODOLIST = NO
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
CITE_BIB_FILES =
|
||||
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE = doxygen.warn
|
||||
|
||||
INPUT = ../amathc.h .
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = NO
|
||||
EXCLUDE = amathc.dox
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
USE_MDFILE_AS_MAINPAGE = NO
|
||||
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = YES
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
REFERENCES_LINK_SOURCE = NO
|
||||
SOURCE_TOOLTIPS = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
CLANG_ASSISTED_PARSING = YES
|
||||
CLANG_OPTIONS =
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
|
||||
GENERATE_MAN = YES
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_SUBDIR =
|
||||
MAN_LINKS = NO
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = UNIX
|
||||
EXPAND_AS_DEFINED = YES
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
GENERATE_HTML = NO
|
||||
GENERATE_LATEX = NO
|
||||
GENERATE_RTF = NO
|
||||
GENERATE_XML = NO
|
||||
GENERATE_DOCBOOK = NO
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
GENERATE_PERLMOD = NO
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = NO
|
||||
EXTERNAL_PAGES = NO
|
||||
CLASS_DIAGRAMS = NO
|
||||
+1
-1
@@ -5,6 +5,6 @@ libdir=${exec_prefix}/lib
|
||||
|
||||
Name: amath C library
|
||||
Description: C functions for manipulating strings and memory
|
||||
Version: 1.7.0
|
||||
Version: 1.9.0
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lamathc
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{01757088-637B-45D8-B042-14B76DF11115}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="alloccpy.c" />
|
||||
<ClCompile Include="mem.c" />
|
||||
<ClCompile Include="memcpy.c" />
|
||||
<ClCompile Include="memset.c" />
|
||||
<ClCompile Include="strcmp.c" />
|
||||
<ClCompile Include="strlen.c" />
|
||||
<ClCompile Include="untag.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="untag.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="strlen.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mem.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="alloccpy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="memcpy.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="memset.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="strcmp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+41
-23
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,13 +23,13 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "amathc.h"
|
||||
|
||||
#ifdef AMIGA
|
||||
#if defined(AMIGA)
|
||||
#include <stddef.h>
|
||||
#include <exec/types.h>
|
||||
#include <exec/memory.h>
|
||||
@@ -75,7 +75,7 @@ struct MemoryList
|
||||
/**
|
||||
* @brief Global list of allocated memory.
|
||||
*/
|
||||
struct MemoryList* list = NULL;
|
||||
struct MemoryList* list = nullptr;
|
||||
|
||||
void alloc_error(char*, size_t);
|
||||
void dealloc_error(char*, void*);
|
||||
@@ -88,7 +88,7 @@ void* AllocMemSafe(size_t size)
|
||||
struct MemoryBlock* newblock;
|
||||
size_t allocsize;
|
||||
|
||||
if (list == NULL)
|
||||
if (list == nullptr)
|
||||
{
|
||||
list = (struct MemoryList*)ALLOC_MEM(sizeof(struct MemoryList));
|
||||
if (!list)
|
||||
@@ -97,7 +97,7 @@ void* AllocMemSafe(size_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
list->first = NULL;
|
||||
list->first = nullptr;
|
||||
list->peak = 0;
|
||||
list->size = 0;
|
||||
list->count = 0;
|
||||
@@ -141,40 +141,37 @@ void* AllocMemSafe(size_t size)
|
||||
return newblock->address;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deallocate memory from the global memory list.
|
||||
*/
|
||||
void FreeMemSafe(void* block)
|
||||
void RemoveMemSafe(void* block, bool deallocate)
|
||||
{
|
||||
struct MemoryBlock *current, *previous;
|
||||
|
||||
if (list == NULL || block == NULL)
|
||||
if (list == nullptr || block == nullptr)
|
||||
{
|
||||
dealloc_error("list", 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (block == NULL)
|
||||
if (block == nullptr)
|
||||
{
|
||||
dealloc_error("memory", 0);
|
||||
return;
|
||||
}
|
||||
|
||||
previous = NULL;
|
||||
previous = nullptr;
|
||||
current = list->first;
|
||||
while (current != NULL && current->address != block)
|
||||
while (current != nullptr && current->address != block)
|
||||
{
|
||||
previous = current;
|
||||
current = current->next;
|
||||
}
|
||||
|
||||
if (current == NULL)
|
||||
if (current == nullptr)
|
||||
{
|
||||
dealloc_error("address not found", block);
|
||||
return;
|
||||
}
|
||||
|
||||
if (previous == NULL)
|
||||
if (previous == nullptr)
|
||||
{
|
||||
list->first = current->next;
|
||||
}
|
||||
@@ -186,13 +183,34 @@ void FreeMemSafe(void* block)
|
||||
list->size -= current->size;
|
||||
list->count--;
|
||||
|
||||
FREE_MEM(current->address);
|
||||
current->address = NULL;
|
||||
current->next = NULL;
|
||||
if (deallocate)
|
||||
{
|
||||
FREE_MEM(current->address);
|
||||
}
|
||||
|
||||
current->address = nullptr;
|
||||
current->next = nullptr;
|
||||
current->size = 0;
|
||||
FREE_MEM(current);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deallocate memory from the global memory list.
|
||||
*/
|
||||
void FreeMemSafe(void* block)
|
||||
{
|
||||
RemoveMemSafe(block, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Detach an allocated memory from the global memory list.
|
||||
* @details The memory block is only detached, not deallocated.
|
||||
*/
|
||||
void DetachMemSafe(void* block)
|
||||
{
|
||||
RemoveMemSafe(block, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Deallocate all memory in the global memory list.
|
||||
*/
|
||||
@@ -200,13 +218,13 @@ void FreeAllSafe()
|
||||
{
|
||||
struct MemoryBlock *current, *next;
|
||||
|
||||
if (list == NULL)
|
||||
if (list == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
current = list->first;
|
||||
while (current != NULL)
|
||||
while (current != nullptr)
|
||||
{
|
||||
next = current->next;
|
||||
FREE_MEM(current->address);
|
||||
@@ -215,7 +233,7 @@ void FreeAllSafe()
|
||||
}
|
||||
|
||||
FREE_MEM(list);
|
||||
list = NULL;
|
||||
list = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
#endif
|
||||
|
||||
#ifdef AMIGA
|
||||
#if defined(AMIGA)
|
||||
#include <clib/exec_protos.h>
|
||||
#endif
|
||||
|
||||
@@ -84,7 +84,7 @@ void MemCopy(void* destination, const void* source, unsigned int length)
|
||||
if ((mem_ptr)dst < (mem_ptr)src)
|
||||
{
|
||||
// Copy forward
|
||||
#ifdef AMIGA // Take advantage of exec
|
||||
#if defined(AMIGA) // Take advantage of exec
|
||||
CopyMem((void*)source, destination, length);
|
||||
#else
|
||||
t = (mem_ptr)src; // only need low bits
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 1990, 1993 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -27,8 +27,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 1990, 1993 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -27,8 +27,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,8 +23,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,8 +23,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "amathc.h"
|
||||
|
||||
@@ -1,259 +0,0 @@
|
||||
CC = gcc
|
||||
CFLAGS = -std=c9x -O3 -DWITHTEST -I. -I.. -Wall
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
MKDIR = mkdir -p
|
||||
DEL = rm -f
|
||||
INSTALL = install -m 0644
|
||||
LDCONFIG = ldconfig
|
||||
PREFIX = /usr
|
||||
INSTDIR = ${DESTDIR}${PREFIX}/lib/amath
|
||||
INSTDIRI = ${DESTDIR}${PREFIX}/include/amath
|
||||
INSTDIRPC = ${DESTDIR}${PREFIX}/lib/pkgconfig
|
||||
INSTDIRM = ${DESTDIR}${PREFIX}/share/man/man3
|
||||
alib = libamathcplex.a
|
||||
solib = libamathcplex.so
|
||||
pkgconfig = amathi.pc
|
||||
manpage = amathi.3
|
||||
|
||||
all: static shared
|
||||
|
||||
static: ${alib}
|
||||
|
||||
shared: ${solib}
|
||||
|
||||
static/cacos.o: cacos.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cacos.c -o static/cacos.o
|
||||
|
||||
shared/cacos.o: cacos.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cacos.c -o shared/cacos.o
|
||||
|
||||
static/cacosh.o: cacosh.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cacosh.c -o static/cacosh.o
|
||||
|
||||
shared/cacosh.o: cacosh.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cacosh.c -o shared/cacosh.o
|
||||
|
||||
static/cacot.o: cacot.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cacot.c -o static/cacot.o
|
||||
|
||||
shared/cacot.o: cacot.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cacot.c -o shared/cacot.o
|
||||
|
||||
static/cacoth.o: cacoth.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cacoth.c -o static/cacoth.o
|
||||
|
||||
shared/cacoth.o: cacoth.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cacoth.c -o shared/cacoth.o
|
||||
|
||||
static/cacsc.o: cacsc.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cacsc.c -o static/cacsc.o
|
||||
|
||||
shared/cacsc.o: cacsc.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cacsc.c -o shared/cacsc.o
|
||||
|
||||
static/cacsch.o: cacsch.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cacsch.c -o static/cacsch.o
|
||||
|
||||
shared/cacsch.o: cacsch.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cacsch.c -o shared/cacsch.o
|
||||
|
||||
static/casec.o: casec.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c casec.c -o static/casec.o
|
||||
|
||||
shared/casec.o: casec.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c casec.c -o shared/casec.o
|
||||
|
||||
static/casech.o: casech.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c casech.c -o static/casech.o
|
||||
|
||||
shared/casech.o: casech.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c casech.c -o shared/casech.o
|
||||
|
||||
static/casin.o: casin.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c casin.c -o static/casin.o
|
||||
|
||||
shared/casin.o: casin.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c casin.c -o shared/casin.o
|
||||
|
||||
static/casinh.o: casinh.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c casinh.c -o static/casinh.o
|
||||
|
||||
shared/casinh.o: casinh.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c casinh.c -o shared/casinh.o
|
||||
|
||||
static/catan.o: catan.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c catan.c -o static/catan.o
|
||||
|
||||
shared/catan.o: catan.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c catan.c -o shared/catan.o
|
||||
|
||||
static/catanh.o: catanh.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c catanh.c -o static/catanh.o
|
||||
|
||||
shared/catanh.o: catanh.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c catanh.c -o shared/catanh.o
|
||||
|
||||
static/ccbrt.o: ccbrt.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ccbrt.c -o static/ccbrt.o
|
||||
|
||||
shared/ccbrt.o: ccbrt.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ccbrt.c -o shared/ccbrt.o
|
||||
|
||||
static/ccos.o: ccos.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ccos.c -o static/ccos.o
|
||||
|
||||
shared/ccos.o: ccos.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ccos.c -o shared/ccos.o
|
||||
|
||||
static/ccosh.o: ccosh.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ccosh.c -o static/ccosh.o
|
||||
|
||||
shared/ccosh.o: ccosh.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ccosh.c -o shared/ccosh.o
|
||||
|
||||
static/ccot.o: ccot.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ccot.c -o static/ccot.o
|
||||
|
||||
shared/ccot.o: ccot.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ccot.c -o shared/ccot.o
|
||||
|
||||
static/ccoth.o: ccoth.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ccoth.c -o static/ccoth.o
|
||||
|
||||
shared/ccoth.o: ccoth.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ccoth.c -o shared/ccoth.o
|
||||
|
||||
static/ccsc.o: ccsc.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ccsc.c -o static/ccsc.o
|
||||
|
||||
shared/ccsc.o: ccsc.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ccsc.c -o shared/ccsc.o
|
||||
|
||||
static/ccsch.o: ccsch.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ccsch.c -o static/ccsch.o
|
||||
|
||||
shared/ccsch.o: ccsch.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ccsch.c -o shared/ccsch.o
|
||||
|
||||
static/cexp.o: cexp.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cexp.c -o static/cexp.o
|
||||
|
||||
shared/cexp.o: cexp.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cexp.c -o shared/cexp.o
|
||||
|
||||
static/clog.o: clog.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c clog.c -o static/clog.o
|
||||
|
||||
shared/clog.o: clog.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c clog.c -o shared/clog.o
|
||||
|
||||
static/clog10.o: clog10.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c clog10.c -o static/clog10.o
|
||||
|
||||
shared/clog10.o: clog10.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c clog10.c -o shared/clog10.o
|
||||
|
||||
static/clogb.o: clogb.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c clogb.c -o static/clogb.o
|
||||
|
||||
shared/clogb.o: clogb.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c clogb.c -o shared/clogb.o
|
||||
|
||||
static/cpow.o: cpow.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c cpow.c -o static/cpow.o
|
||||
|
||||
shared/cpow.o: cpow.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c cpow.c -o shared/cpow.o
|
||||
|
||||
static/csec.o: csec.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c csec.c -o static/csec.o
|
||||
|
||||
shared/csec.o: csec.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c csec.c -o shared/csec.o
|
||||
|
||||
static/csech.o: csech.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c csech.c -o static/csech.o
|
||||
|
||||
shared/csech.o: csech.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c csech.c -o shared/csech.o
|
||||
|
||||
static/csgn.o: csgn.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c csgn.c -o static/csgn.o
|
||||
|
||||
shared/csgn.o: csgn.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c csgn.c -o shared/csgn.o
|
||||
|
||||
static/csin.o: csin.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c csin.c -o static/csin.o
|
||||
|
||||
shared/csin.o: csin.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c csin.c -o shared/csin.o
|
||||
|
||||
static/csinh.o: csinh.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c csinh.c -o static/csinh.o
|
||||
|
||||
shared/csinh.o: csinh.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c csinh.c -o shared/csinh.o
|
||||
|
||||
static/csqrt.o: csqrt.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c csqrt.c -o static/csqrt.o
|
||||
|
||||
shared/csqrt.o: csqrt.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c csqrt.c -o shared/csqrt.o
|
||||
|
||||
static/ctan.o: ctan.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ctan.c -o static/ctan.o
|
||||
|
||||
shared/ctan.o: ctan.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ctan.c -o shared/ctan.o
|
||||
|
||||
static/ctanh.o: ctanh.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c ctanh.c -o static/ctanh.o
|
||||
|
||||
shared/ctanh.o: ctanh.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c ctanh.c -o shared/ctanh.o
|
||||
|
||||
static/prim.o: prim.c
|
||||
${CC} ${CFLAGS} -fno-builtin -c prim.c -o static/prim.o
|
||||
|
||||
shared/prim.o: prim.c
|
||||
${CC} ${CFLAGS} -fPIC -fno-builtin -c prim.c -o shared/prim.o
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
${MKDIR} static
|
||||
${MKDIR} shared
|
||||
|
||||
${solib}: build shared/cacos.o shared/cacosh.o shared/cacot.o shared/cacoth.o shared/cacsc.o shared/cacsch.o shared/casec.o shared/casech.o shared/casin.o shared/casinh.o shared/catan.o shared/catanh.o shared/ccbrt.o shared/ccos.o shared/ccosh.o shared/ccot.o shared/ccoth.o shared/ccsc.o shared/ccsch.o shared/cexp.o shared/clog.o shared/clog10.o shared/clogb.o shared/cpow.o shared/csec.o shared/csech.o shared/csgn.o shared/csin.o shared/csinh.o shared/csqrt.o shared/ctan.o shared/ctanh.o shared/prim.o
|
||||
${CC} ${CFLAGS} -shared -s -fPIC -Wl,-soname,${solib}.1.7.0 -o ${solib} shared/cacos.o shared/cacosh.o shared/cacot.o shared/cacoth.o shared/cacsc.o shared/cacsch.o shared/casec.o shared/casech.o shared/casin.o shared/casinh.o shared/catan.o shared/catanh.o shared/ccbrt.o shared/ccos.o shared/ccosh.o shared/ccot.o shared/ccoth.o shared/ccsc.o shared/ccsch.o shared/cexp.o shared/clog.o shared/clog10.o shared/clogb.o shared/cpow.o shared/csec.o shared/csech.o shared/csgn.o shared/csin.o shared/csinh.o shared/csqrt.o shared/ctan.o shared/ctanh.o shared/prim.o
|
||||
|
||||
${alib}: build static/cacos.o static/cacosh.o static/cacot.o static/cacoth.o static/cacsc.o static/cacsch.o static/casec.o static/casech.o static/casin.o static/casinh.o static/catan.o static/catanh.o static/ccbrt.o static/ccos.o static/ccosh.o static/ccot.o static/ccoth.o static/ccsc.o static/ccsch.o static/cexp.o static/clog.o static/clog10.o static/clogb.o static/cpow.o static/csec.o static/csech.o static/csgn.o static/csin.o static/csinh.o static/csqrt.o static/ctan.o static/ctanh.o static/prim.o
|
||||
${AR} rcs static/${alib} static/cacos.o static/cacosh.o static/cacot.o static/cacoth.o static/cacsc.o static/cacsch.o static/casec.o static/casech.o static/casin.o static/casinh.o static/catan.o static/catanh.o static/ccbrt.o static/ccos.o static/ccosh.o static/ccot.o static/ccoth.o static/ccsc.o static/ccsch.o static/cexp.o static/clog.o static/clog10.o static/clogb.o static/cpow.o static/csec.o static/csech.o static/csgn.o static/csin.o static/csinh.o static/csqrt.o static/ctan.o static/ctanh.o static/prim.o
|
||||
${RANLIB} static/${alib}
|
||||
|
||||
.PHONY: install
|
||||
install: ${alib} ${solib}
|
||||
${MKDIR} ${INSTDIR}
|
||||
${MKDIR} ${INSTDIRPC}
|
||||
${MKDIR} ${INSTDIRI}
|
||||
${INSTALL} static/${alib} ${INSTDIR}/${alib}
|
||||
${INSTALL} ${solib} ${INSTDIR}/${solib}
|
||||
${INSTALL} ${pkgconfig} ${INSTDIRPC}/${pkgconfig}
|
||||
${INSTALL} ${manpage} ${INSTDIRM}/${manpage}
|
||||
${INSTALL} ../complex.h ${INSTDIRI}/amathi.h
|
||||
${LDCONFIG} ${INSTDIR}
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
${DEL} ${INSTDIR}/${alib}
|
||||
${DEL} ${INSTDIR}/${solib}
|
||||
${DEL} ${INSTDIRPC}/${pkgconfig}
|
||||
${DEL} ${INSTDIRM}/${manpage}
|
||||
${DEL} ${INSTDIRPC}/amathi.pc
|
||||
${DEL} ${INSTDIRI}/amathi.h
|
||||
${LDCONFIG}
|
||||
|
||||
clean:
|
||||
${DEL} static/${alib} ${solib} static/cacos.o static/cacosh.o static/cacot.o static/cacoth.o static/cacsc.o static/cacsch.o static/casec.o static/casech.o static/casin.o static/casinh.o static/catan.o static/catanh.o static/ccbrt.o static/ccos.o static/ccosh.o static/ccot.o static/ccoth.o static/ccsc.o static/ccsch.o static/cexp.o static/clog.o static/clog10.o static/clogb.o static/cpow.o static/csec.o static/csech.o static/csgn.o static/csin.o static/csinh.o static/csqrt.o static/ctan.o static/ctanh.o static/prim.o shared/cacos.o shared/cacosh.o shared/cacot.o shared/cacoth.o shared/cacsc.o shared/cacsch.o shared/casec.o shared/casech.o shared/casin.o shared/casinh.o shared/catan.o shared/catanh.o shared/ccbrt.o shared/ccos.o shared/ccosh.o shared/ccot.o shared/ccoth.o shared/ccsc.o shared/ccsch.o shared/cexp.o shared/clog.o shared/clog10.o shared/clogb.o shared/cpow.o shared/csec.o shared/csech.o shared/csgn.o shared/csin.o shared/csinh.o shared/csqrt.o shared/ctan.o shared/ctanh.o shared/prim.o
|
||||
|
||||
+886
-991
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,154 @@
|
||||
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "amathi"
|
||||
PROJECT_NUMBER = "1.9.0"
|
||||
PROJECT_BRIEF = "Complex numbers math library"
|
||||
PROJECT_LOGO =
|
||||
OUTPUT_DIRECTORY =
|
||||
CREATE_SUBDIRS = NO
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 4
|
||||
ALIASES =
|
||||
TCL_SUBST =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
EXTENSION_MAPPING = C
|
||||
MARKDOWN_SUPPORT = YES
|
||||
AUTOLINK_SUPPORT = YES
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
CPP_CLI_SUPPORT = NO
|
||||
SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
GROUP_NESTED_COMPOUNDS = NO
|
||||
SUBGROUPING = YES
|
||||
INLINE_GROUPED_CLASSES = NO
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
TYPEDEF_HIDES_STRUCT = NO
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_PACKAGE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
SHOW_GROUPED_MEMB_INC = NO
|
||||
FORCE_LOCAL_INCLUDES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_MEMBERS_CTORS_1ST = NO
|
||||
SORT_GROUP_NAMES = NO
|
||||
SORT_BY_SCOPE_NAME = YES
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
GENERATE_TODOLIST = NO
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
CITE_BIB_FILES =
|
||||
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE = doxygen.warn
|
||||
|
||||
INPUT = ../mathi.h .
|
||||
INPUT_ENCODING = UTF-8
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = NO
|
||||
EXCLUDE = amathi.dox
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
USE_MDFILE_AS_MAINPAGE = NO
|
||||
|
||||
SOURCE_BROWSER = YES
|
||||
INLINE_SOURCES = YES
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
REFERENCES_LINK_SOURCE = NO
|
||||
SOURCE_TOOLTIPS = YES
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = YES
|
||||
CLANG_ASSISTED_PARSING = YES
|
||||
CLANG_OPTIONS =
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
|
||||
GENERATE_MAN = YES
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_SUBDIR =
|
||||
MAN_LINKS = NO
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = UNIX
|
||||
EXPAND_AS_DEFINED = YES
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
GENERATE_HTML = NO
|
||||
GENERATE_LATEX = NO
|
||||
GENERATE_RTF = NO
|
||||
GENERATE_XML = NO
|
||||
GENERATE_DOCBOOK = NO
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
GENERATE_PERLMOD = NO
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = NO
|
||||
EXTERNAL_PAGES = NO
|
||||
CLASS_DIAGRAMS = NO
|
||||
+2
-2
@@ -4,7 +4,7 @@ includedir=${prefix}/include/amath
|
||||
libdir=${exec_prefix}/lib
|
||||
|
||||
Name: amath complex library
|
||||
Description: Functions for handling complex numbers
|
||||
Version: 1.7.0
|
||||
Description: Complex numbers math library
|
||||
Version: 1.9.0
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lamathi
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>15.0</VCProjectVersion>
|
||||
<ProjectGuid>{278A3E34-C1F0-4176-AA98-6D8CD4F16438}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)..</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="cacos.c" />
|
||||
<ClCompile Include="cacosh.c" />
|
||||
<ClCompile Include="cacot.c" />
|
||||
<ClCompile Include="cacoth.c" />
|
||||
<ClCompile Include="cacsc.c" />
|
||||
<ClCompile Include="cacsch.c" />
|
||||
<ClCompile Include="casec.c" />
|
||||
<ClCompile Include="casech.c" />
|
||||
<ClCompile Include="casin.c" />
|
||||
<ClCompile Include="casinh.c" />
|
||||
<ClCompile Include="catan.c" />
|
||||
<ClCompile Include="catanh.c" />
|
||||
<ClCompile Include="ccbrt.c" />
|
||||
<ClCompile Include="ccos.c" />
|
||||
<ClCompile Include="ccosh.c" />
|
||||
<ClCompile Include="ccot.c" />
|
||||
<ClCompile Include="ccoth.c" />
|
||||
<ClCompile Include="ccsc.c" />
|
||||
<ClCompile Include="ccsch.c" />
|
||||
<ClCompile Include="cexp.c" />
|
||||
<ClCompile Include="clog.c" />
|
||||
<ClCompile Include="clog10.c" />
|
||||
<ClCompile Include="clogb.c" />
|
||||
<ClCompile Include="cpow.c" />
|
||||
<ClCompile Include="csec.c" />
|
||||
<ClCompile Include="csech.c" />
|
||||
<ClCompile Include="csgn.c" />
|
||||
<ClCompile Include="csin.c" />
|
||||
<ClCompile Include="csinh.c" />
|
||||
<ClCompile Include="csqrt.c" />
|
||||
<ClCompile Include="ctan.c" />
|
||||
<ClCompile Include="ctanh.c" />
|
||||
<ClCompile Include="prim.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="prim.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="casech.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="casin.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ccsc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ctan.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="clog10.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ccot.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cacos.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ccoth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="catanh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="prim.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cexp.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="csinh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ccos.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cacoth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cacsch.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="clogb.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="casec.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="csqrt.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="csech.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ccbrt.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ctanh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="clog.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cacsc.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cpow.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ccosh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cacosh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="csgn.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="casinh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="csin.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="csec.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="catan.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="cacot.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ccsch.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="prim.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse cosine of complex number
|
||||
* @version 1.0
|
||||
* @date 14/09/15
|
||||
* @brief Inverse cosine of complex number
|
||||
* @details
|
||||
* Inverse cosine expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse hyperbolic cosine of complex number
|
||||
* @version 1.1
|
||||
* @date 15/03/03
|
||||
* @brief Inverse hyperbolic cosine of complex number
|
||||
* @details
|
||||
* Inverse hyperbolic cosine expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse cotangent of complex number
|
||||
* @version 1.1
|
||||
* @date 14/10/01
|
||||
* @brief Inverse cotangent of complex number
|
||||
* @details
|
||||
* Inverse cotangent expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse hyperbolic cotangent of complex number
|
||||
* @version 1.0
|
||||
* @date 14/09/15
|
||||
* @brief Inverse hyperbolic cotangent of complex number
|
||||
* @details
|
||||
* Inverse hyperbolic cotangent expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse cosecant of complex number
|
||||
* @version 1.1
|
||||
* @date 14/10/01
|
||||
* @brief Inverse cosecant of complex number
|
||||
* @details
|
||||
* Inverse cosecant expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse hyperbolic cosecant of complex number
|
||||
* @version 1.0
|
||||
* @date 14/09/15
|
||||
* @brief Inverse hyperbolic cosecant of complex number
|
||||
* @details
|
||||
* Inverse hyperbolic cosecant expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+3
-7
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse secant expressed using complex logarithms:
|
||||
* @version 1.1
|
||||
* @date 14/10/01
|
||||
* @details
|
||||
* Inverse secant expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-9
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,23 +23,18 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse hyperbolic secant of complex numbers
|
||||
* @version 1.1
|
||||
* @date 15/03/03
|
||||
* @brief Inverse hyperbolic secant of complex numbers
|
||||
* @details
|
||||
* Inverse hyperbolic secant expressed using complex logarithms:
|
||||
* <pre>
|
||||
* asech(z) = log(sqrt(1 / (z * z) - 1) + 1/z)
|
||||
*
|
||||
* </pre>
|
||||
* More info is available at Wikipedia: <BR>
|
||||
* https://wikipedia.org/wiki/Inverse_hyperbolic_function#Logarithmic_representation
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse sine of complex number
|
||||
* @version 1.1
|
||||
* @date 14/10/01
|
||||
* @brief Inverse sine of complex number
|
||||
* @details
|
||||
* Inverse sine expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+5
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse hyperbolic sine of complex number
|
||||
* @version 1.0
|
||||
* @date 14/09/15
|
||||
* @brief Inverse hyperbolic sine of complex number
|
||||
* @details
|
||||
* Inverse hyperbolic sine expressed using complex logarithms:
|
||||
* <pre>
|
||||
@@ -50,6 +46,7 @@
|
||||
*/
|
||||
complex casinh(complex z)
|
||||
{
|
||||
// TODO: Fix branch cuts
|
||||
complex one = cpack(1.0, 0.0);
|
||||
complex a = cadd(cmul(z, z), one);
|
||||
complex b = cadd(z, csqrt(a));
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse tangent of complex number
|
||||
* @version 1.1
|
||||
* @date 14/10/01
|
||||
* @brief Inverse tangent of complex number
|
||||
* @details
|
||||
* Inverse tangent expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,18 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Inverse hyperbolic tangent of complex number
|
||||
* @version 1.0
|
||||
* @date 14/09/15
|
||||
* @brief Inverse hyperbolic tangent of complex number
|
||||
* @details
|
||||
* Inverse hyperbolic tangent expressed using complex logarithms:
|
||||
* <pre>
|
||||
|
||||
+4
-6
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,16 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Cube root of complex number
|
||||
* @brief Cube root of complex number
|
||||
* @details
|
||||
* <pre>
|
||||
* cbrt z = exp(1/3 * log(z))
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -27,18 +27,14 @@
|
||||
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ccos.c?rev=1.1
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Cosine of complex number
|
||||
* @version 1.1
|
||||
* @date 2007/08/20
|
||||
* @brief Cosine of complex number
|
||||
* @details
|
||||
* <pre>
|
||||
* a+bi
|
||||
|
||||
+4
-8
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -30,18 +30,14 @@
|
||||
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ccosh.c?rev=1.1
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Hyperbolic cosine of a complex number
|
||||
* @version 1.1
|
||||
* @date 2007/08/20
|
||||
* @brief Hyperbolic cosine of a complex number
|
||||
* @details
|
||||
* <pre>
|
||||
* a+bi
|
||||
|
||||
+5
-7
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,16 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Cotangent of a complex number
|
||||
* @brief Cotangent of a complex number
|
||||
* @details
|
||||
* Calculated as in Open Office:
|
||||
* <pre>
|
||||
@@ -59,7 +57,7 @@ complex ccot(complex z)
|
||||
|
||||
if (d == 0.0)
|
||||
{
|
||||
w = cpack(D_INFP, D_INFP);
|
||||
w = cpack((double)INFP, (double)INFP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+4
-6
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,16 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Hyperbolic cotangent of a complex number
|
||||
* @brief Hyperbolic cotangent of a complex number
|
||||
* @details
|
||||
* <pre>
|
||||
* acoth(z) = 0.5 * (log(1 + 1/z) - log(1 - 1/z))
|
||||
|
||||
+5
-7
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,16 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Cosecant of a complex number
|
||||
* @brief Cosecant of a complex number
|
||||
* @details
|
||||
* Calculated as in Open Office:
|
||||
* <pre>
|
||||
@@ -59,7 +57,7 @@ complex ccsc(complex z)
|
||||
|
||||
if (d == 0.0)
|
||||
{
|
||||
w = cpack(D_INFP, D_INFP);
|
||||
w = cpack((double)INFP, (double)INFP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+4
-6
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,16 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Hyperbolic secant of a complex number
|
||||
* @brief Hyperbolic secant of a complex number
|
||||
* @details
|
||||
* Calculated as in Open Office:
|
||||
* <pre>
|
||||
|
||||
+4
-9
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -30,19 +30,14 @@
|
||||
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cexp.c?rev=1.1
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Returns e to the power of a complex number
|
||||
* @version 1.1
|
||||
* @date 2007/08/20
|
||||
* @details
|
||||
* @brief Returns e to the power of a complex number
|
||||
*/
|
||||
complex cexp(complex z)
|
||||
{
|
||||
|
||||
+4
-9
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -30,19 +30,14 @@
|
||||
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/clog.c?rev=1.1
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Natural logarithm of a complex number
|
||||
* @version 1.1
|
||||
* @date 2007/08/20
|
||||
* @details
|
||||
* @brief Natural logarithm of a complex number
|
||||
*/
|
||||
complex clog(complex z)
|
||||
{
|
||||
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,15 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Base 10 logarithmic value of complex number.
|
||||
* @brief Base 10 logarithmic value of complex number
|
||||
* @details
|
||||
* <pre>
|
||||
* log z = log(z) / log(10)
|
||||
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -23,15 +23,14 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Base 2 logarithmic value of complex number.
|
||||
* @brief Base 2 logarithmic value of complex number
|
||||
* @details
|
||||
* <pre>
|
||||
* lb z = log(z) / log(2)
|
||||
|
||||
+4
-9
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -30,19 +30,14 @@
|
||||
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cpow.c?rev=1.1
|
||||
*
|
||||
* Project homepage:
|
||||
* http://amath.innolan.net
|
||||
*
|
||||
* https://amath.innolan.net
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prim.h"
|
||||
#include "math.h"
|
||||
#include "complex.h"
|
||||
|
||||
/**
|
||||
* @brief Complex number raised to a power
|
||||
* @version 1.1
|
||||
* @date 2007/08/20
|
||||
* @details
|
||||
* @brief Complex number raised to a power
|
||||
*/
|
||||
complex cpow(complex a, complex z)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user