]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/decContext.c
ICU-531.30.tar.gz
[apple/icu.git] / icuSources / i18n / decContext.c
index 513e0215971e4fd82e39a1ef8c12272d3620e986..440272884a799181dd31ee581b92b03644405839 100644 (file)
@@ -1,7 +1,7 @@
 /* ------------------------------------------------------------------ */
 /* Decimal Context module                                             */
 /* ------------------------------------------------------------------ */
-/* Copyright (c) IBM Corporation, 2000-2010.  All rights reserved.    */
+/* Copyright (c) IBM Corporation, 2000-2012.  All rights reserved.    */
 /*                                                                    */
 /* This software is made available under the terms of the             */
 /* ICU License -- ICU 1.8.1 and later.                                */
 #include "decContext.h"       /* context and base types  */
 #include "decNumberLocal.h"   /* decNumber local types, etc.  */
 
+#if 0  /* ICU: No need to test endianness at runtime. */
 /* compile-time endian tester [assumes sizeof(Int)>1] */
 static  const  Int mfcone=1;                 /* constant 1  */
 static  const  Flag *mfctop=(Flag *)&mfcone; /* -> top byte  */
 #define LITEND *mfctop             /* named flag; 1=little-endian  */
-
-/* ------------------------------------------------------------------ */
-/* round-for-reround digits                                           */
-/* ------------------------------------------------------------------ */
-const uByte DECSTICKYTAB[10]={1,1,2,3,4,6,6,7,8,9}; /* used if sticky */
-
-/* ------------------------------------------------------------------ */
-/* Powers of ten (powers[n]==10**n, 0<=n<=9)                          */
-/* ------------------------------------------------------------------ */
-const uInt DECPOWERS[10]={1, 10, 100, 1000, 10000, 100000, 1000000,
-                          10000000, 100000000, 1000000000};
+#endif
 
 /* ------------------------------------------------------------------ */
 /* decContextClearStatus -- clear bits in current status              */
@@ -210,7 +201,9 @@ U_CAPI decContext * U_EXPORT2 uprv_decContextSetRounding(decContext *context,
 /* ------------------------------------------------------------------ */
 U_CAPI decContext *  U_EXPORT2 uprv_decContextSetStatus(decContext *context, uInt status) {
   context->status|=status;
+#if 0  /* ICU: Do not raise signals. */
   if (status & context->traps) raise(SIGFPE);
+#endif
   return context;} /* decContextSetStatus  */
 
 /* ------------------------------------------------------------------ */
@@ -374,6 +367,7 @@ U_CAPI const char * U_EXPORT2 uprv_decContextStatusToString(const decContext *co
 /*                                                                    */
 /* No error is possible.                                              */
 /* ------------------------------------------------------------------ */
+#if 0  /* ICU: Unused function. Anyway, do not call printf(). */
 U_CAPI Int  U_EXPORT2 uprv_decContextTestEndian(Flag quiet) {
   Int res=0;                  /* optimist  */
   uInt dle=(uInt)DECLITEND;   /* unsign  */
@@ -391,6 +385,7 @@ U_CAPI Int  U_EXPORT2 uprv_decContextTestEndian(Flag quiet) {
     }
   return res;
   } /* decContextTestEndian  */
+#endif
 
 /* ------------------------------------------------------------------ */
 /* decContextTestSavedStatus -- test bits in saved status             */