From 77e50caaf2ef81cd91075cf836fed0e75718ffb4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 23:12:02 +0200 Subject: Adding debian version 1.8.3-2. Signed-off-by: Daniel Baumann --- .../mruby/mrbgems/mruby-random/src/mt19937ar.h | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 debian/vendor-h2o/deps/mruby/mrbgems/mruby-random/src/mt19937ar.h (limited to 'debian/vendor-h2o/deps/mruby/mrbgems/mruby-random/src/mt19937ar.h') diff --git a/debian/vendor-h2o/deps/mruby/mrbgems/mruby-random/src/mt19937ar.h b/debian/vendor-h2o/deps/mruby/mrbgems/mruby-random/src/mt19937ar.h new file mode 100644 index 0000000..7d38232 --- /dev/null +++ b/debian/vendor-h2o/deps/mruby/mrbgems/mruby-random/src/mt19937ar.h @@ -0,0 +1,80 @@ +/* +** mt19937ar.h - MT Random functions +** +** Copyright (C) 1997 - 2016, Makoto Matsumoto and Takuji Nishimura, +** All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining +** a copy of this software and associated documentation files (the +** "Software"), to deal in the Software without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Software, and to +** permit persons to whom the Software is furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be +** included in all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +** +** [ MIT license: http://www.opensource.org/licenses/mit-license.php ] +** +** Any feedback is very welcome. +** http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html +** email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) +** +** This version is modified by mruby developers. If you see any problem, +** contact us first at https://github.com/mruby/mruby/issues +*/ + +#define N 624 + +typedef struct { + unsigned long mt[N]; + int mti; + union { + unsigned long int_; + double double_; + } gen; + + mrb_int seed; + mrb_bool has_seed : 1; +} mt_state; + +void mrb_random_init_genrand(mt_state *, unsigned long); +unsigned long mrb_random_genrand_int32(mt_state *); +double mrb_random_genrand_real1(mt_state *t); + +/* initializes mt[N] with a seed */ +void init_genrand(unsigned long s); + +/* initialize by an array with array-length */ +/* init_key is the array for initializing keys */ +/* key_length is its length */ +/* slight change for C++, 2004/2/26 */ +void init_by_array(unsigned long init_key[], int key_length); + +/* generates a random number on [0,0xffffffff]-interval */ +unsigned long genrand_int32(void); + +/* generates a random number on [0,0x7fffffff]-interval */ +long genrand_int31(void); + +/* These real versions are due to Isaku Wada, 2002/01/09 added */ +/* generates a random number on [0,1]-real-interval */ +double genrand_real1(void); + +/* generates a random number on [0,1)-real-interval */ +double genrand_real2(void); + +/* generates a random number on (0,1)-real-interval */ +double genrand_real3(void); + +/* generates a random number on [0,1) with 53-bit resolution*/ +double genrand_res53(void); -- cgit v1.2.3