diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-02-10 11:55:34 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-02-10 12:10:40 +0100 |
| commit | 4c1b92eb52db567b4c1618222bb3007a2a2e7d9b (patch) | |
| tree | 58081f8e02a8d43dc273de033d454c16e9946f28 /test | |
| parent | dcb848ca3ed0ebddd4f28888d2a8ab2f59c9fd1c (diff) | |
Implement fl_putenv() as cross-platform putenv()
Diffstat (limited to 'test')
| -rw-r--r-- | test/demo.cxx | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/test/demo.cxx b/test/demo.cxx index 0b72715a1..ddee12234 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -3,7 +3,7 @@ // // Main demo program for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2019 by Bill Spitzak and others. +// Copyright 1998-2020 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -20,23 +20,6 @@ #include <string.h> #include <stdlib.h> -// *FIXME* -// Implement fl_putenv(). Then remove the following comment -// and the #define's of fl_putenv below - -// Visual C++ 2005 incorrectly displays a warning about the use of -// POSIX APIs on Windows, which is supposed to be POSIX compliant... - -#if defined(_MSC_VER) -# define fl_putenv _putenv -#else -# define fl_putenv putenv -#endif // _MSC_VER - -// *FIXME* To do: -// Check whether '#include <unistd.h>' can be removed since chdir() -// has been replaced with fl_chdir() (AlbrechtS, Nov 12, 2017) - #if defined __APPLE__ #include <ApplicationServices/ApplicationServices.h> #endif @@ -459,7 +442,7 @@ int load_the_menu(char* fname) { } int main(int argc, char **argv) { - fl_putenv((char *)"FLTK_DOCDIR=../documentation/html"); + fl_putenv("FLTK_DOCDIR=../documentation/html"); char buf[FL_PATH_MAX]; strcpy(buf, argv[0]); #if DEBUG_EXE_WITH_D |
