diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-07-30 20:19:23 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-07-30 20:19:23 +0000 |
commit | f4a8670d96e90fc24749ff2a88173cd16f1f945b (patch) | |
tree | d2627cc2123cf9d1847bc04339bff2e6e271a2b7 /TOOLS/blocking.c | |
parent | 4deb67c3faeab4dbc063e5442c6d41df78c5de81 (diff) | |
download | mpv-f4a8670d96e90fc24749ff2a88173cd16f1f945b.tar.bz2 mpv-f4a8670d96e90fc24749ff2a88173cd16f1f945b.tar.xz |
Removed long obsolete files.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12921 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS/blocking.c')
-rw-r--r-- | TOOLS/blocking.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/TOOLS/blocking.c b/TOOLS/blocking.c deleted file mode 100644 index d7fb6aaf83..0000000000 --- a/TOOLS/blocking.c +++ /dev/null @@ -1,47 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <sys/time.h> -#include <sys/types.h> -#include <unistd.h> -#include <sys/stat.h> -#include <fcntl.h> - -#define BUFFSIZE (32*65536) - -unsigned char *buffer[1]; - -int main(int argc,char* argv[]){ - - fd_set rfds; - struct timeval tv; - int retval; - int in_fd=0; // stdin - - buffer[0]=malloc(BUFFSIZE); - - if(argc>1) in_fd=open(argv[1],O_RDONLY|O_NONBLOCK); - -while(1){ - FD_ZERO(&rfds); FD_SET(in_fd, &rfds); - tv.tv_sec = 1; - tv.tv_usec = 0; - retval = select(in_fd+1, &rfds, NULL, NULL, &tv); - - if (retval){ - if(FD_ISSET(in_fd, &rfds)){ - // we can read input. - int len; - fprintf(stderr,"r");fflush(stderr); - len=read(in_fd,buffer[0],BUFFSIZE); - fprintf(stderr,"(%d)",len);fflush(stderr); - } - } else { - fprintf(stderr,".");fflush(stderr); - } - - fprintf(stderr,"\n");fflush(stderr); -} - -return 0; -} - |