[1494] in testers

home help back first fref pref prev next nref lref last post

Fix for xcluster, again...

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Wed Dec 19 10:09:44 1990

From: vanharen@ATHENA.MIT.EDU
Date: Wed, 19 Dec 90 10:09:24 -0500
To: testers@ATHENA.MIT.EDU

The following is a better patch, suggested by John Carr (thanks John!).
It gets rid of the select, which is not really necessary anymore.
Please apply it instead.  Or, again, just pick up the Makefile and
main.c from /mit/xmit/Xcluster/src.
					Thanks,
					  -C.


diff -cr /source/athena/usr.athena/xcluster/Makefile ./Makefile
*** /source/athena/usr.athena/xcluster/Makefile	Tue Nov 20 16:26:22 1990
--- ./Makefile	Wed Dec 19 09:24:07 1990
***************
*** 40,54 ****
  	$(RM) $(ALL) a.out *.o core *~ *.bak tags TAGS
  
  install: $(XTARGET)
! 	-mkdir $(DESTDIR)/usr
! 	-mkdir $(DESTDIR)/usr/athena
! 	-mkdir $(DESTDIR)/usr/athena/lib
! 	$(INSTALL) $(XTARGET).map $(DESTDIR)/usr/lib/X11/bitmaps/mitmap
! 	$(INSTALL) $(XTARGET).owl $(DESTDIR)/usr/lib/X11/bitmaps/owl
! 	$(INSTALL) -s $(XTARGET) $(DESTDIR)/usr/athena
! 	$(INSTALL) -s $(TARGET) $(DESTDIR)/usr/athena
! 	$(INSTALL) -m 0444 $(XTARGET).1 $(DESTDIR)/usr/man/man1
! 	$(INSTALL) -m 0444 $(TARGET).1 $(DESTDIR)/usr/man/man1
  
  tags:
  	ctags -tdw *.c *.h
--- 40,51 ----
  	$(RM) $(ALL) a.out *.o core *~ *.bak tags TAGS
  
  install: $(XTARGET)
! 	$(INSTALL) -m 0444 $(XTARGET).map $(DESTDIR)/usr/lib/X11/bitmaps/mitmap
! 	$(INSTALL) -m 0444 $(XTARGET).owl $(DESTDIR)/usr/lib/X11/bitmaps/owl
! 	$(INSTALL) -s $(XTARGET) $(DESTDIR)/usr/athena/$(XTARGET)
! 	$(INSTALL) -s $(TARGET) $(DESTDIR)/usr/athena/$(TARGET)
! 	$(INSTALL) -m 0444 $(XTARGET).1 $(DESTDIR)/usr/man/man1/$(XTARGET).1 
! 	$(INSTALL) -m 0444 $(TARGET).1 $(DESTDIR)/usr/man/man1/$(TARGET).1 
  
  tags:
  	ctags -tdw *.c *.h
diff -cr /source/athena/usr.athena/xcluster/main.c ./main.c
*** /source/athena/usr.athena/xcluster/main.c	Tue Nov 20 16:22:19 1990
--- ./main.c	Wed Dec 19 10:06:35 1990
***************
*** 8,13 ****
--- 8,14 ----
  #include "xcluster.h"		/* global include file. */
  #include <sys/signal.h>		/* signal handling functions */
  #include <sys/types.h>
+ #include <sys/ioctl.h>
  
  /*
   * GLOBAL VARIABLES
***************
*** 67,107 ****
  
    while(1)
      {
!       while (XPending(display)) /* Got an X Event to deal with? */
  	{
- 	  XNextEvent(display, &event);
- 	  if ((event.type == Expose) && (event.xexpose.count == 0))
- 	    {
  #ifdef notdef
! 	      XEvent event2;
  
! 	      XPeekEvent(display, &event2);
! 	      if ((event2.type == Expose)
! 		  && (event2.xexpose.window == event.xexpose.window))
! 		continue;
! 	      else
! 		expose(event);
  #endif
! 	      expose(event);
! 	    }
  
! 	  if ((event.type == ButtonPress) || (event.type == ButtonRelease))
! 	    button(event);
  
! 	  if (event.type == ConfigureNotify)
  	    {
! 	      if (win_width != event.xconfigure.width)
! 		{
! 		  win_width = event.xconfigure.width;
! 		  XDestroySubwindows(display, window);
! 		  make_buttons(!nq_flag);
! 		}
  	    }
  	}
- 
-       readfds = allfds;
-       (void) select(numfds, &readfds,
- 		    (fd_set *) 0, (fd_set *) 0, (struct timeval *) 0);
      }
  }
  
--- 68,101 ----
  
    while(1)
      {
!       XNextEvent(display, &event);
!       if ((event.type == Expose) && (event.xexpose.count == 0))
  	{
  #ifdef notdef
! 	  XEvent event2;
  
! 	  XPeekEvent(display, &event2);
! 	  if ((event2.type == Expose)
! 	      && (event2.xexpose.window == event.xexpose.window))
! 	    continue;
! 	  else
! 	    expose(event);
  #endif
! 	  expose(event);
! 	}
  
!       if ((event.type == ButtonPress) || (event.type == ButtonRelease))
! 	button(event);
  
!       if (event.type == ConfigureNotify)
! 	{
! 	  if (win_width != event.xconfigure.width)
  	    {
! 	      win_width = event.xconfigure.width;
! 	      XDestroySubwindows(display, window);
! 	      make_buttons(!nq_flag);
  	    }
  	}
      }
  }
  

home help back first fref pref prev next nref lref last post