Skip to content

Commit

Permalink
Fix freeze of Fl_Native_File_Chooser occurring under Mac OS + X11 whe…
Browse files Browse the repository at this point in the history
…n printing to .ps file

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11330 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Mar 9, 2016
1 parent d4577f0 commit 18098db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/print_panel.cxx
Expand Up @@ -549,7 +549,6 @@ printing_style print_load() { // return whether SystemV or BSD printing style is
}
pclose(lpstat);
}
fclose(stderr);

if (print_choice->size() == 2 && (lpstat = fopen("/etc/printcap", "r"))) { // try next with BSD printing system
while (fgets(line, sizeof(line),lpstat)) { // get names of all known printers
Expand Down Expand Up @@ -598,7 +597,7 @@ void print_update_status() {
if ((lpstat = popen(command, "r")) != NULL) {
if (fgets(status, sizeof(status), lpstat) == 0) { // if no reply
pclose(lpstat);
snprintf(command, sizeof(command), "lpq -P%s", printer); // try next with BSD printing system
snprintf(command, sizeof(command), "lpq -P%s 2>&-", printer); // try next with BSD printing system
if ((lpstat = popen(command, "r")) != NULL) {
if (fgets(status, sizeof(status), lpstat)==0) { /* ignore */ }
}
Expand Down

0 comments on commit 18098db

Please sign in to comment.