X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Ftv%2Ffltcalc.c;h=224082ccaa1688d483cc8cf351816dbd53fbbcb6;hb=0b72f9906b67b60180be7dacf5b720621560399c;hp=105d9623f74d343020ec5f33882d9693703ac42b;hpb=8fb3ce50cde68cff60b14725b205a7c80702a115;p=libfirm diff --git a/ir/tv/fltcalc.c b/ir/tv/fltcalc.c index 105d9623f..224082cca 100644 --- a/ir/tv/fltcalc.c +++ b/ir/tv/fltcalc.c @@ -1,21 +1,34 @@ /* - * Project: libFIRM - * File name: ir/tv/fltcalc.c - * Purpose: - * Author: - * Modified by: - * Created: 2003 - * CVS-ID: $Id$ - * Copyright: (c) 2003 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ +/** + * @file + * @brief tarval floating point calculations + * @date 2003 + * @author Mathias Heil + * @version $Id$ + */ #ifdef HAVE_CONFIG_H # include "config.h" #endif - #include "fltcalc.h" #include "strcalc.h" @@ -34,12 +47,6 @@ #ifdef HAVE_STDLIB_H # include #endif -#ifdef HAVE_ALLOCA_H -# include -#endif -#ifdef HAVE_MALLOC_H -# include -#endif #include #include @@ -711,6 +718,7 @@ static char* _fdiv(const char* a, const char* b, char* result) return _normalize(result, result, sc_had_carry()); } +#if 0 static void _power_of_ten(int exp, descriptor_t *desc, char *result) { char *build; @@ -748,6 +756,7 @@ static void _power_of_ten(int exp, descriptor_t *desc, char *result) _normalize(result, result, 0); } } +#endif /** * Truncate the fractional part away. @@ -906,6 +915,7 @@ char* fc_val_from_str(const char *str, unsigned int len, char exp_size, char man int pos; char *mant_str, *exp_val, *power_val; + (void) len; if (result == NULL) result = calc_buffer; exp_val = alloca(value_size); @@ -1070,6 +1080,8 @@ done: /* XXX excuse of an implementation to make things work */ LLDBL val; + (void) len; + #ifdef HAVE_LONG_DOUBLE val = strtold(str, NULL); #else