win64: fix fixnum printing
This commit is contained in:
parent
327b7ac6a1
commit
1f736f4ad8
|
@ -1838,12 +1838,12 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
|
||||||
} else {
|
} else {
|
||||||
if (val > 0) {
|
if (val > 0) {
|
||||||
always_scheme(pp, 1);
|
always_scheme(pp, 1);
|
||||||
sprintf(quick_buffer, "#%ld=", (val - 3) >> 1);
|
sprintf(quick_buffer, "#%" PRINTF_INTPTR_SIZE_PREFIX "d=", (val - 3) >> 1);
|
||||||
print_utf8_string(pp, quick_buffer, 0, -1);
|
print_utf8_string(pp, quick_buffer, 0, -1);
|
||||||
scheme_hash_set(ht, obj, (Scheme_Object *)(-val));
|
scheme_hash_set(ht, obj, (Scheme_Object *)(-val));
|
||||||
} else {
|
} else {
|
||||||
always_scheme(pp, 0);
|
always_scheme(pp, 0);
|
||||||
sprintf(quick_buffer, "#%ld#", ((-val) - 3) >> 1);
|
sprintf(quick_buffer, "#%" PRINTF_INTPTR_SIZE_PREFIX "d#", ((-val) - 3) >> 1);
|
||||||
print_utf8_string(pp, quick_buffer, 0, -1);
|
print_utf8_string(pp, quick_buffer, 0, -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2041,7 +2041,7 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sprintf(quick_buffer, "%ld", SCHEME_INT_VAL(obj));
|
sprintf(quick_buffer, "%" PRINTF_INTPTR_SIZE_PREFIX "d", SCHEME_INT_VAL(obj));
|
||||||
print_utf8_string(pp, quick_buffer, 0, -1);
|
print_utf8_string(pp, quick_buffer, 0, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2574,7 +2574,7 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
|
||||||
print_utf8_string(pp, ":", 0, 1);
|
print_utf8_string(pp, ":", 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(s, "%ld", ((Scheme_Env *)obj)->phase);
|
sprintf(s, "%" PRINTF_INTPTR_SIZE_PREFIX "d", ((Scheme_Env *)obj)->phase);
|
||||||
print_utf8_string(pp, s, 0, -1);
|
print_utf8_string(pp, s, 0, -1);
|
||||||
print_utf8_string(pp, ">", 0, 1);
|
print_utf8_string(pp, ">", 0, 1);
|
||||||
}
|
}
|
||||||
|
@ -2702,9 +2702,12 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
|
||||||
print_utf8_string(pp, ":", 0, 1);
|
print_utf8_string(pp, ":", 0, 1);
|
||||||
}
|
}
|
||||||
if (stx->srcloc->line >= 0)
|
if (stx->srcloc->line >= 0)
|
||||||
sprintf(quick_buffer, "%ld:%ld", stx->srcloc->line, stx->srcloc->col-1);
|
sprintf(quick_buffer,
|
||||||
|
"%" PRINTF_INTPTR_SIZE_PREFIX "d:%" PRINTF_INTPTR_SIZE_PREFIX "d",
|
||||||
|
stx->srcloc->line, stx->srcloc->col-1);
|
||||||
else
|
else
|
||||||
sprintf(quick_buffer, ":%ld", stx->srcloc->pos);
|
sprintf(quick_buffer, ":%" PRINTF_INTPTR_SIZE_PREFIX "d",
|
||||||
|
stx->srcloc->pos);
|
||||||
print_utf8_string(pp, quick_buffer, 0, -1);
|
print_utf8_string(pp, quick_buffer, 0, -1);
|
||||||
} else
|
} else
|
||||||
print_utf8_string(pp, "#<syntax", 0, 8);
|
print_utf8_string(pp, "#<syntax", 0, 8);
|
||||||
|
@ -3012,7 +3015,9 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht,
|
||||||
print_this_string(pp, "#~", 0, 2);
|
print_this_string(pp, "#~", 0, 2);
|
||||||
#if NO_COMPACT
|
#if NO_COMPACT
|
||||||
if (t < _scheme_last_type_) {
|
if (t < _scheme_last_type_) {
|
||||||
sprintf (quick_buffer, "%ld", (intptr_t)SCHEME_TYPE(obj));
|
sprintf (quick_buffer,
|
||||||
|
"%" PRINTF_INTPTR_SIZE_PREFIX "d",
|
||||||
|
(intptr_t)SCHEME_TYPE(obj));
|
||||||
print_this_string(pp, quick_buffer, 0, -1);
|
print_this_string(pp, quick_buffer, 0, -1);
|
||||||
} else
|
} else
|
||||||
print_this_string(pp, scheme_get_type_name(t), 0, -1);
|
print_this_string(pp, scheme_get_type_name(t), 0, -1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user