/*
- * $Id: StatHist.cc,v 1.21 1998/12/04 18:25:14 rousskov Exp $
+ * $Id: StatHist.cc,v 1.22 1999/01/13 21:55:23 wessels Exp $
*
* DEBUG: section 62 Generic Histogram
* AUTHOR: Duane Wessels
static int statHistBin(const StatHist * H, double v);
static double statHistVal(const StatHist * H, int bin);
static StatHistBinDumper statHistBinDumper;
+#if !defined(_SQUID_HPUX_) || !defined(__GNUC__)
+ /*
+ * HP-UX and GCC (2.8?) give strange errors when these simple
+ * functions are static.
+ */
static hbase_f Log;
static hbase_f Exp;
static hbase_f Null;
+#endif
/* low level init, higher level functions has less params */
static void
}
/* log based histogram */
-static double
+#if !defined(_SQUID_HPUX_) || !defined(__GNUC__)
+static
+#endif
+double
Log(double x)
{
assert((x + 1.0) >= 0.0);
return log(x + 1.0);
}
-static double
+
+#if !defined(_SQUID_HPUX_) || !defined(__GNUC__)
+static
+#endif
+double
Exp(double x)
{
return exp(x) - 1.0;
}
+
void
statHistLogInit(StatHist * H, int capacity, double min, double max)
{
/* linear histogram for enums */
/* we want to be have [-1,last_enum+1] range to track out of range enums */
-static double
+#if !defined(_SQUID_HPUX_) || !defined(__GNUC__)
+static
+#endif
+double
Null(double x)
{
return x;