From 04fa6e021596935f96dc755d5f7bc56ae4884ca9 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 17 Oct 2007 12:52:27 +0000 Subject: 2007-10-17 Martin Hunt PR5000 * vsprintf.c: Remove _stp_endian. --- runtime/vsprintf.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'runtime/vsprintf.c') diff --git a/runtime/vsprintf.c b/runtime/vsprintf.c index 0e52f5c3..061aba3f 100644 --- a/runtime/vsprintf.c +++ b/runtime/vsprintf.c @@ -12,9 +12,6 @@ #ifndef _VSPRINTF_C_ #define _VSPRINTF_C_ -enum endian {STP_NATIVE=0, STP_LITTLE, STP_BIG}; -static enum endian _stp_endian = STP_NATIVE; - static int skip_atoi(const char **s) { int i=0; @@ -213,37 +210,17 @@ int _stp_vsnprintf(char *buf, size_t size, const char *fmt, va_list args) ++str; break; case 2: - if (_stp_endian != STP_NATIVE) { - if (_stp_endian == STP_BIG) - num = cpu_to_be16(num); - else - num = cpu_to_le16(num); - } if((str + 1) <= end) *(int16_t *)str = (int16_t)num; str+=2; break; case 8: - if (_stp_endian != STP_NATIVE) { - if (_stp_endian == STP_BIG) - num = cpu_to_be64(num); - else - num = cpu_to_le64(num); - } - if((str + 7) <= end) *(int64_t *)str = num; str+=8; break; case 4: default: // "%4b" by default - if (_stp_endian != STP_NATIVE) { - if (_stp_endian == STP_BIG) - num = cpu_to_be32(num); - else - num = cpu_to_le32(num); - } - if((str + 3) <= end) *(int32_t *)str = num; str+=4; -- cgit