Forráskód Böngészése

simplified calls to round()

richarddobson 1 hónapja
szülő
commit
67be2cfc8c

+ 2 - 2
dev/texture/ap_texture.c

@@ -489,9 +489,9 @@ int usage1(void)
     "MORE??? ----- (hit keyboard)\n"
     "\n");
 
-    while(!kbhit())
+    while(!_kbhit())
         ;
-    if(kbhit()) {
+    if(_kbhit()) {
 #else
     "\n");
 #endif

+ 2 - 2
dev/texture/texprepro.c

@@ -37,9 +37,9 @@
 #include <osbind.h>
 #include <cdpmain.h>
 
-#if defined unix || defined __GNUC__
+//#if defined unix || defined __GNUC__
 #define round(x) lround((x))
-#endif
+//#endif
 
 #define omit_count  is_rectified
 #define omit_item   is_mapping

+ 2 - 2
dev/texture/texture3.c

@@ -37,9 +37,9 @@
 #include <sfsys.h>
 #include <osbind.h>
 
-#if defined unix || defined __GNUC__
+//#if defined unix || defined __GNUC__
 #define round(x) lround((x))
-#endif
+//#endif
 
 #define CHARBITSIZE (8)     /* number of bits in a char          */
 

+ 6 - 4
dev/texture/texture4.c

@@ -37,9 +37,9 @@
 #include <sfsys.h>
 #include <osbind.h>
 
-#if defined unix || defined __GNUC__
+//#if defined unix || defined __GNUC__
 #define round(x) lround((x))
-#endif
+//#endif
 
 /**** ALL FUNCTIONS WHICH ARE GLOBAL TO ALL PROCESS FUNCTIONS TYPES ***/
 
@@ -1464,11 +1464,13 @@ void hshuflup(int k,int *perm,int permlen)
         i--;
     }
 }
-
-#ifndef round
+//RWD OCT 2025 no longer needed
+#if 0
+# ifndef round
 
 int round(double a)
 {
     return (int)floor(a + 0.5);
 }
+# endif
 #endif

+ 2 - 2
dev/texture/texture5.c

@@ -39,9 +39,9 @@
 #include <assert.h>
 #endif
 
-#if defined unix || defined __GNUC__
+//#if defined unix || defined __GNUC__
 #define round(x) lround((x))
-#endif
+//#endif
 
 static int setup_splice(int st_splicecnt,double **splicebuf);
 static int generate_origdur_and_frq(double **origdur,double **origfrq,dataptr dz);