The base/count bounds checking was insufficient, leading to a kernel memory
[dragonfly.git] / contrib / gperf / src / vectors.h
1 /* This may look like C code, but it is really -*- C++ -*- */
2
3 /* Static class data members that are shared between several classes via
4    inheritance.
5
6    Copyright (C) 1989-1998 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 vectors_h
26 #define vectors_h 1
27
28 static const int MAX_ALPHA_SIZE = 256;
29
30 struct Vectors
31 {
32   static int   ALPHA_SIZE;                  /* Size of alphabet. */
33   static int   occurrences[MAX_ALPHA_SIZE]; /* Counts occurrences of each key set character. */
34   static int   asso_values[MAX_ALPHA_SIZE]; /* Value associated with each character. */
35 };
36
37 #endif