mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-17 17:42:02 -05:00
8dfca65f08
Changed compile-time flag Win32 to CVF (for Compaq Visual Fortran). git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@618 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
23 lines
315 B
C
23 lines
315 B
C
#ifdef CVF
|
|
extern int __stdcall IGRAY(int *n0, int *idir)
|
|
#else
|
|
int igray_(int *n0, int *idir)
|
|
#endif
|
|
{
|
|
int n;
|
|
unsigned long sh;
|
|
unsigned long nn;
|
|
n=*n0;
|
|
|
|
if(*idir>0) return (n ^ (n >> 1));
|
|
|
|
sh = 1;
|
|
nn = (n >> sh);
|
|
while (nn > 0) {
|
|
n ^= nn;
|
|
sh <<= 1;
|
|
nn = (n >> sh);
|
|
}
|
|
return (n);
|
|
}
|