X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b2ca4022ea6c61e10ac87a0a92bb0f998ecf8b48..eeeb962b:/src/state.h diff --git a/src/state.h b/src/state.h index 615c7d5c..4c60a271 100644 --- a/src/state.h +++ b/src/state.h @@ -1,5 +1,5 @@ /* Type definitions for nondeterministic finite state machine for bison, - Copyright (C) 1984, 1989, 2000 Free Software Foundation, Inc. + Copyright 1984, 1989, 2000 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -99,7 +99,9 @@ typedef struct core } core; - +#define CORE_ALLOC(Nitems) \ + (core *) xcalloc ((unsigned) (sizeof (core) \ + + (Nitems - 1) * sizeof (short)), 1) typedef struct shifts { @@ -110,6 +112,9 @@ typedef struct shifts } shifts; +#define SHIFTS_ALLOC(Nshifts) \ + (shifts *) xcalloc ((unsigned) (sizeof (shifts) \ + + (Nshifts - 1) * sizeof (short)), 1) typedef struct errs @@ -119,6 +124,10 @@ typedef struct errs } errs; +#define ERRS_ALLOC(Nerrs) \ + (errs *) xcalloc ((unsigned) (sizeof (errs) \ + + (Nerrs - 1) * sizeof (short)), 1) + typedef struct reductions @@ -130,4 +139,8 @@ typedef struct reductions } reductions; +#define REDUCTIONS_ALLOC(Nreductions) \ + (reductions *) xcalloc ((unsigned) (sizeof (reductions) \ + + (Nreductions - 1) * sizeof (short)), 1) + #endif /* !STATE_H_ */