Updated test code to use SDL_setenv()
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Dec 2009 07:46:13 +0000
changeset 3591db4af3cb938e
parent 3590 493f252a455c
child 3592 25dc4a86132c
Updated test code to use SDL_setenv()
src/stdlib/SDL_getenv.c
     1.1 --- a/src/stdlib/SDL_getenv.c	Thu Dec 17 07:22:48 2009 +0000
     1.2 +++ b/src/stdlib/SDL_getenv.c	Thu Dec 17 07:46:13 2009 +0000
     1.3 @@ -214,7 +214,7 @@
     1.4      }
     1.5      printf("Setting FIRST=VALUE1 in the environment... ");
     1.6      fflush(stdout);
     1.7 -    if (SDL_putenv("FIRST=VALUE1") == 0) {
     1.8 +    if (SDL_setenv("FIRST", "VALUE1", 0) == 0) {
     1.9          printf("okay\n");
    1.10      } else {
    1.11          printf("failed\n");
    1.12 @@ -229,7 +229,7 @@
    1.13      }
    1.14      printf("Setting SECOND=VALUE2 in the environment... ");
    1.15      fflush(stdout);
    1.16 -    if (SDL_putenv("SECOND=VALUE2") == 0) {
    1.17 +    if (SDL_setenv("SECOND", "VALUE2", 0) == 0) {
    1.18          printf("okay\n");
    1.19      } else {
    1.20          printf("failed\n");
    1.21 @@ -244,7 +244,7 @@
    1.22      }
    1.23      printf("Setting FIRST=NOVALUE in the environment... ");
    1.24      fflush(stdout);
    1.25 -    if (SDL_putenv("FIRST=NOVALUE") == 0) {
    1.26 +    if (SDL_setenv("FIRST", "NOVALUE", 1) == 0) {
    1.27          printf("okay\n");
    1.28      } else {
    1.29          printf("failed\n");
    1.30 @@ -267,4 +267,5 @@
    1.31      return (0);
    1.32  }
    1.33  #endif /* TEST_MAIN */
    1.34 +
    1.35  /* vi: set ts=4 sw=4 expandtab: */