Make setthetime() static per the prototype.
[dragonfly.git] / contrib / gperf / src / gen-perf.h
1 /* This may look like C code, but it is really -*- C++ -*- */
2
3 /* Provides high-level routines to manipulate the keyword list
4    structures the code generation output.
5
6    Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
7    written by Douglas C. Schmidt (schmidt@ics.uci.edu)
8
9 This file is part of GNU GPERF.
10
11 GNU GPERF is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 1, or (at your option)
14 any later version.
15
16 GNU GPERF is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with GNU GPERF; see the file COPYING.  If not, write to the Free
23 Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111, USA. */
24
25 #ifndef gen_perf_h
26 #define gen_perf_h 1
27
28 #include "key-list.h"
29 #include "bool-array.h"
30
31 class Gen_Perf : private Key_List, private Bool_Array
32 {
33 private:
34   int         max_hash_value;    /* Maximum possible hash value. */
35   int         fewest_collisions; /* Records fewest # of collisions for asso value. */
36   int         num_done;          /* Number of keywords processed without a collision. */
37
38   void        change (List_Node *prior, List_Node *curr);
39   int         affects_prev (char c, List_Node *curr);
40   static int  hash (List_Node *key_node);
41   static int  compute_disjoint_union (const char *set_1, int size_1, const char *set_2, int size_2, char *set_3);
42   static void sort_set (char *union_set, int len);
43
44 public:
45               Gen_Perf (void);
46              ~Gen_Perf (void);
47   int         operator () (void);
48 };
49
50 #endif