Compare commits

...

240 Commits

Author SHA1 Message Date
Gavin Howard eb0cd870b9
Make bc work without -Wdeclaration-after-statement warnings 5 days ago
Gavin Howard 51ce0e0352
Fix a problem in the algorithms manual 1 week ago
Gavin Howard ca53adf83b
Fix bugs and style in filter_text 1 week ago
Gavin Howard 712d79c03e
Do not use uniq for blank lines in filter_text 1 week ago
Gavin Howard 319d597f9e
Increment the version and update the NEWS 2 weeks ago
Gavin Howard 34e31ad80f
Fix a build problem in FreeBSD 2 weeks ago
Gavin Howard 82f85e9d90
Make editline more efficient with no prompt 2 weeks ago
Gavin Howard 36ebd30e2b
Increment the version and update the NEWS 2 weeks ago
Gavin Howard 45df56dd2e
Make editline and readline respect BC_PROMPT 2 weeks ago
Gavin Howard 408f9090c1
Make EOF with the line libs more like the built-in history 3 weeks ago
Gavin Howard 4317afa2fa
Increment the version and update the NEWS 3 weeks ago
Gavin Howard bb4431262d
Fix a problem with the en_US locale file 3 weeks ago
Gavin Howard c58e2be43f
Fix a build problem on FreeBSD 3 weeks ago
Gavin Howard 37068c161d
Fix formatting 3 weeks ago
Gavin Howard bd5f5fdb79
Make bc history use tabs 3 weeks ago
Gavin Howard 83878f1c2f
Make gen/strgen.c work with Windows again 3 weeks ago
Gavin Howard a698a33503
Adjust the Windows build for the strgen changes 3 weeks ago
Gavin Howard d30762f5c0
Fix a problem in the builtin arg tests 3 weeks ago
Gavin Howard 74d8eb2891
Try yet again to fix all of the compiler warnings 3 weeks ago
Gavin Howard 49adcc7af5
Try again to fix the signals problem 3 weeks ago
Gavin Howard 4a07fb1580
Try to fix a problem with signals 3 weeks ago
Gavin Howard 25fe85591a
Fix another compiler warning 3 weeks ago
Gavin Howard 0ff0f67d60
Fix compiler warnings 3 weeks ago
Gavin Howard 78ba445e83
Add the new command-line options to the help texts 3 weeks ago
Gavin Howard db540c29e3
Fix a typo in the bc manual 3 weeks ago
Gavin Howard a6519f8593
Update the NEWS 3 weeks ago
Gavin Howard 4beb55fbd8
Update the manuals 3 weeks ago
Gavin Howard 44983b5d2a
Add an error test for command-line builtin variables 3 weeks ago
Gavin Howard 2db127113b
Add tests for the builtin var command-line arguments 3 weeks ago
Gavin Howard 488d48c87c
Implement command-line args to set the four builtin variables 3 weeks ago
Gavin Howard 4c34391266
Add some directives to the manpages for better style 3 weeks ago
Gavin Howard 0d8bffdb64
Fix FreeBSD issues and typos in the manuals 3 weeks ago
Gavin Howard ec41af4679
Simplify the history tests in configure.sh 3 weeks ago
Gavin Howard c36b91b024
Attempt to fix build failures on the FreeBSD port 4 weeks ago
Gavin Howard b5812f05c5
Add a note to the README about spam 4 weeks ago
Gavin Howard 7cb4597574
Remove an extra newline output 1 month ago
Gavin Howard 6b4ea3432d
Add editline and readline testing to the release script 1 month ago
Gavin Howard 95a9c99f13
Update the release checklist 1 month ago
Gavin Howard f147e34c8e
Format all C code 1 month ago
Gavin Howard 4e5556e260
Add code formatting infrastructure 1 month ago
Gavin Howard 27441fc0c2
Fix style 1 month ago
Gavin Howard 27b59e0aed
Fix lint warnings 1 month ago
Gavin Howard 495e2d7358
Add lint infrastructure 1 month ago
Gavin Howard fd2ea461e4
Increment the version and update the NEWS 1 month ago
Gavin Howard 289da0e76a
Update documentation 1 month ago
Gavin Howard 4a10f9c786
Add the line library configure options to the build manual 1 month ago
Gavin Howard debc6cd31a
Do not initialize history with a bad terminal 1 month ago
Gavin Howard a1ef58d12f
Add comments 1 month ago
Gavin Howard 82eb41312e
Fix a typo in the manuals 1 month ago
Gavin Howard 467b54c78e
Add an explanatory comment 1 month ago
Gavin Howard ecf128aaa0
Make sure there's no UB from changing const strings 1 month ago
Gavin Howard dddc69be47
Get history working on Windows 1 month ago
Gavin Howard 4eb4b699f6
Fix style 1 month ago
Gavin Howard 99eb8bbbb3
Merge branch 'master' into line_libs 1 month ago
Gavin Howard 411e1a8b16
Fix the README folder list 1 month ago
Gavin Howard 75d300d74d
Merge branch 'master' into line_libs 1 month ago
Gavin Howard 1b77c55148
Fix the README file list 1 month ago
Gavin Howard 0549afca5c
Add a missing #include 1 month ago
Gavin Howard 8896082204
Rename two globals 1 month ago
Gavin Howard 0632f1d60d
Make sure ^C is printed without sigint reset for editline 1 month ago
Gavin Howard 6ff6592fd2
Make SIGINT work with editline as well 1 month ago
Gavin Howard 30f96cd088
Make readline handle SIGINT correctly 1 month ago
Gavin Howard 3efc3b9f42
Clean up a lot of the line lib code and consolidate 1 month ago
Gavin Howard dda04344dd
Attempt to fix no newline on EOF 1 month ago
Gavin Howard 9d4a878f66
Fix the version output 1 month ago
Gavin Howard c74c2a56d4
Make history work under editline 1 month ago
Gavin Howard 7bbf1eec59
Make SIGWINCH work on FreeBSD 1 month ago
Gavin Howard 7701612501
Switch static_assert to _Static_assert 1 month ago
Gavin Howard 88e2894e25
Attempt to make bc build in FreeBSD base 1 month ago
Gavin Howard 7112520efe
Make sure to error if the new configure arguments are wrong 1 month ago
Gavin Howard 73a1a62f59
Merge branch 'master' into line_libs 1 month ago
Gavin Howard 54a7ca1a8d
Fix a compile error that I did not catch 1 month ago
Gavin Howard f8b5ab0dfd
Make the build work on FreeBSD 1 month ago
Gavin Howard 38e85d7ea3
Implement support for editline and readline 1 month ago
Gavin Howard e1bd08f895
Fix style 1 month ago
Gavin Howard 04ef32e888
Fix a bug 1 month ago
Gavin Howard c96de7c0f6
Add gzip to the package script 2 months ago
Gavin Howard d24ea601aa
Tweak the release notes 2 months ago
Gavin Howard 7fa5dce636
Increment the version and update the NEWS 2 months ago
Gavin Howard cef94931a4
Change the history EOF test for the recent change two commits ago 2 months ago
Gavin Howard 5e0a30e2a9
Fix style 2 months ago
Warner Losh f8fa6febf7 Emacs delete-next-character 2 months ago
Gavin Howard cad172d8f0
Increment the version and update the NEWS 3 months ago
Piotr P. Stefaniak cb7bde2181
Make Home and End keys work in tmux in history 3 months ago
Gavin Howard 8ec0c24751
Add a comment warning of the bug that was found 3 months ago
Gavin Howard 24be19250c
Quiet a useless clang warning 3 months ago
Piotr P. Stefaniak e0fb717308
Fix a bug in history refresh 3 months ago
Gavin Howard 3d6c2e4645
Update copyright for the bc banner 3 months ago
Gavin Howard b5c7f6942b
Add a comment 3 months ago
Gavin Howard 5ba4e300a7
Make sure to not run a generated test if not able to generate 3 months ago
Gavin Howard fd1e659aa6
Increment the version and update the NEWS 4 months ago
Gavin Howard 621adbd71d
Workaround a clang bug 4 months ago
Gavin Howard 6d26f2ac3e
Fix another gcc warning 4 months ago
Gavin Howard ca6dd9ecf6
Fix style 4 months ago
Gavin Howard de4fa1bd4a
Fix a compile warning from GCC 4 months ago
Gavin Howard 5fc73c7443
Add more tests for multiline comments and strings in expression files 4 months ago
Gavin Howard dbc4dc4c4e
Fix a problem found with the fix in last commit 4 months ago
Gavin Howard d778d0b917
Fix the bug mentioned in the last commit 4 months ago
Gavin Howard 824859ba47
Add a test for a bug found by a user 4 months ago
Gavin Howard 85dbc9578e
Increment the version and update the NEWS 5 months ago
Gavin Howard 81905ee8e2
Fix the argv[0] == NULL bug 5 months ago
Gavin Howard 52f7667c88
Fix style 5 months ago
Gavin Howard 3962313c8b
Fix a wrong doc comment 5 months ago
Gavin Howard 329a29def7
Add a static_assert for instructions 6 months ago
Gavin Howard d5b5a5c400
Fix typos 6 months ago
Gavin Howard 84ed5cc276
Tweak something in the development manual 6 months ago
Gavin Howard eca74533b6
Fix style 6 months ago
Firas Khalil Khana 232a12f687 Add missing newline character 6 months ago
Gavin Howard c3b2d28b2d
Fix still another typo 7 months ago
Gavin Howard db200ed396
Fix yet another typo 7 months ago
Gavin Howard cec89461df
Fix another typo 7 months ago
Gavin Howard 8f0e794f49
Fix a typo 7 months ago
Gavin Howard daf643af7e
Make sure to guard locale-specific stuff 7 months ago
Gavin Howard 23799b7747
Increment the version and update the NEWS 7 months ago
Gavin Howard 9ffdd5ec69
Fix the second parse bug found by oguz-ismail 7 months ago
Gavin Howard 81f838f657
Add a test for the fix in the previous commit 7 months ago
Gavin Howard 5b2fe303c8
Fix one of two parse bugs found by oguz-ismail 7 months ago
Gavin Howard b20fe46e1c
Update the configure help 8 months ago
Gavin Howard ddd6bb9daf
Revert "Attempt to make dc.exe a link on Windows" 8 months ago
Gavin Howard a2cbd36b53
Try again to make release.sh use out-of-source builds 8 months ago
Gavin Howard a945358c87
Make release script do parallel history test 8 months ago
Gavin Howard 0c84e0bf15
Remove a part of a history test that is too flaky 8 months ago
Gavin Howard 8e1928493c
Make the release script not test history in parallel 8 months ago
Gavin Howard e12eafcf7a
Tweak a doc comment 8 months ago
Gavin Howard e38c88a415
Make the release script able to do out-of-source builds 8 months ago
Gavin Howard 8b7e59f29e
Update README files 8 months ago
Gavin Howard 29055cfd83
Attempt to make dc.exe a link on Windows 8 months ago
Gavin Howard 9e688779a0
Add documentation for out-of-source builds to README and manuals 8 months ago
Gavin Howard c8d0d016fb
Change something back 8 months ago
Gavin Howard 6bd6c61f52
Fix some problems with out-of-source builds 8 months ago
Gavin Howard 56a8da67d1
Implement out-of-source builds 8 months ago
Gavin Howard fb2428ca63
Add a gitignore for testing out-of-source builds 8 months ago
Gavin Howard 2427756509
Fix a problem with make clean 8 months ago
Gavin Howard dc3a588cf9
Update the NEWS 8 months ago
Gavin Howard c891c10097
Implement a pkg-config file for bcl 8 months ago
Gavin Howard d92530bad8
Fix the install and uninstall targets for bcl 8 months ago
Gavin Howard f463085c46
Update the README for the Windows build 8 months ago
Gavin Howard 5d9b40c2f6
Add a blurb about global data and signals to the dev manual 9 months ago
Gavin Howard 4277d5ad1a
Fix a bug in the unlock for the library 9 months ago
Gavin Howard 7ad047d503
Fix interaction between signals and globals 9 months ago
Gavin Howard de699c3c22
Fight against flakiness of history tests 9 months ago
Gavin Howard c4e3e23057
Add BC_EXPR_EXIT back with setting default 9 months ago
Gavin Howard 80f165451f
Increment the version and update the NEWS 9 months ago
Gavin Howard 9305c6b1af
Update the build manual for the Windows build 9 months ago
Gavin Howard cf8d717f1b
Update the dev manual for changes to Windows files 9 months ago
Gavin Howard d0bb26417b
Improve the package.sh script 9 months ago
Gavin Howard 941147ca1e
Increment the version and update the NEWS 9 months ago
Gavin Howard b240e01963
Add another option to the release script 9 months ago
Gavin Howard 7d5ea1a704
Update the dev manual 9 months ago
Gavin Howard d6ff8e3cc1
Add more to the second ifs script test 9 months ago
Gavin Howard f60ce30fd5
Fix a bug I partially fixed in 5.1.0 9 months ago
Gavin Howard 16cd0feb66
Add more tests for ending if statements 9 months ago
Gavin Howard 06310809dd
Add more to bc stdin tests 9 months ago
Gavin Howard bfb15a832f
Relabel a couple tests 9 months ago
Gavin Howard 2b8d00952f
Update the release checklist 9 months ago
Gavin Howard aac37fabeb
Update scripts/package.sh for the new Windows stuff 9 months ago
Gavin Howard e9b9224694
Combine the gitignore files 9 months ago
Gavin Howard 63aa78402c
Increment the version and update the NEWS 9 months ago
Gavin Howard f38e0e9932
Fix a problem in the bcl manual 9 months ago
Gavin Howard 343a484995
Fix memory leaks in the bcl test 9 months ago
Gavin Howard 7d549d4bba
Add the new bcl leading zeros to its manual 9 months ago
Gavin Howard 4dd84d12b4
Add leading zeroes to bcl 9 months ago
Gavin Howard 98e2e1dce1
Make leadingzero test only used with extra math 9 months ago
Gavin Howard 50113029c6
Reactivate debug builds in scripts/release.sh 9 months ago
Gavin Howard 5179476cd8
Fix a build error on dc only 9 months ago
Gavin Howard 317169bfdb
Fix benchmarks 9 months ago
Gavin Howard d44c1fc833
Make ministat work with musl 9 months ago
Gavin Howard 6ee5e9c09d
Update the dev manual for error test changes 9 months ago
Gavin Howard 34e590e2a1
Make error.sh executable 9 months ago
Gavin Howard b7208a8c41
Update the build manual for the Windows build config 9 months ago
depler 74d55ddfc7 tests_bc.bat fix 9 months ago
Gavin Howard 289ad4a089
Parallelize error tests and unparallelize all tests 9 months ago
Gavin Howard 245917b41d
Add the leading zero test to the Windows tests 9 months ago
Gavin Howard b120cd3dd6
Update documentation for the new features 9 months ago
Gavin Howard 8153027201
Add a new bc test to the dev manual 9 months ago
Gavin Howard dc59475140
Fix an error message from dc 9 months ago
Gavin Howard be81c86e31
Change the command-line option for disabling line length checking 9 months ago
Gavin Howard 601179321d
Add tests for the new features 9 months ago
Gavin Howard dae8e5efa0
Add the plz*() and pnlz*() functions to gen/lib2.bc 9 months ago
Gavin Howard 1363732b61
Fix a bug found by the test in the previous commit 9 months ago
Gavin Howard 4a0a8ddc66
Add a test to check for global stacks in the globals test script 9 months ago
Gavin Howard 1ead5b9652
Add a way to query global settings in scripts 9 months ago
Gavin Howard 12fb20e870
Fix a typo 9 months ago
Gavin Howard 10d37cca38
Add a table of dc commands to the dev manual 9 months ago
Gavin Howard a5e62d4e95
Add a command-line option for printing leading zeros 9 months ago
Gavin Howard 7ae40616ec
Add a command-line option to remove char limits on lines 9 months ago
Gavin Howard 2974454047
Make history test documentation clearer 9 months ago
Gavin Howard 191f409260
Force Windows to use binary mode for files 9 months ago
Gavin Howard c0a0ebd054
Make reading a file not fail if it does not read everything 9 months ago
Gavin Howard c441892b61
Update the dev manual with changes to the history tests 9 months ago
Gavin Howard c754da0a1f
Move the history test scripts back 9 months ago
Gavin Howard 7520bc4662
Fix a bug in the release script with history tests 9 months ago
Gavin Howard 3d192692a3
Fix a bug in the Makefile template with history tests 9 months ago
Gavin Howard a41d2d5dad
Move the history test scripts 9 months ago
Gavin Howard a009de9e12
Add history tests to the release script 9 months ago
Gavin Howard 97200a8265
Remove history tests from tests/all.sh 9 months ago
Gavin Howard 761f018460
Remove the history tests from the test suite 9 months ago
Gavin Howard 0e25d47134
Remove some sleeps from history 9 months ago
Gavin Howard 88c38d6d54
Attempt again to fix history tests 9 months ago
Gavin Howard dec91505ae
Attempt to fix expect in history tests 9 months ago
Gavin Howard c5bfde5a57
Print the traceback for history timeouts 9 months ago
Gavin Howard 6609fa8680
Make sure banner is on for history tests 9 months ago
Gavin Howard 70d233f2bb
Reduce the amount of busywork in history tests 9 months ago
Gavin Howard 57a6b69e29
Fix a bug in history.py 9 months ago
Gavin Howard f85dd7ad3f
Make the Windows test batch files work for me 9 months ago
Gavin Howard ba792e05c9
Remove history from Windows 9 months ago
Gavin Howard 78635d612b
Stop a Windows error 9 months ago
Gavin Howard 5bc06dd271
Make -q work again 9 months ago
Gavin Howard 844cd4609a
Make some changes to history to try to make it work on Windows 9 months ago
Gavin Howard fe8e217627
Fix a typo 9 months ago
depler d3793fa5a1 windows tests 9 months ago
depler 10308b01fc fix 9 months ago
depler 4df58cf232 cleanup 9 months ago
depler 06dcc55074 ReleaseMD, ReleaseMT 9 months ago
depler 7ba018d340 bcl project 9 months ago
depler 3bdd97c520 new bc.vcxproj, static linkage, release configuration 9 months ago
Gavin Howard da29d88f70
Fix a typo 9 months ago
Gavin Howard f356a140ee
Increase and remove timeouts on history tests 9 months ago
Gavin Howard a54167ff45
Shorten the timeout for history tests 9 months ago
Gavin Howard db5fc4fdf8
Parallelize tests/all.sh 9 months ago
Gavin Howard c0d379594d
Skip a history test that does not work on FreeBSD 9 months ago
Gavin Howard 2b8d00a1df
Let SIGKILL be okay for history tests 9 months ago
Gavin Howard 94b8747d78
Force kill children on FreeBSD in history tests 9 months ago
Gavin Howard 9081d6cba5
Use EOF to make a child quit in history tests 9 months ago
Gavin Howard 519368b609
Attempt again to fix history tests on FreeBSD 9 months ago
Gavin Howard 7001721959
Attempt to fix history tests on FreeBSD 9 months ago
Gavin Howard a4778d16a1
Make sure banner is not used in shared history tests 9 months ago
Gavin Howard 0dcbde8a83
Reset history.py after all the attempts 9 months ago
Gavin Howard b52d178c30
Try again to fix test 9 on FreeBSD 9 months ago
Gavin Howard 50cfeedc04
Fix test 9 on FreeBSD 9 months ago
Gavin Howard d2a46e86f4
Try again to fix test 8 on FreeBSD 9 months ago
Gavin Howard ddd7ad631e
Adjust the timeout limit for bc history test 8 9 months ago
Gavin Howard 9c1bb9db5c
Attempt to fix a history test bug in FreeBSD 9 months ago
Gavin Howard 25c51cdfe8
Add a function to read all child data to history tests 9 months ago
Gavin Howard 77650a1ab3
Fix a typo 9 months ago
Gavin Howard 66a4f29ba3
Make sure banner is not used in certain history tests 9 months ago
Gavin Howard 4eb2049bf4
Attempt to fix a bug with history tests on FreeBSD 9 months ago
Gavin Howard fc78729bdd
Make history tests take an executable 9 months ago
Gavin Howard 2275af6903
Add a timeout to history tests 9 months ago
Gavin Howard 1cb6c8a7c1
Make ASAN more picky for the release script 10 months ago
  1. 152
      .clang-format
  2. 43
      .clang-tidy
  3. 10
      .gitignore
  4. 237
      Makefile.in
  5. 111
      NEWS.md
  6. 92
      README.md
  7. 278
      bc.vcxproj
  8. 182
      bc.vcxproj.filters
  9. 8
      bcl.pc.in
  10. 31
      bcl.sln
  11. 161
      bcl.vcxproj
  12. 96
      bcl.vcxproj.filters
  13. 4
      benchmarks/bc/arrays.bc
  14. 3
      benchmarks/bc/arrays_and_constants.bc
  15. 4
      benchmarks/bc/bitfuncs.bc
  16. 4
      benchmarks/bc/functions.bc
  17. 3
      benchmarks/bc/irand_long.bc
  18. 4
      benchmarks/bc/irand_short.bc
  19. 4
      benchmarks/bc/lib.bc
  20. 4
      benchmarks/bc/postfix_incdec.bc
  21. 4
      benchmarks/bc/strings.bc
  22. 375
      configure.sh
  23. 43
      gen/bc_help.txt
  24. 43
      gen/dc_help.txt
  25. 36
      gen/lib2.bc
  26. 308
      gen/strgen.c
  27. 31
      gen/strgen.sh
  28. 4
      include/args.h
  29. 78
      include/bc.h
  30. 225
      include/bcl.h
  31. 15
      include/dc.h
  32. 80
      include/file.h
  33. 183
      include/history.h
  34. 113
      include/lang.h
  35. 71
      include/lex.h
  36. 104
      include/library.h
  37. 161
      include/num.h
  38. 24
      include/opt.h
  39. 49
      include/parse.h
  40. 1049
      include/program.h
  41. 48
      include/rand.h
  42. 12
      include/read.h
  43. 129
      include/status.h
  44. 106
      include/vector.h
  45. 2
      include/version.h
  46. 179
      include/vm.h
  47. 10
      locales/de_DE.ISO8859-1.msg
  48. 10
      locales/de_DE.UTF-8.msg
  49. 10
      locales/en_US.msg
  50. 10
      locales/es_ES.ISO8859-1.msg
  51. 10
      locales/es_ES.UTF-8.msg
  52. 10
      locales/fr_FR.ISO8859-1.msg
  53. 10
      locales/fr_FR.UTF-8.msg
  54. 10
      locales/ja_JP.UTF-8.msg
  55. 10
      locales/ja_JP.eucJP.msg
  56. 10
      locales/nl_NL.ISO8859-1.msg
  57. 10
      locales/nl_NL.UTF-8.msg
  58. 10
      locales/pl_PL.ISO8859-2.msg
  59. 10
      locales/pl_PL.UTF-8.msg
  60. 10
      locales/pt_PT.ISO8859-1.msg
  61. 10
      locales/pt_PT.UTF-8.msg
  62. 10
      locales/ru_RU.CP1251.msg
  63. 10
      locales/ru_RU.CP866.msg
  64. 10
      locales/ru_RU.ISO8859-5.msg
  65. 10
      locales/ru_RU.KOI8-R.msg
  66. 10
      locales/ru_RU.UTF-8.msg
  67. 10
      locales/zh_CN.GB18030.msg
  68. 10
      locales/zh_CN.GB2312.msg
  69. 10
      locales/zh_CN.GBK.msg
  70. 10
      locales/zh_CN.UTF-8.msg
  71. 10
      locales/zh_CN.eucCN.msg
  72. 2
      manuals/algorithms.md
  73. 221
      manuals/bc.1.md.in
  74. 226
      manuals/bc/A.1
  75. 216
      manuals/bc/A.1.md
  76. 154
      manuals/bc/E.1
  77. 158
      manuals/bc/E.1.md
  78. 154
      manuals/bc/EH.1
  79. 158
      manuals/bc/EH.1.md
  80. 154
      manuals/bc/EHN.1
  81. 158
      manuals/bc/EHN.1.md
  82. 154
      manuals/bc/EN.1
  83. 158
      manuals/bc/EN.1.md
  84. 226
      manuals/bc/H.1
  85. 216
      manuals/bc/H.1.md
  86. 226
      manuals/bc/HN.1
  87. 216
      manuals/bc/HN.1.md
  88. 226
      manuals/bc/N.1
  89. 216
      manuals/bc/N.1.md
  90. 45
      manuals/bcl.3
  91. 36
      manuals/bcl.3.md
  92. 62
      manuals/build.md
  93. 109
      manuals/dc.1.md.in
  94. 129
      manuals/dc/A.1
  95. 104
      manuals/dc/A.1.md
  96. 112
      manuals/dc/E.1
  97. 93
      manuals/dc/E.1.md
  98. 112
      manuals/dc/EH.1
  99. 93
      manuals/dc/EH.1.md
  100. 112
      manuals/dc/EHN.1
  101. Some files were not shown because too many files have changed in this diff Show More

152
.clang-format

@ -0,0 +1,152 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: 1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: All
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
#AttributeMacros: []
BinPackArguments: true
BinPackParameters: true
#BitFieldColonSpacing: Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterJavaFieldAnnotations: true
BreakBeforeBinaryOperators: None
#BreakBeforeConceptDeclarations: true
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<(sys|arpa|net|netinet)/.*\.h>'
Priority: 2
- Regex: '^<(args|bc|bcl|dc|file|history|lang|lex|library|num|opt|parse|program|rand|read|status|vector|version|vm)\.h>'
Priority: 3
- Regex: '^<.*\.h>'
Priority: 0
- Regex: '^<.*>'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentExternBlock: NoIndent
IndentGotoLabels: false
IndentPPDirectives: None
#IndentPragmas: false
#IndentRequires: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaImportGroups: []
JavaScriptQuotes: Double
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
NamespaceMacros: []
ObjCBinPackProtocolList: Always
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 1000
PenaltyBreakBeforeFirstCallParameter: 429496720
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 42949672
PenaltyBreakString: 10000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 42949672
PenaltyIndentedWhitespace: 1
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
#RawStringFormats:
# This is used to get spaces around a bitwise and operator.
ReferenceAlignment: Middle
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
#SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
TypenameMacros: []
UseCRLF: false
UseTab: ForIndentation
WhitespaceSensitiveMacros: []
...

43
.clang-tidy

@ -0,0 +1,43 @@
Checks: 'clang-diagnostic-*,clang-analyzer-*'
WarningsAsErrors: 'clang-diagnostic-*,clang-analyzer-*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- key: llvm-else-after-return.WarnOnConditionVariables
value: 'false'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons
value: 'false'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: 'false'
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: 'true'
- key: cert-dcl16-c.NewSuffixes
value: 'L;LL;LU;LLU'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
value: 'true'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: llvm-qualified-auto.AddConstToQualified
value: 'false'
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: llvm-else-after-return.WarnOnUnfixable
value: 'false'
- key: google-readability-function-size.StatementThreshold
value: '800'
...

10
.gitignore vendored

@ -33,7 +33,9 @@ dc_help.c
config.mak
timeconst.bc
Makefile
bcl.pc
build/*
tests/fuzzing/bc_outputs1/*
tests/fuzzing/bc_outputs2/*
tests/fuzzing/bc_outputs3/*
@ -76,5 +78,9 @@ cscope*.out
tags
*.vcxproj.user
Debug/*
Release/*
vs/.vs/*
vs/bin/*
vs/lib/*
vs/src2/*
vs/tests/*.txt
vs/tests/*.exe

237
Makefile.in

@ -29,6 +29,15 @@
#
.POSIX:
ROOTDIR = %%ROOTDIR%%
INCDIR = $(ROOTDIR)/include
SRCDIR = $(ROOTDIR)/src
TESTSDIR = $(ROOTDIR)/tests
SCRIPTSDIR = $(ROOTDIR)/scripts
GENDIR = $(ROOTDIR)/gen
BUILDDIR = %%BUILDDIR%%
SRC = %%SRC%%
OBJ = %%OBJ%%
GCDA = %%GCDA%%
@ -39,46 +48,45 @@ BC_ENABLED = %%BC_ENABLED%%
DC_ENABLED_NAME = DC_ENABLED
DC_ENABLED = %%DC_ENABLED%%
HEADERS = include/args.h include/file.h include/lang.h include/lex.h include/num.h include/opt.h include/parse.h include/program.h include/read.h include/status.h include/vector.h include/vm.h
BC_HEADERS = include/bc.h
DC_HEADERS = include/dc.h
HISTORY_HEADERS = include/history.h
EXTRA_MATH_HEADERS = include/rand.h
LIBRARY_HEADERS = include/bcl.h include/library.h
HEADERS = $(INCDIR)/args.h $(INCDIR)/file.h $(INCDIR)/lang.h $(INCDIR)/lex.h $(INCDIR)/num.h $(INCDIR)/opt.h $(INCDIR)/parse.h $(INCDIR)/program.h $(INCDIR)/read.h $(INCDIR)/status.h $(INCDIR)/vector.h $(INCDIR)/vm.h
BC_HEADERS = $(INCDIR)/bc.h
DC_HEADERS = $(INCDIR)/dc.h
HISTORY_HEADERS = $(INCDIR)/history.h
EXTRA_MATH_HEADERS = $(INCDIR)/rand.h
LIBRARY_HEADERS = $(INCDIR)/bcl.h $(INCDIR)/library.h
GEN_DIR = gen
GEN = %%GEN%%
GEN_EXEC = $(GEN_DIR)/$(GEN)
GEN_C = $(GEN_DIR)/$(GEN).c
GEN_C = $(GENDIR)/$(GEN).c
GEN_EMU = %%GEN_EMU%%
BC_LIB = $(GEN_DIR)/lib.bc
BC_LIB = $(GENDIR)/lib.bc
BC_LIB_C = $(GEN_DIR)/lib.c
BC_LIB_O = %%BC_LIB_O%%
BC_LIB_GCDA = $(GEN_DIR)/lib.gcda
BC_LIB_GCNO = $(GEN_DIR)/lib.gcno
BC_LIB2 = $(GEN_DIR)/lib2.bc
BC_LIB2 = $(GENDIR)/lib2.bc
BC_LIB2_C = $(GEN_DIR)/lib2.c
BC_LIB2_O = %%BC_LIB2_O%%
BC_LIB2_GCDA = $(GEN_DIR)/lib2.gcda
BC_LIB2_GCNO = $(GEN_DIR)/lib2.gcno
BC_HELP = $(GEN_DIR)/bc_help.txt
BC_HELP = $(GENDIR)/bc_help.txt
BC_HELP_C = $(GEN_DIR)/bc_help.c
BC_HELP_O = %%BC_HELP_O%%
BC_HELP_GCDA = $(GEN_DIR)/bc_help.gcda
BC_HELP_GCNO = $(GEN_DIR)/bc_help.gcno
DC_HELP = $(GEN_DIR)/dc_help.txt
DC_HELP = $(GENDIR)/dc_help.txt
DC_HELP_C = $(GEN_DIR)/dc_help.c
DC_HELP_O = %%DC_HELP_O%%
DC_HELP_GCDA = $(GEN_DIR)/dc_help.gcda
DC_HELP_GCNO = $(GEN_DIR)/dc_help.gcno
BIN = bin
LOCALES = locales
EXEC_SUFFIX = %%EXECSUFFIX%%
EXEC_PREFIX = %%EXECPREFIX%%
@ -97,7 +105,7 @@ LIB_NAME = $(LIB).a
LIBBC = $(BIN)/$(LIB_NAME)
BCL = bcl
BCL_TEST = $(BIN)/$(BCL)
BCL_TEST_C = tests/$(BCL).c
BCL_TEST_C = $(TESTSDIR)/$(BCL).c
MANUALS = manuals
BC_MANPAGE_NAME = $(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX).1
@ -112,9 +120,13 @@ BCL_MD = $(BCL_MANPAGE).md
MANPAGE_INSTALL_ARGS = -Dm644
BINARY_INSTALL_ARGS = -Dm755
PC_INSTALL_ARGS = $(MANPAGE_INSTALL_ARGS)
BCL_PC = $(BCL).pc
PC_PATH = %%PC_PATH%%
BCL_HEADER_NAME = bcl.h
BCL_HEADER = include/$(BCL_HEADER_NAME)
BCL_HEADER = $(INCDIR)/$(BCL_HEADER_NAME)
%%DESTDIR%%
BINDIR = %%BINDIR%%
@ -135,6 +147,7 @@ BC_ENABLE_EXTRA_MATH_NAME = BC_ENABLE_EXTRA_MATH
BC_ENABLE_EXTRA_MATH = %%EXTRA_MATH%%
BC_ENABLE_NLS = %%NLS%%
BC_LONG_BIT = %%LONG_BIT%%
BC_EXCLUDE_EXTRA_MATH = %%EXCLUDE_EXTRA_MATH%%
BC_ENABLE_AFL = %%FUZZ%%
BC_ENABLE_MEMCHECK = %%MEMCHECK%%
@ -146,6 +159,8 @@ BC_DEFAULT_TTY_MODE = %%BC_DEFAULT_TTY_MODE%%
DC_DEFAULT_TTY_MODE = %%DC_DEFAULT_TTY_MODE%%
BC_DEFAULT_PROMPT = %%BC_DEFAULT_PROMPT%%
DC_DEFAULT_PROMPT = %%DC_DEFAULT_PROMPT%%
BC_DEFAULT_EXPR_EXIT = %%BC_DEFAULT_EXPR_EXIT%%
DC_DEFAULT_EXPR_EXIT = %%DC_DEFAULT_EXPR_EXIT%%
RM = rm
MKDIR = mkdir
@ -158,13 +173,13 @@ MINISTAT_EXEC = $(SCRIPTS)/$(MINISTAT)
BITFUNCGEN = bitfuncgen
BITFUNCGEN_EXEC = $(SCRIPTS)/$(BITFUNCGEN)
INSTALL = $(SCRIPTS)/exec-install.sh
SAFE_INSTALL = $(SCRIPTS)/safe-install.sh
LINK = $(SCRIPTS)/link.sh
MANPAGE = $(SCRIPTS)/manpage.sh
KARATSUBA = $(SCRIPTS)/karatsuba.py
LOCALE_INSTALL = $(SCRIPTS)/locale_install.sh
LOCALE_UNINSTALL = $(SCRIPTS)/locale_uninstall.sh
INSTALL = $(SCRIPTSDIR)/exec-install.sh
SAFE_INSTALL = $(SCRIPTSDIR)/safe-install.sh
LINK = $(SCRIPTSDIR)/link.sh
MANPAGE = $(SCRIPTSDIR)/manpage.sh
KARATSUBA = $(SCRIPTSDIR)/karatsuba.py
LOCALE_INSTALL = $(SCRIPTSDIR)/locale_install.sh
LOCALE_UNINSTALL = $(SCRIPTSDIR)/locale_uninstall.sh
VALGRIND_ARGS = --error-exitcode=100 --leak-check=full --show-leak-kinds=all --errors-for-leak-kinds=all
@ -176,23 +191,25 @@ BC_DEFS0 = -DBC_DEFAULT_BANNER=$(BC_DEFAULT_BANNER)
BC_DEFS1 = -DBC_DEFAULT_SIGINT_RESET=$(BC_DEFAULT_SIGINT_RESET)
BC_DEFS2 = -DBC_DEFAULT_TTY_MODE=$(BC_DEFAULT_TTY_MODE)
BC_DEFS3 = -DBC_DEFAULT_PROMPT=$(BC_DEFAULT_PROMPT)
BC_DEFS = $(BC_DEFS0) $(BC_DEFS1) $(BC_DEFS2) $(BC_DEFS3)
BC_DEFS4 = -DBC_DEFAULT_EXPR_EXIT=$(BC_DEFAULT_EXPR_EXIT)
BC_DEFS = $(BC_DEFS0) $(BC_DEFS1) $(BC_DEFS2) $(BC_DEFS3) $(BC_DEFS4)
DC_DEFS1 = -DDC_DEFAULT_SIGINT_RESET=$(DC_DEFAULT_SIGINT_RESET)
DC_DEFS2 = -DDC_DEFAULT_TTY_MODE=$(DC_DEFAULT_TTY_MODE)
DC_DEFS3 = -DDC_DEFAULT_PROMPT=$(DC_DEFAULT_PROMPT)
DC_DEFS = $(DC_DEFS1) $(DC_DEFS2) $(DC_DEFS3)
DC_DEFS4 = -DDC_DEFAULT_EXPR_EXIT=$(DC_DEFAULT_EXPR_EXIT)
DC_DEFS = $(DC_DEFS1) $(DC_DEFS2) $(DC_DEFS3) $(DC_DEFS4)
CPPFLAGS1 = -D$(BC_ENABLED_NAME)=$(BC_ENABLED) -D$(DC_ENABLED_NAME)=$(DC_ENABLED)
CPPFLAGS2 = $(CPPFLAGS1) -I./include/ -DBUILD_TYPE=$(BC_BUILD_TYPE) %%LONG_BIT_DEFINE%%
CPPFLAGS2 = $(CPPFLAGS1) -I$(INCDIR)/ -DBUILD_TYPE=$(BC_BUILD_TYPE) %%LONG_BIT_DEFINE%%
CPPFLAGS3 = $(CPPFLAGS2) -DEXECPREFIX=$(EXEC_PREFIX) -DMAINEXEC=$(MAIN_EXEC)
CPPFLAGS4 = $(CPPFLAGS3) -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 %%BSD%%
CPPFLAGS4 = $(CPPFLAGS3) %%BSD%%
CPPFLAGS5 = $(CPPFLAGS4) -DBC_NUM_KARATSUBA_LEN=$(BC_NUM_KARATSUBA_LEN)
CPPFLAGS6 = $(CPPFLAGS5) -DBC_ENABLE_NLS=$(BC_ENABLE_NLS)
CPPFLAGS7 = $(CPPFLAGS6) -D$(BC_ENABLE_EXTRA_MATH_NAME)=$(BC_ENABLE_EXTRA_MATH)
CPPFLAGS8 = $(CPPFLAGS7) -DBC_ENABLE_HISTORY=$(BC_ENABLE_HISTORY) -DBC_ENABLE_LIBRARY=$(BC_ENABLE_LIBRARY)
CPPFLAGS = $(CPPFLAGS8) -DBC_ENABLE_MEMCHECK=$(BC_ENABLE_MEMCHECK) -DBC_ENABLE_AFL=$(BC_ENABLE_AFL)
CFLAGS = $(CPPFLAGS) $(BC_DEFS) $(DC_DEFS) %%CPPFLAGS%% %%CFLAGS%%
LDFLAGS = %%LDFLAGS%%
CFLAGS = $(CPPFLAGS) $(BC_DEFS) $(DC_DEFS) %%CPPFLAGS%% %%CFLAGS%% -I$(INCLUDEDIR)
LDFLAGS = %%LDFLAGS%% -L$(LIBDIR)
HOSTCFLAGS = %%HOSTCFLAGS%%
@ -212,29 +229,32 @@ all: %%DEFAULT_TARGET%%
%%SECOND_TARGET%%: %%SECOND_TARGET_PREREQS%%
%%SECOND_TARGET_CMD%%
$(GEN_EXEC):
$(GEN_DIR):
mkdir -p $(GEN_DIR)
$(GEN_EXEC): $(GEN_DIR)
%%GEN_EXEC_TARGET%%
$(BC_LIB_C): $(GEN_EXEC) $(BC_LIB)