diff options
author | toon <toon@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-26 18:33:11 +0000 |
---|---|---|
committer | toon <toon@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-26 18:33:11 +0000 |
commit | f92fbd4fc576e7aaf4817e4563511c082490802c (patch) | |
tree | eb64cb4cb480a3e3e09a79f859da5663dded1d41 | |
parent | e86b5391804b058a1e31e08c7c777f6ce4cb579b (diff) | |
download | gcc-f92fbd4fc576e7aaf4817e4563511c082490802c.tar.gz |
2005-02-26 Peter O'Gorman <peter@pogman.com>
Toon Moene <toon@moene.indiv.nluug.nl>
PR libgfortran/17748
* runtime/environ.c: Remove references to environ.
(show_variables): remove GFORTRAN_UNBUFFERED_* and
GFORTRAN_NAME_* because they require environ.
(pattern_scan): Remove function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95593 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libgfortran/ChangeLog | 9 | ||||
-rw-r--r-- | libgfortran/runtime/environ.c | 61 |
2 files changed, 9 insertions, 61 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index cdb0868cdb6..03793e852ac 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,12 @@ +2005-02-25 Peter O'Gorman <peter@pogman.com> + Toon Moene <toon@moene.indiv.nluug.nl> + + PR libgfortran/17748 + * runtime/environ.c: Remove references to environ. + (show_variables): remove GFORTRAN_UNBUFFERED_* and + GFORTRAN_NAME_* because they require environ. + (pattern_scan): Remove function. + 2004-02-22 Paul Thomas <paulthomas2@wannado.fr> Bud Davis <bdavis@gfortran.org> diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c index ae82f562b75..9fb6ed41939 100644 --- a/libgfortran/runtime/environ.c +++ b/libgfortran/runtime/environ.c @@ -48,7 +48,6 @@ Boston, MA 02111-1307, USA. */ options_t options = { }; -extern char **environ; typedef struct variable { @@ -464,12 +463,6 @@ static variable variable_table[] = { {"GFORTRAN_SHOW_LOCUS", 1, &options.locus, init_boolean, show_boolean, "If TRUE, print filename and line number where runtime errors happen."}, -/* GFORTRAN_NAME_xx (where xx is a unit number) gives the names of files - * preconnected to those units. */ - -/* GFORTRAN_UNBUFFERED_xx (where xx is a unit number) gives a boolean that is used - * to turn off buffering for that unit. */ - {"GFORTRAN_OPTIONAL_PLUS", 0, &options.optional_plus, init_boolean, show_boolean, "Print optional plus signs in numbers where permitted. Default FALSE."}, @@ -577,43 +570,9 @@ check_buffered (int n) } -/* pattern_scan()-- Given an environment string, check that the name - * has the same name as the pattern followed by an integer. On a - * match, a pointer to the value is returned and the integer pointed - * to by n is updated. Returns NULL on no match. */ - -static char * -pattern_scan (char *env, const char *pattern, int *n) -{ - char *p; - size_t len; - - len = strlen (pattern); - if (strncasecmp (env, pattern, len) != 0) - return NULL; - p = env + len; - - if (!isdigit (*p)) - return NULL; - - while (isdigit (*p)) - p++; - - if (*p != '=') - return NULL; - - *p = '\0'; - *n = atoi (env + len); - *p++ = '='; - - return p; -} - - void show_variables (void) { - char *p, **e; variable *v; int n; @@ -640,26 +599,6 @@ show_variables (void) st_printf ("%s\n\n", v->desc); } - st_printf ("\nDefault unit names (GFORTRAN_NAME_x):\n"); - - for (e = environ; *e; e++) - { - p = pattern_scan (*e, "GFORTRAN_NAME_", &n); - if (p == NULL) - continue; - st_printf ("GFORTRAN_NAME_%d %s\n", n, p); - } - - st_printf ("\nUnit buffering overrides (GFORTRAN_UNBUFFERED_x):\n"); - for (e = environ; *e; e++) - { - p = pattern_scan (*e, "GFORTRAN_UNBUFFERED_", &n); - if (p == NULL) - continue; - - st_printf ("GFORTRAN_UNBUFFERED_%d = %s\n", n, p); - } - /* System error codes */ st_printf ("\nRuntime error codes:"); |