+ break;
+ }
+ return snprintf(buf, len, "%s%s%s", prefix, str, suffix);
+
+ case irms_float_number:
+ switch (mode_info->mode_output) {
+ case TVO_HEX:
+ return snprintf(buf, len, "%s%s%s", prefix, fc_print(tv->value, tv_buf, sizeof(tv_buf), FC_PACKED), suffix);
+
+ case TVO_HEXFLOAT:
+ return snprintf(buf, len, "%s%s%s", prefix, fc_print(tv->value, tv_buf, sizeof(tv_buf), FC_HEX), suffix);
+
+ case TVO_FLOAT:
+ case TVO_NATIVE:
+ default:
+ return snprintf(buf, len, "%s%s%s", prefix, fc_print(tv->value, tv_buf, sizeof(tv_buf), FC_DEC), suffix);
+ }
+ break;
+
+ case irms_reference:
+ if (tv == tv->mode->null) return snprintf(buf, len, "NULL");
+ if (tv->value != NULL) {
+ if (len > tv->length) {
+ memcpy(buf, tv->value, tv->length);
+ buf[tv->length] = '\0';
+ }
+ else {
+ /* truncated */
+ memcpy(buf, tv->value, len-1);
+ buf[len-1] = '\0';
+ }
+ return tv->length;