home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / cperf-2.1 / src / listnode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-11  |  1.7 KB  |  44 lines

  1. /* Data and function members for defining values and operations of a list node.
  2.  
  3.    Copyright (C) 1989 Free Software Foundation, Inc.
  4.    written by Douglas C. Schmidt (schmidt@ics.uci.edu)
  5.  
  6. This file is part of GNU GPERF.
  7.  
  8. GNU GPERF is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 1, or (at your option)
  11. any later version.
  12.  
  13. GNU GPERF is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU GPERF; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22. #ifndef _listnode_h
  23. #define _listnode_h
  24. #include "prototype.h"
  25.  
  26. #define ALPHABET_SIZE 128
  27.  
  28. typedef struct list_node 
  29.   struct list_node *link;       /* TRUE if key has an identical KEY_SET as another key. */
  30.   struct list_node *next;       /* Points to next element on the list. */  
  31.   int        length;            /* Length of the key. */
  32.   int        hash_value;        /* Hash value for the key. */
  33.   int        occurrence;        /* A metric for frequency of key set occurrences. */
  34.   int        index;             /* Position of this node relative to other nodes. */
  35.   char      *key;               /* Key string. */
  36.   char      *rest;              /* Additional information for building hash function. */
  37.   char       char_set[1];       /* Set of characters to hash, specified by user. */
  38. } LIST_NODE;
  39.  
  40. extern LIST_NODE *make_list_node P ((char *k, int len));
  41.  
  42. #endif _listnode_h
  43.