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 /src/Fl_Text_Display.cxx | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
Implement + deploy fl_strdup()
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 8b4450cfa..34f6f38ac 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -20,10 +20,11 @@ #include <stdio.h> #include <stdlib.h> #include <FL/fl_utf8.h> +#include <FL/fl_string.h> // fl_strdup() #include "flstring.h" #include <limits.h> #include <ctype.h> -#include <string.h> // strdup() +#include <string.h> #include <FL/Fl.H> #include <FL/platform.H> #include <FL/Fl_Text_Buffer.H> @@ -171,7 +172,7 @@ Fl_Text_Display::Fl_Text_Display(int X, int Y, int W, int H, const char* l) linenumber_fgcolor_ = FL_INACTIVE_COLOR; linenumber_bgcolor_ = 53; // ~90% gray linenumber_align_ = FL_ALIGN_RIGHT; - linenumber_format_ = strdup("%d"); + linenumber_format_ = fl_strdup("%d"); // Method calls -- only AFTER all members initialized color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR); @@ -326,7 +327,7 @@ Fl_Align Fl_Text_Display::linenumber_align() const { */ void Fl_Text_Display::linenumber_format(const char* val) { if ( linenumber_format_ ) free((void*)linenumber_format_); - linenumber_format_ = val ? strdup(val) : 0; + linenumber_format_ = val ? fl_strdup(val) : 0; } /** |
