diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-10-22 13:58:34 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-10-22 13:58:34 +0000 |
commit | 376c18e1d2307b123db4f852624994994b625e4d (patch) | |
tree | 452d233f7092980a2434acb69af178ce6c32028d /srfi/srfi-4.c | |
parent | c90ac3a8bcac5697c032307059a5ab967d41a16b (diff) | |
download | guile-376c18e1d2307b123db4f852624994994b625e4d.tar.gz |
(print_int64, print_uint64): Removed. (uvec_print): Use scm_intprint
for signed elemets and scm_uintprint for unsigned ones. Do not use
print_int64 and print_uint64 since scm_intprint and scm_Uintprint can
handle 64 bits now.
Diffstat (limited to 'srfi/srfi-4.c')
-rw-r--r-- | srfi/srfi-4.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/srfi/srfi-4.c b/srfi/srfi-4.c index 2c4e119a3..96f487e0f 100644 --- a/srfi/srfi-4.c +++ b/srfi/srfi-4.c @@ -76,25 +76,6 @@ int scm_tc16_uvec = 0; static const int uvec_sizes[10] = {1, 1, 2, 2, 4, 4, 8, 8, 4, 8}; -#if SCM_HAVE_T_INT64 - -// Print 64 bit integers. This should go away once we have a public -// scm_print_integer or similar that can print a scm_t_intmax. - -static void -print_int64 (scm_t_int64 num, SCM port, scm_print_state *pstate) -{ - scm_iprin1 (scm_from_int64 (num), port, pstate); -} - -static void -print_uint64 (scm_t_uint64 num, SCM port, scm_print_state *pstate) -{ - scm_iprin1 (scm_from_uint64 (num), port, pstate); -} - -#endif /* SCM_HAVE_T_UINT64 */ - /* ================================================================ */ /* SMOB procedures. */ /* ================================================================ */ @@ -152,15 +133,15 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate) if (i != 0) scm_puts (" ", port); switch (SCM_UVEC_TYPE (uvec)) { - case SCM_UVEC_U8: scm_intprint (*np.u8, 10, port); np.u8++; break; + case SCM_UVEC_U8: scm_uintprint (*np.u8, 10, port); np.u8++; break; case SCM_UVEC_S8: scm_intprint (*np.s8, 10, port); np.s8++; break; - case SCM_UVEC_U16: scm_intprint (*np.u16, 10, port); np.u16++; break; + case SCM_UVEC_U16: scm_uintprint (*np.u16, 10, port); np.u16++; break; case SCM_UVEC_S16: scm_intprint (*np.s16, 10, port); np.s16++; break; - case SCM_UVEC_U32: scm_intprint (*np.u32, 10, port); np.u32++; break; + case SCM_UVEC_U32: scm_uintprint (*np.u32, 10, port); np.u32++; break; case SCM_UVEC_S32: scm_intprint (*np.s32, 10, port); np.s32++; break; #if SCM_HAVE_T_INT64 - case SCM_UVEC_U64: print_uint64 (*np.u64, port, pstate); np.u64++; break; - case SCM_UVEC_S64: print_int64 (*np.s64, port, pstate); np.s64++; break; + case SCM_UVEC_U64: scm_uintprint (*np.u64, 10, port); np.u64++; break; + case SCM_UVEC_S64: scm_intprint (*np.s64, 10, port); np.s64++; break; #endif case SCM_UVEC_F32: scm_iprin1 (scm_from_double (*np.f32), port, pstate); |