From 2141c63628a831d3f53dad7035c94028f8d0d629 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Tue, 21 Jul 2020 20:15:41 -0700 Subject: Implement + deploy fl_strdup() --- src/print_panel.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/print_panel.cxx') 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 #include +#include 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) { -- cgit v1.2.3