Skip to content

Commit

Permalink
Update stdgetenv to use parameter list definition
Browse files Browse the repository at this point in the history
Function definitions using identifier lists have been declared
obsolescent for a long time now.  Since they are slated for removal in
the N2731 draft of C2x, the informal name for the next ISO C standard,
the definition of stdgetenv has been updated to use a parameter list.

(cherry picked from commit 67c8e44)
  • Loading branch information
memreflect committed Apr 6, 2022
1 parent 8b6b36e commit b46361a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions input.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ static char *callreadline(char *prompt) {
return r;
}

/* getenv -- fake version of getenv for readline (or other libraries) */

/* esgetenv -- fake version of getenv for readline (or other libraries) */
static char *esgetenv(const char *name) {
List *value = varlookup(name, NULL);
if (value == NULL)
Expand Down Expand Up @@ -246,8 +247,7 @@ static char *esgetenv(const char *name) {
}

static char *
stdgetenv(name)
register const char *name;
stdgetenv(const char *name)
{
extern char **environ;
register int len;
Expand Down

0 comments on commit b46361a

Please sign in to comment.