#include <string.h>#include <errno.h>#include <stdlib.h>#include <stdio.h>#include "arith.internal.h"

Go to the source code of this file.
Functions/Subroutines | |
| int | AR_convert_str_to_int (AR_DATA *res, const AR_TYPE *resulttype, int *bits_used, const char *str, const int *base) |
| int | AR_convert_int_to_str (char *resultstr, const int *base, const AR_DATA *opd, const AR_TYPE *opndtype) |
| int | ar_cvt_str_to_float (ar_data *result, const AR_TYPE *resulttype, const char *str) |
| int | ar_unpack_float_str (long *ibuf, long maxbuflen, long *w, long *d, long *p, const char *str) |
| int | AR_convert_float_to_str (char *resultstr, const AR_DATA *opd, const AR_TYPE *opndtype) |
| int | AR_convert_hex_str_to_float (AR_DATA *result, const AR_TYPE *resulttype, const char *str) |
| int | AR_convert_host_sint64_to_int (AR_DATA *result, const AR_TYPE *resulttype, AR_HOST_SINT64 i64val) |
| int | AR_convert_int_to_host_sint64 (AR_HOST_SINT64 *i64val, const AR_DATA *opnd, const AR_TYPE *opndtype) |
Variables | |
| static char | USMID [] = "\n%Z%%M% %I% %G% %U%\n" |
| static char | rcsid [] = "$Id: strcvt.c,v 1.1.1.1 2005/10/21 19:00:00 marcel Exp $" |
Definition at line 611 of file strcvt.c.
References ar_ctoi64(), ar_data::ar_f128, ar_data::ar_f64, AR_Float_Cray1_128, AR_Float_Cray1_64, AR_Float_Cray1_64_F, AR_Float_IEEE_DN_128, AR_Float_IEEE_DN_32, AR_Float_IEEE_DN_64, AR_Float_IEEE_NR_128, AR_Float_IEEE_NR_32, AR_Float_IEEE_NR_64, AR_Float_IEEE_UP_128, AR_Float_IEEE_UP_32, AR_Float_IEEE_UP_64, AR_Float_IEEE_ZE_128, AR_Float_IEEE_ZE_32, AR_Float_IEEE_ZE_64, ar_i128to64(), ar_i32to64(), ar_i64toc128(), ar_data::ar_ieee128, ar_data::ar_ieee32, ar_data::ar_ieee64, ar_itoc128(), AR_ROUND_NEAREST, ar_state_info::ar_rounding_mode, AR_STAT_INVALID_TYPE, AR_STAT_NEGATIVE, AR_STAT_OK, AR_STAT_OVERFLOW, AR_STAT_UNDEFINED, AR_STAT_ZERO, ar_state_register, AR_status(), HOST_IS_IEEE_FLOAT, opnd, sprintf(), and strcpy.
Referenced by convert_to_string().
Definition at line 758 of file strcvt.c.
References AR_convert_str_to_int(), AR_Float_Cray1_128, AR_Float_Cray1_64, AR_Float_Cray1_64_F, AR_Float_IEEE_DN_128, AR_Float_IEEE_DN_32, AR_Float_IEEE_DN_64, AR_Float_IEEE_NR_128, AR_Float_IEEE_NR_32, AR_Float_IEEE_NR_64, AR_Float_IEEE_UP_128, AR_Float_IEEE_UP_32, AR_Float_IEEE_UP_64, AR_Float_IEEE_ZE_128, AR_Float_IEEE_ZE_32, AR_Float_IEEE_ZE_64, AR_Int_64_U, AR_DATA::ar_internal_data_item1, AR_DATA::ar_internal_data_item2, AR_STAT_INVALID_TYPE, AR_STAT_OK, AR_STAT_UNDEFINED, base, errno, and strncpy().
| int AR_convert_host_sint64_to_int | ( | AR_DATA * | result, | |
| const AR_TYPE * | resulttype, | |||
| AR_HOST_SINT64 | i64val | |||
| ) |
Definition at line 813 of file strcvt.c.
References AR_CLASS, AR_CLASS_INT, AR_convert(), AR_Int_64_S, AR_DATA::ar_internal_data_item1, and AR_STAT_INVALID_TYPE.
Referenced by cval_to_f_int().
| int AR_convert_int_to_host_sint64 | ( | AR_HOST_SINT64 * | i64val, | |
| const AR_DATA * | opnd, | |||
| const AR_TYPE * | opndtype | |||
| ) |
Definition at line 829 of file strcvt.c.
References AR_CLASS, AR_CLASS_INT, AR_convert(), AR_Int_64_S, AR_DATA::ar_internal_data_item1, and AR_STAT_INVALID_TYPE.
Referenced by f_int_to_cval().
| int AR_convert_int_to_str | ( | char * | resultstr, | |
| const int * | base, | |||
| const AR_DATA * | opd, | |||
| const AR_TYPE * | opndtype | |||
| ) |
Definition at line 201 of file strcvt.c.
References __LINE__, AR_CLASS, AR_CLASS_INT, ar_convert_to_integral(), ar_divide_integer(), ar_data::ar_i64, AR_Int_64_S, AR_Int_64_U, ar_internal_error(), ar_negate_integer(), AR_SIGNED, AR_SIGNEDNESS, AR_STAT_INVALID_TYPE, AR_STAT_OK, AR_STAT_UNDEFINED, i, INT64_SIGN, IS_INT64_ZERO, opnd, AR_INT_64::part4, str, strcpy, and ZERO_INT16_UPPER.
Referenced by convert_to_string().
| int AR_convert_str_to_int | ( | AR_DATA * | res, | |
| const AR_TYPE * | resulttype, | |||
| int * | bits_used, | |||
| const char * | str, | |||
| const int * | base | |||
| ) |
Definition at line 47 of file strcvt.c.
References __LINE__, ar_add_integer(), AR_CLASS, AR_CLASS_INT, ar_clear_unused_bits(), ar_data::ar_i64, AR_Int_64_U, AR_INT_SIZE, AR_INT_SIZE_128, AR_INT_SIZE_16, AR_INT_SIZE_24, AR_INT_SIZE_32, AR_INT_SIZE_46, AR_INT_SIZE_64, AR_INT_SIZE_8, ar_internal_error(), AR_leadz(), ar_multiply_integer(), ar_set_invalid_result(), AR_SIGNEDNESS, AR_STAT_INVALID_TYPE, AR_STAT_OK, AR_STAT_OVERFLOW, AR_STAT_UNDEFINED, AR_STAT_ZERO, AR_UNSIGNED, IS_INT16_UPPER_ZERO, IS_INT16_ZERO, IS_INT24_UPPER_ZERO, IS_INT24_ZERO, IS_INT32_UPPER_ZERO, IS_INT32_ZERO, IS_INT46_UPPER_ZERO, IS_INT46_ZERO, IS_INT64_ZERO, IS_INT8_UPPER_ZERO, IS_INT8_ZERO, AR_INT_64::part4, result, ZERO_INT16_UPPER, and ZERO_INT64.
Referenced by AR_convert_hex_str_to_float(), convert_binary_literal(), and convert_hex_literal().
Definition at line 267 of file strcvt.c.
References _defgu2sd, AR_convert(), AR_FLOAT_128, AR_FLOAT_32, AR_FLOAT_64, AR_Float_IEEE_NR_64, AR_FLOAT_SIZE, ar_data::ar_i64, ar_data::ar_ieee128, ar_data::ar_ieee32, ar_data::ar_ieee64, AR_STAT_INVALID_TYPE, AR_STAT_OK, AR_STAT_OVERFLOW, AR_STAT_UNDEFINED, AR_STAT_UNDERFLOW, AR_STAT_ZERO, AR_status(), ar_unpack_float_str(), d, errno, EX_EXPOFLO, EX_EXPUFLO, EX_REAL128, EX_REAL32, EX_REAL64, IS_ERROR_STATUS, memcpy, mode, MODEDP, MODEHP, MODESP, p, AR_INT_64::part1, AR_INT_64::part2, AR_INT_64::part3, AR_INT_64::part4, strtod(), UNROUNDED_TYPE, ZEROIEEE128, ZEROIEEE32, and ZEROIEEE64.
Referenced by AR_convert_str_to_float(), and ar_convert_str_to_float().
| int ar_unpack_float_str | ( | long * | ibuf, | |
| long | maxbuflen, | |||
| long * | w, | |||
| long * | d, | |||
| long * | p, | |||
| const char * | str | |||
| ) |
Definition at line 467 of file strcvt.c.
References AR_STAT_NEGATIVE, AR_STAT_OK, AR_STAT_UNDEFINED, AR_STAT_ZERO, atoi(), i, n, x, and is::z.
Referenced by ar_convert_str_to_float(), and ar_cvt_str_to_float().
1.5.6