/* $Id: hash.h,v 1.11 2004/03/11 06:39:59 reinelt Exp $ * * hashes (associative arrays) * * Copyright 1999-2003 Michael Reinelt * Copyright 2004 The LCD4Linux Team * * This file is part of LCD4Linux. * * LCD4Linux 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, or (at your option) * any later version. * * LCD4Linux 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., 675 Mass Ave, Cambridge, MA 02139, USA. * * * $Log: hash.h,v $ * Revision 1.11 2004/03/11 06:39:59 reinelt * big patch from Martin: * - reuse filehandles * - memory leaks fixed * - earlier busy-flag checking with HD44780 * - reuse memory for strings in RESULT and hash * - netdev_fast to wavid time-consuming regex * * Revision 1.10 2004/03/03 04:44:16 reinelt * changes (cosmetics?) to the big patch from Martin * hash patch un-applied * * Revision 1.9 2004/03/03 03:47:04 reinelt * big patch from Martin Hejl: * - use qprintf() where appropriate * - save CPU cycles on gettimeofday() * - add quit() functions to free allocated memory * - fixed lots of memory leaks * * Revision 1.8 2004/02/27 06:07:55 reinelt * hash improvements from Martin * * Revision 1.7 2004/01/21 14:29:03 reinelt * new helper 'hash_get_regex' which delivers the sum over regex matched items * new function 'disk()' which uses this regex matching * * Revision 1.6 2004/01/21 10:48:17 reinelt * hash_age function added * * Revision 1.5 2004/01/18 09:01:45 reinelt * /proc/stat parsing finished * * Revision 1.4 2004/01/16 11:12:26 reinelt * some bugs in plugin_xmms fixed, parsing moved to own function * plugin_proc_stat nearly finished * * Revision 1.3 2004/01/16 07:26:25 reinelt * moved various /proc parsing to own functions * made some progress with /proc/stat parsing * * Revision 1.2 2004/01/16 05:04:53 reinelt * started plugin proc_stat which should parse /proc/stat * which again is a paint in the a** * thinking over implementation methods of delta functions * (CPU load, ...) * * Revision 1.1 2004/01/13 10:03:01 reinelt * new util 'hash' for associative arrays * new plugin 'cpuinfo' * */ #ifndef _HASH_H_ #define _HASH_H_ // struct timeval #include typedef struct timeval timeval; typedef struct { timeval time; double val; } HASH_SLOT; typedef struct { char *key; char *val; int len; timeval time; int root; HASH_SLOT *Slot; } HASH_ITEM; typedef struct { int sorted; timeval time; int nItems; HASH_ITEM *Items; } HASH; void hash_set (HASH *Hash, char *key, char *val); void hash_set_delta (HASH *Hash, char *key, char *val); int hash_age (HASH *Hash, char *key, char **value); char *hash_get (HASH *Hash, char *key); double hash_get_delta (HASH *Hash, char *key, int delay); double hash_get_regex (HASH *Hash, char *key, int delay); void hash_destroy (HASH *Hash); #endif e Vcs-Bzr control field to new team addressReinhard Tartler1-1/+1 2012-03-09* Rewrite init script to use lsb-base functionsJonathan McCrohan2-7/+13 2012-03-09Add watchfile lintian override; Using upstream svn instead Jonathan McCrohan2-1/+4 2012-03-08Update to S-V 3.9.3Jonathan McCrohan2-2/+3 2012-03-08* Rewrite init script to use lsb-base functions.Jonathan McCrohan3-15/+16 2012-03-08copyright-refers-to-symlink-licenseJonathan McCrohan2-2/+3 2012-03-08* Lintian fixesJonathan McCrohan2-4/+7 2012-03-08Import upstream version 0.11.0~svn1180Jonathan McCrohan19-2871/+3952 2011-12-27Import upstream version 0.11.0~svn1165Jonathan McCrohan6-166/+495 2011-12-25Import upstream version 0.11.0~svn1164Jonathan McCrohan11-162/+315 2011-12-25Update libmysqlclient-dev virtual package in build-depends.Jonathan McCrohan1-1/+1 2011-08-31Import upstream version 0.11.0~svn1159Jonathan McCrohan4-5/+5 2011-08-30update debian/changelogReinhard Tartler1-1/+4 2011-08-28* New upstream snapshotJonathan McCrohan2-4/+11 2011-08-26Import upstream version 0.11.0~svn1158Reinhard Tartler34-1743/+4490 2011-08-20normalize with wrap-and-sort(1)Reinhard Tartler2-17/+20 2011-08-20Make lcd4linux linux specificReinhard Tartler1-2/+1 2011-04-29add sqlite3-dev to build dependssiretart@tauware.de2-2/+4 2011-04-29mention new co-maintainersiretart@tauware.de1-0/+1 2011-04-29add libdbus-1-dev to build dependssiretart@tauware.de2-1/+3 2011-04-29normalize fields with wrap-and-sort(1)siretart@tauware.de2-18/+20 2011-04-29fix order of calling dh_autoreconf_cleansiretart@tauware.de1-1/+1 2011-04-29Add Uploader details to Debian PackageJonathan McCrohan1-0/+1 2011-04-27Bug fix: "script lcd4linux/init.d/lcd4linux missing dependency onReinhard Tartler2-1/+5 2011-04-27No longer build the mpd module. Closes: #578226Reinhard Tartler1-0/+1 2011-04-27No longer compile against Python. Python 2.6 now links against libssl,Reinhard Tartler2-2/+3