mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
glyphs: fix types
The code was written on top of buffers of `char[26]`, and then was changed to use `char *`, yet was still using `sizeof buf`, which became `sizeof (char *)` instead of `sizeof (char[26])`. Reported by Dagobert Michelsen. https://lists.gnu.org/r/bug-bison/2020-07/msg00023.html * src/glyphs.h, src/glyphs.c: Get rid of uses of `char *`, use only glyph_buffer_t.
This commit is contained in:
12
src/glyphs.h
12
src/glyphs.h
@@ -23,20 +23,24 @@
|
||||
/* Initialize the following variables. */
|
||||
void glyphs_init (void);
|
||||
|
||||
/* In gnulib/lib/unicodeio.h unicode_to_mb uses a buffer of 25 bytes.
|
||||
In down_arrow, we append one space. */
|
||||
typedef char glyph_buffer_t[26];
|
||||
|
||||
/* "→", separates the lhs of a rule from its rhs. */
|
||||
extern const char *arrow;
|
||||
extern glyph_buffer_t arrow;
|
||||
extern int arrow_width;
|
||||
|
||||
/* "•", a point in an item (aka, a dotted rule). */
|
||||
extern const char *dot;
|
||||
extern glyph_buffer_t dot;
|
||||
extern int dot_width;
|
||||
|
||||
/* "↳ ", below an lhs to announce the rhs. */
|
||||
extern const char *down_arrow;
|
||||
extern glyph_buffer_t down_arrow;
|
||||
extern int down_arrow_width;
|
||||
|
||||
/* "ε", an empty rhs. */
|
||||
extern const char *empty;
|
||||
extern glyph_buffer_t empty;
|
||||
extern int empty_width;
|
||||
|
||||
/* " ", separate symbols in the rhs of a derivation. */
|
||||
|
||||
Reference in New Issue
Block a user