]> granicus.if.org Git - php/commitdiff
MFH: ws + folding tags
authorJani Taskinen <jani@php.net>
Tue, 6 Nov 2007 10:57:10 +0000 (10:57 +0000)
committerJani Taskinen <jani@php.net>
Tue, 6 Nov 2007 10:57:10 +0000 (10:57 +0000)
ext/standard/lcg.c

index 62531cf095c520240d0d32f49acb9caddf1f6e19..b2aa2443d47fda1853251ce9325445b225736383 100644 (file)
@@ -36,7 +36,6 @@ int lcg_globals_id;
 #else
 static php_lcg_globals lcg_globals;
 #endif
 
 #ifdef PHP_WIN32
 #include <process.h>
@@ -44,7 +43,7 @@ static php_lcg_globals lcg_globals;
 
 /*
  * combinedLCG() returns a pseudo random number in the range of (0, 1).
- * The function combines two CGs with periods of 
+ * The function combines two CGs with periods of
  * 2^31 - 85 and 2^31 - 249. The period of this function
  * is equal to the product of both primes.
  */
@@ -53,11 +52,11 @@ static php_lcg_globals lcg_globals;
 
 static void lcg_seed(TSRMLS_D);
 
-PHPAPI double php_combined_lcg(TSRMLS_D)
+PHPAPI double php_combined_lcg(TSRMLS_D) /* {{{ */
 {
        php_int32 q;
        php_int32 z;
-       
+
        if (!LCG(seeded)) {
                lcg_seed(TSRMLS_C);
        }
@@ -72,8 +71,9 @@ PHPAPI double php_combined_lcg(TSRMLS_D)
 
        return z * 4.656613e-10;
 }
+/* }}} */
 
-static void lcg_seed(TSRMLS_D)
+static void lcg_seed(TSRMLS_D) /* {{{ */
 {
        struct timeval tv;
 
@@ -90,13 +90,15 @@ static void lcg_seed(TSRMLS_D)
 
        LCG(seeded) = 1;
 }
+/* }}} */
 
-static void lcg_init_globals(php_lcg_globals *lcg_globals_p TSRMLS_DC)
+static void lcg_init_globals(php_lcg_globals *lcg_globals_p TSRMLS_DC) /* {{{ */
 {
        LCG(seeded) = 0;
 }
+/* }}} */
 
-PHP_MINIT_FUNCTION(lcg)
+PHP_MINIT_FUNCTION(lcg) /* {{{ */
 {
 #ifdef ZTS
        ts_allocate_id(&lcg_globals_id, sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL);
@@ -105,6 +107,7 @@ PHP_MINIT_FUNCTION(lcg)
 #endif
        return SUCCESS;
 }
+/* }}} */
 
 /* {{{ proto float lcg_value()
    Returns a value from the combined linear congruential generator */