environ.c (init_choice): Remove unused function.

* runtime/environ.c (init_choice): Remove unused function.
	(show_choice): Likewise.
	(choice): Remove.
	(FP_ROUND_NEAREST, FP_ROUND_UP, FP_ROUND_DOWN, FP_ROUND_ZERO):
	Remove.
	(precision, signal_choices): Remove.

From-SVN: r129423
This commit is contained in:
Ben Elliston 2007-10-17 23:28:37 +00:00 committed by Ben Elliston
parent 394033f804
commit 9651c2ed93
2 changed files with 9 additions and 80 deletions

View file

@ -1,3 +1,12 @@
2007-10-18 Ben Elliston <bje@au.ibm.com>
* runtime/environ.c (init_choice): Remove unused function.
(show_choice): Likewise.
(choice): Remove.
(FP_ROUND_NEAREST, FP_ROUND_UP, FP_ROUND_DOWN, FP_ROUND_ZERO):
Remove.
(precision, signal_choices): Remove.
2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32600

View file

@ -270,86 +270,6 @@ show_string (variable * v)
}
/* Structure for associating names and values. */
typedef struct
{
const char *name;
int value;
}
choice;
enum
{ FP_ROUND_NEAREST, FP_ROUND_UP, FP_ROUND_DOWN, FP_ROUND_ZERO };
static const choice rounding[] = {
{"NEAREST", FP_ROUND_NEAREST},
{"UP", FP_ROUND_UP},
{"DOWN", FP_ROUND_DOWN},
{"ZERO", FP_ROUND_ZERO},
{NULL, 0}
};
static const choice precision[] =
{
{ "24", 1},
{ "53", 2},
{ "64", 0},
{ NULL, 0}
};
static const choice signal_choices[] =
{
{ "IGNORE", 1},
{ "ABORT", 0},
{ NULL, 0}
};
static void
init_choice (variable * v, const choice * c)
{
char *p;
p = getenv (v->name);
if (p == NULL)
goto set_default;
for (; c->name; c++)
if (strcasecmp (c->name, p) == 0)
break;
if (c->name == NULL)
{
v->bad = 1;
goto set_default;
}
*v->var = c->value;
return;
set_default:
*v->var = v->value;
}
static void
show_choice (variable * v, const choice * c)
{
st_printf ("%s ", var_source (v));
for (; c->name; c++)
if (c->value == *v->var)
break;
if (c->name)
st_printf ("%s\n", c->name);
else
st_printf ("(Unknown)\n");
}
static variable variable_table[] = {
{"GFORTRAN_STDIN_UNIT", GFC_STDIN_UNIT_NUMBER, &options.stdin_unit,
init_integer, show_integer,