diff options
| author | Greg Ercolano <erco@seriss.com> | 2020-07-21 20:15:41 -0700 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2020-08-01 14:19:40 -0700 |
| commit | 2141c63628a831d3f53dad7035c94028f8d0d629 (patch) | |
| tree | 614cb7b627da2decbb7cfe49c081f9d7b4140c58 /examples/table-sort.cxx | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
Implement + deploy fl_strdup()
Diffstat (limited to 'examples/table-sort.cxx')
| -rw-r--r-- | examples/table-sort.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/table-sort.cxx b/examples/table-sort.cxx index d492bf54c..a907af92f 100644 --- a/examples/table-sort.cxx +++ b/examples/table-sort.cxx @@ -26,6 +26,7 @@ #include <FL/Fl_Double_Window.H> #include <FL/fl_draw.H> #include <FL/Fl_Table_Row.H> +#include <FL/fl_string.h> #include <stdio.h> #include <string.h> @@ -225,7 +226,7 @@ void MyTable::load_command(const char *cmd) { char *ss; const char *delim = " \t\n"; for(int t=0; (t==0)?(ss=strtok(s,delim)):(ss=strtok(NULL,delim)); t++) { - rc.push_back(strdup(ss)); + rc.push_back(fl_strdup(ss)); } // Keep track of max # columns if ( (int)rc.size() > cols() ) { |
