comparison src/os_unix.c @ 8281:74b15ed0a259 v7.4.1433

commit https://github.com/vim/vim/commit/85b11769ab507c7df93f319fd964fa579701b76b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 27 18:13:23 2016 +0100 patch 7.4.1433 Problem: The Sniff interface is no longer useful, the tool has not been available for may years. Solution: Delete the Sniff interface and related code.
author Christian Brabandt <cb@256bit.org>
date Sat, 27 Feb 2016 18:15:07 +0100
parents 989ac3aed1ef
children d44ff1525ff0
comparison
equal deleted inserted replaced
8280:65bed5ff0ba6 8281:74b15ed0a259
5338 /* 5338 /*
5339 * Wait "msec" msec until a character is available from file descriptor "fd". 5339 * Wait "msec" msec until a character is available from file descriptor "fd".
5340 * "msec" == 0 will check for characters once. 5340 * "msec" == 0 will check for characters once.
5341 * "msec" == -1 will block until a character is available. 5341 * "msec" == -1 will block until a character is available.
5342 * When a GUI is being used, this will not be used for input -- webb 5342 * When a GUI is being used, this will not be used for input -- webb
5343 * Returns also, when a request from Sniff is waiting -- toni.
5344 * Or when a Linux GPM mouse event is waiting. 5343 * Or when a Linux GPM mouse event is waiting.
5345 * Or when a clientserver message is on the queue. 5344 * Or when a clientserver message is on the queue.
5346 */ 5345 */
5347 #if defined(__BEOS__) 5346 #if defined(__BEOS__)
5348 int 5347 int
5425 # endif 5424 # endif
5426 fds[0].fd = fd; 5425 fds[0].fd = fd;
5427 fds[0].events = POLLIN; 5426 fds[0].events = POLLIN;
5428 nfd = 1; 5427 nfd = 1;
5429 5428
5430 # ifdef FEAT_SNIFF
5431 # define SNIFF_IDX 1
5432 if (want_sniff_request)
5433 {
5434 fds[SNIFF_IDX].fd = fd_from_sniff;
5435 fds[SNIFF_IDX].events = POLLIN;
5436 nfd++;
5437 }
5438 # endif
5439 # ifdef FEAT_XCLIPBOARD 5429 # ifdef FEAT_XCLIPBOARD
5440 may_restore_clipboard(); 5430 may_restore_clipboard();
5441 if (xterm_Shell != (Widget)0) 5431 if (xterm_Shell != (Widget)0)
5442 { 5432 {
5443 xterm_idx = nfd; 5433 xterm_idx = nfd;
5476 if (ret == 0 && mzquantum_used) 5466 if (ret == 0 && mzquantum_used)
5477 /* MzThreads scheduling is required and timeout occurred */ 5467 /* MzThreads scheduling is required and timeout occurred */
5478 finished = FALSE; 5468 finished = FALSE;
5479 # endif 5469 # endif
5480 5470
5481 # ifdef FEAT_SNIFF
5482 if (ret < 0)
5483 sniff_disconnect(1);
5484 else if (want_sniff_request)
5485 {
5486 if (fds[SNIFF_IDX].revents & POLLHUP)
5487 sniff_disconnect(1);
5488 if (fds[SNIFF_IDX].revents & POLLIN)
5489 sniff_request_waiting = 1;
5490 }
5491 # endif
5492 # ifdef FEAT_XCLIPBOARD 5471 # ifdef FEAT_XCLIPBOARD
5493 if (xterm_Shell != (Widget)0 && (fds[xterm_idx].revents & POLLIN)) 5472 if (xterm_Shell != (Widget)0 && (fds[xterm_idx].revents & POLLIN))
5494 { 5473 {
5495 xterm_update(); /* Maybe we should hand out clipboard */ 5474 xterm_update(); /* Maybe we should hand out clipboard */
5496 if (--ret == 0 && !input_available()) 5475 if (--ret == 0 && !input_available())
5572 /* For QNX select() always returns 1 if this is set. Why? */ 5551 /* For QNX select() always returns 1 if this is set. Why? */
5573 FD_SET(fd, &efds); 5552 FD_SET(fd, &efds);
5574 # endif 5553 # endif
5575 maxfd = fd; 5554 maxfd = fd;
5576 5555
5577 # ifdef FEAT_SNIFF
5578 if (want_sniff_request)
5579 {
5580 FD_SET(fd_from_sniff, &rfds);
5581 FD_SET(fd_from_sniff, &efds);
5582 if (maxfd < fd_from_sniff)
5583 maxfd = fd_from_sniff;
5584 }
5585 # endif
5586 # ifdef FEAT_XCLIPBOARD 5556 # ifdef FEAT_XCLIPBOARD
5587 may_restore_clipboard(); 5557 may_restore_clipboard();
5588 if (xterm_Shell != (Widget)0) 5558 if (xterm_Shell != (Widget)0)
5589 { 5559 {
5590 FD_SET(ConnectionNumber(xterm_dpy), &rfds); 5560 FD_SET(ConnectionNumber(xterm_dpy), &rfds);
5650 if (ret == 0 && mzquantum_used) 5620 if (ret == 0 && mzquantum_used)
5651 /* loop if MzThreads must be scheduled and timeout occurred */ 5621 /* loop if MzThreads must be scheduled and timeout occurred */
5652 finished = FALSE; 5622 finished = FALSE;
5653 # endif 5623 # endif
5654 5624
5655 # ifdef FEAT_SNIFF
5656 if (ret < 0 )
5657 sniff_disconnect(1);
5658 else if (ret > 0 && want_sniff_request)
5659 {
5660 if (FD_ISSET(fd_from_sniff, &efds))
5661 sniff_disconnect(1);
5662 if (FD_ISSET(fd_from_sniff, &rfds))
5663 sniff_request_waiting = 1;
5664 }
5665 # endif
5666 # ifdef FEAT_XCLIPBOARD 5625 # ifdef FEAT_XCLIPBOARD
5667 if (ret > 0 && xterm_Shell != (Widget)0 5626 if (ret > 0 && xterm_Shell != (Widget)0
5668 && FD_ISSET(ConnectionNumber(xterm_dpy), &rfds)) 5627 && FD_ISSET(ConnectionNumber(xterm_dpy), &rfds))
5669 { 5628 {
5670 xterm_update(); /* Maybe we should hand out clipboard */ 5629 xterm_update(); /* Maybe we should hand out clipboard */