summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_System_Driver.H5
-rw-r--r--src/drivers/Posix/Fl_Posix_System_Driver.H3
-rw-r--r--src/drivers/Posix/Fl_Posix_System_Driver.cxx24
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_System_Driver.H1
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx15
5 files changed, 0 insertions, 48 deletions
diff --git a/src/Fl_System_Driver.H b/src/Fl_System_Driver.H
index 42e2a9815..89a555fdb 100644
--- a/src/Fl_System_Driver.H
+++ b/src/Fl_System_Driver.H
@@ -223,11 +223,6 @@ public:
virtual double wait(double); // must override
virtual int ready() { return 0; } // must override
virtual int close_fd(int) {return -1;} // to close a file descriptor
- // next 2 for support of Fl_SVG_Image
- virtual int write_nonblocking_fd(int , const unsigned char *&, size_t &) {return 0;}
- virtual void pipe_support(int &fdread, int &fdwrite, const unsigned char *, size_t ) {
- fdread = fdwrite = -1;
- }
};
#endif // FL_SYSTEM_DRIVER_H
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...
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H
index d05b580d6..e6e7f5cf9 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H
@@ -114,7 +114,6 @@ public:
virtual void unlock_ring();
virtual double wait(double time_to_wait);
virtual int ready();
- virtual void pipe_support(int &, int &, const unsigned char *, size_t );
virtual int close_fd(int fd);
};
diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
index cdb0805eb..dd0b93a8d 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
@@ -1063,18 +1063,3 @@ static void __cdecl write_func(struct gunz_data *pdata) { // will run in child t
int Fl_WinAPI_System_Driver::close_fd(int fd) {
return _close(fd);
}
-
-void Fl_WinAPI_System_Driver::pipe_support(int &fdread, int &fdwrite, const unsigned char *bytes, size_t length) {
- int fds[2];
- pipe_win32(fds); // create anonymous pipe
- if (fds[0] == -1) return Fl_System_Driver::pipe_support(fdread, fdwrite, NULL, 0);
- fdread = fds[0];
- fdwrite = -1;
- // prepare data transmitted to child thread
- struct gunz_data *thread_data = (struct gunz_data*)malloc(sizeof(struct gunz_data));
- thread_data->data = bytes;
- thread_data->length = (unsigned)length;
- thread_data->fd = fds[1];
- // launch child thread that will write byte buffer to pipe's write end
- _beginthread((void( __cdecl * )( void * ))write_func, 0, thread_data);
-}