diff --git a/burststim2.mod b/burststim2.mod index f2c5186..cb3f4f7 100644 --- a/burststim2.mod +++ b/burststim2.mod @@ -70,8 +70,13 @@ FUNCTION invl(mean (ms)) (ms) { } } VERBATIM +#ifndef NRN_VERSION_GTEQ_8_2_0 double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); +#define RANDCAST +#else +#define RANDCAST (Rand*) +#endif ENDVERBATIM FUNCTION erand() { @@ -82,7 +87,7 @@ VERBATIM : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.negexp(1) */ - _lerand = nrn_random_pick(_p_donotuse); + _lerand = nrn_random_pick(RANDCAST _p_donotuse); }else{ ENDVERBATIM : the old standby. Cannot use if reproducible parallel sim diff --git a/ichan2.mod b/ichan2.mod index 42f0d0b..eb473d9 100644 --- a/ichan2.mod +++ b/ichan2.mod @@ -91,7 +91,7 @@ INITIAL { ns = nsinf VERBATIM - return 0; + return; ENDVERBATIM } diff --git a/readme.txt b/readme.txt index acbbf92..0e30a07 100644 --- a/readme.txt +++ b/readme.txt @@ -58,4 +58,9 @@ There are small quantitative differences from the published results, but the model still works as described. To reproduce the published results, comment out the "rates(v)" line in the DERIVATIVE block of IA.mod. -********************************** \ No newline at end of file +********************************** + +Changelog +--------- +2022-05: Updated MOD files to contain valid C++ and be compatible with + the upcoming versions 8.2 and 9.0 of NEURON. diff --git a/regn_stim.mod b/regn_stim.mod index eb74514..60c3a29 100644 --- a/regn_stim.mod +++ b/regn_stim.mod @@ -82,8 +82,13 @@ FUNCTION invl(mean (ms)) (ms) { tspike = tspike + mean } VERBATIM +#ifndef NRN_VERSION_GTEQ_8_2_0 double nrn_random_pick(void* r); void* nrn_random_arg(int argpos); +#define RANDCAST +#else +#define RANDCAST (Rand*) +#endif ENDVERBATIM FUNCTION erand() { @@ -94,7 +99,7 @@ VERBATIM : each instance. However, the corresponding hoc Random : distribution MUST be set to Random.normal(0, 1) (BPG) */ - _lerand = nrn_random_pick(_p_donotuse); + _lerand = nrn_random_pick(RANDCAST _p_donotuse); }else{ ENDVERBATIM : the old standby. Cannot use if reproducible parallel sim