diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-06 14:15:07 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-07 16:50:56 +0200 |
commit | f1b04c40ba9faf9b7b8969cf3686c35bb7b79b33 (patch) | |
tree | 9e37bde60e1aa7ee17bcd00fe77e5c48151ff224 /test/dw/dw_anchors_test.cc | |
parent | 83e88446c99f793f696984904e47070a287fd15d (diff) |
Use dStrdup instead of strdup
The strdup function is not available in POSIX-2001, so we use our own
implementation in dlib: dStrdup.
Reviewed-by: dogma
Diffstat (limited to 'test/dw/dw_anchors_test.cc')
-rw-r--r-- | test/dw/dw_anchors_test.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/dw/dw_anchors_test.cc b/test/dw/dw_anchors_test.cc index e88cecb6..258acc0e 100644 --- a/test/dw/dw_anchors_test.cc +++ b/test/dw/dw_anchors_test.cc @@ -24,6 +24,7 @@ #include <FL/Fl_Window.H> #include <FL/Fl.H> +#include "dlib/dlib.h" #include "dw/core.hh" #include "dw/fltkcore.hh" #include "dw/fltkviewport.hh" @@ -111,7 +112,7 @@ int main(int argc, char **argv) char buf[16]; strcpy (buf, numbers[i]); buf[0] = lout::misc::AsciiToupper (buf[0]); - buttonLabel[i] = strdup(buf); + buttonLabel[i] = dStrdup(buf); Fl_Button *button = new Fl_Button(0, 20 * i, 50, 20, buttonLabel[i]); button->callback (anchorCallback, (void*)(long)i); button->when (FL_WHEN_RELEASE); |