mirror of
https://git.savannah.gnu.org/git/gperf.git
synced 2025-12-02 13:09:22 +00:00
Unify initialization of Vectors::ALPHA_SIZE.
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
2002-10-14 Bruno Haible <bruno@clisp.org>
|
2002-10-14 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
* src/options.cc: Don't include "vector.h".
|
||||||
|
(Options::parse_options): Don't initialize Vectors::ALPHA_SIZE here.
|
||||||
|
* src/vectors.cc (Vectors::ALPHA_SIZE): Don't initialize here.
|
||||||
|
* src/gen-perf.cc (Gen_Perf::Gen_Perf): Initialize Vectors::ALPHA_SIZE.
|
||||||
|
|
||||||
* src/options.h (Positions): New class.
|
* src/options.h (Positions): New class.
|
||||||
(PositionIterator): New class.
|
(PositionIterator): New class.
|
||||||
(Options::parse_options): Renamed from Options::operator().
|
(Options::parse_options): Renamed from Options::operator().
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ Gen_Perf::Gen_Perf ()
|
|||||||
int asso_value_max;
|
int asso_value_max;
|
||||||
int non_linked_length;
|
int non_linked_length;
|
||||||
|
|
||||||
|
Vectors::ALPHA_SIZE = (option[SEVENBIT] ? 128 : 256);
|
||||||
Key_List::read_keys ();
|
Key_List::read_keys ();
|
||||||
if (option[ORDER])
|
if (option[ORDER])
|
||||||
reorder ();
|
reorder ();
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
|
|||||||
#include <ctype.h> /* declares isdigit() */
|
#include <ctype.h> /* declares isdigit() */
|
||||||
#include "getopt.h"
|
#include "getopt.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "vectors.h"
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
/* Global option coordinator for the entire program. */
|
/* Global option coordinator for the entire program. */
|
||||||
@@ -765,7 +764,6 @@ Options::parse_options (int argc, char *argv[])
|
|||||||
case '7': /* Assume 7-bit characters. */
|
case '7': /* Assume 7-bit characters. */
|
||||||
{
|
{
|
||||||
_option_word |= SEVENBIT;
|
_option_word |= SEVENBIT;
|
||||||
Vectors::ALPHA_SIZE = 128;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
|
|||||||
|
|
||||||
#include "vectors.h"
|
#include "vectors.h"
|
||||||
|
|
||||||
int Vectors::ALPHA_SIZE = MAX_ALPHA_SIZE;
|
int Vectors::ALPHA_SIZE;
|
||||||
int Vectors::_occurrences[MAX_ALPHA_SIZE];
|
int Vectors::_occurrences[MAX_ALPHA_SIZE];
|
||||||
int Vectors::_asso_values[MAX_ALPHA_SIZE];
|
int Vectors::_asso_values[MAX_ALPHA_SIZE];
|
||||||
|
|||||||
Reference in New Issue
Block a user