<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-02-01)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtolong.c:  Reformat range check.
        Add check for result==0.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2687&r2=text&tr2=1.2688&diff_format=h">M</a></td><td width='1%'>1.2688</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtolong.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtolong.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2687 rtems/cpukit/ChangeLog:1.2688
--- rtems/cpukit/ChangeLog:1.2687       Mon Jan 31 20:39:20 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:29:26 2011
</font><font color='#997700'>@@ -1,4 +1,9 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
<font color='#000088'>+
+       * libmisc/stringto/stringtolong.c:  Reformat range check.
+       Add check for result==0.
+
+2011-02-01     Ralf Corsepius <ralf.corsepius@rtems.org>
</font>   
        * libmisc/Makefile.am: Remove stringto/stringto_template.h.
        * libmisc/stringto/stringto_template.h: Remove.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtolong.c:1.3 rtems/cpukit/libmisc/stringto/stringtolong.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtolong.c:1.3    Mon Jan 31 20:32:45 2011
+++ rtems/cpukit/libmisc/stringto/stringtolong.c        Mon Jan 31 23:29:26 2011
</font><font color='#997700'>@@ -49,11 +49,9 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == LONG_MAX) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
-
-  if ( (result == LONG_MIN) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
+      return RTEMS_INVALID_NUMBER;
</font> 
   *n = result;
 
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtounsignedlong.c: Reformat range check.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2688&r2=text&tr2=1.2689&diff_format=h">M</a></td><td width='1%'>1.2689</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtounsignedlong.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtounsignedlong.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2688 rtems/cpukit/ChangeLog:1.2689
--- rtems/cpukit/ChangeLog:1.2688       Mon Jan 31 23:29:26 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:36:03 2011
</font><font color='#997700'>@@ -1,5 +1,6 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringtounsignedlong.c: Reformat range check.
</font>   * libmisc/stringto/stringtolong.c:  Reformat range check.
        Add check for result==0.
 

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtounsignedlong.c:1.3 rtems/cpukit/libmisc/stringto/stringtounsignedlong.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtounsignedlong.c:1.3    Mon Jan 31 20:32:46 2011
+++ rtems/cpukit/libmisc/stringto/stringtounsignedlong.c        Mon Jan 31 23:36:03 2011
</font><font color='#997700'>@@ -49,11 +49,9 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == ULONG_MAX) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
-
-  if ( (result == 0) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == ULONG_MAX )))
+      return RTEMS_INVALID_NUMBER;
</font> 
   *n = result;
 
</pre>
<p> </p>
<a name='cs3'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtounsignedlonglong.c: Reformat range check.
        c99 portability improvements.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2689&r2=text&tr2=1.2690&diff_format=h">M</a></td><td width='1%'>1.2690</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtounsignedlonglong.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtounsignedlonglong.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2689 rtems/cpukit/ChangeLog:1.2690
--- rtems/cpukit/ChangeLog:1.2689       Mon Jan 31 23:36:03 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:38:01 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringtounsignedlonglong.c: Reformat range check.
+       c99 portability improvements.
</font>   * libmisc/stringto/stringtounsignedlong.c: Reformat range check.
        * libmisc/stringto/stringtolong.c:  Reformat range check.
        Add check for result==0.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtounsignedlonglong.c:1.3 rtems/cpukit/libmisc/stringto/stringtounsignedlonglong.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtounsignedlonglong.c:1.3        Mon Jan 31 20:32:46 2011
+++ rtems/cpukit/libmisc/stringto/stringtounsignedlonglong.c    Mon Jan 31 23:38:01 2011
</font><font color='#997700'>@@ -21,6 +21,11 @@
</font> 
 #include <rtems/stringto.h>
 
<font color='#000088'>+/* c99 has ULLONG_MAX instead of ULONG_LONG_MAX */
+#ifndef ULONG_LONG_MAX
+#define ULONG_LONG_MAX ULLONG_MAX
+#endif
+
</font> /*
  *  Instantiate an error checking wrapper for strtoull (unsigned long long)
  */
<font color='#997700'>@@ -49,11 +54,9 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == ULONG_LONG_MAX) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
-
-  if ( (result == 0) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == ULONG_LONG_MAX )))
+      return RTEMS_INVALID_NUMBER;
</font> 
   *n = result;
 
</pre>
<p> </p>
<a name='cs4'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtolonglong.c: Reformat range check.
        c99 portability improvements. Add check for result==0.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2690&r2=text&tr2=1.2691&diff_format=h">M</a></td><td width='1%'>1.2691</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtolonglong.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtolonglong.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2690 rtems/cpukit/ChangeLog:1.2691
--- rtems/cpukit/ChangeLog:1.2690       Mon Jan 31 23:38:01 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:39:20 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringtolonglong.c: Reformat range check.
+       c99 portability improvements. Add check for result==0.
</font>   * libmisc/stringto/stringtounsignedlonglong.c: Reformat range check.
        c99 portability improvements.
        * libmisc/stringto/stringtounsignedlong.c: Reformat range check.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtolonglong.c:1.3 rtems/cpukit/libmisc/stringto/stringtolonglong.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtolonglong.c:1.3        Mon Jan 31 20:32:46 2011
+++ rtems/cpukit/libmisc/stringto/stringtolonglong.c    Mon Jan 31 23:39:20 2011
</font><font color='#997700'>@@ -21,6 +21,15 @@
</font> 
 #include <rtems/stringto.h>
 
<font color='#000088'>+/* c99 has LLONG_MAX instead of LONG_LONG_MAX */
+#ifndef LONG_LONG_MAX
+#define LONG_LONG_MAX  LLONG_MAX
+#endif
+/* c99 has LLONG_MIN instead of LONG_LONG_MIN */
+#ifndef LONG_LONG_MIN
+#define LONG_LONG_MIN  LLONG_MIN
+#endif
+
</font> /*
  *  Instantiate an error checking wrapper for strtoll (long long)
  */
<font color='#997700'>@@ -49,11 +58,9 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == LONG_LONG_MAX) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
-
-  if ( (result == LONG_LONG_MIN) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
+      return RTEMS_INVALID_NUMBER;
</font> 
   *n = result;
 
</pre>
<p> </p>
<a name='cs5'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtodouble.c: Reformat range check.
        Add check for result = -HUGE_VAL.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2691&r2=text&tr2=1.2692&diff_format=h">M</a></td><td width='1%'>1.2692</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtodouble.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtodouble.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2691 rtems/cpukit/ChangeLog:1.2692
--- rtems/cpukit/ChangeLog:1.2691       Mon Jan 31 23:39:20 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:41:07 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringtodouble.c: Reformat range check.
+       Add check for result = -HUGE_VAL.
</font>   * libmisc/stringto/stringtolonglong.c: Reformat range check.
        c99 portability improvements. Add check for result==0.
        * libmisc/stringto/stringtounsignedlonglong.c: Reformat range check.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtodouble.c:1.3 rtems/cpukit/libmisc/stringto/stringtodouble.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtodouble.c:1.3  Mon Jan 31 20:34:19 2011
+++ rtems/cpukit/libmisc/stringto/stringtodouble.c      Mon Jan 31 23:41:07 2011
</font><font color='#997700'>@@ -48,9 +48,8 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == HUGE_VAL) && (errno == ERANGE))
-      return RTEMS_INVALID_NUMBER;
-  if ( (result == 0) && (errno == ERANGE))
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
</font>       return RTEMS_INVALID_NUMBER;
 
   *n = result;
</pre>
<p> </p>
<a name='cs6'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtofloat.c: Reformat range check.
        Add check for result = -HUGE_VALF.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2692&r2=text&tr2=1.2693&diff_format=h">M</a></td><td width='1%'>1.2693</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtofloat.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtofloat.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2692 rtems/cpukit/ChangeLog:1.2693
--- rtems/cpukit/ChangeLog:1.2692       Mon Jan 31 23:41:07 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:41:47 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringtofloat.c: Reformat range check.
+       Add check for result = -HUGE_VALF.
</font>   * libmisc/stringto/stringtodouble.c: Reformat range check.
        Add check for result = -HUGE_VAL.
        * libmisc/stringto/stringtolonglong.c: Reformat range check.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtofloat.c:1.3 rtems/cpukit/libmisc/stringto/stringtofloat.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtofloat.c:1.3   Mon Jan 31 20:34:19 2011
+++ rtems/cpukit/libmisc/stringto/stringtofloat.c       Mon Jan 31 23:41:48 2011
</font><font color='#997700'>@@ -48,9 +48,8 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == HUGE_VALF) && (errno == ERANGE))
-      return RTEMS_INVALID_NUMBER;
-  if ( (result == 0) && (errno == ERANGE))
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
</font>       return RTEMS_INVALID_NUMBER;
 
   *n = result;
</pre>
<p> </p>
<a name='cs7'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtoint.c: Reformat range check.
        Add check for result==0.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2693&r2=text&tr2=1.2694&diff_format=h">M</a></td><td width='1%'>1.2694</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtoint.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtoint.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2693 rtems/cpukit/ChangeLog:1.2694
--- rtems/cpukit/ChangeLog:1.2693       Mon Jan 31 23:41:47 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:43:21 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringtoint.c: Reformat range check.
+       Add check for result==0.
</font>   * libmisc/stringto/stringtofloat.c: Reformat range check.
        Add check for result = -HUGE_VALF.
        * libmisc/stringto/stringtodouble.c: Reformat range check.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtoint.c:1.3 rtems/cpukit/libmisc/stringto/stringtoint.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtoint.c:1.3     Mon Jan 31 10:25:13 2011
+++ rtems/cpukit/libmisc/stringto/stringtoint.c Mon Jan 31 23:43:21 2011
</font><font color='#997700'>@@ -49,11 +49,9 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == LONG_MAX) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
-
-  if ( (result == LONG_MIN) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
+      return RTEMS_INVALID_NUMBER;
</font> 
 #if (INT_MAX < LONG_MAX)
   if ( result > INT_MAX ) {
</pre>
<p> </p>
<a name='cs8'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringto.h: Rename header-guard.
        Add rtems_string_to_long_double.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2694&r2=text&tr2=1.2695&diff_format=h">M</a></td><td width='1%'>1.2695</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringto.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringto.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2694 rtems/cpukit/ChangeLog:1.2695
--- rtems/cpukit/ChangeLog:1.2694       Mon Jan 31 23:43:21 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:45:33 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringto.h: Rename header-guard.
+       Add rtems_string_to_long_double.
</font>   * libmisc/stringto/stringtoint.c: Reformat range check.
        Add check for result==0.
        * libmisc/stringto/stringtofloat.c: Reformat range check.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringto.h:1.3 rtems/cpukit/libmisc/stringto/stringto.h:1.4
--- rtems/cpukit/libmisc/stringto/stringto.h:1.3        Tue Dec  1 16:16:10 2009
+++ rtems/cpukit/libmisc/stringto/stringto.h    Mon Jan 31 23:45:33 2011
</font><font color='#997700'>@@ -9,8 +9,8 @@
</font>  *  $Id$
  */
 
<font color='#880000'>-#ifndef __STRING_TO_A_TYPE_h__
-#define __STRING_TO_A_TYPE_h__
</font><font color='#000088'>+#ifndef _RTEMS_STRINGTO_H
+#define _RTEMS_STRINGTO_H
</font> 
 #include <rtems.h>
 
<font color='#997700'>@@ -224,4 +224,23 @@
</font>   char        **endptr
 );
 
<font color='#000088'>+/**
+ *  @brief Convert String to long double (with validation)
+ *
+ *  This method converts a string to a long double with range validation.
+ *
+ *  @param[in] s is the string to convert
+ *  @param[in] n points to the variable to place the converted output in
+ *  @param[in] endptr is used to keep track of the position in the string
+ *
+ *  @return This method returns RTEMS_SUCCESSFUL on successful conversion
+ *          and *n is filled in.  Otherwise, the status indicates the
+ *          source of the error.
+ */
+rtems_status_code rtems_string_to_long_double(
+  const char   *s,
+  long double  *n,
+  char        **endptr
+);
+
</font> #endif
</pre>
<p> </p>
<a name='cs9'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/Makefile.am: Add stringto/stringtolongdouble.c.
        * libmisc/stringto/stringtolongdouble.c: New.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2695&r2=text&tr2=1.2696&diff_format=h">M</a></td><td width='1%'>1.2696</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/Makefile.am.diff?r1=text&tr1=1.86&r2=text&tr2=1.87&diff_format=h">M</a></td><td width='1%'>1.87</td><td width='100%'>cpukit/libmisc/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtolongdouble.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">cpukit/libmisc/stringto/stringtolongdouble.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2695 rtems/cpukit/ChangeLog:1.2696
--- rtems/cpukit/ChangeLog:1.2695       Mon Jan 31 23:45:33 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:48:30 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/Makefile.am: Add stringto/stringtolongdouble.c.
+       * libmisc/stringto/stringtolongdouble.c: New.
</font>   * libmisc/stringto/stringto.h: Rename header-guard.
        Add rtems_string_to_long_double.
        * libmisc/stringto/stringtoint.c: Reformat range check.

<font color='#006600'>diff -u rtems/cpukit/libmisc/Makefile.am:1.86 rtems/cpukit/libmisc/Makefile.am:1.87
--- rtems/cpukit/libmisc/Makefile.am:1.86       Mon Jan 31 20:39:20 2011
+++ rtems/cpukit/libmisc/Makefile.am    Mon Jan 31 23:48:30 2011
</font><font color='#997700'>@@ -135,6 +135,7 @@
</font> noinst_LIBRARIES += libstringto.a
 libstringto_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/stringto
 libstringto_a_SOURCES = stringto/stringtodouble.c stringto/stringtofloat.c \
<font color='#000088'>+    stringto/stringtolongdouble.c \
</font>     stringto/stringtoint.c stringto/stringtolong.c stringto/stringtolonglong.c \
     stringto/stringtopointer.c stringto/stringtounsignedint.c \
     stringto/stringtounsignedchar.c stringto/stringtounsignedlong.c \

<font color='#006600'>diff -u /dev/null rtems/cpukit/libmisc/stringto/stringtolongdouble.c:1.1
--- /dev/null   Tue Feb  1 00:10:29 2011
+++ rtems/cpukit/libmisc/stringto/stringtolongdouble.c  Mon Jan 31 23:48:30 2011
</font><font color='#997700'>@@ -0,0 +1,58 @@
</font><font color='#000088'>+/*
+ *  COPYRIGHT (c) 2009.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  Copyright (c) 2011  Ralf Corsépius, Ulm, Germany.
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <errno.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include <rtems/stringto.h>
+
+/*
+ *  Instantiate an error checking wrapper for strtod (double)
+ */
+
+rtems_status_code rtems_string_to_long_double (
+  const char *s,
+  long double *n,
+  char **endptr
+)
+{
+  long double result;
+  char *end;
+
+  if ( !n )
+    return RTEMS_INVALID_ADDRESS;
+
+  errno = 0;
+  *n = 0;
+
+  result = strtold( s, &end );
+
+  if ( endptr )
+    *endptr = end;
+
+  if ( end == s )
+    return RTEMS_NOT_DEFINED;
+
+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == HUGE_VALL ) || ( result == -HUGE_VALL )))
+      return RTEMS_INVALID_NUMBER;
+
+  *n = result;
+
+  return RTEMS_SUCCESSFUL;
+}
</font></pre>
<p> </p>
<a name='cs10'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>ralf</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-01 Ralf Corsepius <ralf.corsepius@rtems.org>

        * libmisc/stringto/stringtounsignedchar.c,
        libmisc/stringto/stringtounsignedint.c: Reformat range check.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2696&r2=text&tr2=1.2697&diff_format=h">M</a></td><td width='1%'>1.2697</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtounsignedchar.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtounsignedchar.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/stringto/stringtounsignedint.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/libmisc/stringto/stringtounsignedint.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2696 rtems/cpukit/ChangeLog:1.2697
--- rtems/cpukit/ChangeLog:1.2696       Mon Jan 31 23:48:30 2011
+++ rtems/cpukit/ChangeLog      Mon Jan 31 23:55:32 2011
</font><font color='#997700'>@@ -1,5 +1,7 @@
</font> 2011-02-01        Ralf Corsepius <ralf.corsepius@rtems.org>
 
<font color='#000088'>+   * libmisc/stringto/stringtounsignedchar.c,<span style="background-color: #FF0000"> </span>
+       libmisc/stringto/stringtounsignedint.c: Reformat range check.
</font>   * libmisc/Makefile.am: Add stringto/stringtolongdouble.c.
        * libmisc/stringto/stringtolongdouble.c: New.
        * libmisc/stringto/stringto.h: Rename header-guard.

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtounsignedchar.c:1.3 rtems/cpukit/libmisc/stringto/stringtounsignedchar.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtounsignedchar.c:1.3    Mon Jan 31 10:25:13 2011
+++ rtems/cpukit/libmisc/stringto/stringtounsignedchar.c        Mon Jan 31 23:55:32 2011
</font><font color='#997700'>@@ -49,11 +49,9 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == ULONG_MAX) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
-
-  if ( (result == 0) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == ULONG_MAX )))
+      return RTEMS_INVALID_NUMBER;
</font> 
 #if (UCHAR_MAX < ULONG_MAX)
   if ( result > UCHAR_MAX ) {

<font color='#006600'>diff -u rtems/cpukit/libmisc/stringto/stringtounsignedint.c:1.3 rtems/cpukit/libmisc/stringto/stringtounsignedint.c:1.4
--- rtems/cpukit/libmisc/stringto/stringtounsignedint.c:1.3     Mon Jan 31 10:25:13 2011
+++ rtems/cpukit/libmisc/stringto/stringtounsignedint.c Mon Jan 31 23:55:32 2011
</font><font color='#997700'>@@ -49,11 +49,9 @@
</font>   if ( end == s )
     return RTEMS_NOT_DEFINED;
 
<font color='#880000'>-  if ( (result == ULONG_MAX) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
-
-  if ( (result == 0) && (errno == ERANGE) )
-    return RTEMS_INVALID_NUMBER;
</font><font color='#000088'>+  if ( ( errno == ERANGE ) &&<span style="background-color: #FF0000"> </span>
+    (( result == 0 ) || ( result == ULONG_MAX )))
+      return RTEMS_INVALID_NUMBER;
</font> 
 #if (UINT_MAX < ULONG_MAX)
   if ( result > UINT_MAX ) {
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>