X11R4 patch for SCO XENIX (part08)

Chain Lee chain at paul.rutgers.edu
Mon Jan 7 13:27:04 AEST 1991


*** X11R4.ORIG/mit/server/ddx/xenix/trident/vgaVideo.h	Sun Jan  6 01:04:15 1991
--- X11R4/mit/server/ddx/xenix/trident/vgaVideo.h	Mon Oct 15 15:36:34 1990
***************
*** 0 ****
--- 1,231 ----
+ /*
+  * Copyright IBM Corporation 1987,1988,1989
+  *
+  * All Rights Reserved
+  *
+  * Permission to use, copy, modify, and distribute this software and its
+  * documentation for any purpose and without fee is hereby granted,
+  * provided that the above copyright notice appear in all copies and that 
+  * both that copyright notice and this permission notice appear in
+  * supporting documentation, and that the name of IBM not be
+  * used in advertising or publicity pertaining to distribution of the
+  * software without specific, written prior permission.
+  *
+  * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+  * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+  * SOFTWARE.
+  *
+ */
+ /***********************************************************
+ 		Copyright IBM Corporation 1987,1988
+ 
+                       All Rights Reserved
+ 
+ Permission to use, copy, modify, and distribute this software and its 
+ documentation for any purpose and without fee is hereby granted, 
+ provided that the above copyright notice appear in all copies and that
+ both that copyright notice and this permission notice appear in 
+ supporting documentation, and that the name of IBM not be
+ used in advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission.  
+ 
+ IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
+ 
+ ******************************************************************/
+ 
+ /* $Header: /andrew/X11/r3src/earlyRelease/server/ddx/ibm/vga/RCS/vgaVideo.h,v 6.3 88/11/10 22:51:31 paul Exp $ */
+ /* $Source: /andrew/X11/r3src/earlyRelease/server/ddx/ibm/vga/RCS/vgaVideo.h,v $ */
+ 
+ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS)
+ static char *rcsidvga_video = "$Header: /andrew/X11/r3src/earlyRelease/server/ddx/ibm/vga/RCS/vgaVideo.h,v 6.3 88/11/10 22:51:31 paul Exp $";
+ #endif
+ 
+ #define XENIX
+ 
+ #if defined(lint) | defined(XENIX)
+ #if defined(volatile)
+ #undef volatile
+ #endif
+ #define volatile /**/
+ #if defined(const)
+ #undef const
+ #endif
+ #define const /**/
+ #if defined(signed)
+ #undef signed
+ #endif
+ #define signed /**/
+ #endif
+ 
+ /*
+  * References to all pc ( i.e. '286 ) memory in the
+  * regions used by the [ev]ga server ( the 128K windows )
+  * MUST be long-word ( i.e. 32-bit ) reads or writes.
+  * This definition will change for other memory architectures
+  * ( e.g. AIX-Rt )
+  */
+ #if defined(ATRIO)
+ typedef unsigned long int VideoAdapterObject ;
+ #else
+ #if defined(RTIO) || defined(PCIO)
+ typedef unsigned char VideoAdapterObject ;
+ #else
+ 	******** ERROR ********
+ #endif
+ #endif
+ typedef volatile VideoAdapterObject *VideoMemoryPtr ;
+ #if !defined(BUILD_EGA)
+ typedef volatile VideoAdapterObject *VgaMemoryPtr ;
+ #else
+ typedef volatile VideoAdapterObject *EgaMemoryPtr ;
+ #endif
+ 
+ #if defined(BUILD_EGA)
+ #define EGA_DEV_FILE "/dev/ega"
+ #else
+ #define VGA_DEV_FILE "/dev/vga"
+ #endif
+ 
+ #if !defined(BITMAP_BIT_ORDER)
+ #if defined(ibm032) || defined(i386) || defined(iAPX286) || defined(DOS)
+ #define BITMAP_BIT_ORDER MSBFirst
+ #else
+ 	******** ERROR ********
+ #endif
+ #endif
+ 
+ #if !defined(IMAGE_BYTE_ORDER)
+ #if defined(ibm032)
+ #define IMAGE_BYTE_ORDER MSBFirst
+ #else
+ #if defined(i386) || defined(iAPX286) || defined(DOS)
+ #define IMAGE_BYTE_ORDER LSBFirst
+ #else
+ 	******** ERROR ********
+ #endif
+ #endif
+ #endif
+ 
+ #if defined(BUILD_EGA)
+ #if defined(BSDrt) && defined(ATRIO)
+ #define SCREEN_ADDR	0x000b8000
+ #else
+ #define SCREEN_ADDR	0x000a0000
+ #endif
+ #else /* Must be for the vga */
+ #if defined(i386) && defined(AIX386)
+ #define SCREEN_ADDR	0x020400000 /* "very" MAGIC NUMBER */
+ #else
+ #define SCREEN_ADDR	0x000a0000
+ #endif
+ #endif
+ 
+ #if defined(i386) || defined(iAPX286) || defined(DOS)
+ #define VIDEO_MEMORY_BASE ( (volatile unsigned char *) ( SCREEN_ADDR ) )
+ #else /* BSD43 */
+ #if defined(ATRIO)
+ #define VIDEO_MEMORY_BASE ( (volatile unsigned char *) \
+ 	( 0xd00c0000 | ( SCREEN_ADDR & 0x0001ffff ) ) )
+ #else
+ #if defined(RTIO)
+ #define VIDEO_MEMORY_BASE ( (volatile unsigned char *) \
+ 	( 0xd00c0000 | ( SCREEN_ADDR & 0x0001ffff ) ) )
+ #endif
+ #endif
+ #endif
+ 
+ #if defined(BUILD_EGA)
+ #define EGABASE VIDEO_MEMORY_BASE
+ #else
+ #define VGABASE VIDEO_MEMORY_BASE
+ #endif
+ 
+ /* Bit Ordering Macros */
+ #if !defined(SCRLEFT8)
+ #if (BITMAP_BIT_ORDER == MSBFirst)	/* pc/rt */
+ #define SCRLEFT8(lw, n)	( (unsigned char) (((unsigned char) lw) << (n)) )
+ #else
+ #if (BITMAP_BIT_ORDER == LSBFirst)	/* intel */
+ #define SCRLEFT8(lw, n)	( (unsigned char) (((unsigned char) lw) >> (n)) )
+ #else
+ 	******** ERROR ********
+ #endif
+ #endif
+ #endif
+ #if !defined(SCRRIGHT8)
+ #if BITMAP_BIT_ORDER == MSBFirst	/* pc/rt */
+ #define SCRRIGHT8(lw, n)	( (unsigned char) (((unsigned char)lw) >> (n)) )
+ #else
+ #if BITMAP_BIT_ORDER == LSBFirst
+ #define SCRRIGHT8(lw, n)	( (unsigned char) (((unsigned char)lw) << (n)) )
+ #else
+ 	******** ERROR ********
+ #endif
+ #endif
+ #endif
+ /* These work ONLY on 8-bit wide Quantities !! */
+ #define LeftmostBit ( SCRLEFT8( 0xFF, 7 ) & 0xFF )
+ #define RightmostBit ( SCRRIGHT8( 0xFF, 7 ) & 0xFF )
+ 
+ /*
+  * [ev]ga video screen defines & macros
+  */
+ #define PIX_PER_BYTE 8
+ 
+ #define xGA_BLACK_PIXEL 0
+ #define xGA_WHITE_PIXEL 1
+ 
+ #define xGA_MAXPLANES 4
+ #define xGA_ALLPLANES 0xF
+ 
+ #if !defined(BUILD_EGA)
+ #define NO_TUBE 0
+ #define COLOR_TUBE 1
+ #define MONO_TUBE 2
+ 
+ #define VGA_BLACK_PIXEL xGA_BLACK_PIXEL
+ #define VGA_WHITE_PIXEL xGA_WHITE_PIXEL
+ 
+ #define VGA_MAXPLANES xGA_MAXPLANES
+ #define VGA_ALLPLANES xGA_ALLPLANES
+ 
+ #define VIDEO_MEM_BYTES_PER_PLANE ( 64 * 1024 )
+ 
+ #ifndef VGA720
+ #define BYTES_PER_ROW 80
+ #define MAX_ROW	479
+ #else
+ #define BYTES_PER_ROW 90
+ #define MAX_ROW	539
+ #endif
+ #else /* Must be for ega */
+ #define EGA_BLACK_PIXEL xGA_BLACK_PIXEL
+ #define EGA_WHITE_PIXEL xGA_WHITE_PIXEL
+ 
+ #define EGA_MAXPLANES xGA_MAXPLANES
+ #define EGA_ALLPLANES xGA_ALLPLANES
+ 
+ #define VIDEO_MEM_BYTES_PER_PLANE ( 32 * 1024 )
+ 
+ #define BYTES_PER_ROW 80
+ #define MAX_ROW	349
+ #endif
+ 
+ #define MAX_COLUMN ( ( BYTES_PER_ROW * PIX_PER_BYTE ) - 1 )
+ #define MAX_OFFSCREEN_ROW ( ( VIDEO_MEM_BYTES_PER_PLANE / BYTES_PER_ROW ) - 1 )
+ #define ROW_OFFSET( PIXEL_X_VALUE ) ( ( PIXEL_X_VALUE ) >> 3 )
+ #define BIT_OFFSET( PIXEL_X_VALUE ) ( ( PIXEL_X_VALUE ) & 0x7 )
+ #define BYTE_OFFSET( PIXEL_X_VALUE, PIXEL_Y_VALUE ) \
+ 	( ( ( PIXEL_Y_VALUE ) * BYTES_PER_ROW ) + ( ( PIXEL_X_VALUE ) >> 3 ) )
+ #define SCREENADDRESS( PIXEL_X_VALUE, PIXEL_Y_VALUE ) \
+ 	( VIDEO_MEMORY_BASE + BYTE_OFFSET( PIXEL_X_VALUE, PIXEL_Y_VALUE ) )
*** X11R4.ORIG/mit/server/ddx/xenix/README	Sun Jan  6 01:04:17 1991
--- X11R4/mit/server/ddx/xenix/README	Sun Jan  6 00:58:57 1991
***************
*** 0 ****
--- 1,19 ----
+ #
+ # README						C. Lee 1/5/90
+ #
+ 
+ Following files and directories are under this directory
+ 
+ README		- the one you are reading
+ 
+ vga		- standard VGA 640 X 480 monchrome mode
+ 
+ trident		- trident 8800 vga 800 X 600, 1024 X 600, 1024 X 768 interlaced
+ 
+ trident.color	- trident 8800 640x480 256 color mode. Unfinished, needs 
+ 		  significant changes in cfb to support _trident_bank_mapping_
+ 		  which is terribly poor for bitblt.
+ 
+ 		  I have never seen a technical document worse than the
+ 		  Trident's. I have done enough reverse engineering and might
+ 		  just give up for a better designed and documented card.
*** X11R4.ORIG/mit/server/include/servermd.h	Wed Dec  6 16:56:30 1989
--- X11R4/mit/server/include/servermd.h	Wed Oct 17 22:31:34 1990
***************
*** 126,131 ****
--- 126,140 ----
  
  #endif /* sun */
  
+ #ifdef xenix
+ 
+ #define IMAGE_BYTE_ORDER	LSBFirst        /* Values for the Xenix only*/
+ #define BITMAP_BIT_ORDER	MSBFirst
+ #define	GLYPHPADBYTES		1
+ #define GETLEFTBITS_ALIGNMENT	4
+ 
+ #endif /* xenix */
+ 
  #ifdef apollo
  
  #define IMAGE_BYTE_ORDER	MSBFirst        /* Values for the Apollo only*/
***************
*** 226,232 ****
  #endif
  
  /* pad scanline to a longword */
! #if defined(ibm) && defined(i386)
  #define BITMAP_SCANLINE_UNIT	8
  #else
  #define BITMAP_SCANLINE_UNIT	32
--- 235,241 ----
  #endif
  
  /* pad scanline to a longword */
! #if defined(ibm) && defined(i386) || defined(xenix)
  #define BITMAP_SCANLINE_UNIT	8
  #else
  #define BITMAP_SCANLINE_UNIT	32
*** X11R4.ORIG/mit/server/include/os.h	Wed Dec  6 16:41:39 1989
--- X11R4/mit/server/include/os.h	Sun Nov  4 09:43:31 1990
***************
*** 70,76 ****
  #endif /* defined(__HIGHC__) */
  
  
! #ifdef __GNUC__
  #define alloca __builtin_alloca
  #define ALLOCATE_LOCAL(size) alloca((int)(size))
  #define DEALLOCATE_LOCAL(ptr)  /* as nothing */
--- 70,76 ----
  #endif /* defined(__HIGHC__) */
  
  
! #if defined(__GNUC__)
  #define alloca __builtin_alloca
  #define ALLOCATE_LOCAL(size) alloca((int)(size))
  #define DEALLOCATE_LOCAL(ptr)  /* as nothing */
*** X11R4.ORIG/mit/server/os/4.2bsd/connection.c	Mon Nov 13 11:53:50 1989
--- X11R4/mit/server/os/4.2bsd/connection.c	Wed Jan  2 17:03:50 1991
***************
*** 49,55 ****
  #include <sys/socket.h>
  
  #include <signal.h>
- #include <fcntl.h>
  #include <setjmp.h>
  
  #ifdef hpux
--- 49,54 ----
***************
*** 74,86 ****
--- 73,90 ----
  /*
   * sites should be careful to have separate /tmp directories for diskless nodes
   */
+ #ifndef BSD_SOCKET_EMULATION
  #include <sys/un.h>
+ #endif
  #include <sys/stat.h>
  static int unixDomainConnection = -1;
  #endif
  
+ #undef NULL
  #include <stdio.h>
+ #ifndef xenix
  #include <sys/uio.h>
+ #endif
  #include "osstruct.h"
  #include "osdep.h"
  #include "opaque.h"
***************
*** 225,231 ****
  #endif /* TCPCONN */
  
  #ifdef UNIXCONN
- 
  static struct sockaddr_un unsock;
  
  static int
--- 229,234 ----
***************
*** 237,246 ****
--- 240,253 ----
      unsock.sun_family = AF_UNIX;
      oldUmask = umask (0);
  #ifdef X_UNIX_DIR
+ #ifndef BSD_SOCKET_EMULATION
      mkdir (X_UNIX_DIR, 0777);
      chmod (X_UNIX_DIR, 0777);
  #endif
+ #endif
+ #ifndef BSD_SOCKET_EMULATION
      strcpy (unsock.sun_path, X_UNIX_PATH);
+ #endif
      strcat (unsock.sun_path, display);
  #ifdef hpux
      {  
***************
*** 263,269 ****
--- 270,278 ----
          symlink(unsock.sun_path, oldLinkName);
      }
  #endif	/* hpux */
+ #ifndef BSD_SOCKET_EMULATION
      unlink (unsock.sun_path);
+ #endif
      if ((request = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) 
      {
  	Error ("Creating Unix socket");
***************
*** 439,444 ****
--- 448,458 ----
  {
      ResetOsBuffers();
  #ifdef UNIXCONN
+ /*
+  * The xenix socket is clean, so we don't have to deal with this mess!
+  * - Chain Lee
+  */
+ #ifndef BSD_SOCKET_EMULATION
      if (unixDomainConnection != -1)
      {
  	/*
***************
*** 459,464 ****
--- 473,479 ----
  		WellKnownConnections |= (1L << unixDomainConnection);
  	}
      }
+ #endif
  #endif /* UNIXCONN */
      ResetAuthorization ();
      ResetHosts(display);
***************
*** 530,535 ****
--- 545,554 ----
  	auth_id = (XID) 0;
      }
  
+ #ifdef xenix
+     auth_id = (XID) 0;
+ #endif
+ 
      if (auth_id == (XID) ~0L)
  	return "Client is not authorized to connect to Server";
  
***************
*** 753,758 ****
--- 772,780 ----
   *    If would truly be wonderful if select() would put the bogus
   *    file descriptors in the exception mask, but nooooo.  So we have
   *    to check each and every socket individually.
+  *    
+  *    The Xenix socket driver support select() on exception condition.
+  *    So things are much better here. - Chain Lee.
   *****************/
  
  void
***************
*** 768,775 ****
--- 790,815 ----
      notime.tv_sec = 0;
      notime.tv_usec = 0;
  
+ #if BSD_SOCKET_EMULATION
+     /*
+      * Much more efficient here, but may not be reliable.
+      */
+     COPYBITS(AllClients, tmask);
+     r = select (MAXSOCKS, (int *)NULL, (int *)NULL, (int *)tmask, 
+ 		&notime);
      for (i=0; i<mskcnt; i++)
      {
+     	mask = tmask[i];
+     	while (mask) {
+ 	    curoff = ffs (mask) - 1;
+  	    curclient = curoff + (i << 5);
+ 	    CloseDownClient(clients[ConnectionTranslation[curclient]]);
+ 	    mask &= ~(1 << curoff);
+ 	}
+     }
+ #else
+     for (i=0; i<mskcnt; i++)
+     {
  	mask = AllClients[i];
          while (mask)
      	{
***************
*** 783,791 ****
  		CloseDownClient(clients[ConnectionTranslation[curclient]]);
  	    mask &= ~(1 << curoff);
  	}
!     }	
  }
- 
  
  /*****************
   * CloseDownConnection
--- 823,831 ----
  		CloseDownClient(clients[ConnectionTranslation[curclient]]);
  	    mask &= ~(1 << curoff);
  	}
!     }
! #endif
  }
  
  /*****************
   * CloseDownConnection
*** X11R4.ORIG/mit/server/os/4.2bsd/WaitFor.c	Sat Dec  2 11:57:55 1989
--- X11R4/mit/server/os/4.2bsd/WaitFor.c	Wed Jan  2 17:01:57 1991
***************
*** 112,117 ****
--- 112,126 ----
  }
  #endif
  
+ 
+ char *tvtos(tv)
+ struct timeval *tv;
+ {
+ 	static	char buf[20];
+ 	sprintf(buf, "(%d, %d)", tv->tv_sec, tv->tv_usec);
+ 	return buf;
+ }
+ 
  int
  WaitForSomething(pClientsReady)
      int *pClientsReady;
***************
*** 121,140 ****
      long timeout;
      long clientsReadable[mskcnt];
      long clientsWritable[mskcnt];
      long curclient;
      int selecterr;
      int nready;
      long devicesReadable[mskcnt];
  
      CLEARBITS(clientsReadable);
  
      /* We need a while loop here to handle 
         crashed connections and the screen saver timeout */
      while (1)
      {
  	if (ANYSET(ClientsWithInput))
  	{
! 	    COPYBITS(ClientsWithInput, clientsReadable);
  	    break;
  	}
  	if (ScreenSaverTime)
--- 130,156 ----
      long timeout;
      long clientsReadable[mskcnt];
      long clientsWritable[mskcnt];
+     long clientsBroken[mskcnt];
      long curclient;
      int selecterr;
      int nready;
      long devicesReadable[mskcnt];
  
      CLEARBITS(clientsReadable);
+     CLEARBITS(clientsBroken);
  
      /* We need a while loop here to handle 
         crashed connections and the screen saver timeout */
      while (1)
      {
+ #ifdef	xenix
+ 	extern int xenixEventPending;
+     	if (xenixEventPending)
+     	    break;
+ #endif
  	if (ANYSET(ClientsWithInput))
  	{
! 	    COPYBITS(ClientsWithInput, clientsReadable); 
  	    break;
  	}
  	if (ScreenSaverTime)
***************
*** 166,171 ****
--- 182,193 ----
  	    }
  	    if (timeTilFrob >= 0)
  	    {
+ 
+ #ifdef xenix
+ 	    /* should get rid of this busy waiting loop */
+ 	    if (timeout > 5)
+ 		timeout = 5;
+ #endif
  		waittime.tv_sec = timeout / MILLI_PER_SECOND;
  		waittime.tv_usec = (timeout % MILLI_PER_SECOND) *
  					(1000000 / MILLI_PER_SECOND);
***************
*** 179,184 ****
--- 201,208 ----
  	else
  	    wt = NULL;
  	COPYBITS(AllSockets, LastSelectMask);
+ 	COPYBITS(AllSockets, clientsBroken);
+ 
  #ifdef apollo
          COPYBITS(apInputMask, LastWriteMask);
  #endif
***************
*** 198,214 ****
--- 222,259 ----
  	else if (AnyClientsWriteBlocked)
  	{
  	    COPYBITS(ClientsWriteBlocked, clientsWritable);
+ #ifdef BSD_SOCKET_EMULATION
  	    i = select (MAXSOCKS, (int *)LastSelectMask,
+ 			(int *)clientsWritable, (int *)clientsBroken, wt);
+ 	    if (ANYSET(clientsBroken)) {
+ 	    	i = -1;
+ 	    	errno = EBADF;
+ 	    }
+ #else
+ 	    i = select (MAXSOCKS, (int *)LastSelectMask,
  			(int *)clientsWritable, (int *) NULL, wt);
+ #endif
  	}
  	else
+ 	{
  #ifdef apollo
  	    i = select (MAXSOCKS, (int *)LastSelectMask,
  			(int *)LastWriteMask, (int *) NULL, wt);
  #else
+ #ifdef BSD_SOCKET_EMULATION
+ 	    CLEARBITS(clientsWritable);
  	    i = select (MAXSOCKS, (int *)LastSelectMask,
+ 			(int *) clientsWritable, (int *) clientsBroken, wt);
+ 	    if (ANYSET(clientsBroken)) {
+ 	    	i = -1;
+ 	    	errno = EBADF;
+ 	    }
+ #else
+ 	    i = select (MAXSOCKS, (int *)LastSelectMask,
  			(int *) NULL, (int *) NULL, wt);
  #endif
+ #endif
+ 	}
  	selecterr = errno;
  	WakeupHandler((unsigned long)i, (pointer)LastSelectMask);
  #ifdef XTESTEXT1
***************
*** 273,278 ****
      }
      return nready;
  }
- 
  
  
--- 318,322 ----
*** X11R4.ORIG/mit/server/os/4.2bsd/access.c	Sun Nov 12 15:39:31 1989
--- X11R4/mit/server/os/4.2bsd/access.c	Wed Jan  2 17:02:57 1991
***************
*** 33,48 ****
  #include <sys/socket.h>
  #include <sys/ioctl.h>
  
! #ifdef hpux
  # include <sys/utsname.h>
- # ifdef HAS_IFREQ
- #  include <net/if.h>
- # endif
  #else
! # include <net/if.h>
! #endif /* hpux */
  
  #include <netdb.h>
  #ifdef TCPCONN
  #include <netinet/in.h>
  #endif /* TCPCONN */
--- 33,54 ----
  #include <sys/socket.h>
  #include <sys/ioctl.h>
  
! #ifdef xenix
  # include <sys/utsname.h>
  #else
! # if defined(hpux)
! #  include <sys/utsname.h>
! #  ifdef HAS_IFREQ
! #   include <net/if.h>
! #  endif
! # else
! #  include <net/if.h>
! # endif /* hpux */
! #endif /*xenix */
  
+ #ifndef BSD_SOCKET_EMULATION
  #include <netdb.h>
+ #endif
  #ifdef TCPCONN
  #include <netinet/in.h>
  #endif /* TCPCONN */
***************
*** 106,114 ****
  #endif /* AF_CHAOS */
  #ifdef    AF_INET
  #ifdef    TCPCONN
!     {AF_INET, FamilyInternet}
  #endif
  #endif
  };
  
  /*
--- 112,121 ----
  #endif /* AF_CHAOS */
  #ifdef    AF_INET
  #ifdef    TCPCONN
!     {AF_INET, FamilyInternet},
  #endif
  #endif
+     {0, 0}
  };
  
  /*
***************
*** 136,142 ****
      LocalHostEnabled = FALSE;
  }
  
! #define FAMILIES ((sizeof familyMap)/(sizeof familyMap[0]))
  
  #if defined (hpux) && ! defined (HAS_IFREQ)
  /* Define this host for access control.  Find all the hosts the OS knows about 
--- 143,149 ----
      LocalHostEnabled = FALSE;
  }
  
! #define FAMILIES ((sizeof familyMap)/(sizeof familyMap[0]) - 1)
  
  #if defined (hpux) && ! defined (HAS_IFREQ)
  /* Define this host for access control.  Find all the hosts the OS knows about 
***************
*** 199,204 ****
--- 206,218 ----
  }
  
  #else
+ #ifdef BSD_SOCKET_EMULATION
+ DefineSelf (fd)
+     int fd;
+ {
+ 	
+ }
+ #else
  /* Define this host for access control.  Find all the hosts the OS knows about 
   * for this fd and add them to the selfhosts list.
   */
***************
*** 314,319 ****
--- 328,334 ----
  #endif
      }
  }
+ #endif
  #endif /* hpux && !HAS_IFREQ */
  
  #ifdef XDMCP
*** X11R4.ORIG/mit/server/os/4.2bsd/io.c	Thu Sep 14 16:19:57 1989
--- X11R4/mit/server/os/4.2bsd/io.c	Fri Oct  5 21:16:45 1990
***************
*** 35,41 ****
--- 35,43 ----
  #include "Xmd.h"
  #include <errno.h>
  #include <sys/param.h>
+ #ifndef xenix
  #include <sys/uio.h>
+ #endif
  #include "X.h"
  #include "Xproto.h"
  #include "os.h"
*** X11R4.ORIG/mit/server/os/4.2bsd/oscolor.c	Thu Oct  4 16:07:56 1990
--- X11R4/mit/server/os/4.2bsd/oscolor.c	Wed Aug 29 00:02:43 1990
***************
*** 22,37 ****
  
  ******************************************************************/
  /* $XConsortium: oscolor.c,v 1.17 89/12/18 15:41:43 rws Exp $ */
- 
- #include "rgb.h"
- #include "os.h"
- #if !defined(sparc)
- 
  #ifdef NDBM
  #include <ndbm.h>
  #else
  #include <dbm.h>
  #endif
  
  /* Looks up the color in the database.  Note that we are assuming there
   * is only one database for all the screens.  If you have multiple databases,
--- 22,34 ----
  
  ******************************************************************/
  /* $XConsortium: oscolor.c,v 1.17 89/12/18 15:41:43 rws Exp $ */
  #ifdef NDBM
  #include <ndbm.h>
  #else
  #include <dbm.h>
  #endif
+ #include "rgb.h"
+ #include "os.h"
  
  /* Looks up the color in the database.  Note that we are assuming there
   * is only one database for all the screens.  If you have multiple databases,
***************
*** 90,139 ****
      }
      return(0);
  }
- #else /* It is a sun4 with broken DBM. */
  
- /* Looks up the color in the database.
-  */
- static struct {
-     unsigned short sRed, sGreen, sBlue;
-     char *pcName;
- } ptDataBase[] = {
- #include "rgbdb.h"
- };
- 
- static int iDbSize = sizeof(ptDataBase)/sizeof(ptDataBase[0]);
- 
- extern void CopyISOLatin1Lowered();
- 
- int OsLookupColor(screen, name, len, pred, pgreen, pblue)
-     int		screen;
-     char	*name;
-     unsigned	len;
-     unsigned short	*pred, *pgreen, *pblue;
- 
- {
-     int i;
-     char	*lowername;
- 
-     /* convert name to lower case */
-     lowername = (char *)ALLOCATE_LOCAL(len + 1);
-     if (!lowername)
- 	return(0);
-     CopyISOLatin1Lowered ((unsigned char *) lowername, (unsigned char *) name,
- 			  (int)len);
- 
-     for(i=0;i<iDbSize;i++){
- 	if(!strcmp(ptDataBase[i].pcName,lowername))
- 	    break;
-     }
-     DEALLOCATE_LOCAL(lowername);
-     if(i < iDbSize){
- 	*pred = (ptDataBase[i].sRed * 65535) / 255;
- 	*pgreen = (ptDataBase[i].sGreen * 65535) / 255;
- 	*pblue = (ptDataBase[i].sBlue * 65535) / 255;
- 	return 1;
-     } else {
- 	return 0;
-     }
- }
- #endif sun4
--- 87,90 ----
*** X11R4.ORIG/mit/server/os/4.2bsd/xdmcp.c	Wed Dec 13 14:42:17 1989
--- X11R4/mit/server/os/4.2bsd/xdmcp.c	Fri Aug 31 09:47:29 1990
***************
*** 13,18 ****
--- 13,20 ----
   *
   */
  
+ #ifdef XDMCP
+ 
  #include "Xos.h"
  #include <sys/param.h>
  #include <sys/socket.h>
***************
*** 26,32 ****
  #include "input.h"
  #include "opaque.h"
  
- #ifdef XDMCP
  #include "Xdmcp.h"
  
  extern int argcGlobal;
--- 28,33 ----
*** X11R4.ORIG/mit/server/Imakefile	Sat Dec 16 19:09:30 1989
--- X11R4/mit/server/Imakefile	Sun Dec 16 23:08:49 1990
***************
*** 9,14 ****
--- 9,17 ----
  #else
        OTHEREXTS = /* nothing */
  #endif
+ 
+             VGA = vga /* trident */
+ 
       EXTENSIONS = $(OTHEREXTS) $(EXTENSIONSRC)/server/libext.a
           EXTDIR = $(EXTENSIONSRC)/server
      FONTUTILDIR = $(FONTSRC)/mkfontdir
***************
*** 24,29 ****
--- 27,33 ----
           APOLLO = ddx/apollo/libapollo.a
              APC = ddx/apollo/apc/libapc.a
              SUN = ddx/sun/libsun.a
+           XENIX = ddx/xenix/$(VGA)/libxenix.a os/4.2bsd/libos.a ../lib/X/libX11.a
            MACII = ddx/macII/libmacII.a
              TEK = ddx/tek/libtek.a
           XAULIB = $(TOP)/lib/Xau/libXau.a
***************
*** 89,94 ****
--- 93,104 ----
  #define	XsunServer /* as nothing */
  #endif
  
+ #ifdef	XxenixServer
+ #define	doxenixServer
+ #else
+ #define	doxenixServer /* as nothing */
+ #endif
+ 
  #ifdef	XhpServer
  #define dohpServer
  #else
***************
*** 126,133 ****
   *                                                                           *
  /*****************************************************************************
   */
! ALL = XqvssServer XqdssServer XsunServer XapolloServer XibmServer XhpServer XmacIIServer XmfbpmaxServer XcfbpmaxServer XtekServer
! ALLPOSSIBLE = Xqvss Xqdss Xsun Xibm Xapollo Xhp XmacII Xcfbpmax Xmfbpmax Xtek
  
  all: $(ALL)
  
--- 136,144 ----
   *                                                                           *
  /*****************************************************************************
   */
! #ALL = XqvssServer XqdssServer XsunServer XapolloServer XibmServer XhpServer XmacIIServer XmfbpmaxServer XcfbpmaxServer XtekServer
! ALL = XxenixServer
! ALLPOSSIBLE = Xqvss Xqdss Xsun Xxenix Xibm Xapollo Xhp XmacII Xcfbpmax Xmfbpmax Xtek
  
  all: $(ALL)
  
***************
*** 271,278 ****
--- 282,334 ----
  	#load /usr/lib/libdbm.a
  #endif /* dosunServer */
  
+ #ifdef doxenixServer
+ /**/#
+ /**/# xenix server
+ /**/#
+ #define need_dix
+ #define need_ddx_snf
+ #define need_ddx_mi
+ #define need_ddx_mfb
+ #define need_ddx_cfb
+ #define need_ddx_xenix
+ #define need_os_xenix
+ XENIXDIRS = dix ddx/snf ddx/mi ddx/mfb ddx/cfb ddx/xenix/$(VGA) os/4.2bsd
+ XENIXOBJS = ddx/xenix/$(VGA)/xenixInit.o $(FONTUTIL)
+ XENIXLIBS = $(XENIX) $(CFB) $(DIX) $(SNF) $(MFB) $(MI) $(EXTENSIONS)
+ XENIXSYSLIBS = $(SYSLIBS)
+ XxenixDIRS = $(XENIXDIRS)
  
+ ServerTarget(Xxenix,$(EXTDIR) $(FONTUTILDIR) $(XENIXDIRS),$(XENIXOBJS),$(XENIXLIBS),$(XENIXSYSLIBS))
  
+ saber_src_xenix:
+ 	#cd dix
+ 	#make saber_src
+ 	#cd ../ddx/snf
+ 	#make saber_src
+ 	#cd ../mi
+ 	#make saber_src
+ 	#cd ../mfb
+ 	#make saber_src
+ 	#cd ../cfb
+ 	#make saber_src
+ 	#cd ../xenix
+ 	#make saber_src
+ 	#cd ../../os/4.2bsd
+ 	#make saber_src
+ 	#cd ../../../extensions/server
+ 	#make saber_src
+ 	#cd ../../fonts/mkfontdir
+ 	#make saber_src_server
+ 	#cd ../../lib/Xau
+ 	#make saber_src
+ 	#cd ../../server
+ 	#load /usr/lib/libm.a
+ 	#load /usr/lib/libdbm.a
+ #endif /* doxenixServer */
+ 
+ 
+ 
  #ifdef dohpServer
  /**/#
  /**/# HP server
***************
*** 417,422 ****
--- 473,483 ----
  #else
  #define dir_os_bsdemul /**/
  #endif
+ #ifdef need_os_xenix
+ #define dir_os_xenix os/4.2bsd
+ #else
+ #define dir_os_xenix /**/
+ #endif
  
  #ifdef need_ddx_snf
  #define dir_ddx_snf ddx/snf
***************
*** 502,526 ****
  #else
  #define dir_ddx_sun /**/
  #endif
  
  OURDIX = dir_dix
  OURDDX = dir_ddx_snf dir_ddx_mfb dir_ddx_cfb dir_ddx_mi
! OUROS = dir_os_42bsd dir_os_bsdemul
  DECDDX = dir_ddx_dec_lk201 dir_ddx_dec_qdss dir_ddx_dec_qvss dir_ddx_dec_mfbpmax dir_ddx_dec_cfbpmax
  HPDDX = dir_ddx_hp
! OTHERDDX = dir_ddx_apollo dir_ddx_apollo_apc dir_ddx_ibm dir_ddx_macII dir_ddx_sun dir_ddx_tek
  
  SUBDIRS = $(OURDIX) $(OURDDX) $(OUROS) $(DECDDX) $(HPDDX) $(OTHERDDX)
  
       ALLDDXDIRS = ddx/snf ddx/mi ddx/cfb ddx/mfb \
                    ddx/dec/lk201 ddx/dec/qvss ddx/dec/qdss ddx/dec/qdss/libtl \
                    ddx/sun \
                    ddx/apollo ddx/apollo/apc \
                    ddx/ibm \
  		  ddx/dec/mfbpmax ddx/dec/cfbpmax \
                    ddx/hp ddx/tek \
                    ddx/macII
!       ALLOSDIRS = os/4.2bsd os/bsdemul
       ALLSUBDIRS = dix $(ALLDDXDIRS) $(ALLOSDIRS)
  
  InstallMultiple($(ALL),$(BINDIR))
--- 563,593 ----
  #else
  #define dir_ddx_sun /**/
  #endif
+ #ifdef need_ddx_xenix
+ #define dir_ddx_xenix ddx/xenix/$(VGA)
+ #else
+ #define dir_ddx_xenix /**/
+ #endif
  
  OURDIX = dir_dix
  OURDDX = dir_ddx_snf dir_ddx_mfb dir_ddx_cfb dir_ddx_mi
! OUROS = dir_os_42bsd dir_os_bsdemul dir_os_xenix
  DECDDX = dir_ddx_dec_lk201 dir_ddx_dec_qdss dir_ddx_dec_qvss dir_ddx_dec_mfbpmax dir_ddx_dec_cfbpmax
  HPDDX = dir_ddx_hp
! OTHERDDX = dir_ddx_apollo dir_ddx_apollo_apc dir_ddx_ibm dir_ddx_macII dir_ddx_sun dir_ddx_xenix dir_ddx_tek
  
  SUBDIRS = $(OURDIX) $(OURDDX) $(OUROS) $(DECDDX) $(HPDDX) $(OTHERDDX)
  
       ALLDDXDIRS = ddx/snf ddx/mi ddx/cfb ddx/mfb \
                    ddx/dec/lk201 ddx/dec/qvss ddx/dec/qdss ddx/dec/qdss/libtl \
                    ddx/sun \
+ 		  ddx/xenix/$(VGA) \
                    ddx/apollo ddx/apollo/apc \
                    ddx/ibm \
  		  ddx/dec/mfbpmax ddx/dec/cfbpmax \
                    ddx/hp ddx/tek \
                    ddx/macII
!       ALLOSDIRS = os/4.2bsd /* os/bsdemul */
       ALLSUBDIRS = dix $(ALLDDXDIRS) $(ALLOSDIRS)
  
  InstallMultiple($(ALL),$(BINDIR))



More information about the Alt.sources mailing list