diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /map65/libm65/igray.c | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'map65/libm65/igray.c')
| -rwxr-xr-x | map65/libm65/igray.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/map65/libm65/igray.c b/map65/libm65/igray.c index 395f7971..b1d9dbaf 100755 --- a/map65/libm65/igray.c +++ b/map65/libm65/igray.c @@ -1,22 +1,22 @@ -#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); -} +#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);
+}
|
