strcpy (buf, local_binary_format_prefix ()); strcat (buf, cp); strcat (buf, local_binary_format_suffix ());
strcpy (buf, cp);
print_scalar_formatted (void *valaddr, struct type *type, int format, int size,			struct ui_file *stream){  LONGEST val_long = 0;  unsigned int len = TYPE_LENGTH (type);  if (len > sizeof(LONGEST) &&      (TYPE_CODE (type) == TYPE_CODE_INT       || TYPE_CODE (type) == TYPE_CODE_ENUM))    {      switch (format)	{	case 'o':	  print_octal_chars (stream, valaddr, len);	  return;	case 'u':	case 'd':	  print_decimal_chars (stream, valaddr, len);	  return;	case 't':	  print_binary_chars (stream, valaddr, len);	  return;	case 'x':	  print_hex_chars (stream, valaddr, len);	  return;	case 'c':	  print_char_chars (stream, valaddr, len);	  return;	default:	  break;	};    }  if (format != 'f')    val_long = unpack_long (type, valaddr);  /* If the value is a pointer, and pointers and addresses are not the     same, then at this point, the value's length (in target bytes) is     TARGET_ADDR_BIT/TARGET_CHAR_BIT, not TYPE_LENGTH (type).  */  if (TYPE_CODE (type) == TYPE_CODE_PTR)    len = TARGET_ADDR_BIT / TARGET_CHAR_BIT;  /* If we are printing it as unsigned, truncate it in case it is actually     a negative signed value (e.g. "print/u (short)-1" should print 65535     (if shorts are 16 bits) instead of 4294967295).  */  if (format != 'd')    {      if (len < sizeof (LONGEST))	val_long &= ((LONGEST) 1 << HOST_CHAR_BIT * len) - 1;    }  switch (format)    {    case 'x':      if (!size)	{	  /* no size specified, like in print.  Print varying # of digits. */	  print_longest (stream, 'x', 1, val_long);	}      else	switch (size)	  {	  case 'b':	  case 'h':	  case 'w':	  case 'g':	    print_longest (stream, size, 1, val_long);	    break;	  default:	    error ("Undefined output size \"%c\".", size);	  }      break;    case 'd':      print_longest (stream, 'd', 1, val_long);      break;    case 'u':      print_longest (stream, 'u', 0, val_long);      break;    case 'o':      if (val_long)	print_longest (stream, 'o', 1, val_long);      else	fprintf_filtered (stream, "0");      break;    case 'a':      {	CORE_ADDR addr = unpack_pointer (type, valaddr);	print_address (addr, stream);      }      break;    case 'c':      value_print (value_from_longest (builtin_type_true_char, val_long),		   stream, 0, Val_pretty_default);      break;    case 'f':      if (len == TYPE_LENGTH (builtin_type_float))        type = builtin_type_float;      else if (len == TYPE_LENGTH (builtin_type_double))        type = builtin_type_double;      else if (len == TYPE_LENGTH (builtin_type_long_double))        type = builtin_type_long_double;      print_floating (valaddr, type, stream);      break;    case 0:      internal_error (__FILE__, __LINE__, "failed internal consistency check");    case 't':      /* Binary; 't' stands for "two".  */      {	char bits[8 * (sizeof val_long) + 1];	char buf[8 * (sizeof val_long) + 32];	char *cp = bits;	int width;	if (!size)	  width = 8 * (sizeof val_long);	else	  switch (size)	    {	    case 'b':	      width = 8;	      break;	    case 'h':	      width = 16;	      break;	    case 'w':	      width = 32;	      break;	    case 'g':	      width = 64;	      break;	    default:	      error ("Undefined output size \"%c\".", size);	    }	bits[width] = '\0';	while (width-- > 0)	  {	    bits[width] = (val_long & 1) ? '1' : '0';	    val_long >>= 1;	  }	if (!size)	  {	    while (*cp && *cp == '0')	      cp++;	    if (*cp == '\0')	      cp--;	  }	strcpy (buf, local_binary_format_prefix ());	strcat (buf, cp);	strcat (buf, local_binary_format_suffix ());	fputs_filtered (buf, stream);      }      break;    default:      error ("Undefined output format \"%c\".", format);    }}