X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fmisc.h;h=fbd11eec3c32fc3f2536fbf6bc6ad4e80471e11c;hb=a8915a78655ea9ff6242ba6ba4ed4d83253a323d;hp=a1be9f9f236e77902f12079ac610b617f570ebed;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp diff --git a/src/libpspp/misc.h b/src/libpspp/misc.h index a1be9f9f23..fbd11eec3c 100644 --- a/src/libpspp/misc.h +++ b/src/libpspp/misc.h @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. - Written by Ben Pfaff . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -27,33 +26,22 @@ /* HUGE_VAL is traditionally defined as positive infinity, or alternatively, DBL_MAX. */ -#if !HAVE_ISINF +#if !HAVE_ISINF && !defined isinf #define isinf(X) (fabs (X) == HUGE_VAL) #endif /* A Not a Number is not equal to itself. */ -#if !HAVE_ISNAN +#if !HAVE_ISNAN && !defined isnan #define isnan(X) ((X) != (X)) #endif /* Finite numbers are not infinities or NaNs. */ -#if !HAVE_FINITE +#if !HAVE_FINITE && !defined finite #define finite(X) (!isinf (X) && !isnan (X)) #elif HAVE_IEEEFP_H #include /* Declares finite() under Solaris. */ #endif -#ifndef min -#define min(A, B) ((A) < (B) ? (A) : (B)) -#endif - -#ifndef max -#define max(A, B) ((A) > (B) ? (A) : (B)) -#endif - -/* Clamps A to be between B and C. */ -#define range(A, B, C) ((A) < (B) ? (B) : ((A) > (C) ? (C) : (A))) - /* Divides nonnegative X by positive Y, rounding up. */ #define DIV_RND_UP(X, Y) (((X) + ((Y) - 1)) / (Y))