From 2c1bb09578ef094eef2edce9c3ffe502023851c6 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 17 Dec 2022 18:20:53 +0100 Subject: Remove useless Fl_System_Driver members after 12da87b --- src/drivers/Posix/Fl_Posix_System_Driver.H | 3 --- src/drivers/Posix/Fl_Posix_System_Driver.cxx | 24 ------------------------ 2 files changed, 27 deletions(-) (limited to 'src/drivers/Posix') diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H index 5712f6be2..0de91203b 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.H +++ b/src/drivers/Posix/Fl_Posix_System_Driver.H @@ -83,9 +83,6 @@ public: virtual void gettime(time_t *sec, int *usec); virtual char* strdup(const char *s) {return ::strdup(s);} virtual int close_fd(int fd); - // next 2 for support of Fl_SVG_Image - virtual int write_nonblocking_fd(int , const unsigned char *&, size_t &); - virtual void pipe_support(int &, int &, const unsigned char *, size_t ); #if defined(HAVE_PTHREAD) virtual void lock_ring(); virtual void unlock_ring(); diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.cxx b/src/drivers/Posix/Fl_Posix_System_Driver.cxx index ec43ea741..d8075775d 100644 --- a/src/drivers/Posix/Fl_Posix_System_Driver.cxx +++ b/src/drivers/Posix/Fl_Posix_System_Driver.cxx @@ -310,30 +310,6 @@ bool Fl_Posix_System_Driver::probe_for_GTK(int major, int minor, void **p_ptr_gt int Fl_Posix_System_Driver::close_fd(int fd) { return close(fd); } -int Fl_Posix_System_Driver::write_nonblocking_fd(int fdwrite, const unsigned char *&bytes, size_t &rest_bytes) { - if (rest_bytes > 0) { - ssize_t nw = write(fdwrite, bytes, rest_bytes); - if (nw == -1) { - close(fdwrite); - return 1; // error - } - bytes += nw; - rest_bytes -= nw; - if (rest_bytes == 0) close(fdwrite); - } - return 0; // success -} - -void Fl_Posix_System_Driver::pipe_support(int &fdread, int &fdwrite, const unsigned char *unused, size_t unused_s) { - int fds[2]; - if (pipe(fds)) { // create anonymous pipe - Fl_System_Driver::pipe_support(fdread, fdwrite, NULL, 0); // indicates error - } else { - fdread = fds[0]; - fdwrite = fds[1]; - fcntl(fdwrite, F_SETFL, O_NONBLOCK); // make pipe's write end non-blocking - } -} //////////////////////////////////////////////////////////////// // POSIX threading... -- cgit v1.2.3