Compare commits

...

276 Commits

Author SHA1 Message Date
Carsten Sonne Larsen 811644f4c7 Zero out allocated memory 2021-01-30 17:42:13 +01:00
Carsten Sonne Larsen d7fe11d56a Take advantage of memory pools 2021-01-30 17:00:55 +01:00
Carsten Sonne Larsen d7add409cd Identify systems more uniquely 2021-01-17 11:13:42 +01:00
Carsten Sonne Larsen d910b98571 Cleanup and avoid OS conflicts (REQ #3) 2021-01-15 15:56:07 +01:00
Carsten Sonne Larsen ea2bf72d7b MorphOS compatibility (REQ #4) 2021-01-15 15:49:26 +01:00
Carsten Sonne Larsen e788fec496 ARexx only instance 2021-01-15 00:21:28 +01:00
Carsten Sonne Larsen ffa586c694 Allow to quit console with CTRL + C 2021-01-15 00:20:47 +01:00
Carsten Sonne Larsen 0240d3a439 Only show result when using ARexx 2021-01-15 00:01:10 +01:00
Carsten Sonne Larsen 93c8fdbef4 To ensure compatibility, set fraction point to full stop / period 2021-01-14 23:51:15 +01:00
Carsten Sonne Larsen dd7884bc22 Cleanup after building catalogs 2021-01-12 15:03:13 +01:00
Carsten Sonne Larsen 65fafb750f Improved install script 2021-01-12 14:31:35 +01:00
Carsten Sonne Larsen 2164e79aef Distribution files 2021-01-12 14:30:49 +01:00
Carsten Sonne Larsen 87c65aa678 Include Debian build in source 2021-01-11 22:30:56 +01:00
Carsten Sonne Larsen 2c9e8bece3 Update copyright text 2021-01-11 22:30:27 +01:00
Carsten Sonne Larsen ee26a57960 Release 1.9.0 2021-01-11 21:10:34 +01:00
Carsten Sonne Larsen 538ad4ac23 ARexx test script 2021-01-11 21:01:49 +01:00
Carsten Sonne Larsen 524f83f22f Cleanup Amiga specific code 2021-01-11 20:59:15 +01:00
Carsten Sonne Larsen 9e712377a4 Update copyright 2021-01-11 20:37:42 +01:00
Carsten Sonne Larsen 6eb56b056e ARexx support 2021-01-11 20:33:26 +01:00
Carsten Sonne Larsen 3a52c27a9c new AppendNumber method 2021-01-11 20:32:07 +01:00
Carsten Larsen f8cf191a46 Fix PowerPC build 2018-10-31 20:40:07 +01:00
Carsten Sonne Larsen aeb7f2e92c Detect system name 2018-08-12 23:22:44 +02:00
Carsten Sonne Larsen 49b36ce2a3 Remove search option 2018-08-12 23:22:14 +02:00
Carsten Sonne Larsen f7de7b1447 Update links 2018-08-12 23:21:37 +02:00
Carsten Sonne Larsen d4ad72d17f Fix wrong year 2018-08-07 20:32:26 +02:00
Carsten Sonne Larsen 8632644b9d Update to version 1.8.5 2018-08-07 19:54:19 +02:00
Carsten Sonne Larsen 9c70be649b Fix build on compilers with broken endian detection 2018-08-07 19:51:28 +02:00
Carsten Sonne Larsen fb19bb560d Fix GCC 7 warnings 2018-08-07 19:46:15 +02:00
Carsten Sonne Larsen 527376a92a Merge branch 'master' of https://gitlab.com/rnger/amath 2018-08-05 22:42:43 +02:00
Carsten Sonne Larsen 3ab6729951 Update version and help text 2018-08-05 22:38:42 +02:00
Carsten Sonne Larsen 9153e78be8 Ignore zip files 2018-08-05 22:33:07 +02:00
Carsten Sonne Larsen 434d4a72e2 Fix typecast warning 2018-08-05 22:30:44 +02:00
Carsten Sonne Larsen be4b1e7fd6 Update test target 2018-08-05 21:49:00 +02:00
Carsten Sonne Larsen 7a3cb4a2a1 Update to version 1.8.4 2018-08-05 21:46:30 +02:00
Carsten Sonne Larsen b3d4d61e9d Support Visual Studio Code 2018-08-05 21:45:38 +02:00
Carsten Sonne Larsen 4c6ae02156 Ignore casing in hexadecimal numbers 2018-08-05 21:44:15 +02:00
Carsten Sonne Larsen 2a7b341c71 Support GCC 7 & C++11 2018-08-05 21:41:11 +02:00
Carsten Sonne Larsen 1f5cbf5176 Ignore flexcat 2018-08-04 20:45:33 +02:00
Carsten Sonne Larsen 8503f61eea Updated Copyright headers 2018-08-04 20:44:35 +02:00
Carsten Sonne Larsen 970ae6456f Merge branch 'master' of https://gitlab.com/rnger/amath 2017-10-14 09:24:55 +02:00
Carsten Sonne Larsen 56d9566000 rebase and change commit email to cs@innolan.net 2017-10-14 09:21:56 +02:00
Carsten Sonne Larsen 16530a94d1 Merge branch 'master' of https://gitlab.com/rnger/amath 2017-10-14 08:56:34 +02:00
Carsten Sonne Larsen 2e54fed094 Update headers 2017-08-03 22:03:35 +02:00
Carsten Sonne Larsen 882eb43a4f Update headers 2017-08-03 22:03:35 +02:00
Carsten Sonne Larsen f7881bb3c9 Update script 2017-08-03 22:03:20 +02:00
Carsten Sonne Larsen 7114efc1cc Update script 2017-08-03 22:03:20 +02:00
Carsten Sonne Larsen 350a8d82b9 Add debian build script 2017-08-03 21:25:17 +02:00
Carsten Sonne Larsen e64c56123d Add debian build script 2017-08-03 21:25:17 +02:00
Carsten Sonne Larsen 208a87640d Release 1.8.3 2017-07-21 22:41:58 +02:00
Carsten Sonne Larsen 2cdc5b8aae Release 1.8.3 2017-07-21 22:41:58 +02:00
Carsten Sonne Larsen 73d97e3229 Add more CC BY-SA texts 2017-07-21 22:38:58 +02:00
Carsten Sonne Larsen b76a2dccc5 Add more CC BY-SA texts 2017-07-21 22:38:58 +02:00
Carsten Sonne Larsen 08f5d5d870 Cleanup man page 2017-07-21 22:36:04 +02:00
Carsten Sonne Larsen 656038d482 Cleanup man page 2017-07-21 22:36:04 +02:00
Carsten Larsen 8bf9f941ed Cleanup help texts 2017-07-21 01:25:08 +02:00
Carsten Larsen c625ec29f7 Cleanup help texts 2017-07-21 01:25:08 +02:00
Carsten Larsen e5e70b5247 Include less common abbreviations 2017-07-17 00:29:31 +02:00
Carsten Larsen 4aae661801 Include less common abbreviations 2017-07-17 00:29:31 +02:00
Carsten Larsen a6d28448f6 Add known bugs 2017-07-16 23:07:14 +02:00
Carsten Larsen 3f75c41166 Add known bugs 2017-07-16 23:07:14 +02:00
Carsten Larsen 60df83a113 ANSI mode is alway changeable as default 2017-07-16 22:52:52 +02:00
Carsten Larsen 51e6ece52d ANSI mode is alway changeable as default 2017-07-16 22:52:52 +02:00
Carsten Larsen b4f29dc2de Stress with explicit in clang option 2017-07-16 22:49:27 +02:00
Carsten Larsen 1a2ef9b018 Stress with explicit in clang option 2017-07-16 22:49:27 +02:00
Carsten Larsen 1eaf09fa56 Cleanup history 2017-07-14 13:57:32 +02:00
Carsten Larsen 012c0ee1a6 Cleanup history 2017-07-14 13:57:32 +02:00
Carsten Larsen 59d69ac760 Fix build error in shared clib 2017-07-14 13:54:39 +02:00
Carsten Larsen f78304c8e1 Fix build error in shared clib 2017-07-14 13:54:39 +02:00
Carsten Larsen 5b6b5cc745 Allow man-dir and doc-dir while configuring 2017-07-14 13:54:07 +02:00
Carsten Larsen 9e2d708eb7 Allow man-dir and doc-dir while configuring 2017-07-14 13:54:07 +02:00
Carsten Larsen d34de7e7b5 Release 1.8.2 2017-07-14 12:10:13 +02:00
Carsten Larsen 36fd6e090d Release 1.8.2 2017-07-14 12:10:13 +02:00
Carsten Larsen f06a9a3421 Update project homepage 2017-07-14 11:30:24 +02:00
Carsten Larsen 49b6ecd09d Update project homepage 2017-07-14 11:30:24 +02:00
Carsten Larsen 140e74f3ce Improve endianness detection 2017-07-14 10:53:37 +02:00
Carsten Larsen 4b44d05953 Improve endianness detection 2017-07-14 10:53:37 +02:00
Carsten Larsen f067ba8f80 Update release date 2017-04-22 00:56:52 +02:00
Carsten Larsen 263636bb04 Update release date 2017-04-22 00:56:52 +02:00
Carsten Larsen 683a382359 Hint GCC6 2017-04-22 00:55:06 +02:00
Carsten Larsen 70c6ae9579 Hint GCC6 2017-04-22 00:55:06 +02:00
Carsten Larsen 13141f8fd6 Update changelog 2017-04-22 00:54:47 +02:00
Carsten Larsen 4085981ca7 Update changelog 2017-04-22 00:54:47 +02:00
Carsten Larsen 484133b293 Update release date 2017-04-22 00:54:26 +02:00
Carsten Larsen 69377b26ed Update release date 2017-04-22 00:54:26 +02:00
Carsten Larsen 2f5a7f1a8e Improved configuration 2017-04-22 00:53:41 +02:00
Carsten Larsen 7431e61c3c Improved configuration 2017-04-22 00:53:41 +02:00
Carsten Larsen d723292cc7 Fix haiku bug 2017-04-22 00:52:57 +02:00
Carsten Larsen e73cce1894 Fix haiku bug 2017-04-22 00:52:57 +02:00
Carsten Larsen f480dc1a19 Fix clear statement 2017-04-15 22:33:46 +02:00
Carsten Larsen 2a00f9556d Fix clear statement 2017-04-15 22:33:46 +02:00
Carsten Larsen 78f598d49b Option for Position Independent Code 2017-04-15 22:32:42 +02:00
Carsten Larsen a1b521840a Option for Position Independent Code 2017-04-15 22:32:42 +02:00
Carsten Larsen 6cf752a257 Bumped version 2017-04-15 20:43:33 +02:00
Carsten Larsen 30a23a4e0f Bumped version 2017-04-15 20:43:33 +02:00
Carsten Larsen 3374eebd4d Cleanup defines 2017-04-15 20:36:40 +02:00
Carsten Larsen 258188d994 Cleanup defines 2017-04-15 20:36:40 +02:00
Carsten Larsen bf39a0c868 Release 1.8.0 2017-04-13 00:50:51 +02:00
Carsten Larsen 0118d94326 Fix wrong version number 2017-03-24 20:23:58 +01:00
Carsten Larsen f3dd6d8baa Release 1.7.1 2017-03-24 20:09:05 +01:00
Carsten Larsen a301c85e15 Release 1.7.0 2017-03-11 23:37:45 +01:00
Carsten Larsen 87f0d88b26 Fix Makefiles 2017-02-27 23:33:54 +01:00
Carsten Larsen dd6e11cdb4 Prerelease 1.7.0 2017-02-27 23:31:21 +01:00
Carsten Larsen 9144b77c70 Prerelease 1.7.0 2017-02-27 23:23:06 +01:00
Carsten Larsen e7b46a06be Improved tests 2017-02-13 21:07:06 +01:00
Carsten Larsen 8c1a88ebe7 Cleanup debug code 2017-02-13 21:02:55 +01:00
Carsten Larsen 217d70e23a Fix file permissions 2017-02-11 12:00:51 +01:00
Carsten Larsen 28c1559ed0 Fix typo 2017-02-10 23:09:43 +01:00
Carsten Larsen dc26550dd5 Remove old build defs 2017-02-10 23:00:01 +01:00
Carsten Larsen 397c6c37c9 Include test and install target 2017-02-10 22:49:49 +01:00
Carsten Larsen dadd23aea8 Take advantage of exec 2017-02-10 22:29:49 +01:00
Carsten Larsen 34c843f2b5 Fix build definitions 2017-02-10 22:29:19 +01:00
Carsten Larsen 3483dd5283 Correct Debian version 2017-02-04 19:39:00 +01:00
Carsten Larsen 667fe2baeb Release 1.6.4 2017-02-04 15:58:49 +01:00
Carsten Larsen 88301bafc5 Fix MSVC++ memory allocation 2017-02-04 15:35:32 +01:00
Carsten Larsen b896dab8a8 Update Makefile 2017-02-04 14:41:54 +01:00
Carsten Larsen 818df0fc87 Fix 64 bit warnings 2017-02-04 14:41:34 +01:00
Carsten Larsen d148be57b3 Remove old binaries 2017-02-04 14:40:54 +01:00
Carsten Larsen e988bbbd9f Fix 64 bit alignment errors 2017-02-04 12:55:27 +01:00
Carsten Larsen af7bf8a97a Fixed truncation bug 2017-02-04 12:52:26 +01:00
Carsten Larsen a56173487f Release 1.6.3 2017-02-03 19:31:26 +01:00
Carsten Larsen 62f29f1e0e Update change list 2017-02-02 23:04:18 +01:00
Carsten Larsen aec499543d Fix Debian version number 2017-02-02 22:59:35 +01:00
Carsten Larsen e10734c005 Haiku support 2017-02-02 22:58:07 +01:00
Carsten Larsen abd4bb8929 Cleanup tests 2017-02-02 22:57:26 +01:00
Carsten Larsen eb1d7f74e4 Add NetBSD link 2017-02-02 22:56:51 +01:00
Carsten Larsen bd4baa277f Cleanup headers 2017-02-02 22:56:33 +01:00
Carsten Larsen 3f94ebc6b0 Fix Debian build 2017-02-02 22:53:00 +01:00
Carsten Larsen 11b4bdc70d Detect endianness for more CPUs 2017-02-02 22:52:10 +01:00
Carsten Larsen 83760eb15a Test fraction point character 2017-01-29 14:53:14 +01:00
Carsten Larsen 57e74e12b0 Debian multiarch support 2017-01-29 14:09:58 +01:00
Carsten Larsen 1551700ec1 Debian build script 2017-01-29 13:42:31 +01:00
Carsten Larsen 81ba8a83e2 Extend tests 2017-01-29 01:00:29 +01:00
Carsten Larsen 5c041e7762 Update documentation 2017-01-29 00:59:55 +01:00
Carsten Larsen dc5d092c4e Move documentation to own repository 2017-01-28 22:36:21 +01:00
Carsten Larsen 7a63687d4b Prepare release 1.6.3 2017-01-28 22:30:57 +01:00
Carsten Larsen 86d5a56fa7 Update scan-build report 2017-01-28 22:14:35 +01:00
Carsten Larsen 848b9f1987 Improve error handling 2017-01-28 22:04:35 +01:00
Carsten Larsen 8b81543eed Optimize for 64 bit PowerPC 2017-01-28 22:03:36 +01:00
Carsten Larsen 2bbebe575f Fix typo 2017-01-28 22:02:52 +01:00
Carsten Larsen 7d48450bbf Fix error in fraction point parsing 2017-01-28 22:02:01 +01:00
Carsten Larsen b173f42b65 64 bit PowerPC detection 2017-01-28 19:08:44 +01:00
Carsten Larsen 637b9396d9 Fix AROS build errors 2017-01-28 19:06:45 +01:00
Carsten Larsen 3776c6e02e Update documentation 2017-01-25 21:01:17 +01:00
Carsten Larsen c53ef12905 Add Icaros Desktop top distributions 2017-01-25 20:36:34 +01:00
Carsten Larsen b3ac61bae3 Documentation cleanup 2017-01-25 20:35:25 +01:00
Carsten Larsen d134ad9765 Documentation cleanup 2017-01-25 20:34:54 +01:00
Carsten Larsen 9e2c66af53 Update documentation 2017-01-24 22:03:15 +01:00
Carsten Larsen 1392de9ad7 Windows 1.6.2 binaries 2017-01-24 22:00:11 +01:00
Carsten Larsen 7e218a1b70 Update to version 1.6.2 2017-01-24 20:55:35 +01:00
Carsten Larsen 4c25f8d2fb Native character input 2017-01-24 20:48:02 +01:00
Carsten Larsen 543f813251 Update build definitions 2017-01-24 20:46:46 +01:00
Carsten Larsen bdae119905 Update version texts 2017-01-24 20:40:35 +01:00
Carsten Larsen a16a3b7419 Simplify memory allocation 2017-01-24 20:39:55 +01:00
Carsten Larsen 9ebb77637f Update documentation 2017-01-22 18:21:56 +01:00
Carsten Larsen 95057d82db Fix newline in Windows test 2017-01-22 01:18:14 +01:00
Carsten Larsen 75c588f51b 64 bit Windows support 2017-01-22 01:14:01 +01:00
Carsten Larsen 462ea4ceba 64 bit support on Windows 2017-01-22 00:51:35 +01:00
Carsten Larsen 672712ab49 Cleanup Visual Studio structure 2017-01-22 00:51:01 +01:00
Carsten Larsen ab0c5db51d Cleanup Visual Studio structure 2017-01-22 00:50:47 +01:00
Carsten Larsen b85a008fb2 Updated broken links 2017-01-21 21:21:00 +01:00
Carsten Larsen 40cc850093 64 bit optimizations 2017-01-21 20:51:25 +01:00
Carsten Larsen afbfd236a4 Clarify source origin 2017-01-21 20:50:01 +01:00
Carsten Larsen 25c618d57f arm 64 bit support 2017-01-21 20:26:14 +01:00
Carsten Larsen 4aefa785ad ARM support 2017-01-21 20:21:18 +01:00
Carsten Larsen 957355545e Fixed broken link 2017-01-21 14:06:41 +01:00
Carsten Larsen 927fc656dd Release 1.6.1 2017-01-21 13:53:51 +01:00
Carsten Larsen f1e2979d7a Update documentation 2017-01-21 13:51:39 +01:00
Carsten Larsen d7eca35395 Update documentation 2017-01-21 13:29:45 +01:00
Carsten Larsen 281317d503 Disable language on Windows 2017-01-21 13:29:11 +01:00
Carsten Larsen 3ae8e58f2b Prepare release 2017-01-21 13:28:39 +01:00
Carsten Larsen f4d99b69de Update documentation 2017-01-20 22:21:51 +01:00
Carsten Larsen bcb3611f14 Update documentation 2017-01-20 22:17:15 +01:00
Carsten Larsen ded1be8026 Documentation 2017-01-19 20:46:15 +01:00
Carsten Larsen b402fff504 Update makefile 2017-01-11 21:00:10 +01:00
Carsten Larsen a1a5aea15e Fix potential memory leak 2017-01-11 20:59:21 +01:00
Carsten Larsen aff002dbda scan-build results 2017-01-11 20:58:08 +01:00
Carsten Larsen 259f73d19e Fix Microsoft Visual C++ version string 2017-01-11 20:13:41 +01:00
Carsten Larsen 41ae34644d Simplify test 2017-01-11 19:35:58 +01:00
Carsten Larsen e83f879211 Updated toolset 2017-01-11 19:29:27 +01:00
Carsten Larsen 70fee59186 Updated Copyright text 2017-01-11 19:27:01 +01:00
Carsten Larsen 79c0de3575 Fix GCC compiler error 2017-01-10 23:52:26 +01:00
Carsten Larsen 441bed5c99 Fix GCC 2.x compiler error 2017-01-10 23:46:29 +01:00
Carsten Larsen 910b5a7cd9 Fix AmigaOS build 2017-01-10 23:45:46 +01:00
Carsten Larsen a08d724997 Include copyright text 2017-01-10 21:17:35 +01:00
Carsten Larsen bc94803f91 Compiler version string 2017-01-10 20:58:47 +01:00
Carsten Larsen 2b786bef20 clang support 2017-01-09 21:30:46 +01:00
Carsten Larsen cbb6c747f6 Fix method signature 2017-01-09 20:59:54 +01:00
Carsten Larsen 65f9d88562 Use correct deallocator 2017-01-08 13:13:39 +01:00
Carsten Larsen 4ea2b3af84 Code cleanup
modified:   app/lib/ntext.cpp
	modified:   app/main/lexer.cpp
	modified:   app/system/language.cpp
	modified:   app/system/language_posix.cpp
	modified:   app/system/preferences_stdc.cpp
	modified:   lib/real/pow.c
	modified:   lib/platform.h
2017-01-08 12:05:28 +01:00
Carsten Larsen 340a99d861 Updated readme 2016-08-19 18:15:29 +00:00
Carsten Sonne Larsen 3ea3222b91 Added build dependecy 2016-04-03 12:05:52 +02:00
Carsten Sonne Larsen 0651330e08 Cleanup 2016-04-03 11:56:10 +02:00
Carsten Sonne Larsen 3010a67d7f Fixed memory bug 2016-04-03 11:55:35 +02:00
Carsten 4228b95303 Fixed hardcoded local 2016-03-28 17:16:57 +02:00
llsth bf8cc0b222 Basic implementation of POSIX localization 2015-04-15 14:41:33 +02:00
llsth ffe9553471 Merge branch 'master' of https://github.com/llsth/amath 2015-04-14 19:22:06 +02:00
llsth b711e8aeab Added text author 2015-04-14 19:20:24 +02:00
Carsten Sonne Larsen 1752f2c546 Update README.md 2015-04-14 18:52:44 +02:00
llsth 2478847bd9 Clarified license details 2015-04-14 18:38:03 +02:00
llsth b26c5c81c9 Clarified license details 2015-04-14 18:32:44 +02:00
llsth e310c982d0 Clarified license details 2015-04-14 18:23:49 +02:00
llsth 9780e8b1c5 Clarified license details 2015-04-14 18:22:43 +02:00
llsth 617a418a91 Clarified license details 2015-04-14 18:21:58 +02:00
llsth 0760eaa798 Clarified license details 2015-04-14 18:14:57 +02:00
llsth 28b94bfaf4 Win32 texts 2015-04-14 14:19:38 +02:00
llsth e00ce964ae Win32 fixes 2015-04-14 14:00:01 +02:00
llsth 9d85d4c699 Updated Makefile 2015-04-14 00:05:11 +02:00
llsth cba2829664 Fixed AmigaOS build 2015-04-14 00:03:33 +02:00
llsth 7bb7b4e955 Localization on Standard C platforms 2015-04-13 23:48:08 +02:00
llsth f9a09c4bad Bugfixes 2015-04-13 23:44:17 +02:00
llsth 390ff27017 Updated catalog text 2015-04-12 00:17:20 +02:00
llsth b5ca35438d Fixed read of wrong address in empty strings 2015-04-12 00:00:43 +02:00
llsth 2adc0edd4c Fixed wrong memory management with new 2015-04-11 23:52:57 +02:00
llsth 37d2ba4794 Updated catalogs 2015-04-10 23:36:25 +02:00
llsth a633d5d06a Updated README.md 2015-04-10 15:42:17 +02:00
llsth be6681d3f0 Fixed memory bug 2015-04-10 15:41:52 +02:00
llsth b3753232f2 Implemented localized keywords 2015-04-10 15:41:29 +02:00
llsth fa1f153127 Updated project files 2015-04-10 00:04:58 +02:00
llsth 4c512addad Updated make logic 2015-04-10 00:02:57 +02:00
llsth 2f28be077b Moved catalog generation files 2015-04-10 00:00:56 +02:00
llsth af1681cc87 localized keywords 2015-04-09 23:59:17 +02:00
llsth 9121566b52 Included catalog and dist targets 2015-04-09 19:00:51 +02:00
llsth 26eb3d5cda Changed to buffered output 2015-04-09 18:59:44 +02:00
llsth 385073a256 Updated national letters 2015-04-09 18:59:22 +02:00
llsth 58121f8c01 Update catalog generation 2015-04-09 15:08:54 +02:00
llsth b35b9acde3 Updated language descriptions 2015-04-09 15:08:30 +02:00
llsth f30729980e Alias in function help 2015-04-09 14:42:16 +02:00
llsth 194830b64c Updated descriptions 2015-04-09 14:38:47 +02:00
llsth 12657aab90 Updated descriptions 2015-04-09 11:28:25 +02:00
llsth 6af581bbe4 Removed needless delimiters 2015-04-09 01:33:24 +02:00
Carsten Sonne Larsen c325bd29bc Fixes spelling mistakes 2015-04-09 01:22:02 +02:00
llsth 9cb7ef34a8 Initial commit 2015-04-09 01:19:27 +02:00
llsth 449e0c8473 Initial language support 2015-04-09 01:07:50 +02:00
llsth 4a0cba78cc Updated version info 2015-04-09 01:07:19 +02:00
llsth 048f20a717 Minor bugfixes 2015-04-08 23:03:42 +02:00
llsth 9a7af719d6 Minor bugfixes 2015-04-08 23:01:23 +02:00
llsth 76c315bfd0 Changed faulty language logic 2015-04-08 20:01:42 +02:00
llsth 6b4ae56c8a Updated with configure 2015-04-08 19:23:10 +02:00
llsth c647e003d2 Updated with configure 2015-04-08 19:20:51 +02:00
llsth c27ee67707 Updated with configure 2015-04-08 19:14:56 +02:00
llsth f1bcdda6dc Adjusted localization 2015-04-08 19:10:18 +02:00
llsth 5b851eee7c Fixed localization bug 2015-04-08 19:08:36 +02:00
llsth 8624d62494 Updated catalog keys 2015-04-08 19:08:07 +02:00
llsth 5886946f1d Basic multilingual support 2015-04-08 16:27:35 +02:00
llsth 9d2de4b700 Included flexcat in Makefile 2015-04-08 13:01:33 +02:00
llsth 4efc38b6b8 Accept newline as delimiter 2015-04-08 12:59:08 +02:00
llsth f29f311ff6 Cleaned up in platform defs 2015-04-08 11:13:17 +02:00
llsth 05efc36c6f Fixes in preferences 2015-04-08 11:05:41 +02:00
llsth d7f8c6cbd3 Cleaned up definitions 2015-04-08 01:15:36 +02:00
llsth c80e7c0101 Cleaned up definitions 2015-04-08 01:10:10 +02:00
llsth f445eef190 Fixed wrong debug comparison 2015-04-08 00:42:32 +02:00
llsth e45fae685c Fixed memory leak 2015-04-08 00:41:24 +02:00
llsth 2c2671df31 Clean up in cross compilation 2015-04-07 21:51:26 +02:00
llsth c918ff89e8 Fixed GCC define 2015-04-07 21:50:52 +02:00
llsth 00acfc11e7 clean up defines 2015-04-07 21:18:39 +02:00
llsth bcf936f4a8 License clean up 2015-04-07 20:36:00 +02:00
llsth 280e020a20 pragma clean up 2015-04-07 20:25:11 +02:00
llsth 5cc10f9e38 Removed GPL licensed file 2015-04-07 19:59:35 +02:00
llsth 10860fb996 Fixed AmigaOS 3 defines 2015-04-07 19:57:28 +02:00
llsth e73a42b69a Support for Visual Studio 2015-04-07 18:51:26 +02:00
llsth e8b7ad9720 Support for Visual Studio 2015-04-07 18:50:44 +02:00
llsth a99e32c5df Removed text under wrong license 2015-04-05 12:09:47 +02:00
llsth bc4d88d894 Updated license details 2015-04-05 12:04:55 +02:00
carsten da3ea85e80 Cross-compiler changes 2015-04-01 16:58:18 +02:00
llsth d7b73eb2d2 Fixed AROS typecasting 2015-04-01 15:29:25 +02:00
llsth 7b88f3119c Uncommented unfinished code 2015-04-01 15:23:37 +02:00
llsth c19d50f03e Removed deprecated files 2015-04-01 14:51:50 +02:00
llsth 89f78a5cdc amath-1.6.0 initial commit 2015-04-01 14:43:50 +02:00
llsth 3ab236f0b0 Included MorphOS patch 2015-03-26 13:00:37 +01:00
llsth 2ee6693905 Included MorphOS patch 2015-03-26 12:49:27 +01:00
Carsten Sonne Larsen cef3b88d61 Update README.md 2015-03-24 01:04:29 +01:00
Carsten Sonne Larsen 1ca6893513 Update README.md 2015-03-24 01:03:17 +01:00
Carsten Sonne Larsen 02deed1853 Update README.md 2015-03-24 00:25:29 +01:00
Carsten Sonne Larsen a60b55e01b Update README.md 2015-03-24 00:22:55 +01:00
Carsten Sonne Larsen 904620e599 Update HISTORY 2015-03-23 22:58:24 +01:00
Carsten Sonne Larsen b077d77668 Update README.md 2015-03-23 22:55:44 +01:00
450 changed files with 3587 additions and 2476 deletions

3
.gitignore vendored
View File

@ -11,7 +11,10 @@ amath
amath-test amath-test
catalog/flexcat catalog/flexcat
catalog/flexcat/flexcat catalog/flexcat/flexcat
build/flexcat/flexcat
*_.3 *_.3
doxygen.warn doxygen.warn
*.deb *.deb
*.zip
Makefile Makefile
/dist

19
.vscode/c_cpp_properties.json vendored Normal file
View File

@ -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
}

12
.vscode/keybindings.json vendored Normal file
View File

@ -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"
}
]

27
.vscode/launch.json vendored Normal file
View File

@ -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
}
]
}
]
}

19
.vscode/settings.json vendored Normal file
View File

@ -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"
}
}

51
.vscode/tasks.json vendored Normal file
View File

@ -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"
}
}
]
}

24
HISTORY
View File

@ -1,5 +1,27 @@
amath release 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 v1.8.0 April 13 2017
- Fixed bugs in numeral systems. - Fixed bugs in numeral systems.
- Fixed bugs related to infinity (Inf). - Fixed bugs related to infinity (Inf).
@ -89,7 +111,7 @@ v1.5.3 October 26 2014
v1.5.2 October 11 2014 v1.5.2 October 11 2014
- Modified character handling code to comply with licenses. - Modified character handling code to comply with licenses.
- Modified complex math 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. - Square root of negative numbers now yields correct result.
- Implemented scientific notation of numbers. - Implemented scientific notation of numbers.
- Infinity is now shown in division with 0. - Infinity is now shown in division with 0.

View File

@ -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) 2007 The NetBSD Foundation, Inc.
Copyright (c) 1990, 1993 The Regents of the University of California. Copyright (c) 1990, 1993 The Regents of the University of California.
All rights reserved. All rights reserved.

2
README
View File

@ -26,4 +26,4 @@ Show version string:
> amath version > amath version
Run regression tests: Run regression tests:
> amath test > amath --test

View File

@ -29,4 +29,4 @@ Install by copying the desired amath binary to C: or any other appropriate locat
> amath version > amath version
Run regression tests: Run regression tests:
> amath test > amath --test

150
amath.1
View File

@ -1,6 +1,6 @@
.\" Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net> .\" Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
.\" All rights reserved. .\" All rights reserved.
.\" .\"
.\" Redistribution and use in source and binary forms, with or without .\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions .\" modification, are permitted provided that the following conditions
.\" are met: .\" are met:
@ -9,7 +9,7 @@
.\" 2. Redistributions in binary form must reproduce the above copyright .\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the .\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution. .\" documentation and/or other materials provided with the distribution.
.\" .\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@ -20,39 +20,27 @@
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.TH amath 1 "Version 1.8.0" "April 13 2017" .TH amath 1 "Version 1.9.0" "January 11 2021"
.SH NAME .SH NAME
amath \- Simple command line calculator amath \- Simple command line calculator
.SH SYNOPSIS .SH SYNOPSIS
\fC[ --noansi ] [ --shell | expression ]\fP \fC[ \fB--noansi\fR ] [ \fB--shell\fR |
.IR expression
]
.SH DESCRIPTION .SH DESCRIPTION
amath(1) features a case sensitive command line interface, internal \fBamath\fP features a case sensitive command line interface, internal
IEEE 754 calculations with 15 significant digits, calculations with IEEE 754 calculations with 15 significant digits, calculations with
real and complex numbers, variables and user defined functions, real and complex numbers, variables and user defined functions,
logarithmic and exponential functions, trigonometric and hyperbolic logarithmic and exponential functions, trigonometric and hyperbolic
function and selected mathematical constants and rounding functions. function and selected mathematical constants and rounding functions.
.SH Statements .SH OPTIONS
.nf .TP
clear Clear console window .BR \-\-noansi
def Define function Disable output of ANSI escape codes. Default is enable.
delete Delete variable or function .TP
digits Set number of significant digits .BR \-\-shell
eval Evaluate arithmetic expression Open an interactive shell.
execute Execute statements in a file .SH OPERATORS
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
.fi
.SH Operators
.nf .nf
+ Mathematical addition + Mathematical addition
- Mathematical subtraction - Mathematical subtraction
@ -61,14 +49,15 @@ exit Exit program
^ Mathematical exponentiation ^ Mathematical exponentiation
= Assignment of variable values = Assignment of variable values
| Absolute value of number | Absolute value of number
.SH Variables and constant .fi
.SH VARIABLES AND CONSTANT
.nf .nf
pi Trigonometric constant pi Trigonometric constant
e Euler's number e Euler's number
i Imaginary unit i Imaginary unit
ins Result of last calculation ins Result of last calculation
.fi .fi
.SH Base functions .SH MISCELLANEOUS FUNCTIONS
.nf .nf
abs Absolute value of number abs Absolute value of number
sgn Mathematical signum function sgn Mathematical signum function
@ -82,7 +71,7 @@ lb Binary logarithm function (base 2)
ln Natural logarithm function (base e) ln Natural logarithm function (base e)
lg Common logarithm function (base 10) lg Common logarithm function (base 10)
.fi .fi
.SH Trigonometric functions .SH TRIGONOMETRIC FUNCTIONS
.nf .nf
sin Trigonometric sine function sin Trigonometric sine function
cos Trigonometric cosine function cos Trigonometric cosine function
@ -103,7 +92,7 @@ arccrd Inverse trigonometric chord function
arcexsec Inverse trigonometric exsecant function arcexsec Inverse trigonometric exsecant function
arcexcsc Inverse trigonometric excosecant function arcexcsc Inverse trigonometric excosecant function
.fi .fi
.SH Hyperbolic functions .SH HYPERBOLIC FUNCTIONS
.nf .nf
sinh Hyperbolic sine function sinh Hyperbolic sine function
cosh Hyperbolic cosine function cosh Hyperbolic cosine function
@ -118,7 +107,7 @@ arccoth Inverse hyperbolic cotangent function
arcsech Inverse hyperbolic secant function arcsech Inverse hyperbolic secant function
arccsch Inverse hyperbolic cosecant function arccsch Inverse hyperbolic cosecant function
.fi .fi
.SH Early trigonometric functions .SH EARLY TRIGONOMETRIC FUNCTIONS
.nf .nf
ver Versed sine function ver Versed sine function
vcs Versed cosine function vcs Versed cosine function
@ -137,7 +126,54 @@ archvc Inverse haversed cosine function
archcv Inverse hacoversed sine function archcv Inverse hacoversed sine function
archcc Inverse hacoversed cosine function archcc Inverse hacoversed cosine function
.fi .fi
.SH Example script .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
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 .nf
round(1.5461);round(-1.5461); round(1.5461);round(-1.5461);
ceil(43.5461);ceil(-43.5461); ceil(43.5461);ceil(-43.5461);
@ -145,34 +181,34 @@ floor(39.9531);floor(-39.9531);
trunc(23.827);trunc(-23.827); trunc(23.827);trunc(-23.827);
sqrt(100);sqrt(52.23); sqrt(100);sqrt(52.23);
.fi .fi
.SH Example script with functions .RE
.PP
Script block with user defined functions:
.RS
.nf .nf
f(x)=x*2+1; f(x)=x*2+1;
g(y)=y^2+y*1.5+2; g(y)=y^2+y*1.5+2;
a=2;b=3;c=a+b; a=2;b=3;c=a+b;
vars;funcs;
f(2.2);c+1.1; f(2.2);c+1.1;
.fi .fi
.SH Example script with complex numbers .RE
.nf .SH BUGS
cos(1+2i); .IP \[bu] 2
sin(1+2i); If \fBamath\fP is linked with system libraries (-lm) sometimes the real part
tan(1+2i); of a result of arccosh of a complex number, is negative instead of positive.
coth(1+2i); .IP \[bu]
sech(1+2i); coth() with complex numbers is inaccurate on the 14th digit.
csch(1+2i); .sp
.fi Please report any other bugs that you encounter via:
.SH HOMEPAGE
http://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. The code in complex calculations is derived from software
written by Stephen L. Moshier.
.SH COPYRIGHT
Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net>
.br .br
Copyright (c) 1990, 1993 The Regents of the University of California \fIhttps://gitlab.com/rnger/amath/issues\fR.
.SH HOMEPAGE
https://amath.innolan.net/
.SH SEE ALSO .SH SEE ALSO
amathc(3), amathr(3), amathi(3) 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.

View File

@ -1,7 +1,7 @@
DOXYFILE_ENCODING = UTF-8 DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "amath" PROJECT_NAME = "amath"
PROJECT_NUMBER = "1.8.0" PROJECT_NUMBER = "1.9.0"
PROJECT_BRIEF = "Simple command line calculator" PROJECT_BRIEF = "Simple command line calculator"
PROJECT_LOGO = PROJECT_LOGO =
OUTPUT_DIRECTORY = ../amath-doc OUTPUT_DIRECTORY = ../amath-doc
@ -156,12 +156,12 @@ EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10 FORMULA_FONTSIZE = 10
FORMULA_TRANSPARENT = YES FORMULA_TRANSPARENT = YES
USE_MATHJAX = NO USE_MATHJAX = NO
SEARCHENGINE = YES SEARCHENGINE = NO
SERVER_BASED_SEARCH = NO SERVER_BASED_SEARCH = NO
EXTERNAL_SEARCH = NO EXTERNAL_SEARCH = NO
SEARCHDATA_FILE = searchdata.xml SEARCHDATA_FILE = searchdata.xml
GENERATE_MAN = YES GENERATE_MAN = NO
MAN_OUTPUT = man MAN_OUTPUT = man
MAN_EXTENSION = .3 MAN_EXTENSION = .3
MAN_SUBDIR = MAN_SUBDIR =

4
arexx/test.rx Normal file
View File

@ -0,0 +1,4 @@
/* Test program */
Options RESULTS
Address AMATH.1 '1.1+1.8'
SAY (RESULT)

166
bin/amath.doc Normal file
View File

@ -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

41
bin/amath.readme Normal file
View File

@ -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

BIN
bin/catalog/english.info Normal file

Binary file not shown.

BIN
bin/prog/Catalog.info Normal file

Binary file not shown.

BIN
bin/prog/HISTORY.info Normal file

Binary file not shown.

BIN
bin/prog/LICENSE.info Normal file

Binary file not shown.

BIN
bin/prog/Script.info Normal file

Binary file not shown.

BIN
bin/prog/Test.info Normal file

Binary file not shown.

BIN
bin/prog/amath.020.info Normal file

Binary file not shown.

BIN
bin/prog/amath.030.info Normal file

Binary file not shown.

BIN
bin/prog/amath.doc.info Normal file

Binary file not shown.

BIN
bin/prog/amath.info Normal file

Binary file not shown.

BIN
bin/root/amath.info Normal file

Binary file not shown.

BIN
bin/script/complex1.info Normal file

Binary file not shown.

BIN
bin/script/complex2.info Normal file

Binary file not shown.

BIN
bin/script/complex3.info Normal file

Binary file not shown.

BIN
bin/script/function1.info Normal file

Binary file not shown.

BIN
bin/script/function2.info Normal file

Binary file not shown.

BIN
bin/script/function3.info Normal file

Binary file not shown.

BIN
bin/script/operators.info Normal file

Binary file not shown.

BIN
bin/script/userfuncs.info Normal file

Binary file not shown.

BIN
bin/script/variables.info Normal file

Binary file not shown.

32
build/doc Executable file
View File

@ -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;
}
'

141
builddeb Executable file
View File

@ -0,0 +1,141 @@
#!/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.9.0"
build_package () {
rm -Rf amath
rm -f amath-${version}_$1.deb
sh configure CFLAGS=$2
make clean
echo "Building $3 bit package of amath ${version} for Debian ..."
make static
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/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
# Copy binaries
mv amath.tmp amath/usr/bin/amath
chmod 0755 amath/usr/bin/amath
# Copy documentation
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
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
chmod 644 amath/usr/share/man/man1/*
# Copy scripts
cp script/* amath/usr/share/amath/
chmod 644 amath/usr/share/amath/*
# Create control file
{
echo "Package: amath"
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-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"
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 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: 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/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 320
build_package 'i386' '-m32' 32 322

View File

@ -1,13 +1,44 @@
#!/bin/sh #!/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 set -e
version="1.8.0" version="1.9.0"
build_package () { build_package () {
rm -Rf amath rm -Rf amath
rm -f amath-${version}_$1.deb rm -f amath.deb
rm -f amath-dev-${version}_$1.deb
sh configure CFLAGS=$2 sh configure CFLAGS=$2
make clean make clean
@ -29,7 +60,7 @@ mkdir -m 755 amath/usr/share/man
mkdir -m 755 amath/usr/share/man/man1 mkdir -m 755 amath/usr/share/man/man1
mkdir -m 755 amath/usr/share/man/man3 mkdir -m 755 amath/usr/share/man/man3
mkdir -m 755 amath/usr/share/doc mkdir -m 755 amath/usr/share/doc
mkdir -m 755 amath/usr/share/doc/amath mkdir -m 755 amath/usr/share/doc/amath-dev
# Copy binaries # Copy binaries
mv amath.tmp amath/usr/bin/amath mv amath.tmp amath/usr/bin/amath
@ -62,15 +93,16 @@ chmod 644 amath/usr/lib/pkgconfig/*
cp src/amath.h amath/usr/include/amath.h cp src/amath.h amath/usr/include/amath.h
cp src/amathc.h amath/usr/include/amathc.h cp src/amathc.h amath/usr/include/amathc.h
cp src/amatht.h amath/usr/include/amatht.h cp src/amatht.h amath/usr/include/amatht.h
cp src/complex.h amath/usr/include/amathi.h cp src/mathi.h amath/usr/include/amathi.h
cp src/mathr.h amath/usr/include/amathr.h
chmod 644 amath/usr/include/* chmod 644 amath/usr/include/*
# Copy documentation # Copy documentation
cp HISTORY amath/usr/share/doc/amath/ cp HISTORY amath/usr/share/doc/amath-dev/changelog
gzip --best -n amath/usr/share/doc/amath/HISTORY gzip --best -n amath/usr/share/doc/amath-dev/changelog
cp README amath/usr/share/doc/amath/ cp README amath/usr/share/doc/amath-dev/
gzip --best -n amath/usr/share/doc/amath/README gzip --best -n amath/usr/share/doc/amath-dev/README
chmod 644 amath/usr/share/doc/amath/* chmod 644 amath/usr/share/doc/amath-dev/*
# Copy man pages # Copy man pages
cp amath.1 amath/usr/share/man/man1/amath.1 cp amath.1 amath/usr/share/man/man1/amath.1
@ -94,12 +126,12 @@ chmod 644 amath/usr/share/amath/*
echo "Package: amath-dev" echo "Package: amath-dev"
echo "Version: ${version}" echo "Version: ${version}"
echo "Architecture: $1" echo "Architecture: $1"
echo "Maintainer: Carsten Larsen <cs@innolan.net>" echo "Maintainer: Carsten Sonne Larsen <cs@innolan.net>"
echo "Installed-Size: $4" echo "Installed-Size: $4"
echo "Depends: libc6" echo "Depends: libc6"
echo "Section: math" echo "Section: math"
echo "Priority: optional" echo "Priority: optional"
echo "Homepage: http://amath.innolan.net" echo "Homepage: https://amath.innolan.net"
echo "Built-Using: gcc-5.4" echo "Built-Using: gcc-5.4"
echo "Description: Simple command line calculator" echo "Description: Simple command line calculator"
echo " Features a case sensitive command line interface, internal IEEE 754" echo " Features a case sensitive command line interface, internal IEEE 754"
@ -114,10 +146,10 @@ chmod 0755 amath/DEBIAN/control
{ {
echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/" echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
echo "Upstream-Name: amath-dev" echo "Upstream-Name: amath-dev"
echo "Source: http://amath.innolan.net" echo "Source: https://amath.innolan.net"
echo echo
echo "Files: *" 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 " 2007 The NetBSD Foundation, Inc."
echo " 1990, 1993 The Regents of the University of California." echo " 1990, 1993 The Regents of the University of California."
echo "License: BSD-2-Clause" echo "License: BSD-2-Clause"
@ -141,20 +173,8 @@ 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 " 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 " 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." echo " OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
} >amath/DEBIAN/copyright } >amath/usr/share/doc/amath-dev/copyright
gzip --best -n amath/DEBIAN/copyright chmod 644 amath/usr/share/doc/amath-dev/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 "libamath ${version}"

125
builddist
View File

@ -1,63 +1,128 @@
#!/bin/sh #!/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 set -e
rm -f amath.lha distdir="dist"
rm -Rf amath builddir="tmp"
rm -Rf dist bindir="bin"
mkdir dist 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 clean
make static make static
mv amath dist/amath.000 mv amath ${builddir}/amath
make clean 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 make static
mv amath dist/amath.020 mv amath ${builddir}/amath.020
make clean 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 make static
mv amath dist/amath.030 mv amath ${builddir}/amath.030
make clean 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 make static
mv amath dist/amath-test.000 mv amath ${builddir}/amath-test
make clean 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 make static
mv amath dist/amath-test.020 mv amath ${builddir}/amath-test.020
make clean 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 make static
mv amath dist/amath-test.030 mv amath ${builddir}/amath-test.030
make clean 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 touch hashkeys
sha1sum amath.000 >>hashkeys sha1sum amath >>hashkeys
sha1sum amath.020 >>hashkeys sha1sum amath.020 >>hashkeys
sha1sum amath.030 >>hashkeys sha1sum amath.030 >>hashkeys
sha1sum amath-test.000 >>hashkeys sha1sum amath-test >>hashkeys
sha1sum amath-test.020 >>hashkeys sha1sum amath-test.020 >>hashkeys
sha1sum amath-test.030 >>hashkeys sha1sum amath-test.030 >>hashkeys
sha256sum amath.000 >>hashkeys sha256sum amath >>hashkeys
sha256sum amath.020 >>hashkeys sha256sum amath.020 >>hashkeys
sha256sum amath.030 >>hashkeys sha256sum amath.030 >>hashkeys
sha256sum amath-test.000 >>hashkeys sha256sum amath-test >>hashkeys
sha256sum amath-test.020 >>hashkeys sha256sum amath-test.020 >>hashkeys
sha256sum amath-test.030 >>hashkeys sha256sum amath-test.030 >>hashkeys
cd .. cd ..
make catalogs # Build distribution directory structure
cp LICENSE dist/ mkdir -m 775 ${distdir}
cp HISTORY dist/ 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 # Install icons
cp script/* dist/script/ install -m 664 ${bindir}/root/*.info ${distdir}/
date -Ru >dist/build_date install -m 664 ${bindir}/prog/*.info ${distdir}/amath/
#uname -srmo >dist/build_host install -m 664 ${bindir}/catalog/*.info ${distdir}/amath/Catalog/
install -m 664 ${bindir}/script/*.info ${distdir}/amath/Script/
mv dist amath # Install documentation
#lha-ac a amath.lha amath 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}/

View File

@ -1,16 +1,21 @@
#! /bin/sh #!/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 ! # DO NOT USE THIS SCRIPT UNLESS YOU KNOW WHAT YOU ARE DOING !
version='1.8.0' version='1.9.0'
stamp="201704130000" stamp="202101120000"
#stamp="201704110000" srcdir="."
srcdir="amath-rc"
distdir="amath-${version}" distdir="amath-${version}"
cd ..
rm -f amath-${version}.tar.gz rm -f amath-${version}.tar.gz
rm -Rf amath-${version} rm -Rf ${distdir}
mkdir -m 775 ${distdir} mkdir -m 775 ${distdir}
mkdir -m 775 ${distdir}/src/ mkdir -m 775 ${distdir}/src/
@ -51,6 +56,7 @@ install -m 664 ${srcdir}/LICENSE ${distdir}/
install -m 664 ${srcdir}/README ${distdir}/ install -m 664 ${srcdir}/README ${distdir}/
install -m 664 ${srcdir}/amath.1 ${distdir}/ install -m 664 ${srcdir}/amath.1 ${distdir}/
install -m 775 ${srcdir}/configure ${distdir}/ install -m 775 ${srcdir}/configure ${distdir}/
install -m 775 ${srcdir}/builddeb ${distdir}/
install -m 775 ${srcdir}/builddist ${distdir}/ install -m 775 ${srcdir}/builddist ${distdir}/
install -m 775 ${srcdir}/buildwin ${distdir}/ install -m 775 ${srcdir}/buildwin ${distdir}/

View File

@ -1,8 +1,14 @@
#!/bin/sh #!/bin/sh
#
# This file is public domain
#
# Project homepage:
# https://amath.innolan.net
#
set -e set -e
version="1.8.0" version="1.9.0"
echo "Building amath ${version} for Windows ..." echo "Building amath ${version} for Windows ..."

View File

@ -2,19 +2,19 @@
## language english ## language english
## codeset 0 ## 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. ; All rights reserved.
; ;
; Redistribution and use in source and binary forms, with or without ; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met: ; modification, are permitted provided that the following conditions are met:
; ;
; * Redistributions of source code must retain the above copyright notice, this ; * Redistributions of source code must retain the above copyright notice, this
; list of conditions and the following disclaimer. ; list of conditions and the following disclaimer.
; ;
; * Redistributions in binary form must reproduce the above copyright notice, ; * Redistributions in binary form must reproduce the above copyright notice,
; this list of conditions and the following disclaimer in the documentation ; this list of conditions and the following disclaimer in the documentation
; and/or other materials provided with the distribution. ; and/or other materials provided with the distribution.
; ;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

View File

@ -31,38 +31,42 @@ No help is available for this function.#NEWLINE#
cbr cbr
No help is available for this function.#NEWLINE# No help is available for this function.#NEWLINE#
lb lb
No help is available for this function.#NEWLINE# Binary logarithm function.#NEWLINE#
ln ln
No help is available for this function.#NEWLINE# Natural logarithm function.#NEWLINE#
lg lg
No help is available for this function.#NEWLINE# Common logarithm function.#NEWLINE#
; Partly from https://wikipedia.org/wiki/Sine ; Partly from https://wikipedia.org/wiki/Sine
sin 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# 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 ; Partly from https://wikipedia.org/wiki/Trigonometric_functions
cos 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 ; Partly from https://wikipedia.org/wiki/Trigonometric_functions
tan 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# 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 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 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 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 asin
No help is available for this function.#NEWLINE# arc sine function.#NEWLINE#
acos acos
No help is available for this function.#NEWLINE# arc cosine function.#NEWLINE#
atan atan
No help is available for this function.#NEWLINE# arc tangent function of one variable.#NEWLINE#
acot acot
No help is available for this function.#NEWLINE# arc cotangent function.#NEWLINE#
asec asec
No help is available for this function.#NEWLINE# arc secant function.#NEWLINE#
acsc acsc
No help is available for this function.#NEWLINE# arc cosecant function.#NEWLINE#
sinh sinh
No help is available for this function.#NEWLINE# No help is available for this function.#NEWLINE#
cosh cosh
@ -116,14 +120,14 @@ No help is available for this function.#NEWLINE#
ahvc ahvc
No help is available for this function.#NEWLINE# No help is available for this function.#NEWLINE#
ahcv ahcv
No help is available for this function.#NEWLINE# The inverse hacoversed sine is not implemented in this version of amath.#NEWLINE#
ahcc ahcc
No help is available for this function.#NEWLINE# The inverse hacoversed cosine is not implemented in this version of amath.#NEWLINE#
exsec exsec
No help is available for this function.#NEWLINE# exsecant function.#NEWLINE#
excsc excsc
No help is available for this function.#NEWLINE# excosecant function.#NEWLINE#
aexsec aexsec
No help is available for this function.#NEWLINE# inverse exsecant function.#NEWLINE#
aexcsc aexcsc
No help is available for this function.#NEWLINE# inverse excosecant function.#NEWLINE#

View File

@ -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 ## language english
## codeset 0 ## 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. ; All rights reserved.
; ;
; Redistribution and use in source and binary forms, with or without ; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met: ; modification, are permitted provided that the following conditions are met:
; ;
; * Redistributions of source code must retain the above copyright notice, this ; * Redistributions of source code must retain the above copyright notice, this
; list of conditions and the following disclaimer. ; list of conditions and the following disclaimer.
; ;
; * Redistributions in binary form must reproduce the above copyright notice, ; * Redistributions in binary form must reproduce the above copyright notice,
; this list of conditions and the following disclaimer in the documentation ; this list of conditions and the following disclaimer in the documentation
; and/or other materials provided with the distribution. ; and/or other materials provided with the distribution.
; ;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ; 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# #NORMALTEXT##BOLD##STARTMSG##NEWLINE##NORMALTEXT##COLOR02#Type help to show info.#NEWLINE#
STATEMENTLINE STATEMENTLINE
---------------------------------------------------------#NEWLINE# ---------------------------------------------------------#NEWLINE#
STATEMENTABOUT
about Show about text#NEWLINE#
STATEMENTCLEAR STATEMENTCLEAR
clear Clear console window.#NEWLINE# clear Clear console window.#NEWLINE#
STATEMENTDEF STATEMENTDEF
@ -65,6 +67,8 @@ STATEMENTVARS
variables Show list of variables.#NEWLINE# variables Show list of variables.#NEWLINE#
STATEMENTVERSION STATEMENTVERSION
version Show version string.#NEWLINE# version Show version string.#NEWLINE#
STATEMENTLICENSE
license Show copyright and license texts#NEWLINE#
STATEMENTMEMORY STATEMENTMEMORY
memory Show internal memory usage.#NEWLINE# memory Show internal memory usage.#NEWLINE#
STATEMENTEXIT STATEMENTEXIT

81
configure vendored
View File

@ -1,8 +1,8 @@
#!/bin/sh #!/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. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
@ -11,7 +11,7 @@
# 2. Redistributions in binary form must reproduce the above copyright # 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the # notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# #
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -23,11 +23,11 @@
# LIABILITY, OR TORT {INCLUDING NEGLIGENCE OR OTHERWISE} ARISING IN ANY WAY # 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 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # SUCH DAMAGE.
# #
set -e set -e
version="1.8.0" version="1.9.0"
clang=false clang=false
debugsym=false debugsym=false
@ -36,6 +36,7 @@ openlibm=false
stdlibm=false stdlibm=false
stdlibc=false stdlibc=false
useldconfig=false useldconfig=false
fpic=false
prefix="/usr" prefix="/usr"
pkgconfigdir="lib/pkgconfig" pkgconfigdir="lib/pkgconfig"
@ -45,6 +46,7 @@ cxxflags=""
ldflags="" ldflags=""
gcclib="-lstdc++" gcclib="-lstdc++"
libm="" libm=""
libc=""
for arg in "$@"; do for arg in "$@"; do
unknown=true unknown=true
@ -64,6 +66,15 @@ for arg in "$@"; do
unknown=false unknown=false
;; ;;
--man-dir=*)
mandir=`echo $arg | sed 's/--mandir=//'`
unknown=false
;;
--doc-dir=*)
unknown=false
;;
--cross-compile=*) --cross-compile=*)
crosscompile=`echo $arg | sed 's/--cross-compile=//'` crosscompile=`echo $arg | sed 's/--cross-compile=//'`
crosscompile="${crosscompile}-" crosscompile="${crosscompile}-"
@ -107,6 +118,17 @@ for arg in "$@"; do
useldconfig=false useldconfig=false
unknown=false unknown=false
;; ;;
--enable-pic)
fpic=true
unknown=false
;;
--disable-pic)
fpic=false
unknown=false
;;
--enable-debug) --enable-debug)
debugsym=true debugsym=true
unknown=false unknown=false
@ -180,10 +202,12 @@ for arg in "$@"; do
echo ' --disable-debug: do not include debug symbols' echo ' --disable-debug: do not include debug symbols'
echo ' --enable-test: build code with regression tests' echo ' --enable-test: build code with regression tests'
echo ' --disable-test: do not include regression test' echo ' --disable-test: do not include regression test'
echo ' --enable-clang: build with clang compiler' echo ' --enable-clang: build explicit with clang compiler'
echo ' --disable-clang: do not build with clang compiler' echo ' --disable-clang: do not explicit build with clang compiler'
echo ' --enable-ldconfig: use ldconfig to registre libraries' echo ' --enable-ldconfig: use ldconfig to registre libraries'
echo ' --disable-ldconfig: do not 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 ' --with-libm: link with libm library (-lm)'
echo ' --without-libm: do not link with libm library' echo ' --without-libm: do not link with libm library'
echo ' --with-openlibm: link with openlibm library (-lopenlibm)' echo ' --with-openlibm: link with openlibm library (-lopenlibm)'
@ -240,7 +264,7 @@ if $stdlibm; then
mflags="-DLIBM " mflags="-DLIBM "
dlibm=true dlibm=true
fi fi
if $openlibm; then if $openlibm; then
libm="-lopenlibm " libm="-lopenlibm "
mflags="-DLIBM " mflags="-DLIBM "
@ -255,6 +279,13 @@ fi
if $stdlibc; then if $stdlibc; then
gcclib="${gcclib} -lc" gcclib="${gcclib} -lc"
libc="-lc"
fi
if $fpic; then
fPIC=" -fPIC"
else
fPIC=""
fi fi
cflags="${cflags}${debugflag}${mflags}" cflags="${cflags}${debugflag}${mflags}"
@ -275,16 +306,16 @@ values.cpp
viewer.cpp viewer.cpp
' '
SYSSRCS=' SYSSRCS='
amiga_arexx.cpp
console.cpp console.cpp
console_amiga.cpp console_amiga.cpp
console_stdc.cpp console_stdc.cpp
console_posix.cpp console_termios.cpp
console_windows.cpp console_windows.cpp
filesystem_amiga.cpp filesystem_amiga.cpp
filesystem_stdc.cpp filesystem_stdc.cpp
language.cpp language.cpp
language_amiga.cpp language_amiga.cpp
language_posix.cpp
language_stdc.cpp language_stdc.cpp
preferences.cpp preferences.cpp
preferences_amiga.cpp preferences_amiga.cpp
@ -567,7 +598,7 @@ ldlibflags="-l${amathapp} ${libm}-l${amathcplex} ${libm}-l${amath} -l${amathc} $
############################ Main Application ########################### ############################ Main Application ###########################
{ {
echo "CXX = ${crosscompile}${cxxcompiler}" 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 "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib" echo "RANLIB = ${crosscompile}ranlib"
echo "DEL = rm -f" echo "DEL = rm -f"
@ -599,7 +630,7 @@ echo
########################### Functions Library ########################### ########################### Functions Library ###########################
{ {
echo "CXX = ${crosscompile}${cxxcompiler}" 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 "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib" echo "RANLIB = ${crosscompile}ranlib"
echo "DEL = rm -f" echo "DEL = rm -f"
@ -631,7 +662,7 @@ echo
########################### Statement Library ########################### ########################### Statement Library ###########################
{ {
echo "CXX = ${crosscompile}${cxxcompiler}" 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 "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib" echo "RANLIB = ${crosscompile}ranlib"
echo "DEL = rm -f" echo "DEL = rm -f"
@ -663,7 +694,7 @@ echo
############################ System Library ############################# ############################ System Library #############################
{ {
echo "CXX = ${crosscompile}${cxxcompiler}" 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 "AR = ${crosscompile}ar"
echo "RANLIB = ${crosscompile}ranlib" echo "RANLIB = ${crosscompile}ranlib"
echo "DEL = rm -f" echo "DEL = rm -f"
@ -725,7 +756,7 @@ for f in ${LIBAPPSRCS}
do do
b=`basename $f .cpp` b=`basename $f .cpp`
echo "static/${b}.o: ${f}" 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
echo "shared/${b}.o: ${f}" echo "shared/${b}.o: ${f}"
echo " \${CXX} \${CXXFLAGS} -fPIC -c ${f} -o shared/${b}.o" echo " \${CXX} \${CXXFLAGS} -fPIC -c ${f} -o shared/${b}.o"
@ -836,7 +867,7 @@ for f in ${LIBC1SRCS}
do do
b=`basename $f .c` b=`basename $f .c`
echo "static/${b}.o: ${f}" 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
echo "shared/${b}.o: ${f}" echo "shared/${b}.o: ${f}"
echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o" echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
@ -851,7 +882,7 @@ echo " \${MKDIR} static"
echo " \${MKDIR} shared" echo " \${MKDIR} shared"
echo echo
echo "\${solib}: build ${libcs}" echo "\${solib}: build ${libcs}"
echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libcs} -lc" echo " \${CC} \${CFLAGS} -shared ${exestrip} -fPIC -Wl,-soname,\${solib}${soverion} -o \${solib} ${libcs}"
echo echo
echo "\${alib}: build ${libc}" echo "\${alib}: build ${libc}"
echo " \${AR} rcs static/\${alib} ${libc}" echo " \${AR} rcs static/\${alib} ${libc}"
@ -935,7 +966,7 @@ for f in ${LIBREALSRCS}
do do
b=`basename $f .c` b=`basename $f .c`
echo "static/${b}.o: ${f}" 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
echo "shared/${b}.o: ${f}" echo "shared/${b}.o: ${f}"
echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o" echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
@ -1032,7 +1063,7 @@ for f in ${LIBCPLEXSRCS}
do do
b=`basename $f .c` b=`basename $f .c`
echo "static/${b}.o: ${f}" 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
echo "shared/${b}.o: ${f}" echo "shared/${b}.o: ${f}"
echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o" echo " \${CC} \${CFLAGS} -fPIC -fno-builtin -c ${f} -o shared/${b}.o"
@ -1163,10 +1194,10 @@ echo " cd src/cplex && \${MAKE} doc"
echo echo
echo "catalogs:" echo "catalogs:"
echo " cd build/flexcat && \${MAKE}" echo " cd build/flexcat && \${MAKE}"
echo " \${MKDIR} dist/catalog/english" echo " \${MKDIR} distcat/catalog/english"
echo " \${FLXCAT} text/help.cd catalog/english/amath-help.ct CATALOG dist/catalog/english/amath-help.catalog" 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 dist/catalog/english/amath-ident.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 dist/catalog/english/amath-text.catalog" echo " \${FLXCAT} text/text.cd catalog/english/amath-text.ct CATALOG distcat/catalog/english/amath-text.catalog"
echo echo
echo "shared-libs:" echo "shared-libs:"
echo " cd src/lib && \${MAKE} shared" echo " cd src/lib && \${MAKE} shared"
@ -1189,7 +1220,7 @@ echo
echo ".PHONY: test" echo ".PHONY: test"
echo "test: amath" echo "test: amath"
echo " LD_LIBRARY_PATH=src/clib/:src/lib:src/cplex:scr/real" echo " LD_LIBRARY_PATH=src/clib/:src/lib:src/cplex:scr/real"
echo " ./amath test" echo " ./amath --test"
echo echo
echo ".PHONY: install" echo ".PHONY: install"
echo "install:" echo "install:"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -23,117 +23,135 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#ifndef AMATH_H #ifndef AMATH_H
#define AMATH_H #define AMATH_H
/******************************************************************************/
#ifdef __AMIGA__ /* Operating System */
# ifndef AOS3 #if defined(__MORPHOS__)
# define AOS3 # define SYS_NAME "MorphOS"
# endif
#endif
/******************************************************************************/
#ifdef __AROS__
# ifndef AROS
# define AROS
# endif
#endif
/******************************************************************************/
#ifdef __MORPHOS__
# ifndef MORPHOS # ifndef MORPHOS
# define MORPHOS # define MORPHOS
# endif # endif
#endif #elif defined(__amigaos4__)
/******************************************************************************/ # define SYS_NAME "AmigaOS 4"
#ifdef __amigaos4__
# ifndef AOS4 # ifndef AOS4
# define AOS4 # define AOS4
# endif # endif
#endif #elif defined(__AMIGA__) || defined(__amigaos3__)
/******************************************************************************/ # define SYS_NAME "AmigaOS 3"
#ifdef __HAIKU__ # ifndef AOS3
# define AOS3
# endif
#elif defined(__AROS__)
# define SYS_NAME "AROS"
# ifndef AROS
# define AROS
# endif
#elif defined(__HAIKU__)
# define SYS_NAME "Haiku"
# ifndef HAIKU # ifndef HAIKU
# define HAIKU # define HAIKU
# endif # endif
#endif #elif defined(__APPLE__) && defined(__MACH__)
/******************************************************************************/ # define SYS_NAME "Apple"
#ifdef __APPLE__
# ifndef APPLE # ifndef APPLE
# define APPLE # define APPLE
# endif # endif
#endif #elif defined(__FreeBSD__)
/******************************************************************************/ # define SYS_NAME "FreeBSD"
#if defined(_WIN32) || defined(_WIN64) # ifndef FREEBSD
# define FREEBSD
# endif
#elif defined(__NetBSD__)
# define SYS_NAME "NetBSD"
# ifndef NETBSD
# define NETBSD
# endif
#elif defined(__OpenBSD__)
# define SYS_NAME "OpenBSD"
# ifndef OPENBSD
# define OPENBSD
# endif
#elif defined(__DragonFly__)
# define SYS_NAME "DragonFly BSD"
# ifndef DRAGONFLY
# define DRAGONFLY
# endif
#elif defined(__linux__)
# define SYS_NAME "Linux"
# ifndef LINUX
# define LINUX
# endif
#elif defined(_WIN32)
# define SYS_NAME "Windows"
# ifndef WINDOWS
# define WINDOWS
# endif
#elif defined(_WIN64)
# define SYS_NAME "Windows 64 bit"
# ifndef WINDOWS # ifndef WINDOWS
# define WINDOWS # define WINDOWS
# endif # endif
#endif #endif
/******************************************************************************/
#if defined(AOS3) || defined(AOS4) || defined(AROS) || defined (MORPHOS) #if defined(AOS3) || defined(AOS4) || defined(AROS) || defined (MORPHOS)
# ifndef AMIGA # ifndef AMIGA
# define AMIGA # define AMIGA
# endif # endif
#endif #endif
/******************************************************************************/
#if defined(unix) || defined(__unix__) || defined(__unix) #if defined(unix) || defined(__unix__) || defined(__unix)
# ifndef UNIX # ifndef UNIX
# define UNIX # define UNIX
# endif # endif
#endif # ifndef SYS_NAME
/******************************************************************************/ # define SYS_NAME "Unix variant"
#if defined(HAIKU) || defined(UNIX) || defined(APPLE) || defined(_POSIX_VERSION)
# ifndef POSIX
# define POSIX
# endif # endif
#endif #endif
/******************************************************************************/
#if !defined(AMIGA) && !defined(POSIX) && !defined(WINDOWS) #if defined(HAIKU) || defined(UNIX) || defined(APPLE)
# ifndef STDC_CONSOLE # ifndef TERMIOS
# define STDC_CONSOLE # define TERMIOS
# endif # endif
#endif
/******************************************************************************/
#if defined(POSIX)
# include <stdint.h> # include <stdint.h>
# include <unistd.h> # include <unistd.h>
# include <dirent.h>
#endif #endif
/******************************************************************************/
#if defined(WINDOWS) #if defined(WINDOWS)
# include <stdint.h> # include <stdint.h>
#endif #endif
/******************************************************************************/
#if defined(AROS) || defined(MORPHOS) || defined(AOS4)
# include <stdint.h>
# include <sys/types.h>
#endif
#if defined(AOS3) #if defined(AOS3)
# include <sys/types.h> # include <sys/types.h>
# define IPTR LONG*
# define uintptr_t uint32_t # define uintptr_t uint32_t
typedef u_int8_t uint8_t; typedef u_int8_t uint8_t;
typedef u_int16_t uint16_t; typedef u_int16_t uint16_t;
typedef u_int32_t uint32_t; typedef u_int32_t uint32_t;
typedef u_int64_t uint64_t; typedef u_int64_t uint64_t;
#endif #endif
/******************************************************************************/
#if defined(AROS) || defined(MORPHOS) || defined(AOS4) || defined(APPLE)
# include <stdint.h>
# include <sys/types.h>
#endif
/******************************************************************************/
#if (__cplusplus <= 199711L && !defined(WINDOWS)) || !defined(__cplusplus) #if (__cplusplus <= 199711L && !defined(WINDOWS)) || !defined(__cplusplus)
#ifndef nullptr # ifndef nullptr
#define nullptr 0 # define nullptr 0
#endif # endif
#elif (__cplusplus <= 199711L) && (defined(__GNUC__) || defined(__GNUG__)) #elif (__cplusplus <= 199711L) && (defined(__GNUC__) || defined(__GNUG__))
#ifndef nullptr # ifndef nullptr
#define nullptr 0 # define nullptr 0
# endif
#endif #endif
#endif
/******************************************************************************/
#define assert(x) #define assert(x)
/******************************************************************************/
/* Compilers*/ /* Compilers */
#if defined(__clang__) #if defined(__clang__)
/* Clang */ /* Clang */
# if defined(__apple_build_version__) # if defined(__apple_build_version__)
@ -186,7 +204,9 @@ typedef u_int64_t uint64_t;
# elif (_MSC_VER == 1900) # elif (_MSC_VER == 1900)
# define COMP_VERS "14.0" # define COMP_VERS "14.0"
# elif (_MSC_VER > 1900) # elif (_MSC_VER > 1900)
# define COMP_VERS "15.0+" # define COMP_VERS "15.x"
# elif (_MSC_VER > 1920)
# define COMP_VERS "16.0+"
# else # else
# define str(x) #x # define str(x) #x
# define MSC_VER_STR(x) str(x) # define MSC_VER_STR(x) str(x)
@ -219,29 +239,29 @@ typedef u_int64_t uint64_t;
# define COMP_VERS GCC_VER_STR(__GNUC__) DOT GCC_VER_STR(__GNUC_MINOR__) # define COMP_VERS GCC_VER_STR(__GNUC__) DOT GCC_VER_STR(__GNUC_MINOR__)
# endif # endif
#endif #endif
/******************************************************************************/
#define EMPTYSTRING "" #define EMPTYSTRING ""
#define SPACE " " #define SPACE " "
#define DOT "." #define DOT "."
/******************************************************************************/
#if defined(WINDOWS) #if defined(WINDOWS)
#define NEWLINE "\r\n" #define NEWLINE "\r\n"
#elif defined(APPLE) #elif defined(APPLE)
#define NEWLINE "\r" #define NEWLINE "\n"
#else #else
#define NEWLINE "\n" #define NEWLINE "\n"
#endif #endif
/******************************************************************************/
#ifndef __cplusplus #ifndef __cplusplus
typedef int bool; typedef int bool;
#define true 1 #define true 1
#define false 0 #define false 0
#endif #endif
/******************************************************************************/
#define LONG_BIT 32 #define LONG_BIT 32
#define wsize sizeof(unsigned int) #define wsize sizeof(unsigned int)
#define wmask (wsize - 1) #define wmask (wsize - 1)
/******************************************************************************/
#if defined(INTELCPU) || defined(i386) || defined(i486) || \ #if defined(INTELCPU) || defined(i386) || defined(i486) || \
defined(intel) || defined(x86) || defined(i86pc) || \ defined(intel) || defined(x86) || defined(i86pc) || \
defined(__i386__) || defined(_M_IX86) defined(__i386__) || defined(_M_IX86)
@ -253,18 +273,18 @@ typedef int bool;
#if defined(__x86_64__) || defined(_M_AMD64) #if defined(__x86_64__) || defined(_M_AMD64)
# define TXTCPU "amd64" # define TXTCPU "amd64"
#endif #endif
/******************************************************************************/
#if defined(__powerpc__) || defined(__powerpc64__) #if defined(__powerpc__) || defined(__powerpc64__)
# define TXTCPU "PowerPC" # define TXTCPU "PowerPC"
#endif #endif
/******************************************************************************/
#if defined(__arm__) || defined(_M_ARM) || defined(__ARM_ARCH_6__) #if defined(__arm__) || defined(_M_ARM) || defined(__ARM_ARCH_6__)
# define TXTCPU "arm" # define TXTCPU "arm"
#endif #endif
#if defined(__aarch64__) || defined(_M_ARM64) #if defined(__aarch64__) || defined(_M_ARM64)
# define TXTCPU "arm64" # define TXTCPU "arm64"
#endif #endif
/******************************************************************************/
#if defined(m68060) || defined(mc68060) #if defined(m68060) || defined(mc68060)
# define TXTCPU "68060" # define TXTCPU "68060"
#elif defined(m68040) || defined(mc68040) #elif defined(m68040) || defined(mc68040)
@ -278,47 +298,33 @@ typedef int bool;
#elif defined(m68000) || defined(mc68000) #elif defined(m68000) || defined(mc68000)
# define TXTCPU "68000+" # define TXTCPU "68000+"
#endif #endif
/******************************************************************************/
#ifndef TXTCPU #ifndef TXTCPU
//#error what cpu is this ?! //#error what cpu is this ?!
# define TXTCPU EMPTYSTRING # define TXTCPU EMPTYSTRING
#endif #endif
/******************************************************************************/
#if defined(TXTCPU) && defined(__HAVE_68881__) #if defined(TXTCPU) && defined(__HAVE_68881__)
# define TXTFPU SPACE "FPU" # define TXTFPU SPACE "FPU"
#else #else
# define TXTFPU EMPTYSTRING # define TXTFPU EMPTYSTRING
#endif #endif
/******************************************************************************/
#define TXTARCH TXTCPU TXTFPU #define TXTARCH TXTCPU TXTFPU
#define RELDATESTAMP "(13-04-2017)" #define RELDATESTAMP "(11-01-2021)"
#define TXTDOSVERSION "\0$VER: amath 1.80" SPACE RELDATESTAMP SPACE TXTARCH #define TXTDOSVERSION "\0$VER: amath 1.90" SPACE RELDATESTAMP SPACE TXTARCH
#define TXTTITLE "amath version 1.8.0" #define TXTTITLE "amath version 1.9.0"
#define TXTCOPYRIGHT "(c) 2017 Carsten Sonne Larsen" #define TXTCOPYRIGHT "(c) 2021 Carsten Sonne Larsen"
#define TXTSTARTMSG TXTTITLE SPACE TXTCOPYRIGHT #define TXTSTARTMSG TXTTITLE SPACE TXTCOPYRIGHT
/******************************************************************************/
#define TXTVERSMSG TXTTITLE SPACE RELDATESTAMP SPACE TXTARCH #define TXTVERSMSG TXTTITLE SPACE RELDATESTAMP SPACE TXTARCH
#define TXTCOMPMSG "Compiled with " COMP_NAME SPACE COMP_VERS #define TXTCOMPMSG "Compiled with " COMP_NAME SPACE COMP_VERS
/******************************************************************************/
#define CPROCNAME "amath_console" #ifdef SYS_NAME
/******************************************************************************/ # define TXTSYSMSG TXTCOMPMSG " for " SYS_NAME
#if defined(AMIGA) # define SYSKNOWN 1
#define AMIGADOS_NAME "dos.library" #else
#define AMIGADOS_REV 33L # define TXTSYSMSG TXTCOMPMSG
#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 #endif
/******************************************************************************/
#endif #endif

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#ifndef AMATHC_H #ifndef AMATHC_H

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#ifndef AMATHT_H #ifndef AMATHT_H

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "amathc.h" #include "amathc.h"
#ifdef AMIGA #if defined(AMIGA)
#include <clib/exec_protos.h> #include <clib/exec_protos.h>
#endif #endif
@ -58,7 +58,7 @@ unsigned int AllocAndCopy(char** destination, const char* source)
*destination = AllocMemSafe(size); *destination = AllocMemSafe(size);
d = *destination; d = *destination;
#ifdef AMIGA // Take advantage of exec #if defined(AMIGA) // Take advantage of exec
CopyMem(s, d, n); CopyMem(s, d, n);
#else #else
while (n--) while (n--)

View File

@ -1,6 +1,6 @@
.\" Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net> .\" Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
.\" All rights reserved. .\" All rights reserved.
.\" .\"
.\" Redistribution and use in source and binary forms, with or without .\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions .\" modification, are permitted provided that the following conditions
.\" are met: .\" are met:
@ -9,7 +9,7 @@
.\" 2. Redistributions in binary form must reproduce the above copyright .\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the .\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution. .\" documentation and/or other materials provided with the distribution.
.\" .\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@ -20,7 +20,7 @@
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.TH "amathc.h" 3 "Version 1.8.0" "April 13 2017" .TH "amathc.h" 3 "Version 1.9.0" "January 11 2021"
.SH NAME .SH NAME
amathc.h \- C functions for manipulating strings and memory amathc.h \- C functions for manipulating strings and memory
.SH SYNOPSIS .SH SYNOPSIS
@ -82,7 +82,7 @@ amathc.h \- C functions for manipulating strings and memory
.PP .PP
.SS "unsigned int AllocAndCopy (char ** destination, const char * source)" .SS "unsigned int AllocAndCopy (char ** destination, const char * source)"
.PP .PP
Allocate memory and copy a string into the array\&. Allocate memory and copy a string into the array\&.
.PP .PP
Definition at line 40 of file alloccpy\&.c\&. Definition at line 40 of file alloccpy\&.c\&.
.PP .PP
@ -90,32 +90,32 @@ Definition at line 40 of file alloccpy\&.c\&.
41 { 41 {
42 char *i, *s, *d; 42 char *i, *s, *d;
43 unsigned int n, size; 43 unsigned int n, size;
44 44
45 if (source == nullptr) 45 if (source == nullptr)
46 { 46 {
47 *destination = nullptr; 47 *destination = nullptr;
48 return 0; 48 return 0;
49 } 49 }
50 50
51 i = (char*)source; 51 i = (char*)source;
52 s = (char*)source; 52 s = (char*)source;
53 while (*i) 53 while (*i)
54 i++; 54 i++;
55 55
56 n = (unsigned int)(i - s + 1); 56 n = (unsigned int)(i - s + 1);
57 size = n; 57 size = n;
58 *destination = AllocMemSafe(size); 58 *destination = AllocMemSafe(size);
59 d = *destination; 59 d = *destination;
60 60
64 while (n--) 64 while (n--)
65 *d++ = *s++; 65 *d++ = *s++;
67 67
68 return size; 68 return size;
69 } 69 }
.fi .fi
.SS "void* AllocMemSafe (size_t)" .SS "void* AllocMemSafe (size_t)"
.PP .PP
Allocate memory and add it to the global memory list\&. Allocate memory and add it to the global memory list\&.
.PP .PP
Definition at line 86 of file mem\&.c\&. Definition at line 86 of file mem\&.c\&.
.PP .PP
@ -123,7 +123,7 @@ Definition at line 86 of file mem\&.c\&.
87 { 87 {
88 struct MemoryBlock* newblock; 88 struct MemoryBlock* newblock;
89 size_t allocsize; 89 size_t allocsize;
90 90
91 if (list == nullptr) 91 if (list == nullptr)
92 { 92 {
93 list = (struct MemoryList*)ALLOC_MEM(sizeof(struct MemoryList)); 93 list = (struct MemoryList*)ALLOC_MEM(sizeof(struct MemoryList));
@ -132,13 +132,13 @@ Definition at line 86 of file mem\&.c\&.
96 alloc_error("list", sizeof(struct MemoryList)); 96 alloc_error("list", sizeof(struct MemoryList));
97 return 0; 97 return 0;
98 } 98 }
99 99
100 list->first = nullptr; 100 list->first = nullptr;
101 list->peak = 0; 101 list->peak = 0;
102 list->size = 0; 102 list->size = 0;
103 list->count = 0; 103 list->count = 0;
104 } 104 }
105 105
106 #ifdef P64BIT 106 #ifdef P64BIT
107 // Align to bytes of 8 107 // Align to bytes of 8
108 allocsize = (size + 7) & ~0x07; 108 allocsize = (size + 7) & ~0x07;
@ -146,14 +146,14 @@ Definition at line 86 of file mem\&.c\&.
110 // Align to bytes of 4 110 // Align to bytes of 4
111 allocsize = (size + 3) & ~0x03; 111 allocsize = (size + 3) & ~0x03;
112 #endif 112 #endif
113 113
114 newblock = (struct MemoryBlock*)ALLOC_MEM(sizeof(struct MemoryBlock)); 114 newblock = (struct MemoryBlock*)ALLOC_MEM(sizeof(struct MemoryBlock));
115 if (!newblock) 115 if (!newblock)
116 { 116 {
117 alloc_error("block", sizeof(struct MemoryBlock)); 117 alloc_error("block", sizeof(struct MemoryBlock));
118 return 0; 118 return 0;
119 } 119 }
120 120
121 newblock->address = (struct MemoryBlock*)ALLOC_MEM(allocsize); 121 newblock->address = (struct MemoryBlock*)ALLOC_MEM(allocsize);
122 if (!newblock->address) 122 if (!newblock->address)
123 { 123 {
@ -161,25 +161,25 @@ Definition at line 86 of file mem\&.c\&.
125 alloc_error("memory", allocsize); 125 alloc_error("memory", allocsize);
126 return 0; 126 return 0;
127 } 127 }
128 128
129 newblock->size = allocsize; 129 newblock->size = allocsize;
130 newblock->next = list->first; 130 newblock->next = list->first;
131 list->first = newblock; 131 list->first = newblock;
132 list->size += allocsize; 132 list->size += allocsize;
133 list->count++; 133 list->count++;
134 134
135 if (list->size > list->peak) 135 if (list->size > list->peak)
136 { 136 {
137 list->peak = list->size; 137 list->peak = list->size;
138 } 138 }
139 139
140 // Memory allocated 140 // Memory allocated
141 return newblock->address; 141 return newblock->address;
142 } 142 }
.fi .fi
.SS "void DetachMemSafe (void * block)" .SS "void DetachMemSafe (void * block)"
.PP .PP
Detach an allocated memory from the global memory list\&. The memory block is only detached, not deallocated\&. Detach an allocated memory from the global memory list\&. The memory block is only detached, not deallocated\&.
.PP .PP
Definition at line 209 of file mem\&.c\&. Definition at line 209 of file mem\&.c\&.
.PP .PP
@ -190,19 +190,19 @@ Definition at line 209 of file mem\&.c\&.
.fi .fi
.SS "void FreeAllSafe ()" .SS "void FreeAllSafe ()"
.PP .PP
Deallocate all memory in the global memory list\&. Deallocate all memory in the global memory list\&.
.PP .PP
Definition at line 217 of file mem\&.c\&. Definition at line 217 of file mem\&.c\&.
.PP .PP
.nf .nf
218 { 218 {
219 struct MemoryBlock *current, *next; 219 struct MemoryBlock *current, *next;
220 220
221 if (list == nullptr) 221 if (list == nullptr)
222 { 222 {
223 return; 223 return;
224 } 224 }
225 225
226 current = list->first; 226 current = list->first;
227 while (current != nullptr) 227 while (current != nullptr)
228 { 228 {
@ -211,14 +211,14 @@ Definition at line 217 of file mem\&.c\&.
231 FREE_MEM(current); 231 FREE_MEM(current);
232 current = next; 232 current = next;
233 } 233 }
234 234
235 FREE_MEM(list); 235 FREE_MEM(list);
236 list = nullptr; 236 list = nullptr;
237 } 237 }
.fi .fi
.SS "void FreeMemSafe (void *)" .SS "void FreeMemSafe (void *)"
.PP .PP
Deallocate memory from the global memory list\&. Deallocate memory from the global memory list\&.
.PP .PP
Definition at line 200 of file mem\&.c\&. Definition at line 200 of file mem\&.c\&.
.PP .PP
@ -229,7 +229,7 @@ Definition at line 200 of file mem\&.c\&.
.fi .fi
.SS "void MemCopy (void * destination, const void * source, unsigned int length)" .SS "void MemCopy (void * destination, const void * source, unsigned int length)"
.PP .PP
Copy a block of memory, handling overlap\&. Copy a block of memory, handling overlap\&.
.PP .PP
Definition at line 75 of file memcpy\&.c\&. Definition at line 75 of file memcpy\&.c\&.
.PP .PP
@ -238,10 +238,10 @@ Definition at line 75 of file memcpy\&.c\&.
77 char* dst = (char*) destination; 77 char* dst = (char*) destination;
78 const char* src = (const char*) source; 78 const char* src = (const char*) source;
79 unsigned int t; 79 unsigned int t;
80 80
81 if (length == 0 || dst == src) // nothing to do 81 if (length == 0 || dst == src) // nothing to do
82 return; 82 return;
83 83
84 if ((mem_ptr)dst < (mem_ptr)src) 84 if ((mem_ptr)dst < (mem_ptr)src)
85 { 85 {
86 // Copy forward 86 // Copy forward
@ -254,14 +254,14 @@ Definition at line 75 of file memcpy\&.c\&.
96 else 96 else
97 t = wsize - (t & wmask); 97 t = wsize - (t & wmask);
98 length -= t; 98 length -= t;
99 99
100 TLOOP1(*dst++ = *src++); 100 TLOOP1(*dst++ = *src++);
101 } 101 }
102 102
103 // Copy whole words, then mop up any trailing bytes\&. 103 // Copy whole words, then mop up any trailing bytes\&.
104 t = length / wsize; 104 t = length / wsize;
105 TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize); 105 TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
106 106
107 t = length & wmask; 107 t = length & wmask;
108 TLOOP(*dst++ = *src++); 108 TLOOP(*dst++ = *src++);
110 } 110 }
@ -280,13 +280,13 @@ Definition at line 75 of file memcpy\&.c\&.
123 else 123 else
124 t &= wmask; 124 t &= wmask;
125 length -= t; 125 length -= t;
126 126
127 TLOOP1(*--dst = *--src); 127 TLOOP1(*--dst = *--src);
128 } 128 }
129 129
130 t = length / wsize; 130 t = length / wsize;
131 TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src); 131 TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
132 132
133 t = length & wmask; 133 t = length & wmask;
134 TLOOP(*--dst = *--src); 134 TLOOP(*--dst = *--src);
135 } 135 }
@ -294,7 +294,7 @@ Definition at line 75 of file memcpy\&.c\&.
.fi .fi
.SS "void MemSet (void * destination, int c0, unsigned int length)" .SS "void MemSet (void * destination, int c0, unsigned int length)"
.PP .PP
Fill block of memory with a constant value\&. Fill block of memory with a constant value\&.
.PP .PP
Definition at line 56 of file memset\&.c\&. Definition at line 56 of file memset\&.c\&.
.PP .PP
@ -303,7 +303,7 @@ Definition at line 56 of file memset\&.c\&.
58 unsigned char* dst = (unsigned char*) dst0; 58 unsigned char* dst = (unsigned char*) dst0;
59 unsigned int t; 59 unsigned int t;
60 unsigned int c; 60 unsigned int c;
61 61
62 /* 62 /*
63 * If not enough words, just fill bytes\&. A length >= 2 words 63 * If not enough words, just fill bytes\&. A length >= 2 words
64 * guarantees that at least one of them is `complete' after 64 * guarantees that at least one of them is `complete' after
@ -325,7 +325,7 @@ Definition at line 56 of file memset\&.c\&.
80 --length; 80 --length;
81 } 81 }
82 } 82 }
83 83
84 if ((c = (unsigned char)c0) != 0) 84 if ((c = (unsigned char)c0) != 0)
85 { /* Fill the word\&. */ 85 { /* Fill the word\&. */
86 c = (c << 8) | c; /* u_int is 16 bits\&. */ 86 c = (c << 8) | c; /* u_int is 16 bits\&. */
@ -336,7 +336,7 @@ Definition at line 56 of file memset\&.c\&.
91 c = (c << 32) | c; /* u_int is 64 bits\&. */ 91 c = (c << 32) | c; /* u_int is 64 bits\&. */
92 #endif 92 #endif
93 } 93 }
94 94
95 /* Align destination by filling in bytes\&. */ 95 /* Align destination by filling in bytes\&. */
96 if ((t = (mem_ptr)dst & wmask) != 0) 96 if ((t = (mem_ptr)dst & wmask) != 0)
97 { 97 {
@ -348,7 +348,7 @@ Definition at line 56 of file memset\&.c\&.
103 } 103 }
104 while (--t != 0); 104 while (--t != 0);
105 } 105 }
106 106
107 /* Fill words\&. Length was >= 2*words so we know t >= 1 here\&. */ 107 /* Fill words\&. Length was >= 2*words so we know t >= 1 here\&. */
108 t = length / wsize; 108 t = length / wsize;
109 do 109 do
@ -357,7 +357,7 @@ Definition at line 56 of file memset\&.c\&.
112 dst += wsize; 112 dst += wsize;
113 } 113 }
114 while (--t != 0); 114 while (--t != 0);
115 115
116 /* Mop up trailing bytes, if any\&. */ 116 /* Mop up trailing bytes, if any\&. */
117 t = length & wmask; 117 t = length & wmask;
118 if (t != 0) 118 if (t != 0)
@ -370,7 +370,7 @@ Definition at line 56 of file memset\&.c\&.
.fi .fi
.SS "void MemUsage (long *, long *, long *)" .SS "void MemUsage (long *, long *, long *)"
.PP .PP
Get memory usage in the global memory list\&. Get memory usage in the global memory list\&.
.PP .PP
Definition at line 242 of file mem\&.c\&. Definition at line 242 of file mem\&.c\&.
.PP .PP
@ -383,26 +383,26 @@ Definition at line 242 of file mem\&.c\&.
.fi .fi
.SS "bool StrIsEqual (const char * s1, const char * s2)" .SS "bool StrIsEqual (const char * s1, const char * s2)"
.PP .PP
Compare two null terminated strings to each other\&. Compare two null terminated strings to each other\&.
.PP .PP
Definition at line 50 of file strcmp\&.c\&. Definition at line 50 of file strcmp\&.c\&.
.PP .PP
.nf .nf
51 { 51 {
52 int r; 52 int r;
53 53
54 while (*s1 == *s2++) 54 while (*s1 == *s2++)
55 if (*s1++ == '\0') 55 if (*s1++ == '\0')
56 return true; 56 return true;
57 57
58 r = (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); 58 r = (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
59 59
60 return r == 0; 60 return r == 0;
61 } 61 }
.fi .fi
.SS "int StrLen (const char * string)" .SS "int StrLen (const char * string)"
.PP .PP
Get the length of a null terminated string\&. Get the length of a null terminated string\&.
.PP .PP
Definition at line 34 of file strlen\&.c\&. Definition at line 34 of file strlen\&.c\&.
.PP .PP
@ -424,10 +424,10 @@ Definition at line 32 of file untag\&.c\&.
34 const char *pos, *tmp, *tag; 34 const char *pos, *tmp, *tag;
35 char* dest; 35 char* dest;
36 int unsigned i, j, found; 36 int unsigned i, j, found;
37 37
38 pos = source; 38 pos = source;
39 dest = destination; 39 dest = destination;
40 40
41 while (*pos != '\0') 41 while (*pos != '\0')
42 { 42 {
43 if (*pos != '#') 43 if (*pos != '#')
@ -449,7 +449,7 @@ Definition at line 32 of file untag\&.c\&.
59 tag++; 59 tag++;
60 j++; 60 j++;
61 } 61 }
62 62
63 if (j > 1 && *(--tag) == '#') 63 if (j > 1 && *(--tag) == '#')
64 { 64 {
65 // Tag found\&. Now replace\&. 65 // Tag found\&. Now replace\&.
@ -461,7 +461,7 @@ Definition at line 32 of file untag\&.c\&.
71 break; 71 break;
72 } 72 }
73 } 73 }
74 74
75 if (!found) 75 if (!found)
76 { 76 {
77 (*dest++ = *pos++); 77 (*dest++ = *pos++);
@ -472,14 +472,14 @@ Definition at line 32 of file untag\&.c\&.
82 } 82 }
.fi .fi
.SH HOMEPAGE .SH HOMEPAGE
http://amath.innolan.net/ https://amath.innolan.net/
.SH AUTHORS .SH AUTHORS
.PP .PP
Written by Carsten Sonne Larsen <cs@innolan.net>. The code in MemSet and 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 MemCopy is derived from software contributed to Berkeley by Mike Hibler and
Chris Torek. Chris Torek.
.SH COPYRIGHT .SH COPYRIGHT
Copyright (c) 2014-2017 Carsten Sonne Larsen <cs@innolan.net> Copyright (c) 2014-2021 Carsten Sonne Larsen <cs@innolan.net>
.br .br
Copyright (c) 2007 The NetBSD Foundation, Inc. Copyright (c) 2007 The NetBSD Foundation, Inc.
.br .br

View File

@ -1,10 +1,10 @@
DOXYFILE_ENCODING = UTF-8 DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "amathc" PROJECT_NAME = "amathc"
PROJECT_NUMBER = "1.8.0" PROJECT_NUMBER = "1.9.0"
PROJECT_BRIEF = "C functions for manipulating strings and memory" PROJECT_BRIEF = "C functions for manipulating strings and memory"
PROJECT_LOGO = PROJECT_LOGO =
OUTPUT_DIRECTORY = OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English

View File

@ -5,6 +5,6 @@ libdir=${exec_prefix}/lib
Name: amath C library Name: amath C library
Description: C functions for manipulating strings and memory Description: C functions for manipulating strings and memory
Version: 1.8.0 Version: 1.9.0
Cflags: -I${includedir} Cflags: -I${includedir}
Libs: -L${libdir} -lamathc Libs: -L${libdir} -lamathc

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -23,30 +23,34 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "amathc.h" #include "amathc.h"
#ifdef AMIGA #if defined(AMIGA)
#include <stddef.h> #include <stddef.h>
#include <exec/types.h> #include <exec/types.h>
#include <exec/memory.h> #include <exec/memory.h>
#include <exec/semaphores.h> #include <exec/semaphores.h>
#include <clib/exec_protos.h> #include <clib/exec_protos.h>
#define ALLOC_MEM(x) AllocVec(x, MEMF_ANY | MEMF_CLEAR) #define ALLOC_LIST(x) AllocVec(x, MEMF_ANY | MEMF_CLEAR)
#define FREE_MEM(x) FreeVec(x) #define FREE_LIST(x) FreeVec(x)
#define Debug(x,y,z) #define ALLOC_MEM(x, y) AllocPooledZero(x, y)
#define FREE_MEM(x, y, z) FreePooled(x, y, z)
#define Debug(x, y, z)
#else #else
#include <stdlib.h> #include <stdlib.h>
#define ALLOC_MEM(x) calloc(1L,x) #define ALLOC_LIST(x) calloc(1L, x)
#define FREE_MEM(x) free(x) #define FREE_LIST(x) free(x)
#define Debug(x,y,z) #define ALLOC_MEM(x, y) calloc(1L, y)
#define FREE_MEM(x, y, z) free(y)
#define Debug(x, y, z)
#endif #endif
#if defined(__x86_64__) || defined(__aarch64__) || \ #if defined(__x86_64__) || defined(__aarch64__) || \
defined(_M_AMD64) || defined(_M_ARM64) || \ defined(_M_AMD64) || defined(_M_ARM64) || \
defined(__powerpc64__) defined(__powerpc64__)
#define P64BIT #define P64BIT
#endif #endif
@ -56,9 +60,9 @@
*/ */
struct MemoryBlock struct MemoryBlock
{ {
struct MemoryBlock* next; struct MemoryBlock *next;
size_t size; size_t size;
void* address; void *address;
}; };
/** /**
@ -66,7 +70,8 @@ struct MemoryBlock
*/ */
struct MemoryList struct MemoryList
{ {
struct MemoryBlock* first; struct MemoryBlock *first;
void *pool;
size_t peak; size_t peak;
size_t size; size_t size;
long count; long count;
@ -75,28 +80,56 @@ struct MemoryList
/** /**
* @brief Global list of allocated memory. * @brief Global list of allocated memory.
*/ */
struct MemoryList* list = nullptr; struct MemoryList *list = nullptr;
void alloc_error(char*, size_t); void alloc_error(char *, size_t);
void dealloc_error(char*, void*); void dealloc_error(char *, void *);
#if defined(AMIGA)
static void MemZero(void *address, ULONG size)
{
char *c = (char *)address;
int n = size;
do
{
*c++ = '\0';
} while (--n);
}
static void *AllocPooledZero(void *pool, size_t size)
{
ULONG memSize = (ULONG)size;
void *memory = AllocPooled(pool, memSize);
if (memory != NULL)
{
MemZero(memory, memSize);
}
return memory;
}
#endif
/** /**
* @brief Allocate memory and add it to the global memory list. * @brief Allocate memory and add it to the global memory list.
*/ */
void* AllocMemSafe(size_t size) void *AllocMemSafe(size_t size)
{ {
struct MemoryBlock* newblock; struct MemoryBlock *newblock;
size_t allocsize; size_t allocsize;
if (list == nullptr) if (list == nullptr)
{ {
list = (struct MemoryList*)ALLOC_MEM(sizeof(struct MemoryList)); list = (struct MemoryList *)ALLOC_LIST(sizeof(struct MemoryList));
if (!list) if (!list)
{ {
alloc_error("list", sizeof(struct MemoryList)); alloc_error("list", sizeof(struct MemoryList));
return 0; return 0;
} }
#if defined(AMIGA)
list->pool = CreatePool(MEMF_ANY, 4096, 512);
#endif
list->first = nullptr; list->first = nullptr;
list->peak = 0; list->peak = 0;
list->size = 0; list->size = 0;
@ -104,24 +137,24 @@ void* AllocMemSafe(size_t size)
} }
#ifdef P64BIT #ifdef P64BIT
// Align to bytes of 8 // Align to bytes of 8, remove 0 bytes allocations
allocsize = (size + 7) & ~0x07; allocsize = (size + 8) & ~0x07;
#else #else
// Align to bytes of 4 // Align to bytes of 4, remove 0 bytes allocations
allocsize = (size + 3) & ~0x03; allocsize = (size + 4) & ~0x03;
#endif #endif
newblock = (struct MemoryBlock*)ALLOC_MEM(sizeof(struct MemoryBlock)); newblock = (struct MemoryBlock *)ALLOC_MEM(list->pool, sizeof(struct MemoryBlock));
if (!newblock) if (newblock == NULL)
{ {
alloc_error("block", sizeof(struct MemoryBlock)); alloc_error("block", sizeof(struct MemoryBlock));
return 0; return 0;
} }
newblock->address = (struct MemoryBlock*)ALLOC_MEM(allocsize); newblock->address = (struct MemoryBlock *)ALLOC_MEM(list->pool, allocsize);
if (!newblock->address) if (newblock->address == NULL)
{ {
FREE_MEM(newblock); FREE_MEM(list->pool, newblock, sizeof(struct MemoryBlock));
alloc_error("memory", allocsize); alloc_error("memory", allocsize);
return 0; return 0;
} }
@ -141,7 +174,7 @@ void* AllocMemSafe(size_t size)
return newblock->address; return newblock->address;
} }
void RemoveMemSafe(void* block, bool deallocate) void RemoveMemSafe(void *block, bool deallocate)
{ {
struct MemoryBlock *current, *previous; struct MemoryBlock *current, *previous;
@ -185,19 +218,19 @@ void RemoveMemSafe(void* block, bool deallocate)
if (deallocate) if (deallocate)
{ {
FREE_MEM(current->address); FREE_MEM(list->pool, current->address, current->size);
} }
current->address = nullptr; current->address = nullptr;
current->next = nullptr; current->next = nullptr;
current->size = 0; current->size = 0;
FREE_MEM(current); FREE_MEM(list->pool, current, sizeof(struct MemoryBlock));
} }
/** /**
* @brief Deallocate memory from the global memory list. * @brief Deallocate memory from the global memory list.
*/ */
void FreeMemSafe(void* block) void FreeMemSafe(void *block)
{ {
RemoveMemSafe(block, true); RemoveMemSafe(block, true);
} }
@ -206,7 +239,7 @@ void FreeMemSafe(void* block)
* @brief Detach an allocated memory from the global memory list. * @brief Detach an allocated memory from the global memory list.
* @details The memory block is only detached, not deallocated. * @details The memory block is only detached, not deallocated.
*/ */
void DetachMemSafe(void* block) void DetachMemSafe(void *block)
{ {
RemoveMemSafe(block, false); RemoveMemSafe(block, false);
} }
@ -227,29 +260,34 @@ void FreeAllSafe()
while (current != nullptr) while (current != nullptr)
{ {
next = current->next; next = current->next;
FREE_MEM(current->address); FREE_MEM(list->pool, current->address, current->size);
FREE_MEM(current); FREE_MEM(list->pool, current, sizeof(struct MemoryBlock));
current = next; current = next;
} }
FREE_MEM(list); #if defined(AMIGA)
DeletePool(list->pool);
#endif
FREE_LIST(list);
list = nullptr; list = nullptr;
} }
/** /**
* @brief Get memory usage in the global memory list. * @brief Get memory usage in the global memory list.
*/ */
void MemUsage(long* blocks, long* size, long* peak) void MemUsage(long *blocks, long *size, long *peak)
{ {
*blocks = list->count; *blocks = list->count;
*size = (long)list->size; *size = (long)list->size;
*peak = (long)list->peak;; *peak = (long)list->peak;
;
} }
/** /**
* @brief Log a memory allocation error * @brief Log a memory allocation error
*/ */
void alloc_error(char* descr, size_t size) void alloc_error(char *descr, size_t size)
{ {
Debug("Memory allocation error (%s) with size (%d)\n", descr, size); Debug("Memory allocation error (%s) with size (%d)\n", descr, size);
//if (size == 0) //if (size == 0)
@ -259,7 +297,7 @@ void alloc_error(char* descr, size_t size)
/** /**
* @brief Log a memory deallocation error * @brief Log a memory deallocation error
*/ */
void dealloc_error(char* descr, void* p) void dealloc_error(char *descr, void *p)
{ {
Debug("Memory deallocation error (%s) address (%x)\n", descr, p); Debug("Memory deallocation error (%s) address (%x)\n", descr, p);
} }

View File

@ -47,7 +47,7 @@
#pragma GCC diagnostic ignored "-Wcast-align" #pragma GCC diagnostic ignored "-Wcast-align"
#endif #endif
#ifdef AMIGA #if defined(AMIGA)
#include <clib/exec_protos.h> #include <clib/exec_protos.h>
#endif #endif
@ -84,7 +84,7 @@ void MemCopy(void* destination, const void* source, unsigned int length)
if ((mem_ptr)dst < (mem_ptr)src) if ((mem_ptr)dst < (mem_ptr)src)
{ {
// Copy forward // Copy forward
#ifdef AMIGA // Take advantage of exec #if defined(AMIGA) // Take advantage of exec
CopyMem((void*)source, destination, length); CopyMem((void*)source, destination, length);
#else #else
t = (mem_ptr)src; // only need low bits t = (mem_ptr)src; // only need low bits

View File

@ -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. * Copyright (c) 1990, 1993 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* *
@ -27,8 +27,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
/** /**

View File

@ -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. * Copyright (c) 1990, 1993 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* *
@ -27,8 +27,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
/** /**

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
/** /**

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "amathc.h" #include "amathc.h"

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
DOXYFILE_ENCODING = UTF-8 DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "amathi" PROJECT_NAME = "amathi"
PROJECT_NUMBER = "1.8.0" PROJECT_NUMBER = "1.9.0"
PROJECT_BRIEF = "Complex numbers math library" PROJECT_BRIEF = "Complex numbers math library"
PROJECT_LOGO = PROJECT_LOGO =
OUTPUT_DIRECTORY = OUTPUT_DIRECTORY =
CREATE_SUBDIRS = NO CREATE_SUBDIRS = NO
ALLOW_UNICODE_NAMES = NO ALLOW_UNICODE_NAMES = NO
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English

View File

@ -5,6 +5,6 @@ libdir=${exec_prefix}/lib
Name: amath complex library Name: amath complex library
Description: Complex numbers math library Description: Complex numbers math library
Version: 1.8.0 Version: 1.9.0
Cflags: -I${includedir} Cflags: -I${includedir}
Libs: -L${libdir} -lamathi Libs: -L${libdir} -lamathi

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -27,8 +27,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ccos.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ccos.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ccosh.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ccosh.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cexp.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cexp.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/clog.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/clog.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cpow.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cpow.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/csin.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/csin.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/csinh.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/csinh.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/csqrt.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/csqrt.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ctan.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ctan.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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) 2007 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
* *
@ -30,8 +30,8 @@
* http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ctanh.c?rev=1.1 * http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/ctanh.c?rev=1.1
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "prim.h" #include "prim.h"

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#ifndef AMATH_LIB_COMPLEX_PRIM_H #ifndef AMATH_LIB_COMPLEX_PRIM_H

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#include "amath.h" #include "amath.h"
@ -190,7 +190,7 @@ const char* AnsiConoleEngine::ProcessChar(const unsigned char character)
} }
else else
{ {
out->Append(DELETE1CHARASC); out->Append(DELETE1CHARASC);
} }
endpos--; endpos--;
linebuf->ptr = endpos; linebuf->ptr = endpos;
@ -234,7 +234,7 @@ const char* AnsiConoleEngine::ProcessChar(const unsigned char character)
} }
else else
{ {
out->Append(DELETE1CHARASC); out->Append(DELETE1CHARASC);
} }
cursor--; cursor--;
endpos--; endpos--;

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
#ifndef AMATH_ANSI_CONSOLE_ENGINE #ifndef AMATH_ANSI_CONSOLE_ENGINE

View File

@ -5,6 +5,6 @@ libdir=${exec_prefix}/lib
Name: amath application library Name: amath application library
Description: C++ library for handling numbers Description: C++ library for handling numbers
Version: 1.8.0 Version: 1.9.0
Cflags: -I${includedir} Cflags: -I${includedir}
Libs: -L${libdir} -lamathapp -lamathr -lamathi -lamathc Libs: -L${libdir} -lamathapp -lamathr -lamathi -lamathc

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
/* /*

View File

@ -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. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * 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. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Project homepage: * Project homepage:
* http://amath.innolan.net * https://amath.innolan.net
* *
*/ */
/* /*

Some files were not shown because too many files have changed in this diff Show More