]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
create a math function specific file int.cc
authorrobertc <>
Fri, 17 Jan 2003 12:37:24 +0000 (12:37 +0000)
committerrobertc <>
Fri, 17 Jan 2003 12:37:24 +0000 (12:37 +0000)
src/Makefile.am
src/int.cc [new file with mode: 0644]
src/tools.cc

index 12ce03aa54ca886e6ee5aad64ab10935e9b60d76..55d023cb15de1ca7f8e1c03493de93f4a2112d5e 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.46 2003/01/17 05:17:07 robertc Exp $
+#  $Id: Makefile.am,v 1.47 2003/01/17 05:37:24 robertc Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -179,6 +179,7 @@ squid_SOURCES = \
        icp_v2.cc \
        icp_v3.cc \
        ident.cc \
+       int.cc \
        internal.cc \
        ipc.cc \
        ipcache.cc \
diff --git a/src/int.cc b/src/int.cc
new file mode 100644 (file)
index 0000000..17bdd14
--- /dev/null
@@ -0,0 +1,44 @@
+
+/*
+ * $Id: int.cc,v 1.1 2003/01/17 05:37:24 robertc Exp $
+ *
+ * DEBUG: section 21    Integer functions
+ * AUTHOR: Harvest Derived
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#include "squid.h"
+int
+isPowTen(int count)
+{
+    double x = log(count) / log(10.0);
+    if (0.0 != x - (double) (int) x)
+       return 0;
+    return 1;
+}
index 676403ab9c12713cc65127d7bd84512792f9e7f3..96a9173342cb6dfc091ceff8c41f87998e99380e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.227 2002/10/22 09:41:57 hno Exp $
+ * $Id: tools.cc,v 1.228 2003/01/17 05:37:24 robertc Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -933,20 +933,6 @@ stringHasCntl(const char *s)
     return 0;
 }
 
-/*
- * isPowTen returns true if its argument is an integer power of
- * 10.  Its used for logging of certain error messages that can
- * occur often, but that we don't want to fill cache.log with.
- */
-int
-isPowTen(int count)
-{
-    double x = log(count) / log(10.0);
-    if (0.0 != x - (double) (int) x)
-       return 0;
-    return 1;
-}
-
 void
 parseEtcHosts(void)
 {