summaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2007-10-17 23:28:37 +0000
committerBen Elliston <bje@gcc.gnu.org>2007-10-18 09:28:37 +1000
commit9651c2ed93be4454402d2ae07ba54d755b5f894b (patch)
tree4695ea52d3749e612a758867c9a1614912f89054 /libgfortran/runtime
parent394033f804beb1128fd78b24ba21db2bbc790b00 (diff)
downloadgcc-9651c2ed93be4454402d2ae07ba54d755b5f894b.tar.gz
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
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/environ.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c
index ae06abe0c45..a7ee3a771cb 100644
--- a/libgfortran/runtime/environ.c
+++ b/libgfortran/runtime/environ.c
@@ -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,