1999-08-29 20:12:12 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2004-01-08 17:33:29 +00:00
|
|
|
| PHP Version 5 |
|
1999-08-29 20:12:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2008-12-31 11:15:49 +00:00
|
|
|
| Copyright (c) 1997-2009 The PHP Group |
|
1999-08-29 20:12:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
1999-08-29 20:12:12 +00:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-10 20:04:29 +00:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 12:51:34 +00:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
1999-08-29 20:12:12 +00:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
2002-02-28 08:29:35 +00:00
|
|
|
| Author: Sascha Schumann <sascha@schumann.cx> |
|
1999-08-29 20:12:12 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 01:40:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Id$ */
|
1999-08-29 20:12:12 +00:00
|
|
|
|
|
|
|
#ifndef PHP_LCG_H
|
|
|
|
#define PHP_LCG_H
|
|
|
|
|
2001-07-18 22:55:52 +00:00
|
|
|
#include "ext/standard/basic_functions.h"
|
|
|
|
|
1999-08-29 20:12:12 +00:00
|
|
|
typedef struct {
|
2001-07-18 22:55:52 +00:00
|
|
|
php_int32 s1;
|
|
|
|
php_int32 s2;
|
2001-09-21 13:38:44 +00:00
|
|
|
int seeded;
|
1999-08-29 20:12:12 +00:00
|
|
|
} php_lcg_globals;
|
|
|
|
|
2001-09-21 13:38:44 +00:00
|
|
|
PHPAPI double php_combined_lcg(TSRMLS_D);
|
1999-08-29 20:12:12 +00:00
|
|
|
PHP_FUNCTION(lcg_value);
|
|
|
|
|
2001-05-06 17:55:10 +00:00
|
|
|
PHP_MINIT_FUNCTION(lcg);
|
2001-09-21 13:38:44 +00:00
|
|
|
|
|
|
|
#ifdef ZTS
|
2001-07-28 11:36:37 +00:00
|
|
|
#define LCG(v) TSRMG(lcg_globals_id, php_lcg_globals *, v)
|
1999-08-29 20:12:12 +00:00
|
|
|
#else
|
|
|
|
#define LCG(v) (lcg_globals.v)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|