1 /* This may look like C code, but it is really -*- C++ -*- */
3 /* Data and function members for defining values and operations of a list node.
5 Copyright (C) 1989-1998, 2000 Free Software Foundation, Inc.
6 written by Douglas C. Schmidt (schmidt@ics.uci.edu)
8 This file is part of GNU GPERF.
10 GNU GPERF is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 1, or (at your option)
15 GNU GPERF is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GNU GPERF; see the file COPYING. If not, write to the Free
22 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
29 struct List_Node
: private Vectors
31 List_Node
*link
; /* TRUE if key has an identical KEY_SET as another key. */
32 List_Node
*next
; /* Points to next element on the list. */
33 const char *key
; /* Each keyword string stored here. */
34 int key_length
; /* Length of the key. */
35 const char *rest
; /* Additional information for building hash function. */
36 const char *char_set
; /* Set of characters to hash, specified by user. */
37 int char_set_length
; /* Length of char_set. */
38 int hash_value
; /* Hash value for the key. */
39 int occurrence
; /* A metric for frequency of key set occurrences. */
40 int index
; /* Position of this node relative to other nodes. */
42 List_Node (const char *key
, int len
, const char *rest
);
43 static void set_sort (char *base
, int len
);