]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/gdtoa/strtodg.c
EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Python Beta Release.
[mirror_edk2.git] / StdLib / LibC / gdtoa / strtodg.c
index fc0ae7cf38575f254e269e94b27d11bb26ad36a7..a8c28cf09153bbca81e7e812721804ddaafc3812 100644 (file)
@@ -1,35 +1,48 @@
-/* $NetBSD: strtodg.c,v 1.5.14.1 2008/04/08 21:10:55 jdc Exp $ */\r
+/** @file\r
 \r
-/****************************************************************\r
+  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
 \r
-The author of this software is David M. Gay.\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Copyright (C) 1998-2001 by Lucent Technologies\r
-All Rights Reserved\r
+  *****************************************************************\r
 \r
-Permission to use, copy, modify, and distribute this software and\r
-its documentation for any purpose and without fee is hereby\r
-granted, provided that the above copyright notice appear in all\r
-copies and that both that the copyright notice and this\r
-permission notice and warranty disclaimer appear in supporting\r
-documentation, and that the name of Lucent or any of its entities\r
-not be used in advertising or publicity pertaining to\r
-distribution of the software without specific, written prior\r
-permission.\r
+  The author of this software is David M. Gay.\r
 \r
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\r
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.\r
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY\r
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER\r
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r
-THIS SOFTWARE.\r
+  Copyright (C) 1998-2001 by Lucent Technologies\r
+  All Rights Reserved\r
 \r
-****************************************************************/\r
+  Permission to use, copy, modify, and distribute this software and\r
+  its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of Lucent or any of its entities\r
+  not be used in advertising or publicity pertaining to\r
+  distribution of the software without specific, written prior\r
+  permission.\r
 \r
-/* Please send bug reports to David M. Gay (dmg at acm dot org,\r
- * with " at " changed at "@" and " dot " changed to ".").  */\r
+  LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\r
+  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.\r
+  IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY\r
+  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r
+  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER\r
+  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
+  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r
+  THIS SOFTWARE.\r
+\r
+\r
+  Please send bug reports to David M. Gay (dmg at acm dot org,\r
+  with " at " changed at "@" and " dot " changed to ".").\r
+\r
+  *****************************************************************\r
+\r
+  NetBSD: strtodg.c,v 1.5.14.1 2008/04/08 21:10:55 jdc Exp\r
+**/\r
 #include  <LibConfig.h>\r
 \r
 #include "gdtoaimp.h"\r
@@ -611,14 +624,14 @@ strtodg
     if (e1 &= ~15) {\r
       e1 = (unsigned int)e1 >> 4;\r
       while(e1 >= (1 << (n_bigtens-1))) {\r
-        e2 += ((word0(rv) & Exp_mask)\r
+        e2 += (unsigned int)((word0(rv) & Exp_mask)\r
           >> Exp_shift1) - Bias;\r
         word0(rv) &= ~Exp_mask;\r
         word0(rv) |= Bias << Exp_shift1;\r
         dval(rv) *= bigtens[n_bigtens-1];\r
         e1 -= 1 << (n_bigtens-1);\r
         }\r
-      e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
+      e2 += (unsigned int)((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
       word0(rv) &= ~Exp_mask;\r
       word0(rv) |= Bias << Exp_shift1;\r
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r
@@ -633,14 +646,14 @@ strtodg
     if (e1 &= ~15) {\r
       e1 = (unsigned int)e1 >> 4;\r
       while(e1 >= (1 << (n_bigtens-1))) {\r
-        e2 += ((word0(rv) & Exp_mask)\r
+        e2 += (unsigned int)((word0(rv) & Exp_mask)\r
           >> Exp_shift1) - Bias;\r
         word0(rv) &= ~Exp_mask;\r
         word0(rv) |= Bias << Exp_shift1;\r
         dval(rv) *= tinytens[n_bigtens-1];\r
         e1 -= 1 << (n_bigtens-1);\r
         }\r
-      e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
+      e2 += (unsigned int)((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
       word0(rv) &= ~Exp_mask;\r
       word0(rv) |= Bias << Exp_shift1;\r
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r