mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Pgindent run for 8.0.
This commit is contained in:
@@ -19,13 +19,13 @@
|
||||
* of any kind. I shall in no event be liable for anything that happens
|
||||
* to anyone/anything when using this software.
|
||||
*/
|
||||
#define RAND48_SEED_0 (0x330e)
|
||||
#define RAND48_SEED_1 (0xabcd)
|
||||
#define RAND48_SEED_2 (0x1234)
|
||||
#define RAND48_MULT_0 (0xe66d)
|
||||
#define RAND48_MULT_1 (0xdeec)
|
||||
#define RAND48_MULT_2 (0x0005)
|
||||
#define RAND48_ADD (0x000b)
|
||||
#define RAND48_SEED_0 (0x330e)
|
||||
#define RAND48_SEED_1 (0xabcd)
|
||||
#define RAND48_SEED_2 (0x1234)
|
||||
#define RAND48_MULT_0 (0xe66d)
|
||||
#define RAND48_MULT_1 (0xdeec)
|
||||
#define RAND48_MULT_2 (0x0005)
|
||||
#define RAND48_ADD (0x000b)
|
||||
|
||||
unsigned short _rand48_seed[3] = {
|
||||
RAND48_SEED_0,
|
||||
@@ -46,11 +46,11 @@ _dorand48(unsigned short xseed[3])
|
||||
unsigned short temp[2];
|
||||
|
||||
accu = (unsigned long) _rand48_mult[0] * (unsigned long) xseed[0] +
|
||||
(unsigned long) _rand48_add;
|
||||
(unsigned long) _rand48_add;
|
||||
temp[0] = (unsigned short) accu; /* lower 16 bits */
|
||||
accu >>= sizeof(unsigned short) * 8;
|
||||
accu += (unsigned long) _rand48_mult[0] * (unsigned long) xseed[1] +
|
||||
(unsigned long) _rand48_mult[1] * (unsigned long) xseed[0];
|
||||
(unsigned long) _rand48_mult[1] * (unsigned long) xseed[0];
|
||||
temp[1] = (unsigned short) accu; /* middle 16 bits */
|
||||
accu >>= sizeof(unsigned short) * 8;
|
||||
accu += _rand48_mult[0] * xseed[2] + _rand48_mult[1] * xseed[1] + _rand48_mult[2] * xseed[0];
|
||||
@@ -63,7 +63,7 @@ long
|
||||
lrand48(void)
|
||||
{
|
||||
_dorand48(_rand48_seed);
|
||||
return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] >1);
|
||||
return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] > 1);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -71,7 +71,7 @@ srand48(long seed)
|
||||
{
|
||||
_rand48_seed[0] = RAND48_SEED_0;
|
||||
_rand48_seed[1] = (unsigned short) seed;
|
||||
_rand48_seed[2] = (unsigned short) (seed >16);
|
||||
_rand48_seed[2] = (unsigned short) (seed > 16);
|
||||
_rand48_mult[0] = RAND48_MULT_0;
|
||||
_rand48_mult[1] = RAND48_MULT_1;
|
||||
_rand48_mult[2] = RAND48_MULT_2;
|
||||
|
Reference in New Issue
Block a user