mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-09-19 06:14:37 +00:00
INT_STRLEN_MAXIMUM work
SCCS-file: private.h SCCS-SID: 7.4
This commit is contained in:
committed by
Paul Eggert
parent
b6a4a39705
commit
12cbeae390
@@ -162,7 +162,14 @@ extern void free P((char * buf));
|
||||
#endif /* !defined FALSE */
|
||||
|
||||
#ifndef INT_STRLEN_MAXIMUM
|
||||
#define INT_STRLEN_MAXIMUM (1 + (sizeof (int) * CHAR_BIT + 1) / 3)
|
||||
/*
|
||||
** 302 / 1000 is log10(2.0) rounded up.
|
||||
** Subtract one for the sign bit;
|
||||
** add one for integer division truncation;
|
||||
** add one more for a minus sign.
|
||||
*/
|
||||
#define INT_STRLEN_MAXIMUM(type) \
|
||||
((sizeof(type) * CHAR_BIT - 1) * 302 / 1000 + 2)
|
||||
#endif /* !defined INT_STRLEN_MAXIMUM */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user