diff --git a/.github/workflows/test_language_bindings.yml b/.github/workflows/test_language_bindings.yml index b3e0b9cc1..7dc871222 100644 --- a/.github/workflows/test_language_bindings.yml +++ b/.github/workflows/test_language_bindings.yml @@ -82,14 +82,8 @@ jobs: run: | sudo apt update sudo apt install cabal-install haskell-stack ghc - # curl -O https://downloads.haskell.org/~ghc/8.10.7/ghc-8.10.7-x86_64-deb10-linux.tar.xz - # tar xvf ghc-8.10.7-x86_64-deb10-linux.tar.xz - # cd ghc-8.10.7 && ./configure - # cd ghc-8.10.7 && make install ghc --version cabal update - # stack init - # stack --resolver lts-18 build - name: make haskell run: | make haskell @@ -123,14 +117,26 @@ jobs: version: "10.0" - name: python deps run: python3 -m pip install -r reqs/requirements.txt + - name: apt prerequisites + run: | + sudo apt install clang-14 lld-14 llvm-14 libjs-d3 python3-numpy + sudo apt install llvm -y - name: javascript prerequisites run: | - sudo apt install clang-14 lld-14 llvm-14 nodejs libjs-d3 python3-numpy - sudo apt install nodejs llvm -y - wget -c http://archive.ubuntu.com/ubuntu/pool/universe/e/emscripten/emscripten_3.1.6~dfsg-5_all.deb - sudo apt install ./emscripten_3.1.6~dfsg-5_all.deb + # NodeJS + curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - + sudo apt-get install -y nodejs + # Acorn-Node + git clone https://github.com/acornjs/acorn.git + cd acorn ; npm install ; cd - + # Emscripten + git clone https://github.com/emscripten-core/emsdk.git + cd emsdk ; ./emsdk install latest ; cd - + # wget --no-verbose -c http://archive.ubuntu.com/ubuntu/pool/universe/e/emscripten/emscripten_3.1.6~dfsg-5_all.deb + # sudo apt install -f ./emscripten_3.1.6~dfsg-5_all.deb nodejs- node-acorn- # ignore nodejs acorn max version - name: make js run: | + cd emsdk ; ./emsdk activate latest ; source ./emsdk_env.sh ; cd - emcc -v make js node ./build/js/a.out.js 1d20 diff --git a/GNOLL.ini b/GNOLL.ini index 1d7db1ebf..9e6688cf2 100644 --- a/GNOLL.ini +++ b/GNOLL.ini @@ -1,4 +1,4 @@ ; Placeholder file for future configuration setting. Currently unused [Meta Information] -version = v3.2.0 +version = v4.4.0 ttrpg_compatibility_rate = 98.66 diff --git a/src/grammar/dice.yacc b/src/grammar/dice.yacc index d677d025a..76c1dac3e 100644 --- a/src/grammar/dice.yacc +++ b/src/grammar/dice.yacc @@ -31,7 +31,7 @@ int yylex(void); int yyerror(const char* s); -int yywrap(); +int yywrap(void); //TODO: move to external file @@ -50,10 +50,10 @@ extern struct macro_struct *macros; pcg32_random_t rng; // Function Signatures for this file -int initialize(); +int initialize(void); // Functions -int initialize(){ +int initialize(void){ if (!seeded){ unsigned long int tick = (unsigned long)time(0)+(unsigned long)clock(); pcg32_srandom_r( @@ -1794,8 +1794,7 @@ int main(int argc, char **str){ free(macros); } -int yyerror(s) -const char *s; +int yyerror(const char *s) { fprintf(stderr, "%s\n", s); @@ -1809,7 +1808,7 @@ const char *s; } -int yywrap(){ +int yywrap(void){ return (1); } diff --git a/src/grammar/external/pcg_basic.c b/src/grammar/external/pcg_basic.c index 211a6e586..cba5bb68e 100644 --- a/src/grammar/external/pcg_basic.c +++ b/src/grammar/external/pcg_basic.c @@ -64,7 +64,7 @@ uint32_t pcg32_random_r(pcg32_random_t* rng) { return (xorshifted >> rot) | (xorshifted << ((-rot) & 31)); } -uint32_t pcg32_random() { return pcg32_random_r(&pcg32_global); } +uint32_t pcg32_random(void) { return pcg32_random_r(&pcg32_global); } // pcg32_boundedrand(bound): // pcg32_boundedrand_r(rng, bound): diff --git a/src/grammar/operations/macros.c b/src/grammar/operations/macros.c index 11b5d509c..18e8bb905 100644 --- a/src/grammar/operations/macros.c +++ b/src/grammar/operations/macros.c @@ -31,7 +31,7 @@ unsigned long hash_function(unsigned char *str) { return hash; } -void delete_all_macros() { +void delete_all_macros(void) { struct macro_struct *current_macro, *tmp; HASH_ITER(hh, macros, current_macro, tmp) { diff --git a/src/grammar/operations/macros.h b/src/grammar/operations/macros.h index f09c3d12b..97a6138d7 100644 --- a/src/grammar/operations/macros.h +++ b/src/grammar/operations/macros.h @@ -14,7 +14,7 @@ struct macro_struct { UT_hash_handle hh; /* makes this structure hashable */ }; -void delete_all_macros(); +void delete_all_macros(void); void register_macro(vec *macro_name, roll_params *to_store); diff --git a/src/grammar/rolls/randomness.c b/src/grammar/rolls/randomness.c index 2ac009bd8..ae411f6ff 100644 --- a/src/grammar/rolls/randomness.c +++ b/src/grammar/rolls/randomness.c @@ -11,7 +11,7 @@ extern pcg32_random_t rng; -int get_random_uniformly(){ +int get_random_uniformly(void){ int value; #if USE_SECURE_RANDOM == 1 value = (int)arc4random_uniform(INT_MAX); diff --git a/src/grammar/rolls/randomness.h b/src/grammar/rolls/randomness.h index f5107e9db..0bf8a3854 100644 --- a/src/grammar/rolls/randomness.h +++ b/src/grammar/rolls/randomness.h @@ -1,7 +1,7 @@ #ifndef __RANDOMNESS_H__ #define __RANDOMNESS_H__ -int get_random_uniformly(); +int get_random_uniformly(void); double get_random_normally(double mean, double std); #endif diff --git a/src/grammar/util/mocking.c b/src/grammar/util/mocking.c index 5103de908..05d09d132 100644 --- a/src/grammar/util/mocking.c +++ b/src/grammar/util/mocking.c @@ -6,7 +6,7 @@ int secondary_mock_value = 0; MOCK_METHOD global_mock_style = NO_MOCK; -void reset_mocking() { +void reset_mocking(void) { /** * @brief Resets various globals for test mocking */ @@ -26,7 +26,7 @@ void init_mocking(MOCK_METHOD mock_style, int starting_value) { global_mock_style = mock_style; } -void mocking_tick() { +void mocking_tick(void) { /** * @brief Every time a dice is rolled, this function is called so that the * mocking logic can update diff --git a/src/grammar/util/mocking.h b/src/grammar/util/mocking.h index f9e80c79e..6f1b93f1b 100644 --- a/src/grammar/util/mocking.h +++ b/src/grammar/util/mocking.h @@ -1,3 +1,5 @@ +#ifndef __MOCKING_H__ +#define __MOCKING_H__ #include "constructs/dice_enums.h" #include "shared_header.h" @@ -12,6 +14,8 @@ typedef enum { } MOCK_METHOD; // Mocking Util -void reset_mocking(); +void reset_mocking(void); void init_mocking(MOCK_METHOD mock_style, int starting_value); -void mocking_tick(); +void mocking_tick(void); + +#endif diff --git a/src/grammar/util/safe_functions.c b/src/grammar/util/safe_functions.c index f82584825..1d8feb972 100644 --- a/src/grammar/util/safe_functions.c +++ b/src/grammar/util/safe_functions.c @@ -17,7 +17,7 @@ extern int verbose; #define ANSI_COLOR_RESET "\x1b[0m" -void print_gnoll_errors(){ +void print_gnoll_errors(void){ /** * @brief A human-readable translation of the gnoll error codes * diff --git a/src/grammar/util/safe_functions.h b/src/grammar/util/safe_functions.h index b967e5874..7fef7cfe8 100644 --- a/src/grammar/util/safe_functions.h +++ b/src/grammar/util/safe_functions.h @@ -22,7 +22,7 @@ typedef enum { UNDEFINED_MACRO = 12 } ERROR_CODES; -void print_gnoll_errors(); +void print_gnoll_errors(void); void *safe_malloc(size_t size); void *safe_calloc(size_t nitems, size_t size); FILE *safe_fopen(const char *filename, const char *mode); diff --git a/src/julia/GNOLL/Project.toml b/src/julia/GNOLL/Project.toml index f96c9f0bf..d2def8c20 100644 --- a/src/julia/GNOLL/Project.toml +++ b/src/julia/GNOLL/Project.toml @@ -1,7 +1,7 @@ name = "GnollDiceNotation" uuid = "6d20aa67-345f-4b27-9ab4-1a86910b1003" authors = ["Ian-Hunter"] -version = "4.3.0" +version = "4.4.0" [deps] Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" diff --git a/src/python/setup.cfg b/src/python/setup.cfg index 1e6ae1700..03a37aa4e 100644 --- a/src/python/setup.cfg +++ b/src/python/setup.cfg @@ -2,7 +2,7 @@ name = gnoll author = Ian Frederick Vigogne Goodbody Hunter author_email = ianfhunter@gmail.com -version = 4.3.4 +version = 4.4.0 description = An efficient dice notation parser with extended notation long_description = file: README.md long_description_content_type = text/markdown