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/print_panel.cxx | |
| parent | 7514a73ba759f7fc9965eeef3b92ece899bd7a69 (diff) | |
Implement + deploy fl_strdup()
Diffstat (limited to 'src/print_panel.cxx')
| -rw-r--r-- | src/print_panel.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/print_panel.cxx b/src/print_panel.cxx index 617b9938d..7b29991fa 100644 --- a/src/print_panel.cxx +++ b/src/print_panel.cxx @@ -36,6 +36,7 @@ #include "../src/flstring.h" #include <FL/Fl_Preferences.H> #include <FL/Fl_Int_Input.H> +#include <FL/fl_string.h> static Fl_Double_Window *print_panel=(Fl_Double_Window *)0; static Fl_Group *print_panel_controls=(Fl_Group *)0; @@ -541,7 +542,7 @@ printing_style print_load() { // return whether SystemV or BSD printing style is } *qptr = '\0'; - print_choice->add(qname, 0, 0, (void *)strdup(name), 0); + print_choice->add(qname, 0, 0, (void *)fl_strdup(name), 0); } else if (!strncmp(line, "system default destination: ", 28)) { if (sscanf(line + 28, "%s", defname) != 1) defname[0] = '\0'; } @@ -553,7 +554,7 @@ printing_style print_load() { // return whether SystemV or BSD printing style is while (fgets(line, sizeof(line),lpstat)) { // get names of all known printers if (*line == '#' || (p = strchr(line, '|')) == NULL) continue; *p = 0; - print_choice->add(line, 0, 0, (void *)strdup(line), 0); + print_choice->add(line, 0, 0, (void *)fl_strdup(line), 0); style = BSD; *p = '|'; while (1) { |
