/* Rounds X down to the previous multiple of Y. */
#define ROUND_DOWN(X, Y) ((X) / (Y) * (Y))
-#define SQR(X) ((X) * (X))
-
int intlog10 (unsigned);
/* Returns the square of X. */
*dest = src;
}
+
+/* Set *DEST to the lower of *DEST and SRC */
+static inline void
+minimize_int (int *dest, int src)
+{
+ if (src < *dest)
+ *dest = src;
+}
+
+
+/* Set *DEST to the greater of *DEST and SRC */
+static inline void
+maximize_int (int *dest, int src)
+{
+ if (src > *dest)
+ *dest = src;
+}
+
+
#endif /* libpspp/misc.h */