Accept topic changes from servers that do not send topic-set timestamps (fixes SF...
[ircu2.10.12-pk.git] / libs / dbprim / dbprim_int.h
1 /*
2 ** Copyright (C) 2002 by Kevin L. Mitchell <klmitch@mit.edu>
3 **
4 ** This library is free software; you can redistribute it and/or
5 ** modify it under the terms of the GNU Library General Public
6 ** License as published by the Free Software Foundation; either
7 ** version 2 of the License, or (at your option) any later version.
8 **
9 ** This library is distributed in the hope that it will be useful,
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 ** Library General Public License for more details.
13 **
14 ** You should have received a copy of the GNU Library General Public
15 ** License along with this library; if not, write to the Free
16 ** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
17 ** MA 02111-1307, USA
18 **
19 ** @(#)$Id$
20 */
21 #ifndef __include_dbprim_int_h__
22 #define __include_dbprim_int_h__
23
24 #ifdef __GNUC__
25 # if (__GNUC__ < 2) || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
26 #  define __attribute__(A)
27 # endif
28 #else
29 # define __extension__
30 # define __attribute__(A)
31 #endif
32
33 #define RCSTAG(tag) static char rcsid[] __attribute__((unused)) = tag
34
35 unsigned long _hash_prime(unsigned long start);
36
37 #define _hash_rollover(mod)     (((mod) * 4) / 3)
38 #define _hash_rollunder(mod)    (((mod) * 3) / 4)
39 #define _hash_fuzz(mod)         (((mod) * 4) / 3)
40
41 unsigned long _st_remove(smat_table_t *table, smat_entry_t *entry,
42                          unsigned int remflag);
43
44 #define ST_REM_FIRST    0x0001  /* remove from first list */
45 #define ST_REM_SECOND   0x0002  /* remove from second list */
46 #define ST_REM_HASH     0x0004  /* remove from hash table */
47 #define ST_REM_FREE     0x0008  /* free the entry */
48
49 smat_entry_t *_smat_alloc(void);
50 void _smat_free(smat_entry_t *entry);
51
52 #endif /* __include_dbprim_int_h__ */