1 /* This file is part of YAZ proxy
2 Copyright (C) 1998-2009 Index Data
4 YAZ proxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 YAZ proxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #include <yazproxy/bw.h>
23 Yaz_bw::Yaz_bw(int sz)
27 m_bucket = new int[m_size];
36 int Yaz_bw::get_total()
41 for (i = 0; i<m_size; i++)
46 void Yaz_bw::add_bytes(int b)
55 if (++m_ptr == m_size)
66 * c-file-style: "Stroustrup"
67 * indent-tabs-mode: nil
69 * vim: shiftwidth=4 tabstop=8 expandtab