summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-03-24 18:20:25 +0000
committerJim Meyering <jim@meyering.net>1996-03-24 18:20:25 +0000
commitf35597f9dd9799bd46a6cbb35c3bbe6e9cc6dd7a (patch)
treee6333a7b73b38cfcd00ff5dcd94721c6de22342a
parent3738de89a7147a0e0fe78f80757caedc6834cf3a (diff)
downloadgnulib-f35597f9dd9799bd46a6cbb35c3bbe6e9cc6dd7a.tar.gz
.
-rw-r--r--lib/xstrtod.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/lib/xstrtod.c b/lib/xstrtod.c
index bab8b1219a..d15c57efec 100644
--- a/lib/xstrtod.c
+++ b/lib/xstrtod.c
@@ -1,3 +1,22 @@
+/* xstrtod.c - error-checking interface to strtod
+ Copyright (C) 1996 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+/* Written by Jim Meyering. */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -11,13 +30,12 @@ double strtod ();
#include <errno.h>
#include <stdio.h>
#include <limits.h>
-#include <ctype.h>
#include "xstrtod.h"
/* An interface to strtod that encapsulates all the error checking
- one should usually perform. Like strtod, but return zero upon
- successful conversion and put the result in *RESULT. Return
- non-zero upon any failure. */
+ one should usually perform. Like strtod, but upon successful
+ conversion put the result in *RESULT and return zero. Return
+ non-zero and don't modify *RESULT upon any failure. */
int
xstrtod (str, ptr, result)