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

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