rem: fmt_string = xmalloc (strlen (pre_fmt_string)); sprintf (fmt_string, pre_fmt_string, (field_width = LDBL_DIG + 8), LDBL_DIG);
add: precision = LDBL_DIG;
context: decode_one_format (const char *s_orig, const char *s, const char **next,		   struct tspec *tspec){  enum size_spec size_spec;  unsigned long int size;  enum output_format fmt;  const char *pre_fmt_string;  char *fmt_string;  void (*print_function) (size_t, const char *, const char *);  const char *p;  unsigned int c;  unsigned int field_width = 0;  assert (tspec != NULL);  switch (*s)    {    case 'd':    case 'o':    case 'u':    case 'x':      c = *s;      ++s;      switch (*s)	{	case 'C':	  ++s;	  size = sizeof (char);	  break;	case 'S':	  ++s;	  size = sizeof (short);	  break;	case 'I':	  ++s;	  size = sizeof (int);	  break;	case 'L':	  ++s;	  size = sizeof (long int);	  break;	default:	  if (simple_strtoul (s, &p, &size) != 0)	    {	      /* The integer at P in S would overflow an unsigned long.		 A digit string that long is sufficiently odd looking		 that the following diagnostic is sufficient.  */	      error (0, 0, _("invalid type string `%s'"), s_orig);	      return 1;	    }	  if (p == s)	    size = sizeof (int);	  else	    {	      if (MAX_INTEGRAL_TYPE_SIZE < size		  || integral_type_size[size] == NO_SIZE)		{		  error (0, 0, _("invalid type string `%s';\n\this system doesn't provide a %lu-byte integral type"), s_orig, size);		  return 1;		}	      s = p;	    }	  break;	}#define ISPEC_TO_FORMAT(Spec, Min_format, Long_format, Max_format)	\  ((Spec) == LONG_LONG ? (Max_format)					\   : ((Spec) == LONG ? (Long_format)					\      : (Min_format)))							\#define FMT_BYTES_ALLOCATED 9      fmt_string = xmalloc (FMT_BYTES_ALLOCATED);      size_spec = integral_type_size[size];      switch (c)	{	case 'd':	  fmt = SIGNED_DECIMAL;	  sprintf (fmt_string, " %%%u%s",		   (field_width = bytes_to_signed_dec_digits[size]),		   ISPEC_TO_FORMAT (size_spec, "d", "ld", PRIdMAX));	  break;	case 'o':	  fmt = OCTAL;	  sprintf (fmt_string, " %%0%u%s",		   (field_width = bytes_to_oct_digits[size]),		   ISPEC_TO_FORMAT (size_spec, "o", "lo", PRIoMAX));	  break;	case 'u':	  fmt = UNSIGNED_DECIMAL;	  sprintf (fmt_string, " %%%u%s",		   (field_width = bytes_to_unsigned_dec_digits[size]),		   ISPEC_TO_FORMAT (size_spec, "u", "lu", PRIuMAX));	  break;	case 'x':	  fmt = HEXADECIMAL;	  sprintf (fmt_string, " %%0%u%s",		   (field_width = bytes_to_hex_digits[size]),		   ISPEC_TO_FORMAT (size_spec, "x", "lx", PRIxMAX));	  break;	default:	  abort ();	}      assert (strlen (fmt_string) < FMT_BYTES_ALLOCATED);      switch (size_spec)	{	case CHAR:	  print_function = (fmt == SIGNED_DECIMAL			    ? print_s_char			    : print_char);	  break;	case SHORT:	  print_function = (fmt == SIGNED_DECIMAL			    ? print_s_short			    : print_short);	  break;	case INT:	  print_function = print_int;	  break;	case LONG:	  print_function = print_long;	  break;	case LONG_LONG:	  print_function = print_long_long;	  break;	default:	  abort ();	}      break;    case 'f':      fmt = FLOATING_POINT;      ++s;      switch (*s)	{	case 'F':	  ++s;	  size = sizeof (float);	  break;	case 'D':	  ++s;	  size = sizeof (double);	  break;	case 'L':	  ++s;	  size = sizeof (LONG_DOUBLE);	  break;	default:	  if (simple_strtoul (s, &p, &size) != 0)	    {	      /* The integer at P in S would overflow an unsigned long.		 A digit string that long is sufficiently odd looking		 that the following diagnostic is sufficient.  */	      error (0, 0, _("invalid type string `%s'"), s_orig);	      return 1;	    }	  if (p == s)	    size = sizeof (double);	  else	    {	      if (size > MAX_FP_TYPE_SIZE		  || fp_type_size[size] == NO_SIZE)		{		  error (0, 0, _("invalid type string `%s';\n\this system doesn't provide a %lu-byte floating point type"), s_orig, size);		  return 1;		}	      s = p;	    }	  break;	}      size_spec = fp_type_size[size];      switch (size_spec)	{	case FLOAT_SINGLE:	  print_function = print_float;	  /* Don't use %#e; not all systems support it.  */	  pre_fmt_string = " %%%d.%de";	  fmt_string = xmalloc (strlen (pre_fmt_string));	  sprintf (fmt_string, pre_fmt_string,		   (field_width = FLT_DIG + 8), FLT_DIG);	  break;	case FLOAT_DOUBLE:	  print_function = print_double;	  pre_fmt_string = " %%%d.%de";	  fmt_string = xmalloc (strlen (pre_fmt_string));	  sprintf (fmt_string, pre_fmt_string,		   (field_width = DBL_DIG + 8), DBL_DIG);	  break;#ifdef HAVE_LONG_DOUBLE	case FLOAT_LONG_DOUBLE:	  print_function = print_long_double;	  pre_fmt_string = " %%%d.%dLe";	  fmt_string = xmalloc (strlen (pre_fmt_string));	  sprintf (fmt_string, pre_fmt_string,		   (field_width = LDBL_DIG + 8), LDBL_DIG);	  break;#endif	default:	  abort ();	}      break;    case 'a':      ++s;      fmt = NAMED_CHARACTER;      size_spec = CHAR;      fmt_string = NULL;      print_function = print_named_ascii;      field_width = 3;      break;    case 'c':      ++s;      fmt = CHARACTER;      size_spec = CHAR;      fmt_string = NULL;      print_function = print_ascii;      field_width = 3;      break;    default:      error (0, 0, _("invalid character `%c' in type string `%s'"),	     *s, s_orig);      return 1;    }  tspec->size = size_spec;  tspec->fmt = fmt;  tspec->print_function = print_function;  tspec->fmt_string = fmt_string;  tspec->field_width = field_width;  tspec->hexl_mode_trailer = (*s == 'z');  if (tspec->hexl_mode_trailer)    s++;  if (next != NULL)    *next = s;  return 0;}