239 Commits

Author SHA1 Message Date
  Carsten Sonne Larsen 811644f4c7 Zero out allocated memory 9 months ago
  Carsten Sonne Larsen d7fe11d56a Take advantage of memory pools 9 months ago
  Carsten Sonne Larsen d7add409cd Identify systems more uniquely 9 months ago
  Carsten Sonne Larsen d910b98571 Cleanup and avoid OS conflicts (REQ #3) 9 months ago
  Carsten Sonne Larsen ea2bf72d7b MorphOS compatibility (REQ #4) 9 months ago
  Carsten Sonne Larsen e788fec496 ARexx only instance 9 months ago
  Carsten Sonne Larsen ffa586c694 Allow to quit console with CTRL + C 9 months ago
  Carsten Sonne Larsen 0240d3a439 Only show result when using ARexx 9 months ago
  Carsten Sonne Larsen 93c8fdbef4 To ensure compatibility, set fraction point to full stop / period 9 months ago
  Carsten Sonne Larsen dd7884bc22 Cleanup after building catalogs 9 months ago
  Carsten Sonne Larsen 65fafb750f Improved install script 9 months ago
  Carsten Sonne Larsen 2164e79aef Distribution files 9 months ago
  Carsten Sonne Larsen 87c65aa678 Include Debian build in source 9 months ago
  Carsten Sonne Larsen 2c9e8bece3 Update copyright text 9 months ago
  Carsten Sonne Larsen ee26a57960 Release 1.9.0 9 months ago
  Carsten Sonne Larsen 538ad4ac23 ARexx test script 9 months ago
  Carsten Sonne Larsen 524f83f22f Cleanup Amiga specific code 9 months ago
  Carsten Sonne Larsen 9e712377a4 Update copyright 9 months ago
  Carsten Sonne Larsen 6eb56b056e ARexx support 9 months ago
  Carsten Sonne Larsen 3a52c27a9c new AppendNumber method 9 months ago
  Carsten Larsen f8cf191a46 Fix PowerPC build 3 years ago
  Carsten Sonne Larsen aeb7f2e92c Detect system name 3 years ago
  Carsten Sonne Larsen 49b36ce2a3 Remove search option 3 years ago
  Carsten Sonne Larsen f7de7b1447 Update links 3 years ago
  Carsten Sonne Larsen d4ad72d17f Fix wrong year 3 years ago
  Carsten Sonne Larsen 8632644b9d Update to version 1.8.5 3 years ago
  Carsten Sonne Larsen 9c70be649b Fix build on compilers with broken endian detection 3 years ago
  Carsten Sonne Larsen fb19bb560d Fix GCC 7 warnings 3 years ago
  Carsten Sonne Larsen 527376a92a Merge branch 'master' of https://gitlab.com/rnger/amath 3 years ago
  Carsten Sonne Larsen 970ae6456f Merge branch 'master' of https://gitlab.com/rnger/amath 4 years ago
  Carsten Sonne Larsen 56d9566000 rebase and change commit email to cs@innolan.net 4 years ago
  Carsten Sonne Larsen 16530a94d1 Merge branch 'master' of https://gitlab.com/rnger/amath 4 years ago
  Carsten Sonne Larsen 882eb43a4f Update headers 4 years ago
  Carsten Sonne Larsen 7114efc1cc Update script 4 years ago
  Carsten Sonne Larsen e64c56123d Add debian build script 4 years ago
  Carsten Sonne Larsen 2cdc5b8aae Release 1.8.3 4 years ago
  Carsten Sonne Larsen b76a2dccc5 Add more CC BY-SA texts 4 years ago
  Carsten Sonne Larsen 656038d482 Cleanup man page 4 years ago
  Carsten Larsen c625ec29f7 Cleanup help texts 4 years ago
  Carsten Larsen 4aae661801 Include less common abbreviations 4 years ago
  Carsten Larsen 3f75c41166 Add known bugs 4 years ago
  Carsten Larsen 51e6ece52d ANSI mode is alway changeable as default 4 years ago
  Carsten Larsen 1a2ef9b018 Stress with explicit in clang option 4 years ago
  Carsten Larsen 012c0ee1a6 Cleanup history 4 years ago
  Carsten Larsen f78304c8e1 Fix build error in shared clib 4 years ago
  Carsten Larsen 9e2d708eb7 Allow man-dir and doc-dir while configuring 4 years ago
  Carsten Larsen 36fd6e090d Release 1.8.2 4 years ago
  Carsten Larsen 49b6ecd09d Update project homepage 4 years ago
  Carsten Larsen 4b44d05953 Improve endianness detection 4 years ago
  Carsten Larsen 263636bb04 Update release date 5 years ago
  Carsten Larsen 70c6ae9579 Hint GCC6 5 years ago
  Carsten Larsen 4085981ca7 Update changelog 5 years ago
  Carsten Larsen 69377b26ed Update release date 5 years ago
  Carsten Larsen 7431e61c3c Improved configuration 5 years ago
  Carsten Larsen e73cce1894 Fix haiku bug 5 years ago
  Carsten Larsen 2a00f9556d Fix clear statement 5 years ago
  Carsten Larsen a1b521840a Option for Position Independent Code 5 years ago
  Carsten Larsen 30a23a4e0f Bumped version 5 years ago
  Carsten Larsen 258188d994 Cleanup defines 5 years ago
  Carsten Larsen bf39a0c868 Release 1.8.0 5 years ago
  Carsten Larsen 0118d94326 Fix wrong version number 5 years ago
  Carsten Larsen f3dd6d8baa Release 1.7.1 5 years ago
  Carsten Larsen a301c85e15 Release 1.7.0 5 years ago
  Carsten Larsen 87f0d88b26 Fix Makefiles 5 years ago
  Carsten Larsen dd6e11cdb4 Prerelease 1.7.0 5 years ago
  Carsten Larsen 9144b77c70 Prerelease 1.7.0 5 years ago
  Carsten Larsen e7b46a06be Improved tests 5 years ago
  Carsten Larsen 8c1a88ebe7 Cleanup debug code 5 years ago
  Carsten Larsen 217d70e23a Fix file permissions 5 years ago
  Carsten Larsen 28c1559ed0 Fix typo 5 years ago
  Carsten Larsen dc26550dd5 Remove old build defs 5 years ago
  Carsten Larsen 397c6c37c9 Include test and install target 5 years ago
  Carsten Larsen dadd23aea8 Take advantage of exec 5 years ago
  Carsten Larsen 34c843f2b5 Fix build definitions 5 years ago
  Carsten Larsen 3483dd5283 Correct Debian version 5 years ago
  Carsten Larsen 667fe2baeb Release 1.6.4 5 years ago
  Carsten Larsen 88301bafc5 Fix MSVC++ memory allocation 5 years ago
  Carsten Larsen b896dab8a8 Update Makefile 5 years ago
  Carsten Larsen 818df0fc87 Fix 64 bit warnings 5 years ago
  Carsten Larsen d148be57b3 Remove old binaries 5 years ago
  Carsten Larsen e988bbbd9f Fix 64 bit alignment errors 5 years ago
  Carsten Larsen af7bf8a97a Fixed truncation bug 5 years ago
  Carsten Larsen a56173487f Release 1.6.3 5 years ago
  Carsten Larsen 62f29f1e0e Update change list 5 years ago
  Carsten Larsen aec499543d Fix Debian version number 5 years ago
  Carsten Larsen e10734c005 Haiku support 5 years ago
  Carsten Larsen abd4bb8929 Cleanup tests 5 years ago
  Carsten Larsen eb1d7f74e4 Add NetBSD link 5 years ago
  Carsten Larsen bd4baa277f Cleanup headers 5 years ago
  Carsten Larsen 3f94ebc6b0 Fix Debian build 5 years ago
  Carsten Larsen 11b4bdc70d Detect endianness for more CPUs 5 years ago
  Carsten Larsen 83760eb15a Test fraction point character 5 years ago
  Carsten Larsen 57e74e12b0 Debian multiarch support 5 years ago
  Carsten Larsen 1551700ec1 Debian build script 5 years ago
  Carsten Larsen 81ba8a83e2 Extend tests 5 years ago
  Carsten Larsen 5c041e7762 Update documentation 5 years ago
  Carsten Larsen dc5d092c4e Move documentation to own repository 5 years ago
  Carsten Larsen 7a63687d4b Prepare release 1.6.3 5 years ago
  Carsten Larsen 86d5a56fa7 Update scan-build report 5 years ago
  Carsten Larsen 848b9f1987 Improve error handling 5 years ago
  Carsten Larsen 8b81543eed Optimize for 64 bit PowerPC 5 years ago
  Carsten Larsen 2bbebe575f Fix typo 5 years ago
  Carsten Larsen 7d48450bbf Fix error in fraction point parsing 5 years ago
  Carsten Larsen b173f42b65 64 bit PowerPC detection 5 years ago
  Carsten Larsen 637b9396d9 Fix AROS build errors 5 years ago
  Carsten Larsen 3776c6e02e Update documentation 5 years ago
  Carsten Larsen c53ef12905 Add Icaros Desktop top distributions 5 years ago
  Carsten Larsen b3ac61bae3 Documentation cleanup 5 years ago
  Carsten Larsen d134ad9765 Documentation cleanup 5 years ago
  Carsten Larsen 9e2c66af53 Update documentation 5 years ago
  Carsten Larsen 1392de9ad7 Windows 1.6.2 binaries 5 years ago
  Carsten Larsen 7e218a1b70 Update to version 1.6.2 5 years ago
  Carsten Larsen 4c25f8d2fb Native character input 5 years ago
  Carsten Larsen 543f813251 Update build definitions 5 years ago
  Carsten Larsen bdae119905 Update version texts 5 years ago
  Carsten Larsen a16a3b7419 Simplify memory allocation 5 years ago
  Carsten Larsen 9ebb77637f Update documentation 5 years ago
  Carsten Larsen 95057d82db Fix newline in Windows test 5 years ago
  Carsten Larsen 75c588f51b 64 bit Windows support 5 years ago
  Carsten Larsen 462ea4ceba 64 bit support on Windows 5 years ago
  Carsten Larsen 672712ab49 Cleanup Visual Studio structure 5 years ago
  Carsten Larsen ab0c5db51d Cleanup Visual Studio structure 5 years ago
  Carsten Larsen b85a008fb2 Updated broken links 5 years ago
  Carsten Larsen 40cc850093 64 bit optimizations 5 years ago
  Carsten Larsen afbfd236a4 Clarify source origin 5 years ago
  Carsten Larsen 25c618d57f arm 64 bit support 5 years ago
  Carsten Larsen 4aefa785ad ARM support 5 years ago
  Carsten Larsen 957355545e Fixed broken link 5 years ago
  Carsten Larsen 927fc656dd Release 1.6.1 5 years ago
  Carsten Larsen f1e2979d7a Update documentation 5 years ago
  Carsten Larsen d7eca35395 Update documentation 5 years ago
  Carsten Larsen 281317d503 Disable language on Windows 5 years ago
  Carsten Larsen 3ae8e58f2b Prepare release 5 years ago
  Carsten Larsen f4d99b69de Update documentation 5 years ago
  Carsten Larsen bcb3611f14 Update documentation 5 years ago
  Carsten Larsen ded1be8026 Documentation 5 years ago
  Carsten Larsen b402fff504 Update makefile 5 years ago
  Carsten Larsen a1a5aea15e Fix potential memory leak 5 years ago
  Carsten Larsen aff002dbda scan-build results 5 years ago
  Carsten Larsen 259f73d19e Fix Microsoft Visual C++ version string 5 years ago
  Carsten Larsen 41ae34644d Simplify test 5 years ago
  Carsten Larsen e83f879211 Updated toolset 5 years ago
  Carsten Larsen 70fee59186 Updated Copyright text 5 years ago
  Carsten Larsen 79c0de3575 Fix GCC compiler error 5 years ago
  Carsten Larsen 441bed5c99 Fix GCC 2.x compiler error 5 years ago
  Carsten Larsen 910b5a7cd9 Fix AmigaOS build 5 years ago
  Carsten Larsen a08d724997 Include copyright text 5 years ago
  Carsten Larsen bc94803f91 Compiler version string 5 years ago
  Carsten Larsen 2b786bef20 clang support 5 years ago
  Carsten Larsen cbb6c747f6 Fix method signature 5 years ago
  Carsten Larsen 65f9d88562 Use correct deallocator 5 years ago
  Carsten Larsen 4ea2b3af84 Code cleanup 5 years ago
  Carsten Larsen 340a99d861 Updated readme 5 years ago
  Carsten Sonne Larsen 3ea3222b91 Added build dependecy 6 years ago
  Carsten Sonne Larsen 0651330e08 Cleanup 6 years ago
  Carsten Sonne Larsen 3010a67d7f Fixed memory bug 6 years ago
  Carsten 4228b95303 Fixed hardcoded local 6 years ago
  llsth bf8cc0b222 Basic implementation of POSIX localization 7 years ago
  llsth ffe9553471 Merge branch 'master' of https://github.com/llsth/amath 7 years ago
  llsth b711e8aeab Added text author 7 years ago
  Carsten Sonne Larsen 1752f2c546 Update README.md 7 years ago
  llsth 2478847bd9 Clarified license details 7 years ago
  llsth b26c5c81c9 Clarified license details 7 years ago
  llsth e310c982d0 Clarified license details 7 years ago
  llsth 9780e8b1c5 Clarified license details 7 years ago
  llsth 617a418a91 Clarified license details 7 years ago
  llsth 0760eaa798 Clarified license details 7 years ago
  llsth 28b94bfaf4 Win32 texts 7 years ago
  llsth e00ce964ae Win32 fixes 7 years ago
  llsth 9d85d4c699 Updated Makefile 7 years ago
  llsth cba2829664 Fixed AmigaOS build 7 years ago
  llsth 7bb7b4e955 Localization on Standard C platforms 7 years ago
  llsth f9a09c4bad Bugfixes 7 years ago
  llsth 390ff27017 Updated catalog text 7 years ago
  llsth b5ca35438d Fixed read of wrong address in empty strings 7 years ago
  llsth 2adc0edd4c Fixed wrong memory management with new 7 years ago
  llsth 37d2ba4794 Updated catalogs 7 years ago
  llsth a633d5d06a Updated README.md 7 years ago
  llsth be6681d3f0 Fixed memory bug 7 years ago
  llsth b3753232f2 Implemented localized keywords 7 years ago
  llsth fa1f153127 Updated project files 7 years ago
  llsth 4c512addad Updated make logic 7 years ago
  llsth 2f28be077b Moved catalog generation files 7 years ago
  llsth af1681cc87 localized keywords 7 years ago
  llsth 9121566b52 Included catalog and dist targets 7 years ago
  llsth 26eb3d5cda Changed to buffered output 7 years ago
  llsth 385073a256 Updated national letters 7 years ago
  llsth 58121f8c01 Update catalog generation 7 years ago
  llsth b35b9acde3 Updated language descriptions 7 years ago
  llsth f30729980e Alias in function help 7 years ago
  llsth 194830b64c Updated descriptions 7 years ago
  llsth 12657aab90 Updated descriptions 7 years ago
  llsth 6af581bbe4 Removed needless delimiters 7 years ago
  Carsten Sonne Larsen c325bd29bc Fixes spelling mistakes 7 years ago
  llsth 9cb7ef34a8 Initial commit 7 years ago
  llsth 449e0c8473 Initial language support 7 years ago
  llsth 4a0cba78cc Updated version info 7 years ago
  llsth 048f20a717 Minor bugfixes 7 years ago
  llsth 9a7af719d6 Minor bugfixes 7 years ago
  llsth 76c315bfd0 Changed faulty language logic 7 years ago
  llsth 6b4ae56c8a Updated with configure 7 years ago
  llsth c647e003d2 Updated with configure 7 years ago
  llsth c27ee67707 Updated with configure 7 years ago
  llsth f1bcdda6dc Adjusted localization 7 years ago
  llsth 5b851eee7c Fixed localization bug 7 years ago
  llsth 8624d62494 Updated catalog keys 7 years ago
  llsth 5886946f1d Basic multilingual support 7 years ago
  llsth 9d2de4b700 Included flexcat in Makefile 7 years ago
  llsth 4efc38b6b8 Accept newline as delimiter 7 years ago
  llsth f29f311ff6 Cleaned up in platform defs 7 years ago
  llsth 05efc36c6f Fixes in preferences 7 years ago
  llsth d7f8c6cbd3 Cleaned up definitions 7 years ago
  llsth c80e7c0101 Cleaned up definitions 7 years ago
  llsth f445eef190 Fixed wrong debug comparison 7 years ago
  llsth e45fae685c Fixed memory leak 7 years ago
  llsth 2c2671df31 Clean up in cross compilation 7 years ago
  llsth c918ff89e8 Fixed GCC define 7 years ago
  llsth 00acfc11e7 clean up defines 7 years ago
  llsth bcf936f4a8 License clean up 7 years ago
  llsth 280e020a20 pragma clean up 7 years ago
  llsth 5cc10f9e38 Removed GPL licensed file 7 years ago
  llsth 10860fb996 Fixed AmigaOS 3 defines 7 years ago
  llsth e73a42b69a Support for Visual Studio 7 years ago
  llsth e8b7ad9720 Support for Visual Studio 7 years ago
  llsth a99e32c5df Removed text under wrong license 7 years ago
  llsth bc4d88d894 Updated license details 7 years ago
  carsten da3ea85e80 Cross-compiler changes 7 years ago
  llsth d7b73eb2d2 Fixed AROS typecasting 7 years ago
  llsth 7b88f3119c Uncommented unfinished code 7 years ago
  llsth c19d50f03e Removed deprecated files 7 years ago
  llsth 89f78a5cdc amath-1.6.0 initial commit 7 years ago
  llsth 3ab236f0b0 Included MorphOS patch 7 years ago
  llsth 2ee6693905 Included MorphOS patch 7 years ago
  Carsten Sonne Larsen cef3b88d61 Update README.md 7 years ago
  Carsten Sonne Larsen 1ca6893513 Update README.md 7 years ago
  Carsten Sonne Larsen 02deed1853 Update README.md 7 years ago
  Carsten Sonne Larsen a60b55e01b Update README.md 7 years ago
  Carsten Sonne Larsen 904620e599 Update HISTORY 7 years ago
  Carsten Sonne Larsen b077d77668 Update README.md 7 years ago
441 changed files with 2372 additions and 1562 deletions
Split View
  1. +1
    -0
      .gitignore
  2. +19
    -0
      .vscode/c_cpp_properties.json
  3. +8
    -2
      HISTORY
  4. +1
    -1
      LICENSE
  5. +4
    -4
      amath.1
  6. +3
    -3
      amath.doxygen
  7. +4
    -0
      arexx/test.rx
  8. +166
    -0
      bin/amath.doc
  9. +41
    -0
      bin/amath.readme
  10. BIN
      bin/catalog/english.info
  11. BIN
      bin/prog/Catalog.info
  12. BIN
      bin/prog/HISTORY.info
  13. BIN
      bin/prog/LICENSE.info
  14. BIN
      bin/prog/Script.info
  15. BIN
      bin/prog/Test.info
  16. BIN
      bin/prog/amath.020.info
  17. BIN
      bin/prog/amath.030.info
  18. BIN
      bin/prog/amath.doc.info
  19. BIN
      bin/prog/amath.info
  20. BIN
      bin/root/amath.info
  21. BIN
      bin/script/complex1.info
  22. BIN
      bin/script/complex2.info
  23. BIN
      bin/script/complex3.info
  24. BIN
      bin/script/function1.info
  25. BIN
      bin/script/function2.info
  26. BIN
      bin/script/function3.info
  27. BIN
      bin/script/operators.info
  28. BIN
      bin/script/userfuncs.info
  29. BIN
      bin/script/variables.info
  30. +32
    -0
      build/doc
  31. +9
    -9
      builddeb
  32. +9
    -9
      builddebdev
  33. +86
    -27
      builddist
  34. +9
    -8
      buildsrc
  35. +4
    -4
      buildwin
  36. +5
    -5
      catalog/english/amath-help.ct
  37. +5
    -5
      catalog/english/amath-text.ct
  38. +12
    -11
      configure
  39. +100
    -84
      src/amath.h
  40. +2
    -2
      src/amathc.h
  41. +2
    -2
      src/amatht.h
  42. +2
    -2
      src/clib/alloccpy.c
  43. +51
    -51
      src/clib/amathc.3
  44. +2
    -2
      src/clib/amathc.dox
  45. +1
    -1
      src/clib/amathc.pc
  46. +77
    -39
      src/clib/mem.c
  47. +2
    -2
      src/clib/memset.c
  48. +2
    -2
      src/clib/strcmp.c
  49. +2
    -2
      src/clib/strlen.c
  50. +2
    -2
      src/clib/untag.c
  51. +178
    -178
      src/cplex/amathi.3
  52. +2
    -2
      src/cplex/amathi.dox
  53. +1
    -1
      src/cplex/amathi.pc
  54. +2
    -2
      src/cplex/cacos.c
  55. +2
    -2
      src/cplex/cacosh.c
  56. +2
    -2
      src/cplex/cacot.c
  57. +2
    -2
      src/cplex/cacoth.c
  58. +2
    -2
      src/cplex/cacsc.c
  59. +2
    -2
      src/cplex/cacsch.c
  60. +2
    -2
      src/cplex/casec.c
  61. +2
    -2
      src/cplex/casech.c
  62. +2
    -2
      src/cplex/casin.c
  63. +2
    -2
      src/cplex/casinh.c
  64. +2
    -2
      src/cplex/catan.c
  65. +2
    -2
      src/cplex/catanh.c
  66. +2
    -2
      src/cplex/ccbrt.c
  67. +2
    -2
      src/cplex/ccos.c
  68. +2
    -2
      src/cplex/ccosh.c
  69. +2
    -2
      src/cplex/ccot.c
  70. +2
    -2
      src/cplex/ccoth.c
  71. +2
    -2
      src/cplex/ccsc.c
  72. +2
    -2
      src/cplex/ccsch.c
  73. +2
    -2
      src/cplex/cexp.c
  74. +2
    -2
      src/cplex/clog.c
  75. +2
    -2
      src/cplex/clog10.c
  76. +2
    -2
      src/cplex/clogb.c
  77. +2
    -2
      src/cplex/cpow.c
  78. +2
    -2
      src/cplex/csec.c
  79. +2
    -2
      src/cplex/csech.c
  80. +2
    -2
      src/cplex/csgn.c
  81. +2
    -2
      src/cplex/csin.c
  82. +2
    -2
      src/cplex/csinh.c
  83. +2
    -2
      src/cplex/csqrt.c
  84. +2
    -2
      src/cplex/ctan.c
  85. +2
    -2
      src/cplex/ctanh.c
  86. +2
    -2
      src/cplex/prim.c
  87. +2
    -2
      src/cplex/prim.h
  88. +4
    -4
      src/lib/aengine.cpp
  89. +2
    -2
      src/lib/aengine.h
  90. +1
    -1
      src/lib/amatha.pc
  91. +2
    -2
      src/lib/bigint.cpp
  92. +2
    -2
      src/lib/bigint.h
  93. +71
    -24
      src/lib/charbuf.cpp
  94. +5
    -2
      src/lib/charbuf.h
  95. +2
    -2
      src/lib/charval.h
  96. +3
    -3
      src/lib/cplex.cpp
  97. +2
    -2
      src/lib/cplex.h
  98. +5
    -5
      src/lib/nnumb.cpp
  99. +2
    -2
      src/lib/nnumb.h
  100. +2
    -2
      src/lib/ntext.cpp

+ 1
- 0
.gitignore View File

@ -17,3 +17,4 @@ doxygen.warn
*.deb
*.zip
Makefile
/dist

+ 19
- 0
.vscode/c_cpp_properties.json 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
}

+ 8
- 2
HISTORY View File

@ -1,6 +1,12 @@
amath release history
v1.8.4 August 05 2017
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
@ -105,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
LICENSE View File

@ -1,5 +1,5 @@
Copyright (c) 2014-2018 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.


+ 4
- 4
amath.1 View File

@ -1,6 +1,6 @@
.\" Copyright (c) 2014-2018 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:
@ -9,7 +9,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 ``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.
@ -20,7 +20,7 @@
.\" 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.8.4" "August 05 2018"
.TH amath 1 "Version 1.9.0" "January 11 2021"
.SH NAME
amath \- Simple command line calculator
.SH SYNOPSIS


+ 3
- 3
amath.doxygen View File

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


+ 4
- 0
arexx/test.rx View File

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

+ 166
- 0
bin/amath.doc 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
- 0
bin/amath.readme View File

@ -0,0 +1,41 @@
Short: Simple command line calculator
Author: Carsten Larsen
Uploader: carsten.larsen@mail.com
Type: misc/math
Version: 1.9.0
Architecture: m68k-amigaos >= 2.04
URL: https://amath.innolan.net
Features
========
- Case sensitive command line interface
- Native IEEE 754 with 15 significant digits
- Calculations with real and complex numbers
- Variables and user defined functions
- Logarithmic and exponential functions
- Trigonometric and hyperbolic functions
- Mathematical constants and rounding functions
- Disk functions to load, save and view content
- Comprehensive and easy to use builtin help
- Optimized 68000, 68020 and 68030 versions
- Unlimited number of ARexx interfaces
- Freely distributable sources (BSD license)
Usage
=====
Open amath in its own window:
> amath
Do a calculation in shell:
> amath 1.2+1.4
Get an interactive prompt in shell:
> amath shell
Show version string:
> amath version
Run regression tests:
> amath --test

BIN
bin/catalog/english.info View File


BIN
bin/prog/Catalog.info View File


BIN
bin/prog/HISTORY.info View File


BIN
bin/prog/LICENSE.info View File


BIN
bin/prog/Script.info View File


BIN
bin/prog/Test.info View File


BIN
bin/prog/amath.020.info View File


BIN
bin/prog/amath.030.info View File


BIN
bin/prog/amath.doc.info View File


BIN
bin/prog/amath.info View File


BIN
bin/root/amath.info View File


BIN
bin/script/complex1.info View File


BIN
bin/script/complex2.info View File


BIN
bin/script/complex3.info View File


BIN
bin/script/function1.info View File


BIN
bin/script/function2.info View File


BIN
bin/script/function3.info View File


BIN
bin/script/operators.info View File


BIN
bin/script/userfuncs.info View File


BIN
bin/script/variables.info View File


+ 32
- 0
build/doc 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;
}
'

+ 9
- 9
builddeb View File

@ -1,8 +1,8 @@
#!/bin/sh
#
# Copyright {c} 2014-2018 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,14 +23,14 @@
# 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.8.4"
version="1.9.0"
build_package () {
@ -103,9 +103,9 @@ chmod 0755 amath/DEBIAN/control
echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/"
echo "Upstream-Name: amath"
echo "Source: https://amath.innolan.net"
echo
echo
echo "Files: *"
echo "Copyright: 2014-2018 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"


+ 9
- 9
builddebdev View File

@ -1,8 +1,8 @@
#!/bin/sh
#
# Copyright {c} 2014-2018 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,16 +23,16 @@
# 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.8.4"
version="1.9.0"
build_package () {
@ -147,9 +147,9 @@ chmod 0755 amath/DEBIAN/control
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
echo "Files: *"
echo "Copyright: 2014-2018 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"


+ 86
- 27
builddist View File

@ -1,69 +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"
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 --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 --disable-pic --cross-compile="m68k-amigaos" CFLAGS="-m68030 -noixemul"
make static
mv amath dist/amath.030
mv amath ${builddir}/amath.030
make clean
# 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 --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 --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
# 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/
# 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
mkdir dist/script
cp script/* dist/script/
date -Ru >dist/build_date
#uname -srmo >dist/build_host
# Cleanup
rm -Rf distcat
rm -Rf ${builddir}
mv dist amath
#lha-ac a amath.lha amath
# Install source
./buildsrc
mv amath-1.9.0 ${distdir}/

+ 9
- 8
buildsrc View File

@ -1,21 +1,21 @@
#!/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.8.4'
stamp="201808050000"
srcdir="amath-rc"
version='1.9.0'
stamp="202101120000"
srcdir="."
distdir="amath-${version}"
cd ..
rm -f amath-${version}.tar.gz
rm -Rf amath-${version}
rm -Rf ${distdir}
mkdir -m 775 ${distdir}
mkdir -m 775 ${distdir}/src/
@ -56,6 +56,7 @@ 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}/


+ 4
- 4
buildwin View File

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


+ 5
- 5
catalog/english/amath-help.ct View File

@ -2,19 +2,19 @@
## language english
## codeset 0
; #############################################################################
; Copyright (c) 2014-2018 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


+ 5
- 5
catalog/english/amath-text.ct View File

@ -2,19 +2,19 @@
## language english
## codeset 0
; #############################################################################
; Copyright (c) 2014-2018 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


+ 12
- 11
configure View File

@ -1,8 +1,8 @@
#!/bin/sh
#
# Copyright {c} 2014-2018 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,11 +23,11 @@
# 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.8.4"
version="1.9.0"
clang=false
debugsym=false
@ -264,7 +264,7 @@ if $stdlibm; then
mflags="-DLIBM "
dlibm=true
fi
if $openlibm; then
libm="-lopenlibm "
mflags="-DLIBM "
@ -306,6 +306,7 @@ values.cpp
viewer.cpp
'
SYSSRCS='
amiga_arexx.cpp
console.cpp
console_amiga.cpp
console_stdc.cpp
@ -1193,10 +1194,10 @@ 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} 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-libs:"
echo " cd src/lib && \${MAKE} shared"


+ 100
- 84
src/amath.h View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2014-2018 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
@ -24,66 +24,95 @@
*
* Project homepage:
* 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
#endif
/******************************************************************************/
#ifdef __APPLE__
#elif defined(__APPLE__) && defined(__MACH__)
# define SYS_NAME "Apple"
# ifndef APPLE
# define APPLE
# endif
#endif
/******************************************************************************/
#if defined(_WIN32) || defined(_WIN64)
#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
# ifndef SYS_NAME
# define SYS_NAME "Unix variant"
# endif
#endif
/******************************************************************************/
#if defined(HAIKU) || defined(UNIX) || defined(APPLE)
# ifndef TERMIOS
# define TERMIOS
@ -91,39 +120,38 @@
# include <stdint.h>
# include <unistd.h>
#endif
/******************************************************************************/
#if defined(WINDOWS)
# include <stdint.h>
#endif
/******************************************************************************/
#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 (__cplusplus <= 199711L && !defined(WINDOWS)) || !defined(__cplusplus)
#ifndef nullptr
#define nullptr 0
#endif
# ifndef nullptr
# define nullptr 0
# endif
#elif (__cplusplus <= 199711L) && (defined(__GNUC__) || defined(__GNUG__))
#ifndef nullptr
#define nullptr 0
#endif
# ifndef nullptr
# define nullptr 0
# endif
#endif
/******************************************************************************/
#define assert(x)
/******************************************************************************/
/* Compilers*/
/* Compilers */
#if defined(__clang__)
/* Clang */
# if defined(__apple_build_version__)
@ -176,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)
@ -209,29 +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 "."
/******************************************************************************/
#if defined(WINDOWS)
#define NEWLINE "\r\n"
#elif defined(APPLE)
#define NEWLINE "\r"
#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)
@ -243,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)
@ -268,47 +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
/******************************************************************************/
#define TXTARCH TXTCPU TXTFPU
#define RELDATESTAMP "(05-08-2018)"
#define TXTDOSVERSION "\0$VER: amath 1.84" SPACE RELDATESTAMP SPACE TXTARCH
#define TXTTITLE "amath version 1.8.4"
#define TXTCOPYRIGHT "(c) 2018 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
/******************************************************************************/
#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"
#ifdef SYS_NAME
# define TXTSYSMSG TXTCOMPMSG " for " SYS_NAME
# define SYSKNOWN 1
#else
# define TXTSYSMSG TXTCOMPMSG
#endif
/******************************************************************************/
#endif

+ 2
- 2
src/amathc.h View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2014-2018 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
@ -24,7 +24,7 @@
*
* Project homepage:
* https://amath.innolan.net
*
*
*/
#ifndef AMATHC_H


+ 2
- 2
src/amatht.h View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2014-2018 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
@ -24,7 +24,7 @@
*
* Project homepage:
* https://amath.innolan.net
*
*
*/
#ifndef AMATHT_H


+ 2
- 2
src/clib/alloccpy.c View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2014-2018 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
@ -24,7 +24,7 @@
*
* Project homepage:
* https://amath.innolan.net
*
*
*/
#include "amathc.h"


+ 51
- 51
src/clib/amathc.3 View File

@ -1,6 +1,6 @@
.\" Copyright (c) 2014-2018 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:
@ -9,7 +9,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 ``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.
@ -20,7 +20,7 @@
.\" 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.8.4" "August 05 2018"
.TH "amathc.h" 3 "Version 1.9.0" "January 11 2021"
.SH NAME
amathc.h \- C functions for manipulating strings and memory
.SH SYNOPSIS
@ -82,7 +82,7 @@ amathc.h \- C functions for manipulating strings and memory
.PP
.SS "unsigned int AllocAndCopy (char ** destination, const char * source)"
.PP
Allocate memory and copy a string into the array\&.
Allocate memory and copy a string into the array\&.
.PP
Definition at line 40 of file alloccpy\&.c\&.
.PP
@ -90,32 +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
60
64 while (n--)
65 *d++ = *s++;
67
67
68 return size;