diff options
Diffstat (limited to 'xdelta3/xdelta3-test.h')
-rw-r--r-- | xdelta3/xdelta3-test.h | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/xdelta3/xdelta3-test.h b/xdelta3/xdelta3-test.h index 6d7d85b..53b4883 100644 --- a/xdelta3/xdelta3-test.h +++ b/xdelta3/xdelta3-test.h | |||
@@ -1,26 +1,19 @@ | |||
1 | /* xdelta 3 - delta compression tools and library Copyright (C) 2001, | 1 | /* xdelta3 - delta compression tools and library |
2 | * 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012. | 2 | Copyright 2016 Joshua MacDonald |
3 | * Joshua P. MacDonald | 3 | |
4 | * | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | * This program is free software; you can redistribute it and/or modify | 5 | you may not use this file except in compliance with the License. |
6 | * it under the terms of the GNU General Public License as published by | 6 | You may obtain a copy of the License at |
7 | * the Free Software Foundation; either version 2 of the License, or | 7 | |
8 | * (at your option) any later version. | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | * | 9 | |
10 | * This program is distributed in the hope that it will be useful, | 10 | Unless required by applicable law or agreed to in writing, software |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | * GNU General Public License for more details. | 13 | See the License for the specific language governing permissions and |
14 | * | 14 | limitations under the License. |
15 | * You should have received a copy of the GNU General Public License | 15 | */ |
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | 16 | ||
20 | /* This is public-domain Mersenne Twister code, | ||
21 | * attributed to Michael Brundage. Thanks! | ||
22 | * http://www.qbrundage.com/michaelb/pubs/essays/random_number_generation.html | ||
23 | */ | ||
24 | static const uint32_t TEST_SEED1 = 5489UL; | 17 | static const uint32_t TEST_SEED1 = 5489UL; |
25 | #define MT_LEN 624 | 18 | #define MT_LEN 624 |
26 | #define MT_IA 397 | 19 | #define MT_IA 397 |
@@ -44,6 +37,9 @@ void mt_init(mtrand *mt, uint32_t seed); | |||
44 | uint32_t mt_random (mtrand *mt); | 37 | uint32_t mt_random (mtrand *mt); |
45 | int test_setup (void); | 38 | int test_setup (void); |
46 | 39 | ||
40 | /* The Mersenne Twister code used herein is code to Michael Brundage. Thanks! | ||
41 | * http://www.qbrundage.com/michaelb/pubs/essays/random_number_generation.html | ||
42 | */ | ||
47 | void mt_init(mtrand *mt, uint32_t seed) { | 43 | void mt_init(mtrand *mt, uint32_t seed) { |
48 | int i; | 44 | int i; |
49 | mt->mt_buffer_[0] = seed; | 45 | mt->mt_buffer_[0] = seed; |