# HG changeset patch # User Kenichi Handa # Date 942901705 0 # Node ID cf75e5b634ecac5f57abc7dcc84ffd6765194579 # Parent 15937aa505e7eb486edc84d23b3a1d61438e2a2b (KEY_DESCRIPTION_SIZE): New macro. diff -r 15937aa505e7 -r cf75e5b634ec src/lisp.h --- a/src/lisp.h Thu Nov 18 05:07:40 1999 +0000 +++ b/src/lisp.h Thu Nov 18 05:08:25 1999 +0000 @@ -1070,6 +1070,16 @@ itself. */ #define CHARACTERBITS 19 +/* The maximum byte size consumed by push_key_description. + All callers should assure that at least this size of memory is + allocated at the place pointed by the second argument. + + Thers are 6 modifiers, each consumes 2 chars. + The octal form of a character code consumes + (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head). + We need one more byte for string terminator `\0'. */ +#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1) + #ifdef USE_X_TOOLKIT #ifdef NO_UNION_TYPE /* Use this for turning a (void *) into a Lisp_Object, as when the