S
Skybuck Flying
This is the source code for nrand48 from gnuwin32 libgw32c
long int nrand48 (xsubi) unsigned short int xsubi[3];
{
long int result;
(void) __nrand48_r (xsubi, &__libc_drand48_data, &result);
return result;
}
// long int nrand48 (xsubi) unsigned short int xsubi[3];
What does the 'unsigned short int xsubi[3];' part mean after '(xsubi)' ?
The prototype in stdlib.h from the binaries is: (for some reason stdlib.h
was not in source distribution ?)
extern long int nrand48 (unsigned short int __xsubi[3]) __THROW;
So at first sight I would guess it has to do with throwing exceptions... but
now that I look at it again it I think it's the type for xsubi.
The original looks really weird:
1. long int nrand48 (xsubi) unsigned short int xsubi[3];
Isn't that supposed to look like this:
2. long int nrand48 (unsigned short int xsubi[3] );
Why did they write it as 1. ?
Is that just their preferred way of writing it down... or does it have some
sort of functionality ?
The prototype then again looks like 2. !? huh ?!
Euhm... Could this be a case of wacky c programmers ? eh.
Bye,
Skybuck.
long int nrand48 (xsubi) unsigned short int xsubi[3];
{
long int result;
(void) __nrand48_r (xsubi, &__libc_drand48_data, &result);
return result;
}
// long int nrand48 (xsubi) unsigned short int xsubi[3];
What does the 'unsigned short int xsubi[3];' part mean after '(xsubi)' ?
The prototype in stdlib.h from the binaries is: (for some reason stdlib.h
was not in source distribution ?)
extern long int nrand48 (unsigned short int __xsubi[3]) __THROW;
So at first sight I would guess it has to do with throwing exceptions... but
now that I look at it again it I think it's the type for xsubi.
The original looks really weird:
1. long int nrand48 (xsubi) unsigned short int xsubi[3];
Isn't that supposed to look like this:
2. long int nrand48 (unsigned short int xsubi[3] );
Why did they write it as 1. ?
Is that just their preferred way of writing it down... or does it have some
sort of functionality ?
The prototype then again looks like 2. !? huh ?!
Euhm... Could this be a case of wacky c programmers ? eh.
Bye,
Skybuck.