fputs_filtered (local_decimal_format_suffix (), stream);
print_decimal_chars (struct ui_file *stream, unsigned char *valaddr,		     unsigned len){#define TEN             10#define TWO_TO_FOURTH   16#define CARRY_OUT(  x ) ((x) / TEN)	/* extend char to int */#define CARRY_LEFT( x ) ((x) % TEN)#define SHIFT( x )      ((x) << 4)#define START_P \        ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? valaddr : valaddr + len - 1)#define NOT_END_P \        ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? (p < valaddr + len) : (p >= valaddr))#define NEXT_P \        ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG) ? p++ : p-- )#define LOW_NIBBLE(  x ) ( (x) & 0x00F)#define HIGH_NIBBLE( x ) (((x) & 0x0F0) >> 4)  unsigned char *p;  unsigned char *digits;  int carry;  int decimal_len;  int i, j, decimal_digits;  int dummy;  int flip;  /* Base-ten number is less than twice as many digits   * as the base 16 number, which is 2 digits per byte.   */  decimal_len = len * 2 * 2;  digits = xmalloc (decimal_len);  for (i = 0; i < decimal_len; i++)    {      digits[i] = 0;    }  fputs_filtered (local_decimal_format_prefix (), stream);  /* Ok, we have an unknown number of bytes of data to be printed in   * decimal.   *   * Given a hex number (in nibbles) as XYZ, we start by taking X and   * decemalizing it as "x1 x2" in two decimal nibbles.  Then we multiply   * the nibbles by 16, add Y and re-decimalize.  Repeat with Z.   *   * The trick is that "digits" holds a base-10 number, but sometimes   * the individual digits are > 10.    *   * Outer loop is per nibble (hex digit) of input, from MSD end to   * LSD end.   */  decimal_digits = 0;		/* Number of decimal digits so far */  p = START_P;  flip = 0;  while (NOT_END_P)    {      /*       * Multiply current base-ten number by 16 in place.       * Each digit was between 0 and 9, now is between       * 0 and 144.       */      for (j = 0; j < decimal_digits; j++)	{	  digits[j] = SHIFT (digits[j]);	}      /* Take the next nibble off the input and add it to what       * we've got in the LSB position.  Bottom 'digit' is now       * between 0 and 159.       *       * "flip" is used to run this loop twice for each byte.       */      if (flip == 0)	{	  /* Take top nibble.	   */	  digits[0] += HIGH_NIBBLE (*p);	  flip = 1;	}      else	{	  /* Take low nibble and bump our pointer "p".	   */	  digits[0] += LOW_NIBBLE (*p);	  NEXT_P;	  flip = 0;	}      /* Re-decimalize.  We have to do this often enough       * that we don't overflow, but once per nibble is       * overkill.  Easier this way, though.  Note that the       * carry is often larger than 10 (e.g. max initial       * carry out of lowest nibble is 15, could bubble all       * the way up greater than 10).  So we have to do       * the carrying beyond the last current digit.       */      carry = 0;      for (j = 0; j < decimal_len - 1; j++)	{	  digits[j] += carry;	  /* "/" won't handle an unsigned char with	   * a value that if signed would be negative.	   * So extend to longword int via "dummy".	   */	  dummy = digits[j];	  carry = CARRY_OUT (dummy);	  digits[j] = CARRY_LEFT (dummy);	  if (j >= decimal_digits && carry == 0)	    {	      /*	       * All higher digits are 0 and we	       * no longer have a carry.	       *	       * Note: "j" is 0-based, "decimal_digits" is	       *       1-based.	       */	      decimal_digits = j + 1;	      break;	    }	}    }  /* Ok, now "digits" is the decimal representation, with   * the "decimal_digits" actual digits.  Print!   */  for (i = decimal_digits - 1; i >= 0; i--)    {      fprintf_filtered (stream, "%1d", digits[i]);    }  xfree (digits);  fputs_filtered (local_decimal_format_suffix (), stream);}