X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxstrtod.c;h=1e55cd1520406ded7e685dbfc309bf410c53b7d7;hb=28546733a07f8078b9e6c21f52c2e3dcd096af0a;hp=bab8b1219a21f351d88ced4ef907d2eca6163e44;hpb=3738de89a7147a0e0fe78f80757caedc6834cf3a;p=gnulib.git diff --git a/lib/xstrtod.c b/lib/xstrtod.c index bab8b1219..1e55cd152 100644 --- a/lib/xstrtod.c +++ b/lib/xstrtod.c @@ -1,9 +1,28 @@ +/* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Written by Jim Meyering. */ + #ifdef HAVE_CONFIG_H -#include +# include #endif #ifdef STDC_HEADERS -#include +# include #else double strtod (); #endif @@ -11,13 +30,12 @@ double strtod (); #include #include #include -#include #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)